Bug 219988 - Binary RPM built in such a way that some options cannot be used
Binary RPM built in such a way that some options cannot be used
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: mimedefang (Show other bugs)
6
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Robert Scheck
Fedora Extras Quality Assurance
:
: 219989 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-17 21:48 EST by Jeff Rife
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-12-19 09:13:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Rife 2006-12-17 21:48:03 EST
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 07:25:00 EST
*** Bug 219989 has been marked as a duplicate of this bug. ***
Comment 2 Robert Scheck 2006-12-18 07:35:45 EST
What are you changing exactly when editing /usr/bin/mimedefang.pl manually?
Comment 3 Jeff Rife 2006-12-18 08:03:21 EST
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 07:45:27 EST
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 08:10:59 EST
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 09:13:28 EST
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 09:30:12 EST
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 09:59:19 EST
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-19 21:13:10 EST
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 05:40:46 EST
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 12:28:39 EST
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 12:43:17 EST
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.