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

Generate .changes file for Debian #1492

Merged
merged 1 commit into from May 13, 2018

Conversation

Projects
None yet
2 participants
@NetSpida

NetSpida commented May 7, 2018

Issue #467 calls for creation of .debain.tar.gz, .dsc and .changes files.

This Patch adds generation of .changes file for Debian packages.
.changes files (containing all files relevant to a package with their checksums) are used by some repository management tools when importing packages.
Generating a .debian.tar.gz (which would contain the Debian specifics for this package, for example the rules file (basically, Makefile), the control file (specifying dependencies) and Debian specific patches) or a .dsc (which would specify the source package) might not be relevant for the use-case of fpm, though.
Fixes #467.

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.

Timo Boettcher
Generate .changes file for Debian
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.
@jordansissel

This comment has been minimized.

Owner

jordansissel commented May 13, 2018

I think #467 is requesting signed packages, so I am not sure if this completely solves that request, but it looks like it's a necessary step? Can you help me understand the workflow -- For example, if I run bin/fpm -s dir -t deb -n example --deb-generate-changes my files here, what is the next step for you to sign it?

For some context on #467, at work, we generate debs with fpm (logstash, beats, kibana) and I think we sign those deb packages without any .changes files. To accomplish this, we invoke dpkg-sig --sign <gpg-key_name> <the-package.deb>. That said, it's possible you're signing things differently than I do at work.

@jordansissel

Travis failed, but not due to this PR, so I will consider this to have passed tests :)

I left one in-line comment which I will resolve myself and then merge after I test it.

@@ -50,6 +50,8 @@ class FPM::Package::Deb < FPM::Package
value
end
option "--dist", "DIST-TAG", "Set the deb distribution."

This comment has been minimized.

@jordansissel

jordansissel May 13, 2018

Owner

Can you set a default value: :default => "unstable"

My hope is that this improves documentation (the --help shows you the default), and further, it would let you remove one line of code:

(This line below can be removed if you set a default value)
distribution = self.attributes[:deb_dist] ? "#{self.attributes[:deb_dist]}" : "unstable"; further down in this file.

@jordansissel jordansissel merged commit 07b0be4 into jordansissel:master May 13, 2018

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
@jordansissel

This comment has been minimized.

Owner

jordansissel commented May 13, 2018

Did one manual test beyond the test suite:

% bin/fpm -s dir -t deb -n example --deb-generate-changes ~/.zshrc
Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag {:level=>:warn}
Created changes {:path=>"example_1.0_amd64.changes"}
Created package {:path=>"example_1.0_amd64.deb"}

Then I briefly reviewed the .changes file with my eyes and it looked ok (caveat: I have no recent experience with .changes files, so it's hard to evaluate further).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment