Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 13286] New: Profiles support in sorcery

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 13286] New: Profiles support in sorcery
  • Date: 25 Nov 2006 20:40:32 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=13286

Summary: Profiles support in sorcery
Product: Sorcery
Version: Untargetted future release
Platform: Other
OS/Version: other
Status: NEW
Severity: enhancement
Priority: P2
Component: Unknown
AssignedTo: sm-sorcery-bugs AT lists.ibiblio.org
ReportedBy: ruskie+smbugs AT mages.ath.cx


I've been thinking about this for a long time. I always wanted a way to do
cast
--profile myFOOOchroot basesystem and have basesystem cast for that profile I
configured in sorcery with it's own optimisations, install_root, state_root
etc... while STILL keeping my normal cast foo at the same time so that I can
do
other things while that's building.

So I did the following:
a) /etc/sorcery/config
started using $PROFILE in CONFIG_CACHE
added SORCERY_ROOT to ease some stuff
added /etc/sorcery/profile(generated by install) file that holds
DEFAULT_PROFILE and is boing sourced in config
b) Minor bugfixes in other files in /etc/sorcery/ to use SORCERY_ROOT or
whatever necessary variables
c) Added profile/--profile/-p options to various sorcery commands:
delve, dispel,cast,sorcery,summon,cleanse,scribe,gaze
d) Minor fix in libsecurity for hardcoded SPELL_CONFIG

Also need to do:
a) error checking for profile commands(does it exist)
b) How to setup the other commands like:
scribbler, vcast, cabal, alter, confmeld
to respect profiles(can they even be used with them?)
c) Would be nice to offload some of the /etc/sorcery/config vars into
a separate file. Re-sourcing after exporting PROFILE(is this even a good
variable for this) is a bit heavy.
Re-sourcing ONLY the following would be easier:
LOCAL_COMPILE_CONFIG=${CONFIG_CACHE}/compile_config
CONFIG_CACHE=${SORCERY_ROOT}/${PROFILE}
LOCAL_ROOTS_CONFIG=${CONFIG_CACHE}/roots
LOCAL_MEDIA_CONFIG=${CONFIG_CACHE}/media
LOCAL_URL_CONFIG=${CONFIG_CACHE}/url
LOCAL_CONFIG=${CONFIG_CACHE}/config
SM_CONFIG_OPTION_CACHE=${CONFIG_CACHE}/config_option_cache
GRIMOIRE_LIST=${CONFIG_CACHE}/grimoire
GRIMOIRE_LIST_BACKUP=${CONFIG_CACHE}/grimoire.backup
DEPENDS_CONFIG=${STATE_ROOT}${CONFIG_CACHE}/depends

INSTALLWATCH_UNSTAGED_PATHS="${INSTALLWATCH_UNSTAGED_PATHS},${CONFIG_CACHE}"

The above vars are all from:
${SORCERY_ROOT}/compile_config
${SORCERY_ROOT}/state
${SORCERY_ROOT}/config

Possibly offload the above variables from config into:
${SORCERY_ROOT}/cache_config
To reduce loading time due to re-sourcing.

Common way to make use of profiles from within a command:
"export PROFILE="$2" ; . /etc/sorcery/config(or cache_config) ; shift 2"

Test case usage of this:

I'm using linux-vserver(glorified chroot). I have it setup to use
/srv/vserver/$profilename directory.
In sorcery I configure a profile vserver-mysql for example. In this
profile I don't want anything else but the minimal basesystem and the
mysql server running so I exile everything that isn't related to mysql.

I can then maintain this vserver without ever entering it to run sorcery
inside
it by simply doing sorcery profile vserver-mysql upgrade. Infact no need to
install sorcery in the chroot at that nor any toolchain since all building is
done outside the chroot(perhaps a chroot-basesystem spell?(how to get only
libstdc++.so.foo without installing g++/gcc inside?)).

--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



  • [SM-Sorcery-Bugs] [Bug 13286] New: Profiles support in sorcery, bugzilla-daemon, 11/25/2006

Archive powered by MHonArc 2.6.24.

Top of Page