Closed KES777 closed 2 years ago
It seems 02packages.details.txt.gz should be stored into vendor/cache/modules
You're making up a feature. It doesn't exist, and is not mentioned in the documentation.
Carton and Carmel does have this feature.
I thought that --save-dists
could be used then with --from
.
If this is a feature, could you please implement probably --save-packages
option. Anyway cpanm
downloads it to some directory. Would be nice if we could configure that.
cpanm
in compare to Carton
and Carmel
has standalone executable.
Again, I recommend you to check out Carmel, because the tool is made precisely for that workflow. See comment in #647 on how to get started.
Carmel has some perl dependencies, but you don't have to use Carmel on a production host - you can use cpanm
to bootstrap the modules, using the files created by Carmel on local development environment or CI.
The main benefit of cpanm
is that it is standalone and come with perlbrew
. Will try different flow via carmel/carton
. Thank you.
The main benefit of cpanm is that it is standalone and come with perlbrew
Yes, but you can then install Carmel with cpanm Carmel
locally, and as I commented you don't need it on a remote host on deployments. cpanm
is great for bootstrapping your perl dependencies, but you don't have to be constrained by cpanm - it seems like your mindset is "I must use cpanm for everything", which I'd say is not true.
For example, you can install Carmel locally with cpanm -L vendor Carmel
and get carmel setup in vendor/bin
, which you can run with perl -Ivendor/lib/perl5 ./vendor/bin/carmel
without polluting your system perl.
Probably this is issue for carton
, but I can not use -Ivendor/lib/perl5
for it:
https://stackoverflow.com/q/72733619/4632019
$ cpanm -n -L ext Carton
...
Successfully installed Carton-v1.0.35
25 distributions installed
$ PERL5LIB=ext/lib/perl5 perl ext/bin/carton install --deployment
Installing modules using /home/ekonkov/cpanfile (deployment mode)
Successfully installed Text-CSV_XS-1.47
Successfully installed Module-Build-0.4231
Successfully installed Module-Runtime-0.016
Successfully installed Dist-CheckConflicts-0.11
Can't locate Menlo/Builder/Static.pm in @INC
If I provide absolute path, then installation works.
For carmel
both fail: perl -Ivendor/lib/perl5/ ./vendor/bin/carmel
and perl -I$PWD/vendor/lib/perl5/ ./vendor/bin/carmel
Errors are:
Running Makefile.PL
Warning: prerequisite Cpanel::JSON::XS 2.3310 not found.
Checking if your kit is complete...
Looks good
JSON 2.5 is required for $ENV{PERL_JSON_BACKEND} = '1'
at /home/kes/perl5/perlbrew/perls/perl-5.30.3/lib/5.30.3/CPAN/Meta.pm line 616.
-> N/A
-> FAIL No MYMETA file is found after configure. Your toolchain is too old?
-> FAIL Configure failed for JSON-MaybeXS-1.004003. See /tmp/K1xikldVhU/work/1656498923.3>
! Bailing out the installation for Path-Tiny-0.122.
! Installing the dependencies failed: Installed version (7.34) of ExtUtils::MakeMaker is not in range '7.56'
! Bailing out the installation for Devel-CheckLib-1.16.
! Installing the dependencies failed: Module 'Devel::CheckLib' is not installed, Module 'DBI' is not installed, Installed version (7.34) of ExtUtils::MakeMaker is not in range '7.56'
---> Installing modules...
load_file() requires a valid, readable filename at vendor/lib/perl5/Carmel/Artifact.pm line 121.
experimenting inside container:
error: You need to run `carmel install` first to get the modules installed and artifacts built.
same error: You need to run `carmel install` first to get the modules installed and artifacts built.
Can not get carmel
to work =(
When do # perl -I$PWD/ext2/lib/perl5/ ext2/bin/carmel install
Got many errors like:
! Configure failed for Net-IP-1.26. See /tmp/LdeEpQjTje/work/1656504871.49484/build.log for details.
! Installing the dependencies failed: Module 'Net::IP' is not installed, Module 'Plack' is not installed
! Bailing out the installation for Plack-Middleware-XForwardedFor-0.172050.
! Configure failed for Proc-ProcessTable-0.634. See /tmp/LdeEpQjTje/work/1656504871.49484/build.log for details.
! Configure failed for Net-Telnet-3.05. See /tmp/LdeEpQjTje/work/1656504871.49484/build.log for details.
! Configure failed for DB-Skip-1.132980. See /tmp/LdeEpQjTje/work/1656504871.49484/build.log for details.
Successfully installed JSON-4.07
...
! Bailing out the installation for ..
64 distributions installed
Using AnyEvent (7.17)
Using Canary::Stability (2013)
Using CPAN::Perl::Releases (5.20220620)
Using Carp::Always (0.16)
...
Using Geography::States::NoUnicodeWarnings (0.004)
Using Geography::States (2015072102)
Using Net::Ping::External (0.15)
Using Net::RabbitFoot (1.03)
load_file() requires a valid, readable filename at /opt/chimera/ext2/lib/perl5/Carmel/Artifact.pm line 121.
And unfortunately carmel
destroys the log file:
# cat /tmp/LdeEpQjTje/work/1656504871.49484/build.log
cat: /tmp/LdeEpQjTje/work/1656504871.49484/build.log: No such file or directory
If I provide absolute path, then installation works.
Yep, seems to be an issue with cwd.
I figured you eventually got it working https://github.com/perl-carton/carton/issues/282 though.
Can not get carmel to work =(
This is unfortunate. Carmel has a stricter policy around module configuration and relocation after install as compared to Carton, and it seems some of your dependencies fall into that category. I'm happy to take a look if you post a full cpanfile somewhere though.
In general I strongly recommend Carmel over Carton, but Carton might be a shorter path to get working assuming your dep list is gigantic and some modules might have problems with relocations.
I used your cpanfile posted in another PR, and got it working just fine, except Imager and SSLeacy which failed due to missing C libraries.
I recommend you to trim down the number of modules in cpanfile to just the ones that cause issues, and open a new issue in https://github.com/miyagawa/Carmel
On one host I have installed modules:
tar
vendor
folder and move it to other host,untar
. Then on this host I want to install from this bundle.It seems
02packages.details.txt.gz
should be stored intovendor/cache/modules