From 7e4f92e42759d1981455dfc232843e162f31b9a5 Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Fri, 7 Dec 2012 18:22:01 -0800 Subject: [PATCH 1/2] Debug support and additional fixes for community specfile. --- buildutils/torque.spec.in | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/buildutils/torque.spec.in b/buildutils/torque.spec.in index 984c25319a..cba53fdddf 100644 --- a/buildutils/torque.spec.in +++ b/buildutils/torque.spec.in @@ -16,6 +16,7 @@ ### Features disabled by default %bcond_with blcr %bcond_with cpuset +%bcond_with debug %bcond_with drmaa %bcond_with gui %bcond_with libcpuset @@ -33,6 +34,7 @@ ### Autoconf macro expansions %define ac_with_blcr --%{?with_blcr:en}%{!?with_blcr:dis}able-blcr %define ac_with_cpuset --%{?with_cpuset:en}%{!?with_cpuset:dis}able-cpuset +%define ac_with_debug --with%{!?with_debug:out}-debug CFLAGS="-O0 -g3" %define ac_with_drmaa --%{?with_drmaa:en}%{!?with_drmaa:dis}able-drmaa %define ac_with_gui --%{?with_gui:en}%{!?with_gui:dis}able-gui --with%{!?with_gui:out}-tcl %define ac_with_munge --%{?with_munge:en}%{!?with_munge:dis}able-munge-auth @@ -57,18 +59,22 @@ %{!?torque_server:%global torque_server localhost} %{!?sendmail_path:%global sendmail_path %{_sbindir}/sendmail} -### Do not strip executables -#define __os_install_post /usr/lib/rpm/brp-compress +### Do not strip executables when debugging. +%if %{with debug} +%global __os_install_post /usr/lib/rpm/brp-compress +%global __debug_install_post %{nil} +%global debug_package %{nil} +%endif ### Handle logic for snapshots %define tarversion @SPEC_VERSION@ #define snap 0 %if %{?snap}0 %{expand:%%define version %(echo %{tarversion} | sed 's/-snap\..*$//')} -%{expand:%%define release 0.cri.snap.%(echo %{tarversion} | sed 's/^.*-snap\.//')} +%{expand:%%define release 0.adaptive.snap.%(echo %{tarversion} | sed 's/^.*-snap\.//')}.0%{?dist}} %else %define version %{tarversion} -%define release 1.cri +%define release 1.adaptive%{?dist} %endif Name: @SPEC_NAME@ @@ -172,7 +178,8 @@ CXXFLAGS="%{?cxxflags:%{cxxflags}}%{!?cxxflags:$RPM_OPT_FLAGS}" export CFLAGS CXXFLAGS %configure --includedir=%{_includedir}/%{name} --with-default-server=%{torque_server} \ - --with-server-home=%{torque_home} --with-sendmail=%{sendmail_path} \ + --with-server-home=%{torque_home} %{ac_with_debug} %{ac_with_libcpuset} \ + --with-sendmail=%{sendmail_path} %{ac_with_numa} %{ac_with_memacct} %{ac_with_top} \ --disable-dependency-tracking %{ac_with_gui} %{ac_with_scp} %{ac_with_syslog} \ --disable-gcc-warnings %{ac_with_munge} %{ac_with_pam} %{ac_with_drmaa} \ --disable-qsub-keep-override %{ac_with_blcr} %{ac_with_cpuset} %{ac_with_spool} %{?acflags} From e02f50acaae82626d91e39f1c2d19b02322a3d2e Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Fri, 7 Dec 2012 19:00:17 -0800 Subject: [PATCH 2/2] Fix typo in macro expansion. --- buildutils/torque.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildutils/torque.spec.in b/buildutils/torque.spec.in index cba53fdddf..31f2f56898 100644 --- a/buildutils/torque.spec.in +++ b/buildutils/torque.spec.in @@ -71,7 +71,7 @@ #define snap 0 %if %{?snap}0 %{expand:%%define version %(echo %{tarversion} | sed 's/-snap\..*$//')} -%{expand:%%define release 0.adaptive.snap.%(echo %{tarversion} | sed 's/^.*-snap\.//')}.0%{?dist}} +%{expand:%%define release 0.adaptive.snap.%(echo %{tarversion} | sed 's/^.*-snap\.//').0%{?dist}} %else %define version %{tarversion} %define release 1.adaptive%{?dist}