Open glensc opened 9 years ago
actually, looks like it successfully finished the chained package, and then attempts to do something with "main" recipe
which fails because no source defined, so i add one:
source '', :with => :noop
now it fails because build
not defined:
===> Finished building fe, moving on to next recipe
===> Starting package creation for test-1.0 (centos, rpm)
===>
DEBUG: Run lifecycle hook: before_dependency_installation
===> Verifying build_depends with Puppet
===> All build_depends packages installed
DEBUG: Run lifecycle hook: after_dependency_installation
===> Fetching source:
===> Noop source_handler; do nothing.
===> Not extracting - noop source handler
===> Building in /vagrant/fpm-recipe/subpackage-test/tmp-build
/usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:123:in `block (2 levels) in dispense': undefined method `build' for #<#<Module:0xa78d4f8>::TestChain:0xa78c7c4> (NoMethodError)
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:113:in `chdir'
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:113:in `block in dispense'
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:105:in `chdir'
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:105:in `dispense'
from /usr/share/ruby/vendor_ruby/fpm/cookery/chain_packager.rb:47:in `run'
from /usr/share/ruby/vendor_ruby/fpm/cookery/cli.rb:111:in `exec'
from /usr/share/ruby/vendor_ruby/fpm/cookery/cli.rb:77:in `block in execute'
from /usr/share/ruby/vendor_ruby/fpm/cookery/book.rb:16:in `call'
from /usr/share/ruby/vendor_ruby/fpm/cookery/book.rb:16:in `load_recipe'
from /usr/share/ruby/vendor_ruby/fpm/cookery/cli.rb:73:in `execute'
from /usr/share/ruby/vendor_ruby/clamp/command.rb:69:in `run'
from /usr/share/ruby/vendor_ruby/clamp/subcommand/execution.rb:11:in `execute'
from /usr/share/ruby/vendor_ruby/clamp/command.rb:69:in `run'
from /usr/share/ruby/vendor_ruby/clamp/command.rb:127:in `run'
from /usr/bin/fpm-cook:7:in `<main>'
so i add build
:
def build
end
now it fails with missing install
:
===> Finished building fe, moving on to next recipe
===> Starting package creation for test-1.0 (centos, rpm)
===>
DEBUG: Run lifecycle hook: before_dependency_installation
===> Verifying build_depends with Puppet
===> All build_depends packages installed
DEBUG: Run lifecycle hook: after_dependency_installation
===> Fetching source:
===> Noop source_handler; do nothing.
===> Not extracting - noop source handler
===> Building in /vagrant/fpm-recipe/subpackage-test/tmp-build
===> Installing into /vagrant/fpm-recipe/subpackage-test/tmp-dest
/usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:132:in `block (2 levels) in dispense': private method `install' called for #<#<Module:0xa5394f4>::TestChain:0xa538680> (NoMethodError)
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:113:in `chdir'
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:113:in `block in dispense'
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:105:in `chdir'
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:105:in `dispense'
from /usr/share/ruby/vendor_ruby/fpm/cookery/chain_packager.rb:47:in `run'
from /usr/share/ruby/vendor_ruby/fpm/cookery/cli.rb:111:in `exec'
from /usr/share/ruby/vendor_ruby/fpm/cookery/cli.rb:77:in `block in execute'
from /usr/share/ruby/vendor_ruby/fpm/cookery/book.rb:16:in `call'
from /usr/share/ruby/vendor_ruby/fpm/cookery/book.rb:16:in `load_recipe'
from /usr/share/ruby/vendor_ruby/fpm/cookery/cli.rb:73:in `execute'
from /usr/share/ruby/vendor_ruby/clamp/command.rb:69:in `run'
from /usr/share/ruby/vendor_ruby/clamp/subcommand/execution.rb:11:in `execute'
from /usr/share/ruby/vendor_ruby/clamp/command.rb:69:in `run'
from /usr/share/ruby/vendor_ruby/clamp/command.rb:127:in `run'
from /usr/bin/fpm-cook:7:in `<main>'
i add empty install as well:
def install
end
and now it fails with rpmbuild:
===> Finished building fe, moving on to next recipe
===> Starting package creation for test-1.0 (centos, rpm)
===>
DEBUG: Run lifecycle hook: before_dependency_installation
===> Verifying build_depends with Puppet
===> All build_depends packages installed
DEBUG: Run lifecycle hook: after_dependency_installation
===> Fetching source:
===> Noop source_handler; do nothing.
===> Not extracting - noop source handler
===> Building in /vagrant/fpm-recipe/subpackage-test/tmp-build
===> Installing into /vagrant/fpm-recipe/subpackage-test/tmp-dest
===> [FPM] Converting dir to rpm {}
WARNING: [FPM] no value for epoch is set, defaulting to nil {}
===> [FPM] Reading template {"path":"/usr/share/ruby/vendor_ruby/fpm/templates/rpm.erb"}
WARNING: [FPM] no value for epoch is set, defaulting to nil {}
===> [FPM] Running rpmbuild {"args":["rpmbuild","-bb","--define","buildroot /tmp/package-rpm-build20150908-1959-19jt1w6/BUILD","--define","_topdir /tmp/package-rpm-build20150908-1959-19jt1w6","--define","_sourcedir /tmp/package-rpm-build20150908-1959-19jt1w6","--define","_rpmdir /tmp/package-rpm-build20150908-1959-19jt1w6/RPMS","/tmp/package-rpm-build20150908-1959-19jt1w6/SPECS/test.spec"]}
===> [FPM] Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.84463 {}
===> [FPM] Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.84463 {}
===> [FPM] Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.84463 {}
===> [FPM] Processing files: test-1.0-1.i686 {}
===> [FPM] Processing files: test-debuginfo-1.0-1.i686 {}
===> [FPM] error: Could not open %files file /tmp/package-rpm-build20150908-1959-19jt1w6/BUILD/debugfiles.list: No such file or directory {}
===> [FPM] {}
===> [FPM] Could not open %files file /tmp/package-rpm-build20150908-1959-19jt1w6/BUILD/debugfiles.list: No such file or directory {}
===> [FPM] {}
===> [FPM] RPM build errors: {}
WARNING: [FPM] no value for epoch is set, defaulting to nil {}
===> Created package: /vagrant/fpm-recipe/subpackage-test/pkg/test-1.0-1.i686.rpm
/usr/share/ruby/vendor_ruby/fpm/util.rb:83:in `safesystem': rpmbuild failed (exit code 1). Full command was:["rpmbuild", "-bb", "--define", "buildroot /tmp/package-rpm-build20150908-1959-19jt1w6/BUILD", "--define", "_topdir /tmp/package-rpm-build20150908-1959-19jt1w6", "--define", "_sourcedir /tmp/package-rpm-build20150908-1959-19jt1w6", "--define", "_rpmdir /tmp/package-rpm-build20150908-1959-19jt1w6/RPMS", "/tmp/package-rpm-build20150908-1959-19jt1w6/SPECS/test.spec"] (FPM::Util::ProcessFailed)
from /usr/share/ruby/vendor_ruby/fpm/package/rpm.rb:498:in `output'
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:174:in `block in build_package'
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:156:in `chdir'
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:156:in `build_package'
from /usr/share/ruby/vendor_ruby/fpm/cookery/packager.rb:143:in `dispense'
from /usr/share/ruby/vendor_ruby/fpm/cookery/chain_packager.rb:47:in `run'
from /usr/share/ruby/vendor_ruby/fpm/cookery/cli.rb:111:in `exec'
from /usr/share/ruby/vendor_ruby/fpm/cookery/cli.rb:77:in `block in execute'
from /usr/share/ruby/vendor_ruby/fpm/cookery/book.rb:16:in `call'
from /usr/share/ruby/vendor_ruby/fpm/cookery/book.rb:16:in `load_recipe'
from /usr/share/ruby/vendor_ruby/fpm/cookery/cli.rb:73:in `execute'
from /usr/share/ruby/vendor_ruby/clamp/command.rb:69:in `run'
from /usr/share/ruby/vendor_ruby/clamp/subcommand/execution.rb:11:in `execute'
from /usr/share/ruby/vendor_ruby/clamp/command.rb:69:in `run'
from /usr/share/ruby/vendor_ruby/clamp/command.rb:127:in `run'
from /usr/bin/fpm-cook:7:in `<main>'
so apparently it treats the "main" package also like it should produce something. i thought chain_package = true
means it only has chain_recipes
.
also imho source
and build
and install
could be predefined (defaulted to noop), so i do not have to declare them as empty. it's perfectly valid to build package without build or install section, i.e if your package contains only dependency metadata.
Sorry, I have not have looked at the rest of this - but predefining source, build and install to be empty is a change I'd like :+1:
i tried to create subpackages using chain recipe (#30), basically the recipes are just top level recipes that i include in main recipe to achieve the goal.
but seems there's some issue with cache: