Problem with ProjectRoot and "make DESTDIR=foo"
Mike A. Harris
mharris at www.linux.org.uk
Sat Jan 29 04:01:59 PST 2005
When building X in our rpms, we use the following lines:
make -C xc DESTDIR=$RPM_BUILD_ROOT install install.man
make -C xc DESTDIR=$RPM_BUILD_ROOT install.sdk
Where RPM_BUILD_ROOT gets defined by rpm to a fake root to
dump the files into prior to packaging. RPM_BUILD_ROOT on
my system ends up normally being:
So, the "make .. install" lines above create the installation
hierarchy underneath RPM_BUILD_ROOT.
I'm trying to implement developmental/experimental ProjectRoot
support in my rpm packaging currently, and after the two above
make install lines execute, the build fails shortly after in
the rpm script due to directories missing in RPM_BUILD_ROOT.
I examined the RPM_BUILD_ROOT, and X is still getting installed
into $RPM_BUILD_ROOT/usr/X11R6 rather than $RPM_BUILD_ROOT/ProjectRoot
like I expected. I'm assuming this is due to some misunderstanding
on my part, as ProjectRoot seems to work if DESTDIR is not used.
Here are the host.def defines being used to define ProjectRoot:
#define ProjectRoot /usr/local/X11R6
#define NothingOutsideProjectRoot YES
#define EtcX11Directory ProjectRoot/etc
However, I've just tried to do a ProjectRoot build, and after
the build finishes and the above "make ... install" lines get executed,
further scripting that tries to install into RPM_BUILD_ROOT into dirs
that should have been created by "make install", fail unable to find the
dirs. Once I examine the RPM_BUILD_ROOT, directory after the failure,
it shows that everything got installed into /usr/X11R6 instead of
/usr/local/X11R6, making it appear that ProjectRoot is ignored.
If I'm not mistaken, the last time I used ProjectRoot was with 6.8.0,
but outside of rpm building context and it worked ok. I haven't tested
current 188.8.131.523 with a similar build outside of rpm, but I'm assuming
nothing has regressed. My assumption is that DESTDIR does not work
exactly how I envisioned it to work, and that my above "make install"
lines only worked correctly before because I _wasn't_ using ProjectRoot
in the rpm spec file.
So the question is, when using ProjectRoot, should DESTDIR be installing
into ProjectRoot underneath DESTDIR? If not, how do I get ProjectRoot
builds to effectively install themselves into RPM_BUILD_ROOT/ProjectRoot?
Thanks in advance for any suggestions, etc.
More information about the xorg