Bug#788731: libmongodb-perl: FTBFS if port 12345 is already in use
Dominic Hargreaves
dom at earth.li
Sun Jun 14 15:45:43 UTC 2015
Source: libmongodb-perl
Version: 0.705.0.0-1
Severity: minor
This package FTBFS if the build process is unable to bind to port 12345:
# mongod is required during build only on i386 amd64
# "until netstat" command wait for mongod to be listening on PORT
if [ -x /usr/bin/mongod ]; then \
mongod --dbpath /«PKGBUILDDIR»/debian/build --noprealloc --bind_ip 127.0.0.1 -
-nojournal --port 12345 --quiet --fork --logpath /«PKGBUILDDIR»/debian/build/mon
god.log --pidfilepath /«PKGBUILDDIR»/debian/build/mongod.pid; \
i=10; \
until (/bin/netstat -want | grep -q 127.0.0.1:12345 ) || [ $i = 0 ]; do sleep 1; i=$((i-1)); echo waiting for mongod; done \
fi
make[1]: *** wait: No child processes. Stop.
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes. Stop.
make: *** [build-arch] Terminated
debian/rules:11: recipe for target 'build-arch' failed
Build killed with signal TERM after 150 minutes of inactivity
This could happen if, for example, two builds of the package are
happening at the same time[1], or if the port is being used for some other
reason.
Ideally, the package would dynamically allocated an unused port for its
tests.
Dominic.
[1] I suspect what happened when I saw this is that mongod failed to
shut down cleanly when the other build process succeeded, but the system
isn't running any more so I can't investigate further. The bug as written
still stands, however.
More information about the pkg-perl-maintainers
mailing list