rubygem naming convention constraints incorrect #287

Closed
ph1l opened this Issue Nov 8, 2012 · 7 comments

Comments

Projects
None yet
2 participants

ph1l commented Nov 8, 2012

I'm not going to argue that this an excellently named gem. I would probably argue the opposite, but it does exist

fpm-0.4.20/lib/fpm/package/gem.rb:58:in `download_if_necessary': Gem 'http_parser.rb' doesn't appear to be a valid rubygem file or name? (FPM::Package::InvalidArgument)

http://rubygems.org/gems/http_parser.rb

Owner

jordansissel commented Nov 8, 2012

hah, oops!

Owner

jordansissel commented Nov 8, 2012

to be honst, maybe I shouldn't make assumptions about what is and is not a valid gem, eh?

Owner

jordansissel commented Nov 8, 2012

New behavior:

 % ruby bin/fpm -s gem -t deb NO_SUCH_THING 
Invalid gem? {"name":"NO_SUCH_THING","version":null,"errors":[],"level":"error"}
Invalid package argument: Invalid gem: NO_SUCH_THING {"level":"error"}


%ruby bin/fpm -s gem -t deb http_parser.rb
Building native extensions.  This could take a while...
Successfully installed http_parser.rb-0.5.3
1 gem installed
Created deb package {"path":"rubygem-http-parser.rb_0.5.3_amd64.deb"}
Owner

jordansissel commented Nov 8, 2012

Now, I'm not sure if 'http-parser.rb' is a valid package in debian.. hmm

Owner

jordansissel commented Nov 8, 2012

% ruby bin/fpm -s dir -t deb -n fizz.rb /etc/motd
Created deb package {"path":"fizz.rb_1.0_amd64.deb"}
ds4172(~/projects/fpm) % lintian fizz.rb_1.0_amd64.deb| less
E: fizz.rb: file-in-etc-not-marked-as-conffile etc/motd
W: fizz.rb: control-file-is-empty conffiles
E: fizz.rb: no-copyright-file
E: fizz.rb: extended-description-is-empty
E: fizz.rb: maintainer-name-missing <jls@ds4172>
E: fizz.rb: maintainer-address-malformed <jls@ds4172>
W: fizz.rb: unknown-section default
E: fizz.rb: wrong-file-owner-uid-or-gid etc/ 1002/1002
E: fizz.rb: wrong-file-owner-uid-or-gid etc/motd 1002/1002

No complaints about the package name.

Owner

jordansissel commented Nov 8, 2012

ds4172(~/projects/fpm) % date > /tmp/hello
ds4172(~/projects/fpm) % ruby bin/fpm -s dir -t deb -n hello.rb /tmp/hello
Created deb package {"path":"hello.rb_1.0_amd64.deb"}
ds4172(~/projects/fpm) % sudo dpkg -i hello.rb_1.0_amd64.deb 
Selecting previously unselected package hello.rb.
(Reading database ... 114658 files and directories currently installed.)
Unpacking hello.rb (from hello.rb_1.0_amd64.deb) ...
Setting up hello.rb (1.0) ...

No complaints from dpkg -i

Owner

jordansissel commented Nov 8, 2012

dpkg -r and apt-get remove both seem happy with this package name.

@prof-milki prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 18, 2014

jls - don't make assumptions about valid names of a rubygem.
  If it's not a valid rubygem, the download will fail and we report it
  anyway!

  Fixes #287
b26c24a

@prof-milki prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 27, 2014

@jordansissel jordansissel - don't make assumptions about valid names of a rubygem.
  If it's not a valid rubygem, the download will fail and we report it
  anyway!

  Fixes #287
be8ed21

@jordansissel jordansissel added a commit that referenced this issue Apr 24, 2015

@jordansissel jordansissel - don't make assumptions about valid names of a rubygem.
  If it's not a valid rubygem, the download will fail and we report it
  anyway!

  Fixes #287
b20bc7c

@jordansissel jordansissel added a commit that referenced this issue Jun 20, 2016

@jordansissel jordansissel - don't make assumptions about valid names of a rubygem.
  If it's not a valid rubygem, the download will fail and we report it
  anyway!

  Fixes #287
aa36743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment