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

--config-files should recurse if argument is a directory #171

Closed
jordansissel opened this Issue Mar 11, 2012 · 11 comments

Comments

Projects
None yet
4 participants
@jordansissel
Owner

jordansissel commented Mar 11, 2012

It should be as easy as --config-files etc/myproject

@kwilczynski

This comment has been minimized.

Contributor

kwilczynski commented Mar 13, 2012

+1 for that. I wanted to have this for quite some time, as adding multiple --config-files can be annoying :)

@kwilczynski

This comment has been minimized.

Contributor

kwilczynski commented Mar 13, 2012

Actually, do you plan this for 0.4.x or still for 0.3.x?

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Mar 13, 2012

0.3.x will not receive any further updates from me :)

@kwilczynski

This comment has been minimized.

Contributor

kwilczynski commented Mar 13, 2012

Um, harsh :)

@igalic

This comment has been minimized.

Contributor

igalic commented Jul 28, 2012

--config-files CONFIG_FILES   Mark a file in the package as being a config file. This uses 'conffiles' in debs and %config in rpm. You can specify a directory to have it scanned marking all files found as config files

But right now that's not true:

% dpkg -I /build/bwtoolsdl/trafficserver-3.2.3-0_amd64.deb
 new debian package, version 2.0.
 size 91674856 bytes: control archive= 419 bytes.
      21 bytes,     1 lines      conffiles

# dpkg -i /build/bwtoolsdl/trafficserver-3.2.3-0_amd64.deb
Selecting previously unselected package trafficserver.
(Reading database ... 94657 files and directories currently installed.)
Unpacking trafficserver (from .../trafficserver-3.2.3-0_amd64.deb) ...
dpkg: warning: trafficserver: conffile 'etc/bw/trafficserver' is not a plain file or symlink (= '/etc/bw/trafficserver')
Setting up trafficserver (3.2.3-0) ... 
dpkg: warning: trafficserver: conffile '/etc/bw/trafficserver' is not a plain file or symlink (= '/etc/bw/trafficserver')
@kwilczynski

This comment has been minimized.

Contributor

kwilczynski commented Jul 29, 2012

I never had issues with this, provided that "conffiles" has fully-qualified path to each file, and there is one file per line. This means that you have to use --config-files for each file separately (the recursive nature of --config-files is not yet there as far as I can tell).

You can extract relevant bits of your .deb file and see what is inside "conffiles" and whether it has expected paths:

ar p trafficserver-3.2.3-0_amd64.deb control.tar.gz | tar zxf - -O conffiles

You should see content of the "conffiles" on the console, and it should have one file per line that has fully-qualified path.

@j4m3s

This comment has been minimized.

j4m3s commented Sep 6, 2012

This is a bit dangerous as-is. I've come to rely heavily on fpm, it's a great tool - but the documentation regarding --config-files is totally incorrect, it does not recursively mark the contents of a directory as conffiles. This could cause some quite serious destruction - a deb built with fpm will overwrite customised config files with the "standard" ones included in the package, as if they were standard files. Anyone without a backup of their original files will have to go back to square 1 and recreate the contents of their config files.

I know a massive amount of work has gone into fpm, and it's a brilliant tool, but I think the documentation should be updated asap - people using the tool may be heading for a nasty surprise.

(just saw it's a wiki - with your permission I'll update it...)

Thanks, James

jordansissel added a commit that referenced this issue Sep 6, 2012

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Sep 6, 2012

@j4m3s sorry, this area doesn't have much testing because I never put any config files in any packages at all. I'll try to add tests to cover this area soon.

With respect to the --help output, I've updated master to not claim directory recursion in --config-files

@j4m3s

This comment has been minimized.

j4m3s commented Sep 6, 2012

Wow that is staggeringly responsive! I tried all sorts so have tested that there is no way you can specify a directory and have it expanded to individual conffiles :)

Congratulations on such a useful bit of software, I couldn't do without it now.

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Sep 6, 2012

I'll add recursion soon (and will close this bug when it's committed/tested), sorry again for the confusion :)

@igalic

This comment has been minimized.

Contributor

igalic commented Sep 6, 2012

I usually just use a find on the directory.

Jordan Sissel notifications@github.com wrote:

I'll add recursion soon (and will close this bug when it's
committed/tested), sorry again for the confusion :)


Reply to this email directly or view it on GitHub:
#171 (comment)

Sent from my Android phone with K-9 Mail. Please excuse my brevity.

jordansissel added a commit that referenced this issue Jul 30, 2013

Merge pull request #506 from r4um/issue-171
Closes #171 --config-files should recurse if argument is a directory

prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 18, 2014

prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 18, 2014

jls
Merge pull request jordansissel#506 from r4um/issue-171
Closes jordansissel#171 --config-files should recurse if argument is a directory

prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 27, 2014

prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 27, 2014

Merge pull request jordansissel#506 from r4um/issue-171
Closes jordansissel#171 --config-files should recurse if argument is a directory

jordansissel added a commit that referenced this issue Apr 24, 2015

Merge pull request #506 from r4um/issue-171
Closes #171 --config-files should recurse if argument is a directory

jordansissel added a commit that referenced this issue Jun 20, 2016

Merge pull request #506 from r4um/issue-171
Closes #171 --config-files should recurse if argument is a directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment