Skip to content

Reworking .patch and snapshot utils #22972

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

Conversation

thibaultduponchelle
Copy link
Member

@thibaultduponchelle thibaultduponchelle commented Feb 3, 2025

Description

The purpose of files Porting/make_dot_patch.pl, Porting/make_snapshot.pl and Porting/GitUtils.pm is to generate a .patch file and a snapshot.
It was used at time of APC "All Perl Changes" infra and gitweb (which is now only a mirror of GitHub).
Snapshot and .patch solo consumer is perl5 smokers (Test::Smoke) that I took over.

This pull request intends to modify a little the generation of .patch and snapshot.

Removal of GitUtils.pm

Code moved to Porting/make_dot_patch.pl.

Porting/make_dot_patch.pl

  • Now contains GitUtils.pm
  • Generate .patch in addition to printing to stdout
  • Don't try to match branch or refs from commit, just use current branch
  • No longer take commit as an argument (it was optional), just work with current commit
  • No code for bare repository. It's actually transparently working with bare repository (if you add Porting/make_dot_patch.pl and Porting/make_snapshot.pl to the bare repository) but I don't see a use case and it's from now on not supported

Porting/make_snapshot.pl

  • Reuse Porting/make_dot_patch.pl instead of copying the same (or very similar) code
  • Only use git archive with --add-file instead of git archive + tar + gunzip
  • Do not put files under a prefix to ease decompressing later on Test::Smoke side
  • No longer need to set environment variable PERL_SNAPSHOT_ZIP_ROOT
  • Do not put file inside crafted subdirs (e.g. ab/ab77/) but one directory up like some other tools are doing (e.g. makerel)

@demerphq @Tux @jkeenan


  • This set of changes does not require a perldelta entry.

@jkeenan
Copy link
Contributor

jkeenan commented Feb 3, 2025

Before I comment on this pull request , can you apprise me of the changes in Test-Smoke since Abe's passing? Specifically, where is its repository? Who is its principal maintainer? Where does discussion of its future evolution take place? What are its governance procedures?

I ask because I've had pull requests accepted into Test-Smoke in the past but have others that were unresolved at the time of Abe's death. Also because I was never aware that there were aspects of T::S's functionality that depended upon parts of the core distribution.

@thibaultduponchelle
Copy link
Member Author

thibaultduponchelle commented Feb 3, 2025

Specifically, where is its repository? Who is its principal maintainer? Where does discussion of its future evolution take place? What are its governance procedures?

The new repository is Perl-Toolchain-Gang/Test-Smoke, I'm the principal maintainer (CPAN ID CONTRA). Discussions in GitHub issues or #smoke on IRC. There is a mailing list but it's inactive for >10 years.

Speaking about the change in snapshot generation, Test::Smoke is actually not supporting snapshot sync (code still living in Test::Smoke but not available at config time).
Speaking about .patch generation, we need to maintain some compatibility with Test::Smoke (hence I left the print).
Overall, there are lines of code in both perl5 and Test::Smoke that date from APC/gitweb era, and I'm fixing that.
But I'm probably missing some background, so I'm waiting for some veterans' feedback.

I've had pull requests accepted into Test-Smoke in the past but have others that were unresolved at the time of Abe's death.

I think you have in mind Perl-Toolchain-Gang/Test-Smoke#1?

I recreated issues and pull requests (keeping original commits and committers) to new repository.

I was never aware that there were aspects of T::S's functionality that depended upon parts of the core distribution.

Concerning Porting/make_dot_patch.pl, we need to treat with care because some T::S's syncers depend on it.
Concerning Porting/GitUtils.pm, it is internal, so we can manage as we want.
Concerning Porting/make_snapshot.pl, I don't really see it like a dependency, it's more like an helper for humans now. But yes it is, somehow.

@thibaultduponchelle
Copy link
Member Author

@toddr Are those scripts running one way or another on "dromedary"?

@toddr
Copy link
Member

toddr commented Feb 6, 2025

@toddr Are those scripts running one way or another on "dromedary"?

They are not and I really would prefer we find a way to move tools away from depending on https://perl5.git.perl.org/ so we can shut it down.

@demerphq
Copy link
Collaborator

demerphq commented Feb 6, 2025 via email

@thibaultduponchelle
Copy link
Member Author

Great, so we don't have consumers of these scripts, apart Test::Smoke.

I thought we stopped needing them [these scripts] when ActiveState dropped their APC thing.

We need to keep Porting/make_dot_patch.pl for Test::Smoke (e.g. syncer git)
With this PR, I transform Porting/make_snapshot.pl into a simpler and more generic helper for making snapshots for Test::Smoke (syncer snapshot). Also I want to add for clarity that a "snapshot" is not just a tarball (that Test::Smoke can't consume).
In theory, we could remove Porting/make_snapshot.pl if we decide to fully drop snapshot support in Test::Smoke. But even if it's only partially supported currently, I would prefer to fix it instead of dropping support totally. At least for now.

@thibaultduponchelle
Copy link
Member Author

thibaultduponchelle commented Feb 7, 2025

@demerphq @Tux @jkeenan Having now cleared discussions, this change request is ready for content review 😀

@thibaultduponchelle
Copy link
Member Author

Actually, we should go with #22981 along with #22980 😀

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

Successfully merging this pull request may close these issues.

4 participants