mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-09 04:25:18 -05:00
Assign a distribution to yum #11039
Closed
opened 2025-11-02 09:25:48 -06:00 by GiteaMirror
·
10 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16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1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#11039
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ExplodingDragon on GitHub (Jun 16, 2023).
Feature Description
Sometimes we need to compile RPM packages for multiple distributions
(el7, el9, f34 ...)All packages are put together and sometimes a package does not work on a particular distribution, which may lead to incorrect installation of a package not compiled for that distribution.After uploading:
Screenshots
@KN4CK3R commented on GitHub (Jun 16, 2023):
How does YUM/DNF decide which file to download? Debian for example uses a different configuration for such parameters.
@nephatrine commented on GitHub (Jun 16, 2023):
Normally a repository would have different paths for different versions (el7, el8, etc.) and in the yum/dnf config you'd use the $releasever in the baseurl to select the right repo for you. For instance within https://download.docker.com/linux/centos/ you can see they have a separate directory for each release version. Each combination of release version and architecture is essentially its own standalone repository but you can just use one repo file with a line like this to address the correct one for your system:
baseurl=https://download.docker.com/linux/centos/$releasever/$basearch/stableThat
stableon the end is similar to the{component}configuration shown in the debian config you linked and it would be nice to support having multiple RPM package sets in a similar way to what gitea is already apparently doing for Debian.@nephatrine commented on GitHub (Jun 17, 2023):
I did some testing on my own using AlmaLinux 9 and dnf was smart enough to pick the right architecture binaries even if those are all mixed together in one repo - but it is very confused if you have packages for different distro versions in one repo. I think you just need to be able to provide a {distribution} and perhaps {component} in the same way as Debian and publish packages using a path like this:
https://gitea.example.com/api/packages/{owner}/rpm/{distribution}/{component}/uploadThe
.repofile downloaded could then would just have $releasever where {distribution} is likehttps://gitea.example.com/api/packages/{owner}/rpm/$releasever/{component}. Each of those URLs would have to be presented as its own repository root. I suppose each {component} would need its own .repo file as well or they'd all have to be listed as separate repositories in one master .repo file. It's not like debian where you can just list a bunch of "tags" after the url for various components unfortunately. I'm not sure how you'd want to handle that.I'm also not sure how you'd handle packages users have already uploaded in 1.20.0 using the current way it works so you would probably need to continue supporting distributionless componentless packages to not break those.
@ExplodingDragon commented on GitHub (Jun 18, 2023):
1.20.0 was not released stable, and including incompatible changes might not have much impact.
Or include an index of all RPM packages under the organization at the old address.
@delvh commented on GitHub (Jun 18, 2023):
Yes, but we are already in feature freeze for 1.20.
This means that we won't add new features (or breaking changes) for it anymore.
@KN4CK3R commented on GitHub (Jun 19, 2023):
I looked into the RPM tags and it looks like there is no way (?) to read the distribution from a RPM file. There are
RPMTAG_DISTTAGandRPMTAG_DISTRIBUTIONbut both were always empty in my tests. So thedistributionmust be specified when uploading a package. I don't currently know if we want to support acomponentlevel. Some use them, others don't. If we decide to support it, we basicaly force everyone to use it because otherwise the api routing gets painful. Since the users are free to choose whatever they like asdistributionandarchitecturewe can't provide helper variables like$releaseverand$basearchin the repo file because they may never match. A repo file with different "endpoints" looks nice but may therefore not usable and we would have to provide multiple repo files for every combination.If we decide to change the current "flat" logic I would just make it a breaking change. Reuploading existing packages with the correct
distributionshould not be as hard as supporting a "legacy" api.@nephatrine commented on GitHub (Jun 20, 2023):
I'm certainly not arguing we need "components" and agree that we can skip them if need be, I only mentioned them for the sake of debian parity. A way to specify distribution is the critical necessity. While every RPM repo I've seen in the wild does split it out by architecture as well, I'm not sure there is a genuine technical need for that since that information is stored in the RPM... but I've only done limited testing so there may be some instance where it is useful or even necessary.
This might be a stretch, but would it be possible to allow the user-provided "distribution" to include "/"? Then a user could specify the arch or even component with just that one token so you could have just "8" or "8/aarch64" or "8/aarch64/edge" etc. depending on the needs of the project? Or would that be too complex or open to abuse?
@ExplodingDragon commented on GitHub (Jun 22, 2023):
There is no need to be so complicated, YUM/DNF can recognize packages of different architectures under mixed repositories, even src.rpm .
Similar to
to make the distinction.
EDIT: The
distributionhere is provided by the user, e.g.centos-core,rocky-9-nonfree, and does not represent the final Linux distribution.@nephatrine commented on GitHub (Jun 22, 2023):
Yeah I suppose if the distribution is just arbitrary and not supposed to be a releasever, then that absolutely works. Does gitea handle src rpms? I must say I didn't even try that yet.
@ExplodingDragon commented on GitHub (Jul 5, 2023):
Any progress?
hybrid yum repository is simply not available for production environments.