Jordan Sissel
2902c04620
Merge pull request #696 from vStone/bugfix/debian-control-file-permissions
...
Bugfix/debian control file permissions
2014-07-24 11:29:55 -07:00
Jordan Sissel
9ae5c753b6
Merge branch 'pr/693' (from #693 + typo patch fix)
2014-06-19 05:59:39 +00:00
Jordan Sissel
e1a397a69c
Fix typo
2014-06-19 05:59:09 +00:00
Jordan Sissel
d3e72d36f5
Use rspec 3.0.0
...
Ran transpec on spec/ directory for automatic and delicious upgrades.
Also removed minitest dependency since fpm doesn't use it.
2014-06-19 05:32:11 +00:00
Jordan Sissel
b3d315b470
Merge branch 'master' of https://github.com/remh/fpm into remh-master
...
Conflicts:
lib/fpm/package/rpm.rb
2014-06-18 06:52:42 +00:00
Jan Vansteenkiste
2bd2a1e179
Since #480 , no default path is set so we should define one for testing python
2014-06-10 08:21:21 +02:00
Jan Vansteenkiste
43ea0a4bdb
Fixes python tests where python 3.x is installed
2014-06-10 08:21:21 +02:00
Jan Vansteenkiste
e1e35f8dfb
Ignore lsb init scripts warning since we are not providing a proper init script for testing
2014-06-10 08:21:04 +02:00
Jan Vansteenkiste
97326059d6
Updated the example gem with as little changes as possible
...
checksums.yaml.gz has been stripped as in the current gem.
Changes:
```diff
diff --git a/spec/fixtures/gem/example/example-1.0.gem b/spec/fixtures/gem/example/example-1.0.gem
index 0241779..9238a4a 100644
--- a/spec/fixtures/gem/example/example-1.0.gem
+++ b/spec/fixtures/gem/example/example-1.0.gem
@@ -46,10 +46,12 @@ dependencies:
version: '0'
description: sample description
email: sample email
-executables: []
+executables:
+- example
extensions: []
extra_rdoc_files: []
-files: []
+files:
+- bin/example
homepage: http://sample-url/
licenses: []
post_install_message:
@@ -78,3 +80,5 @@ test_files: []
has_rdoc:
============== checksums =============
=============== files ================
+bin/example
+#!/usr/bin/env ruby
```
See http://vstone.eu/diffing-gems-in-git/
2014-06-10 08:19:49 +02:00
Jan Vansteenkiste
43464f7990
Added tests. Rebuild of example-1.0.0.gem required though
2014-06-10 08:19:49 +02:00
Remi Hakim
ffef1e762a
Fix specs
2014-05-06 18:35:21 -04:00
Tom Duckering
c5a2ad35d4
Merge branch 'master' of https://github.com/jordansissel/fpm
2014-05-06 12:41:45 +01:00
Jan Vansteenkiste
b3bf553abd
Added tests for commands without package -p <dir>
2014-05-05 18:51:02 +02:00
Adam Lamar
9bdd40ddec
Support RPM dist tag
...
When --rpm-dist is specified, pass the dist tag to rpmbuild and
correctly name the file to ensure packages can be built with a
specific distribution in mind.
2014-05-01 18:33:49 +01:00
Dan Brown
6822e3bd50
Added support for dpkg triggers ( fixes #595 )
2014-05-01 14:43:54 +01:00
tduckeri
a5cbda9db0
@tomduckering - adding a fix for the bug in the pessimistic constraint fixing for RPMs converted from Gems.
2014-05-01 14:30:46 +01:00
Dan Brown
3609a449a3
Added support for extra control files for debs ( fixes #599 )
2014-04-30 16:05:39 +01:00
Jordan Sissel
dba0559d8a
Support being given a directory for the output path (-p flag)
...
This should fix #656 and maybe a few other things.
2014-04-29 22:15:41 -07:00
Remi Hakim
e7a9db50d4
Move logic in rpm specific places
2014-04-29 23:06:23 +02:00
Jordan Sissel
34897389b1
Don't require full output of a deb package if we're just checking for
...
tar flags.
The reason for this is that if we do output, it fails like so;
1) FPM::Package::Deb#tar_flags should set the group for the package's data files
Failure/Error: @package.output(@target)
FPM::Util::ProcessFailed:
tar failed (exit code 2). Full command was:["tar", "-C", "/tmp/package-deb-staging20140423-5427-10uiv96", "-z", "--numeric-owner", "--owner", "0", "--group", "nogroup", "-cf", "/tmp/package-deb-build20140423-5427-19uvbmw/data.tar.gz", "."]
Because 'nogroup' isn't a valid group when tar is run, but we want to check
that 'nogroup' is set in the tar args, not that tar works ;)
2014-04-23 13:49:13 -07:00
Jordan Sissel
ebd6289838
Make python_scripts_executable test more deterministic
...
It was failing on OSX due to file searching occuring in a different
order, and frankly we can predict the path of the script dir, so
let's use that instead of searching for it.
2014-04-22 21:52:48 -07:00
Jordan Sissel
208e0709c7
Skip if we don't have rpmbuild
2014-04-22 21:52:43 -07:00
Jordan Sissel
1cb9d75e48
Add test coverage for rpm --architecture flags
...
This covers a code from #676
2014-04-23 00:52:06 +00:00
Jordan Sissel
9f73d94a06
Merge pull request #679 from jordansissel/fix-rpm-permissions-and-user-settings
...
Allow forcing ownership even when using --rpm-use-file-permissions
2014-04-22 11:48:13 -07:00
Jordan Sissel
c12991dc90
Allow forcing ownership even when using --rpm-use-file-permissions
...
The rpm-use-file-permissions setting asks each file who owns it and what
the mode is. Sometimes you only want the mode, or sometimes the user is
not correct for deployment. Now, specifying --rpm-user will force the
owner to be the given user but still respect the file modes gathered
by --rpm-use-file-permissions.
The intent of this change is:
* --rpm-use-file-permissions still works the same, when alone
* --rpm-user forces the 'user' owner regardless of the above
* --rpm-group forces the 'group' owner regardless of the above
This was identified by https://logstash.jira.com/browse/LOGSTASH-2012
2014-04-22 18:43:37 +00:00
Remi Hakim
2ba425f4bd
Fix specs for new rpms scripts support
2014-04-14 15:32:38 +02:00
Remi Hakim
03323f5af9
Revert "Move rpm specific packages scripts to a more adequate location"
...
This reverts commit adf75fae02 .
2014-04-14 15:14:01 +02:00
Remi Hakim
025b5b135a
Move rpm specific packages scripts to a more adequate location
2014-04-07 18:22:15 -04:00
Remi Hakim
ebb7ebd55e
Fix missing spec
2014-03-18 11:07:20 -04:00
Remi Hakim
f49a1309ca
Fix specs
2014-03-18 11:06:15 -04:00
Remi Hakim
abdbbf9a18
verify_script => verifyscript
2014-03-18 11:04:00 -04:00
Remi Hakim
1c49288d48
Add support for pretrans script
2014-03-18 11:00:50 -04:00
Remi Hakim
9c5815e96e
Add postttrans support
2014-03-17 19:55:29 -04:00
Remi Hakim
2bb380d931
Fixes the specs
2014-03-14 17:02:44 -04:00
Remi Hakim
e7d7755d00
First pass at adding support for rpm "verify" script
2014-03-14 16:44:07 -04:00
Sam Crang
d3636f42b7
Fix `relative-conffile` error from lintian
2014-03-08 14:53:42 +00:00
Jordan Sissel
e5076584de
Add test coverage for #628
2014-03-07 07:13:06 +00:00
Jordan Sissel
cc4167e4c4
Merge pull request #621 from btisdall/deb_use_file_perms_inc_tests
...
Deb use file perms inc tests
2014-03-06 22:36:39 -08:00
Jordan Sissel
d42f302681
Build on #623 adding todos and some code style changes
...
Also added a test to cover hardlink support for FPM::Util.copy_entry
2014-03-07 06:01:25 +00:00
Jordan Sissel
49eae2a0fb
Use program_exists? instead of program_in_path?
...
This additionally checks that the program exists and is executable if
the path given is either a path or a program name.
2014-02-09 22:25:38 -08:00
Jordan Sissel
f81c4c554c
typo
2014-02-05 06:53:05 +00:00
Jordan Sissel
b74d269c37
Goodbye, Tempfile, I hated you always.
...
Now uses Stud::Temporary. Much happier.
(Tempfile uses finalizers to remove files on disk during GC, which
messes things up if all you want is a temporary "path name" not a file
itself.)
2014-02-05 06:53:05 +00:00
Jordan Sissel
2ebb4665f3
Add test coverage for #607 (safesystem w/ no $SHELL)
...
Also: Add missing SecureRandom.uuid under 1.8.x (for the tests)
2014-02-05 06:52:34 +00:00
bentis
d8d820e774
Add an interface to the tar flags for the data archive so that they are testable. Add some tests.
2014-01-20 12:42:29 +01:00
Jordan Sissel
c9390c8374
Merge pull request #556 from r4um/issue-554
...
Fixes #554 do not map existing paths with = in them
2013-12-05 23:03:27 -08:00
Jordan Sissel
74d00c655f
Add test coverage for #585
2013-12-05 22:47:55 -08:00
Jordan Sissel
0d50267663
- fix whitespace
2013-12-05 22:40:59 -08:00
Jordan Sissel
9e108e5690
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)
2013-12-05 22:23:43 -08:00
Jordan Sissel
9702eba6b7
Merge pull request #547 from cchandler/master
...
Bugfix: filenames w/ special characters and permissions
2013-10-29 14:37:58 -07:00
Pranay Kanwar
9a101386c9
Fixes #554 do not map existing paths with = in them
2013-09-19 15:55:57 +05:30
Chris Chandler
7de4b2a351
Bugfix: filenames w/ special characters and permissions
...
Filenames containing special characters like '%' won't stat correctly
because they've already been sanitized and the current working directory could
potentially be off.
2013-09-12 20:02:35 +00:00
Josh Kline
a2228c9e07
FPM::Package#convert does not keep defaults attrs
...
This is a failing spec to show a bug in FPM::Package#convert:
Default attributes of the target package format are applied when calling .new,
but then discarded and entirely replaced with the attributes of the source
package.
2013-09-03 20:51:09 -07:00
Matt Sharpe
bc199f92b0
fix annoying rspec warnings
2013-08-14 19:12:22 +10:00
Jordan Sissel
f3e46514ca
- write tests to cover the rsync-style path mapping
2013-07-23 14:33:54 -07:00
Derek Ludwig
5e7c6a8a32
Set default flag attributes
...
The flag options defined as "--[no-]foo" were being set in the
attributes hash as :"[no_]foo" => true/false.
This change may break other tests, as it sets up the defaults in the
test cases according to the option definition, rather than defaulting to
false (as previously).
2013-07-18 16:58:17 -07:00
Jordan Sissel
a5cb2286b6
- Add path mapping
...
Behavior
* some/file=/some/path
Result: /some/path
* some/directory=/some/path
Result: /some/path/directory/...
- drop dependency on Rush
2013-07-11 22:23:29 -07:00
Jordan Sissel
2ea44c4085
Merge pull request #461 from r4um/pr_452
...
python: handle == dependency requirement correctly
2013-06-05 00:22:34 -07:00
Pranay Kanwar
e59509966a
python: handle == dependency requirement correctly
2013-05-30 11:14:03 +05:30
Tray Torrance
59e7fb3f37
Add support for setting build-depends on debian targets
2013-05-23 12:31:07 -07:00
Jordan Sissel
e129cb57f4
Merge pull request #419 from r4um/fix_411
...
Closes #411 Translate 'noarch' architecture to 'all' for debian
2013-05-06 23:56:39 -07:00
Jordan Sissel
ae1d45e377
- improve cpan support (now with tests)
2013-05-06 23:51:12 -07:00
Jordan Sissel
54d30b15fc
Fix failing spec caused by race conditions in Tempfile... which I should really stop using...
2013-04-30 16:36:15 -07:00
Pranay Kanwar
ff79f40452
#411 Translate noarch architecture to all for debian
2013-04-22 11:19:39 +05:30
Jordan Sissel
60ba82de65
- Add test coverage for '%' in filenames
...
- Verify the rpm has the expected file paths when testing escapes and
other stuff.
(done during investigation of #416 )
2013-04-18 10:45:19 -07:00
Jordan Sissel
79c2f8ef58
- fix_dependency on Conflicts and Breaks ( #410 )
...
- add test coverage for #410
2013-04-11 10:12:53 -07:00
Pranay Kanwar
babb7ff72b
rpm, epoch should not be set by default
2013-03-22 09:28:38 +00:00
Jordan Sissel
2ac77005c1
Merge pull request #323 from r4um/fix_exclude
...
Remove empty directories only if they match exclude pattern.
2013-03-21 15:30:11 -07:00
Pranay Kanwar
a1ca20902f
Fix spec
2013-01-21 04:48:49 +05:30
Pranay Kanwar
c0c023beb1
* Use Find module to traverse files.
...
* Use only File.fnmatch on paths/patterns.
2013-01-21 04:33:00 +05:30
Ben Hughes
63beca1d1f
Make RPM cope with an input epoch of zero.
...
Some RPMs from jpackage.org have their epoch set to 0, causing epoch to
raise an exception.
2013-01-17 15:51:25 -05:00
Jordan Sissel
cab58fac1f
- Add --deb-field for setting a custom field in the deb control file
...
Example: --deb-field "Vcs-Git: git@github.com/some/repo.git"
2013-01-16 15:15:13 -08:00
Jordan Sissel
661b59c2f3
- force string for test
2013-01-16 15:13:07 -08:00
Timothy Sutton
45c0cf652f
some osxpkg spec tests can still run, not all of them
2013-01-07 22:12:18 -05:00
Timothy Sutton
ecc1d88cba
Fix osxpkg spec tests that should have been skipped on non-Darwin platforms.
2013-01-07 22:03:58 -05:00
Jordan Sissel
78e5d168e3
Merge pull request #332 from timsutton/4df9617b8a3e71ac82b4dadb8cad28cded66159f
...
OS X package support
2013-01-07 10:06:43 -08:00
Timothy Sutton
82bb43aa99
Initial OS X package support, #317 .
...
Basic support for OS X flat packages (.pkg)
- input/output
- output supports scripts, postinstall actions (using --info option),
ownership option and bundle-id-prefix option
- requires pkgbuild (therefore OS X 10.7+ only), pkgutil for input
- no tests yet
ignore .DS_Store
ignore .pkg
identifier gets its own method
first few osxpkg spec tests
osxpkg: extract name and version from PackageInfo on input
osxpkg: rename option bundle-id-prefix to identifier-prefix
- 'bundle-id' is ambiguous, given the various 'bundle'-related logic possible with OS X packages
osxpkg: fix old 'osx_' attribute prefix to 'osxpkg' in osxpkg.erb
New option: --osxpkg-dont-obsolete, to add files to 'dont-obsolete' element in PackageInfo.
osxpkg: Define public/private methods.
osxpkg_spec: Tests for basic attributes through input/output
2013-01-07 12:28:03 -05:00
Jordan Sissel
5c81ce309d
Merge pull request #324 from r4um/rpm_spec_fix
...
Fix rpm spec for os tag check (fixes a problem caused by Ruby 1.8 not allowing you to override Object#!=)
2013-01-02 15:52:21 -08:00
Jay Buffington
9a4744b9d6
control case of package name and its dependencies
...
Added the following two flags:
--[no-]python-downcase-name
(python only) Should the target package name be in lowercase? (default: true)
--[no-]python-downcase-dependencies
(python only) Should the package dependencies be in lowercase? (default: true)
fixes #326
2013-01-02 14:50:44 -08:00
cpk
b0ee2bfc2a
Use reject
2012-12-30 13:49:33 +05:30
cpk
905e6a0868
Fix rpm spec for os tag check
2012-12-30 03:06:23 +05:30
Jordan Sissel
b77d152565
- @rpmtag should be @rpmtags
...
- rpm 'release' is a string, I guess?
2012-12-27 10:52:08 -08:00
Jordan Sissel
c93b1e7ea4
- fix comment
2012-12-27 09:32:47 -08:00
Jordan Sissel
4ba42ba38f
- add coverage for the default os value
2012-12-27 09:26:30 -08:00
Jordan Sissel
3ab454d9b9
- Add --rpm-os flag for #309
...
- Add tests to cover
2012-12-07 00:04:50 -08:00
Jordan Sissel
8100ea2632
Return the orig_system() return value
2012-12-07 00:04:45 -08:00
Jordan Sissel
272d05363e
- Make the decision for symlink, directory, or file copy in Ruby, not
...
the rpmbuild spec %install shell.
2012-12-06 23:42:11 -08:00
Jordan Sissel
a8b9d59f59
- Quiet the output of all system() calls. This makes test runs much less
...
noisy
2012-12-06 23:41:47 -08:00
Jordan Sissel
0c9264b499
- Add test coverage for :no_depends?
2012-11-15 11:42:32 -08:00
Jordan Sissel
3b0aeccb7c
- fix #280 and hae a test verify it.
2012-10-26 10:37:37 -07:00
Jordan Sissel
99ab773eed
fix failling test due to 'epoch' being private
2012-09-25 13:59:29 -07:00
Jordan Sissel
b64f83c178
- write specs to ensure the default epoch and release are always '1'
...
This ensures future regressions are caught before fpm releases.
- rpm: if epoch is nil, default to 1. This fixes a regression where fpm
0.4.3 generated rpms with an epoch of '1' and the fpm 0.4.17 (or
somewhere in between) started generating rpms with no epoch value.
This caused version comparisions of '15' and '10' to show '10' as
newer if you built the version 10 one in older fpms.
2012-09-25 13:48:33 -07:00
Jordan Sissel
f2d3da85b8
- fix bad test
2012-09-06 19:26:58 -07:00
Jordan Sissel
1cf1062d23
Skip rpm regression tests since they require rpmbuild
2012-09-06 19:20:28 -07:00
Jordan Sissel
5091a0f7bc
Add spec coverage for deb priority
2012-08-25 01:22:37 -07:00
Jordan Sissel
12cde634a1
Fix up the specs and output checks
2012-08-25 03:59:03 -04:00
Jordan Sissel
675fd7b564
Fix spec for deb arch defaults
2012-08-24 15:47:55 -07:00
Jordan Sissel
e449b4335d
- Add test coverage for #250 (deb dependency operator fixings)
2012-08-24 15:47:21 -07:00
Jordan Sissel
6a60b47122
Start hacking on tests for #250
2012-08-24 18:24:13 -04:00
Jordan Sissel
d17022d5f3
- note fix for #252
...
- add regression test for #252
2012-08-24 17:05:14 -04:00
Jordan Sissel
0b6deb762e
Make --exclude on 'foo' kill any files like foo/bar/baz - #248
2012-08-14 16:03:50 -07:00
Jordan Sissel
3d78912b98
Make sure all things template
2012-08-07 10:48:13 -07:00
Jordan Sissel
3fc1f58d72
- support templating package/maintainer scripts ( #246 )
...
- include test coverage
2012-08-07 10:25:13 -07:00
Jordan Sissel
c6d3ddb6bc
Merge pull request #208 from jacaetevha/master
...
RPM user and group setting for %files section
2012-05-23 10:47:10 -07:00
Jordan Sissel
0480658b8d
Skip python specs if easy_install isn't available
2012-05-12 00:59:05 -07:00
Jason Rogers
890aea23a0
add specs for user and group settings
2012-04-18 13:08:45 -04:00
Jordan Sissel
646cf5ef44
Add regression tests for #202
2012-04-10 16:18:31 -07:00
Jordan Sissel
90b065958c
- Make file exclusion work again. Fixes #185
...
This improves on the patch in #186 .
- Add tests to make sure exclude stays working :)
2012-03-30 15:24:04 -07:00
Jordan Sissel
3123bd879d
Improve default values for epoch and iteration on deb/rpm packages (Should fix #190 )
2012-03-30 09:34:15 -07:00
Jordan Sissel
93f3879175
- Fix broken dpkg architecture test on i686 kernels
...
(discovered by failing tests run on travis-ci.org)
2012-03-30 09:06:10 -07:00
Jordan Sissel
ee8967b06d
- Add spec tests for compression and digest settings. (for #192 )
2012-03-29 19:33:34 -07:00
Jordan Sissel
33ff80e8d2
Fix specs to work in ruby 1.8
2012-03-19 13:52:16 -07:00
Jordan Sissel
b8b899eea0
It helps to add scripts *before* #output is invoked. Silly me
2012-03-18 22:58:10 -07:00
Jordan Sissel
6f02e1e95d
Add package scripts spec to rpm
2012-03-18 22:55:51 -07:00
Jordan Sissel
5542637bcf
add more default specs
2012-03-17 16:12:29 -07:00
Jordan Sissel
3e3a04c1bf
Add specs to verify rpm conflicts and provides
2012-03-16 15:37:05 -07:00
Jordan Sissel
0cc16d68d1
- remove i386 -> i686 arch translation. Turns out in many cases this is
...
incorrect. Debian is confusing.
2012-03-15 17:42:22 -07:00
Jordan Sissel
e41724d585
- fix name
2012-03-14 23:27:12 -07:00
Jordan Sissel
db13e48301
- Add specs for the gem package
2012-03-14 23:26:58 -07:00
Jordan Sissel
9110469987
- Add specs for python
2012-03-15 00:17:13 +00:00
Jordan Sissel
114aa3ece9
- cleanup after each
2012-03-11 15:40:44 -07:00
Jordan Sissel
dbd551c636
Add default #to_s (for package filename) based on observations of real rpm packages in the wild
2012-03-09 17:38:18 -08:00
Jordan Sissel
cb05d02819
Add default #to_s (for package filename) based on observations of real deb packages in the wild
2012-03-09 17:38:07 -08:00
Jordan Sissel
bfdde72427
- Add some dpkg-deb invocations to verify package goodness
...
- Add some specs to verify name translation with debian policy
2012-03-10 00:58:14 +00:00
Jordan Sissel
778cd62446
- more hacks for debian's arch naming
2012-03-09 15:15:10 -08:00
Jordan Sissel
c07dd999cd
Add more package defaults specs
2012-03-09 15:11:41 -08:00
Jordan Sissel
0b12b64f3d
clean up after each
2012-03-09 13:30:08 -08:00
Jordan Sissel
d0a7eced54
- add specs for package 'architecture' behaviors
2012-03-09 21:22:53 +00:00
Jordan Sissel
fbbf6cbe64
- default architecture should be native
2012-03-09 20:59:22 +00:00
Jordan Sissel
c89d757184
- skip rpm tests and warn if 'rpmbuild' is not found.
...
- add an 'rspec' specific log channel
2012-03-09 20:00:07 +00:00
Jordan Sissel
e8f1b862bd
- Add a regression spec for #164 . Verified it passes now and fails
...
without the fix.
2012-03-08 18:07:27 -08:00
Jordan Sissel
96369f8ca7
version defaults to nil, now
2012-03-08 17:05:30 -08:00
Jordan Sissel
84352667fa
- Add dependency parsing from deb packages on input
...
- specs passing
2012-03-08 15:21:38 -08:00
Jordan Sissel
f89893ebc4
ar(1) bitches if the file exists but is empty, so delete the tempfile, we just want the path
2012-03-08 13:30:06 -08:00
Jordan Sissel
a285b2ded8
- add spec stub for debian packages
2012-03-08 10:40:17 -08:00
Jordan Sissel
5ede8ec622
make sure some rpm spec stuff is correct
2012-03-08 10:17:36 -08:00
Jordan Sissel
5e734a541e
- fix spec checking for rpm 'name'
...
- fix rpm 'defines' default
2012-03-08 09:32:12 -08:00
Jordan Sissel
3fa07b51fa
fix syntax
2012-03-08 08:03:21 -08:00
Jordan Sissel
8d59d9e4c4
- try using rspec+insist
2012-03-08 00:03:04 -08:00
Jordan Sissel
bb422a0259
- Use my new 'insist' library for assertions
2012-03-07 23:34:29 -08:00