Skip to content

Commit

Permalink
Merge pull request #27 from FyraLabs/revert-19-w/dnf5-default
Browse files Browse the repository at this point in the history
Revert "feat: switch to dnf5 as default backend"
  • Loading branch information
lleyton authored Jun 2, 2024
2 parents 3198ef7 + d528da8 commit f4f8c16
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
image-arm:
runs-on: ubuntu-latest
container:
image: ghcr.io/terrapkg/builder:f40
image: ghcr.io/terrapkg/builder:f38
# Pass /dev from host to container
# Very hacky, but it works
# Microsoft/Github, if you're reading this,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
runs-on: ${{ matrix.arch == 'aarch64' && 'arm64' || 'ubuntu-latest' }}

container:
image: ghcr.io/terrapkg/builder:f40
image: ghcr.io/terrapkg/builder:f38

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
jobs:
check:
container:
image: ghcr.io/terrapkg/builder:f40
image: ghcr.io/terrapkg/builder:f38
name: Check
runs-on: ubuntu-latest
steps:
Expand All @@ -48,7 +48,7 @@ jobs:
clippy:
name: Clippy
container:
image: ghcr.io/terrapkg/builder:f40
image: ghcr.io/terrapkg/builder:f38
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
unit-test:
runs-on: ubuntu-latest
container:
image: ghcr.io/terrapkg/builder:f40
image: ghcr.io/terrapkg/builder:f38

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/terrapkg/builder:f40
FROM ghcr.io/terrapkg/builder:f38

RUN dnf install -y \
xorriso \
Expand Down
11 changes: 3 additions & 8 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ pub trait RootBuilder {
}

fn _default_dnf() -> String {
String::from("dnf5")
String::from("dnf")
}

#[derive(Deserialize, Debug, Clone, Serialize, Default)]
Expand Down Expand Up @@ -348,15 +348,10 @@ impl RootBuilder for DnfRootBuilder {
options.append(&mut exclude.iter().map(|p| format!("--exclude={p}")).collect());

info!("Initializing system with dnf");
let res = crate::chroot_run_cmd!(&chroot,
crate::chroot_run_cmd!(&chroot,
$dnf install -y --releasever=$releasever --installroot=$chroot $[packages] $[options] 2>&1;
$dnf clean all --installroot=$chroot;
);

if let Err(e) = res {
tracing::error!("{} failed with error: {e:?}", self.exec);
info!("Katsu will continue the build process.");
}
)?;

info!("Setting up users");

Expand Down
5 changes: 3 additions & 2 deletions tests/katsudon-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ packages:
- shim-aa64
- shim-unsigned-aarch64


disk:
bootloader: true
root_format: ext4
disk_size: 8G

sys:
releasever: 40
releasever: 38
rootpw: ultramarine

script:
init: init.sh
postinst: postinst.sh
postinst: postinst.sh
2 changes: 1 addition & 1 deletion tests/katsudon-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ packages:
- polkit

sys:
releasever: 40
releasever: 38
rootpw: ultramarine

script:
Expand Down
2 changes: 1 addition & 1 deletion tests/ng/katsu-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ disk:

dnf:
arch: aarch64
releasever: 40
releasever: 39
2 changes: 1 addition & 1 deletion tests/ng/katsu-iso-limine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kernel_cmdline: "quiet rhgb"
bootloader: limine

dnf:
releasever: 40
releasever: 39
options:
- --setopt=keepcache=True
- --nogpgcheck
Expand Down
2 changes: 1 addition & 1 deletion tests/ng/katsu-iso.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kernel_cmdline: "quiet rhgb"
bootloader: grub

dnf:
releasever: 40
releasever: 39
options:
- --setopt=keepcache=True
- --nogpgcheck
Expand Down
2 changes: 1 addition & 1 deletion tests/ng/katsu-script-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dnf:
options:
- --nogpgcheck
repodir: modules/repodir/
releasever: 40
releasever: 39
packages:
- busybox
2 changes: 1 addition & 1 deletion tests/ng/katsu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ disk:
filesystem: ext4
mountpoint: /
dnf:
exec: dnf5
dnf5: true
releasever: 39
2 changes: 0 additions & 2 deletions tests/ng/modules/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ dnf:
- --setopt=cachedir=/var/cache/dnf
- --nogpgcheck
- --setopt=keepcache=True
- --setopt=tsflags=
- --setopt=max_parallel_downloads=20
exclude:
- fedora-release*
- generic-release*
Expand Down

0 comments on commit f4f8c16

Please sign in to comment.