socketry / multipart-post

Adds multipart POST capability to net/http
MIT License
293 stars 72 forks source link

Issues with darkfish docs? #44

Closed jonkelleyatrackspace closed 5 years ago

jonkelleyatrackspace commented 8 years ago

I found out about multipart-post as a library dependency to r10k for puppet. gem2rpm does not work with multipart-post because of a documentation issue that I would like to raise awareness on.

Normally people would bypass the errors below with --no-ri but gem2rpm only supports --no-doc, so the alternative is to ask "Why?" and push for a fix. Seems to be caused by an undefined/unsupported formatter called darkfish? Anyone know for sure?

+ umask 022
+ cd /tmp/mk-gem2rpm/rpmbuild/BUILD
+ cd multipart-post-2.0.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ gem build multipart-post.gemspec
  Successfully built RubyGem
  Name: multipart-post
  Version: 2.0.0
  File: multipart-post-2.0.0.gem
+ mkdir -p ./usr/lib/ruby/gems/1.8
+ CONFIGURE_ARGS='--with-cflags='\''-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'\'' '
+ gem install -V --local --install-dir ./usr/lib/ruby/gems/1.8 --bindir ./usr/bin --force multipart-post-2.0.0.gem
Installing gem multipart-post-2.0.0
Using local gem /tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/cache/multipart-post-2.0.0.gem
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/.gitignore
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/.travis.yml
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/Gemfile
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/History.txt
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/Manifest.txt
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/README.md
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/Rakefile
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/lib/composite_io.rb
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/lib/multipart_post.rb
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/lib/multipartable.rb
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/lib/net/http/post/multipart.rb
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/lib/parts.rb
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/multipart-post.gemspec
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/test/multibyte.txt
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/test/net/http/post/test_multipart.rb
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/test/test_composite_io.rb
/tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/gems/multipart-post-2.0.0/test/test_parts.rb
Successfully installed multipart-post-2.0.0
1 gem installed
Installing ri documentation for multipart-post-2.0.0...
rdoc --ri --op /tmp/mk-gem2rpm/rpmbuild/BUILD/multipart-post-2.0.0/usr/lib/ruby/gems/1.8/doc/multipart-post-2.0.0/ri --main README.md -SHN -f darkfish --quiet lib --title multipart-post-2.0.0 Documentation

Invalid output formatter

For help on options, try 'rdoc --help'

error: Bad exit status from /var/tmp/rpm-tmp.GTcHk9 (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.GTcHk9 (%build)
/tmp/mk-gem2rpm/gems/cache/semantic_puppet-0.1.1.gem
executing: gem2rpm -t spec.template /tmp/mk-gem2rpm/gems/cache/semantic_puppet-0.1.1.gem > /tmp/mk-gem2rpm/rpmbuild/SPECS/semantic_puppet-0.1.1.spec
executing: rpmbuild  --define '_unpackaged_files_terminate_build 0' --define '_topdir /tmp/mk-gem2rpm/rpmbuild' -ba /tmp/mk-gem2rpm/rpmbuild/SPECS/semantic_puppet-0.1.1.spec 
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.zqNALv
# cat /var/tmp/rpm-tmp.GTcHk9
#!/bin/sh

  RPM_SOURCE_DIR="/tmp/mk-gem2rpm/rpmbuild/SOURCES"
  RPM_BUILD_DIR="/tmp/mk-gem2rpm/rpmbuild/BUILD"
  RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic"
  RPM_ARCH="x86_64"
  RPM_OS="linux"
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
  RPM_DOC_DIR="/usr/share/doc"
  export RPM_DOC_DIR
  RPM_PACKAGE_NAME="rubygem-multipart-post"
  RPM_PACKAGE_VERSION="2.0.0"
  RPM_PACKAGE_RELEASE="1.el6"
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
  LANG=C
  export LANG
  unset CDPATH DISPLAY ||:
  RPM_BUILD_ROOT="/tmp/mk-gem2rpm/rpmbuild/BUILDROOT/rubygem-multipart-post-2.0.0-1.el6.x86_64"
  export RPM_BUILD_ROOT

  PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/lib64/pkgconfig:/usr/share/pkgconfig"
  export PKG_CONFIG_PATH

  set -x
  umask 022
  cd "/tmp/mk-gem2rpm/rpmbuild/BUILD"
cd 'multipart-post-2.0.0'
LANG=C
export LANG
unset DISPLAY

# Create the gem as gem install only works on a gem file
gem build multipart-post.gemspec

# %gem_install compiles any C extensions and installs the gem into ./%gem_dir
# by default, so that we can move it into the buildroot in %install

mkdir -p ./usr/lib/ruby/gems/1.8 

CONFIGURE_ARGS="--with-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' $CONFIGURE_ARGS" \
gem install \
        -V \
        --local \
        --install-dir ./usr/lib/ruby/gems/1.8 \
        --bindir ./usr/bin \
        --force \
        multipart-post-2.0.0.gem
jonkelleyatrackspace commented 8 years ago

Environmental notes:

# ruby -v
ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
# gem -v
1.3.7
# cat /etc/redhat-release 
CentOS release 6.7 (Final)
ioquatix commented 7 years ago

Thanks for this feedback. Do you think you can submit a PR and we will merge. I agree, the documentation generation is out of date/alignment with current best practices.

ioquatix commented 5 years ago

It seems like we can finally close this issue.

https://github.com/nicksieger/multipart-post/commit/64d2da746a1c67805248d41c74de61d35ebbc1b7#diff-f40a0204ffdaf1e7a704236abdabd030L18

ioquatix commented 5 years ago

Thanks @olleolleolle for your effort.

olleolleolle commented 5 years ago

@ioquatix The pleasure was all mine.