Commit Graph

250 Commits

Author SHA1 Message Date
Daniel Haskin 9e2874766b Whitespace 2015-05-06 22:39:10 -06:00
Daniel Haskin 69ef42b31f Add before-install script to sh package type 2015-05-06 20:06:42 -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 45c9d09edf Add to pre- and post- removal scripts to make them safer 2015-05-02 11:50:41 -06:00
Daniel Haskin be35f9532f Merge master into feature/arch-support 2015-04-29 22:56:17 -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
Jordan Sissel 162a2e2a71 rpm v5 changes the name of the file digest macro
This sets both macros (rpm v4.9, rpm v5.4) now just in case.

This fixes test failures on OSX when setting --rpm-digest sha1
2015-04-14 00:05:49 -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 19bf369d4f Fix for *debian* packages for #875 2015-04-09 23:17:54 -06:00
Daniel Haskin 845c5997c9 Merge branch 'master' of github.com:jordansissel/fpm into feature/875 2015-04-09 23:01:23 -06:00
Daniel Haskin bd6902de2b #875 Fix cases where upgrade or install scripts are specified, but not both 2015-04-09 23:00:25 -06:00
Jordan Sissel bbea1e8d41 Merge pull request #822 from dlanderson/patch-1
Second %pre should be %post
2015-04-09 21:35:12 -07:00
Daniel Haskin 3224bc6ec8 Merge branch 'patch-1' of github.com:dlanderson/fpm into feature/875 2015-04-09 22:32:35 -06:00
Daniel Haskin a2fa9c7afd Add improved abort-install and abort-remove 2015-04-08 21:56:44 -06:00
Daniel Haskin 8541c53d6a Skeleton for adding pacman support 2015-03-21 11:16:12 -06:00
Wesley Spikes f746c1f94e Don't allow empty functions for before/after install
If you invoke fpm with --before-upgrade, but not --before-install, then
the resultant before_install function becomes an empty function, which
bash/dash do not allow. (Syntax errors) This same problem applies to the
after flags. To avoid this, we'll insert a null statement if there's no
install script specified.

We don't need to do this for the (before|after)_upgrade functions, since
the time these templates are used is when --(before|after)-upgrade is
specified.
2015-01-22 15:25:35 -08:00
Wesley Spikes d2120a84f4 Bash does not allow for empty functions.
Instead, we use the null operator here. Tested in both dash
and bash.
2015-01-22 14:49:55 -08:00
Wesley Spikes b3f4a9f019 Add missing shebang lines for deb maintenance scripts
These scripts are only used when before/after-upgrade options are
provided to fpm.
2015-01-22 14:46:51 -08:00
Chris Gerber 16fbcef933 Add package metadata to slug file format 2014-12-19 13:54:44 -05:00
Dave Anderson cc967ff913 Remove errant space in debian postinst_upgrade.sh
This space was preventing postinst scripts to run on initial install of the .deb package
2014-12-10 14:37:05 -07:00
Dave Anderson 05fb31d299 Second %pre should be %post
Fixes https://github.com/jordansissel/fpm/issues/803
2014-12-09 13:00:27 -07:00
Jordan Sissel 6244cab3df Fix copy/paste problem 2014-11-05 00:31:43 +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 73b6c2d77c Merge pull request #776 from Tapjoy/feature/sh_template_enhancements
Enhancements to sh template
2014-10-24 22:27:26 -07:00
Jordan Sissel 7f11bc00e9 Somehow the templates were syntactically invalid? I dunno. Fixed. 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 1d295e5db5 Merge pull request #772 from djhaskin987/feature/661
Feature/661
2014-10-16 11:47:06 -07:00
Nate Brown 1f4223c49f Allow removal of Vendor field for deb 2014-10-07 17:55:57 +00:00
Chris Gerber 57e2160a01 Enhancements to sh template
This PR includes two significant changes:

* If this version of the code is already in current:
  * If not forced, do not install the code
  * If forced, rename the old directory and write out a new one

* Ignore functions in environment when saving .install-metadata, due to an issue with FPM 1.25.29-31 and Bash 4.3.27
2014-10-03 14:39:56 -04:00
Daniel Haskin 3c3c867a7c Merge into scriptmap in the name of elegance 2014-09-19 07:23:15 -06:00
Daniel Haskin 6ad6767844 Pass other scripts through 2014-09-19 07:10:51 -06:00
Daniel Haskin 5b07133a1c Add debian upgrade functionality 2014-09-18 07:24:37 -06:00
Daniel Haskin bb8409f906 Complete first hack at RPM and options 2014-09-15 07:08:34 -06: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 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
Chris Gerber a49d2abeb5 Fix post_install logging; protect previous current dir during clean up 2014-05-08 11:00:42 -04: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
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 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
Rob Kinyon 9cdfe65db6 BuildArch isn't needed for any purpose 2014-04-17 20:25:22 -04:00
Remi Hakim 487df5a192 Move rpm specific packages scripts to a more adequate location 2014-04-14 15:25:25 +02:00
Chris Gerber 665bb7c3a7 Move pids up to install root to prevent "folder *not* empty" problem 2014-03-19 15:14:50 -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 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