docs/gconf.txt
author dcarbery
Fri, 24 Nov 2006 16:37:59 +0000
branch217update
changeset 19096 d542fc2c823e
parent 8279 eb72d71df9d5
permissions -rw-r--r--
Merged trunk changes r9797:9829 into 217update branch.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
     1
How to package gconf schemas
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
     2
----------------------------
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
     3
7541
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
     4
Background
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
     5
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
     6
(Skip this if you are familiar with gconf, schemas, %gconf.xml files.)
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
     7
Somewhere between GNOME 2.12 and 2.14 GConf changed the file format of
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
     8
its xml backend.  Previously, if you had a key called
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
     9
/desktop/gnome/interface/foo, the corresponding value was stored in
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    10
/etc/gconf/gconf.xml.defaults/desktop/gnome/interface/%gconf.xml
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    11
These files were created using gconftool-2 by installing schemas files,
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    12
stored in /etc/gconf/schemas.
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    13
So we had 100s of small xml files, each containing just a few keys/values
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    14
and translations of the key descriptions in all languages.
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    15
This became a performance issue, as it took several seconds to load
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    16
these files when gconfd-2 started.  The new approach is using
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    17
one "merged" xml file that includes all key - value pairs.
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    18
Localisations were split into separate xml files, one for each locale.
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    19
The new files are /etc/gconf/gconf.xml.defaults/%gconf-tree.xml and
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    20
/etc/gconf/gconf.xml.defaults/%gconf-tree-<locale>.xml
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    21
First a program called gconf-merge-tree was used to generate the
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    22
merged xml files from the directory structure.  Once the merged xml
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    23
files were created, gconfd-2 only read those and ignored the directory
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    24
structure.  So we ended up with 2 gconf data bases which could become
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    25
inconsistent.  Fortunately,  gconftool-2 can now install the schemas
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    26
straight into the merged xml files.  So the preferred way to install
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    27
schemas is doing just that.
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    28
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    29
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    30
Introduction
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    31
7541
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    32
In JDS3, we installed the schemas into $RPM_BUILD_ROOT during 'make install'
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    33
and included the generated %gconf.xml files in the -root packages.
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    34
This was kinda broken as it wasn't possible for multiple packages to
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    35
install gconf keys in the same directory as they would have had to
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    36
deliver the same %gconf.xml file with different contents.
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    37
However, the format of the xml database changed to merged xml files
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    38
(see the Background above), so we were forced to change the way we
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    39
deliver gconf data.
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    40
The basic idea is similar to what Linux distributions do: we package the
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    41
schemas files and install/uninstall them using postinstall/preremove
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    42
scripts.  The only difference is that we can't use gconftool-2 directly
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    43
in procedural package scripts because of problems with Live Upgrade and
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    44
Alternate Root installations (see postrun.txt for more details).
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    45
So what we do is, use postrun to run gconftool-2 "as soon as possible".
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    46
The gconftool-2 command will install the schemas into the merged gconf
7541
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    47
files in /etc/gconf/gconf.xml.defaults/%gconf-tree*.xml.
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
    48
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    49
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    50
Step by step instructions
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    51
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    52
1) Make sure that each -root sub package that delivers gconf schemas
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    53
   depends on SUNWgnome-config (gconf) and SUNWpostrun.  Add these
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    54
   2 lines to the end of the %package definition:
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    55
7650
d6a8553525c1 2006-07-14 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7541
diff changeset
    56
     Requires: SUNWpostrun-root
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    57
     Requires: SUNWgnome-config
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    58
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    59
   Example:
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    60
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    61
     ...
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    62
     %package root
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    63
     Summary:                 %{summary} - / filesystem
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    64
     SUNW_BaseDir:            /
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    65
     %include default-depend.inc
7650
d6a8553525c1 2006-07-14 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7541
diff changeset
    66
     Requires: SUNWpostrun-root
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    67
     Requires: SUNWgnome-config
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    68
     ...
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    69
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    70
2) Make sure that %install does not include the directory based %gconf.xml
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    71
   files.  Note, if you use separate Linux and Solaris spec files and %use,
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    72
   these commands should go in the Linux spec file:
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    73
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    74
     export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1    
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    75
     make DESTDIR=$RPM_BUILD_ROOT install
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    76
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    77
   If you do this, the only gconf-related files in $RPM_BUILD_ROOT/etc
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    78
   should be schemas.
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    79
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    80
   Some more explanations and historical details follow, skip to 3) if you
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    81
   don't care.
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    82
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    83
   In JDS3 and early JDS4 builds, we installed the schemas explicitely
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    84
   in the Solaris spec files' %install section like this:
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    85
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    86
     export GCONF_CONFIG_SOURCE=xml::$RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.defaults
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    87
     for S in $RPM_BUILD_ROOT/%{_sysconfdir}/gconf/schemas/*.schemas; do
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    88
       %{_bindir}/gconftool-2 --makefile-install-rule $S >/dev/null
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    89
     done
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    90
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    91
   Then we had to remove the zero-lenght %gconf.xml nodes (for example
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    92
   /etc/gconf/gconf.xml.defaults/apps/%gconf.xml) as they would
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    93
   have otherwise appeared in multiple -root pkgs, which is a violation
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    94
   of the packaging rules:
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    95
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    96
     chmod -R a+rX $RPM_BUILD_ROOT/%{_sysconfdir}
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    97
     for f in apps/?gconf.xml \
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    98
	      schemas/?gconf.xml \
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
    99
	      schemas/apps/?gconf.xml \
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   100
	 ; do
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   101
       test ! -s $RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.defaults/$f && \
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   102
	 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/gconf/gconf.xml.defaults/$f
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   103
     done
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   104
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   105
   This was really broken, because if the package that includes the removed
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   106
   %gconf.xml files is not installed then the files included in this pkg
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   107
   will not be found by gconfd-2.  Worse, if, by mistake, no package
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   108
   includes some empty %gconf.xml nodes, the leaves won't be found at all.
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   109
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   110
3) Add a %post and a %preun script that installs/uninstalls the schemas.
7541
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   111
   Note, you need to list the schemas files in the %preun script.
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   112
   In the %post script we always install all schemas available on
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   113
   the system for performance reasons.
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   114
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   115
     %post root
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   116
     ( echo 'test -x /usr/bin/gconftool-2 || {';
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   117
       echo '  echo "ERROR: gconftool-2 not found"';
7650
d6a8553525c1 2006-07-14 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7541
diff changeset
   118
       echo '  exit 1';
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   119
       echo '}';
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   120
       echo 'umask 0022';
7541
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   121
       echo 'GCONF_CONFIG_SOURCE=xml:merged:/etc/gconf/gconf.xml.defaults';
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   122
       echo 'export GCONF_CONFIG_SOURCE';
7541
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   123
       echo '/usr/bin/gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/*.schemas'
8279
eb72d71df9d5 2006-10-05 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7650
diff changeset
   124
     ) | $BASEDIR/var/lib/postrun/postrun -u -c JDS_wait
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   125
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   126
     %preun root
8279
eb72d71df9d5 2006-10-05 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7650
diff changeset
   127
     test -x $BASEDIR/var/lib/postrun/postrun || exit 0
7650
d6a8553525c1 2006-07-14 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7541
diff changeset
   128
     ( echo 'test -x $PKG_INSTALL_ROOT/usr/bin/gconftool-2 || {';
d6a8553525c1 2006-07-14 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7541
diff changeset
   129
       echo '  echo "WARNING: gconftool-2 not found; not uninstalling gconf schemas"';
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   130
       echo '  exit 0';
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   131
       echo '}';
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   132
       echo 'umask 0022';
7650
d6a8553525c1 2006-07-14 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7541
diff changeset
   133
       echo 'GCONF_CONFIG_SOURCE=xml:merged:$BASEDIR/etc/gconf/gconf.xml.defaults';
7541
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   134
       echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2';
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   135
       echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib';
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   136
       echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
7650
d6a8553525c1 2006-07-14 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7541
diff changeset
   137
       echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas';
7541
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   138
       echo 'schemas="$SDIR/###FILE1###.schemas';
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   139
       echo '         $SDIR/###FILE2###.schemas';
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   140
       echo '         $SDIR/###FILE3###.schemas';
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   141
     (...)
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   142
       echo '         $SDIR/###FILEn###.schemas"';
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   143
       echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
7650
d6a8553525c1 2006-07-14 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7541
diff changeset
   144
     ) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   145
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   146
4) update %files root (or %files -n SUNWfoo-bar-root), it should look
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   147
   something like this:
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   148
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   149
     %files root
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   150
     %defattr (0755, root, sys)
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   151
     %attr (0755, root, sys) %dir %{_sysconfdir}
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   152
     %{_sysconfdir}/gconf/schemas/###FILE1###.schemas
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   153
     %{_sysconfdir}/gconf/schemas/###FILE2###.schemas
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   154
     %{_sysconfdir}/gconf/schemas/###FILE3###.schemas
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   155
   (...)
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   156
     %{_sysconfdir}/gconf/schemas/###FILEn###.schemas
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   157
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   158
   Note: ###FILE1### ... ###FILEn### must match the list of lines in
7541
7932c160a66f 2006-06-29 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 7366
diff changeset
   159
   %preun.  Please don't use *.schemas but list each schemas
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   160
   file so that when a new schemas file is added to the source tarball
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   161
   the build will break and we will notice that %post %preun and %files
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   162
   need to be updated.
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   163
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   164
That's it.  If something is not clear, have questions or need a review,
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   165
feel free to email me at [email protected].
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   166
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents:
diff changeset
   167
Last updated: 2006-06-02