[sabayon] Per the mailing list, moved sabayon's conf dir to /etc/sabayon, profiles dir to /etc/sabayon/profile
- From: Scott Balneaves <sbalneav src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [sabayon] Per the mailing list, moved sabayon's conf dir to /etc/sabayon, profiles dir to /etc/sabayon/profile
- Date: Wed, 23 Dec 2009 01:24:22 +0000 (UTC)
commit 44101e3b3fa47642b7b4456ce23aaf225adb992b
Author: Scott Balneaves <sbalneav ltsp org>
Date: Tue Dec 22 19:23:22 2009 -0600
Per the mailing list, moved sabayon's conf dir to /etc/sabayon,
profiles dir to /etc/sabayon/profiles
admin-tool/Makefile.am | 5 +++--
admin-tool/sabayon-xinitrc.sh.in | 2 +-
help/C/sabayon.xml | 16 ++++++++--------
lib/config.py.in | 7 ++++---
lib/storage.py | 6 +++---
lib/systemdb.py | 18 +++++++++---------
sabayon.schema | 2 +-
7 files changed, 29 insertions(+), 27 deletions(-)
---
diff --git a/admin-tool/Makefile.am b/admin-tool/Makefile.am
index 3758f02..87138ea 100644
--- a/admin-tool/Makefile.am
+++ b/admin-tool/Makefile.am
@@ -56,7 +56,7 @@ xinitrc_SCRIPTS = sabayon-xinitrc.sh
endif
install-exec-local:
- mkdir -p $(DESTDIR)$(sysconfdir)/desktop-profiles/
+ mkdir -p $(DESTDIR)$(sysconfdir)/sabayon/profiles/
if CONSOLE_HELPER
$(INSTALL_DATA) -D $(srcdir)/sabayon.pam $(DESTDIR)$(PAM_PREFIX)/pam.d/sabayon
$(INSTALL_DATA) -D sabayon.console $(DESTDIR)$(PAM_PREFIX)/security/console.apps/sabayon
@@ -66,7 +66,8 @@ if CONSOLE_HELPER
endif
uninstall-local:
- rmdir --ignore-fail-on-non-empty $(DESTDIR)$(sysconfdir)/desktop-profiles/
+ rmdir --ignore-fail-on-non-empty $(DESTDIR)$(sysconfdir)/sabayon/profiles/
+ rmdir --ignore-fail-on-non-empty $(DESTDIR)$(sysconfdir)/sabayon/
if CONSOLE_HELPER
rm -f $(DESTDIR)$(PAM_PREFIX)/pam.d/sabayon
rm -f $(DESTDIR)$(PAM_PREFIX)/security/console.apps/sabayon
diff --git a/admin-tool/sabayon-xinitrc.sh.in b/admin-tool/sabayon-xinitrc.sh.in
old mode 100644
new mode 100755
index 048d317..95af1fc
--- a/admin-tool/sabayon-xinitrc.sh.in
+++ b/admin-tool/sabayon-xinitrc.sh.in
@@ -6,7 +6,7 @@
if [ "x$DISABLE_SABAYON_XINITRC" = "x" ] ; then
# ensure we do no work if there are no profiles to apply
- if [ -f @SCONFDIR@/desktop-profiles/users.xml ]; then
+ if [ -f @SCONFDIR@/sabayon/users.xml ] || [ -f @SYSCONFDIR@/sabayon/groups.xml ]; then
if [ -x @SBINDIR@/sabayon-apply ] ; then
@SBINDIR@/sabayon-apply
fi
diff --git a/help/C/sabayon.xml b/help/C/sabayon.xml
index 37a7365..e20775b 100644
--- a/help/C/sabayon.xml
+++ b/help/C/sabayon.xml
@@ -354,7 +354,7 @@ gksu sabayon
</orderedlist>
<para>
Then save the profile by selecting Profile -> Save
- The profile is saved in /etc/desktop-profiles, as a .zip file
+ The profile is saved in /etc/sabayon/profiles, as a .zip file
with the name you selected for the profile.
</para>
</sect2>
@@ -460,7 +460,7 @@ fi
#Argument 1 : name of the profile
#Argument 2 : name of the group
#
-chemin_profil="/etc/desktop-profiles/$1".zip
+chemin_profil="/etc/sabayon/profiles/$1".zip
if [ $# -eq 2 ]
then
if [ -a $chemin_profil ]
@@ -577,7 +577,7 @@ Usage :
</para>
<para>
This file is located under
- <filename>/etc/desktop-profiles/users.xml</filename>
+ <filename>/etc/sabayon/users.xml</filename>
(see PROFILESDIR in the config.py file to change the
prefix), as the name makes clear it is an XML file and
usually look like:
@@ -807,14 +807,14 @@ Usage :
The container is a Zip, its content can be viewed using the command
</para>
<screen>
-unzip -l /etc/desktop-profiles/test.zip
+unzip -l /etc/sabayon/profiles/test.zip
</screen>
<para>
The first entry is the metadata part, it is an XML file describing the
content of the archive. It can be viewed using the command
</para>
<screen>
-unzip -p /etc/desktop-profiles/test.zip metadata
+unzip -p /etc/sabayon/profiles/test.zip metadata
</screen>
<para>
Currently, the metadata contains
@@ -897,7 +897,7 @@ unzip -p /etc/desktop-profiles/test.zip metadata
<para>
Sabayon supports using LDAP to get profiles in a very flexible way.
By defining server settings and queries in the
- <filename>/etc/desktop-profiles/users.xml</filename> file it can do the mapping from user
+ <filename>/etc/sabayon/users.xml</filename> file it can do the mapping from user
to profile file using LDAP queries. An example setup can look like:
</para>
<screen>
@@ -959,8 +959,8 @@ unzip -p /etc/desktop-profiles/test.zip metadata
name to use for the user. The profile name is just a string, and it can be
either an absolute URI, a URI relative to the config file, or just a name.
If it is a name it will be looked up in the locationmap LDAP query (if specified)
- and if that didn't match, it will be converted to a filename in /etc/desktop-profiles
- by appending ".zip".
+ and if that didn't match, it will be converted to a
+ filename in <filename>/etc/sabayon/profiles</filename> by appending ".zip".
</para>
<para>
The locationmap query specifies the mapping from profile name to profile
diff --git a/lib/config.py.in b/lib/config.py.in
index c9a3ee2..d8ab25b 100755
--- a/lib/config.py.in
+++ b/lib/config.py.in
@@ -26,8 +26,9 @@ SYSCONFDIR = "@SYSCONFDIR@"
LIBEXECDIR = "@LIBEXECDIR@"
SBINDIR = "@SBINDIR@"
-BUILDERDIR = os.path.join (DATADIR, "sabayon", "ui")
-PROFILESDIR = os.path.join (SYSCONFDIR, "desktop-profiles")
+BUILDERDIR = os.path.join (DATADIR, "sabayon", "ui")
+CONFIGDIR = os.path.join (SYSCONFDIR, "sabayon")
+PROFILESDIR = os.path.join (CONFIGDIR, "profiles")
MONITOR_TOOL_ARGV = [ os.path.join (LIBEXECDIR, "sabayon-monitor") ]
SESSION_TOOL_ARGV = [ os.path.join (LIBEXECDIR, "sabayon-session") ]
@@ -157,6 +158,6 @@ GCONF_KEYS_TO_IGNORE = [
"/desktop/gnome/peripherals/keyboard/kbd.sysbackup/*",
]
-LOG_CONFIG_FILENAME = "sabayon-debug-log.conf"
+LOG_CONFIG_FILENAME = os.path.join (CONFIGDIR, "sabayon-debug-log.conf")
BUG_TRACKING_SYSTEM = "http://bugzilla.gnome.org"
diff --git a/lib/storage.py b/lib/storage.py
index 30337d2..91f6c52 100755
--- a/lib/storage.py
+++ b/lib/storage.py
@@ -92,7 +92,7 @@ class ProfileStorage:
fact that there is a temporary directory are both
implementation details and not exposed in the API.
- Profile files are stored in /etc/desktop-profiles.
+ Profile files are stored in /etc/sabayon/profiles.
Each file or directory in the profile has metadata
associated with it - the "source" of the file/directory
@@ -104,7 +104,7 @@ class ProfileStorage:
"""Create a ProfileStorage.
@name: the name of the profile - translates to
- /etc/desktop-profiles/$(name).zip.
+ /etc/sabayon/profiles/$(name).zip.
"""
self.name = name
self.readonly = 0
@@ -564,7 +564,7 @@ class ProfileStorage:
def save (self):
"""Save the contents of the profile to
- /etc/desktop-profiles/$(name).zip.
+ /etc/sabayon/profiles/$(name).zip.
"""
if self.readonly:
raise ProfileStorageException (_("Profile is read-only %s") %
diff --git a/lib/systemdb.py b/lib/systemdb.py
index 47a0784..934e4b8 100644
--- a/lib/systemdb.py
+++ b/lib/systemdb.py
@@ -93,12 +93,12 @@ class SystemDatabase(object):
association between users and profiles.
This database is stored by default in
- $(sysconfdir)/desktop-profiles/users.xml and contains a
+ $(sysconfdir)/sabayon/profiles/users.xml and contains a
list of users and the profile associated with each of
those users.
A profile can be reference by either its name (in which case
- the profile is stored at /etc/desktop-profiles/$(name).zip),
+ the profile is stored at /etc/sabayon/profiles/$(name).zip),
an absolute path or a http/file URL.
"""
def __init__ (self, db_file = None):
@@ -106,12 +106,12 @@ class SystemDatabase(object):
@db_file: a mandatory path which specifes the location
of the database file. If only a file is specified, the
- directory /etc/desktop-profiles is used.
+ directory /etc/sabayon is used.
"""
if db_file is None:
raise SystemDatabaseException(_("No database file provided"))
elif db_file[0] != '/':
- file = os.path.join (config.PROFILESDIR, db_file)
+ file = os.path.join (config.CONFIGDIR, db_file)
else:
file = db_file
self.file = file
@@ -462,7 +462,7 @@ class SystemDatabase(object):
def get_profiles (self):
"""Return the list of currently available profiles.
This is basically just list of zip files in
- /etc/desktop-profiles, each without the .zip extension.
+ /etc/sabayon/profiles, each without the .zip extension.
"""
list = []
try:
@@ -611,11 +611,11 @@ def run_unit_tests ():
db.set_profile("localuser", "groupA")
res = db.get_profile("localuser")
assert not res is None
- assert res[-28:] == "/desktop-profiles/groupA.zip"
+ assert res[-20:] == "/profiles/groupA.zip"
db.set_profile("localuser", "groupB")
res = db.get_profile("localuser")
assert not res is None
- assert res[-28:] == "/desktop-profiles/groupB.zip"
+ assert res[-20:] == "/profiles/groupB.zip"
res = db.get_users()
print res
db = GroupDatabase(testgroupfile)
@@ -626,11 +626,11 @@ def run_unit_tests ():
db.set_profile("localgroup", "groupA")
res = db.get_profile("localgroup")
assert not res is None
- assert res[-28:] == "/desktop-profiles/groupA.zip"
+ assert res[-20:] == "/profiles/groupA.zip"
db.set_profile("localgroup", "groupB")
res = db.get_profile("localgroup")
assert not res is None
- assert res[-28:] == "/desktop-profiles/groupB.zip"
+ assert res[-20:] == "/profiles/groupB.zip"
res = db.get_groups()
print res
diff --git a/sabayon.schema b/sabayon.schema
index f91c622..30bbb96 100644
--- a/sabayon.schema
+++ b/sabayon.schema
@@ -10,7 +10,7 @@ attributetype ( 1.3.6.1.4.1.2312.4.3.3.1 NAME 'sabayonProfileURL'
# This attribute is used to store the name of a sabayon profile.
# It can refer to either a local zipfile (which will be looked up
-# in /etc/desktop-profiles/$(name).zip), or it can be used to
+# in /etc/sabayon/profiles/$(name).zip), or it can be used to
# map to another ldap object that maps to the final profile URL
attributetype ( 1.3.6.1.4.1.2312.4.3.3.2 NAME 'sabayonProfileName'
DESC 'The Name of a sabayon profile'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]