we operate within a corporate environment with many slightly weird constraints, to become effective in this environment we have created our own system for building and deploying software. The software typically works like this:
Download and build and install the software to the temporary location
$BUILD_ROOT/install
.If all software packages is succesfully installed in step 1, "atomically" copy
$BUILD_ROOT/install
to$PREFIX
usingrsync
.
This works quite well, but the problem is that some of the files created during the initial install step are not fully relocatable - and will contain contain the path $BUILD_ROOT/install
.
I wondered if it were possible to make the $BUILD_ROOT/install
directory (temporarily) appear as $PREFIX
- i.e. that I could do something like:
mount-trick $PREFIX $BUILD_ROOT/install
- configure and install software using
$PREFIX
- but due to the mount-trick the files will actually go to$BUILD_ROOT/install
. - cancel mount-trick
rsync $BUILD_ROOT/install $PREFIX
I sort of feel something like should be possible using things like bind mount, loop mount and/or chroot?
--prefix
andDESTDIR
). – Stephen Kitt Feb 27 '18 at 10:43pkg_add
). I don't know much about the internals of that though. – Kusalananda Feb 27 '18 at 10:49