catalyst.git
11 years agoMakefile: Cleanup doc/subarches.generated.xml cleanup-subarch-xml
W. Trevor King [Mon, 16 Dec 2013 04:46:05 +0000 (20:46 -0800)]
Makefile: Cleanup doc/subarches.generated.xml

Since its addition in fa940f7 (Migrate man page to Asciidoc, generate
list of subarches, add Makefile including "dist" target, 2011-06-24),
doc/make_subarch_table_guidexml.py has also generated an XML version
of the supported subarches.  Add the XML file to DOC_SIDE_EFFECTS so
it gets removed by `make clean`.

11 years agomodules/generic_stage_target.py: Use 'devpts' as mountmap key.
Matt Turner [Sun, 15 Dec 2013 20:31:20 +0000 (12:31 -0800)]
modules/generic_stage_target.py: Use 'devpts' as mountmap key.

Missed in 0c68d30b. Would cause catalyst to fail if snapcache were
enabled.

Tested-by: Brian Dolbec <dolsen@gentoo.org>
11 years agocatalst: improve usage() output formatting slightly
Brian Dolbec [Wed, 9 Jan 2013 08:32:41 +0000 (00:32 -0800)]
catalst: improve usage() output formatting slightly

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use 'ccache' instead of '/var/tmp/ccache' as the...
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
modules/generic_stage_target.py: Use 'ccache' instead of '/var/tmp/ccache' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use 'kerncache' instead of '/tmp/kerncache' as the...
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
modules/generic_stage_target.py: Use 'kerncache' instead of '/tmp/kerncache' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use 'packagedir' instead of '/usr/portage/packages...
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
modules/generic_stage_target.py: Use 'packagedir' instead of '/usr/portage/packages' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use 'devpts' instead of '/dev/pts' as the mountmap key
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
modules/generic_stage_target.py: Use 'devpts' instead of '/dev/pts' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use 'port_tmpdir' instead of '/var/tmp/portage'...
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
modules/generic_stage_target.py: Use 'port_tmpdir' instead of '/var/tmp/portage' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use 'distdir' instead of '/usr/portage/distfiles...
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
modules/generic_stage_target.py: Use 'distdir' instead of '/usr/portage/distfiles' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use 'dev' instead of '/dev' as the mountmap key
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
modules/generic_stage_target.py: Use 'dev' instead of '/dev' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use 'proc' instead of '/proc' as the mountmap key
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
modules/generic_stage_target.py: Use 'proc' instead of '/proc' as the mountmap key

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Don't use paths as mountmap keys
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
modules/generic_stage_target.py: Don't use paths as mountmap keys

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agocatalyst: Add 'packagedir' default instead of hard-coding '/usr/portage/packages'
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
catalyst: Add 'packagedir' default instead of hard-coding '/usr/portage/packages'

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agocatalyst: Add 'snapshot_name' default
Brian Dolbec [Tue, 8 Jan 2013 07:17:22 +0000 (23:17 -0800)]
catalyst: Add 'snapshot_name' default

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agocatalyst: Add 'repo_name' default
Brian Dolbec [Tue, 8 Jan 2013 07:17:22 +0000 (23:17 -0800)]
catalyst: Add 'repo_name' default

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agocatalyst: Split confdefaults into line-per-entry
Brian Dolbec [Tue, 8 Jan 2013 07:17:22 +0000 (23:17 -0800)]
catalyst: Split confdefaults into line-per-entry

This makes it easy to find the key you're looking for.  Future
additions and removals will also have cleaner diffs.

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use a 'local_overlay' setting instead of hard-coding...
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
modules/generic_stage_target.py: Use a 'local_overlay' setting instead of hard-coding '/usr/local/portage'

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use 'distdir' instead of hard-coding '${PORTAGE...
Brian Dolbec [Fri, 22 Nov 2013 04:51:13 +0000 (20:51 -0800)]
modules/generic_stage_target.py: Use 'distdir' instead of hard-coding '${PORTAGE}/distfiles'

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use 'portdir' instead of hard-coding '/usr/portage'
Brian Dolbec [Fri, 22 Nov 2013 04:51:13 +0000 (20:51 -0800)]
modules/generic_stage_target.py: Use 'portdir' instead of hard-coding '/usr/portage'

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/generic_stage_target.py: Use 'portdir' instead of hard-coding '/usr/portage'
Brian Dolbec [Thu, 20 Dec 2012 02:56:04 +0000 (18:56 -0800)]
modules/generic_stage_target.py: Use 'portdir' instead of hard-coding '/usr/portage'

W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agomodules/tinderbox_target.py: Use 'portdir' instead of hard-coding '/usr/portage'
Brian Dolbec [Tue, 8 Jan 2013 07:17:22 +0000 (23:17 -0800)]
modules/tinderbox_target.py: Use 'portdir' instead of hard-coding '/usr/portage'

W. Trevor King: Refactored Git history for Brian Dolbec's content
changes with additional whitespace cleanups.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
11 years agocatalyst 2.0.15
Matt Turner [Wed, 13 Nov 2013 21:59:25 +0000 (13:59 -0800)]
catalyst 2.0.15

11 years agolivecdfs-update.sh: Use `bash --login` to spawn startx
W. Trevor King [Wed, 6 Mar 2013 17:02:59 +0000 (12:02 -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.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agolivecd-bashrc: Avoid a startx race by restricting to tty1
W. Trevor King [Wed, 25 Sep 2013 22:26:06 +0000 (15:26 -0700)]
livecd-bashrc: Avoid a startx race by restricting to tty1

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=481236
Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agoRevert "livecdfs-update.sh: Escape ampersands in STARTX sed expression"
Matt Turner [Fri, 11 Oct 2013 22:06:14 +0000 (15:06 -0700)]
Revert "livecdfs-update.sh: Escape ampersands in STARTX sed expression"

This reverts commit ed4d1623c3dac22ed008f518b79deecde1f33c26.

The commit was a v1 commit that was supposed to be replaced.

11 years agocatalyst: Remove commented sections of code
Dylan Baker [Sun, 13 Oct 2013 09:07:38 +0000 (02:07 -0700)]
catalyst: Remove commented sections of code

Code in the upstream tree should either run or it shouldn't be there.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agocatalyst: split combined import
Dylan Baker [Sun, 13 Oct 2013 09:07:37 +0000 (02:07 -0700)]
catalyst: split combined import

Combining multiple modules into a single import is discouraged in
python's PEP8 style guide:

"""
Imports should usually be on separate lines, e.g.:

Yes: import os
     import sys

     No:  import sys, os
"""

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agocatalyst: use a more pythonic method to import modules
Dylan Baker [Sun, 13 Oct 2013 09:07:36 +0000 (02:07 -0700)]
catalyst: use a more pythonic method to import modules

Rather than appending a directory to the system path, this patch adds a
__init__.py file to modules, which allows python to search it, and it's
children for python modules. This also requires changes to a few of the
module files to make them happy.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agocatalyst: Specify python2 rather than the generic python
Dylan Baker [Sun, 13 Oct 2013 09:07:35 +0000 (02:07 -0700)]
catalyst: Specify python2 rather than the generic python

This allows catalyst to work regardless of whether a user prefers that
usr/bin/python be python 2.x or 3.x.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agocatalyst 2.0.14
Matt Turner [Thu, 8 Aug 2013 02:40:03 +0000 (19:40 -0700)]
catalyst 2.0.14

11 years agogeneric_stage_target: default {PORT,PKG,DIST}DIR
Zac Medico [Wed, 31 Jul 2013 04:46:48 +0000 (21:46 -0700)]
generic_stage_target: default {PORT,PKG,DIST}DIR

This provides forward compatiblity so that stage builds do not break
in the future when portage changes the default PORTDIR, PKGDIR, and
DISTDIR locations (bug #378603).

Also, it provides backward compatibility for various tools that require
PORTDIR to be defined in make.conf, such as the following:

gentoo-bashcomp - bug #478444
euse - bug #474574
euses and ufed - bug #478318

X-Gentoo-Bug: 479062
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=479062
Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agostop tarballing firmware
Rick Farina (Zero_Chaos) [Tue, 6 Aug 2013 00:39:06 +0000 (20:39 -0400)]
stop tarballing firmware

I can't find a reason why firmware is tarballed in the first
place, and now things are messing up because of missing firmware.
Remove tarballing and tmpfs mount for /lib/firmware and just leave
it alone. Bug 479456

11 years agokerncache improperly sets --nodeps
Rick Farina (Zero_Chaos) [Fri, 2 Aug 2013 06:13:16 +0000 (02:13 -0400)]
kerncache improperly sets --nodeps

It makes no sense to set --nodeps just because kerncache is being
used, the kernel still must be built at least once

11 years agoFix incorrect type for livecd/modblacklist.
Brian Dolbec [Fri, 2 Aug 2013 05:59:10 +0000 (22:59 -0700)]
Fix incorrect type for livecd/modblacklist.

Bug reported by tstellar.

11 years agocorrectly remove USE=build
Rick Farina (Zero_Chaos) [Fri, 2 Aug 2013 04:49:11 +0000 (00:49 -0400)]
correctly remove USE=build

c0fcbf027169da8b6f0d5e3c80c1526642c6c672 indavertantly dropped all
livecd-stage2 use flags, rewrite to just drop undesired build.

11 years agoRevert "kmerge.sh: Don't set USE=build for emerging kernels."
Rick Farina (Zero_Chaos) [Fri, 2 Aug 2013 04:46:51 +0000 (00:46 -0400)]
Revert "kmerge.sh: Don't set USE=build for emerging kernels."

This appears to inadvertantly drop livecd-stage2 use flags entirely.

This reverts commit c0fcbf027169da8b6f0d5e3c80c1526642c6c672.

11 years agocatalyst 2.0.13
Matt Turner [Wed, 31 Jul 2013 03:49:20 +0000 (20:49 -0700)]
catalyst 2.0.13

11 years agoFix a py3 syntax error, use print()
Brian Dolbec [Tue, 30 Jul 2013 08:06:05 +0000 (01:06 -0700)]
Fix a py3 syntax error, use print()

Bug reported by Michael Weber <xmw>

11 years agokmerge.sh: Don't set USE=build for emerging kernels.
Matt Turner [Tue, 30 Jul 2013 07:04:51 +0000 (00:04 -0700)]
kmerge.sh: Don't set USE=build for emerging kernels.

USE=build for kernels means that they're not going to be built and that
we just want to install the sources. In catalyst, we do also want to
build the kernels, so settings the (badly named) USE flag prevents
installing sys-devel/bc, ultimately leading to the kernel build failing.

Remove USE=build from kmerge.sh and let it install dependencies
necessary for actually building the kernel. Fixes Live CD builds with
kernels that require bc (>= 3.9, I believe). See bug 478244.

Tested-by: Ben Kohler <bkohler@gmail.com>
11 years agoRemove ChangeLog.
Matt Turner [Thu, 25 Jul 2013 05:45:48 +0000 (22:45 -0700)]
Remove ChangeLog.

git tells us the same information, but better.

11 years agochroot-functions: Give variables more appropriate names.
Matt Turner [Thu, 25 Jul 2013 05:32:16 +0000 (22:32 -0700)]
chroot-functions: Give variables more appropriate names.

11 years agoReplace 'system' with '@system' where applicable, to be more greppable.
Matt Turner [Thu, 25 Jul 2013 05:26:28 +0000 (22:26 -0700)]
Replace 'system' with '@system' where applicable, to be more greppable.

11 years agoFixes a bug inadvertently caused by 6c0a577 where setting update_seed
Douglas Freed [Tue, 28 May 2013 20:20:30 +0000 (16:20 -0400)]
Fixes a bug inadvertently caused by 6c0a577 where setting update_seed
to no would result in dropping the use and making of binpkgs while
building stage1, which is undesirable.  The conditional was getting a
bit unwieldly, so I added a comment explaining when it matches, which is
especially helpful to those who don't know every single test flag.

Tested-By: Rick Farina <zerochaos@gentoo.org>
Tested-By: Brian Dolbec <dolsen@gentoo.org>
11 years agoproper lbzip2 decompression of stages
Rick Farina (Zero_Chaos) [Mon, 27 May 2013 20:25:03 +0000 (16:25 -0400)]
proper lbzip2 decompression of stages

use lbzip2 to decompress stages ONLY, snapshots can be bz2 or xz.
This provides me a 6x increase and likely more if you have fast IO

11 years agoRevert "use lbzip2 to unpack the stages"
Rick Farina (Zero_Chaos) [Mon, 27 May 2013 20:23:12 +0000 (16:23 -0400)]
Revert "use lbzip2 to unpack the stages"

This reverts commit 978c02e6fa04ab7ed1a40003fa0eb4cfce952ca2, missed a
test

11 years agouse lbzip2 to unpack the stages
Rick Farina (Zero_Chaos) [Mon, 27 May 2013 20:13:28 +0000 (16:13 -0400)]
use lbzip2 to unpack the stages

Since we already use lbzip2 to compress everthing,
it makes a significant performance difference to
also unpack the stages using lbzip2.  When the stage
compression is selectable this should be enhanced to use
other decompressors as well (although xz doesn't seem to
need a multi-threaded decompressor).

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 agoFix broken "preserve_libs" commit - ";" is not ":".
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Mon, 15 Apr 2013 03:22:34 +0000 (03:22 +0000)]
Fix broken "preserve_libs" commit - ";" is not ":".

11 years agoMake the use of preserved_libs optional by setting the options variable.
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Sun, 31 Mar 2013 02:23:11 +0000 (02:23 +0000)]
Make the use of preserved_libs optional by setting the options variable.

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 agoFix update_seed use by not using nor building binary packages during the seed update.
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Mon, 4 Mar 2013 03:12:18 +0000 (03:12 +0000)]
Fix update_seed use by not using nor building binary packages during the seed update.

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

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.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 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 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 agoWhitespace cleanup.
Brian Dolbec [Thu, 28 Feb 2013 01:46:58 +0000 (17:46 -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
  git checkout COPYING ChangeLog

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 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 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>
11 years agoAdd hppa support for netboot 2 target
Guy Martin [Tue, 5 Feb 2013 08:29:19 +0000 (00:29 -0800)]
Add hppa support for netboot 2 target

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=455018
Reviewed-by: Matt Turner <mattst88@gentoo.org>
11 years agodon't build packages during update_seed
Rick Farina (Zero_Chaos) [Thu, 31 Jan 2013 03:57:36 +0000 (22:57 -0500)]
don't build packages during update_seed

when update_seed is run it uses the default catalyst emerge options
which causes binary packages to be built which are linked against the
seed stage rather than the generated stage.  These binary packages
can be later used and cause significant and odd issues due to being
linked to older libraries.  I am passing "--buildpkg=n" for the
update_seed runs to prevent this issue and close bug #454184

11 years agomake bindist optional
Rick Farina (Zero_Chaos) [Fri, 25 Jan 2013 03:46:05 +0000 (22:46 -0500)]
make bindist optional

After the recent fixes which ensure the bindist use flag
is always set, users now have no way to disable this flag.
This patch introduces the new "bindist" feature, enabled by
default, which will allow users to turn off bindist if
they are not going to redistribute the builds (or for
tinderbox testing, etc).

11 years agoUse update_seed_command, as documented
Matt Turner [Fri, 25 Jan 2013 02:48:27 +0000 (18:48 -0800)]
Use update_seed_command, as documented

Not update_command. Bug in 4dc9de30.

11 years agoUse 'in' instead of deprecated has_key()
Matt Turner [Sat, 8 Dec 2012 06:14:02 +0000 (22:14 -0800)]
Use 'in' instead of deprecated has_key()

Since Python 2.2 'in' has been preferred to has_key() since it is
shorter, more readable, and faster. has_key() has been deprecated since
2.6 and was removed in 3.0.

See:
http://www.python.org/dev/peps/pep-0290/#testing-dictionary-membership

Mostly scripted with
sed -i -e 's/if \(not \)\?\(.*\)\.has_key(\(.*\))/if \3 \1in \2/'

11 years agobug fix wrt 443024, recent changes to use lbzip2 were too agressive
Rick Farina (Zero_Chaos) [Tue, 8 Jan 2013 21:41:07 +0000 (16:41 -0500)]
bug fix wrt 443024, recent changes to use lbzip2 were too agressive
and we should only be using lbzip2 OUTSIDE the chroot, inside the
chroot we don't have lbzip2 available at this time.

11 years agoppc: Remove -fno-strict-aliasing from CFLAGS
Matt Turner [Sun, 30 Dec 2012 02:53:28 +0000 (18:53 -0800)]
ppc: Remove -fno-strict-aliasing from CFLAGS

Added temporarily in 2004 (commit b010c1bd) for gcc-3.3.3/nptl. Time to
go.

Fixes https://bugs.gentoo.org/show_bug.cgi?id=449240

12 years agoDo not "highly recommend" ccache
Rick Farina (Zero_Chaos) [Fri, 7 Dec 2012 06:30:45 +0000 (22:30 -0800)]
Do not "highly recommend" ccache

ccache has a history of causing strange problems, and Gentoo recommends
disabling it before reporting bugs. As such, we shouldn't highly
recommend it. See http://en.gentoo-wiki.com/wiki/Ccache#Caveats

Suggested-and-Acked-by: Rick "Zero_Chaos" Farina <zerochaos@gentoo.org>
12 years agoFix broken syntax in previous commit.
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Fri, 7 Dec 2012 01:49:30 +0000 (01:49 +0000)]
Fix broken syntax in previous commit.

12 years agoRework update_seed support.
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Thu, 6 Dec 2012 23:27:03 +0000 (23:27 +0000)]
Rework update_seed support.
Split it between update_seed (do we want to update the seed or not) and update_seed_command (custom command to run when updating).
The later is left for advanced uses / users. If not present, catalyst will update gcc deps.

12 years agocatalyst 2.0.12.2 catalyst-2.0.12.2
Rick Farina (Zero_Chaos) [Tue, 4 Dec 2012 20:45:25 +0000 (15:45 -0500)]
catalyst 2.0.12.2

12 years agoMake sure we always append bindist use flag to all targets.
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Thu, 22 Nov 2012 02:48:01 +0000 (01:48 -0100)]
Make sure we always append bindist use flag to all targets.

12 years agoClean-up the dirs we remove on stage1 target (stop cleaning old non-existant python...
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Wed, 21 Nov 2012 01:08:28 +0000 (00:08 -0100)]
Clean-up the dirs we remove on stage1 target (stop cleaning old non-existant python dirs).

12 years agoDocument the update_seed option
Matt Turner [Sun, 11 Nov 2012 00:15:20 +0000 (16:15 -0800)]
Document the update_seed option

12 years agoUse update_seed's argument as an argument list to emerge
Matt Turner [Sat, 10 Nov 2012 23:38:03 +0000 (15:38 -0800)]
Use update_seed's argument as an argument list to emerge

Previously, update_seed caused the seed stage to be updated with
--update --deep --newuse @world. This proved to be unnecessary in the
majority of cases.

Simply give run_merge the previously unused argument of update_seed as
an argument list. This allows updating select packages in a seed stage.

12 years agoWe need to specify the chroot_path to the chmod call.
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Fri, 2 Nov 2012 01:48:08 +0000 (00:48 -0100)]
We need to specify the chroot_path to the chmod call.

12 years agoMake sure the files we try to execute in the chroot are marked as executable.
Jorge Manuel B. S. Vicetto (jmbsvicetto) [Fri, 2 Nov 2012 01:17:48 +0000 (00:17 -0100)]
Make sure the files we try to execute in the chroot are marked as executable.

12 years agore-apply "Revert "Use relative path.""
Rick Farina (Zero_Chaos) [Fri, 2 Nov 2012 00:58:15 +0000 (20:58 -0400)]
re-apply "Revert "Use relative path.""

12 years agore-apply "Make sure we have ${destdir} on copy_to_chroot and simplify exec_in_chroot.""
Rick Farina (Zero_Chaos) [Fri, 2 Nov 2012 00:57:44 +0000 (20:57 -0400)]
re-apply "Make sure we have ${destdir} on copy_to_chroot and simplify exec_in_chroot.""

12 years agoRE-Apply Mike's suggested patch to fix the setting of +x on copy_to_chroot - bug...
Rick Farina (Zero_Chaos) [Fri, 2 Nov 2012 00:56:56 +0000 (20:56 -0400)]
RE-Apply Mike's suggested patch to fix the setting of +x on copy_to_chroot - bug 434252.

12 years agomore forcing of python2 for make dist
Rick Farina (Zero_Chaos) [Fri, 2 Nov 2012 00:28:18 +0000 (20:28 -0400)]
more forcing of python2 for make dist

12 years agocatalyst 2.0.12.1 catalyst-2.0.12.1
Rick Farina (Zero_Chaos) [Fri, 2 Nov 2012 00:05:51 +0000 (20:05 -0400)]
catalyst 2.0.12.1

fix issue introduced by commit c57b514c2295df27eafe57dfb1452b486e9c547b by reverting
original as well as 17b34223a4afc1f070ac2fb9bdfb51e47c03db61 and
7be5b3b53cd0f89f954845ea9fd885a73cc0aedc

fix issue where extra "tmpfs" folder was created in cwd for no reason

12 years agoRevert "Apply Mike's suggested patch to fix the setting of +x on copy_to_chroot ...
Rick Farina (Zero_Chaos) [Fri, 2 Nov 2012 00:00:09 +0000 (20:00 -0400)]
Revert "Apply Mike's suggested patch to fix the setting of +x on copy_to_chroot - bug 434252."

This reverts commit c57b514c2295df27eafe57dfb1452b486e9c547b.

12 years agoRevert "Make sure we have ${destdir} on copy_to_chroot and simplify exec_in_chroot."
Rick Farina (Zero_Chaos) [Thu, 1 Nov 2012 23:59:50 +0000 (19:59 -0400)]
Revert "Make sure we have ${destdir} on copy_to_chroot and simplify exec_in_chroot."

This reverts commit 17b34223a4afc1f070ac2fb9bdfb51e47c03db61.

12 years agoRevert "Use relative path."
Rick Farina (Zero_Chaos) [Thu, 1 Nov 2012 23:59:36 +0000 (19:59 -0400)]
Revert "Use relative path."

This reverts commit 7be5b3b53cd0f89f954845ea9fd885a73cc0aedc.

12 years agoprevent creating pointless "tmpfs" dir
Rick Farina (Zero_Chaos) [Thu, 1 Nov 2012 20:05:37 +0000 (16:05 -0400)]
prevent creating pointless "tmpfs" dir

It seems we are automatically creating the src dir we are trying to mount,
although that whole idea is a little wierd, for now I'll just prevent it
from doing that when mounting a tmpfs.

12 years agofix make dist for python2
Rick Farina (Zero_Chaos) [Wed, 31 Oct 2012 22:12:52 +0000 (18:12 -0400)]
fix make dist for python2

12 years agocatalyst 2.0.12 catalyst-2.0.12
Rick Farina (Zero_Chaos) [Wed, 31 Oct 2012 21:56:10 +0000 (17:56 -0400)]
catalyst 2.0.12

12 years agoadd more lbzip2 support
Rick Farina (Zero_Chaos) [Wed, 31 Oct 2012 18:15:01 +0000 (14:15 -0400)]
add more lbzip2 support

Matt Turner on commit 166a23995f9ca2356cfb2722df37f13c54bffcfd added in
support for lbzip2 use in compression. This extends his patch as much as
possible for decompression as well.

12 years agoDo not break autopoint by cleaning out /usr/share/gettext in stage1
Anthony G. Basile [Mon, 29 Oct 2012 20:30:51 +0000 (16:30 -0400)]
Do not break autopoint by cleaning out /usr/share/gettext in stage1

The problem comes in stage3 when you have packages that inherit autotools.eclass.
The eclass may make use of gettext and run autopoint which will fail if it doesn't
find  /usr/share/gettext/archive.dir.tar.gz.

X-Gentoo-Bug: 439636
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439636
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
12 years agokeep logs outside of chroot
Rick Farina (Zero_Chaos) [Mon, 29 Oct 2012 19:40:45 +0000 (15:40 -0400)]
keep logs outside of chroot

Every time stage build is restarted, the build logs of the previous run
are lost. This new feature allows the logs to be kept outside the chroot
and thus protected from purging. This new feature forces portage to use
FEATURES="clean-logs" no matter what, but it should have no effect on
users not using the new functionality added by this patch.

This new function is DISABLED per default due to a lack of feedback,
however, it is highly suggested that this is made default for the next
release cycle.

12 years agoinitial support for /var/tmp/portage in tmpfs
Rick Farina (Zero_Chaos) [Thu, 25 Oct 2012 03:20:36 +0000 (23:20 -0400)]
initial support for /var/tmp/portage in tmpfs

recently a bug in ZFS completely preventing building on my host system,
due to this fact I hacked in this support to get around the issue.
Since building in tmpfs can speed things significantly I've added the
support properly and optionally. Hopefully others like this as much as
I do.
My motivation: https://bugs.gentoo.org/show_bug.cgi?id=411555
Thanks to jmbsvicetto and dol-sen for helping me read catalyst.