- Add the system-wide settings location in post to be more upgrade friendly

(config file is noreplace)
epel9
Ray Strode 17 years ago
parent eed5167d53
commit 61e030aa2e

@ -5,7 +5,7 @@
Summary: A process-transparent configuration system Summary: A process-transparent configuration system
Name: GConf2 Name: GConf2
Version: 2.20.1 Version: 2.20.1
Release: 2%{?dist} Release: 3%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Base Group: System Environment/Base
Source: http://download.gnome.org/sources/GConf/2.20/GConf-%{version}.tar.bz2 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 Patch3: dir-leak.patch
Patch4: dead-leak.patch Patch4: dead-leak.patch
# Add system-wide settings location
Patch5: system-settings.patch
%description %description
GConf is a process-transparent configuration database API used to GConf is a process-transparent configuration database API used to
store user preferences. It has pluggable backends and features to store user preferences. It has pluggable backends and features to
@ -75,7 +72,6 @@ which require GTK+.
%patch2 -p1 -b .sync-leak %patch2 -p1 -b .sync-leak
%patch3 -p1 -b .dir-leak %patch3 -p1 -b .dir-leak
%patch4 -p1 -b .dead-leak %patch4 -p1 -b .dead-leak
%patch5 -p1 -b .system-settings
%build %build
rm -f libtool rm -f libtool
@ -88,20 +84,28 @@ make
rm -fr $RPM_BUILD_ROOT rm -fr $RPM_BUILD_ROOT
make install DESTDIR=$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.defaults
#chmod 755 $RPM_BUILD_ROOT/%{_sysconfdir}/gconf/gconf.xml.mandatory #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}/*.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/GConf/2/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/GConf/2/*.la
%find_lang %name %find_lang %name
%clean %clean
rm -rf $RPM_BUILD_ROOT 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 %postun -p /sbin/ldconfig
@ -138,6 +142,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%changelog %changelog
* Fri Nov 16 2007 Ray Strode <rstrode@redhat.com> - 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 <mclasen@redhat.com> - 2.20.1-2 * Sun Nov 3 2007 Matthias Clasen <mclasen@redhat.com> - 2.20.1-2
- Add a location for system-wide settings - Add a location for system-wide settings

@ -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.
Loading…
Cancel
Save