Changes between v2.36 and v2.36.1 -------------------------------------------- commit 35c07c82be1ddc3b1c40f061b59008cac6405499 Author: Karel Zak Date: Mon Nov 16 11:51:33 2020 +0100 build-sys: release++ (v2.36.1) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 1a95c4145f3fc59ed075593fc41091607bcd3602 Author: Karel Zak Date: Mon Nov 16 11:49:12 2020 +0100 docs: update v2.36.1-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.36.1-ReleaseNotes | 111 ++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) commit f56e12bef4e45b31e43360f150e81062242542ab Author: Karel Zak Date: Mon Nov 16 11:47:08 2020 +0100 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8671813cc7b9e59920b597e4370fbf6b0202d3cc Author: Evgeny Vereshchagin Date: Tue Jul 28 08:04:35 2020 +0000 tests: an attempt to get around https://github.com/karelzak/util-linux/issues/1110 Signed-off-by: Evgeny Vereshchagin tests/ts/ipcs/mk-rm-msg | 3 ++- tests/ts/ipcs/mk-rm-sem | 3 ++- tests/ts/ipcs/mk-rm-shm | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit f5cf4fe5ad29cc3c0f2c52d9e13c6bc1476f5ae6 Author: Karel Zak Date: Mon Nov 16 11:26:07 2020 +0100 po: merge changes Signed-off-by: Karel Zak po/ca.po | 1603 +++++++++++++++++++++++++------------------------- po/cs.po | 1670 ++++++++++++++++++++++++++++------------------------- po/da.po | 1617 ++++++++++++++++++++++++++------------------------- po/de.po | 1621 ++++++++++++++++++++++++++------------------------- po/es.po | 1670 ++++++++++++++++++++++++++++------------------------- po/et.po | 1603 +++++++++++++++++++++++++------------------------- po/eu.po | 1603 +++++++++++++++++++++++++------------------------- po/fi.po | 1617 ++++++++++++++++++++++++++------------------------- po/fr.po | 1670 ++++++++++++++++++++++++++++------------------------- po/gl.po | 1603 +++++++++++++++++++++++++------------------------- po/hr.po | 1617 ++++++++++++++++++++++++++------------------------- po/hu.po | 1603 +++++++++++++++++++++++++------------------------- po/id.po | 1603 +++++++++++++++++++++++++------------------------- po/it.po | 1603 +++++++++++++++++++++++++------------------------- po/ja.po | 1619 ++++++++++++++++++++++++++------------------------- po/nl.po | 1619 ++++++++++++++++++++++++++------------------------- po/pl.po | 1619 ++++++++++++++++++++++++++------------------------- po/pt.po | 1619 ++++++++++++++++++++++++++------------------------- po/pt_BR.po | 1619 ++++++++++++++++++++++++++------------------------- po/ru.po | 1617 ++++++++++++++++++++++++++------------------------- po/sl.po | 1603 +++++++++++++++++++++++++------------------------- po/sv.po | 1617 ++++++++++++++++++++++++++------------------------- po/tr.po | 1617 ++++++++++++++++++++++++++------------------------- po/uk.po | 1619 ++++++++++++++++++++++++++------------------------- po/util-linux.pot | 1601 +++++++++++++++++++++++++------------------------- po/vi.po | 1617 ++++++++++++++++++++++++++------------------------- po/zh_CN.po | 1617 ++++++++++++++++++++++++++------------------------- po/zh_TW.po | 1605 +++++++++++++++++++++++++------------------------- 28 files changed, 23580 insertions(+), 21731 deletions(-) commit 179d01187fe07bd6528ae1c7372fb2a5cfd45ec4 Author: Antonio Ceballos Roa Date: Mon Nov 16 11:21:19 2020 +0100 po: update es.po (from translationproject.org) po/es.po | 210 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 100 insertions(+), 110 deletions(-) commit c1e5684a6c40ab8be92824047af0087f2f36a8f2 Author: Petr Písař Date: Mon Nov 16 11:21:19 2020 +0100 po: update cs.po (from translationproject.org) po/cs.po | 541 +++++++++++++++++++++++++++------------------------------------ 1 file changed, 229 insertions(+), 312 deletions(-) commit 8b09c243e1d91bbbb2fb4db616a2056ed9cb947c Author: Jeremy Linton Date: Tue Nov 10 10:05:04 2020 -0600 lscpu: Even more Arm part numbers Over the past two years Arm has published further MIDR/part numbers on https://developer.arm.com/ip-products/processors/cortex-a. Lets sync the arm_part structure for A65, A76AE, A77 and A78*. Signed-off-by: Jeremy Linton sys-utils/lscpu-arm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e44a86a4ea070eb9fa9ae3ed9321f492bc676eff Author: Samanta Navarro Date: Tue Nov 10 11:48:04 2020 +0100 libblkid: limit amount of parsed partitions The linux kernel does not support more than 256 partitions (DISK_MAX_PARTS). The atari and mac block devices have no such limits. Use dos logical partition limit for atari as well (100). Use the kernel limit for mac (256). Signed-off-by: Samanta Navarro libblkid/src/partitions/atari.c | 6 +++++- libblkid/src/partitions/mac.c | 15 +++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) commit 1210e9724c252c0421f6a6e8b9add4f85a0693fd Author: Karel Zak Date: Mon Nov 9 12:54:18 2020 +0100 wipefs: (man) add hint to erase on partitions and disk Addresses: https://github.com/karelzak/util-linux/issues/1177 Signed-off-by: Karel Zak misc-utils/wipefs.8 | 2 ++ 1 file changed, 2 insertions(+) commit c2104daf78159b05be5219c7ddd2fec2b480b3f9 Author: Karel Zak Date: Mon Nov 9 10:53:23 2020 +0100 flock: keep -E exit status more restrictive Addresses: https://github.com/karelzak/util-linux/issues/1180 Signed-off-by: Karel Zak sys-utils/flock.1 | 4 +++- sys-utils/flock.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit b134be670d469643c4908cba612bf405396c4dfe Author: Samanta Navarro Date: Sun Nov 8 11:45:18 2020 +0000 libblkid: allow a lot of mac partitions If the map count is set to INT_MAX then the for loop does not stop because its check is never false. I have not found a correct upper limit. The other partition logics have a maximum amount (exception is atari.c). The loop itself wouldn't be endless. If the iteration reaches block 0 then the signature will be wrong. This means that map count = INT_MAX case would fail even if such a setup would be correct on disk. Signed-off-by: Samanta Navarro libblkid/src/partitions/mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4f3de85b5e16be8b59cd451818585f97650829b3 Author: Samanta Navarro Date: Sun Nov 8 11:44:55 2020 +0000 libblkid: fix memory leak in config parser Multiple occurrences of CACHE_FILE lead to memory leaks. Also if last occurrence of CACHE_FILE is empty then cache file is not set to NULL again. An example /etc/blkid.conf could be: CACHE_FILE=/tmp/cache1 CACHE_FILE=/tmp/cache2 CACHE_FILE= I would expect that CACHE_FILE is empty but actually it is still /tmp/cache2. Signed-off-by: Samanta Navarro libblkid/src/config.c | 3 +++ 1 file changed, 3 insertions(+) commit 03fbc0ed4c17a4477c7a6bd71715fa79e278d9f3 Author: Karel Zak Date: Fri Nov 6 11:38:51 2020 +0100 sfdisk: fix backward --move-data * fix final message where number of moved sectors overflow number of all moved sectors * align last step size before we use it for backward mode source and destination offsets calculation Addresses: https://github.com/karelzak/util-linux/issues/1176 Signed-off-by: Karel Zak disk-utils/sfdisk.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 0b6bd5c12d28956400a7f7adb0a5444a8fcc53b5 Author: Dimitri John Ledkov Date: Wed Nov 4 12:35:38 2020 +0000 sfdisk: correct --json --dump false exclusive `--json` implies `--dump`, thus `--json --dump` must be allowed. `--list-free` is incompatible with `--dump`, and thus also with `--json`. Currently `--json --dump` is prohibited, even though `--list-free` is not specified at all. Regression introduced in 03154d2cf25c1d5ce908da9e72d324004b8d5722. Signed-off-by: Dimitri John Ledkov disk-utils/sfdisk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8f78db2aeaf77f7ee7594cdd69b0d0c4abafddba Author: Samanta Navarro Date: Wed Nov 4 11:33:00 2020 +0000 whereis: support zst compressed man pages Add zst as extension for manual pages. Current version of man-db supports zst extension out of the box. Signed-off-by: Samanta Navarro misc-utils/whereis.c | 2 ++ 1 file changed, 2 insertions(+) commit 62f1994c7e9753deab6395ccf4bab5e78eb53547 Author: Samanta Navarro Date: Wed Nov 4 11:32:00 2020 +0000 whereis: fix out of boundary read If whereis encounters a short file name then an out of boundary read can occur. Signed-off-by: Samanta Navarro misc-utils/whereis.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 534ece4c632da5ad46bc4417f1ab6d806848cab2 Author: Karel Zak Date: Wed Nov 4 10:29:30 2020 +0100 sfdisk: (docs) add more information about GPT attribute bits Addresses: https://github.com/karelzak/util-linux/issues/1171 Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit 0dd35c634879008606ff9bdbf2bc06a22b57e460 Author: Sami Kerola Date: Mon Nov 2 22:26:18 2020 +0000 lib/randutils: rename random_get_bytes() Rename random_get_bytes() to avoid colliding a Solaris library function that has the same name. Reported-by: Sad Clouds Reference: https://lore.kernel.org/util-linux/20201101141608.ba365cf67d92ee3973226de9@gmail.com/ Reference: https://blogs.oracle.com/solaris/solaris-random-number-generation-v2 Signed-off-by: Sami Kerola include/randutils.h | 2 +- lib/randutils.c | 6 +++--- libfdisk/src/dos.c | 2 +- libuuid/src/gen_uuid.c | 6 +++--- misc-utils/mcookie.c | 2 +- sys-utils/ipcmk.c | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) commit 032928b6e22429e718cb21050be64da0f294f6fb Author: Egor Chelak Date: Thu Oct 29 19:49:07 2020 +0200 cast NULL to char * when using execl When calling variadic functions, NULL must be explicitly cast to a desired type. This is noted in the exec(3) manpage. The call in newgrp.c was changed for consistency. Signed-off-by: Egor Chelak lib/exec_shell.c | 2 +- lib/pty-session.c | 4 ++-- login-utils/newgrp.c | 2 +- login-utils/sulogin.c | 4 ++-- login-utils/vipw.c | 2 +- sys-utils/eject.c | 4 ++-- sys-utils/setarch.c | 2 +- term-utils/script.c | 8 ++++---- term-utils/scriptlive.c | 8 ++++---- text-utils/pg.c | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) commit 4069e159fc46c98191a9d26a0e6b9ff097c40996 Author: Egor Chelak Date: Thu Oct 29 19:06:13 2020 +0200 vipw: fix short write handling in copyfile Since `off` and `nr` approach each other, the for-loop ends prematurely when at least half of the buffer was written. I think under certain conditions this could cause the copy to be incomplete. Signed-off-by: Egor Chelak login-utils/vipw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a565574a1955aaa35c5b95dd90583c93986417a Author: Dr. David Alan Gilbert Date: Sat Oct 17 13:05:34 2020 +0100 libmount: Fix 0x%u usage There's a couple of places which use varients on "0x%u" in format strings; that's almost always wrong - you either want 0x%x or just %u. In libmount's case it's flags, so I'm assuming the intention really is hex. In the ja.po case it's %u in the original msgid. Signed-off-by: Dr. David Alan Gilbert libmount/src/optstr.c | 2 +- po/ja.po | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4fa74fd647ad5b6fa162298cfea5f600a5cd19c4 Author: Sami Kerola Date: Sun Aug 9 13:58:10 2020 +0100 sfdisk: do not free device name too soon [coverity scan] Fixes use after free error. CID: 360798 Signed-off-by: Sami Kerola disk-utils/sfdisk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8ae4eda9a3d53eb76f720e5b9bf165c5a46b369e Author: Sami Kerola Date: Sun Aug 9 13:34:00 2020 +0100 login: close() only a file descriptor that is open [coverity scan] CID: 360819 Signed-off-by: Sami Kerola login-utils/login.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bad223f0072de4ad2f7fbdfb0cc6836037aa4467 Author: Sami Kerola Date: Sat Aug 8 20:06:42 2020 +0100 login: ensure getutxid() does not use uninitialized variable [coverity scan] Field ut.ut_pid is uninitialized when calling getutxline(). The safest option is to ensure all struct data is initialized in the function. CID: 360793 Signed-off-by: Sami Kerola login-utils/login.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e640ffda5b59ac9de048b39ff46dcdd88f6ad832 Author: Sami Kerola Date: Sat Aug 8 20:02:01 2020 +0100 lib/pager: fix improper use of negative value [coverity scan] The close(2) cannot accept a negative number. CID: 360777 Signed-off-by: Sami Kerola lib/pager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3de8b941ff98506153628f3fddc494d24d6ad0d6 Author: Sami Kerola Date: Sat Aug 8 19:45:30 2020 +0100 unshare: fix bad bit shift operation [coverity scan] Variable cap was 32 bits and shifting it by 64 bits resulted to the shift going over a variable boundary. CID: 360799 Signed-off-by: Sami Kerola Signed-off-by: Karel Zak sys-utils/unshare.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 3bc87939335aa95c698e7a35b42b2cb36af87ef8 Author: Sami Kerola Date: Sat Aug 8 19:05:29 2020 +0100 hardlink: fix hardlink pcre leak Signed-off-by: Sami Kerola misc-utils/hardlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5241c7166821c988bb88d971001e89eaa50312a6 Author: Eric Simpson Date: Tue Oct 13 12:55:05 2020 -0400 do not require sys/syscall.h on non-linux platforms In order to build util-linux on other platforms (such as IBM i), do not require the linux-specific sys/syscall.h. lib/randutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f98fdff80e0382dd0845746d63381e546fef8405 Author: Karel Zak Date: Tue Oct 13 18:34:39 2020 +0200 tests: update atari partx tests Signed-off-by: Karel Zak tests/expected/partx/partx-image-atari-icd | 7 ------- tests/expected/partx/partx-image-atari-primary | 2 ++ tests/expected/partx/partx-image-atari-xgm | 10 +++------- 3 files changed, 5 insertions(+), 14 deletions(-) commit a979bd265a8b6538cc81608f59444dec624fc1ef Author: Dusty Mabe Date: Tue Oct 13 11:26:16 2020 -0400 fstrim: remove fstab condition from fstrim.timer In 9995da0 we added support to fstrim to be able to fall back to `/proc/self/mountinfo` if `/etc/fstab` didn't exist, but we forgot to remove the `/etc/fstab` condition from the timer. Let's remove that condition from the timer so we can go back to periodically running `fstrim.service`. sys-utils/fstrim.timer | 1 - 1 file changed, 1 deletion(-) commit 6b3c0812f8c435e3c9dd1b991fb8b1bc95a525b3 Author: Karel Zak Date: Tue Oct 13 16:29:19 2020 +0200 tests: update atari blkid tests The old images of the atari label are truncated and in-table stored sizes do not match with real images sizes -- libblkid checks it now. I have no idea how to generate ICD format, let's ignore it in tests for now. Signed-off-by: Karel Zak tests/expected/blkid/lowprobe-pt-atari-icd | 8 -------- tests/expected/blkid/lowprobe-pt-atari-primary | 3 +++ tests/expected/blkid/lowprobe-pt-atari-xgm | 10 +++------- tests/ts/blkid/images-pt/atari-icd.img.xz | Bin 1920 -> 0 bytes tests/ts/blkid/images-pt/atari-primary.img.xz | Bin 0 -> 932 bytes tests/ts/blkid/images-pt/atari-xgm.img.xz | Bin 1920 -> 956 bytes 6 files changed, 6 insertions(+), 15 deletions(-) commit 158bbbea64c079d7a18bff723108259c88cf5888 Author: Karel Zak Date: Tue Oct 13 16:19:20 2020 +0200 libblkid: make Atari more robust * ignore large disks * check in-table stored device size * check bad sectors list * check partition dimensions against in-table device size Addresses: https://github.com/karelzak/util-linux/issues/1159 Signed-off-by: Karel Zak libblkid/src/partitions/atari.c | 57 +++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 14 deletions(-) commit 40e0c687336fe7b206846943fd29b2d759470b2f Author: Karel Zak Date: Tue Oct 13 12:55:44 2020 +0200 losetup: increase limit of setup attempts Signed-off-by: Karel Zak libfdisk/src/gpt.c | 3 ++- sys-utils/losetup.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit b3e985bd569922348f2c5679a43dc90a3d2b1427 Author: Karel Zak Date: Tue Oct 13 10:31:42 2020 +0200 losetup: avoid infinite busy loop issue report: if i run the heavy duty test from #16859 a couple of times I can get the loopback layer in the kernel into a state where there's a loopback block device allocated, that you can open, but where both LOOP_CLR_FD and _SET_FD fail with EBUSY. and /dev/loop-control still returns it as the next free one... weird state util-linux losetup when called to allocate a new device then freezes This commit: * restrict number of attempts to 16 * use 200000ms sleep between attempts * add note about non-atomic loop device setup to the man page Reported-by: Lennart Poettering Signed-off-by: Karel Zak sys-utils/losetup.8 | 7 +++++++ sys-utils/losetup.c | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit e5e89655d353ba1612edb19f75e36065336aa9c4 Author: Karel Zak Date: Fri Oct 9 13:46:35 2020 +0200 lib/sysfs: fix doble free [coverity scan] Signed-off-by: Karel Zak lib/sysfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7a29e2765923582d7d54b6c87067200b1aab51bf Author: Karel Zak Date: Fri Oct 9 13:06:08 2020 +0200 libblkid: fix Atari prober logic Addresses: https://github.com/karelzak/util-linux/issues/1159 Addresses: https://github.com/karelzak/util-linux/issues/1116 Signed-off-by: Karel Zak libblkid/src/partitions/atari.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f09f72a92b30f57a08e0e4c833b20bd59d1427ba Author: Karel Zak Date: Tue Oct 6 15:35:09 2020 +0200 docs: add hint about make install-strip and link to Documentation/ Signed-off-by: Karel Zak Documentation/howto-compilation.txt | 11 +++++++++-- README | 9 +++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) commit 6dab2cec150e925940df04b1e2be45144b61b58a Author: Karel Zak Date: Tue Oct 6 15:03:45 2020 +0200 lib: add missing headers to .c files Signed-off-by: Karel Zak lib/env.c | 7 +++---- lib/fileutils.c | 4 +++- lib/linux_version.c | 4 ++++ lib/pwdutils.c | 4 ++++ lib/swapprober.c | 7 ++++++- lib/timer.c | 3 +++ 6 files changed, 23 insertions(+), 6 deletions(-) commit 7b382c904483d072e14f85434c4815f9b3ecf5c0 Author: Karel Zak Date: Tue Oct 6 13:26:36 2020 +0200 build-sys: exclude GPL from libcommon The library is not distributed and almost all code in this ar(1) archive is Public Domain or LGPL ... but let's avoid any doubts and do not mix non-GPL and GPL code there. Addresses: https://github.com/karelzak/util-linux/issues/1157 Signed-off-by: Karel Zak disk-utils/Makemodule.am | 9 ++++++--- lib/Makemodule.am | 21 ++++++++++++--------- login-utils/Makemodule.am | 3 ++- misc-utils/Makemodule.am | 3 ++- sys-utils/Makemodule.am | 12 ++++++++---- term-utils/Makemodule.am | 3 ++- 6 files changed, 32 insertions(+), 19 deletions(-) commit 456118c6de11f3cbbad456effdd7cb3495683048 Author: Karel Zak Date: Tue Oct 6 13:15:29 2020 +0200 lib/procutils: use Public Domain for this file It's was originally GPL, but all the current code in the file is from me and I don't think it makes sense to use GPL here anymore. We need to use lib/ files in LGPL as well as in GPL binaries, etc. Let's makes things (build-system) less complicated. Signed-off-by: Karel Zak lib/procutils.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 0633e2c5341a870f183eab2e37e146fe4e8b1aec Author: Samanta Navarro Date: Sat Oct 3 11:57:56 2020 +0000 agetty: fix typo in manual page term-utils/agetty.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7be85971620b98f08b17ee9051689445837043bf Author: Karel Zak Date: Thu Oct 1 10:40:27 2020 +0200 chrt: use SCHED_FLAG_RESET_ON_FORK for sched_setattr() Reviewed by many people, used for years (but probably nobody uses SCHED_DEADLINE with reset-on-fork), but we all missed: - sched_setscheduler() uses SCHED_RESET_ON_FORK (0x40000000) - sched_setattr() uses SCHED_FLAG_RESET_ON_FORK (0x01) Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1883013 Signed-off-by: Karel Zak schedutils/chrt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3007f56695743835c8733f64a2411493215ffd7c Author: Karel Zak Date: Wed Sep 30 11:49:05 2020 +0200 fdisk: always report fdisk_create_disklabel() errors This is fdisk, cfdisk and sfdisk change to inform user about fdisk_create_disklabel() issues. Addresses: https://github.com/karelzak/util-linux/issues/1147 Signed-off-by: Karel Zak disk-utils/cfdisk.c | 20 ++++++++++++++++++-- disk-utils/fdisk-menu.c | 20 ++++++++++++++------ disk-utils/sfdisk.c | 9 +++++---- 3 files changed, 37 insertions(+), 12 deletions(-) commit a9d8303533888230198614406dcb9921004fa115 Author: Karel Zak Date: Wed Sep 30 11:44:03 2020 +0200 libfdisk: (gpt) make sure device is large enough The current code creates GPT header and partitions arrays (with 128 entries ...) although there is no space for all the stuff. This patch forces fdisk_create_disklabel() to return -ENOSPC if the last and first usable LBA calculation is out of device size. Addresses: https://github.com/karelzak/util-linux/issues/1147 Signed-off-by: Karel Zak libfdisk/src/gpt.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 18e5f177034531a165a3af2d2f344eac0a79d2a6 Author: Shunsuke Nakamura Date: Mon Sep 28 18:46:14 2020 +0900 lscpu: Add FUJITSU aarch64 A64FX cpupart Add an entry for FUJITSU aarch64 part A64FX. I tested it on the FX1000. Signed-off-by: Shunsuke Nakamura sys-utils/lscpu-arm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 713a46f62f6b9aa1bf2e2e9ec80625ef3d64d24e Author: Jakub Wilk Date: Sat Sep 26 18:15:42 2020 +0200 blockdev: fix man page formatting Signed-off-by: Jakub Wilk disk-utils/blockdev.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb4d39ff41ea8bcfc7ec2b36db68c72f8c21c3c9 Author: Thomas Abraham Date: Thu Sep 24 14:52:33 2020 -0400 lscpu: avoid segfault on PowerPC systems with valid hardware configurations ntypes greater than 1 is valid in some hardware configurations, and an assert() on the value isn't necessary or very future proof sys-utils/lscpu.c | 2 -- 1 file changed, 2 deletions(-) commit 1cf30a85af60b8b55b5edaa2e056b5871bf21a4a Author: Karel Zak Date: Thu Sep 24 09:56:03 2020 +0200 lsblk: fix SCSI_IDENT_SERIAL It seems sg3_utils does not use ID_ prefix like other udev stuff. Addresses: https://github.com/karelzak/util-linux/issues/1143 Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 392c4d91313e2fb24daeffdb354999b00864d2bb Author: Karel Zak Date: Wed Sep 23 15:41:05 2020 +0200 lsblk: read ID_SCSI_IDENT_SERIAL if available This SERIAL comes from sg3_utils. Addresses: https://github.com/karelzak/util-linux/issues/1143 Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 1 + 1 file changed, 1 insertion(+) commit 834378f32b52c67bd027773a8ebab60b49cd71d8 Author: nl6720 Date: Mon Sep 21 18:20:16 2020 +0300 libfdisk: add "Linux /usr" and "Linux /usr verity" GPT partition types See https://systemd.io/DISCOVERABLE_PARTITIONS/ and https://github.com/systemd/systemd/pull/17101 . Move ARM after x86-64, so that x86 and x86-64 are next to one another. Signed-off-by: nl6720 include/pt-gpt-partnames.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit ed423e56ec43e6cdd5a8475e698f693b56512a63 Author: Gero Treuner Date: Thu Sep 10 21:43:03 2020 +0200 fallocate: fix --dig-holes at end of files I discovered that making a file sparse with "fallocate -d filename" fails on the last block of a file, because - usually being partial - the system call only zeroes that part instead of deallocating the block. See man fallocate(2) - section "Deallocating file space". The expected call is punching the whole block beyond eof, which doesn't change the file length because of flag FALLOC_FL_KEEP_SIZE. Signed-off-by: Karel Zak sys-utils/fallocate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9931d2d174c9ebb726e0869def19d4f67e945d12 Author: Tomoaki Teshima Date: Fri Sep 11 22:45:54 2020 +0900 add Carmel from NVIDIA sys-utils/lscpu-arm.c | 1 + 1 file changed, 1 insertion(+) commit c8d97a2429bff3c8fee429be343ee9b200e080b5 Author: Karel Zak Date: Wed Sep 9 12:00:10 2020 +0200 lsblk: print zero rather than empty SIZE Addresses: https://github.com/karelzak/util-linux/issues/1118 Signed-off-by: Karel Zak misc-utils/lsblk.c | 2 -- 1 file changed, 2 deletions(-) commit 42867218017fb6ef320718bd9badf7e07cee42ea Author: yangzz-97 <70520104+yangzz-97@users.noreply.github.com> Date: Sun Sep 6 18:30:48 2020 +0800 libfdisk: reset context FD on error When the query disk fails, reset cxt->dev_fd. Addresses: https://github.com/karelzak/util-linux/pull/1137 Addresses: https://github.com/karelzak/util-linux/issues/1131 Signed-off-by: Karel Zak libfdisk/src/context.c | 1 + 1 file changed, 1 insertion(+) commit 0bb705cae18f327b7cb748c48a8202854b5b93d9 Author: Karel Zak Date: Mon Sep 7 11:52:13 2020 +0200 libsmartcols: don't print empty output on empty table in JSON old version: $ findmnt --json --type foo $ new version: $ findmnt --json --type foo { "filesystems": [ ] } Addresses: https://github.com/karelzak/util-linux/issues/1136 Signed-off-by: Karel Zak libsmartcols/src/print-api.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 95c706c9c2ae2d7e1f095713dae68c7f9cc2462d Author: Mattias Nissler Date: Thu Nov 17 14:47:51 2016 +0100 mount: Add support for "nosymfollow" mount option. This adds support for the "nosymfollow" mount option, which indicates that symlinks should not be traversed on the mount this option is applied to. Also update the mount(8) man page with information about this option. Signed-off-by: Mattias Nissler Signed-off-by: Ross Zwisler libmount/src/context_mount.c | 2 ++ libmount/src/libmount.h.in | 3 +++ libmount/src/optmap.c | 4 ++++ sys-utils/mount.8 | 10 ++++++++++ 4 files changed, 19 insertions(+) commit f4127d3dd85b5888b271e90ac7a05717a88f1581 Author: Sami Kerola Date: Fri Aug 28 20:59:57 2020 +0100 libmount: do not use pointer as an integer value Fix couple "initialization of ‘long int’ from ‘void *’ makes integer from pointer without a cast" warnings. Signed-off-by: Sami Kerola libmount/python/fs.c | 2 +- libmount/python/tab.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 234bd3e072541a2233722644fbe5ae2dbc9b69ee Author: Karel Zak Date: Wed Sep 2 11:10:18 2020 +0200 lsblk: fix -T optional argument Addresses: https://github.com/karelzak/util-linux/issues/1132 Signed-off-by: Karel Zak misc-utils/lsblk.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1f27b426967f5b0cf4c08e347aa6333cf2bdda30 Author: Karel Zak Date: Tue Sep 1 11:50:11 2020 +0200 pg: fix wcstombs() use The size (3rd) argument should be ignored if the 1st *dest is NULL, but it seems gcc & glibc headers are more pedantic now: ext-utils/pg.c:456:13: error: argument 1 is null but the corresponding size argument 3 value is 2048 [-Werror=nonnull] Signed-off-by: Karel Zak text-utils/pg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 802d7992db30a79eaba645a13a07cf77c8f888f5 Author: Rosen Penev Date: Sat Aug 29 21:55:58 2020 -0700 hwclock: fix SYS_settimeofday fallback turns out this is subtly broken. musl 1.2.x for 64-bit architectures defines __NR_settimeofday but not for 32-bit ones. For 32-bit, it defines a _time32 variant. sys-utils/hwclock.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e911d9ff25ca3bccdef1ba825b539e88f83903fa Author: Adriaan de Groot Date: Mon Aug 24 23:30:35 2020 +0200 Generate valid JSON if partition table is empty When the partition table is present **but** empty, the existing code would output fields followed by a `,` , on the assumption that the list of partitions would follow. But if the list of partitions is empty, it is skipped, leading to output like this: ``` { "partitiontable": { "label":"gpt", "id":"1F9E80D9-DD78-024F-94A3-B61EC82B18C8", "device":"/dev/sdb", "unit":"sectors", "firstlba":2048, "lastlba":30949342, "sectorsize":512, } } ``` Note the `512,` on the *sectorsize* line. This is invalid JSON for some parsers, which choke on it. Avoid this, by checking when outputting the last separator: if there's no table, or there is a table but it is empty, then just put a newline, otherwise use the old path of comma-newline and assume there's going to be a list of partitions after. libfdisk/src/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5a00ea0dc54db80f9e947935a8f3dad3102c1bd Author: nl6720 Date: Sat Aug 22 15:16:27 2020 +0300 libfdisk: add systemd-homed user's home GPT partition type See https://systemd.io/HOME_DIRECTORY/ . Additionally update the URL of the Boot Loader Specification. Signed-off-by: nl6720 include/pt-gpt-partnames.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ef75f2f6128adaf1cad39ac447063305f5c0b8f3 Author: Karel Zak Date: Fri Aug 14 11:13:50 2020 +0200 libfdisk: (script) fix possible partno overflow Addresses: https://oss-fuzz.com/testcase-detail/5740890480705536 Signed-off-by: Karel Zak libfdisk/src/script.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 975c8d0df5cb1c66298c42ec6071cfe433d5d8bc Author: Karel Zak Date: Thu Aug 13 13:48:28 2020 +0200 libfdisk: (script) fix possible memory leaks Signed-off-by: Karel Zak libfdisk/src/script.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit ace8f3ab2e3847d877d6d51f1693f4e3c3518d9e Author: Karel Zak Date: Thu Aug 13 10:13:01 2020 +0200 libfdisk: another parse_line_nameval() cleanup libfdisk/src/script.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit f9ed1d415f67403a11b4a1e883f19e3c4d5b3e3a Author: Karel Zak Date: Wed Aug 12 19:48:47 2020 +0200 libfdisk: fix typo from 255f5f4c770ebd46a38b58975bd33e33ae87ed24 Signed-off-by: Karel Zak libfdisk/src/parttype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 448b74e9148bb474f3c0c829e759a5d70c357712 Author: Karel Zak Date: Wed Aug 12 19:36:51 2020 +0200 libfdisk: (script) make sure buffer is initialized Just to make static analyzers happy. Signed-off-by: Karel Zak libfdisk/src/script.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 599c6d8eb0b7ebe219c2d8650862e2e989c208c7 Author: Karel Zak Date: Wed Aug 12 15:59:38 2020 +0200 libfdisk: (script) don't use sector size if not specified This is probably bad script API use, but better be safe than sorry. Signed-off-by: Karel Zak libfdisk/src/script.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit c023b586f1de11f9ebde1d5ef217fe389eafc8de Author: Karel Zak Date: Wed Aug 12 15:52:53 2020 +0200 libfdisk: (script) make sure label is specified and unref type if already specified (unlikely, but be paranoid) Signed-off-by: Karel Zak libfdisk/src/parttype.c | 2 +- libfdisk/src/script.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) commit 96f71eeb31bdd048333c59afae48edcdad176f6e Author: Karel Zak Date: Tue Aug 11 11:02:31 2020 +0200 hwclock: add fallback if SYS_settimeofday does not exist It seems Musl-C removes SYS_settimeofday macro at all. Addresses: https://github.com/karelzak/util-linux/commit/9c6139a72017cecb9145e46102152cb4f456ada6#commitcomment-41290951 Signed-off-by: Karel Zak sys-utils/hwclock.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8a37c4db3917fac7d0357500838f069f03cfdc3e Author: Karel Zak Date: Fri Aug 7 13:49:19 2020 +0200 docs: fix typo in v2.36-ReleaseNotes Reported-by: Pavel Machek Signed-off-by: Karel Zak Documentation/releases/v2.36-ReleaseNotes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aada4aa13cc89a13d229bda2847980ced446a9b4 Author: Evgeny Vereshchagin Date: Thu Aug 6 13:59:35 2020 +0000 build-system: stop looking for %ms and %as Looks like those specifiers haven't been used since 6c9ab254aefb6ce7e0e (where sscanf was removed) was merged. This should help to get util-linux to compile with MSan. Currently it's failing with ``` ... configure: error: libmount selected, but required scanf string alloc modifier not available ... configure:20240: ./conftest ==116617==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x496fd6 in main /home/vagrant/util-linux/conftest.c:171:6 #1 0x7f5eb85ea1a2 in __libc_start_main (/lib64/libc.so.6+0x271a2) #2 0x41c2cd in _start (/home/vagrant/util-linux/conftest+0x41c2cd) SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/vagrant/util-linux/conftest.c:171:6 in main Exiting configure:20240: $? = 77 ... configure:20265: $? = 0 configure:20265: ./conftest MemorySanitizer: bad pointer 0x000000496e60 ==116627==MemorySanitizer CHECK failed: /builddir/build/BUILD/compiler-rt-9.0.1.src/lib/msan/../sanitizer_common/sanitizer_allocator_secondary.h:177 "((IsAligned(reinterpret_cast(p), page_size_))) != (0)" (0x0, 0x0) #0 0x41d1d8 in MsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/home/vagrant/util-linux/conftest+0x41d1d8) #1 0x484e1e in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/home/vagrant/util-linux/conftest+0x484e1e) #2 0x42066c in __msan::MsanDeallocate(__sanitizer::StackTrace*, void*) (/home/vagrant/util-linux/conftest+0x42066c) #3 0x424bc9 in free (/home/vagrant/util-linux/conftest+0x424bc9) #4 0x496fae in main /home/vagrant/util-linux/conftest.c:173:2 #5 0x7f2245f311a2 in __libc_start_main (/lib64/libc.so.6+0x271a2) #6 0x41c2cd in _start (/home/vagrant/util-linux/conftest+0x41c2cd) configure:20265: $? = 77 configure: program exited with status 77 ... | } configure:22568: result: no configure:22926: error: libmount selected, but required scanf string alloc modifier not available ``` Signed-off-by: Evgeny Vereshchagin configure.ac | 64 ------------------------------------------------------------ include/c.h | 9 --------- 2 files changed, 73 deletions(-) commit b0098c1ebd3bd068edaa38be67ac48b6c1218e98 Author: Karel Zak Date: Thu Aug 6 11:32:33 2020 +0200 libfdisk: fix fdisk_reread_changes() for extended partitions Linux kernel assumes only 1KiB extended partition to avoid overlapping with nested logical partitions. We need to follow this rule for BLKPG_ADD_PARTITION. Addresses: https://github.com/karelzak/util-linux/issues/1112 Signed-off-by: Karel Zak libfdisk/src/context.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit ad374ab7af18aaf1d0f07e74726e18aba94a6d05 Author: Chris Hofstaedtler Date: Fri Jul 24 00:35:09 2020 +0000 fdisk: fix expected test output on alpha The last test output update inadvertedly replaced "ext2" with "MS-DOS" in the alpha-specific data. Fixes: 3c36438f0 Broken build log: https://buildd.debian.org/status/fetch.php?pkg=util-linux&arch=alpha&ver=2.36-1&stamp=1595550493&raw=0 Signed-off-by: Chris Hofstaedtler tests/expected/fdisk/bsd_0_64_alpha.LE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66e0429a6cb85f09ee56cc9f13069f9eaf3035d3 Author: Chris Hofstaedtler Date: Thu Jul 23 22:31:41 2020 +0000 manpages: fix "The example command" in AVAILABILITY section Signed-off-by: Chris Hofstaedtler disk-utils/fsck.cramfs.8 | 2 +- disk-utils/mkfs.cramfs.8 | 2 +- misc-utils/uuidparse.1 | 2 +- sys-utils/irqtop.1 | 2 +- sys-utils/lsirq.1 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit cfb1d4c078f5dcc040bd6c2fae118b302a7b192b Author: Chris Hofstaedtler Date: Tue Jun 23 00:14:30 2020 +0000 hexdump: automatically use -C when called as hd When invoking hexdump as hd enable the "Canonical" format to by default, implying the -C option. This is historic behaviour on Debian and apparently also on FreeBSD. Some Debian users have asked for this to be restored, after Debian switched to util-linux' hexdump and hd. Signed-off-by: Chris Hofstaedtler text-utils/hexdump.1 | 3 +++ text-utils/hexdump.c | 7 +++++++ 2 files changed, 10 insertions(+) commit 430952f254cddf1ccb47a5f8caf5b5cd64193c3a Author: Karel Zak Date: Mon Aug 10 11:37:32 2020 +0200 libfdisk: fix last free sector detection if partition size specified We need to skip useless gaps between partition if the gap is no large enough for a new partition. Unfortunately, the current code checks size of the gap, but does not care for location of the gap -- this is good enough for dialog driven partitioning, but it's pretty bad if start of the partition is explicitly specified (e.g. sfdisk). Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1860461 Signed-off-by: Karel Zak libfdisk/src/dos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)