Skip to content
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

Attempting to set deb epoch to nil results in invalid package #2033

Open
femiagbabiaka opened this issue Nov 2, 2023 · 1 comment
Open

Comments

@femiagbabiaka
Copy link

snip@snip:~$ curl -L https://artifacts.elastic.co/downloads/logstash/logstash-8.10.4-amd64.deb -o logstash-8.10.4-amd64.deb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  333M  100  333M    0     0  24.2M      0  0:00:13  0:00:13 --:--:-- 44.0M
snip@snip:~$ dpkg-deb --info logstash-8.10.4-amd64.deb
 new Debian package, version 2.0.
 size 349219502 bytes: control archive=331827 bytes.
     237 bytes,     8 lines      conffiles
     375 bytes,    13 lines      control
 1545654 bytes, 11755 lines      md5sums
    1026 bytes,    28 lines   *  postinst             #!/bin/sh
     619 bytes,    20 lines   *  preinst              #!/bin/sh
     974 bytes,    38 lines   *  prerm                #!/bin/sh
 Package: logstash
 Version: 1:8.10.4-1
 License: Elastic-License
 Vendor: Elastic
 Architecture: amd64
 Maintainer: <buildkite-agent@bk-agent-prod-gcp-1696958443873164767>
 Installed-Size: 593254
 Conflicts: logstash (<< 7.10.0)
 Replaces: logstash (<< 7.10.0)
 Section: default
 Priority: optional
 Homepage: https://www.elastic.co/logstash
 Description: An extensible logging pipeline
 snip@snip:~$ fpm -f -s deb -t deb -p logstash-8.10.4-amd64.deb -v 8.10.4 --epoch "" logstash-8.10.4-amd64.deb
Force flag given. Overwriting package at logstash-8.10.4-amd64.deb {:level=>:warn}
epoch in Version is set {:epoch=>"", :level=>:warn}
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}
snip@snip:~$ dpkg-deb --info logstash-8.10.4-amd64.deb
 new Debian package, version 2.0.
 size 349152794 bytes: control archive=331676 bytes.
     237 bytes,     8 lines      conffiles
     311 bytes,    11 lines      control
 1545731 bytes, 11756 lines      md5sums
    1026 bytes,    28 lines   *  postinst             #!/bin/sh
     619 bytes,    20 lines   *  preinst              #!/bin/sh
     974 bytes,    38 lines   *  prerm                #!/bin/sh
 Package: logstash
 Version: :8.10.4-1
 License: Elastic-License
 Vendor: Elastic
 Architecture: amd64
 Maintainer: <buildkite-agent@bk-agent-prod-gcp-1696958443873164767>
 Installed-Size: 593254
 Section: default
 Priority: optional
 Homepage: https://www.elastic.co/logstash
 Description: An extensible logging pipeline

Other permutations of the same thing have a similar effect (setting epoch and not setting version, for example).

@jordansissel
Copy link
Owner

jordansissel commented Nov 3, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants