[clustermon] Dear Maintainer: I have fixed this package with a nasty hack. You should take some time to learn abo

Tom Callaway spot at fedoraproject.org
Wed Oct 26 20:47:32 UTC 2011


commit f26dd5839c304a2e5ff81d31da7c6749b5c41cce
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Wed Oct 26 16:47:30 2011 -0400

    Dear Maintainer: I have fixed this package with a nasty hack. You should take some time to learn about how to make sane Makefiles, preferrably, ones that do not inherit exponentially from every Makefile above it.

 clustermon.spec             |   30 ++++++++++----------------
 ricci-0.18.7-make-fix.patch |   48 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 18 deletions(-)
---
diff --git a/clustermon.spec b/clustermon.spec
index 022fe3a..b51bdc4 100644
--- a/clustermon.spec
+++ b/clustermon.spec
@@ -17,16 +17,13 @@
 
 Name: clustermon
 Version: 0.18.7
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2
 URL: http://sources.redhat.com/cluster/conga
-
 Group: System Environment/Base
 Summary: Monitoring and management of Red Hat Cluster Suite
-
 Source0: http://people.redhat.com/rmccabe/conga/fedora/src/ricci-%{version}.tar.bz2
-Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
+Patch0: ricci-0.18.7-make-fix.patch
 BuildRequires: clusterlib-devel
 BuildRequires: libxml2-devel openssl-devel dbus-devel pam-devel pkgconfig
 BuildRequires: net-snmp-devel tog-pegasus-devel
@@ -36,6 +33,7 @@ This package contains Red Hat Cluster Suite SNMP/CIM module/agent/provider.
 
 %prep
 %setup -q -n ricci-%{version}
+%patch0 -p1 -b .hack
 
 %build
 sed -i -e 's/^VERSION.*/VERSION=%{version}/' make/version.in ricci/make/version.in
@@ -48,12 +46,8 @@ sed -i -e 's/^RELEASE.*/RELEASE=%{release}/' make/version.in ricci/make/version.
 make %{?_smp_mflags} clustermon
 
 %install
-rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install_clustermon
 
-%clean
-rm -rf %{buildroot}
-
 ### cluster module ###
 
 %package -n modcluster
@@ -69,7 +63,6 @@ Requires(postun): initscripts
 Management module for Red Hat Cluster Suite.
 
 %files -n modcluster
-%defattr(-,root,root)
 %config(noreplace)	%{_sysconfdir}/oddjobd.conf.d/modcluster.oddjob.conf
 %config(noreplace)	%{_sysconfdir}/dbus-1/system.d/modcluster.systembus.conf
 			%{_sysconfdir}/rc.d/init.d/modclusterd
@@ -120,11 +113,10 @@ Requires(postun): initscripts
 SNMP agent for Red Hat Cluster Suite.
 
 %files -n cluster-snmp
-%defattr(-,root,root)
-			%{_libdir}/cluster-snmp/
-			%{_datadir}/snmp/mibs/REDHAT-MIB
-			%{_datadir}/snmp/mibs/REDHAT-CLUSTER-MIB
-			%{_docdir}/cluster-snmp-%{version}/
+%{_libdir}/cluster-snmp/
+%{_datadir}/snmp/mibs/REDHAT-MIB
+%{_datadir}/snmp/mibs/REDHAT-CLUSTER-MIB
+%{_docdir}/cluster-snmp-%{version}/
 
 %post -n cluster-snmp
 /sbin/service snmpd condrestart >&/dev/null
@@ -154,9 +146,8 @@ Requires(postun): initscripts
 CIM provider for Red Hat Enterprise Linux Cluster Suite.
 
 %files -n cluster-cim
-%defattr(-,root,root)
-			%{PEGASUS_PROVIDERS_DIR}/libRedHatClusterProvider.so
-			%{_docdir}/cluster-cim-%{version}/
+%{PEGASUS_PROVIDERS_DIR}/libRedHatClusterProvider.so
+%{_docdir}/cluster-cim-%{version}/
 
 %post -n cluster-cim
 # pegasus might not be running, don't fail
@@ -173,6 +164,9 @@ exit 0
 
 
 %changelog
+* Wed Oct 26 2011 Tom Callaway <spot at fedoraproject.org> - 0.18.7-3
+- hack this beast back to life
+
 * Mon Sep 12 2011 Ryan McCabe <rmccabe at redhat.com> - 0.18.7-2
 - Rebuild for snmp soname change
 
diff --git a/ricci-0.18.7-make-fix.patch b/ricci-0.18.7-make-fix.patch
new file mode 100644
index 0000000..39da278
--- /dev/null
+++ b/ricci-0.18.7-make-fix.patch
@@ -0,0 +1,48 @@
+diff -up ricci-0.18.7/ricci/modules/cluster/clumon/src/cim-provider/Makefile.hack ricci-0.18.7/ricci/modules/cluster/clumon/src/cim-provider/Makefile
+--- ricci-0.18.7/ricci/modules/cluster/clumon/src/cim-provider/Makefile.hack	2011-10-26 16:43:36.813225990 -0400
++++ ricci-0.18.7/ricci/modules/cluster/clumon/src/cim-provider/Makefile	2011-10-26 16:45:00.553186489 -0400
+@@ -69,6 +69,12 @@ endif
+ 
+ INCLUDE += -I ../include
+ CXXFLAGS += $(PEGASUS_CXXFLAGS) -DPARANOIA=$(PARANOID)
++# We need to reset the LDFLAGS here. It's full of nasty junk at this point.
++# This is hackish beyond belief, but so is how this source code uses makefiles.
++LDFLAGS = -fPIC -lpthread -Wl,-z,relro
++LDFLAGS += `pkg-config --libs libxml-2.0`
++LDFLAGS += `pkg-config --libs openssl`
++LDFLAGS += -lfence
+ LDFLAGS += -shared -ldl -lcrypt -lcman
+ 
+ ifeq ($(PARANOID), 1)
+diff -up ricci-0.18.7/ricci/modules/cluster/clumon/src/daemon/Makefile.hack ricci-0.18.7/ricci/modules/cluster/clumon/src/daemon/Makefile
+--- ricci-0.18.7/ricci/modules/cluster/clumon/src/daemon/Makefile.hack	2011-02-09 19:05:41.000000000 -0500
++++ ricci-0.18.7/ricci/modules/cluster/clumon/src/daemon/Makefile	2011-10-26 16:42:54.229754615 -0400
+@@ -22,6 +22,12 @@ OBJECTS = main.o \
+ 
+ INCLUDE += -I../include
+ CXXFLAGS += -DPARANOIA=$(PARANOID)
++# We need to reset the LDFLAGS here. It's full of nasty junk at this point.
++# This is hackish beyond belief, but so is how this source code uses makefiles.
++LDFLAGS = -fPIC -lpthread -Wl,-z,relro
++LDFLAGS += `pkg-config --libs libxml-2.0` 
++LDFLAGS += `pkg-config --libs openssl` 
++LDFLAGS += -lcman -lfence 
+ LDFLAGS += ../common/*.o -lrt
+ 
+ ifeq ($(PARANOID), 1)
+diff -up ricci-0.18.7/ricci/modules/cluster/clumon/src/snmp-agent/Makefile.hack ricci-0.18.7/ricci/modules/cluster/clumon/src/snmp-agent/Makefile
+--- ricci-0.18.7/ricci/modules/cluster/clumon/src/snmp-agent/Makefile.hack	2011-02-09 19:05:41.000000000 -0500
++++ ricci-0.18.7/ricci/modules/cluster/clumon/src/snmp-agent/Makefile	2011-10-26 16:42:54.229754615 -0400
+@@ -19,6 +19,12 @@ SNMP_LDLAGS = `net-snmp-config --libs`
+ INCLUDE += -I ../include
+ CFLAGS += -fPIC $(SNMP_CFLAGS) -DPARANOIA=$(PARANOID)
+ CXXFLAGS += -fPIC $(SNMP_CFLAGS) -DPARANOIA=$(PARANOID)
++# We need to reset the LDFLAGS here. It's full of nasty junk at this point.
++# This is hackish beyond belief, but so is how this source code uses makefiles.
++LDFLAGS = -Wl,-z,relro -lpthread
++LDFLAGS += `pkg-config --libs libxml-2.0`
++LDFLAGS += `pkg-config --libs openssl`
++LDFLAGS += -lfence
+ LDFLAGS += -fPIC -shared $(SNMP_LDLAGS) -lrt
+ 
+ ifeq ($(PARANOID), 1)


More information about the scm-commits mailing list