catalyst.git
11 years agoversion: Remove shebang (Python modules are not scripts) build-v3
W. Trevor King [Tue, 11 Jun 2013 21:41:18 +0000 (17:41 -0400)]
version: Remove shebang (Python modules are not scripts)

Nobody should be executing this file directly.

11 years agoStreamline data_files generation with additional keys
Brian Dolbec [Fri, 7 Jun 2013 14:42:27 +0000 (07:42 -0700)]
Streamline data_files generation with additional keys

* Move data_file generation out of setup().
* Return per-directory keys, since distutils only uses the directory
  key and value filename (not the value path) when installing
  data_files.
* Use relative key paths for more flexible installation.
* Raise NotImplementedError if os.path.sep is not '/', which allows
  for simpler path handling.

11 years agoMakefile: Set PYTHONPATH=. for make_target_table.py
W. Trevor King [Thu, 6 Jun 2013 22:32:40 +0000 (18:32 -0400)]
Makefile: Set PYTHONPATH=. for make_target_table.py

Avoid:

  $ make
  ...
  "./doc/make_target_table.py" > "doc/targets.generated.txt"
  Traceback (most recent call last):
    File "./doc/make_target_table.py", line 34, in <module>
      __import__(module_name)
  ImportError: No module named catalyst.targets.embedded
  make: *** [doc/targets.generated.txt] Error 1

This also ensures that the local catalyst package takes precedence
over any previously installed version.

11 years agoMakefiles: create files directory before populating it
W. Trevor King [Thu, 6 Jun 2013 22:05:12 +0000 (18:05 -0400)]
Makefiles: create files directory before populating it

The syntax for the rules is:

  targets ...: target-pattern: prereq-patterns | order-only-prerequisites

For details, see:

http://www.gnu.org/software/make/manual/html_node/Static-Usage.html
http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

11 years agoAdd set_version command to setup.py.
Brian Dolbec [Thu, 6 Jun 2013 15:57:41 +0000 (08:57 -0700)]
Add set_version command to setup.py.

* Add/modify functions to save and retrieve the set version
  information or the live git version.
* Change indent to tabs.

11 years agosetup.py: Add disutils-based packaging
W. Trevor King [Wed, 5 Jun 2013 17:13:43 +0000 (13:13 -0400)]
setup.py: Add disutils-based packaging

Package catalyst in the usual manner for Python projects.  Now it is
ready for PyPI :).

I also expose the version string in catalyst.__version__, since that's
a more traditional location than catalyst.version.__version__.

11 years agofix '-' in stage names for python imports
Brian Dolbec [Tue, 11 Jun 2013 16:07:03 +0000 (09:07 -0700)]
fix '-' in stage names for python imports

11 years agoMake testpath automagic via dwfeed's tweak
Brian Dolbec [Wed, 5 Jun 2013 17:39:48 +0000 (10:39 -0700)]
Make testpath automagic via dwfeed's tweak

Update HOWTO to include the testpath use.

11 years agoupdate doc scripts for the new structure
Brian Dolbec [Wed, 5 Jun 2013 17:38:44 +0000 (10:38 -0700)]
update doc scripts for the new structure

11 years agoMerge branch 'pkgcache-warning' into rewrite
Brian Dolbec [Thu, 6 Jun 2013 16:03:54 +0000 (09:03 -0700)]
Merge branch 'pkgcache-warning' into rewrite

11 years agodoc/catalyst-config.5.txt: Document linking issues with binary packages
W. Trevor King [Fri, 12 Apr 2013 18:13:57 +0000 (14:13 -0400)]
doc/catalyst-config.5.txt: Document linking issues with binary packages

This gives users a heads up explaining why they might see linking
errors when pkgcache is enabled.  I first saw this when I build a
stage1 without update_seed.  Because my seed stage3 linked against
libmpc.so.2, some of my stage1 files linked against the older mpc.
However, the mpc-1.0.1 built for the stage1 installed libmpc.so.3.
When I tried to use this stage1 to build a stage2, it died with:

  /usr/libexec/gcc/i686-pc-linux-gnu/4.6.3/cc1:
    error while loading shared libraries: libmpc.so.2:
    cannot open shared object file: No such file or directory

To fix this, I enabled update_seed, but binary packages built during
my first pass were used to populate the stage1, so even though I'd
updated the seed stage3 toolchain, I still had a stage1 with cc1
linked against libmpc.so.2.

After clearing the binary package cache, I got a stage1 *built* with
the updated seed stage3, which gave a cc1 linked against libmpc.so.3
(hurray!).

This commit adds a warning in the pkgcache documentation that should
help people understand what might be going wrong if they see similar
linking errors.  For more details, see the thread following
http://thread.gmane.org/gmane.linux.gentoo.catalyst/2137/focus=2193

11 years agodoc/catalyst-config.5.txt: Add man page for catalyst.conf
W. Trevor King [Thu, 11 Apr 2013 17:41:43 +0000 (13:41 -0400)]
doc/catalyst-config.5.txt: Add man page for catalyst.conf

This mostly translates the inline comments from files/catalyst.conf
into asciidoc.  While it's nice to have that as stand-alone
documentation, it also makes it easier to refer to longer descriptions
of any tricky issues.  This gives us a place to distill the collected
wisdom of current users for the benefit of others.

11 years agoMerge branch 'livecd-startx' into rewrite
Brian Dolbec [Thu, 6 Jun 2013 03:50:04 +0000 (20:50 -0700)]
Merge branch 'livecd-startx' into rewrite

11 years agoMerge branch 'xsession' into rewrite
Brian Dolbec [Thu, 6 Jun 2013 03:49:23 +0000 (20:49 -0700)]
Merge branch 'xsession' into rewrite

11 years agolivecdfs-update.sh: Fix '/etc/sshd' check for sshd_config tweaks
W. Trevor King [Sun, 3 Mar 2013 12:58:16 +0000 (07:58 -0500)]
livecdfs-update.sh: Fix '/etc/sshd' check for sshd_config tweaks

sshd_config lives in /etc/ssh, not /etc/sshd.  This typo has been
present since the block was introduced by c06264e (Initial import of
Catalyst 2.0.0, 2005-04-04), so it's obviously not a widely used
feature ;).  It might be better to just remove the block entirely.

11 years agoexamples: Add newlines to accidentally unwrapped comment lines
W. Trevor King [Fri, 1 Feb 2013 02:17:50 +0000 (21:17 -0500)]
examples: Add newlines to accidentally unwrapped comment lines

With:

  $ sed -i 's/^\(#.*\)\(#.*\)/\1\n\2/' examples/*.spec

11 years agoMove bug-reporting and mailing list notes from TODO to README
W. Trevor King [Fri, 1 Feb 2013 01:31:03 +0000 (20:31 -0500)]
Move bug-reporting and mailing list notes from TODO to README

This information is generally useful, and folks probably only read
TODO if they want to help but don't already have an idea of what to
help with ;).  Having the contact information in the README should
raise its visibility.

11 years agoexamples/README: Add a pointer to the releng Git repository
W. Trevor King [Thu, 31 Jan 2013 22:25:47 +0000 (17:25 -0500)]
examples/README: Add a pointer to the releng Git repository

Thanks to Dustin C. Hatch for pointing this out, because I wasn't able
to find it on my own.  Having a pointer distributed with Catalyst
should help other newcomers find example spec files written by folks
who know what they're doing ;).  The current examples lack a full
stage1-through-stage3 progression.

11 years agolivecdfs-update.sh: Run env-update to pick up any /etc/env.d/ changes
W. Trevor King [Fri, 8 Mar 2013 12:26:16 +0000 (07:26 -0500)]
livecdfs-update.sh: Run env-update to pick up any /etc/env.d/ changes

Otherwise the XSESSION change from e523136 (livecdfs-update.sh: Set
XSESSION in /etc/env.d/90xsession, 2013-03-02) is not noticed.

11 years agolivecdfs-update.sh: Set XSESSION in /etc/env.d/90xsession
W. Trevor King [Sat, 2 Mar 2013 19:17:01 +0000 (14:17 -0500)]
livecdfs-update.sh: Set XSESSION in /etc/env.d/90xsession

As part of the OpenRC migration, the recommended place for configuring
the default X session moved from /etc/rc.conf to /etc/env.d/90xsession
[1].

[1]: http://www.gentoo.org/doc/en/openrc-migration.xml

11 years agodoc/HOWTO.txt: Explain how to run catalyst without installing
W. Trevor King [Sat, 9 Feb 2013 20:40:33 +0000 (15:40 -0500)]
doc/HOWTO.txt: Explain how to run catalyst without installing

Thanks to Chris White for explaining this to me.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agolivecdfs-update.sh: Use `bash --login` to spawn startx
W. Trevor King [Sun, 3 Mar 2013 16:48:11 +0000 (11:48 -0500)]
livecdfs-update.sh: Use `bash --login` to spawn startx

Starting a "login" version of Bash via `su` is tricky.  The naive:

  su - ${first_user} -c startx

fails because `su - ...` clears a number of environment variables (so
the prefixed `source /etc/profile` doesn't accomplish anything), but
Bash isn't started with the `--login` option, so it doesn't source
/etc/profile internally.  From bash(1):

  A login shell is one whose first character of argument zero is a -,
  or one started with the --login option.
  ...
  An interactive shell is one started without non-option arguments and
  without the -c option whose standard input and error are both
  connected to terminals (as determined by isatty(3)), or one started
  with the -i option...
  ...
  When bash is invoked as an interactive login shell, or as a
  non-interactive shell with the --login option, it first reads and
  executes commands from the file /etc/profile, if that file exists.
  After reading that file, it looks for ~/.bash_profile,
  ~/.bash_login, and ~/.profile, in that order, and reads and executes
  commands from the first one that exists and is readable.  The
  --noprofile option may be used when the shell is started to inhibit
  this behavior.

In order to get the login-style profile loading with a non-interactive
`su` invocation, you need to use something like:

  echo "${command}" | su - "${user}"

This starts a login shell and pipes the command in via stdin, which
seems to fake Bash into thinking its running from an interactive
terminal.  Not the most elegant, but the other implementations I can
think of are even worse:

  su - "${user}" -c "bash --login -c ${command}"
  su - "${user}" -c 'source /etc/profile &&
      (source .bash_profile || ...) && ${command}"

The old expression was broken anyway due to unescaped ampersands in
the sed expression.  From sed(1):

  s/regexp/replacement/
    Attempt to match regexp against the pattern space.  If successful,
    replace that portion matched with replacement.  The replacement
    may contain the special character & to refer to that portion of
    the pattern space which matched, and the special escapes \1
    through \9 to refer to the corresponding matching sub-expressions
    in the regexp.

This means that the old expression (with unescaped ampersands) lead
to:

  source /etc/profile ##STARTX##STARTX su - ${first_user} -c startx

with ${first_user} expanded.  This commented out startx, so it was
never run.

11 years agolivecd-bashrc: Avoid a startx race by restricting to tty1
W. Trevor King [Mon, 4 Mar 2013 02:33:02 +0000 (21:33 -0500)]
livecd-bashrc: Avoid a startx race by restricting to tty1

Otherwise several virtual consoles may notice the existence of
/etc/startx, and spawn simultaneous X servers.  This way we only spawn
a single X server, regardless of timing.

A better solution here is probably to add a "start" or "x-server"
service to /etc/init.d/, but that's more work than I'm up to at the
moment.

11 years agotemp set shebang to python2 until py3 compatibilty is done
Brian Dolbec [Tue, 4 Jun 2013 15:47:12 +0000 (08:47 -0700)]
temp set shebang to python2 until py3 compatibilty is done

11 years agoRename local unpack var to _unpack
Brian Dolbec [Sat, 1 Jun 2013 07:31:59 +0000 (00:31 -0700)]
Rename local unpack var to _unpack

The method name was unpack, so rename the local var to _unpack to help avoid confusion.

11 years agoFix a long line.
Brian Dolbec [Sat, 1 Jun 2013 06:33:15 +0000 (23:33 -0700)]
Fix a long line.

11 years agoRemove some dead code
Brian Dolbec [Sat, 1 Jun 2013 06:32:49 +0000 (23:32 -0700)]
Remove some dead code

11 years agoFix some paths/normpath usage. Use pjoin to join paths.
Brian Dolbec [Sat, 1 Jun 2013 06:28:19 +0000 (23:28 -0700)]
Fix some paths/normpath usage.  Use pjoin to join paths.
Use os.path.dirname() instead of splitting and rejoining without the filename.

11 years agoCreate AutoResume class to handle all file creation, deletion...
Brian Dolbec [Sat, 1 Jun 2013 06:23:46 +0000 (23:23 -0700)]
Create AutoResume class to handle all file creation, deletion...

Create catalyst/base/resume.py.
Migrate all auto_resume operations to using the new class.

11 years agoRefactor ClearBase code to remove code duplication.
Brian Dolbec [Sat, 1 Jun 2013 06:24:46 +0000 (23:24 -0700)]
Refactor ClearBase code to remove code duplication.

11 years agoInitial creation of fileops.py
Brian Dolbec [Fri, 31 May 2013 16:11:30 +0000 (09:11 -0700)]
Initial creation of fileops.py

Migrate to using ensure_dirs()

11 years agoMigrate version to use snakeoil's format_version() to append git commit info.
Brian Dolbec [Thu, 30 May 2013 19:34:06 +0000 (12:34 -0700)]
Migrate version to use snakeoil's format_version() to append git commit info.

This will make tagging releases easy as well as providing better debug info while running live versions of the software.

11 years agokmerge.sh: Fix line wrapping typo from 9ceebbf
W. Trevor King [Fri, 1 Mar 2013 05:57:39 +0000 (00:57 -0500)]
kmerge.sh: Fix line wrapping typo from 9ceebbf

In 9ceebbf (kmerge.sh: Make /var/tmp/${clst_kname}.config optional,
2013-02-09), I added a KERNCACHE check to a `[` test, wrapping the two
clauses in the test to avoid a very long line.  Unfortunately,
newlines do not appear to be legal in this position.  For example:

  $ if [ -n "a" -a
  > -n "b" ]; then echo "c"; fi
  bash: [: missing `]'
  bash: -n: command not found

This commit fixes the error by explicitly wrapping the line with a
backslash.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agofiles/.gitignore: Ignore $(DOCS) and $(DOC_SIDE_EFFECTS)
W. Trevor King [Sat, 9 Feb 2013 20:40:32 +0000 (15:40 -0500)]
files/.gitignore: Ignore $(DOCS) and $(DOC_SIDE_EFFECTS)

These are generated by the Makefile from sources in doc/.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agoMakefile: Add DOCS for building files/HOWTO.html
W. Trevor King [Sat, 9 Feb 2013 20:40:31 +0000 (15:40 -0500)]
Makefile: Add DOCS for building files/HOWTO.html

The rules are more general though; any new *.txt file in doc/ that
doesn't match *.?.txt or one of the explicitly-listed *.generated.txt
files will be automatically built and distributed.

The generated `files/docbook-xsl.css` is a side effect of the xhtml
target.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agoDrop addpatches from the livecd-stage2 example spec as well.
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Wed, 24 Apr 2013 11:27:13 +0000 (11:27 +0000)]
Drop addpatches from the livecd-stage2 example spec as well.

11 years agoDrop addpatches from the stage4 example spec.
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Wed, 24 Apr 2013 11:23:50 +0000 (11:23 +0000)]
Drop addpatches from the stage4 example spec.

11 years agoMake the use of preserved_libs optional by setting the options variable.
Brian Dolbec [Tue, 28 May 2013 00:18:43 +0000 (17:18 -0700)]
Make the use of preserved_libs optional by setting the options variable.

Ported from commits:
 462348d88b3a5fa783f322c64131025581ecc220
 f6ad384914a00099eea2a0f66232728c479ec628
 in the master branch.
AUTHOR: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org> (Sun 14 Apr 2013 08:22:34 PM PDT)

11 years agoAdd support for m68k
Raúl Porcel [Sat, 6 Apr 2013 17:07:00 +0000 (17:07 +0000)]
Add support for m68k

port commit for the rewrite branch.
Brian Dolbec <dolsen@gentoo.org>

11 years agolivecdfs-update.sh: Escape ampersands in STARTX sed expression
W. Trevor King [Sun, 3 Mar 2013 16:53:18 +0000 (11:53 -0500)]
livecdfs-update.sh: Escape ampersands in STARTX sed expression

From sed(1):

  s/regexp/replacement/
    Attempt to match regexp against the pattern space.  If successful,
    replace that portion matched with replacement.  The replacement
    may contain the special character & to refer to that portion of
    the pattern space which matched, and the special escapes \1
    through \9 to refer to the corresponding matching sub-expressions
    in the regexp.

This means that the old expression (with unescaped ampersands) lead
to:

  source /etc/profile ##STARTX##STARTX su - ${first_user} -c startx

when we want:

  source /etc/profile && su - ${first_user} -c startx

with ${first_user} expanded in both cases.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agodoc/HOWTO: First pass at a gentle Catalyst introduction
W. Trevor King [Sat, 9 Feb 2013 20:40:30 +0000 (15:40 -0500)]
doc/HOWTO: First pass at a gentle Catalyst introduction

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agocreate-iso.sh: add usb boot via isohybrid
Ben Kohler [Wed, 6 Mar 2013 01:08:07 +0000 (17:08 -0800)]
create-iso.sh: add usb boot via isohybrid

Add an isohybrid call to create-iso.sh for isolinux targets so the resulting
images are usb/hdd bootable.

11 years agoFix bugs 407051 and 458536 by using FEATURES="preserve-libs" on the unmerge step...
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Mon, 4 Mar 2013 03:13:11 +0000 (03:13 +0000)]
Fix bugs 407051 and 458536 by using FEATURES="preserve-libs" on the unmerge step of livecd-stage2 target.

11 years agoupdate version to identify the rewite-git code is being run
Brian Dolbec [Mon, 27 May 2013 23:34:33 +0000 (16:34 -0700)]
update version to identify the rewite-git code is being run

11 years agofix indent.
Brian Dolbec [Mon, 27 May 2013 23:08:16 +0000 (16:08 -0700)]
fix indent.

11 years agoFix broken seed stage update...
Brian Dolbec [Tue, 26 Feb 2013 07:31:41 +0000 (23:31 -0800)]
Fix broken seed stage update...

Add a check for the update_seed option to set the correct update options.
Fix default seed stage update command to properly update gcc and it's deps.
Add --binpkg-respect-use=y for all cases --usepkg is enabled.
Apply patch to fix broken if logic in the setup_emergeoptions() by Douglas Freed <dwfreed@mtu.edu> and rebase

11 years agoFix typo in error message, clean up useless tracebacks
Brian Dolbec [Mon, 25 Feb 2013 03:52:44 +0000 (19:52 -0800)]
Fix typo in error message, clean up useless tracebacks

Remove useless python tracebacks for bash side target failures.

11 years agoupdate gitignore
Brian Dolbec [Mon, 25 Feb 2013 00:33:29 +0000 (16:33 -0800)]
update gitignore

11 years agomixed spaces/tabs and indent cleanup.
Brian Dolbec [Mon, 25 Feb 2013 00:29:52 +0000 (16:29 -0800)]
mixed spaces/tabs and indent cleanup.

11 years agoMigrate hardcoded /etc/portage paths
Brian Dolbec [Sun, 24 Feb 2013 20:33:18 +0000 (12:33 -0800)]
Migrate hardcoded /etc/portage paths

Create "port_conf" default.
Migrate all references to /etc/portage to the config's default.
Migrate all make.conf paths to the config'd default.

11 years agoFix a bug that portage didn't get rebuilt with the build use flag
Brian Dolbec [Sun, 10 Feb 2013 20:06:15 +0000 (12:06 -0800)]
Fix a bug that portage didn't get rebuilt with the build use flag

If clst_PGKCACHE is defined, --newuse was not being added to clst_myemergeopts, so then portage was not being rebuilt if portage was already up to date.

11 years agoAdd archdir to settings
Brian Dolbec [Tue, 12 Feb 2013 04:13:13 +0000 (20:13 -0800)]
Add archdir to settings

11 years agoCommit my testpath file with instructions to run the git checkout code directly witho...
Brian Dolbec [Fri, 25 Jan 2013 04:26:38 +0000 (20:26 -0800)]
Commit my testpath file with instructions to run the git checkout code directly without being installed.

11 years agoFIXME! Add a forced debug print statement in cmd() for better debug output
Brian Dolbec [Fri, 25 Jan 2013 04:14:31 +0000 (20:14 -0800)]
FIXME! Add a forced debug print statement in cmd() for better debug output

Migrate this and other code to use python's logging module.

11 years agoRemove trailing slash for consistency in variables
Brian Dolbec [Fri, 25 Jan 2013 04:13:40 +0000 (20:13 -0800)]
Remove trailing slash for consistency in variables

remove extra slashes in paths,
fix hash header

11 years agoFix a relative path bug
Brian Dolbec [Mon, 11 Feb 2013 23:54:36 +0000 (15:54 -0800)]
Fix a relative path bug

11 years agoAdd '--- 'to at the start of all echo messages to aid debugging
Brian Dolbec [Fri, 25 Jan 2013 04:09:08 +0000 (20:09 -0800)]
Add '--- 'to at the start of all echo messages to aid debugging

11 years agoMake shdir a complete path to ease it's use.
Brian Dolbec [Tue, 12 Feb 2013 04:09:01 +0000 (20:09 -0800)]
Make shdir a complete path to ease it's use.

Add a "shdir" setting to config.
This is to make moving the bash code around easier.
It also reduces more hardcoded paths in the bash scripts.
Migrate all target shell scripts to use the new shdir setting

11 years agoExtend ParserBase to do variable substitution.
Brian Dolbec [Fri, 25 Jan 2013 04:00:24 +0000 (20:00 -0800)]
Extend ParserBase to do variable substitution.

Also add embedded variable substitiution to default settings.
Why are we not using python's built-in ConfigParser?
We'll migrate it later.

11 years agoreduce 2 operations into one simpler one
Brian Dolbec [Wed, 23 Jan 2013 04:57:05 +0000 (20:57 -0800)]
reduce 2 operations into one simpler one

11 years agorename a make.conf key to make_conf due to bash variable name restrictions
Brian Dolbec [Tue, 22 Jan 2013 08:39:18 +0000 (00:39 -0800)]
rename a make.conf key to make_conf due to bash variable name restrictions

11 years agoBreak out more repeated (path1 + path2)'s...
Brian Dolbec [Tue, 12 Feb 2013 04:06:01 +0000 (20:06 -0800)]
Break out more repeated (path1 + path2)'s...

Just do it once and use the temp variable.
Comment out some debug print's.
Fix options conversion for export to bash.

11 years agoFIXME! Comment out a small code block causing TypeError.
Brian Dolbec [Tue, 22 Jan 2013 08:34:41 +0000 (00:34 -0800)]
FIXME! Comment out a small code block causing TypeError.

This was also short circuiting another large code block.  FIXME!!!! This
whole class seems overly complicated with TOO MANY nested try:excepts:

11 years agoRename all target .py files and classes without _target in them.
Brian Dolbec [Tue, 22 Jan 2013 00:10:51 +0000 (16:10 -0800)]
Rename all target .py files and classes without _target in them.

This is so they are the named the same as the target .sh files
and work with the now simplified module loading.

11 years agochmod +x all sh scripts so they can run from the git checkout
Brian Dolbec [Mon, 21 Jan 2013 23:58:58 +0000 (15:58 -0800)]
chmod +x all sh scripts so they can run from the git checkout

11 years agoUse normpath from support
Brian Dolbec [Mon, 21 Jan 2013 23:54:02 +0000 (15:54 -0800)]
Use normpath from support

11 years agoFix mounts, mountmap hardcoding removal...
Brian Dolbec [Tue, 12 Feb 2013 04:00:35 +0000 (20:00 -0800)]
Fix mounts, mountmap hardcoding removal...

Use normpath to fix paths, add some debug print statements,
Fix some missed conversions from uppercase to lowercase settings members.

11 years agofix options being reset by a config file
Brian Dolbec [Mon, 21 Jan 2013 23:34:32 +0000 (15:34 -0800)]
fix options being reset by a config file

11 years agoUpdate module loading for the new python structure, rename snapshot_target to snapshot
Brian Dolbec [Sun, 20 Jan 2013 21:50:23 +0000 (13:50 -0800)]
Update module loading for the new python structure, rename snapshot_target to snapshot

11 years agoMove base stage and target files to thier own sub-pkg
Brian Dolbec [Tue, 12 Feb 2013 03:51:52 +0000 (19:51 -0800)]
Move base stage and target files to thier own sub-pkg

Fix an indent error in grp_target.py

11 years agoremove redundant /bin/bash additions in cmd() calls
Brian Dolbec [Tue, 12 Feb 2013 03:43:37 +0000 (19:43 -0800)]
remove redundant /bin/bash additions in cmd() calls

11 years agosome spacing and comment and indent cleanup, etc.
Brian Dolbec [Sun, 20 Jan 2013 19:22:27 +0000 (11:22 -0800)]
some spacing and comment and indent cleanup, etc.

11 years agoBegin splitting up generic_stage_target into smaller code blocks.
Brian Dolbec [Sun, 20 Jan 2013 08:10:03 +0000 (00:10 -0800)]
Begin splitting up generic_stage_target into smaller code blocks.

This so snapshot_target does not need to import it since most of it was
not used or initialized properly.

11 years agoMassive pyflakes import cleanup and broken CatalystError calls.
Brian Dolbec [Sun, 20 Jan 2013 04:29:16 +0000 (20:29 -0800)]
Massive pyflakes import cleanup and broken CatalystError calls.

Replace "import *" with named imports, remove unused imports.
Fix broken CatalystError usage.

11 years agoMove LockInUse from support.py to lock.py, fix bad execption raising, pyflakes cleanup
Brian Dolbec [Sun, 20 Jan 2013 01:50:26 +0000 (17:50 -0800)]
Move LockInUse from support.py to lock.py, fix bad execption raising,  pyflakes cleanup

11 years agoSome options cleanup, unifying their use, reducing redundancy.
Brian Dolbec [Sun, 20 Jan 2013 01:28:51 +0000 (17:28 -0800)]
Some options cleanup, unifying their use, reducing redundancy.

11 years agoMove confdefaults out of main.py
Brian Dolbec [Sat, 19 Jan 2013 05:51:35 +0000 (21:51 -0800)]
Move confdefaults out of main.py

11 years agoInitial creation of a defaults file and Split up support.py
Brian Dolbec [Sat, 19 Jan 2013 05:12:07 +0000 (21:12 -0800)]
Initial creation of a defaults file and Split up support.py

Split out hash and contents to their own classes, files.

11 years agoFix undefined variable: RLIMIT_NOFILE
Brian Dolbec [Mon, 14 Jan 2013 03:32:29 +0000 (19:32 -0800)]
Fix undefined variable: RLIMIT_NOFILE

It was not imported from resource, it was also not used correctly.

11 years agoRemove unused variable new and an undefined variable s.
Brian Dolbec [Tue, 12 Feb 2013 02:54:40 +0000 (18:54 -0800)]
Remove unused variable new and an undefined variable s.

Commit b3475906d5f51a21ecaf4ff048002a2f44face52 introduced an
undefined variable "s".  The code must always be hitting the
general except: pass block.  Seems useless, if not maybe it'll
spit out a true error, so the real problem can be fixed.  Removed it all.

11 years agoRemove unused urllib import.
Brian Dolbec [Tue, 12 Feb 2013 02:49:19 +0000 (18:49 -0800)]
Remove unused urllib import.

This urllib import was added in commit 64c16cae70da13de3c55d8555a2e4c5dcdf2fcad
to fix an issue, but it is not used.  So must have covered up the real bug.  Removing it now
that I've completed some testing and haven't come across anything I can attribute to it.

11 years agorename files directory to etc to better reflect the directories contents
Brian Dolbec [Sat, 12 Jan 2013 07:47:10 +0000 (23:47 -0800)]
rename files directory to etc to better reflect the directories contents

11 years agorename the modules subpkg to targets, it better reflects what it contains
Brian Dolbec [Sat, 12 Jan 2013 07:43:36 +0000 (23:43 -0800)]
rename the modules subpkg to targets, it better reflects what it contains

11 years agomove catalyst_support, builder, catalyst_lock out of modules, into the catalyst's...
Brian Dolbec [Sat, 12 Jan 2013 07:32:41 +0000 (23:32 -0800)]
move catalyst_support, builder, catalyst_lock out of modules, into the catalyst's base namespace

11 years agofix catalyst_support import to new location and specify imported modules
Brian Dolbec [Sat, 12 Jan 2013 06:54:11 +0000 (22:54 -0800)]
fix catalyst_support import to new location and specify imported modules

11 years agoupdate the module loading paths for the new locations
Brian Dolbec [Fri, 11 Jan 2013 03:34:53 +0000 (19:34 -0800)]
update the module loading paths for the new locations

11 years agoadd __init__.py's to modules and arch sub-pkgs
Brian Dolbec [Fri, 11 Jan 2013 03:33:59 +0000 (19:33 -0800)]
add __init__.py's to modules and arch sub-pkgs

11 years agonew minimal start script
Brian Dolbec [Fri, 11 Jan 2013 03:11:47 +0000 (19:11 -0800)]
new minimal start script

11 years agoInitial rearrangement of the python directories
Brian Dolbec [Fri, 11 Jan 2013 02:56:28 +0000 (18:56 -0800)]
Initial rearrangement of the python directories

11 years agocleanup long lines, improve usage() output formatting slightly
Brian Dolbec [Wed, 9 Jan 2013 08:32:41 +0000 (00:32 -0800)]
cleanup long lines, improve usage() output formatting slightly

11 years agoRemove self.mounts and self.mountmap's use of paths for keys and paths.
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
Remove self.mounts and self.mountmap's use of paths for keys and paths.

Migrate more hardcoded paths to use settings variables instead.

11 years agoAdd more configured defaults
Brian Dolbec [Tue, 8 Jan 2013 07:17:22 +0000 (23:17 -0800)]
Add more configured defaults

Use the new configured snapshot_name and portdir settings
Use the portdir setting rather than hard-coded path

11 years agoWhitespace cleanup.
Brian Dolbec [Tue, 12 Feb 2013 02:35:19 +0000 (18:35 -0800)]
Whitespace cleanup.

Run the following command to cleanup whitespace.
  for FILE in $(git ls-tree -r --name-only HEAD | grep -v 'bz2$'); do
    sed -i 's/[[:space:]]*$//' "$FILE"
  done

11 years agokmerge.sh: Make /var/tmp/${clst_kname}.config optional
W. Trevor King [Sat, 9 Feb 2013 20:45:38 +0000 (15:45 -0500)]
kmerge.sh: Make /var/tmp/${clst_kname}.config optional

For users that don't want to specify a seed config.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agogeneric_stage_target: Handle unspecified boot/kernel/<kname>/config
W. Trevor King [Sat, 9 Feb 2013 20:45:37 +0000 (15:45 -0500)]
generic_stage_target: Handle unspecified boot/kernel/<kname>/config

If boot/kernel/<kname>/config is not set, make _copy_kernel_config a
no-op.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agogeneric_stage_target: Split ._copy_initramfs_overlay() from ._build_kernel()
W. Trevor King [Sat, 9 Feb 2013 20:45:36 +0000 (15:45 -0500)]
generic_stage_target: Split ._copy_initramfs_overlay() from ._build_kernel()

_copy_initramfs_overlay() is long enough that it makes reading
_build_kernel() difficult.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agogeneric_stage_target.py: Dedent the bulk of ._build_kernel()
W. Trevor King [Sat, 9 Feb 2013 20:45:35 +0000 (15:45 -0500)]
generic_stage_target.py: Dedent the bulk of ._build_kernel()

At the beginning of the function, we check for an autoresume point.
If we find it, just return.  This allows us to dedent the `else` block
that had been handling the no-autoresume-found case.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agogeneric_stage_target: Split ._copy_kernel_config() from ._build_kernel()
W. Trevor King [Sat, 9 Feb 2013 20:45:34 +0000 (15:45 -0500)]
generic_stage_target: Split ._copy_kernel_config() from ._build_kernel()

_copy_kernel_config() is one idea with a bunch of error handling.
Isolating it in its own function makes _build_kernel() easier to read.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agogeneric_stage_target: Split ._build_kernel() out of .build_kernel()
W. Trevor King [Sat, 9 Feb 2013 20:45:33 +0000 (15:45 -0500)]
generic_stage_target: Split ._build_kernel() out of .build_kernel()

The indentation was getting too deep ;).  This also makes the
single-kernel-building code more digestible, by removing the
multiple-kernel looping and error handling from the function you're
reading.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agoMake sure shutil.rmtree() isn't passed a symlink
Guy Martin [Tue, 5 Feb 2013 08:31:09 +0000 (00:31 -0800)]
Make sure shutil.rmtree() isn't passed a symlink

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=455022
Reviewed-by: Matt Turner <mattst88@gentoo.org>