1
0
forked from pool/util-linux

Accepting request 421062 from Base:System

1

OBS-URL: https://build.opensuse.org/request/show/421062
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=211
This commit is contained in:
Dominique Leuenberger 2016-08-25 07:49:40 +00:00 committed by Git OBS Bridge
parent bb2d671521
commit fa803efda4
11 changed files with 72 additions and 158 deletions

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de
- Update to version 2.28.1, bugfix release, see
ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes
- Remove util-linux-libblkid-wipe-offset.patch (upstream)
- use the new configure option --enable-libuuid-force-uuidd
instead of sed'ing configure.ac
-------------------------------------------------------------------
Thu Aug 11 10:21:35 UTC 2016 - olaf@aepfle.de
- Install klogconsole with read permissions (bnc#990837)
-------------------------------------------------------------------
Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org

View File

@ -69,7 +69,7 @@ Name: python-libmount
%endif
Summary: %main_summary
License: GPL-2.0+
Group: %group_pl
Group: %main_group
BuildRequires: audit-devel
BuildRequires: bc
BuildRequires: binutils-devel
@ -113,7 +113,7 @@ BuildRequires: libmount-devel
%endif
%endif
#END SECOND STAGE DEPENDENCIES
Version: 2.28
Version: 2.28.1
Release: 0
# util-linux is a base package and uuidd pre-requiring pwdutils pulls
# that into the core build cycle. pwdutils also pulls in the whole
@ -150,8 +150,6 @@ Source51: blkid.conf
##
## util-linux patches
##
# PATCH-FIX-UPSTREAM util-linux-libblkid-wipe-offset.patch bsc976141 sbrabec@suse.com -- blkid: Wipe corect area for probes with offset
Patch: util-linux-libblkid-wipe-offset.patch
# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path
Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -374,7 +372,6 @@ SMP systems.
%if %build_util_linux
%package -n python-libmount
Summary: %summary_pl
License: GPL-2.0+
Group: %group_pl
%description -n python-libmount
@ -387,20 +384,12 @@ library.
%endif
%prep
%setup -q -n %{_name}-%{version} -b 40
%patch -p1
%patch4 -p1
#
# setctsid
cp -p %{S:22} %{S:23} .
%build
#BEGIN CONFIG ALTER
%if !%build_util_linux_systemd
# We are not building util_linux_systemd => we are not building uuidd
# But we want libuuid with support of uuidd. The default configure disables it as well.
sed -i '/^AM_CONDITIONAL.*BUILD_UUIDD/a AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.])' configure.ac
%endif
#END CONFIG ALTER
%if %build_util_linux
pushd ../klogconsole
# klogconsole build
@ -536,6 +525,7 @@ AUTOPOINT=true autoreconf -vfi
--with-bashcompletiondir=%{_datadir}/bash-completion/completions \
--with-systemdsystemunitdir=%{_unitdir} \
--enable-libmount-force-mountinfo \
--enable-libuuid-force-uuidd \
--enable-sulogin-emergency-mount \
--disable-use-tty-group \
--enable-static \
@ -1166,7 +1156,7 @@ fi
/sbin/hwclock
#EndUsrMerge
%{_sbindir}/hwclock
%{_sbindir}/klogconsole
%attr(744,root,root) %{_sbindir}/klogconsole
%{_bindir}/setterm
%{_sbindir}/tunelp
%{_mandir}/man8/fdformat.8.gz

View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJXrEyGAAoJEOS3HV7sOcKEe/wP/2TjUsaBeKZ9IMJlhQdLYzE3
8SlTmPM4t9vxTaHEVhTitPq/inXqW2PnjiCaDKl8okJFgcgbZzYK8lnWflbUMthb
is5fIACqctMbYmK+iGVeksiRBgxpow6Voe/aqMDtpUxPB9sl09GOn8EP3Oc4Plnj
YPyx/XYrA83xDPa6AljJT1KlPYiPZltldEhxRFSLSEYtO/CMANhmi/uCuSnwrpFb
H5CeJcWw0EqrxNphNrP8J8mfb4q8+YATsW/kHKxOgJNDXI+ELNbgltMmM11ySazA
ifxvX4M5zdoJH/DUqmKwH4XLmbVThbswJ1IJ+jKCjNbTzMyfFg/ox/aNjMXC88sk
9aRazTMN1rBbWUzuWlSr7wu+G2ZgKmwOpPZUgPWCg61b2TAPaGxbgc6JSym5arJP
vN47bsKIX/k18TGrILSV96FB4SF5s8ULDUxBHzb5+y3MSbI6VeZLEGAQGz1ZLYlG
hyQrkzzdqK4jzpib5QecdW/EfSgHxefEIvNBrKvd49oRR3DqNW97qKI/FkeQY2iF
KRKseiXKOZZRTu/kJU+6ON4gNzb4/+MaAWeHgFcnEpjsaUEFjh/UkOnvMaKCu63X
KZLDe5PgdtBbefGFTcgqfPA+qil/L9loBlw1JuisXW7pKivlnagyunaOxI41uvog
Uvy0L6lQChHdCK3mRzQU
=o4w8
-----END PGP SIGNATURE-----

3
util-linux-2.28.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3ece4ea4a34ef786b68f5c415e848390424232abd1ee00f7ee5bddc30657b60f
size 4157892

View File

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJXDNKPAAoJEOS3HV7sOcKEHo0P/RpIujRPSYGgh6kYObPjAoNY
fO/TJ6NeWMb5QcXbITH4dl9C+LoF9HXXZMG4lNsSckqT0OKoIjblFMs3QpqxLIVT
WOJbMktrrop5faJwixeEnWqtfRHBBtjdiTcLj5PMzajwijeYNIOyDx6uIr7UnGtF
v8DbxXFCZByTQvNRvibrXPk9FB/yushqOKakUrrNmrlwokDWHK5Ds8ZtqfSkNrMS
RZxRpAkpE4C3RYjttVJCkOqaH2B7Utxa03jxQN8UDxSvsXikvHFi5GDa1RZxRdOg
jwpZm8aUxSlb5EITSoioWqikVUQRCpErBZr+yFAt6VGAo8460rlTVb1OjqkTixHR
2QVRFLCATeUfHaWBi5Gnz29JUWnMykbsmOW8ZiLpEOL3KHr+0/s6N5e9x4xiFiE+
fywoo+NlvbarM53cSXW6GZjazGQOqtGuEijyn29hoMwxuOyzF83pvFnZonbgessF
2UB+edl9Ppz4PCt2xqDaP55fXwk9rtO7Vqbd8xOImbrVjQF3+9EoY3H4I0QxnhV3
XbozEYyc/9IyCapW7KBMyYD+dkWWu8bTVMK4JATWSR3F33Sl3a4e4GMmWB89n8Bs
fA/nj3lGvnApbvESR45os9gLx701Pbatvv4PITWKMuMsPi/FSBRlAYkc/Uznf2Fc
9BS4IkThuR4m+oIKyTNL
=VNvh
-----END PGP SIGNATURE-----

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:395847e2a18a2c317170f238892751e73a57104565344f8644090c8b091014bb
size 4119560

View File

@ -1,100 +0,0 @@
From 445e6b1ec82642a298419bdd18a81110593bfbaa Mon Sep 17 00:00:00 2001
From: Petr Uzel <petr.uzel@suse.cz>
Date: Mon, 18 Apr 2016 16:22:05 +0200
Subject: [PATCH] libblkid: make blkid_do_wipe() work with probes with offset
When a probe is created with an offset, e.g. via
blkid_probe_set_device(), this offset is correctly used when looking for
the signatures, but is not respected by blkid_do_wipe() function.
Therefore the signature is removed from an invalid location.
Usecase: Wiping signatures from an area on the block device where
partition is to be created (but as it does not exist yet, there's no
device node for it and probe on the whole block device has to be used
with correct offset and length).
Reproducer:
======================== wiper.c ===========================
const char *dev;
unsigned long offset;
unsigned long size;
int main(int argc, char** argv) {
if (argc != 4) {
printf("usage: wiper dev offset size\n");
exit(1);
}
dev = argv[1];
offset = strtoull(argv[2], NULL, 10);
size = strtoull(argv[3], NULL, 10);
printf("dev=%s, off=%llu, size=%llu\n", dev, offset, size);
int fd = open (dev, O_RDWR);
if (fd == -1) {
perror("open");
exit(1);
}
blkid_loff_t wipe_offset = offset * SECTOR_SIZE;
blkid_loff_t wipe_size = size * SECTOR_SIZE;
int ret;
blkid_probe pr;
pr = blkid_new_probe();
if (!pr)
return 0;
ret = blkid_probe_set_device(pr, fd, wipe_offset, wipe_size);
ret = blkid_probe_enable_superblocks(pr, 1);
ret = blkid_probe_set_superblocks_flags(pr, BLKID_SUBLKS_MAGIC);
while (blkid_do_probe(pr) == 0) {
ret = blkid_do_wipe(pr, 0);
}
blkid_free_probe(pr);
close(fd);
}
======================== wiper.c ===========================
Steps to reproduce:
modprobe scsi_debug
parted -s /dev/sdX mklabel gpt
parted -s /dev/sdX mkpart first 2048s 4095s
mkfs.ext2 /dev/sdX1
wipefs -np /dev/sdX1
./wiper /dev/sdX1 2048 2048
Actual result: wiper gets into endless loop, because
blkid_do_wipe() wipes at wrong location (1080), leaving the signature
on /dev/sdc1. So it is again found by blkid_do_probe(), and so on.
Expected result: wiper clears the ext2 signature at offset 1049656(=1080+2048*512).
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
---
libblkid/src/probe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c
index 34d97b8..0c8625c 100644
--- a/libblkid/src/probe.c
+++ b/libblkid/src/probe.c
@@ -1121,7 +1121,7 @@ int blkid_do_wipe(blkid_probe pr, int dryrun)
if (rc || len == 0 || off == NULL)
return 0;
- offset = strtoumax(off, NULL, 10);
+ offset = strtoumax(off, NULL, 10) + pr->off;
fd = blkid_probe_get_fd(pr);
if (fd < 0)
return -1;
--
2.8.1

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de
- Update to version 2.28.1, bugfix release, see
ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes
- Remove util-linux-libblkid-wipe-offset.patch (upstream)
- use the new configure option --enable-libuuid-force-uuidd
instead of sed'ing configure.ac
-------------------------------------------------------------------
Thu Aug 11 10:21:35 UTC 2016 - olaf@aepfle.de
- Install klogconsole with read permissions (bnc#990837)
-------------------------------------------------------------------
Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org

View File

@ -113,7 +113,7 @@ BuildRequires: libmount-devel
%endif
%endif
#END SECOND STAGE DEPENDENCIES
Version: 2.28
Version: 2.28.1
Release: 0
# util-linux is a base package and uuidd pre-requiring pwdutils pulls
# that into the core build cycle. pwdutils also pulls in the whole
@ -150,8 +150,6 @@ Source51: blkid.conf
##
## util-linux patches
##
# PATCH-FIX-UPSTREAM util-linux-libblkid-wipe-offset.patch bsc976141 sbrabec@suse.com -- blkid: Wipe corect area for probes with offset
Patch: util-linux-libblkid-wipe-offset.patch
# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path
Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -386,20 +384,12 @@ library.
%endif
%prep
%setup -q -n %{_name}-%{version} -b 40
%patch -p1
%patch4 -p1
#
# setctsid
cp -p %{S:22} %{S:23} .
%build
#BEGIN CONFIG ALTER
%if !%build_util_linux_systemd
# We are not building util_linux_systemd => we are not building uuidd
# But we want libuuid with support of uuidd. The default configure disables it as well.
sed -i '/^AM_CONDITIONAL.*BUILD_UUIDD/a AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.])' configure.ac
%endif
#END CONFIG ALTER
%if %build_util_linux
pushd ../klogconsole
# klogconsole build
@ -535,6 +525,7 @@ AUTOPOINT=true autoreconf -vfi
--with-bashcompletiondir=%{_datadir}/bash-completion/completions \
--with-systemdsystemunitdir=%{_unitdir} \
--enable-libmount-force-mountinfo \
--enable-libuuid-force-uuidd \
--enable-sulogin-emergency-mount \
--disable-use-tty-group \
--enable-static \
@ -1165,7 +1156,7 @@ fi
/sbin/hwclock
#EndUsrMerge
%{_sbindir}/hwclock
%{_sbindir}/klogconsole
%attr(744,root,root) %{_sbindir}/klogconsole
%{_bindir}/setterm
%{_sbindir}/tunelp
%{_mandir}/man8/fdformat.8.gz

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Thu Aug 11 13:24:34 UTC 2016 - sweet_f_a@gmx.de
- Update to version 2.28.1, bugfix release, see
ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.28/v2.28.1-ReleaseNotes
- Remove util-linux-libblkid-wipe-offset.patch (upstream)
- use the new configure option --enable-libuuid-force-uuidd
instead of sed'ing configure.ac
-------------------------------------------------------------------
Thu Aug 11 10:21:35 UTC 2016 - olaf@aepfle.de
- Install klogconsole with read permissions (bnc#990837)
-------------------------------------------------------------------
Mon Jul 11 07:29:18 UTC 2016 - dimstar@opensuse.org

View File

@ -113,7 +113,7 @@ BuildRequires: libmount-devel
%endif
%endif
#END SECOND STAGE DEPENDENCIES
Version: 2.28
Version: 2.28.1
Release: 0
# util-linux is a base package and uuidd pre-requiring pwdutils pulls
# that into the core build cycle. pwdutils also pulls in the whole
@ -150,8 +150,6 @@ Source51: blkid.conf
##
## util-linux patches
##
# PATCH-FIX-UPSTREAM util-linux-libblkid-wipe-offset.patch bsc976141 sbrabec@suse.com -- blkid: Wipe corect area for probes with offset
Patch: util-linux-libblkid-wipe-offset.patch
# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path
Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -386,20 +384,12 @@ library.
%endif
%prep
%setup -q -n %{_name}-%{version} -b 40
%patch -p1
%patch4 -p1
#
# setctsid
cp -p %{S:22} %{S:23} .
%build
#BEGIN CONFIG ALTER
%if !%build_util_linux_systemd
# We are not building util_linux_systemd => we are not building uuidd
# But we want libuuid with support of uuidd. The default configure disables it as well.
sed -i '/^AM_CONDITIONAL.*BUILD_UUIDD/a AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.])' configure.ac
%endif
#END CONFIG ALTER
%if %build_util_linux
pushd ../klogconsole
# klogconsole build
@ -535,6 +525,7 @@ AUTOPOINT=true autoreconf -vfi
--with-bashcompletiondir=%{_datadir}/bash-completion/completions \
--with-systemdsystemunitdir=%{_unitdir} \
--enable-libmount-force-mountinfo \
--enable-libuuid-force-uuidd \
--enable-sulogin-emergency-mount \
--disable-use-tty-group \
--enable-static \
@ -1165,7 +1156,7 @@ fi
/sbin/hwclock
#EndUsrMerge
%{_sbindir}/hwclock
%{_sbindir}/klogconsole
%attr(744,root,root) %{_sbindir}/klogconsole
%{_bindir}/setterm
%{_sbindir}/tunelp
%{_mandir}/man8/fdformat.8.gz