Compare commits

..

3 Commits
rawhide ... f27

Author SHA1 Message Date
Karel Zak cafc6d2e51 2.30.2-3: fix #1560283 2018-03-27 11:38:27 +02:00
Karel Zak 05aae355d4 increment release number 2018-03-08 10:36:47 +01:00
Karel Zak 2d9903e743 2.30.2-2: fix #1552641 2018-03-08 10:34:16 +01:00
19 changed files with 422 additions and 734 deletions

31
.gitignore vendored
View File

@ -59,34 +59,3 @@
/util-linux-2.30.tar.xz
/util-linux-2.30.1.tar.xz
/util-linux-2.30.2.tar.xz
/util-linux-2.31-rc1.tar.xz
/util-linux-2.31-rc2.tar.xz
/util-linux-2.31.tar.xz
/util-linux-2.32-rc1.tar.xz
/util-linux-2.32.tar.xz
/util-linux-2.32.1.tar.xz
/util-linux-2.33-rc2.tar.xz
/util-linux-2.33.1.tar.xz
/util-linux-2.33.2.tar.xz
/util-linux-2.34-rc1.tar.xz
/util-linux-2.34-rc2.tar.xz
/util-linux-2.34.tar.xz
/util-linux-2.35-rc1.tar.xz
/util-linux-2.35-rc1-20-63f8.tar.xz
/util-linux-2.35-rc2.tar.xz
/util-linux-2.35.tar.xz
/util-linux-2.35.1.tar.xz
/util-linux-2.35.2.tar.xz
/util-linux-2.36.tar.xz
/util-linux-2.36.1.tar.xz
/util-linux-2.36.2.tar.xz
/util-linux-2.37-rc2.tar.xz
/util-linux-2.37.tar.xz
/util-linux-2.37.2.tar.xz
/util-linux-2.38-rc1.tar.xz
/util-linux-2.38-rc3.tar.xz
/util-linux-2.38.tar.xz
/util-linux-2.38.1.tar.xz
/util-linux-2.39-rc1.tar.xz
/util-linux-2.39-rc2.tar.xz
/util-linux-2.39-rc3.tar.xz

View File

@ -0,0 +1,44 @@
From 75f03badd7ed9f1dd951863d75e756883d3acc55 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 16 Nov 2017 16:27:32 +0100
Subject: [PATCH] bash-completion: (umount) use findmnt, escape a space in
paths
# mount /dev/sdc1 /mnt/test/foo\ bar
# umount <tab>
has to return "/mnt/test/foo\ bar".
Changes:
* don't use mount | awk output, we have findmnt
* force compgen use \n as entries separator
Addresses: https://github.com/karelzak/util-linux/issues/539
Signed-off-by: Karel Zak <kzak@redhat.com>
---
bash-completion/umount | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/bash-completion/umount b/bash-completion/umount
index d76cb9fff..98c90d61a 100644
--- a/bash-completion/umount
+++ b/bash-completion/umount
@@ -40,9 +40,10 @@ _umount_module()
return 0
;;
esac
- local DEVS_MPOINTS
- DEVS_MPOINTS="$(mount | awk '{print $1, $3}')"
- COMPREPLY=( $(compgen -W "$DEVS_MPOINTS" -- $cur) )
- return 0
+
+ local oldifs=$IFS
+ IFS=$'\n'
+ COMPREPLY=( $( compgen -W '$(findmnt -lno TARGET | sed "s/\([[:blank:]]\)/\\\\\1/g")' -- "$cur" ) )
+ IFS=$oldifs
}
complete -F _umount_module umount
--
2.14.3

13
2.27-blkid-zfs-raid.patch Normal file
View File

@ -0,0 +1,13 @@
diff -up util-linux-2.27.1/libblkid/src/probe.c.kzak util-linux-2.27.1/libblkid/src/probe.c
diff -up util-linux-2.27.1/libblkid/src/superblocks/zfs.c.kzak util-linux-2.27.1/libblkid/src/superblocks/zfs.c
--- util-linux-2.27.1/libblkid/src/superblocks/zfs.c.kzak 2015-11-02 10:07:34.567648465 +0100
+++ util-linux-2.27.1/libblkid/src/superblocks/zfs.c 2015-11-18 12:13:32.716188023 +0100
@@ -258,7 +258,7 @@ static int probe_zfs(blkid_probe pr, con
const struct blkid_idinfo zfs_idinfo =
{
.name = "zfs_member",
- .usage = BLKID_USAGE_RAID,
+ .usage = BLKID_USAGE_FILESYSTEM,
.probefunc = probe_zfs,
.minsz = 64 * 1024 * 1024,
.magics = BLKID_NONE_MAGIC

34
2.28-libblkid-cdrom.patch Normal file
View File

@ -0,0 +1,34 @@
From 55ad13c26fe5d0e606be5a83937f31b8cf576588 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 28 Apr 2016 13:54:01 +0200
Subject: [PATCH] libblkid: make I/O errors on CDROMs non-fatal
It seems too tricky to get a real size of the data track on hybrid
disks with audio+data. It seems overkill to analyze all header in
libblkid and on some disks it's probably possible to get I/O error
almost everywhere due to crazy copy protection etc.
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 63baed3..5d9f701 100644
--- a/libblkid/src/probe.c
+++ b/libblkid/src/probe.c
@@ -615,7 +615,10 @@ static struct blkid_bufinfo *read_buffer(blkid_probe pr, uint64_t real_off, uint
if (ret != (ssize_t) len) {
DBG(LOWPROBE, ul_debug("\tread failed: %m"));
free(bf);
- if (ret >= 0)
+
+ /* I/O errors on CDROMs are non-fatal to work with hybrid
+ * audio+data disks */
+ if (ret >= 0 || blkid_probe_is_cdrom(pr))
errno = 0;
return NULL;
}
--
2.4.11

View File

@ -0,0 +1,12 @@
diff -up util-linux-2.28/login-utils/login.c.kzak util-linux-2.28/login-utils/login.c
--- util-linux-2.28/login-utils/login.c.kzak 2016-03-08 14:28:16.724156218 +0100
+++ util-linux-2.28/login-utils/login.c 2016-04-26 12:45:29.235326017 +0200
@@ -510,7 +510,7 @@ static void log_lastlog(struct login_con
sa.sa_handler = SIG_IGN;
sigaction(SIGXFSZ, &sa, &oldsa_xfsz);
- fd = open(_PATH_LASTLOG, O_RDWR, 0);
+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
if (fd < 0)
goto done;

View File

@ -1,2 +0,0 @@
0.0 0 0.0
0

View File

@ -0,0 +1,32 @@
From 5b6fa6063990017f3384476537106caa9e3f5867 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Tue, 27 Mar 2018 10:40:13 +0200
Subject: [PATCH] column: fix leading space characters bug
The bug has been introduced during column(1) rewrite. The function
read_input() need to skip leading space only temporary to detect empty
lines, but the rest of the code has to use the original buffer (line).
Addresses: https://github.com/karelzak/util-linux/issues/575
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283
Signed-off-by: Karel Zak <kzak@redhat.com>
---
text-utils/column.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/text-utils/column.c b/text-utils/column.c
index 5eb0de1ae..d6a6385e3 100644
--- a/text-utils/column.c
+++ b/text-utils/column.c
@@ -452,7 +452,7 @@ static int read_input(struct column_control *ctl, FILE *fp)
if (!str || !*str)
continue;
- wcs = mbs_to_wcs(str);
+ wcs = mbs_to_wcs(buf);
if (!wcs)
err(EXIT_FAILURE, _("read failed"));
--
2.14.3

13
libblkid-minix.patch Normal file
View File

@ -0,0 +1,13 @@
diff -up util-linux-2.27.1/libblkid/src/superblocks/minix.c.kzak util-linux-2.27.1/libblkid/src/superblocks/minix.c
--- util-linux-2.27.1/libblkid/src/superblocks/minix.c.kzak 2016-01-18 15:02:05.493738910 +0100
+++ util-linux-2.27.1/libblkid/src/superblocks/minix.c 2016-01-18 15:04:20.020773281 +0100
@@ -90,7 +90,8 @@ static int probe_minix(blkid_probe pr, c
struct minix_super_block *sb = (struct minix_super_block *) data;
int zones, ninodes, imaps, zmaps, firstz;
- if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0)
+ if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0 ||
+ sb->s_log_zone_size != 0)
return 1;
zones = version == 2 ? minix_swab32(swabme, sb->s_zones) :

View File

@ -1,13 +0,0 @@
diff --git a/include/pathnames.h b/include/pathnames.h
index 3845d4c33..fac3a0783 100644
--- a/include/pathnames.h
+++ b/include/pathnames.h
@@ -41,7 +41,7 @@
#ifndef _PATH_MAILDIR
# define _PATH_MAILDIR "/var/spool/mail"
#endif
-#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd"
+#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d"
#ifndef _PATH_NOLOGIN
# define _PATH_NOLOGIN "/etc/nologin"
#endif

View File

@ -1,12 +0,0 @@
diff -up util-linux-2.36/login-utils/login.c.kzak util-linux-2.36/login-utils/login.c
--- util-linux-2.36/login-utils/login.c.kzak 2020-07-23 14:13:26.777030764 +0200
+++ util-linux-2.36/login-utils/login.c 2020-07-23 14:11:22.793686983 +0200
@@ -585,7 +585,7 @@ static void log_lastlog(struct login_con
sa.sa_handler = SIG_IGN;
sigaction(SIGXFSZ, &sa, &oldsa_xfsz);
- fd = open(_PATH_LASTLOG, O_RDWR, 0);
+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
if (fd < 0)
goto done;
offset = cxt->pwd->pw_uid * sizeof(ll);

View File

@ -1 +1 @@
SHA512 (util-linux-2.39-rc3.tar.xz) = 8a93d32a5ceb38d50a4b2c8bfa48bcab7ec9b758c89b5a1a4f7fd74558dce37385bd7ea203345148d4389de4ea60ec42058f9d7889a8075d3e616773d085427e
SHA512 (util-linux-2.30.2.tar.xz) = b92ec16d5e8a405ad9ebbac8673bb49c5bf0a7f630118477f12c7a3c6b3b3ee5d56868632dd71fffd5c0434821207c2769f6859b9d398c2df770ec6487d7c32d

View File

@ -1,13 +0,0 @@
# Test which run in classic and docker environemnt
- hosts: localhost
tags:
- classic
- container
- atomic
roles:
- role: standard-test-beakerlib
tests:
- various
required_packages:
- util-linux
- util-linux-user

View File

@ -1,64 +0,0 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/util-linux/various
# Description: This test groups small sanity and regression tests for util-linux
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/util-linux/Sanity/various
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Miroslav Vadkerti <mvadkert@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: This test groups small sanity and regression tests for util-linux" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: util-linux" >> $(METADATA)
@echo "Requires: util-linux util-linux-user" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL3 -RHEL4 -RHEL5Server -RHEL5Client -RHEL6" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -1,3 +0,0 @@
PURPOSE of /CoreOS/util-linux/various
Description: This test groups small sanity and regression tests for util-linux
Author: Miroslav Vadkerti <mvadkert@redhat.com>

View File

@ -1,52 +0,0 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/util-linux/various
# Description: This test groups small sanity and regression tests for util-linux
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
#. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="util-linux"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlPhaseEnd
rlPhaseStartTest "return code of chfn should be always 1 in case failure"
rlRun "chfn -f a:b" 1
rlRun "chfn -o a:b" 1
rlRun "chfn -p a:b" 1
rlRun "chfn -h a:b" 1
rlRun "chfn -x a:b" 1
rlRun "chfn -f a -o b -p c -h d unknown-user" 1
rlPhaseEnd
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

8
util-linux-60-raw.rules Normal file
View File

@ -0,0 +1,8 @@
#
# Enter raw device bindings here.
#
# An example would be:
# ACTION=="add", KERNEL=="sda", RUN+="/usr/bin/raw /dev/raw/raw1 %N"
# to bind /dev/raw/raw1 to /dev/sda, or
# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/usr/bin/raw /dev/raw/raw2 %M %m"
# to bind /dev/raw/raw2 to the device with major 8, minor 1.

View File

@ -7,6 +7,7 @@ password include system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_loginuid.so
session optional pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open
session required pam_namespace.so

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
d /run/uuidd 2775 uuidd uuidd