Hi,

ntfs-3g checks for /sbin/ldconfig during the "configure" step and runs it 
during the "make install" check.

This is mostly fine, but it breaks non-root builds. Non-root builds are 
performed e.g. while building RPMs. What RPM packagers typically do is

./configure
make
make install DESTDIR=/var/tmp/some_temporary_buildroot

This "redirects" all files from / to $(DESTDIR) and has to work without root 
privileges. The problem with ntfs-3g is that the /sbin/ldconfig call doesn't 
work without root privileges.

I will attach two different patches with the following rationale:

- The first one simply ignores errors from ldconfig. ldconfig is an optional 
step that doesn't need to break the build.

- The second one skips ldconfig if DESTDIR is non-empty. Running ldconfig 
doesn't make any sense if the package was not installed into the real root.

Just one of these patches is necessary, pick what looks more logical to you.

Andreas Hanke
-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: www.gmx.net/de/go/mailfooter/topmail-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)
+	-$(LDCONFIG)
 
 install-data-hook:
 	$(INSTALL) -d $(DESTDIR)$(man8dir)
--- 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