Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
Date: Sat, 28 May 2022 04:26:21
Message-Id: 1653711944.66e451177a6d28cfa24a3fdcdeaac7e8196c19fc.sam@gentoo
1 commit: 66e451177a6d28cfa24a3fdcdeaac7e8196c19fc
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 28 04:25:21 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat May 28 04:25:44 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66e45117
7
8 net-print/cups: add 2.4.2
9
10 While at it, cleanup a bunch of obsolete seds and such. Checked upstream
11 changes to ensure they really are obsolete.
12
13 Bug: https://bugs.gentoo.org/847625
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 net-print/cups/Manifest | 1 +
17 .../cups/{cups-9999.ebuild => cups-2.4.2.ebuild} | 57 ++++++++++------------
18 net-print/cups/cups-9999.ebuild | 57 ++++++++++------------
19 .../files/cups-2.4.2-no-fortify-override.patch | 18 +++++++
20 4 files changed, 69 insertions(+), 64 deletions(-)
21
22 diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
23 index 0dc21ac8d17e..70e6ff821ff8 100644
24 --- a/net-print/cups/Manifest
25 +++ b/net-print/cups/Manifest
26 @@ -1,2 +1,3 @@
27 DIST cups-2.3.3op2-source.tar.gz 7993205 BLAKE2B 8c115b91ec185a4820578561aaf681238280b22b5c68b68c484ffbd0fa3c4ec1beb4d426e3f0e33192e32bce78aa8b7f50ed6799732a467fa9e75c34787057ee SHA512 db27dd6fb616bd7ad895b2bdf4ea7b010501358a50dc8f2e7e29558d1cfc088a572b1b35ac512654d3ed410c84df87dc34ca636533a4499117253915d4763117
28 DIST cups-2.4.1-source.tar.gz 8113914 BLAKE2B 690d9d92f9bc84c2bb360699191cd67e1489ffc3ab219376dfc1a8795379950c95bf58c2033a0dbd2918262c5d104e21e31c4585cb35d229b0fac6cf4967bfd7 SHA512 74e83728fcc3baf709176442b26711250fd4d4ede1e81e35b02a5607711067e28cd5a05d5bc3337953f6b2236c5a429b13f3a7f1218a08a2d3c30a8c9b0d96fd
29 +DIST cups-2.4.2-source.tar.gz 8128785 BLAKE2B 97053feb502d4fdc28810b806000b6c84a6795d5adcec0789e73e5477d5802d46a99381366d16219f627166df088f6decde5c144bd0c38b5745815dc1e426bc5 SHA512 07474643bffe11c79b3226b70d28f1bb803dc19daa10711938cea303feacdcce3945ba8ff0334d94fdd5922ea7d6bf37a28c1ea62cce8ce946c2f90a0faf002f
30
31 diff --git a/net-print/cups/cups-9999.ebuild b/net-print/cups/cups-2.4.2.ebuild
32 similarity index 84%
33 copy from net-print/cups/cups-9999.ebuild
34 copy to net-print/cups/cups-2.4.2.ebuild
35 index bd33925c49a8..11e9e6c732a6 100644
36 --- a/net-print/cups/cups-9999.ebuild
37 +++ b/net-print/cups/cups-2.4.2.ebuild
38 @@ -2,6 +2,7 @@
39 # Distributed under the terms of the GNU General Public License v2
40
41 EAPI=8
42 +
43 inherit autotools linux-info xdg multilib-minimal optfeature pam toolchain-funcs
44
45 MY_PV="${PV/_beta/b}"
46 @@ -11,13 +12,13 @@ MY_P="${PN}-${MY_PV}"
47
48 if [[ ${PV} == *9999 ]]; then
49 inherit git-r3
50 -# EGIT_REPO_URI="https://github.com/apple/cups.git"
51 + #EGIT_REPO_URI="https://github.com/apple/cups.git"
52 EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
53 [[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
54 else
55 -# SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
56 + #SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
57 SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
58 - if [[ "${PV}" != *_beta* ]] && [[ "${PV}" != *_rc* ]] ; then
59 + if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
60 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
61 fi
62 fi
63 @@ -29,7 +30,7 @@ LICENSE="Apache-2.0"
64 SLOT="0"
65 IUSE="acl dbus debug kerberos pam selinux +ssl static-libs systemd usb X xinetd zeroconf"
66
67 -# upstream includes an interactive test which is a nono for gentoo
68 +# Upstream includes an interactive test which is a nono for Gentoo
69 RESTRICT="test"
70
71 BDEPEND="
72 @@ -67,6 +68,7 @@ PDEPEND=">=net-print/cups-filters-1.0.43"
73 PATCHES=(
74 "${FILESDIR}/${PN}-2.4.1-nostrip.patch"
75 "${FILESDIR}/${PN}-2.4.1-user-AR.patch"
76 + "${FILESDIR}/${PN}-2.4.2-no-fortify-override.patch"
77 )
78
79 MULTILIB_CHOST_TOOLS=(
80 @@ -82,7 +84,7 @@ pkg_setup() {
81 ewarn "Can't check the linux kernel configuration."
82 ewarn "You might have some incompatible options enabled."
83 else
84 - # recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug 501122)
85 + # Recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug #501122)
86 if use usb; then
87 if linux_chkconfig_present USB_PRINTER; then
88 elog "Your USB printers will be managed via libusb. In case you run into problems, "
89 @@ -91,7 +93,6 @@ pkg_setup() {
90 elog "Alternatively, just disable the usb useflag for cups (your printer will still work)."
91 fi
92 else
93 - #here we should warn user that he should enable it so he can print
94 if ! linux_chkconfig_present USB_PRINTER; then
95 ewarn "If you plan to use USB printers you should enable the USB_PRINTER"
96 ewarn "support in your kernel."
97 @@ -111,29 +112,21 @@ pkg_setup() {
98 src_prepare() {
99 default
100
101 - # Remove ".SILENT" rule for verbose output (bug 524338).
102 + # Remove ".SILENT" rule for verbose output (bug #524338).
103 sed 's#^.SILENT:##g' -i Makedefs.in || die
104
105 - # Fix install-sh, posix sh does not have 'function'.
106 - sed 's#function gzipcp#gzipcp()#g' -i install-sh || die
107 -
108 - # Do not add -Werror even for live ebuilds
109 - sed '/WARNING_OPTIONS/s@-Werror@@' \
110 - -i config-scripts/cups-compiler.m4 || die
111 -
112 - AT_M4DIR=config-scripts eaclocal
113 - eautoconf
114 + AT_M4DIR="config-scripts" eautoreconf
115
116 - # custom Makefiles
117 + # Custom Makefiles
118 multilib_copy_sources
119 }
120
121 multilib_src_configure() {
122 export DSOFLAGS="${LDFLAGS}"
123
124 - # explicitly specify compiler wrt bug 524340
125 + # Explicitly specify compiler wrt bug #524340
126 #
127 - # need to override KRB5CONFIG for proper flags
128 + # Need to override KRB5CONFIG for proper flags
129 # https://github.com/apple/cups/issues/4423
130 local myeconfargs=(
131 CC="$(tc-getCC)"
132 @@ -173,7 +166,7 @@ multilib_src_configure() {
133 )
134
135 # Handle empty LINGUAS properly, bug #771162
136 - if [ -n "${LINGUAS+x}" ] ; then
137 + if [[ -n "${LINGUAS+x}" ]] ; then
138 myeconfargs+=(
139 --with-languages="${LINGUAS}"
140 )
141 @@ -185,7 +178,7 @@ multilib_src_configure() {
142 )
143 fi
144
145 - # install in /usr/libexec always, instead of using /usr/lib/cups, as that
146 + # Install in /usr/libexec always, instead of using /usr/lib/cups, as that
147 # makes more sense when facing multilib support.
148 sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
149
150 @@ -195,7 +188,7 @@ multilib_src_configure() {
151 sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
152 sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
153
154 - # additional path corrections needed for prefix, see bug 597728
155 + # Additional path corrections needed for prefix, see bug #597728
156 sed \
157 -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
158 -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
159 @@ -228,14 +221,14 @@ multilib_src_install() {
160 multilib_src_install_all() {
161 dodoc {CHANGES,CREDITS,README}.md
162
163 - # move the default config file to docs
164 + # Move the default config file to docs
165 dodoc "${ED}"/etc/cups/cupsd.conf.default
166 rm "${ED}"/etc/cups/cupsd.conf.default || die
167
168 - # clean out cups init scripts
169 + # Clean out cups init scripts
170 rm -r "${ED}"/etc/{init.d/cups,rc*} || die
171
172 - # install our init script
173 + # Install our init script
174 local neededservices=(
175 $(usex zeroconf avahi-daemon '')
176 $(usex dbus dbus '')
177 @@ -251,16 +244,16 @@ multilib_src_install_all() {
178 fi
179
180 if use xinetd ; then
181 - # correct path
182 + # Correct path
183 sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
184 "${ED}"/etc/xinetd.d/cups-lpd || die
185 - # it is safer to disable this by default, bug #137130
186 + # It is safer to disable this by default, bug #137130
187 grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \
188 { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; }
189 - # write permission for file owner (root), bug #296221
190 + # Write permission for file owner (root), bug #296221
191 fperms u+w /etc/xinetd.d/cups-lpd
192 else
193 - # always configure with --with-xinetd= and clean up later,
194 + # Always configure with --with-xinetd= and clean up later,
195 # bug #525604
196 rm -r "${ED}"/etc/xinetd.d || die
197 fi
198 @@ -271,13 +264,13 @@ multilib_src_install_all() {
199 rm -r "${ED}"/usr/share/applications || die
200 fi
201
202 - # create /etc/cups/client.conf, bug #196967 and #266678
203 + # Create /etc/cups/client.conf, bug #196967 and bug #266678
204 echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
205
206 - # the following file is now provided by cups-filters:
207 + # The following file is now provided by cups-filter:
208 rm -r "${ED}"/usr/share/cups/banners || die
209
210 - # the following are created by the init script
211 + # The following are created by the init script
212 rm -r "${ED}"/var/cache || die
213 rm -r "${ED}"/run || die
214
215
216 diff --git a/net-print/cups/cups-9999.ebuild b/net-print/cups/cups-9999.ebuild
217 index bd33925c49a8..11e9e6c732a6 100644
218 --- a/net-print/cups/cups-9999.ebuild
219 +++ b/net-print/cups/cups-9999.ebuild
220 @@ -2,6 +2,7 @@
221 # Distributed under the terms of the GNU General Public License v2
222
223 EAPI=8
224 +
225 inherit autotools linux-info xdg multilib-minimal optfeature pam toolchain-funcs
226
227 MY_PV="${PV/_beta/b}"
228 @@ -11,13 +12,13 @@ MY_P="${PN}-${MY_PV}"
229
230 if [[ ${PV} == *9999 ]]; then
231 inherit git-r3
232 -# EGIT_REPO_URI="https://github.com/apple/cups.git"
233 + #EGIT_REPO_URI="https://github.com/apple/cups.git"
234 EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
235 [[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
236 else
237 -# SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
238 + #SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
239 SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
240 - if [[ "${PV}" != *_beta* ]] && [[ "${PV}" != *_rc* ]] ; then
241 + if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
242 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
243 fi
244 fi
245 @@ -29,7 +30,7 @@ LICENSE="Apache-2.0"
246 SLOT="0"
247 IUSE="acl dbus debug kerberos pam selinux +ssl static-libs systemd usb X xinetd zeroconf"
248
249 -# upstream includes an interactive test which is a nono for gentoo
250 +# Upstream includes an interactive test which is a nono for Gentoo
251 RESTRICT="test"
252
253 BDEPEND="
254 @@ -67,6 +68,7 @@ PDEPEND=">=net-print/cups-filters-1.0.43"
255 PATCHES=(
256 "${FILESDIR}/${PN}-2.4.1-nostrip.patch"
257 "${FILESDIR}/${PN}-2.4.1-user-AR.patch"
258 + "${FILESDIR}/${PN}-2.4.2-no-fortify-override.patch"
259 )
260
261 MULTILIB_CHOST_TOOLS=(
262 @@ -82,7 +84,7 @@ pkg_setup() {
263 ewarn "Can't check the linux kernel configuration."
264 ewarn "You might have some incompatible options enabled."
265 else
266 - # recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug 501122)
267 + # Recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug #501122)
268 if use usb; then
269 if linux_chkconfig_present USB_PRINTER; then
270 elog "Your USB printers will be managed via libusb. In case you run into problems, "
271 @@ -91,7 +93,6 @@ pkg_setup() {
272 elog "Alternatively, just disable the usb useflag for cups (your printer will still work)."
273 fi
274 else
275 - #here we should warn user that he should enable it so he can print
276 if ! linux_chkconfig_present USB_PRINTER; then
277 ewarn "If you plan to use USB printers you should enable the USB_PRINTER"
278 ewarn "support in your kernel."
279 @@ -111,29 +112,21 @@ pkg_setup() {
280 src_prepare() {
281 default
282
283 - # Remove ".SILENT" rule for verbose output (bug 524338).
284 + # Remove ".SILENT" rule for verbose output (bug #524338).
285 sed 's#^.SILENT:##g' -i Makedefs.in || die
286
287 - # Fix install-sh, posix sh does not have 'function'.
288 - sed 's#function gzipcp#gzipcp()#g' -i install-sh || die
289 -
290 - # Do not add -Werror even for live ebuilds
291 - sed '/WARNING_OPTIONS/s@-Werror@@' \
292 - -i config-scripts/cups-compiler.m4 || die
293 -
294 - AT_M4DIR=config-scripts eaclocal
295 - eautoconf
296 + AT_M4DIR="config-scripts" eautoreconf
297
298 - # custom Makefiles
299 + # Custom Makefiles
300 multilib_copy_sources
301 }
302
303 multilib_src_configure() {
304 export DSOFLAGS="${LDFLAGS}"
305
306 - # explicitly specify compiler wrt bug 524340
307 + # Explicitly specify compiler wrt bug #524340
308 #
309 - # need to override KRB5CONFIG for proper flags
310 + # Need to override KRB5CONFIG for proper flags
311 # https://github.com/apple/cups/issues/4423
312 local myeconfargs=(
313 CC="$(tc-getCC)"
314 @@ -173,7 +166,7 @@ multilib_src_configure() {
315 )
316
317 # Handle empty LINGUAS properly, bug #771162
318 - if [ -n "${LINGUAS+x}" ] ; then
319 + if [[ -n "${LINGUAS+x}" ]] ; then
320 myeconfargs+=(
321 --with-languages="${LINGUAS}"
322 )
323 @@ -185,7 +178,7 @@ multilib_src_configure() {
324 )
325 fi
326
327 - # install in /usr/libexec always, instead of using /usr/lib/cups, as that
328 + # Install in /usr/libexec always, instead of using /usr/lib/cups, as that
329 # makes more sense when facing multilib support.
330 sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
331
332 @@ -195,7 +188,7 @@ multilib_src_configure() {
333 sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
334 sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
335
336 - # additional path corrections needed for prefix, see bug 597728
337 + # Additional path corrections needed for prefix, see bug #597728
338 sed \
339 -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
340 -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
341 @@ -228,14 +221,14 @@ multilib_src_install() {
342 multilib_src_install_all() {
343 dodoc {CHANGES,CREDITS,README}.md
344
345 - # move the default config file to docs
346 + # Move the default config file to docs
347 dodoc "${ED}"/etc/cups/cupsd.conf.default
348 rm "${ED}"/etc/cups/cupsd.conf.default || die
349
350 - # clean out cups init scripts
351 + # Clean out cups init scripts
352 rm -r "${ED}"/etc/{init.d/cups,rc*} || die
353
354 - # install our init script
355 + # Install our init script
356 local neededservices=(
357 $(usex zeroconf avahi-daemon '')
358 $(usex dbus dbus '')
359 @@ -251,16 +244,16 @@ multilib_src_install_all() {
360 fi
361
362 if use xinetd ; then
363 - # correct path
364 + # Correct path
365 sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
366 "${ED}"/etc/xinetd.d/cups-lpd || die
367 - # it is safer to disable this by default, bug #137130
368 + # It is safer to disable this by default, bug #137130
369 grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \
370 { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; }
371 - # write permission for file owner (root), bug #296221
372 + # Write permission for file owner (root), bug #296221
373 fperms u+w /etc/xinetd.d/cups-lpd
374 else
375 - # always configure with --with-xinetd= and clean up later,
376 + # Always configure with --with-xinetd= and clean up later,
377 # bug #525604
378 rm -r "${ED}"/etc/xinetd.d || die
379 fi
380 @@ -271,13 +264,13 @@ multilib_src_install_all() {
381 rm -r "${ED}"/usr/share/applications || die
382 fi
383
384 - # create /etc/cups/client.conf, bug #196967 and #266678
385 + # Create /etc/cups/client.conf, bug #196967 and bug #266678
386 echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
387
388 - # the following file is now provided by cups-filters:
389 + # The following file is now provided by cups-filter:
390 rm -r "${ED}"/usr/share/cups/banners || die
391
392 - # the following are created by the init script
393 + # The following are created by the init script
394 rm -r "${ED}"/var/cache || die
395 rm -r "${ED}"/run || die
396
397
398 diff --git a/net-print/cups/files/cups-2.4.2-no-fortify-override.patch b/net-print/cups/files/cups-2.4.2-no-fortify-override.patch
399 new file mode 100644
400 index 000000000000..e9153ce2f082
401 --- /dev/null
402 +++ b/net-print/cups/files/cups-2.4.2-no-fortify-override.patch
403 @@ -0,0 +1,18 @@
404 +Gentoo already sets -D_FORTIFY_SOURCE=2 by default in GCC (patched in), so
405 +we need to avoid doing this in packages to avoid redefinition errors if
406 +we try to upgrade to e.g. =3.
407 +
408 +So, no effect on users, but important to stop issues w/ F_S=3.
409 +--- a/config-scripts/cups-compiler.m4
410 ++++ b/config-scripts/cups-compiler.m4
411 +@@ -106,8 +106,8 @@ AS_IF([test -n "$GCC"], [
412 + ], [
413 + # Otherwise use the Fortify enhancements to catch any unbounded
414 + # string operations...
415 +- CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
416 +- CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2"
417 ++ CFLAGS="$CFLAGS"
418 ++ CXXFLAGS="$CXXFLAGS"
419 + ])
420 +
421 + # Default optimization options...