From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E5466158089 for ; Sat, 28 Oct 2023 02:36:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1DE732BC05F; Sat, 28 Oct 2023 02:36:52 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F0F682BC05F for ; Sat, 28 Oct 2023 02:36:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B17B1335C2E for ; Sat, 28 Oct 2023 02:36:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 260B812B1 for ; Sat, 28 Oct 2023 02:36:49 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1698460604.2e1ac618b476ce88d0253866d86c038f0db3e104.zmedico@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-containers/buildah/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-containers/buildah/Manifest app-containers/buildah/buildah-1.32.1.ebuild app-containers/buildah/buildah-9999.ebuild X-VCS-Directories: app-containers/buildah/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 2e1ac618b476ce88d0253866d86c038f0db3e104 X-VCS-Branch: master Date: Sat, 28 Oct 2023 02:36:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 61c65552-7ae7-472f-9202-f5410ba8101d X-Archives-Hash: d48e97f82384917ec380770d0b596276 commit: 2e1ac618b476ce88d0253866d86c038f0db3e104 Author: Rahil Bhimjiani gmail com> AuthorDate: Thu Oct 26 23:33:04 2023 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Oct 28 02:36:44 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e1ac618 app-containers/buildah: add 1.32.1 and update live 1) split out LICENSE 2) Follow upstream's build process in which non-live versions shouldn't have git commit so GIT_COMMIT is no longer needed 3) Swap DEPEND & RDEPEND to closely follow skel.ebuild 4) In src_prepare, make use of usex to keep it concise and readable, following app-containers/podman style 5) In src_install, changes those help with readablility Signed-off-by: Rahil Bhimjiani gmail.com> Closes: https://github.com/gentoo/gentoo/pull/33531 Signed-off-by: Zac Medico gentoo.org> app-containers/buildah/Manifest | 1 + app-containers/buildah/buildah-1.32.1.ebuild | 114 +++++++++++++++++++++++++++ app-containers/buildah/buildah-9999.ebuild | 101 +++++++++++------------- 3 files changed, 161 insertions(+), 55 deletions(-) diff --git a/app-containers/buildah/Manifest b/app-containers/buildah/Manifest index 85c2689ec816..9dc9b7602d58 100644 --- a/app-containers/buildah/Manifest +++ b/app-containers/buildah/Manifest @@ -1,3 +1,4 @@ DIST buildah-1.29.1.tar.gz 15594930 BLAKE2B 71b87352062b3a5df67389897fd0d82c2491c48cffbda808b30e2767a1e290eccfd726be26dbd57fd8d08cfacb74f313058179c40600225d863a9340b772df1e SHA512 ea78aacee9b5cc10e299789d739e7086579e67719ab72b84f6ea5acbaf31d443284387ac92e7c5c1c3da9bd6523f43e2d9c7e2ea5698c251cb5458a384f41b04 DIST buildah-1.30.0.tar.gz 15623786 BLAKE2B e0b2f6d26827cfe40f88a9915f12b6acb385fbd576fa227d4fee02c162077e9c6fe0591c7171405f5645cd06e4068f26e17c2cb963898e38cfbdd61abe68dae2 SHA512 185fd98a59fa8d86fe9f1eadc9b7591e5053674464be10538a7581d8e1f6a25e5032a354c821c32a167e2864acea010243efbbe4f5a4205d8eaa2894f062a25b DIST buildah-1.32.0.tar.gz 18445843 BLAKE2B d7471e3f0733bc626f665c592701666ba41732eb53bf4679da7e9e28dad388532ab8c88e86db553790ced7822168fd6388dc08121e1456404f18a5d96017da60 SHA512 7c61141e43ea2f968a50b4c5ae6b69c2b9734a19774c7ca48bc942b900ca55ec381ac93fdf04f08061640a457551a9e03a45a37d22cb94b34cecded192dced8f +DIST buildah-1.32.1.tar.gz 18452695 BLAKE2B b4f3644a046d0dd96555b810e488ea78dc396692e539978856fbc2b22010bce3ed9f578949e8de02579325fa59e00fba59908724952b8c323889c816ae4f1af6 SHA512 e5c59f158b786809c89465361a662211bbef6bb4c27c79490604923d924c2030398a0878b122b246b02ae246bd977b7ccffdc6de4f06e80f096c2921c34bf04a diff --git a/app-containers/buildah/buildah-1.32.1.ebuild b/app-containers/buildah/buildah-1.32.1.ebuild new file mode 100644 index 000000000000..eb761d5bc896 --- /dev/null +++ b/app-containers/buildah/buildah-1.32.1.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module linux-info + +DESCRIPTION="A tool that facilitates building OCI images" +HOMEPAGE="https://github.com/containers/buildah" +# main pkg +LICENSE="Apache-2.0" +# deps +LICENSE+=" BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0" + +SLOT="0" +IUSE="apparmor btrfs +seccomp systemd doc test" +RESTRICT="test" +EXTRA_DOCS=( + "CHANGELOG.md" + "CONTRIBUTING.md" + "install.md" + "troubleshooting.md" + "docs/tutorials" +) + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/containers/buildah.git" +else + SRC_URI="https://github.com/containers/buildah/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64" +fi + +RDEPEND=" + systemd? ( sys-apps/systemd ) + btrfs? ( sys-fs/btrfs-progs ) + seccomp? ( sys-libs/libseccomp:= ) + apparmor? ( sys-libs/libapparmor:= ) + app-crypt/gpgme:= + dev-libs/libgpg-error:= + dev-libs/libassuan:= + sys-apps/shadow:= +" +DEPEND="${RDEPEND}" + +pkg_pretend() { + local CONFIG_CHECK="" + use btrfs && CONFIG_CHECK+=" ~BTRFS_FS" + check_extra_config + + linux_config_exists || ewarn "Cannot determine configuration of your kernel." +} + +src_prepare() { + default + + # ensure all necessary files are there + local file + for file in docs/Makefile hack/libsubid_tag.sh hack/apparmor_tag.sh hack/systemd_tag.sh btrfs_installed_tag.sh btrfs_tag.sh; do + [[ -f "${file}" ]] || die + done + + sed -i -e "s|/usr/local|${EPREFIX}/usr|g" Makefile docs/Makefile || die + echo -e '#!/usr/bin/env bash\necho libsubid' > hack/libsubid_tag.sh || die + + cat <<-EOF > hack/apparmor_tag.sh || die + #!/usr/bin/env bash + $(usex apparmor 'echo apparmor' echo) + EOF + + use seccomp || { + cat <<-'EOF' > "${T}/disable_seccomp.patch" + --- a/Makefile + +++ b/Makefile + @@ -5 +5 @@ + -SECURITYTAGS ?= seccomp $(APPARMORTAG) + +SECURITYTAGS ?= $(APPARMORTAG) + EOF + eapply "${T}/disable_seccomp.patch" || die + } + + cat <<-EOF > hack/systemd_tag.sh || die + #!/usr/bin/env bash + $(usex systemd 'echo systemd' echo) + EOF + + echo -e "#!/usr/bin/env bash\n echo" > btrfs_installed_tag.sh || die + cat <<-EOF > btrfs_tag.sh || die + #!/usr/bin/env bash + $(usex btrfs echo 'echo exclude_graphdriver_btrfs btrfs_noversion') + EOF + + use test || { + cat <<-'EOF' > "${T}/disable_tests.patch" + --- a/Makefile + +++ b/Makefile + @@ -54 +54 @@ + -all: bin/buildah bin/imgtype bin/copy bin/tutorial docs + +all: bin/buildah docs + EOF + eapply "${T}/disable_tests.patch" || die + } + +} + +src_test() { + emake test-unit +} + +src_install() { + emake DESTDIR="${D}" install install.completions + einstalldocs + use doc && dodoc -r "${EXTRA_DOCS[@]}" +} diff --git a/app-containers/buildah/buildah-9999.ebuild b/app-containers/buildah/buildah-9999.ebuild index 8ca21b070f70..eb761d5bc896 100644 --- a/app-containers/buildah/buildah-9999.ebuild +++ b/app-containers/buildah/buildah-9999.ebuild @@ -7,7 +7,10 @@ inherit go-module linux-info DESCRIPTION="A tool that facilitates building OCI images" HOMEPAGE="https://github.com/containers/buildah" -LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0" +# main pkg +LICENSE="Apache-2.0" +# deps +LICENSE+=" BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0" SLOT="0" IUSE="apparmor btrfs +seccomp systemd doc test" @@ -15,22 +18,20 @@ RESTRICT="test" EXTRA_DOCS=( "CHANGELOG.md" "CONTRIBUTING.md" - "README.md" "install.md" "troubleshooting.md" "docs/tutorials" ) -if [[ ${PV} == *9999* ]]; then +if [[ ${PV} == 9999* ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/containers/buildah.git" else SRC_URI="https://github.com/containers/buildah/archive/v${PV}.tar.gz -> ${P}.tar.gz" - GIT_COMMIT=2326d49 KEYWORDS="~amd64 ~arm64" fi -DEPEND=" +RDEPEND=" systemd? ( sys-apps/systemd ) btrfs? ( sys-fs/btrfs-progs ) seccomp? ( sys-libs/libseccomp:= ) @@ -40,7 +41,7 @@ DEPEND=" dev-libs/libassuan:= sys-apps/shadow:= " -RDEPEND="${DEPEND}" +DEPEND="${RDEPEND}" pkg_pretend() { local CONFIG_CHECK="" @@ -53,71 +54,61 @@ pkg_pretend() { src_prepare() { default - sed -i -e "s|/usr/local|${EPREFIX}/usr|g" Makefile docs/Makefile || die + # ensure all necessary files are there + local file + for file in docs/Makefile hack/libsubid_tag.sh hack/apparmor_tag.sh hack/systemd_tag.sh btrfs_installed_tag.sh btrfs_tag.sh; do + [[ -f "${file}" ]] || die + done - [[ -f hack/libsubid_tag.sh ]] && echo -e '#!/usr/bin/env bash\necho libsubid' > hack/libsubid_tag.sh || die + sed -i -e "s|/usr/local|${EPREFIX}/usr|g" Makefile docs/Makefile || die + echo -e '#!/usr/bin/env bash\necho libsubid' > hack/libsubid_tag.sh || die - [[ -f hack/apparmor_tag.sh ]] || die - if use apparmor; then - echo -e '#!/usr/bin/env bash\necho apparmor' > hack/apparmor_tag.sh || die - else - echo -e '#!/usr/bin/env bash\necho' > hack/apparmor_tag.sh || die - fi + cat <<-EOF > hack/apparmor_tag.sh || die + #!/usr/bin/env bash + $(usex apparmor 'echo apparmor' echo) + EOF use seccomp || { - cat << 'EOF' > "${T}/disable_seccomp.patch" ---- Makefile -+++ Makefile -@@ -5 +5 @@ --SECURITYTAGS ?= seccomp $(APPARMORTAG) -+SECURITYTAGS ?= $(APPARMORTAG) -EOF - eapply -p0 "${T}/disable_seccomp.patch" || die + cat <<-'EOF' > "${T}/disable_seccomp.patch" + --- a/Makefile + +++ b/Makefile + @@ -5 +5 @@ + -SECURITYTAGS ?= seccomp $(APPARMORTAG) + +SECURITYTAGS ?= $(APPARMORTAG) + EOF + eapply "${T}/disable_seccomp.patch" || die } - [[ -f hack/systemd_tag.sh ]] || die - if use systemd; then - echo -e '#!/usr/bin/env bash\necho systemd' > hack/systemd_tag.sh || die - else - echo -e '#!/usr/bin/env bash\necho' > hack/systemd_tag.sh || die - fi - - [[ -f btrfs_installed_tag.sh && -f btrfs_tag.sh ]] || die - if use btrfs; then - echo -e '#!/usr/bin/env bash\necho btrfs_noversion' > btrfs_tag.sh || die - echo -e '#!/usr/bin/env bash\necho' > btrfs_installed_tag.sh || die - else - echo -e '#!/usr/bin/env bash\necho exclude_graphdriver_btrfs' > btrfs_installed_tag.sh || die - echo -e '#!/usr/bin/env bash\necho' > btrfs_tag.sh || die - fi + cat <<-EOF > hack/systemd_tag.sh || die + #!/usr/bin/env bash + $(usex systemd 'echo systemd' echo) + EOF + + echo -e "#!/usr/bin/env bash\n echo" > btrfs_installed_tag.sh || die + cat <<-EOF > btrfs_tag.sh || die + #!/usr/bin/env bash + $(usex btrfs echo 'echo exclude_graphdriver_btrfs btrfs_noversion') + EOF use test || { - cat << 'EOF' > "${T}/disable_tests.patch" ---- Makefile -+++ Makefile -@@ -54 +54 @@ --all: bin/buildah bin/imgtype bin/copy bin/tutorial docs -+all: bin/buildah docs -EOF - eapply -p0 "${T}/disable_tests.patch" || die + cat <<-'EOF' > "${T}/disable_tests.patch" + --- a/Makefile + +++ b/Makefile + @@ -54 +54 @@ + -all: bin/buildah bin/imgtype bin/copy bin/tutorial docs + +all: bin/buildah docs + EOF + eapply "${T}/disable_tests.patch" || die } } -src_compile() { - if [[ ${PV} == *9999* ]]; then - emake all - else - emake GIT_COMMIT=${GIT_COMMIT} all - fi -} - src_test() { emake test-unit } src_install() { - default - emake DESTDIR="${D}" install.completions + emake DESTDIR="${D}" install install.completions + einstalldocs use doc && dodoc -r "${EXTRA_DOCS[@]}" }