debian: Add intltoolize to dh_auto_configure

Message ID CA+sCei2yFes5MN_Ldsd=OdES6orNQi=ehpP+PpUtG7CFwf9aLA@mail.gmail.com
State Accepted
Headers
Series debian: Add intltoolize to dh_auto_configure |

Commit Message

Valters Jansons April 6, 2021, 11:13 a.m. UTC
  Debian has automated building tools that handle source trees directly.
It is expected that you can pick up a source tarball, and with the
appropriate debian/ subtree, a successful build can be produced using
the `debuild` tool. This depends on all the build steps having been
included as part of the debian/rules file (see: `man debuild`).

This commit ensures there is no need to manually run autogen.sh
on a locally extracted source tarball prior to building for Debian.
This is accomplished by adding the `intltoolize` command to the
override_dh_auto_configure step in d/rules.

There is no need to add the `autoreconf` command due to dh-autoreconf
always handling that prior to the dh_auto_configure step.
---
 debian/rules | 1 +
 1 file changed, 1 insertion(+)

--
2.31.1
  

Comments

Michael Tremer April 7, 2021, 3:08 p.m. UTC | #1
Hello Valters,

Thank you very much for your patch.

It didn’t apply because all tabs were replaced by spaces in this email. I took care of this manually and pushed it into the master branch.

Do you have any more experience with the Debian build system? We kind of put this together without a lot of background knowledge and have a couple of (probably minor) things that could need fixing. Are you able to help?

-Michael

> On 6 Apr 2021, at 12:13, Valters Jansons <valter.jansons@gmail.com> wrote:
> 
> Debian has automated building tools that handle source trees directly.
> It is expected that you can pick up a source tarball, and with the
> appropriate debian/ subtree, a successful build can be produced using
> the `debuild` tool. This depends on all the build steps having been
> included as part of the debian/rules file (see: `man debuild`).
> 
> This commit ensures there is no need to manually run autogen.sh
> on a locally extracted source tarball prior to building for Debian.
> This is accomplished by adding the `intltoolize` command to the
> override_dh_auto_configure step in d/rules.
> 
> There is no need to add the `autoreconf` command due to dh-autoreconf
> always handling that prior to the dh_auto_configure step.
> ---
> debian/rules | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/debian/rules b/debian/rules
> index 4e544d7..8893b7b 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -10,6 +10,7 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all
>        dh $@ --with python3 --with-systemd
> 
> override_dh_auto_configure:
> +       intltoolize --force --automake
>        dh_auto_configure -- --disable-perl
> 
> override_dh_perl:
> --
> 2.31.1
  
Valters Jansons April 12, 2021, 12:50 p.m. UTC | #2
On Wed, Apr 7, 2021 at 6:08 PM Michael Tremer <michael.tremer@ipfire.org> wrote:
> It didn’t apply because all tabs were replaced by spaces in this email. I took care of this manually and pushed it into the master branch.

Sorry - must have been copy-paste from my terminal that went wrong, as
I was grabbing the patch content and pasting it by hand. Thank you for
dealing with this.

> Do you have any more experience with the Debian build system? We kind of put this together without a lot of background knowledge and have a couple of (probably minor) things that could need fixing. Are you able to help?

I have some experience poking around with builds. Initial look at
highlights a missing changelog, a debhelper compatibility level that
could be updated and some apparent auto-test workflow issues, but I
have not had the ability to dig deeper if that's something on my local
system.

Is there something in particular you would be looking for?

-Valters
  
Michael Tremer April 13, 2021, 6:53 p.m. UTC | #3
Hello,

> On 12 Apr 2021, at 13:50, Valters Jansons <valter.jansons@gmail.com> wrote:
> 
> On Wed, Apr 7, 2021 at 6:08 PM Michael Tremer <michael.tremer@ipfire.org> wrote:
>> It didn’t apply because all tabs were replaced by spaces in this email. I took care of this manually and pushed it into the master branch.
> 
> Sorry - must have been copy-paste from my terminal that went wrong, as
> I was grabbing the patch content and pasting it by hand. Thank you for
> dealing with this.

No problem. I recommend using git-send-email(8) which takes care of all of this for you, but other ways work, too.

> 
>> Do you have any more experience with the Debian build system? We kind of put this together without a lot of background knowledge and have a couple of (probably minor) things that could need fixing. Are you able to help?
> 
> I have some experience poking around with builds.

Great!

> Initial look at
> highlights a missing changelog, a debhelper compatibility level that
> could be updated and some apparent auto-test workflow issues, but I
> have not had the ability to dig deeper if that's something on my local
> system.

That is a good start...

> Is there something in particular you would be looking for?

Yes, the linter is showing a lot of issues and I am not sure what is important to fix and what doesn’t matter at all.

We also have a problem that one file never makes it into the correct package no matter what: https://bugzilla.ipfire.org/show_bug.cgi?id=12468

Stefan originally packaged this and this was good enough. This was his first package and the whole build system feels quite tricky. If you like, you can grab that bug and solve it.

Generally we would like to get this package into Debian at some point. Tor are now using our library and building things like Tor should be possible on a stock Debian with the right dependencies installed. We are also looking at making this package available in more distributions so that our software is ready to install very quickly and without any export knowledge on how to build something.

Best,
-Michael

> 
> -Valters
  
Valters Jansons April 20, 2021, 9:21 a.m. UTC | #4
On Tue, Apr 13, 2021 at 9:53 PM Michael Tremer
<michael.tremer@ipfire.org> wrote:
> We also have a problem that one file never makes it into the correct package no matter what: https://bugzilla.ipfire.org/show_bug.cgi?id=12468
>
> Stefan originally packaged this and this was good enough. This was his first package and the whole build system feels quite tricky. If you like, you can grab that bug and solve it.

I can confirm the .deb files only contain
usr/share/doc/location-importer/ as reported in the bug.

This can be independently verified by downloading a
location-importer.deb from
https://packages.ipfire.org/location/buster/ and querying the package
contents with `dpkg -c location-importer_0.9.6-1_$ARCH.deb`.

Would be interesting to see build logs for this. Maybe they could shed
some light.

--Valters
  

Patch

diff --git a/debian/rules b/debian/rules
index 4e544d7..8893b7b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,7 @@  export DEB_BUILD_MAINT_OPTIONS=hardening=+all
        dh $@ --with python3 --with-systemd

 override_dh_auto_configure:
+       intltoolize --force --automake
        dh_auto_configure -- --disable-perl

 override_dh_perl: