Skip to content

Commit

Permalink
Remove user namespace setup / support newer fedoras (#157)
Browse files Browse the repository at this point in the history
* fix reproducibility on fedora 36+

rpmdb has moved

* Remove user namespace functionality

- document how to use unshare instead
  • Loading branch information
tofay authored Sep 26, 2024
1 parent 47443c4 commit 961fb14
Show file tree
Hide file tree
Showing 13 changed files with 199 additions and 541 deletions.
14 changes: 14 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "rpmoci tests"
description: "Run rpmoci tests"
runs:
using: "composite"
steps:
- name: Setup rootless user
shell: bash
run: |
useradd -m -s /bin/bash rootless
- name: Run tests as non-root user
shell: bash
run: |
su - rootless
cargo test --features test-docker
23 changes: 5 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
check:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container:
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
steps:
Expand All @@ -23,7 +23,7 @@ jobs:
run: cargo clippy -- -D warnings

test:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container:
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
options: --privileged
Expand All @@ -36,29 +36,16 @@ jobs:
profile: minimal
toolchain: stable
override: true
- uses: oras-project/setup-oras@v1
with:
version: 1.1.0
- name: Run cargo test
run: cargo test --features test-docker
- name: Setup rootless user
run: |
useradd -m -s /bin/bash rootless
echo "rootless:100000:65536" > /etc/subgid
echo "rootless:100000:65536" > /etc/subuid
- name: Build in rootless mode
run: |
su - rootless
cargo run -- build -f tests/fixtures/rootless/rpmoci.toml --image rootless --tag test
- uses: ./.github/actions/test

cargo-deny:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1

build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container:
image: mcr.microsoft.com/cbl-mariner/base/core:2.0
steps:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: fedora

on: [pull_request]

jobs:
test:
runs-on: ubuntu-24.04
container:
image: fedora:40
options: --privileged
steps:
- name: Install dependencies
run: |
dnf install -y openssl-devel python3-devel sqlite-devel dnf-plugins-core util-linux rust cargo skopeo
dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
dnf install -y docker-ce-cli
- uses: actions/checkout@v2
- uses: ./.github/actions/test
Loading

0 comments on commit 961fb14

Please sign in to comment.