[Pkg-gnupg-commit] [libgpg-error] 01/02: update package name and file locations after discussion with Stephen Kitt

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Feb 16 06:13:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository libgpg-error.

commit 2b9fe1264520f659bb166af64e49724cb822cfaa
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Tue Feb 9 23:29:46 2016 -0500

    update package name and file locations after discussion with Stephen Kitt
    
    also, add an autopkgtest suite just to make sure things can work.
---
 debian/changelog                                   |  4 ++--
 debian/clean                                       |  3 ++-
 debian/control                                     | 11 +++++-----
 debian/libgpg-error-mingw-w64-dev.install          |  6 ++++++
 .../libgpg-error-mingw-w64-dev.lintian-overrides   | 13 +++++++++++
 debian/libgpg-error-win32.install                  |  3 ---
 debian/libgpg-error-win32.lintian-overrides        |  8 -------
 debian/rules                                       | 25 +++++++++++++++-------
 debian/tests/control                               |  5 +++++
 debian/tests/libgpg-error-mingw-w64-dev            | 19 ++++++++++++++++
 10 files changed, 70 insertions(+), 27 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 04f282e..bf526f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
 libgpg-error (1.21-2) UNRELEASED; urgency=medium
 
   * build out-of-tree for cleanliness
-  * added libgpg-error-win32 package: prepare for windows installer
-    component gpgv
+  * added libgpg-error-mingw-w64-dev package: prepare for windows
+    installer component gpgv
 
  -- Daniel Kahn Gillmor <dkg at fifthhorseman.net>  Mon, 08 Feb 2016 22:50:50 -0500
 
diff --git a/debian/clean b/debian/clean
index aac6344..505f3f4 100644
--- a/debian/clean
+++ b/debian/clean
@@ -2,5 +2,6 @@ debian/libgpg-error0.install
 debian/libgpg-error-dev.install
 po/*.gmo
 po/stamp-po
-build-win32/
+build-x86_64-w64-mingw32/
+build-i686-w64-mingw32/
 build/
diff --git a/debian/control b/debian/control
index f1a84c3..dc1c5d0 100644
--- a/debian/control
+++ b/debian/control
@@ -51,16 +51,17 @@ Description: library for common error values and messages in GnuPG components
  components.  Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt,
  pinentry, SmartCard Daemon and possibly more in the future.
 
-Package: libgpg-error-win32
+Package: libgpg-error-mingw-w64-dev
 Architecture: all
 Priority: extra
+Section: libdevel
 Depends: ${misc:Depends}
 Suggests: wine
-Description: library for common error values and messages in GnuPG components (win32 port)
+Description: library of error values and messages in GnuPG (Windows development)
  Library that defines common error values for all GnuPG
  components.  Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt,
  pinentry, SmartCard Daemon and possibly more in the future.
  .
- This is a win32 version of libgpg-error.  It's meant to be used to
- build static libraries that can be reused by programs included in the
- win32-loader component of Debian-Installer.
+ This is a Windows version of libgpg-error.  It's meant to be used
+ when cross-building software that targets the Windows platform,
+ e.g. the win32-loader component of Debian-Installer.
diff --git a/debian/libgpg-error-mingw-w64-dev.install b/debian/libgpg-error-mingw-w64-dev.install
new file mode 100644
index 0000000..a2ca0c7
--- /dev/null
+++ b/debian/libgpg-error-mingw-w64-dev.install
@@ -0,0 +1,6 @@
+usr/x86_64-w64-mingw32/bin/*
+usr/x86_64-w64-mingw32/include/*
+usr/x86_64-w64-mingw32/lib/*
+usr/i686-w64-mingw32/bin/*
+usr/i686-w64-mingw32/include/*
+usr/i686-w64-mingw32/lib/*
diff --git a/debian/libgpg-error-mingw-w64-dev.lintian-overrides b/debian/libgpg-error-mingw-w64-dev.lintian-overrides
new file mode 100644
index 0000000..0cc658b
--- /dev/null
+++ b/debian/libgpg-error-mingw-w64-dev.lintian-overrides
@@ -0,0 +1,13 @@
+# libgpg-error-mingw-w64-dev is "arch-independent" from debian's perspective,
+# since it ships binaries that are only used during cross-building
+# windows software.
+libgpg-error-mingw-w64-dev: arch-independent-package-contains-binary-or-object
+
+# The location of these cross-building tools is the result of
+# discussion with mingw maintainers:
+# https://lists.alioth.debian.org/pipermail/pkg-gnupg-maint/2016-February/003281.html
+libgpg-error-mingw-w64-dev: file-in-unusual-dir
+libgpg-error-mingw-w64-dev: non-standard-dir-in-usr
+
+# DLLs exported via Samba need to be executable (see #796224)
+libgpg-error-mingw-w64-dev: executable-not-elf-or-script
diff --git a/debian/libgpg-error-win32.install b/debian/libgpg-error-win32.install
deleted file mode 100644
index 9ef0373..0000000
--- a/debian/libgpg-error-win32.install
+++ /dev/null
@@ -1,3 +0,0 @@
-usr/share/win32/bin/*
-usr/share/win32/include/gpg-error.h
-usr/share/win32/lib/*
diff --git a/debian/libgpg-error-win32.lintian-overrides b/debian/libgpg-error-win32.lintian-overrides
deleted file mode 100644
index e4dbd6d..0000000
--- a/debian/libgpg-error-win32.lintian-overrides
+++ /dev/null
@@ -1,8 +0,0 @@
-# libgpg-error-win32 is "arch-independent" from debian's perspective,
-# since it ships binaries that are only used during cross-building
-# windows software.
-libgpg-error-win32: arch-independent-package-contains-binary-or-object usr/share/win32/lib/libgpg-error.a
-libgpg-error-win32: arch-dependent-file-in-usr-share usr/share/win32/lib/libgpg-error.a
-libgpg-error-win32: arch-independent-package-contains-binary-or-object usr/share/win32/lib/libgpg-error.dll.a
-libgpg-error-win32: arch-dependent-file-in-usr-share usr/share/win32/lib/libgpg-error.dll.a
-libgpg-error-win32: executable-not-elf-or-script usr/share/win32/bin/libgpg-error-0.dll
diff --git a/debian/rules b/debian/rules
index 305b2bf..e4478b1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -41,17 +41,26 @@ override_dh_makeshlibs:
 override_dh_link:
 	dh_link -plibgpg-error-dev lib/$(DEB_HOST_MULTIARCH)/libgpg-error.so.0 usr/lib/$(DEB_HOST_MULTIARCH)/libgpg-error.so
 
-### "arch-independent" Win32 builds: ###
+### "arch-independent" Windows builds: ###
 
-WIN32_FLAGS=LDFLAGS="-Xlinker --no-insert-timestamp" CFLAGS="-g -Os" CPPFLAGS=
+WIN_FLAGS=LDFLAGS="-Xlinker --no-insert-timestamp" CFLAGS="-g -Os" CPPFLAGS=
 
 override_dh_auto_build-indep:
-	mkdir -p build-win32
-	( cd build-win32 && $(WIN32_FLAGS) ../configure \
-	    --prefix=/usr/share/win32 \
+	for cpu in i686 x86_64; do \
+	 mkdir -p build-$$cpu-w64-mingw32 && \
+	 cd build-$$cpu-w64-mingw32 && $(WIN_FLAGS) ../configure \
+	    --prefix=/usr/$$cpu-w64-mingw32 \
 	    --enable-static \
-	    --host i686-w64-mingw32 )
-	( cd build-win32 && $(WIN32_FLAGS) make )
+	    --host $$cpu-w64-mingw32 && \
+	  $(WIN_FLAGS) $(MAKE) \
+	  || exit 1 ; \
+	  cd .. ; \
+	done
 
 override_dh_auto_install-indep:
-	( cd build-win32 && $(WIN32_FLAGS) make install DESTDIR=$(shell pwd)/debian/tmp )
+	for cpu in i686 x86_64; do \
+	  cd build-$$cpu-w64-mingw32 && \
+	  $(MAKE) install DESTDIR=$(shell pwd)/debian/tmp \
+	  || exit 1 ; \
+	  cd .. ; \
+	done
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..4218b49
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,5 @@
+Test-Command: ./libgpg-error-mingw-w64 i686
+Depends: libgpg-error-mingw-w64-dev, wine, wine32, libgpg-error-dev
+
+Test-Command: ./libgpg-error-mingw-w64 x86_64
+Depends: libgpg-error-mingw-w64-dev, wine, wine64, libgpg-error-dev
diff --git a/debian/tests/libgpg-error-mingw-w64-dev b/debian/tests/libgpg-error-mingw-w64-dev
new file mode 100755
index 0000000..975149a
--- /dev/null
+++ b/debian/tests/libgpg-error-mingw-w64-dev
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+set -e
+
+ARCH="$1"
+
+# just make sure that gpg-error.exe works
+
+wine /usr/"${ARCH}"-w64-mingw32/bin/gpg-error.exe --version
+
+# just compare the first 200 error messages (not all of them, because
+# some errors have no available strings on windows):
+for x in $(seq 0 200); do
+    diff -u <(gpg-error $x) \
+         <(wine /usr/"${ARCH}"-w64-mingw32/bin/gpg-error.exe $x | sed 's/\r$//' )
+done
+
+# FIXME: it would be good to test building another windows binary
+# linking to libgpg-error and run it here.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libgpg-error.git



More information about the Pkg-gnupg-commit mailing list