Commit Graph

157 Commits

Author SHA1 Message Date
Philip Prindeville 79092d4705 perl: update to 5.26.2
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-04-29 16:18:14 -06:00
Philip Prindeville cda0e18b27
Merge pull request #5504 from pprindeville/perl-cleanup
perlmod: avoid 'do' semantics and just concatenate
2018-01-26 16:41:46 -07:00
Philip Prindeville 1e0db9ba80 perlmod: avoid 'do' semantics and just concatenate
In Perl the 'do' construct has some odd side-effects regarding $@,
$!, and return values (i.e. 'do'ing a file which evaluates to undef
can be a little ambiguous).

Instead, generate a preamble to the Makefile.PL and execute it as
stdin.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-01-25 18:48:34 -07:00
Philip Prindeville 531eb4404b Revert "perl: when Makefile.PL fails give more feedback"
This reverts commit a4aaaf8d8f.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-01-25 18:48:34 -07:00
Philip Prindeville be52f902d8 Revert "perlmod: redux handling odd Makefile.PL eval value"
This reverts commit f03cd7b5ac.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-01-25 18:48:34 -07:00
Tomasz Maciej Nowak 6535c76395 perl: add build config for aarch64
Because nonexistent aarch64.config the build of perl will fail for ARM
64-bit targets. Fix it by adding mentioned config. Fixes #2963.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
2018-01-26 00:40:17 +01:00
Alexander Couzens a73e96cb0c perl: remove build timestamp
Build timestamp prevents reproducible builds [0].

[0] https://reproducible-builds.org/docs/timestamps/

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-12-14 18:59:10 +01:00
Philip Prindeville f03cd7b5ac perlmod: redux handling odd Makefile.PL eval value
It seems that Inline::C evaluates to undef which is problematic, so
we need to handle this better.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-11-07 16:13:02 -07:00
Philip Prindeville a4aaaf8d8f perl: when Makefile.PL fails give more feedback
There are a few packages which mysteriously fail during the configure
stage.  Give us better means of understanding why.

Also, some Makefile.PL's have "use" statements which reference
files which are in or under ".".

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-10-27 18:22:13 -06:00
Philip Prindeville c79911b66d perl: modules failing due to dot not in @INC
5.26.1 introduced default_inc_excludes_dot which is causing
perl-html-tags and possibly other modules to fail.  Add explict
dot back when invoking module's ./Makefile.PL.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-10-27 15:43:14 -06:00
Philip Prindeville 4a94479f96 perl: update to 5.26.1
Required changes:

* Add qualifying '.' to scripts or to @INC, as appropriate since we're
  enabling default_inc_excludes_dot;

* Add new platform/library definitions like double-double format and
  locale library functions/headers;

* Delete patch 020 as it's been upstreamed;

Optional changes:

* Instead of using -@rm and having that fail, emit an error message,
  and be ignored, just use @rm -f instead which will always succeed.

Security
[CVE-2017-12837] Heap buffer overflow in regular expression compiler

Compiling certain regular expression patterns with the case-insensitive
modifier could cause a heap buffer overflow and crash perl. This has
now been fixed. [perl #131582]

[CVE-2017-12883] Buffer over-read in regular expression parser

For certain types of syntax error in a regular expression pattern, the
error message could either contain the contents of a random, possibly
large, chunk of memory, or could crash perl. This has now been fixed.
[perl #131598]

[CVE-2017-12814] $ENV{$key} stack buffer overflow on Windows

A possible stack buffer overflow in the %ENV code on Windows has been
fixed by removing the buffer completely since it was superfluous anyway.
[perl #131665]

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-10-24 11:40:34 -06:00
Philip Prindeville d58ac19c9f perl: put -rdynamic in proper build variable
The standard way to pass -rdynamic (or -Wl,--dynamic-export) is via
the $ccdlflags variable.  Do what is best practice.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-10-16 16:40:22 -06:00
Philip Prindeville b392cd595a perl: simplify passing in ldflags
Originally as PR #2383 but rewritten.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Alexander Ryzhov <openwrt@ryzhov-al.ru>
2017-10-16 16:40:22 -06:00
Etienne Champetier 4006865ae8 treewide: run "make check FIXUP=1"
fix Makefile chmod (644)
replace MD5SUM with HASH
add PKG_MIRROR_HASH when PKG_SOURCE_PROTO:=git

(PKG_SOURCE_PROTO:=svn tarballs are not reproducible for now)

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
2017-08-29 21:41:14 -07:00
Michail Frolov 571a810fd4 lang/perl: Upgraded to Perl 5.24.1
Signed-off-by: Michail Frolov <frolovm@pobox.com>
2017-05-10 14:46:25 -04:00
Hannu Nyman 19bb3f7eaf Merge pull request #3740 from pprindeville/fix-perlmod-stripping
perlmod: global knob to disable comment stripping modules
2017-01-11 23:39:14 +02:00
Philip Prindeville 785b67a27e perlmod: global knob to disable comment stripping modules
Certain strings are misinterpreted as comments by perlmod.mk and removed
when they shouldn't be (in particular, perl-cgi).  Enable this whenever
you have sufficient flash space.

Globally, CONFIG_PERL_NOCOMMENT=y (default) causes comments to be stripped
as before.  However, a package (like perl-cgi) can override this with
PKG_LEAVE_COMMENTS=1.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-01-11 14:31:09 -07:00
Matthias Schiffer 4a984a8d60
treewide: replace $(STAGING_DIR)/host and $(HOST_BUILD_PREFIX) with $(STAGING_DIR_HOSTPKG)
As both LEDE and OpenWrt have STAGING_DIR_HOSTPKG now, we can start to rely
on it. See 73b7f55424 for more information on
STAGING_DIR_HOSTPKG.

STAGING_DIR_HOSTPKG won't actually be changed before the first LEDE release
(it is equivalent to $(STAGING_DIR)/host), so this simple search/replace
cleanup is safe to apply. Doing this cleanup now will be useful for the
Gluon project (an OpenWrt/LEDE based firmware framework) for experimenting
with modifying STAGING_DIR_HOSTPKG before doing this in the LEDE upstream.

Also fixes a typo in the dbus Makefile ("STAGIND_DIR").

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-01-10 18:25:54 +01:00
Hannu Nyman d015c6edfe Merge pull request #2922 from cshore/pull-request-fix-perl-utf8-dependency
lang/perlbase: Fix missing utf8 dependency on unicore
2016-11-06 11:57:42 +02:00
champtar 3f5ed39e40 Merge pull request #2446 from jow-/CVE-2016-2381
perl: securely handle duplicate environment variables [CVE-2016-2381]
2016-07-12 17:13:44 +02:00
Daniel Dickinson 1b1a2db490 lang/perlbase: Fix missing utf8 dependency on unicore
perlbase-utf8 depends on perlbase-unicore however that dependency was missing.
This patch fixes that.

Signed-off-by: Daniel Dickinson <lede@daniel.thecshore.com>
2016-07-04 18:13:45 -04:00
Stefan Weil a91ab74d48 lang/perl: Fix typos (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-09 19:47:45 +02:00
Jo-Philipp Wich 0d18627cd2 perl: securely handle duplicate environment variables [CVE-2016-2381]
Stephane Chazelas discovered a bug in the environment handling in Perl.

Perl provides a Perl-space hash variable, %ENV, in which environment
variables can be looked up.  If a variable appears twice in envp, only
the last value would appear in %ENV, but getenv would return the first.
Perl's taint security mechanism would be applied to the value in %ENV,
but not to the other rest of the environment.  This could result in an
ambiguous environment causing environment variables to be propagated to
subprocesses, despite the protections supposedly offered by taint
checking.

With this update Perl changes the behavior to match the following:

 a) %ENV is populated with the first environment variable, as getenv
    would return.
 b) Duplicate environment entries are removed.

References:

 * http://perl5.git.perl.org/perl.git/commit/ae37b791a73a9e78dedb89fb2429d2628cf58076
 * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2381

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2016-03-01 17:26:51 +01:00
Naoir 305b844767 Merge pull request #2267 from jow-/CVE-2015-8607
perl: ensure File::Spec::canonpath() preserves taint [CVE-2015-8607]
2016-01-23 15:52:09 +01:00
Felix Fietkau 9f8e5aca34 treewide: use $(STAGING_DIR)/host instead of $(STAGING_DIR_HOST), sync with changes in trunk
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2016-01-20 21:56:03 +01:00
Jo-Philipp Wich f73e358558 perl: ensure File::Spec::canonpath() preserves taint [CVE-2015-8607]
Beginning in PathTools 3.47 and/or perl 5.20.0, the File::Spec::canonpath()
routine returned untained strings even if passed tainted input. This defect
undermines the guarantee of taint propagation, which is sometimes used to
ensure that unvalidated user input does not reach sensitive code.

This defect was found and reported by David Golden of MongoDB, and a patch
was provided by Tony Cook.

References:

 * https://rt.perl.org/Public/Bug/Display.html?id=126862
 * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8607

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2016-01-14 12:17:56 +01:00
Marcel Denia a23ffef7e9 perl: Update to 5.22.1
Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-12-21 17:53:02 +01:00
Marcel Denia 8829ae3de6 perl: Work around recompile failures
Apparently, recompiling/relinking fails under some circumstances. This
patch has been reported to work around that issue.

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-12-10 22:40:54 +01:00
Marcel Denia 59d24044b3 perl: Fix uClibc handling
Configuration scripts expect the libc identifier to be "uclibc" in case we're using it,
OpenWrt provides "uClibc". Oh well...

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-11-30 01:36:46 +01:00
Marcel Denia bb06539632 perl: Set gccversion configuration symbol correctly
This was previously manually set to '4.8.0'. Aside from just being incorrect,
it also breaks Errno's GCC5 detection.

Fixes #2044.

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-11-29 22:39:39 +01:00
Marcel Denia 6552e55ea7 perl: Bump PKG_RELEASE
Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-11-20 12:53:13 +01:00
Marcel Denia 51bef7ad20 perl: Enable crypt() for all libc implementations
Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-11-20 12:33:37 +01:00
Marcel Denia e16d7305dd perl: Bump PKG_RELEASE
Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-25 11:50:52 +02:00
Marcel Denia 3aaaede7b2 perl: Reorganize patches
The old scheme didn't make any sense...not that there was a scheme really.

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-25 11:50:52 +02:00
Marcel Denia d57f34795c perl: Remove microperl caretx dependency patch
This will make microperl unable to build. That's okay, since we haven't
been building it for quite a while now.

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-25 11:50:33 +02:00
Marcel Denia 58a7c33ca7 perl: Invert perlbase-essential/perlbase-config circular dependency solution
perlbase-essential and perlbase-config depend on functionality from
each other. Previously, this was solved by just making perlbase-config depend
on perlbase-essential.
However, since a simple "use lib" is enough to trigger pulling in Config, this
approach doesn't seem to make much sense. So let's just make perlbase-essential
depend on perlbase-config instead.
This pulls in perlbase-config as a dependency to pretty much every Perl package,
so in the future we might want to just merge Config into perlbase-essential.

Thanks to Robert Högberg for spotting this.

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-25 10:59:15 +02:00
Naoir e2837aecae Merge pull request #1770 from robho/perlbase-data_needs_more_dependencies
perlbase-data: Add dependency on perlbase-bytes
2015-09-23 08:05:12 +02:00
Robert Högberg a5c31667a8 perlbase-data: Add dependency on perlbase-bytes
Dumper.pm, included in perlbase-data, uses module bytes, so add dependency
on openwrt package perlbase-bytes.

Signed-off-by: Robert Högberg <robert.hogberg@gmail.com>
2015-09-22 10:33:48 +02:00
Marcel Denia 1c8c372e9c perl: Properly override PERL_INC for subdirectory builds
Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-14 15:33:18 +02:00
Marcel Denia 7baa440416 perl: Bump PKG_RELEASE
Despite being just a packaging update, this update packs quite a few changes.

To start things off, we're finally passing perl's testsuite on at least
x86/musl. There are a lot of skipped tests left, as well as some oddities.
Nothing too heavy though. Making this happen was an ongoing effort since the
perl-5.20.1 release.
We still can't run module testsuites and I don't expect all target/libc
combinations to pass yet. So we'll leave test suite support marked as
experimental.

We've also switched from the old collection of target-specific configuration
files to a new, more flexible and easier-to-maintain system based on
perlconfig.pl. It'll generate a suitable configuration file using information
found in it's *.config files as well as command-line parameters passed.
See the POD and files/README.config for details.

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-01 09:23:25 +02:00
Marcel Denia 7d38a15bc4 perl: Skip $0 test on busybox in dist/threads/t/join.t
This test requires a ps which provides the -f option, as well as suitable output.
We can't provide either with busybox. Just skip it for now.

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-01 09:23:24 +02:00
Marcel Denia 948a4cc165 perl: Skip crypt() tests if unavailable in t/op/tie_fetch_count.t
Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-01 09:23:24 +02:00
Marcel Denia 706fa78439 perl: Update perlbase.mk
- Add perlbase-meta-notation
- Include missing files and tests/test data
- Install Archive::Tar utilities
- Update dependencies

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-01 09:23:24 +02:00
Marcel Denia df26e427f9 perl: Improve run_tests.sh
- Add some useful options for debugging tests and test failures
- Properly handle tests located in lib/

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-01 09:23:24 +02:00
Marcel Denia 88800d31ee perl: Update extensions configuration symbol
This needs to be a concatenation of {nonxs,dynamic,static}_ext, as
shown by Config/Extensions.t.

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-01 09:23:24 +02:00
Marcel Denia f6a7779041 perl: Include vmsish.t and Internals.t in perl-tests-common
There is no other place for them really.

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-01 09:23:24 +02:00
Marcel Denia c038495015 perl: Disable OS/2 tests
Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-01 09:23:24 +02:00
Marcel Denia cecee995b0 perl: Disable setlocale usage under musl
While setlocale() is present, musl currently doesn't provide a suitable implementation.
It'll silently accept every locale, even if not present at all, defaulting them
to C.UTF-8. This will confuse applications as well as our testsuite(see lib/locale.t).

Even if a locale does exist, it's effects will not apply to an extent that will
satisfy many applications.

Avoid further mischief here and just disable setlocale() for now.

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-01 09:23:24 +02:00
Marcel Denia afad970139 perl: Switch to split configuration files
This replaces the previously used collection of configuration files for every single
architecture in conjunction with hacky overrides, which became an increasing burden to maintain.

Fixes a number of outstanding bugs and oddities, with the most important one being the
previously wrong signal order(as shown by ext/POSIX/t/sigaction.t).

See files/perlconfig.pl's POD and files/README.config for details.

Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-09-01 09:23:15 +02:00
Marcel Denia 7a545cc9b3 perl: Update to 5.22.0
Signed-off-by: Marcel Denia <naoir@gmx.net>
2015-06-18 23:58:45 +02:00