Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
# See the documentation for more information:
# https://packit.dev/docs/configuration/

# name in upstream package repository or registry
upstream_package_name: bootupd
upstream_tag_template: v{version}

downstream_package_name: rust-bootupd

specfile_path: contrib/packaging/bootupd.spec

files_to_sync:
- .packit.yaml

packages:
bootupd-fedora:
pkg_tool: fedpkg

jobs:
- job: propose_downstream
trigger: release
packages: [bootupd-fedora]
dist_git_branches:
fedora-rawhide:
fast_forward_merge_into: [fedora-latest-stable]

- job: koji_build
trigger: commit
packages: [bootupd-fedora]
dist_git_branches:
- fedora-all

- job: bodhi_update
trigger: commit

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The bodhi_update job is currently triggered on commit. This will cause it to run for every commit to a dist-git branch, even before a build has been completed in Koji, which will likely lead to failures. This job should be triggered after a successful Koji build.

  trigger: koji_build

packages: [bootupd-fedora]
dist_git_branches:
- fedora-all
10 changes: 5 additions & 5 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,10 @@ fn impl_package(sh: &Shell) -> Result<Package> {
)
.run()?;
}
// Compress with zstd
let srcpath: Utf8PathBuf = format!("{p}.zstd").into();
cmd!(sh, "zstd --rm -f {p} -o {srcpath}").run()?;
// Compress with gzip
let srcpath: Utf8PathBuf = format!("target/{namev}.crate").into();
cmd!(sh, "gzip --force --best {p}").run()?;
std::fs::rename(format!("{p}.gz"), &srcpath)?;

Ok(Package {
version: v,
Expand All @@ -176,8 +177,7 @@ fn impl_srpm(sh: &Shell) -> Result<Utf8PathBuf> {
let pkg = impl_package(sh)?;
vendor(sh)?;
let td = tempfile::tempdir_in("target").context("Allocating tmpdir")?;
let td = td.into_path();
let td: &Utf8Path = td.as_path().try_into().unwrap();
let td: &Utf8Path = td.path().try_into().unwrap();
let srcpath = td.join(pkg.srcpath.file_name().unwrap());
std::fs::rename(pkg.srcpath, srcpath)?;
let v = pkg.version;
Expand Down