On 10.3-prerelease, attempt to build the package results in ===> Registering installation for rrdtool-1.5.5_1 as automatic pkg-static: Plist error, directory listed as a file: lib/python2.7/site-packages/py_rrdtool-0.2.2-py2.7.egg-info *** Error code 74 The following enables the package to build as intended. # diff -urN pkg-plist.orig pkg-plist --- pkg-plist.orig 2016-01-31 11:44:51.000000000 +1100 +++ pkg-plist 2016-01-31 11:44:21.000000000 +1100 @@ -51,7 +51,10 @@ %%WITH_PERL%%%%SITE_ARCH%%/RRDs.pm %%WITH_PERL%%%%SITE_PERL%%/RRDp.pm %%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/rrdtool.so -%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info +%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/top_level.txt +%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/dependency_links.txt +%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/SOURCES.txt +%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/PKG-INFO %%WITH_RUBY%%%%RUBY_SITEARCHLIBDIR%%/RRD.so %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rrdcached/RRDCached.pm %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rrdcached/rrdcached-size.pl My thanks to Niclas for his ongoing support and effort with enhancing this port.
I have to look into this, it might be related to some issues with the python env. Are you building using poudriere, portmaster or just going to the ports dir and doing make install? Can you please give a listing of ls -la lib/python2.7/site-packages
I am also seeing this error. Here's the end of the output of `portupgrade -rR rrdtool`: ------------------------------------snip-snip------------------------------------ . . . The operation will free 3 MiB. [1/1] Deinstalling rrdtool-1.4.8_9... [1/1] Deleting files for rrdtool-1.4.8_9: 100% [Reading data from pkg(8) ... - 280 packages found - done] ---> Installing the new version via the port ===> Installing for rrdtool-1.5.5_1 ===> rrdtool-1.5.5_1 depends on file: /usr/local/bin/python2.7 - found ===> rrdtool-1.5.5_1 depends on package: perl5>=5.20<5.21 - found ===> rrdtool-1.5.5_1 depends on shared library: libfreetype.so - found (/usr/local/lib/libfreetype.so) ===> rrdtool-1.5.5_1 depends on shared library: libpng.so - found (/usr/local/lib/libpng.so) ===> rrdtool-1.5.5_1 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so) ===> rrdtool-1.5.5_1 depends on shared library: libcairo.so - found (/usr/local/lib/libcairo.so) ===> rrdtool-1.5.5_1 depends on shared library: libglib-2.0.so - found (/usr/local/lib/libglib-2.0.so) ===> rrdtool-1.5.5_1 depends on shared library: libxml2.so - found (/usr/local/lib/libxml2.so) ===> rrdtool-1.5.5_1 depends on shared library: libpango-1.0.so - found (/usr/local/lib/libpango-1.0.so) ===> Registering installation for rrdtool-1.5.5_1 as automatic pkg-static: Plist error, directory listed as a file: lib/python2.7/site-packages/py_rrdtool-0.2.2-py2.7.egg-info *** Error code 74 Stop. make[2]: stopped in /usr/ports/databases/rrdtool *** Error code 1 Stop. make[1]: stopped in /usr/ports/databases/rrdtool *** Error code 1 Stop. make: stopped in /usr/ports/databases/rrdtool ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20160201-69060-fpq6tt env UPGRADE_TOOL=portupgrade UPGRADE_PORT=rrdtool-1.4.8_9 UPGRADE_PORT_VER=1.4.8_9 make -DINSTALLS_DEPENDS reinstall ---> Restoring the old version Installing rrdtool-1.4.8_9... Extracting rrdtool-1.4.8_9: 100% ** Fix the installation problem and try again. ** Listing the failed packages (-:ignored / *:skipped / !:failed) ! databases/rrdtool (rrdtool-1.4.8_9) (install error) ------------------------------------snip-snip------------------------------------ lib/python2.7/site-packages/py_rrdtool-0.2.2-py2.7.egg-info is clearly listed in the plist as a file, but is a directory when built. ------------------------------------snip-snip------------------------------------ /usr/ports/databases/rrdtool % fgrep py_rrdtool ./pkg-plist %%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info /usr/ports/databases/rrdtool % ls -al work/stage/usr/local/lib/python2.7/site-packages/py_rrdtool-0.2.2-py2.7.egg-info/ total 29 drwxr-xr-x 2 root wheel 6 Feb 1 12:17 . drwxr-xr-x 3 root wheel 4 Feb 1 12:17 .. -rw-r--r-- 1 root wheel 238 Feb 1 12:17 PKG-INFO -rw-r--r-- 1 root wheel 167 Feb 1 12:17 SOURCES.txt -rw-r--r-- 1 root wheel 1 Feb 1 12:17 dependency_links.txt -rw-r--r-- 1 root wheel 8 Feb 1 12:17 top_level.txt ------------------------------------snip-snip------------------------------------
Something really weird is going on here. I have to look into this in much more detail, because this doesn't happen when building with poudriere. It will probably take a couple of days to resolve, I'm afraid.
(In reply to Niclas Zeising from comment #3) Niclas, I'm using portmaster only. It would seem that pouderie should be removed for the purposes of testing the build process of ports and packages, as it appears to mask build problems. May I suggest using "make clean deinstall; make -DBATCH package", which is the first of many steps I take before creating a PR? The results of # ls -la /usr/local/lib/python2.7/site-packages total 60 drwxr-xr-x 6 root wheel 512 Feb 1 18:19 . drwxr-xr-x 28 root wheel 14336 Feb 1 18:18 .. -rw-r--r-- 1 root wheel 119 Feb 1 18:18 README drwxr-xr-x 2 root wheel 512 Feb 1 18:19 _markerlib -rw-r--r-- 1 root wheel 185 Feb 1 18:19 easy-install.pth -rw-r--r-- 1 root wheel 185 Feb 1 18:19 easy-install.pth.dist -rw-r--r-- 1 root wheel 126 Dec 1 03:24 easy_install.py -rw-r--r-- 1 root wheel 321 Feb 1 18:19 easy_install.pyc -rw-r--r-- 1 root wheel 321 Feb 1 18:19 easy_install.pyo drwxr-xr-x 3 root wheel 512 Feb 1 18:19 pkg_resources drwxr-xr-x 3 root wheel 1536 Feb 1 18:19 setuptools drwxr-xr-x 2 root wheel 512 Feb 1 18:19 setuptools-19.2-py2.7.egg-info However this is *after* I applied the patch. Paul, Thanks for confirming that the problem exists, using other installation methods. :)
Poudriere is, as far as I know, the sanctioned way to build and test ports. You get a clean build environment for every build, thus avoiding environment or dependency pollution from the host system. It is also the way FreeBSD packages are built. It is quite possible that this is related to your build environment rather than the rrdtool port, but I have to look in detail, something I haven't had time to do just yet.
Created attachment 169739 [details] pkg-plist patch for PYTHON option
I can confirm a problem. Detailed log below. 1) If I attempt to build the port with PYTHON option, I will have a freeze on the install stage. # make install ... ====> Compressing man pages (compress-man) ===> Staging rc.d startup script(s) ===> Installing for rrdtool-1.5.5_1 ===> Checking if rrdtool already installed ===> Registering installation for rrdtool-1.5.5_1 2) Lets look at the active processes. # ps -w | grep rrdtool 47647 11 R+ 0:00,00 grep rrdtool 40464 15 I+ 0:00,07 make CONFIG_DONE_RRDTOOL=1 /usr/obj/usr/ports/databases/rrdtool/work/.install_done.rrdtool._usr_local 47644 15 I+ 0:00,00 /usr/local/sbin/pkg-static register -i /usr/obj/usr/ports/databases/rrdtool/work/stage -m /usr/obj/usr/ports 47645 15 R+ 5:37,49 /usr/local/sbin/pkg-static register -i /usr/obj/usr/ports/databases/rrdtool/work/stage -m /usr/obj/usr/ports # 3) There is only one active process, it has a pid 47645. Let's try to trace it. # truss -p 47645 read(4,0x7fffffffa080,8192) ERR#21 'Is a directory' read(4,0x7fffffffa080,8192) ERR#21 'Is a directory' read(4,0x7fffffffa080,8192) ERR#21 'Is a directory' read(4,0x7fffffffa080,8192) ERR#21 'Is a directory' read(4,0x7fffffffa080,8192) ERR#21 'Is a directory' read(4,0x7fffffffa080,8192) ERR#21 'Is a directory' read(4,0x7fffffffa080,8192) ERR#21 'Is a directory' ... ^C # 4) Check open files of the process with pid 47645. # lsof -p 47645 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME pkg-stati 47645 root cwd VDIR 255,2264924163 64 6 /usr/obj/usr/ports/databases/rrdtool pkg-stati 47645 root rtd VDIR 56,1370357900 28 4 / pkg-stati 47645 root txt VREG 219,1862271085 5139024 65990 /usr/local/sbin/pkg-static pkg-stati 47645 root 0u VCHR 0,139 0t401874 139 /dev/pts/15 pkg-stati 47645 root 1u VCHR 0,139 0t401874 139 /dev/pts/15 pkg-stati 47645 root 2u VCHR 0,139 0t401874 139 /dev/pts/15 pkg-stati 47645 root 3r VREG 255,2264924163 6433 1317 /usr/obj/usr/ports/databases/rrdtool/work/.PLIST.mktmp pkg-stati 47645 root 4r VDIR 255,2264924163 256 1345 /usr/obj/usr/ports/databases/rrdtool/work/stage/usr/local/lib/python2.7/site-packages/py_rrdtool-0.2.2-py2.7.egg-info # 5) Looking for python-related strings in ".PLIST.mktmp" # grep -i "python" /usr/obj/usr/ports/databases/rrdtool/work/.PLIST.mktmp lib/python2.7/site-packages/py_rrdtool-0.2.2-py2.7.egg-info lib/python2.7/site-packages/rrdtool.so # 6) The problem is found, "lib/python2.7/site-packages/py_rrdtool-0.2.2-py2.7.egg-info" is a folder path, not a file. 7) To obtain the required list of files, unset all options, except PYTHON, and run "make makeplist". # make config # make clean ; make makeplist ... ====> Compressing man pages (compress-man) ===> Staging rc.d startup script(s) /you/have/to/check/what/makeplist/gives/you bin/rrdcached bin/rrdcreate bin/rrdinfo bin/rrdtool bin/rrdupdate etc/rc.d/rrdcached include/rrd.h include/rrd_client.h include/rrd_format.h lib/librrd.a lib/librrd.so lib/librrd.so.4 lib/librrd.so.4.3.5 lib/librrd_th.a lib/librrd_th.so lib/librrd_th.so.4 lib/librrd_th.so.4.3.5 %%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/PKG-INFO %%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/SOURCES.txt %%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/dependency_links.txt %%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/top_level.txt %%PYTHON_SITELIBDIR%%/rrdtool.so libdata/pkgconfig/librrd.pc %%PORTEXAMPLES%%%%EXAMPLESDIR%%/4charts.pl %%PORTEXAMPLES%%%%EXAMPLESDIR%%/bigtops.pl %%PORTEXAMPLES%%%%EXAMPLESDIR%%/cgi-demo.cgi %%PORTEXAMPLES%%%%EXAMPLESDIR%%/minmax.pl %%PORTEXAMPLES%%%%EXAMPLESDIR%%/perftest.pl %%PORTEXAMPLES%%%%EXAMPLESDIR%%/piped-demo.pl %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rrdcached/RRDCached.pm %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rrdcached/rrdcached-size.pl %%PORTEXAMPLES%%%%EXAMPLESDIR%%/shared-demo.pl %%PORTEXAMPLES%%%%EXAMPLESDIR%%/stripes.pl %%PORTEXAMPLES%%%%EXAMPLESDIR%%/stripes.py # 8) Replace in file "pkg-plist": %%PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info to: %%PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/PKG-INFO %%PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/SOURCES.txt %%PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/dependency_links.txt %%PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info/top_level.txt 9) Restore old config options (don't forget to enable PYTHON) and make sure that the problem is solved. # make config # make clean ; make install clean ... ===> Staging rc.d startup script(s) ===> Installing for rrdtool-1.5.5_1 ===> Checking if rrdtool already installed ===> Registering installation for rrdtool-1.5.5_1 Installing rrdtool-1.5.5_1... ===> SECURITY REPORT: This port has installed the following files which may act as network servers and may therefore pose a remote security risk to the system. /usr/local/bin/rrdcached This port has installed the following startup scripts which may cause these network services to be started at boot time. /usr/local/etc/rc.d/rrdcached If there are vulnerabilities in these programs there may be a security risk to the system. FreeBSD makes no guarantee about the security of ports included in the Ports Collection. Please type 'make deinstall' to deinstall the port if this is a concern. For more information, and contact details about the security status of this software, see the following webpage: http://www.rrdtool.org/ ===> Cleaning for rrdtool-1.5.5_1 # # ls -lha /usr/local/lib/python2.7/site-packages/ total 200 drwxr-xr-x 17 root wheel 24B 27 Apr 05:58 ./ drwxr-xr-x 28 root wheel 649B 27 Apr 01:10 ../ ... drwxr-xr-x 2 root wheel 6B 27 Apr 05:58 py_rrdtool-0.2.2-py2.7.egg-info/ ... -rwxr-xr-x 1 root wheel 18K 27 Apr 05:58 rrdtool.so* ... # # ls -lha /usr/local/lib/python2.7/site-packages/py_rrdtool-0.2.2-py2.7.egg-info/ total 35 drwxr-xr-x 2 root wheel 6B 27 Apr 05:58 ./ drwxr-xr-x 17 root wheel 24B 27 Apr 05:58 ../ -rw-r--r-- 1 root wheel 238B 27 Apr 05:58 PKG-INFO -rw-r--r-- 1 root wheel 167B 27 Apr 05:58 SOURCES.txt -rw-r--r-- 1 root wheel 1B 27 Apr 05:58 dependency_links.txt -rw-r--r-- 1 root wheel 8B 27 Apr 05:58 top_level.txt # # python Python 2.7.11 (default, Apr 27 2016, 01:08:24) [GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] on freebsd10 Type "help", "copyright", "credits" or "license" for more information. >>> import rrdtool >>> #
(In reply to Ilia Skalozubov from comment #7) Good catch Ilia. I appreciate your tenacity in pursuing this bug and providing a patch. Interesting that poudriere ignored the problem.
Hi! I just updated the rrdtool port, can you please test and see if the problem remains. Thanks!
Unfortunately, the update to version 1.6.0 does not solve the problem. I compared database/rrdtool and database/rrdtool12 ports... Both of these ports contain similar lines in pkg-plist: 1) databases/rrdtool12/pkg-plist: ... %%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/rrdtoolmodule.so %%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.1-py%%PYTHON_VER%%.egg-info ... 2) databases/rrdtool/pkg-plist: ... %%PYTHON%%%%PYTHON_SITELIBDIR%%/py_rrdtool-0.2.2-py%%PYTHON_VER%%.egg-info %%PYTHON%%%%PYTHON_SITELIBDIR%%/rrdtool.so ... But after "make clean; make" we can see in stage dirs: 1) databases/rrdtool12: # ls -Rlha /usr/obj/usr/ports/databases/rrdtool12/work/stage/usr/local/lib/python2.7/site-packages/ total 36 drwxr-xr-x 2 root wheel 128B May 14 03:05 . drwxr-xr-x 3 root wheel 64B May 14 03:05 .. -rw-r--r-- 1 root wheel 238B May 14 03:05 py_rrdtool-0.2.1-py2.7.egg-info -rwxr-xr-x 1 root wheel 21K May 14 03:05 rrdtoolmodule.so # 2) databases/rrdtool: # ls -Rlha /usr/obj/usr/ports/databases/rrdtool/work/stage/usr/local/lib/python2.7/site-packages/ total 32 drwxr-xr-x 3 root wheel 128B May 14 03:08 . drwxr-xr-x 3 root wheel 64B May 14 03:08 .. drwxr-xr-x 2 root wheel 256B May 14 03:08 py_rrdtool-0.2.2-py2.7.egg-info -rwxr-xr-x 1 root wheel 18K May 14 03:08 rrdtool.so /usr/obj/usr/ports/databases/rrdtool/work/stage/usr/local/lib/python2.7/site-packages/py_rrdtool-0.2.2-py2.7.egg-info: total 24 drwxr-xr-x 2 root wheel 256B May 14 03:08 . drwxr-xr-x 3 root wheel 128B May 14 03:08 .. -rw-r--r-- 1 root wheel 238B May 14 03:08 PKG-INFO -rw-r--r-- 1 root wheel 167B May 14 03:08 SOURCES.txt -rw-r--r-- 1 root wheel 1B May 14 03:08 dependency_links.txt -rw-r--r-- 1 root wheel 8B May 14 03:08 top_level.txt # We have this problem, because py_rrdtool-0.2.1-py2.7.egg-info is a FILE for databases/rrdtool12 port, but py_rrdtool-0.2.2-py2.7.egg-info is a FOLDER for databases/rrdtool. According to plist format from pkg-create(8) manual page: "Lines not starting with a keywords are considered as PATHS to a FILE". I have no idea why poudriere ignore the problem, but currently, pkg-plist file has a format violation.
The problem here is the py-setuptools port is installed and this particular python module's setup.py tries to use its extensions to the stock setuptools in favor of the stock setuptools from the installed python. As a result, it generates an egginfo tree rather than an egginfo file as distutils from the python distribution does. The reason we never see this in poudriere is that py-setuptools is not a dependency. I talked with Steve Wills during the dev summit. Ideally, we'd want python.mk to add the plist entries and run the setup script, but since the configure script invokes the setup script _and_ the python module sources are not in WRKDIR, that's not really a viable option. We can either add py-setuputils as a dependency and patch the plist according to the already attached patch OR (as I played around and figured out later) patch the setup.py so it doesn't try to import Extension from setuptools.extension. I'll attach the necessary patch to toss in files.
Created attachment 171222 [details] setup.py patch
A commit references this bug: Author: zeising Date: Sat Jun 11 02:33:46 UTC 2016 New revision: 416700 URL: https://svnweb.freebsd.org/changeset/ports/416700 Log: Fix installation of the python bindnings when py-setuptools* is installed. When py-setuptools is installed, metadata for the python package is handled differently than when building the package in for instance poudriere. Fix the python bindings install script to always act the same way, regardless of setuptools. PR: 206769 Submitted by: Reid Linnemann <linnemannr@gmail.com> Reported by: dewayne@heuristicsystems.com.au Sponsored by: BSDCan 2016 Hackerlounge Changes: head/databases/rrdtool/Makefile head/databases/rrdtool/files/patch-bindings_python_setup.py
Comment on attachment 169739 [details] pkg-plist patch for PYTHON option Fixed this another way.
This should be fixed now. Please get back to me if this is still an issue.
Comment on attachment 169739 [details] pkg-plist patch for PYTHON option Does this work without specifying py-setuptools as a dependency?
Scratch that previous comment, I was confused.
Closed as this is believed to be fixed, and original submitter hasn't reported back.