Сравнение buildah-1.32.0 с buildah-9999

/usr/portage/app-containers/buildah/buildah-9999.ebuild 2023-10-09 14:52:28.216368318 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
inherit bash-completion-r1 go-module linux-info
7
GIT_COMMIT=2326d49
6
inherit go-module linux-info
8 7

  
9 8
DESCRIPTION="A tool that facilitates building OCI images"
10 9
HOMEPAGE="https://github.com/containers/buildah"
11
SRC_URI="https://github.com/containers/buildah/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12

  
13 10
LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
11

  
14 12
SLOT="0"
15
KEYWORDS="~amd64 ~arm64"
16
IUSE="btrfs systemd doc test"
13
IUSE="apparmor btrfs +seccomp systemd doc test"
17 14
RESTRICT="test"
15
EXTRA_DOCS=(
16
	"CHANGELOG.md"
17
	"CONTRIBUTING.md"
18
	"README.md"
19
	"install.md"
20
	"troubleshooting.md"
21
	"docs/tutorials"
22
)
23

  
24
if [[ ${PV} == *9999* ]]; then
25
	inherit git-r3
26
	EGIT_REPO_URI="https://github.com/containers/buildah.git"
27
else
28
	SRC_URI="https://github.com/containers/buildah/archive/v${PV}.tar.gz -> ${P}.tar.gz"
29
	GIT_COMMIT=2326d49
30
	KEYWORDS="~amd64 ~arm64"
31
fi
18 32

  
19 33
DEPEND="
20 34
	systemd? ( sys-apps/systemd )
21 35
	btrfs? ( sys-fs/btrfs-progs )
36
	seccomp? ( sys-libs/libseccomp:= )
37
	apparmor? ( sys-libs/libapparmor:= )
22 38
	app-crypt/gpgme:=
23 39
	dev-libs/libgpg-error:=
24 40
	dev-libs/libassuan:=
25 41
	sys-apps/shadow:=
26
	sys-libs/libseccomp:=
27 42
"
28 43
RDEPEND="${DEPEND}"
29 44

  
......
32 47
	use btrfs && CONFIG_CHECK+=" ~BTRFS_FS"
33 48
	check_extra_config
34 49

  
35
	if ! linux_config_exists; then
36
		ewarn "Cannot determine configuration of your kernel."
37
	fi
50
	linux_config_exists || ewarn "Cannot determine configuration of your kernel."
38 51
}
39 52

  
40 53
src_prepare() {
41 54
	default
42 55

  
56
	sed -i -e "s|/usr/local|${EPREFIX}/usr|g" Makefile docs/Makefile || die
57

  
58
	[[ -f hack/libsubid_tag.sh ]] && echo -e '#!/usr/bin/env bash\necho libsubid' > hack/libsubid_tag.sh || die
59

  
60
	[[ -f hack/apparmor_tag.sh ]] || die
61
	if use apparmor; then
62
		echo -e '#!/usr/bin/env bash\necho apparmor' > hack/apparmor_tag.sh || die
63
	else
64
		echo -e '#!/usr/bin/env bash\necho' > hack/apparmor_tag.sh || die
65
	fi
66

  
67
	use seccomp || {
68
		 cat << 'EOF' > "${T}/disable_seccomp.patch"
69
--- Makefile
70
+++ Makefile
71
@@ -5 +5 @@
72
-SECURITYTAGS ?= seccomp $(APPARMORTAG)
73
+SECURITYTAGS ?= $(APPARMORTAG)
74
EOF
75
		 eapply -p0 "${T}/disable_seccomp.patch" || die
76
	}
77

  
43 78
	[[ -f hack/systemd_tag.sh ]] || die
44 79
	if use systemd; then
45 80
		echo -e '#!/usr/bin/env bash\necho systemd' > hack/systemd_tag.sh || die
......
47 82
		echo -e '#!/usr/bin/env bash\necho' > hack/systemd_tag.sh || die
48 83
	fi
49 84

  
50
	[[ -f btrfs_installed_tag.sh ]] || die
51
	[[ -f btrfs_tag.sh ]] || die
85
	[[ -f btrfs_installed_tag.sh && -f btrfs_tag.sh ]] || die
52 86
	if use btrfs; then
53 87
		echo -e '#!/usr/bin/env bash\necho btrfs_noversion' > btrfs_tag.sh || die
88
		echo -e '#!/usr/bin/env bash\necho' > btrfs_installed_tag.sh || die
54 89
	else
55 90
		echo -e '#!/usr/bin/env bash\necho exclude_graphdriver_btrfs' > btrfs_installed_tag.sh || die
91
		echo -e '#!/usr/bin/env bash\necho' > btrfs_tag.sh || die
56 92
	fi
57 93

  
58
	if ! use test; then
59
		cat << 'EOF' > "${T}/Makefile.patch"
94
	use test || {
95
		cat << 'EOF' > "${T}/disable_tests.patch"
60 96
--- Makefile
61 97
+++ Makefile
62 98
@@ -54 +54 @@
63 99
-all: bin/buildah bin/imgtype bin/copy bin/tutorial docs
64 100
+all: bin/buildah docs
65 101
EOF
66
		eapply -p0 "${T}/Makefile.patch"
67
	fi
102
		eapply -p0 "${T}/disable_tests.patch" || die
103
	}
104

  
68 105
}
69 106

  
70 107
src_compile() {
71
	emake GIT_COMMIT=${GIT_COMMIT} all
108
	if [[ ${PV} == *9999* ]]; then
109
		emake all
110
	else
111
		emake GIT_COMMIT=${GIT_COMMIT} all
112
	fi
72 113
}
73 114

  
74 115
src_test() {
......
76 117
}
77 118

  
78 119
src_install() {
79
	use doc && dodoc CHANGELOG.md CONTRIBUTING.md README.md install.md troubleshooting.md
80
	use doc && dodoc -r docs/tutorials
81
	doman docs/*.1
82
	dobin bin/${PN}
83
	dobashcomp contrib/completions/bash/buildah
120
	default
121
	emake DESTDIR="${D}" install.completions
122
	use doc && dodoc -r "${EXTRA_DOCS[@]}"
84 123
}
Спасибо!