Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install the modules in Kernel/cpan-lib via a cpanfile #2586

Closed
bschmalhofer opened this issue Oct 23, 2023 · 4 comments
Closed

Install the modules in Kernel/cpan-lib via a cpanfile #2586

bschmalhofer opened this issue Oct 23, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

A cpanfile, https://metacpan.org/distt/Module-CPANfile/view/lib/cpanfile.pod, has been proven to be useful for building the OTOBO Docker image. There is also a cpanfile that declares Perl module requirements for native installations. But for native installations it is still advised to rely on the packages provided by the relevant Linux distribution.

The modules in Kernel/cpan-lib are currently not well maintained. It is not even obvious whether these modules contain OTOBO specific patches. In order to make maintainance of Kernel/cpan-lib easier, it was decided that a cpanfile should be created. That cpanfile can be used for populating that directory. Initially there should be no version upgrades. The module search path must not change. But the actual files might move from Kernel/cpan-lib to Kernel/cpan-lib/lib/perl5.

@bschmalhofer bschmalhofer added the enhancement New feature or request label Oct 23, 2023
@bschmalhofer bschmalhofer added this to the OTOBO 11.0 milestone Oct 23, 2023
@bschmalhofer bschmalhofer self-assigned this Oct 23, 2023
@bschmalhofer
Copy link
Contributor Author

This is a mixed bag again. No problem in creating a cpanfile with the fixed versions. But when creating a new Kernel/cpan-lib then there are a lot of diffs. Mostly it is files that are not present in either the old or the new cpanfile. Contrary to what the goal of #1878 was, there are still distributions missing from the list of bundled modules.

An option is to reduce the scope of this issue. It would be nice to find out whether there are real patches in Kernel/cpan-lib.

There is also the danger of real problems. Some modules might downgrade modules that were installed either in the OS library paths. This could be problematic.

TODO:

  • create a script that removes files that are not wanted in Kernel/cpan-lib . Examples are '.pl', '.pod' files and the 'bin' directory.

@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Oct 24, 2023

Work is in progress. An intermediate result is that there seem to be no OTOBO specific patches of CPAN module. But it is still a mess with missing and extra file. At least some no longer needed modules have been identified: #2588, #2587 .

bschmalhofer added a commit that referenced this issue Oct 26, 2023
It looks that some time ago the leading tabs were replaced by spaces.
I could see no other changes.
This was actually the largest diff, except missing and additional files,
when trying to recreate Kernel/cpan-lib with a cpanfile.
bschmalhofer added a commit that referenced this issue Oct 26, 2023
between .pm files in Kernel/cpan-lib and the same files from CPAN
bschmalhofer added a commit that referenced this issue Oct 26, 2023
No idea why this wasn't checked into the OTOBO repository
bschmalhofer added a commit that referenced this issue Oct 26, 2023
This is a list of shell commands that can be used for updating
Kernel/cpan-lib. The goal is to minimize the changes to Kernel/cpan-lib,
but still install from a cpanfile.
bschmalhofer added a commit that referenced this issue Oct 26, 2023
This protocol is in a separate distribution, which is not covered
by the Debian package libwww-perl.
bschmalhofer added a commit that referenced this issue Oct 26, 2023
but were not part of Kernel/cpan-lib. This looks like a simple oversight.
bschmalhofer added a commit that referenced this issue Oct 26, 2023
in the list of bundled modules
bschmalhofer added a commit that referenced this issue Oct 26, 2023
That is, put the declarations into Kernel::System::Environment. This modules
was already a dependency of bin/otobo.CheckModules.pl.
Also, avoid having local pathes like /home/bernhard/devel/OTOBO/otobo/Kernel/cpan-lib/
in the code.
bschmalhofer added a commit that referenced this issue Oct 26, 2023
@bschmalhofer
Copy link
Contributor Author

There is now a document way of regenerating Kernel/cpan-lib. This was the goal of this issue. Further improvements and cleanups can be done in new issues.
Closing this issue after the next successful run of the test suite.

@bschmalhofer
Copy link
Contributor Author

Closing as the last run of the test suite looked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant