diff options
author | Riku Voipio <riku.voipio@linaro.org> | 2017-10-17 11:02:20 +0300 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2017-10-17 11:06:24 +0300 |
commit | 2f37d8acf3f46db72c178359d8bb85c6708922df (patch) | |
tree | da23c96ab469a3d1a38502ef8d54d88ec4555771 | |
parent | 8a0626bcb0277c45c9210ba092eb8b3c98fd90ba (diff) |
rpb-debian-install: fix build and combine common parts
While fixing the debian-installer build (move apt-get update earlier),
combine common parts of staging and stable builds.
Change-Id: I3c1961a39a97bbf74e810008dd921cc6bb3ff435
-rw-r--r-- | rpb-debian-installer-staging.yaml | 70 | ||||
-rw-r--r-- | rpb-debian-installer.yaml | 68 | ||||
-rwxr-xr-x | rpb-debian-installer/builders.sh | 56 |
3 files changed, 80 insertions, 114 deletions
diff --git a/rpb-debian-installer-staging.yaml b/rpb-debian-installer-staging.yaml index c38580e9c7..74d2993c27 100644 --- a/rpb-debian-installer-staging.yaml +++ b/rpb-debian-installer-staging.yaml @@ -28,74 +28,28 @@ host: builds.96boards.org - shell: | #!/bin/bash - set -ex - - echo "deb http://obs.linaro.org/ERP/Debian_9/ ./" > local.list - echo "deb http://obs.linaro.org/ERP:/staging/Debian_9/ ./" >> local.list - sudo cp local.list /etc/apt/sources.list.d/ - - - # Find kernel abi - KERNEL_ABI=`apt-cache show linux-image-reference-arm64 | grep -m 1 Depends | sed -e "s/.*linux-image-//g" -e "s/-arm64//g"` - - # Build the installer - DEB_INSTALLER_VERSION="20170615+deb9u2" - dget https://deb.debian.org/debian/pool/main/d/debian-installer/debian-installer_${DEB_INSTALLER_VERSION}.dsc - cd debian-installer-* - sudo apt-get update -q - sudo apt-get build-dep -q --no-install-recommends -y . - ## https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810654, so lava can use grub to load grub.cfg from the local disk - sed -i 's/fshelp|//g' build/util/grub-cpmodules - - # Config changes - cd build - sed -i "s/LINUX_KERNEL_ABI.*/LINUX_KERNEL_ABI = $KERNEL_ABI/g" config/common - sed -i "s/PRESEED.*/PRESEED = default-preseed/g" config/common - sed -i "s/USE_UDEBS_FROM.*/USE_UDEBS_FROM = stretch/g" config/common - - # Local pkg-list (to include all udebs) - cat <<EOF > pkg-lists/local - ext4-modules-\${kernel:Version} - fat-modules-\${kernel:Version} - btrfs-modules-\${kernel:Version} - md-modules-\${kernel:Version} - efi-modules-\${kernel:Version} - scsi-modules-\${kernel:Version} - jfs-modules-\${kernel:Version} - xfs-modules-\${kernel:Version} - ata-modules-\${kernel:Version} - sata-modules-\${kernel:Version} - usb-storage-modules-\${kernel:Version} - linaro-erp-staging-udeb - linaro-erp-udeb + cat <<EOF >local.list + deb http://obs.linaro.org/ERP/Debian_9/ ./ + deb http://obs.linaro.org/ERP:/staging/Debian_9/ ./ EOF - # Set up local repo cat <<EOF > sources.list.udeb deb [trusted=yes] http://obs.linaro.org/ERP/Debian_9/debian-installer ./ deb [trusted=yes] http://obs.linaro.org/ERP:/staging/Debian_9/debian-installer ./ deb http://deb.debian.org/debian stretch main/debian-installer EOF - # Default preseed to add the overlay and kernel - wget -q https://git.linaro.org/ci/job/configs.git/plain/rpb-debian-installer/staging/default-preseed.cfg -O default-preseed - - fakeroot make build_netboot - cd ../.. - - cp debian-installer-*/build/dest/netboot/mini.iso . - cp debian-installer-*/build/dest/netboot/netboot.tar.gz . - - # Final preparation for publishing - mkdir out - cp -a debian-installer-*/build/default-preseed out/default-preseed.cfg - cp -a mini.iso netboot.tar.gz out/ - cd out; tar -zxvf netboot.tar.gz; cd .. - - # Create MD5SUMS file - (cd out && find -type f -exec md5sum {} \; | sed "s/ \.\// /g" > MD5SUMS.txt) + cat <<EOF > localudebs + linaro-erp-staging-udeb + linaro-erp-udeb + EOF + wget -q https://git.linaro.org/ci/job/configs.git/plain/rpb-debian-installer/staging/default-preseed.cfg -O default-preseed + - shell: + !include-raw: rpb-debian-installer/builders.sh + - shell: | + #!/bin/bash # Build information KERNEL_VERSION=`grep -a "Linux version" out/debian-installer/arm64/linux` cat > out/HEADER.textile << EOF diff --git a/rpb-debian-installer.yaml b/rpb-debian-installer.yaml index c90a6c81e1..b69b4d5b68 100644 --- a/rpb-debian-installer.yaml +++ b/rpb-debian-installer.yaml @@ -28,70 +28,26 @@ host: builds.96boards.org - shell: | #!/bin/bash - - set -ex - - echo "deb http://obs.linaro.org/ERP/Debian_9/ ./" > local.list - sudo cp local.list /etc/apt/sources.list.d/ - - # Find kernel abi - KERNEL_ABI=`apt-cache show linux-image-reference-arm64 | grep -m 1 Depends | sed -e "s/.*linux-image-//g" -e "s/-arm64//g"` - - # Build the installer - DEB_INSTALLER_VERSION="20170615+deb9u2" - dget http://ftp.us.debian.org/debian/pool/main/d/debian-installer/debian-installer_${DEB_INSTALLER_VERSION}.dsc - cd debian-installer-* - sudo apt-get update -q - sudo apt-get build-dep -q --no-install-recommends -y . - ## https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810654, so lava can use grub to load grub.cfg from the local disk - sed -i 's/fshelp|//g' build/util/grub-cpmodules - - # Config changes - cd build - sed -i "s/LINUX_KERNEL_ABI.*/LINUX_KERNEL_ABI = $KERNEL_ABI/g" config/common - sed -i "s/PRESEED.*/PRESEED = default-preseed/g" config/common - sed -i "s/USE_UDEBS_FROM.*/USE_UDEBS_FROM = stretch/g" config/common - - # Local pkg-list (to include all udebs) - cat <<EOF > pkg-lists/local - ext4-modules-\${kernel:Version} - fat-modules-\${kernel:Version} - btrfs-modules-\${kernel:Version} - md-modules-\${kernel:Version} - efi-modules-\${kernel:Version} - scsi-modules-\${kernel:Version} - jfs-modules-\${kernel:Version} - xfs-modules-\${kernel:Version} - ata-modules-\${kernel:Version} - sata-modules-\${kernel:Version} - usb-storage-modules-\${kernel:Version} - linaro-erp-udeb + set -e + cat <<EOF >local.list + deb http://obs.linaro.org/ERP/Debian_9/ ./ EOF - # Set up local repo cat <<EOF > sources.list.udeb deb [trusted=yes] http://obs.linaro.org/ERP/Debian_9/debian-installer ./ deb http://deb.debian.org/debian stretch main/debian-installer EOF - # Default preseed to add the overlay and kernel - wget -q https://git.linaro.org/ci/job/configs.git/plain/rpb-debian-installer/stable/default-preseed.cfg -O default-preseed - - fakeroot make build_netboot - cd ../.. - - cp debian-installer-*/build/dest/netboot/mini.iso . - cp debian-installer-*/build/dest/netboot/netboot.tar.gz . - - # Final preparation for publishing - mkdir out - cp -a debian-installer-*/build/default-preseed out/default-preseed.cfg - cp -a mini.iso netboot.tar.gz out/ - cd out; tar -zxvf netboot.tar.gz; cd .. - - # Create MD5SUMS file - (cd out && find -type f -exec md5sum {} \; | sed "s/ \.\// /g" > MD5SUMS.txt) + cat <<EOF > localudebs + linaro-erp-udeb + EOF + wget -q https://git.linaro.org/ci/job/configs.git/plain/rpb-debian-installer/stable/default-preseed.cfg -O default-preseed + - shell: + !include-raw: rpb-debian-installer/builders.sh + - shell: | + #!/bin/bash + set -e # Build information KERNEL_VERSION=`grep -a "Linux version" out/debian-installer/arm64/linux` cat > out/HEADER.textile << EOF diff --git a/rpb-debian-installer/builders.sh b/rpb-debian-installer/builders.sh new file mode 100755 index 0000000000..be157c4fa8 --- /dev/null +++ b/rpb-debian-installer/builders.sh @@ -0,0 +1,56 @@ +#!/bin/bash +set -ex + +sudo cp local.list /etc/apt/sources.list.d/ +sudo apt-get update -q + +# Find kernel abi +KERNEL_ABI=`apt-cache show linux-image-reference-arm64 | grep -m 1 Depends | sed -e "s/.*linux-image-//g" -e "s/-arm64//g"` + +# Build the installer +DEB_INSTALLER_VERSION="20170615+deb9u2" +dget https://deb.debian.org/debian/pool/main/d/debian-installer/debian-installer_${DEB_INSTALLER_VERSION}.dsc +cd debian-installer-* +sudo apt-get build-dep -q --no-install-recommends -y . +## https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810654, so lava can use grub to load grub.cfg from the local disk +sed -i 's/fshelp|//g' build/util/grub-cpmodules + +# Config changes +cd build +cp ../../sources.list.udeb . +sed -i "s/LINUX_KERNEL_ABI.*/LINUX_KERNEL_ABI = $KERNEL_ABI/g" config/common +sed -i "s/PRESEED.*/PRESEED = default-preseed/g" config/common +sed -i "s/USE_UDEBS_FROM.*/USE_UDEBS_FROM = stretch/g" config/common + +# Local pkg-list (to include all udebs) +cat <<EOF > pkg-lists/local +ext4-modules-\${kernel:Version} +fat-modules-\${kernel:Version} +btrfs-modules-\${kernel:Version} +md-modules-\${kernel:Version} +efi-modules-\${kernel:Version} +scsi-modules-\${kernel:Version} +jfs-modules-\${kernel:Version} +xfs-modules-\${kernel:Version} +ata-modules-\${kernel:Version} +sata-modules-\${kernel:Version} +usb-storage-modules-\${kernel:Version} +EOF +cat ../../localudebs >> pkg-lists/local +cp ../../default-preseed . + +fakeroot make build_netboot +cd ../.. + +cp debian-installer-*/build/dest/netboot/mini.iso . +cp debian-installer-*/build/dest/netboot/netboot.tar.gz . + +# Final preparation for publishing +mkdir out +cp -a debian-installer-*/build/default-preseed out/default-preseed.cfg +cp -a mini.iso netboot.tar.gz out/ +cd out; tar -zxvf netboot.tar.gz; cd .. + +# Create MD5SUMS file +(cd out && find -type f -exec md5sum {} \; | sed "s/ \.\// /g" > MD5SUMS.txt) + |