Bug#872806: [pkg-gnupg-maint] Bug#872806: libgpg-error0 packs runtime support files in shared library

2018-10-12 Thread Daniel Kahn Gillmor
On Fri 2018-10-12 12:36:12 +0200, Sven Joachim wrote:
> Control: tags -1 + patch

thank you, Sven and Helmut for your attention to this kind of detail.
I'm preparing an upload with these changes.

Y'all rock!

  --dkg



Processed: Re: Bug#872806: libgpg-error0 packs runtime support files in shared library

2018-10-12 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + patch
Bug #872806 [libgpg-error0] libgpg-error0 packs runtime support files in shared 
library
Added tag(s) patch.

-- 
872806: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872806
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#872806: libgpg-error0 packs runtime support files in shared library

2018-10-12 Thread Sven Joachim
Control: tags -1 + patch

Am 21.08.2017 um 14:53 schrieb Helmut Grohne:

> Package: libgpg-error0
> Version: 1.27-3
> Severity: serious
> Justification: policy 8.2
> User: helm...@debian.org
> Usertags: rebootstrap
>
> libgpg-error0 packs runtime support files (i.e. .mo files) into the
> shared library package. It happens that these files are not versioned
> (e.g. libgpg-error.mo rather than libgpg-error0.mo). Doing so violates
> Debian policy section 8.2:
>
> |If your package contains files whose names do not change with each change
> |in the library shared object version, you must not put them in the shared
> |library package. Otherwise, several versions of the shared library cannot
> |be installed at the same time without filename clashes, making upgrades
> |and transitions unnecessarily difficult.

There are a few other library package which include .mo files, but most
include the soname in their filename, so they don't have that problem.

> This happens to also break multiarch. Rebuilds of libgpg-error are not
> currently coinstallable with other instances from the archive:
>
> | Unpacking libgpg-error-dev:ppc64 (1.27-3) ...
> | dpkg: error processing archive 
> /tmp/repo/pool/main/libg/libgpg-error/libgpg-error0_1.27-3_ppc64.deb 
> (--unpack):
> |  trying to overwrite shared
> | '/usr/share/locale/cs/LC_MESSAGES/libgpg-error.mo', which is
> | different from other instances of package libgpg-error0:ppc64
> | Errors were encountered while processing:
> |  /tmp/repo/pool/main/libg/libgpg-error/libgpg-error0_1.27-3_ppc64.deb
> | E: Sub-process /usr/bin/dpkg returned an error code (1)
> | E: Failed to process build dependencies

This was apparently due to some changes in msgfmt's output format at the
time.  It does not seem to be a problem currently, but future changes in
msgfmt might bring it up again.

> I suggest moving them to an Arch:all package.

Attached is a patch which does that, introducing a libgpg-error-l10n
package with the translation files.  The exact Provides/Replaces
versions might have to be adjusted, and the exact relationship between
libgpg-error0 and libgpg-error-l10n is also debatable.  I have chosen an
unversioned Recommends, but others are also possible.  What would not
work is an exact "Depends: libgpg-error-l10n (= ${source:Version}),
since that breaks when libgpg-error1 comes along.

Cheers,
   Sven

>From da01ec471e451de75415589bb5ba942599ee5d26 Mon Sep 17 00:00:00 2001
From: Sven Joachim 
Date: Fri, 12 Oct 2018 11:25:02 +0200
Subject: [PATCH] Move the translation files to a new libgpg-error-l10n package

Closes: #872806
---
 debian/control   | 22 ++
 debian/libgpg-error-l10n.install |  1 +
 debian/libgpg-error0.install.in  |  1 -
 3 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 debian/libgpg-error-l10n.install

diff --git a/debian/control b/debian/control
index 1ff8e2e..ec14e5c 100644
--- a/debian/control
+++ b/debian/control
@@ -43,6 +43,8 @@ Depends:
  ${shlibs:Depends},
 Pre-Depends:
  ${misc:Pre-Depends},
+Recommends:
+ libgpg-error-l10n,
 Description: GnuPG development runtime library
  Library that defines common error values, messages, and common
  runtime functionality for all GnuPG components.  Among these are GPG,
@@ -102,3 +104,23 @@ Description: library of error values and messages in GnuPG (Windows development)
  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.
+
+Package: libgpg-error-l10n
+Architecture: all
+Section: localization
+Multi-Arch: foreign
+Depends:
+ ${misc:Depends},
+Replaces:
+ libgpg-error0 (<< 1.32-1.1~),
+Breaks:
+ libgpg-error0 (<< 1.32-1.1~),
+Description: library of error values and messages in GnuPG (localization files)
+ Library that defines common error values, messages, and common
+ runtime functionality for all GnuPG components.  Among these are GPG,
+ GPGSM, GPGME, GPG-Agent, libgcrypt, pinentry, SmartCard Daemon and
+ possibly more in the future.
+ .
+ It will likely be renamed "gpgrt" in the future.
+ .
+ This package contains the translation files for the use in non-English locales.
diff --git a/debian/libgpg-error-l10n.install b/debian/libgpg-error-l10n.install
new file mode 100644
index 000..3635480
--- /dev/null
+++ b/debian/libgpg-error-l10n.install
@@ -0,0 +1 @@
+usr/share/locale
diff --git a/debian/libgpg-error0.install.in b/debian/libgpg-error0.install.in
index ebdeae6..eea2676 100644
--- a/debian/libgpg-error0.install.in
+++ b/debian/libgpg-error0.install.in
@@ -1,2 +1 @@
 usr/lib/@DEB_HOST_MULTIARCH@/libgpg-error.so.* lib/@DEB_HOST_MULTIARCH@/
-usr/share/locale
-- 
2.19.1



Bug#872806: libgpg-error0 packs runtime support files in shared library

2017-08-21 Thread Helmut Grohne
Package: libgpg-error0
Version: 1.27-3
Severity: serious
Justification: policy 8.2
User: helm...@debian.org
Usertags: rebootstrap

libgpg-error0 packs runtime support files (i.e. .mo files) into the
shared library package. It happens that these files are not versioned
(e.g. libgpg-error.mo rather than libgpg-error0.mo). Doing so violates
Debian policy section 8.2:

|If your package contains files whose names do not change with each change
|in the library shared object version, you must not put them in the shared
|library package. Otherwise, several versions of the shared library cannot
|be installed at the same time without filename clashes, making upgrades
|and transitions unnecessarily difficult.

This happens to also break multiarch. Rebuilds of libgpg-error are not
currently coinstallable with other instances from the archive:

| Unpacking libgpg-error-dev:ppc64 (1.27-3) ...
| dpkg: error processing archive 
/tmp/repo/pool/main/libg/libgpg-error/libgpg-error0_1.27-3_ppc64.deb (--unpack):
|  trying to overwrite shared 
'/usr/share/locale/cs/LC_MESSAGES/libgpg-error.mo', which is different from 
other instances of package libgpg-error0:ppc64
| Errors were encountered while processing:
|  /tmp/repo/pool/main/libg/libgpg-error/libgpg-error0_1.27-3_ppc64.deb
| E: Sub-process /usr/bin/dpkg returned an error code (1)
| E: Failed to process build dependencies

I suggest moving them to an Arch:all package.

Helmut