Bug 264985 - sysutils/syslog-ng: 3.37.1 fails to package with PYTHON=ON: Error: Plist issues found
Summary: sysutils/syslog-ng: 3.37.1 fails to package with PYTHON=ON: Error: Plist issu...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Cy Schubert
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2022-07-01 20:49 UTC by Christian Ullrich
Modified: 2022-07-05 19:41 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments
Patch. (935 bytes, patch)
2022-07-01 20:49 UTC, Christian Ullrich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ullrich 2022-07-01 20:49:58 UTC
Created attachment 235028 [details]
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.
Comment 1 Peter Czanik 2022-07-03 13:48:54 UTC
TL;DR: I support the proposed patch.

Long: This is something I messed up. I thought that the packaging list change came from the updated Python version (I'm not a Python programmer...), so I changed the packaging list. It turned out that it was pulled in as a build-time requirement of something (I could delete it without deleting anything else).

I do not want to make syslog-ng depend on an additional package, and unfortunately reading ports documentation I cannot see a way to make the packaging list change conditional. 

Python 3.10: there is no explicit dependency on Python, as the glib2 package (a dependency of syslog-ng) pulls in Python anyway. However, adding "LIB_DEPENDS+=libpython3.10.so:lang/python310" is definitely not good: syslog-ng can be compiled anything Python 3.5+
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-07-05 19:36:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ec701eb51727f506b81f44c45930f3de436b5666

commit ec701eb51727f506b81f44c45930f3de436b5666
Author:     Christian Ullrich <chris@chrullrich.net>
AuthorDate: 2022-07-05 19:31:14 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-07-05 19:31:14 +0000

    sysutils/syslog-ng: Fix package with PYTHON=ON

    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

    PR:             264985
    Submitted by:   Christian Ullrich <chris@chrullrich.net>
    Reported by:    Christian Ullrich <chris@chrullrich.net>
    Reviewed by:    Peter Czanik (CzP) <peter.czanik@oneidentity.com>
                    Balabit (a OneIdentity company) / syslog-ng upstream

    Signed-off-by:  Cy Schubert <cy@FreeBSD.org>

 sysutils/syslog-ng/Makefile | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2022-07-05 19:41:08 UTC
Fixed. Thanks for the patch.