diff options
-rw-r--r-- | docs/issues/notification.mdwn | 5 | ||||
-rw-r--r-- | libpiny/lib/Piny/Config.pm | 2 | ||||
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 12 | ||||
-rwxr-xr-x | pinyadmin/sbin/newrepo | 2 | ||||
-rwxr-xr-x | pinyadmin/sbin/newuser | 2 | ||||
-rwxr-xr-x | pinyadmin/sbin/rmrepo | 2 | ||||
-rw-r--r-- | pinyconfigs/debian/control | 3 | ||||
-rwxr-xr-x | pinyweb/cgi-bin/newuser.cgi | 4 | ||||
-rw-r--r-- | pinyweb/debian/control | 2 |
9 files changed, 21 insertions, 13 deletions
diff --git a/docs/issues/notification.mdwn b/docs/issues/notification.mdwn index 2db60dd..c100a27 100644 --- a/docs/issues/notification.mdwn +++ b/docs/issues/notification.mdwn @@ -1,7 +1,10 @@ -* Status: [[!taglink open]] <!-- Choose one: open, closed --> +* Status: [[!taglink closed]] <!-- Choose one: open, closed --> * Assigned to: [[!taglink jrayhawk]], [[!taglink jblake]] <!-- Choose one or more: jrayhawk, jblake --> * Priority: [[!taglink now]] <!-- Choose one: now, soon, later --> * Opened by: jrayhawk ### Discussion newuser and newrepo events should be sent to, for now, jrayhawk+piny.be@omgwallhack.org. + +### 20110427 jrayhawk +closing diff --git a/libpiny/lib/Piny/Config.pm b/libpiny/lib/Piny/Config.pm index a715024..ef18541 100644 --- a/libpiny/lib/Piny/Config.pm +++ b/libpiny/lib/Piny/Config.pm @@ -209,7 +209,7 @@ sub tweakable { # The tweakables # Global tweakables, which only make sense in the global config file. -tweakable "piny_newuseremail" => "jrayhawk\@omgwallhack.org", 'Str'; +tweakable "piny_adminemail" => "jrayhawk\@omgwallhack.org", 'Str'; # Repo-specific tweakables, in the repos' .git/config files. tweakable "piny_ikiwikidestdir" => "/srv/www/piny.be/", 'PathDir'; diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index be363bd..cfe7b1d 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -225,8 +225,10 @@ sub rebuild { my $ikiuser = Piny::User::IkiWiki->new( "name" => "iki-" . $s->shortname ); foreach( "git-daemon-export-ok", "packed-refs" ) { - open( TOUCH, ">", $s->path . "/" . $_ ) or die "Could not touch $_ for repo: $!"; - close( TOUCH ); + unless( -e $s->path . "/" . $_ ) { + open( TOUCH, ">", $s->path . "/" . $_ ) or die "Could not touch $_ for repo: $!"; + close( TOUCH ); + }; }; foreach( "info", "logs", "branches" ) { @@ -393,8 +395,10 @@ sub create { system( "/usr/bin/git", "init", "--template=/srv/git-template.git", "--quiet", "--shared" ) and die "Could not initialize git repo!"; foreach( "git-daemon-export-ok", "packed-refs" ) { - open( TOUCH, ">", $repo->path . "/" . $_ ) or die "Could not touch $_ for repo: $!"; - close( TOUCH ); + unless( -e $repo->path . "/" . $_ ) { + open( TOUCH, ">", $repo->path . "/" . $_ ) or die "Could not touch $_ for repo: $!"; + close( TOUCH ); + }; }; foreach( "info", "logs" ) { diff --git a/pinyadmin/sbin/newrepo b/pinyadmin/sbin/newrepo index a63d96a..0a6cdf0 100755 --- a/pinyadmin/sbin/newrepo +++ b/pinyadmin/sbin/newrepo @@ -45,7 +45,7 @@ while( 1 ) { }; my $config = Piny::Config->new( ); -my $dest = $config->piny_newuseremail; +my $dest = $config->piny_adminemail; unless( open( MAIL, "|/usr/lib/sendmail -t" ) ) { die "Couldn't execute sendmail: $!\n"; diff --git a/pinyadmin/sbin/newuser b/pinyadmin/sbin/newuser index eeb5617..e6dd785 100755 --- a/pinyadmin/sbin/newuser +++ b/pinyadmin/sbin/newuser @@ -127,7 +127,7 @@ if ( not defined $password or $password eq "" ) { print "Password is undefi # Here on down is the actual creation code. my $config = Piny::Config->new( ); -my $dest = $config->piny_newuseremail; +my $dest = $config->piny_adminemail; unless( open( MAIL, "|/usr/lib/sendmail -t" ) ) { die "Couldn't execute sendmail: $!\n"; diff --git a/pinyadmin/sbin/rmrepo b/pinyadmin/sbin/rmrepo index 82df04f..a65146d 100755 --- a/pinyadmin/sbin/rmrepo +++ b/pinyadmin/sbin/rmrepo @@ -8,7 +8,7 @@ use Piny; my $env = Piny::Environment->instance( ); my $config = Piny::Config->new( ); -my $dest = $config->piny_newuseremail; +my $dest = $config->piny_adminemail; foreach my $reponame ( @ARGV ) { diff --git a/pinyconfigs/debian/control b/pinyconfigs/debian/control index cce693f..9167f47 100644 --- a/pinyconfigs/debian/control +++ b/pinyconfigs/debian/control @@ -8,7 +8,8 @@ Standards-version: 3.9.1 Package: pinyconfigs Architecture: all -Depends: ${misc:Depends}, pinyweb (>= 0.8) +Depends: ${misc:Depends} +Recommends: pinyweb (>= 0.8) Description: Configuration files for piny The configuration files needed for a piny configuration. . diff --git a/pinyweb/cgi-bin/newuser.cgi b/pinyweb/cgi-bin/newuser.cgi index 98db83e..e4b955a 100755 --- a/pinyweb/cgi-bin/newuser.cgi +++ b/pinyweb/cgi-bin/newuser.cgi @@ -27,11 +27,11 @@ if( $q->param("n") && $q->param("a") && $q->param("p") ) { my $code; if ( $q->param("h") ) { - $pass = $cipher->decrypt( decode_base32( $pass ) ); + $pass = $cipher->decrypt( MIME::Base32::decode( $pass ) ); $code = $auth->hash( { "n" => $q->param( "n" ), "a" => $q->param( "a" ), "p" => $pass } ); } else { $code = $auth->hash( { "n" => $q->param( "n" ), "a" => $q->param( "a" ), "p" => $pass } ); - $pass = encode_base32( $cipher->encrypt( $pass ) ); + $pass = MIME::Base32::encode( $cipher->encrypt( $pass ) ); }; if ( $q->param("h") ) { diff --git a/pinyweb/debian/control b/pinyweb/debian/control index 97e5537..8e2d1b5 100644 --- a/pinyweb/debian/control +++ b/pinyweb/debian/control @@ -8,7 +8,7 @@ Standards-version: 3.9.1 Package: pinyweb Architecture: any -Depends: ${perl:Depends}, ${misc:Depends}, ${shlibs:Depends}, libjson-perl, libpiny-perl (>= 0.14), pinyadmin (>= 0.10) +Depends: ${perl:Depends}, ${misc:Depends}, ${shlibs:Depends}, libcrypt-cbc-perl, libjson-perl, libmime-base32-perl, libpiny-perl (>= 0.14), pinyadmin (>= 0.10) Description: CGIs for managing piny repositories The CGI programs for day-to-day administrative tasks in the Piny infrastructure. |