]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blobdiff - util-linux/util-linux.nm
util-linux: Move everything to /usr.
[people/amarx/ipfire-3.x.git] / util-linux / util-linux.nm
index 681de64672fc534fea3d7d29238a792c53338e3f..e1c63556cbd8b9354e809a049c5318e8858121f9 100644 (file)
@@ -4,9 +4,9 @@
 ###############################################################################
 
 name       = util-linux
-version    = 2.19
-major_ver  = 2.19
-release    = 5
+major_ver  = 2.21
+version    = %{major_ver}
+release    = 2
 
 groups     = System/Base
 url        = http://kernel.org/~kzak/util-linux/
@@ -40,8 +40,6 @@ build
                -D_FILE_OFFSET_BITS=64
 
        configure_options += \
-               --bindir=/bin \
-               --sbindir=/sbin \
                --disable-wall \
                --enable-kill \
                --enable-login-utils \
@@ -64,34 +62,29 @@ build
        end
 
        install_cmds
-               mkdir -pv %{BUILDROOT}/sbin \
+               mkdir -pv \
                        %{BUILDROOT}/var/lib/hwclock \
                        %{BUILDROOT}/usr/share/man/man8 \
                        %{BUILDROOT}/var/log
 
-               install -m 755 %{DIR_APP}/nologin %{BUILDROOT}/sbin
+               install -m 755 %{DIR_APP}/nologin %{BUILDROOT}%{sbindir}
                install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/
 
                touch %{BUILDROOT}/var/log/lastlog
 
                # Remove deprecated commands
-               rm -fv %{BUILDROOT}/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
-                       %{BUILDROOT}/usr/{,s}bin/{chkdupexe,newgrp,vi{gr,pw}} \
-                       %{BUILDROOT}/sbin/{sln,shutdown} %{BUILDROOT}/bin/{line,pg}
+               rm -fv %{BUILDROOT}/{%{sbindir},usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
+                       %{BUILDROOT}{%{bindir},%{sbindir}}/{chkdupexe,newgrp,vi{gr,pw}} \
+                       %{BUILDROOT}%{sbindir}/{sln,shutdown} %{BUILDROOT}%{bindir}/{line,pg}
                rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
                        %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
                rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
 
-               # Create /etc/mtab symlink
-               mkdir -pv %{BUILDROOT}/etc
-               ln -svf /proc/mounts %{BUILDROOT}/etc/mtab
-       end
-end
-
-# This symlink is allowed to be absolute.
-quality-agent
-       whitelist_symlink
-               /etc/mtab
+               # Set capabilities
+               chmod -v -s %{BUILDROOT}%{bindir}/mount
+               setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/mount
+               chmod -v -s %{BUILDROOT}%{bindir}/umount
+               setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/umount
        end
 end
 
@@ -103,13 +96,36 @@ packages
                        /etc/pam.d/system-auth
                end
 
-               filter_requires = /proc/.*/mounts
+               provides
+                       /bin/dmesg
+                       /bin/kill
+                       /bin/more
+                       /bin/mount
+                       /bin/umount
+                       /sbin/blkid
+                       /sbin/blockdev
+                       /sbin/findfs
+                       /sbin/fsck
+                       /sbin/nologin
+               end
 
                obsoletes = util-linux-ng
 
                conflicts
-                       setup<3.0-2
+                       filesystem < 002
+                       setup < 3.0-2
                        util-linux-ng
+                       sysvinit <= 2.86-2
+               end
+
+               preprequires += coreutils
+
+               script postin
+                       touch /var/log/lastlog
+
+                       # mtab symlink
+                       rm -f /etc/mtab
+                       ln -s /proc/mounts /etc/mtab
                end
        end
 
@@ -120,9 +136,11 @@ packages
                        This is the block device identification library,
                        part of util-linux.
                end
-       
+
+               conflicts = filesystem < 002
+
                files
-                       /lib/libblkid.*
+                       %{libdir}/libblkid.*
                end
        end
 
@@ -130,12 +148,12 @@ packages
        package libblkid-devel
                summary =  Development library and header of libblkid.
                description = %{summary}
-       
+
                files
-                       /usr/include/blkid/
-                       /usr/lib/libblkid.*
-                       /usr/lib/pkgconfig/blkid.pc
-                       /usr/share/man/man3/*blkid*
+                       %{includedir}/blkid/
+                       %{libdir}/libblkid.so
+                       %{libdir}/pkgconfig/blkid.pc
+                       %{mandir}/man3/*blkid*
                end
        end
 
@@ -146,9 +164,11 @@ packages
                        This is the universally unique ID library,
                        part of util-linux.
                end
-       
+
+               conflicts = filesystem < 002
+
                files
-                       /lib/libuuid.*
+                       %{libdir}/libuuid.*
                end
        end
 
@@ -156,12 +176,12 @@ packages
        package libuuid-devel
                summary =  Development library and header of libuuid.
                description = %{summary}
-       
+
                files
-                       /usr/include/uuid/
-                       /usr/lib/libuuid.*
-                       /usr/lib/pkgconfig/uuid.pc
-                       /usr/share/man/man3/*uuid*
+                       %{includedir}/uuid/
+                       %{libdir}/libuuid.so
+                       %{libdir}/pkgconfig/uuid.pc
+                       %{mandir}/man3/*uuid*
                end
        end
 
@@ -172,9 +192,11 @@ packages
                        This is the device mounting library,
                        part of util-linux.
                end
-       
+
+               conflicts = filesystem < 002
+
                files
-                       /lib/libmount.*
+                       %{libdir}/libmount.*
                end
        end
 
@@ -182,12 +204,16 @@ packages
        package libmount-devel
                summary =  Development library and header of libmount.
                description = %{summary}
-       
+
                files
-                       /usr/include/mount/
-                       /usr/lib/libmount.*
-                       /usr/lib/pkgconfig/mount.pc
-                       /usr/share/man/man3/*mount*
+                       %{includedir}/mount/
+                       %{libdir}/libmount.so
+                       %{libdir}/pkgconfig/mount.pc
+                       %{mandir}/man3/*mount*
                end
        end
+
+       package %{name}-debuginfo
+               template DEBUGINFO
+       end
 end