Sometimes you will need to change the upstream source for various reasons. We'll try to document all know cases and their solutions.

Missing tests

We prefer to run all provided tests and sometimes upstream does not add tests in the gems but they will be available from their upstream source repo (usually github).

  1. Run gem2deb to create initial dsc. Use git-import-dsc --pristine-tar to import it
  2. Use github tags to download the latest version. It is a good idea to add gh to the version so we know we downloaded from github.
  3. Use git-import-orig to import the github tarball and mention upstream version as 3.0.7gh.
  4. Update changelog entry. For example, 3.0.7gh-1, if upstream version is 3.0.7
  5. Update watch file so it uses github tags. ruby-subexec has an example

  6. Open a github issue with upstream to include tests in gem. Usually upstreams respond favorably.
  7. Create debian/README.source and mention why we are using github tarball instead of gem file.

Missing tests and missing tags

  1. Download master branch as a tarball and use +git.yyyymmdd.1234567 suffix, where yyyymmdd correspond to the date of the last commit in master, and 1234567 are the first digits of the commit's SHA.
    1. Run gem2deb to create initial dsc. Use git-import-dsc --pristine-tar to import it
    2. Import the upstream tarball with git import orig and provide upstream version like 3.0.7+git.20130622.ab34f107, if the latest known upstream version is 3.0.7, and the last commit in the master branch is on 2013/06/22.
    3. Update changelog entry as above.
    4. Create debian/README.source and mention why we are using github master tarball instead of gem file.
    5. Request upstream to tag releases and include tests in releases.
    6. add a dversionmangle and a comment to look at README.source in debian/watch

version=3
# Using github master tarball, see README.source
opts=dversionmangle=s/\+git\.[0-9]*\.[a-zA-Z0-9]*// \
http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/messagebus_ruby_api .*/messagebus_ruby_api-(.*).tar.gz

If it has embedded libraries in vendor directory / non distribuable files

For embedded libraries removed, the suffix is +ds or +debian. For non distribuable files removed, the suffix is +dfsg.