Information for Fedora Package Creation
Author: Markus Rathgeb
Explicit compilation for Fedora version and architecture:
fedpkg --release f38 mockbuild --mock-config fedora-38-x86_64
Inform about image
podman search fedora
skopeo inspect docker://registry.fedoraproject.org/fedora
Setup container
podman container run \
-it \
--name=fedora-38-rpmdev-mediaelch \
--mount type=bind,src=/home,target=/home \
fedora:38
Restart container
podman container start -ai fedora-38-rpmdev-mediaelch
Installing Packager Tools
dnf install fedora-packager fedora-review
Install build requirements
dnf install $(cat MediaElch.spec | grep ^BuildRequires | cut -d\: -f2-)
Download sources
spectool -g MediaElch.spec
Build locally
fedpkg --release f38 local
Check RPM lint
fedpkg --release f38 lint
User container
(
uid=$(id -u)
gid=$(id -g)
podman container run \
--user $uid:$gid \
--userns keep-id:uid=$uid,gid=$gid \
-it \
--name=fedora-38-rpmdev-mediaelch \
--mount type=bind,src=/home,target=/home \
fedora:38
)
Assume
Downloading source
spectool -g *.spec
Cross package creation
fedpkg --release f38 mockbuild --mock-config fedora-38-aarch64
#!/bin/bash
for DIR in qrtr pd-mapper qbootctl #rmtfs tqftpserv
do
pushd "${DIR}"
spectool -g *.spec
fedpkg --release f38 mockbuild --mock-config ./fedora-38-aarch64-specific.cfg
popd
done
cat qrtr/fedora-38-aarch64-specific.cfg
include('fedora-38-aarch64.cfg')
config_opts['createrepo_on_rpms'] = True
cat pd-mapper/fedora-38-aarch64-specific.cfg
include('fedora-38-aarch64.cfg')
config_opts['createrepo_on_rpms'] = True
#config_opts['nspawn_args'] = config_opts['nspawn_args'] + ['--bind-ro=/home/maggu2810/workspace/projects/linux-mobile/op6/fedora-container/rpms/qrtr/results_qrtr/1.0/1.fc38:/repo/qrtr']
config_opts['nspawn_args'] = config_opts['nspawn_args'] + ['--bind-ro=../qrtr/results_qrtr/1.0/1.fc38:/repo/qrtr']
config_opts['dnf.conf'] = config_opts['dnf.conf'] + """
[qrtr]
name=qrtr
gpgcheck=0
enabled=1
baseurl=file:///repo/qrtr
skip_if_unavailable=False
"""