Skip to content

Convert perl to package v2 #1808

Merged
merged 7 commits into from
Apr 29, 2020
Merged

Convert perl to package v2 #1808

merged 7 commits into from
Apr 29, 2020

Conversation

donald
Copy link
Collaborator

@donald donald commented Apr 27, 2020

Next attempt to replace the perl installed in /usr/local/bin.
First attempt was #1406, reverted in #1420. Issues in #1419 should be addressed.

We replace perl-5.12.1 from /usr/local with wrappers to /pkg/perl-5.12.1-0 now, so there is no implied upgrade of the perl version.

Remove perl from /usr/local/...
Remove bee packages which either installed perl modules only or which
provided commands which are availabe from the packaged perl.

We keep some bee modules for now, which also installed into
/usr/local/lib/perl5, but which provided more functionality, e.g.
libraries, include files or command not available from the packaged
perl:

- rrdtool-1.6.0-1.x86_64
- subversion-1.6.16-1.x86_64
- wakeonlan-0.41-0.x86_64
Install wrapper for commands provided by packaged perl.

Note: This commit was cherry-picked from 95d5bdb ("perl-wrapper:
Install version 1.0") which was applied and later reverted. In
contradiction to the commit message title, the initial version
was "1.1" not "1.0". We don't correct that so that versions continue to
increase.
We want to take small steps. When we replace the perl installed into
/usr/local/ this time, we don't want to make an implicit upgrade but use
the package with the same perl version number instead.

Let the package wrpper use the package "perl-5.12.1-0" instead of "perl"
which is the recommended version.

Rebuild list of commands to supply in /usr/bin.
As noted in [#1419], several scripts still use `/usr/local/bin/perl` as a
shebang so provide a symlink.

[#1419]:  #1419
/usr/bin/perl might not be included in the list generated
by the command quoted in the script if perl-5.12.1-2.x86_64 is
still installed, because this packages includes a symlink
/usr/bin/perl -> /usr/local/bin/perl.
@donald donald force-pushed the convert-perl-to-package-v2 branch from 7cf2014 to 1ea4670 Compare April 27, 2020 17:29
@donald
Copy link
Collaborator Author

donald commented Apr 28, 2020

perl-5.12.1-0 is configured as LOCAL in mxpkg. Should be on local disk tomorrow, so I'll merge this tomorrow.

Comment on lines +84 to +86
cpan-mirrors cpan2dist cpanel_json_xs cpanp cpanp-run-perl crc32 db_archive \
db_checkpoint db_deadlock db_dump db_hotbackup db_load db_printlog db_recover \
db_sql db_stat db_upgrade db_verify dbilogstrip dbiprof dbiproxy dm_date \
Copy link
Collaborator

@pmenzel pmenzel Oct 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, what is the reason to package the Berkeley DB executables?

[BEE] /src/mariux/beeroot/bee-files/db-5.3.28-0.bee
'/home/pmenzel/bee-files/./db.be0' -> '/src/mariux/beeroot/bee-files/db-5.3.28-0.bee'
[BEE] Conflicts with installed package found: perl-wrapper-1.1-1.x86_64:
[BEE]     /usr/bin/db_archive
[BEE]     /usr/bin/db_checkpoint
[BEE]     /usr/bin/db_deadlock
[BEE]     /usr/bin/db_dump
[BEE]     /usr/bin/db_hotbackup
[BEE]     /usr/bin/db_load
[BEE]     /usr/bin/db_printlog
[BEE]     /usr/bin/db_recover
[BEE]     /usr/bin/db_stat
[BEE]     /usr/bin/db_upgrade
[BEE]     /usr/bin/db_verify

Rebuild the wrapper without these executables?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're welcome. There was no conflict when the wrapper was installed, because #1621 removed Berkeley DB from the system. It had to be included in the perl package, because the replaced /usr/local perl had the module BerkeleyDB which requires it.

As can be seen from the comment in the wrapper script, the list was generated automatically. It wouldn't be easy to individually decide what is required and what not. And a command , which doesn't replace an existing command, doesn't hurt (much), so everything was included.

However, yes, when there is a package to be installed into Mariux with a command same to one provided from a package wrapper, the package wrapper should step back. If you want the command from the package (e.g. to have a db_dump which matches the version of the perl script using BerkeleyDB) you can (and would need to) run db_dump in the package context (prun perl-5.12.1-0 which db_dump)

So go ahead.

Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants