add legacy provides for /bin and /sbin tools moved to /usr/bin and /usr/sbin [release 2.37-2mamba;Sat Jul 17 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 18:52:55 +01:00
parent dc852c6d0c
commit 72fe238d5c

View File

@ -7,15 +7,15 @@
%define uuidd_userid 65052 %define uuidd_userid 65052
Name: util-linux Name: util-linux
Version: 2.36.2 Version: 2.37
Release: 1mamba Release: 2mamba
Epoch: 1 Epoch: 1
Summary: Miscellaneous utilities for Linux Summary: Miscellaneous utilities for Linux
Group: System/Tools Group: System/Tools
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.kernel.org/pub/linux/utils/util-linux/ URL: https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/
Source0: http://www.kernel.org/pub/linux/utils/util-linux/v%{majorminor}/util-linux-%{version}.tar.xz Source0: http://www.kernel.org/pub/linux/utils/util-linux/v%{majorminor}/util-linux-%{version}.tar.xz
Source1: util-linux-nologin.c Source1: util-linux-nologin.c
Source2: util-linux-nologin.8 Source2: util-linux-nologin.8
@ -39,21 +39,16 @@ License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libaudit-devel BuildRequires: libaudit-devel
BuildRequires: libcap-devel BuildRequires: libbzip2-devel
BuildRequires: libcap-ng-devel BuildRequires: libcap-ng-devel
BuildRequires: libgcrypt-devel
BuildRequires: libgpg-error-devel
BuildRequires: liblzma-devel BuildRequires: liblzma-devel
BuildRequires: libmagic-devel
BuildRequires: libncurses-devel BuildRequires: libncurses-devel
BuildRequires: libpam-devel BuildRequires: libpam-devel
BuildRequires: libpcre-devel BuildRequires: libpcre2-devel
BuildRequires: libpython-devel BuildRequires: libpython3-devel
BuildRequires: libpython27-devel
BuildRequires: libreadline-devel BuildRequires: libreadline-devel
%if "%{stage1}" != "1"
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
BuildRequires: libsepol-devel
%endif
BuildRequires: libsystemd-devel BuildRequires: libsystemd-devel
BuildRequires: libudev-devel BuildRequires: libudev-devel
BuildRequires: libz-devel BuildRequires: libz-devel
@ -65,20 +60,28 @@ BuildRequires: pam-devel
BuildRequires: perl-devel BuildRequires: perl-devel
BuildRequires: texinfo BuildRequires: texinfo
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: ruby-asciidoctor
Requires(post):%{__install_info} Requires(post):%{__install_info}
Provides: util-linux-ng = %{?epoch:%epoch:}%{version}-%{release} Provides: util-linux-ng = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes: util-linux-ng Obsoletes: util-linux-ng < 1:2.37
Provides: rfkill Provides: rfkill
Obsoletes: rfkill Obsoletes: rfkill < 1:2.37
Provides: uuidd Provides: uuidd
Obsoletes: uuidd Obsoletes: uuidd < 1:2.37
Provides: eject Provides: eject
Obsoletes: eject Obsoletes: eject < 1:2.37
Provides: schedutils Provides: schedutils
Obsoletes: schedutils Obsoletes: schedutils < 1:2.37
Requires: libuuid = %{?epoch:%epoch:}%{version}-%{release} Requires: libuuid = %{?epoch:%epoch:}%{version}-%{release}
Requires: libblkid = %{?epoch:%epoch:}%{version}-%{release} Requires: libblkid = %{?epoch:%epoch:}%{version}-%{release}
Requires: libmount = %{?epoch:%epoch:}%{version}-%{release} Requires: libmount = %{?epoch:%epoch:}%{version}-%{release}
Provides: /sbin/blkid
Provides: /bin/dmesg
Provides: /bin/login
Provides: /bin/more
Provides: /bin/mount
Provides: /bin/su
Provides: /bin/umount
%systemd_requires %systemd_requires
%description %description
@ -167,27 +170,34 @@ Requires: libfdisk = %{?epoch:%epoch:}%{version}-%{release}
Fdisk library. Fdisk library.
This package provides the development file for application which use libfdisk. This package provides the development file for application which use libfdisk.
%package -n python-libmount
Summary: Python binding to libmount
Group: System/Libraries/Python
Requires: libmount = %{?epoch:%epoch:}%{version}-%{release}
%description -n python-libmount
Python binding to libmount.
%debug_package %debug_package
%prep %prep
%setup -q %setup -q
#%patch0 -p1 -b .adjtime_path #-D -T
#%patch1 -p1 #:<< _EOF
#%patch2 -p1
%patch3 -p1 %patch3 -p1
#%patch4 -p1 -R #%patch4 -p1 -R
cp %{S:1} nologin.c #cp %{S:1} nologin.c
%build %build
#:<< _EOF
%configure \ %configure \
--bindir=/bin \
--sbindir=/sbin \
--disable-use-tty-group \ --disable-use-tty-group \
--disable-elvtune \ --disable-elvtune \
--disable-login-utils \
--disable-kill \ --disable-kill \
--enable-partx \ --enable-partx \
--enable-usrdir-path \
--enable-asciidoc \
%if %{build_raw} %if %{build_raw}
--enable-raw \ --enable-raw \
%endif %endif
@ -199,14 +209,16 @@ cp %{S:1} nologin.c
%endif %endif
--disable-makeinstall-chown \ --disable-makeinstall-chown \
--disable-rpath \ --disable-rpath \
--with-ncursesw --with-ncursesw \
PYTHON=%{__python3}
# --disable-login-utils \
# --libdir=/%{_lib} \ # --libdir=/%{_lib} \
%make CC="%{_target_platform}-gcc -std=gnu99" READLINE_LIBS="-lreadline -lncurses" %make CC="%{_target_platform}-gcc -std=gnu99" READLINE_LIBS="-lreadline -lncurses"
# build nologin ## build nologin
%{_target_platform}-gcc %{optflags} -o nologin nologin.c #%{_target_platform}-gcc %{optflags} -o nologin nologin.c
%install %install
[ "%{buildroot}" != / ] && rm -rf %{buildroot} [ "%{buildroot}" != / ] && rm -rf %{buildroot}
@ -214,38 +226,35 @@ cp %{S:1} nologin.c
%makeinstall %makeinstall
# note: versions <=2.12 use path "%{_datadir}/misc/getopt/*" # note: versions <=2.12 use path "%{_datadir}/misc/getopt/*"
install -d %{buildroot}%{_datadir}/misc/getopt/ #install -d %{buildroot}%{_datadir}/misc/getopt/
#mv %{buildroot}%{_datadir}/getopt/* \ #mv %{buildroot}%{_datadir}/getopt/* \
# %{buildroot}%{_datadir}/misc/getopt/ # %{buildroot}%{_datadir}/misc/getopt/
## note: do not install tcsh scripts to avoid dependencies on tcsh ## note: do not install tcsh scripts to avoid dependencies on tcsh
#rm %{buildroot}%{_datadir}/misc/getopt/getopt-parse.tcsh #rm %{buildroot}%{_datadir}/misc/getopt/getopt-parse.tcsh
# fix some wrong paths ## fix some wrong paths
install -d %{buildroot}/sbin #install -d %{buildroot}/sbin
for f in addpart delpart partx; do #for f in addpart delpart partx; do
mv %{buildroot}%{_sbindir}/$f %{buildroot}/sbin/$f # mv %{buildroot}%{_sbindir}/$f %{buildroot}/sbin/$f
done #done
install -d %{buildroot}/bin #install -d %{buildroot}/bin
%if %{build_raw} %if %{build_raw}
mv %{buildroot}/sbin/raw %{buildroot}/bin/raw #mv %{buildroot}/sbin/raw %{buildroot}/bin/raw
install -D -m644 %{S:3} %{buildroot}%{_sysconfdir}/udev/rules.d/60-raw.rules install -D -m644 %{S:3} %{buildroot}%{_sysconfdir}/udev/rules.d/60-raw.rules
%endif
mv %{buildroot}%{_bindir}/taskset %{buildroot}/bin/taskset
# install nologin
install -D -m 755 nologin %{buildroot}/sbin/nologin
install -D -m 644 %{S:2} %{buildroot}%{_mandir}/man8/nologin.8
%if %{build_raw}
echo '.so man8/raw.8' > %{buildroot}%{_mandir}/man8/rawdevices.8 echo '.so man8/raw.8' > %{buildroot}%{_mandir}/man8/rawdevices.8
%endif %endif
#mv %{buildroot}%{_bindir}/taskset %{buildroot}/bin/taskset
## install nologin
#install -D -m 755 nologin %{buildroot}%{_sbindir}/nologin
#install -D -m 644 %{S:2} %{buildroot}%{_mandir}/man8/nologin.8
%find_lang %{name} %find_lang %{name}
# remove unpackaged files # remove unpackaged files
rm %{buildroot}/sbin/fsck.minix rm %{buildroot}%{_sbindir}/fsck.minix
rm %{buildroot}/sbin/mkfs.{bfs,minix} rm %{buildroot}%{_sbindir}/mkfs.{bfs,minix}
install -d %{buildroot}/%{_localstatedir}/lib/libuuid install -d %{buildroot}/%{_localstatedir}/lib/libuuid
# clock.txt from uuidd is a ghost file # clock.txt from uuidd is a ghost file
@ -311,150 +320,17 @@ exit 0
%{_sysconfdir}/pam.d/su-l %{_sysconfdir}/pam.d/su-l
%config %{_sysconfdir}/login.access %config %{_sysconfdir}/login.access
%config %{_sysconfdir}/login.defs %config %{_sysconfdir}/login.defs
#/bin/arch %{_bindir}/*
/bin/dmesg %{_sbindir}/*
/bin/findmnt
/bin/lsblk
/bin/login
/bin/su
/bin/wdctl
/sbin/sulogin
/bin/more
/bin/mountpoint
%if %{build_raw} %if %{build_raw}
/bin/raw
%config(noreplace) %{_sysconfdir}/udev/rules.d/60-raw.rules %config(noreplace) %{_sysconfdir}/udev/rules.d/60-raw.rules
%endif %endif
/bin/taskset %attr(4755,root,root) %{_bindir}/mount
%attr(4755,root,root) /bin/mount %attr(4755,root,root) %{_bindir}/umount
%attr(4755,root,root) /bin/umount %{_unitdir}/uuidd.service
/sbin/addpart %{_unitdir}/uuidd.socket
/sbin/agetty %{_unitdir}/fstrim.service
/sbin/blkdiscard %{_unitdir}/fstrim.timer
/sbin/blkid
/sbin/blkzone
/sbin/blockdev
/sbin/cfdisk
/sbin/ctrlaltdel
/sbin/chcpu
/sbin/delpart
/sbin/fdisk
/sbin/findfs
/sbin/fsck
/sbin/fsck.cramfs
#/sbin/fsck.minix
/sbin/fstrim
/sbin/fsfreeze
/sbin/hwclock
/sbin/losetup
/sbin/mkfs
#/sbin/mkfs.bfs
/sbin/mkfs.cramfs
#/sbin/mkfs.minix
/sbin/mkswap
/sbin/nologin
/sbin/partx
/sbin/pivot_root
/sbin/runuser
/sbin/sfdisk
/sbin/swapoff
/sbin/swapon
/sbin/swaplabel
/sbin/switch_root
/sbin/wipefs
/sbin/zramctl
%{_bindir}/cal
%{_bindir}/chfn
%{_bindir}/chmem
%{_bindir}/choom
%{_bindir}/chrt
%{_bindir}/chsh
%{_bindir}/col
%{_bindir}/colcrt
%{_bindir}/colrm
%{_bindir}/column
#%{_bindir}/cytune
#%{_bindir}/ddate
#%{_bindir}/fdformat
%{_bindir}/eject
%{_bindir}/fallocate
%{_bindir}/fincore
%{_bindir}/flock
%{_bindir}/getopt
%{_bindir}/hardlink
%{_bindir}/hexdump
%ifarch i586 x86_64
%{_bindir}/i386
%endif
%ifarch x86_64
%{_bindir}/x86_64
%endif
%ifarch ppc
%{_bindir}/ppc*
%endif
%{_bindir}/ionice
%{_bindir}/ipcrm
%{_bindir}/ipcs
%{_bindir}/ipcmk
%{_bindir}/irqtop
%{_bindir}/isosize
%{_bindir}/last
%{_bindir}/lastb
#%{_bindir}/line
%{_bindir}/linux32
%{_bindir}/linux64
%{_bindir}/logger
%{_bindir}/look
%{_bindir}/lscpu
%{_bindir}/lsipc
%{_bindir}/lsirq
%{_bindir}/lslocks
%{_bindir}/lslogins
%{_bindir}/lsmem
%{_bindir}/lsns
%{_bindir}/mcookie
%{_bindir}/mesg
%{_bindir}/namei
%{_bindir}/nsenter
%{_bindir}/setpriv
#%{_bindir}/pg
%{_bindir}/prlimit
%{_bindir}/rename
%{_bindir}/renice
%{_bindir}/rev
%{_bindir}/script
%{_bindir}/scriptlive
%{_bindir}/scriptreplay
%{_bindir}/setarch
%{_bindir}/setsid
%{_bindir}/setterm
#%{_bindir}/tailf
%{_bindir}/ul
%{_bindir}/uname26
%{_bindir}/unshare
%{_bindir}/utmpdump
%{_bindir}/uuidgen
%{_bindir}/uuidparse
%{_bindir}/wall
%{_bindir}/whereis
%{_bindir}/write
%{_sbindir}/fdformat
%{_sbindir}/ldattach
#%{_sbindir}/ramsize
#%{_sbindir}/rdev
%{_sbindir}/readprofile
%{_sbindir}/resizepart
%{_sbindir}/rfkill
#%{_sbindir}/rootflags
%{_sbindir}/rtcwake
#%{_sbindir}/tunelp
%{_sbindir}/uuidd
#%{_sbindir}/vidmode
/lib/systemd/system/uuidd.service
/lib/systemd/system/uuidd.socket
/lib/systemd/system/fstrim.service
/lib/systemd/system/fstrim.timer
#%{_infodir}/ipc.info.*
%{_datadir}/bash-completion/completions/* %{_datadir}/bash-completion/completions/*
%dir %{_localstatedir}/uuid %dir %{_localstatedir}/uuid
%dir %{_localstatedir}/lib/libuuid %dir %{_localstatedir}/lib/libuuid
@ -464,11 +340,12 @@ exit 0
%{_mandir}/man5/fstab.* %{_mandir}/man5/fstab.*
%{_mandir}/man5/terminal-colors.d.5* %{_mandir}/man5/terminal-colors.d.5*
%{_mandir}/man8/* %{_mandir}/man8/*
#%{_infodir}/ipc.info.*
#%lang(ru) %{_mandir}/ru/man1/ddate.* #%lang(ru) %{_mandir}/ru/man1/ddate.*
#%dir /var/lib/hwclock #%dir /var/lib/hwclock
%dir %{_docdir}/util-linux/getopt %dir %{_docdir}/util-linux
%{_docdir}/util-linux/getopt/getopt-parse.bash %{_docdir}/util-linux/getopt-example.bash
%{_docdir}/util-linux/getopt/getopt-parse.tcsh %{_docdir}/util-linux/getopt-example.tcsh
%doc AUTHORS README.licensing %doc AUTHORS README.licensing
%files -n libblkid %files -n libblkid
@ -488,10 +365,6 @@ exit 0
%files -n libmount %files -n libmount
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libmount.so.* %{_libdir}/libmount.so.*
%dir %{python_sitearch}/libmount
%{python_sitearch}/libmount/__init__.py*
%{python_sitearch}/libmount/pylibmount.la
%{python_sitearch}/libmount/pylibmount.so
%files -n libmount-devel %files -n libmount-devel
%defattr(-,root,root) %defattr(-,root,root)
@ -501,6 +374,14 @@ exit 0
%{_libdir}/libmount.so %{_libdir}/libmount.so
%{_libdir}/pkgconfig/mount.pc %{_libdir}/pkgconfig/mount.pc
%files -n python-libmount
%defattr(-,root,root)
%dir %{python3_sitearch}/libmount
%{python3_sitearch}/libmount/__init__.py*
%{python3_sitearch}/libmount/pylibmount.la
%{python3_sitearch}/libmount/pylibmount.so
%{python3_sitearch}/libmount/__pycache__/__init__.cpython-*.pyc
%files -n libsmartcols %files -n libsmartcols
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libsmartcols.so.* %{_libdir}/libsmartcols.so.*
@ -542,6 +423,12 @@ exit 0
%{_libdir}/pkgconfig/fdisk.pc %{_libdir}/pkgconfig/fdisk.pc
%changelog %changelog
* Sat Jul 17 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.37-2mamba
- add legacy provides for /bin and /sbin tools moved to /usr/bin and /usr/sbin
* Wed Jul 14 2021 Automatic Build System <autodist@mambasoft.it> 2.37-1mamba
- automatic version update by autodist
* Sun Feb 28 2021 Automatic Build System <autodist@mambasoft.it> 2.36.2-1mamba * Sun Feb 28 2021 Automatic Build System <autodist@mambasoft.it> 2.36.2-1mamba
- automatic version update by autodist - automatic version update by autodist
@ -796,7 +683,7 @@ exit 0
* Mon Mar 01 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.12-1qilnx * Mon Mar 01 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.12-1qilnx
- new version rebuild - new version rebuild
* Sat Nov 30 2003 Davide Madrisan <davide.madrisan@qilinux.it> 2.11z-3qilnx * Sun Nov 30 2003 Davide Madrisan <davide.madrisan@qilinux.it> 2.11z-3qilnx
- specfile updates - specfile updates
* Tue Apr 22 2003 Silvan Calarco <silvan.calarco@qinet.it> 2.11z-2qilnx * Tue Apr 22 2003 Silvan Calarco <silvan.calarco@qinet.it> 2.11z-2qilnx