diff options
author | Rob Dobson <rob@rdobson.co.uk> | 2016-09-20 15:14:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-20 15:14:47 +0100 |
commit | 83de5710c11f156c42648947a7e69604f62497df (patch) | |
tree | 58bf9f74a97e7c67ee9f9f06d4d6e784638e3941 | |
parent | ae94879f54f2516fabdde6e15cd1ee325af5e4be (diff) | |
parent | e05327710842b94ead237b50c8d4dfde1910b148 (diff) | |
download | vyos-xe-guest-utilities-83de5710c11f156c42648947a7e69604f62497df.tar.gz vyos-xe-guest-utilities-83de5710c11f156c42648947a7e69604f62497df.zip |
Merge pull request #22 from phusl/CA-220438
CA-220438: Minor improvements for xe-guest-utilities
-rw-r--r-- | mk/Makefile.deb | 9 | ||||
-rw-r--r-- | mk/Makefile.rpm | 2 | ||||
-rw-r--r-- | mk/Makefile.tgz | 4 | ||||
-rw-r--r-- | mk/debian/control | 2 | ||||
-rw-r--r-- | mk/xe-linux-distribution.init | 3 | ||||
-rw-r--r-- | xe-daemon/xe-daemon.go | 4 |
6 files changed, 15 insertions, 9 deletions
diff --git a/mk/Makefile.deb b/mk/Makefile.deb index 496f332..c435c31 100644 --- a/mk/Makefile.deb +++ b/mk/Makefile.deb @@ -31,7 +31,7 @@ DEBPOOLDIR := debian/pool/main/x/xe-guest-utilities GOTARBALL = /distfiles/golang/go1.4.2.linux-386.tar.gz GOROOT = $(MY_OBJ_DIR)/go GOBIN = GOROOT=$(GOROOT) $(GOROOT)/bin/go -GOFLAGS = -v +GOFLAGS = -v -ldflags="-s -w" GOBUILDDIR = $(MY_OBJ_DIR)/gobuild GO_SOURCE_REPO = $(call git_loc,xe-guest-utilities) @@ -115,7 +115,8 @@ $(MY_OUTPUT_DIR)/xe-guest-utilities.%.inc: $(MY_OUTPUT_DIR)/.dirstamp ( echo XE_GUEST_UTILITIES_PKG_NAME := xe-guest-utilities ; \ echo XE_GUEST_UTILITIES_PKG_VERSION := $(VERSION)-$(RELEASE) ; \ echo XE_GUEST_UTILITIES_PKG_ARCH := $* ; \ - echo XE_GUEST_UTILITIES_PKG_FILE := $(DEBPOOLDIR)/$(PACKAGE)_$(VERSION)-$(RELEASE)_all.deb ; \ + echo XE_GUEST_UTILITIES_PKG_FILE_i386 := $(DEBPOOLDIR)/$(PACKAGE)_$(VERSION)-$(RELEASE)_i386.deb ; \ + echo XE_GUEST_UTILITIES_PKG_FILE_amd64 := $(DEBPOOLDIR)/$(PACKAGE)_$(VERSION)-$(RELEASE)_amd64.deb ; \ )>$@ $(DEB_BUILT_COOKIE): $(SOURCES) @@ -126,7 +127,7 @@ $(DEB_BUILT_COOKIE): $(SOURCES) cp $(MY_OBJ_DIR)/$(PACKAGE)_$(VERSION)-$(RELEASE).tar.gz $(MY_OUTPUT_DIR)/$(DEBPOOLDIR) set -xe ; for arch in $(ARCHS) ; do \ ( cd $(SOURCEDIR) && dpkg-buildpackage -Zgzip -b -a$${arch} -us -uc ) ; \ - cp $(MY_OBJ_DIR)/$(PACKAGE)_$(VERSION)-$(RELEASE)_all.deb $(MY_OUTPUT_DIR)/$(DEBPOOLDIR) ; \ + cp $(MY_OBJ_DIR)/$(PACKAGE)_$(VERSION)-$(RELEASE)_$${arch}.deb $(MY_OUTPUT_DIR)/$(DEBPOOLDIR) ; \ done touch $@ @@ -163,7 +164,7 @@ $(TOOLS_TARBALL): $(DEB_BUILT_COOKIE) mkdir -p $(INSTALL_DIR) rm -f $(INSTALL_DIR)/versions.deb $(foreach arch,$(ARCHS),\ - echo XE_GUEST_UTILITIES_PKG_FILE_$(arch)=\'xe-guest-utilities_$(VERSION)-$(RELEASE)_all.deb\' >> $(INSTALL_DIR)/versions.deb ; cp -v $(MY_OBJ_DIR)/xe-guest-utilities_$(VERSION)-$(RELEASE)_all.deb $(INSTALL_DIR)/ ;) + echo XE_GUEST_UTILITIES_PKG_FILE_$(arch)=\'xe-guest-utilities_$(VERSION)-$(RELEASE)_$(arch).deb\' >> $(INSTALL_DIR)/versions.deb ; cp -v $(MY_OBJ_DIR)/xe-guest-utilities_$(VERSION)-$(RELEASE)_$(arch).deb $(INSTALL_DIR)/ ;) tar -C $(STAGING_DIR) -cjf $@ . $(GOROOT): diff --git a/mk/Makefile.rpm b/mk/Makefile.rpm index de1fde2..954fda6 100644 --- a/mk/Makefile.rpm +++ b/mk/Makefile.rpm @@ -27,7 +27,7 @@ SRPM= xe-guest-utilities-$(VERSION)-$(RELEASE).src.rpm GOTARBALL = /distfiles/golang/go1.4.2.linux-386.tar.gz GOROOT = $(MY_OBJ_DIR)/go GOBIN = GOROOT=$(GOROOT) $(GOROOT)/bin/go -GOFLAGS = -a -x +GOFLAGS = -a -x -ldflags="-s -w" GOBUILDDIR = $(MY_OBJ_DIR)/gobuild GO_SOURCE_REPO = $(call git_loc,xe-guest-utilities) diff --git a/mk/Makefile.tgz b/mk/Makefile.tgz index 7b19f26..db2d327 100644 --- a/mk/Makefile.tgz +++ b/mk/Makefile.tgz @@ -30,7 +30,7 @@ DESTDIR := $(MY_OBJ_DIR)/$(PACKAGE)/ GOTARBALL = /distfiles/golang/go1.4.2.linux-386.tar.gz GOROOT = $(MY_OBJ_DIR)/go GOBIN = GOROOT=$(GOROOT) $(GOROOT)/bin/go -GOFLAGS = -v +GOFLAGS = -v -ldflags="-s -w" GOBUILDDIR = $(MY_OBJ_DIR)/gobuild GO_SOURCE_REPO = $(call git_loc,xe-guest-utilities) @@ -116,7 +116,7 @@ $(TGZ_BUILT_COOKIE): $(SOURCES) install -d $(DESTDIR)/usr/share/doc/$(PACKAGE)_$(VERSION)/ ; \ install -m 644 $(REPO)/LICENSE $(DESTDIR)/usr/share/doc/$(PACKAGE)_$(VERSION)/LICENSE ; \ cd $(DESTDIR) ; \ - tar cvf $(MY_OBJ_DIR)/$(PACKAGE)_$(VERSION)-$(RELEASE)_all.tgz * \ + tar czvf $(MY_OBJ_DIR)/$(PACKAGE)_$(VERSION)-$(RELEASE)_all.tgz * \ )>$@ $(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP) diff --git a/mk/debian/control b/mk/debian/control index 4ffdb45..7d00985 100644 --- a/mk/debian/control +++ b/mk/debian/control @@ -6,7 +6,7 @@ Standards-Version: 3.7.2 Build-Depends: debhelper (>= 4.0.0) Package: xe-guest-utilities -Architecture: all +Architecture: any Conflicts: xengmond Replaces: xengmond Description: @BRAND_GUEST@ Monitoring Scripts diff --git a/mk/xe-linux-distribution.init b/mk/xe-linux-distribution.init index 8135988..7c1bcf4 100644 --- a/mk/xe-linux-distribution.init +++ b/mk/xe-linux-distribution.init @@ -80,7 +80,10 @@ start() stop() { + [ ! -f "${XE_DAEMON_PIDFILE}" ] && return 0 action $"Stopping xe daemon: " kill -TERM $(cat ${XE_DAEMON_PIDFILE}) + rm -f "${XE_DAEMON_PIDFILE}" + return 0 } status() diff --git a/xe-daemon/xe-daemon.go b/xe-daemon/xe-daemon.go index 17c4bfd..e30e1dc 100644 --- a/xe-daemon/xe-daemon.go +++ b/xe-daemon/xe-daemon.go @@ -105,7 +105,9 @@ func main() { updated := false for _, collector := range collectors { if count%collector.divisor == 0 { - logger.Printf("Running %s ...\n", collector.name) + if *debugFlag { + logger.Printf("Running %s ...\n", collector.name) + } result, err := collector.Collect() if err != nil { logger.Printf("%s error: %#v\n", collector.name, err) |