From edb8ebf0af13f66f5a6a9d6425ddd5fccc3762ef Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Sun, 28 Apr 2024 16:42:45 +0530 Subject: [PATCH 01/53] Trying out actions --- .github/workflows/deploy.yml | 45 ++++++++++++++++++++++++++++++++++++ .gitignore | 5 ++-- build.sh | 1 + 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..d0b800de9 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,45 @@ +name: Release ISO + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + container: + image: docker://archlinux + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up mkarchiso + run: | + pacman -Sy archiso --noconfirm + + - name: Build ISO + id: build_iso + run: | + ISO_NAME=$(./build.sh) + echo "::set-output name=iso_name::$ISO_NAME" + + - name: Upload ISO as artifact + uses: actions/upload-artifact@v2 + with: + name: StratOS-iso + path: output/StratOS-*.iso + + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.sha }} + release_name: ${{ steps.build_iso.outputs.iso_name }} + body: | + Release of the ISO. + draft: false + prerelease: false diff --git a/.gitignore b/.gitignore index 67a05717b..4eba6e0c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -output/ -output.bak/ +output/* +!output/StratOS-*.iso +output.bak/ \ No newline at end of file diff --git a/build.sh b/build.sh index 12c044c98..6a18cf6ed 100755 --- a/build.sh +++ b/build.sh @@ -7,3 +7,4 @@ sudo mkarchiso -v \ -w output \ -o output \ ./ +echo output/*.iso | awk -F/ '{print $NF}' \ No newline at end of file From 7d074c9ff79f931f2e471933571367165eec5898 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Sun, 28 Apr 2024 16:45:36 +0530 Subject: [PATCH 02/53] Install sudo --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d0b800de9..2b84a7556 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,7 +17,7 @@ jobs: - name: Set up mkarchiso run: | - pacman -Sy archiso --noconfirm + pacman -Sy sudo archiso --noconfirm - name: Build ISO id: build_iso From 47641fd71c3c53a5c4aa1184fa6cf6f5b2e190ca Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Sun, 28 Apr 2024 18:08:20 +0530 Subject: [PATCH 03/53] Trial --- .github/workflows/deploy.yml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2b84a7556..278066a6f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,12 +1,12 @@ name: Release ISO on: - push: + push: branches: - main jobs: - build: + build: runs-on: ubuntu-latest container: image: docker://archlinux @@ -23,23 +23,31 @@ jobs: id: build_iso run: | ISO_NAME=$(./build.sh) - echo "::set-output name=iso_name::$ISO_NAME" + echo "ISO_NAME=$ISO_NAME" >> $GITHUB_ENV - name: Upload ISO as artifact uses: actions/upload-artifact@v2 with: - name: StratOS-iso - path: output/StratOS-*.iso + name: ${{ env.ISO_NAME }} + path: output/${{ env.ISO_NAME }} - - name: Create release + - name: Create Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.sha }} - release_name: ${{ steps.build_iso.outputs.iso_name }} - body: | - Release of the ISO. + tag_name: ${{ github.ref }} + release_name: Release ${{ env.ISO_NAME }} draft: false prerelease: false + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: output/${{ env.ISO_NAME }} + asset_name: ${{ env.ISO_NAME }} + asset_content_type: application/octet-stream From 31936e5a7d9f2bc5d54cb680696433c1429011a1 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Sun, 28 Apr 2024 18:13:47 +0530 Subject: [PATCH 04/53] Trial --- .github/workflows/deploy.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 278066a6f..3043a4868 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,17 +12,16 @@ jobs: image: docker://archlinux steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up mkarchiso - run: | - pacman -Sy sudo archiso --noconfirm + - name: Checkout repository using git + # uses: actions/checkout@v2 + run: | + pacman -Sy git sudo archiso --noconfirm + git clone --depth 1 $GITHUB_WORKSPACE - name: Build ISO id: build_iso run: | - ISO_NAME=$(./build.sh) + ISO_NAME=$(sudo ./build.sh) # admin perms required to mount /proc echo "ISO_NAME=$ISO_NAME" >> $GITHUB_ENV - name: Upload ISO as artifact From 8bcf8d6de51a59ae8dfb3ae54f5a3ffab907c72a Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Sun, 28 Apr 2024 18:16:06 +0530 Subject: [PATCH 05/53] Test --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3043a4868..a68dabb93 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: # uses: actions/checkout@v2 run: | pacman -Sy git sudo archiso --noconfirm - git clone --depth 1 $GITHUB_WORKSPACE + git clone --recurse-submodules https://github.com/zstg/StratOS-iso.git - name: Build ISO id: build_iso From eea67056ac0a11a97462c33062db0d2d10fbe66c Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Sun, 28 Apr 2024 18:17:42 +0530 Subject: [PATCH 06/53] Modify subdmodules --- .gitmodules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 15882d3a6..f378137ef 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,12 @@ [submodule "airootfs/usr/share/backgrounds/StratOS"] path = airootfs/usr/share/backgrounds/StratOS - url = https://github.com/lugvitc/StratOS-wallpapers + url = https://github.com/StratOS-Linux/StratOS-wallpapers [submodule "airootfs/opt/maneki-neko"] path = airootfs/opt/maneki-neko - url = https://github.com/zstg/stratOS-maneki-neko + url = https://github.com/StratOS-Linux/stratOS-maneki-neko [submodule "airootfs/etc/calamares"] path = airootfs/etc/calamares - url = https://github.com/zstg/StratOS-calamares + url = https://github.com/StratOS-Linux/StratOS-calamares [submodule "airootfs/etc/skel/.config/nvim"] path = airootfs/etc/skel/.config/nvim url = https://github.com/StratOS-Linux/StratVIM.git From 411257347f7508c42f806604dfe07838765fefef Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Sun, 28 Apr 2024 18:19:06 +0530 Subject: [PATCH 07/53] fix submodules --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index f378137ef..a2e658e83 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = https://github.com/StratOS-Linux/stratOS-maneki-neko [submodule "airootfs/etc/calamares"] path = airootfs/etc/calamares - url = https://github.com/StratOS-Linux/StratOS-calamares + url = https://github.com/StratOS-Linux/StratOS-calamares-settings [submodule "airootfs/etc/skel/.config/nvim"] path = airootfs/etc/skel/.config/nvim url = https://github.com/StratOS-Linux/StratVIM.git From 23aa3ea3fb3a2dbf269297d08482060e7904a3f6 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Sun, 28 Apr 2024 18:35:42 +0530 Subject: [PATCH 08/53] Test --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a68dabb93..5dda2e3ff 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: # uses: actions/checkout@v2 run: | pacman -Sy git sudo archiso --noconfirm - git clone --recurse-submodules https://github.com/zstg/StratOS-iso.git + git clone --recurse-submodules https://github.com/zstg/StratOS-iso - name: Build ISO id: build_iso From 4d1a93c692ae8e9cdf136f2743ff1626085a9d46 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 07:44:26 +0530 Subject: [PATCH 09/53] Test Action --- .github/workflows/deploy.yml | 73 +++++++++++++----------------------- 1 file changed, 27 insertions(+), 46 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5dda2e3ff..f3150f9c5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,52 +1,33 @@ name: Release ISO on: - push: + push: branches: - main + + jobs: + build: + runs-on: ubuntu-latest + container: + image: docker://archlinux + + steps: + - name: Checkout repository using git + # uses: actions/checkout@v2 + run: | + pacman -Sy git sudo archiso --noconfirm + git clone --recurse-submodules https://github.com/zstg/StratOS-iso + + - name: Build ISO + id: build_iso + run: | + export BUILD_DATE=$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d) + sudo ./build.sh # admin perms required to mount /proc + echo "::set-output name=date::${BUILD_DATE}" -jobs: - build: - runs-on: ubuntu-latest - container: - image: docker://archlinux - - steps: - - name: Checkout repository using git - # uses: actions/checkout@v2 - run: | - pacman -Sy git sudo archiso --noconfirm - git clone --recurse-submodules https://github.com/zstg/StratOS-iso - - - name: Build ISO - id: build_iso - run: | - ISO_NAME=$(sudo ./build.sh) # admin perms required to mount /proc - echo "ISO_NAME=$ISO_NAME" >> $GITHUB_ENV - - - name: Upload ISO as artifact - uses: actions/upload-artifact@v2 - with: - name: ${{ env.ISO_NAME }} - path: output/${{ env.ISO_NAME }} - - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ env.ISO_NAME }} - draft: false - prerelease: false - - - name: Upload Release Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: output/${{ env.ISO_NAME }} - asset_name: ${{ env.ISO_NAME }} - asset_content_type: application/octet-stream + - name: Upload + uses: ncipollo/release-action@v1 + with: + artifacts: "output/*.iso" + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.build.outputs.date }} \ No newline at end of file From aa2086e2f68f7b8398540bf3136c7971b6ee05c0 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 07:46:08 +0530 Subject: [PATCH 10/53] Test Action --- .github/workflows/deploy.yml | 45 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f3150f9c5..8af3a957d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,29 +5,28 @@ on: branches: - main - jobs: - build: - runs-on: ubuntu-latest - container: - image: docker://archlinux +jobs: + build: + runs-on: ubuntu-latest + container: + image: docker://archlinux - steps: - - name: Checkout repository using git - # uses: actions/checkout@v2 - run: | - pacman -Sy git sudo archiso --noconfirm - git clone --recurse-submodules https://github.com/zstg/StratOS-iso + steps: + - name: Checkout repository using git + run: | + pacman -Sy git sudo archiso --noconfirm + git clone --recurse-submodules https://github.com/zstg/StratOS-iso - - name: Build ISO - id: build_iso - run: | - export BUILD_DATE=$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d) - sudo ./build.sh # admin perms required to mount /proc - echo "::set-output name=date::${BUILD_DATE}" + - name: Build ISO + id: build_iso + run: | + export BUILD_DATE=$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d) + sudo ./build.sh # admin perms required to mount /proc + echo "::set-output name=date::${BUILD_DATE}" - - name: Upload - uses: ncipollo/release-action@v1 - with: - artifacts: "output/*.iso" - token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ steps.build.outputs.date }} \ No newline at end of file + - name: Upload + uses: ncipollo/release-action@v1 + with: + artifacts: "output/*.iso" + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.build.outputs.date }} From 9a183910ae2cdcd37614f45cc370b3e2ecab7324 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 07:47:25 +0530 Subject: [PATCH 11/53] Maneki not working? --- .gitmodules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index a2e658e83..dffa7dd9c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "airootfs/usr/share/backgrounds/StratOS"] path = airootfs/usr/share/backgrounds/StratOS url = https://github.com/StratOS-Linux/StratOS-wallpapers -[submodule "airootfs/opt/maneki-neko"] - path = airootfs/opt/maneki-neko - url = https://github.com/StratOS-Linux/stratOS-maneki-neko +# [submodule "airootfs/opt/maneki-neko"] +# path = airootfs/opt/maneki-neko +# url = https://github.com/StratOS-Linux/stratOS-maneki-neko [submodule "airootfs/etc/calamares"] path = airootfs/etc/calamares url = https://github.com/StratOS-Linux/StratOS-calamares-settings From 985b8a60e443f06948c5b61785aee2d7970c4362 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 07:48:19 +0530 Subject: [PATCH 12/53] Test action --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8af3a957d..4ab808ef9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,7 +21,7 @@ jobs: id: build_iso run: | export BUILD_DATE=$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d) - sudo ./build.sh # admin perms required to mount /proc + sudo bash ./build.sh # admin perms required to mount /proc echo "::set-output name=date::${BUILD_DATE}" - name: Upload From 1226ce3049b1bfffc0888f13d1c7bfd965edea35 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 07:50:59 +0530 Subject: [PATCH 13/53] Test Action --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4ab808ef9..8832a5d05 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,6 +21,7 @@ jobs: id: build_iso run: | export BUILD_DATE=$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d) + sudo chmod +x ./build.sh sudo bash ./build.sh # admin perms required to mount /proc echo "::set-output name=date::${BUILD_DATE}" From 8d0e85faa0ee5ccc64e7ec7a43c730aa6f8c20e9 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 07:53:26 +0530 Subject: [PATCH 14/53] test --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8832a5d05..f322e05fa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,6 +20,8 @@ jobs: - name: Build ISO id: build_iso run: | + pwd + cd StratOS-iso export BUILD_DATE=$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d) sudo chmod +x ./build.sh sudo bash ./build.sh # admin perms required to mount /proc From 0778d26fa0ebadfa4d76a0a143e2d63588fa0c60 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 07:56:21 +0530 Subject: [PATCH 15/53] test --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f322e05fa..86f5f17db 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,9 +20,9 @@ jobs: - name: Build ISO id: build_iso run: | - pwd cd StratOS-iso export BUILD_DATE=$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d) + sudo mount -t proc proc /__w/StratOS-iso/StratOS-iso/StratOS-iso/output/x86_64/airootfs/proc sudo chmod +x ./build.sh sudo bash ./build.sh # admin perms required to mount /proc echo "::set-output name=date::${BUILD_DATE}" From 842f65712c733766d951405ff3fb02149d02a22f Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 08:18:20 +0530 Subject: [PATCH 16/53] test without archlinux container --- .github/workflows/deploy.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 86f5f17db..d7f5483ac 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,10 +8,11 @@ on: jobs: build: runs-on: ubuntu-latest - container: - image: docker://archlinux - steps: + - uses: actions/checkout@v1 + - name: Install Archlinux + run: curl -L https://github.com/zaoqi/github-actions-archlinux/raw/master/install.sh | sh + - name: Checkout repository using git run: | pacman -Sy git sudo archiso --noconfirm From a7f3ed1deedd2d07d92f7c807ca4f3c31d0299a7 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 08:22:20 +0530 Subject: [PATCH 17/53] test --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d7f5483ac..80a7ebee1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout repository using git run: | - pacman -Sy git sudo archiso --noconfirm + sudo pacman -Sy git sudo archiso --noconfirm git clone --recurse-submodules https://github.com/zstg/StratOS-iso - name: Build ISO From 853c6f7b3b4d995a25b7fef31d55dc54f97258f6 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 08:35:04 +0530 Subject: [PATCH 18/53] Test --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 80a7ebee1..b2bcd340e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Install Archlinux - run: curl -L https://github.com/zaoqi/github-actions-archlinux/raw/master/install.sh | sh + run: curl -L https://raw.githubusercontent.com/zstg/github-actions-archlinux/master/install.sh | sh - name: Checkout repository using git run: | From 02c053ff238068a05f89062c34d2f24d382b9101 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 08:39:41 +0530 Subject: [PATCH 19/53] Test --- .github/workflows/deploy.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b2bcd340e..110387533 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,11 +11,14 @@ jobs: steps: - uses: actions/checkout@v1 - name: Install Archlinux - run: curl -L https://raw.githubusercontent.com/zstg/github-actions-archlinux/master/install.sh | sh + run: | + # sudo apt -y update + # sudo apt install sudo + curl -L https://raw.githubusercontent.com/zstg/github-actions-archlinux/master/install.sh | sh - name: Checkout repository using git run: | - sudo pacman -Sy git sudo archiso --noconfirm + pacman -Sy git sudo archiso --noconfirm git clone --recurse-submodules https://github.com/zstg/StratOS-iso - name: Build ISO From 0551806caa8f868faa5ecc6475e12f8b150b439d Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 08:48:18 +0530 Subject: [PATCH 20/53] Test --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 110387533..f5f6f038b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ jobs: run: | # sudo apt -y update # sudo apt install sudo - curl -L https://raw.githubusercontent.com/zstg/github-actions-archlinux/master/install.sh | sh + curl -L https://raw.githubusercontent.com/zstg/github-actions-archlinux/master/install.sh | sudo bash - name: Checkout repository using git run: | From 2b4656ea6e969d195db7d73b3f6c679eae4f798b Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 08:54:14 +0530 Subject: [PATCH 21/53] Test --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f5f6f038b..13d4d49be 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout repository using git run: | - pacman -Sy git sudo archiso --noconfirm + # pacman -Sy git sudo archiso --noconfirm git clone --recurse-submodules https://github.com/zstg/StratOS-iso - name: Build ISO From 0fd5eb2309d922510203d9c0b4cdcc49ee7d33b0 Mon Sep 17 00:00:00 2001 From: ZeStig <69384921+zstg@users.noreply.github.com> Date: Wed, 1 May 2024 09:07:59 +0530 Subject: [PATCH 22/53] Test --- .github/workflows/deploy.yml | 20 +- .github/workflows/deploy_yml_bak | 39 + mkarchiso | 2131 ++++++++++++++++++++++++++++++ 3 files changed, 2179 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/deploy_yml_bak create mode 100644 mkarchiso diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 13d4d49be..71fc709c7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,17 +8,13 @@ on: jobs: build: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Install Archlinux - run: | - # sudo apt -y update - # sudo apt install sudo - curl -L https://raw.githubusercontent.com/zstg/github-actions-archlinux/master/install.sh | sudo bash + container: + image: docker://archlinux + steps: - name: Checkout repository using git run: | - # pacman -Sy git sudo archiso --noconfirm + pacman -Sy git sudo archiso --noconfirm git clone --recurse-submodules https://github.com/zstg/StratOS-iso - name: Build ISO @@ -26,14 +22,16 @@ jobs: run: | cd StratOS-iso export BUILD_DATE=$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d) - sudo mount -t proc proc /__w/StratOS-iso/StratOS-iso/StratOS-iso/output/x86_64/airootfs/proc + sudo mount --mkdir -t proc /proc /__w/StratOS-iso/StratOS-iso/StratOS-iso/output/x86_64/airootfs/proc + sudo mount --mkdir -t sysfs /sys /__w/StratOS-iso/StratOS-iso/StratOS-iso/output/x86_64/airootfs/sys + sudo mount --mkdir --rbind /dev /__w/StratOS-iso/StratOS-iso/StratOS-iso/output/x86_64/airootfs/dev + sudo mount --rbind /run /__w/StratOS-iso/StratOS-iso/StratOS-iso/output/x86_64/airootfs/run sudo chmod +x ./build.sh sudo bash ./build.sh # admin perms required to mount /proc echo "::set-output name=date::${BUILD_DATE}" - - name: Upload uses: ncipollo/release-action@v1 with: artifacts: "output/*.iso" token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ steps.build.outputs.date }} + tag: ${{ steps.build.outputs.date }} \ No newline at end of file diff --git a/.github/workflows/deploy_yml_bak b/.github/workflows/deploy_yml_bak new file mode 100644 index 000000000..a73d2ceaf --- /dev/null +++ b/.github/workflows/deploy_yml_bak @@ -0,0 +1,39 @@ +name: Release ISO + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install Archlinux + run: | + # sudo apt -y update + # sudo apt install sudo + curl -L https://raw.githubusercontent.com/zstg/github-actions-archlinux/master/install.sh | sudo bash + + - name: Checkout repository using git + run: | + # pacman -Sy git sudo archiso --noconfirm + git clone --recurse-submodules https://github.com/zstg/StratOS-iso + + - name: Build ISO + id: build_iso + run: | + cd StratOS-iso + export BUILD_DATE=$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d) + # sudo mount -t proc proc /__w/StratOS-iso/StratOS-iso/StratOS-iso/output/x86_64/airootfs/proc + # sudo chmod +x ./build.sh + su -c 'chmod +x ./build.sh && bash ./build.sh' # admin perms required to mount /proc + echo "::set-output name=date::${BUILD_DATE}" + + - name: Upload + uses: ncipollo/release-action@v1 + with: + artifacts: "output/*.iso" + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.build.outputs.date }} diff --git a/mkarchiso b/mkarchiso new file mode 100644 index 000000000..2a8c02f50 --- /dev/null +++ b/mkarchiso @@ -0,0 +1,2131 @@ +#!/usr/bin/env bash +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -e -u +shopt -s extglob + +# Control the environment +umask 0022 +export LC_ALL="C.UTF-8" +[[ -v SOURCE_DATE_EPOCH ]] || printf -v SOURCE_DATE_EPOCH '%(%s)T' -1 +export SOURCE_DATE_EPOCH + +# Set application name from the script's file name +app_name="${0##*/}" + +# Define global variables. All of them will be overwritten later +pkg_list=() +bootstrap_pkg_list=() +quiet="" +work_dir="" +out_dir="" +gpg_key="" +gpg_sender="" +iso_name="" +iso_label="" +iso_uuid="" +iso_publisher="" +iso_application="" +iso_version="" +install_dir="" +arch="" +pacman_conf="" +packages="" +bootstrap_packages="" +pacstrap_dir="" +search_filename="" +declare -i rm_work_dir=0 +buildmodes=() +bootmodes=() +airootfs_image_type="" +airootfs_image_tool_options=() +bootstrap_tarball_compression="" +cert_list=() +declare -A file_permissions=() +efibootimg="" +efiboot_files=() +# adapted from GRUB_EARLY_INITRD_LINUX_STOCK in https://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-mkconfig.in +readonly ucodes=('intel-uc.img' 'intel-ucode.img' 'amd-uc.img' 'amd-ucode.img' 'early_ucode.cpio' 'microcode.cpio') +declare -i need_external_ucodes=0 + + +# Show an INFO message +# $1: message string +_msg_info() { + local _msg="${1}" + [[ "${quiet}" == "y" ]] || printf '[%s] INFO: %s\n' "${app_name}" "${_msg}" +} + +# Show a WARNING message +# $1: message string +_msg_warning() { + local _msg="${1}" + printf '[%s] WARNING: %s\n' "${app_name}" "${_msg}" >&2 +} + +# Show an ERROR message then exit with status +# $1: message string +# $2: exit code number (with 0 does not exit) +_msg_error() { + local _msg="${1}" + local _error=${2} + printf '[%s] ERROR: %s\n' "${app_name}" "${_msg}" >&2 + if (( _error > 0 )); then + exit "${_error}" + fi +} + +# Show help usage, with an exit status. +# $1: exit status number. +_usage() { + IFS='' read -r -d '' usagetext < + options: + -A Set an application name for the ISO + Default: '${iso_application}' + -C pacman configuration file. + Default: '${pacman_conf}' + -D Set an install_dir. All files will be located here. + Default: '${install_dir}' + NOTE: Max 8 characters, use only [a-z0-9] + -L