• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessing PackageKit programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing PackageKit programmatically


  • Subject: Re: Accessing PackageKit programmatically
  • From: Erik Berglund <email@hidden>
  • Date: Mon, 13 Jun 2016 20:33:32 +0200

I'm talking about the actual installer and how the parts and applications are installed.

If you make each of these similar applications a separate standard pkg and accessible outside of this standalone application you talk about, for use by patch management tool that in turn will be the one used to actually install and update your applications, then I guess the this is no issue for us administrators.

In other words, if you can use other means of installing the applications outside of this standalone tool, this is no issue.

Using NSTask is the way to do this, but using AppleScript to elevate privileges is deprecated, you need to create a helper application that you call which handles the privilege escalation.

If you just use standard pkgs, then all you need is the /usr/sbin/installer binary, that is silent and supported.

As for elevating privileges, then you create a privileged helper tool that you use to run the installation task.

https://developer.apple.com/library/mac/documentation/Security/Conceptual/SecureCodingGuide/Articles/AccessControl.html
https://developer.apple.com/library/mac/samplecode/EvenBetterAuthorizationSample/Introduction/Intro.html#//apple_ref/doc/uid/DTS40013768-Intro-DontLinkElementID_2


On 13 juni 2016, at 20:18, John Paul Adrian Glaubitz <email@hidden> wrote:

On 06/13/2016 08:03 PM, Erik Berglund wrote:
If you do, you must then rely on that the application you're installing is on the magnitude of Adobe's to have an entire open source community create
workarounds just to install your software in a managed fashion.

Except that the API that Apple provides does *not* allow to install software in managed fashion.

Microsoft's MSI API, on the other hand, does allow exactly that.

Besides, as I have mentioned multiple times, I do not want to circumvent any install mechanisms
provided by the operating system, I want to use them. That's the whole point of using an API.

If I wanted to workaround Apple's API, I wouldn't use .pkg files.

Adrian

--
.''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - email@hidden
`. `'   Freie Universitaet Berlin - email@hidden
 `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Accessing PackageKit programmatically
      • From: John Paul Adrian Glaubitz <email@hidden>
References: 
 >Accessing PackageKit programmatically (From: John Paul Adrian Glaubitz <email@hidden>)
 >Re: Accessing PackageKit programmatically (From: Greg Neagle <email@hidden>)
 >Re: Accessing PackageKit programmatically (From: John Paul Adrian Glaubitz <email@hidden>)
 >Re: Accessing PackageKit programmatically (From: Julian Devlin <email@hidden>)
 >Re: Accessing PackageKit programmatically (From: John Paul Adrian Glaubitz <email@hidden>)
 >Re: Accessing PackageKit programmatically (From: Erik Berglund <email@hidden>)
 >Re: Accessing PackageKit programmatically (From: John Paul Adrian Glaubitz <email@hidden>)

  • Prev by Date: Re: Accessing PackageKit programmatically
  • Next by Date: Re: Accessing PackageKit programmatically
  • Previous by thread: Re: Accessing PackageKit programmatically
  • Next by thread: Re: Accessing PackageKit programmatically
  • Index(es):
    • Date
    • Thread