mirror of
https://github.com/YunoHost/cd_build.git
synced 2024-09-03 20:06:24 +02:00
[enh] Be able to build with testing
This commit is contained in:
parent
381d36e99c
commit
5823851a05
7 changed files with 54 additions and 39 deletions
|
@ -1,51 +1,61 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# Usage ./build-yunohost [ARCH [DIST [DEB_DIST]]]
|
||||||
|
# ARCH amd64|i386
|
||||||
|
# DIST stable|testing
|
||||||
|
# DEB_DIST jessie|stretch
|
||||||
|
|
||||||
DATE=$(date +%m%d%y%H%M)
|
DATE=$(date +%m%d%y%H%M)
|
||||||
DIST='jessie'
|
|
||||||
DEBNUM='8.6'
|
DEBNUM='8.6'
|
||||||
|
|
||||||
function build-i386
|
|
||||||
|
|
||||||
|
# Build Yunohost iso for amd64 or i386 arch
|
||||||
|
# Usage: build ARCH
|
||||||
|
function build
|
||||||
{
|
{
|
||||||
build-simple-cdd --dist $DIST --force-preseed --conf ./simple-cdd-i386.conf
|
REPO_URL="http://repo.yunohost.org/debian/"
|
||||||
$(pwd)/add-firmware-to images/debian-$DEBNUM-i386-CD-1.iso images/yunohost-$DATE-i386.iso $DIST
|
if [ "$DIST" = "testing" ] ; then
|
||||||
rm images/debian-$DEBNUM-i386-CD-1.iso
|
sed -i "s#$REPO_URL jessie stable#$REPO_URL $DEB_DIST stable testing#" profiles/*.preseed
|
||||||
rm images/debian-$DEBNUM-i386-CD-1.list.gz
|
sed -i "s#$REPO_URL stretch stable#$REPO_URL $DEB_DIST stable testing#" profiles/*.preseed
|
||||||
|
else
|
||||||
|
sed -i "s#$REPO_URL jessie stable testing#$REPO_URL $DEB_DIST stable#" profiles/*.preseed
|
||||||
|
sed -i "s#$REPO_URL stretch stable testing#$REPO_URL $DEB_DIST stable#" profiles/*.preseed
|
||||||
|
fi
|
||||||
|
build-simple-cdd --dist $DEB_DIST --conf ./simple-cdd-$1.conf
|
||||||
|
$(pwd)/add-firmware-to images/debian-$DEBNUM-$1-CD-1.iso images/yunohost-$DEB_DIST-$DATE-$1-$DIST.iso $DEB_DIST
|
||||||
|
rm images/debian-$DEBNUM-$1-CD-1.iso
|
||||||
|
rm images/debian-$DEBNUM-$1-CD-1.list.gz
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-amd64
|
# Sign the new iso
|
||||||
|
# Usage: sign ARCH
|
||||||
|
function sign
|
||||||
{
|
{
|
||||||
build-simple-cdd --dist $DIST --conf ./simple-cdd-amd64.conf
|
NAME="images/yunohost-$DEB_DIST-$DATE-$1-$DIST.iso"
|
||||||
$(pwd)/add-firmware-to images/debian-$DEBNUM-amd64-CD-1.iso images/yunohost-$DATE-amd64.iso $DIST
|
gpg --output $NAME.sig --detach-sig $NAME
|
||||||
#rm images/debian-$DEBNUM-amd64-CD-1.iso
|
sha256sum $NAME > images/SHA256SUM
|
||||||
#rm images/debian-$DEBNUM-amd64-CD-1.list.gz
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-amd64-test
|
function build_and_sign
|
||||||
{
|
{
|
||||||
cp profiles/default.preseed profiles/old.default.preseed
|
build $1
|
||||||
cp profiles/test.preseed profiles/default.preseed
|
sign $1
|
||||||
build-simple-cdd --dist $DIST --force-preseed --conf ./simple-cdd-amd64.conf
|
|
||||||
$(pwd)/add-firmware-to images/debian-$DEBNUM-amd64-CD-1.iso images/yunohost-$DATE-amd64-test.iso $DIST
|
|
||||||
rm images/debian-$DEBNUM-amd64-CD-1.iso
|
|
||||||
rm images/debian-$DEBNUM-amd64-CD-1.list.gz
|
|
||||||
mv profiles/old.default.preseed profiles/default.preseed
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rm -r $(pwd)/tmp
|
rm -r $(pwd)/tmp
|
||||||
|
DIST=$2
|
||||||
|
if [[ "${2:-1}" = 1 ]]; then
|
||||||
|
DIST='stable'
|
||||||
|
fi
|
||||||
|
DEB_DIST=$3
|
||||||
|
if [[ "${3:-1}" = 1 ]]; then
|
||||||
|
DEB_DIST='jessie'
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${1:-1}" = 1 ]]
|
if [[ "${1:-1}" = 1 ]]
|
||||||
then
|
then
|
||||||
build-i386
|
build_and_sign i386
|
||||||
build-amd64
|
build_and_sign amd64
|
||||||
else
|
else
|
||||||
case $1 in
|
build_and_sign $1
|
||||||
i386)
|
|
||||||
build-i386
|
|
||||||
;;
|
|
||||||
amd64)
|
|
||||||
build-amd64
|
|
||||||
;;
|
|
||||||
test)
|
|
||||||
build-amd64-test
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
|
|
3
profiles/advanced.packages
Normal file
3
profiles/advanced.packages
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
less
|
||||||
|
simple-cdd-profiles
|
||||||
|
firmware-linux-nonfree
|
|
@ -29,7 +29,7 @@ d-i apt-setup/non-free boolean true
|
||||||
d-i apt-setup/contrib boolean true
|
d-i apt-setup/contrib boolean true
|
||||||
d-i apt-setup/local0/repository string \
|
d-i apt-setup/local0/repository string \
|
||||||
http://repo.yunohost.org/debian/ jessie stable
|
http://repo.yunohost.org/debian/ jessie stable
|
||||||
d-i apt-setup/local0/key string https://repo.yunohost.org/yunohost.asc
|
d-i apt-setup/local0/key string http://repo.yunohost.org/debian/yunohost.asc
|
||||||
#d-i debian-installer/allow_unauthenticated string true
|
#d-i debian-installer/allow_unauthenticated string true
|
||||||
|
|
||||||
### Package selection
|
### Package selection
|
||||||
|
|
3
profiles/default.packages
Normal file
3
profiles/default.packages
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
less
|
||||||
|
simple-cdd-profiles
|
||||||
|
firmware-linux-nonfree
|
|
@ -52,7 +52,7 @@ d-i apt-setup/non-free boolean true
|
||||||
d-i apt-setup/contrib boolean true
|
d-i apt-setup/contrib boolean true
|
||||||
d-i apt-setup/local0/repository string \
|
d-i apt-setup/local0/repository string \
|
||||||
http://repo.yunohost.org/debian/ jessie stable
|
http://repo.yunohost.org/debian/ jessie stable
|
||||||
d-i apt-setup/local0/key string https://repo.yunohost.org/yunohost.asc
|
d-i apt-setup/local0/key string http://repo.yunohost.org/debian/yunohost.asc
|
||||||
#d-i debian-installer/allow_unauthenticated string true
|
#d-i debian-installer/allow_unauthenticated string true
|
||||||
|
|
||||||
### Package selection
|
### Package selection
|
||||||
|
|
|
@ -2,7 +2,6 @@ server="ftp2.fr.debian.org"
|
||||||
debian_mirror="http://$server/debian/"
|
debian_mirror="http://$server/debian/"
|
||||||
wget_debian_mirror="ftp://$server/debian"
|
wget_debian_mirror="ftp://$server/debian"
|
||||||
profiles="default advanced"
|
profiles="default advanced"
|
||||||
dist="jessie"
|
|
||||||
mirror_components="main contrib non-free"
|
mirror_components="main contrib non-free"
|
||||||
export ARCH="amd64"
|
export ARCH="amd64"
|
||||||
export DISKINFO="YunoHost $(date --utc +%Y%m%d)"
|
export DISKINFO="YunoHost $(date --utc +%Y%m%d)"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
server="ftp.fr.debian.org"
|
server="ftp2.fr.debian.org"
|
||||||
debian_mirror="ftp://$server/debian/"
|
debian_mirror="http://$server/debian/"
|
||||||
rsync_debian_mirror="$server::debian"
|
wget_debian_mirror="ftp://$server/debian"
|
||||||
profiles="default advanced"
|
profiles="default advanced"
|
||||||
mirror_components="main contrib non-free"
|
mirror_components="main contrib non-free"
|
||||||
export ARCH="i386"
|
export ARCH="i386"
|
||||||
|
@ -8,5 +8,5 @@ export DISKINFO="YunoHost $(date --utc +%Y%m%d)"
|
||||||
export OMIT_MANUAL=1
|
export OMIT_MANUAL=1
|
||||||
export OMIT_RELEASE_NOTES=1
|
export OMIT_RELEASE_NOTES=1
|
||||||
export INSTALLER_CD=2
|
export INSTALLER_CD=2
|
||||||
export DOJIGDO=0
|
export DOJIGDO=1
|
||||||
export SPLASHPNG="`pwd`/extras/splash.png"
|
export SPLASHPNG="`pwd`/extras/splash.png"
|
||||||
|
|
Loading…
Add table
Reference in a new issue