Start Core Update 181 (with a kernel)

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2023-09-28 09:25:16 +00:00
parent 4322d0c727
commit db1ffe0f5f
54 changed files with 187 additions and 1 deletions

View File

@@ -1 +0,0 @@
../../../../common/aarch64/binutils

View File

@@ -1 +0,0 @@
../../../../common/aarch64/boost

View File

@@ -1 +0,0 @@
../../../../common/aarch64/gcc

View File

@@ -1 +0,0 @@
../../../../common/aarch64/glibc

View File

@@ -1 +0,0 @@
../../../../common/aarch64/util-linux

View File

@@ -1 +0,0 @@
../../../common/bind

View File

@@ -1 +0,0 @@
../../../common/dhcpcd

View File

@@ -1,12 +0,0 @@
etc/logrotate.conf
etc/rc.d/init.d/network
etc/rc.d/init.d/networking/any
etc/rc.d/init.d/networking/functions.network
etc/rc.d/init.d/networking/red
etc/rc.d/init.d/networking/red.up/99-pakfire-update
lib/udev/rules.d/61-extrahd.rules
opt/pakfire/lib/functions.pl
srv/web/ipfire/cgi-bin/extrahd.cgi
srv/web/ipfire/cgi-bin/index.cgi
var/ipfire/main/manualpages
var/ipfire/extrahd/bin/extrahd.pl

View File

@@ -1 +0,0 @@
../../../common/freetype

View File

@@ -1 +0,0 @@
../../../common/gzip

View File

@@ -1 +0,0 @@
../../../common/hwdata

View File

@@ -1 +0,0 @@
../../../common/iana-etc

View File

@@ -1 +0,0 @@
../../../common/json-c

View File

@@ -1 +0,0 @@
../../../common/krb5

View File

@@ -1 +0,0 @@
../../../common/libedit

View File

@@ -1 +0,0 @@
../../../common/libnl-3

View File

@@ -1 +0,0 @@
../../../common/libtiff

View File

@@ -1 +0,0 @@
../../../common/mpfr

View File

@@ -1 +0,0 @@
../../../common/openssh

View File

@@ -1 +0,0 @@
../../../common/ppp

View File

@@ -1 +0,0 @@
../../../common/procps

View File

@@ -1 +0,0 @@
../../../../common/riscv64/binutils

View File

@@ -1 +0,0 @@
../../../../common/riscv64/boost

View File

@@ -1 +0,0 @@
../../../../common/riscv64/gcc

View File

@@ -1 +0,0 @@
../../../../common/riscv64/glibc

View File

@@ -1 +0,0 @@
../../../../common/riscv64/util-linux

View File

@@ -1 +0,0 @@
../../../common/sqlite

View File

@@ -1 +0,0 @@
../../../common/squid

View File

@@ -1 +0,0 @@
../../../common/suricata

View File

@@ -1 +0,0 @@
../../../common/tcl

View File

@@ -1 +0,0 @@
../../../common/tzdata

View File

@@ -1 +0,0 @@
../../../common/udev

View File

@@ -1 +0,0 @@
../../../common/unbound

View File

@@ -1 +0,0 @@
../../../common/vnstat

View File

@@ -1 +0,0 @@
../../../common/wget

View File

@@ -1 +0,0 @@
../../../common/whois

View File

@@ -1 +0,0 @@
../../../common/wireless-regdb

View File

@@ -1 +0,0 @@
../../../../common/x86_64/binutils

View File

@@ -1 +0,0 @@
../../../../common/x86_64/boost

View File

@@ -1 +0,0 @@
../../../../common/x86_64/gcc

View File

@@ -1 +0,0 @@
../../../../common/x86_64/glibc

View File

@@ -1 +0,0 @@
../../../../common/x86_64/util-linux

View File

@@ -1 +0,0 @@
../../../common/zlib

View File

@@ -0,0 +1 @@
../../../common/aarch64/linux

View File

@@ -0,0 +1 @@
../../../common/riscv64/linux

View File

@@ -24,26 +24,71 @@
. /opt/pakfire/lib/functions.sh
/usr/local/bin/backupctrl exclude >/dev/null 2>&1
core=180
core=181
exit_with_error() {
# Set last succesfull installed core.
echo $(($core-1)) > /opt/pakfire/db/core/mine
# force fsck at next boot, this may fix free space on xfs
touch /forcefsck
# don't start pakfire again at error
killall -KILL pak_update
/usr/bin/logger -p syslog.emerg -t ipfire \
"core-update-${core}: $1"
exit $2
}
# Remove old core updates from pakfire cache to save space...
for (( i=1; i<=$core; i++ )); do
rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
done
# Create missing '/etc/monit.d'-directory (Bug #13246)
if [ -f /usr/bin/monit ]; then
mkdir -p /etc/monit.d
# Stop services
KVER="xxxKVERxxx"
# Backup uEnv.txt if exist
if [ -e /boot/uEnv.txt ]; then
cp -vf /boot/uEnv.txt /boot/uEnv.txt.org
fi
# Stop services
# Do some sanity checks prior to the kernel update
case $(uname -r) in
*-ipfire*)
# Ok.
;;
*)
exit_with_error "ERROR cannot update. No IPFire Kernel." 1
;;
esac
# Check diskspace on root
ROOTSPACE=$( df / -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1 )
if [ $ROOTSPACE -lt 100000 ]; then
exit_with_error "ERROR cannot update because not enough free space on root." 2
exit 2
fi
# Remove the old kernel
rm -rvf \
/boot/System.map-* \
/boot/config-* \
/boot/ipfirerd-* \
/boot/initramfs-* \
/boot/vmlinuz-* \
/boot/uImage-* \
/boot/zImage-* \
/boot/uInit-* \
/boot/dtb-* \
/lib/modules
# Extract files
extract_files
# Remove files
rm -rfv \
/usr/lib/libboost*.so.1.81.0
#rm -rvf \
# update linker config
ldconfig
@@ -55,18 +100,33 @@ ldconfig
/usr/local/bin/filesystem-cleanup
# Start services
telinit u
/etc/rc.d/init.d/sshd restart
/etc/rc.d/init.d/vnstat restart
/etc/rc.d/init.d/unbound restart
if [ -f /var/ipfire/proxy/enable ]; then
/etc/init.d/squid restart
# Rebuild initial ramdisks
dracut --regenerate-all --force
KVER="xxxKVERxxx"
case "$(uname -m)" in
aarch64)
mkimage -A arm64 -T ramdisk -C lzma -d /boot/initramfs-${KVER}-ipfire.img /boot/uInit-${KVER}-ipfire
# dont remove initramfs because grub need this to boot.
;;
esac
# remove lm_sensor config after collectd was started
# to re-search sensors at next boot with updated kernel
rm -f /etc/sysconfig/lm_sensors
# Upadate Kernel version in uEnv.txt
if [ -e /boot/uEnv.txt ]; then
sed -i -e "s/KVER=.*/KVER=${KVER}/g" /boot/uEnv.txt
fi
# Call user update script (needed for some ARM boards)
if [ -e /boot/pakfire-kernel-update ]; then
/boot/pakfire-kernel-update ${KVER}
fi
/etc/rc.d/init.d/udev restart
/etc/rc.d/init.d/suricata restart
# This update needs a reboot...
#touch /var/run/need_reboot
touch /var/run/need_reboot
# Finish
/etc/init.d/fireinfo start

View File

@@ -0,0 +1 @@
../../../common/x86_64/linux