[asterisk-bugs] [LibSS7 0013313]: [patch] make install with destdir under fakeroot: ldconfig permission denied

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Aug 18 13:49:41 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=13313 
====================================================================== 
Reported By:                tzafrir
Assigned To:                jpeeler
====================================================================== 
Project:                    LibSS7
Issue ID:                   13313
Category:                   General
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 209 
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-08-15 13:26 CDT
Last Modified:              2009-08-18 13:49 CDT
====================================================================== 
Summary:                    [patch] make install with destdir under fakeroot:
ldconfig permission denied
Description: 
When I try to build libss7 as a Debian package, I get the following error:

if test $(id -u) = 0; then /sbin/ldconfig; fi
/sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~:
Permission denied

This is because I run the build under fakeroot, and hence id reports '0'.

I can think of two ways around this:

1. finer conditions. E.g: if DESTDIR is set, don't run ldconfig . 
2. first try without -n . If that does not work: use -n.

(2) seems simpler and hence more robust.

It also allows me to get rid of the explicit 'ln -s' command above (we
already use ldconfig to create the same symlink locally). Attached a patch
to do that.

And while I was there: a shared library does not need to be executable.
====================================================================== 

---------------------------------------------------------------------- 
 (0109233) svnbot (reporter) - 2009-08-18 13:49
 https://issues.asterisk.org/view.php?id=13313#c109233 
---------------------------------------------------------------------- 
Repository: libss7
Revision: 271

U   trunk/Makefile

------------------------------------------------------------------------
r271 | jpeeler | 2009-08-18 13:49:41 -0500 (Tue, 18 Aug 2009) | 14 lines

Fix ldconfig error when building with fakeroot

This patch copies the built shared libraries along with the symlinks.
Also,
ldconfig is always attempted with errors ignored since while using
fakeroot
updating the cache will fail. People running making install not as root
are
going to encounter problems before the removed root check anyway.

(closes issue https://issues.asterisk.org/view.php?id=13313)
Reported by: tzafrir
Patches:
      libss7_ldconfig.diff uploaded by tzafrir (license 46)
Tested by: tzafrir


------------------------------------------------------------------------

http://svn.digium.com/view/libss7?view=rev&revision=271 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-18 13:49 svnbot         Checkin                                      
2009-08-18 13:49 svnbot         Note Added: 0109233                          
======================================================================




More information about the asterisk-bugs mailing list