Bug 193091 - *** FATAL ERROR: Cannot copy files to the temproot environment
Summary: *** FATAL ERROR: Cannot copy files to the temproot environment
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.3-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-28 10:17 UTC by kes-kes
Modified: 2015-03-13 22:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kes-kes 2014-08-28 10:17:58 UTC
# cd /usr/src/9

# mergemaster -p
*** Creating the temporary root environment in /var/tmp/temproot
 *** /var/tmp/temproot ready for use
 *** Creating and populating directory structure in /var/tmp/temproot

cp: /usr/src/etc/master.passwd: No such file or directory

  *** FATAL ERROR: Cannot copy files to the temproot environment

WORKAROUND FOR THIS:
#cd /usr/src
#ln -s /usr/src/9/etc /usr/src/etc

After that I have next FATAL:
# mergemaster
*** Creating the temporary root environment in /var/tmp/temproot
 *** /var/tmp/temproot ready for use
 *** Creating and populating directory structure in /var/tmp/temproot

make: don't know how to make distrib-dirs. Stop

  *** FATAL ERROR: Cannot 'cd' to /usr/src and install files to
      the temproot environment

WORKAROUND FOR THIS:
#cd /usr
#mv /usr/src/ /usr/srca
#ln -s /usr/srca/9 /usr/src
#ln -s /usr/srca/9 usr/src/9


Please FIX that and allow to build/install world while sources are not in /usr/src

EXPECTED problem is here:
/usr/src/usr.sbin/mergemaster/mergemaster.sh:638
# Assign the source directory
#
SOURCEDIR=${SOURCEDIR:-/usr/src} <<<<<<<<<<<<<<<<<<<<<
if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \
   -f ${SOURCEDIR}/../Makefile.inc1 ]; then
  echo " *** The source directory you specified (${SOURCEDIR})"

However doing:
-SOURCEDIR=${SOURCEDIR:-/usr/src}
+SOURCEDIR=${SOURCEDIR:-/usr/src/9}
while I were in /usr/src/9 do not fix the problem.
So I did symlinks.
Comment 1 Chris Collins 2015-03-13 22:08:19 UTC
I confirm the bug and the workaround is correct, is noone going to fix this?

Although when doing the 2nd symlink there is no need to do the first, so just the 2nd symlink needed for workaround.