jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.17k stars 1.07k forks source link

Package python virtualenv for FreeBSD gives an empty txz file #1496

Open mohierf opened 6 years ago

mohierf commented 6 years ago

I am packaging a Python virtualenv for my application for Debian, RPM and FreeBSD. The deb and rpm output are correct but the freebsd output-type gives an empty txz file.

My command line is:

   fpm \
      --force \
      --verbose \
      --input-type virtualenv \
      --virtualenv-pypi https://pypi.python.org/simple \
      --output-type ${output_type} \
      --package "./bin" \
      --architecture all \
      --license AGPL \
      --version ${version} \
      --epoch ${version_epoch} \
      --name "${pkg_name}" \
      --description "${pkg_description}" \
      --url "${pkg_url}" \
      --vendor "${pkg_team}" \
      --maintainer "${pkg_team}" \
      --python-package-name-prefix "${python_prefix}" \
      --python-scripts-executable "/usr/bin/python" \
      --python-install-lib "/usr/lib/python${python_version}/dist-packages" \
      --python-install-data '/usr/local' \
      --python-install-bin '/usr/local/bin' \
      --python-dependencies \

The output of fpm (I removed the virtualenv installation...):

Converting virtualenv to dir {:level=>:info}
Setting from flags: architecture=all {:level=>:info}
Setting from flags: description=Alignak, modern Nagios compatible monitoring framework {:level=>:info}
Setting from flags: epoch=19:58:00 {:level=>:info}
Setting from flags: iteration= {:level=>:info}
Setting from flags: license=AGPL {:level=>:info}
Setting from flags: maintainer=Alignak Team (contact@alignak.net) {:level=>:info}
Setting from flags: name=python-alignak {:level=>:info}
Setting from flags: url=http://alignak.net {:level=>:info}
Setting from flags: vendor=Alignak Team (contact@alignak.net) {:level=>:info}
Setting from flags: version=1.1.0rc0-test {:level=>:info}
Converting virtualenv to freebsd {:level=>:info}
Force flag given. Overwriting package at ./bin/python-alignak-1.1.0rc0-test.txz {:level=>:warn}
Created package {:path=>"./bin/python-alignak-1.1.0rc0-test.txz"}

But the package size is 0:

-rw-r--r--  1 root    root           0 mai   21 19:58 python-alignak-1.1.0rc0-test.txz

Is the problem that fpm is not able to go from virtualenv to FreeBSD package ?

mrtazz commented 6 years ago

This seems to be a general problem with FreeBSD packages:

root@brokkr:~ # mkdir -p usr/bin/
root@brokkr:~ # touch usr/bin/bla
root@brokkr:~ # fpm --debug --debug-workspace -n foo -t freebsd -s dir usr/ > fpm.log
root@brokkr:~ # file foo-1.0.txz
foo-1.0.txz: empty
root@brokkr:~ # fpm --version
1.10.0
root@brokkr:~ # uname -a
FreeBSD brokkr.unwiredcouch.com 11.1-RELEASE-p10 FreeBSD 11.1-RELEASE-p10 #0: Tue May  8 05:21:56 UTC 2018     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

Debug log is here

Let me know if anything would be helpful for debugging

mrtazz commented 6 years ago

Just confirmed this is fixed for me in 1.10.2/cad736e