Commit Graph

239 Commits

Author SHA1 Message Date
Jordan Sissel 82580bb8e7 Add --deb-compression test coverage for #1760 2021-06-19 00:39:19 -07:00
Jordan Sissel 2b6e70b6fa Use rspec's skip feature to help show any skipped tests.
The previous method using :if actually hides the test entirely from the run.
Now an rspec run will correctly(I hope?) show any skipped tests. The
goal is to remind me that sometimes my dev environment is missing
important tooling needed to fully test fpm.

Also: Skip pacman tests if bsdtar and zstd programs are missing.
2021-06-19 00:09:49 -07:00
Steve Kamerman cc0a4e7369 Fixed Debian platform tag for aarch64/arm64 2021-06-17 07:58:02 -07:00
Jose 9a16e43e4e changed xz for zst 2021-01-19 13:06:50 -08:00
Jordan Sissel fbbb80fd53 Skip snap package tests on ruby 1.9 and 2.0 2019-02-23 22:00:15 -08:00
Jordan Sissel 3895fccec9 Typo. I forgot String#any? doesn't exist. 2019-02-23 22:00:15 -08:00
Jordan Sissel b269c81ebe Fix travis check 2019-02-23 22:00:15 -08:00
Jordan Sissel 62fcf8c230 Disable another test that fails on travis, but not locally... 2019-02-23 22:00:15 -08:00
Jordan Sissel e8be82ebdc Disable certain tests on travis because they fail, and we don't have private access to the debug feature, so there's nothing we can do to debug it at this time. 2019-02-23 22:00:15 -08:00
Jordan Sissel b8fc631327 Disable triggerflags and triggerindex checks to make tests pass.
I'm not sure why this fails, but it seems to fail mostly on newer
rpm/rpmbuild systems. Maybe my arr-pm library is incorrectly parsing
these rpms somehow? Anyway... the tests are passing now.
2019-02-23 22:00:15 -08:00
Jordan Sissel 51067be1a5 Fix regression in python scripts #! line.
* Target python3 (newer djangos require it)
* Hardcode the django-admin path because easy_install's path/to/bin
  discovery is not working anymore.
2019-02-23 22:00:15 -08:00
Jordan Sissel 7a4372eaa0 Fix .attributes default value test
I think this test regression was introduced in 8f2dd451.
2019-02-23 22:00:15 -08:00
Morgan Rhodes 1f2f950581 Use `fix_dependency` when populating debian `Replaces` field (#1442)
The `Replaces` field needs to be formated 'package (operator version)'.
This makes use of the `fix_dependency` method for consistent formatting
with other dependencies.
2018-10-25 10:23:16 -07: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
Omer Katz 446b49c7c4 Added ruby 2.5 to the build matrix (#1532)
* Added ruby 2.5 to the build matrix.

* Require "date" since it's missing and failing a test.
2018-10-15 21:14:04 -07:00
Jordan Sissel 3ab03e495f Set --no-cpan-test aka attributes[:cpan_test?]=false when doing a test package for cpan. This should make the test suite pass. 2018-07-03 22:05:59 -07:00
Alexey Stepanov 384f54769f Add tests for python PEP0508 tags 2018-04-14 19:55:08 -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 78853a81c9 Use 'false' not 'FALSE' constant 2017-07-20 14:12:18 -07:00
Thiago Figueiró d2a71442c1 Add tar spec for #1123 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
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
Nick Griffiths 719fec630c Fix weird clipboard fart 2016-12-30 20:01:47 +13:00
Nick Griffiths d72ea6c625 Fix for #1248 - fix prefix behaviour 2016-12-30 19:57:15 +13: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 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 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
luto 3338aa8f4b remove trailing slash from --prefix option in rpm-packages, fixes #819 2016-06-23 02:18:01 +02:00
luto 454754064f fix --workdir not having an effect on the build and staging dirs, fixes #1124 2016-06-22 01:50:44 +02:00
Nick Griffiths 66e59e79e8 Support building a virtualenv from local requirements.txt 2016-06-18 13:37:24 -07:00
Nick Griffiths d0eaf77921 Add some basic specs for the virtualenv package 2016-06-18 13:37:24 -07:00
Jordan Sissel 7bc5fba4bd Start work for acceptance tests. 2016-05-23 11:28:51 -07:00
Jordan Sissel 2ee569a1e4 Fix an RPM spec failure on Fedora 23 2016-05-16 04:18:20 -07:00
Jordan Sissel 37e8b88a6b Fix specs failing when the host is freebsd 2016-05-11 12:12:37 -07:00
Paweł Tomulik dc7e73237d add FPM::Util.execmd and fix python_spec.rb 2016-04-19 05:59:13 +02:00
Jordan Sissel f4f49e68ea Fix failing test on Fedora 23
Fedora 23's bindir for python defaults to /usr/bin, so the hardcoding of
/usr/local/bin was causing one spec to fail.
2016-04-12 21:12:03 -07:00
Paweł Tomulik af64fdfced remove the line with $CHILD_STDERR 2016-04-11 19:12:39 +02:00
Paweł Tomulik 5e24991fed fix python_spec.rb to run smoothly on Unix 2016-04-08 01:23:59 +02:00
Paweł Tomulik 78303be699 further fixes to deb lintian test 2016-04-07 22:36:09 +02:00
Paweł Tomulik 9dcd9f1379 fix to make deb lintian test passing 2016-04-07 17:33:36 +02:00
Jordan Sissel 28d9bf5e45 Merge branch 'feature/arch-support' of https://github.com/djhaskin987/fpm into djhaskin987-feature/arch-support 2015-11-07 12:40:23 -08:00
Jordan Sissel 49622ecc3c Merge pull request #917 from djhaskin987/feature/sh-before-install-spec
Add specs for PR #913
2015-11-07 12:31:07 -08:00
Jordan Sissel 5f30e89b99 Merge pull request #849 from BaxterStockman/cpan-metadata
Use MetaCPAN API query data as fallback for package metadata
2015-11-07 12:22:12 -08:00
Jordan Sissel 0829c4e72e Merge pull request #756 from pstengel/feature/rake
Add RakeTask
2015-11-07 12:07:07 -08:00
Daniel Haskin 5d17bbda86 Make specs pass for archlinux 2015-10-08 22:12:05 -06:00
Daniel Haskin 2303eef05c Merge branch 'jsl/master' into feature/arch-support 2015-09-16 19:58:19 -06:00