From 2a73fe0008fc906fb00c43da594206261d5501f0 Mon Sep 17 00:00:00 2001 From: linyows Date: Tue, 21 Feb 2017 00:46:18 +0900 Subject: [PATCH 1/4] to available debian package --- Makefile | 27 ++++++++++++++++++--------- debian/changelog | 7 ++++++- debian/control | 3 +-- debian/dirs | 2 +- debian/lintian-overrides | 3 --- debian/rules | 1 - docker-compose.yml | 12 ++++++------ dockerfiles/Dockerfile.ubuntu | 11 ++--------- 8 files changed, 34 insertions(+), 32 deletions(-) diff --git a/Makefile b/Makefile index 2683c02..73982c5 100644 --- a/Makefile +++ b/Makefile @@ -106,21 +106,30 @@ dist: ## Distribute as archived source gzip -9 octopass-$(VERSION).tar rm -rf octopass-$(VERSION) -dist_debian: - rm -rf octopass-$(VERSION) octopass-$(VERSION).tar octopass-$(VERSION).orig.tar.xz - mkdir octopass-$(VERSION) - cp $(SOURCES) octopass octopass-$(VERSION) - tar cvf octopass-$(VERSION).tar octopass-$(VERSION) - xz -v octopass-$(VERSION).tar - mv octopass-$(VERSION).tar.xz octopass-$(VERSION).orig.tar.xz - rm -rf octopass-$(VERSION) - rpm: dist mv octopass-$(VERSION).tar.gz /root/rpmbuild/SOURCES spectool -g -R rpm/octopass.spec rpmbuild -ba rpm/octopass.spec cp /root/rpmbuild/RPMS/*/*.rpm /octopass/builds +dist_debian: + rm -rf octopass-$(VERSION) octopass_$(VERSION).tar octopass_$(VERSION).orig.tar.xz + mkdir octopass-$(VERSION) + cp $(SOURCES) octopass-$(VERSION) + tar cf octopass_$(VERSION).tar octopass-$(VERSION) + xz -v octopass_$(VERSION).tar + mv octopass_$(VERSION).tar.xz octopass_$(VERSION).orig.tar.xz + rm -rf octopass-$(VERSION) + +deb: dist_debian + tar xvf octopass_$(VERSION).orig.tar.xz + cd octopass-$(VERSION) && \ + dh_make --single --createorig -y && \ + rm -rf debian/*.ex debian/*.EX debian/README.Debian && \ + cp -v /octopass/debian/* debian/ && \ + debuild -uc -us + cp *.deb /octopass/builds + clean: ## Delete tmp directory @echo "$(INFO_COLOR)==> $(RESET)$(BOLD)Cleaning$(RESET)" rm -rf $(TMP) diff --git a/debian/changelog b/debian/changelog index be22c2b..682c070 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,9 @@ -octopass (0.1.0-1) unstable; urgency=medium +octopass (0.2.0-1) xenial; urgency=medium + + * Change implementation in Go to C. + + -- linyows Mon, 20 Feb 2017 23:00:00 +0900 +octopass (0.1.0-1) xenial; urgency=medium * Initial release. diff --git a/debian/control b/debian/control index b342b51..9e5fff9 100644 --- a/debian/control +++ b/debian/control @@ -9,8 +9,7 @@ Vcs-Browser: https://github.com/linyows/octopass/tree/debian Vcs-Git: https://github.com/linyows/octopass -b debian Package: octopass -Architecture: any -Multi-Arch: same +Architecture: amd64 Depends: ${shlibs:Depends}, ${misc:Depends} Description: This is linux user management tool by the organization/team on github, and authentication. diff --git a/debian/dirs b/debian/dirs index 26a5a32..98b064d 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1,3 +1,3 @@ /usr/lib /usr/bin -/usr/bin +/var/cache diff --git a/debian/lintian-overrides b/debian/lintian-overrides index b954809..9fe3142 100644 --- a/debian/lintian-overrides +++ b/debian/lintian-overrides @@ -1,5 +1,2 @@ # This shared library is only for NSS. libnss-cache binary: package-name-doesnt-match-sonames libnss-cache2 - -octopass: arch-dependent-file-not-in-arch-specific-directory usr/bin/octopass -octopass: statically-linked-binary usr/bin/octopass diff --git a/debian/rules b/debian/rules index 26cba9f..d078fa7 100644 --- a/debian/rules +++ b/debian/rules @@ -32,7 +32,6 @@ BINDIR=$(PREFIX)/bin override_dh_auto_install: mkdir -p $(LIBDIR) $(BINDIR) $(CONFDIR) dh_auto_install -- LIBDIR=$(LIBDIR) PREFIX=$(PREFIX) BINDIR=$(BINDIR) - install -pm 755 octopass $(BINDIR) install -pm 644 octopass.conf.example $(CONFDIR) find $(DESTDIR) diff --git a/docker-compose.yml b/docker-compose.yml index 414e135..29d3fdb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,9 +4,9 @@ rpm: volumes: - .:/octopass command: make rpm - -#deb: -# dockerfile: dockerfiles/Dockerfile.ubuntu -# build: . -# volumes: -# - .:/builds +deb: + dockerfile: dockerfiles/Dockerfile.ubuntu + build: . + volumes: + - .:/octopass + command: make deb diff --git a/dockerfiles/Dockerfile.ubuntu b/dockerfiles/Dockerfile.ubuntu index c9ece0f..4d06238 100644 --- a/dockerfiles/Dockerfile.ubuntu +++ b/dockerfiles/Dockerfile.ubuntu @@ -3,16 +3,9 @@ MAINTAINER linyows RUN apt-get -qq update && \ apt-get install -qq glibc-source gcc make libcurl4-gnutls-dev libjansson-dev \ - bzip2 unzip debhelper dh-make devscripts cdbs clang-format-3.4 + bzip2 unzip debhelper dh-make devscripts cdbs clang -ENV VERSION 0.1.0 ENV USER root RUN mkdir /octopass -ADD . /octopass -WORKDIR /octopass/nss - -RUN make dist_debian && tar xvf octopass_$VERSION.orig.tar.xz && cd octopass-$VERSION && \ - dh_make --single --createorig -y && \ - rm -rf debian/*.ex debian/*.EX && cp -v /octopass/debian/* debian/ && \ - debuild -uc -us --set-envvar="LINTIAN_PROFILE=ubuntu" && cp *.deb /builds +WORKDIR /octopass From 0ff5d71887e78f2ddc814dc87bbd0624ab095114 Mon Sep 17 00:00:00 2001 From: linyows Date: Tue, 21 Feb 2017 00:53:38 +0900 Subject: [PATCH 2/4] update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a4dee71..5dc0750 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,10 @@ Installation Packages are provided via [packagecloud](https://packagecloud.io/linyows/octopass). -:cry: Package now has only RPM, so I am glad if someone will help me. +Available for: + +- CentOS 7.x +- Ubuntu Xenial ### Building from Source From b3ede6b96ffdaa68533a13cb5c99f4073439ac73 Mon Sep 17 00:00:00 2001 From: linyows Date: Tue, 21 Feb 2017 01:12:10 +0900 Subject: [PATCH 3/4] resolve conflict files --- Makefile | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 73982c5..dc9c43e 100644 --- a/Makefile +++ b/Makefile @@ -99,12 +99,14 @@ install_cli: ## Install only cli command dist: ## Distribute as archived source @echo "$(INFO_COLOR)==> $(RESET)$(BOLD)Distributing$(RESET)" - rm -rf octopass-$(VERSION) octopass-$(VERSION).tar octopass-$(VERSION).tar.gz - mkdir octopass-$(VERSION) - cp $(SOURCES) octopass-$(VERSION) - tar cf octopass-$(VERSION).tar octopass-$(VERSION) - gzip -9 octopass-$(VERSION).tar - rm -rf octopass-$(VERSION) + rm -rf tmp.rhel octopass-$(VERSION).tar.gz + mkdir -p tmp.rhel/octopass-$(VERSION) + cp $(SOURCES) tmp.rhel/octopass-$(VERSION) + cd tmp.rhel && \ + tar cf octopass-$(VERSION).tar octopass-$(VERSION) && \ + gzip -9 octopass-$(VERSION).tar + mv tmp.rhel/octopass-$(VERSION).tar.gz . + rm -rf tmp.rhel rpm: dist mv octopass-$(VERSION).tar.gz /root/rpmbuild/SOURCES @@ -113,13 +115,15 @@ rpm: dist cp /root/rpmbuild/RPMS/*/*.rpm /octopass/builds dist_debian: - rm -rf octopass-$(VERSION) octopass_$(VERSION).tar octopass_$(VERSION).orig.tar.xz - mkdir octopass-$(VERSION) - cp $(SOURCES) octopass-$(VERSION) - tar cf octopass_$(VERSION).tar octopass-$(VERSION) - xz -v octopass_$(VERSION).tar - mv octopass_$(VERSION).tar.xz octopass_$(VERSION).orig.tar.xz - rm -rf octopass-$(VERSION) + @echo "$(INFO_COLOR)==> $(RESET)$(BOLD)Distributing$(RESET)" + rm -rf tmp.debian octopass_$(VERSION).orig.tar.xz + mkdir -p tmp.debian/octopass-$(VERSION) + cp $(SOURCES) tmp.debian/octopass-$(VERSION) + cd tmp.debian && \ + tar cf octopass_$(VERSION).tar octopass-$(VERSION) && \ + xz -v octopass_$(VERSION).tar + mv tmp.debian/octopass_$(VERSION).tar.xz octopass_$(VERSION).orig.tar.xz + rm -rf tmp.debian deb: dist_debian tar xvf octopass_$(VERSION).orig.tar.xz From 5ff4ab712d7e9383e967cea281ce7c3782cd3928 Mon Sep 17 00:00:00 2001 From: linyows Date: Tue, 21 Feb 2017 01:18:04 +0900 Subject: [PATCH 4/4] add gomi removing to Makefile --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dc9c43e..c1fd070 100644 --- a/Makefile +++ b/Makefile @@ -133,13 +133,14 @@ deb: dist_debian cp -v /octopass/debian/* debian/ && \ debuild -uc -us cp *.deb /octopass/builds + rm -rf octopass-$(VERSION) octopass_$(VERSION)-* octopass_$(VERSION).orig.tar.xz clean: ## Delete tmp directory @echo "$(INFO_COLOR)==> $(RESET)$(BOLD)Cleaning$(RESET)" rm -rf $(TMP) distclean: clean - rm -f *~ \#* + rm -f build/octopass* help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "$(INFO_COLOR)%-30s$(RESET) %s\n", $$1, $$2}'