"dh_autoreconf: Can only be run once, see dh-autoreconf" when building package from Sid for Stretch
Several days ago, I fetched "network-manager-l2tp" and "openfortivpn"
source from Debian testing/sid and tried to build them for Stretch,
using sbuild. Basically, what I did was
1, enable "testing" or "sid" in sources.list;
2, "apt update";
3, fetch the source of the package.
4, sbuild the package with "-d stretch"
I was able to generated guile_2.2.3-3 package with above steps. But
for "network-manager-l2tp" and "openfortivpn", if I build directly
from the unchanged source from Sid, a complaint saying something like
"dephelper (>= 11) was needed" was in the build log.
I tried sbuild with ' --extra-repository="deb
http://httpredir.debian.org/debian stretch-backports main" '.
dephelper (>= 11) was not met.
I tried manually adding stretch-backports in sources.list in the
schroot and then sbuild. dephelper (>= 11) was not met.
I tried to change debhelper to (>= 10) at build-deps in
debian/control. But sbuid of both package would fail with "Attempted"
in its result report. Error messages down below.
I tried "-d stretch-backports", it was not valid.
On wondering how backports for a package is created, I looked at
https://wiki.debian.org/SimpleBackportCreation . Then I found I could
generate a deb package for both packages at the step "fakeroot
debian/rules binary", but both failed at "dpkg-buildpackage -us -uc".
The error messages were all similar to the following two session. They
all failed with the same error when I sbuild them. Although I did have
to change version requirement for debhelper to (>10) in all cases.
sed -e 's|[@]SYSCONFDIR[@]|/etc|g;s|[@]DATADIR[@]|/usr/share/openfortivpn|g;'
doc/openfortivpn.1.in >doc/openfortivpn.1
CC src/openfortivpn-config.o
...
CC src/openfortivpn-userinput.o
CCLD openfortivpn
make[1]: Leaving directory
'/data/project/pkg/openfortivpn/openfortivpn-1.7.1/openfortivpn-1.7.1'
dh_auto_test
fakeroot debian/rules binary
dh binary --with autoreconf
dh_testdir
dh_update_autotools_config
dh_autoreconf
dh_autoreconf: Can only be run once, see dh-autoreconf(7)
debian/rules:21: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
dh binary --with ppp
dh_testdir
dh_update_autotools_config
debian/rules override_dh_autoreconf
make[1]: Entering directory
'/data/project/pkg/L2TP/network-manager-l2tp/network-manager-l2tp_1.2.10-1/network-manager-l2tp-1.2.10'
dh_autoreconf --as-needed
dh_autoreconf: Can only be run once, see dh-autoreconf(7)
debian/rules:13: recipe for target 'override_dh_autoreconf' failed
make[1]: *** [override_dh_autoreconf] Error 2
make[1]: Leaving directory
'/data/project/pkg/L2TP/network-manager-l2tp/network-manager-l2tp_1.2.10-1/network-manager-l2tp-1.2.10'
debian/rules:10: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
I'm relatively new to Debian packaging. So I may be missing something
obvious. Any ideas?
Cheers,
Fonzie
Reply to: