Commit Graph

250 Commits

Author SHA1 Message Date
Remi Hakim 7a988d3205 Pass the proper keyword for verify script 2014-03-14 16:56:55 -04:00
Remi Hakim e7d7755d00 First pass at adding support for rpm "verify" script 2014-03-14 16:44:07 -04:00
Chris Gerber df0e1589c4 Only set RELEASE_ID if it is passed in as a template variable 2014-03-11 00:40:07 -04:00
Chris Gerber 76d93fca9b Fix FORCE variable handling; add post install logging 2014-03-11 00:40:07 -04:00
Chris Gerber d8c27b4dde Add a self-extracting sh package type implementation 2014-03-11 00:40:04 -04:00
Jordan Sissel 6e147c3e28 Merge pull request #528 from cdodd/master
Fixed typo in spec file template
2013-10-22 21:24:15 -07:00
Pranay Kanwar 3c7e0810b7 Move staging to BUILD copy logic from template to library 2013-09-14 08:27:41 -07:00
Craig Dodd 8320b1b39c Fixed typo in spec file template 2013-08-19 16:46:55 +01:00
Adam Stephens 040ae1832a rpm config files can and should contain attributes 2013-07-05 09:32:05 -04:00
Tray Torrance 59e7fb3f37 Add support for setting build-depends on debian targets 2013-05-23 12:31:07 -07:00
Jordan Sissel a27292fbb4 Merge pull request #428 from phrawzty/defattr
add args for controlling rpm %defattr
2013-05-07 09:59:12 -07:00
Jordan Sissel dd54ded77a - send a message to folks editing the rpm spec that I welcome them to
file whatever feature requests are necessary to avoid them needing to
  edit the rpm spec ever again ;)
2013-05-07 09:32:45 -07:00
phrawzty 89ec9715c2 add args for controlling rpm %defattr 2013-05-07 14:40:04 +02:00
Jordan Sissel dd343cc77e - fix test breakages after #422 2013-05-07 00:02:04 -07:00
Adam Stephens 2fbafe6fb2 fix typo in RPM template 2013-05-02 21:22:21 -04:00
Adam Stephens 997c91b2d2 add RPM flags for AutoReq and AutoProv; add RPM macro support for %filter_from_provides and %filter_from_requires 2013-05-02 16:53:04 -04:00
Adam Stephens 7ecd44b214 add --rpm-autoreqprov flag to enable AutoReqProv in RPM spec 2013-05-02 14:10:20 -04:00
Pranay Kanwar b00ade0bc8 Do no generate empty prefix 2013-04-22 11:12:33 +05:30
Pranay Kanwar ebb294acab #353 Remove trailing slash from prefix 2013-04-17 21:40:46 +05:30
Pranay Kanwar 991ab604de #413 Fix name for directories and config files 2013-04-17 21:11:29 +05:30
Pranay Kanwar f4906879ca Auto add directories for rpm 2013-04-17 20:19:01 +05:30
Jordan Sissel 79c2f8ef58 - fix_dependency on Conflicts and Breaks (#410)
- add test coverage for #410
2013-04-11 10:12:53 -07:00
Jordan Sissel 93f132a7f5 - add ldconfig template 2013-04-09 04:55:48 +00:00
Jordan Sissel 3726868ce2 - Represent '!=' version deps as Breaks, not Conflicts (#400) 2013-04-05 10:21:03 -07:00
Jordan Sissel 263a579fd4 - fix breakage in ruby 1.8.7 2013-03-21 15:38:31 -07:00
Jordan Sissel 6db0940ec5 - rename 'output_file_line' -> 'rpm_file_entry'
- fix spec generation
- some style cleanup
2013-03-21 15:37:11 -07:00
rhodesp 12470d523e Updates to support --rpm-use-file-permissions 2013-03-06 18:28:14 +00: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 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 04a876d785 Merge pull request #310 from r4um/fix_285
Add debian Recommends and Suggests
2013-01-02 15:58:47 -08:00
Pranay Kanwar 1c7a1fcc2b Parse and fix dependencies if required 2012-12-21 23:57:29 +05:30
Pranay Kanwar 9171ae1e17 * Fix #319 Add Debian Predepends. 2012-12-21 23:47:14 +05:30
Pranay Kanwar 2f3c22e086 Add debian Recommends and Suggests 2012-12-07 18:33:19 +05:30
Jordan Sissel f2825efea0 Merge pull request #301 from r4um/fix_295
Fix #295 Add multiple provides correctly
2012-12-07 00:20:52 -08:00
Jordan Sissel bb48efe373 Merge branch 'changelog_support' of https://github.com/r4um/fpm into r4um-changelog_support
Conflicts:
	lib/fpm/package/rpm.rb
2012-12-07 00:17:40 -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
Pranay Kanwar ba081ac1d2 Add multiple provides correctly 2012-11-29 18:23:35 +05:30
Pranay Kanwar 233034147b Add deb and rpm changelog support 2012-11-29 13:28:54 +05:30
exoadmin 1f7bd57501 Restore solaris package building
I'm not sure all cases are correctly handled but
previously no package at all would be built
2012-11-28 11:17:25 +01:00
Pranay Kanwar 08d650ca2c Fix #276 Don't add empty URL 2012-11-27 17:41:13 +05:30
Justin Ellison 9de9a7d8b2 Forgot to prepend the class 2012-11-26 18:20:04 -06:00
Justin Ellison 5a264412bc Include subdirs of --directories option as %dir directives in SPEC files 2012-11-26 18:13:39 -06:00
Brett Gailey da5c5aceac Adding feature: --no-depends flag for deb and rpm 2012-11-14 17:28:05 -08:00
Brett Gailey 4c1d3e3c70 Feature: no-depends option for deb and rpm 2012-11-14 14:29:07 -08:00
Andrew Bunday d52f249afe Very minor edit. Fixing an incorrectly escaped comment in the deb erb
template file. (added '-' to the end tag).

Without the edit, the template was inserting an extra blank line into the
config file. When dpkg/reprepro try to read the file the blank line is
interpreted as the end of the configuration, and the additional lines
below it cause an error.

With the edit, no additional blank line is inserted. The comment is
correctly escaped.

Signed-off-by: Andrew Bunday <andrew.bunday@gmail.com>
2012-11-09 14:58:06 +00:00
Jordan Sissel f5d1da9df3 Merge pull request #260 from ajf8/rpm-directories
issue 245 (RPM's with non-root owners doesn't set ownership of directori...
2012-11-08 12:08:43 -08:00
Jordan Sissel 3b0aeccb7c - fix #280 and hae a test verify it. 2012-10-26 10:37:37 -07:00
Jordan Sissel ee72521b30 - deb provides don't support versions (#280) 2012-10-26 10:30:43 -07:00
John Wittkoski 9968df872f Escape percents in filenames in %install section 2012-09-25 12:19:35 -04:00
John Wittkoski 75aed37386 Replace % with [%] to make rpm not expand macros 2012-09-25 10:43:07 -04:00
Alan F f34e56ceeb issue 245 (RPM's with non-root owners doesn't set ownership of directories). Add a --directories argument, which in a similar way to --config-files allows directories to be tagged as directories, meaning they are owned by the RPM. This means they get the --rpm-user and --rpm-group as their owners, and they are removed with the RPM. 2012-09-11 09:23:40 +01:00
Jordan Sissel 5324ccc986 - Add --deb-priority (#232) 2012-08-25 04:10:51 -04:00
Jordan Sissel 807276c6ab Force dependency fixings (improves on #250) 2012-08-24 15:47:02 -07:00
Jordan Sissel 96bce8c4e9 Replace newlines with spaces in the 'license' field of RPM. (#252) 2012-08-24 13:52:09 -07:00
Jordan Sissel 15c9effdac Refactor pre/post/etc scripts to be a loop instead of each section by themselves 2012-08-07 10:48:40 -07:00
Jordan Sissel 3fc1f58d72 - support templating package/maintainer scripts (#246)
- include test coverage
2012-08-07 10:25:13 -07:00
Jordan Sissel b7a10f72e3 Try escaping '?' 2012-08-05 23:24:38 -07:00
Jordan Sissel aec08417ae - fix up rpm relocatability support 2012-07-24 19:33:31 -07:00
Jordan Sissel 6b7f4c59b9 - fix some failing tests introduced by #230 (regression check on quoted
filenames, etc)
- Prefer File.join() when joining paths
2012-07-21 20:49:42 -07:00
Jordan Sissel 81baf8371e Merge pull request #230 from jkoppe/master
Make rpms relocatable by respecting fpm's --prefix appropriately.
2012-07-21 20:44:52 -07:00
Jordan Sissel 1768a45905 Vendor tag is optional. Omit it if nil/empty 2012-06-19 12:26:12 -07:00
Jason Koppe 7716399445 make --prefix work with rpm output files 2012-05-29 15:17:37 -05:00
Jason Rogers fb19626b90 add setting for RPM user and group attributes in the %files section 2012-04-18 11:54:06 -04:00
Jordan Sissel 92a3b754e2 Merge pull request #194 from lum/master
Adding the noreplace option to config files in the rpm spec template.
2012-04-13 08:53:55 -07:00
Jordan Sissel fa7ad0d3be - Escape '*' and '[' in the rpm files list to keep rpm from trying to
use it as a glob. Fixes #202
2012-04-10 16:12:40 -07:00
Jordan Sissel 16cfe76149 Escape filenames during the install process. Fixes #196 2012-04-02 13:11:23 -07:00
Steve Lum 8ab1a911b1 Adding the noreplace directive for files marked as configuration files.
This prevents the rpm install/update from overwriting local
modifications to config files.
2012-04-01 20:13:07 -07:00
Jordan Sissel d5883006f2 - Specify BuildRoot in the rpm spec to work around some kind of
bug/problem causing rpmbuild to use "/" as the BuildRoot on CentOS 5.
  Fixes #191. Confirmed working on CentOS 5.7 in a vm.
2012-03-30 10:38:26 -07:00
Jordan Sissel 370d82779b - Add --rpm-digest and --rpm-compression flags to allow selectable
digest/compress algorithms during package building. Defaults to the
  settings that are most likely to work on the widest range of rpm
  consumers (md5 + gzip)

  Improves solution already committed for #192
2012-03-29 19:23:25 -07:00
Jordan Sissel 620e5317cd - Tell rpm to use gzip for compression and md5 for checksums
This should fix #192 and allow rpms to be built on newer redhat
  distributions that function on older ones.

  Huge thanks to @katzj for explaining the format of the
  %_binary_payload macro.
2012-03-29 19:03:45 -07:00
Jordan Sissel 8dc78a72f3 Fix up rpm file listing now that FPM::Package#files is smarter 2012-03-26 12:13:37 -07:00
Aleix Conchillo Flaque a696559cbf fix issues when packaging links in dir package and rpm template
* lib/fpm/package/dir.rb: File.directory? returns true if source is a
  link to a directory. This is not the desired behavior, a link should
  be kept as a link, whether it is a link for a file or a directory.

* templates/rpm.erb: check whether we are copying a link, if so, only
  copy the link not a new file.

  For the same reason as lib/fpm/package/dir.rb, links to directories
  were rejected. So, do not reject links to directories.
2012-03-20 18:49:22 -07:00
Jordan Sissel 11e0af41b1 fix package scripts for rpm 2012-03-18 22:56:34 -07:00
Jordan Sissel 3e3a04c1bf Add specs to verify rpm conflicts and provides 2012-03-16 15:37:05 -07:00
Jordan Sissel b9db81a0a0 - fix %config support in rpm 2012-03-15 00:54:42 -07:00
Jordan Sissel 4158e8f063 - Fix #164 2012-03-08 18:02:35 -08:00
Jordan Sissel b0b62d4eee - found another thing we may want to disable in rpmbuild 2012-03-08 16:07:26 -08:00
Jordan Sissel cd87f0a42d - Add installed-size
- thin out some older and unused conditions
2012-03-08 13:30:59 -08:00
Jordan Sissel 72ce5a9b8c - hand-merge 4e2f350ae1 from master. 2012-03-02 02:14:33 -08:00
Jordan Sissel b78bd520f2 - get a bare minimum deb output working 2012-03-02 02:13:01 -08:00
Jordan Sissel 0826b44468 - Get things together enough that this works again:
fpm -s dir -t rpm -d "zsh" -n testing ~/.zshrc
- Move to using clamp instead of optparse
2012-03-01 23:17:38 -08:00
Jordan Sissel 4f281d66c3 - disable all the dumb stuff (like brp-repack-jars, library stripping,
etc) rpmbuild does by default. FINALLY.
- improve the spec to behave correctly with the new package api.
2012-02-29 17:15:57 -08:00
Pieter Loubser 9c10b60e1b - Updated builder to include license and vendor
- Moved vendor data in debian erb
2012-02-18 17:18:07 +00:00
Pieter Loubser 72579f3389 - Added license meta data to packages
- Added vendor meta data to packages
2012-02-18 16:43:15 +00:00
Daniel Simmons d1e6c1735e Add maintainer value (packager) RPM spec file in RPM target. 2012-02-07 11:38:49 +00:00
Rajat Vig 7916673aa7 fixed the error in the template 2011-12-21 00:35:33 +05:30
Rajat Vig 39c07adf11 fixed the failures on sprockets, faraday, polyglot and sinatra 2011-12-21 00:15:40 +05:30
Devon Peters efbc9e2db6 enable setting BASEDIR for Solaris packages, via --prefix 2011-12-09 11:57:41 -08:00
Oliver Hookins 8afaa2fc67 Pull path mangling logic out of template and correct it. 2011-11-24 23:44:05 +01:00
Oliver Hookins b04ba73dfc Allow RPM generation to specify configuration files. 2011-11-24 00:15:33 +01:00
Indra Talip e85e7d7724 prevent rpmbuild from repacking jar files
brp-java-repack-jars can have issues repacking jar files when the filenames are too long so stop repacking the jar files.
2011-11-23 20:48:51 +11:00
Jordan Sissel 252bd4b9de - move build to install for rpm 2011-10-11 23:59:58 -07:00
Jordan Sissel 117ee5011a Merge pull request #81 from bernd/master
Add deb Pre-Depends support
2011-08-19 18:19:56 -07:00
Jordan Sissel 280ac5c29e - add better condition on gem hacks 2011-08-19 18:17:09 -07:00
Jordan Sissel 0099cca79a - add bugfix for issues/87 - this is mostly a temporary hack until some
major refactoring gets into fpm.
2011-08-07 23:36:53 +00:00
Bernd Ahlers 90d6f1a1f4 Add support for deb Pre-Depends. 2011-07-26 19:18:25 +02:00
Jordan Sissel dfc06b6bcc - simplify 2011-07-08 15:48:13 -07:00
Jordan Sissel a5571f0ccf Merge branch 'bugs/deb-description-fix' 2011-07-08 00:48:55 -07:00
Jordan Sissel 12e990de51 - cleaner
- fix typo
2011-07-08 00:43:31 -07:00
Jordan Sissel 8a1b1c5dbc - fix deb descriptions for good? 2011-07-08 00:39:00 -07:00
Aman Gupta 351e791ecd fix missing newline in Provides 2011-07-08 00:34:29 -07:00
Aman Gupta 8ddf448742 Merge remote-tracking branch 'origin/master' into brew2deb-backports
Conflicts:
	lib/fpm/target/deb.rb
2011-07-07 23:57:48 -07:00
Aman Gupta ffc007d9c0 Fix erb line endings 2011-07-07 23:17:04 -07:00
Aman Gupta 92e8cb9dcc removed all trailing whitespace: for i in $(git ls-files); do sed -i tmp -e "s/ *$//" $i; done 2011-07-07 22:52:55 -07:00
Aman Gupta b077dd646b Add support for debian conflicts 2011-07-07 22:29:16 -07:00
Aman Gupta c6684c6b3c remove extra whitespace after Section name 2011-07-07 22:29:02 -07:00
Jordan Sissel 8512dcd66a - patch from alcy for https://github.com/jordansissel/fpm/issues/61 2011-06-27 18:48:58 -07:00
Andrew J Cosgriff e86fa243cf remove bogus whitespace from debian template - it'll break a debian Packages file if it ends up in there 2011-06-28 11:12:59 +10:00
Jordan Sissel 4db6f46088 - some code cleanup
- source rpm => target puppet works now
2011-06-20 23:00:18 -07:00
Jordan Sissel 553e01aa2f - previous commit missed some files; adding features to allow generating
multiple files from 'specfile' phase.
2011-06-20 19:33:27 -07:00
Jordan Sissel 710fe90df0 - refactor to allow package targets to override generate_specfile so
puppet target can write multiple files (::package class and anticlass).
2011-06-20 19:26:43 -07:00
Jordan Sissel 91918e0a3d - Patch from jpluscplusm to work around misfeatures in debian's control
file regarding multiline descriptions.
2011-06-20 16:58:53 -07:00
Jordan Sissel 64c28c41eb - seems to work. Missing a few features, but it works :) 2011-06-19 00:17:49 -07:00
Jordan Sissel 6799962f5d - convert to using the (still undocumented) ERB "explicit line ending"
mode '-' so we can use '-%>' to say no newline.
2011-06-18 23:22:39 -07:00
Jordan Sissel 2a063a831e - add stubs 2011-06-18 22:57:26 -07:00
Jordan Sissel 7bed50ebb8 - start working on https://github.com/jordansissel/fpm/issues/51 2011-06-18 22:11:03 -07:00
Jordan Sissel d3b8bd5e76 - solaris package building works.
Big thanks to Ben Rockwood for giving me access to a Joyent Solaris
  system so I could make this happen.
2011-06-15 07:05:24 +00:00
Jordan Sissel 14eaddadd9 - Some rpm implementations blow away %{buildroot} at the start of every
%build section. That sucks and is a bug/misfeature. Work around it
  by unpacking the tarball in %build instead of %prep.

  This should fix rpm building on SLES
  (https://github.com/jordansissel/fpm/issues/44)

  Patch-like thing originally by meineerde.
  Tested on ubuntu it still builds rpms just fine (no behavior change,
  good). Hopefully works on SLES now :)
2011-06-09 09:48:01 -07:00
Jordan Sissel b6bed2356d - use "Obsoletes" in rpm when --replaces is given. 2011-05-18 12:06:52 -07:00
Jordan Sissel b1ebf910c4 - move main program to FPM::Program
- support an ~/.fpmrc - the syntax of this file is one flag per line.
  This file is optional.
  https://github.com/jordansissel/fpm/issues/39
- Support --replaces (only .deb supports this right now, rpm seems to
  not).
2011-05-18 00:38:55 -07:00
Jordan Sissel f1b1799d48 - default version comparison should be >=0, as '>0' is deprecated.
https://github.com/jordansissel/fpm/issues/33
2011-05-16 00:18:38 -07:00
Jordan Sissel a8be482afa - move rpm multiline-description fix to just the rpm template 2011-05-11 15:52:59 -07:00
Jordan Sissel 0a91865593 Merge pull request #32 from asenchi/master
This add --url as a command line option.
2011-05-11 15:49:20 -07:00
Curt Micol c7078b2967 Adds --url as a command line option. 2011-05-11 11:47:05 -04:00
Jordan Sissel 246a9c23b0 - if the description is multiple lines, only use the first line for the
'summary' in the rpm
2011-05-10 18:10:11 -07:00
sabowski fbc585d3bf Check for empty lines in the description field
The description field cannot contain empty lines in a debian control
file. Adds " ." to empty lines. Also removes double printing of the
description in the control file.
2011-05-06 23:49:11 -07:00
Jordan Sissel a1a79ace51 Merge pull request #28 from sabowski/req_ver_parsing
Correctly parse gem requirement with both upper and lower bounds for rpms created from gems
2011-05-06 14:15:58 -07:00
sabowski 478bf03e3b Correctly parse gem requirement with both upper and lower bounds for
rpms created from gems
2011-05-06 13:59:19 -07:00
Jordan Sissel 00aed80a74 - Refactor maintainer script support.
Supports {pre,post}{install,uninstall} tasks in deb and rpm now.

maintainers scripts are now supported. However, the interface is
likely to change in the future. I want to make a universal maintainer
script format that allows you to use the same exact script in an rpm
and in a deb package.

See https://github.com/jordansissel/fpm/issues/18
2011-05-05 00:02:27 -07:00
Jordan Sissel f6f4730ee4 - add provids support to deb 2011-04-25 15:37:44 -07:00
Jordan Sissel 59ee089f91 - add --provides flag and support into rpm target 2011-04-25 13:40:47 -07:00
Jordan Sissel 0cac7f906d - Add epoch support 2011-04-25 11:24:56 -07:00
Jordan Sissel b2702e3809 - Fix issue/11 - leinaddm reported -t rpm -C foo sometimes fails to build
due to file paths in the generated rpm spec not leading with '/'
2011-04-01 00:31:19 -07:00
Jordan Sissel 9d2fc48a96 - If the dependency given is simply "foo" convert it to be "foo (> 0)"
for debian packages. Otherwise apt-get update becomes quite sad.
2011-03-21 11:47:33 -07:00
Jordan Sissel aa933f65b3 - If iteration is nil, default to '1' for RPM
- Style cleanup
2011-02-07 10:52:06 -08:00
anthezium 04c19be215 make iteration optional 2011-02-04 07:12:30 -08:00
Jordan Sissel 36cbe52ecb - Disable AutoReqProv. it makes bad decisions too often. 2011-01-22 12:51:27 -08:00
Jordan Sissel 6cce352951 - Add proper 'arch' support for rpm. 2011-01-22 10:56:15 -08:00
Jordan Sissel 7e11b8380b - Fix gem tar building to include only the gem install dir
- Abort if rpmbuild fails so we can debug it.
- Fix dependency conversion for rpm
- Fix path prefixing so rpm accepts our list of files (rpm requires
  paths in %files section start with '/'
2011-01-22 00:55:53 -08:00
Jordan Sissel edf7d37620 - Convert gem '~>' dependency versions to something deb understands. 2011-01-20 16:38:06 -08:00
Jordan Sissel ba9afb0088 - Fix dependency strings from gems to deb 2011-01-07 13:20:02 -08:00
Jordan Sissel 3629870de8 - Make rpm target work
- Get fpm -s rpm -t rpm working (should provide a useful test case)
- Allow 'output' (-p <path>) to be a directory
2011-01-07 00:50:06 -08:00
Jeanine Adkisson 9de4678d90 add in stubby FPM::Rpm and FPM::Gem
TODO: put sources and packages in separate namespaces
2011-01-05 20:02:22 -08:00
Jeanine Adkisson 7e62488ebc use accessors in the templates
so the source can override them
2011-01-05 18:33:50 -08:00
Jordan Sissel 62744a8dbe - include some more paths in npm packages
- set more default values since apt-get barfs on packages with missing
  data, it seems. Hard to debug since the error messages are totally
  meaningless.
2011-01-04 01:29:15 -08:00
Jordan Sissel 3ef75dbcd5 - support dependencies again 2011-01-03 18:47:19 -08:00
Jordan Sissel 5b942f2710 - Fix gem-ification bits (now installs+runs)
- Factor out 'deb' package assembly into a library
2011-01-03 18:22:09 -08:00
Jordan Sissel 59a38309b7 - purge swap file 2011-01-03 15:05:29 -08:00
Jordan Sissel 8035419385 - Start prototyping generic package creator. 2011-01-03 13:10:15 -08:00