Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos
slapos
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Merge Requests 74
    • Merge Requests 74
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Jobs
  • Commits
  • nexedi
  • slaposslapos
  • Merge Requests
  • !341

Merged
Opened Jun 12, 2018 by Jérome Perrin@jerome
  • Report abuse
Report abuse

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.

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, 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.

  • Discussion 17
  • Commits 7
  • Changes 49
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: nexedi/slapos!341

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7