This fixes #1788. This also reverts #280. For #280, at the time, this
change to ignore versions was correct. Two years after #280, Debian
began allowing `Provides` field to have versions.
This change also fixes bug in gem-to-deb conversion where previously an
incorrect Provides syntax would be generated (but thanks to #280,
removed), so this bug was only noticed after #280 was undone!
Computers are hard sometimes.
Added tests for gem-to-deb conversion specifically for the Provides
field.
Tested manually with Docker on Ubuntu 14.04 and 18.04 and results meet
expectations.
The history here is follows:
* In 2012, fpm was patched to remove version specifiers in Provides
field because Debian didn't support it.
* In 2014, Debian dpkg[1] added support for versions in Provides field
* Somewhere between 2015-2018, Debian and Ubuntu included this new
version of dpkg.
* Debian packaging policy docs (v4.4.0) was updated to allow versions
in the Provides field.
Expected impacts:
* Older versions of dpkg/etc should _ignore_ the presence of a version
specifier. Testing on Ubuntu 14.04 confirmed this.
* Newer versions of dpkg/etc should respect the presence of a version
specifier. Testing on Ubuntu 18.04 confirmed this.
[1] https://launchpad.net/debian/+source/dpkg/1.17.11
The `Replaces` field needs to be formated 'package (operator version)'.
This makes use of the `fix_dependency` method for consistent formatting
with other dependencies.
template file. (added '-' to the end tag).
Without the edit, the template was inserting an extra blank line into the
config file. When dpkg/reprepro try to read the file the blank line is
interpreted as the end of the configuration, and the additional lines
below it cause an error.
With the edit, no additional blank line is inserted. The comment is
correctly escaped.
Signed-off-by: Andrew Bunday <andrew.bunday@gmail.com>
- support an ~/.fpmrc - the syntax of this file is one flag per line.
This file is optional.
https://github.com/jordansissel/fpm/issues/39
- Support --replaces (only .deb supports this right now, rpm seems to
not).
The description field cannot contain empty lines in a debian control
file. Adds " ." to empty lines. Also removes double printing of the
description in the control file.
Supports {pre,post}{install,uninstall} tasks in deb and rpm now.
maintainers scripts are now supported. However, the interface is
likely to change in the future. I want to make a universal maintainer
script format that allows you to use the same exact script in an rpm
and in a deb package.
See https://github.com/jordansissel/fpm/issues/18