[Fwd: Re: [CMake] cmake does not set execute bit on shared libraries]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some interesting information about the shared library execute bit issue.

Why is it that we require the execute bit? I found an old post about it maybe being tied to the kernel protecting overwriting running programs, but no idea if that ever was put it place.

--
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  orion@xxxxxxxxxxxxx
Boulder, CO 80301              http://www.cora.nwra.com
--- Begin Message ---
On 2007-04-06 10:07-0600 Orion Poplawski wrote:

Cmake does not set execute bit on shared libraries. This causes problems with packaging cmake built projects for Fedora, because the rpm packaging expects shared libraries to properly have their execute bits set. See for reference: http://fedoraproject.org/wiki/PackagingDrafts/cmake

I've filed a bug:

http://www.cmake.org/Bug/bug.php?op=show&bugid=4805


Just to give some additional background on this, setting the execute bit on
shared libraries is contrary to Debian policy:

"Shared libraries should not be installed executable, since the dynamic
linker does not require this and trying to execute a shared library usually
results in a core dump."

(see http://www.debian.org/doc/debian-policy/ch-sharedlibs.html).  I just
checked, and Debian stable as well as Ubuntu Dapper (a Debian derivative)
follow this policy religiously (i.e., there are no execute bits set for any
library in /usr/lib).  It appears there are absolutely no issues caused by
this policy so the contrary Fedora RPM policy that the execute bit must be
set may be some leftover policy from a problem that doesn't exist any more.

Another complicating factor is autotools sets the execute bit for shared
libraries while CMake does not. So it appears there is a fundamental policy
difference on this issue between Debian and Fedora on the one hand
and CMake and autotools on the other hand.

At some point in the future they will hopefully all have uniform policy, but
for now the result is that Debian packagers have to remove the execute bit
for libraries installed with autotools while Fedora packagers have to add
the execute bit for libraries installed with CMake.  I am sure it is
annoying to have to remember these fixups for varying policy, but I am also
sure it is not a difficult fixup in either case.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

--- End Message ---
--
Fedora-packaging mailing list
Fedora-packaging@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux