[Debian GNUstep maintainers] Bug#806197: gnustep-make: FTBFS when built with dpkg-buildpackage -A (dh_testroot in build-indep)
Santiago Vila
sanvila at debian.org
Wed Nov 25 10:31:43 UTC 2015
Package: src:gnustep-make
Version: 2.6.6-3
User: sanvila at debian.org
Usertags: binary-indep
Severity: important
Dear maintainer:
I tried to build this package with "dpkg-buildpackage -A"
(i.e. only architecture-independent packages), and it failed:
--------------------------------------------------------------------------------
[...]
debian/rules build-indep
dh_testdir
mkdir /<<PKGBUILDDIR>>/build-gnustep-make
dh_autotools-dev_updateconfig
cd /<<PKGBUILDDIR>>/build-gnustep-make && ../configure \
--with-layout=fhs-system \
--enable-native-objc-exceptions \
--build x86_64-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for library combo... gnu-gnu-gnu
checking for apple compiler flags... yes
checking for ar... ar
checking for dlltool... no
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking if 'install -p' works... yes
checking if we should use 'install -p' when installing files... yes
checking whether ln -s works... yes
checking for gnutar... no
checking for gtar... no
checking for chown... chown
checking if we should enable strict gnustep-make version 2 mode by default... no
checking for GNUstep filesystem layout to use... fhs-system
checking if we manage to import the filesystem layout configuration... ok
checking for prefix... /usr
checking for GNUstep configuration file to use... /etc/GNUstep/GNUstep.conf
checking if we should import an existing configuration file... no
checking for user config file to use... .GNUstep.conf
checking if the obsolete --with-user-dir option was used... no: good
checking for user defaults dir to use... GNUstep/Defaults
checking for GNUSTEP_MAKEFILES to use... /usr/share/GNUstep/Makefiles
checking for flattened directory structure... yes
configure: Now printing the filesystem layout configuration.
checking for System Applications directory... /usr/lib/GNUstep/Applications
checking for System Admin Applications directory... /usr/lib/GNUstep/Applications
checking for System Web Applications directory... /usr/lib/GNUstep/WebApplications
checking for System Tools directory... /usr/bin
checking for System Admin Tools directory... /usr/sbin
checking for System Library directory... /usr/lib/GNUstep
checking for System Headers directory... /usr/include/GNUstep
checking for System Libraries directory... /usr/lib
checking for System Documentation directory... /usr/share/GNUstep/Documentation
checking for System Info Documentation directory... /usr/share/info
checking for System Man Documentation directory... /usr/share/man
checking for Network Applications directory... /usr/local/lib/GNUstep/Applications
checking for Network Admin Applications directory... /usr/local/lib/GNUstep/Applications
checking for Network Web Applications directory... /usr/lib/GNUstep/WebApplications
checking for Network Tools directory... /usr/local/bin
checking for Network Admin Tools directory... /usr/local/sbin
checking for Network Library directory... /usr/local/lib/GNUstep
checking for Network Headers directory... /usr/local/include/GNUstep
checking for Network Libraries directory... /usr/local/lib
checking for Network Documentation directory... /usr/local/share/GNUstep/Documentation
checking for Network Info Documentation directory... /usr/local/share/info
checking for Network Man Documentation directory... /usr/local/share/man
checking for Local Applications directory... /usr/local/lib/GNUstep/Applications
checking for Local Admin Applications directory... /usr/local/lib/GNUstep/Applications
checking for Local Web Applications directory... /usr/local/lib/GNUstep/WebApplications
checking for Local Tools directory... /usr/local/bin
checking for Local Admin Tools directory... /usr/local/sbin
checking for Local Library directory... /usr/local/lib/GNUstep
checking for Local Headers directory... /usr/local/include/GNUstep
checking for Local Libraries directory... /usr/local/lib
checking for Local Documentation directory... /usr/local/share/GNUstep/Documentation
checking for Local Info Documentation directory... /usr/local/share/info
checking for Local Man Documentation directory... /usr/local/share/man
checking for User Applications directory... GNUstep/Applications
checking for User Admin Applications directory... GNUstep/Applications/Admin
checking for User Web Applications directory... GNUstep/WebApplications
checking for User Tools directory... GNUstep/Tools
checking for User Admin Tools directory... GNUstep/Tools/Admin
checking for User Library directory... GNUstep/Library
checking for User Headers directory... GNUstep/Library/Headers
checking for User Libraries directory... GNUstep/Library/Libraries
checking for User Documentation directory... GNUstep/Library/Documentation
checking for User Info Documentation directory... GNUstep/Library/Documentation/info
checking for User Man Documentation directory... GNUstep/Library/Documentation/man
checking for System User directory... /home
checking for Network User directory... /home
checking for Local User directory... /home
checking for custom shared objc library... NONE
checking for the flag to link libobjc... -lobjc
checking whether objc has thread support... no
checking whether Objective-C++ is supported... yes
checking whether we should use the nonfragile ABI... not requested by user
checking for the flag to use to do partial linking... -r
checking for the GCC version... version: 5.2
checking whether the compiler is clang... no
checking whether the compiler supports native ObjC exceptions... yes
checking if the compiler supports autodependencies... yes: gcc version is 5.2 >= 3.0
checking if the compiler supports precompiled headers... yes
checking if the compiler requires -shared flag to build for Solaris... yes: gcc version is 5.2 >= 4.0
checking if we should enable 'make debug=yes' by default... no
checking for gmake... no
checking for gnumake... no
checking for make... make
checking for the GNU Make version... version: 4.0
checking for GNU Make >= 3.79... yes
checking if GNU Make has the info function... yes
checking if we should strip makefiles after installation... no
checking if we should enable support for parallel building... yes
checking for the version of gnustep-make we are compiling... 2.6.6
checking for latex2html... no
checking for bash... /bin/bash
checking for test... /usr/bin/test
configure: creating ./config.status
config.status: creating config-noarch.make
config.status: creating config.make
config.status: creating openapp
config.status: creating opentool
config.status: creating executable.template
config.status: creating GNUmakefile
config.status: creating GNUstep.conf
config.status: creating GNUstep-strict-v2.conf
config.status: creating GNUstep.sh
config.status: creating GNUstep.csh
config.status: creating fixpath.sh
config.status: creating gnustep-make.spec
config.status: creating gnustep-config
config.status: creating TestFramework/gnustep-tests
config.status: creating filesystem.make
config.status: creating filesystem.sh
config.status: creating filesystem.csh
config.status: executing default commands
touch debian/gnustep-make-configure-stamp
/usr/bin/make -C /<<PKGBUILDDIR>>/build-gnustep-make
make[1]: Entering directory '/<<PKGBUILDDIR>>/build-gnustep-make'
Thanks. All is ready: type '/usr/bin/make install' to install gnustep-make.
make[1]: Leaving directory '/<<PKGBUILDDIR>>/build-gnustep-make'
touch debian/build-arch-stamp
dh_testdir
for i in dh_gnustep gnustep-common.links gnustep-common.dirs gnustep-common.postinst gnustep-common.prerm; do \
[ -e debian/fhs/$i ] && \
cp debian/fhs/$i debian/$i || true; \
[ -e debian/fhs/$i.in ] && \
sed -e 's:@GS_USE_FHS@:yes:g' -e 's:@GS_ROOT@:/usr/lib/GNUstep:g' -e 's:@GS_SYSTEM_ROOT@:/usr/lib/GNUstep/System:g' -e 's:@GS_LOCAL_ROOT@:/usr/local/lib/GNUstep/Local:g' -e 's:@GS_NETWORK_ROOT@:/usr/local/lib/GNUstep/Network:g' -e 's:@GS_DOC_DIR@:/usr/share/GNUstep/Documentation:g' -e 's:@GS_MAKE_DIR@:/usr/share/GNUstep/Makefiles:g' -e 's:@GS_SCRIPT_DIR@:/usr/lib/GNUstep/System/Tools:g' -e 's:@GS_FS_PACKAGE@:gnustep-fslayout-fhs:g' debian/fhs/$i.in > debian/$i || true; \
done
chmod +x debian/dh_gnustep
for i in config.mk gnustep-make.dirs gs_make; do \
sed -e 's:@GS_USE_FHS@:yes:g' -e 's:@GS_ROOT@:/usr/lib/GNUstep:g' -e 's:@GS_SYSTEM_ROOT@:/usr/lib/GNUstep/System:g' -e 's:@GS_LOCAL_ROOT@:/usr/local/lib/GNUstep/Local:g' -e 's:@GS_NETWORK_ROOT@:/usr/local/lib/GNUstep/Network:g' -e 's:@GS_DOC_DIR@:/usr/share/GNUstep/Documentation:g' -e 's:@GS_MAKE_DIR@:/usr/share/GNUstep/Makefiles:g' -e 's:@GS_SCRIPT_DIR@:/usr/lib/GNUstep/System/Tools:g' -e 's:@GS_FS_PACKAGE@:gnustep-fslayout-fhs:g' debian/$i.in > debian/$i; \
done
chmod +x debian/gs_make
touch debian/prep-stamp
dh_testdir
dh_testroot
dh_testroot: You must run this as root (or use fakeroot).
debian/rules:228: recipe for target 'debian/install-arch-stamp' failed
make: *** [debian/install-arch-stamp] Error 255
dpkg-buildpackage: error: debian/rules build-indep gave error exit status 2
--------------------------------------------------------------------------------
In this case, debian/rules tries to ensure that you are root in a
target which is not supposed to be executed as root, and it fails.
The way to fix this is up to you, but my own personal preference,
which I would also recommend, is to get rid of each and every
dh_testdir and dh_testroot call.
After all, dpkg-buildpackage already takes care of being root
(or fakeroot) when required, and of course, it does also take care of
being in the right directory. Both things happen by design, so removing
those checks just make debian/rules shorter and easier to understand
without any loss of functionality. It would also make debian/rules
a little bit closer to the minimalistic style that "dh" allows.
Once this issue with dh_testroot is fixed, please ensure that both
"dpkg-buildpackage -A" and "dpkg-buildpackage -B" work. After that,
the package will be suitable to be uploaded in source-only form if you
wish.
Thanks.
More information about the pkg-GNUstep-maintainers
mailing list