]> git.pld-linux.org Git - packages/util-linux.git/blobdiff - util-linux.spec
- utmpx-dump symlink to utmpdump (as it was in SysVinit)
[packages/util-linux.git] / util-linux.spec
index 223236ad52dc2f7fc6e97887f65bd20de6789285..b0b6df501d0df5e54b4769303f9571c2b951ece3 100644 (file)
@@ -1,20 +1,23 @@
 # TODO
-# - follow readprofile.1 -> redprofile.8 change in translated manuals as well
-#   /usr/share/getopt/getopt-parse.bash
-#   /usr/share/getopt/getopt-parse.tcsh
+# - 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
 %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)
+%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_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"
@@ -33,12 +36,12 @@ Summary(ru.UTF-8):  Набор базовых системных утилит д
 Summary(tr.UTF-8):     Temel sistem araçları
 Summary(uk.UTF-8):     Набір базових системних утиліт для Linux
 Name:          util-linux
-Version:       2.21
-Release:       3
+Version:       2.22.1
+Release:       0.1
 License:       GPL
 Group:         Applications/System
-Source0:       https://www.kernel.org/pub/linux/utils/util-linux/v2.21/%{name}-%{version}.tar.xz
-# Source0-md5: 208aa058f4117759d2939d1be7d662fc
+Source0:       https://www.kernel.org/pub/linux/utils/util-linux/v2.22/%{name}-%{version}.tar.xz
+# Source0-md5: 730cf9932531ed09b53a04ca30fcb4c9
 Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: 3c940c7e7fe699eaa2ddb1bffb3de2fe
 Source2:       login.pamd
@@ -52,18 +55,15 @@ Patch4:             %{name}-fhs.patch
 Patch5:                %{name}-hotkeys.patch
 Patch7:                %{name}-login-lastlog.patch
 Patch8:                %{name}-procpartitions.patch
-Patch9:                %{name}-swaponsymlink.patch
+
 Patch10:       %{name}-diet.patch
-Patch11:       no-openat.patch
-Patch12:       https://github.com/karelzak/util-linux/commit/2f595c001b4528b3b9a4aea04d72b6918c434efb.patch
-# Patch12-md5: 6671ea54ea50f49ef56e05a7b3c8bd37
-Patch13:       fix-crash-on-fdisk-l.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 >= 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: libsepol-devel}
@@ -92,10 +92,12 @@ BuildRequires:      glibc-static
 %endif
 Requires:      libblkid = %{version}-%{release}
 Requires:      pam >= %{pam_ver}
+Provides:      eject = %{version}-%{release}
 Provides:      fdisk
 Provides:      linux32
 Provides:      sparc32
 Obsoletes:     cramfs
+Obsoletes:     eject
 Obsoletes:     ionice
 Obsoletes:     linux32
 Obsoletes:     rawdevices
@@ -530,7 +532,9 @@ 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:      libuuid = %{version}-%{release}
+Requires:      systemd-units >= 38
 Provides:      group(uuidd)
 Provides:      user(uuidd)
 Conflicts:     libuuid < 1.40.5-0.1
@@ -630,20 +634,14 @@ etykietę lub UUID - statycznie skonsolidowane na potrzeby initrd.
 
 %prep
 %setup -q -a1
-%patch0 -p1
+#%patch0 -p1
 %patch1 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch7 -p1
 %patch8 -p1
-%patch9 -p1
 %patch10 -p1
-%if %{without partx}
-%patch11 -p1
-%endif
-%patch12 -p1
-%patch13 -p1
 
 %{__rm} po/stamp-po
 
@@ -661,22 +659,40 @@ export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses -DHAVE_LSEEK64_PROTOTYPE
 %{?with_dietlibc:xCC="%{__cc}"; xCC="diet ${xCC#*ccache }"}
 %configure \
 %if %{with dietlibc}
-       ac_cv_header_crypt_h="no" \
+       ac_cv_header_crypt_h=no \
+       ac_cv_header_stdio_ext_h=no \
 %endif
        CC="$xCC" \
 %if "%{?configure_cache}" == "1"
        --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
 %endif
+       --exec-prefix= \
+       --bindir=/bin \
+       --sbindir=/sbin \
+       --libdir=/%{_lib} \
        --disable-shared \
        --enable-static \
-       --disable-fsck \
+       --disable-agetty \
+       --disable-chfn-chsh \
        --disable-cramfs \
-       --disable-raw \
+       --disable-kill \
+       --disable-ldattach \
        --disable-libmount \
-       --disable-login-utils \
+       --disable-login \
+       --disable-losetup \
+       --disable-minix \
+       --disable-newgrp \
+       --disable-partx \
+       --disable-raw \
        --disable-schedutils \
+       --disable-setarch \
        --disable-silent-rules \
+       --disable-su \
+       --disable-sulogin \
        --disable-use-tty-group \
+       --disable-utmpdump \
+       --disable-uuidd \
+       --disable-vipw \
        --disable-wall \
        --without-audit \
        --without-ncurses \
@@ -685,20 +701,17 @@ export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses -DHAVE_LSEEK64_PROTOTYPE
 # configure gets it unconditionally wrong
 %{__sed} -i -e 's/#define HAVE_WIDECHAR 1//' config.h
 
-%{__sed} -i -e 's/ cal\$(EXEEXT) / /; s/ lsblk\$(EXEEXT)//' misc-utils/Makefile
+%{__make} \
+%if %{with uClibc}
+       LDFLAGS="-Wl,-static"
+%endif
+%if %{with dietlibc}
+       CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE" \
+       LDFLAGS="-lcompat"
+%endif
 
-for dir in libblkid libuuid disk-utils misc-utils fsck fdisk schedutils hwclock; do
-       %{__make} -C $dir \
-       %if %{with uClibc}
-               LDFLAGS="-Wl,-static"
-       %endif
-       %if %{with dietlibc}
-               CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE" \
-               LDFLAGS="-lcompat"
-       %endif
-       # empty line required because there is a backslash up there
-       %{__make} -C $dir install DESTDIR=$(pwd)/initrd
-done
+%{__make} install \
+       DESTDIR=$(pwd)/initrd
 
 %{__make} clean
 %endif
@@ -710,15 +723,23 @@ done
        --disable-silent-rules \
        --disable-use-tty-group \
        --disable-wall \
+       --enable-chfn-chsh \
+       --enable-chkdupexe \
        --enable-ddate \
-       --enable-line \
        --enable-kill \
+       --enable-libblkid \
+       --enable-line \
+       --enable-login \
        --enable-login-chown-vcs \
-       --enable-login-utils \
+       --enable-newgrp \
        --enable-partx \
+       --enable-su \
+       --enable-sulogin \
+       --enable-utmpdump \
+       --enable-vipw \
        --enable-write \
        --with-audit \
-       --with%{!?with_selinux:out}-selinux
+       --with-selinux%{!?with_selinux:=no}
 
 %{__make}
 
@@ -731,9 +752,7 @@ install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,init,security} \
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-%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 -p %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/login
@@ -754,6 +773,8 @@ done
 ln -sf hwclock $RPM_BUILD_ROOT/sbin/clock
 echo '.so hwclock.8' > $RPM_BUILD_ROOT%{_mandir}/man8/clock.8
 
+ln -s utmpdump $RPM_BUILD_ROOT%{_bindir}/utmpx-dump
+
 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
@@ -762,6 +783,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} \
@@ -772,21 +799,25 @@ done
        $RPM_BUILD_ROOT%{_mandir}/*/man5/nfs.5 \
        $RPM_BUILD_ROOT%{_mandir}/*/man8/{elvtune,setfdprm,sln,ramsize,raw,rdev,rootflags,vidmode}.8
 
-%ifarch sparc sparc64
+%ifarch sparc sparcv9 sparc64
+# programs not built on sparc
 %{__rm} $RPM_BUILD_ROOT%{_mandir}/*/man8/{cfdisk,sfdisk}.8
 %endif
 
+# examples
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/getopt/getopt-parse.*sh
+
 %if %{with initrd}
 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
-install -p initrd%{_bindir}/* $RPM_BUILD_ROOT%{_libdir}/initrd/
-install -p initrd%{_sbindir}/* $RPM_BUILD_ROOT%{_libdir}/initrd/
+install -p initrd/bin/* $RPM_BUILD_ROOT%{_libdir}/initrd
+install -p initrd/sbin/* $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,uuidd,mcookie,whereis,mkfs*,fsck.minix,isosize,logger}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/initrd/{cal,col,colcrt,colrm,column,ctrlaltdel,cytune,dmesg,flock,fsfreeze,fstrim,getopt,hexdump,ipcmk,ipcrm,ipcs,isosize,logger,lslocks,mcookie,mkfs*,readprofile,renice,rev,rtcwake,script,scriptreplay,setsid,tailf,tunelp,wdctl,whereis}
 
 %if %{with dietlibc}
-cp -a initrd%{_libdir}/lib*.a $RPM_BUILD_ROOT%{dietlibdir}
+cp -a initrd/%{_lib}/lib*.a $RPM_BUILD_ROOT%{dietlibdir}
 %endif
 %endif
 
@@ -832,7 +863,7 @@ fi
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc */README.* NEWS
+%doc AUTHORS ChangeLog NEWS README README.licensing Documentation misc-utils/getopt-parse.{bash,tcsh}
 
 %attr(755,root,root) /sbin/clock
 %attr(755,root,root) /sbin/hwclock*
@@ -883,19 +914,20 @@ 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
-%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/sulogin
 %attr(755,root,root) /sbin/swaplabel
 %if "%{pld_release}" != "ac"
 %attr(755,root,root) /sbin/switch_root
@@ -909,6 +941,7 @@ fi
 %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}
 %attr(755,root,root) %{_bindir}/getopt
@@ -922,6 +955,7 @@ fi
 %attr(755,root,root) %{_bindir}/logger
 %attr(755,root,root) %{_bindir}/look
 %attr(755,root,root) %{_bindir}/lscpu
+%attr(755,root,root) %{_bindir}/lslocks
 %attr(755,root,root) %{_bindir}/mcookie
 %attr(755,root,root) %{_bindir}/namei
 %attr(755,root,root) %{_bindir}/pg
@@ -938,11 +972,14 @@ fi
 %attr(755,root,root) %{_bindir}/taskset
 %attr(755,root,root) %{_bindir}/ul
 %attr(755,root,root) %{_bindir}/unshare
+%attr(755,root,root) %{_bindir}/utmpdump
+%attr(755,root,root) %{_bindir}/utmpx-dump
 %attr(755,root,root) %{_bindir}/whereis
 %attr(2755,root,tty) %{_bindir}/write
 %attr(755,root,root) %{_sbindir}/fdformat
 %attr(755,root,root) %{_sbindir}/ldattach
 %attr(755,root,root) %{_sbindir}/readprofile
+%attr(755,root,root) %{_sbindir}/resizepart
 %attr(755,root,root) %{_sbindir}/rtcwake
 
 %{_mandir}/man1/cal.1*
@@ -953,6 +990,7 @@ fi
 %{_mandir}/man1/column.1*
 %{_mandir}/man1/ddate.1*
 %{_mandir}/man1/dmesg.1*
+%{_mandir}/man1/eject.1*
 %{?with_fallocate:%{_mandir}/man1/fallocate.1*}
 %{_mandir}/man1/flock.1*
 %{_mandir}/man1/getopt.1*
@@ -978,18 +1016,18 @@ fi
 %{_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*
 %{_mandir}/man1/unshare.1*
+%{_mandir}/man1/utmpdump.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*
@@ -998,14 +1036,18 @@ fi
 %{_mandir}/man8/fstrim.8*
 %{_mandir}/man8/isosize.8*
 %{_mandir}/man8/ldattach.8*
+%{_mandir}/man8/lslocks.8*
 %{_mandir}/man8/mkswap.8*
 %{_mandir}/man8/raw.8*
 %{_mandir}/man8/readprofile.8*
+%{_mandir}/man8/resizepart.8*
 %{_mandir}/man8/rtcwake.8*
 %{_mandir}/man8/swaplabel.8*
 %if "%{pld_release}" != "ac"
 %{_mandir}/man8/switch_root.8*
 %endif
+%{_mandir}/man8/sulogin.8*
+%{_mandir}/man8/wdctl.8*
 %{_mandir}/man8/wipefs.8*
 
 %lang(de) %{_mandir}/de/man1/kill.1*
@@ -1020,7 +1062,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*
@@ -1032,6 +1073,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*
 
@@ -1091,12 +1133,10 @@ fi
 %lang(ja) %{_mandir}/ja/man1/kill.1*
 %lang(ja) %{_mandir}/ja/man1/line.1*
 %lang(ja) %{_mandir}/ja/man1/logger.1*
-%lang(ja) %{_mandir}/ja/man1/login.1*
 %lang(ja) %{_mandir}/ja/man1/look.1*
 %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*
@@ -1112,6 +1152,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*
 
@@ -1129,7 +1170,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*
@@ -1142,6 +1182,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*
 
@@ -1406,6 +1447,8 @@ fi
 %attr(6755,uuidd,uuidd) %{_sbindir}/uuidd
 %attr(2775,uuidd,uuidd) /var/lib/libuuid
 %{_mandir}/man8/uuidd.8*
+%{systemdunitdir}/uuidd.service
+%{systemdunitdir}/uuidd.socket
 
 %files -n libmount
 %defattr(644,root,root,755)
@@ -1434,5 +1477,25 @@ fi
 %if %{with initrd}
 %files initrd
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/initrd/*
+%attr(755,root,root) %{_libdir}/initrd/blkid
+%attr(755,root,root) %{_libdir}/initrd/blockdev
+%attr(755,root,root) %{_libdir}/initrd/fdformat
+%attr(755,root,root) %{_libdir}/initrd/fdisk
+%attr(755,root,root) %{_libdir}/initrd/findfs
+%attr(755,root,root) %{_libdir}/initrd/hwclock
+%attr(755,root,root) %{_libdir}/initrd/look
+%attr(755,root,root) %{_libdir}/initrd/mkswap
+%attr(755,root,root) %{_libdir}/initrd/namei
+%attr(755,root,root) %{_libdir}/initrd/rename
+%ifnarch sparc sparcv9 sparc64
+%attr(755,root,root) %{_libdir}/initrd/sfdisk
+%endif
+%attr(755,root,root) %{_libdir}/initrd/swaplabel
+%attr(755,root,root) %{_libdir}/initrd/uuidgen
+%attr(755,root,root) %{_libdir}/initrd/wipefs
+# not needed?
+#%attr(755,root,root) %{_libdir}/initrd/chrt
+# not built because of disabled libmount
+#%attr(755,root,root) %{_libdir}/initrd/e2fsck
+#%attr(755,root,root) %{_libdir}/initrd/fsck
 %endif
This page took 0.109465 seconds and 4 git commands to generate.