You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2008/05/08 10:41:50 UTC
[Bug 5904] New: DESTDIR not completely working in Makefile (
contains workaround)
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5904
Summary: DESTDIR not completely working in Makefile (contains
workaround)
Product: Spamassassin
Version: 3.2.4
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P5
Component: Building & Packaging
AssignedTo: dev@spamassassin.apache.org
ReportedBy: c.schiffler@cyberspectrum.de
I discovered that the DESTDIR is not working as mentioned in the docs.
my environment:
Slackware Linux 12.0
perl: 2.8.8
ExtUtils::MakeMaker: 6.44
So there all seems to be fine.
for the following I assume:
PKG=/tmp/package-spamassassin
as the stuff is directly ripped from my build script for spamassassin.
It builds just fine when doing:
perl Makefile.PL PREFIX="/usr" DESTDIR="$PKG" < /dev/null
The "make install" will fail as it still tries to create
/etc/mail/spamassassin/ and /usr/share/spamassassin for placing files there.
After twiddling for some while I found out that the variables
INSTALLDATA, INSTALLSITEDATA, INSTALLVENDORDATA are used for install
destination dirs but not prefixed with DESTDIR, which therefore makes things
unuseable.
I found the following workaround (yeah, I know it's pretty ugly but at least it
works):
PKG=/tmp/package-spamassassin
# Configure
perl Makefile.PL PREFIX="/usr" DESTDIR="$PKG" < /dev/null
# Compile
make
# Do the tests
make disttest
# Install
INSTALLDATA=/usr/share/spamassassin
INSTALLSITEDATA=/usr/share/spamassassin
INSTALLVENDORDATA=/usr/share/spamassassin
make install \
DESTDIR="$PKG" \
B_CONFDIR="$PKG/etc/mail/spamassassin" \
INSTALLDATA="$PKG/$INSTALLDATA" \
INSTALLSITEDATA="$PKG/$INSTALLSITEDATA" \
INSTALLVENDORDATA="$PKG/$INSTALLVENDORDATA"
Note that I only alter the vendordata stuff for "make install" as otherwise the
pathes will end up in the binaries.
Doing it with above method only puts "/tmp/package-spamassassin/..." in
".packlist" and "${PKG}/usr/bin/sa-update" which I lateron filter by piping the
stuff through sed.
# Fix .packlist to remove temporary package dir references.
string="`echo $PKG | sed -e 's/\//\\\\\//g'`"
echo string is $string
for file in `find $PKG -name .packlist`; do
sed -e "s/^$string//g" $file > $file.tmp
mv $file.tmp $file
done
# fix b0rked path containing $PKG in sa-update.
chmod o+w ${PKG}/usr/bin/sa-update
sed -e "s/$string//g" ${PKG}/usr/bin/sa-update > ${PKG}/usr/bin/sa-update.new
rm -f ${PKG}/usr/bin/sa-update
mv ${PKG}/usr/bin/sa-update.new ${PKG}/usr/bin/sa-update
chmod 555 ${PKG}/usr/bin/sa-update
Using this method, I could even build SA as non privileged user and pack
together which was a nice side effect of my testing (I had to make sure the
build can not write outside of it's DESTDIR and was too lazy to build a chroot
for this purpose).
I hope the above information helps you guys in fixing the Makefile.pl.
If not, feel free to add this information to the install docs packaging
section.
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 5904] DESTDIR not completely working in Makefile (contains
workaround)
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5904
Mark Martinec <Ma...@ijs.si> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |Mark.Martinec@ijs.si
Resolution| |DUPLICATE
--- Comment #1 from Mark Martinec <Ma...@ijs.si> 2009-09-18 17:14:42 PDT ---
Not sure, but tentatively marking it as a duplicate of Bug 6131,
(fixed in 3.3.0).
*** This bug has been marked as a duplicate of bug 6131 ***
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 5904] DESTDIR not completely working in Makefile (contains
workaround)
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5904
Mark Martinec <Ma...@ijs.si> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|Mark.Martinec@ijs.si |
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 5904] DESTDIR not completely working in Makefile (contains
workaround)
Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5904
Eric Shubert <ej...@shubes.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ejs@shubes.net
--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.