From fee9ffca3cbbf9a8940760075f3e159d31cd61d9 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 2 Aug 2023 09:23:41 +0200 Subject: [PATCH 1/2] build: Fix missing dist files when configuring with --disable-daemon Unconditionally define the various *_in_files, so that they appear in `make dist` tarballs independent of the configure options (in particular, `--disable-daemon`). --- data/Makefile.am | 10 +++++----- modules/btrfs/data/Makefile.am | 3 ++- modules/iscsi/data/Makefile.am | 3 ++- modules/lsm/data/Makefile.am | 3 ++- modules/lvm2/data/Makefile.am | 3 ++- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/data/Makefile.am b/data/Makefile.am index 946823de5c..3f88f4fd01 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -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) @@ -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) diff --git a/modules/btrfs/data/Makefile.am b/modules/btrfs/data/Makefile.am index 137629b4fc..ae3121b67c 100644 --- a/modules/btrfs/data/Makefile.am +++ b/modules/btrfs/data/Makefile.am @@ -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) diff --git a/modules/iscsi/data/Makefile.am b/modules/iscsi/data/Makefile.am index 0b3ba23ae7..d4cadceadb 100644 --- a/modules/iscsi/data/Makefile.am +++ b/modules/iscsi/data/Makefile.am @@ -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) diff --git a/modules/lsm/data/Makefile.am b/modules/lsm/data/Makefile.am index 30f452a84e..1adc05d987 100644 --- a/modules/lsm/data/Makefile.am +++ b/modules/lsm/data/Makefile.am @@ -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) diff --git a/modules/lvm2/data/Makefile.am b/modules/lvm2/data/Makefile.am index 100cc6f394..144448f682 100644 --- a/modules/lvm2/data/Makefile.am +++ b/modules/lvm2/data/Makefile.am @@ -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) From 4d72ed3d9e967e09edf5479eaa2f708ecefaa6d6 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Tue, 7 Mar 2023 13:18:00 +0100 Subject: [PATCH 2/2] ci: Add Packit configuration for RPM builds on PRs Configure with minimal options, so that we can build a dist tarball without too many extra dependencies. In particular, we want to avoid libblockdev, as we usually need the latest upstream master one, not the distro package. --- .packit.yaml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .packit.yaml diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000000..0d61f63ba8 --- /dev/null +++ b/.packit.yaml @@ -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*"' + +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