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

Add an "update.sh" #59

Open
J0WI opened this issue Jan 29, 2019 · 9 comments
Open

Add an "update.sh" #59

J0WI opened this issue Jan 29, 2019 · 9 comments

Comments

@J0WI
Copy link
Contributor

J0WI commented Jan 29, 2019

@docker-library-bot can run a simple update.sh script for you to update the Perl version automatically. Just add it to the team and open a corresponding PR here: https://github.com/docker-library/oi-janky-groovy/blob/master/update.sh/vars.groovy

See e.g. here: docker-library/wordpress@d775299

@zakame
Copy link
Member

zakame commented Jan 30, 2019

Thanks @J0WI, I think you've brought this up before in #24 (comment)

I'll try taking a look at this again this weekend.

@zakame
Copy link
Member

zakame commented Feb 16, 2019

So I've taken a look, and so far a few things need to happen here:

  • A way to get stable/oldstable Perl release versions reliably: asking on #p5p I was pointed to looking at https://perl5.git.perl.org/perl.git tags and this seems easy enough to implement in an update.sh
  • A means to run Devel::PatchPerl under update.sh; this could be just as simple as running generate.pl under update.sh (after it updates config.yml) but I'm not sure of the environment update.sh runs on, particularly if I can run perl/cpanm on it. @J0WI @tianon would you know?
  • A better way to manage that config.yml (and maybe converting to config.json as it seems CLI tools to use under update.sh talk better in JSON than in YAML.)

I'm happy to hear of more ideas/considerations as well, thanks again for suggesting!

@tianon
Copy link
Contributor

tianon commented Feb 19, 2019

You definitely shouldn't rely on running perl/cpanm via update.sh if you want @docker-library-bot to be running it. It's reasonable to rely on curl/wget/jq, but perl or cpanm is too much. It might make more sense to use Travis CI or something like it, especially now that they support cron jobs (https://docs.travis-ci.com/user/cron-jobs/), since you'll be able to control the environment much better.

See docker-library/docs#1248 (comment) for a bit more detail on what we use @docker-library-bot for (and how much it does). It's really not very much. 😅

@zakame
Copy link
Member

zakame commented Feb 20, 2019

Thanks @tianon, yeah this might be more doable using Travis CI cron jobs; I've been thinking about adding CI for a while now so this might push it further.

@mohawk2
Copy link

mohawk2 commented Sep 14, 2020

cpanm can self-bootstrap via curl though?

@zakame
Copy link
Member

zakame commented Sep 14, 2020

Yes, this is worth revisiting now that perl5 itself is now hosted here; we can probably look at https://github.com/Perl/perl5/releases to get update info (and probably have some additional tooling there so that https://github.com/Perl/perl5/releases/latest can point to the right new version.)

@waterkip
Copy link
Contributor

There is CPAN::Perl::Releases[1] which can give you some information about where you can download the tarball. It does not give you the checksum. But I think that is just a PR away to include that information. You can than automate much of the generation of the configuration and even make it smaller because most of the info can be found in the module.

[1] https://metacpan.org/pod/CPAN::Perl::Releases

@mohawk2
Copy link

mohawk2 commented Nov 3, 2020

It might be worth thinking about using the MetaCPAN API to get all available Perl versions (it might take a feature request, but ought to be straightforward). Also I'd think about using GitHub Actions (which can be triggered periodically) rather than the basically defunct Travis CI.

@zakame
Copy link
Member

zakame commented Aug 6, 2022

Thanks, probably high time to revisit this - we can have a GH action that can be scheduled or triggered to produce the PR needed for updating against a new Perl version.

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

No branches or pull requests

5 participants