From c8f281c667d058557be52dc70fe0756bcc06b08db75af113cd332a9f1c75b786 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sun, 25 Feb 2007 22:32:45 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nut?expand=0&rev=2 --- nut-2.0.4-setcmd-literal.patch | 11 +++++++++++ nut.changes | 6 ++++++ nut.spec | 17 +++++++++++------ 3 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 nut-2.0.4-setcmd-literal.patch diff --git a/nut-2.0.4-setcmd-literal.patch b/nut-2.0.4-setcmd-literal.patch new file mode 100644 index 0000000..3805d50 --- /dev/null +++ b/nut-2.0.4-setcmd-literal.patch @@ -0,0 +1,11 @@ +--- drivers/gamatronic.c ++++ drivers/gamatronic.c +@@ -125,7 +125,7 @@ + void sec_setinfo(int varnum, char *value) + { + +- if (sec_varlist[varnum].setcmd != ""){ ++ if (*sec_varlist[varnum].setcmd){/*Not empty*/ + + if (sec_varlist[varnum].flags == FLAG_STRING) { + dstate_setinfo(sec_varlist[varnum].setcmd,"%s", value); diff --git a/nut.changes b/nut.changes index ebce50c..c352dfd 100644 --- a/nut.changes +++ b/nut.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 20 16:57:57 CET 2007 - mvaner@suse.cz + +- Comparison with string literal (bug #232417) + - setcmd-literal.patch + ------------------------------------------------------------------- Mon Sep 18 15:24:30 CEST 2006 - anosek@suse.cz diff --git a/nut.spec b/nut.spec index 784c1f4..93916ef 100644 --- a/nut.spec +++ b/nut.spec @@ -1,7 +1,7 @@ # # spec file for package nut (Version 2.0.4) # -# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -15,7 +15,7 @@ BuildRequires: apache2-devel gd-devel libusb net-snmp-devel openssl-devel tcpd- %if %suse_version > 1000 BuildRequires: dbus-1 %endif -License: GPL +License: GNU General Public License (GPL) Group: Hardware/UPS Provides: smartups Requires: /usr/bin/pgrep /usr/bin/pkill /usr/bin/grep /usr/bin/fgrep /usr/sbin/lsusb /usr/bin/readlink @@ -27,7 +27,7 @@ Conflicts: apcupsd Autoreqprov: on Summary: UPS Monitoring Software Version: 2.0.4 -Release: 3 +Release: 41 URL: http://www.networkupstools.org/ Source: %{name}-%{version}.tar.bz2 Source1: upsd.init @@ -38,6 +38,7 @@ Patch: nut-preconfig.patch Patch1: %{name}-%{version}-overflow.patch Patch3: nut-notifyflag.patch Patch4: nut-powersave.patch +Patch5: %{name}-%{version}-setcmd-literal.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq /bin/chown /bin/chmod /usr/bin/fgrep /usr/bin/grep /usr/bin/sed /usr/bin/head /usr/bin/md5sum %define apache_serverroot %(/usr/sbin/apxs2 -q datadir 2>/dev/null || /usr/sbin/apxs -q PREFIX) @@ -98,6 +99,7 @@ mv upsd-early-powerdown.init upsd-early-powerdown %if %suse_version > 1000 %patch4 %endif +%patch5 USB_IDS=$(sed -n