Gentoo Archives: gentoo-commits

From: Kent Fredric <kentnl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: perl-core/Archive-Tar/files/, perl-core/Archive-Tar/
Date: Fri, 06 Jul 2018 06:03:15
Message-Id: 1530856777.1cec7c9d4656c7df67cdb1aaebf6ce53109dd062.kentnl@gentoo
1 commit: 1cec7c9d4656c7df67cdb1aaebf6ce53109dd062
2 Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 6 05:45:37 2018 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 6 05:59:37 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cec7c9d
7
8 perl-core/Archive-Tar: Add 2.300.0 for CVE-2018-12015 bug #657968
9
10 This resurrects perl-core/Archive-Tar that was previously removed
11 from tree, so that it can be installed independently on top of Perl
12 5.24 and perl 5.26, without forcing users to upgrade to perl 5.28
13 just to get this fix.
14
15 virtual/perl-Archive-Tar will be also mapped for this purpose.
16
17 Keywords taken from dev-lang/perl-5.26.2 on the basis that due to
18 Archive-Tar being included there, that this codebase is already
19 keyworded under a different name.
20
21 Patches applied to fence out Text-Diff dependent mechanics and a bunch
22 of other weirdness that seem to be targeted for non-vendor layouts
23 ( eg: it assumes we're installing bin/* into /usr/local/bin )
24
25 I'm not 100% on the mechanics I've chosen, but its OK for now.
26
27 Package-Manager: Portage-2.3.40, Repoman-2.3.9
28
29 perl-core/Archive-Tar/Archive-Tar-2.300.0.ebuild | 41 +++++++
30 perl-core/Archive-Tar/Manifest | 1 +
31 .../files/Archive-Tar-2.30-makefileptar.patch | 130 +++++++++++++++++++++
32 perl-core/Archive-Tar/metadata.xml | 14 +++
33 4 files changed, 186 insertions(+)
34
35 diff --git a/perl-core/Archive-Tar/Archive-Tar-2.300.0.ebuild b/perl-core/Archive-Tar/Archive-Tar-2.300.0.ebuild
36 new file mode 100644
37 index 00000000000..fa4859ac4f8
38 --- /dev/null
39 +++ b/perl-core/Archive-Tar/Archive-Tar-2.300.0.ebuild
40 @@ -0,0 +1,41 @@
41 +# Copyright 1999-2018 Gentoo Foundation
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=6
45 +
46 +DIST_AUTHOR=BINGOS
47 +DIST_VERSION=2.30
48 +inherit perl-module
49 +
50 +DESCRIPTION="A Perl module for creation and manipulation of tar files"
51 +
52 +SLOT="0"
53 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
54 +IUSE="test"
55 +
56 +RDEPEND="
57 + >=virtual/perl-File-Spec-0.820.0
58 + >=virtual/perl-IO-Compress-2.15.0
59 + >=virtual/perl-IO-Zlib-1.10.0
60 +"
61 +DEPEND="${DEPEND}
62 + virtual/perl-ExtUtils-MakeMaker
63 + test? (
64 + >=virtual/perl-Test-Harness-2.260.0
65 + virtual/perl-Test-Simple
66 + )
67 +"
68 +# TODO
69 +# Consider adding some sort of system for turning this stuff on, the
70 +# ENV vars GENTOO_TAR_BZIP2 and GENTOO_TAR_PTARDIFF exist for expert users,
71 +# but we can't regulate it by USE flags without creating a circular
72 +# dependency, specifically, the kind of circular dependency that
73 +# prohibits dev-lang/perl depending on virtual/perl-Archive-Tar
74 +# depending on perl-core/Archive-Tar, due to needing dev-perl/Text-Diff
75 +# that *will not be present* during perl upgrade.
76 +PATCHES=(
77 + "${FILESDIR}/${PN}-2.30-makefileptar.patch"
78 +)
79 +PERL_RM_FILES=(
80 + "t/99_pod.t"
81 +)
82
83 diff --git a/perl-core/Archive-Tar/Manifest b/perl-core/Archive-Tar/Manifest
84 new file mode 100644
85 index 00000000000..16252e1ab74
86 --- /dev/null
87 +++ b/perl-core/Archive-Tar/Manifest
88 @@ -0,0 +1 @@
89 +DIST Archive-Tar-2.30.tar.gz 63693 BLAKE2B aa7d1697984d76211e66d50488de1b7748f45187b7da946570342c7e9fda508325f1b9dc1263a5fc54d57809a91fc685b188de4c181c6935da0d2c18344c12e2 SHA512 7be2745d7c5b73cec9ef66968e6f28a4d4dcc0d80b41861e3aa2d4c27ba6c013cce6a87bba8a626888fcaa0d4ebecd17a7b09324215876f79ca9f39d671aed4b
90
91 diff --git a/perl-core/Archive-Tar/files/Archive-Tar-2.30-makefileptar.patch b/perl-core/Archive-Tar/files/Archive-Tar-2.30-makefileptar.patch
92 new file mode 100644
93 index 00000000000..dad52df5d34
94 --- /dev/null
95 +++ b/perl-core/Archive-Tar/files/Archive-Tar-2.30-makefileptar.patch
96 @@ -0,0 +1,130 @@
97 +From 14ecca4632b44461d3c23344027ec30eedba1b0a Mon Sep 17 00:00:00 2001
98 +From: Kent Fredric <kentnl@g.o>
99 +Date: Fri, 6 Jul 2018 17:20:30 +1200
100 +Subject: Patch ptardiff support out conditional on ENV
101 +
102 +- Toggle installation and testing of ptardiff functionality to only
103 + trigger when requested
104 +
105 +- Toggle testing of bzip2 support only when requested
106 +
107 +- Disable mechanics intended for user-perl environments where
108 + installation is to somewhere that may fall outside PATH
109 +---
110 + Makefile.PL | 46 +++++++++-------------------------------------
111 + t/07_ptardiff.t | 11 +++++++++--
112 + 2 files changed, 18 insertions(+), 39 deletions(-)
113 +
114 +diff --git a/Makefile.PL b/Makefile.PL
115 +index fe093bd..0289409 100644
116 +--- a/Makefile.PL
117 ++++ b/Makefile.PL
118 +@@ -9,19 +9,12 @@ unless( $] >= 5.005_03 ) {
119 + die qq[Archive::Tar requires perl version 5.005_03 or higher to run\n];
120 + }
121 +
122 +-if( !eval { require IO::Compress::Bzip2; 1 } and !$opt->{n} ) {
123 +- warn qq[You do not have IO::Compress::Bzip2 installed. This means you can ].
124 +- qq[not read or write bzip2 compressed archives!\n] .
125 +- qq[Note: you can disable this warning (and the prerequisite) ].
126 +- qq[by invoking Makefile.PL with '-n'\n];
127 ++if( $ENV{GENTOO_TAR_BZIP2} ) {
128 ++ require IO::Compress::Bzip2;
129 + }
130 +
131 +-if( !$opt->{d} and not eval { require Text::Diff; 1 } ) {
132 +- print qq[\nArchive::Tar comes with a utility called 'ptardiff' which ].
133 +- qq[lets you run diffs against tar archives.\n\nHowever, this ].
134 +- qq[utility requires you to have Text::Diff installed.\n\n].
135 +- qq[To add Text::Diff as a prerequisite, please supply the ].
136 +- qq['-d' option when invoking this Makefile.PL.\n\n];
137 ++if ( $ENV{GENTOO_TAR_PTARDIFF} ) {
138 ++ require Text::Diff;
139 + }
140 +
141 + my $prereqs = {
142 +@@ -45,10 +38,10 @@ unless ($Config{useperlio}) {
143 + }
144 +
145 + ### ok, you didn't want IO::Zlib ###
146 +-delete $prereqs->{'IO::Compress::Bzip2'} if $opt->{n};
147 ++delete $prereqs->{'IO::Compress::Bzip2'} unless $ENV{GENTOO_TAR_BZIP2};
148 +
149 + ### so you want text::diff ###
150 +-$prereqs->{'Text::Diff'} = 0 if $opt->{d};
151 ++$prereqs->{'Text::Diff'} = 0 if $ENV{GENTOO_TAR_PTARDIFF};
152 +
153 +
154 + WriteMakefile1(
155 +@@ -68,7 +61,6 @@ WriteMakefile1(
156 + #EXE_FILES => ['bin/ptar', 'bin/ptardiff'],
157 + EXE_FILES => [ _scripts() ],
158 + PREREQ_PM => $prereqs,
159 +- INSTALLDIRS => ( $] >= 5.009003 && $] < 5.012 ? 'perl' : 'site' ),
160 + AUTHOR => 'Jos Boumans <kane[at]cpan.org>',
161 + ABSTRACT => 'Manipulates TAR archives',
162 + );
163 +@@ -84,29 +76,9 @@ sub _scripts {
164 + File::Copy::copy( $_, "$_$version" ) for @scripts;
165 + @scripts = glob("bin/*$version");
166 + }
167 +- if ( $] >= 5.012 && $Config::Config{installscript} ne $Config::Config{installsitescript} ) {
168 +- my $script = $Config::Config{installscript};
169 +- my $site = $Config::Config{installsitescript};
170 +- warn <<"WARNING";
171 +-###############################################################
172 +-##
173 +-## Hi! Your script and sitescript locations are different
174 +-##
175 +-## As your perl is v5.12.0 or greater the script included
176 +-## in this distribution will be installed into sitescript
177 +-##
178 +-## You might want to check that the following location is
179 +-## in your PATH environment variable:
180 +-##
181 +-## '$site'
182 +-##
183 +-## Many thanks.
184 +-##
185 +-###############################################################
186 +-
187 +-WARNING
188 +- sleep 10;
189 +- }
190 ++ }
191 ++ if ( not $ENV{GENTOO_TAR_PTARDIFF} ) {
192 ++ @scripts = grep { $_ !~ /ptardiff/ } @scripts;
193 + }
194 + return @scripts;
195 + }
196 +diff --git a/t/07_ptardiff.t b/t/07_ptardiff.t
197 +index 6935fc6..da4ea29 100644
198 +--- a/t/07_ptardiff.t
199 ++++ b/t/07_ptardiff.t
200 +@@ -1,5 +1,13 @@
201 + use strict;
202 + use warnings;
203 ++
204 ++BEGIN {
205 ++ unless ( $ENV{GENTOO_TAR_PTARDIFF} ) {
206 ++ print "1..0 # SKIP this test requires GENTOO_TAR_PTARDIFF set";
207 ++ exit
208 ++ }
209 ++}
210 ++
211 + use Test::More;
212 +
213 + use File::Spec;
214 +@@ -14,8 +22,7 @@ my $tarfile = File::Spec->catfile("t", "ptardiff.tar");
215 + my $ptardiff = File::Spec->catfile($Bin, "..", "bin", "ptardiff");
216 + my $cmd = "$^X $ptardiff $tarfile";
217 +
218 +-eval { require Text::Diff; };
219 +-plan skip_all => 'Text::Diff required to test ptardiff' if $@;
220 ++require Text::Diff;
221 + plan tests => 1;
222 +
223 + # create directory/files
224 +--
225 +2.17.1
226 +
227
228 diff --git a/perl-core/Archive-Tar/metadata.xml b/perl-core/Archive-Tar/metadata.xml
229 new file mode 100644
230 index 00000000000..02a8a8d03d6
231 --- /dev/null
232 +++ b/perl-core/Archive-Tar/metadata.xml
233 @@ -0,0 +1,14 @@
234 +<?xml version="1.0" encoding="UTF-8"?>
235 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
236 +<pkgmetadata>
237 + <maintainer type="project">
238 + <email>perl@g.o</email>
239 + <name>Gentoo Perl Project</name>
240 + </maintainer>
241 + <upstream>
242 + <remote-id type="cpan">Archive-Tar</remote-id>
243 + <remote-id type="cpan-module">Archive::Tar</remote-id>
244 + <remote-id type="cpan-module">Archive::Tar::Constant</remote-id>
245 + <remote-id type="cpan-module">Archive::Tar::File</remote-id>
246 + </upstream>
247 +</pkgmetadata>