Sync from SUSE:SLFO:Main intel-lpmd revision 6bec12b599236ac64013c96efaa880e6

This commit is contained in:
Adrian Schröter 2025-02-07 18:29:01 +01:00
commit 6c77b58519
5 changed files with 153 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,43 @@
From: trenn@suse.com
Date: 2024-11-27 10:23:38 +0000
gcc7's cpuid.h is missing an include guard, and since the file does get included
at least twice, compilation fails under Leap-15 gcc7. Work around it by removing
some includes locally.
Index: intel-lpmd-0.0.8/src/lpmd_hfi.c
===================================================================
--- intel-lpmd-0.0.8.orig/src/lpmd_hfi.c
+++ intel-lpmd-0.0.8/src/lpmd_hfi.c
@@ -37,7 +37,6 @@
#include <sys/un.h>
#include <errno.h>
#include <getopt.h>
-#include <cpuid.h>
#include <sched.h>
#include <dirent.h>
#include <ctype.h>
Index: intel-lpmd-0.0.8/src/lpmd_irq.c
===================================================================
--- intel-lpmd-0.0.8.orig/src/lpmd_irq.c
+++ intel-lpmd-0.0.8/src/lpmd_irq.c
@@ -33,7 +33,6 @@
#include <sys/un.h>
#include <errno.h>
#include <getopt.h>
-#include <cpuid.h>
#include <sched.h>
#include <dirent.h>
#include <ctype.h>
Index: intel-lpmd-0.0.8/src/lpmd_socket.c
===================================================================
--- intel-lpmd-0.0.8.orig/src/lpmd_socket.c
+++ intel-lpmd-0.0.8/src/lpmd_socket.c
@@ -36,7 +36,6 @@
#include <sys/un.h>
#include <errno.h>
#include <getopt.h>
-#include <cpuid.h>
#include <sched.h>
#include <dirent.h>
#include <ctype.h>

14
intel-lpmd.changes Normal file
View File

@ -0,0 +1,14 @@
-------------------------------------------------------------------
Wed Nov 27 10:12:23 UTC 2024 - Thomas Renninger <trenn@suse.de>
- Avoid double include of cpuid.h and fix older distro builds
(could be a gcc7 vs gcc14 issue).
Add fix_cpuid_double_include.patch.
- Only build for x86 and, as it's an Intel tool, it's probably only
intended to run and work on x86 machines, add:
ExclusiveArch: %ix86 x86_64
-------------------------------------------------------------------
Thu Oct 17 00:15:04 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Initial package (version 0.0.8) for build.opensuse.org

70
intel-lpmd.spec Normal file
View File

@ -0,0 +1,70 @@
#
# spec file for package intel-lpmd
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: intel-lpmd
Version: 0.0.8
Release: 0
Summary: Intel Low Power Mode Daemon
License: GPL-2.0-or-later
Group: Hardware/Other
URL: https://github.com/intel/intel-lpmd
Source: https://github.com/intel/intel-lpmd/archive/refs/tags/v%version.tar.gz
Patch0: fix_cpuid_double_include.patch
BuildRequires: automake
BuildRequires: pkg-config
BuildRequires: gtk-doc >= 1.11
BuildRequires: pkgconfig(glib-2.0) >= 2.10.0
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.22
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(libnl-3.0)
BuildRequires: pkgconfig(libnl-genl-3.0)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(upower-glib)
BuildRequires: pkgconfig(libxml-2.0) >= 2.4
ExclusiveArch: %ix86 x86_64
%description
A daemon used to optimize active idle power. It selects a set of most
power efficient CPU cores based on configuration file or CPU
topology. Based on system utilization and other hints, it puts the
system into Low Power Mode by activating the power efficient CPUs and
disabling the rest, and restores the system from Low Power Mode by
activating all CPUs.
%prep
%autosetup -p1
%build
autoreconf -fi
%configure --disable-werror
%make_build
%install
%make_install
find | grep xml
rm -Rf "%buildroot/etc"
%files
%_bindir/intel*
%_sbindir/intel*
%_mandir/man*/*.[0-9]*
%doc data/intel_lpmd_config.xml data/intel_lpmd_config_F6_M170.xml README.md
%license COPYING
%changelog

BIN
v0.0.8.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.