- Timestamp:
- Jan 12, 2010, 11:55:27 PM (13 years ago)
- Location:
- branches/locker-dev/locker
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/locker-dev/locker
-
Property
svn:mergeinfo
set to
False
/trunk/locker merged eligible
-
Property
svn:mergeinfo
set to
False
-
branches/locker-dev/locker/bin
-
Property
svn:mergeinfo
set to
False
/branches/fc11-dev/locker/bin merged eligible /trunk/locker/bin merged eligible
-
Property
svn:mergeinfo
set to
False
-
branches/locker-dev/locker/bin/fix-php-ini
r1083 r1414 8 8 if [ -f php.ini ]; then 9 9 echo "Creating php.ini symlinks in child directories..." 10 athrun scripts gfind . -mindepth 1 -type d -exec sh -c 'ln -sf "`echo "$1" | sed '\''s,[^/],,g; s,/,../,g'\''`php.ini" "$1/"' -- {} \;10 athrun scripts gfind . -mindepth 1 -type d \( -not -name .svn -not -name .git -or -not -prune \) -exec sh -c 'ln -sf "`echo "$1" | sed '\''s,[^/],,g; s,/,../,g'\''`php.ini" "$1/"' -- {} \; 11 11 echo "Done!" 12 12 else -
branches/locker-dev/locker/deploy/bin
- Property svn:mergeinfo deleted
-
branches/locker-dev/locker/deploy/bin/django
r1223 r1414 16 16 print FASTCGI <<EOF; 17 17 #!/usr/bin/env python 18 import sys, os 18 import sys, os, time, threading, django.utils.autoreload 19 19 sys.path.insert(0, "/mit/$USER/Scripts/django") 20 20 os.chdir("/mit/$USER/Scripts/django/$name") 21 21 os.environ['DJANGO_SETTINGS_MODULE'] = "$name.settings" 22 23 def reloader_thread(): 24 while True: 25 if django.utils.autoreload.code_changed(): 26 os._exit(3) 27 time.sleep(1) 28 t = threading.Thread(target=reloader_thread) 29 t.daemon = True 30 t.start() 22 31 23 32 from django.core.servers.fastcgi import runfastcgi … … 38 47 39 48 chdir "/mit/$USER/Scripts/django/"; 40 system qw{django-admin .pystartproject}, $name;49 system qw{django-admin startproject}, $name; 41 50 chdir "$name"; 42 51 … … 65 74 while (<SETTINGS>) { 66 75 if (/^\)/) { 67 68 76 print NEWSETTINGS " 'django.contrib.admin',\n"; 77 print NEWSETTINGS " 'django.contrib.admindocs',\n"; 69 78 } 70 79 print NEWSETTINGS $_; … … 114 123 print " /mit/$USER/Scripts/django/$name/\n"; 115 124 print "To access manage.py, run 'ssh -k $USER\@scripts' and cd to the above directory.\n\n"; 116 print "When you edit your code, run the command\n";117 print " touch /mit/$USER/web_scripts/$addrend/index.fcgi\n";118 print "before testing, to cause your site to reload the new code.\n";119 125 press_enter; 120 126 -
branches/locker-dev/locker/doc/tickets/cnames.txt
r1026 r1414 23 23 reap it; they should do so quickly. If it belongs to an FSILG, e-mail 24 24 ht-$ILG-acl (ht-et-acl, ht-pika-acl, etc.) and ask nicely. If it belongs 25 to an academic network, they're not getting the name back unless they can26 negotiate with the current owner of the name25 to an academic network, they're not getting even deleted names back unless 26 they can negotiate with the current owner of the name. 27 27 28 28 2. Check that they're requesting a scripts.mit.edu path that they control … … 36 36 before proceeding. 37 37 38 Confirm that they're signed up for scripts. http://locker.scripts.mit.edu/ 39 should give something that isn't the "Account unknown" page. 40 38 41 3. E-mail jweiss. 39 42 * Open the ticket in RT 40 43 * Click 'Comment' to the right of the body of the e-mail they sent 41 44 * CC: jweiss@mit.edu (Don't use "To:", there's a bug) 42 * Write something nice. I typically use 45 * Write something nice, preferably including the stella command line. 46 I typically use 43 47 Subject: scripts CNAME request: foo.mit.edu 44 48 45 At your convenience, please make foo.mit.edu an alias of scripts.mit.edu. 49 At your convenience, please make foo.mit.edu an alias of scripts-vhosts.mit.edu. 50 51 stella scripts-vhosts -a foo 46 52 (or) 47 53 At your convenience, please move the alias foo.mit.edu from bar.mit.edu to 48 scripts.mit.edu. 54 scripts-vhosts.mit.edu. 55 56 stella bar -d foo 57 stella scripts-vhosts -a foo 49 58 (or) 50 59 At your convenience, please rename the current host foo.mit.edu to 51 foo-old.mit.edu and make foo.mit.edu an alias of scripts.mit.edu. 60 foo-old.mit.edu and mark it as deleted, and make foo.mit.edu an 61 alias of scripts-vhosts.mit.edu. 62 63 stella foo -S 3 -R foo-old 64 stella scripts-vhosts -a foo 52 65 (or) 53 66 If the request below is sufficient authorization, please remove.... … … 55 68 * Set Status => Waiting and Blocking On => Moira 56 69 57 Occasionally jweiss is on vacation; check /mit/ops/Pager.Schedule for58 "!jweiss" entries. It's worth asking him ahead of timeif he's around. If70 Occasionally jweiss is on vacation; generally he sets an auto-responder, 71 so you can just try emailing him and hoping, or ask him if he's around. If 59 72 not, see if zacheiss or cfox or computing-help will handle the requests. 60 73 (zacheiss has been willing to do them in the past.) … … 72 85 or RewriteRules if they're having trouble. 73 86 74 --geofft , last updated 2008-08-0287 --geofft with minor edits by adehnert, last updated 2009-12-01 -
branches/locker-dev/locker/doc/tickets/rt.txt
r1026 r1414 10 10 yourself of own updates" is on. You can also set the "Default Working Queue" 11 11 to Scripts, and give yourself a signature referring to scripts@mit.edu. 12 Another useful option here is to set a password, so you don't need certs to13 log in (and so you can use the zephyrbot).14 12 15 The zephyrbot (currently down) will take commands to -c scripts -i [ticket 16 number] of the form /set status=resolved or /set owner=geofft. 13 Another useful option here is to set an RT passwordfor your account, so you 14 don't need certs to log in (though it sometimes will keep asking you for 15 your password on each page load if you don't have certs) and so you can use 16 the zephyrbot). The zephyrbot will take commands to 17 -c scripts -i [ticket number] of the form /set status=resolved or 18 /set owner=geofft. You need to drop a file in 19 /mit/geofft/web_scripts/rt/rt-passwords by your username with the format: 20 21 "username" "yourawesomepassword" 22 23 And then ask geofft (zwrite geofft) to restart the RT bot. 24 25 Note that in the event that Geoff's account is compromised, it is possible 26 for an attacker to use this password do manipulate tickets in *any* 27 queue you have bits on, not just the Scripts one. 28 29 The RT bot will post ticket notifications as -c scripts -i nnn. If you are 30 responding to a ticket, it is conventional to post "lock" to the appropriate 31 instance, so others know not to pre-empt you. You should post "unlock" once 32 you are done handling the ticket. 17 33 18 34 You can also place these commands on a line by themselves inside e-mail; they 19 35 will be acted upon and removed before the e-mail gets sent back out. 20 36 21 Don't use the To field, it doesn't work. If you want to send the ticket somewhere else, use CC. 37 If you're adding a *comment* (such as when you're forwarding a cname request 38 on to IS&T), don't use the 'To:' field, because it'll be clobbered by our 39 RT scrips and the mail won't actually go to the destination you added. 40 Instead, you should use the 'Cc:' field. Similarly, if you're adding 41 *correspondence*, the 'Cc:' field will be clobbered and you need to use 42 the 'To:' field. 22 43 23 44 Don't CC other RT queues, it doesn't work. If you really need to, use your -
branches/locker-dev/locker/sbin/commit-email.pl
r719 r1414 1 1 #!/usr/bin/env perl 2 3 # ==================================================================== 4 # This script is deprecated. The Subversion developers recommend 5 # using mailer.py for post-commit and post-revprop change 6 # notifications. If you wish to improve or add features to a 7 # post-commit notification script, please do that work on mailer.py. 8 # See http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/mailer . 9 # ==================================================================== 2 10 3 11 # ==================================================================== … … 10 18 # This script requires Subversion 1.2.0 or later. 11 19 # 12 # $HeadURL: http://svn.collab.net/repos/svn/trunk/ tools/hook-scripts/commit-email.pl.in $13 # $LastChangedDate: 200 8-04-01 13:19:34 -0400 (Tue, 01 Apr 2008) $14 # $LastChangedBy: glasser $15 # $LastChangedRevision: 3 0158$20 # $HeadURL: http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/commit-email.pl.in $ 21 # $LastChangedDate: 2009-05-12 13:25:35 -0400 (Tue, 12 May 2009) $ 22 # $LastChangedBy: blair $ 23 # $LastChangedRevision: 37715 $ 16 24 # 17 25 # ==================================================================== … … 44 52 ###################################################################### 45 53 # Configuration section. 54 55 $ENV{'LC_ALL'} = 'en_US.UTF-8'; 46 56 47 57 # Sendmail path, or SMTP server address. … … 558 568 my @head; 559 569 my $formatted_date; 560 if ( defined$stdout)570 if ($stdout) 561 571 { 562 572 $formatted_date = strftime('%a %b %e %X %Y', localtime()); … … 753 763 } 754 764 755 my $openfork_available = $^O ne "MSWin32"; 765 my $openfork_available = $^O ne "MSWin32"; 756 766 if ($openfork_available) # We can fork on this system. 757 767 { … … 769 779 } 770 780 } 771 else # Running on Windows. No fork. 781 else # Running on Windows. No fork. 772 782 { 773 783 my @commandline = (); 774 784 my $arg; 775 785 776 786 while ($arg = shift) 777 787 { … … 780 790 push(@commandline, $arg); 781 791 } 782 792 783 793 # Now do the pipe. 784 794 open(SAFE_READ, "@commandline |") -
branches/locker-dev/locker/sbin/commit-zephyr
r748 r1414 1 #!/bin/sh 1 #!/bin/bash 2 # 3 # This is a script that can be called from a Subversion post-commit hook 4 # to zephyr a summary of the commit or the full commit. 5 # 6 # Use by putting something like the following in hooks/post-commit: 7 # REPOS="$1" 8 # REV="$2" 9 # /mit/snippets/svn-hooks/commit-zephyr "$REPOS" "$REV" -c scripts 10 # /mit/snippets/svn-hooks/commit-zephyr "$REPOS" "$REV" --full -c scripts-auto -i commits 2 11 3 CLASS=scripts 12 export LC_ALL=en_US.UTF-8 13 14 CLASS=test 4 15 INSTANCE=@ 5 16 FULL=0 … … 39 50 echo svnlook diff "$REPOS" -r "$REV" 40 51 fi 41 ) | zwrite -d -c "$CLASS" -i "$INSTANCE" - s "r$REV - $dirs"52 ) | zwrite -d -c "$CLASS" -i "$INSTANCE" -O "auto" -s "SVN: r$REV" -
branches/locker-dev/locker/sbin/parallel-find.pl
r730 r1414 2 2 3 3 # Script to help generate find the .scripts-version files 4 5 use LockFile::Simple qw(trylock unlock); 6 use File::stat; 4 7 5 8 use lib '/mit/scripts/sec-tools/perl'; … … 7 10 open(FILE, "</mit/scripts/sec-tools/store/scriptslist"); 8 11 my $dump = "/mit/scripts/sec-tools/store/versions"; 12 my $dumpbackup = "/mit/scripts/sec-tools/store/versions-backup"; 9 13 10 (! -e $dump) || die "Output directory exists: $dump"; 11 system("mkdir", $dump) && die; 14 # try to grab a lock on the version directory 15 trylock($dump) || die "Can't acquire lock; lockfile already exists at <$dump.lock>. Another parallel-find may be running. If you are SURE there is not, remove the lock file and retry."; 16 17 sub unlock_and_die ($) { 18 my $msg = shift; 19 unlock($dump); 20 die $msg; 21 } 22 23 # if the versions directory exists, move it to versions-backup 24 # (removing the backup directory if necessary). Then make a new copy. 25 if (-e $dump){ 26 if (-e $dumpbackup){ 27 system("rm -rf $dumpbackup") && unlock_and_die "Can't remove old backup directory $dumpbackup"; 28 } 29 system("mv", $dump, $dumpbackup) && unlock_and_die "Unable to back up current directory $dump"; 30 } 31 system("mkdir", $dump) && unlock_and_die "mkdir failed to create $dump"; 12 32 13 33 use Proc::Queue size => 40, debug => 0, trace => 0; … … 28 48 } 29 49 50 sub old_version ($) { 51 my $dirname = shift; 52 open my $h, "$dirname/.scripts-version"; 53 chomp (my $v = (<$h>)[-1]); 54 return $v; 55 } 56 30 57 sub version ($) { 31 58 my $dirname = shift; 32 open my $h, "$dirname/.scripts-version"; 33 return (<$h>)[-1]; 59 $uid = stat($dirname)->uid; 60 open my $h, "sudo -u#$uid git --git-dir=$dirname/.git describe --tags --always 2>/dev/null |"; 61 chomp($val = <$h>); 62 if (! $val) { 63 print "Failed to read value for $dirname\n" 64 } 65 return $val; 34 66 } 35 67 … … 38 70 my $homedir = shift; 39 71 40 open my $files, "find $homedir/web_scripts -xdev -name .scripts-version 2>/dev/null |";72 open my $files, "find $homedir/web_scripts -xdev -name .scripts-version -o -name .scripts 2>/dev/null |"; 41 73 open my $out, ">$dump/$user"; 42 74 while (my $f = <$files>) { 43 75 chomp $f; 44 $f =~ s!/\.scripts-version$!!; 76 my $new_style; 77 $new_style = ($f =~ s!/\.scripts$!!); 78 if (! $new_style) { 79 $f =~ s!/\.scripts-version$!!; 80 # Don't use .scripts-version of .scripts is around! 81 if (-d "$f/.scripts") { 82 next; 83 } 84 } 45 85 if (! updatable($f)) { 46 86 print STDERR "not updatable: $f"; 47 87 next; 48 88 } 49 $v = version($f);50 print $out "$f:$v ";89 $v = $new_style ? version($f) : old_version($f); 90 print $out "$f:$v\n"; 51 91 } 52 92 return 0; … … 57 97 my $f=fork; 58 98 if(defined ($f) and $f==0) { 59 if ($homedir !~ m|^/afs/athena| ) {60 print "ignoring non-athena-cell $user $homedir\n";99 if ($homedir !~ m|^/afs/athena| && $homedir !~ m|^/afs/sipb| && $homedir !~ m|^/afs/zone|) { 100 print "ignoring foreign-cell $user $homedir\n"; 61 101 exit(0); 62 102 } 63 103 print "$user\n"; 64 104 $ret = find($user, $homedir); 65 66 105 sleep rand 1; 106 exit($ret); 67 107 } 68 108 1 while waitpid(-1, WNOHANG)>0; # avoids memory leaks in Proc::Queue 69 109 } 110 111 unlock($dump); 112 1; -
branches/locker-dev/locker/sql/bin/get-password
r1049 r1414 48 48 case 1: 49 49 $myPassword = `/usr/bin/sql-signup`; 50 file_put_contents($cnfPath, "[ mysql]\nhost=$host\nuser=$env_user\npassword=$myPassword\n");50 file_put_contents($cnfPath, "[client]\nhost=$host\nuser=$env_user\npassword=$myPassword\n"); 51 51 $cnfinfo = getMyCnfInfo($cnfPath); 52 52 if (is_array($cnfinfo)) { -
branches/locker-dev/locker/sql/bin/save-password
r382 r1414 8 8 rm -f $lroot/.sql/my.cnf $lroot/.my.cnf 9 9 10 echo "[ mysql]10 echo "[client] 11 11 host=sql.mit.edu 12 12 user=$sqluser
Note: See TracChangeset
for help on using the changeset viewer.