diff --git a/.gitignore b/.gitignore index 3b07634..738961d 100644 --- a/.gitignore +++ b/.gitignore @@ -1831,3 +1831,18 @@ /v4.5.1.tar.gz /v4.6.0-rc1.tar.gz /v4.6.0-rc2.tar.gz +/v4.6.0.tar.gz +/v4.6.1.tar.gz +/v4.6.2.tar.gz +/v4.7.0.tar.gz +/v4.7.1.tar.gz +/v4.7.2.tar.gz +/v4.8.0-rc1.tar.gz +/v4.8.0.tar.gz +/v4.8.1.tar.gz +/v4.8.2.tar.gz +/v4.8.3.tar.gz +/v4.9.0.tar.gz +/v4.9.2.tar.gz +/v4.9.3.tar.gz +/v4.9.4.tar.gz diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..8d0fb3e --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,71 @@ +--- +# See the documentation for more information: +# https://packit.dev/docs/configuration/ + +specfile_path: rpm/podman.spec +upstream_tag_template: v{version} + +srpm_build_deps: + - git-archive-all + - make + +actions: + fix-spec-file: + - "bash .packit.sh" + +jobs: + - job: copr_build + trigger: pull_request + notifications: + failure_comment: + message: "Ephemeral COPR build failed. @containers/packit-build please check." + enable_net: true + targets: + - fedora-all-x86_64 + - fedora-all-aarch64 + - fedora-eln-x86_64 + - fedora-eln-aarch64 + - centos-stream+epel-next-8-x86_64 + - centos-stream+epel-next-8-aarch64 + - centos-stream+epel-next-9-x86_64 + - centos-stream+epel-next-9-aarch64 + additional_repos: + - "copr://rhcontainerbot/podman-next" + + # Run on commit to main branch + - job: copr_build + trigger: commit + notifications: + failure_comment: + message: "podman-next COPR build failed. @containers/packit-build please check." + branch: main + owner: rhcontainerbot + project: podman-next + enable_net: true + + - job: tests + identifier: cockpit-revdeps + trigger: pull_request + notifications: + failure_comment: + message: "Cockpit tests failed for commit {commit_sha}. @martinpitt, @jelly, @mvollmer please check." + targets: + - fedora-latest-stable + - fedora-development + tf_extra_params: + environments: + - artifacts: + - type: repository-file + id: https://copr.fedorainfracloud.org/coprs/g/cockpit/main-builds/repo/fedora-$releasever/group_cockpit-main-builds-fedora-$releasever.repo + - type: repository-file + id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-$releasever/rhcontainerbot-podman-next-fedora-$releasever.repo + tmt: + context: + revdeps: "yes" + + - job: propose_downstream + trigger: release + update_release: false + dist_git_branches: + - fedora-39 + - fedora-38 diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..d401b46 --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 0.94.0.post1.dev8+g4b1f9717. diff --git a/podman.spec b/podman.spec index b907f5b..a6bb53b 100644 --- a/podman.spec +++ b/podman.spec @@ -7,12 +7,18 @@ %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 %{defined rhel} && 0%{?rhel} == 8 +# RHEL's default %%gobuild macro doesn't account for the BUILDTAGS variable, so we +# set it separately here and do not depend on RHEL's go-[s]rpm-macros package +# until that's fixed. +# c9s bz: https://bugzilla.redhat.com/show_bug.cgi?id=2227328 +# c8s bz: https://bugzilla.redhat.com/show_bug.cgi?id=2227331 +%if %{defined rhel} && 0%{?rhel} < 10 %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 %{?**}; +# python3 dep conditional for rhel8 +%if %{?rhel} == 8 %define rhel8py3 1 %endif +%endif %global gomodulesmode GO111MODULE=on @@ -25,6 +31,10 @@ %define build_with_btrfs 1 %endif +%if %{defined copr_username} +%define copr_build 1 +%endif + %global container_base_path github.com/containers %global container_base_url https://%{container_base_path} @@ -41,13 +51,8 @@ %global commit_plugins 18822f9a4fb35d1349eb256f4cd2bfd372474d84 %global import_path_plugins %{container_base_path}/%{repo_plugins} -# gvproxy -%global repo_gvproxy gvisor-tap-vsock -%global git_gvproxy %{container_base_url}/%{repo_gvproxy} -%global commit_gvproxy 407efb5dcdb0f4445935f7360535800b60447544 - Name: podman -%if %{defined copr_username} +%if %{defined copr_build} Epoch: 102 %else Epoch: 5 @@ -58,8 +63,9 @@ Epoch: 5 # If that's what you're reading, Version must be 0, and will be updated by Packit for # copr and koji builds. # If you're reading this on dist-git, the version is automatically filled in by Packit. -Version: 4.6.0~rc2 -License: Apache-2.0 and BSD-2-Clause and BSD-3-Clause and ISC and MIT and MPL-2.0 +Version: 4.9.4 +# The `AND` needs to be uppercase in the License for SPDX compatibility +License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 Release: %autorelease %if %{defined golang_arches_future} ExclusiveArch: %{golang_arches_future} @@ -69,12 +75,10 @@ ExclusiveArch: aarch64 ppc64le s390x x86_64 Summary: Manage Pods, Containers and Container Images URL: https://%{name}.io/ # All SourceN files fetched from upstream -Source0: %{git0}/archive/v4.6.0-rc2.tar.gz +Source0: %{git0}/archive/v%{version_no_tilde}.tar.gz Source1: %{git_plugins}/archive/%{commit_plugins}/%{repo_plugins}-%{commit_plugins}.tar.gz -Source2: %{git_gvproxy}/archive/%{commit_gvproxy}/%{repo_gvproxy}-%{commit_gvproxy}.tar.gz Provides: %{name}-manpages = %{epoch}:%{version}-%{release} BuildRequires: %{_bindir}/envsubst -BuildRequires: %{_bindir}/go-md2man %if %{defined build_with_btrfs} BuildRequires: btrfs-progs-devel %endif @@ -95,6 +99,7 @@ BuildRequires: libselinux-devel BuildRequires: shadow-utils-subid-devel BuildRequires: pkgconfig BuildRequires: make +BuildRequires: man-db BuildRequires: ostree-devel BuildRequires: systemd BuildRequires: systemd-devel @@ -104,7 +109,12 @@ BuildRequires: python3 Requires: catatonit Requires: conmon >= 2:2.1.7-2 Requires: containers-common-extra -Recommends: %{name}-gvproxy = %{epoch}:%{version}-%{release} +%if %{defined rhel} && !%{defined eln} +Recommends: gvisor-tap-vsock-gvforwarder +%else +Requires: gvisor-tap-vsock-gvforwarder +%endif +Recommends: gvisor-tap-vsock Provides: %{name}-quadlet Obsoletes: %{name}-quadlet <= 5:4.4.0-1 Provides: %{name}-quadlet = %{epoch}:%{version}-%{release} @@ -174,7 +184,7 @@ connections as well. %package plugins Summary: Plugins for %{name} Requires: dnsmasq -Recommends: %{name}-gvproxy = %{epoch}:%{version}-%{release} +Recommends: gvisor-tap-vsock %description plugins This plugin sets up the use of dnsmasq on a given CNI network so @@ -184,15 +194,6 @@ 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. -%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. - %package -n %{name}sh Summary: Confined login and user shell using %{name} Requires: %{name} = %{epoch}:%{version}-%{release} @@ -204,18 +205,23 @@ Provides: %{name}-%{name}sh = %{epoch}:%{version}-%{release} capabilities specified in user quadlets. It is a symlink to %{_bindir}/%{name} and execs into the `%{name}sh` container -when `%{_bindir}/%{name}sh is set as a login shell or set as os.Args[0]. +when `%{_bindir}/%{name}sh` is set as a login shell or set as os.Args[0]. %prep -%autosetup -Sgit -n %{name}-4.6.0-rc2 +%autosetup -Sgit -n %{name}-%{version_no_tilde} sed -i 's;@@PODMAN@@\;$(BINDIR);@@PODMAN@@\;%{_bindir};' Makefile +# These changes are only meant for copr builds +%if %{defined copr_build} +# podman --version should show short sha +sed -i "s/^const RawVersion = .*/const RawVersion = \"##VERSION##-##SHORT_SHA##\"/" version/rawversion/version.go +# use ParseTolerant to allow short sha in version +sed -i "s/^var Version.*/var Version, err = semver.ParseTolerant(rawversion.RawVersion)/" version/version.go +%endif + # untar dnsname tar zxf %{SOURCE1} -# untar %%{name}-gvproxy -tar zxf %{SOURCE2} - %build %set_build_flags export CGO_CFLAGS=$CFLAGS @@ -229,6 +235,8 @@ CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-an export CGO_CFLAGS+=" -m64 -mtune=generic -fcf-protection=full" %endif +export GOPROXY=direct + LDFLAGS="-X %{ld_libpod}/define.buildInfo=$(date +%s) \ -X %{ld_libpod}/config._installPrefix=%{_prefix} \ -X %{ld_libpod}/config._etcDir=%{_sysconfdir} \ @@ -251,15 +259,9 @@ export BUILDTAGS="$BASEBUILDTAGS exclude_graphdriver_btrfs btrfs_noversion remot export BUILDTAGS="$BASEBUILDTAGS $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh)" %gobuild -o bin/quadlet ./cmd/quadlet -# reset LDFLAGS for plugins and gvisor binaries +# reset LDFLAGS for plugins binaries LDFLAGS='' -# build gvisor-tap-vsock binaries -cd %{repo_gvproxy}-%{commit_gvproxy} -%gobuild -o bin/gvproxy ./cmd/gvproxy -%gobuild -o bin/gvforwarder ./cmd/vm -cd .. - %{__make} docs docker-docs # build dnsname the old way otherwise it fails on koji @@ -296,13 +298,6 @@ cd %{repo_plugins}-%{commit_plugins} %{__make} PREFIX=%{_prefix} DESTDIR=%{buildroot} install cd .. -# install gvproxy -cd %{repo_gvproxy}-%{commit_gvproxy} -install -dp %{buildroot}%{_libexecdir}/%{name} -install -p -m0755 bin/gvproxy %{buildroot}%{_libexecdir}/%{name} -install -p -m0755 bin/gvforwarder %{buildroot}%{_libexecdir}/%{name} -cd .. - # 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 @@ -355,7 +350,6 @@ cp -pav test/system %{buildroot}/%{_datadir}/%{name}/test/ %{_datadir}/zsh/site-functions/_%{name}-remote %files tests -%license LICENSE %{_datadir}/%{name}/test %files plugins @@ -364,16 +358,7 @@ cp -pav test/system %{buildroot}/%{_datadir}/%{name}/test/ %dir %{_libexecdir}/cni %{_libexecdir}/cni/dnsname -%files gvproxy -%license %{repo_gvproxy}-%{commit_gvproxy}/LICENSE -%doc %{repo_gvproxy}-%{commit_gvproxy}/README.md -%dir %{_libexecdir}/%{name} -%{_libexecdir}/%{name}/gvproxy -%{_libexecdir}/%{name}/gvforwarder - %files -n %{name}sh -%license LICENSE -%doc README.md CONTRIBUTING.md install.md transfer.md %{_bindir}/%{name}sh %changelog diff --git a/sources b/sources index 0c97bd1..887353d 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ +SHA512 (v4.9.4.tar.gz) = 7b52555789a1c214fcf26b0826bdda6cf0ccca588f87c0f15ac5e8358ddac625e17cafbe6a43de07cad964e1418b5ee0d2e38a5cb5dc6f6d4e638399749a7f7b SHA512 (dnsname-18822f9a4fb35d1349eb256f4cd2bfd372474d84.tar.gz) = de371722fbf18cd23b31485ee7ba36bb41d0d9a932d15e50872989c3ca1ff7246da63143c3725d81089fadda3821a54c18b22150d9d16005b07df6824f5f71f8 -SHA512 (gvisor-tap-vsock-407efb5dcdb0f4445935f7360535800b60447544.tar.gz) = 8b9e687c8be7063641839b5764787ae82561635ae6410585a3c70552bed741e6a63154f55d0209a6408861d5ee76619a765e70b2deda37d38802f6e5b57f2a4c -SHA512 (v4.6.0-rc2.tar.gz) = 96dc23df93269c5c83e15bfeb33606505205aef7ee2064f69babf6f4fae9c2d1a416d397f34119de30f1d086192b307771c67d66ae256ace1dfd4a24b7c675bf diff --git a/tests/roles/run_bats_tests/files/run_bats_tests.sh b/tests/roles/run_bats_tests/files/run_bats_tests.sh index 249c3ec..90884cb 100755 --- a/tests/roles/run_bats_tests/files/run_bats_tests.sh +++ b/tests/roles/run_bats_tests/files/run_bats_tests.sh @@ -27,7 +27,7 @@ exec &> >(tee -a $FULL_LOG) echo "Packages:" echo " Kernel: $(uname -r)" rpm -qa |\ - egrep 'podman|conmon|containers-common|crun|runc|iptable|slirp|aardvark|netavark|containernetworking-plugins|systemd|container-selinux' |\ + egrep 'podman|conmon|containers-common|crun|runc|iptable|slirp|aardvark|netavark|containernetworking-plugins|systemd|container-selinux|passt' |\ sort |\ sed -e 's/^/ /'