[29960] trunk/dports/sysutils/zeroinstall-injector-devel

source_changes at macosforge.org source_changes at macosforge.org
Tue Oct 16 14:13:41 PDT 2007


Revision: 29960
          http://trac.macosforge.org/projects/macports/changeset/29960
Author:   afb at macports.org
Date:     2007-10-16 14:13:38 -0700 (Tue, 16 Oct 2007)

Log Message:
-----------
add shared cache helper script too

Modified Paths:
--------------
    trunk/dports/sysutils/zeroinstall-injector-devel/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/zeroinstall-injector-devel/files/0store-secure-add-helper

Modified: trunk/dports/sysutils/zeroinstall-injector-devel/Portfile
===================================================================
--- trunk/dports/sysutils/zeroinstall-injector-devel/Portfile	2007-10-16 20:38:11 UTC (rev 29959)
+++ trunk/dports/sysutils/zeroinstall-injector-devel/Portfile	2007-10-16 21:13:38 UTC (rev 29960)
@@ -51,6 +51,8 @@
 # This is not used by default, but is required if you want to
 # set up sharing of downloads later.
 post-destroot {
+	xinstall -m 755 ${filespath}/0store-secure-add-helper ${destroot}${prefix}/bin/
+	reinplace "s,@@PREFIX@@,${prefix}," ${destroot}${prefix}/bin/0store-secure-add-helper
 	adduser		zeroinst shell=/sbin/nologin
 	xinstall -d ${destroot}${prefix}/var/cache/0install.net/implementations
 	file attributes ${destroot}${prefix}/var/cache/0install.net -owner zeroinst 

Added: trunk/dports/sysutils/zeroinstall-injector-devel/files/0store-secure-add-helper
===================================================================
--- trunk/dports/sysutils/zeroinstall-injector-devel/files/0store-secure-add-helper	                        (rev 0)
+++ trunk/dports/sysutils/zeroinstall-injector-devel/files/0store-secure-add-helper	2007-10-16 21:13:38 UTC (rev 29960)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+### When 0launch wants to install a package, it will invoke this script.
+### To make it work, use visudo to add these two lines to /etc/sudoers:
+###     Defaults>zeroinst env_reset
+###     ALL ALL=(zeroinst) NOPASSWD: @@PREFIX@@/bin/0store-secure-add
+### Note:   the NOPASSWD line MUST go at the end of the file,
+###         otherwise it is likely to be overridden by later entries.
+
+exec sudo -S -u zeroinst @@PREFIX@@/bin/0store-secure-add "$@" < /dev/null

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071016/a0d626a6/attachment.html


More information about the macports-changes mailing list