Support for OS X package format #317

Closed
timsutton opened this Issue Dec 15, 2012 · 5 comments

Projects

None yet

4 participants

@timsutton

Is there any interest in support for outputting (and possibly inputting) OS X packages to fpm?

I've tinkered a little and have been able to add very basic support that require the OS X-native 'pkgbuild' tool. A few useful platform-specific options would also be possible, like postinstall-actions for GUI-driven installations (restart/logout/shutdown), and controlling how permissions are derived in building the package metadata.

Since version 10.7, OS X includes pkgbuild in the base install, which builds packages in the Flat Package format. I'm not aware of any complete Linux-based tools for building this format, but it may well be possible to do this using gzip and cpio archive tools.

Although it uses the extension '.pkg', this is ambiguous (Solaris, Arch sort-of), so 'osx' or 'osxpkg' seem more suitable package class names. I'm barely familiar with Ruby and so it's partly an exercise for me, but just wanted to see what others think. I think the use cases for building OS X packages would be quite different than the majority of use cases people have for using fpm.

@jordansissel

This would be awesome.

@timsutton

A few commits up on my fork:

https://github.com/timsutton/fpm

More sanity checks still required, probably a couple more useful class-specific command options, should add more spec tests, and although I've tried to mimic the structure of other package classes I'm probably doing many other things wrong.

I'll slowly plug away on this some more, but I'm updating this issue in case anyone wants to take a look.

@jordansissel

This looks awesome! I'll try to test it soon, but otherwise I am quite excited to have OSX support :)

@turtlebender

I would love this as well. Let me know if there is anything I can do to help. I'll try it out tomorrow.

@timsutton timsutton added a commit to timsutton/fpm that referenced this issue Jan 7, 2013
@timsutton timsutton 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
4df9617
@r4um
Collaborator

This is completed and shipped since versions 0.4.27! 👍

@r4um r4um closed this Mar 6, 2013
@prof-milki prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 18, 2014
tim 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
e104881
@prof-milki prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 27, 2014
@timsutton timsutton 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
4c0d74a
@jordansissel jordansissel pushed a commit that referenced this issue Apr 24, 2015
@timsutton timsutton 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
31fcc05
@jordansissel jordansissel pushed a commit that referenced this issue Jun 20, 2016
@timsutton timsutton 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
82bb43a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment