2024-07-31 16:34:27 +02:00
|
|
|
#! /bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Give correct perms to Apt version checker
|
|
|
|
chmod 755 ./ppp
|
|
|
|
|
|
|
|
# Get Intel pool
|
|
|
|
mkdir -p ./output-temp
|
|
|
|
cd ./output-temp
|
|
|
|
|
2024-07-31 21:41:30 +02:00
|
|
|
../ppp https://ppa.pika-os.com/dists/pika/pigeon/binary-amd64/Packages https://repositories.intel.com/gpu/ubuntu/dists/noble/unified/binary-amd64/Packages https://repositories.intel.com/gpu/ubuntu/ ./
|
2024-07-31 16:34:27 +02:00
|
|
|
|
|
|
|
# Delete Unwanted Packages or failure points with ppp
|
|
|
|
rm -rfv ./intel-i915-dkms_*.deb
|
|
|
|
rm -rfv ./libdrm*.deb
|
|
|
|
rm -rfv ./*va*.deb
|
|
|
|
rm -rfv ./*mesa*.deb
|
|
|
|
rm -rfv ./intel-gsc*.deb
|
|
|
|
rm -rfv ./libmetee*.deb
|
|
|
|
|
|
|
|
# Check if any updates have been downloaded
|
|
|
|
if [ $(ls ./ | wc -l) -lt 1 ]; then
|
|
|
|
echo "Repos are synced"
|
2024-07-31 18:01:49 +02:00
|
|
|
exit 0
|
2024-07-31 16:34:27 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Use apt to download weird packages that fail with ppp
|
|
|
|
wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg
|
|
|
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu noble unified" | tee /etc/apt/sources.list.d/intel-gpu-noble.list
|
|
|
|
apt update
|
2024-07-31 17:10:23 +02:00
|
|
|
apt download -y intel-gsc intel-gsc-dev libmetee-dev libmetee intel-gpu-mesa3d intel-gpu-mesa3d-dev
|
2024-07-31 16:34:27 +02:00
|
|
|
|
|
|
|
# Patch Downloaded Packages control files
|
2024-07-31 17:52:16 +02:00
|
|
|
PACKAGE_VER_APPEND=$(apt show intel-level-zero-gpu 2>&1 | grep -v "does not have a stable" | grep Version: | head -n1 | cut -f2 -d":" | tr -d ' ')
|
|
|
|
|
2024-07-31 16:34:27 +02:00
|
|
|
for i in ./*.deb
|
|
|
|
do
|
|
|
|
mkdir $i-tmp
|
|
|
|
dpkg-deb -R $i $i-tmp
|
2024-07-31 21:27:06 +02:00
|
|
|
sed "s#-$(echo $PACKAGE_VER_APPEND | cut -d '-' -f2-)##g" -i $i-tmp/DEBIAN/control
|
2024-07-31 16:34:27 +02:00
|
|
|
cat $i-tmp/DEBIAN/control | grep Version: | head -n1 | cut -d":" -f2- | tr -d ' ' > $i-version
|
2024-07-31 21:41:30 +02:00
|
|
|
sed -i "s#$(cat $i-version)#$(cat $i-version)+pigeon$(date +"%Y%m%d")#g" $i-tmp/DEBIAN/control
|
2024-07-31 16:34:27 +02:00
|
|
|
sed -e s"#(=#(>=#"g -i $i-tmp/DEBIAN/control
|
2024-07-31 21:41:30 +02:00
|
|
|
dpkg-deb -b $i-tmp $i+pigeon$(date +"%Y%m%d")-fixed.deb
|
2024-07-31 16:34:27 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
cd ../
|
|
|
|
|
|
|
|
# Move patched packages to output
|
|
|
|
mkdir -p ./output/
|
|
|
|
mv -v ./output-temp/*-fixed.deb ./output/
|
|
|
|
|
|
|
|
# send debs to server
|
2024-07-31 17:10:23 +02:00
|
|
|
rsync -azP --include './' --include '*.deb' --exclude '*' ./output/ ferreo@direct.pika-os.com:/srv/www/pigeon-incoming/
|
2024-07-31 16:34:27 +02:00
|
|
|
|