Accepting request 108417 from home:rjschwei:branches:Base:System

- keep binaries in /usr tree (UsrMerge project)

OBS-URL: https://build.opensuse.org/request/show/108417
OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=123
This commit is contained in:
Petr Uzel 2012-03-13 12:38:21 +00:00 committed by Git OBS Bridge
parent 5d3ab78313
commit b71bcabe24
2 changed files with 130 additions and 22 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Mar 6 21:18:56 UTC 2012 - rschweikert@suse.com
- keep binaries in /usr tree (UsrMerge project)
-------------------------------------------------------------------
Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com

View File

@ -106,8 +106,16 @@ Patch70: which-lib64.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %insserv_prereq %fillup_prereq /bin/sed
#
Provides: util = %{version}-%{release} rawio = %{version}-%{release} raw = %{version}-%{release} base = %{version}-%{release} uuid-runtime = %{version}-%{release}
Obsoletes: util < %{version}-%{release} rawio < %{version}-%{release} raw < %{version}-%{release} base < %{version}-%{release} uuid-runtime < %{version}-%{release}
Provides: base = %{version}-%{release}
Provides: raw = %{version}-%{release}
Provides: rawio = %{version}-%{release}
Provides: util = %{version}-%{release}
Provides: uuid-runtime = %{version}-%{release}
Obsoletes: base < %{version}-%{release}
Obsoletes: raw < %{version}-%{release}
Obsoletes: rawio < %{version}-%{release}
Obsoletes: util < %{version}-%{release}
Obsoletes: uuid-runtime < %{version}-%{release}
%description
This package contains a large variety of low-level system utilities
@ -165,7 +173,7 @@ Group: System/Filesystems
%description -n libmount1
Library designed to be used in low-level utils like
mount(8) and /sbin/mount.<type> helpers.
mount(8) and /usr/sbin/mount.<type> helpers.
%package -n libmount-devel
Summary: Development files for libmount1
@ -235,8 +243,6 @@ autoreconf -fi
export SUID_CFLAGS="-fpie"
export SUID_LDFLAGS="-pie"
%configure \
--bindir=/bin \
--sbindir=/sbin \
--with-audit \
--with-selinux \
--enable-mesg \
@ -265,7 +271,7 @@ mkdir -p %{buildroot}%{_localstatedir}/run/uuidd/
install -m 744 %{SOURCE50} %{buildroot}%{_initddir}/uuidd
install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
cp adjtimex-*/adjtimex %{buildroot}/sbin/
cp adjtimex-*/adjtimex %{buildroot}/%{_sbindir}
cp adjtimex-*/adjtimex.8 %{buildroot}%{_mandir}/man8/
pushd ..
# which install
@ -297,20 +303,60 @@ popd
# util-linux install
#
%make_install
mv %{buildroot}%{_bindir}/logger %{buildroot}/bin/logger
#UsrMerge
ln -s %{_bindir}/logger %{buildroot}/bin
ln -s %{_bindir}/dmesg %{buildroot}/bin
ln -s %{_bindir}/more %{buildroot}/bin
ln -s %{_bindir}/mount %{buildroot}/bin
ln -s %{_bindir}/umount %{buildroot}/bin
ln -s %{_bindir}/findmnt %{buildroot}/bin
ln -s %{_bindir}/lsblk %{buildroot}/bin
ln -s %{_sbindir}/adjtimex %{buildroot}/sbin
ln -s %{_sbindir}/agetty %{buildroot}/sbin
ln -s %{_sbindir}/blockdev %{buildroot}/sbin
ln -s %{_sbindir}/cfdisk %{buildroot}/sbin
ln -s %{_sbindir}/ctrlaltdel %{buildroot}/sbin
ln -s %{_sbindir}/fdisk %{buildroot}/sbin
ln -s %{_sbindir}/fsck.minix %{buildroot}/sbin
ln -s %{_sbindir}/fsck.cramfs %{buildroot}/sbin
ln -s %{_sbindir}/hwclock %{buildroot}/sbin
ln -s %{_sbindir}/losetup %{buildroot}/sbin
ln -s %{_sbindir}/mkfs %{buildroot}/sbin
ln -s %{_sbindir}/mkfs.bfs %{buildroot}/sbin
ln -s %{_sbindir}/mkfs.minix %{buildroot}/sbin
ln -s %{_sbindir}/mkfs.cramfs %{buildroot}/sbin
ln -s %{_sbindir}/mkswap %{buildroot}/sbin
ln -s %{_sbindir}/pivot_root %{buildroot}/sbin
ln -s %{_sbindir}/raw %{buildroot}/sbin
ln -s %{_sbindir}/sfdisk %{buildroot}/sbin
ln -s %{_sbindir}/swapoff %{buildroot}/sbin
ln -s %{_sbindir}/swapon %{buildroot}/sbin
ln -s %{_sbindir}/blkid %{buildroot}/sbin
ln -s %{_sbindir}/findfs %{buildroot}/sbin
ln -s %{_sbindir}/fsck %{buildroot}/sbin
ln -s %{_sbindir}/switch_root %{buildroot}/sbin
ln -s %{_sbindir}/wipefs %{buildroot}/sbin
ln -s %{_sbindir}/fsfreeze %{buildroot}/sbin
ln -s %{_sbindir}/swaplabel %{buildroot}/sbin
ln -s %{_sbindir}/fstrim %{buildroot}/sbin
ln -s %{_sbindir}/chcpu %{buildroot}/sbin
#EndUsrMerge
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems
install -m 755 nologin %{buildroot}/sbin
install -m 755 nologin %{buildroot}/%{_sbindir}
#UsrMerge
ln -s %{_sbindir}/nologin %{buildroot}/sbin
#EndUsrMerge
rm -f %{buildroot}/%{_libdir}/libblkid.la
rm -f %{buildroot}/%{_libdir}/libuuid.la
rm -f %{buildroot}/%{_libdir}/libmount.la
%ifnarch ppc ppc64
install -m 755 mkzimage_cmdline %{buildroot}%{_prefix}/bin
install -m 755 mkzimage_cmdline %{buildroot}/%{_bindir}
install -m 644 %{S:28} %{buildroot}%{_mandir}/man8
install -m 755 chrp-addnote %{buildroot}%{_prefix}/bin
install -m 755 chrp-addnote %{buildroot}/%{_bindir}
%endif
install -m 644 nologin.8 %{buildroot}%{_mandir}/man8
# setctsid install
install -m 755 setctsid %{buildroot}%{_prefix}/sbin
install -m 755 setctsid %{buildroot}/%{_sbindir}
install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/
echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb
chmod 755 %{buildroot}%{_sbindir}/flushb
@ -331,7 +377,10 @@ rm -f %{buildroot}%{_mandir}/man1/chkdupexe.1
rm -f %{buildroot}%{_sysconfdir}/fdprm
rm -f %{buildroot}%{_bindir}/cytune
rm -f %{buildroot}%{_sbindir}/fdformat
rm -f %{buildroot}%{_sbindir}/hwclock
#UsrMerge
rm -f %{buildroot}/sbin/hwclock
#EndUsrMerge
rm -f %{buildroot}%{_sbindir}/klogconsole
rm -f %{buildroot}%{_bindir}/setterm
rm -f %{buildroot}%{_sbindir}/tunelp
@ -344,11 +393,20 @@ rm -f %{buildroot}/%{_mandir}/man8/tunelp.8*
%ifarch ia64 %sparc
rm -f %{buildroot}/%{_mandir}/man8/cfdisk.8*
rm -f %{buildroot}/%{_mandir}/man8/sfdisk.8*
rm -f %{buildroot}%{_sbindir}/cfdisk
#UsrMerge
rm -f %{buildroot}/sbin/cfdisk
#EndUsrMerge
rm -f %{buildroot}%{_sbindir}/sfdisk
#UsrMerge
rm -f %{buildroot}/sbin/sfdisk
#EndUsrMerge
%endif
%ifarch ia64
rm -f %{buildroot}%{_sbindir}/fdisk
#UsrMerge
rm -f %{buildroot}/sbin/fdisk
#EndUsrMerge
rm -f %{buildroot}%{_mandir}/man8/fdisk.8*
%endif
%find_lang %{name} %{name}.lang
@ -373,7 +431,7 @@ ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd
%if 0%{?suse_version} <= 1130
%run_permissions
%else
%set_permissions /usr/bin/wall /usr/bin/write /bin/mount /bin/umount
%set_permissions /usr/bin/wall /usr/bin/write /usr/bin/mount /usr/bin/umount
%endif
# mount option 'code=' is now called 'codepage=' so change fstab
@ -388,7 +446,7 @@ fi
%{insserv_cleanup}
%verifyscript
%verify_permissions -e /usr/bin/wall -e /usr/bin/write -e /bin/mount -e /bin/umount
%verify_permissions -e /usr/bin/wall -e /usr/bin/write -e /usr/bin/mount -e /usr/bin/umount
%post -n libblkid1 -p /sbin/ldconfig
@ -449,11 +507,13 @@ fi
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw
%config(noreplace) %{_sysconfdir}/filesystems
%config(noreplace) %{_sysconfdir}/blkid.conf
#UsrMerge
/bin/dmesg
/bin/more
/bin/mount
/bin/umount
/bin/findmnt
/bin/logger
/bin/lsblk
/sbin/adjtimex
/sbin/agetty
@ -481,8 +541,7 @@ fi
/sbin/swaplabel
/sbin/fstrim
/sbin/chcpu
%{_bindir}/ipcmk
/bin/logger
#EndUsrMerge
%{_bindir}/cal
%{_bindir}/chrt
%{_bindir}/col
@ -490,46 +549,80 @@ fi
%{_bindir}/colrm
%{_bindir}/column
%{_bindir}/ddate
%{_bindir}/dmesg
%{_bindir}/fallocate
%{_bindir}/findmnt
%{_bindir}/flock
%{_bindir}/getopt
%{_bindir}/hexdump
%{_bindir}/ionice
%{_bindir}/ipcmk
%{_bindir}/ipcrm
%{_bindir}/ipcs
%{_bindir}/isosize
%{_bindir}/line
%{_bindir}/logger
%{_bindir}/look
%{_bindir}/lsblk
%{_bindir}/lscpu
%{_bindir}/mcookie
%{_bindir}/mesg
%{_bindir}/uuidgen
%ifnarch ppc ppc64
%{_bindir}/chrp-addnote
%{_bindir}/mkzimage_cmdline
%endif
%{_bindir}/more
%{_bindir}/mount
%{_bindir}/namei
%{_bindir}/prlimit
%{_bindir}/rename
%{_bindir}/renice
%{_bindir}/rev
%{_bindir}/script
%{_bindir}/setarch
%{_bindir}/scriptreplay
%{_bindir}/setarch
%{_bindir}/setsid
%{_bindir}/ul
%{_bindir}/tailf
%{_bindir}/taskset
%{_bindir}/time
%{_bindir}/ul
%{_bindir}/umount
%{_bindir}/unshare
%{_bindir}/uuidgen
%{_bindir}/which
%ifnarch ppc ppc64
%{_bindir}/chrp-addnote
%{_bindir}/mkzimage_cmdline
%endif
%{_sbindir}/addpart
%{_sbindir}/adjtimex
%{_sbindir}/agetty
%{_sbindir}/blkid
%{_sbindir}/blockdev
%{_sbindir}/chcpu
%{_sbindir}/ctrlaltdel
%{_sbindir}/delpart
%{_sbindir}/findfs
%{_sbindir}/fsck
%{_sbindir}/fsck.minix
%{_sbindir}/fsck.cramfs
%{_sbindir}/fsfreeze
%{_sbindir}/fstrim
%{_sbindir}/ldattach
%{_sbindir}/losetup
%{_sbindir}/mkfs
%{_sbindir}/mkfs.bfs
%{_sbindir}/mkfs.minix
%{_sbindir}/mkfs.cramfs
%{_sbindir}/mkswap
%{_sbindir}/nologin
%{_sbindir}/partx
%{_sbindir}/pivot_root
%{_sbindir}/raw
%{_sbindir}/rcraw
%{_sbindir}/rtcwake
%{_sbindir}/setctsid
%{_sbindir}/swaplabel
%{_sbindir}/swapoff
%{_sbindir}/swapon
%{_sbindir}/switch_root
%{_sbindir}/wipefs
%verify(not mode) %attr(0755,root,tty) %{_bindir}/wall
%{_bindir}/whereis
%verify(not mode) %attr(0755,root,tty) %{_bindir}/write
@ -630,19 +723,29 @@ fi
%ifnarch ia64
#XXX: post our patches upstream
#XXX: call fdupes on /usr/share/man
#UsrMerge
/sbin/fdisk
#EndUsrMerge
%{_sbindir}/fdisk
%{_mandir}/man8/fdisk.8.gz
%endif
%ifnarch %sparc ia64
%{_mandir}/man8/cfdisk.8.gz
%{_mandir}/man8/sfdisk.8.gz
#UsrMerge
/sbin/cfdisk
/sbin/sfdisk
#EndUsrMerge
%{_sbindir}/cfdisk
%{_sbindir}/sfdisk
%endif
%ifnarch s390 s390x
%{_bindir}/cytune
%{_sbindir}/fdformat
#UsrMerge
/sbin/hwclock
#EndUsrMerge
%{_sbindir}/hwclock
%{_sbindir}/klogconsole
%{_bindir}/setterm
%{_sbindir}/tunelp