]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - util-linux/util-linux.nm
pcengines-firmware: update to 4.9.0.7
[ipfire-3.x.git] / util-linux / util-linux.nm
index ade2ab44683411b2d0cb549c3c13e13c76e6d169..7a1e66a2c1cebe5e8d46cfbd44c56d3c75bc3e5c 100644 (file)
@@ -4,12 +4,12 @@
 ###############################################################################
 
 name       = util-linux
-major_ver  = 2.20
-version    = %{major_ver}
-release    = 3
+version    = 2.34
+release    = 2
 
+maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
 groups     = System/Base
-url        = http://kernel.org/~kzak/util-linux/
+url        = https://github.com/karelzak/util-linux
 license    = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
 summary    = A collection of basic system utilities.
 
@@ -20,17 +20,21 @@ description
        program.
 end
 
-source_dl  = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/
+source_dl  = https://www.kernel.org/pub/linux/utils/%{name}/v%{version}/
 
 build
        requires
-               audit-devel
+               autoconf >= 1.16
+               automake >= 1.15
+               coreutils >= 8.19
                gettext
                libcap-devel
-               libselinux-devel
-               libsepol-devel
+               libcap-ng-devel
+               libudev-devel
                ncurses-devel
                pam-devel
+               python3-devel
+               systemd-devel >= 215
                zlib-devel
        end
 
@@ -40,18 +44,20 @@ build
                -D_FILE_OFFSET_BITS=64
 
        configure_options += \
-               --bindir=/bin \
-               --sbindir=/sbin \
+               --with-systemdsystemunitdir=%{unitdir} \
                --disable-wall \
+               --enable-eject \
                --enable-kill \
-               --enable-login-utils \
                --enable-partx \
                --enable-write \
-               --enable-libmount-mount \
-               --with-selinux \
-               --with-audit \
+               --enable-runuser \
+               --enable-su \
+               --with-systemd \
+               --with-udev \
                --disable-makeinstall-chown \
-               --disable-static
+               --disable-static \
+               --disable-rpath \
+               --with-python=3
 
        prepare_cmds
                sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
@@ -60,33 +66,39 @@ build
 
        # Build nolodin
        build_cmds
-               gcc %{CFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
+               gcc %{CFLAGS} %{LDFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
        end
 
        install_cmds
-               mkdir -pv %{BUILDROOT}/sbin \
+               mkdir -pv \
+                       %{BUILDROOT}/var/lib/libuuid \
                        %{BUILDROOT}/var/lib/hwclock \
                        %{BUILDROOT}/usr/share/man/man8 \
+                       %{BUILDROOT}/run/uuidd \
                        %{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
 
                # Set capabilities
-               chmod -v -s %{BUILDROOT}/bin/mount
-               setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}/bin/mount
-               chmod -v -s %{BUILDROOT}/bin/umount
-               setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}/bin/umount
+               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
+
+               # su (set right capabilities)
+               chmod -v u-s %{BUILDROOT}%{bindir}/su
+               setcap cap_setgid,cap_setuid+ep %{BUILDROOT}%{bindir}/su
        end
 end
 
@@ -98,12 +110,35 @@ packages
                        /etc/pam.d/system-auth
                end
 
-               obsoletes = util-linux-ng
+               provides
+                       eject = %{thisver}
+                       /bin/dmesg
+                       /bin/eject
+                       /bin/kill
+                       /bin/more
+                       /bin/mount
+                       /bin/su
+                       /bin/umount
+                       /sbin/blkid
+                       /sbin/blockdev
+                       /sbin/findfs
+                       /sbin/fsck
+                       /sbin/nologin
+                       /sbin/runuser
+               end
+
+               obsoletes
+                       util-linux-ng
+                       eject <= 2.1.5
+               end
 
                conflicts
+                       filesystem < 002
+                       bash-completion <= 2.1-2
+                       coreutils < 8.19
                        setup < 3.0-2
                        util-linux-ng
-                       sysvinit <= 2.86-2
+                       sysvinit <= 2.86-6
                end
 
                preprequires += coreutils
@@ -125,6 +160,8 @@ packages
                        part of util-linux.
                end
 
+               conflicts = filesystem < 002
+
                files
                        %{libdir}/libblkid.*
                end
@@ -135,6 +172,10 @@ packages
                summary =  Development library and header of libblkid.
                description = %{summary}
 
+               requires
+                       libuuid-devel
+               end
+
                files
                        %{includedir}/blkid/
                        %{libdir}/libblkid.so
@@ -151,6 +192,12 @@ packages
                        part of util-linux.
                end
 
+               requires
+                       uuidd=%{thisver}
+               end
+
+               conflicts = filesystem < 002
+
                files
                        %{libdir}/libuuid.*
                end
@@ -177,6 +224,8 @@ packages
                        part of util-linux.
                end
 
+               conflicts = filesystem < 002
+
                files
                        %{libdir}/libmount.*
                end
@@ -187,14 +236,120 @@ packages
                summary =  Development library and header of libmount.
                description = %{summary}
 
+               requires
+                       libblkid-devel = %{thisver}
+               end
+
                files
-                       %{includedir}/mount/
+                       %{includedir}/libmount/
                        %{libdir}/libmount.so
                        %{libdir}/pkgconfig/mount.pc
                        %{mandir}/man3/*mount*
                end
        end
 
+       # Package information for libsmartcols.
+       package libsmartcols
+               summary = Formatting library for ls-like programs.
+               description
+                       This is a library for ls-like terminal
+                       programs, part of util-linux.
+               end
+
+               files
+                       %{libdir}/libsmartcols.*
+               end
+       end
+
+       # Package information for libsmartcols-devel.
+       package libsmartcols-devel
+               summary = Development library and header of libsmartcols.
+               description = %{summary}
+
+               files
+                       %{includedir}/libsmartcols/*
+                       %{libdir}/libsmartcols.so
+                       %{libdir}/pkgconfig/smartcols.pc
+               end
+       end
+
+       # Package information for libfdisk.
+       package libfdisk
+               summary = Partitioning library for fdisk-like programs.
+               description = %{summary}
+
+               files
+                       %{libdir}/libfdisk.*
+               end
+       end
+
+       # Package information for libfdisk-devel.
+       package libfidsk-devel
+               summary = Development library and headers of libfdisk.
+               description = %{summary}
+
+               files
+                       %{includedir}/libfdisk/*
+                       %{libdir}/libfdisk.so
+                       %{libdir}/pkgconfig/fdisk.pc
+               end
+       end
+
+       package uuidd
+               summary = Helper daemon to guarantee uniqueness of time-based UUIDs.
+               description
+                       The uuidd package contains a userspace daemon (uuidd) which guarantees
+                       uniqueness of time-based UUID generation even at very high rates on
+                       SMP systems.
+               end
+
+               groups += Base
+
+               files
+                       %{sbindir}/uuidd
+                       %{mandir}/man8/uuidd.8*
+                       %{sharedstatedir}/libuuid
+                       %{unitdir}/uuidd*
+                       /run/uuidd
+               end
+
+               prerequires += shadow-utils
+
+               requires
+                       systemd-libs >= 215
+               end
+
+               script prein
+                       getent group uuidd >/dev/null || groupadd -r uuidd
+                       getent passwd uuidd >/dev/null || \
+                               useradd -r -g uuidd -d %{sharedstatedir}/libuuid -s /sbin/nologin \
+                                       -c "UUID generator helper daemon" uuidd
+               end
+       
+               script postin
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+                       systemctl enable uuidd.service >/dev/null 2>&1 || :
+               end
+
+               script preun
+                       systemctl --no-reload disable uuidd.service >/dev/null 2>&1 || :
+                       systemctl stop uuidd.service >/dev/null 2>&1 || :
+               end
+
+               script postun
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postup
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+                       systemctl try-restart uuidd.service >/dev/null 2>&1 || :
+               end
+       end
+
+       package python3-libmount
+               template PYTHON3
+       end
+       
        package %{name}-debuginfo
                template DEBUGINFO
        end