[PATCH 0/5] rhbz#737137 - Various Sysconfig Improvements.
by Russell Bryant
Greetings,
This patchset is for the sysconfig API and QMF agent. The meat of the
changes are in patch 3/5, where the core API gets reworked to utilize
the services library for running a task in the background and geting
an asynchronous callback with the result.
This is to ensure that the result of executing puppet is known and
is reported back. Previously, we always reported success.
[PATCH 1/5] services: Don't make array length assumption.
[PATCH 2/5] sysconfig: create sysconfig_internal.h
[PATCH 3/5] sysconfig: Pay attention to results from puppet.
[PATCH 4/5] sysconfig: updates to unit tests
[PATCH 5/5] sysconfig: Make sure key is non-empty.
Thanks,
--
Russell Bryant
12 years, 8 months
[PATCH] - Fix hostname property display when upgrading matahari v2
by Adam Stokes
- Changes made within Matahari codebase from 0.4.0
to 0.4.2 depended on some code modification within
the sigar library. If just updating matahari and not
sigar the agents would not display the hostname in
the properties field. Making sure sigar is at version
1.6.5-0.3 or above remedies this situation.
Resolves rhbz737541
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
matahari.spec.in | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/matahari.spec.in b/matahari.spec.in
index 83b18de..8ce32cc 100644
--- a/matahari.spec.in
+++ b/matahari.spec.in
@@ -89,6 +89,7 @@ Optional AMQP Broker for Matahari
License: GPLv2+
Summary: C libraries used by Matahari agents
Group: Applications/System
+Requires: sigar > 1.6.5-0.2
%description lib
C libraries used by Matahari agents
--
1.7.6.1
12 years, 8 months
[PATCH] - Fix hostname property display when upgrading matahari
by Adam Stokes
- Changes made within Matahari codebase from 0.4.0
to 0.4.2 depended on some code modification within
the sigar library. If just updating matahari and not
sigar the agents would not display the hostname in
the properties field. Making sure sigar is at version
1.6.5-0.3 or above remedies this situation.
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
matahari.spec.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/matahari.spec.in b/matahari.spec.in
index 83b18de..bedfe11 100644
--- a/matahari.spec.in
+++ b/matahari.spec.in
@@ -44,7 +44,7 @@ BuildRequires: libudev-devel
BuildRequires: gcc-c++
BuildRequires: pcre-devel
BuildRequires: glib2-devel
-BuildRequires: sigar-devel
+BuildRequires: sigar-devel > 1.6.5-0.2
BuildRequires: libcurl-devel
BuildRequires: cxxtest
BuildRequires: help2man
--
1.7.6.1
12 years, 8 months
[PATCH] - Build require sigar > 1.6.5-0.2
by Adam Stokes
- Resolves: rhbz 737541 upgrade from matahari 0.4.0
to 0.4.2 does not resolve hostname.
Signed-off-by: Adam Stokes <astokes(a)fedoraproject.org>
---
matahari.spec.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/matahari.spec.in b/matahari.spec.in
index 83b18de..bedfe11 100644
--- a/matahari.spec.in
+++ b/matahari.spec.in
@@ -44,7 +44,7 @@ BuildRequires: libudev-devel
BuildRequires: gcc-c++
BuildRequires: pcre-devel
BuildRequires: glib2-devel
-BuildRequires: sigar-devel
+BuildRequires: sigar-devel > 1.6.5-0.2
BuildRequires: libcurl-devel
BuildRequires: cxxtest
BuildRequires: help2man
--
1.7.6.1
12 years, 8 months
[PATCH] Make config.h handling more consistent.
by Russell Bryant
I noticed that the handling of config.h was fairly inconsistent across
the source. This patch makes things more consistent:
1) Include config.h first and in every source file.
2) Always include config.h, not conditionally on WIN32 as was done in
some files.
3) Define _GNU_SOURCE in config.h so it is defined for every file, and
not just in a few.
4) Remove MATAHARI_PORT from config.h, it's in matahari.h.
Signed-off-by: Russell Bryant <rbryant(a)redhat.com>
---
src/broker/broker_linux.c | 2 ++
src/host/host-dbus.c | 2 ++
src/host/host-qmf.cpp | 2 --
src/include/config.h.in | 4 +++-
src/lib/dnssrv.c | 2 --
src/lib/dnssrv_linux.c | 2 ++
src/lib/dnssrv_windows.c | 2 ++
src/lib/host.c | 2 --
src/lib/host_windows.c | 2 ++
src/lib/mainloop.c | 4 +---
src/lib/mh_agent.cpp | 2 ++
src/lib/mh_dbus_common.c | 2 ++
src/lib/network.c | 4 +---
src/lib/network_linux.c | 5 ++++-
src/lib/network_windows.c | 4 ++--
src/lib/services.c | 4 +++-
src/lib/services_linux.c | 3 ++-
src/lib/services_windows.c | 3 +++
src/lib/sysconfig.c | 2 ++
src/lib/sysconfig_linux.c | 2 --
src/lib/sysconfig_windows.c | 2 ++
src/lib/utilities.c | 1 -
src/network/network-dbus.c | 2 ++
src/network/network-qmf.cpp | 2 --
src/service/service-dbus.c | 2 ++
src/service/service-qmf-console.cpp | 2 --
src/service/service-qmf.cpp | 2 --
src/sysconfig/sysconfig-console.cpp | 2 --
src/sysconfig/sysconfig-qmf.cpp | 2 --
29 files changed, 41 insertions(+), 31 deletions(-)
diff --git a/src/broker/broker_linux.c b/src/broker/broker_linux.c
index 6dd98e8..997734f 100644
--- a/src/broker/broker_linux.c
+++ b/src/broker/broker_linux.c
@@ -16,6 +16,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
+
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
diff --git a/src/host/host-dbus.c b/src/host/host-dbus.c
index d01cc97..4f7e51e 100644
--- a/src/host/host-dbus.c
+++ b/src/host/host-dbus.c
@@ -20,6 +20,8 @@
*
*/
+#include "config.h"
+
#include <stdio.h>
#include <string.h>
diff --git a/src/host/host-qmf.cpp b/src/host/host-qmf.cpp
index 7235655..cac7d43 100644
--- a/src/host/host-qmf.cpp
+++ b/src/host/host-qmf.cpp
@@ -22,9 +22,7 @@
* \brief Host QMF Agent
*/
-#ifndef WIN32
#include "config.h"
-#endif
#include <set>
#include "matahari/agent.h"
diff --git a/src/include/config.h.in b/src/include/config.h.in
index fd248ad..48e2e9d 100644
--- a/src/include/config.h.in
+++ b/src/include/config.h.in
@@ -11,6 +11,8 @@
#define LOCAL_STATE_DIR "@localstatedir@"
-#define MATAHARI_PORT @MATAHARI_PORT@
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
#endif
diff --git a/src/lib/dnssrv.c b/src/lib/dnssrv.c
index a287e1b..4f346cb 100644
--- a/src/lib/dnssrv.c
+++ b/src/lib/dnssrv.c
@@ -16,9 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef WIN32
#include "config.h"
-#endif
#include <assert.h>
#include <glib.h>
diff --git a/src/lib/dnssrv_linux.c b/src/lib/dnssrv_linux.c
index 3a18c8e..3c5329d 100644
--- a/src/lib/dnssrv_linux.c
+++ b/src/lib/dnssrv_linux.c
@@ -17,6 +17,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
+
#include <string.h>
#include <errno.h>
#include <glib.h>
diff --git a/src/lib/dnssrv_windows.c b/src/lib/dnssrv_windows.c
index 78e1507..a1a6de1 100644
--- a/src/lib/dnssrv_windows.c
+++ b/src/lib/dnssrv_windows.c
@@ -17,6 +17,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
+
#include "matahari/dnssrv.h"
#include <windows.h>
diff --git a/src/lib/host.c b/src/lib/host.c
index 521189c..2379d44 100644
--- a/src/lib/host.c
+++ b/src/lib/host.c
@@ -16,9 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef WIN32
#include "config.h"
-#endif
#ifdef __linux__
#include <sys/sysinfo.h>
diff --git a/src/lib/host_windows.c b/src/lib/host_windows.c
index 149cc2a..077f1bd 100644
--- a/src/lib/host_windows.c
+++ b/src/lib/host_windows.c
@@ -16,6 +16,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
+
#include <winsock.h>
#include <windows.h>
#include <winbase.h>
diff --git a/src/lib/mainloop.c b/src/lib/mainloop.c
index f739048..a832376 100644
--- a/src/lib/mainloop.c
+++ b/src/lib/mainloop.c
@@ -16,9 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
+#include "config.h"
#include <stdlib.h>
#include <signal.h>
diff --git a/src/lib/mh_agent.cpp b/src/lib/mh_agent.cpp
index bb1a9b6..61f32bf 100644
--- a/src/lib/mh_agent.cpp
+++ b/src/lib/mh_agent.cpp
@@ -16,6 +16,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
+
#ifdef WIN32
#include <windows.h>
int use_stderr = 1;
diff --git a/src/lib/mh_dbus_common.c b/src/lib/mh_dbus_common.c
index ad32017..f2d3860 100644
--- a/src/lib/mh_dbus_common.c
+++ b/src/lib/mh_dbus_common.c
@@ -20,6 +20,8 @@
*
*/
+#include "config.h"
+
#include "matahari/dbus_common.h"
#include "matahari/logging.h"
#include <glib/gi18n.h>
diff --git a/src/lib/network.c b/src/lib/network.c
index 9e6d785..0df4dc5 100644
--- a/src/lib/network.c
+++ b/src/lib/network.c
@@ -16,9 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef WIN32
-# include "config.h"
-#endif
+#include "config.h"
#include "matahari/network.h"
#include "network_private.h"
diff --git a/src/lib/network_linux.c b/src/lib/network_linux.c
index 0bfd8a0..ec821ab 100644
--- a/src/lib/network_linux.c
+++ b/src/lib/network_linux.c
@@ -20,9 +20,12 @@
* Author: Adam Stokes <astokes(a)fedoraproject.org>
*/
-#include "matahari/network.h"
+#include "config.h"
+
#include <string.h>
+#include "matahari/network.h"
+
void
network_os_start(const char *iface)
{
diff --git a/src/lib/network_windows.c b/src/lib/network_windows.c
index fe300e7..d245442 100644
--- a/src/lib/network_windows.c
+++ b/src/lib/network_windows.c
@@ -20,6 +20,8 @@
* Author: Adam Stokes <astokes(a)fedoraproject.org>
*/
+#include "config.h"
+
#ifndef WINVER
# define WINVER 0x0501
#endif
@@ -27,8 +29,6 @@
#include "matahari/network.h"
#include "matahari/utilities.h"
-#include <config.h>
-
#include <glib.h>
#include <windows.h>
diff --git a/src/lib/services.c b/src/lib/services.c
index a62fff2..f8a6f1e 100644
--- a/src/lib/services.c
+++ b/src/lib/services.c
@@ -15,7 +15,9 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define _GNU_SOURCE
+
+#include "config.h"
+
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
diff --git a/src/lib/services_linux.c b/src/lib/services_linux.c
index fa9eb5d..b1e62b1 100644
--- a/src/lib/services_linux.c
+++ b/src/lib/services_linux.c
@@ -16,7 +16,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define _GNU_SOURCE
+#include "config.h"
+
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
diff --git a/src/lib/services_windows.c b/src/lib/services_windows.c
index b48805d..dda7b5b 100644
--- a/src/lib/services_windows.c
+++ b/src/lib/services_windows.c
@@ -15,6 +15,9 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+
+#include "config.h"
+
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
diff --git a/src/lib/sysconfig.c b/src/lib/sysconfig.c
index de47481..e559700 100644
--- a/src/lib/sysconfig.c
+++ b/src/lib/sysconfig.c
@@ -16,6 +16,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
+
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/src/lib/sysconfig_linux.c b/src/lib/sysconfig_linux.c
index e039b37..2a3dd62 100644
--- a/src/lib/sysconfig_linux.c
+++ b/src/lib/sysconfig_linux.c
@@ -16,9 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef WIN32
#include "config.h"
-#endif
#include <stdint.h>
#include <stdio.h>
diff --git a/src/lib/sysconfig_windows.c b/src/lib/sysconfig_windows.c
index 2b272e4..977b1fd 100644
--- a/src/lib/sysconfig_windows.c
+++ b/src/lib/sysconfig_windows.c
@@ -16,6 +16,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
+
#include <windows.h>
#include <glib.h>
diff --git a/src/lib/utilities.c b/src/lib/utilities.c
index e4a24f9..68c6582 100644
--- a/src/lib/utilities.c
+++ b/src/lib/utilities.c
@@ -18,7 +18,6 @@
#include "config.h"
-#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
diff --git a/src/network/network-dbus.c b/src/network/network-dbus.c
index ffaf9a4..4c0ab07 100644
--- a/src/network/network-dbus.c
+++ b/src/network/network-dbus.c
@@ -20,6 +20,8 @@
*
*/
+#include "config.h"
+
#include <stdio.h>
#include <string.h>
diff --git a/src/network/network-qmf.cpp b/src/network/network-qmf.cpp
index 9256eb4..2f53c1c 100644
--- a/src/network/network-qmf.cpp
+++ b/src/network/network-qmf.cpp
@@ -16,9 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef WIN32
#include "config.h"
-#endif
#include "matahari/agent.h"
diff --git a/src/service/service-dbus.c b/src/service/service-dbus.c
index 09fcf06..b019d88 100644
--- a/src/service/service-dbus.c
+++ b/src/service/service-dbus.c
@@ -20,6 +20,8 @@
*
*/
+#include "config.h"
+
#include <string.h>
#include "matahari/dbus_common.h"
diff --git a/src/service/service-qmf-console.cpp b/src/service/service-qmf-console.cpp
index e312d73..344773a 100644
--- a/src/service/service-qmf-console.cpp
+++ b/src/service/service-qmf-console.cpp
@@ -14,9 +14,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef WIN32
#include "config.h"
-#endif
#include <qpid/messaging/Connection.h>
#include <qpid/messaging/Duration.h>
diff --git a/src/service/service-qmf.cpp b/src/service/service-qmf.cpp
index 2ad2a75..531c705 100644
--- a/src/service/service-qmf.cpp
+++ b/src/service/service-qmf.cpp
@@ -16,9 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef WIN32
#include "config.h"
-#endif
extern "C" {
#include <stdlib.h>
diff --git a/src/sysconfig/sysconfig-console.cpp b/src/sysconfig/sysconfig-console.cpp
index 016469f..865eda2 100644
--- a/src/sysconfig/sysconfig-console.cpp
+++ b/src/sysconfig/sysconfig-console.cpp
@@ -16,9 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef WIN32
#include "config.h"
-#endif
#include <qpid/messaging/Connection.h>
#include <qpid/messaging/Duration.h>
diff --git a/src/sysconfig/sysconfig-qmf.cpp b/src/sysconfig/sysconfig-qmf.cpp
index a02a018..0b30876 100644
--- a/src/sysconfig/sysconfig-qmf.cpp
+++ b/src/sysconfig/sysconfig-qmf.cpp
@@ -21,9 +21,7 @@
* \brief Sysconfig QMF Agent
*/
-#ifndef WIN32
#include "config.h"
-#endif
#include <qpid/agent/ManagementAgent.h>
#include "qmf/org/matahariproject/QmfPackage.h"
--
1.7.6
12 years, 8 months
[PATCH] build: centralize spec file generation.
by Russell Bryant
Move processing of matahari.spec from matahari.spec.in from a few
different places into a single target in the makefile. This should help
prevent them from getting out of sync.
Signed-off-by: Russell Bryant <rbryant(a)redhat.com>
---
GNUmakefile | 13 ++++++-------
autobuild.sh | 4 +---
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index 244b17d..c8a2340 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -81,9 +81,6 @@ export:
$(VARIANT)$(PACKAGE).spec: $(VARIANT)$(PACKAGE).spec.in
cp $(VARIANT)$(PACKAGE).spec.in $(VARIANT)$(PACKAGE).spec
-
-srpm: export $(VARIANT)$(PACKAGE).spec
- rm -f *.src.rpm
if [ -e $(BUILD_COUNTER) ]; then \
echo $(COUNT) > $(BUILD_COUNTER); \
sed -i.sed 's/global\ specversion.*/global\ specversion\ $(COUNT)/' $(VARIANT)$(PACKAGE).spec; \
@@ -93,6 +90,10 @@ srpm: export $(VARIANT)$(PACKAGE).spec
fi
sed -i.sed 's/global\ upstream_version.*/global\ upstream_version\ $(TAG)/' $(VARIANT)$(PACKAGE).spec
sed -i.sed 's/#MATAHARI_VERSION#/$(VERSION)/' $(VARIANT)$(PACKAGE).spec
+
+srpm: export $(VARIANT)$(PACKAGE).spec
+ rm -f *.src.rpm
+
rpmbuild -bs $(RPM_OPTS) $(VARIANT)$(PACKAGE).spec
# eg. WITH="--with cman" make rpm
@@ -100,9 +101,7 @@ rpm: srpm
@echo To create custom builds, edit the flags and options in $(PACKAGE)-$(DISTRO).spec first
rpmbuild $(RPM_OPTS) $(WITH) --rebuild $(RPM_ROOT)/*.src.rpm
-overlay: export
- sed -i.sed 's/global\ upstream_version.*/global\ upstream_version\ $(TAG)/' $(VARIANT)$(PACKAGE).spec
- sed -i.sed 's/#MATAHARI_VERSION#/$(VERSION)/' $(VARIANT)$(PACKAGE).spec
+overlay: export $(VARIANT)$(PACKAGE).spec
cp $(TARFILE) ~/rpmbuild/SOURCES
cp $(VARIANT)$(PACKAGE).spec ~/rpmbuild/SPECS
make -C ~/rpmbuild/SOURCES $(VARIANT)$(PACKAGE)
@@ -139,7 +138,7 @@ coverity:
# rm -rf $(COVERITY_DIR) $(COVERITY_DIR).build
clean:
- rm -f *.tgz *.sed *.gres *~
+ rm -f *.tgz *.sed *.gres *~ *.spec
@if [ -d linux.build ] ; then \
$(MAKE) --no-print-dir -C linux.build clean ; \
elif [ -d windows.build ] ; then \
diff --git a/autobuild.sh b/autobuild.sh
index e4de307..3ff1dca 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -33,9 +33,7 @@ function make_srpm() {
TARPREFIX=${PACKAGE}-${PACKAGE}-${TAG}
TARFILE=${TARPREFIX}.tgz
- cp ${VARIANT}matahari.spec.in ${VARIANT}matahari.spec
- sed -i.sed s/global\ specversion.*/global\ specversion\ ${AUTO_BUILD_COUNTER}/ ${VARIANT}matahari.spec
- sed -i.sed s/global\ upstream_version.*/global\ upstream_version\ ${TAG}/ ${VARIANT}matahari.spec
+ make ${VARIANT}matahari.spec
rm -f ${TARFILE}
git archive --prefix=${TARPREFIX}/ ${TAG} | gzip > ${TARFILE}
--
1.7.6
12 years, 8 months
[PATCH] build: remove hard coded version numbers.
by Russell Bryant
This patch removes hard coded version numbers from multiple places and
moves it into a single file: .version
Signed-off-by: Russell Bryant <rbryant(a)redhat.com>
---
CMakeLists.txt | 8 ++++----
GNUmakefile | 4 +++-
autobuild.sh | 2 +-
matahari.spec.in | 2 +-
mingw32-matahari.spec.in | 2 +-
mkrelease.sh | 19 ++++---------------
6 files changed, 14 insertions(+), 23 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d2efc7b..2127259 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,10 +3,10 @@ cmake_minimum_required(VERSION 2.6)
project (MATAHARI)
set(CMAKE_VERBOSE_MAKEFILE OFF)
-set(CPACK_PACKAGE_VERSION_MAJOR "0")
-set(CPACK_PACKAGE_VERSION_MINOR "4")
-set(CPACK_PACKAGE_VERSION_PATCH "4")
-set(PROJECT_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+file(STRINGS ".version" PROJECT_VERSION)
+string(REGEX REPLACE "^([^.]+)[.]([^.]+)[.]([^.]+)$" "\\1" CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION}")
+string(REGEX REPLACE "^([^.]+)[.]([^.]+)[.]([^.]+)$" "\\2" CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION}")
+string(REGEX REPLACE "^([^.]+)[.]([^.]+)[.]([^.]+)$" "\\3" CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION}")
MACRO (inherit_value theSymbol theValue)
if (NOT DEFINED ${theSymbol})
diff --git a/GNUmakefile b/GNUmakefile
index a7831b4..244b17d 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -19,7 +19,7 @@
-include Makefile
PACKAGE ?= matahari
-VERSION ?= 0.4.4
+VERSION ?= $(shell cat .version)
TARPREFIX = $(PACKAGE)-$(PACKAGE)-$(TAG)
TARFILE = $(TARPREFIX).tgz
HTML_ROOT = coverity@www.clusterlabs.org:/var/www/html
@@ -92,6 +92,7 @@ srpm: export $(VARIANT)$(PACKAGE).spec
sed -i.sed 's/global\ specversion.*/global\ specversion\ 1/' $(VARIANT)$(PACKAGE).spec; \
fi
sed -i.sed 's/global\ upstream_version.*/global\ upstream_version\ $(TAG)/' $(VARIANT)$(PACKAGE).spec
+ sed -i.sed 's/#MATAHARI_VERSION#/$(VERSION)/' $(VARIANT)$(PACKAGE).spec
rpmbuild -bs $(RPM_OPTS) $(VARIANT)$(PACKAGE).spec
# eg. WITH="--with cman" make rpm
@@ -101,6 +102,7 @@ rpm: srpm
overlay: export
sed -i.sed 's/global\ upstream_version.*/global\ upstream_version\ $(TAG)/' $(VARIANT)$(PACKAGE).spec
+ sed -i.sed 's/#MATAHARI_VERSION#/$(VERSION)/' $(VARIANT)$(PACKAGE).spec
cp $(TARFILE) ~/rpmbuild/SOURCES
cp $(VARIANT)$(PACKAGE).spec ~/rpmbuild/SPECS
make -C ~/rpmbuild/SOURCES $(VARIANT)$(PACKAGE)
diff --git a/autobuild.sh b/autobuild.sh
index 8bcb1b1..e4de307 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -18,7 +18,7 @@
#
set -x
PACKAGE=matahari
-VERSION=0.4.4
+VERSION=`cat .version`
: ${AUTO_BUILD_COUNTER:="custom"}
: ${AUTOBUILD_SOURCE_ROOT:=`pwd`}
diff --git a/matahari.spec.in b/matahari.spec.in
index 869d624..83b18de 100644
--- a/matahari.spec.in
+++ b/matahari.spec.in
@@ -15,7 +15,7 @@
%endif
Name: matahari
-Version: 0.4.4
+Version: #MATAHARI_VERSION#
Release: %{mh_release}%{?dist}
Summary: Matahari QMF Agents for Linux guests
diff --git a/mingw32-matahari.spec.in b/mingw32-matahari.spec.in
index e508a0e..10b0d81 100644
--- a/mingw32-matahari.spec.in
+++ b/mingw32-matahari.spec.in
@@ -11,7 +11,7 @@
%global mh_release %{?alphatag:0.}%{specversion}%{?alphatag:.%{alphatag}}%{?dist}
Name: mingw32-matahari
-Version: 0.4.4
+Version: #MATAHARI_VERSION#
Release: %{mh_release}
Summary: Matahari QMF Agents for Windows guests
diff --git a/mkrelease.sh b/mkrelease.sh
index 5607c2e..b452d7f 100755
--- a/mkrelease.sh
+++ b/mkrelease.sh
@@ -11,21 +11,10 @@ fi
BRANCH=$1
TAG=$2
-cat << EOF
-
-For now, the version string is hard coded in a number of places.
-Be sure to change them all.
- - GNUmakefile
- - autobuild.sh
- - matahari.spec.in
- - mingw32-matahari.spec.in
- - CMakeLists.txt
-If you have already done this, hit enter to continue. If you haven't,
-hit control-c and go do it.
-
-EOF
-read
-
+git checkout v0.4
+echo "${TAG:1}" > .version
+git add .version
+git commit -s -m "build: update .version to ${TAG:1}"
git tag -a -m "Tagged release $TAG" $TAG $BRANCH
git archive --prefix=matahari-${TAG:1}/ $TAG | tar x
tar czvf matahari-${TAG:1}.tar.gz matahari-${TAG:1}/
--
1.7.6
12 years, 8 months
[PATCH 0/6] Install man pages for QMF consoles/agents/broker.
by Russell Bryant
This patch series gets man pages installed and packaged for all of the QMF
consoles and agents as well as matahari-brokerd. The dbus agents still need
man pages added.
The agent and console man pages are generated using help2man. The broker
wrapper man page is in the tree.
[PATCH 1/6] doc: Tweak --help output to appease help2man.
[PATCH 2/6] doc: generate man pages for qmf consoles.
[PATCH 3/6] doc: install man pages generated by help2man.
[PATCH 4/6] doc: Add man page for matahari-brokerd.
[PATCH 5/6] spec: add man pages to spec file.
This last change isn't really related to man pages, but I noticed it while
working on this so threw it in there:
[PATCH 6/6] spec: Move matahari-qmf-service-cli into consoles
Thanks,
--
Russell Bryant
12 years, 8 months
[PATCH] Matahari unit file / init file sorting
by Steven Dake
The spec file installs both types of files. Only one should be installed.
Signed-off-by: Steven Dake <sdake(a)redhat.com>
---
matahari.spec.in | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/matahari.spec.in b/matahari.spec.in
index 617936a..b245dd3 100644
--- a/matahari.spec.in
+++ b/matahari.spec.in
@@ -182,12 +182,23 @@ make %{?_smp_mflags}
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
+%if %{defined _unitdir}
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-service
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-network
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-host
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-sysconfig
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-sysconfig-console
+rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-broker
+%endif
+
%{__install} -d $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/
%{__install} matahari.sysconf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/matahari
%if %{with qmf}
+%if %{undefined _unitdir}
%{__install} -d $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
%{__install} matahari-broker $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-broker
+%endif
%{__install} matahari-broker.sysconf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/matahari-broker
@@ -333,7 +344,9 @@ test "x%{buildroot}" != "x" && rm -rf %{buildroot}
%endif
%if %{with qmf}
+%if %{undefined _unitdir}
%attr(755, root, root) %{_initddir}/matahari-network
+%endif
%attr(755, root, root) %{_sbindir}/matahari-qmf-networkd
%endif
@@ -354,7 +367,9 @@ test "x%{buildroot}" != "x" && rm -rf %{buildroot}
%endif
%if %{with qmf}
+%if %{undefined _unitdir}
%attr(755, root, root) %{_initddir}/matahari-host
+%endif
%attr(755, root, root) %{_sbindir}/matahari-qmf-hostd
%endif
@@ -375,7 +390,9 @@ test "x%{buildroot}" != "x" && rm -rf %{buildroot}
%endif
%if %{with qmf}
+%if %{undefined _unitdir}
%attr(755, root, root) %{_initddir}/matahari-service
+%endif
%attr(755, root, root) %{_sbindir}/matahari-qmf-serviced
%attr(755, root, root) %{_sbindir}/matahari-qmf-service-cli
%endif
@@ -398,7 +415,9 @@ test "x%{buildroot}" != "x" && rm -rf %{buildroot}
%endif
%if %{with qmf}
+%if %{undefined _unitdir}
%attr(755, root, root) %{_initddir}/matahari-sysconfig
+%endif
%attr(755, root, root) %{_sbindir}/matahari-qmf-sysconfigd
%endif
@@ -407,7 +426,9 @@ test "x%{buildroot}" != "x" && rm -rf %{buildroot}
%doc AUTHORS COPYING
%if %{with qmf}
+%if %{undefined _unitdir}
%attr(755, root, root) %{_initddir}/matahari-sysconfig-console
+%endif
%attr(755, root, root) %{_sbindir}/matahari-qmf-sysconfig-consoled
%if %{defined _unitdir}
@@ -418,7 +439,9 @@ test "x%{buildroot}" != "x" && rm -rf %{buildroot}
%if %{with qmf}
%files broker
%defattr(644, root, root, 755)
+%if %{undefined _unitdir}
%attr(755, root, root) %{_initddir}/matahari-broker
+%endif
%config(noreplace) %{_sysconfdir}/sysconfig/matahari-broker
%config(noreplace) %{_sysconfdir}/matahari-broker.conf
%attr(755, root, root) %{_sbindir}/matahari-brokerd
--
1.7.6.1
12 years, 8 months