Bug#897592: ebtables: randomly FTBFS - makefile is not parallel safe

2018-05-04 Thread James Cowgill
Hi,

On 03/05/18 16:27, Alberto Molina Coballes wrote:
> Thanks James, these kinds of errors are often difficult to deal with.
> 
> Do you think that it should be enough disabling parallel build in dh?
> Tested on amd64 seems to work properly.

Yes that should workaround the problem.

It seems to me that these issues are caused by the rearrangements in the
last two hunks of the "makefile_adjustments.patch" patch. Maybe you can
remove those hunks? The package seems to build ok without them (except
that ebtables-config needs moving).

James



signature.asc
Description: OpenPGP digital signature


Bug#897592: ebtables: randomly FTBFS - makefile is not parallel safe

2018-05-03 Thread Alberto Molina Coballes
Thanks James, these kinds of errors are often difficult to deal with.

Do you think that it should be enough disabling parallel build in dh?
Tested on amd64 seems to work properly.

Alberto



Bug#897592: ebtables: randomly FTBFS - makefile is not parallel safe

2018-05-03 Thread Arturo Borrero Gonzalez
On 3 May 2018 at 12:07, James Cowgill  wrote:
> When parallel builds are enabled, the "scripts" and "exec" targets will
> be run in parallel which fails because:
> - exec does not create $(DESTDIR)$(BINDIR) so will fail if scripts has
> not created it yet.
> - exec copies ebtables-save_ which will also fail if scripts has not
> created it yet.
>

Thanks James :-)

your report saved us valuable time investigating the issue by ourselves.

May I ask you to send a patch? That would be awesome, we always
welcome help in the pkg-netfilter team.



Bug#897592: ebtables: randomly FTBFS - makefile is not parallel safe

2018-05-03 Thread James Cowgill
Source: ebtables
Version: 2.0.10.4-4
Severity: serious
Tags: sid buster

Hi,

ebtables randomly FTBFS during the install stage. Example on ppc64el:
>   make -j8 -Oline install DESTDIR=/<>/debian/ebtables 
> AM_UPDATE_INFO_DIR=no "INSTALL=install --strip-program=true"
> make[1]: Entering directory '/<>'
> mkdir -p /<>/debian/ebtables/etc
> make[1]: Leaving directory '/<>'
> make[1]: Entering directory '/<>'
> sed -e 's/$(VERSION)/2.0.10-4/' -e 's/$(DATE)/December\ 2011/' -e 
> 's/$(LOCKFILE)/\/run\/ebtables.lock/' ebtables.8 > ebtables.8_
> make[1]: Leaving directory '/<>'
> make[1]: Entering directory '/<>'
> install -m 0644 -o root -g root ethertypes 
> /<>/debian/ebtables/etc/ethertypes
> make[1]: Leaving directory '/<>'
> make[1]: Entering directory '/<>'
> mkdir -p /<>/debian/ebtables/lib/ebtables 
> /<>/debian/ebtables/etc/init.d 
> /<>/debian/ebtables/etc/default 
> /<>/debian/ebtables/usr/share/man/man8
> make[1]: Leaving directory '/<>'
> make[1]: Entering directory '/<>'
> cat ebtables-save | sed 's/__EXEC_PATH__/\/sbin/g' > ebtables-save_
> make[1]: Leaving directory '/<>'
> make[1]: Entering directory '/<>'
> mkdir -p /<>/debian/ebtables/sbin
> make[1]: Leaving directory '/<>'
> make[1]: Entering directory '/<>'
> install -m 0755 -o root -g root ebtables /<>/debian/ebtables/sbin
> install: cannot overwrite directory '/<>/debian/ebtables/sbin' 
> with non-directory
> make[1]: *** [Makefile:176: exec] Error 1
> make[1]: Leaving directory '/<>'
> make[1]: *** Waiting for unfinished jobs
> make[1]: Entering directory '/<>'
> cat ebtables.sysv | sed 's/__EXEC_PATH__/\/sbin/g' | sed 
> 's/__SYSCONFIG__/\/etc\/default/g' > ebtables.sysv_
> make[1]: Leaving directory '/<>'
> make[1]: Entering directory '/<>'
> if [ "/<>/debian/ebtables" != "" ]; then mkdir -p 
> /<>/debian/ebtables/etc/init.d; fi
> make[1]: Leaving directory '/<>'
> make[1]: Entering directory '/<>'
> cat ebtables-config | sed 's/__SYSCONFIG__/\/etc\/default/g' > 
> ebtables-config_
> make[1]: Leaving directory '/<>'
> make[1]: Entering directory '/<>'
> if [ "/<>/debian/ebtables" != "" ]; then mkdir -p 
> /<>/debian/ebtables/etc/default; fi
> make[1]: Leaving directory '/<>'
> dh_auto_install: make -j8 -Oline install 
> DESTDIR=/<>/debian/ebtables AM_UPDATE_INFO_DIR=no 
> "INSTALL=install --strip-program=true" returned exit code 2
> make: *** [debian/rules:4: binary-arch] Error 25

This happens because 2.0.10.4-4 enabled parallel builds (by virtue of
using dh compat 11), but the install part of the makefile is not safe to
run in parallel.

For example, in this case we have something like this (trimmed slightly):
> .PHONY: scripts
> scripts: ebtables-save ebtables.sysv ebtables-config
>   cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
>   mkdir -p $(DESTDIR)$(BINDIR)
[...]
> .PHONY: exec
> exec: ebtables ebtables-restore
>   mkdir -p $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INITDIR) 
> $(DESTDIR)$(SYSCONFIGDIR) $(DESTDIR)$(MANDIR)/man8
>   install -m 0755 -o root -g root $(PROGNAME) $(DESTDIR)$(BINDIR)
>   install -m 0755 -o root -g root ebtables-restore 
> $(DESTDIR)$(BINDIR)/ebtables-restore
>   install -m 0755 -o root -g root ebtables-save_ 
> $(DESTDIR)$(BINDIR)/ebtables-save
[...]
> .PHONY: install
> install: $(MANDIR)/man8/ebtables.8 $(DESTDIR)$(ETHERTYPESFILE) scripts exec

When parallel builds are enabled, the "scripts" and "exec" targets will
be run in parallel which fails because:
- exec does not create $(DESTDIR)$(BINDIR) so will fail if scripts has
not created it yet.
- exec copies ebtables-save_ which will also fail if scripts has not
created it yet.

Thanks,
James



signature.asc
Description: OpenPGP digital signature