fpm icon indicating copy to clipboard operation
fpm copied to clipboard

fpm exists with some error related to json.

Open SSoft7 opened this issue 2 years ago • 13 comments

Can anyone provide some hint about this error? I've tried ruby version 2 as well but the error is the same. I can't figure out the source of this JSON error.

===== Command ====
fpm --output-type=deb --input-type=python --name=deluge --version=2.0.5 --vendor=Anonymous --maintainer=Anonymous '--description=Custom Deluge Compiled By Anonymous' --url=https://deluge-torrent.org/ --python-bin=/usr/bin/python3 --python-pip=/usr/local/bin/pip3 --python-package-name-prefix=python3 --python-internal-pip --no-python-dependencies --python-obey-requirements-txt --package=/usr/local/src/packages/deluge-2.0.5.deb --before-install=/tmp/deluge_2.0.5_pre-install.sh --after-remove=/tmp/deluge_2.0.5_post-remove.sh --force setup.py

===== Output ====
/snap/ruby/278/lib/ruby/3.1.0/json/common.rb:216:in `parse': 859: unexpected token at '' (JSON::ParserError)
        from /snap/ruby/278/lib/ruby/3.1.0/json/common.rb:216:in `parse'
        from /root/.gem/gems/fpm-1.14.2/lib/fpm/package/python.rb:246:in `load_package_info'
        from /root/.gem/gems/fpm-1.14.2/lib/fpm/package/python.rb:111:in `input'
        from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:352:in `block in execute'
        from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:351:in `each'
        from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:351:in `execute'
        from /root/.gem/gems/clamp-1.0.1/lib/clamp/command.rb:68:in `run'
        from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:574:in `run'
        from /root/.gem/gems/clamp-1.0.1/lib/clamp/command.rb:133:in `run'
        from /root/.gem/gems/fpm-1.14.2/bin/fpm:7:in `<top (required)>'
        from /usr/local/bin/fpm:23:in `load'

Okay, I found out that --python-obey-requirments-txt was the cause of this error. After I remove the parameter it is works fine. But If I re-run the above fpm command after installing the generated deb file, I get the following error which is similar but not the same and it is related to json

For your refererence, This is the requirements.txt

Traceback (most recent call last):
        12: from /usr/local/bin/fpm:23:in `<main>'
        11: from /usr/local/bin/fpm:23:in `load'
        10: from /root/.gem/gems/fpm-1.14.2/bin/fpm:7:in `<top (required)>'
         9: from /root/.gem/gems/clamp-1.0.1/lib/clamp/command.rb:133:in `run'
         8: from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:574:in `run'
         7: from /root/.gem/gems/clamp-1.0.1/lib/clamp/command.rb:68:in `run'
         6: from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:351:in `execute'
         5: from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:351:in `each'
         4: from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:352:in `block in execute'
         3: from /root/.gem/gems/fpm-1.14.2/lib/fpm/package/python.rb:111:in `input'
         2: from /root/.gem/gems/fpm-1.14.2/lib/fpm/package/python.rb:246:in `load_package_info'
         1: from /snap/ruby/209/lib/ruby/2.5.0/json/common.rb:156:in `parse'
/snap/ruby/209/lib/ruby/2.5.0/json/common.rb:156:in `parse': 765: unexpected token at '' (JSON::ParserError)

Debug log for the last error --

Setting workdir {:workdir=>"/tmp", :level=>:info, :file=>"fpm/command.rb", :line=>"294", :method=>"execute"}
Setting attribute {:output_type=>"deb", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:input_type=>"python", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:chdir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:prefix=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:package=>"/usr/local/src/packages/deluge-2.0.5.deb", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:force?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:name=>"deluge", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:log_level=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:verbose?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:debug?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:debug_workspace?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:version=>"2.0.5", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:iteration=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:epoch=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:license=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:vendor=>"Anonymous", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:category=>"none", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:dependencies=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:no_depends?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:no_auto_depends?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:provides=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:conflicts=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:replaces=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:config_files=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:directories=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:architecture=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:maintainer=>"Anonymous", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:package_name_suffix=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:edit?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:excludes=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:exclude_file=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:description=>"Custom Deluge Compiled By Anonymous", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:url=>"https://deluge-torrent.org/", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:inputs=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:post_install=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pre_install=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:post_uninstall=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pre_uninstall=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:after_install=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:before_install=>"/tmp/deluge_2.0.5_pre-install.sh", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:after_remove=>"/tmp/deluge_2.0.5_post-remove.sh", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:before_remove=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:after_upgrade=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:before_upgrade=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:template_scripts?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:template_value_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:workdir=>"/tmp", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:source_date_epoch_from_changelog?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:source_date_epoch_default=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_bin_path=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_package_prefix=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_package_name_prefix=>"rubygem", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_gem=>"gem", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_shebang=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_fix_name?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_fix_dependencies?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_env_shebang?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_prerelease?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_disable_dependencies=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_embed_dependencies?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_version_bins?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_stagingdir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_git_repo=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_git_branch=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_perl_bin=>"perl", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_cpanm_bin=>"cpanm", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_mirror=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_mirror_only?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_package_name_prefix=>"perl", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_test?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_verbose?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_perl_lib_path=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_sandbox_non_core?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_cpanm_force?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_ignore_iteration_in_dependencies?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_build_depends=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_pre_depends=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_compression=>"gz", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_dist=>"unstable", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_custom_control=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_config=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_templates=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_installed_size=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_priority=>"extra", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_use_file_permissions?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_user=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_group=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_changelog=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_generate_changes?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_upstream_changelog=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_recommends=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_suggests=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_meta_file=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_interest=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_activate=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_interest_noawait=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_activate_noawait=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_field=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_no_default_config_files?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_auto_config_files?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_shlibs=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_init_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_default_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_upstart_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_systemd_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_systemd_enable?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_systemd_auto_start?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_systemd_restart_after_upgrade?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_after_purge=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_maintainerscripts_force_errorchecks?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:npm_bin=>"npm", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:npm_package_name_prefix=>"node", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:npm_registry=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_use_file_permissions?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_user=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_group=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_defattrfile=>"-", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_defattrdir=>"-", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_rpmbuild_define=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_dist=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_digest=>"md5", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_compression_level=>"9", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_compression=>"gzip", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_os=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_changelog=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_summary=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_sign?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_auto_add_directories?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:auto_add_exclude_directories=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_autoreqprov?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_autoreq?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_autoprov?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:attrs=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_init_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_filter_from_provides=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_filter_from_requires=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_tag=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_ignore_iteration_in_dependencies?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_verbatim_gem_dependencies?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_macro_expansion?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_verifyscript=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_pretrans=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_posttrans=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_trigger_before_install=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_trigger_after_install=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_trigger_before_uninstall=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_trigger_after_target_uninstall=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_package_name_prefix=>"php-pear", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_channel=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_channel_update?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_bin_dir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_php_bin=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_php_dir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_data_dir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_bin=>"/usr/bin/python3", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_easyinstall=>"easy_install", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_pip=>"/usr/local/bin/pip3", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_pypi=>"https://pypi.python.org/simple", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_trusted_host=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_package_prefix=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_package_name_prefix=>"python3", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_fix_name?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_fix_dependencies?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_downcase_name?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_downcase_dependencies?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_install_bin=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_install_lib=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_install_data=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_dependencies?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_obey_requirements_txt?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_scripts_executable=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_disable_dependency=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_setup_py_arguments=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_internal_pip?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:osxpkg_identifier_prefix=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:osxpkg_payload_free?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:osxpkg_ownership=>"recommended", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:osxpkg_postinstall_action=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:osxpkg_dont_obsolete=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:solaris_user=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:solaris_group=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_user=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_group=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_zonetype=>"value=global value=nonglobal", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_publisher=>"FPM", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_lint?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_validate?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:freebsd_origin=>"fpm/<name>", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:snap_yaml=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:snap_confinement=>"devmode", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:snap_grade=>"devel", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pleaserun_name=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pleaserun_chdir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pacman_optional_depends_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pacman_use_file_permissions?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pacman_user=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pacman_group=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pacman_compression=>"zstd", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_pypi=>"https://pypi.python.org/simple", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_package_name_prefix=>"virtualenv", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_install_location=>"/usr/share/python", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_fix_name?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_other_files_dir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_pypi_extra_index_urls=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_setup_install?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_system_site_packages?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_find_links_urls=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Running command {:args=>["/bin/bash", "-c", "/usr/bin/python3 -c 'try:\n  import json\nexcept ImportError:\n  import simplejson as json'"], :level=>:debug, :file=>"fpm/util.rb", :line=>"138", :method=>"execmd"}
Process is running {:pid=>27641, :level=>:debug, :file=>"fpm/util.rb", :line=>"147", :method=>"execmd"}
Running command {:args=>["/bin/bash", "-c", "/usr/bin/python3 -c 'import pkg_resources'"], :level=>:debug, :file=>"fpm/util.rb", :line=>"138", :method=>"execmd"}
Process is running {:pid=>27642, :level=>:debug, :file=>"fpm/util.rb", :line=>"147", :method=>"execmd"}
fetching package metadata {:setup_cmd=>"env PYTHONPATH=/root/.gem/gems/fpm-1.14.2/lib/fpm/package:$PYTHONPATH /usr/bin/python3 setup.py --command-packages=pyfpm get_metadata --output=/tmp/package-python-build-5d849764cc0e78ae8035074b0165c09d2d35c70a908fefa9239761179c88/metadata.json", :level=>:info, :file=>"fpm/package/python.rb", :line=>"234", :method=>"block in load_package_info"}
Running command {:args=>["/bin/bash", "-c", "env PYTHONPATH=/root/.gem/gems/fpm-1.14.2/lib/fpm/package:$PYTHONPATH /usr/bin/python3 setup.py --command-packages=pyfpm get_metadata --output=/tmp/package-python-build-5d849764cc0e78ae8035074b0165c09d2d35c70a908fefa9239761179c88/metadata.json"], :level=>:debug, :file=>"fpm/util.rb", :line=>"138", :method=>"execmd"}
Process is running {:pid=>27647, :level=>:debug, :file=>"fpm/util.rb", :line=>"147", :method=>"execmd"}
running get_metadata {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
result from `setup.py get_metadata` {:data=>"", :level=>:debug, :file=>"fpm/package/python.rb", :line=>"245", :method=>"load_package_info"}
Cleaning up staging path {:path=>"/tmp/package-python-staging-43c5decaea142b22e473b089b24aea3db18d2cb759e5615135de9552891d", :level=>:debug, :file=>"fpm/package.rb", :line=>"284", :method=>"cleanup_staging"}
Cleaning up build path {:path=>"/tmp/package-python-build-5d849764cc0e78ae8035074b0165c09d2d35c70a908fefa9239761179c88", :level=>:debug, :file=>"fpm/package.rb", :line=>"291", :method=>"cleanup_build"}
Traceback (most recent call last):
        12: from /usr/local/bin/fpm:23:in `<main>'
        11: from /usr/local/bin/fpm:23:in `load'
        10: from /root/.gem/gems/fpm-1.14.2/bin/fpm:7:in `<top (required)>'
         9: from /root/.gem/gems/clamp-1.0.1/lib/clamp/command.rb:133:in `run'
         8: from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:574:in `run'
         7: from /root/.gem/gems/clamp-1.0.1/lib/clamp/command.rb:68:in `run'
         6: from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:351:in `execute'
         5: from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:351:in `each'
         4: from /root/.gem/gems/fpm-1.14.2/lib/fpm/command.rb:352:in `block in execute'
         3: from /root/.gem/gems/fpm-1.14.2/lib/fpm/package/python.rb:111:in `input'
         2: from /root/.gem/gems/fpm-1.14.2/lib/fpm/package/python.rb:246:in `load_package_info'
         1: from /snap/ruby/209/lib/ruby/2.5.0/json/common.rb:156:in `parse'
/snap/ruby/209/lib/ruby/2.5.0/json/common.rb:156:in `parse': 765: unexpected token at '' (JSON::ParserError

SSoft7 avatar Apr 18 '22 06:04 SSoft7

Came here to report this bug but see you beat me to it. For what it's worth, I'm also trying to build deluge with fpm and my arguments are similar, however this is all it takes to throw the error. First cloned deluge via git on the master branch, then

fpm --python-bin=python3 -n deluge-common -f -p /root/dist/deluge-common_VERSION.deb --description "Deluge compiled by swizzin" -s python -t deb /tmp/deluge/setup.py

I wonder if it's related to this: https://github.com/jordansissel/fpm/pull/1806

I'm testing out jammy compilations and bumped into this

Edit: I noticed in my case there were some warnings about wheel

/usr/lib/python3/dist-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}

WARNING: The wheel package is not available. {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}

The wheel package is installed via python3-wheel -- not sure why it didn't find it. I did a pip install --upgrade wheel, which fixed compilation, but not exactly the best fix. I'll see if I can try linking this against a venv instead as a workaround.

liaralabs avatar Apr 20 '22 02:04 liaralabs

This could be a bug in fpm. It looks like it fails when trying to figure out what version/name/etc the Deluge Python package has. I’ll see if I can figure out a solution — in the meantime, please continue posting any additional data you come across.

On Tue, Apr 19, 2022, at 7:57 PM, liaralabs wrote:

Came here to report this bug but see you beat me to it. For what it's worth, I'm also trying to build deluge with fpm and my arguments are similar, however this is all it takes to throw the error. First cloned deluge via git on the master branch, then

fpm --python-bin=python3 -n deluge-common -f -p /root/dist/deluge-common_VERSION.deb --description "Deluge compiled by swizzin" -s python -t deb /tmp/deluge/setup.py I wonder if it's related to this: #1806 https://github.com/jordansissel/fpm/pull/1806

I'm testing out jammy compilations and bumped into this

— Reply to this email directly, view it on GitHub https://github.com/jordansissel/fpm/issues/1889#issuecomment-1103419660, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABAF2SE6QIVXTSZIUYKVP3VF5XBZANCNFSM5TVCVHQQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

jordansissel avatar Apr 20 '22 03:04 jordansissel

Okay, so it seems that in my case, specifically, this error came down to an opinionated vagrant box that I was using as a shortcut to test some development work for the upcoming 22.04 release and not fpm.

There was a custom repo configured which was recompiling a bunch of python3 packages and installing them by default. That's what I get for using someone else's box :smile: I removed the repo and did a force downgrade of all the affected packages and fpm was able to compile the deluge package successfully.

The wheel package in particular wasn't showing up in a pip list but just fixing wheel alone wasn't enough.

Since you can't have python3-pip without python3-wheel installed I can't put fpm into a situation where this has the potential to break anymore. However, just fixing wheel but not the rest of the python led to a similar output as the author (i.e. no complaints about wheel but also a failure). Given my issues were caused by a poorly configured python env, I wonder if the author could be in a similar state as well.

liaralabs avatar Apr 20 '22 04:04 liaralabs

I've tested this on a new installation of Ubuntu focal (Official image) and the unexpected error token is pointing at a random line number If I tweak command-line options.

Any update on this?

SSoft7 avatar May 22 '22 21:05 SSoft7

This issue only happens with Ubuntu Focal (20.04) + ...Worked fine for ubuntu bionic...So, I'm guessing something changed from Ubuntu focal onwards..Probably a dependency of fpm changed with ubuntu focal?

Edit: I'm using original Ubuntu release ISO . not any custom ISO.

SSoft7 avatar Jun 14 '22 07:06 SSoft7

@liaralabs can you provide a list of your python3 packages? I would like to compare the versions of python3 packages with mine. Currently, I'm testing this on ubuntu jammy 22.04 and fpm is still failing there. (Original Ubuntu 22.04 ISO deployed directly on HyperV VM)

If you know which exact python package was causing trouble let me know please .

SSoft7 avatar Jun 15 '22 22:06 SSoft7

I only have a vagrant environment for jammy and tested these scripts on the generic/ubuntu2204 image recently. I don't know versions, but this is everything that should be required to build deluge with fpm:

https://github.com/swizzin/swizzin/blob/master/sources/functions/deluge#L175

My previous issue was related to setup tools and potentially pip itself I think

liaralabs avatar Jun 16 '22 07:06 liaralabs

I only have a vagrant environment for jammy and tested these scripts on the generic/ubuntu2204 image recently. I don't know versions, but this is everything that should be required to build deluge with fpm:

https://github.com/swizzin/swizzin/blob/master/sources/functions/deluge#L175

My previous issue was related to setup tools and potentially pip itself I think

Thank you for pointing out the setup-tools package. That was definitely breaking things for me as well. I had pip3 install -U setuptools on my install script which was upgrading setuptools to the latest available version. After some digging I found out that, this issue appears from setup tools 60.7.1. So the fix for me was pip3 install setuptools==60.6.0

SSoft7 avatar Jun 16 '22 16:06 SSoft7

After some digging I found out that, this issue appears from setup tools 60.7.1.

Is there any way to find out where the issue with setuptools is? Trying to downgrade a core component like setuptools is a bit tricky (e.g. virtualenv is ruled out for switching to a different setuptools version for doing fpm package builds)

cwegener avatar Aug 03 '22 22:08 cwegener

After some digging I found out that, this issue appears from setup tools 60.7.1.

Is there any way to find out where the issue with setuptools is? Trying to downgrade a core component like setuptools is a bit tricky (e.g. virtualenv is ruled out for switching to a different setuptools version for doing fpm package builds)

Honestly, I have no idea. even the downgrades sometimes do not work....it seems there is some conflict between the pre-installed OS setuptools and the pip installed setuptools.

SSoft7 avatar Aug 04 '22 19:08 SSoft7

After some digging I found out that, this issue appears from setup tools 60.7.1.

Is there any way to find out where the issue with setuptools is? Trying to downgrade a core component like setuptools is a bit tricky (e.g. virtualenv is ruled out for switching to a different setuptools version for doing fpm package builds)

Honestly, I have no idea. even the downgrades sometimes do not work....it seems there is some conflict between the pre-installed OS setuptools and the pip installed setuptools.

FWIW, I'm sticking to Ubuntu 20.04 LTS for fpm -s python and it's all working like a treat (using OS provided setuptools which is version 45.2.0 on Ubuntu 20.04)

cwegener avatar Aug 05 '22 04:08 cwegener

I think I figured out the issue.

I ran into this myself and, when troubleshooting it, I found that fpm was getting no information out of the python package. Fpm will write JSON to a file (using python) and the parse it in to find out what the package's name, version, etc are.

In this case, the file is empty.

I tracked the bug back to fpm's pyfpm/get_metadata.py -- I assume this is caused by a new behavior in Python? I used Python 3.11, and the problem seems to be that file writes are not flushed unless you explicitly call file.close() or file.flush(), and fpm was not invoking this in Python. This did work in older versions of pythons where it would flush the write buffer when Python exited.

jordansissel avatar Nov 27 '22 22:11 jordansissel

I believe #1966 fixes this.

jordansissel avatar Nov 29 '22 01:11 jordansissel