Commit Graph

285 Commits

Author SHA1 Message Date
Khem Raj
7237d6bb50 util-linux: ignore mkfds BPF related ptests
They do not pass with GCC-15, ignore them for now

[RP: Fix formatting of exclude to be whitespace separated]
(From OE-Core rev: dc989569d3528d999f2a1f4363a9ef8325e09600)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-01 14:33:26 +01:00
Chen Qi
06614551ac util-linux/util-linux-libuuid: upgrade from 2.40.2 to 2.40.4
The following patch dropped because it is in the new version:
- 0001-autotools-fix-securedir-and-pam_lastlog2-install.patch

libfdisk-cfdisk-and-sfdisk-sector-size-improvements.patch is replaced
by two new patches:
- 0001-cfdisk-add-sector-size-commanand-line-option.patch
- 0002-sfdisk-add-sector-size-commanand-line-option.patch

This is because the original patch is a squash of four patches and
two of them are in the new version. So extract the remaining two
that are not in the current version and make them separate patches
for better tracking.

(From OE-Core rev: e87b9bccc52bfba0c48db4920c0996d7dd6a0866)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-18 11:56:04 +00:00
Daniel McGregor
49f9970c75 util-linux-libuuid: use util-linux's CVE_PRODUCT value
util-linux and util-linux-libuuid should use the same CVE_PRODUCT
since they're the same product. They're just split off for package
dependency reasons.  Prior to this patch the libuuid recipe gave the
wrong CVE_PRODUCT value, causing some CVE check tools to fail on it.

(From OE-Core rev: 5c6abb099d579b9451fc2cb38c5d8860cfa6d52f)

Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-01 13:20:45 +00:00
Bastian Germann
d456553ca3 util-linux: Document more specific BSD-4-Clause-UC
LIC_FILES_CHKSUM in the util-linux recipe already contains the more
specific license reference BSD-4-Clause-UC that takes a copyright
addendum by University of California into account.

License-Update: reference can be more specific

(From OE-Core rev: 7cc73cb77e6e783a903978221cb502bb359412f6)

Signed-off-by: Bastian Germann <bage@debian.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-27 15:47:09 +00:00
Richard Purdie
cfabbd46f5 util-linux: Improve PACKAGES_DYNAMIC handling for util-linux-native
DEBUG: Assuming util-linux-swapon-native is a dynamic package, but it may not exist
DEBUG: Assuming util-linux-swapon-native is a dynamic package, but it may not exist
DEBUG: providers for util-linux-swapon-native are: ['util-linux', 'util-linux-native']
DEBUG: sorted runtime providers for util-linux-swapon-native are: ['recipes-core/util-linux/util-linux_2.40.2.bb', 'virtual:native:recipes-core/util-linux/util-linux_2.40.2.bb']
NOTE: Multiple providers are available for runtime util-linux-swapon-native (util-linux, util-linux-native)

The PACKAGES_DYANMIC line could match native and non-native packages so
tweak to improve -native handling and avoid the above warnings in world builds.

(From OE-Core rev: 5577bb4772a76b3e419cf1f8f2a439bc1b15a9b5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-10 11:23:45 +00:00
Yi Zhao
ab81268a42 util-linux: add volatile file for lastlog2
Add volatile file for lastlog2 to fix runtime error with sysvinit:
$ lastlog2
lastlog2: Couldn't read entries for all users
lastlog2: Cannot open database (/var/lib/lastlog/lastlog2.db): unable to open database file

(From OE-Core rev: 440f4830d1f1bac9d55584fc4e48627920493cb9)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-04 12:34:04 +00:00
Yi Zhao
bb719cb783 util-linux: replace local patch with upstream patch
There is a better solution upstream to fix the pam_lastlog2 installation
issue[1]. Backport this patch to replace the local patch.

[1] https://github.com/util-linux/util-linux/pull/3173

(From OE-Core rev: 1c984d0a06cdcba49f8b0acd12edebfeaedf3aa5)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-04 12:34:04 +00:00
Vince Chang
bada336904 util-linux: sfdisk sector size improvements
Refer to https://github.com/util-linux/util-linux/pull/3237.

(From OE-Core rev: 7e37e0addeae3ade4d1634697cde5c8cc619c46a)

Signed-off-by: Vince Chang <vince_chang@aspeedtech.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-22 12:28:18 +01:00
Alban Bedel
c68ef7b4b7 util-linux: Add findmnt to the bash completion RDEPENDS
The bash completion scripts for `umount`, `fstrim` and `fsfreeze` make
use of `findmnt` so add it to the bash completion RDEPENDS.

(From OE-Core rev: f8703b486a6ccf39225815362acadafb890ca56e)

Signed-off-by: Alban Bedel <alban.bedel@aerq.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-18 15:01:04 +01:00
Chen Qi
768acd2df8 util-linux/util-linux-libuuid: upgrade from 2.40.1 to 2.40.2
Upgrade util-linux from 2.40.1 to 2.40.2.

0001-Revert-autotools-make-pam-install-path-configurable.patch
is added to solve a problem of lastlog2 pam module not installed
in the expected location.

(From OE-Core rev: 2303f28de507ceb88a012647f70b74e0fad6ec4b)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-23 09:12:38 +01:00
Niko Mauno
e981b40aa5 util-linux: Add PACKAGECONFIG option to mitigate rootfs remount error
The 2.39 version of util-linux took new file descriptors based mount
kernel API into use. In relation to this change, the upstream release
notes in
https://github.com/util-linux/util-linux/blob/v2.39/Documentation/releases/v2.39-ReleaseNotes#L14-L21
mention that

  This change is very aggressive to libmount code, but hopefully, it does not introduce regressions in traditional mount(8) behavior.

After observing following failure when booting a board using a bit
older 6.1 series kernel together with initramfs rootfs based boot flow

  [FAILED] Failed to start Remount Root and Kernel File Systems.
  See 'systemctl status systemd-remount-fs.service' for details.

closer inspection revealed:

  demoboard ~ # systemctl status -l systemd-remount-fs.service
  x systemd-remount-fs.service - Remount Root and Kernel File Systems
       Loaded: loaded (/usr/lib/systemd/system/systemd-remount-fs.service; enabled-runtime; preset: disabled)
       Active: failed (Result: exit-code) since Wed 2024-08-14 14:53:48 UTC; 1min 22s ago
         Docs: man:systemd-remount-fs.service(8)
               https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
      Process: 76 ExecStart=/usr/lib/systemd/systemd-remount-fs (code=exited, status=1/FAILURE)
     Main PID: 76 (code=exited, status=1/FAILURE)

  Aug 14 14:53:48 demoboard systemd-remount-fs[76]: /usr/bin/mount for / exited with exit status 32.
  Aug 14 14:53:48 demoboard systemd-remount-fs[81]: mount: /: mount point not mounted or bad option.
  Aug 14 14:53:48 demoboard systemd-remount-fs[81]:        dmesg(1) may have more information after failed mount system call.
  Aug 14 14:53:48 demoboard systemd[1]: systemd-remount-fs.service: Main process exited, code=exited, status=1/FAILURE
  Aug 14 14:53:48 demoboard systemd[1]: systemd-remount-fs.service: Failed with result 'exit-code'.
  Aug 14 14:53:48 demoboard systemd[1]: Failed to start Remount Root and Kernel File Systems.

also consequentially, 'systemctl status' reported:

  State: degraded

When issuing 'strace -ff mount -o remount /' the failure occurred at

  mount_setattr(3, "", AT_EMPTY_PATH, {attr_set=MOUNT_ATTR_RDONLY|MOUNT_ATTR_NOATIME|MOUNT_ATTR_NODIRATIME, attr_clr=MOUNT_ATTR_NOSUID|MOUNT_ATTR_NODEV|MOUNT_ATTR_NOEXEC|MOUNT_ATTR_NOATIME|MOUNT_ATTR_STRICTATIME|MOUNT_ATTR_NOSYMFOLLOW|0x40, propagation=0 /* MS_??? */, userns_fd=0}, 32) = -1 EINVAL (Invalid argument)

After further investigation, The issue was pinpointed to lack of Linux
kernel commit
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=95de4ad173ca0e61034f3145d66917970961c210
("fs: relax mount_setattr() permission checks") in the kernel version
that was being used. Above mitigation was discussed in email related to
then-rejected CVE-2024-26821:
https://lore.kernel.org/linux-cve-announce/2024051606-imaging-entrench-b327@gregkh/T/

After testing with qemuarm64 machine different linux-yocto versions,
it was observed that the issue impacts following versions of currently
supported LTS kernels:
 - 6.6.17 (fixed since 6.6.18 i.e. mount_setattr() returns 0)
 - 6.1.78 (fixed since 6.1.79 i.e. mount_setattr() returns 0)
 - 5.15.164 which is currently the newest of 5.15.y series (i.e. no
   known working version)

Taking the above findings into consideration, add a new PACKAGECONFIG
option removing which enables users to opt-out from using the feature
which can cause issues with a bit older kernels. The option is enabled
only for class-target here, since it otherwise causes following error
during util-linux-native's do_configure task on Debian 11 build host
(mountfd_api requirement fails):

   | configure: error: libmount_mountfd_support selected, but required mount FDs based API not available

Versions 5.10.223, 5.4.279 and 4.10.317 were also tested with qemuarm64
but the issue was not reproduced with those versions - using strace
showed that the mount_setattr call associated with the new mount API
problem was not issued with these LTS kernel versions, which seemed to
be confirmed also by following libmount debug message in these cases:

  415: libmount:     HOOK: [0x7fa115e818]: failed to init new API

Note: In addition to the aforementioned, this change was tested also
briefly using the current latest kernel versions 6.1.104, 6.6.45 and
6.10.3 that using the old mount API with newest kernels did not
introduce any observable regression to the boot flow.

(From OE-Core rev: dc086d9a8613143607af3583c72ed892e20b4d66)

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-23 09:12:37 +01:00
Yi Zhao
83e68a5f47 util-linux: install lastlog2 volatile file
Install lastlog2 volatile file to create /var/lib/lastlog directory to
fix runtime error:

$ lastlog2
lastlog2: Couldn't read entries for all users
lastlog2: Cannot open database (/var/lib/lastlog/lastlog2.db): unable to open database file

(From OE-Core rev: 0b651441363a6195a8d025f8010728bc42ae2ee5)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-21 11:08:11 +01:00
Chen Qi
67db5f4f55 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>
2024-07-13 23:28:30 +01:00
Richard Purdie
0ea63b6a43 recipes: Update WORKDIR references to UNPACKDIR
Since we want to be able to stop unpacking to WORKDIR, correct the WORKDIR
references in recipe do_compile/do_install tasks to use UNPACKDIR in the
appropraite places instead.

(From OE-Core rev: d73595df69667fe9d12ecd407b77a0b8dae2109c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-02 15:15:51 +01:00
Dan McGregor
6fd0ad3283 shadow: install manpages
Install the manpages for shadow, and also make the conflicting manpages
alternatives in util-linux.

(From OE-Core rev: 4b5a119ab36b2339b5469e5c7d34635090cc70f0)

Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-23 13:40:24 +01:00
Peter Kjellerstedt
5b486cd1dc util-linux: Set the license for util-linux-fcntl-lock to MIT
This avoids problems if BSD-4-Clause is in INCOMPATIBLE_LICENSE since
util-linux-fcntl-lock is now a dependency of run-postinsts.

(From OE-Core rev: c2c7e1624e8080fb8fa1f14d252f20e85b232eb7)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-04 14:05:03 +01:00
Richard Purdie
4e6a20efa9 util-linux: Add fcntl-lock
Add a version of flock that uses the fnctl based lockf locking instead of
flock based locks. This allows us to take the same lock that opkg would
use from a shell script. The two different locking mechanisms operate
independently of each other.

Inserting this C file into the util-linux build seems like the easiest/best
place to insert the code. At this point it hasn't been discussed with upstream.

(From OE-Core rev: d2b784110e2c3df8a0a41e4819cf2de9003f9fa3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-30 22:22:19 +00:00
Richard Purdie
3c7e103af4 util-linux: Add missing MIT license
The MIT license was missing from the license list for util-linux. Add
a patch, submitted to upstream which adds the missing license mentions.

(From OE-Core rev: 24078c0542626f74c93203d17ab4b2bb2f9b5630)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-30 22:22:19 +00:00
Peter Marko
20fd415a5a util-linux: add alternative link for scriptreplay
This utility conflicts with script from busybox with rich
configuration.

(From OE-Core rev: c30437939e0af6fa243cbe6a305491119726f1a1)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08 17:12:54 +00:00
Ross Burton
79431f5ae3 util-linux: enable gtk-doc
Now that we've solved the util-linux - gtk-doc - xmlto - util-linux
dependency loop, we can enable gtk-doc in util-linux.

We explicitly disable it in util-linux-libuuuid as this doesn't have API
documentation.

(From OE-Core rev: 6999719143df04816c74fbc46d4a97b377bc0b36)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-12 11:54:05 +00:00
Chen Qi
cf7152a4cb util-linux/util-linux-libuuid: ugprade from 2.39.2 to 2.39.3
License-Update:
===============
GPL-1.0-or-later is added. fdisk.c is licensed under it.

0001-lscpu-Use-4K-buffer-size-instead-of-BUFSIZ.patch is dropped as
it's been in the new version.

(From OE-Core rev: 9a0bd46e6988b2da446f89864131639dde63c6d0)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-09 22:59:28 +00:00
Khem Raj
83cad97561 util-linux: Delete md-raid tests
These tests are marked as known failures upstream as well [1]
if we delete them then we can drop dependency on mdadm for ptests which
can further reduce the dependency chain for ptest enabled minimal images

[1] 7519c3edab

(From OE-Core rev: 4f3b4b4f27924f9093dc6b4dd949cabe5cd2891b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-16 13:05:42 +00:00
Khem Raj
86a377ebe7 util-linux: Fix build with latest musl
Musl has removed basename declaration in string.h which exposes this
error.

(From OE-Core rev: c9ac0d6136bfb126c022d13fcafb94f8ee16052e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-13 11:34:27 +00:00
Alexander Kanavin
593ed3b765 util-linux: upgrade 2.39.1 -> 2.39.2
(From OE-Core rev: 5d1203e87eac46dee6c0a7cad309a00e63afa6de)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-26 10:35:27 +01:00
Khem Raj
2d44fd92e8 util-linux: Fix lscpu on musl
(From OE-Core rev: 565b22f4927c76b7bbc3d84198a4d5d3927d8401)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20 08:57:26 +01:00
Khem Raj
fed1504fa0 Revert "util-linux: scanf_cv_alloc_modifier changed from 'as' -> 'ms'"
This was needed for uclibc, which is long gone in OE

This reverts commit d3ffa39e2e.

(From OE-Core rev: fdf81adb8fc705f3c989244ca93067da7db88311)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20 08:57:26 +01:00
Khem Raj
2f190c7a8c util-linux: Disable failing tests on musl
These tests need strptime with %s which is glibc specific extention

(From OE-Core rev: 0190b3eb67d02ecf42531a7c087a5a6f75ee7a5e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20 08:57:26 +01:00
Alexander Kanavin
65bc175907 util-linux: upgrade 2.38.1 -> 2.39.1
License-update: added bsd-2-clause
faeb1b64b3

(From OE-Core rev: 30b6031be6c9b7870f618391dd492834615b0aed)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-01 09:51:20 +01:00
Benjamin Bouvier
47b5c90267 util-linux: add alternative links for ipcs,ipcrm
When enabling ipcs and ipcrm configuration into busybox, both tools are
built and then deployed during do_rootfs. These operation lead to below
issue (similar behavior happens for ipcs):

do_rootfs: Postinstall scriptlets of ['busybox'] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget:${PN} ().

update-alternatives: Error: not linking .../build/tmp/work/board-poky-linux/board-image/1.0-r0/rootfs/usr/bin/ipcrm
to /bin/busybox since .../build/tmp/work/board-poky-linux/board-image/1.0-r0/rootfs/usr/bin/ipcrm exists and is not a link

Binaries enter in conflict with same named util-linux utilities during
do_rootfs step.
Adding ALTERNATIVE_LINK_NAME for both tools fix the issue.

(From OE-Core rev: e4d60408b869c9cc2ccff794d4e271d993ec8a97)

Signed-off-by: Benjamin Bouvier <benjamin.bouvier@ekinops.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14 17:31:06 +01:00
Mingli Yu
783c780b5a util-linux: add selinux PACKAGECONFIG
Add selinux PACKAGECONFIG logic in selinux layer[1] to conform
to yocto compliance.

[1] https://git.yoctoproject.org/meta-selinux/commit/?id=31325005e4409e08b7f68eed44a9c4086453e4dd

(From OE-Core rev: c57cc22fad708ac856ac4ebe0a42042031fbf90b)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-27 23:54:51 +00:00
Mateusz Marciniec
ffd3d1be39 util-linux: Improve check for magic in configure.ac
Check whether magic.h header exists before defining HAVE_MAGIC.

Despite library availability there still can be missing header.
Current test doesn't cover that possibility which will lead compilation
to fail in case of separate sysroot.

Upstream-Status: Backport
[263381ddd4]

(From OE-Core rev: a93e5c4aba34996fdb9b253a4a8529f33ec114f5)

Signed-off-by: Mateusz Marciniec <mateuszmar2@gmail.com>
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-25 11:08:06 +01:00
Mateusz Marciniec
fa1246b099 util-linux: Remove --enable-raw from EXTRA_OECONF
Having both enable and disable flags for raw is confusing.
Raw should be disabled so --enable-raw flag can be removed.

(From OE-Core rev: 011c549e2b005205923db6f69b60f8b29bee415f)

Signed-off-by: Mateusz Marciniec <mateuszmar2@gmail.com>
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-25 11:08:06 +01:00
Khem Raj
56343f4a11 util-linux: Upgrade to 2.38.1
The individual commits in this release are at [1]
and Changelog [2]

[1] https://github.com/util-linux/util-linux/compare/v2.38...v2.38.1
[2] e51a82836a

(From OE-Core rev: 732275928ded0cda2971764a85be0a1eb29cec8f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-10 08:25:28 +01:00
Khem Raj
6ff9060c7f util-linux: Define pidfd_* function signatures
glibc 2.36 has added sys/pidfd.h and APIs for
pidfd_send_signal and pidfd_open, therefore check
for this header and include it if it exists

(From OE-Core rev: c72d4ad4d3c41e6bc36e7d7542a42db04b5a2e97)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-10 08:25:28 +01:00
Alexander Kanavin
63fb37b1ac util-linux: upgrade 2.37.4 -> 2.38
(From OE-Core rev: 929af31db89bb5540b56d953dee2950833390407)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-05 21:17:37 +01:00
Khem Raj
0ec65a3eca util-linux: Create u-a symlink for findfs utility
busybox also installs findfs but into base_sbindir which works out to be
ok when sbindir != base_sbindir but with usrmerge distro feature enabled
this starts to cause trouble because busybox's postinst is trying to
create a symlink for findfs applet in base_sbindir which is same as
sbindir now and there already is binary from util-linux and image fails
to build

do_rootfs: Postinstall scriptlets of ['busybox'] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget:${PN} ().

The real reason is burried in do_rootfs logs

update-alternatives: Error: not linking /mnt/b/yoe/master/build/tmp/work/beaglebone-yoe-linux-gnueabi/yoe-sdk-image/1.0-r0/rootfs/usr/sbin/findfs to /usr/bin/busybox.suid since /mnt/b/yoe/master/build/tmp/work/beaglebone-yoe-linux-gnueabi/yoe-sdk-image/1.0-r0/rootfs/usr/sbin/findfs exists and is not a link

Creating proper u-a for findfs in util-linux fixes the issue

(From OE-Core rev: 211ae2db1ab8fec1ed678170f9d8cbca2cc27ef3)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-27 23:30:11 +01:00
Richard Purdie
b0130fcf91 meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX license identifiers
An automated conversion using scripts/contrib/convert-spdx-licenses.py to
convert to use the standard SPDX license identifiers. Two recipes in meta-selftest
were not converted as they're that way specifically for testing. A change in
linux-firmware was also skipped and may need a more manual tweak.

(From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20 16:45:25 +00:00
Alexander Kanavin
fb50e211e2 util-linux: upgrade 2.37.3 -> 2.37.4
(From OE-Core rev: 6a3289c4786c4d278e2bf0ec1a5e04363772d8bc)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-18 11:37:11 +00:00
Alexander Kanavin
c611878ae7 util-linux: update 2.37.2 -> 2.37.3
(From OE-Core rev: e543d4407fdc91559a77d6c5cd41bcb75bc8c73c)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-03 09:05:14 +00:00
Richard Purdie
3539c214dd util-linux: Fix reproducibility
Sort the list of files to ensure the pkgdata output is deterministic.

(From OE-Core rev: 82e683f8f9ae630dea46ec6be6e636e498579835)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-02 23:09:22 +01:00
Markus Volk
3e1026ef31 util-linux: disable raw
raw.h has been dropped in linux-libc-headers-5.14 leading to:

configure: error: raw selected, but required raw.h header file not available
WARNING: exit code 1 from a shell command.

(From OE-Core rev: 7f577c10913104860121f682b9b3754870c4db23)

Signed-off-by: MarkusVolk <f_l_k@t-online.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-16 09:50:34 +01:00
Alexander Kanavin
ab1d826a70 util-linux: upgrade 2.37.1 -> 2.37.2
(From OE-Core rev: d469dfa08ae52ca720ef1315994050f956b6ea50)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26 08:07:55 +01:00
Chen Qi
9fe8f88026 util-linux: add back manpages related settings
There was a time that util-linux requres asciidoctor to be there
to have man pages. However, now the tarball ships generated man
pages and will use them. So add back the related settings. Otherwise,
we get the following error when enabling 'doc-pkgs' image feature.

  + update-alternatives --install /usr/share/man/man1/kill.1 kill.1 /usr/share/man/man1/kill.1.procps 200
  update-alternatives: Error: not linking /.../tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/usr/share/man/man1/kill.1 \
  to /usr/share/man/man1/kill.1.procps since /.../tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/usr/share/man/man1/kill.1 exists and is not a link

(From OE-Core rev: 3d66fcc425495b5b68caf1a63c7118c692236cc4)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-13 14:44:06 +01:00
Dragos-Marian Panait
b3246ebd87 util-linux: fix CVE-2021-37600
sys-utils/ipcutils: be careful when call calloc() for uint64 nmembs

Fix: #1395
(From OE-Core rev: 9822232b4abd811bb9c8562f98c0aefc748340a0)

Signed-off-by: Karel Zak <kzak@redhat.com>

CVE: CVE-2021-37600
Upstream-Status: Backport [1c9143d0c1f979c3daf10e1c37b5b1e916c22a1c]

Signed-off-by: Dragos-Marian Panait <dragos.panait@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-13 14:44:05 +01:00
Alexander Kanavin
0b46f264a4 util-linux: update 2.37 -> 2.37.1
Drop backports.

(From OE-Core rev: d50e8b73c81af52bacc2125c8fe4828ad2da2ef3)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Khem Raj
b4f9b5b3fa util-linux: Fix signature of close_range()
close_range expects 3 parameters, thus far it was not implemented in
glibc so it was hidden but with glibc 2.34+ it will start to show up

(From OE-Core rev: 0d6f638230a96808e22438d9925aec6383d136a7)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-16 21:23:44 +01:00
Khem Raj
e81bef685f util-linux: Disable chfn-chsh on non-target builds
They are also provided by shadow-native e.g. when building native
recipes and packages where they depend on both shadow-native and
util-linux-native, this can conflict

Enable it only when pam is enabled in distro

Fixes
ERROR: systemd-1_248.3-r0 do_prepare_recipe_sysroot: The file /usr/bin/chsh is installed by both util-linux-native and shadow-native, aborting

(From OE-Core rev: 336625fe433100fb57ea0dda4d9ff5fcb835dc95)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-10 22:42:22 +01:00
Ross Burton
493d1abff7 util-linux: rewrite the ptest integration
Instead of duplicating logic, we can use the run.sh that the test suite
installs.

Unless told otherwise, the util-linux test suite assumes that it is
running in a build tree and looks for binaries to run, but we're on
target so pass --use-system-commands (drops ~180 skips to tens).

Add --show-diff so that debugging can be done from the logs alone.

Remove redundant path manipulation that is now done upstream.

If PAM is disabled, delete the chfn test: it will run the chfn from
shadow which has different output, and the test will fail.

[ YOCTO #14244 ]

(From OE-Core rev: 720660b936b5523ec48a7c04712d10c88198e12c)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-07 11:39:42 +01:00
Ross Burton
c1fea579f0 util-linux: backport test suite fixes
Backport a number of fixes so the test suite passes.

(From OE-Core rev: 398b9dab8675829f3428a4f00bffcf84525e0a46)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-07 11:39:42 +01:00