Hello community,
here is the log from the commit of package util-linux for openSUSE:Factory checked in at 2017-03-01 23:39:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/util-linux (Old)
and /work/SRC/openSUSE:Factory/.util-linux.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "util-linux"
Wed Mar 1 23:39:12 2017 rev:216 rq:457450 version:2.29.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/util-linux/python-libmount.changes 2017-01-15 10:56:25.434424155 +0100
+++ /work/SRC/openSUSE:Factory/.util-linux.new/python-libmount.changes 2017-03-01 23:39:13.706580054 +0100
@@ -1,0 +2,44 @@
+Fri Feb 10 10:40:23 UTC 2017 - fbui@suse.com
+
+- presets are managed by the branding presets package (bsc#1012850)
+
+ The default activation state is defined by the branding preset
+ package.
+
+ This also get rid of the only use of the rpm preset macros so we can
+ kill them.
+
+-------------------------------------------------------------------
+Wed Feb 8 18:16:22 CET 2017 - sbrabec@suse.com
+
+- Merge SLE12 SP3 changes to make the package compatible with
+ Tumbleweed, SLE12 SP3 and Leap 42.3.
+- Drop patch tests-script-race-on-force-only.patch from SLE12 SP3
+ and Leap 42.3. Upstream has a different workaround.
+ https://github.com/karelzak/util-linux/issues/296
+- INCOMPATIBLE CHANGE for SLE12 SP3 and Leap 42.3:
+ losetup -L changes its meaning from SLE12 SP1&SP2 specific
+ --logical-blocksize to the upstream --nooverlap).
+ --logical-blocksize can be used only with long option.
+- Include SLE12 + Leap 42 exclusive feature, implemented by
+ hare@suse.de:
+ * losetup: Add support for setting logical blocksizes
+ (bsc#931634, FATE#319010)
+ + util-linux-losetup-Add-support-for-setting-logical-blocksize.patch
+
+-------------------------------------------------------------------
+Tue Feb 7 20:07:55 CET 2017 - sbrabec@suse.com
+
+- Update to version 2.29.1:
+ * lscpu: add aarch64 specific names
+ * lubmount: Disable disable ro/rw mtab checks (bsc#1012632)
+ * More details at:
+ https://www.kernel.org/pub/linux/utils/util-linux/v2.29/v2.29.1-ReleaseNotes
+
+-------------------------------------------------------------------
+Tue Feb 7 18:31:04 CET 2017 - sbrabec@suse.com
+
+- Replace raw initscript by a systemd service doing the same thing.
+ Based on previous work of fcrozat@suse.com (FATE#321122).
+
+-------------------------------------------------------------------
util-linux-systemd.changes: same change
util-linux.changes: same change
Old:
----
raw.init
util-linux-2.29.tar.sign
util-linux-2.29.tar.xz
New:
----
raw.service
util-linux-2.29.1.tar.sign
util-linux-2.29.1.tar.xz
util-linux-losetup-Add-support-for-setting-logical-blocksize.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-libmount.spec ++++++
--- /var/tmp/diff_new_pack.6w7rsQ/_old 2017-03-01 23:39:15.182371932 +0100
+++ /var/tmp/diff_new_pack.6w7rsQ/_new 2017-03-01 23:39:15.186371368 +0100
@@ -16,7 +16,11 @@
#
+%if 0%{?suse_version} >= 1330
%bcond_without enable_last
+%else
+%bcond_with enable_last
+%endif
Name: python-libmount
%define _name util-linux
@@ -112,7 +116,7 @@
%endif
%endif
#END SECOND STAGE DEPENDENCIES
-Version: 2.29
+Version: 2.29.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
@@ -123,7 +127,7 @@
Url: https://www.kernel.org/pub/linux/utils/util-linux/
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz
Source1: util-linux-rpmlintrc
-Source4: raw.init
+Source4: raw.service
Source5: etc.raw
Source6: etc_filesystems
Source7: baselibs.conf
@@ -150,7 +154,9 @@
## util-linux patches
##
# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path
-Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
+Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
+# PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes.
+Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
%if %build_util_linux
@@ -159,7 +165,6 @@
# bnc#651598:
Provides: util-linux(fake+no-canonicalize)
PreReq: %install_info_prereq permissions
-PreReq: %insserv_prereq %fillup_prereq /bin/sed
Recommends: %{name}-lang = %{version}
Provides: eject = 2.1.0-166.8
Provides: login = 4.0-33.7
@@ -174,6 +179,8 @@
Conflicts: sysvinit-tools < 2.88+-87
# 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
+# The preset is provided by the presets branding package since 0.4 (bsc#1012850)
+Conflicts: systemd-presets-branding < 0.4
# bnc#805684:
%ifarch s390x
Obsoletes: s390-32
@@ -189,6 +196,13 @@
Recommends: adjtimex
Recommends: time
Recommends: which
+#
+%if 0%{?suse_version} < 1330
+# Using Conflicts as util-linux-losetup-Add-support-for-setting-logical-blocksize
+# now uses bit 5 of lo_flags with meaning LO_FLAGS_BLOCKSIZE bsc#966891
+#
+Conflicts: kernel < 4.4
+%endif
%else
%if %build_python_libmount
%else
@@ -383,7 +397,11 @@
%endif
%prep
%setup -q -n %{_name}-%{version} -b 40
-%patch4 -p1
+%patch0 -p1
+%if 0%{?suse_version} < 1330
+# logical block size support in loop does not exist in Tumbleweed and upstream kernel yet
+%patch1 -p1
+%endif
#
# setctsid
cp -p %{S:22} %{S:23} .
@@ -599,7 +617,7 @@
%install
%if %build_util_linux
-mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}}
+mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}}
install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf
install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login
install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote
@@ -608,7 +626,6 @@
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
-mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
pushd ../klogconsole
# klogconsole install
make install DEST=%{buildroot}
@@ -672,8 +689,8 @@
chmod 755 %{buildroot}%{_sbindir}/flushb
# Install scripts to configure raw devices at boot time
install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw
-install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw
-ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw
+install -m 644 $RPM_SOURCE_DIR/raw.service %{buildroot}%{_unitdir}
+ln -sf service %{buildroot}%{_sbindir}/rcraw
# upstream moved getopt examples from datadir to docdir but we keep
# the old location because we would need to fix the manpage first
mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/
@@ -732,14 +749,11 @@
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid
mkdir -p %{buildroot}/run/uuidd
-mkdir -p %{buildroot}/usr/lib/systemd/system-preset
ln -s %{_bindir}/logger %{buildroot}/bin
# clock.txt from uuidd is a ghost file
touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt
ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd
ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim
-# Use socket activated uuidd by default.
-echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/systemd/system-preset/50-uuidd.preset
%if !%build_util_linux
%make_install
%endif
@@ -748,8 +762,11 @@
%fdupes -s %{buildroot}%{_prefix}
%if %build_util_linux
+%pre
+%{service_add_pre raw.service}
+
%post
-%{fillup_and_insserv raw}
+%{service_add_post raw.service}
%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount
%set_permissions %{_bindir}/su
# Safely migrate PAM files from coreutils to util-linux
@@ -775,8 +792,11 @@
sed -i 's:code=:codepage=:' etc/fstab
fi
+%preun
+%{service_del_preun raw.service}
+
%postun
-%{insserv_cleanup}
+%{service_del_postun raw.service}
%verifyscript
%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount
@@ -825,7 +845,6 @@
/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}
%post -n uuidd
%{service_add_post uuidd.socket uuidd.service}
@@ -836,8 +855,6 @@
%postun -n uuidd
%{service_del_postun uuidd.socket uuidd.service}
-%posttrans -p /bin/bash -n uuidd
-%{?systemd_preset_posttrans}
%endif
%if %build_util_linux
@@ -860,7 +877,7 @@
%doc Documentation/modems-with-agetty.txt
%doc Documentation/mount.txt
%doc Documentation/pg.txt
-%config %attr(744,root,root) %{_sysconfdir}/init.d/raw
+%{_unitdir}/raw.service
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw
%config(noreplace) %{_sysconfdir}/filesystems
%config(noreplace) %{_sysconfdir}/blkid.conf
@@ -1115,6 +1132,8 @@
%dir %{_datadir}/getopt
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh
+# These directories should be owned by bash-completion. But we don't want to
+# install them on build, so own these two directories:
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/*
@@ -1251,6 +1270,15 @@
/bin/logger
%{_bindir}/logger
%{_bindir}/lslogins
+#BEGIN bootstrap_hack
+%if 0%{?suse_version} < 1330
+# Build images of some products use util-linux that does not come from this
+# spec and does not own bash-completion dir. So we have to own own these two
+# directories in util-linux-systemd as well:
+%dir %{_datadir}/bash-completion
+%dir %{_datadir}/bash-completion/completions
+%endif
+#END bootstrap_hack
%{_datadir}/bash-completion/completions/logger
%{_datadir}/bash-completion/completions/lslogins
%{_mandir}/man1/logger.1.gz
@@ -1270,7 +1298,6 @@
%{_sbindir}/rcuuidd
%{_unitdir}/uuidd.service
%{_unitdir}/uuidd.socket
-/usr/lib/systemd/system-preset/50-uuidd.preset
%endif
%if %build_python_libmount
++++++ util-linux-systemd.spec ++++++
--- /var/tmp/diff_new_pack.6w7rsQ/_old 2017-03-01 23:39:15.238364036 +0100
+++ /var/tmp/diff_new_pack.6w7rsQ/_new 2017-03-01 23:39:15.242363472 +0100
@@ -16,7 +16,11 @@
#
+%if 0%{?suse_version} >= 1330
%bcond_without enable_last
+%else
+%bcond_with enable_last
+%endif
Name: util-linux-systemd
%define _name util-linux
@@ -112,7 +116,7 @@
%endif
%endif
#END SECOND STAGE DEPENDENCIES
-Version: 2.29
+Version: 2.29.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
@@ -123,7 +127,7 @@
Url: https://www.kernel.org/pub/linux/utils/util-linux/
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz
Source1: util-linux-rpmlintrc
-Source4: raw.init
+Source4: raw.service
Source5: etc.raw
Source6: etc_filesystems
Source7: baselibs.conf
@@ -150,7 +154,9 @@
## util-linux patches
##
# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path
-Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
+Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
+# PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes.
+Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
%if %build_util_linux
@@ -159,7 +165,6 @@
# bnc#651598:
Provides: util-linux(fake+no-canonicalize)
PreReq: %install_info_prereq permissions
-PreReq: %insserv_prereq %fillup_prereq /bin/sed
Recommends: %{name}-lang = %{version}
Provides: eject = 2.1.0-166.8
Provides: login = 4.0-33.7
@@ -174,6 +179,8 @@
Conflicts: sysvinit-tools < 2.88+-87
# 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
+# The preset is provided by the presets branding package since 0.4 (bsc#1012850)
+Conflicts: systemd-presets-branding < 0.4
# bnc#805684:
%ifarch s390x
Obsoletes: s390-32
@@ -189,6 +196,13 @@
Recommends: adjtimex
Recommends: time
Recommends: which
+#
+%if 0%{?suse_version} < 1330
+# Using Conflicts as util-linux-losetup-Add-support-for-setting-logical-blocksize
+# now uses bit 5 of lo_flags with meaning LO_FLAGS_BLOCKSIZE bsc#966891
+#
+Conflicts: kernel < 4.4
+%endif
%else
%if %build_python_libmount
%else
@@ -383,7 +397,11 @@
%endif
%prep
%setup -q -n %{_name}-%{version} -b 40
-%patch4 -p1
+%patch0 -p1
+%if 0%{?suse_version} < 1330
+# logical block size support in loop does not exist in Tumbleweed and upstream kernel yet
+%patch1 -p1
+%endif
#
# setctsid
cp -p %{S:22} %{S:23} .
@@ -599,7 +617,7 @@
%install
%if %build_util_linux
-mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}}
+mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}}
install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf
install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login
install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote
@@ -608,7 +626,6 @@
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
-mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
pushd ../klogconsole
# klogconsole install
make install DEST=%{buildroot}
@@ -672,8 +689,8 @@
chmod 755 %{buildroot}%{_sbindir}/flushb
# Install scripts to configure raw devices at boot time
install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw
-install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw
-ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw
+install -m 644 $RPM_SOURCE_DIR/raw.service %{buildroot}%{_unitdir}
+ln -sf service %{buildroot}%{_sbindir}/rcraw
# upstream moved getopt examples from datadir to docdir but we keep
# the old location because we would need to fix the manpage first
mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/
@@ -732,14 +749,11 @@
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid
mkdir -p %{buildroot}/run/uuidd
-mkdir -p %{buildroot}/usr/lib/systemd/system-preset
ln -s %{_bindir}/logger %{buildroot}/bin
# clock.txt from uuidd is a ghost file
touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt
ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd
ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim
-# Use socket activated uuidd by default.
-echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/systemd/system-preset/50-uuidd.preset
%if !%build_util_linux
%make_install
%endif
@@ -748,8 +762,11 @@
%fdupes -s %{buildroot}%{_prefix}
%if %build_util_linux
+%pre
+%{service_add_pre raw.service}
+
%post
-%{fillup_and_insserv raw}
+%{service_add_post raw.service}
%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount
%set_permissions %{_bindir}/su
# Safely migrate PAM files from coreutils to util-linux
@@ -775,8 +792,11 @@
sed -i 's:code=:codepage=:' etc/fstab
fi
+%preun
+%{service_del_preun raw.service}
+
%postun
-%{insserv_cleanup}
+%{service_del_postun raw.service}
%verifyscript
%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount
@@ -825,7 +845,6 @@
/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}
%post -n uuidd
%{service_add_post uuidd.socket uuidd.service}
@@ -836,8 +855,6 @@
%postun -n uuidd
%{service_del_postun uuidd.socket uuidd.service}
-%posttrans -p /bin/bash -n uuidd
-%{?systemd_preset_posttrans}
%endif
%if %build_util_linux
@@ -860,7 +877,7 @@
%doc Documentation/modems-with-agetty.txt
%doc Documentation/mount.txt
%doc Documentation/pg.txt
-%config %attr(744,root,root) %{_sysconfdir}/init.d/raw
+%{_unitdir}/raw.service
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw
%config(noreplace) %{_sysconfdir}/filesystems
%config(noreplace) %{_sysconfdir}/blkid.conf
@@ -1115,6 +1132,8 @@
%dir %{_datadir}/getopt
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh
+# These directories should be owned by bash-completion. But we don't want to
+# install them on build, so own these two directories:
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/*
@@ -1251,6 +1270,15 @@
/bin/logger
%{_bindir}/logger
%{_bindir}/lslogins
+#BEGIN bootstrap_hack
+%if 0%{?suse_version} < 1330
+# Build images of some products use util-linux that does not come from this
+# spec and does not own bash-completion dir. So we have to own own these two
+# directories in util-linux-systemd as well:
+%dir %{_datadir}/bash-completion
+%dir %{_datadir}/bash-completion/completions
+%endif
+#END bootstrap_hack
%{_datadir}/bash-completion/completions/logger
%{_datadir}/bash-completion/completions/lslogins
%{_mandir}/man1/logger.1.gz
@@ -1270,7 +1298,6 @@
%{_sbindir}/rcuuidd
%{_unitdir}/uuidd.service
%{_unitdir}/uuidd.socket
-/usr/lib/systemd/system-preset/50-uuidd.preset
%endif
%if %build_python_libmount
++++++ util-linux.spec ++++++
--- /var/tmp/diff_new_pack.6w7rsQ/_old 2017-03-01 23:39:15.274358960 +0100
+++ /var/tmp/diff_new_pack.6w7rsQ/_new 2017-03-01 23:39:15.278358395 +0100
@@ -16,7 +16,11 @@
#
+%if 0%{?suse_version} >= 1330
%bcond_without enable_last
+%else
+%bcond_with enable_last
+%endif
Name: util-linux
%define _name util-linux
@@ -112,7 +116,7 @@
%endif
%endif
#END SECOND STAGE DEPENDENCIES
-Version: 2.29
+Version: 2.29.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
@@ -123,7 +127,7 @@
Url: https://www.kernel.org/pub/linux/utils/util-linux/
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.29/%{_name}-%{version}.tar.xz
Source1: util-linux-rpmlintrc
-Source4: raw.init
+Source4: raw.service
Source5: etc.raw
Source6: etc_filesystems
Source7: baselibs.conf
@@ -150,7 +154,9 @@
## util-linux patches
##
# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path
-Patch4: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
+Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
+# PATCH-FEATURE-SLE util-linux-losetup-Add-support-for-setting-logical-blocksize.patch bsc931634 FATE319010 hare@suse.de -- Add support for setting logical blocksizes.
+Patch1: util-linux-losetup-Add-support-for-setting-logical-blocksize.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
%if %build_util_linux
@@ -159,7 +165,6 @@
# bnc#651598:
Provides: util-linux(fake+no-canonicalize)
PreReq: %install_info_prereq permissions
-PreReq: %insserv_prereq %fillup_prereq /bin/sed
Recommends: %{name}-lang = %{version}
Provides: eject = 2.1.0-166.8
Provides: login = 4.0-33.7
@@ -174,6 +179,8 @@
Conflicts: sysvinit-tools < 2.88+-87
# 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
+# The preset is provided by the presets branding package since 0.4 (bsc#1012850)
+Conflicts: systemd-presets-branding < 0.4
# bnc#805684:
%ifarch s390x
Obsoletes: s390-32
@@ -189,6 +196,13 @@
Recommends: adjtimex
Recommends: time
Recommends: which
+#
+%if 0%{?suse_version} < 1330
+# Using Conflicts as util-linux-losetup-Add-support-for-setting-logical-blocksize
+# now uses bit 5 of lo_flags with meaning LO_FLAGS_BLOCKSIZE bsc#966891
+#
+Conflicts: kernel < 4.4
+%endif
%else
%if %build_python_libmount
%else
@@ -383,7 +397,11 @@
%endif
%prep
%setup -q -n %{_name}-%{version} -b 40
-%patch4 -p1
+%patch0 -p1
+%if 0%{?suse_version} < 1330
+# logical block size support in loop does not exist in Tumbleweed and upstream kernel yet
+%patch1 -p1
+%endif
#
# setctsid
cp -p %{S:22} %{S:23} .
@@ -599,7 +617,7 @@
%install
%if %build_util_linux
-mkdir -p %{buildroot}{%{_sysconfdir}/{init.d,pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}}
+mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}}
install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf
install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login
install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote
@@ -608,7 +626,6 @@
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
-mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
pushd ../klogconsole
# klogconsole install
make install DEST=%{buildroot}
@@ -672,8 +689,8 @@
chmod 755 %{buildroot}%{_sbindir}/flushb
# Install scripts to configure raw devices at boot time
install -m 644 $RPM_SOURCE_DIR%{_sysconfdir}.raw %{buildroot}%{_sysconfdir}/raw
-install -m 755 $RPM_SOURCE_DIR/raw.init %{buildroot}%{_initddir}/raw
-ln -sf ../..%{_sysconfdir}/init.d/raw %{buildroot}%{_sbindir}/rcraw
+install -m 644 $RPM_SOURCE_DIR/raw.service %{buildroot}%{_unitdir}
+ln -sf service %{buildroot}%{_sbindir}/rcraw
# upstream moved getopt examples from datadir to docdir but we keep
# the old location because we would need to fix the manpage first
mv %{buildroot}%{_docdir}/%{_name}/getopt %{buildroot}%{_datadir}/
@@ -732,14 +749,11 @@
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_localstatedir}/lib/libuuid
mkdir -p %{buildroot}/run/uuidd
-mkdir -p %{buildroot}/usr/lib/systemd/system-preset
ln -s %{_bindir}/logger %{buildroot}/bin
# clock.txt from uuidd is a ghost file
touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt
ln -sf /sbin/service %{buildroot}/usr/sbin/rcuuidd
ln -sf /sbin/service %{buildroot}/usr/sbin/rcfstrim
-# Use socket activated uuidd by default.
-echo -e 'enable uuidd.socket\nenable uuidd.service' >%{buildroot}/usr/lib/systemd/system-preset/50-uuidd.preset
%if !%build_util_linux
%make_install
%endif
@@ -748,8 +762,11 @@
%fdupes -s %{buildroot}%{_prefix}
%if %build_util_linux
+%pre
+%{service_add_pre raw.service}
+
%post
-%{fillup_and_insserv raw}
+%{service_add_post raw.service}
%set_permissions %{_bindir}/wall %{_bindir}/write %{_bindir}/mount %{_bindir}/umount
%set_permissions %{_bindir}/su
# Safely migrate PAM files from coreutils to util-linux
@@ -775,8 +792,11 @@
sed -i 's:code=:codepage=:' etc/fstab
fi
+%preun
+%{service_del_preun raw.service}
+
%postun
-%{insserv_cleanup}
+%{service_del_postun raw.service}
%verifyscript
%verify_permissions -e %{_bindir}/wall -e %{_bindir}/write -e %{_bindir}/mount -e %{_bindir}/umount
@@ -825,7 +845,6 @@
/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}
%post -n uuidd
%{service_add_post uuidd.socket uuidd.service}
@@ -836,8 +855,6 @@
%postun -n uuidd
%{service_del_postun uuidd.socket uuidd.service}
-%posttrans -p /bin/bash -n uuidd
-%{?systemd_preset_posttrans}
%endif
%if %build_util_linux
@@ -860,7 +877,7 @@
%doc Documentation/modems-with-agetty.txt
%doc Documentation/mount.txt
%doc Documentation/pg.txt
-%config %attr(744,root,root) %{_sysconfdir}/init.d/raw
+%{_unitdir}/raw.service
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw
%config(noreplace) %{_sysconfdir}/filesystems
%config(noreplace) %{_sysconfdir}/blkid.conf
@@ -1115,6 +1132,8 @@
%dir %{_datadir}/getopt
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh
+# These directories should be owned by bash-completion. But we don't want to
+# install them on build, so own these two directories:
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/*
@@ -1251,6 +1270,15 @@
/bin/logger
%{_bindir}/logger
%{_bindir}/lslogins
+#BEGIN bootstrap_hack
+%if 0%{?suse_version} < 1330
+# Build images of some products use util-linux that does not come from this
+# spec and does not own bash-completion dir. So we have to own own these two
+# directories in util-linux-systemd as well:
+%dir %{_datadir}/bash-completion
+%dir %{_datadir}/bash-completion/completions
+%endif
+#END bootstrap_hack
%{_datadir}/bash-completion/completions/logger
%{_datadir}/bash-completion/completions/lslogins
%{_mandir}/man1/logger.1.gz
@@ -1270,7 +1298,6 @@
%{_sbindir}/rcuuidd
%{_unitdir}/uuidd.service
%{_unitdir}/uuidd.socket
-/usr/lib/systemd/system-preset/50-uuidd.preset
%endif
%if %build_python_libmount
++++++ etc.raw ++++++
--- /var/tmp/diff_new_pack.6w7rsQ/_old 2017-03-01 23:39:15.450334143 +0100
+++ /var/tmp/diff_new_pack.6w7rsQ/_new 2017-03-01 23:39:15.450334143 +0100
@@ -4,12 +4,12 @@
# to block devices
#
# The format of this file is:
-# raw<N>:<blockdev>
+# raw<N>:<blockdev>
#
# example:
# ---------
-# raw1:hdb1
+# raw1:sdb1
#
-# this means: bind /dev/raw/raw1 to /dev/hdb1
+# this means: bind /dev/raw/raw1 to /dev/sdb1
#
# ...
++++++ raw.service ++++++
[Unit]
Description=raw devices
After=local-fs.target remote-fs.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c "\
/sbin/modprobe raw;\
/sbin/udevadm settle;\
for i in `grep -v ^# /etc/raw`; do\
rawdev=`echo $i | cut -f1 -d:`;\
rawbind=`echo $i | cut -f2- -d:`;\
/usr/sbin/raw /dev/raw/$rawdev /dev/$rawbind;\
done"
[Install]
WantedBy=multi-user.target
++++++ util-linux-2.29.tar.xz -> util-linux-2.29.1.tar.xz ++++++
++++ 73427 lines of diff (skipped)
++++++ util-linux-losetup-Add-support-for-setting-logical-blocksize.patch ++++++
Index: util-linux-2.29/include/loopdev.h
===================================================================
--- util-linux-2.29.orig/include/loopdev.h
+++ util-linux-2.29/include/loopdev.h
@@ -41,6 +41,7 @@ enum {
LO_FLAGS_AUTOCLEAR = 4, /* kernel >= 2.6.25 */
LO_FLAGS_PARTSCAN = 8, /* kernel >= 3.2 */
LO_FLAGS_DIRECT_IO = 16, /* kernel >= 4.2 */
+ LO_FLAGS_BLOCKSIZE = 32, /* Tentative */
};
#define LO_NAME_SIZE 64
@@ -120,7 +121,8 @@ enum {
LOOPDEV_FL_NOIOCTL = (1 << 6),
LOOPDEV_FL_DEVSUBDIR = (1 << 7),
LOOPDEV_FL_CONTROL = (1 << 8), /* system with /dev/loop-control */
- LOOPDEV_FL_SIZELIMIT = (1 << 9)
+ LOOPDEV_FL_SIZELIMIT = (1 << 9),
+ LOOPDEV_FL_BLOCKSIZE = (1 << 10)
};
/*
@@ -173,6 +175,7 @@ int loopcxt_set_offset(struct loopdev_cx
int loopcxt_set_sizelimit(struct loopdev_cxt *lc, uint64_t sizelimit);
int loopcxt_set_flags(struct loopdev_cxt *lc, uint32_t flags);
int loopcxt_set_backing_file(struct loopdev_cxt *lc, const char *filename);
+int loopcxt_set_blocksize(struct loopdev_cxt *lc, uint64_t blocksize);
extern char *loopcxt_get_backing_file(struct loopdev_cxt *lc);
extern int loopcxt_get_backing_devno(struct loopdev_cxt *lc, dev_t *devno);
Index: util-linux-2.29/lib/loopdev.c
===================================================================
--- util-linux-2.29.orig/lib/loopdev.c
+++ util-linux-2.29/lib/loopdev.c
@@ -1115,6 +1115,26 @@ int loopcxt_set_backing_file(struct loop
}
/*
+ * @lc: context
+ * @blocksize: logical blocksize for the device
+ *
+ * The setting is removed by loopcxt_set_device() loopcxt_next()!
+ *
+ * Returns: 0 on success, <0 on error.
+ */
+int loopcxt_set_blocksize(struct loopdev_cxt *lc, uint64_t blocksize)
+{
+ if (!lc)
+ return -EINVAL;
+
+ lc->info.lo_init[0] = blocksize;
+ lc->info.lo_flags |= LO_FLAGS_BLOCKSIZE;
+
+ DBG(CXT, ul_debugobj(lc, "set blocksize=%llu", (long long unsigned int)lc->info.lo_init[0]));
+ return 0;
+}
+
+/*
* In kernels prior to v3.9, if the offset or sizelimit options
* are used, the block device's size won't be synced automatically.
* blockdev --getsize64 and filesystems will use the backing
Index: util-linux-2.29/sys-utils/losetup.c
===================================================================
--- util-linux-2.29.orig/sys-utils/losetup.c
+++ util-linux-2.29/sys-utils/losetup.c
@@ -398,6 +398,7 @@ static void usage(FILE *out)
fputs(_(" -o, --offset <num> start at offset <num> into file\n"), out);
fputs(_(" --sizelimit <num> device is limited to <num> bytes of the file\n"), out);
+ fputs(_(" -L, --logical-blocksize <size> set the logical block size to <size>\n"), out);
fputs(_(" -P, --partscan create a partitioned loop device\n"), out);
fputs(_(" -r, --read-only set up a read-only loop device\n"), out);
fputs(_(" --direct-io[=