diff options
Diffstat (limited to 'sys-apps/util-linux/files')
8 files changed, 328 insertions, 0 deletions
diff --git a/sys-apps/util-linux/files/crypto-loop.confd b/sys-apps/util-linux/files/crypto-loop.confd new file mode 100644 index 000000000000..6a8843462082 --- /dev/null +++ b/sys-apps/util-linux/files/crypto-loop.confd @@ -0,0 +1,9 @@ +# /etc/conf.d/crypto-loop: Configuration file for /etc/init.d/crypto-loop + +# More info can be found in the init.d script + +# Specify loopback configurations here. The format of this file is +# shown in the following commented-out example. One line per loopback +# configuration. For possible hash values, see `man hashalot`. + +# loop=/dev/loop0 hash='' cipher=serpent keysize=256 device=/dev/system/test other='' diff --git a/sys-apps/util-linux/files/crypto-loop.initd b/sys-apps/util-linux/files/crypto-loop.initd new file mode 100755 index 000000000000..2f6470d6b7bf --- /dev/null +++ b/sys-apps/util-linux/files/crypto-loop.initd @@ -0,0 +1,70 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + if [ -x /etc/init.d/root ]; then + need root + else + need checkroot + fi + need modules + before localmount +} + +start() { + local status="0" + + ebegin "Starting crypto loop devices" + + if [ -e /etc/conf.d/crypto-loop ] ; then + egrep "^loop" /etc/conf.d/crypto-loop | \ + while read loopline ; do + eval ${loopline} + + local configured=$(awk -v MOUNT="${device}" \ + '($2 == MOUNT) { print "yes" }' /proc/mounts) + + if [ "${configured}" != "yes" ] ; then + einfo " Loop ${loop} on device ${device} (cipher ${cipher}, key size ${keysize}): " + + if [ -n "${hash}" ] ; then + /usr/sbin/hashalot -n ${keysize} ${hash} </dev/tty|\ + /sbin/losetup -p 0 -e ${cipher}-${keysize} ${loop} ${device} ${other} + else + /sbin/losetup -e ${cipher}-${keysize} ${loop} ${device} ${other} + fi + + if [ $? -ne 0 ] ; then + ewarn "Failure configuring ${loop}. Skipping." + status=1 + fi + else + ewarn " Loop ${loop} on device ${device} are already configured" + fi + done + fi + ewend ${status} "Failed to start some loop devices." + + # We do not fail if some loop devices did not start ... + return 0 +} + +stop() { + local status="0" + for loop in $(ls /dev/loop[0-9] 2>/dev/null) ; do + losetup ${loop} > /dev/null 2>&1 + if [ $? -eq 0 ] ; then + ( umount ${loop} || swapoff "${loop}" ) >/dev/null 2>&1 + if ! /sbin/losetup -d ${loop} > /dev/null 2>&1; then + ewarn "Failure deconfiguring ${loop}." + status=1 + fi + fi + done + ewend ${status} +} + + +# vim:ts=4 diff --git a/sys-apps/util-linux/files/util-linux-2.24-fix-fdisk-on-alpha.patch b/sys-apps/util-linux/files/util-linux-2.24-fix-fdisk-on-alpha.patch new file mode 100644 index 000000000000..f01a55d6e662 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.24-fix-fdisk-on-alpha.patch @@ -0,0 +1,13 @@ +--- libfdisk/src/bsd.c.orig 2014-06-11 10:15:47.000000000 +0200 ++++ libfdisk/src/bsd.c 2014-06-11 10:16:18.000000000 +0200 +@@ -787,8 +787,10 @@ + case 0x06: /* DOS 16-bit >=32M */ + case 0xe1: /* DOS access */ + case 0xe3: /* DOS R/O */ ++#if !defined (__alpha__) + case 0xf2: /* DOS secondary */ + return BSD_FS_MSDOS; ++#endif + case 0x07: /* OS/2 HPFS */ + return BSD_FS_HPFS; + default: diff --git a/sys-apps/util-linux/files/util-linux-2.24-last-tests.patch b/sys-apps/util-linux/files/util-linux-2.24-last-tests.patch new file mode 100644 index 000000000000..77cf478e398a --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.24-last-tests.patch @@ -0,0 +1,86 @@ +https://bugs.gentoo.org/501408 + +From 3c76515abd2e80dc1da03041eb868b8c1e596fb1 Mon Sep 17 00:00:00 2001 +From: Sami Kerola <kerolasa@iki.fi> +Date: Sun, 16 Feb 2014 23:54:18 +0000 +Subject: [PATCH] tests: align last.1 with recent phantom detection + +None existing account is not still-logged-in but gone mysteriously, +assuming wtmp logout markup is missing. + +Signed-off-by: Sami Kerola <kerolasa@iki.fi> +--- + tests/expected/last/last | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/tests/expected/last/last b/tests/expected/last/last +index 2ff5cc1..dfb140b 100644 +--- a/tests/expected/last/last ++++ b/tests/expected/last/last +@@ -1,6 +1,6 @@ + ~~~ basic output ~~~ + rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14) +-torvalds linux hobby Mon Aug 26 00:57 still logged in ++torvalds linux hobby Mon Aug 26 00:57 gone - no logout + reboot system boot system-name Wed Aug 28 18:00 still running + reboot system boot system-name Wed Aug 28 16:00 - 17:00 (01:00) + IPv4 root dns-server Wed Aug 28 13:00 - 14:00 (01:00) +@@ -17,7 +17,7 @@ accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00) + wtmp begins Wed Aug 28 03:00:00 2013 + ~~~ include system ~~~ + rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14) +-torvalds linux hobby Mon Aug 26 00:57 still logged in ++torvalds linux hobby Mon Aug 26 00:57 gone - no logout + reboot system boot system-name Wed Aug 28 18:00 still running + shutdown system down system-name Wed Aug 28 17:00 - 18:00 (01:00) + reboot system boot system-name Wed Aug 28 16:00 - 17:00 (01:00) +@@ -47,16 +47,16 @@ IPv4 root Wed Aug 28 13:00 - 14:00 (01:00) a.root-servers.net + + wtmp begins Wed Aug 28 03:00:00 2013 + ~~~ show ip ~~~ +-torvalds linux 128.214.205.14 Mon Aug 26 00:57 still logged in ++torvalds linux 128.214.205.14 Mon Aug 26 00:57 gone - no logout + + wtmp begins Wed Aug 28 03:00:00 2013 + ~~~ no host ~~~ +-torvalds linux Mon Aug 26 00:57 still logged in ++torvalds linux Mon Aug 26 00:57 gone - no logout + + wtmp begins Wed Aug 28 03:00:00 2013 + ~~~ full times ~~~ + rick long never-gonna-logo Thu Jan 1 00:00:00 1970 - Tue Jan 19 03:14:07 2038 (24855+03:14) +-torvalds linux hobby Mon Aug 26 00:57:08 1991 still logged in ++torvalds linux hobby Mon Aug 26 00:57:08 1991 gone - no logout + reboot system boot system-name Wed Aug 28 18:00:00 2013 still running + reboot system boot system-name Wed Aug 28 16:00:00 2013 - Wed Aug 28 17:00:00 2013 (01:00) + IPv4 root dns-server Wed Aug 28 13:00:00 2013 - Wed Aug 28 14:00:00 2013 (01:00) +@@ -73,7 +73,7 @@ accounti foo nine Wed Aug 28 03:00:00 2013 - Wed Aug 28 04: + wtmp begins Wed Aug 28 03:00:00 2013 + ~~~ no time ~~~ + rick long never-gonna-logo (24855+03:14) +-torvalds linux hobby logged in ++torvalds linux hobby - no logout + reboot system boot system-name running + reboot system boot system-name (01:00) + IPv4 root dns-server (01:00) +@@ -90,7 +90,7 @@ accounti foo nine (01:00) + wtmp begins Wed Aug 28 03:00:00 2013 + ~~~ iso-8601 time ~~~ + rick long never-gonna-logout 1970-01-01T00:00:00+0000 - 2038-01-19T03:14:07+0000 (24855+03:14) +-torvalds linux hobby 1991-08-26T00:57:08+0000 still logged in ++torvalds linux hobby 1991-08-26T00:57:08+0000 gone - no logout + reboot system boot system-name 2013-08-28T18:00:00+0000 still running + reboot system boot system-name 2013-08-28T16:00:00+0000 - 2013-08-28T17:00:00+0000 (01:00) + IPv4 root dns-server 2013-08-28T13:00:00+0000 - 2013-08-28T14:00:00+0000 (01:00) +@@ -115,7 +115,7 @@ accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00) + wtmp begins Wed Aug 28 03:00:00 2013 + ~~~ present ~~~ + rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14) +-torvalds linux hobby Mon Aug 26 00:57 still logged in ++torvalds linux hobby Mon Aug 26 00:57 gone - no logout + runlevel foo one Wed Aug 28 11:00 - 12:00 (01:00) + + wtmp begins Wed Aug 28 03:00:00 2013 +-- +1.8.5.5 + diff --git a/sys-apps/util-linux/files/util-linux-2.24-skip-last-tests.patch b/sys-apps/util-linux/files/util-linux-2.24-skip-last-tests.patch new file mode 100644 index 000000000000..5148053d27e3 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.24-skip-last-tests.patch @@ -0,0 +1,41 @@ +From 6b55612b9ad1193a042f3c3a1d9216e63b0d2907 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Sun, 22 Dec 2013 18:17:15 -0500 +Subject: [PATCH] tests: last: skip when last is not enabled + +References: https://bugs.gentoo.org/489794 +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + tests/ts/last/ipv6 | 2 ++ + tests/ts/last/last | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/tests/ts/last/ipv6 b/tests/ts/last/ipv6 +index 8e2b01e..60b72bd 100755 +--- a/tests/ts/last/ipv6 ++++ b/tests/ts/last/ipv6 +@@ -18,6 +18,8 @@ TS_DESC="last ipv6" + . $TS_TOPDIR/functions.sh + ts_init "$*" + ++[ -x $TS_CMD_LAST ] || ts_skip "last not enabled" ++ + export LANG=C + export TZ=GMT + +diff --git a/tests/ts/last/last b/tests/ts/last/last +index 4ad38cb..83b7f8d 100755 +--- a/tests/ts/last/last ++++ b/tests/ts/last/last +@@ -18,6 +18,8 @@ TS_DESC="last" + . $TS_TOPDIR/functions.sh + ts_init "$*" + ++[ -x $TS_CMD_LAST ] || ts_skip "last not enabled" ++ + export LANG=C + export TZ=GMT + +-- +1.8.4.3 + diff --git a/sys-apps/util-linux/files/util-linux-2.25-parallel-setarch.patch b/sys-apps/util-linux/files/util-linux-2.25-parallel-setarch.patch new file mode 100644 index 000000000000..e694af548575 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.25-parallel-setarch.patch @@ -0,0 +1,33 @@ +From 762b4d8691c46964dfc0d40dab772191538c807a Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@chromium.org> +Date: Sun, 3 May 2015 23:37:04 -0400 +Subject: [PATCH] build-sys: fix parallel builds w/setarch links + +The symlink generation tries to write to the sys-utils/ subdir but does +not make sure that dir exists. This can sometimes lead to parallel build +failures when building out-of-tree like: +... +echo ".so man8/setarch.8" > sys-utils/linux64.8 +/bin/bash: sys-utils/linux64.8: No such file or directory +Makefile:11503: recipe for target 'sys-utils/linux64.8' failed +make: *** [sys-utils/linux64.8] Error 1 + +URL: https://bugs.gentoo.org/511812 +Signed-off-by: Mike Frysinger <vapier@chromium.org> +--- + sys-utils/Makemodule.am | 1 + + 1 file changed, 1 insertion(+) + +--- a/Makefile.in ++++ b/Makefile.in +@@ -10806,6 +10806,7 @@ install-exec-hook: + @BUILD_VIPW_TRUE@ cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr + + @BUILD_SETARCH_TRUE@$(SETARCH_MAN_LINKS): ++@BUILD_SETARCH_TRUE@ $(AM_V_at) test -d $(dir $@) || mkdir -p $(dir $@) + @BUILD_SETARCH_TRUE@ $(AM_V_GEN)echo ".so man8/setarch.8" > $@ + + @BUILD_SETARCH_TRUE@install-exec-hook-setarch: +-- +2.4.0 + diff --git a/sys-apps/util-linux/files/util-linux-2.25.1-blkid-probe-fix.patch b/sys-apps/util-linux/files/util-linux-2.25.1-blkid-probe-fix.patch new file mode 100644 index 000000000000..f994a74a6696 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.25.1-blkid-probe-fix.patch @@ -0,0 +1,43 @@ +From 00749bc366fe6106df918660a92a388cfff4f35f Mon Sep 17 00:00:00 2001 +From: Karel Zak <kzak@redhat.com> +Date: Tue, 7 Oct 2014 12:44:34 +0200 +Subject: [PATCH] libblkid: zeroize errno on blkid_probe_get_buffer() success + +Since 37f4060225df0591ab8e1dd676dbc8115d900d4f prober functions are +sensitive to errno, it seems more robust to set errno=0 with in +blkid_probe_get_buffer() on success than set the zero on all places +where we call blkid_probe_get_buffer(). + +Addresses: https://github.com/karelzak/util-linux/issues/119 +Signed-off-by: Karel Zak <kzak@redhat.com> +--- + libblkid/src/probe.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c +index 4fea3cc..3f7e43b 100644 +--- a/libblkid/src/probe.c ++++ b/libblkid/src/probe.c +@@ -539,8 +539,10 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr, + struct list_head *p; + struct blkid_bufinfo *bf = NULL; + +- if (pr->size <= 0) ++ if (pr->size <= 0) { ++ errno = EINVAL; + return NULL; ++ } + + if (pr->parent && + pr->parent->devno == pr->devno && +@@ -602,6 +604,7 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr, + list_add_tail(&bf->bufs, &pr->buffers); + } + ++ errno = 0; + return off ? bf->data + (off - bf->off) : bf->data; + } + +-- +2.1.2 + diff --git a/sys-apps/util-linux/files/util-linux-2.25.2-runuser-bash-completion.patch b/sys-apps/util-linux/files/util-linux-2.25.2-runuser-bash-completion.patch new file mode 100644 index 000000000000..85c48114dbd2 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.25.2-runuser-bash-completion.patch @@ -0,0 +1,33 @@ +https://bugs.gentoo.org/522288 + +From a95987423c4d7781a14ffda34f082086cd51f4f7 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Fri, 24 Oct 2014 12:08:22 -0400 +Subject: [PATCH] bash-completion: fix runuser install + +The runuser symlink used to depend on su being enabled, but a refactoring +broke that. So if you build with runuser enabled but not su, you end up +with a broken symlink. Rework the logic so it works in both cases. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + bash-completion/Makemodule.am | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/bash-completion/Makemodule.am b/bash-completion/Makemodule.am +index 271a6db..045c2d5 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -11071,7 +10823,8 @@ + @BUILD_MOUNT_TRUE@@MAKEINSTALL_DO_SETUID_TRUE@ chmod 4755 $(DESTDIR)$(bindir)/umount + + @BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@install-data-hook-bashcomp-runuser:: +-@BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@ ln -sf su $(DESTDIR)$(bashcompletiondir)/runuser ++@BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@@BUILD_SU_TRUE@ ln -sf su $(DESTDIR)$(bashcompletiondir)/runuser ++@BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@@BUILD_SU_FALSE@ cp $(top_srcdir)/bash-completion/su $(DESTDIR)$(bashcompletiondir)/runuser + + clean-local-tests: + rm -rf $(top_builddir)/tests/output $(top_builddir)/tests/diff +-- +2.1.2 + |