Commit Graph

186 Commits

Author SHA1 Message Date
Georgi Valkov 847a535a3b perl: fix not a Mach-O file on macOS
Reverts [1] to resolve the following build error on macOS:

/Volumes/wrt3200/openwrt/staging_dir/hostpkg/usr/bin/perl installperl --destdir=/Volumes/wrt3200/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/perl/perl-5.38.2/ipkg-install
WARNING: You've never run 'make test' or some tests failed! (Installing anyway.)
  /usr/bin/perl5.38.2
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: input file: /Volumes/wrt3200/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/perl/perl-5.38.2/ipkg-install/usr/bin/perl5.38.2 is not a Mach-O file

[1] 88efce3814

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
2024-04-23 19:00:11 -07:00
Andy Syam 2484715985 perl: update to version 5.38.2
removed one that no longer exists in perl-5.38.2

updated one patch

fixed missing builtin.pm

Signed-off-by: Andy Syam <privasisource@gmail.com>
2023-12-01 11:18:10 -08:00
Andy Syam 0142d06598 perl: update to version 5.38.0
removed some sources to download perl. I believe I only need one source to download perl at https://www.cpan.org/src/5.0. I see some Linux distributions use that source to download.
change the position of PKG_MAINTAINER to make it neater and prettier

perform a patch refresh
removes some patches that have been applied in perl-5.38.0 as well as patches that are no longer used in perl-5.38.0

added one patch Perl/perl5@ba6e2c3 this fixes the issue regcomp*.c, regexec.c - fixup regex engine build under -Uusedl

provided updates and synchronized libc.config base.config version.config to perl-5.38.0
removed deprecated arybase in perl-5.29.4

Signed-off-by: Andy Syam <privasisource@gmail.com>
2023-11-22 18:32:50 -08:00
Zoltan HERPAI cf59047d3c perl: add support for riscv64
Required by sifiveu and upcoming riscv targets.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-10-22 23:29:03 -06:00
Oskari Rauta 96de355818 perl: fix tests
Enabling Perl tests causes failure during build.
Files that should be installed into packages, are
missing or in different location.

This PR removes missing files/paths and replaces
paths that have changed with working ones.

Most likely, test files have been relocated during
time and this portion hasn't been updated when
perl package has updated.

Fixes #21127

Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
2023-05-24 06:06:17 +03:00
Tianling Shen b9481f55d8 perl: perlmod: append _LARGEFILE64_SOURCE flag for musl 1.2.4
musl 1.2.4 deprecated legacy "LFS64" ("large file support") interfaces so
just having _GNU_SOURCE defined is not enough anymore.

Manually pass -D_LARGEFILE64_SOURCE to allow to keep using LFS64 definitions.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-20 13:05:19 +08:00
Robert Marko 2251916df1 perl: fix compilation with musl 1.2.4
musl 1.2.4 deprecated legacy "LFS64" ("large file support") interfaces so
just having _GNU_SOURCE defined is not enough anymore.

_LARGEFILE64_SOURCE has to be defined in the source, or CFLAGS can be used
to pass -D_LARGEFILE64_SOURCE to allow to keep using LFS64 definitions.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-18 10:27:20 +03:00
Doug Thomson 6db2fe93cd perl: enable threading support for aarch64 by default
Perl threads seem to be supported and working for aarch64, and
including aarch64 here would allow packages like freeswitch-mod-perl
to become available from the standard OpwnWrt package repository for
popular routers such as the Linksys E8450 and Belkin RT3200.

Signed-off-by: Doug Thomson <dwt62f+github@gmail.com>
2022-12-14 22:13:40 +08:00
Rosen Penev 59980b6be7 perl: add powerpc64 support
Needed by the QoriQ target.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-03-02 16:30:32 -08:00
Robert Högberg 7064f30865 perlbase-data: Add dependency on perlbase-scalar
Data::Dumper requires Scalar::Util -> add missing dependency.

Signed-off-by: Robert Högberg <robert.hogberg@gmail.com>
2021-08-31 15:37:32 +02:00
Eneas U de Queiroz 1e18c4324f
perl: perlmod.mk: use flock when hostpkg/perl used
Avoid parallel relinking and usage of the host perl binary by wrapping
its usage around flock calls.

Sometimes, two packages will try to relink the static host perl binary
at the same time.  Neither of them will have the other's module linked
in, and one of them will unavoidably clobber the other one's binary.

This will lead to errors when a package will not be able to find a
module that was supposed to be installed.

To fix that, an exclusive flock is used when relinking, with a 900
seconds timeout to avoid locking up the build process forever.

This is not enough because the binary may be concurrently used to build
another module package; perl is used in Configure, Compile, and Install
procedures.  If timing is right, a package will fail with a "permission
denied" error.

So a shared flock call is added in Configure, Compile, and Install
definitions for host and target, with a shorter, 300 seconds timeout.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-08-17 12:03:34 -03:00
Eneas U de Queiroz 19c7496648
perl: perlmod.mk: use 'install' for host binaries
When installing a host perl module, the host perl binary in the staging
dir is replaced by using 'cp'.  However, if the binary is running in a
parallel job, cp will fail with a text file busy error.  Use
$(INSTALL_BIN), which unliks the file first to avoid the error.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-08-11 16:59:20 -03:00
Georgi Valkov 6375f73b29 perl: fix build errors on macOS
Added a check for macOS 11 and newer to resolve a compile error:
*** Unexpected product version 11.2.

Added Internals::getcwd.
Fallback to the built-in getcwd to resolve compile errors on macOS:
Can't locate Errno.pm in @INC
/miniperl not found

Signed-off-by: Georgi Valkov <gvalkov@abv.bg>
2021-02-09 10:45:30 +02:00
Rosen Penev 35f1ef1c50
Revert "perl: fix compilation on x86_64 with glibc and ssp"
This reverts commit 3d5ba0f094.

As of b933f9cf0cb254e368027cad6d5799e45b237df5 , this is not needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-17 20:05:58 -07:00
Ken Wong 65578a43f0 perl: fix build failure in GCC10
The perl Configure file was matching GCC 10 against "1*" and treating it
as GCC 1, causing ABI breakage and segfaults.

Cherry-pick the upstream patch which fixes it to check against (e.g)
"1.*" instead, which will make it work for hundreds more GCC versions
to come.

https://github.com/Perl/perl5/commit/6bd6308fcea3541
 "Adapt Configure to GCC version 10"

Also includes the previous commit just adding GCC 8 and 9 to one case:
https://github.com/Perl/perl5/commit/ae195500577d707
 "Add gcc-8 and gcc-9 for FORTIFY_SOURCE"

Signed-off-by: Ken Wong <xinxijishuwyq@gmail.com>
2020-06-03 11:59:49 +01:00
Ian Cooper 3d5ba0f094 perl: fix compilation on x86_64 with glibc and ssp
perl fails to compile on x86_64 with glibc and stack smashing
protection enabled due to libssp not being specified in the
ldflags.

Signed-off-by: Ian Cooper <iancooper@hotmail.com>
2020-04-29 13:26:25 +01:00
Alexander Ryzhov fed1b3b11b
perl: define $sysroot for extensions
Signed-off-by: Alexander Ryzhov <github@ryzhov-al.ru>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-08 23:08:58 -08:00
Rosen Penev 2628584ffd
perl: Don't build InstallDev under ARC
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-01-03 20:06:40 -08:00
Jakub Piotr Cłapa 3954356a23 perl: fixed host compilation of static perl on MacOS
All symbols on MacOS are prefixed with an underscore which
interfered with the filtering mechanism (added in perl 5.28)
for extension libraries to be linked into static perl.

Signed-off-by: Jakub Piotr Cłapa <jpc@loee.pl>
2019-11-10 10:48:38 +01:00
Jan Pavlinec 299e5b0a9b
treewide: add PKG_CPE_ID for better cvescanner coverage
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
2019-09-17 12:40:26 +02:00
Sven Eckelmann bbb1ea7345 treewide: Change .*GPL.*+ licenses to SPDX compatible identifier
The CONTRIBUTING.md requests an (or multiple) SPDX identifier for GPL
licenses. But a lot of packages did use a different, non-SPDX style with a
"+" at the end instead of "-or-later".

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-09-10 07:45:15 +02:00
Rosen Penev 52453b921b perl: Do not build on ARC
Not supported.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-06-02 15:49:58 -07:00
Tony Ambardar 0716d8fe5a perl: add missing config for mips64el
Compilation otherwise fails building for MIPS Malta 64-bit LE.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2018-12-18 21:28:26 -08:00
Philip Prindeville 77c738c54f perl: update to 5.28.1
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-12-03 15:58:49 -07:00
Hans Dedecker 86b8d1946c perl: fix compilation with glibc 2.27
Remove dependency on glibc in 010-musl-compat patch as glibc does not
support _LIB_VERSION anymore in 2.27; see
https://sourceware.org/ml/libc-announce/2018/msg00000.html

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2018-10-16 11:45:12 +02:00
Philip Prindeville a5a4eafc93 perlmod: fix ability to build module out-of-feed
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-09-23 14:19:51 -06:00
Philip Prindeville 0d9584724f perl: version modules and non-base packages
Currently external modules and non-base packages are numbered
from their own internal number space, and even though the Perl
ABI number is embedded into them this isn't externally visible.

For example, perl-html-parser-3.72.1 could be built for ABI
5.26 or for 5.28, we can't easily tell.  This changes all of
that by embedding the ABI number into the filename.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-08-13 13:23:11 -06:00
Philip Prindeville 4e29b4f3bb perl: build with -fno-strict-liasing and -fwrapv
Looking at Configure and Porting/config.sh, it seems that Perl
requires both of these options to build correctly.

Should fix FS #1464.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-08-01 11:19:32 -06:00
Philip Prindeville b94744496f perl: update to 5.28
Refresh patches 900 and 910.

Add fix (920) for improperly gated variable.

Add workaround (020) for Storable's run-time check for stacksize.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-07-31 15:45:35 -06:00
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