From e6bfc81a8f53d687217ae7830bfe808edfb80475 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Fri, 26 May 2023 13:44:00 -0400 Subject: [PATCH] RPM: bump gvisor-tap-vsock subpackage and fix packit scripts gvisor-tap-vsock: - bump to v0.6.1 - installs /usr/libexecdir/podman/gvforwarder packit: - fix pre-sync action in propose-downstream Ref: https://dashboard.packit.dev/results/propose-downstream/2581 cleanup: - remove `contrib/spec/python-podman.spec.in`. No longer needed. [NO NEW TESTS NEEDED] Signed-off-by: Lokesh Mandvekar --- .packit.yaml | 2 +- contrib/spec/python-podman.spec.in | 98 ------------------------------ rpm/podman.spec | 5 +- rpm/update-spec-provides.sh | 3 +- rpm/update-spec-version.sh | 4 +- 5 files changed, 10 insertions(+), 102 deletions(-) delete mode 100644 contrib/spec/python-podman.spec.in diff --git a/.packit.yaml b/.packit.yaml index d635431248..584b616a87 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -35,7 +35,7 @@ jobs: - fedora-all actions: pre-sync: - - "cd rpm && bash update-spec-provides.sh" + - "bash rpm/update-spec-provides.sh" - job: koji_build trigger: commit diff --git a/contrib/spec/python-podman.spec.in b/contrib/spec/python-podman.spec.in deleted file mode 100644 index 1fc817d1f6..0000000000 --- a/contrib/spec/python-podman.spec.in +++ /dev/null @@ -1,98 +0,0 @@ -# If any of the following macros should be set otherwise, -# you can wrap any of them with the following conditions: -# - %%if 0%%{?centos} == 7 -# - %%if 0%%{?rhel} == 7 -# - %%if 0%%{?fedora} == 23 -# Or just test for particular distribution: -# - %%if 0%%{?centos} -# - %%if 0%%{?rhel} -# - %%if 0%%{?fedora} -# -# Be aware, on centos, both %%rhel and %%centos are set. If you want to test -# rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0 condition. -# (Don't forget to replace double percentage symbol with single one in order to apply a condition) - -%undefine _enable_debug_packages - -%global provider github -%global provider_tld com -%global project containers -%global repo libpod -# https://github.com/containers/podman -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit #COMMIT# -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -Name: python3-podman -Version: 0.7.3 -Release: #COMMITDATE#.git%{shortcommit}%{?dist} -Summary: Python 3 bindings and client for podman -License: ASL 2.0 -URL: https://%{provider_prefix} -Source0: https://api.%{provider}.%{provider_tld}/repos/%{project}/%{repo}/tarball/%{commit} - -BuildArch: noarch -BuildRequires: git -BuildRequires: python3-devel -BuildRequires: python3-setuptools - -Requires: python3-humanize -Requires: python3-pytoml -Requires: python3-setuptools -Requires: python3-psutil -Requires: podman - -Provides: %{name} = %{version}-%{release} - -%description -%{summary} -python3-podman provides python bindings and client for communicating -with podman as a service. - -%prep -%autosetup -Sgit -n %{project}-%{repo}-%{shortcommit} - -%build -export PODMAN_VERSION=%{version} - -pushd contrib/python/podman -%{__python3} setup.py build -popd - -pushd contrib/python/pypodman -%{__python3} setup.py build -popd - -%install -export PODMAN_VERSION=%{version} - -install -d -m 755 %{buildroot}%{_mandir}/man1 - -pushd contrib/python/pypodman -install -m 644 -t %{buildroot}%{_mandir}/man1 docs/man1/*.1 -%{__python3} setup.py install --skip-build --root %{buildroot} -popd - -pushd contrib/python/podman -%{__python3} setup.py install --skip-build --root %{buildroot} -popd - - -%check -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - -%files -%license LICENSE -%doc README.md CONTRIBUTING.md install.md CODE-OF-CONDUCT.md transfer.md -%{_bindir}/pypodman -%{_mandir}/man1/pypodman.1* -%dir %{python3_sitelib}/podman -%dir %{python3_sitelib}/pypodman -%{python3_sitelib}/podman/* -%{python3_sitelib}/pypodman/* -%{python3_sitelib}/podman-%{version}*.egg-info -%{python3_sitelib}/pypodman-%{version}*.egg-info - -%changelog diff --git a/rpm/podman.spec b/rpm/podman.spec index bf76488c12..042fd29152 100644 --- a/rpm/podman.spec +++ b/rpm/podman.spec @@ -79,7 +79,7 @@ # https://github.com/containers/gvisor-tap-vsock %global import_path_gvproxy %{provider}.%{provider_tld}/%{project}/%{repo_gvproxy} %global git_gvproxy https://%{import_path_gvproxy} -%global commit_gvproxy aab0ac9367fc5142f5857c36ac2352bcb3c60ab7 +%global commit_gvproxy 407efb5dcdb0f4445935f7360535800b60447544 # podman %global git0 https://github.com/containers/%{name} @@ -313,6 +313,7 @@ cd .. ln -s vendor src export GOPATH=$(pwd)/_build:$(pwd) %gobuild -o bin/gvproxy %{import_path_gvproxy}/cmd/gvproxy +%gobuild -o bin/gvforwarder %{import_path_gvproxy}/cmd/vm cd .. %{__make} docs docker-docs @@ -342,6 +343,7 @@ cd .. 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 @@ -410,6 +412,7 @@ cp -pav test/system %{buildroot}/%{_datadir}/%{name}/test/ %doc %{repo_gvproxy}-%{commit_gvproxy}/README.md %dir %{_libexecdir}/%{name} %{_libexecdir}/%{name}/gvproxy +%{_libexecdir}/%{name}/gvforwarder %changelog %if %{with changelog} diff --git a/rpm/update-spec-provides.sh b/rpm/update-spec-provides.sh index 2dd8594676..d4ca53504c 100644 --- a/rpm/update-spec-provides.sh +++ b/rpm/update-spec-provides.sh @@ -6,7 +6,8 @@ set -e -SPEC_FILE=$(pwd)/podman.spec +# script is run from git root directory +SPEC_FILE=rpm/podman.spec sed -i '/Provides: bundled(golang.*/d' $SPEC_FILE diff --git a/rpm/update-spec-version.sh b/rpm/update-spec-version.sh index 8d43f27a42..ec7173b1d6 100644 --- a/rpm/update-spec-version.sh +++ b/rpm/update-spec-version.sh @@ -6,7 +6,9 @@ set -e -SPEC_FILE=$(pwd)/podman.spec +# Script is run from git root directory +SPEC_FILE=rpm/podman.spec + LATEST_TAG=$(git tag --sort=creatordate | tail -1) LATEST_VERSION=$(echo $LATEST_TAG | sed -e 's/^v//')