Commit Graph

250 Commits

Author SHA1 Message Date
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