In order to support packaging upload, the distribution must be
set/aligned in changelog and changes files.
Required for example inside dput-ng repo upload app.
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 previous commit eats too much whitespace after the section headers
(`%pre`, `%post` etc.). There should remain a newline.
Correct versions (for `%pre`):
```
%pre
ugrade () {
```
and
```
%pre -e
upgrade() {
```
Without this patch, we get these (wrong):
```
%pre ugrade () {
```
and
```
%pre -e upgrade() {
```
(exact number of spaces can be different, but should not be relevant)
Fixes #1750
Signed-off-by: Jo Vandeginste <Jo.Vandeginste@kuleuven.be>
Adds in two new options to enable/disable and autostart systemd services
--[no-]deb-systemd-enable to enable the systemd service after install
--[no-]deb-systemd-auto-start to auto start the service after install
Additionally, any service start/stop/restart will use deb-systemd-invoke
wrapper if installed on the system
The `Replaces` field needs to be formated 'package (operator version)'.
This makes use of the `fix_dependency` method for consistent formatting
with other dependencies.
This will generate .changes file for Debian packages. Some Debian
repository management tools use .changes files for importing packages.
The command line option --(no-)deb-generate-changes allows to select to
generate the .changes file, the option --deb-dist allows to set a
distribution (like sid) for the package.
The reasoning for this is that some projects may ship single packages
containing everything necessary. For example, `Netty` and `JRuby` are
Java projects which contain platform-specific (for many platforms)
libraries -- for example, libjffi.
When using install command (from /usr/bin/install) in after_install
shell in creates a endless loop, because it jumps to funtion beginning
of install(). So it's best practise to rename it to _install() to avoid
collision with /usr/bin/install command
* Add option --source-date-epoch-default and implement for deb output.
This is the first step towards supporting bit-for-bit identical
output files given identical inputs.
Alas, Apple's ar is not too good at reading gnu ar archives,
so always use ar_cmd to find ar.
* deb: remove lines duplicated in a tragic merge conflict
Probably introduced by 62d0060178 and not removed by 500f0c052fb52
* Add options --source-date-epoch-from-changelog and --gem-stagingdir to support bit-for-bit reproducible gem -> deb conversion
In those cases where we can get the release date out of the changelog,
use it; otherwise fall back to the value given by SOURCE_DATE_EPOCH aka --source-date-epoch-default.
--gem-stagingdir is a bit of a kludge, only needed because no
compiler supports https://reproducible-builds.org/specs/build-path-prefix-map/ yet.
Could have been global option, but not sure any other package handler
invokes compilers? Could hoist it up later.
Also:
- Defer initializing staging_path so subclasses can sneak in new value
- gem: remove build files
* gem: handle a few more gem changelog variants
* gem: also remove mkmf.log; lets ffi, kgio, raindrops, and ruby-ldap build reproducibly.
* deb: don't expect diffoscope to be installed in /usr/bin. Lets it be found on mac.
* gem: document new options