]> git.pld-linux.org Git - packages/setup.git/blobdiff - setup.spec
- postshell in setup.spec
[packages/setup.git] / setup.spec
index 95640c1cb4d6c5b3cf24449e3b2bce00ff2abb66..875587c2c74793f3ab270ff382ae4a8ecdca3d4e 100644 (file)
@@ -3,7 +3,10 @@
 # - make some README.PLD with system features description
 #
 # Conditional build:
-%bcond_with    ssp     # disable stack-smashing protector (vide dietlibc.spec)
+%bcond_with    ssp     # enable stack-smashing protector (vide dietlibc.spec)
+#
+%define        iana_etc_ver    1.04
+%undefine      with_ccache
 #
 Summary:       Simple setup files
 Summary(de):   Einfache Setup-Dateien
@@ -14,16 +17,22 @@ Summary(pl):        Podstawowe pliki systemu Linux
 Summary(pt_BR):        Vários arquivos básicos de configuração
 Summary(tr):   Basit kurulum dosyalarý
 Name:          setup
-Version:       2.4.6
-Release:       7
+Version:       2.4.10
+Release:       4
 License:       Public Domain, partially BSD-like
 Group:         Base
-#Source0:      http://piorun.ds.pg.gda.pl/~blues/SOURCES/%{name}-%{version}.tar.bz2
-Source0:       %{name}-%{version}.tar.bz2
-# Source0-md5: 33afa2766c28f1fb8331bd9209bf6b04
-Patch0:                %{name}-fstab.patch
-Patch1:                %{name}-special_users.patch
+Source0:       ftp://distfiles.pld-linux.org/src/%{name}-%{version}.tar.bz2
+# Source0-md5: 7f50f1650e961a77b18afa0a4a588fc1
+Source1:       http://www.sethwklein.net/projects/iana-etc/downloads/iana-etc-%{iana_etc_ver}.tar.bz2
+# Source1-md5: 9f769f7b2d0e519cf62dacb2b3b051d4
+Source2:       %{name}-update-fstab.c
+Source3:       postshell.c
+# This is source of non-iana changes in services file
+#Patch0:               %{name}-services.patch
+Patch0:                %{name}-securetty.patch
+Patch1:                %{name}-profile.env.patch
 BuildRequires: dietlibc-static
+BuildRequires: gawk
 Conflicts:     FHS < 2.3
 AutoReqProv:   no
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -65,46 +74,73 @@ Bu paket, passwd, group, profile gibi 
 dosyalarýný içerir.
 
 %prep
-%setup -q
+%setup -q -a1
 %patch0 -p1
 %patch1 -p1
+install %{SOURCE2} update-fstab.c
+install %{SOURCE3} postshell.c
 
 %build
+%{__make} -C iana-etc-%{iana_etc_ver}
+
 %{__make} \
        OPT_FLAGS="%{rpmcflags} %{?with_ssp:-fno-stack-protector}" \
+       LDFLAGS="%{rpmldflags}" \
+       CC="diet %{__cc}"
+%{__make} postshell update-fstab \
+       OPT_FLAGS="%{rpmcflags} -Os" \
+       LDFLAGS="%{rpmldflags}" \
        CC="diet %{__cc}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/shrc.d
+
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/shrc.d
+
+install postshell $RPM_BUILD_ROOT%{_sbindir}
+install update-fstab $RPM_BUILD_ROOT%{_sbindir}
+
+install iana-etc-%{iana_etc_ver}/protocols $RPM_BUILD_ROOT%{_sysconfdir}/protocols
+# don't overwrite files from setup tar-ball, fix it in original tar!
+#install iana-etc-%{iana_etc_ver}/services $RPM_BUILD_ROOT%{_sysconfdir}/services
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %triggerpostun -p %{_sbindir}/joinpasswd -- %{name} < %{version}-%{release}
 
+%triggerin -p %{_sbindir}/update-fstab -- %{name} < 2.4.10-1
+
+%post -p /sbin/postshell
+-/sbin/env-update -u
+
+%postun -p /sbin/postshell
+-/sbin/env-update -u
+
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog
 %attr(755,root,root) %{_sbindir}/joinpasswd
+%attr(755,root,root) %{_sbindir}/postshell
+%attr(755,root,root) %{_sbindir}/update-fstab
 %attr(755,root,root) /etc/profile.d/*.sh
 %attr(755,root,root) /etc/profile.d/*.csh
 %dir /etc/profile.d
-%attr(644,root,root) %config(noreplace,missingok) %verify(not md5 size mtime) %{_sysconfdir}/env.d/*
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/env.d/*
 %dir %{_sysconfdir}/env.d
 %dir %{_sysconfdir}/shrc.d
-%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/fstab
-%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/group
-%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/host.conf
-%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/hosts
-%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/passwd
-%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/profile
-%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/protocols
-%attr(600,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/secure*
-%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/services
-%attr(644,root,root) %config(noreplace,missingok) %verify(not md5 size mtime) %{_sysconfdir}/filesystems
-%attr(644,root,root) %config(noreplace,missingok) %verify(not md5 size mtime) %{_sysconfdir}/motd
-%attr(644,root,root) %config(noreplace,missingok) %verify(not md5 size mtime) %{_sysconfdir}/resolv.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fstab
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/group
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/host.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hosts
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/passwd
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/profile
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/protocols
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/secure*
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/services
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/filesystems
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/motd
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/resolv.conf
 %ghost %{_sysconfdir}/shells
This page took 0.080268 seconds and 4 git commands to generate.