Bug 219988 - Binary RPM built in such a way that some options cannot be used
Summary: Binary RPM built in such a way that some options cannot be used
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mimedefang
Version: 6
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 219989 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-18 02:48 UTC by Jeff Rife
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-19 14:13:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jeff Rife 2006-12-18 02:48:03 UTC
Description of problem: The RPM has been built in such a way that some options 
are impossible to use.  In particular, support for Unix::Syslog *must* be part 
of the ./configure process.

A work-around for this is to manually edit /usr/bin/mimedefang.pl to reflect 
what ./configure would have done, but /usr/bin/mimedefang.pl is silently 
overwritten with any new version of the RPM.

Version-Release number of selected component (if applicable): 2.fc6


How reproducible: always

Comment 1 Robert Scheck 2006-12-18 12:25:00 UTC
*** Bug 219989 has been marked as a duplicate of this bug. ***

Comment 2 Robert Scheck 2006-12-18 12:35:45 UTC
What are you changing exactly when editing /usr/bin/mimedefang.pl manually?

Comment 3 Jeff Rife 2006-12-18 13:03:21 UTC
See configure.in (lines 323-327) in the source:

if test "$HAVE_UNIX_SYSLOG" = "no" ; then
   USE_UNIX_SYSLOG=""
   USE_SYS_SYSLOG='use Sys::Syslog qw(:DEFAULT setlogsock); $Features
{"Unix::Syslog"} = 0;'
else
   USE_UNIX_SYSLOG='use Unix::Syslog qw(:macros :subs); $Features
{"Unix::Syslog"} = 1;'
   USE_SYS_SYSLOG=""
fi

See also http://lists.roaringpenguin.com/pipermail/mimedefang/2006-
December/031554.html for details on why this makes it impossible to use 
Unix::Syslog without editing mimedefang.pl.



Comment 4 Robert Scheck 2006-12-19 12:45:27 UTC
Guys, are you expecting just a working md_openlog() or are you expecting that 
Unix::Syslog is used for logging? And last of it would require another external 
package while Sys::Syslog is shipped by Perl.

From the Fedora Extras buildsys:

Compile-time checking for Perl modules disabled
checking for Perl module Sys::Syslog... ok
checking for Perl module Unix::Syslog... no
checking for Perl module ExtUtils::Embed... ok
checking if setlocksock('native') works... no
checking if setlogsock('unix') works... no

which causes:
             } elsif ("no" eq "yes") {
                unless (defined(setlogsock('unix'))) {
                    setlogsock('inet');
                }


And from my local building:

Compile-time checking for Perl modules disabled
checking for Perl module Sys::Syslog... ok
checking for Perl module Unix::Syslog... no
checking for Perl module ExtUtils::Embed... ok
checking if setlocksock('native') works... no
checking if setlogsock('unix') works... yes

which causes:
            } elsif ("yes" eq "yes") {
                unless (defined(setlogsock('unix'))) {
                    setlogsock('inet');

Unfortunately I can't see why last of it (and not the Fedora Extras buildsys) 
does stuff "right" (if Sys::Syslog is prefered over Unix::Syslog) when using 
more or less the same environment.

Comment 5 Jeff Rife 2006-12-19 13:10:59 UTC
The lines you show have *no* effect if your current version of Sys::Syslog is 
recent enough (which it is for Perl 5.8.8 shipped with Fedora 6).  More context:

        # Apparently, as of Sys::Syslog 0.16, setlogsock is deprecated
        if ($Sys::Syslog::VERSION < 0.16) {
            if ("yes" eq "yes") {
                unless (defined(setlogsock('native'))) {
                    setlogsock('inet');
                }
            } elsif ("yes" eq "yes") {
                unless (defined(setlogsock('unix'))) {
                    setlogsock('inet');
                }
            } else {
                setlogsock('inet');
            }
        }

Since Sys::Syslog is at version 0.18, *none* of that code is ever executed, so 
this is just a red herring.

The whole point is that you *cannot* "use" both "Unix::Syslog" 
and "Sys::Syslog", since both define global functions "openlog".  I can find no 
way to fix this using perl code, since "use" is evaluated at compile-time.  
Thus, the only solution that allows Unix::Syslog to be used is to not have "use 
Sys::Syslog" anywhere in the code.   Since Unix::Syslog is preferred by the 
author of MIMEDefang (if both are found during ./configure, Unix::Syslog is 
used), not being able to use it at all in this RPM is a bug.

Comment 6 Robert Scheck 2006-12-19 14:13:28 UTC
Dunno whether we're using the same Fedora Core, because my Rawhide ships
Sys::Syslog 0.13, which is old enough. Anyway, the only correct solution
is to require Unix::Syslog, of course. Added perl(Unix::Syslog) as build
requirement for 2.58-3...

Comment 7 Jeff Rife 2006-12-19 14:30:12 UTC
Still a red herring, but at least the solution works for building.  Will the 
binary RPM install, though, because there is no Fedora RPM for Unix::Syslog.

Comment 8 Robert Scheck 2006-12-19 14:59:19 UTC
Sorry, but there _is_ a Fedora RPM for Unix::Syslog. Otherwise the builds of 
fixed mimedefang package requiring perl(Unix::Syslog) would have been failed.

fedora/linux/extras/development/i386/perl-Unix-Syslog-0.100-8.fc6.i386.rpm
fedora/linux/extras/6/i386/perl-Unix-Syslog-0.100-8.fc6.i386.rpm
fedora/linux/extras/5/i386/perl-Unix-Syslog-0.100-7.fc5.i386.rpm

mimedefang 2.58-3 is exactly the result of what you are expecting as solution 
("support for Unix::Syslog *must* be part of the ./configure process.") for 
solving this problem.

Comment 9 Jeff Rife 2006-12-20 02:13:10 UTC
For some reason my yum search for it failed.  Oh, well.

Be sure to remove "perl(Sys::Syslog)" as a requirement from the spec file, 
since there's no need to require both of them, and Sys::Syslog won't be used if 
Unix::Syslog is available.

Comment 10 Robert Scheck 2006-12-20 10:40:46 UTC
I never had perl(Sys::Syslog) as requirement in the spec file, so there's 
nothing to remove. Requirements from my local testing build are sane:

$ rpm -q --requires mimedefang | grep -i Syslog
perl(Unix::Syslog)
$ 

Comment 11 Jeff Rife 2006-12-20 17:28:39 UTC
Now I'm convinced you have something really strange in your build setup:

$ rpm -q mimedefang
mimedefang-2.58-2.fc6

$ rpm -q --requires mimedefang | grep -i Syslog
perl(Sys::Syslog)

This is downloaded using "yum install mimedefang"...so *that* RPM requires 
Sys::Syslog.

Comment 12 Robert Scheck 2006-12-20 17:43:17 UTC
Hey, stop! I said, the problem will be fixed in 2.58-3. Please come again, if 
you've got installed 2.58-3 (NOT 2.58-2) which should reach the repositories 
either today or tomorrow...


Note You need to log in before you can comment on or make changes to this bug.