Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 245950 - libmilter - shared library support
Summary: libmilter - shared library support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alin Năstac (RETIRED)
URL:
Whiteboard:
Keywords:
: 281985 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-07 12:35 UTC by Daniel Black (RETIRED)
Modified: 2009-11-17 18:56 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to overlay (libmilter-shared-overlay.patch,4.48 KB, patch)
2008-11-07 12:35 UTC, Daniel Black (RETIRED)
Details | Diff
files/sharedlibrary.m4 (sharedlibrary.m4,1.29 KB, text/plain)
2008-11-07 12:36 UTC, Daniel Black (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Black (RETIRED) gentoo-dev 2008-11-07 12:35:00 UTC
to keep gentoo a little more maintainable the attached patch allowed libmilter to generate a shared library. I'm also keen to add py-milter at some stage which requires a shared libmilter library.

This was largely copied of the way freebsd solved the same problem.

Is this acceptable?
Comment 1 Daniel Black (RETIRED) gentoo-dev 2008-11-07 12:35:31 UTC
Created attachment 170978 [details, diff]
patch to overlay
Comment 2 Daniel Black (RETIRED) gentoo-dev 2008-11-07 12:36:31 UTC
Created attachment 170980 [details]
files/sharedlibrary.m4

hard added the -lc due to stat being used in the library. Otherwise same as freebsd version.
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2008-11-08 09:43:30 UTC
For consistency reasons, sendmail will have to be modified as well. Also, run-time dependencies of packages that depend on it will have to include a libmilter atom.

Is net-mail team happy with it?

Comment 4 Alin Năstac (RETIRED) gentoo-dev 2008-12-13 14:30:36 UTC
Sorry, but it seems we don't have a mail-mta/sendmail maintainer atm.

Closed as REMIND.
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2009-08-19 16:35:03 UTC
*** Bug 281985 has been marked as a duplicate of this bug. ***
Comment 6 Alin Năstac (RETIRED) gentoo-dev 2009-08-22 13:45:11 UTC
Since no one seems interested in fixing sendmail, I will fix this for both packages.
Comment 7 Alin Năstac (RETIRED) gentoo-dev 2009-08-23 00:14:44 UTC
I've fixed this issue in mail-filter/libmilter-1.0.1 (all other libmilter versions were removed) and mail-mta/sendmail-8.14.3-r1. The solution which I've adopted is derived from the one implemented in FreeBSD, but with a twist: both static and shared library variants are installed and I did it without duplicating libmilter tree (compiling the same thing twice horrifies me).

Furthermore, in order to force depending programs to be linked with the shared libmilter library, I've rev (or ver) bumped following packages:
  mail-filter/dk-milter
  mail-filter/dkim-milter
  mail-filter/sid-filter
  mail-filter/milter-regex
  mail-filter/mimedefang
  mail-filter/spamass-milter

Closed as FIXED.
Comment 8 Blu3 2009-11-09 20:27:04 UTC
I guess few people use libmilter.

confCCOPTS_SO needs defined in sendmail-8.14.3/devtools/OS/Linux with -fPIC

elsewise, the above shared overlay patch puts the literal "confCCOPTS_SO" in the middle of the libmilter gcc line
Comment 9 Blu3 2009-11-09 20:32:57 UTC
--- sendmail-8.14.3.orig/devtools/OS/Linux     2002-03-21 18:59:25.000000000 -0500
+++ sendmail-8.14.3/devtools/OS/Linux      2009-11-09 15:31:51.000000000 -0500
@@ -13,6 +13,7 @@
 define(`confLD', `ld')
 define(`confMTCCOPTS', `-D_REENTRANT')
 define(`confMTLDOPTS', `-lpthread')
+define(`confCCOPTS_SO', `-fPIC')
 define(`confLDOPTS_SO', `-shared')
 define(`confSONAME',`-soname')
Comment 10 Alin Năstac (RETIRED) gentoo-dev 2009-11-17 18:56:13 UTC
(In reply to comment #8)
> I guess few people use libmilter.

Not true.

> confCCOPTS_SO needs defined in sendmail-8.14.3/devtools/OS/Linux with -fPIC
> 
> elsewise, the above shared overlay patch puts the literal "confCCOPTS_SO" in
> the middle of the libmilter gcc line

${FILESDIR}/gentoo-config.m4 is used as template for ${S}/devtools/Site/site.config.m4 and this is the last line in the template file:
  define(`confCCOPTS_SO', `-fPIC')
In addition, I did a quick test and there was no "confCCOPTS_SO" string literal in the build.log resulted after an ebuild install.