Check-in [0621e54420]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | deb: Always provide a "changes" file lintian in Ubuntu 14.04 now errors when a file /usr/share/NAME/changelog.Debian.gz doesn't exist. In the spirit of respecting lintian's meaningful errors, this commit fixes that error. The new behavior is that a changelog file is *always* provided. If the --deb-changelog flag is not given, then fpm will produce a default one based on the package being built in hope that it satisfies lintian. With this commit, the lintian rspec test passes on Ubuntu 14.04. Fixes #784 |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
0621e544202fcd10e11fde85b3c00351 |
User & Date: | jls@semicomplete.com 2014-10-25 04:07:46 |
Context
2014-10-25
| ||
04:51 | Adding validation to stop debian users entering names with spaces Fixes #779 check-in: 5fa2e461d0 user: jls@semicomplete.com tags: trunk | |
04:07 | deb: Always provide a "changes" file lintian in Ubuntu 14.04 now errors when a file /usr/share/NAME/changelog.Debian.gz doesn't exist. In the spirit of respecting lintian's meaningful errors, this commit fixes that error. The new behavior is that a changelog file is *always* provided. If the --deb-changelog flag is not given, then fpm will produce a default one based on the package being built in hope that it satisfies lintian. With this commit, the lintian rspec test passes on Ubuntu 14.04. Fixes #784 check-in: 0621e54420 user: jls@semicomplete.com tags: trunk | |
01:39 | Don't follow symlinks when copying files. Added test coverage to ensure a broken symlink doesn't throw a ENOENT error. The test was written first, and failed, but now passes with the fix to the dir package. Fixes #658 check-in: 763b7387c6 user: jls@semicomplete.com tags: trunk | |
Changes
Changes to lib/fpm/package/deb.rb.
︙ | ︙ | |||
374 375 376 377 378 379 380 | datatar = build_path("data.tar.xz") compression = "-J" else raise FPM::InvalidPackageConfiguration, "Unknown compression type '#{self.attributes[:deb_compression]}'" end | | | | > > | > | > > > > > | > | > > | 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | datatar = build_path("data.tar.xz") compression = "-J" else raise FPM::InvalidPackageConfiguration, "Unknown compression type '#{self.attributes[:deb_compression]}'" end # Write the changelog file dest_changelog = File.join(staging_path, "usr/share/doc/#{name}/changelog.Debian.gz") FileUtils.mkdir_p(File.dirname(dest_changelog)) File.new(dest_changelog, "wb", 0644).tap do |changelog| Zlib::GzipWriter.new(changelog, Zlib::BEST_COMPRESSION).tap do |changelog_gz| if attributes[:deb_changelog] @logger.info("Writing user-specified changelog", :source => attributes[:deb_changelog]) File.new(attributes[:deb_changelog]).tap do |fd| chunk = nil # Ruby 1.8.7 doesn't have IO#copy_stream changelog_gz.write(chunk) while chunk = fd.read(16384) end.close else @logger.info("Creating boilerplate changelog file") changelog_gz.write(template("deb/changelog.erb").result(binding)) end end.close end # No need to close, GzipWriter#close will close it. attributes.fetch(:deb_init_list, []).each do |init| name = File.basename(init, ".init") dest_init = File.join(staging_path, "etc/init.d/#{name}") FileUtils.mkdir_p(File.dirname(dest_init)) FileUtils.cp init, dest_init File.chmod(0755, dest_init) |
︙ | ︙ |
Added templates/deb/changelog.erb.
> > > > > | 1 2 3 4 5 | <%= name %> (<%= "#{epoch}:" if epoch %><%= version %><%= "-" + iteration.to_s if iteration %>) whatever; urgency=medium * Package created with FPM. -- <%= maintainer %>[two spaces] <%= Time.now.strftime("%a, %d %b %Y %T %z") %> |