Is it worth persevering with Macports_Framework?

Guido Soranzio guido.soranzio at gmail.com
Mon Feb 11 20:29:05 PST 2013


On 11/02/2013, Ian Wadham wrote:

> I see that Cocoa has NSTask and NSPipe classes and that Guido's
> Guigna app is using them in its GuignaAgent class.  I also like this approach
> because there is loose binding between the processes.

A more canonical approach would require to implement a helper tool since
MacPorts needs root privileges. As of Snow Leopard and beyond, the
ServiceManagement.framework is the preferred method of managing
privilege escalation on Mac OS X and should be used instead of
earlier approaches such as BetterAuthorizationSample or directly calling AuthorizationExecuteWithPrivileges:
<http://developer.apple.com/library/mac/#samplecode/SMJobBless/Introduction/Intro.html>.

Porticus had a very solid management of privileged processes
and that's why I petitioned its author to open source it:
<http://porticus.alittledrop.com/ downloads/Porticus.zip>.
Unfortunately Richard Laing hadn't the time to transition
Porticus to OS X Lion and I decided for a totally different route.

Why not leveraging the Scripting Bridge and embedding directly
a Terminal window? I found it a very practical solution also because
Terminal is optimized for managing very large text buffers
while, when you append hundreds of log lines to a NSTextView, its
performance slows down miserably.

My simple algorithm for parsing effectively the Tcl PortIndex via
Objective-C was very similar to Lang's one and I gave up analysing
Porticus use of Core Data, the second point of interest for me,
since I needed a more abstract model.


Guido
-- 
https://github.com/gui-dos/Guigna 


More information about the macports-dev mailing list