Bug 249044 - net-mgmt/networkmgr: packaging failure if PREFIX != LOCALBASE + invalid action in non-install steps
Summary: net-mgmt/networkmgr: packaging failure if PREFIX != LOCALBASE + invalid actio...
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Eric Turgeon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-01 01:39 UTC by John Hein
Modified: 2020-09-12 17:08 UTC (History)
1 user (show)

See Also:
ericbsd: maintainer-feedback+


Attachments
[patch] fix plist for various issues (2.78 KB, patch)
2020-09-01 01:39 UTC, John Hein
jcfyecrayz: maintainer-approval? (ericbsd)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2020-09-01 01:39:53 UTC
Created attachment 217682 [details]
[patch] fix plist for various issues

(a) 'check-plist' fails if PREFIX != LOCALBASE [1]

(b) setup.py does 'sudo gtk-update-icon-cache' unconditionally.  Only 'make install' should touch anything outside WRKDIR (e.g., not 'make configure' or 'make stage', etc.).  It's also unnecessary since INSTALLS_ICON handles that in the FreeBSD ports infrastructure.

(c) __VERSION__ in setup.py should be 4.1; the wrong version also causes check-plist to fail even after fixing the hard-coded {prefix}/ instances in setup.py (see patch). [1]

[1]

====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%PYTHON_SITELIBDIR%%/networkmgr-%%PYTHON_VER%%-py%%PYTHON_VER%%.egg-info/PKG-INFO
Error: Orphaned: %%PYTHON_SITELIBDIR%%/networkmgr-%%PYTHON_VER%%-py%%PYTHON_VER%%.egg-info/SOURCES.txt
Error: Orphaned: %%PYTHON_SITELIBDIR%%/networkmgr-%%PYTHON_VER%%-py%%PYTHON_VER%%.egg-info/dependency_links.txt
Error: Orphaned: %%PYTHON_SITELIBDIR%%/networkmgr-%%PYTHON_VER%%-py%%PYTHON_VER%%.egg-info/requires.txt
Error: Orphaned: %%PYTHON_SITELIBDIR%%/networkmgr-%%PYTHON_VER%%-py%%PYTHON_VER%%.egg-info/top_level.txt
Error: Orphaned: /usr/local/etc/sudoers.d/networkmgr
Error: Orphaned: /usr/local/etc/xdg/autostart/networkmgr.desktop
Error: Orphaned: /usr/local/share/icons/hicolor/128x128/apps/nm-adhoc.png
Error: Orphaned: /usr/local/share/icons/hicolor/128x128/apps/nm-device-wired-secure.png
Error: Orphaned: /usr/local/share/icons/hicolor/128x128/apps/nm-no-connection.png
Error: Orphaned: /usr/local/share/icons/hicolor/128x128/apps/nm-signal-00-secure.png
Error: Orphaned: /usr/local/share/icons/hicolor/128x128/apps/nm-signal-00.png
 .
 .
 .


Patch tested okay in poudriere with default PREFIX and PREFIX=/opt.


The patch does:

Don't override --prefix with hard-coded python prefix.  Paths are relative
to prefix by default anyway.

Don't run sudo gtk-update-icon-cache unconditionally any time setup.py is
executed (config, build, whatever).  The FreeBSD ports infrastructure handles
this with INSTALLS_ICONS=yes.  For standalone installs, I'm not sure how
this should be handled with distutils - it probably should be done outside
setup.py.  For now, just comment that out.
Plus this should not be hard-coded to /usr/local/share...

Set correct networkmgr pkg version.
Comment 1 Eric Turgeon freebsd_committer 2020-09-12 17:08:54 UTC
I am working on 4.2 and I will update the ports soon. Your patch will not work with the new version.

Also removing prefix break the setup.py.