All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] pass linker soname flag for libselinux, autotools
@ 2003-07-14  4:43 Colin Walters
  2003-07-15 21:09 ` Stephen Smalley
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Walters @ 2003-07-14  4:43 UTC (permalink / raw)
  To: selinux

[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]

Hi,

Debian has an automatic package checking tool (lintian) which was
continually saying to me:

E: libselinux1: ldconfig-symlink-missing-for-shlib usr/lib/libselinux.so usr/lib/libselinux.so.1 libselinux.so
N:
N:   The package should not only include the shared library itself, but
N:   also the symbolic link which ldconfig would produce. (This is
N:   necessary, so that the link gets removed by dpkg automatically when
N:   the package gets removed.) If the symlink is in the package, check
N:   that the SONAME of the library matches the info in the shlibs file.
N:
N:   Refer to Policy Manual, section 9.1 for details.
N:

The symlink was there in the package, so I started looking at the
library SONAME, and I eventually figured out the magic -Wl,-soname flag
was missing.  Apparently this encodes the soname into the file.

A patch is attached which fixes this problem.

This does remind me though; has any consideration been given to
autotoolizing the various packages?  That would have fixed the CFLAGS
issue I ran into earlier, and libtool knows all about the magic needed
to create shared libraries.  Plus you automatically get support for lots
of nice things like testing for installed software, regression tests,
etc.  I'd be willing to put a bit of effort into doing the
autotoolizing, but since this is a new set of tools you'd have to use
upstream I'd like to see if there was interest before doing the work.


[-- Attachment #2: shared-library-soname.patch --]
[-- Type: text/plain, Size: 307 bytes --]

--- src/Makefile~	2003-07-07 08:53:40.000000000 -0400
+++ src/Makefile	2003-07-14 00:32:32.000000000 -0400
@@ -19,7 +19,7 @@
 	ranlib $@
 
 $(LIBSO): $(OBJS)
-	$(CC) $(LDFLAGS) -shared -o $@ $^ -lc
+	$(CC) $(LDFLAGS) -shared -o $@ $^ -lc -Wl,-soname,$(LIBSO) 
 	ln -sf $@ $(TARGET) 
 
 %.o:  %.c

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] pass linker soname flag for libselinux, autotools
  2003-07-14  4:43 [patch] pass linker soname flag for libselinux, autotools Colin Walters
@ 2003-07-15 21:09 ` Stephen Smalley
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Smalley @ 2003-07-15 21:09 UTC (permalink / raw)
  To: Colin Walters; +Cc: selinux

On Mon, 2003-07-14 at 00:43, Colin Walters wrote:
> The symlink was there in the package, so I started looking at the
> library SONAME, and I eventually figured out the magic -Wl,-soname flag
> was missing.  Apparently this encodes the soname into the file.
> 
> A patch is attached which fixes this problem.

This patch has been merged into the sourceforge CVS tree.

> This does remind me though; has any consideration been given to
> autotoolizing the various packages?  That would have fixed the CFLAGS
> issue I ran into earlier, and libtool knows all about the magic needed
> to create shared libraries.  Plus you automatically get support for lots
> of nice things like testing for installed software, regression tests,
> etc.  I'd be willing to put a bit of effort into doing the
> autotoolizing, but since this is a new set of tools you'd have to use
> upstream I'd like to see if there was interest before doing the work.

I'm not sure whether this is justified.

-- 
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-15 21:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-14  4:43 [patch] pass linker soname flag for libselinux, autotools Colin Walters
2003-07-15 21:09 ` Stephen Smalley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.