69e3af4331
Doing builddep once based on the baked config and then once more from the spec file can cause issues sometimes. For example, right now the latest rpm-ostree release uses libmodulemd1, but we want to rebase to libmodulemd (2.0). And `dnf` will get confused trying to move from one to the other. Really, we don't need to builddep from the last release at all, so just drop that and rely only on the spec file. Adapt `pkg_install_builddeps` to allow no args to mean only installing the basic buildroot stuff like `dnf builddep` and `@buildsys-build`.
48 lines
1.1 KiB
Bash
48 lines
1.1 KiB
Bash
#!/usr/bin/bash
|
|
|
|
pkg_upgrade() {
|
|
echo "Running dnf -y distro-sync... $(date)"
|
|
dnf -y distro-sync
|
|
echo "Done dnf -y distro-sync! $(date)"
|
|
}
|
|
|
|
make() {
|
|
/usr/bin/make -j $(getconf _NPROCESSORS_ONLN) "$@"
|
|
}
|
|
|
|
build() {
|
|
env NOCONFIGURE=1 ./autogen.sh
|
|
./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc "$@"
|
|
make V=1
|
|
}
|
|
|
|
pkg_install() {
|
|
echo "Running dnf -y install... $(date)"
|
|
dnf -y install "$@"
|
|
echo "Done running dnf -y install! $(date)"
|
|
}
|
|
|
|
pkg_builddep() {
|
|
echo "Running builddep... $(date)"
|
|
# This is sadly the only case where it's a different command
|
|
if test -x /usr/bin/dnf; then
|
|
dnf builddep -y "$@"
|
|
else
|
|
yum-builddep -y "$@"
|
|
fi
|
|
echo "Done running builddep! $(date)"
|
|
}
|
|
|
|
pkg_install_builddeps() {
|
|
pkg_install dnf-plugins-core 'dnf-command(builddep)'
|
|
# Base buildroot (but exclude fedora-release, conflicts with -container:
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1649921)
|
|
pkg_install @buildsys-build --excludepkg fedora-release
|
|
# builddeps+runtime deps
|
|
if [ $# -ne 0 ]; then
|
|
pkg_builddep "$@"
|
|
pkg_install "$@"
|
|
rpm -e "$@"
|
|
fi
|
|
}
|