Commit Graph

276 Commits

Author SHA1 Message Date
Peter Marko
6152ee6778 util-linux: patch CVE-2025-14104
Pick patches per [1].

[1] https://security-tracker.debian.org/tracker/CVE-2025-14104

(From OE-Core rev: 0dee49ec49c341235863ec75fc80619e70dfd836)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2026-01-26 09:45:38 +00:00
Bastian Krause
4f2287dcc4 util-linux: fix pointer usage in hwclock param handling
Passing params as numbers to hwclock is broken in util-linux 2.39.3 due
to wrong pointer handling. So backport the fix from upstream included
since util-linux 2.41.

(From OE-Core rev: 3d8f88906f5560286462eaf55226b872e2805df7)

Signed-off-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-11-07 06:54:41 -08:00
Chris Laplante
b079439d07 util-linux: use ${B} instead of ${WORKDIR}/build, to fix building under devtool
This change already exists on master, but it was made as part of the
larger migration to ${UNPACKDIR} and is not cherry-pickable.

See: d73595df696 (recipes: Update WORKDIR references to UNPACKDIR)

(From OE-Core rev: 378f87f087651bacdb6efc6b98168bc6ba865070)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Virendra Thakur
09edf92b0d util-linux: Add fix to isolate test fstab entries using CUSTOM_FSTAB
During ptest execution, util-linux adds mount entries in /etc/fstab
and runs `mount -a`, which mounts all available entries from
/etc/fstab. This can cause unintended mounts that are unrelated to
the test, leading to incorrect test behavior.

To avoid this, upstream util-linux introduced a mechanism using
CUSTOM_FSTAB,which isolates test-specific fstab entries. Only entries
listed in CUSTOM_FSTAB are mounted during test execution, ensuring
tests do not interfere with or depend on the system's /etc/fstab.

This commit backports below upstream changes to use CUSTOM_FSTAB.
ed3d33faff
b1580bd760
6aa8d17b6b

(From OE-Core rev: e7420db0d77611140149ccfefefc8becfad4f34b)

Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-06-02 07:12:34 -07:00
Niko Mauno
b5f4d8952a 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)

(From OE-Core rev: c0487c8141ae2b9242447b53b71052769db6338f)

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-03 05:39:12 -07:00
Soumya Sambu
750ceb4b76 util-linux: Fix CVE-2024-28085
wall in util-linux through 2.40, often installed with setgid
tty permissions, allows escape sequences to be sent to other
users' terminals through argv. (Specifically, escape sequences
received from stdin are blocked, but escape sequences received
from argv are not blocked.) There may be plausible scenarios
where this leads to account takeover.

References:
https://nvd.nist.gov/vuln/detail/CVE-2024-28085

(From OE-Core rev: b40a77416f73955833faeddf6091a99ff9837199)

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-06-14 05:19:22 -07: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
Ross Burton
ebaf733a70 util-linux: add missing ptest dependencies
The kernel modules loop and sd-mod are needed for the block device tests.

GNU find is used in some tests.

(From OE-Core rev: 9350c391f11bf7587fe46a54c93dc6e4bf3b51db)

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
31d2e2ef9f util-linux: build chfn and chsh
As we now split util-linux per-binary there's no disadvantage to not
building chfn and chsh.

This also means that the tests pass instead of failing when the test
uses the binaries from shadow.

(From OE-Core rev: 804c6b5bd3d398d5ea2a45d6bcc23c76e328ea3f)

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
Alexander Kanavin
64ce39210f util-linux: backport a patch to address mkswap hangs
(From OE-Core rev: 4d50d6f708477da0a5314a3749275d87101374d9)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17 13:45:02 +01:00
Alexander Kanavin
6091f104bb util-linux: update 2.36.2 -> 2.37
Drop manpages support, as it requires asciidoctor
(written in ruby, isn't in oe-core).

(From OE-Core rev: 6cb58dd4feae12a064fad3ab30b1d44e159fe7e2)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17 00:07:05 +01:00
Peter Kjellerstedt
0b94e36b5f util-linux.inc: Do not modify BPN
Changing BPN to be "util-linux" regardless if it is the util-linux
recipe or the util-linux-libuuid recipe that is being built was an
easy way to allow ${BPN} and ${BP} to be used in the SRC_URI for both
recipes. However, it causes problems for native.bbclass where there
are expectations that ${BPN} and ${PN} match each other.

Use "util-linux" directly in the SRC_URI instead to avoid the problem.

(From OE-Core rev: 701ef7ff0e1b17150424a64acfafbb83f518f9c9)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-01 14:03:49 +01:00
Richard Purdie
bbd6098ef4 util-linux-libuuid: Simplify recipe and rename from util-linux-uuid
Rename the recipe from util-linux-uuid to util-linux-libuuid which means
we can drop the custom PACKAGES and FILES defintions which simplifies
things. Also move the LICENSE setting to the libuuid recipe so that
it is correctly applied to the right packages.

This means the standard definitions from bitbake.conf are used, avoiding
errors from situations where users have customised settings causing
failures.

(From OE-Core rev: 65efd76198ad805060fe28714765cd423fa748dc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-28 22:28:27 +01:00
Luca Boccassi
a31f87a1ff util-linux: backport patch to skip build of unused objects
util-linux-uuid does not need libtcolors.a and libcommon.a but
they get build regardless. Backport a patch from upstream to
skip them and save some compilation time.

c65953d72b

(From OE-Core rev: 9353c4338acd51e1bc4172554fca018c4044829f)

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-20 18:54:55 +00:00
Luca Boccassi
d42487bf52 util-linux: split uuid in separate recipe to allow bootstrapping
Recently util-linux gained an (optional) build dependency on libcryptsetup.
But libcryptsetup build-depends on util-linux for blkid (optional, can be disabled)
and uuid (mandatory).
Split out util-linux-uuid in a different recipe to break the cycle.

https://github.com/karelzak/util-linux/pull/898

(From OE-Core rev: 5f204796e73f37ee67d0a86512ce3ab6f19f9ed0)

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-12 15:35:08 +00:00
Wang Mingyu
65176caf81 util-linux: upgrade 2.36.1 -> 2.36.2
0001-build-sys-do-not-build-plymouth-ctrl.c-w-disabled-pl.patch
0001-hwclock-do-not-assume-__NR_settimeofday_time32.patch
removed since they are included in 2.36.2

(From OE-Core rev: 4db0babf6a69a90df14363103f5f6b643f208b12)

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-21 22:01:28 +00:00