Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

ericwq/rpms

Repository files navigation

Note: this project has been moved to codeberg.org.

for rpm pacakge user

currently, the repo is served by github pages. first you need to import public key to rpm DB.

rpm --import https://ericwq.codeberg.page/skarnet/RPM-GPG-KEY-wangqi

then add the new repo to dnf. you can check dnf repo list before and after.

dnf repolist
curl -s https://ericwq.codeberg.page/skarnet/skarnet.repo | tee /etc/yum.repos.d/skarnet.repo
dnf repolist

or you can use the following command to add new repo.

dnf config-manager --add-repo https://ericwq.codeberg.page/skarnet/skarnet.repo

enjoy the skarnet rpms!

rpms

This project contains rpm spec and instructions to build rpm packages for Fedora, Centos, Redhat. Now it contains rpm spec for: skalibs, execline, s6, s6-dns, s6-networking, s6-rc, tipidee.

With the help of fedora linux container, you can reproduce the rpm building process as you follow the instruction. The container is created according to RPM Packaging Guide.

The container contains:

  • the container is based on fedora:39.
  • packages gcc rpm-build rpm-devel rpmlint make python bash coreutils diffutils patch rpmdevtools.
  • packages sudo dnf-plugins-core tree git wget which ripgrep fzf pkgconfig.
  • packages mock mock-scm createrepo_c, refer to Building package using Mock.
  • packager user is created and added to sudo list.
  • PID 1 is /sbin/init.

requirement

To reproduce the buing process, you need git and docker on your local system.

prepare the container

Build the container first. Note: only one of the docker build is needed. The main difference is the former will use docker cache.

git clone https://github.com/ericwq/rpms.git
cd rpms
docker build -t rpm-builder:0.2.1 -f fedora.dockerfile .
docker build --no-cache --progress plain -t rpm-builder:0.2.1 -f fedora.dockerfile .

run the container

Run the container as packager user. Note: here I mount the local directory:/Users/qiwang/dev to the container's directory /home/packager/develop. This container also setup the timezone to shanghai,PRC. You can change it to mount your local directory and timezone.

start the container as daemon.

docker run --env TZ=Asia/Shanghai --tty --privileged --volume /sys/fs/cgroup:/sys/fs/cgroup:rw \
    --mount source=proj-vol,target=/home/packager/proj \
    --mount type=bind,source=/Users/qiwang/dev,target=/home/packager/develop \
    -h rpm-builder --name rpm-builder -d -p 80:80 \
    rpm-builder:0.2.1

login the container as packager or root.

docker exec -u packager -it rpm-builder bash
docker exec -u root -it rpm-builder bash

build rpm packages

Next, follow the instructions for individual project. Note, you must follow the following order (top -> down) to build indivial rpm packages, there are dependency rule.

hosting rpm packages via yum/dnf repo

follow the instructions in this document to build yum repo. Note I setup tipidee (web server) to serve yum/dnf repo for dnf.

import public key to rpm DB, check dnf repo list.

rpm --import https://ericwq.github.io/rpms/repo/RPM-GPG-KEY-wangqi
dnf repolist

add the new repo to dnf. run one of the following command.

sudo dnf config-manager --add-repo https://ericwq.github.io/rpms/repo/skarnet.repo
curl -s https://ericwq.github.io/rpms/repo/skarnet.repo | tee /etc/yum.repos.d/skarnet.repo

license

ISC

reference