Standardize download commands across all build scripts: - HashiCorp packages: wget -O → curl -o - VictoriaMetrics packages: wget -O → curl -o - Other packages: wget -O → curl -o, wget → curl -O - Update dependency lists to use curl instead of wget This change provides consistency across all packages and uses a single download tool.
53 lines
1.5 KiB
Bash
Executable File
53 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
# Install build dependencies
|
|
dnf install -y \
|
|
unzip \
|
|
libtool \
|
|
autoconf \
|
|
automake \
|
|
gcc \
|
|
make \
|
|
git \
|
|
go \
|
|
cowsql-devel \
|
|
libacl-devel \
|
|
libcap-devel \
|
|
libseccomp-devel \
|
|
libuv-devel \
|
|
raft-devel \
|
|
libudev-devel \
|
|
lxc-devel \
|
|
libsqlite3x-devel \
|
|
sqlite-devel \
|
|
systemd-rpm-macros \
|
|
bash-completion \
|
|
gettext \
|
|
help2man \
|
|
curl
|
|
|
|
# Download and extract incus source
|
|
curl -o /app/incus.tar.gz https://github.com/lxc/incus/archive/refs/tags/v${PACKAGE_VERSION}.tar.gz
|
|
tar -C /app -xf incus.tar.gz
|
|
|
|
# Install specific Go version
|
|
curl -O https://go.dev/dl/go1.24.1.linux-amd64.tar.gz
|
|
rm -rf /usr/local/go
|
|
tar -C /usr/local -xzf go1.24.1.linux-amd64.tar.gz
|
|
|
|
# Set up Go environment and build incus
|
|
export PATH=/usr/local/go/bin:$PATH
|
|
pushd /app/incus-${PACKAGE_VERSION}
|
|
make deps
|
|
export CGO_CFLAGS="-I/root/go/deps/raft/include/ -I/root/go/deps/cowsql/include/"
|
|
export CGO_LDFLAGS="-L/root/go/deps/raft/.libs -L/root/go/deps/cowsql/.libs/"
|
|
export LD_LIBRARY_PATH="/root/go/deps/raft/.libs/:/root/go/deps/cowsql/.libs/"
|
|
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
|
|
make build
|
|
popd
|
|
|
|
# Build the RPMs
|
|
nfpm pkg --config /app/resources/nfpm_incus.yaml --target /app/dist --packager rpm
|
|
nfpm pkg --config /app/resources/nfpm_incus-client.yaml --target /app/dist --packager rpm
|
|
nfpm pkg --config /app/resources/nfpm_incus-tools.yaml --target /app/dist --packager rpm
|