diff options
author | Lokesh Mandvekar <lsm5@fedoraproject.org> | 2022-03-11 10:35:01 -0500 |
---|---|---|
committer | Lokesh Mandvekar <lsm5@fedoraproject.org> | 2022-03-11 11:02:07 -0500 |
commit | 6e41d1f441f3b1d69fa6395267477b33be27316f (patch) | |
tree | d0ef382ebb6d34143427b5e98a8994f49baa65c6 /podman.spec.rpkg | |
parent | 7ab85b322b3492eae09dd04cdec2e538cd18ae03 (diff) | |
download | podman-6e41d1f441f3b1d69fa6395267477b33be27316f.tar.gz podman-6e41d1f441f3b1d69fa6395267477b33be27316f.tar.bz2 podman-6e41d1f441f3b1d69fa6395267477b33be27316f.zip |
podman.spec.rpkg: enable rhel8 builds on copr
fix conditionals and buildtags to enable rhel8 builds
[NO NEW TESTS NEEDED]
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
Diffstat (limited to 'podman.spec.rpkg')
-rw-r--r-- | podman.spec.rpkg | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/podman.spec.rpkg b/podman.spec.rpkg index 0a1bc87cc..41385dba6 100644 --- a/podman.spec.rpkg +++ b/podman.spec.rpkg @@ -62,15 +62,18 @@ BuildRequires: glibc-devel BuildRequires: glibc-static BuildRequires: git-core BuildRequires: go-md2man +%if 0%{?fedora} || 0%{?rhel} >= 9 BuildRequires: go-rpm-macros +%endif +%if 0%{?rhel} <= 8 +BuildRequires: pkgconfig(devmapper) +%endif BuildRequires: gpgme-devel BuildRequires: libassuan-devel BuildRequires: libgpg-error-devel BuildRequires: libseccomp-devel BuildRequires: libselinux-devel -%if 0%{?fedora} >= 35 BuildRequires: shadow-utils-subid-devel -%endif BuildRequires: pkgconfig BuildRequires: make BuildRequires: ostree-devel @@ -175,22 +178,25 @@ ln -s ../../../../ src/%{import_path} popd ln -s vendor src +%if 0%{?rhel} +rm -rf vendor/github.com/containers/storage/drivers/register/register_btrfs.go +%endif + # build date. FIXME: Makefile uses '/v2/libpod', that doesn't work here? LDFLAGS="-X %{import_path}/libpod/define.buildInfo=$(date +%s)" # build rootlessport first -%gobuild -o bin/rootlessport %%{import_path}/cmd/rootlessport +%gobuild -o bin/rootlessport %{import_path}/cmd/rootlessport -# build %%{name} -export BUILDTAGS="seccomp exclude_graphdriver_devicemapper $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) $(hack/libdm_tag.sh) $(hack/selinux_tag.sh) $(hack/systemd_tag.sh)" -%if 0%{?fedora} >= 35 -export BUILDTAGS+=" $(hack/libsubid_tag.sh)" -%endif +# set base buildtags common to both %%{name} and %%{name}-remote +export BASEBUILDTAGS="seccomp exclude_graphdriver_devicemapper $(hack/selinux_tag.sh) $(hack/systemd_tag.sh) $(hack/libsubid_tag.sh)" +# build %%{name} +export BUILDTAGS="$BASEBUILDTAGS $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh)" %gobuild -o bin/%{name} %{import_path}/cmd/%{name} # build %%{name}-remote -export BUILDTAGS+=" exclude_graphdriver_btrfs btrfs_noversion remote" +export BUILDTAGS="$BASEBUILDTAGS exclude_graphdriver_btrfs btrfs_noversion remote" %gobuild -o bin/%{name}-remote %{import_path}/cmd/%{name} make docs docker-docs |