1 |
commit: 676d2274d0ae6e4cddd4597c553db76f5184b08e |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 16 18:06:30 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 16 18:06:52 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=676d2274 |
7 |
|
8 |
net-print/cups: Security bump to version 2.2.12 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/692300 |
11 |
Package-Manager: Portage-2.3.71, Repoman-2.3.17 |
12 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
13 |
|
14 |
net-print/cups/Manifest | 1 + |
15 |
net-print/cups/cups-2.2.12.ebuild | 339 ++++++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 340 insertions(+) |
17 |
|
18 |
diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest |
19 |
index e62733a63cf..9b4b6563914 100644 |
20 |
--- a/net-print/cups/Manifest |
21 |
+++ b/net-print/cups/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST cups-2.2.11-source.tar.gz 10405908 BLAKE2B 9b7ee4da9502e42fd1b4a2c57ab709b3127ee8aeb8481a52f37da19fe5578f406260f1551e3fcedcd3a828fbed69267e68fcfd7bfabadf65afce4c3af19b4a1f SHA512 21a6916041b50044d336871f10d1192635458a3d318f19a18ad21d27027dd3839400601019e758424c218225a34aba148ba3a57f0ce3fe14c4df03bd1fde3403 |
24 |
+DIST cups-2.2.12-source.tar.gz 10409313 BLAKE2B 126ea81f7108b3b62f5e062ed522898dd48d4e5b4077c834e8fe89012445dd0a903bafa62f593551ed5f1c92cce4fbd22f56834e0615ed65ca4a6ae84dc2ca1c SHA512 b8e7be512938ad388d469d093ad0c882ab42ea1408c27a91340f8424aa0e79e588df3d59795624973b89074a2af650fa9b5b6ed5224138b17e4c6dbbcbf0a2e6 |
25 |
DIST cups-2.3rc1-source.tar.gz 7926640 BLAKE2B c39bee2c4697eb540cfa02ee2ce0fa8a79d7efd0a7e65db19fada8473997841e5c341c209eba8eb242e57bb21b0dbded1ca340654874b9400318ed2d9332b890 SHA512 d2411c1da576bd7d561c5465fba0824af86d7b52792482d90876847d0869a5a092de12efc761fd403c74be072c6d6eb5bf407525f187051683dba694e5f7febd |
26 |
|
27 |
diff --git a/net-print/cups/cups-2.2.12.ebuild b/net-print/cups/cups-2.2.12.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..ac6565a2d4c |
30 |
--- /dev/null |
31 |
+++ b/net-print/cups/cups-2.2.12.ebuild |
32 |
@@ -0,0 +1,339 @@ |
33 |
+# Copyright 1999-2019 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python2_7 ) |
39 |
+ |
40 |
+inherit autotools flag-o-matic linux-info xdg multilib-minimal pam python-single-r1 user java-pkg-opt-2 systemd toolchain-funcs |
41 |
+ |
42 |
+MY_P="${P/_rc/rc}" |
43 |
+MY_P="${MY_P/_beta/b}" |
44 |
+MY_PV="${PV/_rc/rc}" |
45 |
+MY_PV="${MY_PV/_beta/b}" |
46 |
+ |
47 |
+if [[ ${PV} == *9999 ]]; then |
48 |
+ inherit git-r3 |
49 |
+ EGIT_REPO_URI="https://github.com/apple/cups.git" |
50 |
+ if [[ ${PV} != 9999 ]]; then |
51 |
+ EGIT_BRANCH=branch-${PV/.9999} |
52 |
+ fi |
53 |
+else |
54 |
+ #SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
55 |
+ SRC_URI="https://github.com/apple/cups/releases/download/v${PV}/${P}-source.tar.gz" |
56 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint" |
57 |
+fi |
58 |
+ |
59 |
+DESCRIPTION="The Common Unix Printing System" |
60 |
+HOMEPAGE="https://www.cups.org/" |
61 |
+ |
62 |
+LICENSE="GPL-2" |
63 |
+SLOT="0" |
64 |
+IUSE="acl dbus debug java kerberos lprng-compat pam python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" |
65 |
+ |
66 |
+CDEPEND=" |
67 |
+ app-text/libpaper |
68 |
+ sys-libs/zlib |
69 |
+ acl? ( |
70 |
+ kernel_linux? ( |
71 |
+ sys-apps/acl |
72 |
+ sys-apps/attr |
73 |
+ ) |
74 |
+ ) |
75 |
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) |
76 |
+ java? ( >=virtual/jre-1.6:* ) |
77 |
+ kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) |
78 |
+ !lprng-compat? ( !net-print/lprng ) |
79 |
+ pam? ( virtual/pam ) |
80 |
+ python? ( ${PYTHON_DEPS} ) |
81 |
+ ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] ) |
82 |
+ systemd? ( sys-apps/systemd ) |
83 |
+ usb? ( virtual/libusb:1 ) |
84 |
+ X? ( x11-misc/xdg-utils ) |
85 |
+ xinetd? ( sys-apps/xinetd ) |
86 |
+ zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) |
87 |
+" |
88 |
+ |
89 |
+DEPEND="${CDEPEND}" |
90 |
+BDEPEND=" |
91 |
+ acct-group/lp |
92 |
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] |
93 |
+" |
94 |
+ |
95 |
+RDEPEND="${CDEPEND} |
96 |
+ acct-group/lp |
97 |
+ selinux? ( sec-policy/selinux-cups ) |
98 |
+" |
99 |
+ |
100 |
+PDEPEND=">=net-print/cups-filters-1.0.43" |
101 |
+ |
102 |
+REQUIRED_USE=" |
103 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
104 |
+ usb? ( threads ) |
105 |
+" |
106 |
+ |
107 |
+# upstream includes an interactive test which is a nono for gentoo |
108 |
+RESTRICT="test" |
109 |
+ |
110 |
+# systemd-socket.patch from Fedora |
111 |
+PATCHES=( |
112 |
+ "${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch" |
113 |
+ "${FILESDIR}/${PN}-2.2.6-fix-install-perms.patch" |
114 |
+ "${FILESDIR}/${PN}-1.4.4-nostrip.patch" |
115 |
+ "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" |
116 |
+ "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" |
117 |
+) |
118 |
+ |
119 |
+MULTILIB_CHOST_TOOLS=( |
120 |
+ /usr/bin/cups-config |
121 |
+) |
122 |
+ |
123 |
+pkg_setup() { |
124 |
+ #enewgroup lp -> acct-group/lp |
125 |
+ enewuser lp -1 -1 -1 lp |
126 |
+ enewgroup lpadmin 106 |
127 |
+ |
128 |
+ use python && python-single-r1_pkg_setup |
129 |
+ |
130 |
+ if use kernel_linux; then |
131 |
+ linux-info_pkg_setup |
132 |
+ if ! linux_config_exists; then |
133 |
+ ewarn "Can't check the linux kernel configuration." |
134 |
+ ewarn "You might have some incompatible options enabled." |
135 |
+ else |
136 |
+ # recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug 501122) |
137 |
+ if use usb; then |
138 |
+ if linux_chkconfig_present USB_PRINTER; then |
139 |
+ elog "Your USB printers will be managed via libusb. In case you run into problems, " |
140 |
+ elog "please try disabling USB_PRINTER support in your kernel or blacklisting the" |
141 |
+ elog "usblp kernel module." |
142 |
+ elog "Alternatively, just disable the usb useflag for cups (your printer will still work)." |
143 |
+ fi |
144 |
+ else |
145 |
+ #here we should warn user that he should enable it so he can print |
146 |
+ if ! linux_chkconfig_present USB_PRINTER; then |
147 |
+ ewarn "If you plan to use USB printers you should enable the USB_PRINTER" |
148 |
+ ewarn "support in your kernel." |
149 |
+ ewarn "Please enable it:" |
150 |
+ ewarn " CONFIG_USB_PRINTER=y" |
151 |
+ ewarn "in /usr/src/linux/.config or" |
152 |
+ ewarn " Device Drivers --->" |
153 |
+ ewarn " USB support --->" |
154 |
+ ewarn " [*] USB Printer support" |
155 |
+ ewarn "Alternatively, enable the usb useflag for cups and use the libusb code." |
156 |
+ fi |
157 |
+ fi |
158 |
+ fi |
159 |
+ fi |
160 |
+} |
161 |
+ |
162 |
+src_prepare() { |
163 |
+ default |
164 |
+ |
165 |
+ # Remove ".SILENT" rule for verbose output (bug 524338). |
166 |
+ sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed" |
167 |
+ |
168 |
+ # Fix install-sh, posix sh does not have 'function'. |
169 |
+ sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh" |
170 |
+ |
171 |
+ AT_M4DIR=config-scripts eaclocal |
172 |
+ eautoconf |
173 |
+ |
174 |
+ # custom Makefiles |
175 |
+ multilib_copy_sources |
176 |
+} |
177 |
+ |
178 |
+multilib_src_configure() { |
179 |
+ export DSOFLAGS="${LDFLAGS}" |
180 |
+ |
181 |
+ einfo LINGUAS=\"${LINGUAS}\" |
182 |
+ |
183 |
+ # explicitly specify compiler wrt bug 524340 |
184 |
+ # |
185 |
+ # need to override KRB5CONFIG for proper flags |
186 |
+ # https://github.com/apple/cups/issues/4423 |
187 |
+ local myeconfargs=( |
188 |
+ CC="$(tc-getCC)" |
189 |
+ CXX="$(tc-getCXX)" |
190 |
+ KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config |
191 |
+ --libdir="${EPREFIX}"/usr/$(get_libdir) |
192 |
+ --localstatedir="${EPREFIX}"/var |
193 |
+ --with-exe-file-perm=755 |
194 |
+ --with-rundir="${EPREFIX}"/run/cups |
195 |
+ --with-cups-user=lp |
196 |
+ --with-cups-group=lp |
197 |
+ --with-docdir="${EPREFIX}"/usr/share/cups/html |
198 |
+ --with-languages="${LINGUAS}" |
199 |
+ --with-system-groups=lpadmin |
200 |
+ --with-xinetd="${EPREFIX}"/etc/xinetd.d |
201 |
+ $(multilib_native_use_enable acl) |
202 |
+ $(use_enable dbus) |
203 |
+ $(use_enable debug) |
204 |
+ $(use_enable debug debug-guards) |
205 |
+ $(use_enable debug debug-printfs) |
206 |
+ $(multilib_native_use_with java) |
207 |
+ $(use_enable kerberos gssapi) |
208 |
+ $(multilib_native_use_enable pam) |
209 |
+ $(multilib_native_use_with python python "${PYTHON}") |
210 |
+ $(use_enable static-libs static) |
211 |
+ $(use_enable threads) |
212 |
+ $(use_enable ssl gnutls) |
213 |
+ $(use_enable systemd) |
214 |
+ $(multilib_native_use_enable usb libusb) |
215 |
+ $(use_enable zeroconf avahi) |
216 |
+ --disable-dnssd |
217 |
+ --without-perl |
218 |
+ --without-php |
219 |
+ $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) |
220 |
+ ) |
221 |
+ |
222 |
+ if tc-is-static-only; then |
223 |
+ myeconfargs+=( |
224 |
+ --disable-shared |
225 |
+ ) |
226 |
+ fi |
227 |
+ |
228 |
+ econf "${myeconfargs[@]}" |
229 |
+ |
230 |
+ # install in /usr/libexec always, instead of using /usr/lib/cups, as that |
231 |
+ # makes more sense when facing multilib support. |
232 |
+ sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die |
233 |
+ sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die |
234 |
+ sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die |
235 |
+ |
236 |
+ # additional path corrections needed for prefix, see bug 597728 |
237 |
+ sed \ |
238 |
+ -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \ |
239 |
+ -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \ |
240 |
+ -e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \ |
241 |
+ -e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \ |
242 |
+ -i Makedefs || die |
243 |
+} |
244 |
+ |
245 |
+multilib_src_compile() { |
246 |
+ if multilib_is_native_abi; then |
247 |
+ default |
248 |
+ else |
249 |
+ emake libs |
250 |
+ fi |
251 |
+} |
252 |
+ |
253 |
+multilib_src_test() { |
254 |
+ multilib_is_native_abi && default |
255 |
+} |
256 |
+ |
257 |
+multilib_src_install() { |
258 |
+ if multilib_is_native_abi; then |
259 |
+ emake BUILDROOT="${D}" install |
260 |
+ else |
261 |
+ emake BUILDROOT="${D}" install-libs install-headers |
262 |
+ dobin cups-config |
263 |
+ fi |
264 |
+} |
265 |
+ |
266 |
+multilib_src_install_all() { |
267 |
+ dodoc {CHANGES,CREDITS,README}.md |
268 |
+ |
269 |
+ # move the default config file to docs |
270 |
+ dodoc "${ED}"/etc/cups/cupsd.conf.default |
271 |
+ rm -f "${ED}"/etc/cups/cupsd.conf.default |
272 |
+ |
273 |
+ # clean out cups init scripts |
274 |
+ rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups} |
275 |
+ |
276 |
+ # install our init script |
277 |
+ local neededservices=( |
278 |
+ $(usex zeroconf avahi-daemon '') |
279 |
+ $(usex dbus dbus '') |
280 |
+ ) |
281 |
+ [[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}" |
282 |
+ cp "${FILESDIR}"/cupsd.init.d-r3 "${T}"/cupsd || die |
283 |
+ sed -i \ |
284 |
+ -e "s/@neededservices@/${neededservices}/" \ |
285 |
+ "${T}"/cupsd || die |
286 |
+ doinitd "${T}"/cupsd |
287 |
+ |
288 |
+ # install our pam script |
289 |
+ pamd_mimic_system cups auth account |
290 |
+ |
291 |
+ if use xinetd ; then |
292 |
+ # correct path |
293 |
+ sed -i \ |
294 |
+ -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \ |
295 |
+ "${ED}"/etc/xinetd.d/cups-lpd || die |
296 |
+ # it is safer to disable this by default, bug #137130 |
297 |
+ grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \ |
298 |
+ { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; } |
299 |
+ # write permission for file owner (root), bug #296221 |
300 |
+ fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed" |
301 |
+ else |
302 |
+ # always configure with --with-xinetd= and clean up later, |
303 |
+ # bug #525604 |
304 |
+ rm -rf "${ED}"/etc/xinetd.d |
305 |
+ fi |
306 |
+ |
307 |
+ keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ |
308 |
+ /var/log/cups /var/spool/cups/tmp |
309 |
+ |
310 |
+ keepdir /etc/cups/{interfaces,ppd,ssl} |
311 |
+ |
312 |
+ if ! use X ; then |
313 |
+ rm -r "${ED}"/usr/share/applications || die |
314 |
+ fi |
315 |
+ |
316 |
+ # create /etc/cups/client.conf, bug #196967 and #266678 |
317 |
+ echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf |
318 |
+ |
319 |
+ # the following file is now provided by cups-filters: |
320 |
+ rm -r "${ED}"/usr/share/cups/banners || die |
321 |
+ |
322 |
+ # the following are created by the init script |
323 |
+ rm -r "${ED}"/var/cache/cups || die |
324 |
+ rm -r "${ED}"/run || die |
325 |
+ |
326 |
+ # for the special case of running lprng and cups together, bug 467226 |
327 |
+ if use lprng-compat ; then |
328 |
+ rm -fv "${ED}"/usr/bin/{lp*,cancel} |
329 |
+ rm -fv "${ED}"/usr/sbin/lp* |
330 |
+ rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*} |
331 |
+ rm -fv "${ED}"/usr/share/man/man8/lp* |
332 |
+ ewarn "Not installing lp... binaries, since the lprng-compat useflag is set." |
333 |
+ ewarn "Unless you plan to install an exotic server setup, you most likely" |
334 |
+ ewarn "do not want this. Disable the useflag then and all will be fine." |
335 |
+ fi |
336 |
+} |
337 |
+ |
338 |
+pkg_preinst() { |
339 |
+ xdg_pkg_preinst |
340 |
+} |
341 |
+ |
342 |
+pkg_postinst() { |
343 |
+ # Update desktop file database and gtk icon cache (bug 370059) |
344 |
+ xdg_pkg_postinst |
345 |
+ |
346 |
+ local v |
347 |
+ |
348 |
+ for v in ${REPLACING_VERSIONS}; do |
349 |
+ if ! ver_test ${v} -ge 2.2.2-r2 ; then |
350 |
+ echo |
351 |
+ ewarn "The cupsd init script switched to using pidfiles. Shutting down" |
352 |
+ ewarn "cupsd will fail the next time. To fix this, please run once as root" |
353 |
+ ewarn " killall cupsd ; /etc/init.d/cupsd zap ; /etc/init.d/cupsd start" |
354 |
+ echo |
355 |
+ break |
356 |
+ fi |
357 |
+ done |
358 |
+ |
359 |
+ for v in ${REPLACING_VERSIONS}; do |
360 |
+ echo |
361 |
+ elog "For information about installing a printer and general cups setup" |
362 |
+ elog "take a look at: https://wiki.gentoo.org/wiki/Printing" |
363 |
+ echo |
364 |
+ break |
365 |
+ done |
366 |
+} |
367 |
+ |
368 |
+pkg_postrm() { |
369 |
+ # Update desktop file database and gtk icon cache (bug 370059) |
370 |
+ xdg_pkg_postrm |
371 |
+} |