conf/conf.d/fedora-10-gold.cfg | 181 +++++++++++++++++++++++++++++++++++++++++
revisor/modrebrand/__init__.py | 75 ++++++----------
scripts/DEVEL-buildinstall | 138 +++++++++++++++++--------------
3 files changed, 289 insertions(+), 105 deletions(-)
New commits:
commit f400beed1095e2c0c48692332568b3c0ac926f19
Author: Jeroen van Meeuwen (Fedora Unity) <kanarip(a)fedoraunity.org>
Date: Wed Jan 14 19:25:38 2009 +0100
Add fedora-10-gold to git repo
diff --git a/conf/conf.d/fedora-10-gold.cfg b/conf/conf.d/fedora-10-gold.cfg
new file mode 100644
index 0000000..80d2293
--- /dev/null
+++ b/conf/conf.d/fedora-10-gold.cfg
@@ -0,0 +1,181 @@
+# Kickstart file for composing the "Fedora" spin of Fedora (rawhide)
+# Maintained by the Fedora Release Engineering team:
+#
https://fedoraproject.org/wiki/ReleaseEngineering
+# mailto:rel-eng@lists.fedoraproject.org
+
+# Use a part of 'iso' to define how large you want your isos.
+# Only used when composing to more than one iso.
+# Default is 695 (megs), CD size.
+# Listed below is the size of a DVD if you wanted to split higher.
+#part iso --size=4998
+
+# Add the repos you wish to use to compose here. At least one of them needs group data.
+repo --name=rawhide
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
+repo --name=rawhide-source
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide-source&arch=$basearch
+
+# Package manifest for the compose. Uses repo group metadata to translate groups.
+# (@base is added by default unless you add --nobase to %packages)
+# (default groups for the configured repos are added by --default)
+%packages --default
+# core
+tcsh
+kernel*
+-kernel*debug*
+-kernel-kdump*
+-syslog-ng
+# Desktop Packages
+@kde-desktop
+echo-icon-theme
+tracker
+swfdec
+libflashsupport
+nspluginwrapper
+liferea
+esc
+thunderbird
+# apps
+@authoring-and-publishing
+@eclipse
+joe
+emacs
+k3b
+@system-tools
+wireshark-gnome
+# Devel packages
+@development-libs
+@development-tools
+@fedora-packager
+@gnome-software-development
+@java-development
+@kde-software-development
+@web-development
+@x-software-development
+# Server packages
+@dns-server
+@ftp-server
+@mail-server
+@mysql
+@network-server
+@news-server
+@server-cfg
+@smb-server
+@sql-server
+@web-server --optional
+# Keep dap off the install media, makes Eng & Sci show up
+-dap-server-cgi
+# Virt group
+@virtualization --optional
+# filesystem stuff
+reiserfs-utils
+xfsprogs
+jfsutils
+# Languages
+@afrikaans-support
+@albanian-support
+@arabic-support
+@armenian-support
+@assamese-support
+@basque-support
+@belarusian-support
+@bengali-support
+@bhutanese-support
+@burmese-support
+@bosnian-support
+@brazilian-support
+@breton-support
+@british-support
+@bulgarian-support
+@catalan-support
+@chinese-support
+@croatian-support
+@czech-support
+@danish-support
+@dutch-support
+@esperanto-support
+@estonian-support
+@ethiopic-support
+@faeroese-support
+@filipino-support
+@finnish-support
+@french-support
+@gaelic-support
+@galician-support
+@georgian-support
+@german-support
+@greek-support
+@gujarati-support
+@hebrew-support
+@hindi-support
+@hungarian-support
+@icelandic-support
+@indonesian-support
+@inuktitut-support
+@irish-support
+@italian-support
+@japanese-support
+@kannada-support
+@kashmiri-support
+@kashubian-support
+@khmer-support
+@konkani-support
+@korean-support
+@lao-support
+@latvian-support
+@lithuanian-support
+@low-saxon-support
+@macedonian-support
+@malay-support
+@malayalam-support
+@maori-support
+@marathi-support
+@mongolian-support
+@nepali-support
+@northern-sami-support
+@northern-sotho-support
+@norwegian-support
+@oriya-support
+@persian-support
+@polish-support
+@portuguese-support
+@punjabi-support
+@romanian-support
+@russian-support
+@samoan-support
+@serbian-support
+@sindhi-support
+@sinhala-support
+@slovak-support
+@slovenian-support
+@somali-support
+@southern-ndebele-support
+@southern-sotho-support
+@spanish-support
+@swati-support
+@swedish-support
+@tagalog-support
+@tamil-support
+@telugu-support
+@thai-support
+@tibetan-support
+@tonga-support
+@tsonga-support
+@tswana-support
+@turkish-support
+@ukrainian-support
+@urdu-support
+@venda-support
+@vietnamese-support
+@walloon-support
+@welsh-support
+@xhosa-support
+@zulu-support
+# Size removals
+-gimp-help
+-java-1.6.0-openjdk-src
+-xorg-x11-docs
+-kernel-doc
+-java-1.5.0-gcj-src
+-java-1.5.0-gcj-devel
+-libgcj-src
+-*javadoc*
+%end
commit 829e73675f2c04ceb217722e391cc514bce038d3
Author: Jeroen van Meeuwen (Fedora Unity) <kanarip(a)fedoraunity.org>
Date: Tue Jan 13 04:09:54 2009 -0500
Revamp modrebrand based on our new cheat in DEVEL-buildinstall, independent of
anaconda
diff --git a/revisor/modrebrand/__init__.py b/revisor/modrebrand/__init__.py
index 8d76fa3..d952fa3 100644
--- a/revisor/modrebrand/__init__.py
+++ b/revisor/modrebrand/__init__.py
@@ -31,54 +31,40 @@ from rhpl.translate import _
class RevisorRebrand:
def __init__(self):
- """Builds rebranded packages"""
+ """This module allows rebranding"""
pass
def set_defaults(self, defaults):
- defaults.rebrand_packages = "fedora-release fedora-release-notes
fedora-logos"
-
- def buildinstall_append(self):
- """Ensure that buildinstall includes the appropriate logos
package"""
- if not self.cfg.rebrand:
- return
-
- self.cfg.buildinstall_append = ["--logopkg",
"generic-logos"]
+ defaults.rebrand_packages = "system-release system-release-notes
system-logos"
def pre_resolve_dependencies(self):
- """Ensure that packages related to rebranding are actually being
replaced:
- - Remove fedora-logos
- - Add <rebrand-name>-logos if available
- - Add generic-logos if <rebrand-name>-logos not available
- """
+ """Ensure that packages related to rebranding are actually being
replaced."""
if not self.cfg.rebrand:
+ self.log.debug(_("Not rebranding pre_resolve_dependencies"),
level=9)
return
- ## Search for all these packages
- #matches = []
- #for pkg_search in ["*-logos", "*-release",
"*-release-notes"]:
- #try:
- #pkglist = self.cfg.yumobj.pkgSack.simplePkgList()
-
- #if re.match('.*[\*,\[,\],\{,\},\?].*', pkg_search):
- #restring = fnmatch.translate(pkg_search)
- #regex = re.compile(restring, flags=re.I) # case insensitive
- #for item in pkglist:
- #if regex.match(item[0]):
- #matches.append(item[0])
- #except yum.Errors.PackageSackError, e:
- #if self.cfg.ksobj._get("packages","handleMissing")
!= kickstart.constants.KS_MISSING_IGNORE:
- #self.log.warning(e.value)
+ # Find what provides the capabilities listed in self.cfg.rebrand_packages
+ # Trim their names to brand names
+ # Remove all packages <brand>-*
+ # Add the brand from self.cfg.rebrand.lower().replace('
','').strip()
+ # Add the brand from generic if that fails
- #print str(matches)
+ for capability in self.cfg.rebrand_packages.split():
+ pkgs = self.cfg.yumobj.whatProvides(capability, None, None).returnPackages()
+ for po in pkgs:
+ try:
+ if po.name.startswith(self.cfg.rebrand):
+ self.log.debug(_("Adding %s-%s-%s.%s") % (po.name,
po.version, po.release, po.arch), level=9)
+ self.cfg.yumobj.addInstall(po)
+ else:
+ self.log.debug(_("Removing %s-%s-%s.%s") % (po.name,
po.version, po.release, po.arch), level=9)
+ self.cfg.yumobj.tsInfo.remove(po)
+ except:
+ pass
- for pkg in revisor.misc.resolve_pkgs(self.cfg.yumobj,
self.cfg.rebrand_packages.split(), log=self.log):
- try:
- pkgs = self.cfg.yumobj.pkgSack.returnNewestByName(pkg)
- for po in pkgs:
- self.cfg.yumobj.tsInfo.remove(po)
- self.log.debug(_("Removing package %s-%s:%s-%s.%s for
rebranding") % (po.name, po.epoch, po.version, po.release, po.arch))
- except:
- pass
+ def post_resolve_dependencies(self):
+ """Ensure that no branded packages have been pulled in by
dependency resolving"""
+ pass
def add_options(self, parser):
"""Adds a Rebrand Options group to the OptionParser instance you
give it (parser),
@@ -96,13 +82,10 @@ class RevisorRebrand:
self.cfg = cfg
self.log = cfg.log
if not cli_options.rebrand == "":
+ self.log.debug(_("Setting rebrand to %s") % cli_options.rebrand,
level=9)
+ # Check if there's a space in the brand name
self.cfg.rebrand = cli_options.rebrand
- else:
+ # FIXME: Maybe set iso_label, iso_basename and product_name from this string
right now as well
+ # Consider these values have been deliberitly set to different values
+ elif not self.cfg.rebrand:
self.cfg.rebrand = False
-
-class MakeCallback:
- def __init__(self):
- pass
-
- def parse_line(self, msg):
- print msg
commit 160e5010a7a5c794efaad3060ccfba85ee94430c
Author: Jeroen van Meeuwen (Fedora Unity) <kanarip(a)fedoraunity.org>
Date: Tue Jan 13 04:07:25 2009 -0500
Update DEVEL-buildinstall to the latest version in rawhide
Fix indentation in DEVEL-buildinstall
Add the rebranding cheat
diff --git a/scripts/DEVEL-buildinstall b/scripts/DEVEL-buildinstall
index 97eaf61..614623f 100755
--- a/scripts/DEVEL-buildinstall
+++ b/scripts/DEVEL-buildinstall
@@ -18,68 +18,76 @@
# along with this program. If not, see <
http://www.gnu.org/licenses/>.
#
+die() {
+ [ -n "$TREEDIR" ] && rm -rf $TREEDIR
+ [ -n "$BUILDINSTDIR" ] && rm -rf $BUILDINSTDIR
+ [ -n "$yumconf" ] && rm -rf $yumconf
+ echo "Aborting buildinstall"
+ echo "$@"
+ exit 1
+}
+
usage() {
- echo "Usage: buildinstall --version <version> --product <product>
--release <comment> [--output outputdir] [--discs <discstring>]
<root>" >&2
- exit 1
+ echo "Usage: buildinstall --version <version> --product <product>
--release <comment> [--output outputdir] [--discs <discstring>]
<root>" >&2
+ exit 1
}
PRODUCTPATH="anaconda"
while [ $# -gt 0 ]; do
case $1 in
- # general options affecting how we build things
- --nogr)
- NOGRSTR="--nogr"
- shift
- ;;
- --debug)
- DEBUGSTR="--debug"
- shift
- ;;
-
- # release information
- --version)
- VERSION=$2
- shift; shift
- ;;
- --release)
- RELEASESTR=$2
- shift; shift
- ;;
+ # general options affecting how we build things
+ --nogr)
+ NOGRSTR="--nogr"
+ shift
+ ;;
+ --debug)
+ DEBUGSTR="--debug"
+ shift
+ ;;
+
+ # release information
+ --version)
+ VERSION=$2
+ shift; shift
+ ;;
+ --release)
+ RELEASESTR=$2
+ shift; shift
+ ;;
--product)
- PRODUCTSTR=$2
- shift; shift
- ;;
- --variant)
- VARIANT=$2
- shift; shift
- ;;
- --bugurl)
- BUGURL=$2
- shift; shift
- ;;
-
- --output)
- OUTPUT=$2
- shift; shift
- ;;
- --updates)
- UPDATES=$2
- shift; shift
- ;;
- --mirrorlist)
- MIRRORLIST="$MIRRORLIST $2"
- shift; shift
- ;;
-
- *)
- if [ -z "$REPO" ]; then
- REPO=$1
- else
- EXTRA_REPOS="$EXTRA_REPOS $1"
- fi
- shift
- ;;
+ PRODUCTSTR=$2
+ shift; shift
+ ;;
+ --variant)
+ VARIANT=$2
+ shift; shift
+ ;;
+ --bugurl)
+ BUGURL=$2
+ shift; shift
+ ;;
+ --output)
+ OUTPUT=$2
+ shift; shift
+ ;;
+ --updates)
+ UPDATES=$2
+ shift; shift
+ ;;
+ --mirrorlist)
+ MIRRORLIST="$MIRRORLIST $2"
+ shift; shift
+ ;;
+
+ *)
+ if [ -z "$REPO" ]; then
+ REPO=$1
+ else
+ EXTRA_REPOS="$EXTRA_REPOS $1"
+ fi
+ shift
+ ;;
esac
done
@@ -120,6 +128,17 @@ BUILDINSTDIR=$(mktemp -d ${TMPDIR:-/tmp}/buildinstall.tree.XXXXXX)
TREEDIR=$(mktemp -d ${TMPDIR:-/tmp}/treedir.XXXXXX)
CACHEDIR=$(mktemp -d ${TMPDIR:-/tmp}/yumcache.XXXXXX)
+# The first -release and -logos package we are going to look for is the lowercase
+# equivalent of the PRODUCTSTR
+export brandpkgname="`echo $PRODUCTSTR | tr '[:upper:]'
'[:lower:]'`"
+
+# The other -release and -logos packages will need to be excluded
+for pkg in fedora redhat generic; do
+ if [ "$pkg" != "$brandpkgname" ]; then
+ EXCLUDEPKGS="$EXCLUDEPKGS ${pkg}-release ${pkg}-logos"
+ fi
+done
+
yumconf=$(mktemp ${TMPDIR:-/tmp}/yum.conf.XXXXXX)
cat > $yumconf <<EOF
[main]
@@ -129,6 +148,7 @@ gpgcheck=0
plugins=0
reposdir=
tsflags=nodocs
+exclude=$EXCLUDEPKGS
[anacondarepo]
name=anaconda repo
@@ -180,11 +200,11 @@ BUILDINSTALL=./buildinstall
for f in $UPD_INSTROOT $MK_IMAGES $MK_STAMP $MK_TREEINFO $BUILDINSTALL; do
if [ -n "$UPDATES" -a -f $UPDATES/usr/lib/anaconda-runtime/$f ]; then
- cp -a $UPDATES/usr/lib/anaconda-runtime/$f* $BUILDINSTDIR/
+ cp -a $UPDATES/usr/lib/anaconda-runtime/$f* $BUILDINSTDIR/
elif [ ! -f $f ]; then
- cp -a $BUILDINSTDIR/usr/lib/anaconda-runtime/$f* $BUILDINSTDIR/
+ cp -a $BUILDINSTDIR/usr/lib/anaconda-runtime/$f* $BUILDINSTDIR/
else
- cp -a $f* $BUILDINSTDIR/
+ cp -a $f* $BUILDINSTDIR/
fi
done
@@ -197,14 +217,14 @@ BUILDINSTALL=$BUILDINSTDIR/buildinstall
if [ -n "$UPDATES" ]; then UPDATES="--updates $UPDATES"; fi
echo "Building images..."
-$UPD_INSTROOT $DEBUGSTR $NOGRSTR --arch $BUILDARCH $UPDATES --imgdir $TREEDIR/install
$yumconf
+$UPD_INSTROOT $DEBUGSTR $NOGRSTR --arch $BUILDARCH $UPDATES --imgdir $TREEDIR/install
$yumconf || die "upd-instroot failed"
echo "Writing .treeinfo file..."
$MK_TREEINFO --family="$PRODUCTSTR" ${VARIANT:+--variant="$VARIANT"}
--version=$VERSION --arch=$BUILDARCH --outfile=$OUTPUT/.treeinfo
# FIXME: need to update mk-images to take the yumconf
echo "Making images..."
-$MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BUILDARCH --product
"$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT
$yumconf
+$MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BUILDARCH --product
"$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT
$yumconf || die "image creation failed"
echo "Writing .discinfo file"
$MK_STAMP --releasestr="$RELEASESTR" --arch=$BUILDARCH
--discNum="ALL" --outfile=$OUTPUT/.discinfo