diff --git a/GConf2.spec b/GConf2.spec index 7a1b994..103730e 100644 --- a/GConf2.spec +++ b/GConf2.spec @@ -5,7 +5,7 @@ Summary: A process-transparent configuration system Name: GConf2 Version: 2.20.1 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ Group: System Environment/Base Source: http://download.gnome.org/sources/GConf/2.20/GConf-%{version}.tar.bz2 @@ -34,9 +34,6 @@ Patch2: sync-leak.patch Patch3: dir-leak.patch Patch4: dead-leak.patch -# Add system-wide settings location -Patch5: system-settings.patch - %description GConf is a process-transparent configuration database API used to store user preferences. It has pluggable backends and features to @@ -75,7 +72,6 @@ which require GTK+. %patch2 -p1 -b .sync-leak %patch3 -p1 -b .dir-leak %patch4 -p1 -b .dead-leak -%patch5 -p1 -b .system-settings %build rm -f libtool @@ -88,20 +84,28 @@ make rm -fr $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -#chmod 755 $RPM_BUILD_ROOT/%{_sysconfdir}/gconf/gconf.xml.defaults -#chmod 755 $RPM_BUILD_ROOT/%{_sysconfdir}/gconf/gconf.xml.mandatory +#chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.defaults +#chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.mandatory -mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/gconf/schemas +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.system -rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT/%{_libdir}/GConf/2/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/GConf/2/*.la %find_lang %name %clean rm -rf $RPM_BUILD_ROOT -%post -p /sbin/ldconfig +%post +/sbin/ldconfig + +if [ $1 -gt 1 ]; then + if ! fgrep -q gconf.xml.system %{_sysconfdir}/gconf/2/path; then + sed -i -e 's@xml:readwrite:$(HOME)/.gconf@&\n\n# Location for system-wide settings.\nxml:readonly:/etc/gconf/gconf.xml.system@' %{_sysconfdir}/gconf/2/path + fi +fi %postun -p /sbin/ldconfig @@ -138,6 +142,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/* %changelog +* Fri Nov 16 2007 Ray Strode - 2.20.1-3 +- Add the system-wide settings location in post to be more + upgrade friendly (config file is noreplace) + * Sun Nov 3 2007 Matthias Clasen - 2.20.1-2 - Add a location for system-wide settings diff --git a/system-settings.patch b/system-settings.patch deleted file mode 100644 index 7836e7a..0000000 --- a/system-settings.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up GConf-2.20.1/Makefile.am.system-settings GConf-2.20.1/Makefile.am ---- GConf-2.20.1/Makefile.am.system-settings 2007-11-03 16:00:34.000000000 -0400 -+++ GConf-2.20.1/Makefile.am 2007-11-03 16:01:13.000000000 -0400 -@@ -21,6 +21,8 @@ install-data-local: - -chmod 755 $(DESTDIR)$(sysgconfdir)/gconf.xml.defaults - -mkdir -p $(DESTDIR)$(sysgconfdir)/gconf.xml.mandatory - -chmod 755 $(DESTDIR)$(sysgconfdir)/gconf.xml.mandatory -+ -mkdir -p $(DESTDIR)$(sysgconfdir)/gconf.xml.system -+ -chmod 755 $(DESTDIR)$(sysgconfdir)/gconf.xml.system - - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = gconf-2.0.pc -diff -up GConf-2.20.1/gconf/default.path.in.system-settings GConf-2.20.1/gconf/default.path.in ---- GConf-2.20.1/gconf/default.path.in.system-settings 2007-11-03 15:57:35.000000000 -0400 -+++ GConf-2.20.1/gconf/default.path.in 2007-11-03 15:59:04.000000000 -0400 -@@ -20,6 +20,9 @@ include "$(HOME)/.gconf.path" - # Give users a default storage location, ~/.gconf - xml:readwrite:$(HOME)/.gconf - -+# Location for system-wide settings. -+xml:readonly:@sysgconfdir@/gconf.xml.system -+ - # To read in any defaults settings that the Sys Admin may have created - # prior to a desktop system upgrade. The SysAdmin can stick default values - # system-wide in this file.