feat: add RPM repository setup script and documentation
This commit is contained in:
1 parent
ebabde3b50
commit
1dade7566c
2 files changed
+69
-1
No files matched your search
@@ -1 +1,47 @@
|
||||
Repository setup and metadata for the rpm organization.
|
||||
# RPM repository setup
|
||||
|
||||
Setup script and metadata for the [rpm organization](https://git.bjphoster.com/rpm) on BJPHoster Gitea.
|
||||
|
||||
## Quick setup
|
||||
|
||||
Run this one-liner on an RPM-based system with Bash, curl and DNF or YUM installed:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.bjphoster.com/rpm/.meta/raw/branch/main/install.sh | bash
|
||||
```
|
||||
|
||||
RHEL, Rocky Linux, AlmaLinux, CentOS Stream and Fedora use DNF or YUM. This repository is not an APT source and cannot be added to Debian or Ubuntu through APT.
|
||||
|
||||
The script:
|
||||
|
||||
1. Checks the effective UID. UID 0 runs directly; other users need sudo and are prompted for authentication when required. If sudo is missing, it exits with `manca sudo ed è necessario`.
|
||||
2. Selects DNF, or falls back to YUM. If neither exists, it exits without installing the repository.
|
||||
3. Downloads the Gitea-generated configuration from `https://git.bjphoster.com/api/packages/rpm/rpm.repo` to a temporary file. A failed download leaves the installed configuration untouched.
|
||||
4. Installs that configuration as `/etc/yum.repos.d/gitea-rpm.repo`, with mode 0644. Re-running replaces the same file.
|
||||
5. Refreshes metadata for `gitea-rpm` only. Other configured repositories are not refreshed by this command. If the refresh fails, the script returns an error and the installed repository file remains in place.
|
||||
|
||||
The downloaded configuration enables the repository, sets `gpgcheck=1`, and points to the Gitea registry's public signing key. The package manager may ask you to accept that key when installing a package. No packages are installed or upgraded by the setup script, and no config-manager plugin is needed.
|
||||
|
||||
## Install packages
|
||||
|
||||
After setup, install a published package with the native package manager:
|
||||
|
||||
```bash
|
||||
sudo dnf install skeptical-updater
|
||||
```
|
||||
|
||||
Use `yum` instead of `dnf` on systems that only provide YUM; omit `sudo` when running as root. Repository availability does not guarantee that every package supports every distribution or release: its dependencies must also be available on the target system.
|
||||
|
||||
Packages must be uploaded to the organization's RPM package registry. Git repositories and release attachments alone do not make a package available through DNF or YUM. Gitea generates the repository configuration, metadata and signing key endpoints; this repository does not maintain copies of those files.
|
||||
|
||||
## Remove the repository
|
||||
|
||||
```bash
|
||||
sudo rm /etc/yum.repos.d/gitea-rpm.repo
|
||||
```
|
||||
|
||||
This removes the repository configuration and leaves installed packages in place.
|
||||
|
||||
## License
|
||||
|
||||
MIT; see [LICENSE](LICENSE).
|
||||
Reference in new issue
Block a user