Changes between v2.33-rc1 and v2.33-rc2 -------------------------------------------- commit 3f7e7e4d3ce97d2c056342674a2888a53e42786c Author: Karel Zak Date: Fri Oct 19 12:19:32 2018 +0200 build-sys: release++ (v2.33-rc2) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit b8ccaf5deca0be633dc96e2f2ed8f932569c27d2 Author: Karel Zak Date: Fri Oct 19 12:18:07 2018 +0200 docs: update v2.33-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.33-ReleaseNotes | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 2b9fde5bae913f3223da8afec025abd12bf782a0 Author: Karel Zak Date: Fri Oct 19 12:16:45 2018 +0200 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 1 + 1 file changed, 1 insertion(+) commit da3223a3c0e01847ae8c1e467f7bfd0b2ceb5f35 Author: Karel Zak Date: Fri Oct 19 12:14:52 2018 +0200 po: merge changes Signed-off-by: Karel Zak po/ca.po | 620 ++++++++++++++++++++++++++--------------------------- po/cs.po | 621 ++++++++++++++++++++++++++--------------------------- po/da.po | 621 ++++++++++++++++++++++++++--------------------------- po/de.po | 621 ++++++++++++++++++++++++++--------------------------- po/es.po | 621 ++++++++++++++++++++++++++--------------------------- po/et.po | 620 ++++++++++++++++++++++++++--------------------------- po/eu.po | 620 ++++++++++++++++++++++++++--------------------------- po/fi.po | 620 ++++++++++++++++++++++++++--------------------------- po/fr.po | 621 ++++++++++++++++++++++++++--------------------------- po/gl.po | 620 ++++++++++++++++++++++++++--------------------------- po/hr.po | 620 ++++++++++++++++++++++++++--------------------------- po/hu.po | 620 ++++++++++++++++++++++++++--------------------------- po/id.po | 620 ++++++++++++++++++++++++++--------------------------- po/it.po | 620 ++++++++++++++++++++++++++--------------------------- po/ja.po | 621 ++++++++++++++++++++++++++--------------------------- po/nl.po | 621 ++++++++++++++++++++++++++--------------------------- po/pl.po | 621 ++++++++++++++++++++++++++--------------------------- po/pt_BR.po | 621 ++++++++++++++++++++++++++--------------------------- po/ru.po | 621 ++++++++++++++++++++++++++--------------------------- po/sl.po | 620 ++++++++++++++++++++++++++--------------------------- po/sv.po | 621 ++++++++++++++++++++++++++--------------------------- po/tr.po | 621 ++++++++++++++++++++++++++--------------------------- po/uk.po | 621 ++++++++++++++++++++++++++--------------------------- po/util-linux.pot | 622 +++++++++++++++++++++++++++--------------------------- po/vi.po | 621 ++++++++++++++++++++++++++--------------------------- po/zh_CN.po | 621 ++++++++++++++++++++++++++--------------------------- po/zh_TW.po | 620 ++++++++++++++++++++++++++--------------------------- 27 files changed, 8494 insertions(+), 8263 deletions(-) commit cdd538e38302eb467c39af4ec8e285b901f89909 Author: Karel Zak Date: Thu Oct 11 14:22:08 2018 +0200 agetty: don't use __u32 Signed-off-by: Karel Zak term-utils/agetty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 056a370efbd4b6540fb287e179fe41029c5808e1 Author: Karel Zak Date: Thu Oct 11 13:29:39 2018 +0200 agetty: make output more robust Signed-off-by: Karel Zak term-utils/agetty.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 980a6e431cf69107a96e1a365be43f66fd3ccb2a Author: Karel Zak Date: Thu Oct 11 13:21:23 2018 +0200 agetty: cleanup issue output change, remove bool Signed-off-by: Karel Zak term-utils/agetty.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit ddbb3067b676ad040302ad6ccd6b5d41ff536e83 Author: Karel Zak Date: Thu Oct 11 13:12:02 2018 +0200 agetty: move all issue variables to struct Signed-off-by: Karel Zak term-utils/agetty.c | 180 +++++++++++++++++++++++++++++----------------------- 1 file changed, 101 insertions(+), 79 deletions(-) commit 6522d88d08ffbba528e15ab4e081fb2846bac03d Author: Stanislav Brabec Date: Wed Oct 10 19:26:34 2018 +0200 agetty: Reload only if it is really needed If netlink event arrives and related escapes are part of issue, agetty reloads and re-display the prompt. Reload is triggered not only by IP address change, but also by IPv6 RAs. In some environments it causes reload several times in a minute, and even complicates the login. To prevent this, reload only if a real change appears. This consists of: split print_issue_file() to several functions: eval_issue_file() prints issue to memory. It does not affect terminal in any way. print_issue_file() prints issue file from memory. cmp_issue_file() compares the issue file and returns true, if reload is needed. The implementation requires additional change: do_prompt() does not evaluate the issue file. It is responsibility of calling function. Test suite: Use issue that contais \4 and/or \6 escape. After installing new instance, restart agetty by typing a letter and then Enter 6 times. To check whether reload happens, type a letter. When reload happens, letter disappears. 1. Unplug network cable. Wait a while and re-plug network cable. You should see 2 reloads on single stack and 3 reloads on dual stack. 2. Run a loop while : ; do sed -i '$areload_test' /etc/issue agetty --reload sleep 3 sed -i '/reload_test/d' /etc/issue agetty --reload sleep 3 done You should see regular reload every 3 seconds. 3. Run a loop while : ; do agetty --reload sleep 3 done Before: You see regular reload every 3 seconds. After: No reloads. 4. Run a loop while : ; do ifconfig lo 127.0.0.1 netmask 255.0.0.0 sleep 3 ifconfig lo 127.0.0.2 netmask 255.0.0.0 sleep 3 done Before: You see regular reload every 3 seconds. After: No reloads. Signed-off-by: Stanislav Brabec term-utils/agetty.c | 141 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 100 insertions(+), 41 deletions(-) commit 36c55a89871d836a9c6a2832151f0ca907e83ea0 Author: Stanislav Brabec Date: Wed Oct 10 19:26:27 2018 +0200 agetty: Watch only protocol requested by issue escapes To decrease number of reloads, watch only protocol requested by \4 and \6 escapes in issue file. Signed-off-by: Stanislav Brabec term-utils/agetty.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit c5955394a8eddc42cb9d14b15ef533af5aed6bc5 Author: Stanislav Brabec Date: Wed Oct 10 19:26:21 2018 +0200 agetty: rename variable changed to triggered changed variable name is not correct. It does not say that network interface changed its address. It just says that the netlink message processing was triggered. Signed-off-by: Stanislav Brabec term-utils/agetty.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d482a0bd5cbd651595eee1785b1f9cd9d9e23524 Author: Karel Zak Date: Fri Oct 5 11:48:04 2018 +0200 bash-completion: cleanup mount and umount --namespace * use only PATHs rather than PIDs to namespaces * add --namespace to umount too Signed-off-by: Karel Zak bash-completion/mount | 2 +- bash-completion/umount | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 4c8a88dcceeb2979fa6c61fb10573a3621a19d13 Merge: 4f7acf32b 5feae697b Author: Karel Zak Date: Fri Oct 5 11:42:59 2018 +0200 Merge branch '2018wk40' of https://github.com/kerolasa/util-linux * '2018wk40' of https://github.com/kerolasa/util-linux: bash-completion: catch up with option changes commit 4f7acf32b536cc3cba8ccde6d685d931540a75f1 Author: Karel Zak Date: Fri Oct 5 11:04:04 2018 +0200 libmount: keep namespaces support optional Reported-by: Ruediger Meier Signed-off-by: Karel Zak libmount/src/context.c | 22 ++++++++++++++++++---- libmount/src/version.c | 3 +++ 2 files changed, 21 insertions(+), 4 deletions(-) commit 7a3b35b9665648de9004fb64b2a6b3ee1418bce4 Author: Karel Zak Date: Fri Oct 5 11:02:26 2018 +0200 build-sys: add USE_LIBMOUNT_SUPPORT_NAMESPACES Signed-off-by: Karel Zak configure.ac | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 5feae697b03de1d897327ab7e6c73738c4d06695 Author: Sami Kerola Date: Thu Oct 4 21:36:22 2018 +0100 bash-completion: catch up with option changes Check what has changed in usage functions in between v2.32..a77bd80d5 and update bash-completion files accordingly. Signed-off-by: Sami Kerola bash-completion/fstrim | 2 ++ bash-completion/hwclock | 3 ++- bash-completion/mount | 18 ++++++++++++++++++ bash-completion/rename | 2 +- bash-completion/script | 4 ++++ bash-completion/setpriv | 18 ++++++++++++++++-- bash-completion/su | 1 + bash-completion/umount | 1 + 8 files changed, 45 insertions(+), 4 deletions(-) commit a77bd80d5a55ae2cde6bd65886f4aceae6e3822d Author: Karel Zak Date: Thu Oct 4 14:06:45 2018 +0200 sfdisk: disable --activate for Hybrid GPT/MBR Addresses: https://github.com/karelzak/util-linux/issues/699 Signed-off-by: Karel Zak disk-utils/sfdisk.c | 3 +++ 1 file changed, 3 insertions(+) commit b4601f620ca5e6cc8ac359dcc9e29ebca18237da Author: Karel Zak Date: Thu Oct 4 12:54:05 2018 +0200 docs: add getopt to TODO Addresses: https://github.com/karelzak/util-linux/issues/701 Signed-off-by: Karel Zak Documentation/TODO | 8 ++++++++ 1 file changed, 8 insertions(+) commit 49032ef7a47db51c3e7cf41f5a41ec2b45630717 Author: Karel Zak Date: Thu Oct 4 12:40:10 2018 +0200 sfdisk: be more verbose about PMBR on --activate Addresses: https://github.com/karelzak/util-linux/issues/699 Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 3 +++ disk-utils/sfdisk.c | 2 ++ 2 files changed, 5 insertions(+) commit d2523d3dd2125903ff0e4655b4b4712f92e49d78 Author: Patrick Steinhardt Date: Wed Sep 26 08:23:09 2018 +0200 rename: avoid undefined function prototype for `fpurge` In case where the non-standard `fpurge` function is available, we redefine `__fpurge` to `fpurge`. We can do so because the only difference between both functions is that one returns an error code while the other does not. But as we do not check the error code either way, we do not care about which one of them we use. The above redefinition happens unconditionally if we know that `fpurge` exists. Most notably, we also redefine it if we already do have an `__fpurge` function available that could be used. This causes problems on musl-based platforms, where we detect availability of `fpurge` in libc, but where no function declaration for it exists in "stdio_ext.h". The compiler thus prints a warning due to an unknown function, even though it will link just fine. Avoid this warning by only redefining `__fpurge` to `fpurge` when HAVE___FPURGE is not defined. Signed-off-by: Patrick Steinhardt misc-utils/rename.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6529212d5b0cbef222c81f7ecb58444e21acb417 Author: Patrick Steinhardt Date: Wed Sep 26 08:23:08 2018 +0200 lsblk: fix unknown type `stat` caused by missing header The structure `blkdev_cxt` has a `struct stat` member embedded, whose size may not be known on some systems because of a missing include for "sys/stat.h". On glibc-based systems, this header is included transitively via "sys/statvfs.h", but on musl-based systems it is not. Fix the resulting compile error due to unknown size of the struct by including "sys/stat.h". Signed-off-by: Patrick Steinhardt misc-utils/lsblk.h | 1 + 1 file changed, 1 insertion(+) commit 7a715f731a7c6c770cc0d26fceca8fca7fccf3d7 Author: Ruediger Meier Date: Wed Sep 26 00:37:29 2018 +0200 libfdisk: fix printf format modifier libfdisk/src/script.c: In function ‘fdisk_script_read_context’: libfdisk/src/script.c:452:33: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 4 has type ‘long unsigned int’ [-Werror=format=] snprintf(buf, sizeof(buf), "%zu", fdisk_get_grain_size(cxt)); ^ Signed-off-by: Ruediger Meier libfdisk/src/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5e3a87cdb4ab47fd2ce9c4eb4dd3ca29af4bd36 Author: Ruediger Meier Date: Wed Sep 26 00:37:28 2018 +0200 libfdisk: fix OSX compiler warning libfdisk/src/context.c:1354:54: error: unused parameter 'cxt' [-Werror,-Wunused-parameter] const char *fdisk_get_devmodel(struct fdisk_context *cxt) Signed-off-by: Ruediger Meier libfdisk/src/context.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c0c4feec88a5fc78c527e2cda440231101938be9 Author: Karel Zak Date: Wed Oct 3 17:08:11 2018 +0200 agetty: cleanup code to copy to log strings man utmp: String fields are terminated by a null byte ('\0') if they are shorter than the size of the field. Signed-off-by: Karel Zak term-utils/agetty.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7f76bc8a7557aa835667566aef9c8a2a8b18c2bb Author: Karel Zak Date: Wed Oct 3 17:08:11 2018 +0200 su: cleanup code to copy to log strings man utmp: String fields are terminated by a null byte ('\0') if they are shorter than the size of the field. Signed-off-by: Karel Zak login-utils/su-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ac5c12fdc2230f8decdd930bb9c089d5e1f89236 Author: Karel Zak Date: Wed Oct 3 17:08:11 2018 +0200 login: cleanup code to copy to log strings man utmp: String fields are terminated by a null byte ('\0') if they are shorter than the size of the field. Signed-off-by: Karel Zak login-utils/login.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 561472a40d6793911a59146a41afcc07bfffea24 Author: Karel Zak Date: Wed Oct 3 17:07:37 2018 +0200 mkfs.cramfs: properly copy disk name Signed-off-by: Karel Zak disk-utils/mkfs.cramfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 22fbfdb8f5958586116074e712fd81f4cacd206c Author: Karel Zak Date: Wed Oct 3 17:06:33 2018 +0200 last: make sure domain is zero terminated Signed-off-by: Karel Zak login-utils/last.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 0b6bb91adf7e4c4048d39cfad25c2451da692bbd Author: Karel Zak Date: Wed Oct 3 17:06:12 2018 +0200 wall: make sure line is zero terminated Signed-off-by: Karel Zak term-utils/wall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a338eb4a467e136970c6fc6891f10d80535f8765 Author: Karel Zak Date: Wed Oct 3 17:03:11 2018 +0200 include/c: add str2memcpy() and mem2strcpy() str2memcpy() - copy zero terminated string to optionally terminated buffer mem2strcpy() - copy from buffer to zero terminated string Signed-off-by: Karel Zak include/strutils.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 671295131e7c88e5ea53b5a045e3244da5ff8207 Author: Sevan Janiyan Date: Sat Sep 29 14:49:02 2018 +0100 include/ttyutils: define values if missing. Upstreamed from pkgsrc. Addresses: https://github.com/karelzak/util-linux/pull/695 Signed-off-by: Karel Zak include/ttyutils.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 7d5976f89a256e8fc305649afd13905d352c594b Author: Sevan Janiyan Date: Sat Sep 29 14:50:04 2018 +0100 include/c: add NAME_MAX compat Upstreamed from pkgsrc. Addresses: https://github.com/karelzak/util-linux/pull/695 Signed-off-by: Karel Zak include/c.h | 4 ++++ 1 file changed, 4 insertions(+) commit ef2ce68b1f65f22f86272dc60902f9202380acd9 Author: Karel Zak Date: Wed Oct 3 14:39:57 2018 +0200 lsblk: always use "part" as TYPE for partitions The current code uses "part" or "disk" only if nothing else is possible to recognize. It means for example partitions on loops (or RAIDs, etc) are marked as "loop" rather than "part". Addresses: https://github.com/karelzak/util-linux/issues/700 Signed-off-by: Karel Zak misc-utils/lsblk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f1a7a86d1b29476ab809a55f49bddbe3dcf280db Author: Karel Zak Date: Tue Oct 2 12:50:40 2018 +0200 mount: add note about MS_BIND and _netdev Addresses: https://github.com/karelzak/util-linux/issues/697 Signed-off-by: Karel Zak sys-utils/mount.8 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)