From 8869e651dff9924bee1a40445e63caf5e32fdb50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= Date: Wed, 18 Sep 2013 16:12:01 +0200 Subject: [PATCH] copy content of /etc/skel directory for root as posstrans, don't overwrite existing files (#999114) --- rootfiles.spec | 15 ++++++++++----- 1 file 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 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 - 8.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild