New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rubygem naming convention constraints incorrect #287

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

Comments

Projects
None yet
2 participants
@ph1l

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

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Nov 8, 2012

hah, oops!

@jordansissel

This comment has been minimized.

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?

@jordansissel

This comment has been minimized.

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"}
@jordansissel

This comment has been minimized.

Owner

jordansissel commented Nov 8, 2012

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

@jordansissel

This comment has been minimized.

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.

@jordansissel

This comment has been minimized.

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

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Nov 8, 2012

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

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 jordansissel#287

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

- 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 jordansissel#287

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

- 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

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

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment