This is a write up on the bootstrapping process. It may have some errors so
YMMV. Hopefully we don't have to do it again anytime soon.
Build a Fedora 20 dev machine
Compile conary, rmake and any other bits in we might need (use current devimage
as a good list of packages)
Build conary and conary-policy
Rebuild conary with conary <-- smaller dep footprint?
Commit to common label
Add superclasses to common label
Promote/Create needed factory source packages to bootstrap label and cook what
is necessary
Build/Test/Commit rpms needed to build a minimal install (chroot)
Configure Mirrorball
--Create initial group model for minimal install
--Configure mirrorball for bootstrap label
Add group-appliance and platform-definition
Add/Edit tag handlers
Initial promote to production label
Add pcreator factories <--not sure it is necessary
Mirrorball configuration for update stream
Import update stream
Promote update stream
Publish to external repository
Build VM tools
Hack your bashrc by adding this stuff to the end
export LOCAL_ARCH=$(arch)
if [ -f /etc/redhat-release ]; then
## ADDITIONS FOR CHROOT BUILD WORK
alias conary='~/$(arch)/conary/bin/conary'
alias cvc='~/$(arch)/conary/bin/cvc'
alias cvcc='cvc commit -m "Initial Commit"'
alias cvca='cvc add *.*'
# ONLY FOR THE CHROOTS
echo "You should be working on ${LOCAL_ARCH} in work"
export CONARY_HOME=~/${LOCAL_ARCH}/conary
echo "CONARY_HOME=$CONARY_HOME"
echo "cd ${LOCAL_ARCH}/work"
fi
Bootstraping conary
fdev.foresightlinux.org
rmake.foresighlinux.org
# i686 Build Environment
ssh -A fdev.foresightlinux.org
screen -S i686-Build
ssh -p 2232 localhost
arch
cat /etc/redhat-release
mkdir $(arch)
cd $(arch)
mkdir work
cd work/
# x86_64 Build Environment
ssh -A fdev.foresightlinux.org
screen -S x86_64-Build
ssh -p 2264 localhost
arch
cat /etc/redhat-release
mkdir $(arch)
cd $(arch)
mkdir work
cd work/
r.addMercurialSnapshot('http://bitbucket.org/rpathsync/conary',
tag='conary-2.5.1')
hg clone http://bitbucket.org/rpathsync/conary -r conary-2.5.1
cd conary
make clean
make
built enough native packages onto the common label (f20s1.flnx.org@f:20s-c)
and imported enough RPMs onto the platform label (f20s1.flnx.org@f:20s)
alias conary='~/$(arch)/conary/bin/conary'
alias cvc='~/$(arch)/conary/bin/cvc'
alias coanry='conary'
# PYTHON Vars
export PYTHONSTARTUP=~/.pythonrc
LOCAL_ARCH=$(arch)
export CONARY_HOME=~/${LOCAL_ARCH}/conary
cd $CONARY_HOME
find . -name arch
cp -a ./config/arch ~/.conary/
cp -a ./config/macros ~/.conary/
cp -a ./config/components ~/.conary/
cp -a ./config/use ~/.conary/
find ~/.conary/ -name Makefile -exec rm {} \;
cd ~/$(arch)/work
cvc newpkg conary
cp ~/conary.recipe .
cp ~/*.patch .
vi conary.recipe
cvc add conary.recipe
cvc add *.patch
cvc cook --prep
error: No conary policy directories were found. You probably need to install
conary-policy. Try "conary update conary-policy".
hg clone http://bitbucket.org/rpathsync/conary-policy -r conary-policy-1.3
cd conary-policy
vi Makefile
VERSION=1.3
NAMEVER=conary-policy-$(VERSION)
DESTDIR=~/
POLICYDIR=.conary/policy/
make install
mkdir -p ~/.conary/policy/
install -m 644 policy/*.py ~/.conary/policy/
####
-(i686)->>>cd work/
[bsmith@fdev]---i686---(~/i686/work)---
-(work)->>>ls
[bsmith@fdev]---i686---(~/i686/work)---
-(work)->>>cvc newpkg conary && cd conary
[bsmith@fdev]---i686---(~/i686/work)---
-(work)->>>cp ../../x86_64/work/conary/
CONARY el5-build-flags.patch sles10-build-flags.patch
conary.recipe rpl2-build-flags.patch
[bsmith@fdev]---i686---(~/i686/work)---
-(work)->>>cp ../../x86_64/work/conary/*.patch .
[bsmith@fdev]---i686---(~/i686/work)---
-(work)->>>cp ../../x86_64/work/conary/conary.recipe .
####
vi conary/build/cook.py
del db
if False and unmanagedPolicyFiles and enforceManagedPolicy:
raise CookError, ('Cannot cook into repository with'
' unmanaged policy files: %s' %', '.join(unmanagedPolicyFiles))
cat > cook_unmanaged.patch << EOF
--- conary/build/cook.py.orig 2014-01-24 12:28:07.363601944 -0500
+++ conary/build/cook.py 2014-01-24 12:28:29.766667432 -0500
@@ -1582,7 +1582,7 @@ def _loadPolicy(recipeObj, cfg, enforceM
ver.resetTimeStamps()
policyTroves.add((policyPath, ver, deps.Flavor()))
del db
- if unmanagedPolicyFiles and enforceManagedPolicy:
+ if False and unmanagedPolicyFiles and enforceManagedPolicy:
raise CookError, ('Cannot cook into repository with'
' unmanaged policy files: %s' %', '.join(unmanagedPolicyFiles))
return policyTroves
EOF
cvc cook conary=f20s1.flnx.org@f:20s-c --no-deps
cvc newpkg conary-policy
cd conary-policy
vim conary.recipe
class ConaryPolicy(BuildPackageRecipe):
name = 'conary-policy'
version = '1.3'
def setup(r):
r.addMercurialSnapshot('http://bitbucket.org/rpathsync/conary-policy',
tag='conary-policy-1.3')
# Hack to make both flavors
if Arch.x86:
pass
r.MakeInstall()
# NOT %(libdir)s
r.CompilePython('%(prefix)s/lib/conary/policy')
cvc add *.*
cvc cook --prep
cvc commit -m "Initial Commit"
cvc cook conary=f20s1.flnx.org@f:20s-c --no-deps
conary rq --all-flavors
conary:source=2.5.1-1
conary=2.5.1-1-1[is: x86]
conary=2.5.1-1-1[is: x86_64]
conary-build=2.5.1-1-1[is: x86]
conary-build=2.5.1-1-1[is: x86_64]
conary-policy:source=1.3-2
conary-policy=1.3-2-3[is: x86]
conary-policy=1.3-2-3[is: x86_64]
conary-repository=2.5.1-1-1[is: x86]
conary-repository=2.5.1-1-1[is: x86_64]
Time for some autoloaders
PKGS="
autopackage
baserequires
buildpackage
capsule
capsule-kmod-import
capsule-rpm-import
cpackage
derived
derivedcapsule
distro-policy
fileset
group
groupinfo
groupset
package
redirect
tags
test
userinfo
"
for i in $PKGS;do cvc newpkg $i;done
FACTORIES="
factory-capsule-rpm
"
for i in $FACTORIES;do cvc newpkg $i --factory=factory;done
cat > cookme << EOF
#!/bin/bash
# SIMPLE COOKER
PKG=$1
LABEL="f20s1.flnx.org@f:20s-c"
CVC="../conary/bin/cvc"
CONARY="../conary/bin/conary"
echo "$CVC cook ${PKG}=${LABEL} --no-deps"
$CVC cook ${PKG}=${LABEL} --no-deps
echo "$CVC cook ${PKG}=${LABEL} --no-deps"
$CONARY rq ${PKG} --all-troves --all-flavors
EOF
chmod +x cookme
--
Brett C. Smith
[email protected]
Sr Software Developer
Platform Deployment Technologies
(919)531-6635 -- x16635
_______________________________________________
Foresight-devel mailing list
[email protected]
https://lists.foresightlinux.org/mailman/listinfo/foresight-devel