diff options
author | Rahil Bhimjiani <rahil3108@gmail.com> | 2023-10-27 05:03:04 +0530 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2023-10-27 19:36:44 -0700 |
commit | 2e1ac618b476ce88d0253866d86c038f0db3e104 (patch) | |
tree | 826f687b9884aa9dbdf6f19c2e1d572c82f1e6a8 /app-containers/buildah | |
parent | dev-haskell/http-media: Loosen bytestring dep (diff) | |
download | gentoo-2e1ac618b476ce88d0253866d86c038f0db3e104.tar.gz gentoo-2e1ac618b476ce88d0253866d86c038f0db3e104.tar.bz2 gentoo-2e1ac618b476ce88d0253866d86c038f0db3e104.zip |
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 <rahil3108@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33531
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'app-containers/buildah')
-rw-r--r-- | app-containers/buildah/Manifest | 1 | ||||
-rw-r--r-- | app-containers/buildah/buildah-1.32.1.ebuild | 114 | ||||
-rw-r--r-- | 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[@]}" } |