Commit Graph

1257 Commits

Author SHA1 Message Date
Mike Perham 83b4ad9d65 Use variable instead of hardcoded filename
The code specifies .gz when using non-gzip compression which breaks on recent debian packaging tools. Fixes #1647
2019-11-19 15:27:18 -08:00
c-ameron d7b466787d default to false for deb-systemd starts 2019-03-25 22:15:44 -07:00
c-aamm 823b3947fc allow starting of multiple deb systemd services 2019-03-25 22:15:44 -07:00
c-aamm a7626cb99b Allow auto-enable and auto-start for deb-systemd services after install
Adds in two new options to enable/disable and autostart systemd services
--[no-]deb-systemd-enable to enable the systemd service after install
--[no-]deb-systemd-auto-start to auto start the service after install

Additionally, any service start/stop/restart will use deb-systemd-invoke
wrapper if installed on the system
2019-03-25 22:15:44 -07:00
Richard Grainger 1c1ff7dc19 [Fixes #1557] Allow git repo as gem source 2019-03-25 22:13:29 -07:00
Alexander Weidinger 6628f175ff Dir#input: don't overwrite license and vendor
Calling Dir#input overwrote #license and #vendor with default values.
2019-03-25 22:10:02 -07:00
Jordan Sissel 57fb023ee2 Support rubygems >= 3.0.0
This rubygems release renamed --no-ri and --no-rdoc to --no-document
2019-02-23 22:00:15 -08:00
Jordan Sissel 5e4e30ce0e version bump 2019-02-03 14:52:26 -08:00
Kyle Fazzari 8f6f285271 Introduce support for snap packages (#1490)
[Snaps][1] are self-contained squashfs images. Add basic support for
using them as inputs and outputs.

Typically Snapcraft is used to create snaps, but #1149 indicated a
desire to not use Snapcraft, so the snap is created natively, using
mksquashfs at the end to actually create the squashfs image. This may
not work for all use-cases (e.g. when the source doesn't already have
its dependencies bundled).

[1]: https://snapcraft.io/

Resolve #1181

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
2018-10-16 15:59:17 -07:00
Dave L ca02692bcb Changed the mode of templates file for deb packages to 0644 (#1489)
If "--deb-templates" is used, fpm uses the wrong mode for this file. Since it is not an executable file, it should
not have the executable bits set. The lintian tool complains (with an error) that the mode is incorrect, and that
it should not be executable. Changing the mode to 0644 resolves this.
2018-10-16 15:57:03 -07:00
Mike Vastola 0d67ab9e3e Support different compression types for the deb control.tar file (#1542)
On input, the compression type is detected automatically. For output, the compression type is determined by the `--deb-compression` flag.

Fixes jordansissel/fpm#1540
2018-10-15 22:04:36 -07:00
Jordan Sissel bf54a505ed
Fix virtualenv failure on Python 3.6 (#1406) (#1556) 2018-10-15 20:46:13 -07:00
gcoxmoz 2b70a025f4 Preserve build-time timestamps when building rpms [#1538] (#1559) 2018-10-13 14:46:50 -07:00
Jordan Sissel cad736ee6c
Version bump to 1.10.2 (#1516) 2018-07-03 22:11:58 -07:00
Jordan Sissel 20e89a6feb
Always treat perl dependency version as a string. (#1515)
Perl modules have both META.json and META.yml. In the JSON, the perl
dependency appears as a string `"5.004"`, but in YAML it appears as a
number `5.004`! This may cause fpm to fail when trying to convert the
perl version into a dependency, so we now always treat the perl version
as a string.

Fixes #1514
2018-07-03 22:08:48 -07:00
Jordan Sissel c36416d63f
Version bump for a cpan bug fix (#1512) 2018-07-03 21:22:14 -07:00
William N. Braswell, Jr 7f5538f76f Perl CPAN Support, Fix Broken PERL5LIB & Add cpanm Verbose Option (#1511)
Perl CPAN Support, Fix Broken PERL5LIB & Add cpanm Verbose Option

Fixes #1509
2018-07-03 21:16:37 -07:00
Jordan Sissel 0c1ef4e106 Version bump 2018-05-18 17:31:58 -07:00
Roman Vasilyev 1d04b94472 lignup 2018-05-12 21:16:35 -07:00
Roman Vasilyev 09fca24748 python3 fix 2018-05-12 21:16:35 -07:00
Jordan Sissel 40b1f2d741 Move the default value for `--deb-dist` into the option definition. 2018-05-11 22:12:31 -07:00
Timo Boettcher 07b0be428e Generate .changes file for Debian
This will generate .changes file for Debian packages. Some Debian
repository management tools use .changes files for importing packages.
The command line option --(no-)deb-generate-changes allows to select to
generate the .changes file, the option --deb-dist allows to set a
distribution (like sid) for the package.
2018-05-12 21:05:27 -07:00
Alexey Stepanov 51682db33e Process PEP0508 markers on python package requirements
Closes-bug: #1307
2018-04-14 19:55:08 -07:00
Jordan Sissel 8f2dd4516a Default :workdir attribute to Dir.tmpdir
This fixes a bug where rpm output passes an rpm build macro `_tmppath`
that is empty, and on Fedora 27 this causes rpmbuild to fail.

The test suite catches this by making most all RPM specs fail, and with
this change, most of them now pass.
2018-01-10 21:09:17 -08:00
Charles R. Portwood II b3c20f4e87 Fixes typo with APK control scripts
Alpine Linux describes the available control scripts at https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package.

This patch fixes an issue where `post-install` was registered multiple times, preventing `:after_install`, `:before_install`, `:before_upgrade`, and `:after_upgrade` from running the correct script.
2018-01-10 21:00:56 -08:00
Chris Krelle 90a7f94067 add check for config file already in staging area
Check if config file already exists in the staging before attempting
to copy it
2017-12-23 13:02:43 -08:00
Chris Krelle fe0ab21476 add copy of local file to staging area so it is included in the package 2017-12-23 13:02:43 -08:00
Chris Krelle 8758734009 Fix issue 1440, createing deb packages with --config-files option
While I am not a ruby programer, I was able to come up with a solution to
the issue I was running into when attempting to create a .deb package when
using the --config-files option.
2017-12-23 13:02:43 -08:00
Amnon BC d6ee7e199c add xzmt - multithreaded xz compression for rpmbuild 2017-12-23 00:01:14 -08:00
Marc-Andre Lafortune a0b3a1f078 Load only the backports that are needed 2017-12-15 23:53:38 -08:00
Jordan Sissel bd89a51f61 Version bump 2017-08-20 13:28:56 -07:00
Nemanja Boric 139793c8b3 Allow source=dest/ syntax for symlinks
PR #1253, while fixed the bug where `source.link=dest/source.link`
resulted in `source.link=dest/source.link/source.link` introduced a bug
where `source=dest/` syntax stopped working for symlinks (it is ok for
files). This is now fixed, as the symlink source now behaves the same as
it would with a single file input. Test case testing this behaviour is
also added.

Fixes #1395
2017-09-11 09:36:10 -07:00
Jordan Sissel b7e82d49b4 Version bump 2017-07-29 01:27:51 -07:00
Jordan Sissel a15f60e20f 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.
2017-07-29 14:49:16 -07:00
Jordan Sissel 100a825796 Version bump for a newer pleaserun 2017-07-28 14:59:15 -07:00
Jordan Sissel b0fd3d2ef3 version bump 2017-07-28 14:53:45 -07:00
Scott Van Hess e777018424 Rename `--include-dependencies` to `--embed-dependencies` 2017-07-21 10:24:13 -07:00
Scott Van Hess c63e6fa89d Optionally allow gem dependencies to be installed 2017-07-21 10:24:13 -07:00
Jordan Sissel b9f4c1e64f - fix another bad conversion from ftw to net/http. I hate net::http so
much.
2017-07-21 10:24:13 -07:00
jakerobinson 783b06fe97 copy config files external to source 2017-07-21 10:09:23 -07:00
Ward Vandewege 55672427a5 Add --python-setup-py-arguments flag which can be used to pass arbitrary
arguments to setup.py.

This is helpful to package python modules that have a poorly written
setup.py that requires special arguments.
2017-07-21 09:55:01 -07:00
Alexander Weidinger 127b29194a Add --deb-after-purge FILE 2017-07-20 16:41:15 -07:00
Jan Delgado c7393be73f Performance optimization for apk packages: This patch dramatically improves
performance when building larger alpine apk packages.
2017-07-20 14:16:01 -07:00
Thiago Figueiró 07e7e5399d Fix #1123 do not include empty .scripts directory 2017-07-20 14:12:18 -07:00
Nemanja Boric fcd4dfd631 In case of a=b syntax where a is symlink, don't create directory (#1253)
Previously, if the symlink is included into the package and specified
with

my-sym-link.so=/usr/lib/my-sym-link.so

fpm would create directory, and put the
symlink inside `/usr/lib/my-sym-link.so/my-sym-link.so
which is very surprising and it doesn't follow the same
pattern as file copying is doing.

Fixes #1135
2017-07-20 14:00:21 -07:00
Jordan Sissel a8b431bc0b Use lowercase booleans. TRUE/FALSE cause Ruby to show warnings about deprecation 2017-07-20 13:50:10 -07:00
ServiusHack a3ddf38b84 Fix copy_entry for symlinks (#1348)
* Add test for copying symlinks

The test explicitly sets `preserve=true` and `remove_destination=true`
to show the currently broken behavior.

* Fix copy_entry for symlinks

The fourth argument to FileUtils.copy_entry is dereference_root to
which the value of remove_destination was passed.

The fix now passes the parameters in the required position.
2017-07-20 13:11:28 -07:00
Philippe Poilbarbe c2db5985f6 Added --deb-interest-noawait and --deb-activate-noawait (#1225) (#1359) 2017-07-20 13:05:03 -07:00
Dan Kegel 14c4819e41 Implement reproducible gem -> deb conversion (#1360)
* Add option --source-date-epoch-default and implement for deb output.

This is the first step towards supporting bit-for-bit identical
output files given identical inputs.

Alas, Apple's ar is not too good at reading gnu ar archives,
so always use ar_cmd to find ar.

* deb: remove lines duplicated in a tragic merge conflict

Probably introduced by 62d0060178 and not removed by 500f0c052f

* Add options --source-date-epoch-from-changelog and --gem-stagingdir to support bit-for-bit reproducible gem -> deb conversion

In those cases where we can get the release date out of the changelog,
use it; otherwise fall back to the value given by SOURCE_DATE_EPOCH aka --source-date-epoch-default.

--gem-stagingdir is a bit of a kludge, only needed because no
compiler supports https://reproducible-builds.org/specs/build-path-prefix-map/ yet.
Could have been global option, but not sure any other package handler
invokes compilers?  Could hoist it up later.

Also:
- Defer initializing staging_path so subclasses can sneak in new value
- gem: remove build files

* gem: handle a few more gem changelog variants

* gem: also remove mkmf.log; lets ffi, kgio, raindrops, and ruby-ldap build reproducibly.

* deb: don't expect diffoscope to be installed in /usr/bin.  Lets it be found on mac.

* gem: document new options
2017-07-20 12:33:14 -07:00
liger1978 1bda1089a4 Fixes #1345 Test for nil before using metadata[module] in cpan.rb (#1346) 2017-06-19 10:00:41 -07:00
Joseph Anthony Pasquale Holsten 2ea5ecf65f package/dir: remove spurious pry (#1293)
Fixes #1259
2017-06-14 21:46:44 -07:00
Bob Bell b13f2f0a05 Translate Perl version dependencies like 5.008001 proper versions like 5.8.1 (#1342) 2017-06-14 21:41:03 -07:00
liger1978 17cdacb782 Fixes #1343 Ensure self.version is converted to string (#1344) 2017-06-06 12:53:17 -07:00
Bob Bell 32d526fb14 Use capabilities in Perl dependencies (#1340) 2017-06-05 14:25:25 -07:00
Bob Bell 5148814866 Do not remove the leading "v" from version dependencies, since that is how the version of those dependencies themselves are being provided (#1339) 2017-06-05 14:24:12 -07:00
Bob Bell b930bcc874 Update to v1 of MetaCPAN API (#1341) 2017-06-05 13:06:24 -07:00
Bob Bell f393ca6382 Be consistent in letting newer Perl module versions meet the requirements, if not otherwise specified (#1338) 2017-06-05 11:44:13 -07:00
Paulo Sousa 37cc459dd8 pleaserun: add extra options to pleaserun (#1311) 2017-06-02 16:31:05 -07:00
memory 359e4847cb Add --virtualenv-find-links flag (#1318)
"pip install" in addition to the --index-url and --extra-index-url
flags, offers the `--find-links` flag, which tells pip to parse
an html index document looking for wheel/egg/source files without
expecting the "simple" pypi layout or to look in a local directory
for package files.
2017-05-26 08:30:45 -07:00
Bob Vincent c364b2a41e Fix zipfile target. (#1314)
* Fix zipfile target.

* Remove "-y" option which is unsupported on Windows.
2017-04-24 10:35:57 -07:00
vbakayev 6dca7cabf0 fix wrong init.d shim naming (#1325) 2017-04-20 09:22:33 -07:00
Jordan Sissel 859f602f56 Merge pull request #1262 from nicobrevin/fix-virtualenv-prefix-behaviour
Fix virtualenv prefix behaviour (#1248)
2017-04-04 22:43:15 -07:00
Jordan Sissel 1752f4fcb2 Version bump 2017-02-05 01:46:58 -08:00
Nick Griffiths d72ea6c625 Fix for #1248 - fix prefix behaviour 2016-12-30 19:57:15 +13:00
Jordan Sissel 7f483848f9 Release 1.8.0 2016-12-28 01:50:47 -08:00
Jordan Sissel af305e7a87 Merge pull request #1218 from nzjrs/master
make virtualenv packages truly standalone
2016-12-07 15:51:49 -08:00
Jordan Sissel b560b0fcce Merge pull request #1241 from liger1978/fix_cpan_version_query
Fixes #1236 Fixed version number for metacpan search
2016-11-29 17:25:07 -08:00
Jordan Sissel 16401efae9 Version bump to 1.7.0 2016-11-28 15:45:54 -08:00
Richard Grainger 93dacaf0fb Fixes #1236 Fixed version number for metacpan search 2016-11-28 08:42:29 +00:00
Jordan Sissel 888b5860a9 Merge pull request #1235 from cfstras/master
pleaserun: support chdir parameter
2016-11-27 20:13:28 -08:00
Jordan Sissel 9d9df389a0 Merge pull request #1213 from shalq/bz2-support
deb data file should support bz2 format
2016-11-27 19:59:58 -08:00
Jordan Sissel 98af0f6787 Merge pull request #1226 from Daniel15/patch-1
Fix comment in apk.rb
2016-11-27 19:49:59 -08:00
Claus Strasburger b999baf1b9 pleaserun: support chdir parameter
Added support for --pleaserun-chdir to specify the working directory of a
created service.
2016-11-25 14:13:00 +01:00
Jose Diaz-Gonzalez 098c9b2de5 Use StringIO from ruby stdlib
Closes #1148
2016-11-22 14:00:22 -07:00
Daniel Lo Nigro 0764bbdcd7 Fix comment in apk.rb
This file is for Alpine packages, not Debian packages! :D
2016-11-13 15:38:14 -08:00
John Stowers ca8aeb951d virtualenv: add option create with --system-site-packages
this allows virtualenv packages to see the system package
directory
2016-10-23 14:37:16 +02:00
John Stowers e72209b59c virtualenv: add option to also install the package in the virtualenv
one common use-case for a virtualenv requirements.txt source
is to distribute ones software and the dependencies in one
debian file. unfortunately the current implementation doesn't
get one all the way to that goal. Starting with a local checkout
of a python package (containing one's own software, setup.py and
requirements.txt) fpm can create a package that contains the
software dependencies, but not the software itself.

this commit adds an option to also run the package setup.py
after populating the virtualenv, thus giving a means to
package one's own application *and* the dependencies in
one step
2016-10-23 13:28:41 +02:00
Richard Grainger c7839af1f9 Fixes #1206 Improved download URL query for CPAN modules 2016-10-17 21:04:49 +01:00
Long Quan Sha afca45910e deb data file should support bz2 format 2016-10-17 06:29:17 +00:00
Jordan Sissel e9a6f63e2e Merge pull request #1203 from liger1978/fix_merge
Ensured result is not nil. Fixes #1202.
2016-10-15 19:33:10 -07:00
Jordan Sissel 9af51d7364 Merge pull request #1210 from nicobrevin/bugfix-virtualenv-various
Bugfix virtualenv various
2016-10-15 19:24:17 -07:00
Nick Griffiths 4cdab37074 Fix failing virtualenv test 2016-10-15 16:42:19 +13:00
Nick Griffiths fc648021e4 Cope with longer tmp dirs - shebangs must be < 128 chars 2016-10-15 16:11:17 +13:00
Richard Grainger 33216ad7d7 Ensured result is not nil. Fixes #1202. 2016-10-09 22:36:11 +01:00
Matt Sharpe 2e8583e42e Use global architecture switch for FreeBSD ABI 2016-09-28 17:36:28 +10:00
Jordan Sissel cda8262bab Version bump 2016-09-15 10:35:27 -07:00
Jordan Sissel 40aa7cf5ca Move fpm version query behavior to `run` method.
A bug pointed out by #1162 showed that `fpm --version` would fail when
a .fpm file was loaded.

Moving the short `fpm --version` handling to the `run` method lets us do
this check before we load FPMOPTS env or .fpm files.

Updated the tests to only try calling with a lone `-v` or `--version`
flag to verify this works with and without a .fpm file.

Fixes #1162 and #1125. Original work by @drwl!
2016-09-11 23:48:39 -07:00
Andrew Lee a6f25b9fda Fix --version when .fpm file exists 2016-09-11 23:48:17 -07:00
Matt Sharpe 0e9e8f0a43 Add long flag options for chdir, input, and output
The flags for chdir, input, and output aren't immediately intuitive
as to what they're short for. This commit adds long versions and a
spec stub for chdir. Resolves #1187.
2016-09-02 17:19:12 +10:00
Jordan Sissel 5b5d7efb31 Fix blank summary bug. When using the description field for the summary, instead of picking the first line, we now pick the first non-empty line. Fixes #1186. 2016-08-27 21:41:00 -07:00
Richard Grainger 5981a29f76 Fix #1179 Remove .packlist files and empty parent directories from CPAN packages 2016-08-23 23:47:20 +01:00
Richard Grainger b6ee8799ce Fix #1114 by looking for new-style keys in CPAN metadata 2016-08-19 15:49:43 +01:00
Jordan Sissel 64897df7c7 Merge pull request #1154 from Romain-Geissler-1A/fix-pacman-dependency-regex
Fix pacman dependency regex.
2016-08-08 13:30:51 -07:00
Lloyd Pick 6de809631a add missing apk require 2016-08-04 20:20:08 +01:00
Jordan Sissel 40ec0c3576 Merge pull request #1139 from luto/bugfix/1124
fix --workdir not having an effect on the build and staging dirs, fixes #1124
2016-07-25 16:14:44 -07:00
Andreas Zuber be71a16a40 gem: make sure only the shebang on the very first line of the script gets replaced 2016-07-22 09:16:48 +02:00
Andreas Zuber 8add9bcdd6 gem: make it posssible to set the shebang
This makes it possible to create packages from gems for ruby versions
which are not currently installed on the machine you build the package on.
2016-07-22 09:02:39 +02:00
Romain Geissler 1cef669d07 Fix pacman dependency regex. 2016-07-05 21:34:50 +02:00
Jordan Sissel 398eeafde9 Version bump 2016-06-30 14:51:35 -07:00
luto 3338aa8f4b remove trailing slash from --prefix option in rpm-packages, fixes #819 2016-06-23 02:18:01 +02:00