Skip to content

Commit

Permalink
fix(build): Updated download paths
Browse files Browse the repository at this point in the history
* To match with Raspberry Pi OS (Legacy)
* See https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-legacy

Signed-off-by: Stephan Wendel <me@stephanwe.de>
  • Loading branch information
KwadFan committed Dec 21, 2021
1 parent fecdf40 commit a94a276
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/BuildRaspiOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- '**'
tags-ignore:
tags-ignore:
- '**'
pull_request:
types: [ opened, edited ]
Expand All @@ -14,14 +14,14 @@ jobs:

steps:
- name: Install Dependencies
run: sudo apt update; sudo apt install coreutils p7zip-full qemu-user-static zip
run: sudo apt update; sudo apt install coreutils p7zip-full qemu-user-static zip

- name: Checkout CustomPiOS
uses: actions/checkout@v2
with:
repository: 'guysoft/CustomPiOS'
path: CustomPiOS

- name: Checkout MainsailOS Project
uses: actions/checkout@v2
with:
Expand All @@ -30,8 +30,8 @@ jobs:
submodules: true

- name: Download Raspberry Pi OS Source Image
run: aria2c -d repository/src/image/ --seed-time=0 https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-03-25/2021-03-04-raspios-buster-armhf-lite.zip.torrent
run: aria2c -d repository/src/image/ --seed-time=0 https://downloads.raspberrypi.org/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2021-12-02/2021-12-02-raspios-buster-armhf-lite.zip.torrent

- name: Update CustomPiOS Paths
run: cd repository/src && ../../CustomPiOS/src/update-custompios-paths

Expand All @@ -40,7 +40,7 @@ jobs:

- name: Copy output image
run: cp ${{ github.workspace }}/repository/src/workspace/*-raspios-*-lite.img mainsailos-raspios-lite-latest.img

- name: Compress the image
run: zip mainsailos-raspios-lite-latest.zip mainsailos-raspios-lite-latest.img

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ReleaseRaspiOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
repository: 'guysoft/CustomPiOS'
path: CustomPiOS

- name: Checkout MainsailOS Project
uses: actions/checkout@v2
with:
Expand All @@ -25,8 +25,8 @@ jobs:
submodules: true

- name: Download Raspberry Pi OS Source Image
run: aria2c -d repository/src/image/ --seed-time=0 https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-03-25/2021-03-04-raspios-buster-armhf-lite.zip.torrent
run: aria2c -d repository/src/image/ --seed-time=0 https://downloads.raspberrypi.org/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2021-12-02/2021-12-02-raspios-buster-armhf-lite.zip.torrent

- name: Update CustomPiOS Paths
run: cd repository/src && ../../CustomPiOS/src/update-custompios-paths

Expand All @@ -35,13 +35,13 @@ jobs:

- name: Copy output image
run: cp ${{ github.workspace }}/repository/src/workspace/*-raspios-*-lite.img MainsailOS-buster-lite-${{ github.event.release.tag_name }}.img

- name: Compress the image
run: zip MainsailOS-buster-lite-${{ github.event.release.tag_name }}.zip MainsailOS-buster-lite-${{ github.event.release.tag_name }}.img

- name: Generate sha256 Checksum
run: sha256sum MainsailOS-buster-lite-${{ github.event.release.tag_name }}.zip > MainsailOS-buster-lite-${{ github.event.release.tag_name }}.zip.sha256

- uses: actions/upload-artifact@v2
with:
name: MainsailOS-buster-lite-${{ github.event.release.tag_name }}.zip
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ build: verifyimage
docker-compose down

verifyimage:
@if [ ! -f "src/image/2021-03-04-raspios-buster-armhf-lite.zip" ]; \
@if [ ! -f "src/image/2021-12-02-raspios-buster-armhf-lite.zip" ]; \
then echo "Raspberry Pi OS image does not exist. Starting Download..."; \
curl -J -L https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-03-25/2021-03-04-raspios-buster-armhf-lite.zip > src/image/2021-03-04-raspios-buster-armhf-lite.zip; else \
curl -J -L https://downloads.raspberrypi.org/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2021-12-02/2021-12-02-raspios-buster-armhf-lite.zip > src/image/2021-12-02-raspios-buster-armhf-lite.zip; else \
echo "Raspberry Pi OS image found. Starting checksum verification"; \
curl -J -L https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-03-25/2021-03-04-raspios-buster-armhf-lite.zip.sha1 > src/image/2021-03-04-raspios-buster-armhf-lite.zip.sha1; \
IMAGE_SHA1=`sha1sum src/image/2021-03-04-raspios-buster-armhf-lite.zip | awk '{print $$1}'`; \
DL_SHA1=`awk '{print $$1}' src/image/2021-03-04-raspios-buster-armhf-lite.zip.sha1`; \
if [ "$$IMAGE_SHA1" != "$$DL_SHA1" ]; then echo "SHAs do not match."; \
echo "Got $$IMAGE_SHA1"; echo "Expected $$DL_SHA1"; \
echo "Starting Raspberry Pi OS Image download"; \
curl -J -L https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-03-25/2021-03-04-raspios-buster-armhf-lite.zip > src/image/2021-03-04-raspios-buster-armhf-lite.zip; else echo "SHAs Matched"; fi; fi
curl -J -L https://downloads.raspberrypi.org/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2021-12-02/2021-12-02-raspios-buster-armhf-lite.zip.sha256 > src/image/2021-12-02-raspios-buster-armhf-lite.zip.sha256; \
IMAGE_SHA1=`sha256sum src/image/2021-12-02-raspios-buster-armhf-lite.zip | awk '{print $$1}'`; \
DL_SHA1=`awk '{print $$1}' src/image/2021-12-02-raspios-buster-armhf-lite.zip.sha256`; \
if [ "$$IMAGE_SHA256" != "$$DL_SHA256" ]; then echo "SHAs do not match."; \
echo "Got $$IMAGE_SHA256"; echo "Expected $$DL_SHA256"; \
echo "SHA256 Sums dont match! Aborting"; \
exit 1; else echo "SHA256 Sums matched! Continue..."; fi; fi

clean:
rm -rf src/workspace
Expand Down
1 change: 0 additions & 1 deletion src/image/2021-03-04-raspios-buster-armhf-lite.zip.sha1

This file was deleted.

1 change: 1 addition & 0 deletions src/image/2021-12-02-raspios-buster-armhf-lite.zip.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9276d71a4793accb4e29ad337f58865fcb92f831716305fc93adf0adb4784129 2021-12-02-raspios-buster-armhf-lite.zip

0 comments on commit a94a276

Please sign in to comment.