Bug 228018 - installworld fails when specifying DESTDIR
Summary: installworld fails when specifying DESTDIR
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 11.1-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
: 228233 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-05-06 11:31 UTC by Dries Michiels
Modified: 2018-06-16 21:28 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dries Michiels 2018-05-06 11:31:15 UTC
I did not receive this error when DESTDIR is not set (installing on host).
When issuing: "installworld DESTDIR=/jail/test" the following occurs:

..
install  -s -o root -g wheel -m 555   pipe_reverse2_test /jail/test/usr/tests/sys/kern/pipe/pipe_reverse2_test
install  -o root -g wheel -m 444  pipe_reverse2_test.debug /jail/test/usr/lib/debug/usr/tests/sys/kern/pipe/pipe_reverse2_test.debug
(cd /usr/src/tests/sys/kern/pipe &&  DEPENDFILE=.depend.pipe_reverse_test  NO_SUBDIR=1 make -f /usr/src/tests/sys/kern/pipe/Makefile _RECURSING_PROGS=t  PROG=pipe_reverse_test  install)
install  -s -o root -g wheel -m 555   pipe_reverse_test /jail/test/usr/tests/sys/kern/pipe/pipe_reverse_test
install  -o root -g wheel -m 444  pipe_reverse_test.debug /jail/test/usr/lib/debug/usr/tests/sys/kern/pipe/pipe_reverse_test.debug
(cd /usr/src/tests/sys/kern/pipe &&  DEPENDFILE=.depend.pipe_wraparound_test  NO_SUBDIR=1 make -f /usr/src/tests/sys/kern/pipe/Makefile _RECURSING_PROGS=t  PROG=pipe_wraparound_test  install)
install  -s -o root -g wheel -m 555   pipe_wraparound_test /jail/test/usr/tests/sys/kern/pipe/pipe_wraparound_test
install  -o root -g wheel -m 444  pipe_wraparound_test.debug /jail/test/usr/lib/debug/usr/tests/sys/kern/pipe/pipe_wraparound_test.debug
(cd /usr/src/tests/sys/kern &&  DEPENDFILE=.depend.pdeathsig_helper  NO_SUBDIR=1 make -f /usr/src/tests/sys/kern/Makefile _RECURSING_PROGS=t  PROG=pdeathsig_helper  install)
install  -s -o root -g wheel -m 555   pdeathsig_helper /jail/test/pdeathsig_helper
install: pdeathsig_helper: No such file or directory
*** Error code 71

Stop.
make[7]: stopped in /usr/src/tests/sys/kern
*** Error code 1

Stop.
make[6]: stopped in /usr/src/tests/sys/kern
*** Error code 1

Stop.
make[5]: stopped in /usr/src/tests/sys
*** Error code 1

Stop.
make[4]: stopped in /usr/src/tests
*** Error code 1

Stop.
make[3]: stopped in /usr/src
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
Comment 1 Ed Maste freebsd_committer 2018-05-06 12:45:57 UTC
I'm regularly building and testing stable branches with installs via DESTDIR= and have not observed this issue.  I'd recommend posting build failures on the FreeBSD-stable mailing list.
Comment 2 Trond.Endrestol 2018-05-09 12:28:39 UTC
(In reply to Dries Michiels from comment #0)
I can confirm similar behaviour on stable/11 amd64 r333390. DESTDIR was set to /mnt during installworld when this happened (I simply grepped for pdeathsig_helper in my typescript):

--- pdeathsig_helper.install ---
(cd /usr/src/tests/sys/kern &&  DEPENDFILE=.depend.pdeathsig_helper  NO_SUBDIR=1 make -f /usr/src/tests/sys/kern/Makefile _RECURSING_PROGS=t  PROG=pdeathsig_helper  install)
--- pdeathsig_helper.install ---
install   -o root -g wheel -m 555   pdeathsig_helper /mnt/pdeathsig_helper
--- pdeathsig_helper.install ---
install  -o root -g wheel -m 444  pdeathsig_helper.debug /mnt/.debug/pdeathsig_helper.debug

First I thought someone had broken in to my system, but the timestamps on the curious files corresponds with the time I ran make installworld:

# LANG=en_US.UTF-8 ls -lT /pdeathsig_helper /.debug/pdeathsig_helper.debug
-r--r--r--  1 root  wheel  7528 May  9 12:06:58 2018 /.debug/pdeathsig_helper.debug
-r-xr-xr-x  1 root  wheel  8576 May  9 12:06:58 2018 /pdeathsig_helper

We better take this to the stable list.
Comment 3 Trond.Endrestol 2018-05-09 12:38:51 UTC
(In reply to Trond.Endrestol from comment #2)
I ran installkernel immediately after installworld. Judging from r333162, these strange files belong in /usr/tests/sys/kern, not /.
Comment 4 Dries Michiels 2018-05-09 20:16:57 UTC
(In reply to Trond.Endrestol from comment #3)
Can someone communicate this on the list?
I can but only in a few days.
Comment 5 Trond.Endrestol 2018-05-09 21:10:19 UTC
(In reply to Dries Michiels from comment #4)
I already have. The quick fix is to patch tests/sys/kern/Makefile to define BINDIR=${TESTSDIR} on the line immediately after TESTSDIR is defined. I think it's wise to wipe /usr/obj before recompiling.
Comment 6 Helge Oldach 2018-05-14 12:12:19 UTC
*** Bug 228233 has been marked as a duplicate of this bug. ***
Comment 7 commit-hook freebsd_committer 2018-05-15 10:10:19 UTC
A commit references this bug:

Author: kib
Date: Tue May 15 10:10:15 UTC 2018
New revision: 333625
URL: https://svnweb.freebsd.org/changeset/base/333625

Log:
  Handle the difference between HEAD and stable/11 tests build.
  This is a direct commit to stable/11.

  PR:	228018, 228233
  Tested by:	Helge Oldach <freebsd@oldach.net>
  Sponsored by:	The FreeBSD Foundation
  Approved by:	re (marius)

Changes:
  stable/11/tests/sys/kern/Makefile