summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-extended/lastlog2/files/0001-remove-lto-to-fix-link-error-of-clang.patch31
-rw-r--r--meta-oe/recipes-extended/lastlog2/lastlog2_1.1.0.bb36
2 files changed, 67 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/lastlog2/files/0001-remove-lto-to-fix-link-error-of-clang.patch b/meta-oe/recipes-extended/lastlog2/files/0001-remove-lto-to-fix-link-error-of-clang.patch
new file mode 100644
index 0000000000..71c3de9748
--- /dev/null
+++ b/meta-oe/recipes-extended/lastlog2/files/0001-remove-lto-to-fix-link-error-of-clang.patch
@@ -0,0 +1,31 @@
1From 692523d2f8bf0ce893a781761154db4277f0fceb Mon Sep 17 00:00:00 2001
2From: Wang Mingyu <wangmy@fujitsu.com>
3Date: Wed, 19 Jul 2023 07:11:15 +0000
4Subject: remove lto to fix link error of clang
5
6error message:
7| tests/tst-y2038-64bit-time_t.p/tst-y2038-64bit-time_t.c.o: file not recognized: file format not recognized
8| clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
9
10Upstream-Status: Pending
11
12Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
13---
14 meson.build | 1 -
15 1 file changed, 1 deletion(-)
16
17diff --git a/meson.build b/meson.build
18index c521577..13d993b 100644
19--- a/meson.build
20+++ b/meson.build
21@@ -26,7 +26,6 @@ add_project_arguments(['-D_GNU_SOURCE=1',
22 '-DPROJECT_VERSION="@0@"'.format(meson.project_version()) ], language : 'c')
23
24 possible_cc_flags = [
25- '-flto=auto',
26 '-ffat-lto-objects',
27 '-fstack-protector-strong',
28 '-funwind-tables',
29--
302.34.1
31
diff --git a/meta-oe/recipes-extended/lastlog2/lastlog2_1.1.0.bb b/meta-oe/recipes-extended/lastlog2/lastlog2_1.1.0.bb
new file mode 100644
index 0000000000..757af0073a
--- /dev/null
+++ b/meta-oe/recipes-extended/lastlog2/lastlog2_1.1.0.bb
@@ -0,0 +1,36 @@
1SUMMARY = "Y2038 safe version of lastlog"
2HOMEPAGE = "https://github.com/thkukuk/lastlog2"
3DESCRIPTION = "lastlog reports the last login of a given user or of all users who did ever login on a system."
4LICENSE = "BSD-2-Clause"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=020090a00b69dd2af9ab82eb0003ea2c"
6SECTION = "libs"
7
8SRCREV = "585153a577788c590370d20e40263b61238dfab3"
9
10SRC_URI = "git://github.com/thkukuk/lastlog2.git;branch=main;protocol=https \
11 file://0001-remove-lto-to-fix-link-error-of-clang.patch \
12"
13
14S = "${WORKDIR}/git"
15
16inherit meson pkgconfig systemd features_check
17
18DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} sqlite3 "
19REQUIRED_DISTRO_FEATURES = "pam"
20
21SYSTEMD_SERVICE:${PN} = "lastlog2-import.service"
22
23EXTRA_OEMESON = " -Dpamlibdir=${libdir}"
24
25do_install:append () {
26 if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then
27 # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
28 # without usrmerge distro feature enabled
29 install -d `dirname ${D}${systemd_unitdir}`
30 mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
31 fi
32}
33
34FILES:${PN} += " ${systemd_system_unitdir} "
35FILES:${PN} += " ${libdir} "
36FILES:${PN} += " ${nonarch_libdir}/tmpfiles.d/* "