mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2025-04-20 19:26:26 +02:00
more convenient build scripts for debian
This commit is contained in:
parent
d1681ffecb
commit
db8ea819cb
8
debian/create-packages.sh
vendored
8
debian/create-packages.sh
vendored
@ -108,6 +108,14 @@ for ARCH_L in "${!ARCHES_LR[@]}"; do
|
|||||||
# - some environment vars (ARCH_LINUX, ARCH_RUST, required by the debian packager)
|
# - some environment vars (ARCH_LINUX, ARCH_RUST, required by the debian packager)
|
||||||
sudo podman run --replace -d --tty --interactive -v ${SRCDIR}:/srcdir -v ${DOWNLOAD}:/download -e ARCH_LINUX=${ARCH_L} -e ARCH_RUST=${ARCH_R} --name fabinfra_deb_${ARCH_L} --platform linux/${ARCH_D} localhost/fabinfra/debianpackage_${ARCH_D}
|
sudo podman run --replace -d --tty --interactive -v ${SRCDIR}:/srcdir -v ${DOWNLOAD}:/download -e ARCH_LINUX=${ARCH_L} -e ARCH_RUST=${ARCH_R} --name fabinfra_deb_${ARCH_L} --platform linux/${ARCH_D} localhost/fabinfra/debianpackage_${ARCH_D}
|
||||||
|
|
||||||
|
#test the container
|
||||||
|
sudo podman exec -u 0 --tty --interactive fabinfra_deb_${ARCH_L} bash -c "echo"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo -e "Error creating or attaching to container 'fabinfra_deb_"${ARCH_L}"'. You might need to re-run 'install-requirements.sh'."
|
||||||
|
sudo podman logs fabinfra_deb_${ARCH_L}
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# now attach to that container and start building the packages
|
# now attach to that container and start building the packages
|
||||||
#sudo podman exec -u 0 --tty --interactive fabinfra_deb_${ARCH_L} bash
|
#sudo podman exec -u 0 --tty --interactive fabinfra_deb_${ARCH_L} bash
|
||||||
sudo podman exec -u 0 --tty --interactive fabinfra_deb_${ARCH_L} bash -c "
|
sudo podman exec -u 0 --tty --interactive fabinfra_deb_${ARCH_L} bash -c "
|
||||||
|
26
debian/install-requirements.sh
vendored
26
debian/install-requirements.sh
vendored
@ -12,22 +12,24 @@ sudo systemctl daemon-reload
|
|||||||
# Please note: we need to install these images as root user!
|
# Please note: we need to install these images as root user!
|
||||||
pack="fabinfra/debianpackage"
|
pack="fabinfra/debianpackage"
|
||||||
|
|
||||||
arch="arm64/v8"
|
echo -e "\n\nThis script will (re)-create podman images for bffh builds. This may take a lot of time.\n\n"
|
||||||
|
read -p "Do you really want to continue? y/n?" -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
for arch in arm64/v8 arm/v7; do
|
||||||
|
sudo podman image rm localhost/${pack}_${arch} --force
|
||||||
echo -e "\n+++++++++++++++++++++++++++++++++++++++++++"
|
echo -e "\n+++++++++++++++++++++++++++++++++++++++++++"
|
||||||
echo -e "creating local podman container registry $pack. This may take a while ..."
|
echo -e "creating local podman container registry for ${pack}_${arch}. This may take a while ..."
|
||||||
echo -e "+++++++++++++++++++++++++++++++++++++++++++\n"
|
echo -e "++++++++++++++++++++++++++++++++++++++++++\n"
|
||||||
sudo time podman build --platform=linux/${arch} -f Dockerfile -t ${pack}_${arch} #this should get ubuntu:noble
|
sudo time podman build --platform=linux/${arch} -f Dockerfile -t ${pack}_${arch} #this should get ubuntu:noble
|
||||||
|
if [ $? != 0 ]; then
|
||||||
arch="arm/v7"
|
echo -e "\nBuild did no finish. Probably you got an error like 'container process (missing dynamic library?)'. In this case a system restart should fix!"
|
||||||
echo -e "\n+++++++++++++++++++++++++++++++++++++++++++"
|
fi
|
||||||
echo -e "creating local podman container registry $pack. This may take a while ..."
|
done
|
||||||
echo -e "+++++++++++++++++++++++++++++++++++++++++++\n"
|
|
||||||
sudo time podman build --platform=linux/${arch} -f Dockerfile -t ${pack}_${arch} #this should get alpine:latest
|
|
||||||
|
|
||||||
echo -e "\n+++++++++++++++++++++++++++++++++++++++++++"
|
echo -e "\n+++++++++++++++++++++++++++++++++++++++++++"
|
||||||
echo "listing installed images ..."
|
echo "listing installed images ..."
|
||||||
echo -e "+++++++++++++++++++++++++++++++++++++++++++\n"
|
echo -e "+++++++++++++++++++++++++++++++++++++++++++\n"
|
||||||
sudo podman images | grep localhost/fabinfra/
|
|
||||||
|
|
||||||
# note: unrequired images can be removed again by:
|
PACK=${pack} sudo podman images | grep localhost/$PACK
|
||||||
# sudo su && podman image rm localhost/fabinfra/<name>
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user