Commit 1171acb4 authored by Jérome Perrin's avatar Jérome Perrin

Use separate part for each perl package

Rework perl installation to install each package in a separate directory.

Each package install a `perl` interpreter for each package, which is implemented a shell wrapper setting `$PERL5LIB` with the path of this package and its dependencies.

To install a perl package, use `perl-CPAN-package` macro, like in this example for a fictional `XXX::YYY` package:

```
[perl-XXX-YYY]
<= perl-CPAN-package
module = XXX/XXX-YYY
version = 1.2.3
md5sum = ab68b329da9893e34099c7d8ad5cb9c940cd123
```

This will download package from https://www.cpan.org/modules/by-module/XXX/XXX-YYY-1.2.3.tar.gz and install using the usual `perl Makefile.PL && make && make install` sequence.

To install package with dependencies, use the `inc=` argument, like in this example for  another fictional package `XXX::ZZZ` package that would depend on `XXX::YYY` and `XXX::ABC` :

```
[perl-XXX-ZZZ]
<= perl-CPAN-package
module = XXX/XXX-ZZZ
version = 1.2.3
md5sum = 401b30e3b8b5d629635a5c613cdb7919

inc = ${perl-XXX-YYY:site_perl}:${perl-XXX-ABC:site_perl}
```

The full list of options is described in the [macro](https://lab.nexedi.com/nexedi/slapos/blob/a5bec95c/component/perl/buildout.cfg#L31-65).


That macro creates an interpreter for each package, but sometimes we need to create an interpreter with multiple packages. The `perl-wrapper` macro is available for this. It also accepts a `inc=` argument in the same format. Because this wrapper is implemented using `-I` argument, it is also suitable for scrips running in perl [taint mode](https://perldoc.perl.org/perlsec.html#Taint-mode-and-%40INC), like the w3-validator we are using.

All perl components and perl usages have been updated to this new infrastructure.

Some (apparently) unmaintained components were using an obsolete `slapos.recipe.build:cpan` recipe. They were used only in mioga2 from unstable, so I moved them inline in mioga2 software.

/reviewed-on !341
parents 4739cff9 09abac7e
......@@ -15,12 +15,10 @@ extends =
recipe = slapos.recipe.cmmi
url =http://ftp.gnome.org/pub/gnome/core/3.22/3.22.2/sources/at-spi2-core-2.22.0.tar.xz
md5sum = 3da5fe62a653e49dad1c47f9a46fee56
depends =
${perl-XML-Parser:location}
configure-options =
--disable-gtk-doc-html
environment =
PATH=${dbus:location}/bin:${gettext:location}/bin:${glib:location}/bin:${intltool:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${dbus:location}/bin:${gettext:location}/bin:${glib:location}/bin:${intltool:location}/bin:${perl-XML-Parser:perl-PATH}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${dbus:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig:${pcre:location}/lib/pkgconfig
CPPFLAGS=-I${inputproto:location}/include -I${kbproto:location}/include -I${libX11:location}/include -I${libXi:location}/include -I${libXtst:location}/include -I${xextproto:location}/include -I${xproto:location}/include
LDFLAGS=-L${libX11:location}/lib -Wl,-rpath=${libX11:location}/lib -L${libXi:location}/lib -Wl,-rpath=${libXi:location}/lib -L${libXtst:location}/lib -Wl,-rpath=${libXtst:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
......
......@@ -15,8 +15,6 @@ md5sum = 12e517cac2b57a0121cda351570f1e63
patch-options = -p1
patches =
${:_profile_base_location_}/intltool-0.51.0.regexp.patch#3e7736d5ce7876e9a8d078c35e7f327b
depends =
${perl-XML-Parser:location}
environment =
PATH=${patch:location}/bin:${perl:location}/bin:${gettext:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PATH=${patch:location}/bin:${perl-XML-Parser:perl-PATH}:${gettext:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${perl:location}/lib/pkgconfig
......@@ -7,17 +7,10 @@ parts =
percona-toolkit
[percona-toolkit]
recipe = slapos.recipe.cmmi
<= perl-CPAN-package
# XXX it's not on CPAN, so we use url
version = 3.0.3
url = https://www.percona.com/downloads/percona-toolkit/${:version}/source/tarball/percona-toolkit-${:version}.tar.gz
md5sum = 8af181994fdf9aa984475637861098e9
depends =
${perl-DBI:location}
${perl-DBD-mariadb:location}
pre-configure =
sed -i -e 's,^#!/usr/bin/env perl,#!perl,' bin/*
configure-command =
${perl:location}/bin/perl Makefile.PL
location = ${buildout:parts-directory}/${:_buildout_section_name_}
make-options =
INSTALLSITESCRIPT=${:location}/bin
inc = ${perl-DBI:site_perl}:${perl-DBD-mariadb:site_perl}
......@@ -5,8 +5,7 @@ parts =
perl-CGI
[perl-CGI]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/CGI/CGI-4.36.tar.gz
md5sum = 48566d81f430a7f755bb4d8f426ce35d
configure-command =
${perl:location}/bin/perl Makefile.PL
<= perl-CPAN-package
module = CGI/CGI
version = 4.38
md5sum = 0aeb8563d533e7f83724ed068b5bfc37
......@@ -5,8 +5,7 @@ parts =
perl-Class-Accessor
[perl-Class-Accessor]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/Class/Class-Accessor-0.34.tar.gz
<= perl-CPAN-package
module = Class/Class-Accessor
version = 0.34
md5sum = 0d9640d237a13276145f7e44b4855b89
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -5,8 +5,7 @@ parts =
perl-Config-General
[perl-Config-General]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/Config/Config-General-2.56.tar.gz
<= perl-CPAN-package
module = Config/Config-General
version = 2.56
md5sum = 8cf9dd044d016f27b4dc26077606736d
configure-command =
${perl:location}/bin/perl Makefile.PL
[buildout]
extends =
../perl/buildout.cfg
../../component/openssl/buildout.cfg
../../component/zlib/buildout.cfg
parts =
perl-Crypt-SSLeay
[perl-Crypt-SSLeay]
recipe = slapos.recipe.build:cpan
modules =
G/GA/GAAS/URI-1.60.tar.gz
N/NA/NANIS/Crypt-SSLeay-0.64.tar.gz
cpan-configuration =
make_arg=('OTHERLDFLAGS="-L${zlib:location}/lib -Wl,-R${zlib:location}/lib -L${openssl:location}/lib -Wl,-R${openssl:location}/lib"')
makepl_arg=('INC=-I${openssl:location}/include')
environment =
OPENSSL_PREFIX=${openssl:location}
perl = perl
......@@ -9,17 +9,18 @@ parts =
perl-DBD-MySQL
[perl-DBD-MySQL-common]
recipe = slapos.recipe.cmmi
depends =
${perl-DBI:location}
${perl-Devel-CheckLib:location}
url = https://github.com/perl5-dbi/DBD-mysql/archive/4.046_01.tar.gz
<= perl-CPAN-package
module = DBD/DBD-mysql
version = 4.046_01
md5sum = 90f87aec4b7ab95a9543f2dd10969a07
# 4.046_01 is not released on CPAN, so we get it from github
url = https://github.com/perl5-dbi/DBD-mysql/archive/4.046_01.tar.gz
inc = ${perl-DBI:site_perl}:${perl-Devel-CheckLib:site_perl}
patches =
${:_profile_base_location_}/DBD-mysql-4.027.rpathsupport.patch#a932982b7725e6621cfce3a3d7917e03
patch-options = -p1
configure-command =
${perl:location}/bin/perl Makefile.PL --libs="-L${zlib:location}/lib -L${openssl:location}/lib $(mysql_config --libs)"
extra-configure-args=--libs "-L${zlib:location}/lib -L${openssl:location}/lib $(mysql_config --libs)"
[perl-DBD-MySQL]
<= perl-DBD-MySQL-common
......
[buildout]
extends =
../perl/buildout.cfg
../postgresql/buildout.cfg
parts =
perl-DBD-Pg
[perl-DBD-Pg]
recipe = slapos.recipe.build:cpan
modules =
T/TU/TURNSTEP/DBD-Pg-2.19.3.tar.gz
environment =
POSTGRES_HOME=${postgresql:location}
perl = perl
......@@ -5,11 +5,9 @@ parts =
perl-DBI
[perl-DBI]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/DBI/DBI-1.631.tar.gz
md5sum = 444d3c305e86597e11092b517794a840
configure-command =
${perl:location}/bin/perl Makefile.PL
location = ${buildout:parts-directory}/${:_buildout_section_name_}
<= perl-CPAN-package
module = DBI/DBI
version = 1.641
md5sum = e77fd37fcf77fc88fde029c1b75ded54
make-options =
INSTALLSITESCRIPT=${:location}/bin
......@@ -5,8 +5,7 @@ parts =
perl-Data-Dump
[perl-Data-Dump]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/Data/Data-Dump-1.22.tar.gz
<= perl-CPAN-package
module = Data/Data-Dump
version = 1.22
md5sum = db211fe64a5cab15b1e86e5b0dc379a4
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -3,8 +3,7 @@ extends =
../perl/buildout.cfg
[perl-Devel-CheckLib]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/Devel/Devel-CheckLib-1.11.tar.gz
<= perl-CPAN-package
module = Devel/Devel-CheckLib
version = 1.11
md5sum = c20873798591176283f51af4ad8088cd
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -6,11 +6,12 @@ parts =
perl-Encode-HanExtra
[perl-Encode-HanExtra]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/Encode/Encode-HanExtra-0.23.tar.gz
<= perl-CPAN-package
module = Encode/Encode-HanExtra
version = 0.23
md5sum = e1d3bc32c1c8ee304235a06fbcd5d5a4
configure-command =
${perl:location}/bin/perl -I. Makefile.PL
install-inc = .
patch-options = -p1
patches =
${:_profile_base_location_}/Encode-HanExtra-0.23_use_shebang.patch#4ac804013a68a3e6b7c3bc4115d25a5e
......
......@@ -5,8 +5,7 @@ parts =
perl-Encode-Locale
[perl-Encode-Locale]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/Encode/Encode-Locale-1.03.tar.gz
<= perl-CPAN-package
module = Encode/Encode-Locale
version= 1.03
md5sum = de8422d068634e7c1068dab4e18b452f
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -6,10 +6,9 @@ parts =
perl-File-Listing
[perl-File-Listing]
recipe = slapos.recipe.cmmi
depends =
${perl-HTTP-Date:location}
url = http://www.cpan.org/modules/by-module/File/File-Listing-6.04.tar.gz
<= perl-CPAN-package
module = File/File-Listing
version = 6.04
md5sum = 83f636b477741f3a014585bb9cc079a6
configure-command =
${perl:location}/bin/perl Makefile.PL
inc = ${perl-HTTP-Date:site_perl}
......@@ -6,10 +6,9 @@ parts =
perl-HTML-Encoding
[perl-HTML-Encoding]
recipe = slapos.recipe.cmmi
depends =
${perl-HTTP-Message:location}
url = http://www.cpan.org/modules/by-module/HTML/HTML-Encoding-0.61.tar.gz
<= perl-CPAN-package
module = HTML/HTML-Encoding
version = 0.61
md5sum = bce9f00f04ad055feaa4d6511b30e421
configure-command =
${perl:location}/bin/perl Makefile.PL
inc = ${perl-HTTP-Message:location}
......@@ -6,10 +6,9 @@ parts =
perl-HTML-Parser
[perl-HTML-Parser]
recipe = slapos.recipe.cmmi
depends =
${perl-HTML-Tagset:location}
url = http://www.cpan.org/modules/by-module/HTML/HTML-Parser-3.71.tar.gz
<= perl-CPAN-package
module = HTML/HTML-Parser
version = 3.71
md5sum = 9128a45893097dfa3bf03301b19c5efe
configure-command =
${perl:location}/bin/perl Makefile.PL
inc = ${perl-HTML-Tagset:site_perl}
......@@ -5,8 +5,7 @@ parts =
perl-HTML-Tagset
[perl-HTML-Tagset]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/HTML/HTML-Tagset-3.20.tar.gz
<= perl-CPAN-package
module = HTML/HTML-Tagset
version = 3.20
md5sum = d2bfa18fe1904df7f683e96611e87437
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -5,8 +5,7 @@ parts =
perl-HTML-Template
[perl-HTML-Template]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/HTML/HTML-Template-2.95.tar.gz
<= perl-CPAN-package
module = HTML/HTML-Template
version = 2.95
md5sum = 6f08e9631af52e6a5f6e4648b89265fe
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -6,10 +6,9 @@ parts =
perl-HTTP-Cookies
[perl-HTTP-Cookies]
recipe = slapos.recipe.cmmi
depends =
${perl-HTTP-Message:location}
url = http://www.cpan.org/modules/by-module/HTTP/HTTP-Cookies-6.01.tar.gz
<= perl-CPAN-package
module = HTTP/HTTP-Cookies
version = 6.01
md5sum = ecfd0eeb88512033352c2f13c9580f03
configure-command =
${perl:location}/bin/perl Makefile.PL
inc = ${perl-HTTP-Message:site_perl}
......@@ -6,10 +6,9 @@ parts =
perl-HTTP-Daemon
[perl-HTTP-Daemon]
recipe = slapos.recipe.cmmi
depends =
${perl-HTTP-Message:location}
url = http://www.cpan.org/modules/by-module/HTTP/HTTP-Daemon-6.01.tar.gz
<= perl-CPAN-package
module = HTTP/HTTP-Daemon
version = 6.01
md5sum = ed0ae02d25d7f1e89456d4d69732adc2
configure-command =
${perl:location}/bin/perl Makefile.PL
inc = ${perl-HTTP-Message:site_perl}
......@@ -5,8 +5,7 @@ parts =
perl-HTTP-Date
[perl-HTTP-Date]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/HTTP/HTTP-Date-6.02.tar.gz
<= perl-CPAN-package
module = HTTP/HTTP-Date
version = 6.02
md5sum = 52b7a0d5982d61be1edb217751d7daba
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -10,14 +10,14 @@ parts =
perl-HTTP-Message
[perl-HTTP-Message]
recipe = slapos.recipe.cmmi
depends =
${perl-Encode-Locale:location}
${perl-HTTP-Date:location}
${perl-IO-HTML:location}
${perl-LWP-MediaTypes:location}
${perl-URI:location}
url = http://www.cpan.org/modules/by-module/HTTP/HTTP-Message-6.06.tar.gz
<= perl-CPAN-package
module = HTTP/HTTP-Message
version = 6.06
md5sum = e563ac516e28d33f65bc0f295f625f85
configure-command =
${perl:location}/bin/perl Makefile.PL
inc =
${perl-Encode-Locale:site_perl}:\
${perl-HTTP-Date:site_perl}:\
${perl-IO-HTML:site_perl}:\
${perl-LWP-MediaTypes:site_perl}:\
${perl-URI:site_perl}
......@@ -6,10 +6,9 @@ parts =
perl-HTTP-Negotiate
[perl-HTTP-Negotiate]
recipe = slapos.recipe.cmmi
depends =
${perl-HTTP-Message:location}
url = http://www.cpan.org/modules/by-module/HTTP/HTTP-Negotiate-6.01.tar.gz
<= perl-CPAN-package
module = HTTP/HTTP-Negotiate
version = 6.01
md5sum = 1236195250e264d7436e7bb02031671b
configure-command =
${perl:location}/bin/perl Makefile.PL
inc = ${perl-HTTP-Message:site_perl}
......@@ -5,8 +5,7 @@ parts =
perl-IO-HTML
[perl-IO-HTML]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/IO/IO-HTML-1.00.tar.gz
<= perl-CPAN-package
module = IO/IO-HTML
version = 1.00
md5sum = fdfa3fe3d61a7fda9236c8d9776cdd65
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -6,13 +6,15 @@ extends =
parts = perl-Image-Magick
[perl-Image-Magick]
recipe = slapos.recipe.cmmi
<= perl-CPAN-package
# module = Image/PerlMagick
# version = 6.77
# version 6.77 is not in `by-module` folder, so we use url= until we update
url = http://search.cpan.org/CPAN/authors/id/J/JC/JCRISTY/PerlMagick-6.77.tar.gz
md5sum = fa0f66fa0cabbd1b196254f94dec8e99
patch-options = -p0
patches =
${:_profile_base_location_}/perl-Image-Magick_MakefilePL.patch#31043e2b79e725d3b251aa09b4549046
configure-command =
${perl:location}/bin/perl Makefile.PL LIBS="-L${imagemagick:location}/lib -Wl,-R${imagemagick:location}/lib -L${perl:location}/libs-c -Wl,-R${perl:location}/libs-c" INC="-I${imagemagick:location}/include/ImageMagick"
extra-configure-args = LIBS="-L${imagemagick:location}/lib -Wl,-R${imagemagick:location}/lib -L${perl:location}/libs-c -Wl,-R${perl:location}/libs-c" INC="-I${imagemagick:location}/include/ImageMagick"
environment =
PATH=${patch:location}/bin:%(PATH)s
......@@ -5,8 +5,7 @@ parts =
perl-JSON
[perl-JSON]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/JSON/JSON-2.90.tar.gz
<= perl-CPAN-package
module = JSON/JSON
version = 2.90
md5sum = e1512169a623e790a3f69b599cc1d3b9
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -6,10 +6,9 @@ parts =
perl-LWP-MediaTypes
[perl-LWP-MediaTypes]
recipe = slapos.recipe.cmmi
depends =
${perl-URI:location}
url = http://www.cpan.org/modules/by-module/LWP/LWP-MediaTypes-6.02.tar.gz
<= perl-CPAN-package
module = LWP/LWP-MediaTypes
version = 6.02
md5sum = 8c5f25fb64b974d22aff424476ba13c9
configure-command =
${perl:location}/bin/perl Makefile.PL
inc = ${perl-URI:site_perl}
......@@ -5,8 +5,7 @@ parts =
perl-Net-HTTP
[perl-Net-HTTP]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/Net/Net-HTTP-6.06.tar.gz
<= perl-CPAN-package
module = Net/Net-HTTP
version = 6.06
md5sum = 6e74d76205f168775de68347266793a7
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -5,11 +5,7 @@ parts =
perl-Net-IP
[perl-Net-IP]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/Net/Net-IP-1.26.tar.gz
<= perl-CPAN-package
module = Net/Net-IP
version = 1.26
md5sum = 3a98e3ac45d69ea38a63a7e678bd716d
configure-command =
${perl:location}/bin/perl Makefile.PL
location = ${buildout:parts-directory}/${:_buildout_section_name_}
make-options =
INSTALLSITESCRIPT=${:location}/bin
......@@ -7,13 +7,13 @@ parts =
perl-SGML-Parser-OpenSP
[perl-SGML-Parser-OpenSP]
recipe = slapos.recipe.cmmi
depends =
${perl-Class-Accessor:location}
url = http://www.cpan.org/modules/by-module/SGML/SGML-Parser-OpenSP-0.994.tar.gz
<= perl-CPAN-package
module = SGML/SGML-Parser-OpenSP
version = 0.994
md5sum = b1ee0244e9daa4d37f28cf32c4753691
configure-command =
${perl:location}/bin/perl Makefile.PL \
inc = ${perl-Class-Accessor:site_perl}
extra-configure-args = \
INC=-I${opensp:location}/include \
LIBS="-lstdc++ -L${opensp:location}/lib -losp"
make-options =
......
[buildout]
extends =
../perl/buildout.cfg
../xapian/buildout.cfg
parts =
perl-Search-Xapian
[perl-Search-Xapian]
recipe = slapos.recipe.build:cpan
modules =
O/OL/OLLY/Search-Xapian-1.2.10.0.tar.gz
environment =
XAPIAN_CONFIG=${xapian:location}/bin/xapian-config
perl = perl
......@@ -7,13 +7,18 @@ extends =
parts = perl-Term-ReadLine-Gnu
[perl-Term-ReadLine-Gnu]
recipe = slapos.recipe.cmmi
url = http://search.cpan.org/CPAN/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.20.tar.gz
<= perl-CPAN-package
module = Term/Term-Readline-Gnu
version = 1.20
md5sum = fa33510193b89a2ada74fcef00816322
patch-options = -p0
patches =
${:_profile_base_location_}/perl-Term-ReadLine-Gnu.patch#d4e4624e717c8da63e4d153149d57b68
configure-command =
${perl:location}/bin/perl Makefile.PL --libdir=${readline:location}/lib --includedir="${readline:location}/include" LIBS="-Wl,-R${readline:location}/lib -L${ncurses:location}/lib -Wl,-R${ncurses:location}/lib" INC="-I${ncurses:location}/include"
extra-configure-args = \
--includedir="${readline:location}/include" \
--libdir=${readline:location}/lib \
INC="-I${ncurses:location}/include" \
LIBS="-Wl,-R${readline:location}/lib -L${ncurses:location}/lib -Wl,-R${ncurses:location}/lib"
environment =
PATH=${patch:location}/bin:%(PATH)s
[buildout]
extends =
../perl/buildout.cfg
../libiconv/buildout.cfg
parts = perl-Text-Iconv
[perl-Text-Iconv]
recipe = slapos.recipe.build:cpan
cpan-configuration =
makepl_arg='LIBS="-L${libiconv:location}/lib -Wl,-R${libiconv:location}/lib" INC="-I${libiconv:location}/include"'
modules =
M/MP/MPIOTR/Text-Iconv-1.7.tar.gz
perl = perl
......@@ -5,8 +5,7 @@ parts =
perl-URI
[perl-URI]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/URI/URI-1.71.tar.gz
md5sum = 247c3da29a794f72730e01aa5a715daf
configure-command =
${perl:location}/bin/perl Makefile.PL
<= perl-CPAN-package
module = URI/URI
version = 1.72
md5sum = cd56d81ed429efaa97e7f3ff08851b48
......@@ -5,8 +5,7 @@ parts =
perl-WWW-RobotRules
[perl-WWW-RobotRules]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/WWW/WWW-RobotRules-6.02.tar.gz
<= perl-CPAN-package
module = WWW/WWW-RobotRules
version = 6.02
md5sum = b7186e8b8b3701e70c22abf430742403
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -9,20 +9,20 @@ parts =
perl-XML-LibXML
[perl-XML-LibXML]
recipe = slapos.recipe.cmmi
depends =
${perl-XML-NamespaceSupport:location}
${perl-XML-SAX:location}
url = http://www.cpan.org/modules/by-module/XML/XML-LibXML-2.0116.tar.gz
<= perl-CPAN-package
module = XML/XML-LibXML
version = 2.0116
md5sum = a53a743bf053a0cb4afb41513fb8a684
configure-command =
${perl:location}/bin/perl Makefile.PL DEBUG=1 \
INC=-I${libxml2:location}/include/libxml2 \
LIBS="-L${libxml2:location}/lib -L${zlib:location}/lib"
inc = ${perl-XML-NamespaceSupport:site_perl}:${perl-XML-SAX:site_perl}
install-inc = blib/lib
extra-configure-args = \
DEBUG=1 \
INC=-I${libxml2:location}/include/libxml2 \
LIBS="-L${libxml2:location}/lib -L${zlib:location}/lib"
# Parallel make does not work for this package on fast machines
# with many cores
make-options =
OTHERLDFLAGS=" -Wl,-rpath=${libxml2:location}/lib -Wl,-rpath=${zlib:location}/lib" -j1
environment =
LD_LIBRARY_PATH=${libxml2:location}/lib:${zlib:location}/lib
PERLLIB=blib/lib
[buildout]
extends =
../perl/buildout.cfg
../libxslt/buildout.cfg
../libxml2/buildout.cfg
../zlib/buildout.cfg
parts = perl-XML-LibXSLT
[perl-XML-LibXSLT]
recipe = slapos.recipe.build:cpan
cpan-configuration =
makepl_arg='LIBS="-L${libxslt:location}/lib -Wl,-R${libxslt:location}/lib -L${zlib:location}/lib -Wl,-R${zlib:location}/lib -L${libxml2:location}/lib -Wl,-R${libxml2:location}/lib" INC="-I${libxslt:location}/include -I${libxml2:location}/include/libxml2"'
modules =
S/SH/SHLOMIF/XML-LibXSLT-1.78.tar.gz
perl = perl
......@@ -5,8 +5,9 @@ parts =
perl-XML-NamespaceSupport
[perl-XML-NamespaceSupport]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/XML/XML-NamespaceSupport-1.11.tar.gz
<= perl-CPAN-package
module = XML/XML-NamespaceSupport
version = 1.11
md5sum = 222cca76161cd956d724286d36b607da
configure-command =
${perl:location}/bin/perl -I. Makefile.PL
install-inc = .
......@@ -7,18 +7,17 @@ parts =
perl-XML-Parser
[perl-XML-Parser]
recipe = slapos.recipe.cmmi
depends =
${perl-libwww-perl:location}
url = http://www.cpan.org/modules/by-module/XML/XML-Parser-2.41.tar.gz
<= perl-CPAN-package
module = XML/XML-Parser
version = 2.41
md5sum = c320d2ffa459e6cdc6f9f59c1185855e
configure-command =
${perl:location}/bin/perl Makefile.PL \
inc = ${perl-libwww-perl:site_perl}
install-inc = blib/lib
extra-configure-args =
EXPATINCPATH=${libexpat:location}/include \
EXPATLIBPATH=${libexpat:location}/lib \
EXPATLIBPATH=${libexpat:location}/lib
# Parallel make does not work for this package on fast machines
# with many cores
make-options =
OTHERLDFLAGS="-Wl,-rpath=${libexpat:location}/lib" -j1
environment =
PERLLIB=blib/lib
......@@ -5,8 +5,7 @@ parts =
perl-XML-SAX-Base
[perl-XML-SAX-Base]
recipe = slapos.recipe.cmmi
url = http://www.cpan.org/modules/by-module/XML/XML-SAX-Base-1.08.tar.gz
<= perl-CPAN-package
module = XML/XML-SAX-Base
version = 1.08
md5sum = 38c8c3247dfd080712596118d70dbe32
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -7,14 +7,14 @@ parts =
perl-XML-SAX
[perl-XML-SAX]
recipe = slapos.recipe.cmmi
depends =
${perl-XML-NamespaceSupport:location}
${perl-XML-SAX-Base:location}
url = http://www.cpan.org/modules/by-module/XML/XML-SAX-0.99.tar.gz
<= perl-CPAN-package
module = XML/XML-SAX
version = 0.99
md5sum = 290f5375ae87fdebfdb5bc3854019f24
# say 'y' for 'Do you want XML::SAX to alter ParserDetails.ini? [Y]' question.
configure-command =
echo y | ${perl:location}/bin/perl Makefile.PL
inc = ${perl-XML-NamespaceSupport:site_perl}:${perl-XML-SAX-Base:site_perl}
install-inc = blib/lib
# PERL_MM_USE_DEFAULT: To answer default answers to prompt ( see http://search.cpan.org/~bingos/ExtUtils-MakeMaker-7.34/lib/ExtUtils/MakeMaker.pm )
environment =
PERLLIB=blib/lib
PERL_MM_USE_DEFAULT=yes
......@@ -17,24 +17,21 @@ parts =
perl-libwww-perl
[perl-libwww-perl]
recipe = slapos.recipe.cmmi
depends =
${perl-Data-Dump:location}
${perl-Encode-Locale:location}
${perl-File-Listing:location}
${perl-HTML-Parser:location}
${perl-HTTP-Cookies:location}
${perl-HTTP-Daemon:location}
${perl-HTTP-Message:location}
${perl-HTTP-Negotiate:location}
${perl-LWP-MediaTypes:location}
${perl-Net-HTTP:location}
${perl-URI:location}
${perl-WWW-RobotRules:location}
url = http://www.cpan.org/modules/by-module/LWP/libwww-perl-6.06.tar.gz
<= perl-CPAN-package
module = LWP/libwww-perl
version = 6.06
md5sum = 292496bd2a13da95903b383f59009200
configure-command =
${perl:location}/bin/perl Makefile.PL
location = ${buildout:parts-directory}/${:_buildout_section_name_}
make-options =
INSTALLSITESCRIPT=${:location}/bin
inc =
${perl-Data-Dump:site_perl}:\
${perl-Encode-Locale:site_perl}:\
${perl-File-Listing:site_perl}:\
${perl-HTML-Parser:site_perl}:\
${perl-HTTP-Cookies:site_perl}:\
${perl-HTTP-Daemon:site_perl}:\
${perl-HTTP-Message:site_perl}:\
${perl-HTTP-Negotiate:site_perl}:\
${perl-LWP-MediaTypes:site_perl}:\
${perl-Net-HTTP:site_perl}:\
${perl-URI:site_perl}:\
${perl-WWW-RobotRules:site_perl}
......@@ -26,3 +26,93 @@ configure-command =
environment =
PATH=${patch:location}/bin:%(PATH)s
post-make-hook = ${:_profile_base_location_}/perl-create-libs-symlink.py#943453b7d3ff8d49ed12d44a7f7076ee:post_make_hook
[perl-CPAN-package]
# Macro to install a perl package from CPAN
# This macro will generate a perl wrapper as {:perl-bin} and rewrite all
# scripts installed by the package to use this perl. Executable scripts are
# installed in ${:perl-PATH}
# Inputs:
# - module name, ie. Category/Category-Name
module = (required)
# - module version
version = (required)
# - checksum of module
md5sum = (required)
# - colon (:) separated site perl of runtime dependencies, for example
# ${perl-X-Y:site_perl}:${perl-X-Z:site_perl} these paths will be included in
# the generated wrappers
inc =
# - colon (:) separated site perl of install dependencies, for example
# ${perl-X-Y:site_perl}:${perl-X-Z:site_perl} these paths will be used only
# for installation. A typical use case is to add current directory (.) for
# packages using a local version of Module::Install.
install-inc =
# - extra arguments passed to perl Makefile.PL
extra-configure-args =
# Outputs:
# - site_perl, to use in inc in dependent packages
site_perl=${:location}/lib/site_perl/${perl:version}:${:location}:${:inc}
# - a $PATH that contain the perl wrapper
perl-PATH = ${:location}/bin/
# - the path for a perl wrapper with @INC set to this CPAN package and all the
# dependencies
perl-bin = ${:perl-PATH}/perl
# Implementation
recipe = slapos.recipe.cmmi
url = https://www.cpan.org/modules/by-module/${:module}-${:version}.tar.gz
configure-command =
PERL5LIB="${:inc}:${:install-inc}" \
${perl:location}/bin/perl \
Makefile.PL \
PREFIX=${:location} \
${:extra-configure-args}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
# Install scripts in "perl-bin", but create wrappers in ./bin/
make-options =
INSTALLSITESCRIPT=${:location}/perl-bin/
make-binary=
PERL5LIB="${:inc}:${:install-inc}" make
# this post-make-hook is same for all users of the macro.
post-make-hook = ${:_profile_base_location_}/../../component/perl/perl-CPAN-package-create-wrapper.py#f9314defc3b144d9f36f8cab2a013af9:post_make_hook
perl_location = ${perl:location}
[perl-wrapper]
# Macro to generate a perl wrapper with @INC set as ${:inc}
# The wrapper will be named as the section name, in buildout's bin directory.
#
# Note that this is usually not needed, because each part installed with
# perl-CPAN-package generates its own wrapper with the package and all
# dependencies available.
# This macro is useful to build a wrapper with several independent package
# available.
# It also takes care of executing perl with -I argument and not with $PERL5LIB
# environment variable, because the later is ignored when perl runs in tainted
# mode ( with -T argument )
#
# Inputs:
# - inc : colon (:) separated site perl of modules to include in @INC
# Outputs:
# - perl-bin : an executable perl
recipe = slapos.recipe.template:jinja2
template = inline:
#!/bin/sh
{% set inc = "${:inc}".split(':') %} {# XXX we could remove duplicates from inc #}
exec ${perl:location}/bin/perl \
{% for item in inc -%}{% if item %} -I "{{ item }}" \
{% endif %}{% endfor %} "$@"
mode = 0755
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
perl-bin = ${:rendered}
import os
import textwrap
import glob
def post_make_hook(options, buildout, environmet):
prefix = options['prefix']
site_perl = options['site_perl']
perl_location = options['perl_location']
bin_folder = os.path.join(prefix, 'bin')
if not os.path.isdir(bin_folder):
os.mkdir(bin_folder)
# install a ./bin/perl wrapper with @INC set
perl_wrapper_path = os.path.join(bin_folder, 'perl')
with open(perl_wrapper_path, 'w') as wrapper:
wrapper.write(textwrap.dedent('''\
#!/bin/sh
export PERL5LIB="{site_perl}:$PERL5LIB"
exec {perl_location}/bin/perl "$@"
'''.format(**locals())))
os.chmod(perl_wrapper_path, 0755)
# create a wrapper for each scripts installed in perl-bin
for script_path in glob.glob(os.path.join(prefix, 'perl-bin', '*')):
script_name = os.path.basename(script_path)
wrapper_path = os.path.join(prefix, 'bin', script_name)
with open(wrapper_path, 'w') as wrapper:
wrapper.write(textwrap.dedent('''\
#!/bin/sh
export PERL5LIB="{site_perl}:$PERL5LIB"
exec {perl_location}/bin/perl {script_path} "$@"
'''.format(**locals())))
os.chmod(wrapper_path, 0755)
......@@ -5,7 +5,6 @@ extends =
../gperf/buildout.cfg
../intltool/buildout.cfg
../libcap/buildout.cfg
../perl/buildout.cfg
../perl-XML-Parser/buildout.cfg
../pkgconfig/buildout.cfg
../util-linux/buildout.cfg
......@@ -16,12 +15,10 @@ recipe = slapos.recipe.cmmi
# XXX This version requires Linux kernel >= 3.7.
url = https://www.freedesktop.org/software/systemd/systemd-221.tar.xz
md5sum = b4d5a253841cf28a98b7ec99c45e3716
depends =
${perl-XML-Parser:location}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
make-options = rootprefix=${:location} SYSTEM_SYSVINIT_PATH=${:location}/etc/init.d
environment =
PATH=${coreutils:location}/bin:${gettext:location}/bin:${gperf:location}/bin:${intltool:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${coreutils:location}/bin:${gettext:location}/bin:${gperf:location}/bin:${intltool:location}/bin:${perl-XML-Parser:perl-PATH}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${libcap:location}/include -I${util-linux:location}/include
LDFLAGS=-L${libcap:location}/lib -Wl,-rpath=${libcap:location}/lib -L${util-linux:location}/lib -Wl,-rpath=${util-linux:location}/lib
PKG_CONFIG_PATH=${util-linux:location}/lib/pkgconfig
......@@ -21,22 +21,25 @@ versions = versions
[versions]
erp5.recipe.w3validator = 1.0.2
[w3-validator-perl]
<= perl-wrapper
inc =
${perl-CGI:site_perl}:\
${perl-Config-General:site_perl}:\
${perl-Encode-HanExtra:site_perl}:\
${perl-HTML-Encoding:site_perl}:\
${perl-HTML-Parser:site_perl}:\
${perl-HTML-Template:site_perl}:\
${perl-JSON:site_perl}:\
${perl-Net-IP:site_perl}:\
${perl-SGML-Parser-OpenSP:site_perl}:\
${perl-URI:site_perl}:\
${perl-XML-LibXML:site_perl}:\
${perl-libwww-perl:site_perl}
[w3-validator]
recipe = erp5.recipe.w3validator
depends =
${perl-CGI:location}
${perl-Config-General:location}
${perl-Encode-HanExtra:location}
${perl-HTML-Encoding:location}
${perl-HTML-Parser:location}
${perl-HTML-Template:location}
${perl-JSON:location}
${perl-Net-IP:location}
${perl-SGML-Parser-OpenSP:location}
${perl-URI:location}
${perl-XML-LibXML:location}
${perl-libwww-perl:location}
perl-path = ${perl:location}/bin/perl
perl-path = ${w3-validator-perl:perl-bin}
# validator-1_3-release in https://dvcs.w3.org/hg/markup-validator/tags
validator-url = https://dvcs.w3.org/hg/markup-validator/archive/6c6c7c1f69c5.tar.bz2
dtd-url =
......@@ -14,6 +14,7 @@ extends =
../openssl/buildout.cfg
../patch/buildout.cfg
../perl/buildout.cfg
../perl-XML-Parser/buildout.cfg
../pkgconfig/buildout.cfg
../zlib/buildout.cfg
......@@ -314,15 +315,13 @@ environment =
recipe = slapos.recipe.cmmi
url = http://www.x.org/releases/X11R7.7/src/everything/xkeyboard-config-2.6.tar.bz2
md5sum = e7e31da9adb56ba52b5c18226b8cbef3
depends =
${perl-XML-Parser:location}
configure-options =
--disable-static
--enable-shared
--enable-compat-rules
--with-xkb-rules-symlink=xfree86
environment =
PATH=${gettext:location}/bin:${intltool:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:${xkbcomp:location}/bin:%(PATH)s
PATH=${gettext:location}/bin:${intltool:location}/bin:${perl-XML-Parser:perl-PATH}:${pkgconfig:location}/bin:${xkbcomp:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libX11:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig
[xkbcomp]
......
......@@ -6,16 +6,11 @@ develop =
extends =
../../component/rsync/buildout.cfg
../../component/apache-perl/buildout.cfg
../../component/perl-Crypt-SSLeay/buildout.cfg
../../component/perl-XML-Parser/buildout.cfg
../../component/perl-XML-LibXML/buildout.cfg
../../component/perl-XML-LibXSLT/buildout.cfg
../../component/perl-Term-ReadLine-Gnu/buildout.cfg
../../component/perl-Text-Iconv/buildout.cfg
../../component/perl-Image-Magick/buildout.cfg
../../component/postgresql/buildout.cfg
../../component/perl-DBD-Pg/buildout.cfg
../../component/perl-Search-Xapian/buildout.cfg
../../component/libxslt/buildout.cfg
../../component/dcron/buildout.cfg
../../component/dropbear/buildout.cfg
......@@ -43,6 +38,79 @@ parts =
template-apacheperl
template-postgres
# Those were unmaintained components inlined here
# slapos.recipe.build:cpan no longer exist, we now use perl-CPAN-package macro instead
# ../../component/perl-Crypt-SSLeay/buildout.cfg
[buildout]
extends +=
../../component/openssl/buildout.cfg
../../component/zlib/buildout.cfg
[perl-Crypt-SSLeay]
recipe = slapos.recipe.build:cpan
modules =
G/GA/GAAS/URI-1.60.tar.gz
N/NA/NANIS/Crypt-SSLeay-0.64.tar.gz
cpan-configuration =
make_arg=('OTHERLDFLAGS="-L${zlib:location}/lib -Wl,-R${zlib:location}/lib -L${openssl:location}/lib -Wl,-R${openssl:location}/lib"')
makepl_arg=('INC=-I${openssl:location}/include')
environment =
OPENSSL_PREFIX=${openssl:location}
perl = perl
# ../../component/perl-XML-LibXSLT/buildout.cfg
[buildout]
extends +=
../libxslt/buildout.cfg
../libxml2/buildout.cfg
../zlib/buildout.cfg
[perl-XML-LibXSLT]
recipe = slapos.recipe.build:cpan
cpan-configuration =
makepl_arg='LIBS="-L${libxslt:location}/lib -Wl,-R${libxslt:location}/lib -L${zlib:location}/lib -Wl,-R${zlib:location}/lib -L${libxml2:location}/lib -Wl,-R${libxml2:location}/lib" INC="-I${libxslt:location}/include -I${libxml2:location}/include/libxml2"'
modules =
S/SH/SHLOMIF/XML-LibXSLT-1.78.tar.gz
perl = perl
# ../../component/perl-Text-Iconv/buildout.cfg
[buildout]
extends +=
../libiconv/buildout.cfg
[perl-Text-Iconv]
recipe = slapos.recipe.build:cpan
cpan-configuration =
makepl_arg='LIBS="-L${libiconv:location}/lib -Wl,-R${libiconv:location}/lib" INC="-I${libiconv:location}/include"'
modules =
M/MP/MPIOTR/Text-Iconv-1.7.tar.gz
perl = perl
# ../../component/perl-DBD-Pg/buildout.cfg
[buildout]
extends +=
../postgresql/buildout.cfg
[perl-DBD-Pg]
recipe = slapos.recipe.build:cpan
modules =
T/TU/TURNSTEP/DBD-Pg-2.19.3.tar.gz
environment =
POSTGRES_HOME=${postgresql:location}
perl = perl
# ../../component/perl-Search-Xapian/buildout.cfg
[buildout]
extends +=
../xapian/buildout.cfg
[perl-Search-Xapian]
recipe = slapos.recipe.build:cpan
modules =
O/OL/OLLY/Search-Xapian-1.2.10.0.tar.gz
environment =
XAPIAN_CONFIG=${xapian:location}/bin/xapian-config
perl = perl
[eggs]
recipe = zc.recipe.egg
eggs =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment