You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.9 KiB

5 years ago
# This YAML sr.ht manifest file was generated by sxmo-alpine/partialbuild.rb
# Don't manually edit this file
---
image: alpine/3.11
shell: false
packages:
- coreutils
- procps
- py3-requests
secrets:
- bcf1e9cf-4494-40f4-a725-87088afbf3b5
- 1645c273-d954-436f-8898-11fc8cad4601
- e42bdf38-546a-4cbc-b939-53986ef6a0ef
sources:
- https://git.sr.ht/~mil/sxmo-alpine
- https://gitlab.com/postmarketOS/pmaports.git/
- https://gitlab.com/postmarketOS/pmbootstrap.git/
tasks:
- setup_binfmt: |
sudo modprobe binfmt_misc
sudo mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
- setup_pmbootstrap: "yes \"\" | ./pmbootstrap/pmbootstrap.py --aports=$PWD/pmaports
-q init \n"
- setup_builder_chroot: |
echo "
adduser -D builder
addgroup builder abuild
chgrp abuild /var/cache/distfiles
chmod g+w /var/cache/distfiles
cd /home/builder
su builder -c 'abuild-keygen -a -i'
su builder -c 'git clone --depth 1 https://git.sr.ht/~mil/sxmo-alpine'
" | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add alpine-sdk
- build_sxmo-utils: |
echo "
# Build sxmo-utils
cd /home/builder/sxmo-alpine/abuilds/sxmo-utils
su builder -c 'abuild checksum'
rm /home/builder/packages/abuilds/aarch64/APKINDEX.tar.gz
su builder -c 'abuild -r'
" | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add alpine-sdk
- upload_alpine_pkgrepo: |
echo "mkdir -p ~/.ssh" | ./pmbootstrap/pmbootstrap.py chroot -b aarch64
cat ~/.ssh/id_rsa | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 tee /root/.ssh/id_rsa --output log
echo "chmod 400 ~/.ssh/id_rsa" | ./pmbootstrap/pmbootstrap.py chroot -b aarch64
cat ~/.user_at_server | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 tee /root/.user_at_server --output log
cat ~/m@milesalan.com-5e6e8e01.rsa | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 tee /root/m@milesalan.com-5e6e8e01.rsa --output log
echo '
# Upload all new packages
rm -f /home/builder/packages/abuilds/aarch64/APKINDEX.tar.gz
rsync -e "ssh -o StrictHostKeyChecking=no" -cavh /home/builder/packages/abuilds/aarch64 $(cat /root/.user_at_server):/home/public/sxmo.lrdu.org/alpine_repository
# Pull down all the images, generate the APKINDEX.tar.gz and upload back up
mkdir current_server_state
cd current_server_state
scp -r $(cat /root/.user_at_server):/home/public/sxmo.lrdu.org/alpine_repository/aarch64 .
cd aarch64
rm -f APKINDEX.tar.gz
apk index -o $(pwd)/APKINDEX.tar.gz $(pwd)/*.apk
abuild-sign -k /root/m@milesalan.com-5e6e8e01.rsa $(pwd)/APKINDEX.tar.gz
scp APKINDEX.tar.gz $(cat /root/.user_at_server):/home/public/sxmo.lrdu.org/alpine_repository/aarch64/
# Flag the htaccess on
echo "Options +Indexes" > .htaccess
scp .htaccess $(cat /root/.user_at_server):/home/public/sxmo.lrdu.org/alpine_repository
' | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add rsync,openssh