[69684] branches/gsoc10-configfiles/tools

and.damore at macports.org and.damore at macports.org
Tue Jul 13 08:17:43 PDT 2010


Revision: 69684
          http://trac.macports.org/changeset/69684
Author:   and.damore at macports.org
Date:     2010-07-13 08:17:42 -0700 (Tue, 13 Jul 2010)
Log Message:
-----------
build and install branch with setuid

Modified Paths:
--------------
    branches/gsoc10-configfiles/tools/gsocdummyupdate.sh

Added Paths:
-----------
    branches/gsoc10-configfiles/tools/gsocmake.c
    branches/gsoc10-configfiles/tools/gsocmake.sh

Removed Paths:
-------------
    branches/gsoc10-configfiles/tools/gsocmake

Modified: branches/gsoc10-configfiles/tools/gsocdummyupdate.sh
===================================================================
--- branches/gsoc10-configfiles/tools/gsocdummyupdate.sh	2010-07-13 14:49:23 UTC (rev 69683)
+++ branches/gsoc10-configfiles/tools/gsocdummyupdate.sh	2010-07-13 15:17:42 UTC (rev 69684)
@@ -2,7 +2,7 @@
 
 TARFILE=gsoc-dummy.tar.gz 
 PORTFILE=$(port dir gsoc-dummy)/Portfile
-USER=$(id -p | grep login | cut -f 2)
+read _ USER <<< $(id -p | grep login)
 #edit following line to point GSOCDUMMYDIR to the directory containing
 #"gsoc-dummy" tree
 GSOCDUMMYDIR=/Users/"$USER"/.macports/GSoC

Deleted: branches/gsoc10-configfiles/tools/gsocmake
===================================================================
--- branches/gsoc10-configfiles/tools/gsocmake	2010-07-13 14:49:23 UTC (rev 69683)
+++ branches/gsoc10-configfiles/tools/gsocmake	2010-07-13 15:17:42 UTC (rev 69684)
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-source ~/.bash_macports
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-MP_PREFIX=/opt/mp-gsoc
-port cd gsoc
-make distclean
-./configure --prefix=$MP_PREFIX --with-tclpackage=$MP_PREFIX/Library/Tcl --with-applications-dir=$MP_PREFIX/Applications
-make

Added: branches/gsoc10-configfiles/tools/gsocmake.c
===================================================================
--- branches/gsoc10-configfiles/tools/gsocmake.c	                        (rev 0)
+++ branches/gsoc10-configfiles/tools/gsocmake.c	2010-07-13 15:17:42 UTC (rev 69684)
@@ -0,0 +1,7 @@
+#include <unistd.h>
+
+int main(int argc, char *argv[]) {
+setuid(geteuid());
+system("/usr/local/bin/gsocmake.sh");
+return 0;
+}


Property changes on: branches/gsoc10-configfiles/tools/gsocmake.c
___________________________________________________________________
Added: svn:eol-style
   + native

Copied: branches/gsoc10-configfiles/tools/gsocmake.sh (from rev 69681, branches/gsoc10-configfiles/tools/gsocmake)
===================================================================
--- branches/gsoc10-configfiles/tools/gsocmake.sh	                        (rev 0)
+++ branches/gsoc10-configfiles/tools/gsocmake.sh	2010-07-13 15:17:42 UTC (rev 69684)
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+source ~/.bash_macports
+read _ user <<< $(id -p | grep login )
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+MP_PREFIX=/opt/mp-gsoc
+port cd gsoc
+sudo -u "$user" make distclean
+sudo -u "$user" ./configure --prefix=$MP_PREFIX \
+    --with-tclpackage=$MP_PREFIX/Library/Tcl \
+    --with-applications-dir=$MP_PREFIX/Applications
+sudo -u "$user" make
+make install
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100713/21dd94a0/attachment.html>


More information about the macports-changes mailing list