From 4903e5b0398e6b415ae9a03a10b045c89d6f7ffb Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 31 Jan 2019 19:25:46 +0100 Subject: [PATCH 1/8] system/perl: Create 5.28.1 from 5.24.1 Create build file with cp perl-5.24.1-1.build.sh perl-5.28.1-0.build.sh --- system/perl-5.28.1-0.build.sh | 162 ++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100755 system/perl-5.28.1-0.build.sh diff --git a/system/perl-5.28.1-0.build.sh b/system/perl-5.28.1-0.build.sh new file mode 100755 index 0000000..5606656 --- /dev/null +++ b/system/perl-5.28.1-0.build.sh @@ -0,0 +1,162 @@ +#! /bin/sh +set -xe + +# to build system perl: +# umask 022 +# sudo mkdir -p /usr/local/system/perl-5.24.1-1 +# sudo chown build:build /usr/local/system/perl-5.24.1-1 +# sudo -u build ./perl-5.24.1-1.build.sh +# sudo chown -R bin:bin /usr/local/system/perl-5.24.1-1 + +PKG=perl +VERSION=5.24.1 +BUILD=1 +PREFIX=/usr/local/system/$PKG-$VERSION-$BUILD + +mkdir -p $PREFIX +cat >$PREFIX/profile <<-EOF + PATH=$PREFIX/bin:\$PATH +EOF +. $PREFIX/profile + +# Some cpan mopdule tests fail when build directory is on +# nfs, because they try to remove directories with unlinked +# but opened files in it. +# Additionally we want a clean envirnoment and a local cpan scratch +# +HOME=/dev/shm/$PKG-$VERSION-$BUILD.build.home.tmp +mkdir -p $HOME + +exec bin/perlVERSION symlink +# -Duseshrplib : build shared perl library (required when perl is to be included in a shared library) +# -DEBUGGING : add debugging code (perl -D) +# +./Configure -des -Duseshrplib -Dprefix=$PREFIX + +make -j$(nproc) + +# Note: If you get a failure in porting/utils test here, it might be, that we are +# running cpan somewhere else which leads to an extra and unexpected "\n" being +# emitted by CPAN.pm BEGIN and a failure of the test (which does "perl -c CPAN.pm") +# +make test +make install + +cd $PREFIX; + +test -e $HOME/.cpan/CPAN/MyConfig.pm && rm $HOME/.cpan/CPAN/MyConfig.pm +cpanload(); + CPAN::Shell->o('conf','recommends_policy',0); + CPAN::Shell->o('conf','commit'); +_EOF_ + +cpan -u # update everything we already have + +# After the update we have a new ExtUtils::MakeMaker. +# Patch this version to avoid stomping on a perl bug +# We've got this when building net-snmp (down below). +# Errors: +# "panic: attempt to copy freed scalar" +# "Bizarre copy of HASH in list assignment# +# this is from perl bug: +# https://rt.perl.org/Public/Bug/Display.html?id=77706 +# triggered by ExtUtils::MakeMaker. +# This patch prevents this +# +(cd lib/site_perl/$VERSION/ExtUtils; patch -N -p1 < /src/mariux/patches/MakeMaker-0001-MakeMaker.pm-Avoid-triggering-perl-bug.patch) + +# These two with -T (without test), because the tests are interactive and access /dev/tty +# Do these first, because they are required by Bundle::CPAN +# +cpan -T Term::ReadLine::Perl +cpan -T Term::ReadLine::Gnu + +# Now the rest of Bundle::CPAN first, so that we use latest code for the following +# installations +# +cpan Bundle::CPAN + + +# clusterd... +( + cd $HOME/build + test -e Donald-1.04.tar.gz || cp /home/buczek/cluster/Donald/Donald-1.04.tar.gz . + test -d Donald-1.04 || tar xf Donald-1.04.tar.gz + cd Donald-1.04 + cpan . +) + +# arplisten... +( + cd $HOME/build + test -e Pcap-0.02.tar.gz || cp /home/buczek/build/Pcap/Pcap-0.02.tar.gz . + test -d Pcap-0.02 || tar xf Pcap-0.02.tar.gz + cd Pcap-0.02 + cpan . +) + +# pmirror +cpan File::FnMatch + +# nachtwaechter , ... +cpan DBI +cpan DBD::SQLite +cpan Mail::Internet +cpan LWP + +# http://net-snmp.sourceforge.net/ (Net-SNMP : SNMP.pm, NetSNMP::*) +# should match exact version of net-snmp packages +# install everything here to avoid dependency. +# +# cpan has 5.0404 of Net-SNMP so use latest version from its home. +# +# If you get errors +# "panic: attempt to copy freed scalar" +# "Bizarre copy of HASH in list assignment# +# this is from perl bug: +# https://rt.perl.org/Public/Bug/Display.html?id=77706 +# triggered by ExtUtils::MakeMaker. The patch +# /src/mariux/patches/0001-Carp.pm-continue-with-screwed-up-perl-stack.patch +# at the top of this file is there to prevent this. +# +( + cd $HOME/build + test -e net-snmp-5.7.3.tar.gz || wget https://downloads.sourceforge.net/project/net-snmp/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz + test -d net-snmp-5.7.3 || tar xvf net-snmp-5.7.3.tar.gz + cd net-snmp-5.7.3 + patch -N -p1 < /src/mariux/patches/net-snmp-0001-Fix-incompatible-definitions-of-U64-type.patch || true + ./configure --prefix $PREFIX + make -j $(nproc) + make install +) + +# nachtwaechter/mxq cgi (todo: should not be root) +cpan CGI +cpan DBD::mysql + +exit From fe58f2b6205565115dbe3457ae4b46cbf5470621 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 31 Jan 2019 19:27:21 +0100 Subject: [PATCH 2/8] system/perl-5.28: Update version in build script --- system/perl-5.28.1-0.build.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system/perl-5.28.1-0.build.sh b/system/perl-5.28.1-0.build.sh index 5606656..93b2e65 100755 --- a/system/perl-5.28.1-0.build.sh +++ b/system/perl-5.28.1-0.build.sh @@ -3,14 +3,14 @@ set -xe # to build system perl: # umask 022 -# sudo mkdir -p /usr/local/system/perl-5.24.1-1 -# sudo chown build:build /usr/local/system/perl-5.24.1-1 -# sudo -u build ./perl-5.24.1-1.build.sh -# sudo chown -R bin:bin /usr/local/system/perl-5.24.1-1 +# sudo mkdir -p /usr/local/system/perl-5.28.1-0 +# sudo chown build:build /usr/local/system/perl-5.28.1-0 +# sudo -u build ./perl-5.28.1-0.build.sh +# sudo chown -R bin:bin /usr/local/system/perl-5.28.1-0 PKG=perl -VERSION=5.24.1 -BUILD=1 +VERSION=5.28.1 +BUILD=0 PREFIX=/usr/local/system/$PKG-$VERSION-$BUILD mkdir -p $PREFIX From 63b8d41d99b16566b532a3a5d3316056d767ad07 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 31 Jan 2019 19:29:18 +0100 Subject: [PATCH 3/8] system/perl-5.28: Remove MakeMaker patch This patch no longer applies and doesn't seem to be needed. Remove it. --- system/perl-5.28.1-0.build.sh | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/system/perl-5.28.1-0.build.sh b/system/perl-5.28.1-0.build.sh index 93b2e65..920de43 100755 --- a/system/perl-5.28.1-0.build.sh +++ b/system/perl-5.28.1-0.build.sh @@ -77,19 +77,6 @@ _EOF_ cpan -u # update everything we already have -# After the update we have a new ExtUtils::MakeMaker. -# Patch this version to avoid stomping on a perl bug -# We've got this when building net-snmp (down below). -# Errors: -# "panic: attempt to copy freed scalar" -# "Bizarre copy of HASH in list assignment# -# this is from perl bug: -# https://rt.perl.org/Public/Bug/Display.html?id=77706 -# triggered by ExtUtils::MakeMaker. -# This patch prevents this -# -(cd lib/site_perl/$VERSION/ExtUtils; patch -N -p1 < /src/mariux/patches/MakeMaker-0001-MakeMaker.pm-Avoid-triggering-perl-bug.patch) - # These two with -T (without test), because the tests are interactive and access /dev/tty # Do these first, because they are required by Bundle::CPAN # From 9d2df1f53ea7ca9397dc00d5bc018db4cd6fae5a Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 31 Jan 2019 19:33:16 +0100 Subject: [PATCH 4/8] system/perl-5.28: Update Donald from 1.04 to 1.05 Update package Donald from 1.04 to 1.05 and update download url. I'm not proud of it, but clusterd depends on it. --- system/perl-5.28.1-0.build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/perl-5.28.1-0.build.sh b/system/perl-5.28.1-0.build.sh index 920de43..2619950 100755 --- a/system/perl-5.28.1-0.build.sh +++ b/system/perl-5.28.1-0.build.sh @@ -92,9 +92,9 @@ cpan Bundle::CPAN # clusterd... ( cd $HOME/build - test -e Donald-1.04.tar.gz || cp /home/buczek/cluster/Donald/Donald-1.04.tar.gz . - test -d Donald-1.04 || tar xf Donald-1.04.tar.gz - cd Donald-1.04 + test -e Donald-1.04.tar.gz || wget https://github.molgen.mpg.de/donald/Donald/archive/1.05.tar.gz -O Donald-1.05.tar.gz + test -d Donald-1.05 || tar xf Donald-1.05.tar.gz + cd Donald-1.05 cpan . ) From f338b90dc75570807e0904377ee3aa23135ac2a4 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 31 Jan 2019 19:35:10 +0100 Subject: [PATCH 5/8] system/perl-5.28: Add LWP::Protocol::https LWP::Protocol::https is what we needed in the first place, so add it. It requires Net::SSLeay. One test of Net::SSLeay hangs forver with openssl 1.1.1a (which is propably a error int the test not in openssl), so install it explicitly without tests. --- system/perl-5.28.1-0.build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/perl-5.28.1-0.build.sh b/system/perl-5.28.1-0.build.sh index 2619950..5df3f11 100755 --- a/system/perl-5.28.1-0.build.sh +++ b/system/perl-5.28.1-0.build.sh @@ -116,6 +116,12 @@ cpan DBD::SQLite cpan Mail::Internet cpan LWP +# Net::SSLeay require by LWP::Protocol:https +# one tests hangs forever with openssl 1.1.1a +# +cpan -T Net::SSLeay +cpan LWP::Protocol::https + # http://net-snmp.sourceforge.net/ (Net-SNMP : SNMP.pm, NetSNMP::*) # should match exact version of net-snmp packages # install everything here to avoid dependency. From 3dab478a6c4a4f0138a81f2e45e2be1e44f2ab60 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 31 Jan 2019 19:38:12 +0100 Subject: [PATCH 6/8] system/perl-5.28: Update net-snmp from version 5.7.3 to 5.8 net-snmp needs to be updated, because version 5.7.4 doesn't compile with openssl1.1.1a. Do it. --- system/perl-5.28.1-0.build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/perl-5.28.1-0.build.sh b/system/perl-5.28.1-0.build.sh index 5df3f11..b09c68a 100755 --- a/system/perl-5.28.1-0.build.sh +++ b/system/perl-5.28.1-0.build.sh @@ -139,9 +139,9 @@ cpan LWP::Protocol::https # ( cd $HOME/build - test -e net-snmp-5.7.3.tar.gz || wget https://downloads.sourceforge.net/project/net-snmp/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz - test -d net-snmp-5.7.3 || tar xvf net-snmp-5.7.3.tar.gz - cd net-snmp-5.7.3 + test -e net-snmp-5.8.tar.gz || wget https://downloads.sourceforge.net/project/net-snmp/net-snmp/5.8/net-snmp-5.8.tar.gz + test -d net-snmp-5.8 || tar xvf net-snmp-5.8.tar.gz + cd net-snmp-5.8 patch -N -p1 < /src/mariux/patches/net-snmp-0001-Fix-incompatible-definitions-of-U64-type.patch || true ./configure --prefix $PREFIX make -j $(nproc) From 7634bc22d8843f70381068130a7a313b30a7e0a5 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 31 Jan 2019 19:41:31 +0100 Subject: [PATCH 7/8] system/perl-5.28: Optionally build into /dev/shm Support test build into /dev/shm. --- system/perl-5.28.1-0.build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/perl-5.28.1-0.build.sh b/system/perl-5.28.1-0.build.sh index b09c68a..1797084 100755 --- a/system/perl-5.28.1-0.build.sh +++ b/system/perl-5.28.1-0.build.sh @@ -11,7 +11,9 @@ set -xe PKG=perl VERSION=5.28.1 BUILD=0 + PREFIX=/usr/local/system/$PKG-$VERSION-$BUILD +if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi mkdir -p $PREFIX cat >$PREFIX/profile <<-EOF From 6b96c8328bad798593601342e7f542b5638234a8 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 31 Jan 2019 20:10:29 +0100 Subject: [PATCH 8/8] system/perl-5.28: Build net-snmp with -j 1 Parallel build seems to fail sometimes. Avoid that. Use -j 1 to override MAKEFLAGS. --- system/perl-5.28.1-0.build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/perl-5.28.1-0.build.sh b/system/perl-5.28.1-0.build.sh index 1797084..d92f4a1 100755 --- a/system/perl-5.28.1-0.build.sh +++ b/system/perl-5.28.1-0.build.sh @@ -146,7 +146,7 @@ cpan LWP::Protocol::https cd net-snmp-5.8 patch -N -p1 < /src/mariux/patches/net-snmp-0001-Fix-incompatible-definitions-of-U64-type.patch || true ./configure --prefix $PREFIX - make -j $(nproc) + make -j 1 make install )