Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing unsupported #41

Open
jedahan opened this issue Dec 26, 2022 · 2 comments
Open

testing unsupported #41

jedahan opened this issue Dec 26, 2022 · 2 comments

Comments

@jedahan
Copy link

jedahan commented Dec 26, 2022

Describe the bug

Raspberry Pi does not have a testing distribution setup, so if you choose testing, it will fail trying to find the repository

E: The repository 'http://archive.raspberrypi.org/debian testing Release' does not have a Release file.

To Reproduce

# .github/workflow/build-image.yaml
name: build solar pi image

on: ['pull_request', 'workflow_dispatch']

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: checkout
        uses: actions/checkout@v3

      - id: get_version
        uses: battila7/get-version-action@v2

      # create 'solar-pi-stage' stage 
      - run: |
          mkdir -p solar-pi-stage/00-install-podman &&
          {
          cat > solar-pi-stage/00-install-podman/00-packages <<-EOF
          python3
          python3-pip
          podman
          EOF
          } &&
          {
          cat > solar-pi-stage/00-install-podman/01-install-podman-compose.sh <<-EOF
          #!/bin/bash
          python -m pip install https://github.com/containers/podman-compose/archive/devel.tar.gz
          EOF
          } &&
          chmod +x solar-pi-stage/00-install-podman/01-install-podman-compose.sh &&
          {
          cat > solar-pi-stage/prerun.sh <<-EOF
          #!/bin/bash -e
          if [ ! -d "\${ROOTFS_DIR}" ]; then
            copy_previous
          fi
          EOF
          } &&
          chmod +x solar-pi-stage/prerun.sh

      - name: build image
        uses: usimd/pi-gen-action@v1
        id: build
        with:
          ## USER SETTINGS
          enable-ssh: 1
          hostname: solar-pi
          username: solar
          password: 'solar-power-for-artists'

          keyboard-keymap: us
          keyboard-layout: English (US)
          locale: en_US.UTF-8
          timezone: America/New_York

          # FIXME: add as user input
          wpa-country: 'US'
          #wpa-essid: ''
          #wpa-password: ''

          ## BUILD + OUTPUT SETTINGS
          compression: xz
          enable-noobs: false
          github-token: ${{ github.token }}
          image-name: 'solar-pi'
          pi-gen-version: arm64
          use-qcow2: 1

          release: testing
          stage-list: stage0 stage1 stage2 ./solar-pi-stage


      - uses: actions/upload-artifact@v3
        with:
          name: pi-gen-image
          path: ${{ steps.build.outputs.image-path }}

      - name: release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          name: solar-pi image ${{ steps.get_version.outputs.version-without-v }}
          files: ${{ steps.build.outputs.image-path }}

Expected behavior
Testing should work - I think this would require grabbing testing from the Debian repositories, but I am not sure if we can mix-and-match.

Logs

Logs available https://github.com/jedahan/solar-protocol/actions/runs/3777785088/jobs/6421788136#step:5:70

@jedahan
Copy link
Author

jedahan commented Dec 26, 2022

Opened #42 for now

@usimd
Copy link
Owner

usimd commented Jan 1, 2023

Thanks for reporting this.

I actually copied the variable descriptions from the pi-gen README and just noticed that they've updated the RELEASE parameter:

The release version to build images against. Valid values are any supported Debian release. However, since different releases will have different sets of packages available, you'll need to either modify your stages accordingly, or checkout the appropriate branch. For example, if you'd like to build a buster image, you should do so from the buster branch.

Since I do not see a testing branch in their repo, I assume this is not supported out of the box and you'd have to follow their advice by editing the sources lists manually.

It makes sense to adapt the action's behavior like you suggested in the linked PR, I'm just thinking about a more general solution that better reflects pi-gen's intention (for instance dropping verification on this variable entirely and leaving it up to the user).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants