diff options
Diffstat (limited to 'packaging/setup.spec')
-rw-r--r-- | packaging/setup.spec | 148 |
1 files changed, 64 insertions, 84 deletions
diff --git a/packaging/setup.spec b/packaging/setup.spec index 04cbff0..427cb88 100644 --- a/packaging/setup.spec +++ b/packaging/setup.spec @@ -1,108 +1,88 @@ -Summary: A set of system configuration and setup files -Name: setup -Version: 0.1 -Release: 1 -License: Public Domain -Group: System/Base -URL: https://fedorahosted.org/setup/ -Source0: https://fedorahosted.org/releases/s/e/%{name}/%{name}-0.1.tar.bz2 -BuildArch: noarch -BuildRequires: bash -Requires: filesystem +Name: setup +Version: 0.5 +Release: 1 +License: Public Domain +Summary: A set of system configuration and setup files +Url: https://fedorahosted.org/setup/ +Group: System/Base +Source0: %{name}-%{version}.tar.bz2 +Source1001: packaging/setup.manifest +BuildRequires: bash +BuildArch: noarch +Requires(pre): filesystem %description The setup package contains a set of important system configuration and setup files, such as passwd, group, and profile. %prep -%setup -q +%setup -q ./shadowconvert.sh %build +cp %{SOURCE1001} . %check # Run any sanity checks. -#make check +make check %install -rm -rf %{buildroot} -mkdir -p %{buildroot}/etc/profile.d +mkdir -p %{buildroot}%{_sysconfdir}/profile.d cp -ar * %{buildroot}/etc -rm -f %{buildroot}/etc/uidgid -rm -f %{buildroot}/etc/COPYING -rm -rf %{buildroot}/etc/packaging -mkdir -p %{buildroot}/var/log -touch %{buildroot}/var/log/lastlog -touch %{buildroot}/etc/environment -chmod 0644 %{buildroot}/etc/environment -chmod 0400 %{buildroot}/etc/{shadow,gshadow} -chmod 0644 %{buildroot}/var/log/lastlog -touch %{buildroot}/etc/fstab -touch %{buildroot}/etc/mtab +rm -f %{buildroot}%{_sysconfdir}/uidgid +rm -f %{buildroot}%{_sysconfdir}/COPYING +mkdir -p %{buildroot}%{_localstatedir}/log +touch %{buildroot}%{_localstatedir}/log/lastlog +touch %{buildroot}%{_sysconfdir}/environment +chmod 0644 %{buildroot}%{_sysconfdir}/environment +chmod 0400 %{buildroot}%{_sysconfdir}/{shadow,gshadow} +chmod 0644 %{buildroot}%{_localstatedir}/log/lastlog +touch %{buildroot}%{_sysconfdir}/fstab +touch %{buildroot}%{_sysconfdir}/mtab # remove unpackaged files from the buildroot -rm -f %{buildroot}/etc/Makefile -rm -f %{buildroot}/etc/serviceslint -rm -f %{buildroot}/etc/uidgidlint -rm -f %{buildroot}/etc/shadowconvert.sh -rm -f %{buildroot}/etc/setup.spec +rm -f %{buildroot}%{_sysconfdir}/Makefile +rm -f %{buildroot}%{_sysconfdir}/serviceslint +rm -f %{buildroot}%{_sysconfdir}/uidgidlint +rm -f %{buildroot}%{_sysconfdir}/shadowconvert.sh +rm -rf %{buildroot}%{_sysconfdir}/packaging +rm -rf %{buildroot}%{_sysconfdir}/*.manifest -#mkdir -p %{buildroot}/opt/etc -#mv %{buildroot}/etc/{passwd,group,shadow,gshadow} %{buildroot}/opt/etc -pushd %{buildroot}/etc -rm -f passwd shadow group gshadow -#ln -s ../opt/etc/passwd -#ln -s ../opt/etc/shadow -#ln -s ../opt/etc/group -#ln -s ../opt/etc/gshadow -popd - -%clean -rm -rf %{buildroot} #throw away useless and dangerous update stuff until rpm will be able to #handle it ( http://rpm.org/ticket/6 ) -#%post -p <lua> -#for i, name in ipairs({"passwd", "shadow", "group", "gshadow"}) do -# os.remove("/etc/"..name..".rpmnew") -#end +%post -p <lua> +for i, name in ipairs({"passwd", "shadow", "group", "gshadow"}) do + os.remove("/etc/"..name..".rpmnew") +end %files -%defattr(-,root,root,-) -#/etc/passwd -#/etc/group -#/etc/shadow -#/etc/gshadow -#%config(noreplace) /opt/etc/passwd -#%config(noreplace) /opt/etc/group -#%config(noreplace,missingok) /opt/etc/shadow -#%config(noreplace,missingok) /opt/etc/gshadow - -#%verify(not md5 size mtime) %config(noreplace) /opt/etc/passwd -#%verify(not md5 size mtime) %config(noreplace) /opt/etc/group -#%verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) /opt/etc/shadow -#%verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) /opt/etc/gshadow -%verify(not md5 size mtime) %config(noreplace) /etc/services -%verify(not md5 size mtime) %config(noreplace) /etc/exports -%config(noreplace) /etc/aliases -%config(noreplace) /etc/environment -%config(noreplace) /etc/filesystems -%config(noreplace) /etc/host.conf -%verify(not md5 size mtime) %config(noreplace) /etc/hosts -%verify(not md5 size mtime) %config(noreplace) /etc/hosts.allow -%verify(not md5 size mtime) %config(noreplace) /etc/hosts.deny -%verify(not md5 size mtime) %config(noreplace) /etc/motd -%config(noreplace) /etc/printcap -%verify(not md5 size mtime) %config(noreplace) /etc/inputrc -%config(noreplace) /etc/bashrc -%config(noreplace) /etc/profile -%verify(not md5 size mtime) %config(noreplace) /etc/protocols -%attr(0600,root,root) %config(noreplace,missingok) /etc/securetty -%config(noreplace) /etc/csh.login -%config(noreplace) /etc/csh.cshrc -%dir /etc/profile.d -%config(noreplace) %verify(not md5 size mtime) /etc/shells -%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog -%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/fstab -%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab +%manifest setup.manifest +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/passwd +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/group +%verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) %{_sysconfdir}/shadow +%verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) %{_sysconfdir}/gshadow +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/services +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/exports +%config(noreplace) %{_sysconfdir}/aliases +%config(noreplace) %{_sysconfdir}/environment +%config(noreplace) %{_sysconfdir}/filesystems +%config(noreplace) %{_sysconfdir}/host.conf +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.allow +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/hosts.deny +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/motd +%config(noreplace) %{_sysconfdir}/printcap +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/inputrc +%config(noreplace) %{_sysconfdir}/bashrc +%config(noreplace) %{_sysconfdir}/profile +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/protocols +%attr(0600,root,root) %config(noreplace,missingok) %{_sysconfdir}/securetty +%config(noreplace) %{_sysconfdir}/csh.login +%config(noreplace) %{_sysconfdir}/csh.cshrc +%dir %{_sysconfdir}/profile.d +%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/shells +%ghost %attr(0644,root,root) %verify(not md5 size mtime) %{_localstatedir}/log/lastlog +%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/fstab +%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/mtab |