Hi,

I'm resending this patch because it hasn't been committed nor commented so far 
and the problem it fixes is a blocker for distributors.

Summarizing the problem again: src/Makefile.am contains code to run 
/sbin/ldconfig after the shared library has been installed. While this is okay 
for the usual "./configure; make; make install" build, it is a blocker for 
packaging purposes because ldconfig doesn't work as non-root, it just breaks 
the build, and binary packages are never ever built as root (this is forbidden 
by policy).

I'm attaching a patch that fixes this problem by not running ldconfig if 
DESTDIR was set. Running ldconfig does not make any sense for DESTDIR builds 
(as used for packaging purposes) because it updates the linker cache in the 
real root and not in DESTDIR. Binary packages have to run ldconfig in their 
postinstall scripts.

For the records: There are alternative ways to fix this. I've checked the 
binary packages from Fedora, Mandriva, Debian and Ubuntu and they are all 
simply removing the $(LDCONFIG) line, obviously breaking the purpose of it. 
This patch is a solution that should work for both use cases: DESTDIR packaging 
and "normal" builds. I'd like to see this fixed upstream instead of 
distribution-specific local hacks.

Andreas Hanke
-- 
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out
--- src/Makefile.am
+++ src/Makefile.am
@@ -38,7 +38,7 @@
 install-exec-hook:
 	$(INSTALL) -d $(DESTDIR)/sbin
 	$(LN_S) -f $(bindir)/ntfs-3g $(DESTDIR)/sbin/mount.ntfs-3g
-	$(LDCONFIG)
+	@if test -z $(DESTDIR); then echo $(LDCONFIG); $(LDCONFIG); fi
 
 install-data-hook:
 	$(INSTALL) -d $(DESTDIR)$(man8dir)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to