From 7cf338d87c84d791dbb8db10a56468114fdccef5a3492f3179957632c8d8daf8 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Thu, 8 Dec 2022 23:16:30 +0000 Subject: [PATCH] Accepting request 1041741 from home:sbrabec:branches:util-linux-multibuild-per-parts - Convert the build back to per-parts build, just use multibuild. - libuuid continuous clock handling for time based UUIDs: Prevent use of the new libuuid ABI by uuidd %post before update of libuuid1 (bsc#1205646). OBS-URL: https://build.opensuse.org/request/show/1041741 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=475 --- _multibuild | 2 +- util-linux.changes | 12 ++ util-linux.spec | 405 ++++++++++++++++++++++++++++++++------------- 3 files changed, 299 insertions(+), 120 deletions(-) diff --git a/_multibuild b/_multibuild index b03821e..704c833 100644 --- a/_multibuild +++ b/_multibuild @@ -1,4 +1,4 @@ - mini + systemd python diff --git a/util-linux.changes b/util-linux.changes index 59b7cd3..4e13aa7 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Dec 8 21:02:08 UTC 2022 - Stanislav Brabec + +- Convert the build back to per-parts build, just use multibuild. + +------------------------------------------------------------------- +Thu Dec 1 18:36:38 UTC 2022 - Stanislav Brabec + +- libuuid continuous clock handling for time based UUIDs: + Prevent use of the new libuuid ABI by uuidd %post before update + of libuuid1 (bsc#1205646). + ------------------------------------------------------------------- Thu Sep 15 12:42:41 UTC 2022 - Stanislav Brabec diff --git a/util-linux.spec b/util-linux.spec index 8dab097..a92097f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -18,32 +18,34 @@ %global flavor @BUILD_FLAVOR@%{nil} +# Parts description: +# core: libraries, all binaries except those dependent on libsystemd +# systemd: binaries dependent on systemd, man pages (generator is dependent on ruby) +# python: Python bindings + %if "%{flavor}" == "" +%define psuffix -core %define ulbuild base -%define ulmode full +%define ulsubset core +%endif + +%if "%{flavor}" == "systemd" +%define ulbuild base +%define ulsubset systemd %endif # All python flavors are build separately. No module can be built together with base. # This is a limitation of %%python_subpackages. %if "%{flavor}" == "python" %define ulbuild python -%define ulmode full %endif -%if "%{flavor}" == "mini" -%define psuffix -mini -%define ulbuild base -%define ulmode bootstrap -%define ul_extra_bin_sbin 0 -%define ul_suid 0755 -%else %if !0%{?usrmerged} %define ul_extra_bin_sbin 1 %else %define ul_extra_bin_sbin 0 %endif %define ul_suid 4755 -%endif %define _name util-linux @@ -53,7 +55,6 @@ %define no_config 1 %endif -%if "%ulmode" == "full" %define ulprefix %{_prefix} %define ulexecprefix %{_exec_prefix} %define ulbindir %{_bindir} @@ -68,31 +69,14 @@ %define uldistconfdir %{_distconfdir} %define ulsysconfdir %{_sysconfdir} %define ulpamdir %{_pam_vendordir} -%else -%define ulprefix %{_libexecdir}/build/staging -%define ulexecprefix %{_libexecdir}/build/staging -%define ulbindir %{ulprefix}/bin -%define ullibdir %{ulprefix}/%{_lib} -%define ullibexecdir %{ulprefix}/libexec -%define ulincludedir %{ulprefix}/include -%define ulsbindir %{ulprefix}/sbin -%define uldatadir %{ulprefix}/share -%define ulmandir %{uldatadir}/man -%define ulinfodir %{uldatadir}/info -%define uldocdir %{uldatadir}/doc -%define uldistconfdir %{ulprefix}/etc -%define ulsysconfdir %{ulprefix}/etc -# HACK: We have to make a possible conflict here. But hopefully, equal files don't conflict in RPM. -%define ulpamdir %{_pam_vendordir} -%endif %if "%ulbuild" == "base" -%if "%ulmode" == "full" +%if "%ulsubset" == "core" Name: util-linux -Summary: A collection of basic system utilities +Summary: A collection of basic system utilities (core part) %else -Name: util-linux-mini -Summary: A collection of basic system utilities (bootstrap package) +Name: util-linux-systemd +Summary: A collection of basic system utilities (systemd dependent part) %endif Group: System/Base %else @@ -130,6 +114,7 @@ BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel BuildRequires: fdupes +BuildRequires: file-devel BuildRequires: gettext-devel BuildRequires: libcap-ng-devel BuildRequires: libeconf-devel @@ -148,9 +133,8 @@ BuildRequires: zlib-devel %ifarch ppc ppc64 ppc64le BuildRequires: librtas-devel %endif -%if "%ulmode" == "full" +%if "%ulsubset" == "systemd" BuildRequires: bash-completion -BuildRequires: file-devel BuildRequires: libudev-devel BuildRequires: socat BuildRequires: systemd-rpm-macros @@ -161,10 +145,12 @@ Requires: adjtimex Requires: time Requires: which PreReq: %install_info_prereq +# man pages were moved to -systemd subpackage with 2.38.x (SLE15 SP6, Leap 15.6) +Conflicts: util-linux < 2.38 %systemd_requires %endif %if "%ulbuild" == "base" -%if "%ulmode" == "full" +%if "%ulsubset" == "core" Provides: fsck-with-dev-lock = %{version} # bnc#651598: Provides: util-linux(fake+no-canonicalize) @@ -181,16 +167,10 @@ Obsoletes: rfkill <= 0.5 # The last version was 1.0+git.e66999f. Provides: hardlink = 1.1 Obsoletes: hardlink < 1.1 -# util-linux-systemd was a SUSE specific package split. Now the staging is done in -mini package. -# (before Leap 16 and SLE15 SP6) -Provides: util-linux-systemd = %{version} -Obsoletes: util-linux-systemd < 2.38 # bnc#805684: %ifarch s390x Obsoletes: s390-32 Provides: s390-32 -Provides: util-linux-mini = %{version} -Obsoletes: util-linux-mini <= %{version} %endif Supplements: filesystem(minix) # All login.defs variables require support from shadow side. @@ -205,26 +185,17 @@ Conflicts: kernel < 5.8 %endif %if "%ulbuild" == "python" BuildRequires: %{python_module devel} +BuildRequires: rubygem(asciidoctor) %python_subpackages %endif -#HACK: Change to 1 to make quilt happy. Change to 0 to build. -%if 0 -%description -n python-libmount -%endif - %if "%ulbuild" == "base" %description This package contains a large variety of low-level system utilities that are necessary for a Linux system to function. It contains the mount program, the fdisk configuration tool, and more. -%if "%ulmode" == "bootstrap" -This is a special version of the util-linux package for the build -bootstrap. It is not intended for a standard use. -%endif - -%if "%ulmode" == "full" +%if "%ulsubset" == "core" %package -n libblkid1 Summary: Filesystem detection library License: LGPL-2.1-or-later @@ -338,6 +309,9 @@ Files to develop applications using the libsmartcols library. Summary: Library to generate UUIDs License: BSD-3-Clause Group: System/Libraries +# declare presence of the new ABI call __uuid_generate_time_cont +# Required for seamless update from older versions (SLE15 SP4, Leap 15.4 and older). +Provides: libuuid__uuid_generate_time_cont %description -n libuuid1 A library to generate universally unique IDs (UUIDs). @@ -362,11 +336,17 @@ Requires: libuuid-devel = %{version} Files to develop applications using the library to generate universally unique IDs (UUIDs). +%lang_package +%endif +%if "%ulsubset" == "systemd" %package -n uuidd Summary: Helper daemon to guarantee uniqueness of time-based UUIDs License: GPL-2.0-or-later Group: System/Filesystems Requires(pre): group(uuidd) +# uuidd restart requires the ABI of the new libuuid +# Required for seamless update from older versions (SLE15 SP4, Leap 15.4 and older). +Requires(post): libuuid__uuid_generate_time_cont # uuidd bash-completion moved to a correct package Conflicts: util-linux < 2.25 # uuid-runtime appeared in SLE11 SP1 to SLE11 SP3 @@ -379,7 +359,6 @@ The uuidd package contains a userspace daemon (uuidd) which guarantees uniqueness of time-based UUID generation even at very high rates on SMP systems. -%lang_package %endif %endif @@ -442,21 +421,12 @@ function configure_and_build() { --enable-sulogin-emergency-mount\ --disable-use-tty-group\ --disable-rpath\ - --enable-all-programs\ --disable-chfn-chsh\ --disable-newgrp\ --disable-vipw\ --disable-pg\ --enable-fs-paths-default="/sbin:/usr/sbin"\ -%if "%ulmode" == "bootstrap" - --disable-static\ - --without-systemd\ - --disable-nls\ - --disable-uuidd\ -%else --enable-static\ - --with-systemd\ -%endif %if "%ulbuild" == "python" --disable-all-programs\ --with-python\ @@ -464,6 +434,12 @@ function configure_and_build() { --enable-libmount\ --enable-libblkid\ %else + --enable-all-programs\ +%if "%ulsubset" == "core" + --without-systemd\ +%else + --with-systemd\ +%endif --without-python\ %endif --with-vendordir=%{uldistconfdir} @@ -471,6 +447,25 @@ make %{?_smp_mflags} } %if "%ulbuild" == "base" configure_and_build +%if "%ulsubset" == "core" +bash ./util-linux-login_defs-check.sh +#BEGIN SYSTEMD SAFETY CHECK +# With systemd, some utilities are built differently. Keep track of these +# sources to prevent building of systemd-less versions. +# +# WARNING: Never edit following line without doing all suggested in the echo below! +UTIL_LINUX_KNOWN_SYSTEMD_DEPS='./login-utils/lslogins.c ./misc-utils/findmnt.c ./misc-utils/logger.c ./misc-utils/lsblk-properties.c ./misc-utils/uuidd.c ' +UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(grep -rl 'HAVE_LIB\(SYSTEMD\|UDEV\)' . | fgrep '.c' | LC_ALL=C sort | tr '\n' ' ') +if test "$UTIL_LINUX_KNOWN_SYSTEMD_DEPS" != "$UTIL_LINUX_FOUND_SYSTEMD_DEPS" ; then + echo "List of utilities depending on systemd have changed. +Please check the new util-linux-systemd file list, file removal and update of Conflicts for safe update! +Then update configure options to build what needed. +Only then you can safely update following spec file line: +UTIL_LINUX_KNOWN_SYSTEMD_DEPS='$UTIL_LINUX_FOUND_SYSTEMD_DEPS'" + exit 1 +fi +#END SYSTEMD SAFETY CHECK +%endif %endif %if "%ulbuild" == "python" %{python_expand export PYTHON=$python @@ -550,15 +545,12 @@ done # login is always and only in /bin mv %{buildroot}%{ulbindir}/login %{buildroot}/bin/ %endif -%if "%ulmode" == "full" +%if "%ulsubset" == "core" +%find_lang %{_name} %{name}.lang +%else +echo -n "" >%{name}.lang ln -sf /sbin/service %{buildroot}%{ulsbindir}/rcuuidd ln -sf /sbin/service %{buildroot}%{ulsbindir}/rcfstrim -%find_lang %{name} %{name}.lang -%endif -%if "%ulmode" == "bootstrap" -rm -r %{buildroot}{%{ulmandir},%{ulincludedir},%{ullibdir}/{pkgconfig,*.{la,so}},%{uldocdir}} -mkdir -p %{buildroot}/etc/profile.d -echo -e 'PATH=$PATH:%{ulsbindir}:%{ulbindir}\nexport PATH' >%{buildroot}/etc/profile.d/%{name}.sh %endif %endif %if "%ulbuild" == "python" @@ -572,13 +564,9 @@ rm -r %{buildroot}{%{ulbindir},%{ulmandir},%{uldatadir},%{ulincludedir},%{ullibd %endif # Link duplicate manpages or python bindings. %fdupes -s %{buildroot}%{ulprefix} -%if "%ulmode" == "bootstrap" -# Does not work for files installed by %%doc. -%fdupes -s %{buildroot}%{_prefix} -%endif %if "%ulbuild" == "base" -%if "%ulmode" == "full" +%if "%ulbuild" != "python" %check # Perform testsuite with the standard build only. # mark some tests "known_fail" @@ -619,25 +607,27 @@ make %{?_smp_mflags} check || result="1" diffs_files="$(find tests/diff -type f | sort)" echo "$diffs_files" | xargs -r cat exit "$result" -%endif -%if "%ulmode" == "full" +%if "%ulsubset" == "core" %verifyscript %verify_permissions -e %{ulbindir}/wall -e %{ulbindir}/write -e %{ulbindir}/mount -e %{ulbindir}/umount %verify_permissions -e %{ulbindir}/su + %endif %pre +%if "%ulsubset" == "core" # move outdated pam.d/*.rpmsave files away for i in login remote runuser runuser-l su su-l ; do test -f /etc/pam.d/${i}.rpmsave && mv -v /etc/pam.d/${i}.rpmsave /etc/pam.d/${i}.rpmsave.old ||: done -%if "%ulmode" == "full" +%endif +%if "%ulsubset" == "systemd" %service_add_pre fstrim.service fstrim.timer %endif -%if "%ulmode" == "full" %post +%if "%ulsubset" == "core" %set_permissions %{ulbindir}/wall %{ulbindir}/write %{ulbindir}/mount %{ulbindir}/umount %set_permissions %{ulbindir}/su %if ! %{defined no_config} @@ -666,6 +656,7 @@ if ! grep -q "^# /etc/default/su is an override" %{ulsysconfdir}/default/su ; th fi fi %endif +%if "%ulsubset" == "systemd" %service_add_post fstrim.service fstrim.timer %preun @@ -673,7 +664,9 @@ fi %postun %service_del_postun fstrim.service fstrim.timer +%endif +%if "%ulsubset" == "core" %if %{defined no_config} %posttrans # Migration to /usr/etc. @@ -702,6 +695,8 @@ done %postun -n libfdisk1 -p /sbin/ldconfig +%endif +%if "%ulsubset" == "systemd" %if 0%{?suse_version} >= 1330 %pre -n uuidd %else @@ -729,9 +724,12 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %{service_del_postun uuidd.socket uuidd.service} %endif +%endif + %files -n %{name} -f %{name}.files %defattr(-,root,root) # +%if "%ulsubset" == "core" # Common files for all archs %doc AUTHORS ChangeLog README NEWS %license README.licensing @@ -741,6 +739,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %attr(-,uuidd,uuidd) %ghost %{_sharedstatedir}/libuuid/clock.txt %config(noreplace) %{ulsysconfdir}/filesystems %config(noreplace) %{ulsysconfdir}/blkid.conf +%endif %if %{defined no_config} %{ulpamdir}/login %{ulpamdir}/remote @@ -765,7 +764,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %endif %config %dir %{ulsysconfdir}/issue.d %if %{ul_extra_bin_sbin} -/bin/findmnt +%exclude /bin/findmnt /bin/kill %verify(not mode) %attr(%ul_suid,root,root) /bin/su /bin/dmesg @@ -773,8 +772,8 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %verify(not mode) %attr(%ul_suid,root,root) /bin/mount %verify(not mode) %attr(%ul_suid,root,root) /bin/umount /bin/login -/bin/logger -/bin/lsblk +%exclude /bin/logger +%exclude /bin/lsblk /sbin/agetty /sbin/blockdev /sbin/ctrlaltdel @@ -828,18 +827,18 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %{ulbindir}/last %{ulbindir}/lastb %{ulbindir}/line -%{ulbindir}/logger +%exclude %{ulbindir}/logger %{ulbindir}/look %if !%{ul_extra_bin_sbin} %{ulbindir}/login %endif -%{ulbindir}/lsblk +%exclude %{ulbindir}/lsblk %{ulbindir}/lscpu %{ulbindir}/lsfd %{ulbindir}/lsipc %{ulbindir}/lsirq %{ulbindir}/lslocks -%{ulbindir}/lslogins +%exclude %{ulbindir}/lslogins %{ulbindir}/lsmem %{ulbindir}/lsns %{ulbindir}/mcookie @@ -913,13 +912,12 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %{ulsbindir}/zramctl %{ulsbindir}/flushb %{ulsbindir}/readprofile +# These directories should be owned by bash-completion. But we don't want to +# install them on build, so own these two directories: +%dir %{uldatadir}/bash-completion +%dir %{uldatadir}/bash-completion/completions %{uldatadir}/bash-completion/completions/* -%if "%ulmode" == "bootstrap" -%config /etc/profile.d/%{name}.sh -%endif # -# Common files for all archs not intended for mini package -%if "%ulmode" == "full" %exclude %{uldatadir}/bash-completion/completions/uuidd # util-linux documentation files %doc Documentation/blkid.txt @@ -933,6 +931,199 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %doc Documentation/mount.txt %doc Documentation/pg.txt %{uldocdir}/%{name}/getopt-example.* +%exclude %{ulmandir}/man*/* +%exclude %{ulsbindir}/uuidd +%endif +%if "%ulsubset" == "systemd" +%exclude %attr(-,uuidd,uuidd) %dir %{_sharedstatedir}/libuuid +%exclude %attr(-,uuidd,uuidd) %ghost %{_sharedstatedir}/libuuid/clock.txt +%exclude %config(noreplace) %{ulsysconfdir}/filesystems +%exclude %config(noreplace) %{ulsysconfdir}/blkid.conf +%if %{defined no_config} +%exclude %{ulpamdir}/login +%exclude %{ulpamdir}/remote +%exclude %{ulpamdir}/runuser +%exclude %{ulpamdir}/runuser-l +%exclude %{ulpamdir}/su +%exclude %{ulpamdir}/su-l +%if 0%{?suse_version} <= 1520 +%exclude %dir %{uldistconfdir}/default +%endif +%exclude %{uldistconfdir}/default/runuser +%exclude %{uldistconfdir}/default/su +%else +%exclude %config(noreplace) %{ulpamdir}/login +%exclude %config(noreplace) %{ulpamdir}/remote +%exclude %config(noreplace) %{ulpamdir}/runuser +%exclude %config(noreplace) %{ulpamdir}/runuser-l +%exclude %config(noreplace) %{ulpamdir}/su +%exclude %config(noreplace) %{ulpamdir}/su-l +%exclude %config(noreplace) %{ulsysconfdir}/default/runuser +%exclude %config(noreplace) %{ulsysconfdir}/default/su +%endif +%exclude %config %dir %{ulsysconfdir}/issue.d +%if %{ul_extra_bin_sbin} +%exclude /bin/findmnt +%exclude /bin/kill +%exclude %verify(not mode) %attr(%ul_suid,root,root) /bin/su +%exclude /bin/dmesg +%exclude /bin/more +%exclude %verify(not mode) %attr(%ul_suid,root,root) /bin/mount +%exclude %verify(not mode) %attr(%ul_suid,root,root) /bin/umount +%exclude /bin/login +/bin/logger +/bin/lsblk +%exclude /sbin/agetty +%exclude /sbin/blockdev +%exclude /sbin/ctrlaltdel +%exclude /sbin/fsck.minix +%exclude /sbin/fsck.cramfs +%exclude /sbin/losetup +%exclude /sbin/mkfs +%exclude /sbin/mkfs.bfs +%exclude /sbin/mkfs.minix +%exclude /sbin/mkfs.cramfs +%exclude /sbin/mkswap +%exclude /sbin/nologin +%exclude /sbin/pivot_root +%exclude /sbin/swapoff +%exclude /sbin/swapon +%exclude /sbin/blkid +%exclude /sbin/findfs +%exclude /sbin/fsck +%exclude /sbin/switch_root +%exclude /sbin/wipefs +%exclude /sbin/fsfreeze +%exclude /sbin/swaplabel +%exclude /sbin/fstrim +%exclude /sbin/chcpu +%endif +%exclude %{ulbindir}/kill +%exclude %verify(not mode) %attr(%ul_suid,root,root) %{ulbindir}/su +%exclude %{ulbindir}/eject +%exclude %{ulbindir}/cal +%exclude %{ulbindir}/chmem +%exclude %{ulbindir}/choom +%exclude %{ulbindir}/chrt +%exclude %{ulbindir}/col +%exclude %{ulbindir}/colcrt +%exclude %{ulbindir}/colrm +%exclude %{ulbindir}/column +%exclude %{ulbindir}/dmesg +%exclude %{ulbindir}/fallocate +%exclude %{ulbindir}/fincore +%{ulbindir}/findmnt +%exclude %{ulbindir}/flock +%exclude %{ulbindir}/getopt +%exclude %{ulbindir}/hardlink +%exclude %{ulbindir}/hexdump +%exclude %{ulbindir}/ionice +%exclude %{ulbindir}/ipcmk +%exclude %{ulbindir}/ipcrm +%exclude %{ulbindir}/ipcs +%exclude %{ulbindir}/irqtop +%exclude %{ulbindir}/isosize +%exclude %{ulbindir}/last +%exclude %{ulbindir}/lastb +%exclude %{ulbindir}/line +%{ulbindir}/logger +%exclude %{ulbindir}/look +%if !%{ul_extra_bin_sbin} +%exclude %{ulbindir}/login +%endif +%{ulbindir}/lsblk +%exclude %{ulbindir}/lscpu +%exclude %{ulbindir}/lsfd +%exclude %{ulbindir}/lsipc +%exclude %{ulbindir}/lsirq +%{ulbindir}/lslocks +%exclude %{ulbindir}/lslogins +%exclude %{ulbindir}/lsmem +%exclude %{ulbindir}/lsns +%exclude %{ulbindir}/mcookie +%exclude %{ulbindir}/mesg +%exclude %{ulbindir}/more +%exclude %verify(not mode) %attr(%ul_suid,root,root) %{ulbindir}/mount +%exclude %{ulbindir}/namei +%exclude %{ulbindir}/nsenter +%exclude %{ulbindir}/prlimit +%exclude %{ulbindir}/rename +%exclude %{ulbindir}/renice +%exclude %{ulbindir}/rev +%exclude %{ulbindir}/script +%exclude %{ulbindir}/scriptlive +%exclude %{ulbindir}/scriptreplay +%exclude %{ulbindir}/setarch +%exclude %{ulbindir}/setpriv +%exclude %{ulbindir}/setsid +%exclude %{ulbindir}/taskset +%exclude %{ulbindir}/uclampset +%exclude %{ulbindir}/ul +%exclude %verify(not mode)%attr(%ul_suid,root,root) %{ulbindir}/umount +%exclude %{ulbindir}/unshare +%exclude %{ulbindir}/mountpoint +%exclude %{ulbindir}/utmpdump +%exclude %{ulbindir}/uuidgen +%exclude %{ulbindir}/uuidparse +%exclude %{ulbindir}/uname26 +%exclude %{ulbindir}/wdctl +%exclude %{ulsbindir}/addpart +%exclude %{ulsbindir}/agetty +%exclude %{ulsbindir}/blkid +%exclude %{ulsbindir}/blkdiscard +# blkzone depends on linux/blkzoned.h +%if 0%{?suse_version} >= 1330 +%exclude %{ulsbindir}/blkzone +%endif +%exclude %{ulsbindir}/blockdev +%exclude %{ulsbindir}/chcpu +%exclude %{ulsbindir}/ctrlaltdel +%exclude %{ulsbindir}/delpart +%exclude %{ulsbindir}/findfs +%exclude %{ulsbindir}/fsck +%exclude %{ulsbindir}/fsck.minix +%exclude %{ulsbindir}/fsck.cramfs +%exclude %{ulsbindir}/fsfreeze +%exclude %{ulsbindir}/fstrim +%exclude %{ulsbindir}/ldattach +%exclude %{ulsbindir}/losetup +%exclude %{ulsbindir}/mkfs +%exclude %{ulsbindir}/mkfs.bfs +%exclude %{ulsbindir}/mkfs.minix +%exclude %{ulsbindir}/mkfs.cramfs +%exclude %{ulsbindir}/mkswap +%exclude %{ulsbindir}/nologin +%exclude %{ulsbindir}/partx +%exclude %{ulsbindir}/pivot_root +%exclude %{ulsbindir}/resizepart +%exclude %{ulsbindir}/rfkill +%exclude %{ulsbindir}/rtcwake +%exclude %{ulsbindir}/runuser +%exclude %{ulsbindir}/sulogin +%exclude %{ulsbindir}/swaplabel +%exclude %{ulsbindir}/swapoff +%exclude %{ulsbindir}/swapon +%exclude %{ulsbindir}/switch_root +%exclude %{ulsbindir}/wipefs +%verify(not mode) %attr(0755,root,tty) %{ulbindir}/wall +%exclude %{ulbindir}/whereis +%verify(not mode) %attr(0755,root,tty) %{ulbindir}/write +%exclude %{ulsbindir}/zramctl +%exclude %{ulsbindir}/flushb +%exclude %{ulsbindir}/readprofile +# These directories should be owned by bash-completion. But we don't want to +# install them on build, so own these two directories: +%exclude %dir %{uldatadir}/bash-completion +%exclude %dir %{uldatadir}/bash-completion/completions +%exclude %{uldatadir}/bash-completion/completions/* +# +%exclude %{ulsbindir}/uuidd +%exclude %{uldatadir}/bash-completion/completions/uuidd +%exclude %{uldatadir}/locale +%exclude %{ulincludedir}/* +%exclude %{ullibdir}/lib*.* +%exclude %{ullibdir}/pkgconfig/*.pc +%exclude %{uldocdir}/%{name}/getopt-example.* %{ulmandir}/man1/kill.1.gz %{ulmandir}/man1/su.1.gz %{ulmandir}/man1/cal.1.gz @@ -1057,15 +1248,11 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : /sbin/fdisk %endif %{ulsbindir}/fdisk -%if "%ulmode" == "full" %{ulmandir}/man8/fdisk.8.gz %endif -%endif %ifnarch %sparc ia64 m68k -%if "%ulmode" == "full" %{ulmandir}/man8/cfdisk.8.gz %{ulmandir}/man8/sfdisk.8.gz -%endif %if %{ul_extra_bin_sbin} /sbin/cfdisk /sbin/sfdisk @@ -1081,68 +1268,46 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %{ulsbindir}/hwclock %{ulbindir}/setterm %{ulsbindir}/tunelp -%if "%ulmode" == "full" %{ulmandir}/man8/fdformat.8.gz %{ulmandir}/man8/hwclock.8.gz %{ulmandir}/man8/tunelp.8.gz %endif -%endif -# mini package needs to own all sub-filesystem file -%if "%ulmode" == "bootstrap" -%dir %{_libexecdir}/build -%dir %{ulprefix} -%dir %{ulbindir} -%dir %{ullibdir} -%dir %{ulsbindir} -%dir %{uldatadir} -%dir %{uldatadir}/bash-completion -%dir %{uldatadir}/bash-completion/completions -%dir %{ulsysconfdir} -%dir %{ulsysconfdir}/default -%endif -%if "%ulmode" == "full" +%if "%ulsubset" == "core" %files -n libblkid1 %defattr(-, root, root) -%endif %{ullibdir}/libblkid.so.1 %{ullibdir}/libblkid.so.1.* -%if "%ulmode" == "full" %files -n libfdisk1 %defattr(-, root, root) -%endif %{ullibdir}/libfdisk.so.1 %{ullibdir}/libfdisk.so.1.* -%if "%ulmode" == "full" %files -n libmount1 %defattr(-, root, root) -%endif %{ullibdir}/libmount.so.1 %{ullibdir}/libmount.so.1.* -%if "%ulmode" == "full" %files -n libsmartcols1 %defattr(-, root, root) -%endif %{ullibdir}/libsmartcols.so.1 %{ullibdir}/libsmartcols.so.1.* -%if "%ulmode" == "full" %files -n libuuid1 %defattr(-, root, root) -%endif %{ullibdir}/libuuid.so.1 %{ullibdir}/libuuid.so.1.* # # devel, lang and uuidd files are not packaged in staging mode # and packaged separately in full mode -%if "%ulmode" == "full" +# FIXME: Is it needed? # HACK: We have to use "%%files -n" here, otherwise python lua code will # issue an error, even if it is inside a false condition. +%if "%ulsubset" == "core" %files -n %{name}-lang -f %{name}.lang +%endif %files -n libblkid-devel %defattr(-, root, root) @@ -1200,7 +1365,9 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %files -n libuuid-devel-static %defattr(-, root, root) %{ullibdir}/libuuid.*a +%endif +%if "%ulsubset" == "systemd" %files -n uuidd %defattr(-, root, root) %{ulsbindir}/uuidd