]> git.pld-linux.org Git - packages/SysVinit.git/blobdiff - SysVinit.spec
- use %useradd/%groupadd macros
[packages/SysVinit.git] / SysVinit.spec
index eeca9acbb805ab1c2686eff84472549d7361433c..823d278372275404390b2108aa1ae27df0da96f9 100644 (file)
@@ -1,4 +1,8 @@
+#
+# Conditional build:
 %bcond_with    preconfigured
+%bcond_without selinux         # build without SELinux support
+#
 Summary:       System V initialization program
 Summary(de):   System V-Intialisierungsprogramm
 Summary(es):   Programa de inicialización System V
@@ -9,12 +13,12 @@ Summary(ru): 
 Summary(tr):   System V baþlatma programý
 Summary(uk):   ðÒÏÇÒÁÍÉ, ÝÏ ËÅÒÕÀÔØ ÂÁÚÏ×ÉÍÉ ÓÉÓÔÅÍÎÉÍÉ ÐÒÏÃÅÓÁÍÉ
 Name:          SysVinit
-Version:       2.85
-Release:       8
+Version:       2.86
+Release:       1
 License:       GPL
 Group:         Base
 Source0:       ftp://ftp.cistron.nl/pub/people/miquels/software/sysvinit-%{version}.tar.gz
-# Source0-md5: 8a2d8f1ed5a2909da04132fefa44905e
+# Source0-md5: 7d5d61c026122ab791ac04c8a84db967
 Source1:       sysvinit.logrotate
 Source2:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/sysvinit-non-english-man-pages.tar.bz2
 # Source2-md5: 9ae8a63a4685368fae19707f95475cca
@@ -25,15 +29,16 @@ Patch3:             sysvinit-wtmp.patch
 Patch4:                sysvinit-man.patch
 Patch5:                sysvinit-halt.patch
 Patch6:                sysvinit-blowfish.patch
-Patch7:                sysvinit-initctl.patch
-Patch8:                sysvinit-autofsck.patch
-Patch9:                sysvinit-pidof.patch
-Patch10:       sysvinit-log-signals.patch
-Patch11:       sysvinit-killall5.patch
+Patch7:                sysvinit-autofsck.patch
+Patch8:                sysvinit-pidof.patch
+Patch9:                sysvinit-killall5.patch
 # based on http://www.nsa.gov/selinux/patches/sysvinit-selinux.patch.gz
-Patch12:       sysvinit-selinux.patch
-BuildRequires: libselinux-devel >= 1.14
-BuildRequires: rpmbuild(macros) >= 1.159
+Patch10:       sysvinit-selinux.patch
+%if %{with selinux}
+BuildRequires: libselinux-devel >= 1.18
+BuildRequires: libsepol-devel
+%endif
+BuildRequires: rpmbuild(macros) >= 1.202
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(post):        fileutils
@@ -44,11 +49,13 @@ Requires:   login
 Requires:      logrotate
 %endif
 Requires:      mingetty
-Requires:      libselinux >= 1.14
+%{?with_selinux:Requires:      libselinux >= 1.18}
 Provides:      group(utmp)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sbindir        /sbin
+# as in original flags
+%define                specflags       -fomit-frame-pointer
 
 %description
 The SysVinit package contains a group of processes that control the
@@ -112,20 +119,19 @@ sonlanmalar
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
+%{?with_selinux:%patch10 -p1}
 
 %build
 %{__make} -C src \
        CC="%{__cc}" \
        LCRYPT="-lcrypt" \
-       OPTIMIZE="%{rpmcflags}"
+       OPTIMIZE="%{rpmcflags}" \
+       LDFLAGS="%{rpmldflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man{1,5,8}} \
-       $RPM_BUILD_ROOT{%{_sysconfdir},/etc/logrotate.d,/var/log}
+install -d $RPM_BUILD_ROOT{/bin,%{_bindir},%{_sbindir},%{_mandir}/man{1,5,8}} \
+       $RPM_BUILD_ROOT{%{_includedir},%{_sysconfdir},/etc/logrotate.d,/var/log}
 
 %{__make} install -C src \
        ROOT=$RPM_BUILD_ROOT \
@@ -153,14 +159,7 @@ bzip2 -dc %{SOURCE2} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`/usr/bin/getgid utmp`" ]; then
-       if [ "`/usr/bin/getgid utmp`" != 22 ]; then
-               echo "Error: group utmp doesn't have gid=22. Correct this before installing SysVinit." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 22 utmp 1>&2
-fi
+%groupadd -g 22 utmp
 
 %post
 touch %{_sysconfdir}/ioctl.save /var/log/{fail,last}log
@@ -182,6 +181,7 @@ fi
 %defattr(644,root,root,755)
 %doc doc/{Propaganda,Changelog,*.lsm}
 
+%attr(755,root,root) /bin/mountpoint
 %attr(755,root,root) %{_sbindir}/*
 %attr(755,root,root) %{_bindir}/last
 %attr(755,root,root) %{_bindir}/lastb
@@ -208,3 +208,6 @@ fi
 %lang(ja) %{_mandir}/ja/man[158]/*
 %lang(ko) %{_mandir}/ko/man[158]/*
 %lang(pl) %{_mandir}/pl/man[158]/*
+
+# devel?
+#%{_includedir}/initreq.h
This page took 0.12295 seconds and 4 git commands to generate.