]> git.pld-linux.org Git - packages/util-linux.git/blobdiff - util-linux.spec
- up to 2.23.2
[packages/util-linux.git] / util-linux.spec
index b0b6df501d0df5e54b4769303f9571c2b951ece3..2ddd33705c22e2a24834ec698b290d1e6a0b0f6d 100644 (file)
@@ -1,22 +1,22 @@
 # TODO
+# - remote chfn/chsh (BR: libuser)?
 # - verify initrd tools set:
 #   - I've taken list from 2.21.3 package, but there was no explicit list, so
 #     there are probably some unneeded tools
 #   - chrt is not built now (because of --disable-schedutils), but it's probably not needed
 #   - fsck is not built now (because of --disable-libmount)
 #   - maybe we want some more now?
-# - some sysvinit binaries moved here: su(1):, sulogin(8),
-#    utmpdump(1): - has been merged from coreutils into util-linux
 #
 # Conditional build:
 %bcond_with    uClibc          # link initrd version with static glibc instead of uClibc
 %bcond_without dietlibc        # link initrd version with dietlibc instead of uClibc
 %bcond_without selinux         # SELinux support
+%bcond_without su              # su/runuser programs
 %if "%{pld_release}" == "ac"
 %bcond_with    initrd          # don't build initrd version
 %bcond_with    fallocate       # fallocate utility (needs glibc 2.11 to compile)
 %else
-%bcond_without initrd          # don't build initrd version
+%bcond_with    initrd          # don't build initrd version
 %bcond_without fallocate       # fallocate utility (needs glibc 2.11 to compile)
 %endif
 
@@ -36,26 +36,33 @@ Summary(ru.UTF-8):  Набор базовых системных утилит д
 Summary(tr.UTF-8):     Temel sistem araçları
 Summary(uk.UTF-8):     Набір базових системних утиліт для Linux
 Name:          util-linux
-Version:       2.22.1
-Release:       0.1
+Version:       2.23.2
+Release:       1
 License:       GPL
 Group:         Applications/System
-Source0:       https://www.kernel.org/pub/linux/utils/util-linux/v2.22/%{name}-%{version}.tar.xz
-# Source0-md5: 730cf9932531ed09b53a04ca30fcb4c9
+Source0:       https://www.kernel.org/pub/linux/utils/util-linux/v2.23/%{name}-%{version}.tar.xz
+# Source0-md5: b39fde897334a4858bb2098edcce5b3f
 Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: 3c940c7e7fe699eaa2ddb1bffb3de2fe
 Source2:       login.pamd
 Source3:       %{name}-blockdev.init
 Source4:       %{name}-blockdev.sysconfig
 Source5:       blockdev.upstart
+Source6:       su.pamd
+Source7:       su-l.pamd
+Source8:       runuser.pamd
+Source9:       runuser-l.pamd
+Source10:      nologin.c
+Source11:      nologin.8
 Patch0:                %{name}-pl.po-update.patch
 Patch1:                %{name}-ng-union-mount.patch
+
 Patch3:                %{name}-fdformat-ide.patch
 Patch4:                %{name}-fhs.patch
 Patch5:                %{name}-hotkeys.patch
 Patch7:                %{name}-login-lastlog.patch
 Patch8:                %{name}-procpartitions.patch
-
+Patch9:                su-paths.patch
 Patch10:       %{name}-diet.patch
 URL:           http://userweb.kernel.org/~kzak/util-linux/
 BuildRequires: audit-libs-devel >= 1.0.6
@@ -65,7 +72,7 @@ BuildRequires:        gettext-devel >= 0.14.1
 %{?with_fallocate:BuildRequires:       glibc-devel >= 6:2.11}
 BuildRequires: gtk-doc >= 1.10
 BuildRequires: gtk-doc-automake >= 1.10
-%{?with_selinux:BuildRequires: libselinux-devel}
+%{?with_selinux:BuildRequires: libselinux-devel >= 2.0}
 %{?with_selinux:BuildRequires: libsepol-devel}
 BuildRequires: libtool >= 2:2.2
 BuildRequires: linux-libc-headers >= 7:2.6.27
@@ -91,6 +98,7 @@ BuildRequires:        glibc-static
        %endif
 %endif
 Requires:      libblkid = %{version}-%{release}
+%{?with_selinux:Requires:      libselinux >= 2.0}
 Requires:      pam >= %{pam_ver}
 Provides:      eject = %{version}-%{release}
 Provides:      fdisk
@@ -104,12 +112,17 @@ Obsoletes:        rawdevices
 Obsoletes:     schedutils
 Obsoletes:     setarch
 Obsoletes:     sparc32
+Obsoletes:     util-linux-chkdupexe
 Obsoletes:     util-linux-ng < 2.20-1
 Obsoletes:     util-linux-suids
 Conflicts:     SysVinit < 2.86-26
+Conflicts:     SysVinit-tools < 2.88-9
 Conflicts:     e2fsprogs < 1.41.8-5
 Conflicts:     shadow-extras < 1:4.0.3-6
 Conflicts:     upstart-SysVinit < 2.86-28
+%if %{with su}
+Conflicts:     coreutils < 8.19
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                debugcflags     -O1 -g
@@ -331,22 +344,6 @@ sisteminizin işlevselliği açısından kritiktir.
 дерева. Swapon та swapoff, відповідно, дозволяє та заборонює свопінг у
 визначені файли або пристрої.
 
-%package chkdupexe
-Summary:       chkdupexe - find duplicate executables
-Summary(pl.UTF-8):     chkdupexe odszukuje powtarzające się pliki uruchamialne
-Group:         Applications/System
-Obsoletes:     util-linux-ng-chkdupexe < 2.20-1
-
-%description chkdupexe
-chkdupexe will scan the union of $PATH and a hardcoded list of common
-locations for binaries. It will report dangling symlinks and
-duplicately-named binaries.
-
-%description chkdupexe -l pl.UTF-8
-chkdupexe przeszukuje katalogi z $PATH oraz inne powszechnie znane
-katalogi z plikami uruchamialnymi i informuje o powtarzających się
-plikach w różnych katalogach.
-
 %package -n tunelp
 Summary:       Configures kernel parallel port driver
 Summary(de.UTF-8):     Konfiguriert den Kerneltreiber für den parallelen Port
@@ -532,7 +529,7 @@ Requires(pre):      /usr/sbin/groupadd
 Requires(pre): /usr/sbin/groupmod
 Requires(pre): /usr/sbin/useradd
 Requires(pre): /usr/sbin/usermod
-Requires(post,preun,postun):    systemd-units >= 38
+Requires(post,preun,postun):   systemd-units >= 38
 Requires:      libuuid = %{version}-%{release}
 Requires:      systemd-units >= 38
 Provides:      group(uuidd)
@@ -632,16 +629,36 @@ or UUID - staticaly linked for initrd.
 Pakiet ten zawiera narzędzie blkid do rozpoznawania partycji przez
 etykietę lub UUID - statycznie skonsolidowane na potrzeby initrd.
 
+%package -n bash-completion-util-linux
+Summary:       bash completion for util-linux commands
+Summary(pl.UTF-8):     Bashowe dopełnianie parametrów dla poleceń z pakietu util-linux
+Group:         Applications/Shells
+Requires:      %{name} = %{version}-%{release}
+Requires:      bash-completion >= 2.0
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description -n bash-completion-util-linux
+Bash completion for util-linux commands.
+
+%description -n bash-completion-util-linux -l pl.UTF-8
+Bashowe dopełnianie parametrów dla poleceń z pakietu util-linux.
+
 %prep
 %setup -q -a1
 #%patch0 -p1
 %patch1 -p1
+
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch7 -p1
 %patch8 -p1
-%patch10 -p1
+%patch9 -p1
+%{?with_initrd:%patch10 -p1}
+
+cp -p %{SOURCE10} nologin.c
 
 %{__rm} po/stamp-po
 
@@ -684,11 +701,13 @@ export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses -DHAVE_LSEEK64_PROTOTYPE
        --disable-newgrp \
        --disable-partx \
        --disable-raw \
+       --disable-runuser \
        --disable-schedutils \
        --disable-setarch \
        --disable-silent-rules \
        --disable-su \
        --disable-sulogin \
+       --disable-tunelp \
        --disable-use-tty-group \
        --disable-utmpdump \
        --disable-uuidd \
@@ -724,8 +743,6 @@ export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses -DHAVE_LSEEK64_PROTOTYPE
        --disable-use-tty-group \
        --disable-wall \
        --enable-chfn-chsh \
-       --enable-chkdupexe \
-       --enable-ddate \
        --enable-kill \
        --enable-libblkid \
        --enable-line \
@@ -733,16 +750,21 @@ export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses -DHAVE_LSEEK64_PROTOTYPE
        --enable-login-chown-vcs \
        --enable-newgrp \
        --enable-partx \
-       --enable-su \
+       --enable-runuser%{!?with_su:=no} \
+       --enable-su%{!?with_su:=no} \
        --enable-sulogin \
+       --enable-tunelp \
        --enable-utmpdump \
        --enable-vipw \
        --enable-write \
        --with-audit \
+       --with-bashcompletiondir=/usr/share/bash-completion/completions \
        --with-selinux%{!?with_selinux:=no}
 
 %{__make}
 
+%{__cc} %{rpmcflags} nologin.c -o nologin
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,init,security} \
@@ -755,10 +777,20 @@ install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,init,security} \
 mv $RPM_BUILD_ROOT%{_sbindir}/{addpart,delpart,partx} $RPM_BUILD_ROOT/sbin
 mv $RPM_BUILD_ROOT/sbin/raw $RPM_BUILD_ROOT%{_bindir}
 
+install -p nologin $RPM_BUILD_ROOT/sbin
+cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_mandir}/man8
+
 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/login
 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/blockdev
 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/blockdev
 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/init/blockdev.conf
+%if %{with su}
+ln -s ../sbin/runuser  $RPM_BUILD_ROOT/bin/runuser
+cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/su
+cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/su-l
+cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/pam.d/runuser
+cp -p %{SOURCE9} $RPM_BUILD_ROOT/etc/pam.d/runuser-l
+%endif
 
 :> $RPM_BUILD_ROOT/etc/security/blacklist.login
 :> $RPM_BUILD_ROOT/var/lock/wtmpxlock
@@ -771,7 +803,7 @@ for lib in blkid uuid mount; do
 done
 
 ln -sf hwclock $RPM_BUILD_ROOT/sbin/clock
-echo '.so hwclock.8' > $RPM_BUILD_ROOT%{_mandir}/man8/clock.8
+echo '.so man8/hwclock.8' > $RPM_BUILD_ROOT%{_mandir}/man8/clock.8
 
 ln -s utmpdump $RPM_BUILD_ROOT%{_bindir}/utmpx-dump
 
@@ -779,7 +811,7 @@ for d in cs de es fi fr hu id it ja ko nl pl ; do
        for m in man1 man5 man8 ; do
                if [ -d man/$d/$m ]; then
                        install -d $RPM_BUILD_ROOT%{_mandir}/$d/$m
-                       cp -a man/$d/$m/* $RPM_BUILD_ROOT%{_mandir}/$d/$m
+                       cp -p man/$d/$m/* $RPM_BUILD_ROOT%{_mandir}/$d/$m
                fi
        done
 done
@@ -789,13 +821,21 @@ for d in es ja ko ; do
                $RPM_BUILD_ROOT%{_mandir}/$d/man8/readprofile.8
        %{__sed} -i -e 's/READPROFILE 1/READPROFILE 8/' $RPM_BUILD_ROOT%{_mandir}/$d/man8/readprofile.8
 done
+# fix inconsistent man links
+echo '.so man8/hwclock.8' > $RPM_BUILD_ROOT%{_mandir}/es/man8/clock.8
+echo '.so man8/hwclock.8' > $RPM_BUILD_ROOT%{_mandir}/ja/man8/clock.8
+echo '.so man8/swapon.8' > $RPM_BUILD_ROOT%{_mandir}/es/man8/swapoff.8
+echo '.so man8/swapon.8' > $RPM_BUILD_ROOT%{_mandir}/it/man8/swapoff.8
+echo '.so man8/swapon.8' > $RPM_BUILD_ROOT%{_mandir}/ja/man8/swapoff.8
+echo '.so man8/swapon.8' > $RPM_BUILD_ROOT%{_mandir}/ko/man8/swapoff.8
+echo '.so man8/swapon.8' > $RPM_BUILD_ROOT%{_mandir}/pl/man8/swapoff.8
 
 # cleanup, remove files not included in package
 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{chfn,chsh,newgrp} \
        $RPM_BUILD_ROOT%{_sbindir}/{vigr,vipw} \
        $RPM_BUILD_ROOT%{_mandir}/man1/{chfn,chsh,newgrp}.1 \
        $RPM_BUILD_ROOT%{_mandir}/man8/{vigr,vipw}.8 \
-       $RPM_BUILD_ROOT%{_mandir}/*/man1/{arch,reset}.1 \
+       $RPM_BUILD_ROOT%{_mandir}/*/man1/{arch,chkdupexe,ddate,reset}.1 \
        $RPM_BUILD_ROOT%{_mandir}/*/man5/nfs.5 \
        $RPM_BUILD_ROOT%{_mandir}/*/man8/{elvtune,setfdprm,sln,ramsize,raw,rdev,rootflags,vidmode}.8
 
@@ -867,8 +907,10 @@ fi
 
 %attr(755,root,root) /sbin/clock
 %attr(755,root,root) /sbin/hwclock*
+%attr(755,root,root) /sbin/nologin
 %{_mandir}/man8/clock.8*
 %{_mandir}/man8/hwclock.8*
+%{_mandir}/man8/nologin.8*
 %lang(es) %{_mandir}/es/man8/clock.8*
 %lang(es) %{_mandir}/es/man8/hwclock.8*
 %lang(ja) %{_mandir}/ja/man8/clock.8*
@@ -914,12 +956,13 @@ fi
 %attr(755,root,root) /bin/dmesg
 %attr(755,root,root) /bin/kill
 %attr(755,root,root) /bin/more
-%attr(755,root,root) /bin/su
+
 %attr(755,root,root) /bin/wdctl
 
 %attr(755,root,root) /sbin/chcpu
 %attr(755,root,root) /sbin/ctrlaltdel
 %attr(755,root,root) /sbin/addpart
+%attr(755,root,root) /sbin/blkdiscard
 %attr(755,root,root) /sbin/delpart
 %attr(755,root,root) /sbin/partx
 %attr(755,root,root) /bin/lsblk
@@ -940,7 +983,6 @@ fi
 %attr(755,root,root) %{_bindir}/colrm
 %attr(755,root,root) %{_bindir}/column
 %attr(755,root,root) %{_bindir}/cytune
-%attr(755,root,root) %{_bindir}/ddate
 %attr(755,root,root) %{_bindir}/eject
 %attr(755,root,root) %{_bindir}/flock
 %{?with_fallocate:%attr(755,root,root) %{_bindir}/fallocate}
@@ -958,6 +1000,7 @@ fi
 %attr(755,root,root) %{_bindir}/lslocks
 %attr(755,root,root) %{_bindir}/mcookie
 %attr(755,root,root) %{_bindir}/namei
+%attr(755,root,root) %{_bindir}/nsenter
 %attr(755,root,root) %{_bindir}/pg
 %attr(755,root,root) %{_bindir}/prlimit
 %attr(755,root,root) %{_bindir}/raw
@@ -966,6 +1009,7 @@ fi
 %attr(755,root,root) %{_bindir}/rev
 %attr(755,root,root) %{_bindir}/script
 %attr(755,root,root) %{_bindir}/scriptreplay
+%attr(755,root,root) %{_bindir}/setpriv
 %attr(755,root,root) %{_bindir}/setsid
 %attr(755,root,root) %{_bindir}/setterm
 %attr(755,root,root) %{_bindir}/tailf
@@ -988,7 +1032,6 @@ fi
 %{_mandir}/man1/colcrt.1*
 %{_mandir}/man1/colrm.1*
 %{_mandir}/man1/column.1*
-%{_mandir}/man1/ddate.1*
 %{_mandir}/man1/dmesg.1*
 %{_mandir}/man1/eject.1*
 %{?with_fallocate:%{_mandir}/man1/fallocate.1*}
@@ -1007,16 +1050,17 @@ fi
 %{_mandir}/man1/mcookie.1*
 %{_mandir}/man1/more.1*
 %{_mandir}/man1/namei.1*
+%{_mandir}/man1/nsenter.1*
 %{_mandir}/man1/prlimit.1*
 %{_mandir}/man1/pg.1*
 %{_mandir}/man1/renice.1*
 %{_mandir}/man1/rev.1*
 %{_mandir}/man1/rename.1*
+%{_mandir}/man1/setpriv.1*
 %{_mandir}/man1/setsid.1*
 %{_mandir}/man1/script.1*
 %{_mandir}/man1/scriptreplay.1*
 %{_mandir}/man1/setterm.1*
-%{_mandir}/man1/su.1*
 %{_mandir}/man1/tailf.1*
 %{_mandir}/man1/taskset.1*
 %{_mandir}/man1/ul.1*
@@ -1025,6 +1069,7 @@ fi
 %{_mandir}/man1/whereis.1*
 %{_mandir}/man1/write.1*
 %{_mandir}/man8/addpart.8*
+%{_mandir}/man8/blkdiscard.8*
 %{_mandir}/man8/delpart.8*
 %{_mandir}/man8/partx.8*
 %{_mandir}/man8/lsblk.8*
@@ -1057,7 +1102,6 @@ fi
 
 %lang(es) %{_mandir}/es/man1/colrm.1*
 %lang(es) %{_mandir}/es/man1/column.1*
-%lang(es) %{_mandir}/es/man1/ddate.1*
 %lang(es) %{_mandir}/es/man1/getopt.1*
 %lang(es) %{_mandir}/es/man1/look.1*
 %lang(es) %{_mandir}/es/man1/more.1*
@@ -1127,7 +1171,6 @@ fi
 %lang(ja) %{_mandir}/ja/man1/colcrt.1*
 %lang(ja) %{_mandir}/ja/man1/colrm.1*
 %lang(ja) %{_mandir}/ja/man1/column.1*
-%lang(ja) %{_mandir}/ja/man1/ddate.1*
 %lang(ja) %{_mandir}/ja/man1/getopt.1*
 %lang(ja) %{_mandir}/ja/man1/hexdump.1*
 %lang(ja) %{_mandir}/ja/man1/kill.1*
@@ -1161,7 +1204,6 @@ fi
 %lang(ko) %{_mandir}/ko/man1/colcrt.1*
 %lang(ko) %{_mandir}/ko/man1/colrm.1*
 %lang(ko) %{_mandir}/ko/man1/column.1*
-%lang(ko) %{_mandir}/ko/man1/ddate.1*
 %lang(ko) %{_mandir}/ko/man1/getopt.1*
 %lang(ko) %{_mandir}/ko/man1/hexdump.1*
 %lang(ko) %{_mandir}/ko/man1/kill.1*
@@ -1212,8 +1254,6 @@ fi
 %lang(pl) %{_mandir}/pl/man8/mkswap.8*
 %lang(pl) %{_mandir}/pl/man8/renice.8*
 
-%lang(ru) %{_mandir}/ru/man1/ddate.1*
-
 %attr(755,root,root) /sbin/fdisk
 %attr(755,root,root) /sbin/fsck.minix
 %attr(755,root,root) /sbin/mkfs.minix
@@ -1275,6 +1315,20 @@ fi
 %attr(755,root,root) /sbin/fsck.cramfs
 %attr(755,root,root) /sbin/mkfs.cramfs
 %attr(755,root,root) /sbin/mkfs.bfs
+%{_mandir}/man8/fsck.cramfs.8*
+%{_mandir}/man8/mkfs.cramfs.8*
+
+%if %{with su}
+%attr(755,root,root) /bin/runuser
+%attr(755,root,root) /sbin/runuser
+%attr(4755,root,root) /bin/su
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/runuser
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/runuser-l
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/su
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/su-l
+%{_mandir}/man1/runuser.1*
+%{_mandir}/man1/su.1*
+%endif
 
 %ghost /var/lock/wtmpxlock
 
@@ -1357,14 +1411,6 @@ fi
 %lang(ko) %{_mandir}/ko/man8/losetup.8*
 %lang(pl) %{_mandir}/pl/man8/losetup.8*
 
-%files chkdupexe
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/chkdupexe
-%{_mandir}/man1/chkdupexe.1*
-%lang(ja) %{_mandir}/ja/man1/chkdupexe.1*
-%lang(ko) %{_mandir}/ko/man1/chkdupexe.1*
-%lang(pl) %{_mandir}/pl/man1/chkdupexe.1*
-
 %files -n tunelp
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/tunelp
@@ -1436,6 +1482,10 @@ fi
 %defattr(644,root,root,755)
 %{_libdir}/libuuid.a
 
+%files -n bash-completion-util-linux
+%defattr(644,root,root,755)
+/usr/share/bash-completion/completions/*
+
 %if %{with initrd} && %{with dietlibc}
 %files -n libuuid-dietlibc
 %defattr(644,root,root,755)
This page took 0.255942 seconds and 4 git commands to generate.