summaryrefslogtreecommitdiffstats
path: root/fuel/build/install
diff options
context:
space:
mode:
authorStefan K. Berg <stefan.k.berg@ericsson.com>2015-09-10 14:46:28 +0200
committerStefan K. Berg <stefan.k.berg@ericsson.com>2015-09-10 14:46:28 +0200
commit5d4a36b80fcd0b69e35e4d4f59cfb64a62453c28 (patch)
tree623d5b318601c7105896d083c1f0fe2120ec05fa /fuel/build/install
parentc92ee8677af0dba1b9f28bc9a97cbf141d60e219 (diff)
Refactoring build system to support Fuel 6.1
As Fuel 6.1 has changed both Debian package handling (fetching repositories from Internet) as well as Puppet packaging, the support for patching these has been disabled. The pre-deploy logic of Fuel has been removed together with a number of patches applied on top of a Fuel build, among them fixes for NTP, DNS and /etc/hosts injection. Instead, when changed default behavior is required, this will be introduced as Fuel plugins which more cleanly integrates into the Fuel system, and also decouples additional functionality from the ISO build stage. Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
Diffstat (limited to 'fuel/build/install')
-rw-r--r--fuel/build/install/apt-ftparchive-deb.conf6
-rw-r--r--fuel/build/install/apt-ftparchive-release.conf8
-rw-r--r--fuel/build/install/apt-ftparchive-udeb.conf4
-rwxr-xr-xfuel/build/install/install.sh84
-rwxr-xr-xfuel/build/install/uninstall.sh16
5 files changed, 69 insertions, 49 deletions
diff --git a/fuel/build/install/apt-ftparchive-deb.conf b/fuel/build/install/apt-ftparchive-deb.conf
index 1101ac9..0d15aec 100644
--- a/fuel/build/install/apt-ftparchive-deb.conf
+++ b/fuel/build/install/apt-ftparchive-deb.conf
@@ -17,9 +17,9 @@ TreeDefault {
};
BinDirectory "pool/main" {
- Packages "dists/precise/main/binary-amd64/Packages";
- BinOverride "./indices/override.precise.main";
- ExtraOverride "./indices/override.precise.extra.main";
+ Packages "dists/trusty/main/binary-amd64/Packages";
+ BinOverride "./indices/override.trusty.main";
+ ExtraOverride "./indices/override.trusty.extra.main";
};
Default {
diff --git a/fuel/build/install/apt-ftparchive-release.conf b/fuel/build/install/apt-ftparchive-release.conf
index 0252882..02706bd 100644
--- a/fuel/build/install/apt-ftparchive-release.conf
+++ b/fuel/build/install/apt-ftparchive-release.conf
@@ -10,9 +10,9 @@
APT::FTPArchive::Release::Origin "Ubuntu";
APT::FTPArchive::Release::Label "Ubuntu";
-APT::FTPArchive::Release::Suite "precise";
-APT::FTPArchive::Release::Version "12.04";
-APT::FTPArchive::Release::Codename "precise";
+APT::FTPArchive::Release::Suite "trusty";
+APT::FTPArchive::Release::Version "1.04";
+APT::FTPArchive::Release::Codename "trusty";
APT::FTPArchive::Release::Architectures "amd64";
APT::FTPArchive::Release::Components "main";
-APT::FTPArchive::Release::Description "Ubuntu Precise 12.04 LTS";
+APT::FTPArchive::Release::Description "Ubuntu Trusty Tahr 14.04 LTS";
diff --git a/fuel/build/install/apt-ftparchive-udeb.conf b/fuel/build/install/apt-ftparchive-udeb.conf
index 2acbcf0..3b5b239 100644
--- a/fuel/build/install/apt-ftparchive-udeb.conf
+++ b/fuel/build/install/apt-ftparchive-udeb.conf
@@ -17,8 +17,8 @@ TreeDefault {
};
BinDirectory "pool/debian-installer" {
- Packages "dists/precise/main/debian-installer/binary-amd64/Packages";
- BinOverride "./indices/override.precise.main.debian-installer";
+ Packages "dists/trusty/main/debian-installer/binary-amd64/Packages";
+ BinOverride "./indices/override.trusty.main.debian-installer";
};
Default {
diff --git a/fuel/build/install/install.sh b/fuel/build/install/install.sh
index dbb26d6..f0bb849 100755
--- a/fuel/build/install/install.sh
+++ b/fuel/build/install/install.sh
@@ -122,17 +122,17 @@ prep_make_live() {
ssh-copy-id root@$FUELHOST
sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT
- if [ -f $REPO/dists/precise/main/binary-amd64/Packages.backup ]; then
+ if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
echo "Error - found backup file for Packages!"
exit 1
fi
- if [ -f $REPO/dists/precise/main/binary-amd64/Packages.gz.backup ]; then
+ if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
echo "Error - found backup file for Packages.gz!"
exit 1
fi
- if [ -f $REPO/dists/precise/Release.backup ]; then
+ if [ -f $REPO/dists/trusty/Release.backup ]; then
echo "Error - found backup file for Release!"
exit 1
fi
@@ -142,20 +142,24 @@ prep_make_live() {
exit 1
fi
- cp $REPO/dists/precise/main/binary-amd64/Packages $REPO/dists/precise/main/binary-amd64/Packages.backup
- cp $REPO/dists/precise/main/binary-amd64/Packages.gz $REPO/dists/precise/main/binary-amd64/Packages.gz.backup
- cp $REPO/dists/precise/Release $REPO/dists/precise/Release.backup
+ cp $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.backup
+ cp $REPO/dists/trusty/main/binary-amd64/Packages.gz $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup
+ cp $REPO/dists/trusty/Release $REPO/dists/trusty/Release.backup
cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup
}
post_make_live() {
- echo "Installing into Puppet:"
- cd $TOP/release/puppet/modules
- for dir in *
- do
- echo " $dir"
- cp -Rp $dir $DEST/etc/puppet/modules
- done
+ if [ -d $TOP/release/puppet/modules ]; then
+ echo "Installing into Puppet:"
+ cd $TOP/release/puppet/modules
+ if [ `ls -1 | wc -l` -gt 0 ]; then
+ for dir in *
+ do
+ echo " $dir"
+ cp -Rp $dir $DEST/etc/puppet/modules
+ done
+ fi
+ fi
}
make_live() {
@@ -210,18 +214,21 @@ iso_copy_puppet() {
tar xzf $DEST/puppet-slave.tgz
cd $TOP/release/puppet/modules
- verify_orig_files $TMP_ISOPUPPET/release/puppet $TOP/release/puppet/modules
# Remove all .orig files before copying as they now have been verfied
- find $TOP/release/puppet/modules -type f -name '*.orig' -exec rm {} \;
-
- for dir in $TOP/release/puppet/modules/*
- do
- echo " $dir"
- cp -Rp $dir $TMP_ISOPUPPET/release/puppet
- done
- cd $TMP_ISOPUPPET/release/puppet
+ if [ -d $TOP/release/puppet/modules ]; then
+ if [ `ls -1 | wc -l` -gt 0 ]; then
+ verify_orig_files $TMP_ISOPUPPET/release/puppet $TOP/release/puppet/modules
+ find $TOP/release/puppet/modules -type f -name '*.orig' -exec rm {} \;
+ for dir in $TOP/release/puppet/modules/*
+ do
+ echo " $dir"
+ cp -Rp $dir $TMP_ISOPUPPET/release/puppet
+ done
+ fi
+ fi
+ cd $TMP_ISOPUPPET/release/puppet
tar czf $DEST/puppet-slave.tgz .
cd $TOP
rm -Rf $TMP_ISOPUPPET
@@ -250,7 +257,7 @@ iso_modify_image () {
make_iso() {
prep_make_iso
copy_packages
- iso_copy_puppet
+ #iso_copy_puppet
iso_modify_image
make_iso_image
}
@@ -263,6 +270,8 @@ copy_packages() {
do
echo " $udeb"
cp $udeb $REPO/pool/debian-installer
+ echo "Did not expect a package here, not supported"
+ exit 1
done
cd $TOP/release/packages/ubuntu/pool/main
@@ -270,6 +279,8 @@ copy_packages() {
do
echo " $deb"
cp $deb $REPO/pool/main
+ echo "Did not expect a package here, not supported"
+ exit 1
done
echo "Running Fuel package patch file"
@@ -277,6 +288,8 @@ copy_packages() {
for line in `cat $TOP/apply_patches | grep -v "^#" | grep -v "^$"`; do
echo "Line is $line"
+ echo "Did not expect a line here, not supported"
+ exit 1
ref=`echo $line | cut -d '>' -f 1`
origpkg=`echo $line| cut -d '>' -f 2`
url=`echo $line | cut -d '>' -f 3`
@@ -315,10 +328,11 @@ copy_packages() {
done
printf "Done running Fuel patch file\n\n"
-
echo "Running add packages file"
for line in `cat $TOP/add_opnfv_packages | grep -v "^#" | grep -v "^$"`; do
echo "Line is $line"
+ echo "Did not expect a line here, not supported"
+ exit 1
ref=`echo $line | cut -d '>' -f 1`
origpkg=`echo $line| cut -d '>' -f 2`
url=`echo $line | cut -d '>' -f 3`
@@ -370,6 +384,8 @@ copy_packages() {
printf "\n\n" | tee -a $REPORTFILE
for line in `cat $TOP/patch-packages/release/patch-replacements`
do
+ echo "Did not expect a line here, not supported"
+ exit 1
frompkg=`echo $line | cut -d ">" -f 1`
topkg=`echo $line | cut -d ">" -f 2`
echo "CM: Applying patch to $frompkg" | tee -a $REPORTFILE
@@ -411,17 +427,19 @@ copy_packages() {
APT_DEB_CONF="$TOP/install/apt-ftparchive-deb.conf"
APT_UDEB_CONF="$TOP/install/apt-ftparchive-udeb.conf"
- apt-ftparchive -c "${APT_REL_CONF}" generate "${APT_DEB_CONF}"
- apt-ftparchive generate "${APT_UDEB_CONF}"
+ echo Not running echo apt-ftparchive -c "${APT_REL_CONF}" generate "${APT_DEB_CONF}"
+ echo Not running apt-ftparchive -c "${APT_REL_CONF}" generate "${APT_DEB_CONF}"
+ echo Not running apt-ftparchive generate "${APT_UDEB_CONF}"
+ echo Not running apt-ftparchive generate "${APT_UDEB_CONF}"
# Fuel also needs this index file
- cat dists/precise/main/binary-amd64/Packages | \
- awk '/^Package:/{pkg=$2}
- /^Version:/{print pkg ": \"" $2 "\""}' > ubuntu-versions.yaml
- cp ubuntu-versions.yaml $DEST
+ # cat dists/trusty/main/binary-amd64/Packages | \
+ # awk '/^Package:/{pkg=$2}
+ # /^Version:/{print pkg ": \"" $2 "\""}' > ubuntu-versions.yaml
+ # cp ubuntu-versions.yaml $DEST
- apt-ftparchive -c "${APT_REL_CONF}" release dists/precise/ > dists/precise/Release
- gzip -9cf dists/precise/Release > dists/precise/Release.gz
+ # apt-ftparchive -c "${APT_REL_CONF}" release dists/trusty/ > dists/trusty/Release
+ # gzip -9cf dists/trusty/Release > dists/trusty/Release.gz
popd > /dev/null
@@ -444,6 +462,8 @@ if [ $MODE = "iso" ]; then
NEWISO=$3
VOLUMEID="$4 $5"
REPORTFILE="${NEWISO}.txt"
+ echo "Opening reportfile at $REPORTFILE"
+ touch $REPORTFILE
if [ ! -f $ORIGISO ]; then
echo "Can't find original MOS 5.1 iso at $ORIGISO"
rm $CONF
diff --git a/fuel/build/install/uninstall.sh b/fuel/build/install/uninstall.sh
index 36b8884..a9e74bc 100755
--- a/fuel/build/install/uninstall.sh
+++ b/fuel/build/install/uninstall.sh
@@ -31,17 +31,17 @@ DEST=$MOUNT
REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64
cd $REPO
-if [ ! -f $REPO/dists/precise/main/binary-amd64/Packages.backup ]; then
+if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then
echo "Error - didn't find backup file for Packages!"
exit 1
fi
-if [ ! -f $REPO/dists/precise/main/binary-amd64/Packages.gz.backup ]; then
+if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then
echo "Error - didn't find backup file for Packages.gz!"
exit 1
fi
-if [ ! -f $REPO/dists/precise/Release.backup ]; then
+if [ ! -f $REPO/dists/trusty/Release.backup ]; then
echo "Error - didn't find backup file for Release!"
exit 1
fi
@@ -71,9 +71,9 @@ cd $REPO
echo "Restoring backups of datafiles"
-rm -f $REPO/dists/precise/main/binary-amd64/Packages $REPO/dists/precise/main/binary-amd64/Packages.gz
-rm -f $REPO/dists/precise/Release $DEST/etc/puppet/manifests/site.pp
-mv $REPO/dists/precise/main/binary-amd64/Packages.backup $REPO/dists/precise/main/binary-amd64/Packages
-mv $REPO/dists/precise/main/binary-amd64/Packages.gz.backup $REPO/dists/precise/main/binary-amd64/Packages.gz
-mv $REPO/dists/precise/Release.backup $REPO/dists/precise/Release
+rm -f $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.gz
+rm -f $REPO/dists/trusty/Release $DEST/etc/puppet/manifests/site.pp
+mv $REPO/dists/trusty/main/binary-amd64/Packages.backup $REPO/dists/trusty/main/binary-amd64/Packages
+mv $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup $REPO/dists/trusty/main/binary-amd64/Packages.gz
+mv $REPO/dists/trusty/Release.backup $REPO/dists/trusty/Release
mv $DEST/etc/puppet/manifests/site.pp.backup $DEST/etc/puppet/manifests/site.pp