util-linux/util-linux-libuuid: upgrade from 2.39.3 to 2.40.1

License-Update:
===============
GPL-2.0 is changed to GPL-2.0-only in README.licensing.

The following two patches are removed as they've been there in new release:

  0001-login-utils-include-libgen.h-for-basename-API.patch
  mit-license.patch

Other existing patches are refreshed to avoid patch-fuzz error.

A new PACKAGECONFIG, lastlog2, is added, which serves as a switch to build Y2038
safe lastlog pam module. This is a new functionality added in 2.40.

This 2.40.1 version has the problem of unnecessary remake, causing
intermmittent errors at parallel make. The do_compile:prepend is a
workaround for this. Upstream issue and PR are:
https://github.com/util-linux/util-linux/issues/3061
https://github.com/util-linux/util-linux/pull/3064

do_install is changed to do_install:append, the legacy codes are
removed. They've been there since the born of oe-core. I tested
with ccache, there's no error.

A new dependency, diffutils, is added to ptest. Because the mkswap-offset
test case needs 'cmp' from diffutils.

The tests/ts/misc/enosys test case is deleted for musl. This is because
the test case is comparing error description output and that's libc
specific. Results below can demonstrate the case.
'''
root@qemux86-64:/usr/lib/util-linux/ptest# cat /usr/lib/util-linux/ptest/tests/expected/misc/enosys-ioctl
test_enosys: ioctl r=0 errno=Success
test_enosys: ioctl r=-1 errno=Function not implemented
test_enosys: ioctl r=-1 errno=Inappropriate ioctl for device
test_enosys: ioctl r=-1 errno=Inappropriate ioctl for device
test_enosys: ioctl r=-1 errno=Function not implemented
root@qemux86-64:/usr/lib/util-linux/ptest# cat /usr/lib/util-linux/ptest/tests/output/misc/enosys-ioctl
test_enosys: ioctl r=0 errno=No error information
test_enosys: ioctl r=-1 errno=Function not implemented
test_enosys: ioctl r=-1 errno=Not a tty
test_enosys: ioctl r=-1 errno=Not a tty
test_enosys: ioctl r=-1 errno=Function not implemented
'''

(From OE-Core rev: 2c5f70e7e73362502a7d8d0773fbd04520b26eef)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chen Qi
2024-07-11 00:56:35 -07:00
committed by Richard Purdie
parent 052ddf26b1
commit 67db5f4f55
9 changed files with 31 additions and 136 deletions

View File

@@ -1,60 +0,0 @@
From d44e3ad1f6f8b5c1b3098bb7d537943a4c21d22f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 3 Dec 2023 19:59:46 -0800
Subject: [PATCH] login-utils: include libgen.h for basename API
musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler
include libgen.h for using the posix declaration of the funciton.
Fixes
../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]
847 | shell_basename = basename(shell);
| ^
[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/2615]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
login-utils/su-common.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/login-utils/su-common.c b/login-utils/su-common.c
index b674920..3297c78 100644
--- a/login-utils/su-common.c
+++ b/login-utils/su-common.c
@@ -26,6 +26,7 @@
#include <sys/types.h>
#include <pwd.h>
#include <grp.h>
+#include <libgen.h>
#include <security/pam_appl.h>
#ifdef HAVE_SECURITY_PAM_MISC_H
# include <security/pam_misc.h>
@@ -840,17 +841,20 @@ static void run_shell(
su->simulate_login ? " login" : "",
su->fast_startup ? " fast-start" : ""));
+ char* tmp = xstrdup(shell);
if (su->simulate_login) {
char *arg0;
char *shell_basename;
- shell_basename = basename(shell);
+ shell_basename = basename(tmp);
arg0 = xmalloc(strlen(shell_basename) + 2);
arg0[0] = '-';
strcpy(arg0 + 1, shell_basename);
args[0] = arg0;
- } else
- args[0] = basename(shell);
+ } else {
+ args[0] = basename(tmp);
+ }
+ free(tmp);
if (su->fast_startup)
args[argno++] = "-f";

View File

@@ -1,4 +1,4 @@
From 0b05e4695a0616badef71dfa459a00ef6ff1b521 Mon Sep 17 00:00:00 2001
From da58b4150f6932de36c962ea657713bcf4ea44be Mon Sep 17 00:00:00 2001
From: Tudor Florea <tudor.florea@enea.com>
Date: Mon, 14 Jun 2021 14:00:31 +0200
Subject: [PATCH] util-linux: Add ptest
@@ -9,13 +9,12 @@ Revert run.sh script accordingly to serialize running tests
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Inappropriate
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 890212f..870e817 100644
index 651ef2b..2a8012e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AC_CONFIG_MACRO_DIR([m4])

View File

@@ -1,4 +1,4 @@
From c79222a9a5e3425c55e150edc0b7ac59c573aa2f Mon Sep 17 00:00:00 2001
From 0387d71516c978899cfd556ca512f530a212b4a9 Mon Sep 17 00:00:00 2001
From: Phil Blundell <pb@pbcl.net>
Date: Mon, 24 Sep 2012 07:24:51 +0100
Subject: [PATCH] util-linux: Ensure that ${sbindir} is respected
@@ -9,16 +9,15 @@ fix the test, the [ ] syntax was getting eaten by autoconf
Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com
Upstream-Status: Inappropriate [configuration]
---
configure.ac | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 36c24b4..890212f 100644
index 23594ff..651ef2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,7 +102,10 @@ AC_SUBST([runstatedir])
@@ -110,7 +110,10 @@ AC_SUBST([runstatedir])
usrbin_execdir='${exec_prefix}/bin'
AC_SUBST([usrbin_execdir])

View File

@@ -1,20 +1,19 @@
From fc5de1de898fd1a372a2fd2fa493dc57323a029d Mon Sep 17 00:00:00 2001
From 45450d0339cd7ee27f53c0f2fac1cc74ed9bbfb8 Mon Sep 17 00:00:00 2001
From: Tudor Florea <tudor.florea@enea.com>
Date: Thu, 3 Dec 2015 04:08:00 +0100
Subject: [PATCH] Display testname for subtest
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Pending
---
tests/functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/functions.sh b/tests/functions.sh
index 5a562a3..098145e 100644
index 5fe5ba0..a6c703e 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -437,7 +437,7 @@ function ts_init_subtest {
@@ -450,7 +450,7 @@ function ts_init_subtest {
if [ "$TS_PARSABLE" != "yes" ]; then
[ $TS_NSUBTESTS -eq 1 ] && echo

View File

@@ -1,45 +0,0 @@
From 5b8fab1584017d9d9be008c23b90128bba41a7b5 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Thu, 28 Mar 2024 12:16:57 +0000
Subject: [PATCH] README.licensing/flock: Add MIT license mention
Looking at the license text, flock.c is under the MIT license (see
https://spdx.org/licenses/MIT).
Add an SPDX license identifier header and add to the list of licenses the
source so everything is correctly listed/identified.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/2870]
---
README.licensing | 2 ++
sys-utils/flock.c | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/README.licensing b/README.licensing
index 4454f8392a..535ad34813 100644
--- a/README.licensing
+++ b/README.licensing
@@ -12,6 +12,8 @@ There is code under:
* LGPL-2.1-or-later - GNU Lesser General Public License 2.1 or any later version
+ * MIT - MIT License
+
* BSD-2-Clause - Simplified BSD License
* BSD-3-Clause - BSD 3-Clause "New" or "Revised" License
diff --git a/sys-utils/flock.c b/sys-utils/flock.c
index fed29d7270..7d878ff810 100644
--- a/sys-utils/flock.c
+++ b/sys-utils/flock.c
@@ -1,4 +1,6 @@
-/* Copyright 2003-2005 H. Peter Anvin - All Rights Reserved
+/* SPDX-License-Identifier: MIT
+ *
+ * Copyright 2003-2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation

View File

@@ -1,24 +1,23 @@
From d0a69ce80c579cbb7627a2f20e8b92e006a8d8ad Mon Sep 17 00:00:00 2001
From f9be73c3e2b0a4f0923950dcb058be85d3ee8ed7 Mon Sep 17 00:00:00 2001
From: Tudor Florea <tudor.florea@enea.com>
Date: Thu, 3 Dec 2015 04:08:00 +0100
Subject: [PATCH] Define TESTS variable
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Pending
---
Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.am b/Makefile.am
index effbb02..7d2bd1e 100644
index 50ab8d0..7e2340d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -57,6 +57,7 @@ systemdsystemunit_DATA =
@@ -64,6 +64,7 @@ tmpfiles_DATA =
dist_bashcompletion_DATA =
check_PROGRAMS =
dist_check_SCRIPTS =
+TESTS = $(check_PROGRAMS)
PATHFILES =
ADOCFILES_COMMON =
BUILT_SOURCES =