[rootfiles] copy content of /etc/skel directory for root as posstrans, don't overwrite existing files (#999114)

Ondrej Vasik ovasik at fedoraproject.org
Wed Sep 18 14:12:14 UTC 2013


commit 8869e651dff9924bee1a40445e63caf5e32fdb50
Author: Ondřej Vašík <ovasik at redhat.com>
Date:   Wed Sep 18 16:12:01 2013 +0200

    copy content of /etc/skel directory for root as posstrans, don't overwrite  existing files (#999114)

 rootfiles.spec |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/rootfiles.spec b/rootfiles.spec
index a44b93f..a371d98 100644
--- a/rootfiles.spec
+++ b/rootfiles.spec
@@ -1,7 +1,7 @@
 Summary: The basic required files for the root user's directory
 Name: rootfiles
 Version: 8.1
-Release: 11%{?dist}
+Release: 12%{?dist}
 License: Public Domain
 Group: System Environment/Base
 
@@ -14,7 +14,6 @@ Source2: dot-bash_logout
 Source3: dot-tcshrc
 Source4: dot-cshrc
 
-Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
 
 %description
@@ -26,7 +25,6 @@ users' home directories.
 %prep
 
 %install
-rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT/root
 
 for file in %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} ; do
@@ -34,14 +32,21 @@ for file in %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} ; do
   install -p -m 644 $file $RPM_BUILD_ROOT/root/${f/dot-/.}
 done
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+%posttrans
+if [ $1 -eq 0 ] ; then
+  #copy recursively the content, but do not overwrite the original files provided by rootfiles package
+  cp -na /etc/skel/* /root/
+fi
 
 %files
 %defattr(-,root,root,-)
 %config(noreplace) /root/.[A-Za-z]*
 
 %changelog
+* Wed Sep 18 2013 Ondrej Vasik <ovasik at redhat.com> 0.1-12
+- copy content of /etc/skel directory for root as posstrans,
+  don't overwrite  existing files (#999114)
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 8.1-11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list