]> git.pld-linux.org Git - packages/util-linux.git/blobdiff - util-linux.spec
- login pam: do not log about missing pam_ck_connector.so
[packages/util-linux.git] / util-linux.spec
index 6fc16a22c558cec2d6bde30b520c2c6358a3afbe..1dab2447b971f5a3426273c4391ee43cb78b6018 100644 (file)
@@ -1,14 +1,19 @@
+# TODO
+#   /usr/share/getopt/getopt-parse.bash
+#   /usr/share/getopt/getopt-parse.tcsh
 #
 # Conditional build:
-%bcond_with            uClibc          # link initrd version with static glibc instead of uClibc
+%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
 %if "%{pld_release}" == "ac"
 %bcond_with            initrd          # don't build initrd version
 %bcond_with            fallocate       # fallocate utility (needs glibc 2.11 to compile)
+%bcond_with            partx           # partx utility (needs glibc 2.10 for openat to compile)
 %else
 %bcond_without initrd          # don't build initrd version
 %bcond_without fallocate       # fallocate utility (needs glibc 2.11 to compile)
+%bcond_without partx           # partx utility (needs glibc 2.10 for openat to compile)
 %endif
 
 %if "%{pld_release}" == "ac"
@@ -27,38 +32,39 @@ Summary(ru.UTF-8):  Набор базовых системных утилит д
 Summary(tr.UTF-8):     Temel sistem araçları
 Summary(uk.UTF-8):     Набір базових системних утиліт для Linux
 Name:          util-linux
-Version:       2.19.1
-Release:       1
+Version:       2.21.2
+Release:       3
 License:       GPL
 Group:         Applications/System
-Source0:       http://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/%{name}-%{version}.tar.bz2
-# Source0-md5: 3eab06f05163dfa65479c44e5231932c
+Source0:       https://www.kernel.org/pub/linux/utils/util-linux/v2.21/%{name}-%{version}.tar.xz
+# Source0-md5: 54ba880f1d66782c2287ee2c898520e9
 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
-Patch0:                %{name}-ng-ppc.patch
+Source5:       blockdev.upstart
+Patch0:                %{name}-pl.po-update.patch
 Patch1:                %{name}-ng-union-mount.patch
-Patch2:                %{name}-ctrlaltdel-man.patch
 Patch3:                %{name}-fdformat-ide.patch
 Patch4:                %{name}-fhs.patch
 Patch5:                %{name}-hotkeys.patch
-Patch6:                %{name}-pl.po-update.patch
 Patch7:                %{name}-login-lastlog.patch
 Patch8:                %{name}-procpartitions.patch
 Patch9:                %{name}-swaponsymlink.patch
 Patch10:       %{name}-diet.patch
+Patch11:       no-openat.patch
 URL:           http://userweb.kernel.org/~kzak/util-linux/
 BuildRequires: audit-libs-devel >= 1.0.6
 BuildRequires: autoconf >= 2.60
 BuildRequires: automake >= 1:1.10
-BuildRequires: gettext-devel
+BuildRequires: gettext-devel >= 0.14.1
 %{?with_fallocate:BuildRequires:       glibc-devel >= 6:2.11}
-BuildRequires: gtk-doc-automake
+BuildRequires: gtk-doc >= 1.10
+BuildRequires: gtk-doc-automake >= 1.10
 %{?with_selinux:BuildRequires: libselinux-devel}
 %{?with_selinux:BuildRequires: libsepol-devel}
-BuildRequires: libtool
+BuildRequires: libtool >= 2:2.2
 BuildRequires: linux-libc-headers >= 7:2.6.27
 BuildRequires: ncurses-devel >= 5.0
 BuildRequires: pam-devel >= %{pam_ver}
@@ -66,18 +72,22 @@ BuildRequires:      pkgconfig
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpmbuild(macros) >= 1.470
 BuildRequires: sed >= 4.0
+BuildRequires: tar >= 1:1.22
+BuildRequires: udev-devel
+BuildRequires: xz
 BuildRequires: zlib-devel
 %if %{with initrd}
        %if %{with uClibc}
 BuildRequires: uClibc-static >= 2:0.9.29
        %else
                %if %{with dietlibc}
-BuildRequires: dietlibc-static >= 2:0.32-7
+BuildRequires: dietlibc-static >= 2:0.32-14
                %else
 BuildRequires: glibc-static
                %endif
        %endif
 %endif
+Requires:      libblkid = %{version}-%{release}
 Requires:      pam >= %{pam_ver}
 Provides:      fdisk
 Provides:      linux32
@@ -89,10 +99,12 @@ Obsoletes:  rawdevices
 Obsoletes:     schedutils
 Obsoletes:     setarch
 Obsoletes:     sparc32
-Obsoletes:     util-linux-ng <= %{version}-%{release}
+Obsoletes:     util-linux-ng < 2.20-1
 Obsoletes:     util-linux-suids
+Conflicts:     SysVinit < 2.86-26
 Conflicts:     e2fsprogs < 1.41.8-5
 Conflicts:     shadow-extras < 1:4.0.3-6
+Conflicts:     upstart-SysVinit < 2.86-28
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                debugcflags     -O1 -g
@@ -165,7 +177,7 @@ Summary(pl.UTF-8):  Obsługa blockdev
 Group:         Applications/System
 Requires(post,preun):  /sbin/chkconfig
 Requires:      coreutils
-Requires:      rc-scripts
+Requires:      rc-scripts >= 0.4.3.0
 
 %description -n blockdev
 The utility blockdev allows one to call block device ioctls from the
@@ -254,6 +266,9 @@ Summary(ru.UTF-8):  Программы для монтирования и раз
 Summary(tr.UTF-8):     Dosya sistemlerini bağlamak ve çözmek için programlar
 Summary(uk.UTF-8):     Програми для монтування та розмонтування файлових систем
 Group:         Applications/System
+Requires:      libmount = %{version}-%{release}
+Conflicts:     SysVinit < 2.86-26
+# C: nfs-utils-common is opposite to http://cvs.pld-linux.org/packages/nfs-utils/nfs-utils.spec?r1=1.165&r2=1.166
 Conflicts:     nfs-utils-common < 1.1.3-3
 
 %description -n mount
@@ -315,7 +330,7 @@ sisteminizin işlevselliği açısından kritiktir.
 Summary:       chkdupexe - find duplicate executables
 Summary(pl.UTF-8):     chkdupexe odszukuje powtarzające się pliki uruchamialne
 Group:         Applications/System
-Obsoletes:     util-linux-ng-chkdupexe
+Obsoletes:     util-linux-ng-chkdupexe < 2.20-1
 
 %description chkdupexe
 chkdupexe will scan the union of $PATH and a hardcoded list of common
@@ -387,7 +402,7 @@ Summary(pl.UTF-8):  Biblioteka do obsługi identyfikacji urządzeń
 License:       LGPL v2.1+
 Group:         Libraries
 Requires:      libuuid = %{version}-%{release}
-Obsoletes:     util-linux-ng-libs
+Obsoletes:     util-linux-ng-libs < 2.20-1
 
 %description -n libblkid
 Library to handle device identification and token extraction.
@@ -402,7 +417,7 @@ License:    LGPL v2.1+
 Group:         Development/Libraries
 Requires:      libblkid = %{version}-%{release}
 Requires:      libuuid-devel = %{version}-%{release}
-Obsoletes:     util-linux-ng-devel
+Obsoletes:     util-linux-ng-devel < 2.20-1
 
 %description -n libblkid-devel
 Header files for blkid library.
@@ -417,7 +432,7 @@ License:    LGPL v2.1+
 Group:         Development/Libraries
 Requires:      libblkid-devel = %{version}-%{release}
 Requires:      libuuid-static = %{version}-%{release}
-Obsoletes:     util-linux-ng-static
+Obsoletes:     util-linux-ng-static < 2.20-1
 
 %description -n libblkid-static
 Static library to handle device identification and token extraction.
@@ -587,6 +602,7 @@ Statyczna wersja biblioteki mount dla dietlibc.
 Summary:       Check and repair a Linux file system
 Summary(pl.UTF-8):     Sprawdzanie i naprawa linuksowego systemu plików
 Group:         Applications/System
+Requires:      libblkid = %{version}-%{release}
 
 %description -n fsck
 Check and repair a Linux file system.
@@ -598,7 +614,7 @@ Sprawdzanie i naprawa linuksowego systemu plików.
 Summary:       blkid - initrd version
 Summary(pl.UTF-8):     blkid - wersja dla initrd
 Group:         Base
-Obsoletes:     util-linux-ng-initrd
+Obsoletes:     util-linux-ng-initrd < 2.20-1
 Conflicts:     geninitrd < 10000.10
 
 %description initrd
@@ -613,17 +629,16 @@ etykietę lub UUID - statycznie skonsolidowane na potrzeby initrd.
 %setup -q -a1
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch6 -p1
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
-
-sed -i -e 's/-lncursesw/-lncursesw -ltinfow/' configure.ac
+%if %{without partx}
+%patch11 -p1
+%endif
 
 %{__rm} po/stamp-po
 
@@ -638,15 +653,21 @@ sed -i -e 's/-lncursesw/-lncursesw -ltinfow/' configure.ac
 export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses -DHAVE_LSEEK64_PROTOTYPE -DHAVE_LLSEEK_PROTOTYPE"
 %if %{with initrd}
 %{?with_uClibc:xCC="%{_target_cpu}-uclibc-gcc"}
-%{?with_dietlibc:xCC="diet %{__cc}"; xCC=${xCC#*ccache }}
+%{?with_dietlibc:xCC="%{__cc}"; xCC="diet ${xCC#*ccache }"}
 %configure \
 %if %{with dietlibc}
        ac_cv_header_crypt_h="no" \
 %endif
        CC="$xCC" \
+%if "%{?configure_cache}" == "1"
+       --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
+%endif
        --disable-shared \
        --enable-static \
        --disable-fsck \
+       --disable-cramfs \
+       --disable-raw \
+       --disable-libmount \
        --disable-login-utils \
        --disable-schedutils \
        --disable-silent-rules \
@@ -654,15 +675,14 @@ export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses -DHAVE_LSEEK64_PROTOTYPE
        --disable-wall \
        --without-audit \
        --without-ncurses \
-       --without-pam \
        --without-selinux
 
 # configure gets it unconditionally wrong
-sed -i -e 's/#define HAVE_WIDECHAR 1//' config.h
+%{__sed} -i -e 's/#define HAVE_WIDECHAR 1//' config.h
 
-sed -i -e 's/ cal\$(EXEEXT) / /; s/ lsblk\$(EXEEXT)//' misc-utils/Makefile
+%{__sed} -i -e 's/ cal\$(EXEEXT) / /; s/ lsblk\$(EXEEXT)//' misc-utils/Makefile
 
-for dir in shlibs/* disk-utils misc-utils fsck fdisk schedutils hwclock; do
+for dir in libblkid libuuid disk-utils misc-utils fsck fdisk schedutils hwclock; do
        %{__make} -C $dir \
        %if %{with uClibc}
                LDFLAGS="-Wl,-static"
@@ -672,7 +692,7 @@ for dir in shlibs/* disk-utils misc-utils fsck fdisk schedutils hwclock; do
                LDFLAGS="-lcompat"
        %endif
        # empty line required because there is a backslash up there
-       %{__make} -C $dir install DESTDIR=`pwd`/initrd
+       %{__make} -C $dir install DESTDIR=$(pwd)/initrd
 done
 
 %{__make} clean
@@ -685,33 +705,36 @@ done
        --disable-silent-rules \
        --disable-use-tty-group \
        --disable-wall \
+       --enable-ddate \
+       --enable-line \
        --enable-kill \
        --enable-login-chown-vcs \
        --enable-login-utils \
        --enable-partx \
        --enable-write \
        --with-audit \
-       --with-pam \
        --with%{!?with_selinux:out}-selinux
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} \
+install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,init,security} \
        $RPM_BUILD_ROOT{/%{_lib},/var/{lock,lib/libuuid}}
 %{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-sed -i -e 's,/usr/spool/mail,/var/mail,g' $RPM_BUILD_ROOT%{_mandir}/man1/login.1
-
+%if %{with partx}
 mv $RPM_BUILD_ROOT%{_sbindir}/{addpart,delpart,partx} $RPM_BUILD_ROOT/sbin
+%endif
+mv $RPM_BUILD_ROOT/sbin/raw $RPM_BUILD_ROOT%{_bindir}
 
-cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/login
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/login
 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/blockdev
-cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/blockdev
+cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/blockdev
+cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/init/blockdev.conf
 
 :> $RPM_BUILD_ROOT/etc/security/blacklist.login
 :> $RPM_BUILD_ROOT/var/lock/wtmpxlock
@@ -734,6 +757,12 @@ for d in cs de es fi fr hu id it ja ko nl pl ; do
                fi
        done
 done
+# it's been moved from man1 to man8
+for d in es ja ko ; do
+       mv -f $RPM_BUILD_ROOT%{_mandir}/$d/man1/readprofile.1 \
+               $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
 
 # cleanup, remove files not included in package
 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{chfn,chsh,newgrp} \
@@ -755,7 +784,7 @@ install -p initrd%{_sbindir}/* $RPM_BUILD_ROOT%{_libdir}/initrd/
 ln -s fsck $RPM_BUILD_ROOT%{_libdir}/initrd/e2fsck
 
 # We don't need those
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/initrd/{chkdupexe,ddate,uuidd,mcookie,whereis,mkfs*,fsck.minix,isosize,logger}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/initrd/{chkdupexe,uuidd,mcookie,whereis,mkfs*,fsck.minix,isosize,logger}
 
 %if %{with dietlibc}
 cp -a initrd%{_libdir}/lib*.a $RPM_BUILD_ROOT%{dietlibdir}
@@ -804,7 +833,7 @@ fi
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc */README.* text-utils/LICENSE.pg NEWS
+%doc */README.* NEWS
 
 %attr(755,root,root) /sbin/clock
 %attr(755,root,root) /sbin/hwclock*
@@ -854,16 +883,20 @@ fi
 
 %attr(755,root,root) /bin/dmesg
 %attr(755,root,root) /bin/kill
-%attr(755,root,root) /bin/lsblk
 %attr(755,root,root) /bin/more
-%attr(755,root,root) /sbin/addpart
+
+%attr(755,root,root) /sbin/chcpu
 %attr(755,root,root) /sbin/ctrlaltdel
+%if %{with partx}
+%attr(755,root,root) /sbin/addpart
 %attr(755,root,root) /sbin/delpart
+%attr(755,root,root) /sbin/partx
+%attr(755,root,root) /bin/lsblk
+%endif
 %attr(755,root,root) /sbin/fsfreeze
 %attr(755,root,root) /sbin/fstrim
 %attr(755,root,root) /sbin/mkfs
 %attr(755,root,root) /sbin/mkswap
-%attr(755,root,root) /sbin/partx
 %attr(755,root,root) /sbin/swaplabel
 %if "%{pld_release}" != "ac"
 %attr(755,root,root) /sbin/switch_root
@@ -893,6 +926,8 @@ fi
 %attr(755,root,root) %{_bindir}/mcookie
 %attr(755,root,root) %{_bindir}/namei
 %attr(755,root,root) %{_bindir}/pg
+%attr(755,root,root) %{_bindir}/prlimit
+%attr(755,root,root) %{_bindir}/raw
 %attr(755,root,root) %{_bindir}/rename
 %attr(755,root,root) %{_bindir}/renice
 %attr(755,root,root) %{_bindir}/rev
@@ -935,8 +970,8 @@ fi
 %{_mandir}/man1/mcookie.1*
 %{_mandir}/man1/more.1*
 %{_mandir}/man1/namei.1*
+%{_mandir}/man1/prlimit.1*
 %{_mandir}/man1/pg.1*
-%{_mandir}/man1/readprofile.1*
 %{_mandir}/man1/renice.1*
 %{_mandir}/man1/rev.1*
 %{_mandir}/man1/rename.1*
@@ -950,18 +985,23 @@ fi
 %{_mandir}/man1/unshare.1*
 %{_mandir}/man1/whereis.1*
 %{_mandir}/man1/write.1*
+%if %{with partx}
 %{_mandir}/man8/addpart.8*
+%{_mandir}/man8/delpart.8*
+%{_mandir}/man8/partx.8*
+%{_mandir}/man8/lsblk.8*
+%endif
+%{_mandir}/man8/chcpu.8*
 %{_mandir}/man8/ctrlaltdel.8*
 %{_mandir}/man8/cytune.8*
-%{_mandir}/man8/delpart.8*
 %{_mandir}/man8/fdformat.8*
 %{_mandir}/man8/fsfreeze.8*
 %{_mandir}/man8/fstrim.8*
 %{_mandir}/man8/isosize.8*
 %{_mandir}/man8/ldattach.8*
-%{_mandir}/man8/lsblk.8*
 %{_mandir}/man8/mkswap.8*
-%{_mandir}/man8/partx.8*
+%{_mandir}/man8/raw.8*
+%{_mandir}/man8/readprofile.8*
 %{_mandir}/man8/rtcwake.8*
 %{_mandir}/man8/swaplabel.8*
 %if "%{pld_release}" != "ac"
@@ -981,7 +1021,6 @@ fi
 %lang(es) %{_mandir}/es/man1/look.1*
 %lang(es) %{_mandir}/es/man1/more.1*
 %lang(es) %{_mandir}/es/man1/namei.1*
-%lang(es) %{_mandir}/es/man1/readprofile.1*
 %lang(es) %{_mandir}/es/man1/rev.1*
 %lang(es) %{_mandir}/es/man1/script.1*
 %lang(es) %{_mandir}/es/man1/setterm.1*
@@ -993,6 +1032,7 @@ fi
 %lang(es) %{_mandir}/es/man8/ipcrm.8*
 %lang(es) %{_mandir}/es/man8/ipcs.8*
 %lang(es) %{_mandir}/es/man8/mkswap.8*
+%lang(es) %{_mandir}/es/man8/readprofile.8*
 %lang(es) %{_mandir}/es/man8/renice.8*
 %lang(es) %{_mandir}/es/man8/setsid.8*
 
@@ -1057,7 +1097,6 @@ fi
 %lang(ja) %{_mandir}/ja/man1/mcookie.1*
 %lang(ja) %{_mandir}/ja/man1/more.1*
 %lang(ja) %{_mandir}/ja/man1/namei.1*
-%lang(ja) %{_mandir}/ja/man1/readprofile.1*
 %lang(ja) %{_mandir}/ja/man1/rename.1*
 %lang(ja) %{_mandir}/ja/man1/rev.1*
 %lang(ja) %{_mandir}/ja/man1/script.1*
@@ -1073,6 +1112,7 @@ fi
 %lang(ja) %{_mandir}/ja/man8/ipcs.8*
 %lang(ja) %{_mandir}/ja/man8/isosize.8*
 %lang(ja) %{_mandir}/ja/man8/mkswap.8*
+%lang(ja) %{_mandir}/ja/man8/readprofile.8*
 %lang(ja) %{_mandir}/ja/man8/renice.8*
 %lang(ja) %{_mandir}/ja/man8/setsid.8*
 
@@ -1090,7 +1130,6 @@ fi
 %lang(ko) %{_mandir}/ko/man1/mcookie.1*
 %lang(ko) %{_mandir}/ko/man1/more.1*
 %lang(ko) %{_mandir}/ko/man1/namei.1*
-%lang(ko) %{_mandir}/ko/man1/readprofile.1*
 %lang(ko) %{_mandir}/ko/man1/rev.1*
 %lang(ko) %{_mandir}/ko/man1/script.1*
 %lang(ko) %{_mandir}/ko/man1/setterm.1*
@@ -1103,6 +1142,7 @@ fi
 %lang(ko) %{_mandir}/ko/man8/ipcrm.8*
 %lang(ko) %{_mandir}/ko/man8/ipcs.8*
 %lang(ko) %{_mandir}/ko/man8/mkswap.8*
+%lang(ko) %{_mandir}/ko/man8/readprofile.8*
 %lang(ko) %{_mandir}/ko/man8/renice.8*
 %lang(ko) %{_mandir}/ko/man8/setsid.8*
 
@@ -1202,20 +1242,22 @@ fi
 %defattr(644,root,root,755)
 %attr(754,root,root) /etc/rc.d/init.d/blockdev
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/blockdev
+%config(noreplace) %verify(not md5 mtime size) /etc/init/blockdev.conf
 %attr(755,root,root) /sbin/blockdev
 %{_mandir}/man8/blockdev.8*
 %lang(ja) %{_mandir}/ja/man8/blockdev.8*
 
 %files -n mount
 %defattr(644,root,root,755)
+%attr(755,root,root) /bin/mountpoint
 %attr(4755,root,root) /bin/mount
 %attr(4755,root,root) /bin/umount
 %attr(755,root,root) /sbin/pivot_root
 %attr(755,root,root) /sbin/swapon
 %attr(755,root,root) /sbin/swapoff
 
+%{_mandir}/man1/mountpoint.1*
 %{_mandir}/man5/fstab.5*
-
 %{_mandir}/man8/mount.8*
 %{_mandir}/man8/umount.8*
 %{_mandir}/man8/pivot_root.8*
@@ -1385,12 +1427,6 @@ fi
 %defattr(644,root,root,755)
 %{_libdir}/libmount.a
 
-%if %{with initrd} && %{with dietlibc}
-%files -n libmount-dietlibc
-%defattr(644,root,root,755)
-%{dietlibdir}/libmount.a
-%endif
-
 %files -n fsck
 %defattr(644,root,root,755)
 %attr(755,root,root) /sbin/fsck
This page took 0.219703 seconds and 4 git commands to generate.