Git Product home page Git Product logo

luggage's Introduction

The Luggage is a project to create a wrapper to make Apple PKG format
packages.

It does not use the PackageMaker GUI, but it does require that the developer
tools be installed so it can call the command line version.

Advantages:
You can get peer review of a package by examining the diffs between versions
of your Makefile. No more wading through a zillion annoying GUI panes.

Full documentation can be found at https://github.com/unixorn/luggage/wiki

Example packages can be found at https://github.com/unixorn/luggage-examples

Note : This version adds a command line option to remove the application prior to installation (app2luggage.rb).


luggage's People

Contributors

arubdesu avatar brentbb avatar bruienne avatar ccaviness avatar cvgs avatar eigerman avatar henri avatar jaharmi avatar mboylan avatar n8felton avatar rdrake avatar russellhancox avatar rustymyers avatar timsutton avatar unixorn avatar vmiller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

luggage's Issues

resulting pkg installs payload to wrong folder(s)

i have a simple makefile that installs an app bundle and packs a postflight script. what i'm seeing when run on my build machine is stuff like this:

Sep 5 20:57:46 derwin installer[2238]: Applications/TSP_Managed_Mac.app relocated to tmp/the_luggage/TSP_Managed_Mac.app-1.0.7/root/Applications/TSP_Managed_Mac.app
Sep 5 20:57:46 derwin installer[2238]: PackageKit: Shoving /var/folders/zz/zzzivhrRnAmviuee+++++++++++/Cleanup At Startup/PKInstallSandbox-tmp/Root (2 items) to /

any idea why the installer would dump the app back to the tmp root location? i also had a previous build dump the app in /Applications/Utilities/Waterroof.app, even though that's not specified anywhere.

the relevant lines from the makefile look like this: http://pastie.textmate.org/private/aucexsivlobbf5p8ms6ywa

the payload is a tar.bz2 archive.

thanks for all your work.

Wiki Update

I've been asked to ensure that my current Mac related projects are fully documented, so I figured rather than writing "start to finish" documentation on our internal wiki, I would update the wiki here on github.

I was hoping you guys could take a look at https://github.com/n8felton/luggage/wiki/Gettings-Started and let me know what you think about what I have so far. I would like to eventually see the wiki I build to be pull down to the main repo if approved.

Let the location of luggage.make be defined by user

We install our added on software in /local rather than /usr/local. Some sites might prefer /opt. It would be nice if luggage defined its home in a (Makefile or environment) variable rather than forcing it to be /usr/local/share/luggage.

Documentation update - PackageMaker path different as of Xcode 4.3

Now, in addition to going to Xcode's Preferences/Downloads tab to get make and other command line tools, you need to go to https://developer.apple.com/downloads/ and get auxiliary_tools_for_xcode(this link only works while logged in to a Dev account) for packagemaker. Then you'll still want to edit your packagemaker variable in luggage.make to point to the one in the standalone PackageMaker.app bundle. I put it in Utilities, and changed line 52 to
PACKAGEMAKER=/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker

Warnings when running “make bootstrap_files”

When I run “make bootstrap_files” as directed by the Luggage wiki, I get the following warnings. I haven’t looked into the makefile but I don’t believe the man pages are being processed. However, I do believe that luggage.make and prototype.plist are handled as per the description on the wiki.

$ make bootstrap_files                       
Makefile:25: warning: overriding commands for target `help'
luggage.make:120: warning: ignoring old commands for target `help'

Installing applications with spaces in their names

I am wondering about the best practice for installing applications to /Applications when those apps have spaces in their names. I know from experience last spring that Make is somewhere between finicky and hostile about spaces. Unfortunately, a number of items I’m packaging have them.

The standard unbz2-applications-% recipe doesn’t work with spaces in the name of the .app -- “Firstword Secondword.app.” Tried “Firstword Secondword.app” and “Firstword\ Secondword.app” in the recipe, results are either:

make[2]: *** No rule to make target `unbz2-applications-Firstword'. Stop.
make[1]: *** [payload] Error 2

or

make[2]: *** No rule to make target `unbz2-applications-Firstword Secondword.app'. Stop.
make[1]: *** [payload] Error 2

I have also had difficulty with removing the space from the tar archive name (when the actual contents, consisting of “Firstword Secondword.app” have not changed but the Makefile was adjusted):

chown: /tmp/the_luggage/Firstword Secondword/root/Applications/FirstwordSecondwordapp.app: No such file or directory
make[2]: *** [unbz2-applications-FirstwordSecondword.app] Error 1

I notice that app2luggage dodges around this by not using unbz2-applications-% and instead constructing install-app2luggage-Firstword_Secondword.app.

I’d rather not have to come up with my own target for every affected application. Relying on unbz2-applications-% is preferable because it’s built-in, debugged, used by everyone, and less likely I’ll generate new errors of my own. But, if that’s the best way, I will.

admin group assignment on /private

i'm probably missing something here, but i'm getting incorrect group ownership on /private/var/db for an example here. the pkg builds and installs fine, but the os is picky about ownership here. i don't see any lines in luggage.make that set ownership to root:admin for this path, yet they are at build time. example:

this makefile drops admin account and group plists under dslocal: https://gist.github.com/1676696

ownership looks fine to me in the makefile. it matches what's on disk.

building results in this:

Warning: Group ID 80 does not match 0 of root volume for "/private". Make sure to have disk permissions repaired with Disk Utility.
Warning: Group ID 80 does not match 0 of root volume for "/private/var". Make sure to have disk permissions repaired with Disk Utility.
Warning: Group ID 80 does not match 0 of root volume for "/private/var/db". Make sure to have disk permissions repaired with Disk Utility.

ownership under pkgroot confirms this. i don't see where this ownership gets set. i'm using the latest luggage pulled straight from the repo.

any ideas?

it's an issue because it causes stalls or just plain failure to boot without fixing the ownership on a newly imaged box.

Dependencies out of order/possible omissions?

I was getting errors trying to push man pages in man5 and man8 when re-wrapping puppet,

install: l_usr_man_man5: No such file or directory
make[2]: *** [pack-man5-puppet.conf.5.gz] Error 71

Tweaks I made may have uncovered things that were overlooked, but I can't be sure as I don't fully understand all of the inner workings.

These are the three things I changed which cleared my errors:

  • Line 308 references l_usr_share, which doesn't show up until 358, so I swapped it to earlier
  • Lines 586 through 610 don't have "%" before the l_usr_man* statement
  • Each line from 590 on that ends with a path all point to man8

I've posted a pastie(for now) which incorporates certain changes from glarizza's huronschools fork: http://pastie.org/private/5yfoburcof0a5r5comjwa

App2luggage calls /usr/bin/tar rather than ${TAR}

An app2luggage-generated Makefile creates a target, install-app2luggage-Application_Name.app, that calls the shell command /usr/bin/tar instead of referencing ${TAR}.

This should probably be changed to use ${TAR} instead, as it is one of the commands set up in luggage.make. This would make app2luggage Makefiles consistent with examples and existing practices.

Support for installer plugins?

After looking through the wiki documentation page, it looks like this doesn't support Installer plugins. Does it, and I just missed it? If not, do you have any plans to include support for them?

app2luggage.rb fails

When trying to create a package on 10.9.5 for Prizmo 2 with the command line

sudo app2luggage.rb --application "/Applications/Prizmo.app" --package-id "Prizmo 2" --reverse-domain com.creaceed.prizmo2

I get

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- ftools (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bin/app2luggage.rb:30:in `<main>'

Thanks!

chmod no such file or directory after make pkg

I have an application that is a directory with many directories and the app inside of the parent directory

ex.

/Applications/MacVector/Templates
/Applications/MacVector/MacVector.app
/Applications/MacVector/Tutorials

I need to pack /Applications/MacVector. I have the MacVector directory in the same directory as my make file. When I make the package, I get "chmod: /tmp/the_luggage/MacVector-20150510/root/Applications/MacVector: No such file or directory". I got the same issue when I tar the package as well and use unbz2-applications-MacVector to install it.

For some reason /tmp/the_luggage/MacVector-20150510/root/Applications is being overwritten with the MacVector folder instead of the MacVector folder going inside of it.

Here's my makefile. I made my own rule instead of using unbz2-applications-... because I am trying to learn. I get the same error with both methods anyways.

TITLE=MacVector
REVERSE_DOMAIN=com.osuccc
PAYLOAD=pack-MacVector

pack-MacVector:
@sudo ${CP} -r ./MacVector/ ${WORK_D}/Applications/
@sudo chmod 755 ${WORK_D}/Applications/MacVector
@sudo chown root:admin ${WORK_D}/Applications/MacVector

USE_PKGBUILD should default to 1

It's been several XCode releases since packagemaker was replaced by pkgbuild, and having to set USE_PKGBUILD before anything works is an unnecessary hurdle for new users.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.