forked from fedora-selinux/selinux-policy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split off make-sources.sh from make-srpm.sh which builds a directory with the sprm ingredients (the unpacked directory); the packit workflow requires that, it builds the srpm by itself after some further adjustments. This mostly obsoletes the need of doing custom COPR builds, so eventually .copr/ can be simplified. But keep the old functionality for the time being. Note that this way of building an srpm in packit is still rather unusual: the normal mode is to maintain the .spec and all auxiliary files in the upstream git; that then enables automatic Fedora releases, and make it easier to keep the spec in sync. But one step after another.. Configure packit to automatically build srpm and rpms in the usual temporary COPRs. This makes it much easier to test PRs both by humans and future integration tests. There are no test plans yet, but already enable the TF run to at least cover package installation/upgrade. Run these on Rawhide and the current stable Fedora (38 right now). This entirely replaces the "build-rpm" workflow, so drop that. Co-Authored-By: Ondrej Mosnacek <[email protected]>
- Loading branch information
1 parent
045f69b
commit a571063
Showing
5 changed files
with
58 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# See https://packit.dev/docs/configuration/ | ||
|
||
specfile_path: tmp/rpm/selinux-policy.spec | ||
|
||
actions: | ||
post-upstream-clone: | ||
- mkdir -p tmp/rpm | ||
- scripts/make-sources.sh tmp/rpm | ||
create-archive: sh -c 'ls tmp/rpm/selinux-policy*.tar.gz' | ||
|
||
jobs: | ||
- job: copr_build | ||
trigger: pull_request | ||
targets: | ||
- fedora-development | ||
- fedora-latest-stable | ||
|
||
- job: tests | ||
trigger: pull_request | ||
targets: | ||
- fedora-development | ||
- fedora-latest-stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Make an SRPM for COPR | ||
|
||
set -eux | ||
|
||
outdir="$1"; shift | ||
|
||
rootdir="$(realpath -m "$0/../..")" | ||
|
||
rpm -q rpm-build git-core || dnf install -y rpm-build git-core | ||
|
||
tmpdir="$(mktemp -d)" | ||
|
||
trap 'rm -rf "$tmpdir"' EXIT | ||
|
||
rpmbuild_dir="$tmpdir" | ||
distgit_dir="$tmpdir/SOURCES" | ||
|
||
mkdir -p "$distgit_dir" | ||
|
||
"$rootdir/scripts/make-sources.sh" "$distgit_dir" | ||
|
||
rpmbuild --define "_topdir $rpmbuild_dir" -bs "$distgit_dir/selinux-policy.spec" | ||
cp "$rpmbuild_dir/SRPMS/"*.src.rpm "$outdir" |