[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

(newbie?) debian packaging questions



Hi list members,

I'm currently facing some little issues with building my amavisd-milter
package after the migration from mercurial to git (thanks again Alexander Wirt
for doing the actual repository conversion!). The issues at hand did not show
up when using mercurial-buildpackage but now under git-buildpackage (as well as
dpkg-buildpackage directly) I can observe them.

1.
configure: WARNING: Unrecognized options: --disable-maintainer-mode

Is there a possibility to turn off the usage of --disable-maintainer-mode?

2.
cd . && /bin/bash /usr/src/GIT/AMAVISD-MILTER/build-area/amavisd-milter-1.5.0/aclocal/missing --run aclocal-1.10
/usr/src/GIT/AMAVISD-MILTER/build-area/amavisd-milter-1.5.0/aclocal/missing: line 54: aclocal-1.10: command not found
WARNING: `aclocal-1.10' is missing on your system.  You should only need it if
         you modified `acinclude.m4' or `configure.ac'.  You might want
         to install the `Automake' and `Perl' packages.  Grab them from
         any GNU archive site.
 cd . && /bin/bash /usr/src/GIT/AMAVISD-MILTER/build-area/amavisd-milter-1.5.0/aclocal/missing --run automake-1.10 --foreign
/usr/src/GIT/AMAVISD-MILTER/build-area/amavisd-milter-1.5.0/aclocal/missing: line 54: automake-1.10: command not found
WARNING: `automake-1.10' is missing on your system.  You should only need it if
         you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
         You might want to install the `Automake' and `Perl' packages.
         Grab them from any GNU archive site.
cd . && /bin/bash /usr/src/GIT/AMAVISD-MILTER/build-area/amavisd-milter-1.5.0/aclocal/missing --run autoconf
/usr/src/GIT/AMAVISD-MILTER/build-area/amavisd-milter-1.5.0/aclocal/missing: line 54: autoconf: command not found
WARNING: `autoconf' is missing on your system.  You should only need it if
         you modified `configure.ac'.  You might want to install the
         `Autoconf' and `GNU m4' packages.  Grab them from any GNU
         archive site.

cd . && /bin/bash /usr/src/GIT/AMAVISD-MILTER/build-area/amavisd-milter-1.5.0/aclocal/missing --run autoheader
/usr/src/GIT/AMAVISD-MILTER/build-area/amavisd-milter-1.5.0/aclocal/missing: line 54: autoheader: command not found
WARNING: `autoheader' is missing on your system.  You should only need it if
         you modified `acconfig.h' or `configure.ac'.  You might want
         to install the `Autoconf' and `GNU m4' packages.  Grab them
         from any GNU archive site.

The warning here is partially correct as I have patched configure.ac with an
fix from upstream cvs but I also made a patch which directly modifies configure
so there is no need to do a rebuild... is there a possibility to avoid this
warning messages?

3.
The package uses hardening-includes by including it in the rules file (like
metioned in /usr/share/hardening-includes/hardening.make):
include /usr/share/hardening-includes/hardening.make
CFLAGS += $(HARDENING_CFLAGS)
LDFLAGS += $(HARDENING_LDFLAGS)

Then it uses them within configure:
override_dh_auto_configure:
        dh_auto_configure -- --prefix=/usr --mandir=\$${prefix}/share/man \
        --sysconfdir=/etc --localstatedir=/var/lib/amavis \
        --with-working-dir=/var/lib/amavis/tmp \
        CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"

But the result is the following:
dh_auto_configure -- --prefix=/usr --mandir=\${prefix}/share/man \
        --sysconfdir=/etc --localstatedir=/var/lib/amavis \
        --with-working-dir=/var/lib/amavis/tmp \
        CFLAGS="-g -O2  -fPIE  -fstack-protector --param ssp-buffer-size=4  -D_FORTIFY_SOURCE=2  -Wformat -Wformat-security -Werror=format-security   -fPIE  -fstack-protector --param ssp-buffer-size=4  -D_FORTIFY_SOURCE=2  -Wformat -Wformat-security -Werror=format-security " LDFLAGS="  -fPIE -pie  -Wl,-z,relro  -Wl,-z,now   -fPIE -pie  -Wl,-z,relro  -Wl,-z,now "

The workaround I discovered for this issue is to specify the additional flags
in configure itself:
override_dh_auto_configure:
        dh_auto_configure -- --prefix=/usr --mandir=\$${prefix}/share/man \
        --sysconfdir=/etc --localstatedir=/var/lib/amavis \
        --with-working-dir=/var/lib/amavis/tmp \
        CFLAGS="$(CFLAGS) $(HARDENING_CFLAGS)" \
        LDFLAGS="$(LDFLAGS) $(HARDENING_LDFLAGS)"

Which looks more correct IMHO:
dh_auto_configure -- --prefix=/usr --mandir=\${prefix}/share/man \
        --sysconfdir=/etc --localstatedir=/var/lib/amavis \
        --with-working-dir=/var/lib/amavis/tmp \
        CFLAGS="-g -O2  -fPIE  -fstack-protector --param ssp-buffer-size=4  -D_FORTIFY_SOURCE=2  -Wformat -Wformat-security -Werror=format-security " \
        LDFLAGS="  -fPIE -pie  -Wl,-z,relro  -Wl,-z,now "

But maybe someone has a hint why this happens in the first place and how to
avoid it.

Thanks everybody for reading and hope somebody can help me

Kind regards
Harald Jenny

P.S: No need to CC me, please just reply to the list


Reply to: