pass linker soname flag for libselinux, autotools
Subsystems (2)
PATCH 1/1 pass linker soname flag for libselinux, autotools
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.
Makefile renamed from Makefile~ +1 -1
@@ -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
Quoted 5 lines · Colin Walters
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.
Quoted 8 lines
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.
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.