[pkg-go] Bug#868070: gocryptfs: '--version' option is useless, containing only 'gocryptfs'

Unit 193 unit193 at ubuntu.com
Tue Jul 11 19:37:04 UTC 2017


Package: gocryptfs
Version: 1.3-1
Severity: normal

Dear Maintainer,

When you call `gocryptfs --version`, the only info you get back is 'gocryptfs'.
This is because the required vars aren't set at build time, with the below patch I get 'gocryptfs 1.3; go-fuse 0.0~git20170609.0.5690be4-1; 2017-06-17 go1.7.6'


--- gocryptfs-1.3/debian/rules	2017-06-05 21:03:20.000000000 -0400
+++ gocryptfs-1.3/debian/rules	2017-06-16 20:14:57.253417564 -0400
@@ -3,6 +3,10 @@
 PKD = $(word 1,$(abspath $(dir $(MAKEFILE_LIST))))
 PKG = $(shell dpkg-parsechangelog -l$(PKD)/changelog --show-field=Source)
 VER ?= $(shell (dpkg-parsechangelog -l$(PKD)/changelog | grep Version | sed 's/Version..//' | sed 's/-.\+//'))
+include /usr/share/dpkg/default.mk
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+FUSEVER = $(shell dpkg-query --showformat='$${Version}' -W golang-github-hanwen-go-fuse-dev)
+DEB_LDFLAGS = -X main.GitVersion=$(DEB_VERSION_UPSTREAM) -X main.BuildTime=$(SOURCE_DATE_EPOCH) -X main.GitVersionFuse=$(FUSEVER)
 
 %:
 	dh $@ --buildsystem=golang --with=golang
@@ -11,7 +15,7 @@
 DT = $(shell date -d "${CHDATE}" "+%Y-%m-%d")
 
 override_dh_auto_build:
-	GOPATH=$(shell ls -d $(CURDIR)/obj*) go install -v  github.com/rfjakob/gocryptfs
+	GOPATH=$(shell ls -d $(CURDIR)/obj*) go install -ldflags="$(DEB_LDFLAGS)" -v  github.com/rfjakob/gocryptfs
 	pandoc Documentation/MANPAGE.md -s -t man -o debian/gocryptfs.1
 
 override_dh_auto_clean:


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 4.9.0-3-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gocryptfs depends on:
ii  libc6      2.24-12
ii  libfuse2   2.9.7-1
ii  libssl1.1  1.1.0f-3

gocryptfs recommends no packages.

gocryptfs suggests no packages.

-- no debconf information



More information about the Pkg-go-maintainers mailing list