r18311 - in /desktop/experimental/gconf/debian: README.Debian changelog default.path gconf-schemas gconf-schemas.xml gconf2-common.dirs gconf2.install gconf2.postinst update-gconf-defaults update-gconf-defaults.8
joss at users.alioth.debian.org
joss at users.alioth.debian.org
Mon Feb 2 13:14:39 UTC 2009
Author: joss
Date: Mon Feb 2 13:14:38 2009
New Revision: 18311
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=18311
Log:
* gconf-schemas: add a --no-signal option.
* gconf2.postinst: improve the detection of cases when daemons need to
be signalled.
* Support alternate installation paths for defaults, including setting
mandatory settings. Closes: #512474, #512947.
+ update-gconf-defaults: implement the --source, --destination,
--no-signal and --mandatory options.
+ update-gconf-defaults.8: document them.
+ default.path: add /var/lib/gconf/debian.mandatory as a mandatory
source.
+ gconf2-common.dirs: add new directories.
+ gconf2.postinst: run update-gconf-defaults --mandatory if needed.
+ gconf2.install: install the script to /usr/bin.
+ README.Debian: document this.
Modified:
desktop/experimental/gconf/debian/README.Debian
desktop/experimental/gconf/debian/changelog
desktop/experimental/gconf/debian/default.path
desktop/experimental/gconf/debian/gconf-schemas
desktop/experimental/gconf/debian/gconf-schemas.xml
desktop/experimental/gconf/debian/gconf2-common.dirs
desktop/experimental/gconf/debian/gconf2.install
desktop/experimental/gconf/debian/gconf2.postinst
desktop/experimental/gconf/debian/update-gconf-defaults
desktop/experimental/gconf/debian/update-gconf-defaults.8
Modified: desktop/experimental/gconf/debian/README.Debian
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gconf/debian/README.Debian?rev=18311&op=diff
==============================================================================
--- desktop/experimental/gconf/debian/README.Debian (original)
+++ desktop/experimental/gconf/debian/README.Debian Mon Feb 2 13:14:38 2009
@@ -1,11 +1,17 @@
GConf 2 for Debian
==================
-The default GConf sources accessed by the GConf daemon are the following:
+The default GConf sources accessed by the GConf daemon are the
+following, in order:
* /etc/gconf/gconf.xml.mandatory/
Mandatory settings set by the administrator. You can edit them with
gconf-editor, as root, to override any user settings.
+
+* /var/lib/gconf/debian.mandatory/
+ This directory contains mandatory settings provided by Debian, CDD or
+ local packages. Mandatory settings are shipped in
+ /usr/share/gconf/mandatory and set by update-gconf-defaults.
* ~/.gconf/
The user's settings.
@@ -33,7 +39,7 @@
structure, for performance reasons. The upgrade from the previous
situation (tree of %gconf.xml files) is done in gconf2 2.12.1-5.
-By default, the home directory structure is created as a tree layout. If
-you want to use a merged tree on the home directory, you should run the
-following command:
+By default, the home directory structure is created as a tree layout
+since it improves write performance. If you want to use a merged tree
+on the home directory, you should run the following command:
gconf-merge-tree ~/.gconf/
Modified: desktop/experimental/gconf/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gconf/debian/changelog?rev=18311&op=diff
==============================================================================
--- desktop/experimental/gconf/debian/changelog (original)
+++ desktop/experimental/gconf/debian/changelog Mon Feb 2 13:14:38 2009
@@ -1,4 +1,4 @@
-gconf (2.24.0-5) UNRELEASED; urgency=low
+gconf (2.24.0-5) experimental; urgency=low
[ Josselin Mouette ]
* Add a Breaks against older libbonobos because gconf using dbus makes
@@ -11,8 +11,22 @@
[ Josselin Mouette ]
* update-gconf-defaults: ignore more backup extensions.
Closes: #512476.
-
- -- Josselin Mouette <joss at debian.org> Sun, 16 Nov 2008 16:46:42 +0100
+ * gconf-schemas: add a --no-signal option.
+ * gconf2.postinst: improve the detection of cases when daemons need to
+ be signalled.
+ * Support alternate installation paths for defaults, including setting
+ mandatory settings. Closes: #512474, #512947.
+ + update-gconf-defaults: implement the --source, --destination,
+ --no-signal and --mandatory options.
+ + update-gconf-defaults.8: document them.
+ + default.path: add /var/lib/gconf/debian.mandatory as a mandatory
+ source.
+ + gconf2-common.dirs: add new directories.
+ + gconf2.postinst: run update-gconf-defaults --mandatory if needed.
+ + gconf2.install: install the script to /usr/bin.
+ + README.Debian: document this.
+
+ -- Josselin Mouette <joss at debian.org> Mon, 02 Feb 2009 14:14:55 +0100
gconf (2.24.0-4) experimental; urgency=low
Modified: desktop/experimental/gconf/debian/default.path
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gconf/debian/default.path?rev=18311&op=diff
==============================================================================
--- desktop/experimental/gconf/debian/default.path (original)
+++ desktop/experimental/gconf/debian/default.path Mon Feb 2 13:14:38 2009
@@ -7,6 +7,9 @@
# Other forced sources imagined by the local administrator
include /etc/gconf/2/local-mandatory.path
+
+# Settings forced by Debian packages
+xml:readonly:/var/lib/gconf/debian.mandatory
#######################
Modified: desktop/experimental/gconf/debian/gconf-schemas
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gconf/debian/gconf-schemas?rev=18311&op=diff
==============================================================================
--- desktop/experimental/gconf/debian/gconf-schemas (original)
+++ desktop/experimental/gconf/debian/gconf-schemas Mon Feb 2 13:14:38 2009
@@ -18,7 +18,8 @@
parser.add_option("--register-all", action="store_true", dest="register_all",
help="clean up the GConf database and register all schemas again",
default=False)
-
+parser.add_option("--no-signal", action="store_false", default=True, dest="signal",
+ help="do not send SIGHUP the running gconfd-2 processes")
(options, args) = parser.parse_args()
if options.register==None and not options.register_all:
@@ -74,7 +75,7 @@
if(res):
sys.exit(res)
-if options.register:
+if options.register and options.signal:
# tell running processes to re-read the GConf database
import signal
try:
Modified: desktop/experimental/gconf/debian/gconf-schemas.xml
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gconf/debian/gconf-schemas.xml?rev=18311&op=diff
==============================================================================
--- desktop/experimental/gconf/debian/gconf-schemas.xml (original)
+++ desktop/experimental/gconf/debian/gconf-schemas.xml Mon Feb 2 13:14:38 2009
@@ -83,6 +83,13 @@
corrupted.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--no-signal</option>
+ </term>
+ <listitem>
+ <para>do not send SIGHUP to the running gconfd-2 processes.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<refsect1>
Modified: desktop/experimental/gconf/debian/gconf2-common.dirs
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gconf/debian/gconf2-common.dirs?rev=18311&op=diff
==============================================================================
--- desktop/experimental/gconf/debian/gconf2-common.dirs (original)
+++ desktop/experimental/gconf/debian/gconf2-common.dirs Mon Feb 2 13:14:38 2009
@@ -2,5 +2,7 @@
/etc/gconf/gconf.xml.mandatory
/etc/gconf/gconf.xml.defaults
/usr/share/gconf/defaults
+/usr/share/gconf/mandatory
/var/lib/gconf/defaults
/var/lib/gconf/debian.defaults
+/var/lib/gconf/debian.mandatory
Modified: desktop/experimental/gconf/debian/gconf2.install
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gconf/debian/gconf2.install?rev=18311&op=diff
==============================================================================
--- desktop/experimental/gconf/debian/gconf2.install (original)
+++ desktop/experimental/gconf/debian/gconf2.install Mon Feb 2 13:14:38 2009
@@ -1,4 +1,4 @@
debian/tmp/usr/bin
debian/gconf-schemas usr/sbin/
-debian/update-gconf-defaults usr/sbin/
+debian/update-gconf-defaults usr/bin/
debian/tmp/usr/share/man
Modified: desktop/experimental/gconf/debian/gconf2.postinst
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gconf/debian/gconf2.postinst?rev=18311&op=diff
==============================================================================
--- desktop/experimental/gconf/debian/gconf2.postinst (original)
+++ desktop/experimental/gconf/debian/gconf2.postinst Mon Feb 2 13:14:38 2009
@@ -35,14 +35,19 @@
if [ "$1" = configure ] && [ -z "$2" ] || [ ! -s /var/lib/gconf/defaults/%gconf-tree.xml ]; then
# First installation: rebuild the defaults database in case
# of packages shipping schemas but not depending on gconf2
- gconf-schemas --register-all
- SIGNAL_DAEMONS=no
+ gconf-schemas --register-all --no-signal
+ SIGNAL_DAEMONS=yes
fi
fi
if [ -d /usr/share/gconf/defaults ] && [ ! -s /var/lib/gconf/debian.defaults/%gconf-tree.xml ]; then
# Same for the defaults
- update-gconf-defaults
- SIGNAL_DAEMONS=no
+ update-gconf-defaults --no-signal
+ SIGNAL_DAEMONS=yes
+fi
+if [ -d /usr/share/gconf/mandatory ] && [ ! -s /var/lib/gconf/debian.mandatory/%gconf-tree.xml ]; then
+ # Same for the mandatory settings
+ update-gconf-defaults --no-signal --mandatory
+ SIGNAL_DAEMONS=yes
fi
if [ "$SIGNAL_DAEMONS" = yes ]; then
Modified: desktop/experimental/gconf/debian/update-gconf-defaults
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gconf/debian/update-gconf-defaults?rev=18311&op=diff
==============================================================================
--- desktop/experimental/gconf/debian/update-gconf-defaults (original)
+++ desktop/experimental/gconf/debian/update-gconf-defaults Mon Feb 2 13:14:38 2009
@@ -4,16 +4,35 @@
# © 2005 Josselin Mouette <joss at debian.org>
# Licensed under the GNU LGPL, see /usr/share/common-licenses/LGPL-2.1
-
-defaults_dir = '/usr/share/gconf/defaults'
-outdir = '/var/lib/gconf/debian.defaults'
treefile = '%gconf-tree.xml'
import os,tempfile,shutil,sys
+from optparse import OptionParser
-if os.geteuid():
- sys.stderr.write("%s needs to be run as root.\n"%sys.argv[0])
- sys.exit(1)
+parser = OptionParser()
+parser.add_option("--source", dest="source_dir", default="/usr/share/gconf/defaults",
+ help="directory where to find the defaults", metavar="DIR")
+parser.add_option("--destination", dest="dest_dir", default="/var/lib/gconf/debian.defaults",
+ help="directory where to build the GConf tree", metavar="DIR")
+parser.add_option("--mandatory", action="store_true", default=False, dest="mandatory",
+ help="select mandatory settings directories")
+parser.add_option("--no-signal", action="store_false", default=True, dest="signal",
+ help="do not send SIGHUP the running gconfd-2 processes")
+
+(options, args) = parser.parse_args()
+
+if options.mandatory:
+ options.source_dir="/usr/share/gconf/mandatory"
+ options.dest_dir="/var/lib/gconf/debian.mandatory"
+
+if not os.path.isdir(options.source_dir):
+ parser.error("Source directory does not exist.")
+if not os.path.isdir(options.dest_dir):
+ parser.error("Destination directory does not exist.")
+if not os.access(options.source_dir,os.R_OK|os.X_OK):
+ parser.error("Source directory is not readable.")
+if not os.access(options.dest_dir,os.W_OK|os.X_OK):
+ parser.error("Destination directory is not writable.")
tmp_dir=tempfile.mkdtemp(prefix="gconf-")
tmp_home=tmp_dir+'/home'
@@ -103,10 +122,10 @@
gconf_val[l[0]] = l[1]
-defaults_files = os.listdir(defaults_dir)
+defaults_files = os.listdir(options.source_dir)
defaults_files.sort()
for f in defaults_files:
- realname=defaults_dir+'/'+f
+ realname=options.source_dir+'/'+f
for ext in ['.dpkg-tmp', '.bak', '.tmp', '~', '.sav', '.save']:
if f.endswith(ext):
continue
@@ -121,16 +140,17 @@
write_and_apply_entries(tmp_file)
try:
- shutil.copyfile(tmp_gconf+'/'+treefile,outdir+'/'+treefile+'.tmp')
- os.rename(outdir+'/'+treefile+'.tmp',outdir+'/'+treefile)
+ shutil.copyfile(tmp_gconf+'/'+treefile,options.dest_dir+'/'+treefile+'.tmp')
+ os.rename(options.dest_dir+'/'+treefile+'.tmp',options.dest_dir+'/'+treefile)
except IOError:
# No %gconf-tree.xml file was created.
try:
- os.remove(outdir+'/'+treefile)
+ os.remove(options.dest_dir+'/'+treefile)
except OSError:
# No existing file
pass
cleanup()
-os.system('kill -s HUP `pidof gconfd-2` >/dev/null 2>&1')
+if options.signal:
+ os.system('kill -s HUP `pidof gconfd-2` >/dev/null 2>&1')
Modified: desktop/experimental/gconf/debian/update-gconf-defaults.8
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gconf/debian/update-gconf-defaults.8?rev=18311&op=diff
==============================================================================
--- desktop/experimental/gconf/debian/update-gconf-defaults.8 (original)
+++ desktop/experimental/gconf/debian/update-gconf-defaults.8 Mon Feb 2 13:14:38 2009
@@ -1,9 +1,10 @@
-.TH UPDATE-GCONF-DEFAULTS 8 "8 Jan 2006"
+.TH UPDATE-GCONF-DEFAULTS 8 "2 Feb 2009"
.\" Please adjust this date whenever revising the manpage.
.SH NAME
update-gconf-defaults \- generate GConf defaults shipped in Debian packages
.SH SYNOPSIS
.B update-gconf-defaults
+[options]
.SH DESCRIPTION
This manual page documents briefly the
.B update-gconf-defaults
@@ -42,15 +43,29 @@
as 10 for packages in the Debian archive, 20 for derived distributions,
50 for CDD distributions, and 90 for site-specific packages.
.SH OPTIONS
-There are no options for this program.
+.TP
+.B \-\-source\fR \fIsource_dir
+Specify an alternate source directory where to find the defaults.
+.TP
+.B \-\-destination\fR \fIdestination_dir
+Specify an alternate destination directory where to build the resulting GConf tree.
+.TP
+.B \-\-mandatory
+Sets source and destination directories appropriate for the mandatory values.
.SH FILES
.TP
.I /usr/share/gconf/defaults/
-The directory where defaults files are read.
+The directory from which defaults files are read.
.TP
-.I /var/lib/gconf/debian.defaults/%gconf-tree.xml
-The value tree generated. It is read by GConf with the default Debian
+.I /usr/share/gconf/mandatory/
+The directory from which defaults files for mandatory settings are read.
+.TP
+.I /var/lib/gconf/debian.defaults
+The directory where the GConf tree for default settings is generated. It is read by GConf with the default Debian
configuration, and it takes precedence over upstream defaults.
+.TP
+.I /var/lib/gconf/debian.mandatory
+The directory where the GConf tree for mandatory settings is generated. It is read by GConf with the default Debian configuration, and it takes precedence over user settings.
.SH SEE ALSO
.BR dh_gconf (1), gconftool (1).
.SH AUTHOR
More information about the pkg-gnome-commits
mailing list