From baf8e1e39b23e9271b1b8da16714d5d0b2c91d5d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 25 Mar 2024 17:38:20 -0700 Subject: wtmpdb: Upgrade to 0.11.0 release Brings these changes wtmpdb last: support matching for username and/or tty last: add support for time-format option Drop lto patch as it has been fixed differently. Add a patch to fix build with musl Signed-off-by: Khem Raj --- ...001-remove-lto-to-fix-link-error-of-clang.patch | 31 ------------------- .../0001-include-libgen.h-for-basename.patch | 32 +++++++++++++++++++ meta-oe/recipes-extended/wtmpdb/wtmpdb_0.11.0.bb | 35 +++++++++++++++++++++ meta-oe/recipes-extended/wtmpdb/wtmpdb_0.9.3.bb | 36 ---------------------- 4 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 meta-oe/recipes-extended/wtmpdb/files/0001-remove-lto-to-fix-link-error-of-clang.patch create mode 100644 meta-oe/recipes-extended/wtmpdb/wtmpdb/0001-include-libgen.h-for-basename.patch create mode 100644 meta-oe/recipes-extended/wtmpdb/wtmpdb_0.11.0.bb delete mode 100644 meta-oe/recipes-extended/wtmpdb/wtmpdb_0.9.3.bb (limited to 'meta-oe') diff --git a/meta-oe/recipes-extended/wtmpdb/files/0001-remove-lto-to-fix-link-error-of-clang.patch b/meta-oe/recipes-extended/wtmpdb/files/0001-remove-lto-to-fix-link-error-of-clang.patch deleted file mode 100644 index ef188e7a15..0000000000 --- a/meta-oe/recipes-extended/wtmpdb/files/0001-remove-lto-to-fix-link-error-of-clang.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 9840939789dec9153150e8f9ae34de4171a5c15e Mon Sep 17 00:00:00 2001 -From: Wang Mingyu -Date: Wed, 19 Jul 2023 07:31:32 +0000 -Subject: [PATCH] remove lto to fix link error of clang - -error message: -| tests/tst-dlopen.p/tst-dlopen.c.o: file not recognized: file format not recognized -| clang-16: error: linker command failed with exit code 1 (use -v to see invocation) - -Upstream-Status: Pending - -Signed-off-by: Wang Mingyu ---- - meson.build | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 6fe8045..166a15b 100644 ---- a/meson.build -+++ b/meson.build -@@ -28,7 +28,6 @@ add_project_arguments(['-D_GNU_SOURCE=1', - '-D_TIME_BITS=64'], language : 'c') - - possible_cc_flags = [ -- '-flto=auto', - '-ffat-lto-objects', - '-fstack-protector-strong', - '-funwind-tables', --- -2.34.1 - diff --git a/meta-oe/recipes-extended/wtmpdb/wtmpdb/0001-include-libgen.h-for-basename.patch b/meta-oe/recipes-extended/wtmpdb/wtmpdb/0001-include-libgen.h-for-basename.patch new file mode 100644 index 0000000000..766865e27b --- /dev/null +++ b/meta-oe/recipes-extended/wtmpdb/wtmpdb/0001-include-libgen.h-for-basename.patch @@ -0,0 +1,32 @@ +From 32f99ce7e890a457af50606ea7b577659a2a790a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 25 Mar 2024 17:35:07 -0700 +Subject: [PATCH] include libgen.h for basename + +basename prototype has been removed from string.h from latest musl [1] +compilers e.g. clang-18 flags the absense of prototype as error. therefore +include libgen.h for providing it. + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Submitted [https://github.com/thkukuk/wtmpdb/pull/11] +Signed-off-by: Khem Raj +--- + src/wtmpdb.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/wtmpdb.c b/src/wtmpdb.c +index aac7b5b..eaffae6 100644 +--- a/src/wtmpdb.c ++++ b/src/wtmpdb.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.44.0 + diff --git a/meta-oe/recipes-extended/wtmpdb/wtmpdb_0.11.0.bb b/meta-oe/recipes-extended/wtmpdb/wtmpdb_0.11.0.bb new file mode 100644 index 0000000000..785ae50e9e --- /dev/null +++ b/meta-oe/recipes-extended/wtmpdb/wtmpdb_0.11.0.bb @@ -0,0 +1,35 @@ +SUMMARY = "Y2038 safe version of wtmp" +HOMEPAGE = "https://github.com/thkukuk/wtmpdb" +DESCRIPTION = "last reports the login and logout times of users and when the machine got rebooted." +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=020090a00b69dd2af9ab82eb0003ea2c" +SECTION = "libs" + +SRCREV = "493e9704dbc50f141d5fbd41c823311e79d7e8d3" + +SRC_URI = "git://github.com/thkukuk/wtmpdb.git;branch=main;protocol=https \ + file://0001-include-libgen.h-for-basename.patch" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig systemd features_check + +DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} sqlite3 " +REQUIRED_DISTRO_FEATURES = "pam" + +SYSTEMD_SERVICE:${PN} = "wtmpdb-update-boot.service wtmpdb-rotate.service" + +EXTRA_OEMESON = " -Dpamlibdir=${libdir}" + +do_install:append () { + if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then + # Fix makefile hardcoded path assumptions for systemd (assumes $prefix) + # without usrmerge distro feature enabled + install -d `dirname ${D}${systemd_unitdir}` + mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}` + fi +} + +FILES:${PN} += " ${systemd_system_unitdir} " +FILES:${PN} += " ${libdir} " +FILES:${PN} += " ${nonarch_libdir}/tmpfiles.d/* " diff --git a/meta-oe/recipes-extended/wtmpdb/wtmpdb_0.9.3.bb b/meta-oe/recipes-extended/wtmpdb/wtmpdb_0.9.3.bb deleted file mode 100644 index 6d23c00707..0000000000 --- a/meta-oe/recipes-extended/wtmpdb/wtmpdb_0.9.3.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Y2038 safe version of wtmp" -HOMEPAGE = "https://github.com/thkukuk/wtmpdb" -DESCRIPTION = "last reports the login and logout times of users and when the machine got rebooted." -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=020090a00b69dd2af9ab82eb0003ea2c" -SECTION = "libs" - -SRCREV = "8ef2677a13d19aee3a834500f9c8a4dac9d68ef7" - -SRC_URI = "git://github.com/thkukuk/wtmpdb.git;branch=main;protocol=https \ - file://0001-remove-lto-to-fix-link-error-of-clang.patch \ -" - -S = "${WORKDIR}/git" - -inherit meson pkgconfig systemd features_check - -DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} sqlite3 " -REQUIRED_DISTRO_FEATURES = "pam" - -SYSTEMD_SERVICE:${PN} = "wtmpdb-update-boot.service wtmpdb-rotate.service" - -EXTRA_OEMESON = " -Dpamlibdir=${libdir}" - -do_install:append () { - if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then - # Fix makefile hardcoded path assumptions for systemd (assumes $prefix) - # without usrmerge distro feature enabled - install -d `dirname ${D}${systemd_unitdir}` - mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}` - fi -} - -FILES:${PN} += " ${systemd_system_unitdir} " -FILES:${PN} += " ${libdir} " -FILES:${PN} += " ${nonarch_libdir}/tmpfiles.d/* " -- cgit v1.2.3-54-g00ecf