This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 3543c24f41027c6e4437b8d1b3d3ca75d47ed3c9 (commit) via 5cc18f9c12bc4aaec6075af1a20c5f8ef0347bf4 (commit) via 2be67e384101f152b37b4bfc6dc1927414021d66 (commit) via e360a9cb136ba5d79bc89f20b48c4e6b360b3502 (commit) via 074b509724e1ffa334db275e594eeaebcca80164 (commit) via 2b921b796dd629a1fdee74cc8fd405e056e2b2a8 (commit) via 5e1dbc95f727d6f65b1ef55d139347945dd7774c (commit) via c6d055a85b79cd276928cd1c7da39e52b7ae9beb (commit) via 4bac9fdd12a7518815a5d1333ce124e739e1fbf4 (commit) via 2b25c029326c6651026499688a8ac283d2e2b63a (commit) via 0bd5b131956c2ceddf6954cf9bddb5321f58fb07 (commit) via f201005f460cec3cde06623556bd067d820071c5 (commit) via b3d408d8c8d016d6e8ca247b7e089b7ebbd81cfc (commit) via 5591a68c0580280432a52b7c22c308bf7867018c (commit) via 37895e21bf87885a012e9a196e59d6fa04b76740 (commit) via 533cfb1b7752aacf6fa735511b8c580dacb4feee (commit) via e404dab5e42db7fa47695e1b4a50365e18be0e10 (commit) from 14909d5fe9371231437b9b85a35adf4ae5e006f1 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 3543c24f41027c6e4437b8d1b3d3ca75d47ed3c9 Author: Peter Müller peter.mueller@ipfire.org Date: Thu Jul 28 13:48:17 2022 +0000
Core Update 170: Ship Pakfire changes
Signed-off-by: Peter Müller peter.mueller@ipfire.org
commit 5cc18f9c12bc4aaec6075af1a20c5f8ef0347bf4 Author: Robin Roevens robin.roevens@disroot.org Date: Thu Jul 28 13:21:36 2022 +0200
pakfire: Replace getmetadata duplicate code
- Use getmetadata function in services.cgi to determine installed addon services to display. Removing code duplication and intel that should only be known by pakfire itself. - Removed hardcoded exclusions: - squid should show up correctly using the new metadata info - mdadm is part of core and will never show up here - alsa, unknown if this problem still exists, but if it is, this should be handled somewhere else.
Signed-off-by: Robin Roevens robin.roevens@disroot.org
commit 2be67e384101f152b37b4bfc6dc1927414021d66 Author: Robin Roevens robin.roevens@disroot.org Date: Thu Jul 28 13:21:35 2022 +0200
pakfire: Add getmetadata function
- Added new getmetadata function for easy access to all available metadata of a pak without knowledge about or need to parse pakfire internal db files. - Added new 'pakfire info' functionality for displaying all available metadata of (a) pak(s) to the user, using the new getmetadata.
Signed-off-by: Robin Roevens robin.roevens@disroot.org
commit e360a9cb136ba5d79bc89f20b48c4e6b360b3502 Author: Robin Roevens robin.roevens@disroot.org Date: Thu Jul 28 13:21:34 2022 +0200
pakfire: Replace status duplicate code
- Make use of renewed status function in pakfire.cgi removing duplicate code
Signed-off-by: Robin Roevens robin.roevens@disroot.org
commit 074b509724e1ffa334db275e594eeaebcca80164 Author: Robin Roevens robin.roevens@disroot.org Date: Thu Jul 28 13:21:33 2022 +0200
pakfire: Refactor status seperating UI and logic
- Removed UI code from status function now returning hash with status properties. - Removed function coreupdate_available as it is now not used anymore - Added UI code to pakfire status routine - Added meaningfull exitcode to status: - 2: Core update available - 3: Pak update available - 4: Reboot required - Error codes can be added together: 2+3 = 5 means both core update and pak update is available
Signed-off-by: Robin Roevens robin.roevens@disroot.org
commit 2b921b796dd629a1fdee74cc8fd405e056e2b2a8 Author: Robin Roevens robin.roevens@disroot.org Date: Thu Jul 28 13:21:32 2022 +0200
pakfire: Add list upgrade functionality
- Added possibility to list available upgrades from commandline using 'pakfire list upgrade'. - Added exitcode to 'pakfire list' - Moved 'Pakfire has finished' log message inside END block to always log when pakfire exited. - Fix: allow [options] between 'list' and [installed/notinstalled/ upgrade] parameters (Partly fixes Bug #12868)
Signed-off-by: Robin Roevens robin.roevens@disroot.org
commit 5e1dbc95f727d6f65b1ef55d139347945dd7774c Author: Robin Roevens robin.roevens@disroot.org Date: Thu Jul 28 13:21:31 2022 +0200
pakfire: Optimize upgradecore function
upgradecore function should just upgrade the core: Moved check if upgrade is necessary to pakfire upgrade code, removing code from upgradecore function duplicating codedbinfo workings. Also adding more vebosity to pakfire upgrade.
Signed-off-by: Robin Roevens robin.roevens@disroot.org
commit c6d055a85b79cd276928cd1c7da39e52b7ae9beb Author: Robin Roevens robin.roevens@disroot.org Date: Thu Jul 28 13:21:30 2022 +0200
pakfire: Replace dbgetlist duplicate code
Replace dbgetlist code duplicating dblist and getmetafile workings with call to actual dblist and getmetafile functions.
Signed-off-by: Robin Roevens robin.roevens@disroot.org
commit 4bac9fdd12a7518815a5d1333ce124e739e1fbf4 Author: Robin Roevens robin.roevens@disroot.org Date: Thu Jul 28 13:21:29 2022 +0200
pakfire: Replace duplicate code with dblist functioncall
Replace pakfire install code duplicating dblist working with call to actual dblist function.
Signed-off-by: Robin Roevens robin.roevens@disroot.org
commit 2b25c029326c6651026499688a8ac283d2e2b63a Author: Robin Roevens robin.roevens@disroot.org Date: Thu Jul 28 13:21:28 2022 +0200
pakfire: Translate WUI header/footer text
Add en/nl/fr/de translations for: - Traffic: In XXX bit/s Out XXX bit/s - IPFire X.XX (xxx) - Core Update XXX ...
Signed-off-by: Robin Roevens robin.roevens@disroot.org
commit 0bd5b131956c2ceddf6954cf9bddb5321f58fb07 Author: Robin Roevens robin.roevens@disroot.org Date: Thu Jul 28 13:21:27 2022 +0200
pakfire: Refactor dblist seperating UI and logic
- Removed UI code from dblist function and refactor it making it return a hash representing the pak db for easier handling of this data. - Moved core update check in dblist to new seperate dbcoreinfo function making it return a hash with current and possibly available core version info. - Update existing calls to dblist - Bring UI parts previously in dblist to pakfire program itself, pakfire.cgi and index.cgi with a few small enhancements: - Translations for 'Core-Update', 'Release', 'Update' and 'Version' - Add currently installed version numbers to installed paks list in pakfire.cgi - Add 'Installed: yes/no' to pakfire list output so people not using colors have this information too. (Partly fixes Bug #12868) - Add update available details to pakfire list output if package has updates available.
Signed-off-by: Robin Roevens robin.roevens@disroot.org
commit f201005f460cec3cde06623556bd067d820071c5 Author: Peter Müller peter.mueller@ipfire.org Date: Thu Jul 28 13:42:48 2022 +0000
Core Update 170: Stop Suricata before extracting files
Stopping services before potentially tampering with files they use is a more sane approach than doing the latter and hope the running service can cope with it. Suricata, at least, reportedly doesn't.
Signed-off-by: Peter Müller peter.mueller@ipfire.org
commit b3d408d8c8d016d6e8ca247b7e089b7ebbd81cfc Author: Peter Müller peter.mueller@ipfire.org Date: Thu Jul 28 13:41:12 2022 +0000
Core Update 170: Ship kernel and regenerate initial ramdisks locally
Per https://lists.ipfire.org/pipermail/development/2022-July/013889.html, we ship the updated kernel in Core Update 170, but generate the initial ramdisks locally to save space.
Signed-off-by: Peter Müller peter.mueller@ipfire.org
commit 5591a68c0580280432a52b7c22c308bf7867018c Author: Peter Müller peter.mueller@ipfire.org Date: Mon Jul 11 14:48:08 2022 +0000
linux: Enable Intel DMA Remapping Devices by default on x86_64
If available, the kernel will enable IOMMU (a/k/a DMA remapping) by default on boot. To tools making use of that, particularly hypervisors, this provides better security without any downsides.
Signed-off-by: Peter Müller peter.mueller@ipfire.org
commit 37895e21bf87885a012e9a196e59d6fa04b76740 Author: Peter Müller peter.mueller@ipfire.org Date: Thu Jul 28 13:24:56 2022 +0000
linux: Update to 5.15.57
Please refer to https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.57 for the changelog of this version. Since it introduces architecture-dependent rootfile changes due to CPU side-channel mitigations, changes to ARM rootfiles have been omitted due to the lack of hardware.
Supposed hardening changes will be submitted separately.
Signed-off-by: Peter Müller peter.mueller@ipfire.org
commit 533cfb1b7752aacf6fa735511b8c580dacb4feee Author: Peter Müller peter.mueller@ipfire.org Date: Wed Jul 13 19:46:38 2022 +0000
Core Update 170: Harden mount options of /boot on existing installations
The second version of this patch uses @ instead of / for sed delimiters, which makes the command less hard to read. Since Core Update 170 already requires a reboot at this point, the respective directive is omitted.
Signed-off-by: Peter Müller peter.mueller@ipfire.org
commit e404dab5e42db7fa47695e1b4a50365e18be0e10 Author: Peter Müller peter.mueller@ipfire.org Date: Thu Jul 28 13:28:42 2022 +0000
installer: Harden mount options of /boot partition
Signed-off-by: Peter Müller peter.mueller@ipfire.org
-----------------------------------------------------------------------
Summary of changes: config/kernel/kernel.config.x86_64-ipfire | 2 +- config/rootfiles/common/x86_64/linux | 10 +- .../124 => core/170}/filelists/aarch64/linux | 0 .../159 => core/170}/filelists/armv6l/linux | 0 config/rootfiles/core/170/filelists/files | 4 + .../100 => core/170}/filelists/x86_64/linux | 0 config/rootfiles/core/170/update.sh | 83 ++++- html/cgi-bin/index.cgi | 6 +- html/cgi-bin/pakfire.cgi | 49 +-- html/cgi-bin/services.cgi | 74 +++-- html/html/themes/ipfire/include/functions.pl | 8 +- langs/de/cgi-bin/de.pl | 7 + langs/en/cgi-bin/en.pl | 7 + langs/fr/cgi-bin/fr.pl | 7 + langs/nl/cgi-bin/nl.pl | 7 + lfs/linux | 4 +- src/installer/hw.c | 4 +- src/pakfire/lib/functions.pl | 335 ++++++++++++--------- src/pakfire/pakfire | 248 ++++++++++++--- 19 files changed, 588 insertions(+), 267 deletions(-) copy config/rootfiles/{oldcore/124 => core/170}/filelists/aarch64/linux (100%) copy config/rootfiles/{oldcore/159 => core/170}/filelists/armv6l/linux (100%) copy config/rootfiles/{oldcore/100 => core/170}/filelists/x86_64/linux (100%)
Difference in files: diff --git a/config/kernel/kernel.config.x86_64-ipfire b/config/kernel/kernel.config.x86_64-ipfire index 06d98e325..a5c5a4e29 100644 --- a/config/kernel/kernel.config.x86_64-ipfire +++ b/config/kernel/kernel.config.x86_64-ipfire @@ -6488,7 +6488,7 @@ CONFIG_AMD_IOMMU_V2=y CONFIG_DMAR_TABLE=y CONFIG_INTEL_IOMMU=y CONFIG_INTEL_IOMMU_SVM=y -# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set +CONFIG_INTEL_IOMMU_DEFAULT_ON=y CONFIG_INTEL_IOMMU_FLOPPY_WA=y # CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set CONFIG_IRQ_REMAP=y diff --git a/config/rootfiles/common/x86_64/linux b/config/rootfiles/common/x86_64/linux index 326bc6c6e..b25f85a3a 100644 --- a/config/rootfiles/common/x86_64/linux +++ b/config/rootfiles/common/x86_64/linux @@ -6785,6 +6785,7 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER-ipfire/build/include/config/CC_HAS_INT128 #lib/modules/KVER-ipfire/build/include/config/CC_HAS_KASAN_GENERIC #lib/modules/KVER-ipfire/build/include/config/CC_HAS_NO_PROFILE_FN_ATTR +#lib/modules/KVER-ipfire/build/include/config/CC_HAS_RETURN_THUNK #lib/modules/KVER-ipfire/build/include/config/CC_HAS_SANCOV_TRACE_PC #lib/modules/KVER-ipfire/build/include/config/CC_HAS_SANE_STACKPROTECTOR #lib/modules/KVER-ipfire/build/include/config/CC_HAS_SLS @@ -6877,6 +6878,8 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER-ipfire/build/include/config/CPU_FREQ_GOV_SCHEDUTIL #lib/modules/KVER-ipfire/build/include/config/CPU_FREQ_GOV_USERSPACE #lib/modules/KVER-ipfire/build/include/config/CPU_FREQ_STAT +#lib/modules/KVER-ipfire/build/include/config/CPU_IBPB_ENTRY +#lib/modules/KVER-ipfire/build/include/config/CPU_IBRS_ENTRY #lib/modules/KVER-ipfire/build/include/config/CPU_IDLE #lib/modules/KVER-ipfire/build/include/config/CPU_IDLE_GOV_HALTPOLL #lib/modules/KVER-ipfire/build/include/config/CPU_IDLE_GOV_LADDER @@ -6889,6 +6892,7 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER-ipfire/build/include/config/CPU_SUP_HYGON #lib/modules/KVER-ipfire/build/include/config/CPU_SUP_INTEL #lib/modules/KVER-ipfire/build/include/config/CPU_SUP_ZHAOXIN +#lib/modules/KVER-ipfire/build/include/config/CPU_UNRET_ENTRY #lib/modules/KVER-ipfire/build/include/config/CRASH_DUMP #lib/modules/KVER-ipfire/build/include/config/CRC16 #lib/modules/KVER-ipfire/build/include/config/CRC32 @@ -8071,6 +8075,7 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER-ipfire/build/include/config/INTEL_INT0002_VGPIO #lib/modules/KVER-ipfire/build/include/config/INTEL_IOATDMA #lib/modules/KVER-ipfire/build/include/config/INTEL_IOMMU +#lib/modules/KVER-ipfire/build/include/config/INTEL_IOMMU_DEFAULT_ON #lib/modules/KVER-ipfire/build/include/config/INTEL_IOMMU_FLOPPY_WA #lib/modules/KVER-ipfire/build/include/config/INTEL_IOMMU_SVM #lib/modules/KVER-ipfire/build/include/config/INTEL_IPS @@ -9088,7 +9093,6 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER-ipfire/build/include/config/NFSD_V4_SECURITY_LABEL #lib/modules/KVER-ipfire/build/include/config/NFS_ACL_SUPPORT #lib/modules/KVER-ipfire/build/include/config/NFS_COMMON -#lib/modules/KVER-ipfire/build/include/config/NFS_DEBUG #lib/modules/KVER-ipfire/build/include/config/NFS_DISABLE_UDP_SUPPORT #lib/modules/KVER-ipfire/build/include/config/NFS_FS #lib/modules/KVER-ipfire/build/include/config/NFS_FSCACHE @@ -9586,6 +9590,7 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER-ipfire/build/include/config/RELOCATABLE #lib/modules/KVER-ipfire/build/include/config/RENESAS_PHY #lib/modules/KVER-ipfire/build/include/config/RESET_CONTROLLER +#lib/modules/KVER-ipfire/build/include/config/RETHUNK #lib/modules/KVER-ipfire/build/include/config/RETPOLINE #lib/modules/KVER-ipfire/build/include/config/RETU_WATCHDOG #lib/modules/KVER-ipfire/build/include/config/RFKILL @@ -10333,6 +10338,7 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER-ipfire/build/include/config/SPARSEMEM_VMEMMAP #lib/modules/KVER-ipfire/build/include/config/SPARSEMEM_VMEMMAP_ENABLE #lib/modules/KVER-ipfire/build/include/config/SPARSE_IRQ +#lib/modules/KVER-ipfire/build/include/config/SPECULATION_MITIGATIONS #lib/modules/KVER-ipfire/build/include/config/SPLIT_PTLOCK_CPUS #lib/modules/KVER-ipfire/build/include/config/SPMI #lib/modules/KVER-ipfire/build/include/config/SRCU @@ -10374,7 +10380,6 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER-ipfire/build/include/config/SUNGEM_PHY #lib/modules/KVER-ipfire/build/include/config/SUNRPC #lib/modules/KVER-ipfire/build/include/config/SUNRPC_BACKCHANNEL -#lib/modules/KVER-ipfire/build/include/config/SUNRPC_DEBUG #lib/modules/KVER-ipfire/build/include/config/SUNRPC_GSS #lib/modules/KVER-ipfire/build/include/config/SURFACE_HOTPLUG #lib/modules/KVER-ipfire/build/include/config/SURFACE_PLATFORMS @@ -13460,6 +13465,7 @@ etc/modprobe.d/ipv6.conf #lib/modules/KVER-ipfire/build/include/linux/mmu_context.h #lib/modules/KVER-ipfire/build/include/linux/mmu_notifier.h #lib/modules/KVER-ipfire/build/include/linux/mmzone.h +#lib/modules/KVER-ipfire/build/include/linux/mnt_idmapping.h #lib/modules/KVER-ipfire/build/include/linux/mnt_namespace.h #lib/modules/KVER-ipfire/build/include/linux/mod_devicetable.h #lib/modules/KVER-ipfire/build/include/linux/mod_devicetable.h.orig diff --git a/config/rootfiles/core/170/filelists/aarch64/linux b/config/rootfiles/core/170/filelists/aarch64/linux new file mode 120000 index 000000000..3a2532bc7 --- /dev/null +++ b/config/rootfiles/core/170/filelists/aarch64/linux @@ -0,0 +1 @@ +../../../../common/aarch64/linux \ No newline at end of file diff --git a/config/rootfiles/core/170/filelists/armv6l/linux b/config/rootfiles/core/170/filelists/armv6l/linux new file mode 120000 index 000000000..aee1f4d73 --- /dev/null +++ b/config/rootfiles/core/170/filelists/armv6l/linux @@ -0,0 +1 @@ +../../../../common/armv6l/linux \ No newline at end of file diff --git a/config/rootfiles/core/170/filelists/files b/config/rootfiles/core/170/filelists/files index 0b4fa2dcc..458aba96f 100644 --- a/config/rootfiles/core/170/filelists/files +++ b/config/rootfiles/core/170/filelists/files @@ -1,12 +1,16 @@ etc/rc.d/init.d/firewall opt/pakfire/lib/functions.pl +opt/pakfire/pakfire srv/web/ipfire/cgi-bin/aliases.cgi +srv/web/ipfire/cgi-bin/index.cgi srv/web/ipfire/cgi-bin/ipblocklist.cgi +srv/web/ipfire/cgi-bin/pakfire.cgi srv/web/ipfire/cgi-bin/services.cgi srv/web/ipfire/cgi-bin/logs.cgi/ids.dat srv/web/ipfire/cgi-bin/logs.cgi/ipblocklists.dat srv/web/ipfire/cgi-bin/logs.cgi/log.dat srv/web/ipfire/cgi-bin/logs.cgi/showrequestfromblocklist.dat +srv/web/ipfire/html/themes/ipfire/include/functions.pl usr/lib/firewall/rules.pl usr/local/bin/setaliases usr/local/bin/update-ipblocklists diff --git a/config/rootfiles/core/170/filelists/x86_64/linux b/config/rootfiles/core/170/filelists/x86_64/linux new file mode 120000 index 000000000..0615b5b9a --- /dev/null +++ b/config/rootfiles/core/170/filelists/x86_64/linux @@ -0,0 +1 @@ +../../../../common/x86_64/linux \ No newline at end of file diff --git a/config/rootfiles/core/170/update.sh b/config/rootfiles/core/170/update.sh index 8dc99e5d8..cbac8572e 100644 --- a/config/rootfiles/core/170/update.sh +++ b/config/rootfiles/core/170/update.sh @@ -26,6 +26,18 @@
core=170
+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 @@ -33,6 +45,45 @@ done
# Stop services /etc/init.d/rc.d/unbound stop +/etc/init.d/rc.d/suricata stop + +KVER="xxxKVERxxx" + +# Backup uEnv.txt if exist +if [ -e /boot/uEnv.txt ]; then + cp -vf /boot/uEnv.txt /boot/uEnv.txt.org +fi + +# 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
# Remove files rm -rvf \ @@ -121,7 +172,23 @@ sed -i /etc/collectd.conf \
# Start services /etc/init.d/rc.d/unbound start -/etc/init.d/rc.d/suricata restart +/etc/init.d/rc.d/suricata start + +# Harden mount options of /boot +sed -e -i "s@[[:space:]]*/boot[[:space:]]*auto[[:space:]]*defaults[[:space:]]*@ /boot auto defaults,nodev,noexec,nosuid @g" /etc/fstab + +# Regenerate all initrds +dracut --regenerate-all --force +case "$(uname -m)" in + armv*) + mkimage -A arm -T ramdisk -C lzma -d /boot/initramfs-${KVER}-ipfire.img /boot/uInit-${KVER}-ipfire + rm /boot/initramfs-${KVER}-ipfire.img + ;; + 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
# This update needs a reboot... touch /var/run/need_reboot @@ -130,6 +197,20 @@ touch /var/run/need_reboot /etc/init.d/fireinfo start sendprofile
+# remove lm_sensor config after collectd was started +# to reserch 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 + # Update grub config to display new core version if [ -e /boot/grub/grub.cfg ]; then grub-mkconfig -o /boot/grub/grub.cfg diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index 18c26942e..6fecae1ff 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -604,7 +604,11 @@ if ($warnmessage) { &Header::closebox(); }
-&Pakfire::dblist("upgrade", "notice"); +my %coredb = &Pakfire::coredbinfo(); +if (defined $coredb{'AvailableRelease'}) { + print "<br /><br /><br /><a href='pakfire.cgi'>$Lang::tr{'core notice 1'} $coredb{'Release'} $Lang::tr{'core notice 2'} $coredb{'AvailableRelease'} $Lang::tr{'core notice 3'}</a>"; +} + if ( -e "/var/run/need_reboot" ) { print "<div style='text-align:center; color:red;'>"; print "<br/><br/>$Lang::tr{'needreboot'}!"; diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 3e8dc5460..42c603c61 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -43,6 +43,9 @@ my $PM_DEFAULT = 'default'; # Default user interface with command processing my $PM_LOGREAD = 'logread'; # Log messages viewer (ignores all commands) my $pagemode = $PM_DEFAULT;
+# Get Pakfire status +my %pakfire_status = &Pakfire::status(); + # Load general settings &General::readhash("${General::swroot}/main/settings", %mainsettings); &General::readhash("${General::swroot}/pakfire/settings", %pakfiresettings); @@ -84,7 +87,7 @@ if($cgiparams{'ACTION'} eq 'json-getstatus') { my %status = ( 'running' => &_is_pakfire_busy() || "0", 'running_since' => &General::age("$Pakfire::lockfile") || "0s", - 'reboot' => (-e "/var/run/need_reboot") || "0", + 'reboot' => ("$pakfire_status{'RebootRequired'}" eq "yes") || "0", 'failure' => $failure || "0" );
@@ -366,32 +369,26 @@ $selected{"TREE"}{"testing"} = ""; $selected{"TREE"}{"unstable"} = ""; $selected{"TREE"}{$pakfiresettings{"TREE"}} = "selected";
-my $core_release = `cat /opt/pakfire/db/core/mine 2>/dev/null`; -chomp($core_release); -my $core_update_age = &General::age("/opt/pakfire/db/core/mine"); -my $corelist_update_age = &General::age("/opt/pakfire/db/lists/core-list.db"); -my $server_update_age = &General::age("/opt/pakfire/db/lists/server-list.db"); -my $packages_update_age = &General::age("/opt/pakfire/db/lists/packages_list.db"); - &Header::openbox("100%", "center", "Pakfire");
print <<END; <table id="pfmain"> END -if ( -e "/var/run/need_reboot") { +if ("$pakfire_status{'RebootRequired'}" eq "yes") { print "\t\t<tr><td colspan='2'><a href='/cgi-bin/shutdown.cgi'>$Lang::tr{'needreboot'}!</a></td></tr>\n"; } + print <<END; <tr><td class="heading">$Lang::tr{'pakfire system state'}:</td> <td class="heading">$Lang::tr{'available updates'}:</td></tr>
- <tr><td><strong>$Lang::tr{'pakfire core update level'}: $core_release</strong> + <tr><td><strong>$Lang::tr{'pakfire core update level'}: $pakfire_status{'Release'}</strong> <hr> <div class="pflist"> - $Lang::tr{'pakfire last update'} $core_update_age $Lang::tr{'pakfire ago'}<br> - $Lang::tr{'pakfire last serverlist update'} $server_update_age $Lang::tr{'pakfire ago'}<br> - $Lang::tr{'pakfire last core list update'} $corelist_update_age $Lang::tr{'pakfire ago'}<br> - $Lang::tr{'pakfire last package update'} $packages_update_age $Lang::tr{'pakfire ago'} + $Lang::tr{'pakfire last update'} $pakfire_status{'LastUpdate'} $Lang::tr{'pakfire ago'}<br> + $Lang::tr{'pakfire last serverlist update'} $pakfire_status{'LastServerListUpdate'} $Lang::tr{'pakfire ago'}<br> + $Lang::tr{'pakfire last core list update'} $pakfire_status{'LastCoreListUpdate'} $Lang::tr{'pakfire ago'}<br> + $Lang::tr{'pakfire last package update'} $pakfire_status{'LastPakListUpdate'} $Lang::tr{'pakfire ago'} </div> <form method='post' action='$ENV{'SCRIPT_NAME'}'> <input type='hidden' name='ACTION' value='update' /> @@ -403,7 +400,17 @@ print <<END; <select name="UPDPAKS" class="pflist" size="5" disabled> END
- &Pakfire::dblist("upgrade", "forweb"); + if ("$pakfire_status{'CoreUpdateAvailable'}" eq "yes") { + print "<option value="core">$Lang::tr{'core update'} -- $pakfire_status{'CoreVersion'} -- $Lang::tr{'release'}: $pakfire_status{'Release'} -> $pakfire_status{'AvailableRelease'}</option>\n"; + } + + if ($pakfire_status{'PakUpdatesAvailable'} > 0) { + my %upgradelist = &Pakfire::dblist("upgrade"); + foreach my $pak (sort keys %upgradelist) { + print "<option value="$pak">$Lang::tr{'pak update'}: $pak -- $Lang::tr{'version'}: $upgradelist{$pak}{'ProgVersion'} -> $upgradelist{$pak}{'AvailableProgVersion'} -- $Lang::tr{'release'}: $upgradelist{$pak}{'Release'} -> $upgradelist{$pak}{'AvailableRelease'}</option>\n"; + } + } + print <<END; </select> <input type='hidden' name='ACTION' value='upgrade' /> @@ -419,7 +426,11 @@ END <select name="INSPAKS" class="pflist" size="10" multiple> END
- &Pakfire::dblist("notinstalled", "forweb"); + my %notinstalledlist = &Pakfire::dblist("notinstalled"); + foreach my $pak (sort keys %notinstalledlist) { + print "<option value="$pak">$pak-$notinstalledlist{$pak}{'ProgVersion'}-$notinstalledlist{$pak}{'Release'}</option>\n"; + } + print <<END; </select> <input type='hidden' name='ACTION' value='install' /> @@ -431,7 +442,11 @@ END <select name="DELPAKS" class="pflist" size="10" multiple> END
- &Pakfire::dblist("installed", "forweb"); + my %installedlist = &Pakfire::dblist("installed"); + foreach my $pak (sort keys %installedlist) { + print "<option value="$pak">$pak-$installedlist{$pak}{'ProgVersion'}-$installedlist{$pak}{'Release'}</option>\n"; + } + print <<END; </select> <input type='hidden' name='ACTION' value='remove' /> diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index a1dcfd57e..29926ecc3 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -29,6 +29,7 @@ require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; require "${General::swroot}/graphs.pl"; +require "/opt/pakfire/lib/functions.pl";
my %color = (); my %mainsettings = (); @@ -160,51 +161,44 @@ END
my $lines=0; # Used to count the outputlines to make different bgcolor
- # Generate list of installed addon pak's - opendir (DIR, "/opt/pakfire/db/installed") || die "Cannot opendir /opt/pakfire/db/installed/: $!"; - my @pak = sort readdir DIR; - closedir(DIR); - - foreach (@pak){ - chomp($_); - next unless (m/^meta-/); - s/^meta-//; - - # Check which of the paks are services - if (-e "/etc/init.d/$_") { - # blacklist some packages - # - # alsa has trouble with the volume saving and was not really stopped - # mdadm should not stopped with webif because this could crash the system - # - if ( $_ eq 'squid' ) { - next; - } - if ( ($_ ne "alsa") && ($_ ne "mdadm") ) { - $lines++; - if ($lines % 2){ - print "<tr>"; - $col="bgcolor='$color{'color22'}'"; - }else{ - print "<tr>"; - $col="bgcolor='$color{'color20'}'"; - } + my @paks; + my @addon_services; + + # Generate list of installed addon pak services + my %paklist = &Pakfire::dblist("installed");
- print "<td align='left' $col width='31%'>$_</td> "; - my $status = isautorun($_,$col); - print "$status "; - print "<td align='center' $col width='8%'><a href='services.cgi?$_!start'><img alt='$Lang::tr{'start'}' title='$Lang::tr{'start'}' src='/images/go-up.png' border='0' /></a></td>"; - print "<td align='center' $col width='8%'><a href='services.cgi?$_!stop'><img alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/go-down.png' border='0' /></a></td> "; - my $status = &isrunningaddon($_,$col); - $status =~ s/\[[0-1];[0-9]+m//g; - - chomp($status); - print "$status"; - print "</tr>"; + foreach my $pak (keys %paklist) { + my %metadata = &Pakfire::getmetadata($pak, "installed"); + + if ("$metadata{'Services'}") { + foreach my $service (split(/ /, "$metadata{'Services'}")) { + push(@addon_services, $service); } } }
+ foreach (@addon_services) { + $lines++; + if ($lines % 2){ + print "<tr>"; + $col="bgcolor='$color{'color22'}'"; + }else{ + print "<tr>"; + $col="bgcolor='$color{'color20'}'"; + } + print "<td align='left' $col width='31%'>$_</td> "; + my $status = isautorun($_,$col); + print "$status "; + print "<td align='center' $col width='8%'><a href='services.cgi?$_!start'><img alt='$Lang::tr{'start'}' title='$Lang::tr{'start'}' src='/images/go-up.png' border='0' /></a></td>"; + print "<td align='center' $col width='8%'><a href='services.cgi?$_!stop'><img alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/go-down.png' border='0' /></a></td> "; + my $status = isrunningaddon($_,$col); + $status =~ s/\[[0-1];[0-9]+m//g; + + chomp($status); + print "$status"; + print "</tr>"; + } + print "</table></div>\n"; &Header::closebox();
diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index cc976e812..cbd05d109 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -67,9 +67,9 @@ sub showmenu() { if ($settings{'SPEED'} ne 'off') { print <<EOF; <div id='traffic'> - <strong>Traffic:</strong> - In <span id='rx_kbs'>--.-- bit/s</span> - Out <span id='tx_kbs'>--.-- bit/s</span> + <strong>$Lang::tr{'traffic stat title'}:</strong> + $Lang::tr{'traffic stat in'} <span id='rx_kbs'>--.-- bit/s</span> + $Lang::tr{'traffic stat out'} <span id='tx_kbs'>--.-- bit/s</span> </div> EOF } @@ -202,7 +202,7 @@ sub openpagewithoutmenu { sub closepage () { open(FILE, "</etc/system-release"); my $system_release = <FILE>; - $system_release =~ s/core/Core Update /; + $system_release =~ s/core/$Lang::tr{'core update'} /; close(FILE);
print <<END; diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 49c582a1e..6a5ce1117 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -653,6 +653,7 @@ 'core notice 1' => '<strong>Hinweis:</strong> Es steht eine Aktualisierung von Core-Update', 'core notice 2' => 'auf', 'core notice 3' => 'zur Verfügung.', +'core update' => 'Core-Update', 'could not be opened' => 'konnte nicht geöffnet werden', 'could not connect to' => 'Konnte keine Verbindung herstellen mit', 'could not connect to www ipcop org' => 'Keine Verbindung zu www.ipcop.org möglich', @@ -2012,6 +2013,7 @@ 'ovpnsys log' => 'OVPN-System-Protokoll', 'package failed to install' => 'Programmpaket konnte nicht installiert werden.', 'pagerefresh' => 'Seite wird aktualisiert. Bitte warten.', +'pak update' => 'Paketupdate', 'pakfire accept all' => 'Möchten Sie der Installation aller Pakete zustimmen?', 'pakfire ago' => 'her.', 'pakfire already busy' => 'Pakfire führt bereits eine Aufgabe aus. Bitte versuchen Sie es später erneut.', @@ -2157,6 +2159,7 @@ 'refresh index page while connected' => 'Aktualisiere index.cgi Seite während der Verbindung', 'refresh update list' => 'Aktualisiere Update-Liste', 'registered user rules' => 'Talos VRT-Regelsatz für registrierte Benutzer', +'release' => 'Release', 'released' => 'Freigegeben', 'reload' => 'neu laden', 'remark' => 'Anmerkung', @@ -2500,6 +2503,9 @@ 'traffic on' => 'Verkehr auf', 'traffic shaping' => 'Traffic Shaping', 'traffic shaping settings' => 'Einstellungen der Datenflußkontrolle', +'traffic stat title' => 'ROTER Traffic', +'traffic stat in' => 'Ein', +'traffic stat out' => 'Aus', 'traffic warn level bad' => 'Warnlevel ist nicht gültig', 'trafficblue' => 'WLAN', 'trafficdate' => 'Datum', @@ -2868,6 +2874,7 @@ 'valid till' => 'Gültig bis', 'vci number' => 'VCI-Nummer:', 'vendor' => 'Hersteller', +'version' => 'Version', 'view log' => 'Protokoll anzeigen', 'virtual address' => 'Virtuelle Addresse', 'virtual private networking' => 'Virtuelles Privates Netzwerk', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index ae233de8e..73aa4d04a 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -684,6 +684,7 @@ 'core notice 1' => '<strong>Notice:</strong> There is a core-update from', 'core notice 2' => 'to', 'core notice 3' => 'available.', +'core update' => 'Core-Update', 'could not be opened' => 'could not be opened.', 'could not connect to' => 'Could not connect to', 'could not connect to www ipcop org' => 'Could not connect to www.ipfire.org', @@ -2065,6 +2066,7 @@ 'ovpnsys log' => 'OVPN-System-Log', 'package failed to install' => 'Package failed to install.', 'pagerefresh' => 'Page is beeing refreshed, please wait.', +'pak update' => 'Update', 'pakfire accept all' => 'Do you want to install all packages?', 'pakfire ago' => 'ago.', 'pakfire already busy' => 'Pakfire is already performing a task. Please try again later.', @@ -2211,6 +2213,7 @@ 'refresh index page while connected' => 'Refresh index.cgi page while connected', 'refresh update list' => 'Refresh update list', 'registered user rules' => 'Talos VRT rules for registered users', +'release' => 'Release', 'released' => 'Released', 'reload' => 'reload', 'remark' => 'Remark', @@ -2564,6 +2567,9 @@ 'traffic on' => 'Traffic on', 'traffic shaping' => 'Traffic Shaping', 'traffic shaping settings' => 'Traffic Shaping Settings', +'traffic stat title' => 'RED Traffic', +'traffic stat in' => 'In', +'traffic stat out' => 'Out', 'traffic warn level bad' => 'Warnlevel is not correct', 'trafficblue' => 'WLAN', 'trafficdate' => 'Date', @@ -2935,6 +2941,7 @@ 'valid till' => 'Valid till', 'vci number' => 'VCI number:', 'vendor' => 'Vendor', +'version' => 'Version', 'view log' => 'view log', 'virtual address' => 'Virtual Address', 'virtual private networking' => 'Virtual Private Networking', diff --git a/langs/fr/cgi-bin/fr.pl b/langs/fr/cgi-bin/fr.pl index 245ec62b6..9e0bd3449 100644 --- a/langs/fr/cgi-bin/fr.pl +++ b/langs/fr/cgi-bin/fr.pl @@ -690,6 +690,7 @@ 'core notice 1' => '<strong>Remarque :</strong> Une mise à jour est disponible depuis la version', 'core notice 2' => 'vers', 'core notice 3' => '', +'core update' => 'Mise à jour du coeur', 'could not be opened' => 'ne peut pas être ouvert', 'could not connect to' => 'Impossible de se connecter à', 'could not connect to www ipcop org' => 'Impossible de se connecter à www.ipcop.org', @@ -2074,6 +2075,7 @@ 'ovpnsys log' => 'Journal système OVPN', 'package failed to install' => 'L'installation du paquet a échoué.', 'pagerefresh' => 'La page est en cours d'actualisation, veuillez patienter.', +'pak update' => 'Mise à jour', 'pakfire accept all' => 'Voulez-vous installer ce(s) paquet(s) ?', 'pakfire ago' => '', 'pakfire already busy' => 'Pakfire est déjà en train d'effectuer une tâche. Veuillez réessayer plus tard.', @@ -2221,6 +2223,7 @@ 'refresh index page while connected' => 'Actualiser la page index.cgi pendant la connexion', 'refresh update list' => 'Actualiser la liste des mises à jour', 'registered user rules' => 'Règles Sourcefire VRT pour les utilisateurs enregistrés', +'release' => 'Révision', 'released' => 'Disponible', 'reload' => 'Recharger', 'remark' => 'Remarque ', @@ -2576,6 +2579,9 @@ 'traffic on' => 'Trafic en cours', 'traffic shaping' => 'Arrangement du trafic', 'traffic shaping settings' => 'Réglages de l'arrangement du trafic', +'traffic stat title' => 'Trafic ROUGE', +'traffic stat in' => 'Entrée', +'traffic stat out' => 'Sortie', 'traffic warn level bad' => 'Le niveau d'alerte n'est pas correct', 'trafficblue' => 'WLAN', 'trafficdate' => 'Date', @@ -2946,6 +2952,7 @@ 'valid till' => 'Valide jusqu'au', 'vci number' => 'Nombre VCI :', 'vendor' => 'Vendeur', +'version' => 'Version', 'view log' => 'Afficher log', 'virtual address' => 'Adresse virtuelle', 'virtual private networking' => 'Réseau privé virtuel (VPN)', diff --git a/langs/nl/cgi-bin/nl.pl b/langs/nl/cgi-bin/nl.pl index 5979873bb..7229a86ae 100644 --- a/langs/nl/cgi-bin/nl.pl +++ b/langs/nl/cgi-bin/nl.pl @@ -577,6 +577,7 @@ 'core notice 1' => '<strong>Let op:</strong> Er is een core-update van', 'core notice 2' => 'naar', 'core notice 3' => 'beschikbaar.', +'core update' => 'Core-Update', 'could not be opened' => 'kan niet worden geopend.', 'could not connect to' => 'Kan niet verbinden', 'could not connect to www ipcop org' => 'Kan niet verbinden met www.ipfire.org', @@ -1690,6 +1691,7 @@ 'ovpnsys log' => 'OVPN-Systeem-Log', 'package failed to install' => 'Pakket kon niet worden geïnstalleerd.', 'pagerefresh' => 'Pagina wordt ververst, wacht even a.u.b.', +'pak update' => 'Opwaardering', 'pakfire accept all' => 'Wilt u alle pakketten installeren?', 'pakfire ago' => 'geleden.', 'pakfire available addons' => 'Beschikbare extensies:', @@ -1817,6 +1819,7 @@ 'refresh index page while connected' => 'Ververs de index.cgi pagina terwijl verbonden', 'refresh update list' => 'Ververs update-lijst', 'registered user rules' => 'Talos VRT regels voor geregistreerde gebruikers', +'release' => 'Uitgave', 'released' => 'Released', 'reload' => 'herlaad', 'remark' => 'Opmerking', @@ -2128,6 +2131,9 @@ 'traffic on' => 'Verkeer op', 'traffic shaping' => 'Verkeersregeling', 'traffic shaping settings' => 'Verkeersregeling instellingen', +'traffic stat title' => 'ROOD Verkeer', +'traffic stat in' => 'In', +'traffic stat out' => 'Uit', 'traffic warn level bad' => 'Waarschuwingsniveau is onjuist', 'trafficblue' => 'WLAN', 'trafficdate' => 'Datum', @@ -2484,6 +2490,7 @@ 'valid root certificate already exists' => 'Er bestaat al een geldig root certificaat.', 'valid till' => 'Geldig tot', 'vci number' => 'VCI nummer:', +'version' => 'Versie', 'view log' => 'bekijk log', 'virtual address' => 'Virtueel adres', 'virtual private networking' => 'Virtual Private Networking', diff --git a/lfs/linux b/lfs/linux index 384ed9d89..07e838933 100644 --- a/lfs/linux +++ b/lfs/linux @@ -24,7 +24,7 @@
include Config
-VER = 5.15.49 +VER = 5.15.57 ARM_PATCHES = 5.15-ipfire5
THISAPP = linux-$(VER) @@ -78,7 +78,7 @@ objects =$(DL_FILE) \ $(DL_FILE) = $(URL_IPFIRE)/$(DL_FILE) arm-multi-patches-$(ARM_PATCHES).patch.xz = $(URL_IPFIRE)/arm-multi-patches-$(ARM_PATCHES).patch.xz
-$(DL_FILE)_BLAKE2 = 0f78d980b2d6ec189865a85f3bf65e015365034f797ffda88077a77162d3bc30aec5f44a5257aa2aee0a97ee12e4c38b796bc8fddbe9f6ff6067b0c17ff0207e +$(DL_FILE)_BLAKE2 = 9adea6b8ee97ead38ecab39b1ef08b2ee1647eebbb2a8ccd2ba253eeebfd6435c83a03e83e186809473a982a373185874c0082aa0c56f5928d304c7df56dfb86 arm-multi-patches-$(ARM_PATCHES).patch.xz_BLAKE2 = 58a70e757a9121a0aac83604a37aa787ec7ac0ee4970c5a3ac3bcb2dbaca32b00089cae6c0da5cf2fe0a2e156427b5165c6a86e0371a3e896f4c7cdd699c34a0
install : $(TARGET) diff --git a/src/installer/hw.c b/src/installer/hw.c index 12f8e793d..0ed6050b3 100644 --- a/src/installer/hw.c +++ b/src/installer/hw.c @@ -1,7 +1,7 @@ /*############################################################################# # # # IPFire - An Open Source Firewall Distribution # -# Copyright (C) 2014 IPFire development team # +# Copyright (C) 2007-2022 IPFire Team info@ipfire.org # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -1134,7 +1134,7 @@ int hw_write_fstab(struct hw_destination* dest) { uuid = hw_get_uuid(dest->part_boot);
if (uuid) { - fprintf(f, FSTAB_FMT, uuid, "/boot", "auto", "defaults", 1, 2); + fprintf(f, FSTAB_FMT, uuid, "/boot", "auto", "defaults,nodev,noexec,nosuid", 1, 2); free(uuid); } } diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index 505988af9..1ebf98775 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -44,7 +44,7 @@ my @VALID_KEY_FINGERPRINTS = ( );
# A small color-hash :D -my %color; +our %color; $color{'normal'} = "\033[0m"; $color{'black'} = "\033[0;30m"; $color{'darkgrey'} = "\033[1;30m"; @@ -114,7 +114,8 @@ sub usage { &Pakfire::message("Usage: pakfire <install|remove> [options] <pak(s)>"); &Pakfire::message(" <update> - Contacts the servers for new lists of paks."); &Pakfire::message(" <upgrade> - Installs the latest version of all paks."); - &Pakfire::message(" <list> - Outputs a short list with all available paks."); + &Pakfire::message(" <list> [installed/notinstalled/upgrade] - Outputs a list with all, installed, available or upgradeable paks."); + &Pakfire::message(" <info> <pak> [<pak> ...] - Output pak metadata."); &Pakfire::message(" <status> - Outputs a summary about available core upgrades, updates and a required reboot"); &Pakfire::message(""); &Pakfire::message(" Global options:"); @@ -410,9 +411,7 @@ sub dbgetlist { my %metadata; my @templine;
- open(FILE, "<$Conf::dbdir/lists/packages_list.db"); - my @db = <FILE>; - close(FILE); + my %paklist = &Pakfire::dblist("all");
opendir(DIR,"$Conf::dbdir/meta"); my @files = readdir(DIR); @@ -424,118 +423,123 @@ sub dbgetlist { next if ( $file =~ /^old/ ); %metadata = parsemetafile("$Conf::dbdir/meta/$file");
- foreach $prog (@db) { - @templine = split(/;/,$prog); - if (("$metadata{'Name'}" eq "$templine[0]") && ("$metadata{'Release'}" ne "$templine[2]")) { - move("$Conf::dbdir/meta/meta-$metadata{'Name'}","$Conf::dbdir/meta/old_meta-$metadata{'Name'}"); - getmetafile($metadata{'Name'}); - } + if ((defined $paklist{"$metadata{'Name'}"}) && ( + ("$paklist{"$metadata{'Name'}"}{'Release'}" ne "$metadata{'Release'}") || + (defined $paklist{"$metadata{'Name'}"}{'AvailableRelease'})) + ) { + move("$Conf::dbdir/meta/meta-$metadata{'Name'}","$Conf::dbdir/meta/old_meta-$metadata{'Name'}"); + getmetafile($metadata{'Name'}); } } }
+sub coredbinfo { + ### This subroutine returns core db version information in a hash. + # Usage is without arguments + + eval(`grep "core_" $Conf::dbdir/lists/core-list.db`); + + my %coredb = ( + CoreVersion => $Conf::version, + Release => $Conf::core_mine, + ); + + $coredb{'AvailableRelease'} = $core_release if ("$Conf::core_mine" < "$core_release"); + + return %coredb; +} + sub dblist { - ### This subroutine lists the packages. - # You may also pass a filter: &Pakfire::dblist(filter) - # Usage is always with two arguments. - # filter may be: all, notinstalled, installed + ### This subroutine returns the packages from the packages_list db in a hash. + # It uses the currently cached version of packages_list. To ensure latest + # data, run Pakfire::dbgetlist first. + # You may also pass a filter: &Pakfire::dblist(filter) + # Usage is always with one argument. + # filter may be: + # - "all": list all known paks, + # - "notinstalled": list only not installed paks, + # - "installed": list only installed paks + # - "upgrade": list only upgradable paks + # + # Returned hash format: + # ( "<pak name>" => ( + # "Installed" => "Yes" or "No" wether the pak is installed, + # "ProgVersion" => Installed program version when "Installed" => "Yes" or + # Available version when "Installed" => No, + # "Release" => Installed pak release number when "Installed" => "Yes" or + # Available pak release number when "Installed" => No, + # "AvailableProgVersion" => Available program version. + # Only defined if an upgrade to a higher version is available, + # "AvailableRelease" => Available pak release version. + # Only defined if an upgrade to a higher version is available + # ), + # ... + # ) + my $filter = shift; - my $forweb = shift; - my @updatepaks; + my %paklist = (); my $file; my $line; - my $prog; my %metadata; my @templine; - - ### Make sure that the list is not outdated. - #dbgetlist("noforce"); - + open(FILE, "<$Conf::dbdir/lists/packages_list.db"); my @db = <FILE>; close(FILE);
- if ("$filter" eq "upgrade") { - if ("$forweb" ne "forweb" && "$forweb" ne "notice" ) {getcoredb("noforce");} - eval(`grep "core_" $Conf::dbdir/lists/core-list.db`); - if ("$core_release" > "$Conf::core_mine") { - if ("$forweb" eq "forweb") { - print "<option value="core">Core-Update -- $Conf::version -- Release: $Conf::core_mine -> $core_release</option>\n"; - } - elsif ("$forweb" eq "notice") { - print "<br /><br /><br /><a href='pakfire.cgi'>$Lang::tr{'core notice 1'} $Conf::core_mine $Lang::tr{'core notice 2'} $core_release $Lang::tr{'core notice 3'}</a>"; - } else { - my $command = "Core-Update $Conf::version\nRelease: $Conf::core_mine -> $core_release\n"; - if ("$Pakfire::enable_colors" eq "1") { - print "$color{'lila'}$command$color{'normal'}\n"; - } else { - print "$command\n"; - } - } - } - + if ("$filter" ne "notinstalled") { opendir(DIR,"$Conf::dbdir/installed"); my @files = readdir(DIR); closedir(DIR); + foreach $file (@files) { next if ( $file eq "." ); next if ( $file eq ".." ); next if ( $file =~ /^old/ ); %metadata = parsemetafile("$Conf::dbdir/installed/$file");
- foreach $prog (@db) { - @templine = split(/;/,$prog); - if (("$metadata{'Name'}" eq "$templine[0]") && ("$metadata{'Release'}" < "$templine[2]" && "$forweb" ne "notice")) { - push(@updatepaks,$metadata{'Name'}); - if ("$forweb" eq "forweb") { - print "<option value="$metadata{'Name'}">Update: $metadata{'Name'} -- Version: $metadata{'ProgVersion'} -> $templine[1] -- Release: $metadata{'Release'} -> $templine[2]</option>\n"; - } else { - my $command = "Update: $metadata{'Name'}\nVersion: $metadata{'ProgVersion'} -> $templine[1]\nRelease: $metadata{'Release'} -> $templine[2]\n"; - if ("$Pakfire::enable_colors" eq "1") { - print "$color{'lila'}$command$color{'normal'}\n"; - } else { - print "$command\n"; - } - } + foreach $line (@db) { + next unless ($line =~ /.*;.*;.*;/ ); + @templine = split(/;/,$line); + if (("$metadata{'Name'}" eq "$templine[0]") && ("$metadata{'Release'}" < "$templine[2]")) { + # Add all upgradable paks to list + $paklist{"$metadata{'Name'}"} = { + ProgVersion => $metadata{'ProgVersion'}, + Release => $metadata{'Release'}, + AvailableProgVersion => $templine[1], + AvailableRelease => $templine[2], + Installed => "yes" + }; + last; + } elsif (("$metadata{'Name'}" eq "$templine[0]") && ("$filter" ne "upgrade")) { + # Add installed paks without an upgrade available to list + $paklist{"$metadata{'Name'}"} = { + ProgVersion => $metadata{'ProgVersion'}, + Release => $metadata{'Release'}, + Installed => "yes" + }; + last; } } } - return @updatepaks; - } else { - my $line; - my $use_color; - my @templine; - my $count; - foreach $line (sort @db) { + } + + # Add all not installed paks to list + if (("$filter" ne "upgrade") && ("$filter" ne "installed")) { + foreach $line (@db) { next unless ($line =~ /.*;.*;.*;/ ); - $use_color = ""; @templine = split(/;/,$line); - if ("$filter" eq "notinstalled") { - next if ( -e "$Conf::dbdir/installed/meta-$templine[0]" ); - } elsif ("$filter" eq "installed") { - next unless ( -e "$Conf::dbdir/installed/meta-$templine[0]" ); - } - $count++; - if ("$forweb" eq "forweb") - { - if ("$filter" eq "notinstalled") { - print "<option value="$templine[0]">$templine[0]-$templine[1]-$templine[2]</option>\n"; - } else { - print "<option value="$templine[0]">$templine[0]</option>\n"; - } - } else { - if ("$Pakfire::enable_colors" eq "1") { - if (&isinstalled("$templine[0]")) { - $use_color = "$color{'red'}" - } else { - $use_color = "$color{'green'}" - } - } - print "${use_color}Name: $templine[0]\nProgVersion: $templine[1]\nRelease: $templine[2]$color{'normal'}\n\n"; - } + next if ((defined $paklist{"$templine[0]"}) || (&isinstalled($templine[0]) == 0)); + + $paklist{"$templine[0]"} = { + ProgVersion => "$templine[1]", + Release => "$templine[2]", + Installed => "no" + }; } - print "$count packages total.\n" unless ("$forweb" eq "forweb"); } + + return %paklist; }
sub resolvedeps_one { @@ -703,6 +707,60 @@ sub parsemetafile { return %metadata; }
+sub getmetadata { + ### This subroutine returns a hash of available info for a package + # Pass package name and type of info as argument: Pakfire::getmetadata(package, type_of_info) + # Type_of_info can be "latest" or "installed" + # Usage is always with two argument. + my ($pak, $type) = @_; + + my %metadata = ( + Name => $pak, + Installed => "no", + Available => "no"); + my %installed_metadata = (); + + my @templine; + my @file; + + ### Get available version information + if ("$type" eq "latest") { + ### Check if package is in packages_list and get latest available version + my %db = Pakfire::dblist("all"); + + if (defined $db{$pak}) { + ### Get and parse latest available metadata + if (getmetafile("$pak")) { + %metadata = parsemetafile("$Conf::dbdir/meta/meta-$pak"); + + $metadata{'Available'} = "yes"; + ### Rename version info fields + $metadata{'AvailableProgVersion'} = delete $metadata{'ProgVersion'}; + $metadata{'AvailableRelease'} = delete $metadata{'Release'}; + } + } + } + + ### Parse installed pak metadata + if (&isinstalled($pak) == 0) { + %installed_metadata = parsemetafile("$Conf::dbdir/installed/meta-$pak"); + + if ("$type" eq "latest" && exists($metadata{'AvailableProgVersion'})) { + ### Add installed version info to latest metadata + $metadata{'ProgVersion'} = $installed_metadata{'ProgVersion'}; + $metadata{'Release'} = $installed_metadata{'Release'}; + } else { + ### Use metadata of installed pak + %metadata = %installed_metadata; + } + $metadata{'Installed'} = 'yes'; + } else { + $metadata{'Installed'} = 'no'; + } + + return %metadata; +} + sub decryptpak { my $pak = shift;
@@ -770,35 +828,28 @@ sub setuppak { }
sub upgradecore { - getcoredb("noforce"); - eval(`grep "core_" $Conf::dbdir/lists/core-list.db`); - if ("$core_release" > "$Conf::core_mine") { - # Safety check for lazy testers: - # Before we upgrade to the latest release, we re-install the previous release - # to make sure that the tester has always been on the latest version. - my $tree = &get_tree(); - $Conf::core_mine-- if ($tree eq "testing" || $tree eq "unstable"); - - message("CORE UPGR: Upgrading from release $Conf::core_mine to $core_release"); - - my @seq = `seq $Conf::core_mine $core_release`; - shift @seq; - my $release; - foreach $release (@seq) { - chomp($release); - getpak("core-upgrade-$release"); - } - - foreach $release (@seq) { - chomp($release); - upgradepak("core-upgrade-$release"); - } - - system("echo $core_release > $Conf::coredir/mine"); + # Safety check for lazy testers: + # Before we upgrade to the latest release, we re-install the previous release + # to make sure that the tester has always been on the latest version. + my $tree = &get_tree(); + $Conf::core_mine-- if ($tree eq "testing" || $tree eq "unstable");
- } else { - message("CORE INFO: No new upgrades available. You are on release $Conf::core_mine."); + message("CORE UPGR: Upgrading from release $Conf::core_mine to $core_release"); + + my @seq = ($Conf::core_mine .. $core_release); + shift @seq; + my $release; + foreach $release (@seq) { + chomp($release); + getpak("core-upgrade-$release"); + } + + foreach $release (@seq) { + chomp($release); + upgradepak("core-upgrade-$release"); } + + system("echo $core_release > $Conf::coredir/mine"); }
sub isinstalled { @@ -910,24 +961,14 @@ sub progress_bar {
sub updates_available { # Get packets with updates available - my @upgradepaks = &Pakfire::dblist("upgrade", "noweb"); + my %upgradepaks = &Pakfire::dblist("upgrade");
- # Get the length of the returned array - my $updatecount = scalar @upgradepaks; + # Get the length of the returned hash + my $updatecount = keys %upgradepaks;
return "$updatecount"; }
-sub coreupdate_available { - eval(`grep "core_" $Conf::dbdir/lists/core-list.db`); - if ("$core_release" > "$Conf::core_mine") { - return "yes ($core_release)"; - } - else { - return "no"; - } -} - sub reboot_required { if ( -e "/var/run/need_reboot" ) { return "yes"; @@ -938,26 +979,26 @@ sub reboot_required { }
sub status { - # General info - my $return = "Core-Version: $Conf::version\n"; - $return .= "Core-Update-Level: $Conf::core_mine\n"; - $return .= "Last update: " . &General::age("/opt/pakfire/db/core/mine") . " ago\n"; - $return .= "Last core-list update: " . &General::age("/opt/pakfire/db/lists/core-list.db") . " ago\n"; - $return .= "Last server-list update: " . &General::age("/opt/pakfire/db/lists/server-list.db") . " ago\n"; - $return .= "Last packages-list update: " . &General::age("/opt/pakfire/db/lists/packages_list.db") . " ago\n"; - - # Get availability of core updates - $return .= "Core-Update available: " . &Pakfire::coreupdate_available() . "\n"; - - # Get availability of package updates - $return .= "Package-Updates available: " . &Pakfire::updates_available() . "\n"; - - # Test if reboot is required - $return .= "Reboot required: " . &Pakfire::reboot_required() . "\n"; - - # Return status text - print "$return"; - exit 1; + ### This subroutine returns pakfire status information in a hash. + # Usage is without arguments + + # Add core version info + my %status = &Pakfire::coredbinfo(); + + # Add last update info + $status{'LastUpdate'} = &General::age("/opt/pakfire/db/core/mine"); + $status{'LastCoreListUpdate'} = &General::age("/opt/pakfire/db/lists/core-list.db"); + $status{'LastServerListUpdate'} = &General::age("/opt/pakfire/db/lists/server-list.db"); + $status{'LastPakListUpdate'} = &General::age("/opt/pakfire/db/lists/packages_list.db"); + + # Add number of available package updates + $status{'CoreUpdateAvailable'} = (defined $status{'AvailableRelease'}) ? "yes" : "no"; + $status{'PakUpdatesAvailable'} = &Pakfire::updates_available(); + + # Add if reboot is required + $status{'RebootRequired'} = &Pakfire::reboot_required(); + + return %status; }
sub get_arch() { diff --git a/src/pakfire/pakfire b/src/pakfire/pakfire index 6c77695c8..389c1399d 100644 --- a/src/pakfire/pakfire +++ b/src/pakfire/pakfire @@ -107,42 +107,30 @@ ### Make sure that the list is not outdated. &Pakfire::dbgetlist("noforce");
- open(FILE, "<$Conf::dbdir/lists/packages_list.db"); - my @db = <FILE>; - close(FILE); + my %paklist = &Pakfire::dblist("all");
my $dep; my @deps; my $pak; my @paks; my @temp; - my @templine; - my $found = 0; my $return; my @all; foreach $pak (@ARGV) { unless ("$pak" =~ "^-") { - $return = &Pakfire::isinstalled($pak); - if ($return eq 0) { - &Pakfire::message("PAKFIRE INFO: $pak is already installed"); - next; - } - $found = 0; - foreach (@db) { - @templine = split(/;/,$_); - if ("$templine[0]" eq "$pak" ) { - push(@paks,$pak); - push(@all,$pak); - @temp = &Pakfire::resolvedeps("$pak"); - foreach $dep (@temp) { - push(@deps,$dep) if $dep; - push(@all,$dep) if $dep; - } - $found = 1; - break; + if (defined $paklist{$pak}) { + if ("$paklist{$pak}{'Installed'}" eq "yes") { + &Pakfire::message("PAKFIRE INFO: $pak is already installed"); + next; } - } - if ($found == 0) { + push(@paks,$pak); + push(@all,$pak); + @temp = &Pakfire::resolvedeps("$pak"); + foreach $dep (@temp) { + push(@deps,$dep) if $dep; + push(@all,$dep) if $dep; + } + } else { &Pakfire::message(""); &Pakfire::message("PAKFIRE WARN: The pak "$pak" is not known. Please try running "pakfire update"."); } @@ -270,14 +258,39 @@ &Pakfire::getcoredb("$force");
} elsif ("$ARGV[0]" eq "upgrade") { - &Pakfire::upgradecore(); - my @upgradepaks = &Pakfire::dblist("upgrade", "noweb"); - my @deps = (); + my $use_color = ""; + my $reset_color = ""; + + if ("$Pakfire::enable_colors" eq "1") { + $reset_color = "$Pakfire::color{'normal'}"; + $use_color = "$Pakfire::color{'lightpurple'}"; + }
- if (@upgradepaks) { + &Pakfire::message("CORE INFO: Checking for Core-Updates..."); + + ### Make sure that the core db is not outdated. + &Pakfire::getcoredb("noforce"); + my %coredb = &Pakfire::coredbinfo(); + + if (defined $coredb{'AvailableRelease'}) { + &Pakfire::upgradecore(); + } else { + &Pakfire::message("CORE INFO: No new Core-Updates available. You are on release ".$coredb{'Release'}); + } + + &Pakfire::message("PAKFIRE INFO: Checking for package updates..."); + ### Make sure that the package list is not outdated. + &Pakfire::dbgetlist("noforce"); + + my @deps = (); + if (my %upgradepaks = &Pakfire::dblist("upgrade")) { # Resolve the dependencies of the to be upgraded packages - @deps = &Pakfire::resolvedeps_recursive(@upgradepaks); + @deps = &Pakfire::resolvedeps_recursive(keys %upgradepaks);
+ foreach $pak (sort keys %upgradepaks) { + print "${use_color}Update: $pak\nVersion: $upgradepaks{$pak}{'ProgVersion'} -> $upgradepaks{$pak}{'AvailableProgVersion'}\n"; + print "Release: $upgradepaks{$pak}{'Release'} -> $upgradepaks{$pak}{'AvailableRelease'}${reset_color}\n"; + } &Pakfire::message(""); &Pakfire::message("PAKFIRE UPGR: We are going to install all packages listed above."); if ($interactive) { @@ -290,34 +303,152 @@ exit 1; } } + + # Download packages + foreach $pak (sort keys %upgradepaks) { + &Pakfire::getpak("$pak", ""); + } + + # Download dependencies + foreach $pak (@deps) { + &Pakfire::getpak("$pak", ""); + } + + # Install dependencies first + foreach $pak (@deps) { + &Pakfire::setuppak("$pak"); + } + + # Install all upgrades + foreach $pak (sort keys %upgradepaks) { + &Pakfire::upgradepak("$pak"); + } + } else { + &Pakfire::message("PAKFIRE WARN: No new package upgrades available."); }
- # Download packages - foreach $pak (@upgradepaks) { - &Pakfire::getpak("$pak", ""); + } elsif ("$ARGV[0]" eq "list") { + my $count; + my $coreupdate = 0; + my $use_color = ""; + my $reset_color = ""; + my $filter = "all"; + + shift if ("$ARGV[1]" =~ "^-"); + + if ("$ARGV[1]" =~ /installed|notinstalled|upgrade/) { + $filter = "$ARGV[1]"; + } elsif ($ARGV[1]) { + &Pakfire::message("PAKFIRE ERROR: Not a known option $ARGV[1]"); + exit 1; }
- # Download dependencies - foreach $pak (@deps) { - &Pakfire::getpak("$pak", ""); + my $pak; + my %paklist = &Pakfire::dblist($filter); + + if ("$Pakfire::enable_colors" eq "1") { + $reset_color = "$Pakfire::color{'normal'}"; + $use_color = "$Pakfire::color{'lightgreen'}"; }
- # Install dependencies first - foreach $pak (@deps) { - &Pakfire::setuppak("$pak"); + # Check for available core upgrade first if list of upgrades is requested + if ("$filter" eq "upgrade") { + my %coredb = &Pakfire::coredbinfo(); + + if (defined $coredb{'AvailableRelease'}) { + print "${use_color}Core-Update $coredb{'CoreVersion'}\n"; + print "Release: $coredb{'Release'} -> $coredb{'AvailableRelease'}${reset_color}\n\n"; + $coreupdate = 1; + } }
- # Install all upgrades - foreach $pak (@upgradepaks) { - &Pakfire::upgradepak("$pak"); + foreach $pak (sort keys %paklist) { + if ("$Pakfire::enable_colors" eq "1") { + if ("$paklist{$pak}{'Installed'}" eq "yes") { + if (defined $paklist{$pak}{'AvailableProgVersion'}) { + $use_color = "$Pakfire::color{'lightgreen'}"; + } else { + $use_color = "$Pakfire::color{'green'}"; + } + } else { + $use_color = "$Pakfire::color{'red'}"; + } + } + + print "${use_color}Name: $pak\nProgVersion: $paklist{$pak}{'ProgVersion'}\n"; + print "Release: $paklist{$pak}{'Release'}\nInstalled: $paklist{$pak}{'Installed'}\n"; + if (defined $paklist{$pak}{'AvailableProgVersion'}) { + print "Update available:\n Version: $paklist{$pak}{'ProgVersion'} -> $paklist{$pak}{'AvailableProgVersion'}\n Release: $paklist{$pak}{'Release'} -> $paklist{$pak}{'AvailableRelease'}\n"; + } + print "${reset_color}\n"; + }
- } elsif ("$ARGV[0]" eq "list") { - if ("$ARGV[1]" =~ /installed|notinstalled/) { - &Pakfire::dblist("$ARGV[1]", "noweb"); + $count = keys %paklist; + if ($count > 0) { + print "$count packages total.\n"; } else { - &Pakfire::message("PAKFIRE WARN: Not a known option $ARGV[1]") if ($ARGV[1]); - &Pakfire::dblist("all", "noweb"); + if (! $coreupdate) { + &Pakfire::message("PAKFIRE WARN: No packages where found using filter $filter."); + exit 1; + } + } + } elsif ("$ARGV[0]" eq "info") { + shift; + + my @paks; + my $pak; + foreach $pak (@ARGV) { + unless ("$pak" =~ "^-") { + push(@paks,$pak); + } + } + + unless ("@paks") { + Pakfire::message("PAKFIRE ERROR: missing package name"); + Pakfire::usage; + exit 1; + } + + foreach $pak (@paks) { + my %metadata = Pakfire::getmetadata($pak, "latest"); + + ### Check if pakfile was actually found + if ($metadata{'Installed'} eq "no" && $metadata{'Available'} eq "no") { + Pakfire::message("PAKFIRE WARN: Pak '$pak' not found."); + last; + } + + unless (defined $metadata{'Available'}) { + Pakfire::message("PAKFIRE WARN: Unable to retrieve latest metadata for $pak. Information may be outdated.") + } + + ### Printout metadata in a user friendly format + print "Name: $metadata{'Name'}\n"; + print "Summary: $metadata{'Summary'}\n"; + if ($metadata{'Available'} eq "yes") { + print "Version: $metadata{'AvailableProgVersion'}-$metadata{'AvailableRelease'}\n"; + } else { + print "Version: $metadata{'ProgVersion'}-$metadata{'Release'}\n"; + } + print "Size: " . Pakfire::beautifysize("$metadata{'Size'}") . "\n"; + print "Dependencies: $metadata{'Dependencies'}\n"; + print "Pakfile: $metadata{'File'}\n"; + print "Service InitScripts: $metadata{'Services'}\n"; + print "Installed: $metadata{'Installed'}\n"; + ### Generate a pak status message + if (! defined $metadata{'Available'}) { + print "Status: unknown (an error occured retrieving latest pak metadata)"; + } elsif ($metadata{'Available'} eq "no") { + print "Status: obsolete (version $metadata{'ProgVersion'}-$metadata{'Release'} is installed)\n"; + } elsif ($metadata{'Installed'} eq "yes" && "$metadata{'Release'}" < "$metadata{'AvailableRelease'}") { + print "Status: outdated (version $metadata{'ProgVersion'}-$metadata{'Release'} is installed)\n"; + } elsif ($metadata{'Installed'} eq "yes") { + print "Status: up-to-date\n"; + } else { + print "Status: not installed\n"; + } + print "\n"; }
} elsif ("$ARGV[0]" eq "resolvedeps") { @@ -339,14 +470,31 @@ system("rm -f /etc/fcron.daily/pakfire-upgrade"); } } elsif ("$ARGV[0]" eq "status") { - &Pakfire::status; + my $exitcode = 0; + my %status = &Pakfire::status; + + print "Core-Version: $status{'CoreVersion'}\n"; + print "Core-Update-Level: $status{'Release'}\n"; + print "Last update: $status{'LastUpdate'} ago\n"; + print "Last core-list update: $status{'LastCoreListUpdate'} ago\n"; + print "Last server-list update: $status{'LastServerListUpdate'} ago\n"; + print "Last packages-list update: $status{'LastPakListUpdate'} ago\n"; + print "Core-Update available: $status{'CoreUpdateAvailable'}"; + print " ($status{'AvailableRelease'})" if ("$status{'CoreUpdateAvailable'}" eq "yes"); + print "\nPackage-Updates available: $status{'PakUpdatesAvailable'}\n"; + print "Reboot required: $status{'RebootRequired'}\n"; + + $exitcode += 2 if ($status{'CoreUpdateAvailable'} eq "yes"); + $exitcode += 3 if ($status{'PakUpdatesAvailable'} eq "yes"); + $exitcode += 4 if ($status{'RebootRequired'} eq "yes"); + exit $exitcode; } else { &Pakfire::usage; }
- &Pakfire::logger("PAKFIRE INFO: Pakfire has finished. Closing."); - END { + &Pakfire::logger("PAKFIRE INFO: Pakfire has finished. Closing."); + # Check if pakfire has been locked in this session. if ($locked) { # Remove lockfile.
hooks/post-receive -- IPFire 2.x development tree