--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: tla: FTBFS when using sudo: $(PWD) reset
- From: Michael Banck <mbanck@debian.org>
- Date: Wed, 10 May 2006 19:01:03 +0200
- Message-id: <20060510170103.GC8926@chemicalconnection.dyndns.org>
Package: tla
Version: 1.3.3-3.2
Severity: serious
Since the sudo behaviour change to strip most environment variables,
$(PWD) no longer is set during package build, but debian/rules relies on
it:
| /usr/bin/sudo debian/rules binary-arch
|dh_testdir
|dh_testroot
|dh_clean -k
|dh_installdirs
|/usr/bin/make -C /debian/build install destdir=/debian/tmp
|make: *** /debian/build: No such file or directory. Stop.
|make: *** [install] Error 2
This happens on all buildds using sudo, i.e. alpha, mips and mipsel
currently I believe.
A full build log can e.g. be found at
http://buildd.debian.org/fetch.php?pkg=tla%26ver=1.3.3-3.2%26arch=alpha%26stamp=1145084722%26file=log
The problem is in debian/rules
|SRC := $(PWD)/src
|BUILD := $(PWD)/debian/build
|TARGET := $(PWD)/debian/tmp
|[...]
|install: debian/build-stamp
| dh_testdir
| dh_testroot
| dh_clean -k
| dh_installdirs
|
| $(MAKE) -C $(BUILD) install destdir=$(TARGET)
As binary-arch is run with sudo, the install target is as well, and the
$(BUILD variable only gets expanded to /debian/build in this case as
$(PWD) was stripped by sudo. The solution is to use e.g. $(curdir)
instead of $(PWD).
Michael
--
Michael Banck
Debian Developer
mbanck@debian.org
http://www.advogato.org/person/mbanck/diary.html
--- End Message ---