public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. f7565a885b55384a64edd8bd73079143a04da519
@ 2025-07-21  9:28 Michael Tremer
  0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2025-07-21  9:28 UTC (permalink / raw)
  To: ipfire-scm

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 24058 bytes --]

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  f7565a885b55384a64edd8bd73079143a04da519 (commit)
       via  0a4a3c362f4123b21e4a3c67abb4f82df1e039a8 (commit)
       via  68a3334413efb1a963b7cc6c6dca1ec0126e1cc1 (commit)
       via  43e0f64444f47b149f6a69ec5a727a1345698a40 (commit)
       via  a9cc769404a20c0217a04720bc8cd17d678a6013 (commit)
       via  e61c723c8f74e02d4e9f073d2dbcb05781f50cb4 (commit)
       via  341a6a24655377ffc64d7adba096485bdc90341c (commit)
       via  18f768f016d5d74c33f60b488f6b27f0b7fc3a07 (commit)
       via  080323d43237b4ed9ffe184cb9e147baacebdf95 (commit)
       via  3f67590278a59fbc85b095d7bc30dd69ac7e0f4e (commit)
       via  331d249140e4224834b2b9ea8a340cdfce4f81c7 (commit)
      from  13b7e3803cfd803d42d4ef082fba37859aa1e2f7 (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 f7565a885b55384a64edd8bd73079143a04da519
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Jul 18 09:57:34 2025 +0000

    wireguard-functions.pl: Remove any carriage returns on import
    
    Some files might include carriage returns which won't be removed by
    chomp() on Linux. To be extra safe, we remove them manually.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 0a4a3c362f4123b21e4a3c67abb4f82df1e039a8
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Jul 21 09:25:51 2025 +0000

    core197: Ship wireguard-functions.pl
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 68a3334413efb1a963b7cc6c6dca1ec0126e1cc1
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Jul 18 08:42:12 2025 +0000

    wireguard-functions.pl: Automatically skip IPv6 subnets
    
    Since we do not support this and some VPN providers generate
    configuration files that send any data over to them, we simply ignore
    any IPv6 subnets.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 43e0f64444f47b149f6a69ec5a727a1345698a40
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Jul 17 18:26:33 2025 +0100

    cpufrequtils: Drop unused patches
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit a9cc769404a20c0217a04720bc8cd17d678a6013
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Jul 21 09:19:01 2025 +0000

    core197: Update the status file in the roadwarrior configuration
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit e61c723c8f74e02d4e9f073d2dbcb05781f50cb4
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Jul 21 09:17:27 2025 +0000

    core197: Ship updated collectd configuration
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 341a6a24655377ffc64d7adba096485bdc90341c
Author: Robin Roevens <robin.roevens@disroot.org>
Date:   Sat Jul 19 23:10:10 2025 +0200

    collectd: Openvpn-2.6: fix statusfile name
    
    Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 18f768f016d5d74c33f60b488f6b27f0b7fc3a07
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Jul 21 09:15:12 2025 +0000

    core197: Ship the new cpupower script
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 080323d43237b4ed9ffe184cb9e147baacebdf95
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Jul 21 09:14:19 2025 +0000

    core197: Drop cpufrequtils
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 3f67590278a59fbc85b095d7bc30dd69ac7e0f4e
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Jul 17 17:30:31 2025 +0000

    cpufrequtils: Drop package
    
    This is now implemented in the core distribution.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 331d249140e4224834b2b9ea8a340cdfce4f81c7
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Jul 17 17:30:30 2025 +0000

    initscripts: Automatically enable CPU power saving features
    
    This is a cleaned up implementation of the script that was previously
    packaged in the cpufrequtils package.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 config/backup/backup.pl                            |  1 +
 config/cfgroot/wireguard-functions.pl              |  6 ++
 config/collectd/collectd.vpn                       |  2 +-
 config/rootfiles/common/aarch64/initscripts        |  2 +
 config/rootfiles/common/riscv64/initscripts        |  2 +
 config/rootfiles/common/x86_64/initscripts         |  2 +
 config/rootfiles/core/197/filelists/files          |  4 ++
 config/rootfiles/core/197/update.sh                | 15 ++++
 config/rootfiles/packages/cpufrequtils             |  2 -
 lfs/cpufrequtils                                   | 69 ------------------
 lfs/initscripts                                    |  1 +
 make.sh                                            |  1 -
 src/initscripts/system/{mountkernfs => cpupower}   | 82 ++++++++++++++--------
 .../0001-Only-x86-has-cpuid-instruction.patch      | 34 ---------
 ...cpufrequtils-aperf-Fix-MSR-read-on-32-bit.patch | 35 ---------
 ...-cpufrequtils-sysfs-increase-MAX_LINE_LEN.patch | 29 --------
 ...aperf-fix-compilation-on-x86-32-with-fPIC.patch | 46 ------------
 .../0007-po-add-missing-word-in-DE.patch           | 28 --------
 18 files changed, 85 insertions(+), 276 deletions(-)
 delete mode 100644 config/rootfiles/packages/cpufrequtils
 delete mode 100644 lfs/cpufrequtils
 copy src/initscripts/system/{mountkernfs => cpupower} (55%)
 delete mode 100644 src/patches/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch
 delete mode 100644 src/patches/cpufrequtils/0003-cpufrequtils-aperf-Fix-MSR-read-on-32-bit.patch
 delete mode 100644 src/patches/cpufrequtils/0005-cpufrequtils-sysfs-increase-MAX_LINE_LEN.patch
 delete mode 100644 src/patches/cpufrequtils/0006-aperf-fix-compilation-on-x86-32-with-fPIC.patch
 delete mode 100644 src/patches/cpufrequtils/0007-po-add-missing-word-in-DE.patch

Difference in files:
diff --git a/config/backup/backup.pl b/config/backup/backup.pl
index f49073b1ef..a227be841c 100644
--- a/config/backup/backup.pl
+++ b/config/backup/backup.pl
@@ -354,6 +354,7 @@ restore_backup() {
 		-e "s/^writepid .*/writepid \/var\/run\/openvpn-rw.pid/" \
 		-e "/ncp-disable/d" \
 		-e "s/^cipher (.*)/data-ciphers-fallback \1/" \
+		-e "s/^status .*/status /var/run/openvpn-rw.log/" \
 		-i /var/ipfire/ovpn/server.conf
 
 	# Change to the subnet topology
diff --git a/config/cfgroot/wireguard-functions.pl b/config/cfgroot/wireguard-functions.pl
index e6b5e08bad..1dc80f2c0d 100644
--- a/config/cfgroot/wireguard-functions.pl
+++ b/config/cfgroot/wireguard-functions.pl
@@ -488,6 +488,9 @@ sub parse_configuration($$) {
 		# Remove line breaks
 		chomp;
 
+		# Remove any carriage returns
+		$_ =~ s/\r$//;
+
 		# Search for section headers
 		if ($_ =~ m/^\[(\w+)\]$/) {
 			$section = $1;
@@ -570,6 +573,9 @@ sub parse_configuration($$) {
 
 				# Check if all networks are valid
 				foreach my $network (@networks) {
+					# Skip any IPv6 networks
+					next if ($network =~ m/:/);
+
 					unless (&Network::check_subnet($network)) {
 						push(@errormessages, $Lang::tr{'invalid network'} . " $network");
 					}
diff --git a/config/collectd/collectd.vpn b/config/collectd/collectd.vpn
index ca92947f80..f5963cffbd 100644
--- a/config/collectd/collectd.vpn
+++ b/config/collectd/collectd.vpn
@@ -1,5 +1,5 @@
 LoadPlugin openvpn
 
 <Plugin openvpn>
-StatusFile "/var/run/ovpnserver.log"
+StatusFile "/var/run/openvpn-rw.log"
 </Plugin>
diff --git a/config/rootfiles/common/aarch64/initscripts b/config/rootfiles/common/aarch64/initscripts
index 1fd1f076f3..fa43d4fe1d 100644
--- a/config/rootfiles/common/aarch64/initscripts
+++ b/config/rootfiles/common/aarch64/initscripts
@@ -18,6 +18,7 @@ etc/rc.d/init.d/collectd
 etc/rc.d/init.d/connectd
 etc/rc.d/init.d/conntrackd
 etc/rc.d/init.d/console
+etc/rc.d/init.d/cpupower
 etc/rc.d/init.d/dhcp
 etc/rc.d/init.d/dhcrelay
 etc/rc.d/init.d/fcron
@@ -183,6 +184,7 @@ etc/rc.d/rcsysinit.d/S42fsresize
 etc/rc.d/rcsysinit.d/S43mounttmpfs
 etc/rc.d/rcsysinit.d/S44smt
 etc/rc.d/rcsysinit.d/S45udev_retry
+etc/rc.d/rcsysinit.d/S46cpupower
 etc/rc.d/rcsysinit.d/S50cleanfs
 etc/rc.d/rcsysinit.d/S60setclock
 etc/rc.d/rcsysinit.d/S70console
diff --git a/config/rootfiles/common/riscv64/initscripts b/config/rootfiles/common/riscv64/initscripts
index 6942072576..a313591341 100644
--- a/config/rootfiles/common/riscv64/initscripts
+++ b/config/rootfiles/common/riscv64/initscripts
@@ -18,6 +18,7 @@ etc/rc.d/init.d/collectd
 etc/rc.d/init.d/connectd
 etc/rc.d/init.d/conntrackd
 etc/rc.d/init.d/console
+etc/rc.d/init.d/cpupower
 etc/rc.d/init.d/dhcp
 etc/rc.d/init.d/dhcrelay
 etc/rc.d/init.d/fcron
@@ -182,6 +183,7 @@ etc/rc.d/rcsysinit.d/S42fsresize
 etc/rc.d/rcsysinit.d/S43mounttmpfs
 etc/rc.d/rcsysinit.d/S44smt
 etc/rc.d/rcsysinit.d/S45udev_retry
+etc/rc.d/rcsysinit.d/S46cpupower
 etc/rc.d/rcsysinit.d/S50cleanfs
 etc/rc.d/rcsysinit.d/S60setclock
 etc/rc.d/rcsysinit.d/S70console
diff --git a/config/rootfiles/common/x86_64/initscripts b/config/rootfiles/common/x86_64/initscripts
index 6942072576..a313591341 100644
--- a/config/rootfiles/common/x86_64/initscripts
+++ b/config/rootfiles/common/x86_64/initscripts
@@ -18,6 +18,7 @@ etc/rc.d/init.d/collectd
 etc/rc.d/init.d/connectd
 etc/rc.d/init.d/conntrackd
 etc/rc.d/init.d/console
+etc/rc.d/init.d/cpupower
 etc/rc.d/init.d/dhcp
 etc/rc.d/init.d/dhcrelay
 etc/rc.d/init.d/fcron
@@ -182,6 +183,7 @@ etc/rc.d/rcsysinit.d/S42fsresize
 etc/rc.d/rcsysinit.d/S43mounttmpfs
 etc/rc.d/rcsysinit.d/S44smt
 etc/rc.d/rcsysinit.d/S45udev_retry
+etc/rc.d/rcsysinit.d/S46cpupower
 etc/rc.d/rcsysinit.d/S50cleanfs
 etc/rc.d/rcsysinit.d/S60setclock
 etc/rc.d/rcsysinit.d/S70console
diff --git a/config/rootfiles/core/197/filelists/files b/config/rootfiles/core/197/filelists/files
index 3d3aaa46ad..ba7fa34c41 100644
--- a/config/rootfiles/core/197/filelists/files
+++ b/config/rootfiles/core/197/filelists/files
@@ -1,4 +1,5 @@
 etc/httpd/conf/vhosts.d/ipfire-interface-ssl.conf
+etc/rc.d/init.d/cpupower
 etc/rc.d/init.d/firewall
 etc/rc.d/init.d/functions
 etc/rc.d/init.d/openvpn-n2n
@@ -9,6 +10,7 @@ etc/rc.d/rc3.d/S50openvpn-rw
 etc/rc.d/rc3.d/S51openvpn-n2n
 etc/rc.d/rc6.d/K10openvpn-rw
 etc/rc.d/rc6.d/K11openvpn-n2n
+etc/rc.d/rcsysinit.d/S46cpupower
 srv/web/ipfire/cgi-bin/ovpnmain.cgi
 srv/web/ipfire/cgi-bin/services.cgi
 srv/web/ipfire/cgi-bin/vulnerabilities.cgi
@@ -21,3 +23,5 @@ var/ipfire/langs/list
 var/ipfire/menu.d/20-status.menu
 var/ipfire/menu.d/40-services.menu
 var/ipfire/main/manualpages
+var/ipfire/ovpn/collectd.vpn
+var/ipfire/wireguard-functions.pl
diff --git a/config/rootfiles/core/197/update.sh b/config/rootfiles/core/197/update.sh
index 5ed9385ccc..2cb5e98cc9 100644
--- a/config/rootfiles/core/197/update.sh
+++ b/config/rootfiles/core/197/update.sh
@@ -42,6 +42,19 @@ rm -vf \
 	/usr/lib/libbtrfs.so.0.? \
 	/usr/lib/libbtrfsutil.so.1.?
 
+# Remove dropped packages
+for package in cpufrequtils; do
+        if [ -e "/opt/pakfire/db/installed/meta-${package}" ]; then
+                stop_service "${package}"
+                for i in $(</opt/pakfire/db/rootfiles/${package}); do
+                        rm -rfv "/${i}"
+                done
+        fi
+        rm -f "/opt/pakfire/db/installed/meta-${package}"
+        rm -f "/opt/pakfire/db/meta/meta-${package}"
+        rm -f "/opt/pakfire/db/rootfiles/${package}"
+done
+
 # Extract files
 extract_files
 
@@ -59,6 +72,7 @@ sed -r \
 	-e "s/^writepid .*/writepid \/var\/run\/openvpn-rw.pid/" \
 	-e "/ncp-disable/d" \
 	-e "s/^cipher (.*)/data-ciphers-fallback \1/" \
+	-e "s/^status .*/status /var/run/openvpn-rw.log/" \
 	-i /var/ipfire/ovpn/server.conf
 
 # Change to the subnet topology
@@ -88,6 +102,7 @@ fi
 /etc/init.d/unbound restart
 /etc/init.d/openvpn-n2n start
 /etc/init.d/openvpn-rw start
+/etc/init.d/collectd restart
 
 # Reload Apache2
 /etc/init.d/apache reload
diff --git a/config/rootfiles/packages/cpufrequtils b/config/rootfiles/packages/cpufrequtils
deleted file mode 100644
index a058f370be..0000000000
--- a/config/rootfiles/packages/cpufrequtils
+++ /dev/null
@@ -1,2 +0,0 @@
-etc/rc.d/init.d/cpufreq
-etc/rc.d/rc3.d/S18cpufreq
diff --git a/lfs/initscripts b/lfs/initscripts
index 99fe2f1be4..49215c0ae7 100644
--- a/lfs/initscripts
+++ b/lfs/initscripts
@@ -176,6 +176,7 @@ $(TARGET) :
 	ln -sf ../init.d/mounttmpfs		/etc/rc.d/rcsysinit.d/S43mounttmpfs
 	ln -sf ../init.d/smt			/etc/rc.d/rcsysinit.d/S44smt
 	ln -sf ../init.d/udev_retry		/etc/rc.d/rcsysinit.d/S45udev_retry
+	ln -sf ../init.d/cpupower		/etc/rc.d/rcsysinit.d/S46cpupower
 	ln -sf ../init.d/cleanfs		/etc/rc.d/rcsysinit.d/S50cleanfs
 	ln -sf ../init.d/setclock		/etc/rc.d/rcsysinit.d/S60setclock
 	ln -sf ../init.d/console		/etc/rc.d/rcsysinit.d/S70console
diff --git a/make.sh b/make.sh
index dc1feb37af..56fd9be22b 100755
--- a/make.sh
+++ b/make.sh
@@ -1903,7 +1903,6 @@ build_system() {
 	lfsmake2 hostapd
 	lfsmake2 syslinux
 	lfsmake2 tftpd
-	lfsmake2 cpufrequtils
 	lfsmake2 apcupsd
 	lfsmake2 fireperf
 	lfsmake2 iperf
diff --git a/lfs/cpufrequtils b/src/initscripts/system/cpupower
similarity index 50%
rename from lfs/cpufrequtils
rename to src/initscripts/system/cpupower
index 0383834b64..82b62a89b3 100644
--- a/lfs/cpufrequtils
+++ b/src/initscripts/system/cpupower
@@ -1,7 +1,8 @@
+#!/bin/sh
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2024  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2025 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        #
@@ -18,52 +19,71 @@
 #                                                                             #
 ###############################################################################
 
-###############################################################################
-# Definitions
-###############################################################################
-
-include Config
-
-SUMMARY    = compatiblity initscript to set ondemand/powersave gov via cpupower
-
-VER        = ipfire
-
-THISAPP    = cpufrequtils-$(VER)
-#DL_FILE    = $(THISAPP).tar.bz2
-#DL_FROM    = $(URL_IPFIRE)
-DIR_APP    = $(DIR_SRC)/$(THISAPP)
-TARGET     = $(DIR_INFO)/$(THISAPP)
-PROG       = cpufrequtils
-PAK_VER    = 15
-
-DEPS       =
-
-SERVICES   = 
-
-###############################################################################
-# Top-level Rules
-###############################################################################
-
-
-install : $(TARGET)
-
-check :
-
-download :
-
-b2 :
-
-dist:
-	@$(PAK)
-
-###############################################################################
-# Installation Details
-###############################################################################
-
-$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
-	@$(PREBUILD)
-
-	#install initscripts
-	$(call INSTALL_INITSCRIPTS,cpufreq)
-
-	@$(POSTBUILD)
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+# Load the configuration if it exists
+if [ -r "/etc/sysconfig/cpupower" ]; then
+	. /etc/sysconfig/cpupower
+fi
+
+# This function returns which governor to use
+find_governor() {
+	local driver
+
+	# If a governor has been configured, we just use that one
+	if [ -n "${GOVERNOR}" ]; then
+		echo "${GOVERNOR}"
+		return 0
+	fi
+
+	# Determine the driver
+	if [ -r "/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver" ]; then
+		driver="$(</sys/devices/system/cpu/cpu0/cpufreq/scaling_driver)"
+	fi
+
+	# Decide which governor to use based on the driver
+	case "${driver}" in
+		# If the driver could not be detected, we won't use anything
+		"")
+			;;
+
+		# Intel P-State only supports performace and powersave. The latter
+		# is rather implemented like ondemand in other cases.
+		intel_pstate)
+			echo "powersave"
+			;;
+
+		# For everything else use schedutil
+		*)
+			echo "schedutil"
+			;;
+	esac
+
+	return 0
+}
+
+set_governor() {
+	# Find the governor to use
+	local governor="$(find_governor)"
+
+	# If we could not detect a governor we don't have anything to do
+	if [ -z "${governor}" ]; then
+		return 0
+	fi
+
+	# Set the governor
+	cpupower frequency-set --governor "${governor}" >/dev/null
+}
+
+case "${1}" in
+	start)
+		boot_mesg "Enabling CPU Power Saving Features..."
+		set_governor
+		evaluate_retval
+		;;
+	*)
+		echo "Usage: ${0} {start}"
+		exit 1
+		;;
+esac
diff --git a/src/patches/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch b/src/patches/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch
deleted file mode 100644
index d3bc14d51b..0000000000
--- a/src/patches/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From f1b6bccf08f53295b2f7f448f28bbd37533c14a2 Mon Sep 17 00:00:00 2001
-From: Zhang Le <r0bertz@gentoo.org>
-Date: Sun, 18 Jul 2010 02:05:28 +0800
-Subject: [PATCH 1/8] Only x86 has cpuid instruction
-
-Signed-off-by: Zhang Le <r0bertz@gentoo.org>
-Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
----
- utils/aperf.c |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/utils/aperf.c b/utils/aperf.c
-index 627fb17..1c64501 100644
---- a/utils/aperf.c
-+++ b/utils/aperf.c
-@@ -68,11 +68,15 @@ struct avg_perf_cpu_info
- 
- static int cpu_has_effective_freq()
- {
-+#if defined(__i386__) || defined(__x86_64__)
- 	/* largest base level */
- 	if (cpuid_eax(0) < 6)
- 		return 0;
- 
- 	return cpuid_ecx(6) & 0x1;
-+#else
-+	return 0;
-+#endif
- }
- 
- /*
--- 
-1.7.10
-
diff --git a/src/patches/cpufrequtils/0003-cpufrequtils-aperf-Fix-MSR-read-on-32-bit.patch b/src/patches/cpufrequtils/0003-cpufrequtils-aperf-Fix-MSR-read-on-32-bit.patch
deleted file mode 100644
index 308e73a5b6..0000000000
--- a/src/patches/cpufrequtils/0003-cpufrequtils-aperf-Fix-MSR-read-on-32-bit.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From d4490efed068a552e8b67d52a0726458a224c9a0 Mon Sep 17 00:00:00 2001
-From: Frank Arnold <frank.arnold@amd.com>
-Date: Wed, 8 Dec 2010 17:39:14 +0100
-Subject: [PATCH 3/8] cpufrequtils aperf: Fix MSR read on 32-bit
-
-The cpufreq-aperf command does not work on 32-bit systems. The reason
-for that is a wrong count argument passed to the read() call. Instead
-of the buffer size, the size of the pointer to the buffer is used. On
-64-bit systems this just happened to work, because we need to read an
-8 byte value and a pointer has a size of 8 bytes on 64-bit. On 32-bit
-systems only 4 bytes are read, which then triggers the error path.
-
-Signed-off-by: Frank Arnold <frank.arnold@amd.com>
-Reviewed-by: Thomas Renninger <trenn@suse.de>
-Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
----
- utils/aperf.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utils/aperf.c b/utils/aperf.c
-index 1c64501..6302f5a 100644
---- a/utils/aperf.c
-+++ b/utils/aperf.c
-@@ -100,7 +100,7 @@ static int read_msr(int cpu, unsigned int idx, unsigned long long *val)
- 		return -1;
- 	if (lseek(fd, idx, SEEK_CUR) == -1)
- 		goto err;
--	if (read(fd, val, sizeof val) != sizeof *val)
-+	if (read(fd, val, sizeof *val) != sizeof *val)
- 		goto err;
- 	close(fd);
- 	return 0;
--- 
-1.7.10
-
diff --git a/src/patches/cpufrequtils/0005-cpufrequtils-sysfs-increase-MAX_LINE_LEN.patch b/src/patches/cpufrequtils/0005-cpufrequtils-sysfs-increase-MAX_LINE_LEN.patch
deleted file mode 100644
index 94088300f9..0000000000
--- a/src/patches/cpufrequtils/0005-cpufrequtils-sysfs-increase-MAX_LINE_LEN.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 9f2efa7bc6969c10562ac2c720d50ff77083e5c2 Mon Sep 17 00:00:00 2001
-From: Roman Vasiyarov <rvasiyarov@gmail.com>
-Date: Mon, 25 Apr 2011 21:34:23 +0400
-Subject: [PATCH 5/8] cpufrequtils sysfs: increase MAX_LINE_LEN
-
-larger sysfs data (>255 bytes) was truncated and thus used improperly
-
-Signed-off-by: Roman Vasiyarov <rvasiyarov@gmail.com>
-Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
----
- lib/sysfs.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/sysfs.c b/lib/sysfs.c
-index 4e0edab..24dd563 100644
---- a/lib/sysfs.c
-+++ b/lib/sysfs.c
-@@ -18,7 +18,7 @@
- #include "cpufreq.h"
- 
- #define PATH_TO_CPU "/sys/devices/system/cpu/"
--#define MAX_LINE_LEN 255
-+#define MAX_LINE_LEN 4096
- #define SYSFS_PATH_MAX 255
- 
- /* helper function to read file from /sys into given buffer */
--- 
-1.7.10
-
diff --git a/src/patches/cpufrequtils/0006-aperf-fix-compilation-on-x86-32-with-fPIC.patch b/src/patches/cpufrequtils/0006-aperf-fix-compilation-on-x86-32-with-fPIC.patch
deleted file mode 100644
index ee3adff75a..0000000000
--- a/src/patches/cpufrequtils/0006-aperf-fix-compilation-on-x86-32-with-fPIC.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 9085ce6f615d9d2e0182d3ce029b882835bd0a6b Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Tue, 26 Jul 2011 19:28:31 -0400
-Subject: [PATCH 6/8] aperf: fix compilation on x86-32 with -fPIC
-
-ebx is used to store the GOT pointer when compiled with -fPIC, so it's
-not usable by inline assembly.
-
-https://bugs.gentoo.org/375967
-
-Signed-off-by: Matt Turner <mattst88@gmail.com>
-Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
----
- utils/cpuid.h |   14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/utils/cpuid.h b/utils/cpuid.h
-index 2bac69a..53da789 100644
---- a/utils/cpuid.h
-+++ b/utils/cpuid.h
-@@ -5,9 +5,21 @@ static inline void __cpuid(unsigned int *eax, unsigned int *ebx,
- 				unsigned int *ecx, unsigned int *edx)
- {
- 	/* ecx is often an input as well as an output. */
--	asm volatile("cpuid"
-+	asm volatile(
-+#if defined(__i386__) && defined(__PIC__)
-+	    "push %%ebx\n"
-+	    "cpuid\n"
-+	    "movl %%ebx, %1\n"
-+	    "pop %%ebx\n"
-+#else
-+	    "cpuid\n"
-+#endif
- 	    : "=a" (*eax),
-+#if defined(__i386__) && defined(__PIC__)
-+	      "=r" (*ebx),
-+#else
- 	      "=b" (*ebx),
-+#endif
- 	      "=c" (*ecx),
- 	      "=d" (*edx)
- 	    : "0" (*eax), "2" (*ecx));
--- 
-1.7.10
-
diff --git a/src/patches/cpufrequtils/0007-po-add-missing-word-in-DE.patch b/src/patches/cpufrequtils/0007-po-add-missing-word-in-DE.patch
deleted file mode 100644
index d116791b14..0000000000
--- a/src/patches/cpufrequtils/0007-po-add-missing-word-in-DE.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 26ce99ab92ae9f1f367a58b7858a96f4e1e6814c Mon Sep 17 00:00:00 2001
-From: Dominik Brodowski <linux@dominikbrodowski.net>
-Date: Fri, 29 Jul 2011 19:40:46 +0200
-Subject: [PATCH 7/8] po: add missing word in DE
-
-Reported-by: Michael Basse
-Reported-by: <tkranz@zedat.fu-berlin.de>
-Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
----
- po/de.po |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/po/de.po b/po/de.po
-index 1da1f2b..ee793f5 100644
---- a/po/de.po
-+++ b/po/de.po
-@@ -304,7 +304,7 @@ msgid ""
- "modified\n"
- msgstr ""
- "  -c CPU, --cpu CPU        Nummer der CPU, deren Taktfrequenz-Einstellung\n"
--"                           werden soll\n"
-+"                           verändert werden soll\n"
- 
- #: utils/set.c:39
- #, c-format
--- 
-1.7.10
-


hooks/post-receive
--
IPFire 2.x development tree


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-21  9:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-21  9:28 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. f7565a885b55384a64edd8bd73079143a04da519 Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox