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

copy config files external to source #860

Closed
wants to merge 1,491 commits into
base: master
from

Conversation

Projects
None yet
@jakerobinson
Contributor

jakerobinson commented Feb 19, 2015

proposed fix to #857

Allows the addition of configuration files external to source.

e.g. We want config files for a ruby gem to be located in /etc/my_app, which is outside of the gem package. This works very similar to the way init files are added.

@jordansissel Looking for guidance on writing tests and testing regression.

Eric Connell and others added some commits Nov 26, 2013

Merge pull request #591 from econnell/master
Fix for Provides section with underscores
Add test coverage for #591
This also required fixing some bugs where FPM::Package::Deb mistakenly
made 'provides' a string (in the tests and in the 'input' method)
Merge pull request #588 from djhaskin987/patch-1
Add .tar in the sources section
Merge pull request #585 from stepanstipl/master
Respect rubygem(package) form with custom gem package name prefix
Merge pull request #573 from miked63017/master
Allowed for MYMETA files in cpan source
Merge pull request #565 from avalanche123/fix-excludes
remove trailing slash added by --prefix
Merge pull request #561 from r4um/fifo-handling
Closes #539 Correct mknod implementation
Merge pull request #556 from r4um/issue-554
Fixes #554 do not map existing paths with = in them
Make --config-files relative to package when using 'deb' target.
This fixes a bug where --config-files /path/to would accidentally try
to look at the host machine's /path/to instead of something relative to
the package itself.
Merge pull request #603 from avalanche123/rpm-version-fix
don't replace the last dash as that is the release separator
Update Vagrantfile
config define of debian6 referenced centos6.  Changed values to debian6 to make config block consistent.
Call Metacpan again to get the archive name to downlaod. This may or may
not be in a subdirectory.
Also generate the tarball name from this.

Not using the download_url from metacpan as it is a metacpan URL.
@clayne

This comment has been minimized.

clayne commented on lib/fpm/package/rpm.rb in 0063eb6 Apr 22, 2015

This section of code was confusing and repetitive when reading it at first to try and figure out what was going on. I vote this to be a cleaner approach:

# If attributes provided, use those, otherwise if rpm-use-file-permissions is false, use rpm defaults.
if !attrs[file].nil?
  return sprintf("%%attr(%s) %s\n", attrs[file], file)
elsif !attributes[:rpm_use_file_permissions?]
  return file
end

Then kill line 148 and let it fall through to the rpm-use-file-permissions true case. Since the attribute check is winning in all cases if it's non-nil, there's no reason to be checking it twice. It's precedence is higher in the overall logic regardless of rpm-use-file-permissions being true or not.

@jordansissel jordansissel force-pushed the jordansissel:master branch 2 times, most recently from 715ab62 to 9866c6d Apr 24, 2015

@Suirtimed

This comment has been minimized.

Suirtimed commented Sep 17, 2015

@jordansissel is there any reason this hasn't been merged in? I'd like to get this in the "current" version and start working on the next issue I've run into related to getting a changelog file passed in.

@ryantanner

This comment has been minimized.

ryantanner commented Mar 18, 2016

Would love to have this.

@josephholsten

This comment has been minimized.

Collaborator

josephholsten commented Jul 21, 2017

fixed with the rebase in #1379. Thanks!

jordansissel added a commit that referenced this pull request Jul 29, 2017

Restore prior --config-files behavior
PR #1379/#860 introduced a new behavior for --config-files that fetches
config files from the local filesystem. The prior behavior was to
require these files to be provided by the source package (`--source`
flag).

This patch makes a hybrid solution which does, for any given
`--config-files foo` flag:

* does the path `foo` already exist in the staging area? Do nothing.
This means the package source (`-s gem` for example) provided this file.
* or, does the path `foo` exist in the local filesystem? If so, copy it
into the staging area.
* otherwise, consider this to be an error that the --config-files
setting cannot find the file, and fpm will fail with an error.

jordansissel added a commit that referenced this pull request Jul 29, 2017

Restore prior --config-files behavior
PR #1379/#860 introduced a new behavior for --config-files that fetches
config files from the local filesystem. The prior behavior was to
require these files to be provided by the source package (`--source`
flag).

This patch makes a hybrid solution which does, for any given
`--config-files foo` flag:

* does the path `foo` already exist in the staging area? Do nothing.
This means the package source (`-s gem` for example) provided this file.
* or, does the path `foo` exist in the local filesystem? If so, copy it
into the staging area.
* otherwise, consider this to be an error that the --config-files
setting cannot find the file, and fpm will fail with an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment