diff options
author | José Bollo <jose.bollo@open.eurogiciel.org> | 2015-02-05 12:35:18 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@open.eurogiciel.org> | 2015-02-06 04:46:34 -0800 |
commit | 5652a12582a0fa73e780f0635da6ebf8c516093f (patch) | |
tree | 8b0e4442eaa9bb2accb8a2c54c97c60ff95a0682 | |
parent | c2b552bd395f4d28f0e369cc1ead4ff18d89a126 (diff) | |
download | tizen-platform-config-5652a12582a0fa73e780f0635da6ebf8c516093f.tar.gz tizen-platform-config-5652a12582a0fa73e780f0635da6ebf8c516093f.tar.bz2 tizen-platform-config-5652a12582a0fa73e780f0635da6ebf8c516093f.zip |
Creation of the skeleton of user's directoriessubmit/tizen_common/20150206.173857submit/tizen_3.0.2014.q4_common/20150211.134338accepted/tizen/common/20150206.174043accepted/tizen/3.0.2014.q4/common/20150211.135309
The platform config is the place where platform configuration occurs.
At this point, the common directories of users are defined by the
file tizen-platform.meta/conf.
Here is the right place for creating the skeleton of the user's directories.
Change-Id: I15f7898dfa786648c64c8dfc90d05fef19c02685
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
-rw-r--r-- | packaging/tizen-platform-config.spec | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/packaging/tizen-platform-config.spec b/packaging/tizen-platform-config.spec index e611555..c205893 100644 --- a/packaging/tizen-platform-config.spec +++ b/packaging/tizen-platform-config.spec @@ -12,6 +12,7 @@ Source0: %{name}-%{version}.tar.gz Source1: %{name}-rpmlintrc Source1001: %{name}.manifest BuildRequires: tizen-platform-wrapper >= 2 +Requires(post): smack # the main package only contains a config file but other dependent packages # will contain binary. So, we can't build a noarch package and have to avoid @@ -59,6 +60,41 @@ cp %{SOURCE1001} . %install %make_install +%post +############################################## +# BEGIN - creation of the /etc/skel/content +############################################## +saveHOME="$HOME" +HOME="%{_sysconfdir}/skel" +. "%{_sysconfdir}/tizen-platform.conf" +cat << ENDOFCAT | +$TZ_USER_HOME User::Home true +$TZ_USER_CONTENT User::Home true +$TZ_USER_CAMERA User::App::Shared true +$TZ_USER_DOCUMENTS User::App::Shared true +$TZ_USER_DOWNLOADS User::App::Shared true +$TZ_USER_GAMES User::App::Shared true +$TZ_USER_IMAGES User::App::Shared true +$TZ_USER_OTHERS User::App::Shared true +$TZ_USER_SOUNDS User::App::Shared true +$TZ_USER_VIDEOS User::App::Shared true +$TZ_USER_SHARE User::App::Shared true +$TZ_USER_APP User false +$TZ_USER_DB User false +$TZ_USER_DESKTOP User false +$TZ_USER_ICONS User::Home true +$TZ_USER_PACKAGES User false +ENDOFCAT +LANG= sort | while read skelname context transmute; do + mkdir -p "$skelname" + chsmack -a "$context" "$skelname" + [ "$transmute" = true ] && chsmack -t "$skelname" +done +HOME="$saveHOME" +############################################## +# END - creation of the /etc/skel/content +############################################## + %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig |