forked from pool/util-linux
Accepting request 397533 from Base:System
1 OBS-URL: https://build.opensuse.org/request/show/397533 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=208
This commit is contained in:
parent
d99f4cb47e
commit
8f8f70a3a0
@ -1,3 +1,31 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com
|
||||
|
||||
- blkid: Wipe corect area for probes with offset (bsc#976141,
|
||||
util-linux-libblkid-wipe-offset.patch).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 26 18:24:40 CEST 2016 - sbrabec@suse.com
|
||||
|
||||
- Remove incorrect --with-bashcompletiondir that breaks
|
||||
bash-completion, use path in bash-completion.pc instead
|
||||
(boo#977259).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 22 16:41:34 CEST 2016 - sbrabec@suse.com
|
||||
|
||||
- Add librtas-devel to BuildRequires on Power platforms. Needed for
|
||||
proper function of lscpu (bsc#975082).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de
|
||||
|
||||
- fix build for openSUSE >= 13.1 (inclusive SLE 12)
|
||||
- drop build for openSUSE < 13.1
|
||||
- remove old build conditions: sysvinit_tools, enable_su and
|
||||
enable_eject
|
||||
- cosmetics: reorder configure options
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de
|
||||
|
||||
|
@ -16,9 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without sysvinit_tools
|
||||
%bcond_without enable_su
|
||||
%bcond_without enable_eject
|
||||
%bcond_without enable_last
|
||||
|
||||
Name: python-libmount
|
||||
@ -78,6 +75,7 @@ Summary: %main_summary
|
||||
License: GPL-2.0+
|
||||
Group: %main_group
|
||||
BuildRequires: audit-devel
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: bc
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: fdupes
|
||||
@ -92,19 +90,18 @@ BuildRequires: pkg-config
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: utempter-devel
|
||||
BuildRequires: zlib-devel
|
||||
%ifarch ppc ppc64 ppc64le
|
||||
BuildRequires: librtas-devel
|
||||
%endif
|
||||
%if %verify_sig
|
||||
BuildRequires: gpg-offline
|
||||
%endif
|
||||
%if %build_util_linux_systemd
|
||||
BuildRequires: socat
|
||||
%if 0%{?suse_version} <= 1230
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%else
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: pkgconfig(libsystemd-daemon)
|
||||
BuildRequires: pkgconfig(libsystemd-journal)
|
||||
%endif
|
||||
%endif
|
||||
%if %build_python_libmount
|
||||
BuildRequires: python-devel
|
||||
%endif
|
||||
@ -158,6 +155,8 @@ 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
|
||||
@ -170,25 +169,19 @@ Provides: util-linux(fake+no-canonicalize)
|
||||
PreReq: %install_info_prereq permissions
|
||||
PreReq: %insserv_prereq %fillup_prereq /bin/sed
|
||||
Recommends: %{name}-lang = %{version}
|
||||
%if %{with enable_eject}
|
||||
Provides: eject = 2.1.0-166.8
|
||||
%endif
|
||||
Provides: login = 4.0-33.7
|
||||
%if %{with enable_eject}
|
||||
# File conflict of eject (up to 12.3 and SLE11).
|
||||
Obsoletes: eject < 2.1.0-166.8
|
||||
%endif
|
||||
# File conflict of login (up to 12.1 and SLE11).
|
||||
Obsoletes: login < 4.0-33.7
|
||||
%if %{with enable_su}
|
||||
# File conflict of su and kill (up to 12.3 and SLE11).
|
||||
# It should be coreutils < 8.21-4, but coreutils provide Release-less symbol.
|
||||
Conflicts: coreutils < 8.21
|
||||
%endif
|
||||
%if %{with sysvinit_tools}
|
||||
# File conflict of sulogin and utmpdump (up to 12.3 and SLE11).
|
||||
Conflicts: sysvinit-tools < 2.88+-87
|
||||
%endif
|
||||
# File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3).
|
||||
Conflicts: bash-completion <= 2.1-13.1
|
||||
# bnc#805684:
|
||||
%ifarch s390x
|
||||
Obsoletes: s390-32
|
||||
@ -401,6 +394,7 @@ library.
|
||||
xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} -
|
||||
%endif
|
||||
%setup -q -n %{_name}-%{version} -b 40
|
||||
%patch -p1
|
||||
%patch4 -p1
|
||||
#
|
||||
# setctsid
|
||||
@ -538,6 +532,7 @@ export LDFLAGS="-Wl,-z,relro,-z,now"
|
||||
# sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities.
|
||||
AUTOPOINT=true autoreconf -vfi
|
||||
%configure \
|
||||
--disable-silent-rules \
|
||||
--localstatedir=/run \
|
||||
--docdir=%{_docdir}/%{_name} \
|
||||
--with-audit \
|
||||
@ -545,47 +540,33 @@ AUTOPOINT=true autoreconf -vfi
|
||||
--with-ncurses \
|
||||
--with-selinux \
|
||||
$uhead \
|
||||
--with-bashcompletiondir=%{_datadir}/bash-completion \
|
||||
--enable-all-programs \
|
||||
--disable-reset \
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
--enable-libmount-force-mountinfo \
|
||||
--enable-sulogin-emergency-mount \
|
||||
--disable-use-tty-group \
|
||||
--disable-silent-rules \
|
||||
--enable-static \
|
||||
--disable-rpath \
|
||||
--enable-all-programs \
|
||||
--disable-reset \
|
||||
%if %{without enable_last}
|
||||
--disable-last \
|
||||
%endif
|
||||
%if %{without enable_eject}
|
||||
--disable-eject \
|
||||
%endif
|
||||
%if %{with sysvinit_tools}
|
||||
--enable-sulogin-emergency-mount \
|
||||
%else
|
||||
--disable-sulogin \
|
||||
--disable-mountpoint \
|
||||
%endif
|
||||
%if %{without enable_su}
|
||||
--disable-su \
|
||||
--disable-kill \
|
||||
%endif
|
||||
%if %build_util_linux_systemd
|
||||
--with-systemd \
|
||||
--enable-logger \
|
||||
--enable-lslogins \
|
||||
--enable-uuidd \
|
||||
--with-systemd \
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
%else
|
||||
--without-systemd \
|
||||
--disable-logger \
|
||||
--disable-lslogins \
|
||||
--disable-uuidd \
|
||||
--without-systemd \
|
||||
%endif
|
||||
%if %build_python_libmount
|
||||
--with-python \
|
||||
%else
|
||||
--without-python \
|
||||
%endif
|
||||
--enable-libmount-force-mountinfo \
|
||||
|
||||
#
|
||||
# Safety check: HAVE_UUIDD should be always 1:
|
||||
@ -637,11 +618,9 @@ install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login
|
||||
install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote
|
||||
install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser
|
||||
install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l
|
||||
%if %{with enable_su}
|
||||
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su
|
||||
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l
|
||||
install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su
|
||||
%endif
|
||||
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
pushd ../klogconsole
|
||||
# klogconsole install
|
||||
@ -655,10 +634,8 @@ popd
|
||||
rm -f %{buildroot}%{python_sitearch}/libmount/*.*a
|
||||
%if %build_util_linux
|
||||
#UsrMerge
|
||||
%if %{with enable_su}
|
||||
ln -s %{_bindir}/kill %{buildroot}/bin
|
||||
ln -s %{_bindir}/su %{buildroot}/bin
|
||||
%endif
|
||||
ln -s %{_bindir}/dmesg %{buildroot}/bin
|
||||
ln -s %{_bindir}/more %{buildroot}/bin
|
||||
ln -s %{_bindir}/mount %{buildroot}/bin
|
||||
@ -798,7 +775,6 @@ echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/system
|
||||
%post
|
||||
%{fillup_and_insserv raw}
|
||||
%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount
|
||||
%if %{with enable_su}
|
||||
%set_permissions %{_bindir}/su
|
||||
# Safely migrate PAM files from coreutils to util-linux
|
||||
# (openSUSE 12.3->13.1, SLE11->SLE12)
|
||||
@ -817,7 +793,6 @@ for PAM_FILE in default/su pam.d/su pam.d/su-l ; do
|
||||
mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE
|
||||
fi
|
||||
done
|
||||
%endif
|
||||
|
||||
# mount option 'code=' is now called 'codepage=' so change fstab
|
||||
if [ -f etc/fstab ]; then
|
||||
@ -829,9 +804,7 @@ fi
|
||||
|
||||
%verifyscript
|
||||
%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount
|
||||
%if %{with enable_su}
|
||||
%verify_permissions -e %{_bindir}/su
|
||||
%endif
|
||||
|
||||
%post -n libblkid1 -p /sbin/ldconfig
|
||||
|
||||
@ -857,9 +830,8 @@ fi
|
||||
%endif
|
||||
|
||||
%if %build_util_linux_systemd
|
||||
# Note: This is not a perfect solution: fstrim is part of util-linux, fstrim services are part of util-linux-systemd (for build loop prevention reasons).
|
||||
# If only util-linux is updated, restart of fstrim service does not happen.
|
||||
# Maybe we should move fstrim to util-linux-systemd in the next version.
|
||||
# fstrim(8) and fstrim.service are from different packages. But it's a oneshot
|
||||
# service (timer), no restart needed on binary updates (unless path is changed).
|
||||
%pre -n util-linux-systemd
|
||||
%{service_add_pre fstrim.service fstrim.timer}
|
||||
|
||||
@ -877,7 +849,7 @@ fi
|
||||
/usr/sbin/useradd -r -g uuidd -c "User for uuidd" \
|
||||
-d /var/run/uuidd uuidd 2>/dev/null || :
|
||||
%{service_add_pre uuidd.socket uuidd.service}
|
||||
%systemd_preset_pre
|
||||
%{?systemd_preset_pre}
|
||||
|
||||
%post -n uuidd
|
||||
%{service_add_post uuidd.socket uuidd.service}
|
||||
@ -889,7 +861,7 @@ fi
|
||||
%{service_del_postun uuidd.socket uuidd.service}
|
||||
|
||||
%posttrans -p /bin/bash -n uuidd
|
||||
%systemd_preset_posttrans
|
||||
%{?systemd_preset_posttrans}
|
||||
%endif
|
||||
|
||||
%if %build_util_linux
|
||||
@ -920,16 +892,12 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/remote
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/runuser
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/runuser-l
|
||||
%if %{with enable_su}
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/su
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/su-l
|
||||
%config(noreplace) %{_sysconfdir}/default/su
|
||||
%endif
|
||||
#UsrMerge
|
||||
%if %{with enable_su}
|
||||
/bin/kill
|
||||
/bin/su
|
||||
%endif
|
||||
/bin/dmesg
|
||||
/bin/more
|
||||
/bin/mount
|
||||
@ -963,13 +931,9 @@ fi
|
||||
/sbin/fstrim
|
||||
/sbin/chcpu
|
||||
#EndUsrMerge
|
||||
%if %{with enable_su}
|
||||
%{_bindir}/kill
|
||||
%{_bindir}/su
|
||||
%endif
|
||||
%if %{with enable_eject}
|
||||
%{_bindir}/eject
|
||||
%endif
|
||||
%{_bindir}/cal
|
||||
%{_bindir}/chrt
|
||||
%{_bindir}/col
|
||||
@ -1018,10 +982,8 @@ fi
|
||||
%{_bindir}/ul
|
||||
%{_bindir}/umount
|
||||
%{_bindir}/unshare
|
||||
%if %{with sysvinit_tools}
|
||||
%{_bindir}/mountpoint
|
||||
%{_bindir}/utmpdump
|
||||
%endif
|
||||
%{_bindir}/uuidgen
|
||||
%{_bindir}/uname26
|
||||
%ifnarch ppc ppc64
|
||||
@ -1059,9 +1021,7 @@ fi
|
||||
%{_sbindir}/rtcwake
|
||||
%{_sbindir}/runuser
|
||||
%{_sbindir}/setctsid
|
||||
%if %{with sysvinit_tools}
|
||||
%{_sbindir}/sulogin
|
||||
%endif
|
||||
%{_sbindir}/swaplabel
|
||||
%{_sbindir}/swapoff
|
||||
%{_sbindir}/swapon
|
||||
@ -1071,10 +1031,8 @@ fi
|
||||
%{_bindir}/whereis
|
||||
%verify(not mode) %attr(0755,root,tty) %{_bindir}/write
|
||||
%{_sbindir}/zramctl
|
||||
%if %{with enable_su}
|
||||
%{_mandir}/man1/kill.1.gz
|
||||
%{_mandir}/man1/su.1.gz
|
||||
%endif
|
||||
%{_mandir}/man1/cal.1.gz
|
||||
%{_mandir}/man1/chrt.1.gz
|
||||
%{_mandir}/man1/col.1.gz
|
||||
@ -1082,9 +1040,7 @@ fi
|
||||
%{_mandir}/man1/colrm.1.gz
|
||||
%{_mandir}/man1/column.1.gz
|
||||
%{_mandir}/man1/dmesg.1.gz
|
||||
%if %{with enable_eject}
|
||||
%{_mandir}/man1/eject.1.gz
|
||||
%endif
|
||||
%{_mandir}/man1/fallocate.1.gz
|
||||
%{_mandir}/man1/flock.1.gz
|
||||
%{_mandir}/man1/getopt.1.gz
|
||||
@ -1123,10 +1079,8 @@ fi
|
||||
%{_mandir}/man1/whereis.1.gz
|
||||
%{_mandir}/man1/write.1.gz
|
||||
%{_mandir}/man1/ipcmk.1.gz
|
||||
%if %{with sysvinit_tools}
|
||||
%{_mandir}/man1/mountpoint.1.gz
|
||||
%{_mandir}/man1/utmpdump.1.gz
|
||||
%endif
|
||||
%{_mandir}/man1/runuser.1.gz
|
||||
%{_mandir}/man1/uuidgen.1.gz
|
||||
%{_mandir}/man5/fstab.5.gz
|
||||
@ -1178,22 +1132,18 @@ fi
|
||||
%{_mandir}/man8/fstrim.8.gz
|
||||
%{_mandir}/man8/lsblk.8.gz
|
||||
%{_mandir}/man8/resizepart.8.gz
|
||||
%if %{with sysvinit_tools}
|
||||
%{_mandir}/man8/sulogin.8.gz
|
||||
%endif
|
||||
%{_mandir}/man8/wdctl.8.gz
|
||||
%{_sbindir}/flushb
|
||||
%{_sbindir}/readprofile
|
||||
%dir %{_datadir}/getopt
|
||||
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash
|
||||
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh
|
||||
# FIXME: Fix directory ownership.
|
||||
%dir %{_datadir}/bash-completion
|
||||
%{_datadir}/bash-completion/*
|
||||
%{_datadir}/bash-completion/completions/*
|
||||
%if %build_util_linux_systemd
|
||||
%exclude %{_datadir}/bash-completion/logger
|
||||
%exclude %{_datadir}/bash-completion/lslogins
|
||||
%exclude %{_datadir}/bash-completion/uuidd
|
||||
%exclude %{_datadir}/bash-completion/completions/logger
|
||||
%exclude %{_datadir}/bash-completion/completions/lslogins
|
||||
%exclude %{_datadir}/bash-completion/completions/uuidd
|
||||
%endif
|
||||
%ifnarch ia64 m68k
|
||||
#XXX: post our patches upstream
|
||||
@ -1323,8 +1273,8 @@ fi
|
||||
/bin/logger
|
||||
%{_bindir}/logger
|
||||
%{_bindir}/lslogins
|
||||
%{_datadir}/bash-completion/logger
|
||||
%{_datadir}/bash-completion/lslogins
|
||||
%{_datadir}/bash-completion/completions/logger
|
||||
%{_datadir}/bash-completion/completions/lslogins
|
||||
%{_mandir}/man1/logger.1.gz
|
||||
%{_mandir}/man1/lslogins.1.gz
|
||||
%{_sbindir}/rcfstrim
|
||||
@ -1337,7 +1287,7 @@ fi
|
||||
%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid
|
||||
%ghost %{_localstatedir}/lib/libuuid/clock.txt
|
||||
%attr(-,uuidd,uuidd) %ghost %dir /run/uuidd
|
||||
%{_datadir}/bash-completion/uuidd
|
||||
%{_datadir}/bash-completion/completions/uuidd
|
||||
%{_mandir}/man8/uuidd.8.gz
|
||||
%{_sbindir}/rcuuidd
|
||||
%{_unitdir}/uuidd.service
|
||||
|
100
util-linux-libblkid-wipe-offset.patch
Normal file
100
util-linux-libblkid-wipe-offset.patch
Normal file
@ -0,0 +1,100 @@
|
||||
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
|
||||
|
@ -1,3 +1,31 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com
|
||||
|
||||
- blkid: Wipe corect area for probes with offset (bsc#976141,
|
||||
util-linux-libblkid-wipe-offset.patch).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 26 18:24:40 CEST 2016 - sbrabec@suse.com
|
||||
|
||||
- Remove incorrect --with-bashcompletiondir that breaks
|
||||
bash-completion, use path in bash-completion.pc instead
|
||||
(boo#977259).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 22 16:41:34 CEST 2016 - sbrabec@suse.com
|
||||
|
||||
- Add librtas-devel to BuildRequires on Power platforms. Needed for
|
||||
proper function of lscpu (bsc#975082).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de
|
||||
|
||||
- fix build for openSUSE >= 13.1 (inclusive SLE 12)
|
||||
- drop build for openSUSE < 13.1
|
||||
- remove old build conditions: sysvinit_tools, enable_su and
|
||||
enable_eject
|
||||
- cosmetics: reorder configure options
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de
|
||||
|
||||
|
@ -16,9 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without sysvinit_tools
|
||||
%bcond_without enable_su
|
||||
%bcond_without enable_eject
|
||||
%bcond_without enable_last
|
||||
|
||||
Name: util-linux-systemd
|
||||
@ -78,6 +75,7 @@ Summary: %main_summary
|
||||
License: GPL-2.0+
|
||||
Group: %main_group
|
||||
BuildRequires: audit-devel
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: bc
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: fdupes
|
||||
@ -92,19 +90,18 @@ BuildRequires: pkg-config
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: utempter-devel
|
||||
BuildRequires: zlib-devel
|
||||
%ifarch ppc ppc64 ppc64le
|
||||
BuildRequires: librtas-devel
|
||||
%endif
|
||||
%if %verify_sig
|
||||
BuildRequires: gpg-offline
|
||||
%endif
|
||||
%if %build_util_linux_systemd
|
||||
BuildRequires: socat
|
||||
%if 0%{?suse_version} <= 1230
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%else
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: pkgconfig(libsystemd-daemon)
|
||||
BuildRequires: pkgconfig(libsystemd-journal)
|
||||
%endif
|
||||
%endif
|
||||
%if %build_python_libmount
|
||||
BuildRequires: python-devel
|
||||
%endif
|
||||
@ -158,6 +155,8 @@ 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
|
||||
@ -170,25 +169,19 @@ Provides: util-linux(fake+no-canonicalize)
|
||||
PreReq: %install_info_prereq permissions
|
||||
PreReq: %insserv_prereq %fillup_prereq /bin/sed
|
||||
Recommends: %{name}-lang = %{version}
|
||||
%if %{with enable_eject}
|
||||
Provides: eject = 2.1.0-166.8
|
||||
%endif
|
||||
Provides: login = 4.0-33.7
|
||||
%if %{with enable_eject}
|
||||
# File conflict of eject (up to 12.3 and SLE11).
|
||||
Obsoletes: eject < 2.1.0-166.8
|
||||
%endif
|
||||
# File conflict of login (up to 12.1 and SLE11).
|
||||
Obsoletes: login < 4.0-33.7
|
||||
%if %{with enable_su}
|
||||
# File conflict of su and kill (up to 12.3 and SLE11).
|
||||
# It should be coreutils < 8.21-4, but coreutils provide Release-less symbol.
|
||||
Conflicts: coreutils < 8.21
|
||||
%endif
|
||||
%if %{with sysvinit_tools}
|
||||
# File conflict of sulogin and utmpdump (up to 12.3 and SLE11).
|
||||
Conflicts: sysvinit-tools < 2.88+-87
|
||||
%endif
|
||||
# File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3).
|
||||
Conflicts: bash-completion <= 2.1-13.1
|
||||
# bnc#805684:
|
||||
%ifarch s390x
|
||||
Obsoletes: s390-32
|
||||
@ -401,6 +394,7 @@ library.
|
||||
xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} -
|
||||
%endif
|
||||
%setup -q -n %{_name}-%{version} -b 40
|
||||
%patch -p1
|
||||
%patch4 -p1
|
||||
#
|
||||
# setctsid
|
||||
@ -538,6 +532,7 @@ export LDFLAGS="-Wl,-z,relro,-z,now"
|
||||
# sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities.
|
||||
AUTOPOINT=true autoreconf -vfi
|
||||
%configure \
|
||||
--disable-silent-rules \
|
||||
--localstatedir=/run \
|
||||
--docdir=%{_docdir}/%{_name} \
|
||||
--with-audit \
|
||||
@ -545,47 +540,33 @@ AUTOPOINT=true autoreconf -vfi
|
||||
--with-ncurses \
|
||||
--with-selinux \
|
||||
$uhead \
|
||||
--with-bashcompletiondir=%{_datadir}/bash-completion \
|
||||
--enable-all-programs \
|
||||
--disable-reset \
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
--enable-libmount-force-mountinfo \
|
||||
--enable-sulogin-emergency-mount \
|
||||
--disable-use-tty-group \
|
||||
--disable-silent-rules \
|
||||
--enable-static \
|
||||
--disable-rpath \
|
||||
--enable-all-programs \
|
||||
--disable-reset \
|
||||
%if %{without enable_last}
|
||||
--disable-last \
|
||||
%endif
|
||||
%if %{without enable_eject}
|
||||
--disable-eject \
|
||||
%endif
|
||||
%if %{with sysvinit_tools}
|
||||
--enable-sulogin-emergency-mount \
|
||||
%else
|
||||
--disable-sulogin \
|
||||
--disable-mountpoint \
|
||||
%endif
|
||||
%if %{without enable_su}
|
||||
--disable-su \
|
||||
--disable-kill \
|
||||
%endif
|
||||
%if %build_util_linux_systemd
|
||||
--with-systemd \
|
||||
--enable-logger \
|
||||
--enable-lslogins \
|
||||
--enable-uuidd \
|
||||
--with-systemd \
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
%else
|
||||
--without-systemd \
|
||||
--disable-logger \
|
||||
--disable-lslogins \
|
||||
--disable-uuidd \
|
||||
--without-systemd \
|
||||
%endif
|
||||
%if %build_python_libmount
|
||||
--with-python \
|
||||
%else
|
||||
--without-python \
|
||||
%endif
|
||||
--enable-libmount-force-mountinfo \
|
||||
|
||||
#
|
||||
# Safety check: HAVE_UUIDD should be always 1:
|
||||
@ -637,11 +618,9 @@ install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login
|
||||
install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote
|
||||
install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser
|
||||
install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l
|
||||
%if %{with enable_su}
|
||||
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su
|
||||
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l
|
||||
install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su
|
||||
%endif
|
||||
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
pushd ../klogconsole
|
||||
# klogconsole install
|
||||
@ -655,10 +634,8 @@ popd
|
||||
rm -f %{buildroot}%{python_sitearch}/libmount/*.*a
|
||||
%if %build_util_linux
|
||||
#UsrMerge
|
||||
%if %{with enable_su}
|
||||
ln -s %{_bindir}/kill %{buildroot}/bin
|
||||
ln -s %{_bindir}/su %{buildroot}/bin
|
||||
%endif
|
||||
ln -s %{_bindir}/dmesg %{buildroot}/bin
|
||||
ln -s %{_bindir}/more %{buildroot}/bin
|
||||
ln -s %{_bindir}/mount %{buildroot}/bin
|
||||
@ -798,7 +775,6 @@ echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/system
|
||||
%post
|
||||
%{fillup_and_insserv raw}
|
||||
%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount
|
||||
%if %{with enable_su}
|
||||
%set_permissions %{_bindir}/su
|
||||
# Safely migrate PAM files from coreutils to util-linux
|
||||
# (openSUSE 12.3->13.1, SLE11->SLE12)
|
||||
@ -817,7 +793,6 @@ for PAM_FILE in default/su pam.d/su pam.d/su-l ; do
|
||||
mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE
|
||||
fi
|
||||
done
|
||||
%endif
|
||||
|
||||
# mount option 'code=' is now called 'codepage=' so change fstab
|
||||
if [ -f etc/fstab ]; then
|
||||
@ -829,9 +804,7 @@ fi
|
||||
|
||||
%verifyscript
|
||||
%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount
|
||||
%if %{with enable_su}
|
||||
%verify_permissions -e %{_bindir}/su
|
||||
%endif
|
||||
|
||||
%post -n libblkid1 -p /sbin/ldconfig
|
||||
|
||||
@ -857,9 +830,8 @@ fi
|
||||
%endif
|
||||
|
||||
%if %build_util_linux_systemd
|
||||
# Note: This is not a perfect solution: fstrim is part of util-linux, fstrim services are part of util-linux-systemd (for build loop prevention reasons).
|
||||
# If only util-linux is updated, restart of fstrim service does not happen.
|
||||
# Maybe we should move fstrim to util-linux-systemd in the next version.
|
||||
# fstrim(8) and fstrim.service are from different packages. But it's a oneshot
|
||||
# service (timer), no restart needed on binary updates (unless path is changed).
|
||||
%pre -n util-linux-systemd
|
||||
%{service_add_pre fstrim.service fstrim.timer}
|
||||
|
||||
@ -877,7 +849,7 @@ fi
|
||||
/usr/sbin/useradd -r -g uuidd -c "User for uuidd" \
|
||||
-d /var/run/uuidd uuidd 2>/dev/null || :
|
||||
%{service_add_pre uuidd.socket uuidd.service}
|
||||
%systemd_preset_pre
|
||||
%{?systemd_preset_pre}
|
||||
|
||||
%post -n uuidd
|
||||
%{service_add_post uuidd.socket uuidd.service}
|
||||
@ -889,7 +861,7 @@ fi
|
||||
%{service_del_postun uuidd.socket uuidd.service}
|
||||
|
||||
%posttrans -p /bin/bash -n uuidd
|
||||
%systemd_preset_posttrans
|
||||
%{?systemd_preset_posttrans}
|
||||
%endif
|
||||
|
||||
%if %build_util_linux
|
||||
@ -920,16 +892,12 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/remote
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/runuser
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/runuser-l
|
||||
%if %{with enable_su}
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/su
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/su-l
|
||||
%config(noreplace) %{_sysconfdir}/default/su
|
||||
%endif
|
||||
#UsrMerge
|
||||
%if %{with enable_su}
|
||||
/bin/kill
|
||||
/bin/su
|
||||
%endif
|
||||
/bin/dmesg
|
||||
/bin/more
|
||||
/bin/mount
|
||||
@ -963,13 +931,9 @@ fi
|
||||
/sbin/fstrim
|
||||
/sbin/chcpu
|
||||
#EndUsrMerge
|
||||
%if %{with enable_su}
|
||||
%{_bindir}/kill
|
||||
%{_bindir}/su
|
||||
%endif
|
||||
%if %{with enable_eject}
|
||||
%{_bindir}/eject
|
||||
%endif
|
||||
%{_bindir}/cal
|
||||
%{_bindir}/chrt
|
||||
%{_bindir}/col
|
||||
@ -1018,10 +982,8 @@ fi
|
||||
%{_bindir}/ul
|
||||
%{_bindir}/umount
|
||||
%{_bindir}/unshare
|
||||
%if %{with sysvinit_tools}
|
||||
%{_bindir}/mountpoint
|
||||
%{_bindir}/utmpdump
|
||||
%endif
|
||||
%{_bindir}/uuidgen
|
||||
%{_bindir}/uname26
|
||||
%ifnarch ppc ppc64
|
||||
@ -1059,9 +1021,7 @@ fi
|
||||
%{_sbindir}/rtcwake
|
||||
%{_sbindir}/runuser
|
||||
%{_sbindir}/setctsid
|
||||
%if %{with sysvinit_tools}
|
||||
%{_sbindir}/sulogin
|
||||
%endif
|
||||
%{_sbindir}/swaplabel
|
||||
%{_sbindir}/swapoff
|
||||
%{_sbindir}/swapon
|
||||
@ -1071,10 +1031,8 @@ fi
|
||||
%{_bindir}/whereis
|
||||
%verify(not mode) %attr(0755,root,tty) %{_bindir}/write
|
||||
%{_sbindir}/zramctl
|
||||
%if %{with enable_su}
|
||||
%{_mandir}/man1/kill.1.gz
|
||||
%{_mandir}/man1/su.1.gz
|
||||
%endif
|
||||
%{_mandir}/man1/cal.1.gz
|
||||
%{_mandir}/man1/chrt.1.gz
|
||||
%{_mandir}/man1/col.1.gz
|
||||
@ -1082,9 +1040,7 @@ fi
|
||||
%{_mandir}/man1/colrm.1.gz
|
||||
%{_mandir}/man1/column.1.gz
|
||||
%{_mandir}/man1/dmesg.1.gz
|
||||
%if %{with enable_eject}
|
||||
%{_mandir}/man1/eject.1.gz
|
||||
%endif
|
||||
%{_mandir}/man1/fallocate.1.gz
|
||||
%{_mandir}/man1/flock.1.gz
|
||||
%{_mandir}/man1/getopt.1.gz
|
||||
@ -1123,10 +1079,8 @@ fi
|
||||
%{_mandir}/man1/whereis.1.gz
|
||||
%{_mandir}/man1/write.1.gz
|
||||
%{_mandir}/man1/ipcmk.1.gz
|
||||
%if %{with sysvinit_tools}
|
||||
%{_mandir}/man1/mountpoint.1.gz
|
||||
%{_mandir}/man1/utmpdump.1.gz
|
||||
%endif
|
||||
%{_mandir}/man1/runuser.1.gz
|
||||
%{_mandir}/man1/uuidgen.1.gz
|
||||
%{_mandir}/man5/fstab.5.gz
|
||||
@ -1178,22 +1132,18 @@ fi
|
||||
%{_mandir}/man8/fstrim.8.gz
|
||||
%{_mandir}/man8/lsblk.8.gz
|
||||
%{_mandir}/man8/resizepart.8.gz
|
||||
%if %{with sysvinit_tools}
|
||||
%{_mandir}/man8/sulogin.8.gz
|
||||
%endif
|
||||
%{_mandir}/man8/wdctl.8.gz
|
||||
%{_sbindir}/flushb
|
||||
%{_sbindir}/readprofile
|
||||
%dir %{_datadir}/getopt
|
||||
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash
|
||||
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh
|
||||
# FIXME: Fix directory ownership.
|
||||
%dir %{_datadir}/bash-completion
|
||||
%{_datadir}/bash-completion/*
|
||||
%{_datadir}/bash-completion/completions/*
|
||||
%if %build_util_linux_systemd
|
||||
%exclude %{_datadir}/bash-completion/logger
|
||||
%exclude %{_datadir}/bash-completion/lslogins
|
||||
%exclude %{_datadir}/bash-completion/uuidd
|
||||
%exclude %{_datadir}/bash-completion/completions/logger
|
||||
%exclude %{_datadir}/bash-completion/completions/lslogins
|
||||
%exclude %{_datadir}/bash-completion/completions/uuidd
|
||||
%endif
|
||||
%ifnarch ia64 m68k
|
||||
#XXX: post our patches upstream
|
||||
@ -1323,8 +1273,8 @@ fi
|
||||
/bin/logger
|
||||
%{_bindir}/logger
|
||||
%{_bindir}/lslogins
|
||||
%{_datadir}/bash-completion/logger
|
||||
%{_datadir}/bash-completion/lslogins
|
||||
%{_datadir}/bash-completion/completions/logger
|
||||
%{_datadir}/bash-completion/completions/lslogins
|
||||
%{_mandir}/man1/logger.1.gz
|
||||
%{_mandir}/man1/lslogins.1.gz
|
||||
%{_sbindir}/rcfstrim
|
||||
@ -1337,7 +1287,7 @@ fi
|
||||
%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid
|
||||
%ghost %{_localstatedir}/lib/libuuid/clock.txt
|
||||
%attr(-,uuidd,uuidd) %ghost %dir /run/uuidd
|
||||
%{_datadir}/bash-completion/uuidd
|
||||
%{_datadir}/bash-completion/completions/uuidd
|
||||
%{_mandir}/man8/uuidd.8.gz
|
||||
%{_sbindir}/rcuuidd
|
||||
%{_unitdir}/uuidd.service
|
||||
|
@ -1,3 +1,31 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 19 14:29:27 CEST 2016 - sbrabec@suse.com
|
||||
|
||||
- blkid: Wipe corect area for probes with offset (bsc#976141,
|
||||
util-linux-libblkid-wipe-offset.patch).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 26 18:24:40 CEST 2016 - sbrabec@suse.com
|
||||
|
||||
- Remove incorrect --with-bashcompletiondir that breaks
|
||||
bash-completion, use path in bash-completion.pc instead
|
||||
(boo#977259).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 22 16:41:34 CEST 2016 - sbrabec@suse.com
|
||||
|
||||
- Add librtas-devel to BuildRequires on Power platforms. Needed for
|
||||
proper function of lscpu (bsc#975082).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 13 21:29:00 UTC 2016 - sweet_f_a@gmx.de
|
||||
|
||||
- fix build for openSUSE >= 13.1 (inclusive SLE 12)
|
||||
- drop build for openSUSE < 13.1
|
||||
- remove old build conditions: sysvinit_tools, enable_su and
|
||||
enable_eject
|
||||
- cosmetics: reorder configure options
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 13 09:53:21 UTC 2016 - sweet_f_a@gmx.de
|
||||
|
||||
|
106
util-linux.spec
106
util-linux.spec
@ -16,9 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without sysvinit_tools
|
||||
%bcond_without enable_su
|
||||
%bcond_without enable_eject
|
||||
%bcond_without enable_last
|
||||
|
||||
Name: util-linux
|
||||
@ -78,6 +75,7 @@ Summary: %main_summary
|
||||
License: GPL-2.0+
|
||||
Group: %main_group
|
||||
BuildRequires: audit-devel
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: bc
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: fdupes
|
||||
@ -92,19 +90,18 @@ BuildRequires: pkg-config
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: utempter-devel
|
||||
BuildRequires: zlib-devel
|
||||
%ifarch ppc ppc64 ppc64le
|
||||
BuildRequires: librtas-devel
|
||||
%endif
|
||||
%if %verify_sig
|
||||
BuildRequires: gpg-offline
|
||||
%endif
|
||||
%if %build_util_linux_systemd
|
||||
BuildRequires: socat
|
||||
%if 0%{?suse_version} <= 1230
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%else
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: pkgconfig(libsystemd-daemon)
|
||||
BuildRequires: pkgconfig(libsystemd-journal)
|
||||
%endif
|
||||
%endif
|
||||
%if %build_python_libmount
|
||||
BuildRequires: python-devel
|
||||
%endif
|
||||
@ -158,6 +155,8 @@ 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
|
||||
@ -170,25 +169,19 @@ Provides: util-linux(fake+no-canonicalize)
|
||||
PreReq: %install_info_prereq permissions
|
||||
PreReq: %insserv_prereq %fillup_prereq /bin/sed
|
||||
Recommends: %{name}-lang = %{version}
|
||||
%if %{with enable_eject}
|
||||
Provides: eject = 2.1.0-166.8
|
||||
%endif
|
||||
Provides: login = 4.0-33.7
|
||||
%if %{with enable_eject}
|
||||
# File conflict of eject (up to 12.3 and SLE11).
|
||||
Obsoletes: eject < 2.1.0-166.8
|
||||
%endif
|
||||
# File conflict of login (up to 12.1 and SLE11).
|
||||
Obsoletes: login < 4.0-33.7
|
||||
%if %{with enable_su}
|
||||
# File conflict of su and kill (up to 12.3 and SLE11).
|
||||
# It should be coreutils < 8.21-4, but coreutils provide Release-less symbol.
|
||||
Conflicts: coreutils < 8.21
|
||||
%endif
|
||||
%if %{with sysvinit_tools}
|
||||
# File conflict of sulogin and utmpdump (up to 12.3 and SLE11).
|
||||
Conflicts: sysvinit-tools < 2.88+-87
|
||||
%endif
|
||||
# File conflicts of completion files with <= Leap 42.1 and <= SLE12 SP1 (fixed by SLE12 Update, boo#977259#c3).
|
||||
Conflicts: bash-completion <= 2.1-13.1
|
||||
# bnc#805684:
|
||||
%ifarch s390x
|
||||
Obsoletes: s390-32
|
||||
@ -401,6 +394,7 @@ library.
|
||||
xzcat %{S:0} | %gpg_verify -p %{_name} %{S:12} -
|
||||
%endif
|
||||
%setup -q -n %{_name}-%{version} -b 40
|
||||
%patch -p1
|
||||
%patch4 -p1
|
||||
#
|
||||
# setctsid
|
||||
@ -538,6 +532,7 @@ export LDFLAGS="-Wl,-z,relro,-z,now"
|
||||
# sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities.
|
||||
AUTOPOINT=true autoreconf -vfi
|
||||
%configure \
|
||||
--disable-silent-rules \
|
||||
--localstatedir=/run \
|
||||
--docdir=%{_docdir}/%{_name} \
|
||||
--with-audit \
|
||||
@ -545,47 +540,33 @@ AUTOPOINT=true autoreconf -vfi
|
||||
--with-ncurses \
|
||||
--with-selinux \
|
||||
$uhead \
|
||||
--with-bashcompletiondir=%{_datadir}/bash-completion \
|
||||
--enable-all-programs \
|
||||
--disable-reset \
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
--enable-libmount-force-mountinfo \
|
||||
--enable-sulogin-emergency-mount \
|
||||
--disable-use-tty-group \
|
||||
--disable-silent-rules \
|
||||
--enable-static \
|
||||
--disable-rpath \
|
||||
--enable-all-programs \
|
||||
--disable-reset \
|
||||
%if %{without enable_last}
|
||||
--disable-last \
|
||||
%endif
|
||||
%if %{without enable_eject}
|
||||
--disable-eject \
|
||||
%endif
|
||||
%if %{with sysvinit_tools}
|
||||
--enable-sulogin-emergency-mount \
|
||||
%else
|
||||
--disable-sulogin \
|
||||
--disable-mountpoint \
|
||||
%endif
|
||||
%if %{without enable_su}
|
||||
--disable-su \
|
||||
--disable-kill \
|
||||
%endif
|
||||
%if %build_util_linux_systemd
|
||||
--with-systemd \
|
||||
--enable-logger \
|
||||
--enable-lslogins \
|
||||
--enable-uuidd \
|
||||
--with-systemd \
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
%else
|
||||
--without-systemd \
|
||||
--disable-logger \
|
||||
--disable-lslogins \
|
||||
--disable-uuidd \
|
||||
--without-systemd \
|
||||
%endif
|
||||
%if %build_python_libmount
|
||||
--with-python \
|
||||
%else
|
||||
--without-python \
|
||||
%endif
|
||||
--enable-libmount-force-mountinfo \
|
||||
|
||||
#
|
||||
# Safety check: HAVE_UUIDD should be always 1:
|
||||
@ -637,11 +618,9 @@ install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login
|
||||
install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote
|
||||
install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser
|
||||
install -m 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l
|
||||
%if %{with enable_su}
|
||||
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su
|
||||
install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/su-l
|
||||
install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/default/su
|
||||
%endif
|
||||
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
pushd ../klogconsole
|
||||
# klogconsole install
|
||||
@ -655,10 +634,8 @@ popd
|
||||
rm -f %{buildroot}%{python_sitearch}/libmount/*.*a
|
||||
%if %build_util_linux
|
||||
#UsrMerge
|
||||
%if %{with enable_su}
|
||||
ln -s %{_bindir}/kill %{buildroot}/bin
|
||||
ln -s %{_bindir}/su %{buildroot}/bin
|
||||
%endif
|
||||
ln -s %{_bindir}/dmesg %{buildroot}/bin
|
||||
ln -s %{_bindir}/more %{buildroot}/bin
|
||||
ln -s %{_bindir}/mount %{buildroot}/bin
|
||||
@ -798,7 +775,6 @@ echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/system
|
||||
%post
|
||||
%{fillup_and_insserv raw}
|
||||
%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount
|
||||
%if %{with enable_su}
|
||||
%set_permissions %{_bindir}/su
|
||||
# Safely migrate PAM files from coreutils to util-linux
|
||||
# (openSUSE 12.3->13.1, SLE11->SLE12)
|
||||
@ -817,7 +793,6 @@ for PAM_FILE in default/su pam.d/su pam.d/su-l ; do
|
||||
mv %{_sysconfdir}/$PAM_FILE.rpmsave %{_sysconfdir}/$PAM_FILE
|
||||
fi
|
||||
done
|
||||
%endif
|
||||
|
||||
# mount option 'code=' is now called 'codepage=' so change fstab
|
||||
if [ -f etc/fstab ]; then
|
||||
@ -829,9 +804,7 @@ fi
|
||||
|
||||
%verifyscript
|
||||
%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount
|
||||
%if %{with enable_su}
|
||||
%verify_permissions -e %{_bindir}/su
|
||||
%endif
|
||||
|
||||
%post -n libblkid1 -p /sbin/ldconfig
|
||||
|
||||
@ -857,9 +830,8 @@ fi
|
||||
%endif
|
||||
|
||||
%if %build_util_linux_systemd
|
||||
# Note: This is not a perfect solution: fstrim is part of util-linux, fstrim services are part of util-linux-systemd (for build loop prevention reasons).
|
||||
# If only util-linux is updated, restart of fstrim service does not happen.
|
||||
# Maybe we should move fstrim to util-linux-systemd in the next version.
|
||||
# fstrim(8) and fstrim.service are from different packages. But it's a oneshot
|
||||
# service (timer), no restart needed on binary updates (unless path is changed).
|
||||
%pre -n util-linux-systemd
|
||||
%{service_add_pre fstrim.service fstrim.timer}
|
||||
|
||||
@ -877,7 +849,7 @@ fi
|
||||
/usr/sbin/useradd -r -g uuidd -c "User for uuidd" \
|
||||
-d /var/run/uuidd uuidd 2>/dev/null || :
|
||||
%{service_add_pre uuidd.socket uuidd.service}
|
||||
%systemd_preset_pre
|
||||
%{?systemd_preset_pre}
|
||||
|
||||
%post -n uuidd
|
||||
%{service_add_post uuidd.socket uuidd.service}
|
||||
@ -889,7 +861,7 @@ fi
|
||||
%{service_del_postun uuidd.socket uuidd.service}
|
||||
|
||||
%posttrans -p /bin/bash -n uuidd
|
||||
%systemd_preset_posttrans
|
||||
%{?systemd_preset_posttrans}
|
||||
%endif
|
||||
|
||||
%if %build_util_linux
|
||||
@ -920,16 +892,12 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/remote
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/runuser
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/runuser-l
|
||||
%if %{with enable_su}
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/su
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/su-l
|
||||
%config(noreplace) %{_sysconfdir}/default/su
|
||||
%endif
|
||||
#UsrMerge
|
||||
%if %{with enable_su}
|
||||
/bin/kill
|
||||
/bin/su
|
||||
%endif
|
||||
/bin/dmesg
|
||||
/bin/more
|
||||
/bin/mount
|
||||
@ -963,13 +931,9 @@ fi
|
||||
/sbin/fstrim
|
||||
/sbin/chcpu
|
||||
#EndUsrMerge
|
||||
%if %{with enable_su}
|
||||
%{_bindir}/kill
|
||||
%{_bindir}/su
|
||||
%endif
|
||||
%if %{with enable_eject}
|
||||
%{_bindir}/eject
|
||||
%endif
|
||||
%{_bindir}/cal
|
||||
%{_bindir}/chrt
|
||||
%{_bindir}/col
|
||||
@ -1018,10 +982,8 @@ fi
|
||||
%{_bindir}/ul
|
||||
%{_bindir}/umount
|
||||
%{_bindir}/unshare
|
||||
%if %{with sysvinit_tools}
|
||||
%{_bindir}/mountpoint
|
||||
%{_bindir}/utmpdump
|
||||
%endif
|
||||
%{_bindir}/uuidgen
|
||||
%{_bindir}/uname26
|
||||
%ifnarch ppc ppc64
|
||||
@ -1059,9 +1021,7 @@ fi
|
||||
%{_sbindir}/rtcwake
|
||||
%{_sbindir}/runuser
|
||||
%{_sbindir}/setctsid
|
||||
%if %{with sysvinit_tools}
|
||||
%{_sbindir}/sulogin
|
||||
%endif
|
||||
%{_sbindir}/swaplabel
|
||||
%{_sbindir}/swapoff
|
||||
%{_sbindir}/swapon
|
||||
@ -1071,10 +1031,8 @@ fi
|
||||
%{_bindir}/whereis
|
||||
%verify(not mode) %attr(0755,root,tty) %{_bindir}/write
|
||||
%{_sbindir}/zramctl
|
||||
%if %{with enable_su}
|
||||
%{_mandir}/man1/kill.1.gz
|
||||
%{_mandir}/man1/su.1.gz
|
||||
%endif
|
||||
%{_mandir}/man1/cal.1.gz
|
||||
%{_mandir}/man1/chrt.1.gz
|
||||
%{_mandir}/man1/col.1.gz
|
||||
@ -1082,9 +1040,7 @@ fi
|
||||
%{_mandir}/man1/colrm.1.gz
|
||||
%{_mandir}/man1/column.1.gz
|
||||
%{_mandir}/man1/dmesg.1.gz
|
||||
%if %{with enable_eject}
|
||||
%{_mandir}/man1/eject.1.gz
|
||||
%endif
|
||||
%{_mandir}/man1/fallocate.1.gz
|
||||
%{_mandir}/man1/flock.1.gz
|
||||
%{_mandir}/man1/getopt.1.gz
|
||||
@ -1123,10 +1079,8 @@ fi
|
||||
%{_mandir}/man1/whereis.1.gz
|
||||
%{_mandir}/man1/write.1.gz
|
||||
%{_mandir}/man1/ipcmk.1.gz
|
||||
%if %{with sysvinit_tools}
|
||||
%{_mandir}/man1/mountpoint.1.gz
|
||||
%{_mandir}/man1/utmpdump.1.gz
|
||||
%endif
|
||||
%{_mandir}/man1/runuser.1.gz
|
||||
%{_mandir}/man1/uuidgen.1.gz
|
||||
%{_mandir}/man5/fstab.5.gz
|
||||
@ -1178,22 +1132,18 @@ fi
|
||||
%{_mandir}/man8/fstrim.8.gz
|
||||
%{_mandir}/man8/lsblk.8.gz
|
||||
%{_mandir}/man8/resizepart.8.gz
|
||||
%if %{with sysvinit_tools}
|
||||
%{_mandir}/man8/sulogin.8.gz
|
||||
%endif
|
||||
%{_mandir}/man8/wdctl.8.gz
|
||||
%{_sbindir}/flushb
|
||||
%{_sbindir}/readprofile
|
||||
%dir %{_datadir}/getopt
|
||||
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash
|
||||
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh
|
||||
# FIXME: Fix directory ownership.
|
||||
%dir %{_datadir}/bash-completion
|
||||
%{_datadir}/bash-completion/*
|
||||
%{_datadir}/bash-completion/completions/*
|
||||
%if %build_util_linux_systemd
|
||||
%exclude %{_datadir}/bash-completion/logger
|
||||
%exclude %{_datadir}/bash-completion/lslogins
|
||||
%exclude %{_datadir}/bash-completion/uuidd
|
||||
%exclude %{_datadir}/bash-completion/completions/logger
|
||||
%exclude %{_datadir}/bash-completion/completions/lslogins
|
||||
%exclude %{_datadir}/bash-completion/completions/uuidd
|
||||
%endif
|
||||
%ifnarch ia64 m68k
|
||||
#XXX: post our patches upstream
|
||||
@ -1323,8 +1273,8 @@ fi
|
||||
/bin/logger
|
||||
%{_bindir}/logger
|
||||
%{_bindir}/lslogins
|
||||
%{_datadir}/bash-completion/logger
|
||||
%{_datadir}/bash-completion/lslogins
|
||||
%{_datadir}/bash-completion/completions/logger
|
||||
%{_datadir}/bash-completion/completions/lslogins
|
||||
%{_mandir}/man1/logger.1.gz
|
||||
%{_mandir}/man1/lslogins.1.gz
|
||||
%{_sbindir}/rcfstrim
|
||||
@ -1337,7 +1287,7 @@ fi
|
||||
%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid
|
||||
%ghost %{_localstatedir}/lib/libuuid/clock.txt
|
||||
%attr(-,uuidd,uuidd) %ghost %dir /run/uuidd
|
||||
%{_datadir}/bash-completion/uuidd
|
||||
%{_datadir}/bash-completion/completions/uuidd
|
||||
%{_mandir}/man8/uuidd.8.gz
|
||||
%{_sbindir}/rcuuidd
|
||||
%{_unitdir}/uuidd.service
|
||||
|
Loading…
Reference in New Issue
Block a user