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

Packit updates #255

Closed
wants to merge 5 commits into from
Closed
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
124 changes: 80 additions & 44 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
upstream_package_name: yggdrasil
downstream_package_name: yggdrasil
specfile_path: builddir/dist/srpm/yggdrasil.spec
upstream_tag_template: v{version}

packages:
yggdrasil-centos:
pkg_tool: centpkg
specfile_path: yggdrasil.spec
actions:
post-upstream-clone:
- wget https://gitlab.com/redhat/centos-stream/rpms/yggdrasil/-/raw/c10s/yggdrasil.spec
- meson setup builddir -Dbuild_srpm=True -Dvendor=True -Dexamples=True --wipe
- meson compile tarball -C builddir
get-current-version:
- awk '/^Version:/ {print $2;}' yggdrasil.spec
create-archive:
- bash -c 'echo builddir/dist/srpm/yggdrasil-*.tar.*'
fix-spec-file:
- bash -c 'echo "No action needed"'
yggdrasil-fedora:
pkg_tool: fedpkg
specfile_path: yggdrasil.spec
actions:
post-upstream-clone:
- wget https://src.fedoraproject.org/rpms/yggdrasil/raw/rawhide/f/yggdrasil.spec
- meson setup builddir -Dbuild_srpm=True -Dvendor=True -Dexamples=True --wipe
- meson compile tarball -C builddir
get-current-version:
- awk '/^Version:/ {print $2;}' yggdrasil.spec
create-archive:
- bash -c 'echo builddir/dist/srpm/yggdrasil-*.tar.*'
fix-spec-file:
- bash -c 'echo "No action needed"'

srpm_build_deps:
- bash-completion
Expand All @@ -12,68 +43,66 @@ srpm_build_deps:
- "pkgconfig(dbus-1)"
- "pkgconfig(systemd)"
- rpm-build

actions:
post-upstream-clone:
- meson setup builddir -Dbuild_srpm=True -Dvendor=True -Dexamples=True --wipe
- meson compile tarball -C builddir
get-current-version:
- awk '/^Version:/ {print $2;}' builddir/dist/srpm/yggdrasil.spec
create-archive:
- bash -c 'echo builddir/dist/srpm/yggdrasil-*.tar.*'
fix-spec-file:
- bash -c 'echo "No action needed"'
- wget

jobs:
- job: copr_build
trigger: pull_request
packages: [yggdrasil-fedora]
identifier: "build/pr/fedora"
additional_repos:
- "copr://@yggdrasil/latest"
targets:
- fedora-all

- job: copr_build
trigger: pull_request
packages: [yggdrasil-centos]
identifier: "build/pr/centos-stream"
additional_repos:
- "copr://@yggdrasil/latest"
targets:
- centos-stream-8
- centos-stream-9-aarch64
- centos-stream-9-x86_64
- centos-stream-10-aarch64
- centos-stream-10-x86_64
- fedora-all-aarch64
- fedora-all-x86_64
- rhel-8-aarch64
- rhel-8-x86_64
- rhel-9-aarch64
- rhel-9-x86_64
- centos-stream-9
- centos-stream-10
- rhel-8
- rhel-9

- job: copr_build
trigger: commit
packages: [yggdrasil-fedora]
identifier: "build/latest/fedora"
branch: main
owner: "@yggdrasil"
project: latest
targets:
- centos-stream-8
- centos-stream-9-aarch64
- centos-stream-9-x86_64
- centos-stream-10-aarch64
- centos-stream-10-x86_64
- fedora-all-aarch64
- fedora-all-x86_64
- rhel-8-aarch64
- rhel-8-x86_64
- rhel-9-aarch64
- rhel-9-x86_64
- fedora-all

- job: copr_build
trigger: commit
packages: [yggdrasil-centos]
identifier: "build/latest/centos-stream"
branch: main
owner: "@yggdrasil"
project: latest
targets:
- centos-stream-9
- centos-stream-10
- rhel-8
- rhel-9

- job: tests
trigger: pull_request
packages: [yggdrasil-centos]
identifier: "unit/centos-stream"
targets:
- centos-stream-8
- centos-stream-9-aarch64
- centos-stream-9-x86_64
- centos-stream-10-aarch64
- centos-stream-10-x86_64
- centos-stream-9
- centos-stream-10
labels:
- unit

- job: tests
trigger: pull_request
packages: [yggdrasil-fedora]
identifier: "unit/fedora"
targets:
- fedora-all
Expand All @@ -82,20 +111,27 @@ jobs:

- job: tests
trigger: pull_request
packages: [yggdrasil-centos]
identifier: "unit/rhel"
targets:
rhel-8-aarch64:
distros:
- RHEL-8-Nightly
rhel-8-x86_64:
distros:
- RHEL-8-Nightly
rhel-9-aarch64:
distros:
- RHEL-9-Nightly
rhel-9-x86_64:
distros:
- RHEL-9-Nightly
labels:
- unit
use_internal_tf: true

- job: propose_downstream
trigger: release
packages: [yggdrasil-centos]
dist_git_branches:
- c10s

- job: propose_downstream
trigger: release
packages: [yggdrasil-fedora]
dist_git_branches:
- fedora-branched
5 changes: 0 additions & 5 deletions cmd/yggd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ import (
"math/rand"
"os"
"path/filepath"
"time"
)

func init() {
rand.Seed(time.Now().UnixNano())
}

func randomString(n int) string {
const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
data := make([]byte, n)
Expand Down
Loading