public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Dist-Zilla/files/, dev-perl/Dist-Zilla/
@ 2017-10-06  9:49 Kent Fredric
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Fredric @ 2017-10-06  9:49 UTC (permalink / raw
  To: gentoo-commits

commit:     22b2006adc689bd890b2553d333a6dbbbae59ce9
Author:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  6 09:47:45 2017 +0000
Commit:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Fri Oct  6 09:49:12 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22b2006a

dev-perl/Dist-Zilla: Add fix for [=inc::Foo] on 5.26 bug #613586

This unbreaks dists that use the syntax:

  [=inc::Foo]

Which is *far* more widespread than any use of stuff from `@INC`
locations **other** than `.`

Bug: https://bugs.gentoo.org/613586
Package-Manager: Portage-2.3.8, Repoman-2.3.3

 ...a-6.10.0.ebuild => Dist-Zilla-6.10.0-r1.ebuild} |  0
 dev-perl/Dist-Zilla/Dist-Zilla-6.10.0.ebuild       |  3 ++
 .../files/Dist-Zilla-6.10.0-perl526.patch          | 58 ++++++++++++++++++++++
 3 files changed, 61 insertions(+)

diff --git a/dev-perl/Dist-Zilla/Dist-Zilla-6.10.0.ebuild b/dev-perl/Dist-Zilla/Dist-Zilla-6.10.0-r1.ebuild
similarity index 100%
copy from dev-perl/Dist-Zilla/Dist-Zilla-6.10.0.ebuild
copy to dev-perl/Dist-Zilla/Dist-Zilla-6.10.0-r1.ebuild

diff --git a/dev-perl/Dist-Zilla/Dist-Zilla-6.10.0.ebuild b/dev-perl/Dist-Zilla/Dist-Zilla-6.10.0.ebuild
index 8654659cc4e..606e84c34a7 100644
--- a/dev-perl/Dist-Zilla/Dist-Zilla-6.10.0.ebuild
+++ b/dev-perl/Dist-Zilla/Dist-Zilla-6.10.0.ebuild
@@ -13,6 +13,9 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="minimal test"
 
+PATCHES=(
+	"${FILESDIR}/${P}-perl526.patch"
+)
 ## CPAN->Gentoo resolution map for grepping in case upstream split a dep
 # breaks: Dist::Zilla::App::Command::stale -> Dist-Zilla-Plugin-PromptIfStale
 # DZA:Command::xtest -> DZP:CheckExtraTests

diff --git a/dev-perl/Dist-Zilla/files/Dist-Zilla-6.10.0-perl526.patch b/dev-perl/Dist-Zilla/files/Dist-Zilla-6.10.0-perl526.patch
new file mode 100644
index 00000000000..ad908fa84a0
--- /dev/null
+++ b/dev-perl/Dist-Zilla/files/Dist-Zilla-6.10.0-perl526.patch
@@ -0,0 +1,58 @@
+From fda708069c3c3bdb2b6d8922b21eb604084d51e2 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Fri, 6 Oct 2017 22:32:36 +1300
+Subject: Keep dist-root in @INC beyond Perl 5.26
+
+The only thing that makes sense is to ensure CWD of some description is
+in @INC at some stage before plugins are actually loaded, because
+that's the traditional expectation.
+
+Basically, this option is the only option that works. There's no viable
+way to scope @INC changes to anything narrower without breaking the
+usage entirely.
+
+There's no sane way to limit the depth of @INC changes either, even if
+we wanted to.
+
+And if you have vulnerable code in your project source tree that you're
+worried about, you're pretty much beyond screwed already, and you're
+about to be screwing CPAN when you ship next, and no amount of @INC
+magic will save you.
+
+Bug: https://bugs.gentoo.org/613586
+Bug: https://github.com/rjbs/Dist-Zilla/issues/581
+Bug: https://github.com/rjbs/Dist-Zilla/pull/590
+Bug: https://github.com/rjbs/Dist-Zilla/pull/600
+---
+ lib/Dist/Zilla/Dist/Builder.pm    | 1 +
+ lib/Dist/Zilla/Util/AuthorDeps.pm | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/Dist/Zilla/Dist/Builder.pm b/lib/Dist/Zilla/Dist/Builder.pm
+index 2148eeb..6b8e301 100644
+--- a/lib/Dist/Zilla/Dist/Builder.pm
++++ b/lib/Dist/Zilla/Dist/Builder.pm
+@@ -36,6 +36,7 @@ sub from_config {
+   $arg ||= {};
+ 
+   my $root = path($arg->{dist_root} || '.');
++  unshift @INC, $root->absolute->stringify;
+ 
+   my $sequence = $class->_load_config({
+     root   => $root,
+diff --git a/lib/Dist/Zilla/Util/AuthorDeps.pm b/lib/Dist/Zilla/Util/AuthorDeps.pm
+index 01a958e..cfcd62f 100644
+--- a/lib/Dist/Zilla/Util/AuthorDeps.pm
++++ b/lib/Dist/Zilla/Util/AuthorDeps.pm
+@@ -105,7 +105,7 @@ sub extract_author_deps {
+ 
+   if ($missing) {
+     require Module::Runtime;
+-
++    unshift @INC, $root->absolute->stringify;
+     @packages =
+       grep {
+         $_ eq 'perl'
+-- 
+2.14.1
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Dist-Zilla/files/, dev-perl/Dist-Zilla/
@ 2020-08-07 17:53 Kent Fredric
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Fredric @ 2020-08-07 17:53 UTC (permalink / raw
  To: gentoo-commits

commit:     c8e6567dafa3ed40b7f9faf3d309fa897accb511
Author:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  7 17:47:06 2020 +0000
Commit:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Fri Aug  7 17:53:14 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8e6567d

dev-perl/Dist-Zilla: add workaround for broken `authordeps --missing`

Stumbled into this working with app-admin/rex's 9999 version.

`dzil authordeps --missing` was reporting missing deps, and bailing,
even though they were provably installed.

This fixes build issues with app-admin/rex-9999 with
 =dev-perl/Dist-Zilla-6.15.0

Bug: https://github.com/rjbs/Dist-Zilla/issues/660
Package-Manager: Portage-2.3.103, Repoman-2.3.22
Signed-off-by: Kent Fredric <kentnl <AT> gentoo.org>

 dev-perl/Dist-Zilla/Dist-Zilla-6.15.0-r1.ebuild    | 157 +++++++++++++++++++++
 .../Dist-Zilla-6.015-authordeps-missing.patch      |  36 +++++
 2 files changed, 193 insertions(+)

diff --git a/dev-perl/Dist-Zilla/Dist-Zilla-6.15.0-r1.ebuild b/dev-perl/Dist-Zilla/Dist-Zilla-6.15.0-r1.ebuild
new file mode 100644
index 00000000000..4485c5f5469
--- /dev/null
+++ b/dev-perl/Dist-Zilla/Dist-Zilla-6.15.0-r1.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DIST_AUTHOR=RJBS
+DIST_VERSION=6.015
+inherit perl-module
+
+DESCRIPTION="distribution builder; installer not included!"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="minimal test"
+RESTRICT="!test? ( test )"
+
+## CPAN->Gentoo resolution map for grepping in case upstream split a dep
+# breaks: Dist::Zilla::App::Command::stale -> Dist-Zilla-Plugin-PromptIfStale
+# DZA:Command::xtest -> DZP:CheckExtraTests
+# DZP:Author::Plicease::Tests -> DZPB::Author::Plicease
+X_BREAKS="
+	!<dev-perl/Dist-Zilla-Plugin-PromptIfStale-0.40.0
+	!<=dev-perl/Dist-Zilla-App-Command-update-0.40.0
+	!<dev-perl/Dist-Zilla-Plugin-CheckExtraTests-0.29.0
+	!<=dev-perl/Dist-Zilla-PluginBundle-Author-Plicease-2.20.0
+	!<dev-perl/Dist-Zilla-Plugin-CopyFilesFromBuild-0.161.230
+	!<=dev-perl/Dist-Zilla-Plugin-CopyFilesFromBuild-Filtered-0.1.0
+	!<=dev-perl/Dist-Zilla-Plugin-Git-2.36.0
+	!<=dev-perl/Dist-Zilla-Plugin-Keywords-0.6.0
+	!<dev-perl/Dist-Zilla-Plugin-MakeMaker-Awesome-0.220.0
+	!<=dev-perl/Dist-Zilla-Plugin-NameFromDirectory-0.30.0
+	!<=dev-perl/Dist-Zilla-Plugin-PodWeaver-4.6.0
+	!<=dev-perl/Dist-Zilla-Plugin-Prereqs-AuthorDeps-0.5.0
+	!<dev-perl/Dist-Zilla-Plugin-ReadmeAnyFromPod-0.161.170
+	!<=dev-perl/Dist-Zilla-Plugin-Run-0.35.0
+	!<=dev-perl/Dist-Zilla-Plugin-Test-CheckDeps-0.13.0
+	!<=dev-perl/Dist-Zilla-Plugin-Test-Version-1.50.0
+	!<=dev-perl/Dist-Zilla-Plugin-TrialVersionComment-0.3.0
+"
+# r: App::Cmd::Command::version -> App-Cmd-0.321
+# r: App::Cmd::Setup  -> App-Cmd
+# r: App::Cmd::Tester -> App-Cmd
+# r: App::Cmd::Tester::CaptureExternal -> App-Cmd 0.314
+# r: CPAN::Meta::Converter -> CPAN-Meta
+# r: CPAN::Meta::Merge -> CPAN-Meta 2.142060
+# r: CPAN::Meta::Prereqs -> CPAN-Meta
+# r: CPAN::Meta::Validator -> CPAN-Meta
+# r: Config::INI::Reader -> Config-INI
+# r: Config::MVP::Assembler -> Config-MVP
+# r: Config::MVP::Assembler::WithBundles -> Config-MVP
+# r: Config::MVP::Reader -> Config-MVP
+# r: Config::MVP::Reader::Findable::ByExtension -> Config-MVP 1.101450
+# r: Config::MVP::Reader::Finder -> Config-MVP 0.092990
+# r: Config::MVP::Section -> Config-MVP
+# r: List::Util -> Scalar-List-Utils
+# r: Mixin::Linewise::Readers -> Mixin-Linewise
+# r: Moose::Role -> Moose
+# r: Moose::Util::TypeConstraints -> Moose
+# r: MooseX::Types::Moose -> MooseX-Types
+# r: PPI::Document -> PPI
+# r: Scalar::Util -> Scalar-List-Utils
+# r: Software::LicenseUtils -> Software-License
+# r: Sub::Exporter::Util -> Sub-Exporter
+# r: Term::ReadKey -> TermReadKey
+# r: Text::Template -> text-template
+# r: strict, warnings -> perl
+
+# NB: PPI::XS is suggested by Dist-Zilla, but upstream of
+#     PPI say PPI::XS presently doesn't do anything useful,
+#     so the optional useflag and the dependency are skipped.
+RDEPEND="
+	${X_BREAKS}
+	!minimal? (
+		>=dev-perl/Archive-Tar-Wrapper-0.150.0
+		>=dev-perl/Data-OptList-0.110.0
+		dev-perl/Term-ReadLine-Gnu
+	)
+	>=dev-perl/App-Cmd-0.330.0
+	virtual/perl-Archive-Tar
+	>=virtual/perl-CPAN-Meta-2.142.60
+	>=virtual/perl-CPAN-Meta-Requirements-2.121.0
+	>=dev-perl/CPAN-Uploader-0.103.4
+	virtual/perl-Carp
+	>=dev-perl/Class-Load-0.170.0
+	dev-perl/Config-INI
+	>=dev-perl/Config-MVP-2.200.11
+	>=dev-perl/Config-MVP-Reader-INI-2.101.461
+	virtual/perl-Data-Dumper
+	>=dev-perl/Data-Section-0.200.2
+	>=dev-perl/DateTime-0.440.0
+	virtual/perl-Digest-MD5
+	virtual/perl-Encode
+	>=virtual/perl-ExtUtils-Manifest-1.660.0
+	>=dev-perl/File-Copy-Recursive-0.410.0
+	dev-perl/File-Find-Rule
+	virtual/perl-File-Path
+	dev-perl/File-ShareDir
+	>=dev-perl/File-ShareDir-Install-0.30.0
+	virtual/perl-File-Spec
+	virtual/perl-File-Temp
+	dev-perl/File-pushd
+	dev-perl/JSON-MaybeXS
+	>=dev-perl/Log-Dispatchouli-1.102.220
+	>=dev-perl/Mixin-Linewise-0.100.0
+	virtual/perl-Module-CoreList
+	dev-perl/Module-Runtime
+	>=dev-perl/Moose-0.920.0
+	dev-perl/MooseX-LazyRequire
+	>=dev-perl/MooseX-Role-Parameterized-1.10.0
+	dev-perl/MooseX-SetOnce
+	dev-perl/MooseX-Types
+	dev-perl/MooseX-Types-Perl
+	dev-perl/PPI
+	dev-perl/Params-Util
+	>=dev-perl/Path-Tiny-0.52.0
+	>=dev-perl/Perl-PrereqScanner-1.16.0
+	virtual/perl-Pod-Simple
+	>=virtual/perl-Scalar-List-Utils-1.450.0
+	>=dev-perl/Software-License-0.103.14
+	virtual/perl-Storable
+	>=dev-perl/String-Formatter-0.100.680
+	>=dev-perl/String-RewritePrefix-0.6.0
+	dev-perl/Sub-Exporter
+	dev-perl/Sub-Exporter-ForMethods
+	dev-perl/Term-Encoding
+	dev-perl/TermReadKey
+	virtual/perl-Term-ReadLine
+	dev-perl/Term-UI
+	dev-perl/Test-Deep
+	>=dev-perl/Text-Glob-0.80.0
+	dev-perl/Text-Template
+	dev-perl/Try-Tiny
+	dev-perl/YAML-Tiny
+	virtual/perl-autodie
+	dev-perl/namespace-autoclean
+	virtual/perl-parent
+	virtual/perl-version
+"
+# t: Software::License::None -> Software-License 0.016
+# t: lib, utf8 -> perl
+BDEPEND="${RDEPEND}
+	virtual/perl-ExtUtils-MakeMaker
+	>=dev-perl/File-ShareDir-Install-0.60.0
+	test? (
+		>=dev-perl/CPAN-Meta-Check-0.11.0
+		dev-perl/Test-FailWarnings
+		dev-perl/Test-Fatal
+		dev-perl/Test-File-ShareDir
+		>=virtual/perl-Test-Simple-0.960.0
+	)
+"
+PATCHES=(
+	"${FILESDIR}/${PN}-6.015-authordeps-missing.patch"
+)
+src_test() {
+	TZ=UTC perl-module_src_test
+}

diff --git a/dev-perl/Dist-Zilla/files/Dist-Zilla-6.015-authordeps-missing.patch b/dev-perl/Dist-Zilla/files/Dist-Zilla-6.015-authordeps-missing.patch
new file mode 100644
index 00000000000..c9e25ebff61
--- /dev/null
+++ b/dev-perl/Dist-Zilla/files/Dist-Zilla-6.015-authordeps-missing.patch
@@ -0,0 +1,36 @@
+From 21a92b08d30cd4758fefe1706eb96af30082cb7b Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Sat, 8 Aug 2020 05:25:21 +1200
+Subject: Fix INC traversal breakage with non-string objects in INC
+
+As `$root` is a Path object, and because there are defined mechanisms
+for handling objects in `@INC` traversal, this object being added to
+`@INC` can cause panics when the perl interpreter tries to call a method
+that doesn't exist, violating the API.
+
+And this in turn makes various authordeps appear missing when they're
+present, due to suppression of the error occurring from the above.
+
+Forcing stringification of the path object mitigates this issue.
+
+Bug: https://github.com/rjbs/Dist-Zilla/issues/660
+---
+ lib/Dist/Zilla/Util/AuthorDeps.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Dist/Zilla/Util/AuthorDeps.pm b/lib/Dist/Zilla/Util/AuthorDeps.pm
+index cbca1c7..603d67b 100644
+--- a/lib/Dist/Zilla/Util/AuthorDeps.pm
++++ b/lib/Dist/Zilla/Util/AuthorDeps.pm
+@@ -113,7 +113,7 @@ sub extract_author_deps {
+         : do {
+             my $m = $_;
+             ! eval {
+-              local @INC = @INC; push @INC, $root;
++              local @INC = @INC; push @INC, "$root";
+               # This will die if module is missing
+               Module::Runtime::require_module($m);
+               my $v = $vermap->{$m};
+-- 
+2.28.0
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-07 17:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-06  9:49 [gentoo-commits] repo/gentoo:master commit in: dev-perl/Dist-Zilla/files/, dev-perl/Dist-Zilla/ Kent Fredric
  -- strict thread matches above, loose matches on Subject: below --
2020-08-07 17:53 Kent Fredric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox