dnbert / prm

PRM Allows you to quickly build package repositories, inspired by Jordan Sissels' FPM
MIT License
249 stars 31 forks source link

Glob files to include in gem more effectively. #26

Closed imeyer closed 11 years ago

imeyer commented 11 years ago

I was receiving a ENOENT when trying to create an RPM repository due to a missing template (primary.xml.erb to be specific). I looked in the gem lib and the templates dir only had the deb_release.erb installed. Using Dir.glob grabs all the necessary files.

I left the version number alone so that you can bump it to whatever you please.

imeyer commented 11 years ago

Here is the error and the contents of the directory as seen on my system:

[root@admin01 ~]# prm -t rpm -a x86_64 -r centos6 -g -p keymanager-admin --accesskey $SECRET_KEY --secretkey $SECRET_PASSPHRASE
/usr/lib64/ruby/gems/1.9.1/gems/prm-0.2.0/lib/prm/rpm.rb:61:in `initialize': No such file or directory - /usr/lib64/ruby/gems/1.9.1/gems/prm-0.2.0/lib/prm/../../templates/primary.xml.erb (Errno::ENOENT)
    from /usr/lib64/ruby/gems/1.9.1/gems/prm-0.2.0/lib/prm/rpm.rb:61:in `open'
    from /usr/lib64/ruby/gems/1.9.1/gems/prm-0.2.0/lib/prm/rpm.rb:61:in `block (3 levels) in build_rpm_repo'
    from /usr/lib64/ruby/gems/1.9.1/gems/prm-0.2.0/lib/prm/rpm.rb:60:in `each'
    from /usr/lib64/ruby/gems/1.9.1/gems/prm-0.2.0/lib/prm/rpm.rb:60:in `block (2 levels) in build_rpm_repo'
    from /usr/lib64/ruby/gems/1.9.1/gems/peach-0.5.1/lib/peach.rb:22:in `block (2 levels) in peach'
    from /usr/lib64/ruby/gems/1.9.1/gems/peach-0.5.1/lib/peach.rb:22:in `each'
    from /usr/lib64/ruby/gems/1.9.1/gems/peach-0.5.1/lib/peach.rb:22:in `block in peach'
    from /usr/lib64/ruby/gems/1.9.1/gems/peach-0.5.1/lib/peach.rb:13:in `block (2 levels) in _peach_run'

[root@admin01 ~]# ls /usr/lib64/ruby/gems/1.9.1/gems/prm-0.2.0/templates/
deb_release.erb
dnbert commented 11 years ago

That is embarrassing! Thanks, I've pushed version 0.2.1 to Rubygems.org and added you to the Contributor list