-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-the-iso
executable file
·58 lines (48 loc) · 1.88 KB
/
build-the-iso
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
#
# BUILD THE ISO!!!
# this builds the GoOSe releases,
# based upon the process described below.
# Repositories must be mashed and available in a repository
# Also, must have mock installed along with the pungi-goose.ks
if [ $# -lt 3 ]; then
echo "Usage $0 <VERSION> <STAGE> <RELEASE>"
echo "(eg. $0 6.0 Beta RC4)"
exit 1
fi
MOCK=/usr/bin/mock
KOJI_ROOT=/mnt/koji
KS=${KOJI_ROOT}/releng/pungi-goose.ks
KS_MOCK_PATH=/root
PUNGI=/usr/bin/pungi
ARCHES="x86_64 i386"
ISO_NAME=GoOSe
ISO_VERSION=${1}
ISO_STAGE=${2}
ISO_RELEASE=${3}
ISO_DEST=/home/gl6
ISO_CACHEDIR=/root/gl6/cache
ISO_KS=pungi-goose.ks
ISO_VERSION=6.0
ISO_VERSTAGE=${ISO_VERSION}
ISO_STGREL=${ISO_STAGE}
# if it's Alpha or Beta, make sure to say so
if [ "${ISO_STAGE}" == "Alpha" ] || [ "${ISO_STAGE}" == "Beta" ] || [ "${ISO_RELEASE}" != "Final" ]; then
ISO_VERSTAGE=${ISO_VERSION}-${ISO_STAGE}
ISO_STGREL=${ISO_STAGE}-${ISO_RELEASE}
fi
ISO_FINAL_PATH=${KOJI_ROOT}/releng/gl6/${ISO_VERSION}/${ISO_STGREL}/${ISO_NAME}
for ARCH in ${ARCHES}; do
MOCK_ROOT="/var/lib/mock/goose-${ISO_VERSION}-${ARCH}/root"
# build the iso
${MOCK} -r goose-${ISO_VERSION}-${ARCH} --init
${MOCK} -r goose-${ISO_VERSION}-${ARCH} --install pungi
${MOCK} -r goose-${ISO_VERSION}-${ARCH} --copyin ${KS} ${KS_MOCK_PATH}
if [ "${ISO_STAGE}" == "Final" ]; then
${MOCK} -r goose-${ISO_VERSION}-${ARCH} --chroot "${PUNGI} --name=${ISO_NAME} --destdir=${ISO_DEST} --cachedir=${ISO_CACHEDIR} --all-stages -c ${KS_MOCK_PATH}/${ISO_KS} --ver=${ISO_VERSION} --force"
else
${MOCK} -r goose-${ISO_VERSION}-${ARCH} --chroot "${PUNGI} --name=${ISO_NAME} --destdir=${ISO_DEST} --cachedir=${ISO_CACHEDIR} --all-stages -c ${KS_MOCK_PATH}/${ISO_KS} --ver=${ISO_VERSTAGE} --force"
fi
# move the iso to the release directory (need root access)
sudo rsync -av --progress ${MOCK_ROOT}/${ISO_DEST}/${ISO_VERSION}/* ${ISO_FINAL_PATH}/
done