From 2fa60c0ae3008b3dcf8e15a733fda64efea3fc8a Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Sat, 7 Jul 2018 22:53:21 +0200 Subject: Fix/Update packaging Change-Id: Ida4a102472c92492cf7d4f0eab301b37ee991cef Signed-off-by: Sebastien Douheret --- Makefile | 24 ++++++++++++++---------- conf.d/etc/profile.d/xds-gdb.sh | 2 -- conf.d/packaging/deb/agl-xds-gdb.dsc | 6 +++--- conf.d/packaging/deb/debian.control | 2 +- conf.d/packaging/deb/debian.rules | 1 - conf.d/packaging/obs/_service | 20 -------------------- conf.d/packaging/obs/_service.in | 20 ++++++++++++++++++++ conf.d/packaging/rpm/agl-xds-gdb.spec | 11 +++++++---- 8 files changed, 45 insertions(+), 41 deletions(-) delete mode 100644 conf.d/packaging/obs/_service create mode 100644 conf.d/packaging/obs/_service.in diff --git a/Makefile b/Makefile index 37b64ba..1c6d405 100644 --- a/Makefile +++ b/Makefile @@ -16,10 +16,10 @@ # limitations under the License. ########################################################################### - # Application Name TARGET=xds-gdb + # Retrieve git tag/commit to set version & sub-version strings GIT_DESC := $(shell git describe --always --tags) VERSION := $(firstword $(subst -, ,$(GIT_DESC))) @@ -82,11 +82,13 @@ else BUILD_MODE="Release mode" endif - ifeq ($(SUB_VERSION), ) PACKAGE_ZIPFILE := $(TARGET)_$(ARCH)-$(VERSION).zip else - PACKAGE_ZIPFILE := $(TARGET)_$(ARCH)-$(VERSION)_$(SUB_VERSION).zip + # only use dot as separator to allow rpm packaging (see version .spec file) + PK_VER := $(subst _,.,$(subst -,,$(VERSION))) + PK_SBVER := $(subst _,.,$(subst -,,$(SUB_VERSION))) + PACKAGE_ZIPFILE := $(TARGET)_$(ARCH)-$(PK_VER).$(PK_SBVER).zip endif .PHONY: all @@ -112,7 +114,8 @@ clean: .PHONY: distclean distclean: clean - rm -rf $(LOCAL_BINDIR) $(ROOT_SRCDIR)/tools glide.lock vendor $(ROOT_SRCDIR)/*.zip + rm -rf $(LOCAL_BINDIR) && (cd $(ROOT_SRCDIR) && rm -rf ./tools ./glide.lock ./vendor ./*.zip) + .PHONY: scripts scripts: @@ -155,30 +158,31 @@ vendor: tools/glide glide.yaml vendor/debug: vendor (cd vendor/gerrit.automotivelinux.org/gerrit/src/xds && \ rm -rf xds-common.git && ln -s ../../../../../../xds-common xds-common.git && \ - rm -rf xds-agent.git && ln -s ../../../../../../xds-agent xds-agent.git ) + rm -rf xds-agent.git && ln -s ../../../../../../xds-agent xds-agent.git) .PHONY: tools/glide tools/glide: @test -f $(LOCAL_TOOLSDIR)/glide || { \ echo "Downloading glide"; \ mkdir -p $(LOCAL_TOOLSDIR); \ - curl --silent -L https://glide.sh/get | GOBIN=$(LOCAL_TOOLSDIR) sh; \ + curl --silent --connect-timeout 60 --retry 3 -L https://glide.sh/get | GOBIN=$(LOCAL_TOOLSDIR) sh; \ } .PHONY: checkgover: - @test "$(CHECKGOVER)" = "true" || { echo $(CHECKERRMSG); exit 1; } + @test "$(CHECKGOVER)" = "true" || { echo -e $(CHECKERRMSG); exit 1; } .PHONY: help help: @echo "Main supported rules:" - @echo " all (default)" + @echo " all (default)" @echo " build" @echo " release" - @echo " clean" @echo " package" - @echo " install / uninstall" + @echo " install" + @echo " uninstall" + @echo " clean" @echo " distclean" @echo "" @echo "Influential make variables:" diff --git a/conf.d/etc/profile.d/xds-gdb.sh b/conf.d/etc/profile.d/xds-gdb.sh index 58173f1..a33fdd7 100644 --- a/conf.d/etc/profile.d/xds-gdb.sh +++ b/conf.d/etc/profile.d/xds-gdb.sh @@ -1,4 +1,3 @@ -#!/bin/bash ########################################################################### # Copyright 2017-2018 IoT.bzh # @@ -15,7 +14,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# ########################################################################### #---------- AGL xds-gdb tool options Start ---------" diff --git a/conf.d/packaging/deb/agl-xds-gdb.dsc b/conf.d/packaging/deb/agl-xds-gdb.dsc index 72f5ac3..44d5df3 100644 --- a/conf.d/packaging/deb/agl-xds-gdb.dsc +++ b/conf.d/packaging/deb/agl-xds-gdb.dsc @@ -2,10 +2,10 @@ Format: 1.0 Source: agl-xds-gdb Binary: agl-xds-gdb Architecture: any -Version: 1.0.2-0 +Version: 0.0.0 Maintainer: Sebastien Douheret Standards-Version: 3.8.2 -Homepage: https://github.com/iotbzh/xds-gdb.git +Homepage: https://gerrit.automotivelinux.org/gerrit/p/src/xds/xds-gdb.git Build-Depends: debhelper (>= 5), unzip -Debtransform-Tar: xds-gdb_linux-amd64-v1.0.2_2018-04-05_131503.zip +Debtransform-Tar: xds-gdb_linux-amd64-*.zip diff --git a/conf.d/packaging/deb/debian.control b/conf.d/packaging/deb/debian.control index cdf2269..9bc739e 100644 --- a/conf.d/packaging/deb/debian.control +++ b/conf.d/packaging/deb/debian.control @@ -4,7 +4,7 @@ Source: agl-xds-gdb Build-Depends: debhelper (>= 5), unzip Standards-Version: 3.8.2 -Homepage: https://github.com/iotbzh/xds-gdb.git +Homepage: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/xds/xds-gdb.git Package: agl-xds-gdb Section: libs diff --git a/conf.d/packaging/deb/debian.rules b/conf.d/packaging/deb/debian.rules index cb72153..5c5a654 100644 --- a/conf.d/packaging/deb/debian.rules +++ b/conf.d/packaging/deb/debian.rules @@ -68,7 +68,6 @@ install: build # Move all files in their corresponding package dh_install --list-missing -s --sourcedir=debian/tmp - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. diff --git a/conf.d/packaging/obs/_service b/conf.d/packaging/obs/_service deleted file mode 100644 index e7193e9..0000000 --- a/conf.d/packaging/obs/_service +++ /dev/null @@ -1,20 +0,0 @@ - - - https://gerrit.automotivelinux.org/gerrit/src/xds/xds-gdb - git - @VERSION@ - @REVISON@ - conf.d/packaging/rpm/agl-xds-gdb.spec - conf.d/packaging/deb/agl-xds-gdb.dsc - conf.d/packaging/deb/agl-xds-gdb.install - conf.d/packaging/deb/debian.changelog - conf.d/packaging/deb/debian.compat - conf.d/packaging/deb/debian.control - conf.d/packaging/deb/debian.rules - - - gz - *.tar - - - diff --git a/conf.d/packaging/obs/_service.in b/conf.d/packaging/obs/_service.in new file mode 100644 index 0000000..b5ee6c8 --- /dev/null +++ b/conf.d/packaging/obs/_service.in @@ -0,0 +1,20 @@ + + + https://gerrit.automotivelinux.org/gerrit/src/xds/xds-gdb + git + @VERSION@ + @REVISION@ + conf.d/packaging/rpm/agl-xds-gdb.spec + conf.d/packaging/deb/agl-xds-gdb.dsc + conf.d/packaging/deb/agl-xds-gdb.install + conf.d/packaging/deb/debian.changelog + conf.d/packaging/deb/debian.compat + conf.d/packaging/deb/debian.control + conf.d/packaging/deb/debian.rules + + + gz + *.tar + + + diff --git a/conf.d/packaging/rpm/agl-xds-gdb.spec b/conf.d/packaging/rpm/agl-xds-gdb.spec index 178b77d..83bc2f7 100644 --- a/conf.d/packaging/rpm/agl-xds-gdb.spec +++ b/conf.d/packaging/rpm/agl-xds-gdb.spec @@ -6,14 +6,15 @@ %global debug_package %{nil} Name: agl-xds-gdb -Version: 1.0.2 +Version: 0.0.0 Release: 0 License: Apache-2.0 Summary: Wrapper on gdb debugger for XDS -Url: https://github.com/iotbzh/xds-gdb.git -Source0: xds-gdb_linux-amd64-v1.0.2_2018-04-05_131503.zip +Url: https://gerrit.automotivelinux.org/gerrit/p/src/xds/xds-gdb.git +Source0: xds-gdb_linux-amd64-%{version}.zip BuildRequires: unzip BuildRoot: %{_tmppath}/%{name}-%{version}-build +Group: Development/Tools/Debuggers %description xds-gdb is an agent that should run on your local machine when you use XDS @@ -27,6 +28,7 @@ xds-gdb is an agent that should run on your local machine when you use XDS mkdir -p %{?buildroot}%{_prefix}/xds/gdb %{?buildroot}%{_bindir} cp xds-gdb %{?buildroot}%{_prefix}/xds/gdb ln -s ../xds/gdb/xds-gdb %{?buildroot}%{_bindir}/xds-gdb + mkdir -p %{?buildroot}%{_sysconfdir}/profile.d sed -e "s;@XDS_INSTALL_BIN_DIR@;%{_bindir};g" ./conf.d/etc/profile.d/xds-gdb.sh > %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh @@ -37,5 +39,6 @@ sed -e "s;@XDS_INSTALL_BIN_DIR@;%{_bindir};g" ./conf.d/etc/profile.d/xds-gdb.sh %dir %{_prefix}/xds %dir %{_prefix}/xds/gdb %{_prefix}/xds/gdb/* -%{_prefix}/bin/xds-gdb +%{_bindir}/xds-gdb %config %{_sysconfdir}/profile.d/%{name}.sh +%attr(644,root,root) %{_sysconfdir}/profile.d/%{name}.sh -- cgit 1.2.3-korg