[Bug 264985] sysutils/syslog-ng: Broken in 3.37.1 with option PYTHON

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 01 Jul 2022 20:49:58 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264985

            Bug ID: 264985
           Summary: sysutils/syslog-ng: Broken in 3.37.1 with option
                    PYTHON
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: cy@FreeBSD.org
          Reporter: chris@chrullrich.net
          Assignee: cy@FreeBSD.org
             Flags: maintainer-feedback?(cy@FreeBSD.org)

Created attachment 235028
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=235028&action=edit
Patch.

Since the 3.37.1 update, syslog-ng does not build with option PYTHON enabled:

[00:01:12] ====> Running Q/A tests (stage-qa)
[00:01:12] Error: /usr/local/lib/syslog-ng/libmod-python.so is linked to
/usr/local/lib/libpython3.10.so.1.0 from lang/python310 but it is not declared
as a dependency
[00:01:12] Warning: you need LIB_DEPENDS+=libpython3.10.so:lang/python310

[There's this, too. Not sure about it.]

[00:01:12] ====> Checking for pkg-plist issues (check-plist)
[00:01:12] ===> Parsing plist
[00:01:12] ===> Checking for items in STAGEDIR missing from pkg-plist
[00:01:12] Error: Orphaned:
lib/syslog-ng/python/syslogng-1.0-py%%PYTHON_VER%%.egg-info
[00:01:12] ===> Checking for items in pkg-plist which are not in STAGEDIR
[00:01:12] Error: Missing:
lib/syslog-ng/python/syslogng-1.0-py%%PYTHON_VER%%.egg-info/PKG-INFO
[00:01:12] Error: Missing:
lib/syslog-ng/python/syslogng-1.0-py%%PYTHON_VER%%.egg-info/SOURCES.txt
[00:01:12] Error: Missing:
lib/syslog-ng/python/syslogng-1.0-py%%PYTHON_VER%%.egg-info/dependency_links.txt
[00:01:12] Error: Missing:
lib/syslog-ng/python/syslogng-1.0-py%%PYTHON_VER%%.egg-info/top_level.txt
[00:01:12] ===> Error: Plist issues found.
[00:01:12] *** Error code 1

The reason is that the plist changed to expect the .egg-info of the Python
module to be a directory, i.e. created by setuptools. Without setuptools
installed, however, the .egg-info is still created as a file.

The attached patch fixes this. If the opposite behavior is desired, i.e. the
plist should remain as is, a dependency on devel/py-setuptools must be added.
The correct way to do this is

    USE_PYTHON=distutils

, but I don't know how to do this conditional on the PYTHON option. It will
also make the port flavored.

-- 
You are receiving this mail because:
You are the assignee for the bug.