From 172d3f3ae3a559fd06b18a8611f4b5bce2b45f9d Mon Sep 17 00:00:00 2001 From: Lleyton Gray Date: Wed, 22 May 2024 00:17:04 -0700 Subject: [PATCH] fix: use gdisk for setting partition attribute flags --- .github/workflows/release.yml | 74 +++++++++++++++++------------------ src/config.rs | 4 +- 2 files changed, 37 insertions(+), 41 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c13f7b3..93789b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,7 @@ env: dosfstools grub2 parted + gdisk util-linux-core systemd-container grub2-efi @@ -38,50 +39,45 @@ env: isomd5sum jobs: - build: - strategy: - matrix: - arch: [x86_64, aarch64] + build: + strategy: + matrix: + arch: [x86_64, aarch64] - # run job on ubuntu-latest unless aarch64 then arm64 - runs-on: ${{ matrix.arch == 'aarch64' && 'arm64' || 'ubuntu-latest' }} + # run job on ubuntu-latest unless aarch64 then arm64 + runs-on: ${{ matrix.arch == 'aarch64' && 'arm64' || 'ubuntu-latest' }} - container: - image: ghcr.io/terrapkg/builder:f38 + container: + image: ghcr.io/terrapkg/builder:f38 - steps: - - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - - name: Install dependencies - run: | - dnf install -y $DNF_PKGS + - name: Install dependencies + run: | + dnf install -y $DNF_PKGS - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Build - run: - cargo build --release - - - name: Upload artifacts - uses: actions/upload-artifact@v2 - with: - name: ${{ matrix.arch }} - path: target/release/terra - - - - name: Add binary to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: target/release/katsu - asset_name: katsu-${{ matrix.arch }} - tag: ${{ github.ref }} - # release_name: ${{ github.ref }} - overwrite: true + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Build + run: cargo build --release + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.arch }} + path: target/release/terra + - name: Add binary to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: target/release/katsu + asset_name: katsu-${{ matrix.arch }} + tag: ${{ github.ref }} + # release_name: ${{ github.ref }} + overwrite: true diff --git a/src/config.rs b/src/config.rs index ef16175..ba7d451 100644 --- a/src/config.rs +++ b/src/config.rs @@ -463,8 +463,8 @@ impl PartitionLayout { for flag in flags { let position = flag.flag_position(); - trace!("parted -s {disk:?} toggle {i} {position}"); - cmd_lib::run_cmd!(parted -s $disk toggle $i $position 2>&1)?; + trace!("sgdisk -A {i}:set:{position} {disk:?}"); + cmd_lib::run_cmd!(sgdisk -A $i:set:$position $disk 2>&1)?; } }