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 support for referenced Git repositories #3

Open
mateusrodrigues opened this issue Jun 18, 2024 · 1 comment · May be fixed by #5
Open

Add support for referenced Git repositories #3

mateusrodrigues opened this issue Jun 18, 2024 · 1 comment · May be fixed by #5
Labels
enhancement New feature or request

Comments

@mateusrodrigues
Copy link
Member

This idea came up when thinking about the debian/eng/test-runner and debian/tests/regular-tests directories and how they essentially duplicate files already available and maintained in separate Git repositories.

So, in order to avoid also having these files in the debian/ source tree, we can make it so Flamenco understands external references to Git repositories in a structured and standardized file.

For example, inside the debian/eng/test-runner directory, we can have a file called flamenco-git.{source_package}.{release} (exact name TBD) that essentially states that that directory should contain the files present in x repository, at y commit or z tag, when building the dist folder of source_package targeting release.

The structure of that file can be something similar to:

repo=https://github.com/canonical/dotnet-test-runner
tag=v1.1.0
commit=eafbc12

Where tag xor commit are present. Exact structure also TBD.

In general, this solves for test-runner and regular-tests, but also allows us to make other components of the packaging external references, such as versionlib, and better separates the concerns of the source-build repo from the maintenance of these other libraries and tools.

As these are very preliminary thoughts, I'm open to discuss if and how we should make this even more general purpose.

@mateusrodrigues mateusrodrigues added the enhancement New feature or request label Jun 18, 2024
@mateusrodrigues
Copy link
Member Author

Thinking more deeply on this, I believe that external reference files could be written in such a way as to allow for more types of references other than Git (as long the tool supports them).

I think the idea is to start by supporting Git, but we could also reference tarballs, for example.

The file could be then called something like flamenco.external.{source_package}.{release}. The content would, then, contain what kind of linkage this is, e.g.

type=git
repo=https://github.com/canonical/dotnet-test-runner
tag=v1.1.0

This could also be a JSON file, in which case we would make use of .NET's own JSON (de)serializer to parse it.

As we were discussing earlier, we could also create a file that describes the orig tarball location, which could be called something like flamenco.orig.{source_package} and points to where we get the orig tarball from. I intentionally removed {release}, as the orig tarball has to be the same across releases for that same package version. Although I feel that this orig tarball discussion should be tracked by another issue 🤔

@mateusrodrigues mateusrodrigues linked a pull request Aug 20, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant