From b35c03abdc56771632a0c88a0363245b2c107a2f Mon Sep 17 00:00:00 2001 From: Patryk Zawadzki Date: Wed, 21 Dec 2005 11:52:17 +0000 Subject: [PATCH] - merge user settings for faster startup - script based on Debian Changed files: GConf2-merge-tree.xinit -> 1.1 GConf2.spec -> 1.96 --- GConf2-merge-tree.xinit | 22 ++++++++++++++++++++++ GConf2.spec | 6 +++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 GConf2-merge-tree.xinit diff --git a/GConf2-merge-tree.xinit b/GConf2-merge-tree.xinit new file mode 100644 index 0000000..f0c78c1 --- /dev/null +++ b/GConf2-merge-tree.xinit @@ -0,0 +1,22 @@ +# If the .gconf directory already exists, merge it in a single tree. +# Otherwise, create %gconf-tree.xml so that a single tree is always +# used. + +if [ -x /usr/bin/gconf-merge-tree ]; then + GCONF_DIR="$HOME/.gconf" + GCONF_TREE="$GCONF_DIR/%gconf-tree.xml" + GCONF_DONT="$GCONF_DIR/DONT-MIGRATE" + + if [ -d "$GCONF_DIR" ] + then + if [ ! -f "$GCONF_TREE" ] && [ ! -f "$GCONF_DONT" ] + then + /usr/bin/gconf-merge-tree "$GCONF_DIR" + killall -q -u "$USER" -s HUP gconfd-2 >/dev/null 2>&1 || true + fi + else + mkdir -p -m 700 "$GCONF_DIR" + touch "$GCONF_TREE" + chmod 600 "$GCONF_TREE" + fi +fi diff --git a/GConf2.spec b/GConf2.spec index 95ce9fd..5474d30 100644 --- a/GConf2.spec +++ b/GConf2.spec @@ -16,6 +16,7 @@ License: LGPL Group: X11/Applications Source0: http://ftp.gnome.org/pub/gnome/sources/GConf/2.12/GConf-%{version}.tar.bz2 # Source0-md5: 247110de013ed24b17cf4191eb6daec5 +Source1: %{name}-merge-tree.xinit Patch0: %{name}-NO_MAJOR_VERSION.patch Patch1: %{name}-path.patch URL: http://www.gnome.org/ @@ -111,11 +112,13 @@ rm -f acinclude.m4 %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas +install -d $RPM_BUILD_ROOT%{_sysconfdir}{/gconf/schemas,/X11/xinit/xinitrc.d} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT +install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/GConf2-merge-tree + rm -r $RPM_BUILD_ROOT%{_datadir}/locale/no %find_lang %{name} @@ -139,6 +142,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{_libdir}/GConf2 %attr(755,root,root) %{_libdir}/GConf2/lib*.so %{_sysconfdir}/gconf +%attr(755,root,root) %{_sysconfdir}/X11/xinit/xinitrc.d/* %{_datadir}/sgml/gconf %{_mandir}/man1/* -- 2.44.0