Commit Graph

1233 Commits

Author SHA1 Message Date
George Lester 49f2c79c3a First working apk package that installs with no errors 2015-12-28 17:12:53 -08:00
George Lester d151d4721f Removed debug line from last commit 2015-12-28 17:12:53 -08:00
George Lester 594f2c0b48 Fixed hanging nul-records on data tar. Ensured both tars are -individually- zipped before concatenation. 2015-12-28 17:12:53 -08:00
George Lester 6196d9f8b2 Ensured that extension headers are only added to file contents, not directories or nul records 2015-12-28 17:12:53 -08:00
George Lester 6d7c02caca Revised the method by which chunks are rounded to the nearest 512 2015-12-28 17:12:53 -08:00
George Lester 081450a505 Fixed extension hash line length 2015-12-28 17:12:53 -08:00
George Lester 43edc59b5a Fixed a menagerie of errors around extension header, and ensured that output concatted tar is also gzipped 2015-12-28 17:12:53 -08:00
George Lester 35914b6995 Fixed accidental literal '\0' instead of null terminators 2015-12-28 17:12:52 -08:00
George Lester 5396b7ce9b Ensured hashed extension data is padded to nearest 512 byte chunk. 2015-12-28 17:12:52 -08:00
George Lester 1c57a54bfc Implemented sha1 hashing and extension records (should work, but apk refuses it) 2015-12-28 17:12:52 -08:00
George Lester 339712b558 Implemented checksum rewriting 2015-12-28 17:12:52 -08:00
George Lester 4bb933e76a Removed debug lines from previous commit 2015-12-28 17:12:52 -08:00
George Lester 366d11030a Implemented tar cutting and concatenation 2015-12-28 17:12:52 -08:00
George Lester 3059abe6bf APK control tar implementation 2015-12-28 17:12:52 -08:00
George Lester dec6c122d6 Starting to add apk support, based on deb 2015-12-28 17:12:52 -08:00
Joseph Frazier 604246f649 Don't warn when RPM Epoch isn't set
See https://github.com/jordansissel/fpm/issues/381#issuecomment-162644413
2015-12-23 22:33:02 -05:00
Amos Wenger 64c6416708 deb: explicitly chmod triggers to 0644 for lintian 2015-12-15 15:30:03 +01:00
nervo 1707e72e8e Typo
"...will be labeled asconfiguration files..." -> "...will be labeled as configuration files..."
2015-12-13 21:59:04 +01:00
Stefan Engel 5212683a1c Fix parsing of --description 2015-12-11 12:23:06 +01:00
nervo 087a4b3944 Follow debian systemd packaging guide #2
Oh god, sorry, i did'nt see that systemd unit files are handled two times !

(See: https://github.com/jordansissel/fpm/pull/1040)

If i don't replace this path too, unit files are presents 2 times in the debian package, first in /lib/systemd, second in /etc/systemd

Btw, i suspect another bug, that's a strange behaviour, don't you think ?
2015-12-08 22:44:53 +01:00
nervo 4970b92415 Follow debian systemd packaging guide
According to debian systemd packaging guide (https://wiki.debian.org/Teams/pkg-systemd/Packaging#systemd_unit_files_naming_and_installation), distributed systemd unit files must be located in "/lib/systemd/system", and not "/etc/systemd/system"
2015-12-08 16:22:58 +01:00
Leo P 701c971855 skip auto deps for arch linux package source if no_auto_depends is present 2015-12-03 00:32:17 -05:00
Leo P 3ffb82becc 'group' field may be absent in a pacman package, which prevented a valid build 2015-12-01 15:38:11 -05:00
Jordan Sissel f050c00461 Replace with(obj) { ... } with obj.tap { ... }
Object#tap is a stdlib feature of ruby, and the behavior of my 'with'
block was basically the same, so let's remove one more thing to
maintain.
2015-11-28 13:35:31 -08:00
Jordan Sissel 7d041d600b Remove older style 'with'. I'll use Object#tap in the future. 2015-11-28 13:28:41 -08:00
Jordan Sissel aef4d2aef9 Fix failing test 2015-11-28 13:20:05 -08:00
Jordan Sissel 38bec58061 Fix typo in flag 2015-11-28 13:09:01 -08:00
Terrell Russell e3ceb1d06b grammar 2015-11-24 20:43:35 -05:00
Jens Peter Schroer 500f0c052f fixing merge conflicts 2015-11-17 17:17:47 +01:00
Jens Peter Schroer 62d0060178 let fpm generate the systemd start / stop commands as well 2015-11-17 17:07:26 +01:00
Jens Peter Schroer 8993221ded adding option to add a systemd service file for a package. 2015-11-17 17:06:20 +01: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 cdbfd5f180 Merge pull request #922 from elisiano/master
Add --[no-]cpan-cpanm-force flag to allow passing --force to cpanm
2015-11-07 12:30:50 -08:00
Jordan Sissel 8ab8d1011e Merge pull request #927 from pdaukintis/master
Add more clear description of --directories option
2015-11-07 12:30:18 -08:00
Jordan Sissel 7ec1d18f27 Merge pull request #946 from iwonbigbro/master
Fix file names with closing braces in their name.
2015-11-07 12:29:47 -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
Jordan Sissel 93382dcdb3 Merge pull request #687 from vStone/feature/rpm-custom-requires
rpm: Add a option to insert raw Require statements
2015-11-07 12:01:22 -08:00
Jordan Sissel 78775d05cb Merge pull request #977 from mildred/master
.fpm parsing: separate options and arguments and add FPMOPTS handling
2015-11-07 11:55:28 -08:00
Jordan Sissel 618ddc232a Merge pull request #978 from lepht/patch-1
Clarified tempdir error message
2015-11-07 11:54:25 -08:00
Jordan Sissel c78dbb12a4 Merge pull request #982 from wyaeld/fix-excludes-file
Fix broken behaviour in --excludes-file option
2015-11-07 11:54:10 -08:00
Jordan Sissel fb44e631c0 Merge pull request #986 from mdom/master
Install local module if package is file
2015-11-07 11:53:24 -08:00
Jordan Sissel 1e832cfba0 Merge pull request #994 from glensc/duplicate-arch
remove duplicate :architecture
2015-11-07 11:52:42 -08:00
Jordan Sissel 77170af1a0 Merge pull request #1001 from glensc/rpm-trigger-desc
add rpm internal names as comments
2015-11-07 11:52:13 -08:00
Jordan Sissel 2868ce245c Merge pull request #1008 from liv3d/freebsd_gtar
Change FreeBSD to use gtar
2015-11-07 11:50:43 -08:00
Jordan Sissel fdd02fda12 Merge pull request #1012 from paul-krohn/pypi-extra-index
add support for pypi --extra-index-url
2015-11-07 11:49:27 -08:00
Jordan Sissel 756a912e6c Styling (tab -> spaces) and some reindentation. 2015-11-07 11:39:48 -08:00
Jordan Sissel 0669b0a83b Make the new auto-config-files thing be a positive flag.
Same behavior, but now the attribute is without the 'no' name.
2015-11-07 11:38:12 -08:00
Jordan Sissel 1dab72f321 Merge pull request #1014 from elvido/master
several improvement regarding the handling of Debian Conf file declar…
2015-11-07 11:28:30 -08:00
Paul Krohn d49619cd51 Pull request grooming. 2015-11-07 08:41:36 -08:00
marcteale 8425ab9f77 Update --description in help to display a literal \n instead of a newline. 2015-11-03 10:38:23 -08:00
Daniel Haskin 29280b56ae Use `--xz` in pacman's tar, update Vagrantfile 2015-10-10 12:31:43 -06:00
Daniel Haskin 5d17bbda86 Make specs pass for archlinux 2015-10-08 22:12:05 -06:00
Daniel Haskin 0dc5ec3b78 Style updates 2015-10-08 21:58:59 -06:00
ralf 918f7cd9e5 several improvement regarding the handling of Debian Conf file declaration:
- init-scripts, default and upstart specified as command line option are automatically added as declared debian conf file
  - this behavior can be disabled using "--deb-no-auto-config-file"
  - reordered the process steps during package generation, thus init-script and config-files options can be used in parallel.
    without that fix, you will get an error that the script file can not be found during the processing of the config-files options

All changes are related processing Debian packages and should be backward compatible.
2015-09-23 22:11:44 +02:00
Paul Krohn b56ae04c1b add support for pypi --extra-index-url 2015-09-17 14:38:46 +00:00
Daniel Haskin bcbe7d960c Add compression to pacman 2015-09-16 20:35:06 -06:00
Daniel Haskin 2303eef05c Merge branch 'jsl/master' into feature/arch-support 2015-09-16 19:58:19 -06:00
Dan Offord cc5c926024 Change FreeBSD to use gtar
The FreeBSD version of tar doesn't include the options --owner and
--group among others. Instead change to use gnutar as the default.
This adds a dependency of installing
https://freshports.org/archivers/gtar/ for anyone creating packages
under FreeBSD (similar to doing brew install gnu-tar under OSX)
2015-09-16 17:28:10 +01:00
Jens Peter Schroer f92427dc8a adding flag to trigger systemd service restart after upgrade 2015-09-08 14:10:23 +02:00
Elan Ruusamäe ed8579f64c add rpm internal names as comments 2015-09-07 16:25:06 +03:00
Elan Ruusamäe 10f0cb1814 remove duplicate :architecture
seems slipped in from 9695ee06
2015-08-27 09:40:59 +03:00
Mario Domgoergen c3cf7c8a62 Install local module if package is file 2015-08-20 10:08:00 +02:00
Brad Murray cb6633ca5a change path removal from remove_entry_secure to rm_r
This was necessary because I was getting world writable complaints on /tmp
even though it had 1777 permissions to start with.
2015-08-18 13:48:28 +12:00
Brad Murray 8183db0232 fix excludes being set, its supposed to be on the packages attributes. excludes itself resolves to nil at this point 2015-08-18 13:47:03 +12:00
Brad Murray 0da13a933c fix typo on local variable 2015-08-18 12:48:17 +12:00
petec 423a6bd74d Clarified tempdir error message
Per the [source for ::Dir.tmpdir](http://ruby-doc.org/stdlib-1.9.3/libdoc/tmpdir/rdoc/Dir.html#method-c-tmpdir), these are the actual environment variables that should be checked:

```
    for dir in [ENV['TMPDIR'], ENV['TMP'], ENV['TEMP'], @@systmpdir, '/tmp']
```
2015-08-12 13:52:56 -04:00
Mildred Ki'Lya fd7dd85d6b Read arguments from FPMOPTS environment variable
This allows specifying default arguments that can be overriden by the
.fpm file.
2015-08-11 08:32:55 +02:00
Mildred Ki'Lya 540bafdef7 .fpm parsing: separate options and arguments
Allow arguments in .fpm files, old behaviour put those arguments in the
middle of the command line, and further options were not recognized.
Fix issue #976
2015-08-11 08:32:25 +02:00
Matt Sharpe 0247b382a4 #903 add --rpm-summary flag and tests 2015-08-10 22:56:24 +10:00
Matt Schreiber 6849542ff6 Removed debugging puts metadata.inspect 2015-08-09 21:11:37 -04:00
Matt Schreiber 7f0b3fc2bd Reverted changes that were lost on merge 2015-08-09 21:01:44 -04:00
Jordan Sissel fa0c173f94 Merge pull request #943 from iordanisg/dev-debmetafile
Fixed  deb_meta_file symbol name
2015-08-06 23:09:22 -07:00
Jordan Sissel b2f414c565 Merge pull request #966 from mzaccari/master
Fix minor typo
2015-08-06 23:00:08 -07:00
Philippe Godin 639328eca2 Fix Find.find usage to work under Ruby 1.8.x
Find.find under Ruby 1.8 doesn't return an Enumerable, and we expected
it to do so.

Fixes #963, #975
2015-08-06 22:49:14 -07:00
Michael Zaccari 6768e6f920 Fix minor typo 2015-07-30 10:18:18 -04:00
Jordan Sissel f17a891a1c Version bump 2015-07-26 17:22:46 -07:00
Jens Peter Schroer c0021cbb74 let fpm generate the systemd start / stop commands as well 2015-07-10 17:34:12 +02:00
Jens Peter Schroer f2158f24cb adding option to add a systemd service file for a package. 2015-07-07 14:28:00 +02:00
Jordan Sissel ae9de095dc Merge pull request #692 from adamonduty/rpm_dist
Support RPM dist tag
2015-06-30 10:39:14 -07:00
Craig Phillips d1112c1095 Produce something that works in all cases
I have been testing this escaping all morning on various combinations of file names.  In any single case, the original escaping algorithm works just fine, but in the case you have a file name containing a multitude of glob characters, you can't escape them if the file also contains spaces in the name.  In order to escape the glob characters, the file name can't be quoted (or at least that's the case with the version of rpmbuild I have).  The result is file not found errors.  In the end, the only solution that works consistently with all scenarios I have tested it with, is to replace the spaces with a single glob character match `?`, then escape any other glob characters present in the file name.
2015-06-23 11:38:21 +01:00
Craig Phillips ed73cf3145 Solve escaping problem. 2015-06-23 08:53:21 +01:00
Craig Phillips 93ad86803e Ensure we don't double escape some occurrences. 2015-06-23 06:45:35 +01:00
Craig Phillips 02bae32167 Fix file names with closing braces in their name.
Fixes #945
2015-06-23 06:14:12 +01:00
Jordan Sissel 7d483bbd84 Merge pull request #930 from djhaskin987/feature/697
Feature/697
2015-06-18 20:23:50 -07:00
Lovell Fuller 0b194f4b80 Ensure file permission of control/shlibs
Prevents lintian control-file-has-bad-permissions
2015-06-17 17:00:07 +01:00
iordanisg 60f8db4060 Update deb.rb
Fixing symbol name
2015-06-17 13:39:55 +02:00
Daniel Haskin 82d039c6d0 Remove virtualenv debug code 2015-05-28 23:52:51 -06:00
Daniel Haskin c671c41899 Some more virtualenv polish 2015-05-28 23:44:13 -06:00
Daniel Haskin 8ada949ef7 Move copy_metadata so it can be used in more places 2015-05-28 22:33:49 -06:00
Daniel Haskin 49c40f5cba Add virtualenv to the party 2015-05-28 02:01:34 -06:00
Povilas Daukintis 08cf03405c Add more clear description of --descriptions option 2015-05-27 21:08:16 +03:00
Paul Stengel ae112bf56e Refactor for Ruby 1.8.7 and add spec 2015-05-16 15:32:38 -04:00
Elisiano Petrini 56fa65112b Add --[no-]cpan-cpanm-force flag to allow passing --force to cpanm 2015-05-15 12:14:53 -04:00
Daniel Haskin 89b0b15ff7 Remove erroneously inserted changelog option in pacman 2015-05-09 11:54:49 -06:00
Daniel Haskin bc37e60568 Merge branch 'master' into feature/arch-support 2015-05-09 11:50:56 -06:00
Daniel Haskin 94eb39cc1f Fix ALL the pacman specs 2015-05-09 11:17:57 -06:00
Daniel Haskin ff5b5b8fb2 Fix more pacman tests 2015-05-08 19:59:38 -06:00
Daniel Haskin 9d2c7478d9 Fix the main pacman permissions bug 2015-05-08 17:56:24 -06:00
Matt Sharpe 9055d64fcd make sandboxing non-core modules optional
This adds flag --cpan-sandbox-non-core.

Closes #752
2015-05-07 15:37:13 -07:00
Jordan Sissel eae365b620 Merge pull request #816 from wrigby/unittest2-fix
pyfpm: Fall back to __str__ when encoding package metadata as JSON
2015-05-07 13:52:16 -07:00
Jordan Sissel 6f59bf3d8e Merge pull request #844 from cure/master
Add --python-disable-dependency option to disable specific python dependencies
2015-05-07 13:20:20 -07:00
Jordan Sissel 3bfb7dd64e Merge pull request #828 from gerbercj/feature/sh_metadata
Add package metadata to slug file format
2015-05-07 13:17:31 -07:00
Jordan Sissel e3ba345555 Merge pull request #911 from djhaskin987/feature/empty-output-package
Feature: empty output package target
2015-05-07 12:57:16 -07:00
Daniel Haskin 33b55a8d60 Revert unintentional change 2015-05-06 21:24:50 -06:00
Daniel Haskin b78e36cd26 Add empty as output target for testing purposes 2015-05-06 21:13:48 -06:00
Daniel Haskin 69ef42b31f Add before-install script to sh package type 2015-05-06 20:06:42 -06:00
Adam Lamar e3a8f2f8ef Scope --rpm-dist to rpm.rb 2015-05-06 20:54:51 +00:00
Daniel Haskin ad4e7572d6 Add bogus dependencies test & functionality 2015-05-05 22:10:26 -06:00
Daniel Haskin bd19911025 Add preserve and remove_destination so that permissions can be preserved during copy in pacman 2015-05-05 00:22:53 -06:00
Daniel Haskin 0591af7ab2 Ensure basic unit tests pass for pacman 2015-05-05 00:10:03 -06:00
Daniel Haskin e1aba7898c Fix bugs for pacman support 2015-05-04 23:14:41 -06:00
Daniel Haskin 6136ae409d Add preliminary unit tests for pacman 2015-05-02 21:52:49 -06:00
Daniel Haskin e2661eb8b4 Fix pacman bugs 2015-05-02 18:28:49 -06:00
Daniel Haskin 5182e84db7 Code complete for pacman 2015-05-02 16:18:23 -06:00
Daniel Haskin 27b0d6f226 Fix bugs in pacman input() 2015-05-02 11:47:51 -06:00
Daniel Haskin be35f9532f Merge master into feature/arch-support 2015-04-29 22:56:17 -06:00
Daniel Haskin 3e88390735 Add scripts support to input() 2015-04-29 22:53:21 -06:00
Sven E. Templer 10b011cff9 fixed typo in command.rb 2015-04-26 22:42:58 +02:00
Jordan Sissel 9f9635d2b3 Merge pull request #877 from vincentbernat/fix/debian-etc-in-conffiles
For Debian packages, register files in `/etc` as conf files
2015-04-24 16:47:17 -07:00
Jordan Sissel 8b8a3cec2c Merge pull request #896 from djhaskin987/feature/list-package-types
List loaded package types on the help screen
2015-04-24 16:46:35 -07:00
Jordan Sissel c1c3ce0909 Merge pull request #897 from djhaskin987/feature/deb-scripts-via-input
Feature/deb scripts via input
2015-04-24 16:44:05 -07:00
Andrew Hammond 85a90ffbc3 fix exclude-file to exclude_file issue 2015-04-24 13:35:22 -07:00
Andrew Hammond 71e573a3dc Merge remote-tracking branch 'jal/master' 2015-04-24 13:25:11 -07:00
Daniel Haskin f14ea13697 Move pacman scaffolding comments around 2015-04-22 10:42:32 -06:00
Daniel Haskin fc28024409 Overhaul pacman's input() to use .PKGINFO. Works now 2015-04-22 09:13:58 -06:00
Vincent Bernat 5ecda8ba17 For Debian packages, register files in `/etc` as conf files
When building Debian packages with debhelper, files in `/etc` are
automatically marked as configuration files (this is done since
compatibility level 3 which was introduced in 2000). Therefore, packages
built with fpm may come as a surprise since they don't do that. A user
can still add `--config-files /etc` but they have to know that (usually
after a valuable modification has been erased).

This change add `/etc` to the list of configuration files for Debian
unless fpm is invoked with `--deb-no-config-files`.

Closes: #873
2015-04-15 17:26:17 +02:00
Daniel Haskin 70d3ca586f Merge branch 'master' into feature/deb-scripts-via-input
* Bring the branch into compliance with the master branch
* Fix the bzip2 compression case

Conflicts:
	lib/fpm/package/deb.rb
2015-04-14 23:39:07 -06:00
Daniel Haskin bb151a9b8b List loaded package types on the help screen 2015-04-14 23:14:06 -06:00
Jordan Sissel a3653a71dd Merge pull request #892 from jbcraig/feature/ips
Add support for Solaris 11 style IPS packages using *.p5p format
2015-04-14 08:47:39 -07:00
Jonathan Craig 3b9fe54bd0 Cleaned up the p5p code and revised work-flow 2015-04-14 10:27:03 -04:00
Maxime Caumartin 6550161b91 Remove debugging output when using rpm triggers 2015-04-13 22:56:34 -07:00
Guy Halperin d9c7d1eb4a change deprecated 'File.exists?' to 'File.exist?'
Closes #795
2015-04-13 22:34:59 -07:00
Jordan Sissel 88ec5da177 Strip trailing whitespace
This was accomlished with this sed invocation (OSX):

    sed -Ei "" -e 's/ +$//' {lib,spec}/**/*.rb

(It would be `-r` instead of `-E` on systems with GNU sed)

Anyway. I did this because I'm frustrated folks unintentionally submit
patches with tons of whitespace changes done automatically by their
editor and without confirmation. The whitespace changes make `git blame`
lie, and it also makes doing the code review more difficult. While
Github is capable of showing a code diff that ignores whitespace (via
`?w=1`), that view does not permit commenting on the code change.
2015-04-13 22:32:31 -07:00
Jonathan Craig 9bfa890fa1 Add support for Solaris 11 style IPS packages using *.p5p format 2015-04-10 17:45:18 -04:00
Daniel Haskin 76640b1a26 First whack at translating deb scripts/conffiles into rpm 2015-04-10 00:21:39 -06:00
Matt Schreiber f9d22bb759 PR 853: --[no-]cpan-test now works as advertised
Now '-n' (no test) flag passed to cpanm only if attributes[:cpan_test] is false

Also, added '--installdeps' to cpanm_flags because the target module has
already been downloaded manually, and there shouldn't be any need to
download (and possibly test) it again

Closes #853
2015-04-09 21:52:05 -07:00
Jordan Sissel 25927d5163 Merge pull request #885 from genome-vendor/mcallawa_python_no_wheel
Until python wheel format is supported, tell pip to --no-use-wheel
2015-04-09 21:21:47 -07:00
Daniel Haskin af6f769e96 Some up-touches to pacman's input() function 2015-04-09 22:04:17 -06:00
Ranjib Dey 4c41f1e8fb Nothing can be found in PATH if its not set 2015-04-07 17:50:30 -07:00
Matt Callaway faf75e3962 Until python wheel format is supported, tell pip to --no-use-wheel. See https://github.com/jordansissel/fpm/issues/587. 2015-04-07 18:37:37 -05:00
Daniel Haskin 09d4c2f129 More of input() for arch 2015-03-24 22:22:55 -06:00
Daniel Haskin c5305d4faf Partially complete the input() pacman function. 2015-03-21 22:30:22 -06:00
Daniel Haskin 2882ac8639 adding pacman support: get the help page to print 2015-03-21 11:27:49 -06:00
Daniel Haskin 8541c53d6a Skeleton for adding pacman support 2015-03-21 11:16:12 -06:00
Daniel Haskin 3ebaa42cfc Whitespace; spelling; gitignore for emacs 2015-03-21 11:15:10 -06:00
Daniel Haskin b19cc5d9ca Merge branch 'master' of github.com:jordansissel/fpm into feature/arch-support 2015-03-21 11:10:20 -06:00
Ward Vandewege 04804f672c Add tests for python dependency manipulation. Also switch
spec/fixtures/python/setup.py from distutils to setuptools.
2015-03-14 21:02:16 -04:00
Ward Vandewege 386e5eeca5 Add --python-disable-dependency option to disable specific python
dependencies.

This is useful for example in the case of a dependency on the python
PyYAML package.

By default, this dependency gets translated to a debian package
dependency on python-pyyaml. That package does not exist on Debian
systems, so a way to override the dependency is needed.

A similar option exists already for gems (--gem-disable-dependency).
2015-03-14 09:38:58 -04:00
Jamie Lawrence 2d9eb67b34 Add command line flag for --exclude-file. 2015-03-13 15:21:37 -07:00
Jamie Lawrence 4aada0e02f Add commandline flag for --exclude-file to support a file listing exclude patterns. 2015-03-13 14:27:46 -07:00
Jordan Sissel 58878e9ccd Mark unused variable 2015-03-06 07:37:20 -08:00
Jordan Sissel 82a5f8a094 Cleanup regardless of log level
There is now a --debug-workspace flag to choose when not to do cleanup.

Seems related to #829, but I'm not sure.
2015-02-25 23:22:46 -08:00
Jordan Sissel be9b8837b2 Add better error message
Should help improve #586 by giving a better error message
2015-02-25 23:06:18 -08:00
Timothy Sutton 244d223650 Default to HTTPS for --python-pypi URL
- this is the default for both pip and easy_install
2015-02-25 10:28:12 -05:00
Pete Fritchman 0de9c3aa0c symlinks need full dest path for FileUtils.copy_entry 2015-02-24 12:45:23 -05:00
Chris Gerber ccc0d9075c Add some basic specs for the SH package 2015-01-28 15:02:33 -05:00
Daniel Haskin 665da1d5ff Add arch to the vagrant file (initially); Add preliminary arch stuff in
the main help page.
2014-12-25 18:47:10 -07:00
Jordan Sissel a615c1e9dc Version bump 2014-12-11 22:25:42 +00:00
Jordan Sissel 441eac5a4a Extend the NPM class with FPM::Util to give it safesystemout.
Fixes #806 and #800
2014-12-11 21:53:56 +00:00
Will Rigby 7e4d4af64f Fall back to __str__ when encoding package metadata as JSON
This is a fix for finicky packages like unittest2 that pass
non-string parameters for version into setup(). If the JSON module
doesn't know explicitly about the type, it will raise a TypeError.
In this case, we check if the object's class has a __str__ method
defined, and if so, just encode the object as a string.
2014-11-20 11:27:58 -05:00
Maximilien Riehl 0654f0ceb1 fix missing option name
The message doesn't make sense without the option name.
2014-11-18 13:07:06 +01:00
Ted Elwartowski dd89eeb238 Verify if RPM triggerindex is valid 2014-11-06 15:05:16 -06:00
Jordan Sissel a6ed72172a Update changelog and bump version 2014-11-05 00:33:25 +00:00
Jordan Sissel 2e84787142 When converting deb to deb, respect any changelog file found 2014-11-05 00:31:53 +00:00
Jordan Sissel 1e7390c54e Version bump and update changelog 2014-11-04 23:44:35 +00:00
Matteo Panella 689fc8e068 Fix md5sums generation for deb packages
The md5sums control file must be formatted exactly as it would be
produced by a run of md5sum (MD5, two spaces, file path). Failing to do
so breaks dpkg --verify.
2014-11-04 10:48:10 +01:00
Ashish Kulkarni 1eb0c4f8af use maximum compression level for RPMs compressed with XZ
This can reduce the package size considerably.
2014-10-30 14:35:51 +05:30
mriehl 30ff647510 fix typo in python packaging usage 2014-10-28 11:39:43 +01:00
Jordan Sissel e62a44f530 Version bump 2014-10-25 21:54:31 +00:00
Josh Dolitsky 5eb6f5796b adding --rpm-init option (fix) 2014-10-25 05:41:42 +00:00
Josh Dolitsky 8b3c2e54f9 adding --rpm-init option 2014-10-25 05:41:42 +00:00
Maxime Caumartin 8d38574b7e Add input and output rpm trigger support
This adds several rpm-specific flags:

--before-install
--after-install
--before-uninstall
--after-target-uninstall

Fixes #626 (merged by hand)
2014-10-25 05:36:37 +00:00
Jordan Sissel a04a3bcb9a Move from @logger ivar to logger method.
Tests pass. Hope is all we have. And hugs.
2014-10-25 05:28:16 +00:00
Jordan Sissel f362fad65e Merge pull request #760 from malinoff/patch-1
Missing space in help
2014-10-24 22:19:27 -07:00
Jordan Sissel fa09b6aeec Merge pull request #765 from shrijeet/master
Stat the link itself instead of file it refers to
2014-10-24 22:18:11 -07:00
Jordan Sissel 9d92528875 npm: Set :prefix default to `npm prefix -g`
Fixes #758 (I hope)
2014-10-25 05:12:23 +00:00
Jordan Sissel d0d9f0b199 Start moving towards `logger` method instead so it's easier to handle
initialization.
2014-10-25 05:12:06 +00:00
Grantlyk df56dcc01f Adding validation to stop debian users entering names with spaces
Fixes #779
2014-10-25 04:51:53 +00:00
Jordan Sissel c6f66dd024 deb: Always provide a "changes" file
lintian in Ubuntu 14.04 now errors when a file
/usr/share/NAME/changelog.Debian.gz doesn't exist.

In the spirit of respecting lintian's meaningful errors, this commit
fixes that error.

The new behavior is that a changelog file is *always* provided. If the
--deb-changelog flag is not given, then fpm will produce a default one
based on the package being built in hope that it satisfies lintian.

With this commit, the lintian rspec test passes on Ubuntu 14.04.

Fixes #784
2014-10-25 04:07:46 +00:00
Jordan Sissel 0045f0095a Don't follow symlinks when copying files.
Added test coverage to ensure a broken symlink doesn't throw a ENOENT
error. The test was written first, and failed, but now passes with the
fix to the dir package.

Fixes #658
2014-10-25 01:39:42 +00:00
Jordan Sissel c4219ad406 Merge pull request #787 from djhaskin987/feature/786
Check first for Build.PL, then for Makefile.PL
2014-10-16 11:48:46 -07:00
Jordan Sissel 1d295e5db5 Merge pull request #772 from djhaskin987/feature/661
Feature/661
2014-10-16 11:47:06 -07:00
Daniel Jay Haskin 7977e2323c Check first for Build.PL, then for Makefile.PL 2014-10-16 10:00:31 -06:00
Jordan Sissel 8a29dd5ea0 Add --log=xxx support
Supported log levels: error, warn, info, debug.

--verbose is the same as --log=info
--debug is the same as --log=debug
--log=warn is the default

Requested by mattgreenrocks on irc.
2014-10-15 18:29:42 +00:00
Jordan Sissel 7ff5c52fc1 Merge pull request #763 from mlafeldt/strip_perllocal_pod
CPAN: Fix stripping of perllocal.pod if cpan_perl_lib_path is set
2014-10-06 16:11:35 -07:00
Daniel Haskin 6ad6767844 Pass other scripts through 2014-09-19 07:10:51 -06:00
Daniel Haskin 53c4b51d0b Grammar, contributions 2014-09-19 06:53:41 -06:00
Daniel Haskin 5b07133a1c Add debian upgrade functionality 2014-09-18 07:24:37 -06:00
Daniel Haskin dc2a6dfcc8 Add help page first. 2014-09-11 18:08:46 -06:00
Shrijeet Paliwal e69b561cb6 Stat the link itself instead of file it refers to
If path is a symbolic link and target doesn't exist, we may incorrectly through
file not found exception. This changes fixes the issue by using File.lstat to
stat the path.
2014-09-03 21:50:48 -07:00
Mathias Lafeldt ccb4935c87 CPAN: Fix stripping of perllocal.pod if cpan_perl_lib_path is set
For example, if cpan_perl_lib_path is set to "/usr/share/perl5", all
packages created with fpm will contain this file:

    /usr/share/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod

The current code only works if cpan_perl_lib_path is undefined.

Also see #443 and #510.
2014-09-03 17:07:59 +02:00
Dmitry Malinovsky c6eb7d92fe Missing space in help
```
    --no-depends                  Do not list any dependencies in this package (default: false)
    --no-auto-depends             Do not list any dependencies in thispackage automatically (default: false)
```
2014-08-22 12:17:27 +07:00
Paul Stengel 578b26cf83 Add RakeTask 2014-08-13 15:44:26 -04:00
Jordan Sissel b2e4dbb118 Raise a hopefully-informative error if cpan author data is unexpected. 2014-08-01 05:22:20 +00:00
Leon Weidauer 7ca48dc7e9 Added type checks for cpan authors 2014-07-30 18:20:56 +02:00
Jordan Sissel 81ebfdd7ed version bump 2014-07-25 14:40:27 +00:00
Jan Vansteenkiste a49084b7c4 rpm: Add a option to insert raw tag statements
This can be useful to have requirements for different stages.

Examples:

    --rpm-tag 'Requires(post): /usr/sbin/alternatives'
    --rpm-tag 'Requires(preun): /usr/sbin/alternatives'
2014-07-25 08:15:07 +02:00
Jordan Sissel 4c17e1c048 Merge pull request #688 from vStone/bugfix/fix_version_bins_with_no_bins
Fixes an issue where gem-version-bins is enabled but there are no binaries
2014-07-24 12:06:07 -07:00
Jordan Sissel 06a4c45ac8 Skip if plugin not defined or the directory is empty 2014-07-24 18:49:06 +00:00
Jordan Sissel f6379e02a7 Merge pull request #695 from dwb/triggers
dpkg arbitary meta files and triggers
2014-07-24 11:36:55 -07:00
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 cab372b620 Merge pull request #708 from brimstone/patch-1
Cleaned up description for --workdir
2014-07-24 11:28:45 -07:00
Jordan Sissel 7b9a93fce8 Merge pull request #719 from leslieianson/master
Specify %attr directive on a per-file basis
2014-07-18 20:48:45 -07:00
Jordan Sissel c31f1e3970 Merge pull request #734 from jordansissel/add-debug-workspace
Add --debug-workspace
2014-07-10 08:19:42 -07:00
Jordan Sissel 7649dc3a24 Merge pull request #727 from dknecht/master
Don't install dependencies when using pip to download python packages
2014-07-10 08:17:56 -07:00
Jordan Sissel 931cebbeb2 Show full input path if it can't be found.
Before: Cannot package the path 'pganalyze-collector', does it exist?
After: Cannot package the path './build/pganalyze-collector', does it exist?
2014-07-10 15:06:14 +00:00
Dane Knecht 855b0128ce Don't install dependencies when using pip to download python packages 2014-06-22 17:08:24 -07:00
Jordan Sissel 2bf6d8c118 Add --debug-workspace
Avoids Package#cleanup calls and also prints the paths, if not empty, of
any build or staging directories used for input or output.

Fixes #720
2014-06-19 06:17:37 +00:00
Jordan Sissel 81996fb5da Make rpmbuild's _tmppath respect fpm --workdir
Fixes #714
2014-06-19 06:04:21 +00:00
Jordan Sissel 9ae5c753b6 Merge branch 'pr/693' (from #693 + typo patch fix) 2014-06-19 05:59:39 +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
Jordan Sissel fbb1c2fcb7 Merge pull request #712 from mlafeldt/cpan-metadata-nil
Ignore unset CPAN metadata fields
2014-06-17 23:43:17 -07:00
Jordan Sissel cde01bc731 Add --rpm-verbatim-gem-dependencies flag
This should help folks who want the old-style gem-rpm conversions
* with this flag, old behavior: rubygem-name
* without flag, default behavior: rubygem(name)

The 'default' behavior has been this behavior since 0.4.23 for most
users.
If you changed the package name prefix via --gem-package-prefix or
--gem-package-name-prefix then this behavior was broken.
It was fixed in #585.

But, I don't want folks relying on old behavior to be screwed
when that behavior mysteriously vanishes! This should be a good
enough work around for now.

Reported by Ryan Doherty via the fpm-users mailing list.
2014-06-18 05:46:16 +00:00
Jan Vansteenkiste f3d1efa32f Fix file permissions on deb control files 2014-06-10 08:21:04 +02:00
Jan Vansteenkiste 563af31e39 Fixes an issue where gem-version-bins is enabled but there are no binaries 2014-06-10 08:19:49 +02:00
Alan Ivey 3f3b031b24 Fixes jordansissel/fpm#707
With rpms, if `--architecture` and `--rpm-os` are specified and
different than the host, `--target` would be passed to `rpmbuild` twice,
causing an error.

Example: an OS X host (`uname -s` = "Darwin") with x86_64 architecture
building for `--rpm-os linux` and `--architecture noarch`.

This change only adds `--target` to the `rpmbuild` args once, fixing
this specific error.
2014-06-09 12:32:31 -04:00
vagrant 196aa13899 naive implementation of rpm %attr directive 2014-06-09 04:47:08 +00:00
Mathias Lafeldt c1034fbd68 Ignore unset CPAN metadata fields
Otherwise this can happen:

    $ fpm -t deb -s cpan --verbose 'Lingua::JA::Romanize::Japanese'
    Asking metacpan about a module {:module=>"Lingua::JA::Romanize::Japanese", :level=>:info}
    Downloading perl module {:distribution=>"Lingua-JA-Romanize-Japanese", :version=>nil, :level=>:info}
    Setting package name from 'name' {:name=>"Lingua-JA-Romanize-Japanese", :level=>:info}
    /usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/lib/fpm/package/cpan.rb:86:in `input': undefined method `join' for nil:NilClass (NoMethodError)
	    from /usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/lib/fpm/command.rb:299:in `block in execute'
	    from /usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/lib/fpm/command.rb:298:in `each'
	    from /usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/lib/fpm/command.rb:298:in `execute'
	    from /usr/lib/ruby/gems/1.9.1/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
	    from /usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/lib/fpm/command.rb:449:in `run'
	    from /usr/lib/ruby/gems/1.9.1/gems/clamp-0.6.3/lib/clamp/command.rb:125:in `run'
	    from /usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/bin/fpm:8:in `<top (required)>'
	    from /usr/bin/fpm:23:in `load'
	    from /usr/bin/fpm:23:in `<main>'
2014-06-02 12:28:57 +02:00
Matt dc239f6fcf Cleaned up description for --workdir
Added spaces so words didn't run together.
2014-05-20 10:34:19 -04:00
Tom Duckering c5a2ad35d4 Merge branch 'master' of https://github.com/jordansissel/fpm 2014-05-06 12:41:45 +01:00
Jan Vansteenkiste 8bce46ecfd Fixes pessimistic constraint conversion
See jordansissel/fpm#693
2014-05-02 14:26:05 +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
Jan Vansteenkiste 86ef7fcf1e This fixes an issue introduced in afb0dce2
If no package name was given, fpm bailed out.
2014-04-30 18:32:49 +02: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 cf250b2c7e Check for both simplejson and json at the same time.
This avoids accidentally failing simply because 'simplejson' isn't
available (but 'json' might be, but we aborted too early)

This fixes tests broken by the previous commit.
2014-04-23 12:05:14 -07:00
Jordan Sissel e11c808f55 Fix error checking for python json & pkg_resources
I forgot safesystem() raises an exception when it fails.

Now, if users have a python that is missing a feature we need in order
to have fpm build a package, you'll get an error like this:

      Your python environment is missing json support (either json or simplejson python module). I cannot continue without this.  {:error=>#<FPM::Util::ProcessFailed: /bin/bash failed (exit code 1).  Full command was:["/bin/bash", "-c", "/opt/my-py24/bin/python -c 'import simplejson'"]>, :python=>"/opt/my-py24/bin/python", :level=>:error}
      Process failed: Python (/opt/my-py24/bin/python) is missing simplejson or json modules. {:level=>:error}

This is for #664
2014-04-23 11:54:02 -07:00
Jordan Sissel 60dd5284e8 Attempt to provide better error messages for busted python environments.
This aims to help with #644 where we cannot get python package metadata
without having json and setuptools available from the python program
we are invoking.
2014-04-22 22:50:29 -07:00
Jordan Sissel 908c29ea84 Merge pull request #677 from vStone/feature/rename-gem-bin
Rename bins with version appended
2014-04-22 18:19:45 -07:00
Jordan Sissel 179f3dc2bb Call it --gem-disable-dependency (#598) 2014-04-23 01:18:27 +00:00
Jordan Sissel 9a6b771aa0 Merge pull request #598 from someword/master
Add --gem-disable-dependencies flag to allow for excluding one or more dependencies
2014-04-22 18:16:16 -07:00
Jordan Sissel 4a6e7b3acb Merge pull request #676 from robkinyon/rpm_arch
Fixes for RPM and --architecture
2014-04-22 17:46:38 -07:00
Jordan Sissel 6eeebd9b0e Add special handling for `fpm --version`
Because --version is a valid flag (for setting the package version)
but is also commonly used to ask an application what version it is,
we need a bit of special handling for `fpm --version`:

New result:

    % fpm --version
    1.1.0

Prior to this patch, `fpm --version` would tell you that you were
missing arguments or flags.
2014-04-22 19:09:11 +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
Jan Vansteenkiste 7fa158857d Rename bins with version appended 2014-04-18 13:41:38 +02:00
Rob Kinyon 68d502592a Use --target to specify the architecture. 2014-04-17 20:28:06 -04:00
Remi Hakim 2ba425f4bd Fix specs for new rpms scripts support 2014-04-14 15:32:38 +02:00
Remi Hakim 487df5a192 Move rpm specific packages scripts to a more adequate location 2014-04-14 15:25:25 +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
Jordan Sissel 489e0bd990 Merge pull request #648 from samcrang/lintian_integration_tests
Lintian integration tests
2014-03-25 22:29:28 -07:00
Jordan Sissel 6b64fad27b Merge pull request #651 from gerbercj/feature/sh_package
Add a self-extracting sh package type implementation
2014-03-25 21:58:30 -07:00
Remi Hakim abdbbf9a18 verify_script => verifyscript 2014-03-18 11:04:00 -04:00
Remi Hakim 179232d3c2 Fix bad syntax 2014-03-18 11:02:03 -04:00