Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/bubblewrap/, sys-apps/bubblewrap/files/
Date: Sat, 29 Feb 2020 07:35:15
Message-Id: 1582961661.aa32777b624878b41d3c182737426b790c955ab6.perfinion@gentoo
1 commit: aa32777b624878b41d3c182737426b790c955ab6
2 Author: Jason Zaman <perfinion <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 29 07:31:35 2020 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 29 07:34:21 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa32777b
7
8 sys-apps/bubblewrap: Fix USE=selinux build
9
10 The ./configure checks for selinux are incorrect and fails to build
11 Closes: https://bugs.gentoo.org/674312
12 Package-Manager: Portage-2.3.84, Repoman-2.3.20
13 Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>
14
15 sys-apps/bubblewrap/bubblewrap-0.3.1-r2.ebuild | 48 +++++
16 .../files/bubblewrap-0.3.1-selinux-configure.patch | 224 +++++++++++++++++++++
17 2 files changed, 272 insertions(+)
18
19 diff --git a/sys-apps/bubblewrap/bubblewrap-0.3.1-r2.ebuild b/sys-apps/bubblewrap/bubblewrap-0.3.1-r2.ebuild
20 new file mode 100644
21 index 00000000000..6eef7003675
22 --- /dev/null
23 +++ b/sys-apps/bubblewrap/bubblewrap-0.3.1-r2.ebuild
24 @@ -0,0 +1,48 @@
25 +# Copyright 1999-2020 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +inherit bash-completion-r1 linux-info
31 +
32 +DESCRIPTION="Unprivileged sandboxing tool, namespaces-powered chroot-like solution"
33 +HOMEPAGE="https://github.com/projectatomic/bubblewrap"
34 +SRC_URI="https://github.com/projectatomic/${PN}/releases/download/v${PV}/${P}.tar.xz"
35 +
36 +LICENSE="LGPL-2+"
37 +SLOT="0"
38 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
39 +IUSE="selinux +suid"
40 +
41 +RDEPEND="
42 + sys-libs/libseccomp
43 + sys-libs/libcap
44 + selinux? ( >=sys-libs/libselinux-2.1.9 )
45 +"
46 +DEPEND="${RDEPEND}
47 + app-text/docbook-xml-dtd:4.3
48 + app-text/docbook-xsl-stylesheets
49 + dev-libs/libxslt
50 + virtual/pkgconfig
51 +"
52 +
53 +# tests require root priviledge
54 +RESTRICT="test"
55 +PATCHES=(
56 + "${FILESDIR}/bubblewrap-0.3.1-selinux-configure.patch" # bug 674312
57 +)
58 +
59 +pkg_setup() {
60 + if [[ ${MERGE_TYPE} != buildonly ]]; then
61 + CONFIG_CHECK="~UTS_NS ~IPC_NS ~USER_NS ~PID_NS ~NET_NS"
62 + linux-info_pkg_setup
63 + fi
64 +}
65 +
66 +src_configure() {
67 + econf \
68 + $(use_enable selinux) \
69 + "--enable-man" \
70 + "--with-bash-completion-dir=$(get_bashcompdir)" \
71 + "--with-priv-mode=$(usex suid setuid none)"
72 +}
73
74 diff --git a/sys-apps/bubblewrap/files/bubblewrap-0.3.1-selinux-configure.patch b/sys-apps/bubblewrap/files/bubblewrap-0.3.1-selinux-configure.patch
75 new file mode 100644
76 index 00000000000..b8fad6cc168
77 --- /dev/null
78 +++ b/sys-apps/bubblewrap/files/bubblewrap-0.3.1-selinux-configure.patch
79 @@ -0,0 +1,224 @@
80 +Author: Jonas Jelten <jj@×××.mx>
81 +
82 +upstream decided to ship the generated ./configure file...
83 +here's the updated configure script with the missing PKG_PROG_PKG_CONFIG call
84 +
85 +===================================================================
86 +--- bubblewrap-0.3.1.orig/configure
87 ++++ bubblewrap-0.3.1/configure
88 +@@ -5224,107 +5224,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
89 +
90 +
91 +
92 +-for ac_header in sys/capability.h
93 +-do :
94 +- ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
95 +-if test "x$ac_cv_header_sys_capability_h" = xyes; then :
96 +- cat >>confdefs.h <<_ACEOF
97 +-#define HAVE_SYS_CAPABILITY_H 1
98 +-_ACEOF
99 +-
100 +-else
101 +- as_fn_error $? "*** POSIX caps headers not found" "$LINENO" 5
102 +-fi
103 +-
104 +-done
105 +-
106 +-
107 +-# Check whether --enable-man was given.
108 +-if test "${enable_man+set}" = set; then :
109 +- enableval=$enable_man;
110 +-else
111 +- enable_man=maybe
112 +-fi
113 +-
114 +-
115 +-if test "$enable_man" != no; then :
116 +-
117 +- # Extract the first word of "xsltproc", so it can be a program name with args.
118 +-set dummy xsltproc; ac_word=$2
119 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
120 +-$as_echo_n "checking for $ac_word... " >&6; }
121 +-if ${ac_cv_path_XSLTPROC+:} false; then :
122 +- $as_echo_n "(cached) " >&6
123 +-else
124 +- case $XSLTPROC in
125 +- [\\/]* | ?:[\\/]*)
126 +- ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
127 +- ;;
128 +- *)
129 +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
130 +-for as_dir in $PATH
131 +-do
132 +- IFS=$as_save_IFS
133 +- test -z "$as_dir" && as_dir=.
134 +- for ac_exec_ext in '' $ac_executable_extensions; do
135 +- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
136 +- ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
137 +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
138 +- break 2
139 +- fi
140 +-done
141 +- done
142 +-IFS=$as_save_IFS
143 +-
144 +- ;;
145 +-esac
146 +-fi
147 +-XSLTPROC=$ac_cv_path_XSLTPROC
148 +-if test -n "$XSLTPROC"; then
149 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
150 +-$as_echo "$XSLTPROC" >&6; }
151 +-else
152 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
153 +-$as_echo "no" >&6; }
154 +-fi
155 +-
156 +-
157 +- if test -z "$XSLTPROC"; then :
158 +-
159 +- if test "$enable_man" = yes; then :
160 +-
161 +- as_fn_error $? "xsltproc is required for --enable-man" "$LINENO" 5
162 +-
163 +-fi
164 +- enable_man=no
165 +-
166 +-else
167 +-
168 +- enable_man=yes
169 +-
170 +-fi
171 +-
172 +-fi
173 +- if test "$enable_man" != no; then
174 +- ENABLE_MAN_TRUE=
175 +- ENABLE_MAN_FALSE='#'
176 +-else
177 +- ENABLE_MAN_TRUE='#'
178 +- ENABLE_MAN_FALSE=
179 +-fi
180 +-
181 +-
182 +-
183 +-# Check whether --with-bash-completion-dir was given.
184 +-if test "${with_bash_completion_dir+set}" = set; then :
185 +- withval=$with_bash_completion_dir;
186 +-else
187 +- with_bash_completion_dir=yes
188 +-fi
189 +-
190 +-
191 +-if test "x$with_bash_completion_dir" = "xyes"; then
192 +-
193 +
194 +
195 +
196 +@@ -5445,6 +5344,107 @@ $as_echo "no" >&6; }
197 + fi
198 + fi
199 +
200 ++for ac_header in sys/capability.h
201 ++do :
202 ++ ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
203 ++if test "x$ac_cv_header_sys_capability_h" = xyes; then :
204 ++ cat >>confdefs.h <<_ACEOF
205 ++#define HAVE_SYS_CAPABILITY_H 1
206 ++_ACEOF
207 ++
208 ++else
209 ++ as_fn_error $? "*** POSIX caps headers not found" "$LINENO" 5
210 ++fi
211 ++
212 ++done
213 ++
214 ++
215 ++# Check whether --enable-man was given.
216 ++if test "${enable_man+set}" = set; then :
217 ++ enableval=$enable_man;
218 ++else
219 ++ enable_man=maybe
220 ++fi
221 ++
222 ++
223 ++if test "$enable_man" != no; then :
224 ++
225 ++ # Extract the first word of "xsltproc", so it can be a program name with args.
226 ++set dummy xsltproc; ac_word=$2
227 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
228 ++$as_echo_n "checking for $ac_word... " >&6; }
229 ++if ${ac_cv_path_XSLTPROC+:} false; then :
230 ++ $as_echo_n "(cached) " >&6
231 ++else
232 ++ case $XSLTPROC in
233 ++ [\\/]* | ?:[\\/]*)
234 ++ ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
235 ++ ;;
236 ++ *)
237 ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
238 ++for as_dir in $PATH
239 ++do
240 ++ IFS=$as_save_IFS
241 ++ test -z "$as_dir" && as_dir=.
242 ++ for ac_exec_ext in '' $ac_executable_extensions; do
243 ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
244 ++ ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
245 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
246 ++ break 2
247 ++ fi
248 ++done
249 ++ done
250 ++IFS=$as_save_IFS
251 ++
252 ++ ;;
253 ++esac
254 ++fi
255 ++XSLTPROC=$ac_cv_path_XSLTPROC
256 ++if test -n "$XSLTPROC"; then
257 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
258 ++$as_echo "$XSLTPROC" >&6; }
259 ++else
260 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
261 ++$as_echo "no" >&6; }
262 ++fi
263 ++
264 ++
265 ++ if test -z "$XSLTPROC"; then :
266 ++
267 ++ if test "$enable_man" = yes; then :
268 ++
269 ++ as_fn_error $? "xsltproc is required for --enable-man" "$LINENO" 5
270 ++
271 ++fi
272 ++ enable_man=no
273 ++
274 ++else
275 ++
276 ++ enable_man=yes
277 ++
278 ++fi
279 ++
280 ++fi
281 ++ if test "$enable_man" != no; then
282 ++ ENABLE_MAN_TRUE=
283 ++ ENABLE_MAN_FALSE='#'
284 ++else
285 ++ ENABLE_MAN_TRUE='#'
286 ++ ENABLE_MAN_FALSE=
287 ++fi
288 ++
289 ++
290 ++
291 ++# Check whether --with-bash-completion-dir was given.
292 ++if test "${with_bash_completion_dir+set}" = set; then :
293 ++ withval=$with_bash_completion_dir;
294 ++else
295 ++ with_bash_completion_dir=yes
296 ++fi
297 ++
298 ++
299 ++if test "x$with_bash_completion_dir" = "xyes"; then
300 ++
301 + pkg_failed=no
302 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH_COMPLETION" >&5
303 + $as_echo_n "checking for BASH_COMPLETION... " >&6; }