diff mbox series

[meta-oe,v2] libfaketime: add recipe

Message ID 20230818105212.34481-1-tymoteusz.burak@3mdeb.com
State New
Headers show
Series [meta-oe,v2] libfaketime: add recipe | expand

Commit Message

Tymoteusz Burak Aug. 18, 2023, 10:52 a.m. UTC
This commit adds the libfaketime library recipe, which provides time
manipulation capabilities for testing and debugging purposes. libfaketime allows
developers to modify the system time reported to applications, aiding in scenarios
where accurate time emulation is required.

GitHub Repository: https://github.com/wolfcw/libfaketime

Signed-off-by: Tymoteusz Burak <tymoteusz.burak@3mdeb.com>
---
 .../libfaketime/libfaketime_0.9.10.bb         | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb

Comments

Khem Raj Aug. 19, 2023, 6:38 a.m. UTC | #1
fails to build with clang
https://errors.yoctoproject.org/Errors/Details/732361/

On Fri, Aug 18, 2023 at 3:52 AM Tymoteusz Burak
<tymoteusz.burak@3mdeb.com> wrote:
>
> This commit adds the libfaketime library recipe, which provides time
> manipulation capabilities for testing and debugging purposes. libfaketime allows
> developers to modify the system time reported to applications, aiding in scenarios
> where accurate time emulation is required.
>
> GitHub Repository: https://github.com/wolfcw/libfaketime
>
> Signed-off-by: Tymoteusz Burak <tymoteusz.burak@3mdeb.com>
> ---
>  .../libfaketime/libfaketime_0.9.10.bb         | 34 +++++++++++++++++++
>  1 file changed, 34 insertions(+)
>  create mode 100644 meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
>
> diff --git a/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
> new file mode 100644
> index 000000000000..f26e5b0db872
> --- /dev/null
> +++ b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
> @@ -0,0 +1,34 @@
> +DESCRIPTION = "A library for faking the system time in user-space programs"
> +SECTION = "libs"
> +LICENSE = "GPL-2.0-only"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> +
> +SRCREV = "d475b925943ad404c6c728ac868dc73949e7281c"
> +SRC_URI = "\
> +    git://git@github.com/wolfcw/libfaketime.git;branch=master;protocol=https \
> +    "
> +
> +S = "${WORKDIR}/git"
> +
> +EXTRA_OEMAKE += "\
> +    EXTRA_FLAGS='-Wno-error=nonnull-compare' \
> +    "
> +
> +do_configure[noexec] = "1"
> +do_compile () {
> +    oe_runmake
> +}
> +do_install () {
> +    install -d ${D}${libdir}/faketime
> +    oe_libinstall -C src libfaketime ${D}${libdir}/faketime
> +    install -d ${D}${bindir}
> +    install -m 0755 src/faketime ${D}${bindir}
> +}
> +
> +PACKAGES =+ "lib${PN}"
> +
> +FILES:${PN} = "${bindir}/faketime"
> +FILES:lib${PN} = "${libdir}/faketime/*"
> +
> +INSANE_SKIP:${PN} += "dev-so"
> +INSANE_SKIP:lib${PN} += "dev-so"
> --
> 2.41.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#104485): https://lists.openembedded.org/g/openembedded-devel/message/104485
> Mute This Topic: https://lists.openembedded.org/mt/100817966/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Martin Jansa Aug. 30, 2023, 7:33 a.m. UTC | #2
Can we name the lib${PN} package differently, e.g. libfaketime? With
multilib the package name is ridiculous lib32-liblib32-libfaketime:

ERROR: lib32-libfaketime-0.9.10-r0 do_package_qa: QA Issue: non
-dev/-dbg/nativesdk- package lib32-liblib32-libfaketime contains symlink
.so '/usr/lib32/faketime/libfaketime.so' [dev-so]

On Sat, Aug 19, 2023 at 8:39 AM Khem Raj <raj.khem@gmail.com> wrote:

> fails to build with clang
> https://errors.yoctoproject.org/Errors/Details/732361/
>
> On Fri, Aug 18, 2023 at 3:52 AM Tymoteusz Burak
> <tymoteusz.burak@3mdeb.com> wrote:
> >
> > This commit adds the libfaketime library recipe, which provides time
> > manipulation capabilities for testing and debugging purposes.
> libfaketime allows
> > developers to modify the system time reported to applications, aiding in
> scenarios
> > where accurate time emulation is required.
> >
> > GitHub Repository: https://github.com/wolfcw/libfaketime
> >
> > Signed-off-by: Tymoteusz Burak <tymoteusz.burak@3mdeb.com>
> > ---
> >  .../libfaketime/libfaketime_0.9.10.bb         | 34 +++++++++++++++++++
> >  1 file changed, 34 insertions(+)
> >  create mode 100644 meta-oe/recipes-test/libfaketime/
> libfaketime_0.9.10.bb
> >
> > diff --git a/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
> b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
> > new file mode 100644
> > index 000000000000..f26e5b0db872
> > --- /dev/null
> > +++ b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
> > @@ -0,0 +1,34 @@
> > +DESCRIPTION = "A library for faking the system time in user-space
> programs"
> > +SECTION = "libs"
> > +LICENSE = "GPL-2.0-only"
> > +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> > +
> > +SRCREV = "d475b925943ad404c6c728ac868dc73949e7281c"
> > +SRC_URI = "\
> > +    git://
> git@github.com/wolfcw/libfaketime.git;branch=master;protocol=https \
> > +    "
> > +
> > +S = "${WORKDIR}/git"
> > +
> > +EXTRA_OEMAKE += "\
> > +    EXTRA_FLAGS='-Wno-error=nonnull-compare' \
> > +    "
> > +
> > +do_configure[noexec] = "1"
> > +do_compile () {
> > +    oe_runmake
> > +}
> > +do_install () {
> > +    install -d ${D}${libdir}/faketime
> > +    oe_libinstall -C src libfaketime ${D}${libdir}/faketime
> > +    install -d ${D}${bindir}
> > +    install -m 0755 src/faketime ${D}${bindir}
> > +}
> > +
> > +PACKAGES =+ "lib${PN}"
> > +
> > +FILES:${PN} = "${bindir}/faketime"
> > +FILES:lib${PN} = "${libdir}/faketime/*"
> > +
> > +INSANE_SKIP:${PN} += "dev-so"
> > +INSANE_SKIP:lib${PN} += "dev-so"
> > --
> > 2.41.0
> >
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#104494):
> https://lists.openembedded.org/g/openembedded-devel/message/104494
> Mute This Topic: https://lists.openembedded.org/mt/100817966/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Khem Raj Aug. 30, 2023, 2:41 p.m. UTC | #3
On Wed, Aug 30, 2023 at 12:33 AM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> Can we name the lib${PN} package differently, e.g. libfaketime? With multilib the package name is ridiculous lib32-liblib32-libfaketime:
>
> ERROR: lib32-libfaketime-0.9.10-r0 do_package_qa: QA Issue: non -dev/-dbg/nativesdk- package lib32-liblib32-libfaketime contains symlink .so '/usr/lib32/faketime/libfaketime.so' [dev-so]

yes, I think I had that feedback in mind but I forgot to provide it.
We should be fine to rename lib${PN} -> ${PN}
>
> On Sat, Aug 19, 2023 at 8:39 AM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> fails to build with clang
>> https://errors.yoctoproject.org/Errors/Details/732361/
>>
>> On Fri, Aug 18, 2023 at 3:52 AM Tymoteusz Burak
>> <tymoteusz.burak@3mdeb.com> wrote:
>> >
>> > This commit adds the libfaketime library recipe, which provides time
>> > manipulation capabilities for testing and debugging purposes. libfaketime allows
>> > developers to modify the system time reported to applications, aiding in scenarios
>> > where accurate time emulation is required.
>> >
>> > GitHub Repository: https://github.com/wolfcw/libfaketime
>> >
>> > Signed-off-by: Tymoteusz Burak <tymoteusz.burak@3mdeb.com>
>> > ---
>> >  .../libfaketime/libfaketime_0.9.10.bb         | 34 +++++++++++++++++++
>> >  1 file changed, 34 insertions(+)
>> >  create mode 100644 meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
>> >
>> > diff --git a/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
>> > new file mode 100644
>> > index 000000000000..f26e5b0db872
>> > --- /dev/null
>> > +++ b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
>> > @@ -0,0 +1,34 @@
>> > +DESCRIPTION = "A library for faking the system time in user-space programs"
>> > +SECTION = "libs"
>> > +LICENSE = "GPL-2.0-only"
>> > +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
>> > +
>> > +SRCREV = "d475b925943ad404c6c728ac868dc73949e7281c"
>> > +SRC_URI = "\
>> > +    git://git@github.com/wolfcw/libfaketime.git;branch=master;protocol=https \
>> > +    "
>> > +
>> > +S = "${WORKDIR}/git"
>> > +
>> > +EXTRA_OEMAKE += "\
>> > +    EXTRA_FLAGS='-Wno-error=nonnull-compare' \
>> > +    "
>> > +
>> > +do_configure[noexec] = "1"
>> > +do_compile () {
>> > +    oe_runmake
>> > +}
>> > +do_install () {
>> > +    install -d ${D}${libdir}/faketime
>> > +    oe_libinstall -C src libfaketime ${D}${libdir}/faketime
>> > +    install -d ${D}${bindir}
>> > +    install -m 0755 src/faketime ${D}${bindir}
>> > +}
>> > +
>> > +PACKAGES =+ "lib${PN}"
>> > +
>> > +FILES:${PN} = "${bindir}/faketime"
>> > +FILES:lib${PN} = "${libdir}/faketime/*"
>> > +
>> > +INSANE_SKIP:${PN} += "dev-so"
>> > +INSANE_SKIP:lib${PN} += "dev-so"
>> > --
>> > 2.41.0
>> >
>> >
>> >
>> >
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#104494): https://lists.openembedded.org/g/openembedded-devel/message/104494
>> Mute This Topic: https://lists.openembedded.org/mt/100817966/3617156
>> Group Owner: openembedded-devel+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [Martin.Jansa@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Martin Jansa Aug. 30, 2023, 3:13 p.m. UTC | #4
And does it really need to be installed in "${libdir}/faketime"
subdirectory?

If yes, can we at least avoid the symlinks, e.g. with:

FILES:${PN} = "${bindir}/faketime ${libdir}/faketime/lib*${SOLIBS}"
FILES:${PN}-dev += "${libdir}/faketime/lib*${SOLIBSDEV}"

I'll send RFC patch which fixes the build with mulilib, but I don't use
libfaketime (and I haven't read the discussion on previous versions of this
patch, so sending only as RFC for Tymotheusz to review),

On Wed, Aug 30, 2023 at 4:41 PM Khem Raj <raj.khem@gmail.com> wrote:

> On Wed, Aug 30, 2023 at 12:33 AM Martin Jansa <martin.jansa@gmail.com>
> wrote:
> >
> > Can we name the lib${PN} package differently, e.g. libfaketime? With
> multilib the package name is ridiculous lib32-liblib32-libfaketime:
> >
> > ERROR: lib32-libfaketime-0.9.10-r0 do_package_qa: QA Issue: non
> -dev/-dbg/nativesdk- package lib32-liblib32-libfaketime contains symlink
> .so '/usr/lib32/faketime/libfaketime.so' [dev-so]
>
> yes, I think I had that feedback in mind but I forgot to provide it.
> We should be fine to rename lib${PN} -> ${PN}
> >
> > On Sat, Aug 19, 2023 at 8:39 AM Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >> fails to build with clang
> >> https://errors.yoctoproject.org/Errors/Details/732361/
> >>
> >> On Fri, Aug 18, 2023 at 3:52 AM Tymoteusz Burak
> >> <tymoteusz.burak@3mdeb.com> wrote:
> >> >
> >> > This commit adds the libfaketime library recipe, which provides time
> >> > manipulation capabilities for testing and debugging purposes.
> libfaketime allows
> >> > developers to modify the system time reported to applications, aiding
> in scenarios
> >> > where accurate time emulation is required.
> >> >
> >> > GitHub Repository: https://github.com/wolfcw/libfaketime
> >> >
> >> > Signed-off-by: Tymoteusz Burak <tymoteusz.burak@3mdeb.com>
> >> > ---
> >> >  .../libfaketime/libfaketime_0.9.10.bb         | 34
> +++++++++++++++++++
> >> >  1 file changed, 34 insertions(+)
> >> >  create mode 100644 meta-oe/recipes-test/libfaketime/
> libfaketime_0.9.10.bb
> >> >
> >> > diff --git a/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
> b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
> >> > new file mode 100644
> >> > index 000000000000..f26e5b0db872
> >> > --- /dev/null
> >> > +++ b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
> >> > @@ -0,0 +1,34 @@
> >> > +DESCRIPTION = "A library for faking the system time in user-space
> programs"
> >> > +SECTION = "libs"
> >> > +LICENSE = "GPL-2.0-only"
> >> > +LIC_FILES_CHKSUM =
> "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> >> > +
> >> > +SRCREV = "d475b925943ad404c6c728ac868dc73949e7281c"
> >> > +SRC_URI = "\
> >> > +    git://
> git@github.com/wolfcw/libfaketime.git;branch=master;protocol=https \
> >> > +    "
> >> > +
> >> > +S = "${WORKDIR}/git"
> >> > +
> >> > +EXTRA_OEMAKE += "\
> >> > +    EXTRA_FLAGS='-Wno-error=nonnull-compare' \
> >> > +    "
> >> > +
> >> > +do_configure[noexec] = "1"
> >> > +do_compile () {
> >> > +    oe_runmake
> >> > +}
> >> > +do_install () {
> >> > +    install -d ${D}${libdir}/faketime
> >> > +    oe_libinstall -C src libfaketime ${D}${libdir}/faketime
> >> > +    install -d ${D}${bindir}
> >> > +    install -m 0755 src/faketime ${D}${bindir}
> >> > +}
> >> > +
> >> > +PACKAGES =+ "lib${PN}"
> >> > +
> >> > +FILES:${PN} = "${bindir}/faketime"
> >> > +FILES:lib${PN} = "${libdir}/faketime/*"
> >> > +
> >> > +INSANE_SKIP:${PN} += "dev-so"
> >> > +INSANE_SKIP:lib${PN} += "dev-so"
> >> > --
> >> > 2.41.0
> >> >
> >> >
> >> >
> >> >
> >>
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >> Links: You receive all messages sent to this group.
> >> View/Reply Online (#104494):
> https://lists.openembedded.org/g/openembedded-devel/message/104494
> >> Mute This Topic: https://lists.openembedded.org/mt/100817966/3617156
> >> Group Owner: openembedded-devel+owner@lists.openembedded.org
> >> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
> [Martin.Jansa@gmail.com]
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >>
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
new file mode 100644
index 000000000000..f26e5b0db872
--- /dev/null
+++ b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
@@ -0,0 +1,34 @@ 
+DESCRIPTION = "A library for faking the system time in user-space programs"
+SECTION = "libs"
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRCREV = "d475b925943ad404c6c728ac868dc73949e7281c"
+SRC_URI = "\
+    git://git@github.com/wolfcw/libfaketime.git;branch=master;protocol=https \
+    "
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE += "\
+    EXTRA_FLAGS='-Wno-error=nonnull-compare' \
+    "
+
+do_configure[noexec] = "1"
+do_compile () {
+    oe_runmake
+}
+do_install () {
+    install -d ${D}${libdir}/faketime
+    oe_libinstall -C src libfaketime ${D}${libdir}/faketime
+    install -d ${D}${bindir}
+    install -m 0755 src/faketime ${D}${bindir}
+}
+
+PACKAGES =+ "lib${PN}"
+
+FILES:${PN} = "${bindir}/faketime"
+FILES:lib${PN} = "${libdir}/faketime/*"
+
+INSANE_SKIP:${PN} += "dev-so"
+INSANE_SKIP:lib${PN} += "dev-so"