~mil/sxmo-alpine

9c22e12e00cb5306cfc80ed6f7f26b38e0a2cbbd — Miles Alan 1 year, 12 days ago d1402c4 master
Remove .build.yml and add deprecation notice
3 files changed, 3 insertions(+), 157 deletions(-)

D .build.yml
M README.md
D m@milesalan.com-5e6e8e01.rsa.pub
D .build.yml => .build.yml +0 -145
@@ 1,145 0,0 @@
image: alpine/3.12
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   

  - setup_builder_chroot: |
      # Setup for building packages
      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

      # Setup for siging packages & upload at end
      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
      cat /home/build/sxmo-alpine/m@milesalan.com-5e6e8e01.rsa.pub | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 tee /etc/apk/keys/m@milesalan.com-5e6e8e01.rsa.pub --output log

  - build_lisgd: |
      echo "
        # Build lisgd
        cd /home/builder/sxmo-alpine/abuilds/lisgd
        rm /home/builder/packages/abuilds/aarch64/APKINDEX.tar.gz
        su builder -c 'abuild -r'
      " | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add alpine-sdk

  - build_sxmo-st: |
      echo "
        # Build sxmo-st
        cd /home/builder/sxmo-alpine/abuilds/sxmo-st
        rm /home/builder/packages/abuilds/aarch64/APKINDEX.tar.gz
        su builder -c 'abuild -r'
      " | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add alpine-sdk

  - build_sxmo-dwm: |
      echo "
        # Build sxmo-dwm
        cd /home/builder/sxmo-alpine/abuilds/sxmo-dwm
        rm /home/builder/packages/abuilds/aarch64/APKINDEX.tar.gz
        su builder -c 'abuild -r'
      " | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add alpine-sdk

  - build_sxmo-svkbd: |
      echo "
        # Build sxmo-svkbd
        cd /home/builder/sxmo-alpine/abuilds/sxmo-svkbd
        rm /home/builder/packages/abuilds/aarch64/APKINDEX.tar.gz
        su builder -c 'abuild -r'
      " | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add alpine-sdk

  - build_sxmo-dmenu: |
      echo "
        # Build sxmo-dmenu
        cd /home/builder/sxmo-alpine/abuilds/sxmo-dmenu
        rm /home/builder/packages/abuilds/aarch64/APKINDEX.tar.gz
        su builder -c 'abuild -r'
      " | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add alpine-sdk

  - build_sxmo-surf: |
      echo "
        # Build sxmo-surf
        cd /home/builder/sxmo-alpine/abuilds/sxmo-surf
        rm /home/builder/packages/abuilds/aarch64/APKINDEX.tar.gz
        su builder -c 'abuild -r'
      " | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add alpine-sdk


  - build_sxmo-xdm: |
      echo "
        # Build sxmo-xdm
        cd /home/builder/sxmo-alpine/abuilds/sxmo-xdm
        rm /home/builder/packages/abuilds/aarch64/APKINDEX.tar.gz
        su builder -c 'abuild -r'
      " | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add alpine-sdk

  - build_sxmo-utils: |
      echo "
        # Build sxmo-utils
        cd /home/builder/sxmo-alpine/abuilds/sxmo-utils
        rm /home/builder/packages/abuilds/aarch64/APKINDEX.tar.gz
        su builder -c 'abuild -r'
      " | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add alpine-sdk

  - build_sxmo-ui: |
      echo '
        # Build sxmo-ui
        cd /home/builder/sxmo-alpine/abuilds/sxmo-ui
        rm /home/builder/packages/abuilds/aarch64/APKINDEX.tar.gz

        # Add existing pkgs
        echo /home/builder/packages/abuilds >> /etc/apk/repositories
        cd /home/builder/packages/abuilds/aarch64
        apk index -o $(pwd)/APKINDEX.tar.gz $(pwd)/*.apk
        abuild-sign -k /root/m@milesalan.com-5e6e8e01.rsa $(pwd)/APKINDEX.tar.gz
        apk update

        cd /home/builder/sxmo-alpine/abuilds/sxmo-ui
        su builder -c "abuild -r"
      ' | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add alpine-sdk


  - upload_alpine_pkgrepo: |
      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/master

        # 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/master/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/master/aarch64/

        # Flag the htaccess on
        echo "Options +Indexes" > .htaccess
        scp .htaccess $(cat /root/.user_at_server):/home/public/sxmo.lrdu.org/alpine_repository/master
      ' | ./pmbootstrap/pmbootstrap.py chroot -b aarch64 --add rsync,openssh

M README.md => README.md +3 -3
@@ 2,9 2,9 @@

[![builds.sr.ht status](https://builds.sr.ht/~mil/sxmo-alpine.svg)](https://builds.sr.ht/~mil/sxmo-alpine?)

Alpine APKBUILDs and CI to produce:
[https://sxmo.lrdu.org/alpine_repository]()

**Deprecation notice**:
This repository has been deprecated as Sxmo's APKBUILD have been merged into
pmOS. See: [https://gitlab.com/postmarketOS/pmaports/-/tree/master/sxmo](pmaports)

## Development Guide
The Makefile has a bunch of tasks that let you build and deploy packages

D m@milesalan.com-5e6e8e01.rsa.pub => m@milesalan.com-5e6e8e01.rsa.pub +0 -9
@@ 1,9 0,0 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5YUDyzf1vtEw+GAw/N1V
wS0rMZ1CS7Gub/KMohNi01FEfdm/fRbr8OMmexpArkggjbgbXHfELCCvgz15Flav
Fl9CybKX+dUVpl/iWm3auTQD+0cB9mQVTwrbPW5HC5lcf9Fga0aw0mebTrtjnReU
X5tL5svbl+mA3clkYSFzDiEPlfSACVm4Hq/VnqVLXNvNJUJPnVHrUQM8zNsAOZqA
VikOpS5sbNB4pHHtr12F8DQs0UqAkBbbHj4x6rmqflultUXNmY4c2XQF9l3H6UYM
4iMm3DgOrTpCkolbwBnge0/xYXrAE2A6BR9aYNLyWGZdsfjDJ96nUsBu6vC8jzc4
EQIDAQAB
-----END PUBLIC KEY-----