--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: pkgkde-symbolshelper: support new 64bit architectures such as tilegx, mips64r6, mips64r6el, riscv64, etc. generically
- From: Helmut Grohne <helmut@subdivi.de>
- Date: Tue, 7 Feb 2017 18:38:13 +0100
- Message-id: <20170207173812.76egsiyw2ccbd6yl@alf.mars>
Package: pkg-kde-tools
Version: 0.15.24
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap
While bootstrapping tilegx, I noticed that the symbols helper keeps a
mapping from architecture names to sizes that needs updating for every
single new architecture. That's sad, because it is busywork added to the
bootstrap process. Rather than extending the patterns, let me propose
fixing part of the issue generically. A number of the patterns
essentially distinguish 32bit architectures from 64bit architectures.
Rather than keeping such a list here, we can reuse an existing list from
dpkg and thus eliminate the need for updating. That's what the attached
patch does. It might not be the best perl style, but that's about as
much perl as I know and it actually works.
There are two other noteworthy approaches to solving the problem.
1) Keep curating those patterns and add tilegx. (Sounds annoying to me.)
2) Completely remove the type/size information from the source and
compute it at build time instead. A simple autoconf project is able
to determine the sizes of relevant types (even during cross builds)
and it could generate a data file that could be consulted by the
helper. Choosing this approach would mean that, the symbols helper
never needs an update again (except for adding more types) and it
never is wrong.
Option 2 is beyond my perl knowledge, so I went for the simple part and
made the 32bit/64bit checks just work in the attached patch.
Any update that fixes the type code for tilegx' size_t should close this
bug report.
Helmut
diff --minimal -Nru pkg-kde-tools-0.15.24/debian/changelog pkg-kde-tools-0.15.24+nmu1/debian/changelog
--- pkg-kde-tools-0.15.24/debian/changelog 2016-10-19 20:33:01.000000000 +0200
+++ pkg-kde-tools-0.15.24+nmu1/debian/changelog 2017-02-07 11:15:41.000000000 +0100
@@ -1,3 +1,10 @@
+pkg-kde-tools (0.15.24+nmu1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Make bit-depenedent type substitutions work generically (Closes: #-1)
+
+ -- Helmut Grohne <helmut@subdivi.de> Tue, 07 Feb 2017 11:15:41 +0100
+
pkg-kde-tools (0.15.24) unstable; urgency=medium
* pkgkde-symbolshelper: Do not pass stderr handle to Dpkg::IPC::spawn,
diff --minimal -Nru pkg-kde-tools-0.15.24/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm pkg-kde-tools-0.15.24+nmu1/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm
--- pkg-kde-tools-0.15.24/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm 2016-06-23 21:24:06.000000000 +0200
+++ pkg-kde-tools-0.15.24+nmu1/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm 2017-02-07 11:15:41.000000000 +0100
@@ -150,6 +150,7 @@
use strict;
use warnings;
use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst';
+use Dpkg::Arch qw(debarch_to_cpuattrs);
sub new {
my $class = shift;
@@ -161,7 +162,8 @@
sub _expand {
my ($self, $arch) = @_;
- return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'm' : 'j';
+ my ($bits, $endian) = debarch_to_cpuattrs($arch);
+ return $bits == 64 ? 'm' : 'j';
}
package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::ssize_t;
@@ -169,6 +171,7 @@
use strict;
use warnings;
use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst';
+use Dpkg::Arch qw(debarch_to_cpuattrs);
sub new {
my $class = shift;
@@ -180,7 +183,8 @@
sub _expand {
my ($self, $arch) = @_;
- return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'l' : 'i';
+ my ($bits, $endian) = debarch_to_cpuattrs($arch);
+ return $bits == 64 ? 'l' : 'i';
}
package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::int64_t;
@@ -188,6 +192,7 @@
use strict;
use warnings;
use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst';
+use Dpkg::Arch qw(debarch_to_cpuattrs);
sub new {
my $class = shift;
@@ -199,7 +204,8 @@
sub _expand {
my ($self, $arch) = @_;
- return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'l' : 'x';
+ my ($bits, $endian) = debarch_to_cpuattrs($arch);
+ return $bits == 64 ? 'l' : 'x';
}
package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::uint64_t;
@@ -207,6 +213,7 @@
use strict;
use warnings;
use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst';
+use Dpkg::Arch qw(debarch_to_cpuattrs);
sub new {
my $class = shift;
@@ -218,7 +225,8 @@
sub _expand {
my ($self, $arch) = @_;
- return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'm' : 'y';
+ my ($bits, $endian) = debarch_to_cpuattrs($arch);
+ return $bits == 64 ? 'm' : 'y';
}
package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::qptrdiff;
@@ -226,6 +234,7 @@
use strict;
use warnings;
use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst';
+use Dpkg::Arch qw(debarch_to_cpuattrs);
sub new {
my $class = shift;
@@ -237,7 +246,8 @@
sub _expand {
my ($self, $arch) = @_;
- return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'x' : 'i';
+ my ($bits, $endian) = debarch_to_cpuattrs($arch);
+ return $bits == 64 ? 'x' : 'i';
}
package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::quintptr;
@@ -245,6 +255,7 @@
use strict;
use warnings;
use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst';
+use Dpkg::Arch qw(debarch_to_cpuattrs);
sub new {
my $class = shift;
@@ -256,7 +267,8 @@
sub _expand {
my ($self, $arch) = @_;
- return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'y' : 'j';
+ my ($bits, $endian) = debarch_to_cpuattrs($arch);
+ return $bits == 64 ? 'y' : 'j';
}
package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::intptr_t;
@@ -264,6 +276,7 @@
use strict;
use warnings;
use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst';
+use Dpkg::Arch qw(debarch_to_cpuattrs);
sub new {
my $class = shift;
@@ -275,7 +288,8 @@
sub _expand {
my ($self, $arch) = @_;
- return ($arch =~ /^(amd64|kfreebsd-amd64|ia64|alpha|s390x|sparc64|ppc64|ppc64el|mips64|mips64el|arm64)$/) ? 'l' : 'i';
+ my ($bits, $endian) = debarch_to_cpuattrs($arch);
+ return $bits == 64 ? 'l' : 'i';
}
package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::qreal;
--- End Message ---
--- Begin Message ---
Source: pkg-kde-tools
Source-Version: 0.15.25
We believe that the bug you reported is fixed in the latest version of
pkg-kde-tools, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 854493@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Dmitry Shachnev <mitya57@debian.org> (supplier of updated pkg-kde-tools package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Wed, 30 Aug 2017 17:30:03 +0300
Source: pkg-kde-tools
Binary: pkg-kde-tools libdlrestrictions1 libdlrestrictions-dev
Architecture: source
Version: 0.15.25
Distribution: unstable
Urgency: medium
Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Changed-By: Dmitry Shachnev <mitya57@debian.org>
Description:
libdlrestrictions-dev - development files for the DLRestrictions library
libdlrestrictions1 - library that implements library compatibility checks for dlopen()
pkg-kde-tools - various packaging tools and scripts for KDE Applications
Closes: 854493 873243
Changes:
pkg-kde-tools (0.15.25) unstable; urgency=medium
.
[ Helmut Grohne ]
* Make bit-dependent type substitutions work generically (Closes: #854493).
.
[ Maximiliano Curia ]
* (l10n-packages.mk) Add missing ast and eo langs
.
[ Dmitry Shachnev ]
* pkgkde-vcs: Add jessie and stretch to supported distributions (Closes:
#873243). Thanks to Sandro Knauß for the initial patch.
* pkgkde-vcs: Make Git version mangling more close to DEP-14: do not
strip epoch numbers, and replace tildes with underscores.
* Bump Standards-Version to 4.1.0, stop using deprecated Priority: extra.
Checksums-Sha1:
139b4fdf7581b61b3dd3e7ab81a2803e2d5d1933 2033 pkg-kde-tools_0.15.25.dsc
531d0fe352ac2b1f1966a1d7c361789948b77a27 98804 pkg-kde-tools_0.15.25.tar.xz
038a155c1cae9ef6c2f9ad09cb0dddf71058eddd 6276 pkg-kde-tools_0.15.25_source.buildinfo
Checksums-Sha256:
a0d3028abc3db833402b1248d142bad8249bc25857f3045cdbff182db4de76ec 2033 pkg-kde-tools_0.15.25.dsc
6337839dc3d7e88b0d78df364f2c1f04e8805c86ace678ec75fbf4f56b3ceb60 98804 pkg-kde-tools_0.15.25.tar.xz
584c96fbd04a0e45f90c468c3267ac1cfde3b51a8a51c83585d8fd6256458aea 6276 pkg-kde-tools_0.15.25_source.buildinfo
Files:
257409375b2c82c28a747cabdf573c12 2033 devel optional pkg-kde-tools_0.15.25.dsc
d03d11d58b2dea3fcaa0da69d16e188d 98804 devel optional pkg-kde-tools_0.15.25.tar.xz
cc9b8b19d78bb22122c29527295952f0 6276 devel optional pkg-kde-tools_0.15.25_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEbEPcK+5mZmLK5jNU1v5xA2P4XdMFAlmmzB8ACgkQ1v5xA2P4
XdM2cA/6Ao24ofcN5UH7s3p2jtg6rpuZwVwWJ8qzwOSSHPWBS12CDbrIiL/H2pUz
aTbo5jB75QLZtiwyW6EanY+CmaXtmqxXeRf7uZxxWphBR9Hd61HJX1suaGkB4kCl
K5e2DJ9Pxc8+gC4nz0Hy21IZZ/ainBBtgrT6ISZjvHJ1I6Fm5nwIiau2VwtByXL2
cr12XpO0TWOx7TEAmf7jkaUIxIYoRqASaO9UL73U7uGfpOcl/lYgrG2DDLeo9qi6
r8fJM9puCz3P+J74C/yFI9OJxDrzFEHh8tztSKmrOAUHAyHED7myiVnHHvyqzVIp
hsuobmnQ110yzxMhK7iH2YzNuMSzZHYpb91zEjBe5R07bSzxe/V0MS76vQPuYzqa
Ek+xevdlDsqvVfXTaBpVNDi5YCxbyWCcao2HyvTRU2qjvvImnzHEnwbhusLfTPcR
xTWGPrJVvkJSYEjnEyZm1UfM4vKI9Iw/fVVqCKeUkVN94HtJnI9LB5P4ABwm/KxW
qOF5oX+CWG6lY4Q/Gx+b6TlSQo0mj6DhzBNaUoCtmglYdKjZX6I28xUST9tIkpeg
B8u5drM6IomGpLXYqNma1rB2S5NF4w7kro/hYxmD9IOyie7oezrStVCsFaB13Bhn
LKeJwnYT+6Ky/Uq2PQH3s8z3kkItpxH3PBzBCIHWL4tNXdaakII=
=f1H7
-----END PGP SIGNATURE-----
--- End Message ---