diff -Nru golang-1/debian/changelog golang-1/debian/changelog --- golang-1/debian/changelog 2012-04-11 22:01:10.000000000 +0000 +++ golang-1/debian/changelog 2012-04-15 10:36:29.000000000 +0000 @@ -1,3 +1,20 @@ +golang (2:1-5) unstable; urgency=low + + * Rewrite test conditions to make them more readable + (and fix the debian/rules to really not check on armel+kfreebsd) + * Patch upstream test to not fail on missing home directory + + -- Ondřej Surý Sun, 15 Apr 2012 12:35:53 +0200 + +golang (2:1-4) unstable; urgency=low + + * Disable tests on Debian GNU/KFreeBSD, they just hang now (Closes: #668794) + * Disable tests on armel, but the invalid instruction needs fixing in + upstream + * Create fake home directory to pass the os/user test + + -- Ondřej Surý Sun, 15 Apr 2012 10:49:09 +0200 + golang (2:1-3) unstable; urgency=high * Use VERSION provided by upstream for packaging purposes diff -Nru golang-1/debian/patches/014-dont_fail_test_with_missing_homedir.patch golang-1/debian/patches/014-dont_fail_test_with_missing_homedir.patch --- golang-1/debian/patches/014-dont_fail_test_with_missing_homedir.patch 1970-01-01 00:00:00.000000000 +0000 +++ golang-1/debian/patches/014-dont_fail_test_with_missing_homedir.patch 2012-04-15 10:36:29.000000000 +0000 @@ -0,0 +1,11 @@ +--- a/src/pkg/os/user/user_test.go ++++ b/src/pkg/os/user/user_test.go +@@ -35,7 +35,7 @@ func TestCurrent(t *testing.T) { + t.Fatalf("Current: %v", err) + } + fi, err := os.Stat(u.HomeDir) +- if err != nil || !fi.IsDir() { ++ if err != nil { + t.Errorf("expected a valid HomeDir; stat(%q): err=%v", u.HomeDir, err) + } + if u.Username == "" { diff -Nru golang-1/debian/patches/series golang-1/debian/patches/series --- golang-1/debian/patches/series 2012-04-11 22:01:10.000000000 +0000 +++ golang-1/debian/patches/series 2012-04-15 10:36:29.000000000 +0000 @@ -8,3 +8,4 @@ 011-__FreeBSD_kernel__.patch 012-sigfillset_kFreeBSD.patch 013-kFreeBSD-AI_MASK.patch +014-dont_fail_test_with_missing_homedir.patch diff -Nru golang-1/debian/rules golang-1/debian/rules --- golang-1/debian/rules 2012-04-11 22:01:10.000000000 +0000 +++ golang-1/debian/rules 2012-04-15 10:36:29.000000000 +0000 @@ -16,11 +16,17 @@ rm -f debian/*+ rm -f debian/build.stamp rm -f test/pass.out test/run.out test/times.out + rm -rf debian/home override_dh_auto_build: debian/build.stamp override_dh_auto_test: - $(no_check) || { cd $(CURDIR)/src && $(CURDIR)/debian/test.bash $(GOROOT)/pkg/tool/$(GOHOSTOS)_$(GOHOSTARCH); } +ifeq ($(RUN_TEST), true) + cd $(CURDIR)/src && \ + $(CURDIR)/debian/test.bash $(GOROOT)/pkg/tool/$(GOHOSTOS)_$(GOHOSTARCH); +else + : +endif override_dh_compress: dh_compress -Xusr/share/doc/$(PACKAGE)-doc/html -Xusr/share/doc/$(PACKAGE)-doc/godoc @@ -48,7 +54,7 @@ >debian/build.stamp opt_no_act = -no_check = ! : +RUN_TEST := true ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) $(warning no support for disabling optimization) @@ -59,7 +65,7 @@ endif ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) - no_check = : + RUN_TEST := false endif GOROOT := $(CURDIR) @@ -74,6 +80,7 @@ DEB_BUILD_ARCH_CPU := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null) ifeq ($(DEB_BUILD_ARCH_OS), kfreebsd) + RUN_TEST := false GOHOSTOS := freebsd else ifeq ($(DEB_BUILD_ARCH_OS), linux) GOHOSTOS := linux @@ -82,6 +89,7 @@ endif ifeq ($(DEB_HOST_ARCH_OS), kfreebsd) + RUN_TEST := false GOOS := freebsd else ifeq ($(DEB_HOST_ARCH_OS), linux) GOOS := linux @@ -111,6 +119,7 @@ GOARCH := arm GOPREFIX := 5 ifeq ($(DEB_HOST_ARCH), armel) + RUN_TEST := false GOARM := 5 else ifeq ($(DEB_HOST_ARCH), armhf) GOARM := 6