diff options
Diffstat (limited to 'meta/recipes-core/util-linux')
13 files changed, 264 insertions, 168 deletions
diff --git a/meta/recipes-core/util-linux/util-linux-libuuid_2.39.3.bb b/meta/recipes-core/util-linux/util-linux-libuuid_2.41.bb index ec04c1d384..5ad2997c27 100644 --- a/meta/recipes-core/util-linux/util-linux-libuuid_2.39.3.bb +++ b/meta/recipes-core/util-linux/util-linux-libuuid_2.41.bb | |||
@@ -3,15 +3,17 @@ | |||
3 | 3 | ||
4 | require util-linux.inc | 4 | require util-linux.inc |
5 | 5 | ||
6 | LICENSE = "BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \ | ||
8 | file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af" | ||
9 | |||
6 | inherit autotools gettext pkgconfig | 10 | inherit autotools gettext pkgconfig |
7 | 11 | ||
8 | S = "${WORKDIR}/util-linux-${PV}" | 12 | S = "${UNPACKDIR}/util-linux-${PV}" |
9 | 13 | ||
10 | EXTRA_AUTORECONF += "--exclude=gtkdocize" | 14 | EXTRA_AUTORECONF += "--exclude=gtkdocize" |
11 | EXTRA_OECONF += "--disable-all-programs --enable-libuuid" | 15 | EXTRA_OECONF += "--disable-all-programs --enable-libuuid" |
12 | 16 | ||
13 | LICENSE = "BSD-3-Clause" | ||
14 | |||
15 | do_install:append() { | 17 | do_install:append() { |
16 | rm -rf ${D}${datadir} ${D}${bindir} ${D}${base_bindir} ${D}${sbindir} ${D}${base_sbindir} ${D}${exec_prefix}/sbin | 18 | rm -rf ${D}${datadir} ${D}${bindir} ${D}${base_bindir} ${D}${sbindir} ${D}${base_sbindir} ${D}${exec_prefix}/sbin |
17 | } | 19 | } |
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index d506783f9a..111f29cb92 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc | |||
@@ -6,31 +6,9 @@ disk partitioning, kernel message management, filesystem creation, and system lo | |||
6 | 6 | ||
7 | SECTION = "base" | 7 | SECTION = "base" |
8 | 8 | ||
9 | LICENSE = "GPL-1.0-or-later & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & BSD-4-Clause & MIT" | ||
10 | LICENSE:${PN}-fcntl-lock = "MIT" | ||
11 | LICENSE:${PN}-fdisk = "GPL-1.0-or-later" | ||
12 | LICENSE:${PN}-libblkid = "LGPL-2.1-or-later" | ||
13 | LICENSE:${PN}-libfdisk = "LGPL-2.1-or-later" | ||
14 | LICENSE:${PN}-libmount = "LGPL-2.1-or-later" | ||
15 | LICENSE:${PN}-libsmartcols = "LGPL-2.1-or-later" | ||
16 | |||
17 | LIC_FILES_CHKSUM = "file://README.licensing;md5=cc80239f106687ab39ef0271ff5cf4ba \ | ||
18 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
19 | file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
20 | file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \ | ||
21 | file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \ | ||
22 | file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \ | ||
23 | file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \ | ||
24 | file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \ | ||
25 | file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
26 | file://libfdisk/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
27 | file://libsmartcols/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
28 | " | ||
29 | |||
30 | FILESEXTRAPATHS:prepend := "${THISDIR}/util-linux:" | 9 | FILESEXTRAPATHS:prepend := "${THISDIR}/util-linux:" |
31 | MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" | 10 | MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" |
32 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \ | 11 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \ |
33 | file://mit-license.patch \ | ||
34 | file://configure-sbindir.patch \ | 12 | file://configure-sbindir.patch \ |
35 | file://runuser.pamd \ | 13 | file://runuser.pamd \ |
36 | file://runuser-l.pamd \ | 14 | file://runuser-l.pamd \ |
@@ -38,8 +16,12 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin | |||
38 | file://run-ptest \ | 16 | file://run-ptest \ |
39 | file://display_testname_for_subtest.patch \ | 17 | file://display_testname_for_subtest.patch \ |
40 | file://avoid_parallel_tests.patch \ | 18 | file://avoid_parallel_tests.patch \ |
41 | file://0001-login-utils-include-libgen.h-for-basename-API.patch \ | ||
42 | file://fcntl-lock.c \ | 19 | file://fcntl-lock.c \ |
20 | file://0001-tests-ts-kill-decode-avoid-using-shell-built-in-kill.patch \ | ||
21 | file://0001-lsfd-mkfds-foreign-sockets-skip-when-lacking-sock_di.patch \ | ||
22 | file://0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch \ | ||
43 | " | 23 | " |
44 | 24 | ||
45 | SRC_URI[sha256sum] = "7b6605e48d1a49f43cc4b4cfc59f313d0dd5402fa40b96810bd572e167dfed0f" | 25 | SRC_URI[sha256sum] = "81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6" |
26 | |||
27 | CVE_PRODUCT = "util-linux" | ||
diff --git a/meta/recipes-core/util-linux/util-linux/0001-login-utils-include-libgen.h-for-basename-API.patch b/meta/recipes-core/util-linux/util-linux/0001-login-utils-include-libgen.h-for-basename-API.patch deleted file mode 100644 index 6258710e1e..0000000000 --- a/meta/recipes-core/util-linux/util-linux/0001-login-utils-include-libgen.h-for-basename-API.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From d44e3ad1f6f8b5c1b3098bb7d537943a4c21d22f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 3 Dec 2023 19:59:46 -0800 | ||
4 | Subject: [PATCH] login-utils: include libgen.h for basename API | ||
5 | |||
6 | musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler | ||
7 | |||
8 | include libgen.h for using the posix declaration of the funciton. | ||
9 | |||
10 | Fixes | ||
11 | |||
12 | ../util-linux-2.39.2/login-utils/su-common.c:847:20: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] | ||
13 | 847 | shell_basename = basename(shell); | ||
14 | | ^ | ||
15 | |||
16 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 | ||
17 | |||
18 | Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/2615] | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
20 | |||
21 | --- | ||
22 | login-utils/su-common.c | 10 +++++++--- | ||
23 | 1 file changed, 7 insertions(+), 3 deletions(-) | ||
24 | |||
25 | diff --git a/login-utils/su-common.c b/login-utils/su-common.c | ||
26 | index b674920..3297c78 100644 | ||
27 | --- a/login-utils/su-common.c | ||
28 | +++ b/login-utils/su-common.c | ||
29 | @@ -26,6 +26,7 @@ | ||
30 | #include <sys/types.h> | ||
31 | #include <pwd.h> | ||
32 | #include <grp.h> | ||
33 | +#include <libgen.h> | ||
34 | #include <security/pam_appl.h> | ||
35 | #ifdef HAVE_SECURITY_PAM_MISC_H | ||
36 | # include <security/pam_misc.h> | ||
37 | @@ -840,17 +841,20 @@ static void run_shell( | ||
38 | su->simulate_login ? " login" : "", | ||
39 | su->fast_startup ? " fast-start" : "")); | ||
40 | |||
41 | + char* tmp = xstrdup(shell); | ||
42 | if (su->simulate_login) { | ||
43 | char *arg0; | ||
44 | char *shell_basename; | ||
45 | |||
46 | - shell_basename = basename(shell); | ||
47 | + shell_basename = basename(tmp); | ||
48 | arg0 = xmalloc(strlen(shell_basename) + 2); | ||
49 | arg0[0] = '-'; | ||
50 | strcpy(arg0 + 1, shell_basename); | ||
51 | args[0] = arg0; | ||
52 | - } else | ||
53 | - args[0] = basename(shell); | ||
54 | + } else { | ||
55 | + args[0] = basename(tmp); | ||
56 | + } | ||
57 | + free(tmp); | ||
58 | |||
59 | if (su->fast_startup) | ||
60 | args[argno++] = "-f"; | ||
diff --git a/meta/recipes-core/util-linux/util-linux/0001-lsfd-mkfds-foreign-sockets-skip-when-lacking-sock_di.patch b/meta/recipes-core/util-linux/util-linux/0001-lsfd-mkfds-foreign-sockets-skip-when-lacking-sock_di.patch new file mode 100644 index 0000000000..e3f9112192 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/0001-lsfd-mkfds-foreign-sockets-skip-when-lacking-sock_di.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From b3a1d92a9078fada31b2cf64b802edd616026766 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Mon, 26 May 2025 15:24:16 +0800 | ||
4 | Subject: [PATCH] lsfd/mkfds-foreign-sockets: skip when lacking sock_diag | ||
5 | ability | ||
6 | |||
7 | The ENDPOINTS will need sock_diag ability. The kernel might not | ||
8 | enable related configs. Check and skip in case of lacking such ability. | ||
9 | |||
10 | Fixes: https://github.com/util-linux/util-linux/issues/3590 | ||
11 | |||
12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
13 | |||
14 | Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/3591] | ||
15 | |||
16 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
17 | --- | ||
18 | tests/ts/lsfd/mkfds-foreign-sockets | 2 ++ | ||
19 | 1 file changed, 2 insertions(+) | ||
20 | |||
21 | diff --git a/tests/ts/lsfd/mkfds-foreign-sockets b/tests/ts/lsfd/mkfds-foreign-sockets | ||
22 | index cd94da799..76138a7a6 100755 | ||
23 | --- a/tests/ts/lsfd/mkfds-foreign-sockets | ||
24 | +++ b/tests/ts/lsfd/mkfds-foreign-sockets | ||
25 | @@ -30,6 +30,8 @@ ts_skip_nonroot | ||
26 | ts_skip_qemu_user | ||
27 | ts_cd "$TS_OUTDIR" | ||
28 | |||
29 | +lsfd_check_sockdiag "unix" | ||
30 | + | ||
31 | declare -A tcase | ||
32 | tcase[NAME]="state=connected" | ||
33 | tcase[SOCK.NETNS]= | ||
34 | -- | ||
35 | 2.34.1 | ||
36 | |||
diff --git a/meta/recipes-core/util-linux/util-linux/0001-tests-ts-kill-decode-avoid-using-shell-built-in-kill.patch b/meta/recipes-core/util-linux/util-linux/0001-tests-ts-kill-decode-avoid-using-shell-built-in-kill.patch new file mode 100644 index 0000000000..dece0e94b7 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/0001-tests-ts-kill-decode-avoid-using-shell-built-in-kill.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From d2eeccf36542d506b660641a07a44f3976772897 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Thu, 15 May 2025 16:44:33 +0800 | ||
4 | Subject: [PATCH] tests/ts/kill/decode: avoid using shell built-in kill command | ||
5 | |||
6 | This test case should do the same as other kill test cases, avoiding | ||
7 | using shell built-in kill command. | ||
8 | |||
9 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
10 | |||
11 | Upstream-Status: Backport [https://github.com/util-linux/util-linux/commit/d2eeccf36542d506b660641a07a44f3976772897] | ||
12 | |||
13 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
14 | --- | ||
15 | tests/ts/kill/decode | 5 +++++ | ||
16 | 1 file changed, 5 insertions(+) | ||
17 | |||
18 | diff --git a/tests/ts/kill/decode b/tests/ts/kill/decode | ||
19 | index 03bc25ff6..57149899e 100755 | ||
20 | --- a/tests/ts/kill/decode | ||
21 | +++ b/tests/ts/kill/decode | ||
22 | @@ -18,6 +18,11 @@ TS_DESC="decode functions" | ||
23 | . "$TS_TOPDIR/functions.sh" | ||
24 | ts_init "$*" | ||
25 | |||
26 | +# make sure we do not use shell built-in command | ||
27 | +if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then | ||
28 | + TS_CMD_KILL="$(which kill)" | ||
29 | +fi | ||
30 | + | ||
31 | ts_skip_qemu_user | ||
32 | |||
33 | ts_check_test_command "$TS_CMD_KILL" | ||
34 | -- | ||
35 | 2.34.1 | ||
36 | |||
diff --git a/meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch b/meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch new file mode 100644 index 0000000000..f4e2f9e745 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From c5d5e8873029d170fcab38a6fbd5d5a355574b9f Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Wed, 4 Jun 2025 16:27:19 +0800 | ||
4 | Subject: [PATCH] ts/kill/decode: use RTMIN from 'kill -L' instead of | ||
5 | hardcoding 34 | ||
6 | |||
7 | glibc uses 34 as the value of SIGRTMIN: | ||
8 | https://sourceware.org/git/?p=glibc.git;a=blob;f=signal/allocrtsig.c;h=8ed8e37dd6c41f94be6eef042ce9db1af1153228;hb=HEAD#l27 """ | ||
9 | static int current_rtmin = __SIGRTMIN + RESERVED_SIGRT; """ | ||
10 | |||
11 | musl uses 35 as the value of SIGRTMIN: | ||
12 | https://git.musl-libc.org/cgit/musl/tree/src/signal/sigrtmin.c | ||
13 | |||
14 | With the hardcoded 34, test case fails with the following difference: | ||
15 | |||
16 | -Ignored: HUP QUIT TRAP PIPE ALRM | ||
17 | +Ignored: HUP QUIT TRAP PIPE ALRM 34 | ||
18 | |||
19 | Extract the value of RTMIN from 'kill -L' to avoid such hardcoding. | ||
20 | |||
21 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
22 | |||
23 | Upstream-Status: Backport [https://github.com/util-linux/util-linux/commit/c5d5e8873029d170fcab38a6fbd5d5a355574b9f] | ||
24 | |||
25 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
26 | --- | ||
27 | tests/ts/kill/decode | 9 +++++++-- | ||
28 | 1 file changed, 7 insertions(+), 2 deletions(-) | ||
29 | |||
30 | diff --git a/tests/ts/kill/decode b/tests/ts/kill/decode | ||
31 | index 57149899e..524b4e5e2 100755 | ||
32 | --- a/tests/ts/kill/decode | ||
33 | +++ b/tests/ts/kill/decode | ||
34 | @@ -53,14 +53,19 @@ ACK= | ||
35 | # Sending one more USR1 is for making the signal pending state. | ||
36 | "$TS_CMD_KILL" -USR1 "$PID" | ||
37 | "$TS_CMD_KILL" -d "$PID" | { | ||
38 | - if [[ $("$TS_CMD_KILL" --list=34) == RT0 ]]; then | ||
39 | + SIGRTMIN=$("$TS_CMD_KILL" -L | grep -o '[0-9]\+ RTMIN' | cut -d " " -f 1) | ||
40 | + if [[ $("$TS_CMD_KILL" --list=$SIGRTMIN) == RT0 ]]; then | ||
41 | # See man signal(7). | ||
42 | # The Linux kernel supports a range of 33 different real-time signals, | ||
43 | # numbered 32 to 64. However, the glibc POSIX threads implementation in‐ | ||
44 | # ternally uses two (for NPTL) or three (for LinuxThreads) real-time sig‐ | ||
45 | # nals (see pthreads(7)), and adjusts the value of SIGRTMIN suitably (to | ||
46 | # 34 or 35). | ||
47 | - sed -e s/' 32 33'// -e s/' 34'// | ||
48 | + sed_cmd="sed" | ||
49 | + for ((i=32; i<=SIGRTMIN; i++)); do | ||
50 | + sed_cmd+=" -e s/' $i'//" | ||
51 | + done | ||
52 | + eval $sed_cmd | ||
53 | else | ||
54 | cat | ||
55 | fi | ||
56 | -- | ||
57 | 2.34.1 | ||
58 | |||
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch index 85ad7a5575..fe92afbc53 100644 --- a/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch +++ b/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0b05e4695a0616badef71dfa459a00ef6ff1b521 Mon Sep 17 00:00:00 2001 | 1 | From 43030388e831642d36cb7b9d4b63755e9696714a Mon Sep 17 00:00:00 2001 |
2 | From: Tudor Florea <tudor.florea@enea.com> | 2 | From: Tudor Florea <tudor.florea@enea.com> |
3 | Date: Mon, 14 Jun 2021 14:00:31 +0200 | 3 | Date: Mon, 14 Jun 2021 14:00:31 +0200 |
4 | Subject: [PATCH] util-linux: Add ptest | 4 | Subject: [PATCH] util-linux: Add ptest |
@@ -9,13 +9,12 @@ Revert run.sh script accordingly to serialize running tests | |||
9 | 9 | ||
10 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | 10 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> |
11 | Upstream-Status: Inappropriate | 11 | Upstream-Status: Inappropriate |
12 | |||
13 | --- | 12 | --- |
14 | configure.ac | 2 +- | 13 | configure.ac | 2 +- |
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
16 | 15 | ||
17 | diff --git a/configure.ac b/configure.ac | 16 | diff --git a/configure.ac b/configure.ac |
18 | index 890212f..870e817 100644 | 17 | index 43a23a5..4a84531 100644 |
19 | --- a/configure.ac | 18 | --- a/configure.ac |
20 | +++ b/configure.ac | 19 | +++ b/configure.ac |
21 | @@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4]) | 20 | @@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4]) |
diff --git a/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch index 75adeca188..ebb32a6845 100644 --- a/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch +++ b/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From c79222a9a5e3425c55e150edc0b7ac59c573aa2f Mon Sep 17 00:00:00 2001 | 1 | From 378998bf82e3b6ff46569077b29f95e72b734681 Mon Sep 17 00:00:00 2001 |
2 | From: Phil Blundell <pb@pbcl.net> | 2 | From: Phil Blundell <pb@pbcl.net> |
3 | Date: Mon, 24 Sep 2012 07:24:51 +0100 | 3 | Date: Mon, 24 Sep 2012 07:24:51 +0100 |
4 | Subject: [PATCH] util-linux: Ensure that ${sbindir} is respected | 4 | Subject: [PATCH] util-linux: Ensure that ${sbindir} is respected |
@@ -9,16 +9,15 @@ fix the test, the [ ] syntax was getting eaten by autoconf | |||
9 | Signed-off-by: Phil Blundell <pb@pbcl.net> | 9 | Signed-off-by: Phil Blundell <pb@pbcl.net> |
10 | Signed-off-by: Saul Wold <sgw@linux.intel.com | 10 | Signed-off-by: Saul Wold <sgw@linux.intel.com |
11 | Upstream-Status: Inappropriate [configuration] | 11 | Upstream-Status: Inappropriate [configuration] |
12 | |||
13 | --- | 12 | --- |
14 | configure.ac | 5 ++++- | 13 | configure.ac | 5 ++++- |
15 | 1 file changed, 4 insertions(+), 1 deletion(-) | 14 | 1 file changed, 4 insertions(+), 1 deletion(-) |
16 | 15 | ||
17 | diff --git a/configure.ac b/configure.ac | 16 | diff --git a/configure.ac b/configure.ac |
18 | index 36c24b4..890212f 100644 | 17 | index a5d9102..43a23a5 100644 |
19 | --- a/configure.ac | 18 | --- a/configure.ac |
20 | +++ b/configure.ac | 19 | +++ b/configure.ac |
21 | @@ -102,7 +102,10 @@ AC_SUBST([runstatedir]) | 20 | @@ -110,7 +110,10 @@ AC_SUBST([runstatedir]) |
22 | usrbin_execdir='${exec_prefix}/bin' | 21 | usrbin_execdir='${exec_prefix}/bin' |
23 | AC_SUBST([usrbin_execdir]) | 22 | AC_SUBST([usrbin_execdir]) |
24 | 23 | ||
diff --git a/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch index 815ae9c915..fa4ae02bc3 100644 --- a/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch +++ b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch | |||
@@ -1,20 +1,19 @@ | |||
1 | From fc5de1de898fd1a372a2fd2fa493dc57323a029d Mon Sep 17 00:00:00 2001 | 1 | From 728c2abd889d225535008c3e7a1eef4b8a0aeea2 Mon Sep 17 00:00:00 2001 |
2 | From: Tudor Florea <tudor.florea@enea.com> | 2 | From: Tudor Florea <tudor.florea@enea.com> |
3 | Date: Thu, 3 Dec 2015 04:08:00 +0100 | 3 | Date: Thu, 3 Dec 2015 04:08:00 +0100 |
4 | Subject: [PATCH] Display testname for subtest | 4 | Subject: [PATCH] Display testname for subtest |
5 | 5 | ||
6 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | 6 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> |
7 | Upstream-Status: Pending | 7 | Upstream-Status: Pending |
8 | |||
9 | --- | 8 | --- |
10 | tests/functions.sh | 2 +- | 9 | tests/functions.sh | 2 +- |
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | 10 | 1 file changed, 1 insertion(+), 1 deletion(-) |
12 | 11 | ||
13 | diff --git a/tests/functions.sh b/tests/functions.sh | 12 | diff --git a/tests/functions.sh b/tests/functions.sh |
14 | index 5a562a3..098145e 100644 | 13 | index 1d7a425..b1f0986 100644 |
15 | --- a/tests/functions.sh | 14 | --- a/tests/functions.sh |
16 | +++ b/tests/functions.sh | 15 | +++ b/tests/functions.sh |
17 | @@ -437,7 +437,7 @@ function ts_init_subtest { | 16 | @@ -455,7 +455,7 @@ function ts_init_subtest { |
18 | 17 | ||
19 | if [ "$TS_PARSABLE" != "yes" ]; then | 18 | if [ "$TS_PARSABLE" != "yes" ]; then |
20 | [ $TS_NSUBTESTS -eq 1 ] && echo | 19 | [ $TS_NSUBTESTS -eq 1 ] && echo |
diff --git a/meta/recipes-core/util-linux/util-linux/mit-license.patch b/meta/recipes-core/util-linux/util-linux/mit-license.patch deleted file mode 100644 index afbec98f18..0000000000 --- a/meta/recipes-core/util-linux/util-linux/mit-license.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | From 5b8fab1584017d9d9be008c23b90128bba41a7b5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Thu, 28 Mar 2024 12:16:57 +0000 | ||
4 | Subject: [PATCH] README.licensing/flock: Add MIT license mention | ||
5 | |||
6 | Looking at the license text, flock.c is under the MIT license (see | ||
7 | https://spdx.org/licenses/MIT). | ||
8 | |||
9 | Add an SPDX license identifier header and add to the list of licenses the | ||
10 | source so everything is correctly listed/identified. | ||
11 | |||
12 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
13 | |||
14 | Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/2870] | ||
15 | |||
16 | --- | ||
17 | README.licensing | 2 ++ | ||
18 | sys-utils/flock.c | 4 +++- | ||
19 | 2 files changed, 5 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/README.licensing b/README.licensing | ||
22 | index 4454f8392a..535ad34813 100644 | ||
23 | --- a/README.licensing | ||
24 | +++ b/README.licensing | ||
25 | @@ -12,6 +12,8 @@ There is code under: | ||
26 | |||
27 | * LGPL-2.1-or-later - GNU Lesser General Public License 2.1 or any later version | ||
28 | |||
29 | + * MIT - MIT License | ||
30 | + | ||
31 | * BSD-2-Clause - Simplified BSD License | ||
32 | |||
33 | * BSD-3-Clause - BSD 3-Clause "New" or "Revised" License | ||
34 | diff --git a/sys-utils/flock.c b/sys-utils/flock.c | ||
35 | index fed29d7270..7d878ff810 100644 | ||
36 | --- a/sys-utils/flock.c | ||
37 | +++ b/sys-utils/flock.c | ||
38 | @@ -1,4 +1,6 @@ | ||
39 | -/* Copyright 2003-2005 H. Peter Anvin - All Rights Reserved | ||
40 | +/* SPDX-License-Identifier: MIT | ||
41 | + * | ||
42 | + * Copyright 2003-2005 H. Peter Anvin - All Rights Reserved | ||
43 | * | ||
44 | * Permission is hereby granted, free of charge, to any person | ||
45 | * obtaining a copy of this software and associated documentation | ||
diff --git a/meta/recipes-core/util-linux/util-linux/ptest.patch b/meta/recipes-core/util-linux/util-linux/ptest.patch index 6221de7182..ad23001cfa 100644 --- a/meta/recipes-core/util-linux/util-linux/ptest.patch +++ b/meta/recipes-core/util-linux/util-linux/ptest.patch | |||
@@ -1,24 +1,23 @@ | |||
1 | From d0a69ce80c579cbb7627a2f20e8b92e006a8d8ad Mon Sep 17 00:00:00 2001 | 1 | From 18bf6aded9b2a75185ae4b23a41cd2e4322c5e31 Mon Sep 17 00:00:00 2001 |
2 | From: Tudor Florea <tudor.florea@enea.com> | 2 | From: Tudor Florea <tudor.florea@enea.com> |
3 | Date: Thu, 3 Dec 2015 04:08:00 +0100 | 3 | Date: Thu, 3 Dec 2015 04:08:00 +0100 |
4 | Subject: [PATCH] Define TESTS variable | 4 | Subject: [PATCH] Define TESTS variable |
5 | 5 | ||
6 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | 6 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> |
7 | Upstream-Status: Pending | 7 | Upstream-Status: Pending |
8 | |||
9 | --- | 8 | --- |
10 | Makefile.am | 1 + | 9 | Makefile.am | 1 + |
11 | 1 file changed, 1 insertion(+) | 10 | 1 file changed, 1 insertion(+) |
12 | 11 | ||
13 | diff --git a/Makefile.am b/Makefile.am | 12 | diff --git a/Makefile.am b/Makefile.am |
14 | index effbb02..7d2bd1e 100644 | 13 | index 01e9970..c3313ff 100644 |
15 | --- a/Makefile.am | 14 | --- a/Makefile.am |
16 | +++ b/Makefile.am | 15 | +++ b/Makefile.am |
17 | @@ -57,6 +57,7 @@ systemdsystemunit_DATA = | 16 | @@ -66,6 +66,7 @@ sysusers_DATA = |
18 | dist_bashcompletion_DATA = | 17 | dist_bashcompletion_DATA = |
19 | check_PROGRAMS = | 18 | check_PROGRAMS = |
20 | dist_check_SCRIPTS = | 19 | dist_check_SCRIPTS = |
21 | +TESTS = $(check_PROGRAMS) | 20 | +TESTS = $(check_PROGRAMS) |
22 | 21 | ||
23 | PATHFILES = | 22 | BUILT_SOURCES = |
24 | ADOCFILES_COMMON = | 23 | |
diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest b/meta/recipes-core/util-linux/util-linux/run-ptest index 7b6b1d1dc2..1410229172 100644 --- a/meta/recipes-core/util-linux/util-linux/run-ptest +++ b/meta/recipes-core/util-linux/util-linux/run-ptest | |||
@@ -22,9 +22,8 @@ modprobe loop | |||
22 | # for a long description of mount namespaces in Linux | 22 | # for a long description of mount namespaces in Linux |
23 | mount --make-shared / | 23 | mount --make-shared / |
24 | 24 | ||
25 | # lsfd/option-inet has races in the test script: | 25 | # lsfd/mkfds-bpf* have issues with the gcc 15 upgrade |
26 | # https://github.com/util-linux/util-linux/issues/2399 | 26 | ./tests/run.sh --use-system-commands --parsable --show-diff --exclude='lsfd/mkfds-bpf-map lsfd/mkfds-bpf-prog' | sed -u '{ |
27 | ./tests/run.sh --use-system-commands --parsable --show-diff --exclude=lsfd/option-inet | sed -u '{ | ||
28 | s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/ | 27 | s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/ |
29 | s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/ | 28 | s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/ |
30 | s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/ | 29 | s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/ |
diff --git a/meta/recipes-core/util-linux/util-linux_2.39.3.bb b/meta/recipes-core/util-linux/util-linux_2.41.bb index 83b3f4e05b..41fb3e5951 100644 --- a/meta/recipes-core/util-linux/util-linux_2.39.3.bb +++ b/meta/recipes-core/util-linux/util-linux_2.41.bb | |||
@@ -1,5 +1,58 @@ | |||
1 | require util-linux.inc | 1 | require util-linux.inc |
2 | 2 | ||
3 | # Most of the applications and the libraries are linked with libcommon.la, | ||
4 | # which uses these licenses | ||
5 | LIBCOMMON_LICENSES = "LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & MIT" | ||
6 | |||
7 | # The default license is GPL-2.0-or-later | ||
8 | DEFAULT_LICENSES = "GPL-2.0-or-later & ${LIBCOMMON_LICENSES}" | ||
9 | |||
10 | LICENSE = "GPL-1.0-or-later & GPL-2.0-only & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & BSD-4-Clause-UC & MIT & EUPL-1.2" | ||
11 | LICENSE:${PN}-bash-completion = "GPL-2.0-or-later" | ||
12 | LICENSE:${PN}-dev = "${LIBCOMMON_LICENSES}" | ||
13 | # All dynamic packages use ${DEFAULT_LICENSES} with the following exceptions | ||
14 | LICENSE:${PN}-cal = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
15 | LICENSE:${PN}-col = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
16 | LICENSE:${PN}-colcrt = "BSD-4-Clause-UC" | ||
17 | LICENSE:${PN}-colrm = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
18 | LICENSE:${PN}-column = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
19 | LICENSE:${PN}-coresched = "EUPL-1.2 & ${LIBCOMMON_LICENSES}" | ||
20 | LICENSE:${PN}-fcntl-lock = "MIT" | ||
21 | LICENSE:${PN}-fdisk = "GPL-1.0-or-later & ${DEFAULT_LICENSES}" | ||
22 | LICENSE:${PN}-fsfreeze = "GPL-1.0-or-later" | ||
23 | LICENSE:${PN}-hexdump = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
24 | LICENSE:${PN}-kill = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
25 | LICENSE:${PN}-libblkid = "${LIBCOMMON_LICENSES}" | ||
26 | LICENSE:${PN}-libfdisk = "${LIBCOMMON_LICENSES}" | ||
27 | LICENSE:${PN}-libmount = "${LIBCOMMON_LICENSES}" | ||
28 | LICENSE:${PN}-libsmartcols = "${LIBCOMMON_LICENSES}" | ||
29 | LICENSE:${PN}-logger = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
30 | LICENSE:${PN}-look = "BSD-4-Clause-UC" | ||
31 | LICENSE:${PN}-lscpu = "GPL-2.0-only & ${DEFAULT_LICENSES}" | ||
32 | LICENSE:${PN}-mesg = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
33 | LICENSE:${PN}-nsenter = "GPL-2.0-only & ${DEFAULT_LICENSES}" | ||
34 | LICENSE:${PN}-renice = "BSD-4-Clause-UC" | ||
35 | LICENSE:${PN}-rev = "BSD-4-Clause-UC" | ||
36 | LICENSE:${PN}-script = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
37 | LICENSE:${PN}-ul = "BSD-4-Clause-UC" | ||
38 | LICENSE:${PN}-vipw = "BSD-4-Clause-UC & ${DEFAULT_LICENSES}" | ||
39 | LICENSE:${PN}-wall = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
40 | LICENSE:${PN}-whereis = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
41 | LICENSE:${PN}-write = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" | ||
42 | |||
43 | LIC_FILES_CHKSUM = "file://README.licensing;md5=55e895a80bdd4ffc65e167a76d2e7569 \ | ||
44 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
45 | file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
46 | file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \ | ||
47 | file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \ | ||
48 | file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \ | ||
49 | file://Documentation/licenses/COPYING.EUPL-1.2;md5=c075d2767167a2355b23392018a1cbbd \ | ||
50 | file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \ | ||
51 | file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
52 | file://libfdisk/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
53 | file://libsmartcols/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
54 | " | ||
55 | |||
3 | inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest gtk-doc | 56 | inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest gtk-doc |
4 | DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-libuuid" | 57 | DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-libuuid" |
5 | 58 | ||
@@ -11,6 +64,9 @@ python util_linux_binpackages () { | |||
11 | pn = d.getVar('PN') | 64 | pn = d.getVar('PN') |
12 | d.appendVar('RRECOMMENDS:%s' % pn, ' %s' % pkg) | 65 | d.appendVar('RRECOMMENDS:%s' % pn, ' %s' % pkg) |
13 | 66 | ||
67 | if not d.getVar('LICENSE:' + pkg): | ||
68 | d.setVar('LICENSE:' + pkg, '${DEFAULT_LICENSES}') | ||
69 | |||
14 | if d.getVar('ALTERNATIVE:' + pkg): | 70 | if d.getVar('ALTERNATIVE:' + pkg): |
15 | return | 71 | return |
16 | if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): | 72 | if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): |
@@ -59,7 +115,8 @@ python util_linux_libpackages() { | |||
59 | 115 | ||
60 | PACKAGESPLITFUNCS =+ "util_linux_libpackages" | 116 | PACKAGESPLITFUNCS =+ "util_linux_libpackages" |
61 | 117 | ||
62 | PACKAGES_DYNAMIC = "^${PN}-.*" | 118 | PACKAGES_DYNAMIC = "^${PN}(?!.*-native)-.*" |
119 | PACKAGES_DYNAMIC:class-native = "^${BPN}-.*-native" | ||
63 | 120 | ||
64 | UTIL_LINUX_LIBDIR = "${libdir}" | 121 | UTIL_LINUX_LIBDIR = "${libdir}" |
65 | UTIL_LINUX_LIBDIR:class-target = "${base_libdir}" | 122 | UTIL_LINUX_LIBDIR:class-target = "${base_libdir}" |
@@ -90,7 +147,10 @@ EXTRA_OECONF:append = " --disable-hwclock-gplv3" | |||
90 | # build host versions during development | 147 | # build host versions during development |
91 | # | 148 | # |
92 | PACKAGECONFIG ?= "pcre2" | 149 | PACKAGECONFIG ?= "pcre2" |
93 | PACKAGECONFIG:class-target ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'chfn-chsh pam', '', d)}" | 150 | PACKAGECONFIG:class-target ?= "\ |
151 | libmount-mountfd-support \ | ||
152 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'chfn-chsh pam lastlog2', '', d)} \ | ||
153 | " | ||
94 | # inherit manpages requires this to be present, however util-linux does not have | 154 | # inherit manpages requires this to be present, however util-linux does not have |
95 | # configuration options, and installs manpages always | 155 | # configuration options, and installs manpages always |
96 | PACKAGECONFIG[manpages] = "" | 156 | PACKAGECONFIG[manpages] = "" |
@@ -106,6 +166,14 @@ PACKAGECONFIG[pcre2] = ",,libpcre2" | |||
106 | PACKAGECONFIG[cryptsetup] = "--with-cryptsetup,--without-cryptsetup,cryptsetup" | 166 | PACKAGECONFIG[cryptsetup] = "--with-cryptsetup,--without-cryptsetup,cryptsetup" |
107 | PACKAGECONFIG[chfn-chsh] = "--enable-chfn-chsh,--disable-chfn-chsh," | 167 | PACKAGECONFIG[chfn-chsh] = "--enable-chfn-chsh,--disable-chfn-chsh," |
108 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" | 168 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" |
169 | PACKAGECONFIG[lastlog2] = "--enable-liblastlog2,--disable-liblastlog2,sqlite3" | ||
170 | # Using the new file descriptors based mount kernel API can cause rootfs remount failure with some older kernels. | ||
171 | # Of currently supported LTS kernels, the old mount API should be used with: | ||
172 | # - versions prior to 6.6.18 in the 6.6.y series. | ||
173 | # - versions prior to 6.1.79 in the 6.1.y series. | ||
174 | # - versions till at least 5.15.164 in the 5.15.y series. | ||
175 | # - with 5.10.y, 5.4.y and 4.19.y series kernels, libmount seemed to use the old API regardless of this option. | ||
176 | PACKAGECONFIG[libmount-mountfd-support] = "--enable-libmount-mountfd-support,--disable-libmount-mountfd-support" | ||
109 | 177 | ||
110 | EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'" | 178 | EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'" |
111 | 179 | ||
@@ -117,6 +185,9 @@ FILES:${PN}-mount = "${sysconfdir}/default/mountall" | |||
117 | FILES:${PN}-runuser = "${sysconfdir}/pam.d/runuser*" | 185 | FILES:${PN}-runuser = "${sysconfdir}/pam.d/runuser*" |
118 | FILES:${PN}-su = "${sysconfdir}/pam.d/su-l" | 186 | FILES:${PN}-su = "${sysconfdir}/pam.d/su-l" |
119 | CONFFILES:${PN}-su = "${sysconfdir}/pam.d/su-l" | 187 | CONFFILES:${PN}-su = "${sysconfdir}/pam.d/su-l" |
188 | FILES:${PN}-lastlog2 += "${base_libdir}/security/pam_lastlog2.so \ | ||
189 | ${nonarch_libdir}/tmpfiles.d/lastlog2.conf \ | ||
190 | ${sysconfdir}/default/volatiles/99_lastlog2" | ||
120 | FILES:${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ | 191 | FILES:${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ |
121 | ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \ | 192 | ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \ |
122 | ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*" | 193 | ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*" |
@@ -135,8 +206,8 @@ RDEPENDS:${PN}-dev += " util-linux-libuuid-dev" | |||
135 | 206 | ||
136 | RPROVIDES:${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev" | 207 | RPROVIDES:${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev" |
137 | 208 | ||
138 | RDEPENDS:${PN}-bash-completion += "${PN}-lsblk" | 209 | RDEPENDS:${PN}-bash-completion += "${PN}-lsblk ${PN}-findmnt" |
139 | RDEPENDS:${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs findutils grep iproute2 kmod procps sed socat which xz" | 210 | RDEPENDS:${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs findutils grep iproute2 kmod procps sed socat which xz diffutils" |
140 | RRECOMMENDS:${PN}-ptest += "kernel-module-scsi-debug kernel-module-sd-mod kernel-module-loop kernel-module-algif-hash" | 211 | RRECOMMENDS:${PN}-ptest += "kernel-module-scsi-debug kernel-module-sd-mod kernel-module-loop kernel-module-algif-hash" |
141 | RDEPENDS:${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff" | 212 | RDEPENDS:${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff" |
142 | ALLOW_EMPTY:${PN}-swaponoff = "1" | 213 | ALLOW_EMPTY:${PN}-swaponoff = "1" |
@@ -147,18 +218,21 @@ SYSTEMD_AUTO_ENABLE:${PN}-uuidd = "disable" | |||
147 | SYSTEMD_SERVICE:${PN}-fstrim = "fstrim.timer fstrim.service" | 218 | SYSTEMD_SERVICE:${PN}-fstrim = "fstrim.timer fstrim.service" |
148 | SYSTEMD_AUTO_ENABLE:${PN}-fstrim = "disable" | 219 | SYSTEMD_AUTO_ENABLE:${PN}-fstrim = "disable" |
149 | 220 | ||
221 | do_compile:prepend () { | ||
222 | # this is a workaround for the unnecessary remake problem. Issue and PR are as below: | ||
223 | # https://github.com/util-linux/util-linux/issues/3061 | ||
224 | # https://github.com/util-linux/util-linux/pull/3064 | ||
225 | # When newly release tarball contains the above fix, the following workaround could be dropped. | ||
226 | [ -e ${S}/libsmartcols/src/filter-scanner.c ] && touch ${S}/libsmartcols/src/filter-scanner.c | ||
227 | [ -e ${S}/libsmartcols/src/filter-parser.c ] && touch ${S}/libsmartcols/src/filter-parser.c | ||
228 | } | ||
229 | |||
150 | do_compile:append () { | 230 | do_compile:append () { |
151 | cp ${WORKDIR}/fcntl-lock.c ${S}/fcntl-lock.c | 231 | cp ${UNPACKDIR}/fcntl-lock.c ${S}/fcntl-lock.c |
152 | ${CC} ${CFLAGS} ${LDFLAGS} ${S}/fcntl-lock.c -o ${B}/fcntl-lock | 232 | ${CC} ${CFLAGS} ${LDFLAGS} ${S}/fcntl-lock.c -o ${B}/fcntl-lock |
153 | } | 233 | } |
154 | 234 | ||
155 | do_install () { | 235 | do_install:append () { |
156 | # with ccache the timestamps on compiled files may | ||
157 | # end up earlier than on their inputs, this allows | ||
158 | # for the resultant compilation in the install step. | ||
159 | oe_runmake 'CC=${CC}' 'LD=${LD}' \ | ||
160 | 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install | ||
161 | |||
162 | mkdir -p ${D}${base_bindir} | 236 | mkdir -p ${D}${base_bindir} |
163 | 237 | ||
164 | sbinprogs="agetty ctrlaltdel cfdisk vipw vigr" | 238 | sbinprogs="agetty ctrlaltdel cfdisk vipw vigr" |
@@ -194,12 +268,24 @@ do_install () { | |||
194 | do_install:append:class-target () { | 268 | do_install:append:class-target () { |
195 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then | 269 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then |
196 | install -d ${D}${sysconfdir}/pam.d | 270 | install -d ${D}${sysconfdir}/pam.d |
197 | install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser | 271 | install -m 0644 ${UNPACKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser |
198 | install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l | 272 | install -m 0644 ${UNPACKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l |
199 | # Required for "su -" aka "su --login" because | 273 | # Required for "su -" aka "su --login" because |
200 | # otherwise it uses "other", which has "auth pam_deny.so" | 274 | # otherwise it uses "other", which has "auth pam_deny.so" |
201 | # and thus prevents the operation. | 275 | # and thus prevents the operation. |
202 | ln -s su ${D}${sysconfdir}/pam.d/su-l | 276 | ln -s su ${D}${sysconfdir}/pam.d/su-l |
277 | |||
278 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
279 | install -d ${D}${nonarch_libdir}/tmpfiles.d | ||
280 | install -m 0644 ${S}/misc-utils/lastlog2-tmpfiles.conf.in \ | ||
281 | ${D}${nonarch_libdir}/tmpfiles.d/lastlog2.conf | ||
282 | fi | ||
283 | |||
284 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
285 | install -d ${D}${sysconfdir}/default/volatiles | ||
286 | echo "d root root 0755 /var/lib/lastlog none" \ | ||
287 | > ${D}${sysconfdir}/default/volatiles/99_lastlog2 | ||
288 | fi | ||
203 | fi | 289 | fi |
204 | } | 290 | } |
205 | # nologin causes a conflict with shadow-native | 291 | # nologin causes a conflict with shadow-native |
@@ -282,8 +368,11 @@ blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 | |||
282 | mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\ | 368 | mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\ |
283 | " | 369 | " |
284 | ALTERNATIVE:${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}" | 370 | ALTERNATIVE:${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}" |
371 | ALTERNATIVE:${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'chfn-chsh', 'chfn.1 chsh.1', '', d)}" | ||
285 | 372 | ||
286 | ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" | 373 | ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" |
374 | ALTERNATIVE_LINK_NAME[chfn.1] = "${mandir}/man1/chfn.1" | ||
375 | ALTERNATIVE_LINK_NAME[chsh.1] = "${mandir}/man1/chsh.1" | ||
287 | ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1" | 376 | ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1" |
288 | ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8" | 377 | ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8" |
289 | ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" | 378 | ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" |
@@ -319,13 +408,15 @@ do_install_ptest() { | |||
319 | cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/ | 408 | cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/ |
320 | cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected | 409 | cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected |
321 | cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/ | 410 | cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/ |
322 | cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH} | 411 | cp ${B}/config.h ${D}${PTEST_PATH} |
323 | 412 | ||
324 | sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest | 413 | sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest |
325 | 414 | ||
326 | # chfn needs PAM | ||
327 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'true', 'false', d)}; then | 415 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'true', 'false', d)}; then |
416 | # chfn needs PAM | ||
328 | rm -rf ${D}${PTEST_PATH}/tests/ts/chfn | 417 | rm -rf ${D}${PTEST_PATH}/tests/ts/chfn |
418 | # su is not enabled when pam is not in PACKAGECONFIG | ||
419 | rm -rf ${D}${PTEST_PATH}/tests/ts/su | ||
329 | fi | 420 | fi |
330 | # remove raid tests, known failures and avoid dependency on mdadm therefore | 421 | # remove raid tests, known failures and avoid dependency on mdadm therefore |
331 | # See https://github.com/util-linux/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d | 422 | # See https://github.com/util-linux/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d |
@@ -339,6 +430,7 @@ do_install_ptest() { | |||
339 | do_install_ptest:append:libc-musl() { | 430 | do_install_ptest:append:libc-musl() { |
340 | for t in tests/ts/col/multibyte \ | 431 | for t in tests/ts/col/multibyte \ |
341 | tests/ts/lib/timeutils \ | 432 | tests/ts/lib/timeutils \ |
433 | tests/ts/misc/enosys \ | ||
342 | tests/ts/dmesg/limit; do | 434 | tests/ts/dmesg/limit; do |
343 | rm -rf ${D}${PTEST_PATH}/$t | 435 | rm -rf ${D}${PTEST_PATH}/$t |
344 | done | 436 | done |