mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 08:18:03 +02:00
contrib/fedora: Add mockbuild.sh
This script comes handy to build from git tree without having to install build dependencies on the system, the actual build happens inside mock environment. https://github.com/NetworkManager/NetworkManager/pull/34
This commit is contained in:
parent
1ee6dea02f
commit
fa61e78d80
2 changed files with 24 additions and 0 deletions
|
|
@ -21,3 +21,7 @@ sudo sh ./contrib/fedora/REQUIRED_PACKAGES
|
||||||
#
|
#
|
||||||
sudo dnf install ./contrib/fedora/rpm/latest/RPMS/x86_64/*rpm
|
sudo dnf install ./contrib/fedora/rpm/latest/RPMS/x86_64/*rpm
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# To generate a clean build from git using mock, run:
|
||||||
|
./contrib/fedora/rpm/mockbuild.sh
|
||||||
|
|
|
||||||
20
contrib/fedora/rpm/mockbuild.sh
Executable file
20
contrib/fedora/rpm/mockbuild.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# mockbuild.sh
|
||||||
|
#
|
||||||
|
# Generate SRPM from git tree and rebuild it using mock.
|
||||||
|
|
||||||
|
SCRIPTDIR="$(dirname "$(readlink -f "$0")")"
|
||||||
|
FEDORAVER=$(sed -E 's/.*([0-9]{2}).*/\1/g' /etc/fedora-release)
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
SRPM=${SCRIPTDIR}/latest/SRPMS/NetworkManager*.src.rpm
|
||||||
|
|
||||||
|
alias mock="mock -r fedora-${FEDORAVER}-${ARCH}"
|
||||||
|
|
||||||
|
# Generate SRPM
|
||||||
|
${SCRIPTDIR}/build_clean.sh --srpm --git
|
||||||
|
|
||||||
|
# Rebuild SRPM
|
||||||
|
mock --rebuild ${SRPM}
|
||||||
|
|
||||||
|
exit
|
||||||
Loading…
Add table
Reference in a new issue