From b4fc1698440d29eb7729d37561ae78895607e07e Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 23 Mar 2023 06:42:10 +0000 Subject: automatic import of podman --- .gitignore | 1 + podman.spec | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 256 insertions(+) create mode 100644 podman.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..b3a745a 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/podman-1051456c.tar.gz diff --git a/podman.spec b/podman.spec new file mode 100644 index 0000000..b421477 --- /dev/null +++ b/podman.spec @@ -0,0 +1,254 @@ +# For automatic rebuilds in COPR + +# The following tag is to get correct syntax highlighting for this file in vim text editor +# vim: syntax=spec + +%global with_debug 1 + +# _user_tmpfiles.d currently undefined on rhel +%if 0%{?rhel} +%global _user_tmpfilesdir %{_datadir}/user-tmpfiles.d +%endif + +%if 0%{?with_debug} +%global _find_debuginfo_dwz_opts %{nil} +%global _dwz_low_mem_die_limit 0 +%else +%global debug_package %{nil} +%endif + +# RHEL 8's default %%gobuild macro doesn't account for the BUILDTAGS variable, so we +# set it separately here and do not depend on RHEL 8's go-srpm-macros package. +%if !0%{?fedora} && 0%{?rhel} <= 8 +%define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "-linkmode=external -compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**}; +%endif + +Name: podman +Epoch: 101 +Version: 0.0.git.18324.1051456c +Release: 1%{?dist} +Summary: Manage Pods, Containers and Container Images +License: Apache-2.0 +URL: https://github.com/containers/podman +VCS: git+https://github.com/containers/podman#1051456c041bb89bb1350794dde6020a0eb302cd: +Source: podman-1051456c.tar.gz +%if 0%{?fedora} && ! 0%{?rhel} +BuildRequires: btrfs-progs-devel +%endif +BuildRequires: gcc +BuildRequires: golang >= 1.16.6 +BuildRequires: glib2-devel +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) +BuildRequires: python3 +%endif +BuildRequires: gpgme-devel +BuildRequires: libassuan-devel +BuildRequires: libgpg-error-devel +BuildRequires: libseccomp-devel +BuildRequires: libselinux-devel +BuildRequires: shadow-utils-subid-devel +BuildRequires: pkgconfig +BuildRequires: make +BuildRequires: ostree-devel +%{?systemd_requires} +BuildRequires: systemd +BuildRequires: systemd-devel +Requires: conmon >= 2:2.0.30-2 +Requires: containers-common-extra >= 4:1-87 +Recommends: catatonit +Conflicts: quadlet +Provides: %{name}-quadlet +Obsoletes: %{name}-quadlet <= 101:0.0.git.17877.f247b4d4-1 +Provides: %{name}-quadlet = %{epoch}:%{version}-%{release} + +%description +%{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}. +Most %{name} commands can be run as a regular user, without requiring +additional privileges. + +%{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. + +%package docker +Summary: Emulate Docker CLI using %{name} +BuildArch: noarch +Requires: %{name} = %{epoch}:%{version}-%{release} +Conflicts: docker +Conflicts: docker-latest +Conflicts: docker-ce +Conflicts: docker-ee +Conflicts: moby-engine + +%description docker +This package installs a script named docker that emulates the Docker CLI by +executes %{name} commands, it also creates links between all Docker CLI man +pages and %{name}. + +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: bats +Requires: jq +Requires: skopeo +Requires: nmap-ncat +Requires: httpd-tools +Requires: openssl +Requires: socat +Requires: buildah +Requires: gnupg + +%description tests +%{summary} + +This package contains system tests for %{name} + +%package remote +Summary: (Experimental) Remote client for managing %{name} containers + +%description remote +Remote client for managing %{name} containers. + +%{name}-remote uses the libpod REST API to connect to a %{name} client to +manage pods, containers and container images. %{name}-remote supports ssh +connections as well. + +%prep +%setup -T -b 0 -q -n podman + +%build +%set_build_flags +%global gomodulesmode GO111MODULE=on +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') + +%ifarch x86_64 +export CGO_CFLAGS+=" -m64 -mtune=generic -fcf-protection=full" +%endif + +# build date. FIXME: Makefile uses '/v2/libpod', that doesn't work here? +LDFLAGS="-X ./libpod/define.buildInfo=$(date +%s)" + +# build rootlessport first +%gobuild -o bin/rootlessport ./cmd/rootlessport + +# 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} ./cmd/%{name} + +# build %%{name}-remote +export BUILDTAGS="$BASEBUILDTAGS exclude_graphdriver_btrfs btrfs_noversion remote" +%gobuild -o bin/%{name}-remote ./cmd/%{name} + +# build quadlet +export BUILDTAGS="$BASEBUILDTAGS $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh)" +%gobuild -o bin/quadlet ./cmd/quadlet + +make docs docker-docs + +%install +PODMAN_VERSION=%{version} %{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} ETCDIR=%{buildroot}%{_sysconfdir} \ + install.bin \ + install.man \ + install.systemd \ + install.completions \ + install.docker \ + install.docker-docs \ + install.remote \ +%if 0%{?fedora} || 0%{?rhel} >= 10 + install.modules-load +%endif + +install -d -p %{buildroot}/%{_datadir}/%{name}/test/system +cp -pav test/system %{buildroot}/%{_datadir}/%{name}/test/ + +# do not include docker and %%{name}-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*" >> %{name}.file-list +done + +%post +if [ $1 -eq 1 ]; then + %{_bindir}/systemctl enable --now %{name}-restart.service +fi + +%preun +%systemd_preun %{name}-restart.service + +%postun +%systemd_postun %{name}-restart.service + +# This lists all the files that are included in the rpm package and that +# are going to be installed into target system where the rpm is installed. +%files -f %{name}.file-list +%license LICENSE +%doc README.md CONTRIBUTING.md install.md transfer.md +%{_bindir}/%{name} +%dir %{_libexecdir}/%{name} +%{_libexecdir}/%{name}/rootlessport +%{_libexecdir}/%{name}/quadlet +%{_systemdgeneratordir}/%{name}-system-generator +%{_systemdusergeneratordir}/%{name}-user-generator +%{_datadir}/bash-completion/completions/%{name} +# By "owning" the site-functions dir, we don't need to Require zsh +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/_%{name} +%dir %{_datadir}/fish/vendor_completions.d +%{_datadir}/fish/vendor_completions.d/%{name}.fish +%{_unitdir}/%{name}-auto-update.service +%{_unitdir}/%{name}-auto-update.timer +%{_unitdir}/%{name}.service +%{_unitdir}/%{name}.socket +%{_unitdir}/%{name}-restart.service +%{_unitdir}/%{name}-kube@.service +%{_unitdir}/%{name}-clean-transient.service +%{_userunitdir}/%{name}-auto-update.service +%{_userunitdir}/%{name}-auto-update.timer +%{_userunitdir}/%{name}.service +%{_userunitdir}/%{name}.socket +%{_userunitdir}/%{name}-restart.service +%{_userunitdir}/%{name}-kube@.service +%{_tmpfilesdir}/%{name}.conf +%{_user_tmpfilesdir}/%{name}-docker.conf +%if 0%{?fedora} || 0%{?rhel} >= 10 +%{_modulesloaddir}/%{name}-iptables.conf +%endif + +%files docker +%{_bindir}/docker +%{_mandir}/man1/docker*.1* +%{_mandir}/man5/docker*.5* +%{_usr}/lib/tmpfiles.d/%{name}-docker.conf + +%files remote +%license LICENSE +%{_bindir}/%{name}-remote +%{_mandir}/man1/%{name}-remote*.* +%{_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 + +%files tests +%license LICENSE +%{_datadir}/%{name}/test + +%changelog diff --git a/sources b/sources new file mode 100644 index 0000000..fcef9ef --- /dev/null +++ b/sources @@ -0,0 +1 @@ +4feb19d117e73a2cd3852a1e2dc9b0f7 podman-1051456c.tar.gz -- cgit v1.2.3