[packages/powerman] - up to 2.4.4
baggins
baggins at pld-linux.org
Wed Dec 31 02:17:36 CET 2025
commit abb76691d01ae4353374ca0b094a4eee507d3f9a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Dec 31 04:17:26 2025 +0100
- up to 2.4.4
lex.patch | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
powerman.spec | 19 +++++++++------
2 files changed, 89 insertions(+), 8 deletions(-)
---
diff --git a/powerman.spec b/powerman.spec
index 2cee6ec..933df3d 100644
--- a/powerman.spec
+++ b/powerman.spec
@@ -8,13 +8,14 @@
Summary: PowerMan - centralized power control for clusters
Summary(pl.UTF-8): PowerMan - scentralizowane zarządzanie zasilaniem dla klastrów
Name: powerman
-Version: 2.3.27
+Version: 2.4.4
Release: 1
License: GPL v2+
Group: Applications/System
#Source0Download: https://github.com/chaos/powerman/releases
Source0: https://github.com/chaos/powerman/releases/download/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: da3b75d05b42396a1f1167b5490454f9
+# Source0-md5: 2995c10b1588186abc7bd7c6dd24f0f6
+Patch0: lex.patch
URL: https://github.com/chaos/powerman
BuildRequires: bison
BuildRequires: curl-devel
@@ -27,6 +28,9 @@ BuildRequires: pkgconfig
Requires: %{name}-libs = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+# Breaks assert() calls
+%define filterout_cpp -DNDEBUG
+
%description
PowerMan is a tool for manipulating remote power control (RPC) devices
from a central location. Several RPC varieties are supported natively
@@ -89,6 +93,7 @@ Statyczna biblioteka PowerMan.
%prep
%setup -q
+%patch -P0 -p1
%build
%configure \
@@ -126,7 +131,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc DISCLAIMER NEWS
+%doc DISCLAIMER NEWS.md README.md
%attr(755,root,root) %{_bindir}/pm
%attr(755,root,root) %{_bindir}/powerman
%attr(755,root,root) %{_sbindir}/httppower
@@ -134,7 +139,6 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_sbindir}/powermand
%attr(755,root,root) %{_sbindir}/redfishpower
%attr(755,root,root) %{_sbindir}/snmppower
-%attr(755,root,root) %{_sbindir}/vpcd
%dir %{_sysconfdir}/powerman
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/powerman/powerman.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/powerman/*.dev
@@ -149,7 +153,6 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/plmpower.8*
%{_mandir}/man8/powermand.8*
%{_mandir}/man8/redfishpower.8*
-%{_mandir}/man8/vpcd.8*
%files stonith
%defattr(644,root,root,755)
@@ -157,12 +160,12 @@ rm -rf $RPM_BUILD_ROOT
%files libs
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libpowerman.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpowerman.so.0
+%{_libdir}/libpowerman.so.*.*.*
+%ghost %{_libdir}/libpowerman.so.0
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libpowerman.so
+%{_libdir}/libpowerman.so
%{_includedir}/libpowerman.h
%{_pkgconfigdir}/libpowerman.pc
%{_mandir}/man3/libpowerman.3*
diff --git a/lex.patch b/lex.patch
new file mode 100644
index 0000000..b92ad0f
--- /dev/null
+++ b/lex.patch
@@ -0,0 +1,78 @@
+From b2b57b5cb63f68d19c8504221099214e8c81c09a Mon Sep 17 00:00:00 2001
+From: Jeremy Sowden <jeremy at azazel.net>
+Date: Thu, 11 Sep 2025 17:45:13 +0100
+Subject: [PATCH] Fix function prototypes with empty parameter lists
+
+Pre-ANSI function declarators which do not declare their parameters have been
+removed in C23 and the syntax reused for declaring functions with no parameters
+(like C++). GCC 15 defaults to C23, so these declarators may cause compilation
+failures. For example:
+
+ parse_tab.c: In function 'yyparse':
+ parse_tab.c:2117:7: error: too many arguments to function 'yyerror'; expected 0, have 1
+ 2117 | yyerror (YY_("syntax error"));
+ | ^~~~~~~
+ parse_tab.y:105:6: note: declared here
+ 105 | void yyerror();
+ | ^~~~~~~
+ parse_tab.c:2228:3: error: too many arguments to function 'yyerror'; expected 0, have 1
+ 2228 | yyerror (YY_("memory exhausted"));
+ | ^~~~~~~
+ parse_tab.y:105:6: note: declared here
+ 105 | void yyerror();
+ | ^~~~~~~
+
+Explicitly specify the parameters of `yyerror` and `yylex`.
+
+Signed-off-by: Jeremy Sowden <jeremy at azazel.net>
+---
+ src/powerman/parse_lex.l | 4 ++--
+ src/powerman/parse_tab.y | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/powerman/parse_lex.l b/src/powerman/parse_lex.l
+index 46991fc1..1e4c8422 100644
+--- a/src/powerman/parse_lex.l
++++ b/src/powerman/parse_lex.l
+@@ -27,7 +27,7 @@ extern YYSTYPE yylval;
+ #include "xmalloc.h"
+ #include "error.h"
+ #include "parse_util.h"
+-extern void yyerror();
++extern void yyerror(const char *);
+
+ #define YY_NO_INPUT /* silence compiler warnings about unused input() */
+ #define MAX_INCLUDE_DEPTH 10
+@@ -109,7 +109,7 @@ static List line_ptrs;
+ *string_buf_ptr++ = '\v';
+ }
+ "\n" {
+- yyerror();
++ yyerror(NULL);
+ }
+ \\[0-9][0-9][0-9] {
+ *string_buf_ptr++ = strtol(&yytext[1], NULL, 8);
+diff --git a/src/powerman/parse_tab.y b/src/powerman/parse_tab.y
+index 65b9660b..ca9ef5e9 100644
+--- a/src/powerman/parse_tab.y
++++ b/src/powerman/parse_tab.y
+@@ -101,8 +101,8 @@ static long _strtolong(char *str);
+ static double _strtodouble(char *str);
+ static void _doubletotv(struct timeval *tv, double val);
+
+-extern int yylex();
+-void yyerror();
++extern int yylex(void);
++void yyerror(const char *msg);
+
+
+ static List device_specs = NULL; /* list of Spec's */
+@@ -836,7 +836,7 @@ static void _warnmsg(char *msg)
+ err(false, "warning: %s: %s::%d", msg, scanner_file(), scanner_line());
+ }
+
+-void yyerror()
++void yyerror(const char *msg)
+ {
+ _errormsg("parse error");
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/powerman.git/commitdiff/abb76691d01ae4353374ca0b094a4eee507d3f9a
More information about the pld-cvs-commit
mailing list