%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"
Summary(ru.UTF-8): Набор базовых системных утилит для Linux
Summary(tr.UTF-8): Temel sistem araçları
Summary(uk.UTF-8): Набір базових системних утиліт для Linux
-Name: util-linux-ng
-Version: 2.19
-Release: 0.1
+Name: util-linux
+Version: 2.20
+Release: 5
License: GPL
Group: Applications/System
-Source0: http://ftp.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-%{version}.tar.bz2
-# Source0-md5: 590ca71aad0b254e2631d84401f28255
-Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/util-linux-non-english-man-pages.tar.bz2
+Source0: http://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/%{name}-%{version}.tar.bz2
+# Source0-md5: 4dcacdbdafa116635e52b977d9d0e879
+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: util-linux-blockdev.init
-Source4: util-linux-blockdev.sysconfig
-Patch0: %{name}-ppc.patch
-Patch1: %{name}-union-mount.patch
-Patch2: util-linux-ctrlaltdel-man.patch
-Patch3: util-linux-fdformat-ide.patch
-Patch4: util-linux-fhs.patch
-Patch5: util-linux-hotkeys.patch
-Patch7: util-linux-login-lastlog.patch
-Patch8: util-linux-procpartitions.patch
-Patch9: util-linux-swaponsymlink.patch
-Patch10: util-linux-diet.patch
+Source3: %{name}-blockdev.init
+Source4: %{name}-blockdev.sysconfig
+Source5: blockdev.upstart
+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
+BuildRequires: autoconf >= 2.60
BuildRequires: automake >= 1:1.10
BuildRequires: gettext-devel
%{?with_fallocate:BuildRequires: glibc-devel >= 6:2.11}
BuildRequires: gtk-doc-automake
%{?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}
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
Provides: fdisk
Provides: linux32
Provides: sparc32
-Provides: util-linux = %{version}-%{release}
Obsoletes: cramfs
Obsoletes: ionice
Obsoletes: linux32
Obsoletes: schedutils
Obsoletes: setarch
Obsoletes: sparc32
-Obsoletes: util-linux
+Obsoletes: util-linux-ng <= %{version}-%{release}
Obsoletes: util-linux-suids
+Conflicts: SysVinit < 2.86-26
+Conflicts: upstart-SysVinit < 2.86-26
Conflicts: e2fsprogs < 1.41.8-5
Conflicts: shadow-extras < 1:4.0.3-6
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary: chkdupexe - find duplicate executables
Summary(pl.UTF-8): chkdupexe odszukuje powtarzające się pliki uruchamialne
Group: Applications/System
-Provides: util-linux-chkdupexe = %{version}-%{release}
-Obsoletes: util-linux-chkdupexe
+Obsoletes: util-linux-ng-chkdupexe
%description chkdupexe
chkdupexe will scan the union of $PATH and a hardcoded list of common
Summary: blkid - initrd version
Summary(pl.UTF-8): blkid - wersja dla initrd
Group: Base
+Obsoletes: util-linux-ng-initrd
Conflicts: geninitrd < 10000.10
%description initrd
etykietę lub UUID - statycznie skonsolidowane na potrzeby initrd.
%prep
-%setup -q -a1 -n util-linux-%{version}
-%patch0 -p1
+%setup -q -a1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
+#%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
+%if %{without partx}
+%patch11 -p1
+%endif
+%if "%{pld_release}" != "ac"
sed -i -e 's/-lncursesw/-lncursesw -ltinfow/' configure.ac
+%endif
+
+%{__rm} po/stamp-po
%build
%{__gettextize}
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 \
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 libmount libuuid disk-utils misc-utils fsck fdisk schedutils hwclock; do
%{__make} -C $dir \
%if %{with uClibc}
LDFLAGS="-Wl,-static"
--disable-silent-rules \
--disable-use-tty-group \
--disable-wall \
+ --enable-ddate \
+ --enable-line \
--enable-kill \
--enable-login-chown-vcs \
--enable-login-utils \
%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}}
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
-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
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}
%endif
%endif
-%find_lang util-linux
+%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post -n libmount -p /sbin/ldconfig
%postun -n libmount -p /sbin/ldconfig
-%files -f util-linux.lang
+%files -f %{name}.lang
%defattr(644,root,root,755)
%doc */README.* text-utils/LICENSE.pg NEWS
%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) /bin/mountpoint
+
%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
%{_mandir}/man1/lscpu.1*
%{_mandir}/man1/mcookie.1*
%{_mandir}/man1/more.1*
+%{_mandir}/man1/mountpoint.1*
%{_mandir}/man1/namei.1*
%{_mandir}/man1/pg.1*
%{_mandir}/man1/readprofile.1*
%{_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/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/rtcwake.8*
%{_mandir}/man8/swaplabel.8*
%if "%{pld_release}" != "ac"
%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*