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

API Endpoint to link a package to a git repo #30598

Closed
Infinoid opened this issue Apr 19, 2024 · 2 comments
Closed

API Endpoint to link a package to a git repo #30598

Infinoid opened this issue Apr 19, 2024 · 2 comments
Assignees
Labels
topic/packages type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@Infinoid
Copy link
Contributor

Feature Description

It would be useful to have an API endpoint to assign a repo to a newly uploaded package.

Currently, whenever a package with a new name is uploaded, it is not associated with a git repo, and must be linked manually. There is an item in the Package Registry related ToDo list, "Set repository link from package metadata". This sounds great, but may not be possible in all cases.

I'd like an API endpoint to link a package to a git repo manually.

Use case: self-built kernel .deb packages. Debian packages for linux kernels include the version number in the name, so that users can decide for themselves when to delete an older kernel. But this means the name of the package varies and doesn't match the repo name, so automatic links may not be possible.

To illustrate this, say I have a linux machine named foo, and set up custom kernel builds for it. I would build and upload two packages:

  • linux-image-6.6.6-foo (version 6.6.6-1), a custom build of the 6.6.6 kernel for foo
  • linux-image-foo (version 6.6.6-1), an empty package which depends on linux-image-6.6.6-foo

This package naming convention matches the way distro packages work.

I'd configure foo to use gitea as an apt repo, and I'd apt install linux-image-foo to install the custom kernel. So far so good.

Then later on, I build a newer kernel version:

  • linux-image-6.6.7-foo (version 6.6.7-1), a custom build of the 6.6.7 kernel for foo
  • linux-image-foo (version 6.6.7-1), an empty package which depends on linux-image-6.6.7-foo

The new linux-image-foo package updates the previous one, but linux-image-6.6.7-foo appears in the gitea UI as a new package and is not linked to the gitea repo.

I do not believe it would be possible to automatically link packages in this case. So I would like a way for buildbots to set the link directly. Does an endpoint already exist to do this? I wasn't able to find one... but I suspect some endpoints may be missing from the swagger docs (see #30597).

This is largely cosmetic; the apt repo works fine, the only problem is navigation in the gitea UI.

Screenshots

No response

@Infinoid Infinoid added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Apr 19, 2024
@puni9869 puni9869 self-assigned this May 6, 2024
@vjm
Copy link

vjm commented Jun 22, 2024

Hi -- is there any news on this? I would also like to leverage this feature for automation in CI pipeline.

@KoltesDigital
Copy link

KoltesDigital commented Sep 17, 2024

Duplicate of #21062.

@lunny lunny closed this as completed Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/packages type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

6 participants