2022-05-18 19:16:30 +00:00
|
|
|
%if "%{_vendor}" == "debbuild"
|
2022-08-22 13:17:49 +00:00
|
|
|
%global _unitdir %{_usr}/lib/systemd/system
|
|
|
|
%global _userunitdir %{_usr}/lib/systemd/user
|
|
|
|
%global _tmpfilesdir %{_usr}/lib/tmpfiles.d
|
2022-08-19 20:13:59 +00:00
|
|
|
# Older distros don't work yet
|
|
|
|
%if (0%{?debian} && 0%{?debian} <= 11) || (0%{?ubuntu} && 0%{?ubuntu} < 2204)
|
|
|
|
%define gobuild(o:) GO111MODULE=off %{_prefix}/lib/go-1.16/bin/go build -buildmode pie -tags=" ${BUILDTAGS:-}" -a -v -x %{?**};
|
|
|
|
%else
|
2022-05-18 19:16:30 +00:00
|
|
|
%define gobuild(o:) GO111MODULE=off go build -buildmode pie -tags=" ${BUILDTAGS:-}" -a -v -x %{?**};
|
|
|
|
%endif
|
2022-08-19 20:13:59 +00:00
|
|
|
%endif
|
2022-05-18 19:16:30 +00:00
|
|
|
|
2021-06-14 14:01:16 +00:00
|
|
|
%global with_debug 1
|
2018-05-18 15:18:40 +00:00
|
|
|
|
2018-02-06 22:05:10 +00:00
|
|
|
%if 0%{?with_debug}
|
2018-05-17 03:58:22 +00:00
|
|
|
%global _find_debuginfo_dwz_opts %{nil}
|
2018-02-06 22:05:10 +00:00
|
|
|
%global _dwz_low_mem_die_limit 0
|
|
|
|
%else
|
2018-08-12 03:03:46 +00:00
|
|
|
%global debug_package %{nil}
|
2018-02-06 22:05:10 +00:00
|
|
|
%endif
|
|
|
|
|
2018-03-27 14:24:36 +00:00
|
|
|
%global provider github
|
|
|
|
%global provider_tld com
|
2018-08-30 13:25:40 +00:00
|
|
|
%global project containers
|
2020-07-28 14:39:13 +00:00
|
|
|
%global repo %{name}
|
2020-08-31 14:04:00 +00:00
|
|
|
# https://github.com/containers/%%{name}
|
2020-05-12 18:38:05 +00:00
|
|
|
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo}
|
|
|
|
%global git0 https://%{import_path}
|
2018-03-27 14:24:36 +00:00
|
|
|
|
2021-06-08 14:30:35 +00:00
|
|
|
# dnsname
|
2019-10-18 13:02:37 +00:00
|
|
|
%global repo_plugins dnsname
|
2020-08-31 14:04:00 +00:00
|
|
|
# https://github.com/containers/dnsname
|
2021-06-08 14:30:35 +00:00
|
|
|
%global import_path_plugins %{provider}.%{provider_tld}/%{project}/%{repo_plugins}
|
2019-10-18 13:02:37 +00:00
|
|
|
%global git_plugins https://%{import_path_plugins}
|
2021-09-15 17:04:02 +00:00
|
|
|
%global commit_plugins 18822f9a4fb35d1349eb256f4cd2bfd372474d84
|
2019-10-18 13:02:37 +00:00
|
|
|
|
2021-08-16 12:52:47 +00:00
|
|
|
# gvproxy
|
|
|
|
%global repo_gvproxy gvisor-tap-vsock
|
|
|
|
# https://github.com/containers/gvisor-tap-vsock
|
|
|
|
%global import_path_gvproxy %%{provider}.%{provider_tld}/%{project}/%{repo_gvproxy}
|
|
|
|
%global git_gvproxy https://%{import_path_gvproxy}
|
2022-08-03 13:55:33 +00:00
|
|
|
%global commit_gvproxy fdc231ae7b8fe1aec4cf0b8777274fa21b70d789
|
2021-08-16 12:52:47 +00:00
|
|
|
|
2022-08-17 17:59:00 +00:00
|
|
|
%global built_tag_strip 4.2.0
|
2019-07-30 23:27:52 +00:00
|
|
|
|
2022-01-28 21:02:15 +00:00
|
|
|
Name: podman
|
2022-07-22 18:28:41 +00:00
|
|
|
Epoch: 4
|
2022-08-11 01:03:21 +00:00
|
|
|
Version: 4.2.0
|
2022-05-18 19:16:30 +00:00
|
|
|
%if "%{_vendor}" == "debbuild"
|
2022-08-16 18:34:39 +00:00
|
|
|
Packager: Podman Debbuild Maintainers <https://github.com/orgs/containers/teams/podman-debbuild-maintainers>
|
2022-05-18 19:16:30 +00:00
|
|
|
License: ASL-2.0+
|
|
|
|
Release: 0%{?dist}
|
|
|
|
%else
|
|
|
|
License: ASL 2.0 and BSD and ISC and MIT and MPLv2.0
|
2022-02-17 19:40:27 +00:00
|
|
|
Release: %autorelease
|
2022-05-18 19:16:30 +00:00
|
|
|
ExclusiveArch: %{golang_arches}
|
|
|
|
%endif
|
2018-03-27 14:24:36 +00:00
|
|
|
Summary: Manage Pods, Containers and Container Images
|
2019-05-24 14:43:28 +00:00
|
|
|
URL: https://%{name}.io/
|
2022-08-17 17:59:00 +00:00
|
|
|
Source0: %{git0}/archive/v%{built_tag_strip}.tar.gz
|
2022-05-18 19:16:30 +00:00
|
|
|
Source1: %{git_plugins}/archive/%{commit_plugins}/%{repo_plugins}-%{commit_plugins}.tar.gz
|
|
|
|
Source2: %{git_gvproxy}/archive/%{commit_gvproxy}/%{repo_gvproxy}-%{commit_gvproxy}.tar.gz
|
2020-01-06 15:54:08 +00:00
|
|
|
Provides: %{name}-manpages = %{epoch}:%{version}-%{release}
|
2022-05-18 19:16:30 +00:00
|
|
|
BuildRequires: go-md2man
|
2022-05-30 14:44:05 +00:00
|
|
|
Requires: catatonit
|
2022-05-18 19:16:30 +00:00
|
|
|
Requires: iptables
|
|
|
|
Requires: nftables
|
|
|
|
%if "%{_vendor}" == "debbuild"
|
|
|
|
BuildRequires: git
|
|
|
|
BuildRequires: libassuan-dev
|
|
|
|
BuildRequires: libglib2.0-dev
|
|
|
|
BuildRequires: libgpg-error-dev
|
|
|
|
BuildRequires: libgpgme-dev
|
|
|
|
BuildRequires: libseccomp-dev
|
|
|
|
BuildRequires: libsystemd-dev
|
|
|
|
BuildRequires: pkg-config
|
2022-08-19 20:13:59 +00:00
|
|
|
%if (0%{?debian} && 0%{?debian} <= 11) || (0%{?ubuntu} && 0%{?ubuntu} < 2204)
|
|
|
|
BuildRequires: golang-1.16
|
|
|
|
BuildRequires: libc6 < 2.32
|
|
|
|
%else
|
|
|
|
BuildRequires: golang
|
|
|
|
BuildRequires: libc6
|
|
|
|
%endif
|
2022-05-18 19:16:30 +00:00
|
|
|
Requires: conmon >= 2:2.0.30
|
|
|
|
Requires: containers-common >= 4:1
|
|
|
|
Requires: uidmap
|
|
|
|
%else
|
2022-02-25 18:49:36 +00:00
|
|
|
%if ! 0%{?centos}
|
2021-04-05 14:38:31 +00:00
|
|
|
BuildRequires: btrfs-progs-devel
|
2022-02-25 18:49:36 +00:00
|
|
|
%endif
|
2020-12-03 16:12:40 +00:00
|
|
|
BuildRequires: gcc
|
2018-04-16 03:12:23 +00:00
|
|
|
BuildRequires: glib2-devel
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: glibc-static
|
2022-08-19 20:13:59 +00:00
|
|
|
BuildRequires: golang
|
2021-01-11 19:37:44 +00:00
|
|
|
BuildRequires: git-core
|
2022-03-09 20:53:13 +00:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 9
|
2021-06-14 14:01:16 +00:00
|
|
|
BuildRequires: go-rpm-macros
|
2022-03-09 19:41:40 +00:00
|
|
|
%endif
|
2018-04-16 03:12:23 +00:00
|
|
|
BuildRequires: gpgme-devel
|
|
|
|
BuildRequires: libassuan-devel
|
|
|
|
BuildRequires: libgpg-error-devel
|
|
|
|
BuildRequires: libseccomp-devel
|
|
|
|
BuildRequires: libselinux-devel
|
2021-09-23 19:11:45 +00:00
|
|
|
BuildRequires: shadow-utils-subid-devel
|
2018-04-16 03:12:23 +00:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: make
|
2021-04-05 14:38:31 +00:00
|
|
|
BuildRequires: ostree-devel
|
2019-03-19 11:55:36 +00:00
|
|
|
BuildRequires: systemd
|
2019-05-24 14:43:28 +00:00
|
|
|
BuildRequires: systemd-devel
|
2021-09-22 22:41:38 +00:00
|
|
|
Requires: conmon >= 2:2.0.30-2
|
2022-01-31 13:38:15 +00:00
|
|
|
Requires: containers-common >= 4:1-46
|
2022-05-06 16:08:27 +00:00
|
|
|
Requires: netavark >= 1.0.3-1
|
2022-07-06 17:41:29 +00:00
|
|
|
Recommends: %{name}-gvproxy = %{epoch}:%{version}-%{release}
|
2022-05-18 19:16:30 +00:00
|
|
|
Suggests: containernetworking-plugins >= 0.9.1-1
|
2021-05-13 17:50:45 +00:00
|
|
|
Suggests: qemu-user-static
|
2018-02-06 22:05:10 +00:00
|
|
|
# vendored libraries
|
2022-02-17 19:40:27 +00:00
|
|
|
# awk '{print "Provides: bundled(golang("$1")) = "$2}' go.mod | sort | uniq | sed -e 's/-/_/g' -e '/bundled(golang())/d' -e '/bundled(golang(go\|module\|replace\|require))/d'
|
2022-05-06 16:08:27 +00:00
|
|
|
Provides: bundled(golang(github.com/BurntSushi/toml)) = v1.1.0
|
2022-08-03 13:55:33 +00:00
|
|
|
Provides: bundled(golang(github.com/blang/semver/v4)) = v4.0.0
|
2022-02-17 19:40:27 +00:00
|
|
|
Provides: bundled(golang(github.com/buger/goterm)) = v1.0.4
|
2022-05-06 16:08:27 +00:00
|
|
|
Provides: bundled(golang(github.com/checkpoint_restore/checkpointctl)) = v0.0.0_20220321135231_33f4a66335f0
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/checkpoint_restore/go_criu/v5)) = v5.3.0
|
2022-05-06 16:08:27 +00:00
|
|
|
Provides: bundled(golang(github.com/container_orchestrated_devices/container_device_interface)) = v0.4.0
|
2022-08-03 13:55:33 +00:00
|
|
|
Provides: bundled(golang(github.com/containernetworking/cni)) = v1.1.1
|
2022-05-06 16:08:27 +00:00
|
|
|
Provides: bundled(golang(github.com/containernetworking/plugins)) = v1.1.1
|
2022-08-03 13:55:33 +00:00
|
|
|
Provides: bundled(golang(github.com/containers/buildah)) = v1.26.1_0.20220716095526_d31d27c357ab
|
|
|
|
Provides: bundled(golang(github.com/containers/common)) = v0.48.1_0.20220718075257_ecddf87b3840
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/containers/conmon)) = v2.0.20+incompatible
|
2022-08-03 13:55:33 +00:00
|
|
|
Provides: bundled(golang(github.com/containers/image/v5)) = v5.21.2_0.20220721072459_bf19265865b7
|
|
|
|
Provides: bundled(golang(github.com/containers/ocicrypt)) = v1.1.5
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/containers/psgo)) = v1.7.2
|
2022-08-03 13:55:33 +00:00
|
|
|
Provides: bundled(golang(github.com/containers/storage)) = v1.41.1_0.20220714115232_fc9b0ff5272a
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/coreos/go_systemd/v22)) = v22.3.2
|
|
|
|
Provides: bundled(golang(github.com/coreos/stream_metadata_go)) = v0.0.0_20210225230131_70edb9eb47b3
|
|
|
|
Provides: bundled(golang(github.com/cyphar/filepath_securejoin)) = v0.2.3
|
|
|
|
Provides: bundled(golang(github.com/digitalocean/go_qemu)) = v0.0.0_20210326154740_ac9e0b687001
|
2022-05-06 16:08:27 +00:00
|
|
|
Provides: bundled(golang(github.com/docker/distribution)) = v2.8.1+incompatible
|
2022-08-03 13:55:33 +00:00
|
|
|
Provides: bundled(golang(github.com/docker/docker)) = v20.10.17+incompatible
|
2022-02-17 19:40:27 +00:00
|
|
|
Provides: bundled(golang(github.com/docker/go_connections)) = v0.4.1_0.20210727194412_58542c764a11
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/docker/go_plugins_helpers)) = v0.0.0_20211224144127_6eecb7beb651
|
|
|
|
Provides: bundled(golang(github.com/docker/go_units)) = v0.4.0
|
|
|
|
Provides: bundled(golang(github.com/dtylman/scp)) = v0.0.0_20181017070807_f3000a34aef4
|
2022-05-06 16:08:27 +00:00
|
|
|
Provides: bundled(golang(github.com/fsnotify/fsnotify)) = v1.5.4
|
2020-08-31 14:04:00 +00:00
|
|
|
Provides: bundled(golang(github.com/ghodss/yaml)) = v1.0.0
|
2022-05-06 16:08:27 +00:00
|
|
|
Provides: bundled(golang(github.com/godbus/dbus/v5)) = v5.1.0
|
|
|
|
Provides: bundled(golang(github.com/google/gofuzz)) = v1.2.0
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/google/shlex)) = v0.0.0_20191202100458_e7afc7fbc510
|
|
|
|
Provides: bundled(golang(github.com/google/uuid)) = v1.3.0
|
|
|
|
Provides: bundled(golang(github.com/gorilla/handlers)) = v1.5.1
|
|
|
|
Provides: bundled(golang(github.com/gorilla/mux)) = v1.8.0
|
2020-08-31 14:04:00 +00:00
|
|
|
Provides: bundled(golang(github.com/gorilla/schema)) = v1.2.0
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/hashicorp/go_multierror)) = v1.1.1
|
|
|
|
Provides: bundled(golang(github.com/json_iterator/go)) = v1.1.12
|
|
|
|
Provides: bundled(golang(github.com/mattn/go_isatty)) = v0.0.14
|
|
|
|
Provides: bundled(golang(github.com/moby/term)) = v0.0.0_20210619224110_3f7ff695adc6
|
2022-05-06 16:08:27 +00:00
|
|
|
Provides: bundled(golang(github.com/nxadm/tail)) = v1.4.8
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/onsi/ginkgo)) = v1.16.5
|
2022-05-06 16:08:27 +00:00
|
|
|
Provides: bundled(golang(github.com/onsi/gomega)) = v1.19.0
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/opencontainers/go_digest)) = v1.0.0
|
|
|
|
Provides: bundled(golang(github.com/opencontainers/image_spec)) = v1.0.3_0.20220114050600_8b9d41f48198
|
2022-08-03 13:55:33 +00:00
|
|
|
Provides: bundled(golang(github.com/opencontainers/runc)) = v1.1.3
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/opencontainers/runtime_spec)) = v1.0.3_0.20211214071223_8958f93039ab
|
2022-08-03 13:55:33 +00:00
|
|
|
Provides: bundled(golang(github.com/opencontainers/runtime_tools)) = v0.9.1_0.20220714195903_17b3287fafb7
|
2022-05-06 16:08:27 +00:00
|
|
|
Provides: bundled(golang(github.com/opencontainers/selinux)) = v1.10.1
|
|
|
|
Provides: bundled(golang(github.com/rootless_containers/rootlesskit)) = v1.0.1
|
2022-08-03 13:55:33 +00:00
|
|
|
Provides: bundled(golang(github.com/sirupsen/logrus)) = v1.9.0
|
|
|
|
Provides: bundled(golang(github.com/spf13/cobra)) = v1.5.0
|
2020-08-31 14:04:00 +00:00
|
|
|
Provides: bundled(golang(github.com/spf13/pflag)) = v1.0.5
|
2022-08-03 13:55:33 +00:00
|
|
|
Provides: bundled(golang(github.com/stretchr/testify)) = v1.8.0
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/syndtr/gocapability)) = v0.0.0_20200815063812_42c35b437635
|
|
|
|
Provides: bundled(golang(github.com/uber/jaeger_client_go)) = v2.30.0+incompatible
|
|
|
|
Provides: bundled(golang(github.com/ulikunitz/xz)) = v0.5.10
|
2022-08-03 13:55:33 +00:00
|
|
|
Provides: bundled(golang(github.com/vbauerster/mpb/v7)) = v7.4.2
|
2022-01-31 14:00:30 +00:00
|
|
|
Provides: bundled(golang(github.com/vishvananda/netlink)) = v1.1.1_0.20220115184804_dd687eb2f2d4
|
2022-05-18 19:16:30 +00:00
|
|
|
%endif
|
2018-02-06 22:05:10 +00:00
|
|
|
|
|
|
|
%description
|
2019-05-24 14:43:28 +00:00
|
|
|
%{name} (Pod Manager) is a fully featured container engine that is a simple
|
|
|
|
daemonless tool. %{name} provides a Docker-CLI comparable command line that
|
|
|
|
eases the transition from other container engines and allows the management of
|
|
|
|
pods, containers and images. Simply put: alias docker=%{name}.
|
2019-09-17 18:06:00 +00:00
|
|
|
Most %{name} commands can be run as a regular user, without requiring
|
|
|
|
additional privileges.
|
2019-05-17 16:56:00 +00:00
|
|
|
|
2019-09-17 18:06:00 +00:00
|
|
|
%{name} uses Buildah(1) internally to create container images.
|
|
|
|
Both tools share image (not container) storage, hence each can use or
|
|
|
|
manipulate images (but not containers) created by the other.
|
2019-05-17 16:56:00 +00:00
|
|
|
|
2018-02-06 22:05:10 +00:00
|
|
|
%{summary}
|
2019-05-17 16:56:00 +00:00
|
|
|
%{repo} Simple management tool for pods, containers and images
|
2018-02-06 22:05:10 +00:00
|
|
|
|
2018-08-12 10:30:14 +00:00
|
|
|
%package docker
|
2019-05-24 14:43:28 +00:00
|
|
|
Summary: Emulate Docker CLI using %{name}
|
2018-08-20 19:31:47 +00:00
|
|
|
BuildArch: noarch
|
2018-10-18 18:55:59 +00:00
|
|
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
2018-08-20 19:31:47 +00:00
|
|
|
Conflicts: docker
|
|
|
|
Conflicts: docker-latest
|
|
|
|
Conflicts: docker-ce
|
|
|
|
Conflicts: docker-ee
|
2019-01-18 17:59:24 +00:00
|
|
|
Conflicts: moby-engine
|
2018-08-12 10:30:14 +00:00
|
|
|
|
|
|
|
%description docker
|
|
|
|
This package installs a script named docker that emulates the Docker CLI by
|
2019-05-24 14:43:28 +00:00
|
|
|
executes %{name} commands, it also creates links between all Docker CLI man
|
|
|
|
pages and %{name}.
|
2018-08-12 10:30:14 +00:00
|
|
|
|
2019-01-18 17:59:24 +00:00
|
|
|
%package tests
|
2019-05-24 14:43:28 +00:00
|
|
|
Summary: Tests for %{name}
|
2019-01-18 17:59:24 +00:00
|
|
|
|
|
|
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
|
|
|
Requires: bats
|
|
|
|
Requires: jq
|
2020-02-20 13:19:58 +00:00
|
|
|
Requires: skopeo
|
2020-06-01 21:09:26 +00:00
|
|
|
Requires: nmap-ncat
|
2020-08-05 11:57:36 +00:00
|
|
|
Requires: httpd-tools
|
|
|
|
Requires: openssl
|
2020-08-18 13:34:36 +00:00
|
|
|
Requires: socat
|
2020-10-19 12:27:01 +00:00
|
|
|
Requires: buildah
|
2021-11-11 14:20:05 +00:00
|
|
|
Requires: gnupg
|
2019-01-18 17:59:24 +00:00
|
|
|
|
|
|
|
%description tests
|
|
|
|
%{summary}
|
|
|
|
|
|
|
|
This package contains system tests for %{name}
|
|
|
|
|
2019-07-07 17:54:36 +00:00
|
|
|
%package remote
|
|
|
|
Summary: (Experimental) Remote client for managing %{name} containers
|
|
|
|
|
|
|
|
%description remote
|
|
|
|
Remote client for managing %{name} containers.
|
|
|
|
|
|
|
|
This experimental remote client is under heavy development. Please do not
|
|
|
|
run %{name}-remote in production.
|
|
|
|
|
2020-06-01 16:48:43 +00:00
|
|
|
%{name}-remote uses the version 2 API to connect to a %{name} client to
|
2019-07-07 17:54:36 +00:00
|
|
|
manage pods, containers and container images. %{name}-remote supports ssh
|
|
|
|
connections as well.
|
2019-07-07 19:16:20 +00:00
|
|
|
|
2019-10-18 13:02:37 +00:00
|
|
|
%package plugins
|
|
|
|
Summary: Plugins for %{name}
|
2020-09-16 14:55:30 +00:00
|
|
|
Requires: dnsmasq
|
2021-08-16 12:52:47 +00:00
|
|
|
Recommends: %{name}-gvproxy = %{epoch}:%{version}-%{release}
|
2019-10-18 13:02:37 +00:00
|
|
|
|
|
|
|
%description plugins
|
|
|
|
This plugin sets up the use of dnsmasq on a given CNI network so
|
|
|
|
that Pods can resolve each other by name. When configured,
|
|
|
|
the pod and its IP address are added to a network specific hosts file
|
|
|
|
that dnsmasq will read in. Similarly, when a pod
|
|
|
|
is removed from the network, it will remove the entry from the hosts
|
|
|
|
file. Each CNI network will have its own dnsmasq instance.
|
|
|
|
|
2021-08-16 12:52:47 +00:00
|
|
|
%package gvproxy
|
|
|
|
Summary: Go replacement for libslirp and VPNKit
|
|
|
|
|
|
|
|
%description gvproxy
|
|
|
|
A replacement for libslirp and VPNKit, written in pure Go.
|
|
|
|
It is based on the network stack of gVisor. Compared to libslirp,
|
|
|
|
gvisor-tap-vsock brings a configurable DNS server and
|
|
|
|
dynamic port forwarding.
|
|
|
|
|
2018-02-06 22:05:10 +00:00
|
|
|
%prep
|
2022-08-17 17:59:00 +00:00
|
|
|
%autosetup -Sgit -n %{name}-%{built_tag_strip}
|
2022-01-19 20:35:02 +00:00
|
|
|
sed -i 's;@@PODMAN@@\;$(BINDIR);@@PODMAN@@\;%{_bindir};' Makefile
|
2018-02-06 22:05:10 +00:00
|
|
|
|
2019-10-18 13:02:37 +00:00
|
|
|
# untar dnsname
|
|
|
|
tar zxf %{SOURCE1}
|
|
|
|
|
2021-08-16 12:52:47 +00:00
|
|
|
# untar %%{name}-gvproxy
|
2022-01-19 20:35:02 +00:00
|
|
|
tar zxf %{SOURCE2}
|
2021-08-16 12:52:47 +00:00
|
|
|
|
2018-02-06 22:05:10 +00:00
|
|
|
%build
|
2022-05-18 19:16:30 +00:00
|
|
|
%if "%{_vendor}" != "debbuild"
|
2021-10-01 06:33:17 +00:00
|
|
|
%set_build_flags
|
|
|
|
export CGO_CFLAGS=$CFLAGS
|
|
|
|
# These extra flags present in $CFLAGS have been skipped for now as they break the build
|
|
|
|
CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-flto=auto//g')
|
|
|
|
CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-Wp,D_GLIBCXX_ASSERTIONS//g')
|
|
|
|
CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-annobin-cc1//g')
|
|
|
|
|
2020-12-04 17:30:36 +00:00
|
|
|
%ifarch x86_64
|
2021-07-16 19:49:21 +00:00
|
|
|
export CGO_CFLAGS+=" -m64 -mtune=generic -fcf-protection=full"
|
2020-12-04 17:30:36 +00:00
|
|
|
%endif
|
2022-05-18 19:16:30 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
export GO111MODULE=off
|
|
|
|
export GOPATH=$(pwd)/_build:$(pwd)
|
2019-10-18 13:02:37 +00:00
|
|
|
|
2018-02-06 22:05:10 +00:00
|
|
|
mkdir _build
|
2022-05-18 19:16:30 +00:00
|
|
|
cd _build
|
2018-02-06 22:05:10 +00:00
|
|
|
mkdir -p src/%{provider}.%{provider_tld}/%{project}
|
|
|
|
ln -s ../../../../ src/%{import_path}
|
2022-05-18 19:16:30 +00:00
|
|
|
cd ..
|
2018-02-06 22:05:10 +00:00
|
|
|
ln -s vendor src
|
2019-05-24 14:43:28 +00:00
|
|
|
|
2022-01-19 20:35:02 +00:00
|
|
|
# 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
|
|
|
|
|
2019-05-24 14:43:28 +00:00
|
|
|
# build %%{name}
|
2022-02-25 18:49:36 +00:00
|
|
|
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) $(hack/libsubid_tag.sh)"
|
2020-08-19 12:44:16 +00:00
|
|
|
|
2018-08-12 03:03:46 +00:00
|
|
|
%gobuild -o bin/%{name} %{import_path}/cmd/%{name}
|
2018-02-06 22:05:10 +00:00
|
|
|
|
2019-05-24 14:43:28 +00:00
|
|
|
# build %%{name}-remote
|
2022-05-18 19:16:30 +00:00
|
|
|
export BUILDTAGS="seccomp exclude_graphdriver_devicemapper exclude_graphdriver_btrfs btrfs_noversion $(hack/selinux_tag.sh) $(hack/systemd_tag.sh) $(hack/libsubid_tag.sh) remote"
|
2020-06-23 17:55:54 +00:00
|
|
|
%gobuild -o bin/%{name}-remote %{import_path}/cmd/%{name}
|
2019-05-24 14:43:28 +00:00
|
|
|
|
2022-05-18 19:16:30 +00:00
|
|
|
cd %{repo_plugins}-%{commit_plugins}
|
2019-10-18 13:02:37 +00:00
|
|
|
mkdir _build
|
2022-05-18 19:16:30 +00:00
|
|
|
cd _build
|
2019-10-18 13:02:37 +00:00
|
|
|
mkdir -p src/%{provider}.%{provider_tld}/%{project}
|
|
|
|
ln -s ../../../../ src/%{import_path_plugins}
|
2022-05-18 19:16:30 +00:00
|
|
|
cd ..
|
2019-10-18 13:02:37 +00:00
|
|
|
ln -s vendor src
|
|
|
|
export GOPATH=$(pwd)/_build:$(pwd)
|
|
|
|
%gobuild -o bin/dnsname %{import_path_plugins}/plugins/meta/dnsname
|
2022-05-18 19:16:30 +00:00
|
|
|
cd ..
|
2019-10-18 13:02:37 +00:00
|
|
|
|
2022-05-18 19:16:30 +00:00
|
|
|
cd %{repo_gvproxy}-%{commit_gvproxy}
|
2021-08-16 12:52:47 +00:00
|
|
|
mkdir _build
|
2022-05-18 19:16:30 +00:00
|
|
|
cd _build
|
2021-08-16 12:52:47 +00:00
|
|
|
mkdir -p src/%{provider}.%{provider_tld}/%{project}
|
|
|
|
ln -s ../../../../ src/%{import_path_gvproxy}
|
2022-05-18 19:16:30 +00:00
|
|
|
cd ..
|
2021-08-16 12:52:47 +00:00
|
|
|
ln -s vendor src
|
|
|
|
export GOPATH=$(pwd)/_build:$(pwd)
|
2021-08-27 13:52:32 +00:00
|
|
|
%gobuild -o bin/gvproxy %{import_path_gvproxy}/cmd/gvproxy
|
2022-05-18 19:16:30 +00:00
|
|
|
cd ..
|
2021-08-16 12:52:47 +00:00
|
|
|
|
2021-03-03 21:03:36 +00:00
|
|
|
%{__make} docs docker-docs
|
2020-06-23 17:55:54 +00:00
|
|
|
|
2018-02-06 22:05:10 +00:00
|
|
|
%install
|
2018-04-24 19:27:43 +00:00
|
|
|
install -dp %{buildroot}%{_unitdir}
|
2018-11-10 15:30:54 +00:00
|
|
|
PODMAN_VERSION=%{version} %{__make} PREFIX=%{buildroot}%{_prefix} ETCDIR=%{buildroot}%{_sysconfdir} \
|
2022-01-31 13:38:15 +00:00
|
|
|
install.bin \
|
|
|
|
install.man \
|
2022-01-19 20:35:02 +00:00
|
|
|
install.systemd \
|
|
|
|
install.completions \
|
|
|
|
install.docker \
|
2022-01-31 13:38:15 +00:00
|
|
|
install.docker-docs \
|
|
|
|
install.remote \
|
2022-02-25 16:50:25 +00:00
|
|
|
%if 0%{?fedora} >= 36
|
|
|
|
install.modules-load
|
|
|
|
%endif
|
2018-02-06 22:05:10 +00:00
|
|
|
|
2021-06-08 14:30:35 +00:00
|
|
|
# install dnsname plugin
|
2022-05-18 19:16:30 +00:00
|
|
|
cd %{repo_plugins}-%{commit_plugins}
|
2019-10-18 13:02:37 +00:00
|
|
|
%{__make} PREFIX=%{_prefix} DESTDIR=%{buildroot} install
|
2022-05-18 19:16:30 +00:00
|
|
|
cd ..
|
2019-10-18 13:02:37 +00:00
|
|
|
|
2021-08-16 12:52:47 +00:00
|
|
|
# install gvproxy
|
2022-05-18 19:16:30 +00:00
|
|
|
cd %{repo_gvproxy}-%{commit_gvproxy}
|
2021-08-16 12:52:47 +00:00
|
|
|
install -dp %{buildroot}%{_libexecdir}/%{name}
|
2021-08-27 13:52:32 +00:00
|
|
|
install -p -m0755 bin/gvproxy %{buildroot}%{_libexecdir}/%{name}
|
2022-05-18 19:16:30 +00:00
|
|
|
cd ..
|
2021-08-16 12:52:47 +00:00
|
|
|
|
2020-01-08 13:51:56 +00:00
|
|
|
# do not include docker and podman-remote man pages in main package
|
|
|
|
for file in `find %{buildroot}%{_mandir}/man[15] -type f | sed "s,%{buildroot},," | grep -v -e remote -e docker`; do
|
|
|
|
echo "$file*" >> podman.file-list
|
|
|
|
done
|
|
|
|
|
2022-01-31 13:38:15 +00:00
|
|
|
rm -f %{buildroot}%{_mandir}/man5/docker*.5
|
|
|
|
|
2019-01-18 17:59:24 +00:00
|
|
|
install -d -p %{buildroot}/%{_datadir}/%{name}/test/system
|
|
|
|
cp -pav test/system %{buildroot}/%{_datadir}/%{name}/test/
|
|
|
|
|
2018-02-06 22:05:10 +00:00
|
|
|
#define license tag if not already defined
|
|
|
|
%{!?_licensedir:%global license %doc}
|
|
|
|
|
2020-03-30 15:49:05 +00:00
|
|
|
%files -f %{name}.file-list
|
2018-02-06 22:05:10 +00:00
|
|
|
%license LICENSE
|
2022-08-03 13:55:33 +00:00
|
|
|
%doc README.md CONTRIBUTING.md install.md transfer.md
|
2018-02-06 22:05:10 +00:00
|
|
|
%{_bindir}/%{name}
|
2022-01-19 20:35:02 +00:00
|
|
|
%dir %{_libexecdir}/%{name}
|
|
|
|
%{_libexecdir}/%{name}/rootlessport
|
2020-11-17 16:18:25 +00:00
|
|
|
%{_datadir}/bash-completion/completions/%{name}
|
2019-03-17 15:16:57 +00:00
|
|
|
# By "owning" the site-functions dir, we don't need to Require zsh
|
2019-05-24 11:52:44 +00:00
|
|
|
%dir %{_datadir}/zsh/site-functions
|
2019-05-24 14:43:28 +00:00
|
|
|
%{_datadir}/zsh/site-functions/_%{name}
|
2020-11-16 01:27:29 +00:00
|
|
|
%dir %{_datadir}/fish/vendor_completions.d
|
|
|
|
%{_datadir}/fish/vendor_completions.d/%{name}.fish
|
2022-01-19 20:35:02 +00:00
|
|
|
%{_unitdir}/%{name}*
|
|
|
|
%{_userunitdir}/%{name}*
|
2022-08-24 14:14:56 +00:00
|
|
|
%{_tmpfilesdir}/%{name}.conf
|
2022-02-25 16:50:25 +00:00
|
|
|
%if 0%{?fedora} >= 36
|
|
|
|
%{_modulesloaddir}/%{name}-iptables.conf
|
|
|
|
%endif
|
2018-02-06 22:05:10 +00:00
|
|
|
|
2018-08-20 19:31:47 +00:00
|
|
|
%files docker
|
|
|
|
%{_bindir}/docker
|
|
|
|
%{_mandir}/man1/docker*.1*
|
2022-08-24 15:08:01 +00:00
|
|
|
%{_tmpfilesdir}/%{name}-docker.conf
|
2018-08-20 19:31:47 +00:00
|
|
|
|
2020-06-23 17:55:54 +00:00
|
|
|
%files remote
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/%{name}-remote
|
|
|
|
%{_mandir}/man1/%{name}-remote*.*
|
2020-11-17 16:18:25 +00:00
|
|
|
%{_datadir}/bash-completion/completions/%{name}-remote
|
|
|
|
%dir %{_datadir}/fish/vendor_completions.d
|
|
|
|
%{_datadir}/fish/vendor_completions.d/%{name}-remote.fish
|
|
|
|
%dir %{_datadir}/zsh/site-functions
|
|
|
|
%{_datadir}/zsh/site-functions/_%{name}-remote
|
2019-02-26 22:44:04 +00:00
|
|
|
|
2019-01-18 17:59:24 +00:00
|
|
|
%files tests
|
|
|
|
%license LICENSE
|
|
|
|
%{_datadir}/%{name}/test
|
|
|
|
|
2019-10-18 13:02:37 +00:00
|
|
|
%files plugins
|
2021-08-16 12:52:47 +00:00
|
|
|
%license %{repo_plugins}-%{commit_plugins}/LICENSE
|
|
|
|
%doc %{repo_plugins}-%{commit_plugins}/{README.md,README_PODMAN.md}
|
2021-06-29 15:10:59 +00:00
|
|
|
%dir %{_libexecdir}/cni
|
2019-10-18 13:02:37 +00:00
|
|
|
%{_libexecdir}/cni/dnsname
|
|
|
|
|
2021-08-16 12:52:47 +00:00
|
|
|
%files gvproxy
|
|
|
|
%license %{repo_gvproxy}-%{commit_gvproxy}/LICENSE
|
|
|
|
%doc %{repo_gvproxy}-%{commit_gvproxy}/README.md
|
|
|
|
%dir %{_libexecdir}/%{name}
|
2021-08-27 13:52:32 +00:00
|
|
|
%{_libexecdir}/%{name}/gvproxy
|
2021-08-16 12:52:47 +00:00
|
|
|
|
2018-02-06 22:05:10 +00:00
|
|
|
%changelog
|
2022-06-06 19:17:21 +00:00
|
|
|
%if "%{_vendor}" != "debbuild"
|
|
|
|
%autochangelog
|
|
|
|
%endif
|