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

ci: Add Packit configuration for RPM builds on PRs #1159

Merged
merged 2 commits into from
Aug 2, 2023
Merged
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
44 changes: 44 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
actions:
create-archive:
- './autogen.sh --disable-modules --disable-daemon'
# FIXME: just calling `make dist` doesn't build udisks/libudisks2.la for gtk-doc
- 'make'
- 'make dist'
- 'bash -c "ls *.tar*"'
Comment on lines +3 to +7
Copy link
Member

Choose a reason for hiding this comment

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

So first I thought making a tarball from git sources directly and calling autogen.sh within the spec file might be a cleaner way, however then I realized the spec file wouldn't work against proper dist tarball as there's no autogen.sh then. Sure, a bunch of if-else stuff might do the trick but it's not a clean way either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I thought the same -- it's quite nice to be able to build a package straight from a git archive tarball, without autoconfiscation. But indeed that then wouldn't have ./configure, Makefile.in, etc.


jobs:
- job: copr_build
branch: master
trigger: pull_request
targets:
- fedora-rawhide-aarch64
- fedora-rawhide-ppc64le
- fedora-rawhide-x86_64
- fedora-latest-aarch64
- fedora-latest-ppc64le
- fedora-latest-x86_64
- fedora-latest-stable-aarch64
- fedora-latest-stable-ppc64le
- fedora-latest-stable-x86_64
additional_repos:
- "copr://@storage/udisks-daily"

srpm_build_deps:
- gcc
- make
- libtool
- autoconf
- automake
- glib2-devel
- gtk-doc
- gobject-introspection-devel
- polkit-devel
- systemd
- systemd-devel
- systemd-rpm-macros
- gettext-devel
- redhat-rpm-config
- libmount-devel

downstream_package_name: udisks2
specfile_path: packaging/udisks2.spec
10 changes: 5 additions & 5 deletions data/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@

NULL =

dbusconf_in_files = org.freedesktop.UDisks2.conf.in
dbusservice_in_files = org.freedesktop.UDisks2.service.in
polkit_in_files = org.freedesktop.UDisks2.policy.in
systemdservice_in_files = udisks2.service.in

if ENABLE_DAEMON
SUBDIRS = tmpfiles.d

dbusservicedir = $(datadir)/dbus-1/system-services
dbusservice_in_files = org.freedesktop.UDisks2.service.in
dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)

$(dbusservice_DATA): $(dbusservice_in_files) Makefile
@sed -e "s|\@udisksdprivdir\@|$(libexecdir)/udisks2|" $< > $@

dbusconfdir = $(datadir)/dbus-1/system.d
dbusconf_in_files = org.freedesktop.UDisks2.conf.in
dbusconf_DATA = $(dbusconf_in_files:.conf.in=.conf)

$(dbusconf_DATA): $(dbusconf_in_files) Makefile
cp $< $@

systemdservice_in_files = udisks2.service.in

if HAVE_SYSTEMD
systemdservicedir = $(systemdsystemunitdir)
systemdservice_DATA = $(systemdservice_in_files:.service.in=.service)
Expand All @@ -32,7 +33,6 @@ udevrulesdir = $(udevdir)/rules.d
udevrules_DATA = 80-udisks2.rules

polkitdir = $(datadir)/polkit-1/actions
polkit_in_files = org.freedesktop.UDisks2.policy.in
polkit_DATA = $(polkit_in_files:.policy.in=.policy)

$(polkit_DATA): $(polkit_in_files)
Expand Down
3 changes: 2 additions & 1 deletion modules/btrfs/data/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

NULL =

polkit_in_files = org.freedesktop.UDisks2.btrfs.policy.in

if ENABLE_DAEMON

polkitdir = $(datadir)/polkit-1/actions
polkit_in_files = org.freedesktop.UDisks2.btrfs.policy.in
polkit_DATA = $(polkit_in_files:.policy.in=.policy)

$(polkit_DATA): $(polkit_in_files)
Expand Down
3 changes: 2 additions & 1 deletion modules/iscsi/data/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

NULL =

polkit_in_files = org.freedesktop.UDisks2.iscsi.policy.in

if ENABLE_DAEMON

polkitdir = $(datadir)/polkit-1/actions
polkit_in_files = org.freedesktop.UDisks2.iscsi.policy.in
polkit_DATA = $(polkit_in_files:.policy.in=.policy)

$(polkit_DATA): $(polkit_in_files)
Expand Down
3 changes: 2 additions & 1 deletion modules/lsm/data/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

NULL =

polkit_in_files = org.freedesktop.UDisks2.lsm.policy.in

if ENABLE_DAEMON

polkitdir = $(datadir)/polkit-1/actions
polkit_in_files = org.freedesktop.UDisks2.lsm.policy.in
polkit_DATA = $(polkit_in_files:.policy.in=.policy)

$(polkit_DATA): $(polkit_in_files)
Expand Down
3 changes: 2 additions & 1 deletion modules/lvm2/data/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

NULL =

polkit_in_files = org.freedesktop.UDisks2.lvm2.policy.in

if ENABLE_DAEMON

polkitdir = $(datadir)/polkit-1/actions
polkit_in_files = org.freedesktop.UDisks2.lvm2.policy.in
polkit_DATA = $(polkit_in_files:.policy.in=.policy)

$(polkit_DATA): $(polkit_in_files)
Expand Down