add subpackages
This commit is contained in:
parent
b2b8b7b0d5
commit
cb6f4b9cf3
181
util-linux.spec
181
util-linux.spec
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: util-linux
|
Name: util-linux
|
||||||
Version: %{_pre_version__}
|
Version: %{_pre_version__}
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: A random collection of Linux utilities
|
Summary: A random collection of Linux utilities
|
||||||
License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
|
License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
|
||||||
URL: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
|
URL: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
|
||||||
@ -21,9 +21,10 @@ Source9: util-linux-runuser-l.pamd
|
|||||||
BuildRequires: audit-libs-devel >= 1.0.6 gettext-devel libselinux-devel ncurses-devel pam-devel zlib-devel popt-devel
|
BuildRequires: audit-libs-devel >= 1.0.6 gettext-devel libselinux-devel ncurses-devel pam-devel zlib-devel popt-devel
|
||||||
BuildRequires: libutempter-devel systemd-devel systemd libuser-devel libcap-ng-devel python-devel gcc gdb
|
BuildRequires: libutempter-devel systemd-devel systemd libuser-devel libcap-ng-devel python-devel gcc gdb
|
||||||
|
|
||||||
Requires: coreutils pam >= 1.1.3-7, /etc/pam.d/system-auth audit-libs >= 1.0.6 libuser
|
Requires(post): coreutils
|
||||||
|
Requires: pam >= 1.1.3-7, /etc/pam.d/system-auth audit-libs >= 1.0.6
|
||||||
Requires: libblkid = %{version}-%{release} libmount = %{version}-%{release} libsmartcols = %{version}-%{release}
|
Requires: libblkid = %{version}-%{release} libmount = %{version}-%{release} libsmartcols = %{version}-%{release}
|
||||||
Requires: libfdisk = %{version}-%{release} libuuid = %{version}-%{release} systemd systemd-units shadow-utils
|
Requires: libfdisk = %{version}-%{release} libuuid = %{version}-%{release}
|
||||||
|
|
||||||
Conflicts: initscripts < 9.79-4 bash-completion < 1:2.1-1 coreutils < 8.20 sysvinit-tools < 2.88-14
|
Conflicts: initscripts < 9.79-4 bash-completion < 1:2.1-1 coreutils < 8.20 sysvinit-tools < 2.88-14
|
||||||
Conflicts: e2fsprogs < 1.41.8-5 filesystem < 3
|
Conflicts: e2fsprogs < 1.41.8-5 filesystem < 3
|
||||||
@ -32,8 +33,6 @@ Provides: eject = 2.1.6 rfkill = 0.5
|
|||||||
Provides: util-linux-ng = %{version}-%{release}
|
Provides: util-linux-ng = %{version}-%{release}
|
||||||
Provides: /bin/dmesg /bin/kill /bin/more /bin/mount /bin/umount /sbin/blkid
|
Provides: /bin/dmesg /bin/kill /bin/more /bin/mount /bin/umount /sbin/blkid
|
||||||
Provides: /sbin/blockdev /sbin/findfs /sbin/fsck /sbin/nologin
|
Provides: /sbin/blockdev /sbin/findfs /sbin/fsck /sbin/nologin
|
||||||
Provides: libfdisk libsmartcols libmount libblkid libuuid uuidd util-linux-user
|
|
||||||
Obsoletes: libsmartcols libfdisk libmount libblkid libuuid uuidd util-linux-user
|
|
||||||
Obsoletes: eject <= 2.1.5 rfkill <= 0.5 util-linux-ng < 2.19
|
Obsoletes: eject <= 2.1.5 rfkill <= 0.5 util-linux-ng < 2.19
|
||||||
|
|
||||||
Patch0000: 2.28-login-lastlog-create.patch
|
Patch0000: 2.28-login-lastlog-create.patch
|
||||||
@ -44,17 +43,70 @@ Patch6000: fdisk-fix-quit-dialog-for-non-libreadline-version.patch
|
|||||||
The util-linux package contains a random collection of files that
|
The util-linux package contains a random collection of files that
|
||||||
implements some low-level basic linux utilities.
|
implements some low-level basic linux utilities.
|
||||||
|
|
||||||
|
%package -n libfdisk
|
||||||
|
Summary: Library for fdisk-like programs.
|
||||||
|
License: LGPLv2+
|
||||||
|
|
||||||
%package devel
|
%description -n libfdisk
|
||||||
Summary: Development package for ${name}
|
This package contains the library for fdisk-like programs.
|
||||||
License: LGPLv2+
|
|
||||||
Requires: %{name} = %{version}-%{release} pkgconfig
|
|
||||||
Provides: libfdisk-devel libsmartcols-devel libmount-devel libblkid-devel libuuid-devel
|
|
||||||
Obsoletes: libfdisk-devel libsmartcols-devel libmount-devel libblkid-devel libuuid-devel
|
|
||||||
|
|
||||||
%description devel
|
%package -n libsmartcols
|
||||||
This package contains some library and other necessary files for the
|
Summary: Library for column based text sort engine.
|
||||||
development of %{name}.
|
License: LGPLv2+
|
||||||
|
|
||||||
|
%description -n libsmartcols
|
||||||
|
This package contains the library for column based text sort engine.
|
||||||
|
|
||||||
|
%package -n libmount
|
||||||
|
Summary: Library for device mounting
|
||||||
|
License: LGPLv2+
|
||||||
|
Requires: libblkid = %{version}-%{release}
|
||||||
|
Requires: libuuid = %{version}-%{release}
|
||||||
|
Conflicts: filesystem < 3
|
||||||
|
|
||||||
|
%description -n libmount
|
||||||
|
This package is the library for device mounting.
|
||||||
|
|
||||||
|
%package -n libblkid
|
||||||
|
Summary: Library for block device id.
|
||||||
|
License: LGPLv2+
|
||||||
|
Requires: libuuid = %{version}-%{release}
|
||||||
|
Conflicts: filesystem < 3
|
||||||
|
Requires(post): coreutils
|
||||||
|
|
||||||
|
%description -n libblkid
|
||||||
|
This package is le library for block device id.
|
||||||
|
|
||||||
|
%package -n uuidd
|
||||||
|
Summary: UUID generation daemon
|
||||||
|
Requires: libuuid = %{version}-%{release}
|
||||||
|
License: GPLv2
|
||||||
|
Requires: systemd
|
||||||
|
Requires(pre): shadow
|
||||||
|
Requires(post): systemd-units
|
||||||
|
Requires(preun): systemd-units
|
||||||
|
|
||||||
|
%description -n uuidd
|
||||||
|
The uuidd daemon is used by the UUID library to generate universally
|
||||||
|
unique identifiers (UUIDs), especially time-based UUIDs, in a secure
|
||||||
|
and guaranteed-unique fashion, even in the face of large numbers of
|
||||||
|
threads running on different CPUs trying to grab UUIDs.
|
||||||
|
|
||||||
|
%package -n libuuid
|
||||||
|
Summary: Universally unique ID library
|
||||||
|
License: BSD
|
||||||
|
Conflicts: filesystem < 3
|
||||||
|
|
||||||
|
%description -n libuuid
|
||||||
|
This package is the universally unique ID library.
|
||||||
|
|
||||||
|
%package user
|
||||||
|
Summary: libuser based util-linux utilities
|
||||||
|
License: GPLv2
|
||||||
|
Requires: util-linux = %{version}-%{release}
|
||||||
|
|
||||||
|
%description user
|
||||||
|
chfn and chsh utilities with dependence on libuser
|
||||||
|
|
||||||
%package -n python-libmount
|
%package -n python-libmount
|
||||||
Summary: Python Package for the libmount library pack
|
Summary: Python Package for the libmount library pack
|
||||||
@ -65,6 +117,17 @@ License: LGPLv2+
|
|||||||
This package provides python support for users to use the libmount library
|
This package provides python support for users to use the libmount library
|
||||||
to work with mount tables and mount filesystems.
|
to work with mount tables and mount filesystems.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development package for ${name}
|
||||||
|
License: LGPLv2+ and BSD
|
||||||
|
Requires: %{name} = %{version}-%{release} pkgconfig
|
||||||
|
Provides: libfdisk-devel libsmartcols-devel libmount-devel libblkid-devel libuuid-devel
|
||||||
|
Obsoletes: libfdisk-devel libsmartcols-devel libmount-devel libblkid-devel libuuid-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains some library and other necessary files for the
|
||||||
|
development of %{name}.
|
||||||
|
|
||||||
%package help
|
%package help
|
||||||
Summary: Help package for ${name}
|
Summary: Help package for ${name}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -146,7 +209,7 @@ find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \
|
|||||||
rm -rf %{buildroot}%{_libdir}/*.{la,a}
|
rm -rf %{buildroot}%{_libdir}/*.{la,a}
|
||||||
rm -rf %{buildroot}%{_libdir}/python*/site-packages/*.{la,a}
|
rm -rf %{buildroot}%{_libdir}/python*/site-packages/*.{la,a}
|
||||||
|
|
||||||
%pre
|
%pre -n uuidd
|
||||||
getent group uuidd >/dev/null || groupadd -r uuidd
|
getent group uuidd >/dev/null || groupadd -r uuidd
|
||||||
getent passwd uuidd >/dev/null || \
|
getent passwd uuidd >/dev/null || \
|
||||||
useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \
|
useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \
|
||||||
@ -154,7 +217,6 @@ useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
|
||||||
[ -d /var/log ] || mkdir -p /var/log
|
[ -d /var/log ] || mkdir -p /var/log
|
||||||
|
|
||||||
touch /var/log/lastlog
|
touch /var/log/lastlog
|
||||||
@ -174,6 +236,9 @@ then
|
|||||||
ln -sf ../proc/self/mounts /etc/mtab || :
|
ln -sf ../proc/self/mounts /etc/mtab || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%post -n libblkid
|
||||||
|
/sbin/ldconfig
|
||||||
|
|
||||||
[ -d /run/blkid ] || mkdir -p /run/blkid
|
[ -d /run/blkid ] || mkdir -p /run/blkid
|
||||||
for i in /etc/blkid.tab /etc/blkid.tab.old \
|
for i in /etc/blkid.tab /etc/blkid.tab.old \
|
||||||
/etc/blkid/blkid.tab /etc/blkid/blkid.tab.old
|
/etc/blkid/blkid.tab /etc/blkid/blkid.tab.old
|
||||||
@ -184,39 +249,49 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
%postun -n libblkid -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%post -n libuuid -p /sbin/ldconfig
|
||||||
|
%postun -n libuuid -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%post -n libmount -p /sbin/ldconfig
|
||||||
|
%postun -n libmount -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%post -n libsmartcols -p /sbin/ldconfig
|
||||||
|
%postun -n libsmartcols -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%post -n libfdisk -p /sbin/ldconfig
|
||||||
|
%postun -n libfdisk -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%post -n uuidd
|
||||||
%systemd_post uuidd
|
%systemd_post uuidd
|
||||||
if [ $1 -eq 1 ]
|
if [ $1 -eq 1 ]
|
||||||
then
|
then
|
||||||
/bin/systemctl start uuidd > /dev/null 2>&1 || :
|
/bin/systemctl start uuidd > /dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%preun
|
%preun -n uuidd
|
||||||
%systemd_preun uuidd
|
%systemd_preun uuidd
|
||||||
|
|
||||||
%postun
|
%postun -n uuidd
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%systemd_postun_with_restart uuidd
|
%systemd_postun_with_restart uuidd
|
||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
%exclude %{compldir}/{mount,umount}
|
%exclude %{compldir}/{mount,umount}
|
||||||
%{!?_licensedir:%global license %%doc}
|
%{!?_licensedir:%global license %%doc}
|
||||||
%license Documentation/licenses/* AUTHORS libblkid/COPYING
|
%license Documentation/licenses/* AUTHORS
|
||||||
%config(noreplace) %{_sysconfdir}/pam.d/{login,remote,su,su-l,runuser,runuser-l,chfn,chsh}
|
%config(noreplace) %{_sysconfdir}/pam.d/{login,remote,su,su-l,runuser,runuser-l}
|
||||||
%config(noreplace) %{_prefix}/lib/udev/rules.d/60-raw.rules
|
%config(noreplace) %{_prefix}/lib/udev/rules.d/60-raw.rules
|
||||||
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/adjtime
|
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/adjtime
|
||||||
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
|
|
||||||
%dir %attr(2775, uuidd, uuidd) /run/uuidd
|
|
||||||
%attr(4755,root,root) %{_bindir}/mount
|
%attr(4755,root,root) %{_bindir}/mount
|
||||||
%attr(4755,root,root) %{_bindir}/umount
|
%attr(4755,root,root) %{_bindir}/umount
|
||||||
%attr(4755,root,root) %{_bindir}/su
|
%attr(4755,root,root) %{_bindir}/su
|
||||||
%attr(755,root,root) %{_bindir}/login
|
%attr(755,root,root) %{_bindir}/login
|
||||||
%attr(2755,root,tty) %{_bindir}/write
|
%attr(2755,root,tty) %{_bindir}/write
|
||||||
%attr(4711,root,root) %{_bindir}/chfn
|
|
||||||
%attr(4711,root,root) %{_bindir}/chsh
|
|
||||||
%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog
|
%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog
|
||||||
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab
|
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab
|
||||||
%{_unitdir}/{fstrim.*,uuidd.*}
|
%{_unitdir}/fstrim.*
|
||||||
%{_libdir}/{libfdisk.so.*,libsmartcols.so.*,libmount.so.*,libblkid.so.*,libuuid.so.*}
|
|
||||||
%{_bindir}/{cal,chrt,col,colcrt,colrm,column,chmem,dmesg,eject,fallocate,fincore,findmnt,choom}
|
%{_bindir}/{cal,chrt,col,colcrt,colrm,column,chmem,dmesg,eject,fallocate,fincore,findmnt,choom}
|
||||||
%{_bindir}/{flock,getopt,hexdump,ionice,ipcmk,ipcrm,ipcs,isosize,kill,last,lastb,logger,hardlink}
|
%{_bindir}/{flock,getopt,hexdump,ionice,ipcmk,ipcrm,ipcs,isosize,kill,last,lastb,logger,hardlink}
|
||||||
%{_bindir}/{look,lsblk,lscpu,lsipc,lslocks,lslogins,lsmem,lsns,mcookie,mesg,more,mountpoint}
|
%{_bindir}/{look,lsblk,lscpu,lsipc,lslocks,lslogins,lsmem,lsns,mcookie,mesg,more,mountpoint}
|
||||||
@ -226,7 +301,7 @@ fi
|
|||||||
%{_sbindir}/{findfs,fsck,fsck.cramfs,fsck.minix,fsfreeze,fstrim,ldattach,losetup,mkfs,mkfs.cramfs}
|
%{_sbindir}/{findfs,fsck,fsck.cramfs,fsck.minix,fsfreeze,fstrim,ldattach,losetup,mkfs,mkfs.cramfs}
|
||||||
%{_sbindir}/{mkfs.minix,mkswap,nologin,partx,pivot_root,readprofile,resizepart,rfkill,rtcwake}
|
%{_sbindir}/{mkfs.minix,mkswap,nologin,partx,pivot_root,readprofile,resizepart,rfkill,rtcwake}
|
||||||
%{_sbindir}/{runuser,sulogin,swaplabel,swapoff,swapon,switch_root,wipefs,zramctl}
|
%{_sbindir}/{runuser,sulogin,swaplabel,swapoff,swapon,switch_root,wipefs,zramctl}
|
||||||
%{_sbindir}/{clock,fdformat,hwclock,cfdisk,sfdisk,uuidd}
|
%{_sbindir}/{clock,fdformat,hwclock,cfdisk,sfdisk}
|
||||||
%{compldir}/{addpart,blkdiscard,blkid,blkzone,blockdev,cal,chcpu,chmem,chrt,col}
|
%{compldir}/{addpart,blkdiscard,blkid,blkzone,blockdev,cal,chcpu,chmem,chrt,col}
|
||||||
%{compldir}/{colcrt,colrm,column,ctrlaltdel,delpart,dmesg,eject,fallocate,fdisk}
|
%{compldir}/{colcrt,colrm,column,ctrlaltdel,delpart,dmesg,eject,fallocate,fdisk}
|
||||||
%{compldir}/{fincore,findfs,findmnt,flock,fsck,fsck.cramfs,fsck.minix,fsfreeze}
|
%{compldir}/{fincore,findfs,findmnt,flock,fsck,fsck.cramfs,fsck.minix,fsfreeze}
|
||||||
@ -237,18 +312,54 @@ fi
|
|||||||
%{compldir}/{resizepart,rev,rfkill,rtcwake,runuser,script,scriptreplay,setarch}
|
%{compldir}/{resizepart,rev,rfkill,rtcwake,runuser,script,scriptreplay,setarch}
|
||||||
%{compldir}/{setpriv,setsid,setterm,su,swaplabel,swapoff,swapon,taskset,ul,unshare}
|
%{compldir}/{setpriv,setsid,setterm,su,swaplabel,swapoff,swapon,taskset,ul,unshare}
|
||||||
%{compldir}/{utmpdump,uuidgen,uuidparse,wall,wdctl,whereis,wipefs,write,zramctl}
|
%{compldir}/{utmpdump,uuidgen,uuidparse,wall,wdctl,whereis,wipefs,write,zramctl}
|
||||||
%{compldir}/{fdformat,hwclock,cfdisk,sfdisk,chfn,chsh,uuidd}
|
%{compldir}/{fdformat,hwclock,cfdisk,sfdisk}
|
||||||
|
|
||||||
%files devel
|
%files -n libfdisk
|
||||||
%{_includedir}/{libfdisk,libsmartcols,uuid,blkid,libmount}
|
%license Documentation/licenses/COPYING.LGPL-2.1* libfdisk/COPYING
|
||||||
%{_libdir}/{libfdisk.so,libsmartcols.so,libuuid.so,libblkid.so,libmount.so}
|
%{_libdir}/libfdisk.so.*
|
||||||
%{_libdir}/pkgconfig/{fdisk.pc,smartcols.pc,uuid.pc,blkid.pc,mount.pc}
|
|
||||||
|
%files -n libsmartcols
|
||||||
|
%license Documentation/licenses/COPYING.LGPL-2.1* libsmartcols/COPYING
|
||||||
|
%{_libdir}/libsmartcols.so.*
|
||||||
|
|
||||||
|
%files -n libmount
|
||||||
|
%license Documentation/licenses/COPYING.LGPL-2.1* libmount/COPYING
|
||||||
|
%{_libdir}/libmount.so.*
|
||||||
|
|
||||||
|
%files -n libblkid
|
||||||
|
%doc libblkid/COPYING
|
||||||
|
%{_libdir}/libblkid.so.*
|
||||||
|
|
||||||
|
%files -n uuidd
|
||||||
|
%license Documentation/licenses/COPYING.GPL-2.0*
|
||||||
|
%{_sbindir}/uuidd
|
||||||
|
%{_unitdir}/uuidd.*
|
||||||
|
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
|
||||||
|
%dir %attr(2775, uuidd, uuidd) /run/uuidd
|
||||||
|
%{compldir}/uuidd
|
||||||
|
|
||||||
|
%files -n libuuid
|
||||||
|
%license Documentation/licenses/COPYING.BSD-3* libuuid/COPYING
|
||||||
|
%{_libdir}/libuuid.so.*
|
||||||
|
|
||||||
|
%files user
|
||||||
|
%config(noreplace) %{_sysconfdir}/pam.d/chfn
|
||||||
|
%config(noreplace) %{_sysconfdir}/pam.d/chsh
|
||||||
|
%attr(4711,root,root) %{_bindir}/chfn
|
||||||
|
%attr(4711,root,root) %{_bindir}/chsh
|
||||||
|
%{compldir}/chfn
|
||||||
|
%{compldir}/chsh
|
||||||
|
|
||||||
%files -n python-libmount
|
%files -n python-libmount
|
||||||
%{!?_licensedir:%global license %%doc}
|
%{!?_licensedir:%global license %%doc}
|
||||||
%license libmount/COPYING
|
%license libmount/COPYING
|
||||||
%{_libdir}/python*/site-packages/libmount/
|
%{_libdir}/python*/site-packages/libmount/
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/{libfdisk,libsmartcols,uuid,blkid,libmount}
|
||||||
|
%{_libdir}/{libfdisk.so,libsmartcols.so,libuuid.so,libblkid.so,libmount.so}
|
||||||
|
%{_libdir}/pkgconfig/{fdisk.pc,smartcols.pc,uuid.pc,blkid.pc,mount.pc}
|
||||||
|
|
||||||
%files help -f %{name}-help.files
|
%files help -f %{name}-help.files
|
||||||
%exclude %{_datadir}/doc/util-linux/getopt/*
|
%exclude %{_datadir}/doc/util-linux/getopt/*
|
||||||
%doc README NEWS Documentation/deprecated.txt
|
%doc README NEWS Documentation/deprecated.txt
|
||||||
@ -271,6 +382,12 @@ fi
|
|||||||
%{_mandir}/man8/{swapoff.8*,swapon.8*,switch_root.8*,umount.8*,wdctl.8.gz,wipefs.8*,zramctl.8*}
|
%{_mandir}/man8/{swapoff.8*,swapon.8*,switch_root.8*,umount.8*,wdctl.8.gz,wipefs.8*,zramctl.8*}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.34-2
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:add subpackages
|
||||||
|
|
||||||
* Sun Jan 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.34-1
|
* Sun Jan 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.34-1
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user