jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.09k stars 1.07k forks source link

Fix bug in deb.rb outputting erroneous conffiles file when specifying upstart config #1984

Open NicholasBHubbard opened 1 year ago

NicholasBHubbard commented 1 year ago

This PR fixes a bug in deb.rb where adding an upstart configuration file via the --deb-upstart flag, causes FPM to output a deb package with an erroneous conffiles file.

Steps to reproduce:

$ cd $FPM_ROOT
$ touch /tmp/foo.upstart
$ bundle exec fpm -t deb -s cpan --deb-upstart /tmp/foo.upstart -p /tmp/perl-file-temp_VERSION_all.deb --log error File::Temp
Created package {:path=>"/tmp/perl-file-temp_0.2311_all.deb"}
$ cd /tmp
$ ar x perl-file-temp_0.2311_all.deb
$ tar -xf control.tar.gz
$ cat conffiles
/etc/init/foo.conf
/tc/init/foo.conf

This example shows that the conffiles file erroneously contains the value /tc/init/foo.conf.

With the fix from this PR the conffiles file contains only /etc/init/foo.conf.

wbraswell commented 1 year ago

This PR looks good to me! @jordansissel, we realize that you may still be busy taking care of your family, please take a look when you get a chance, thanks.