From 33315ba67aaa322178936870feb3db3789a281bf Mon Sep 17 00:00:00 2001 From: "jrayhawk+piny.be@omgwallhack.org" Date: Wed, 27 Apr 2011 19:54:34 -0700 Subject: Renaming piny.newuseremail to piny.adminemail --- docs/issues/notification.mdwn | 5 ++++- libpiny/lib/Piny/Config.pm | 2 +- pinyadmin/sbin/newrepo | 2 +- pinyadmin/sbin/newuser | 2 +- pinyadmin/sbin/rmrepo | 2 +- 5 files changed, 8 insertions(+), 5 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]] +* Status: [[!taglink closed]] * Assigned to: [[!taglink jrayhawk]], [[!taglink jblake]] * Priority: [[!taglink now]] * 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/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 ) { -- cgit v1.2.3 From d49f1aac6be76650ada9d9b26c85578b5d7d83e7 Mon Sep 17 00:00:00 2001 From: "jrayhawk+piny.be@omgwallhack.org" Date: Wed, 27 Apr 2011 19:58:46 -0700 Subject: pinyweb: adding dependencies to control file --- pinyweb/debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- cgit v1.2.3 From a6f148c4c72b0242ed11a52cf6b2ad30bbeb2028 Mon Sep 17 00:00:00 2001 From: "jrayhawk+piny.be@omgwallhack.org" Date: Wed, 27 Apr 2011 20:01:39 -0700 Subject: newuser.cgi: switching Convert::Base32 syntax over to MIME::Base32 syntax --- pinyweb/cgi-bin/newuser.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pinyweb/cgi-bin/newuser.cgi b/pinyweb/cgi-bin/newuser.cgi index 0fad219..43c9178 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") && $q->param("h") eq $code ) { -- cgit v1.2.3 From e8a45817104834f42bdf039c4466569f23f675d1 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Mon, 2 May 2011 21:09:11 -0700 Subject: Yeah, we probably shouldn't randomly truncate packed-refs. --- libpiny/lib/Piny/Repo.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index be363bd..b81f9bf 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 $s->path . "/" . $_ ) { + open( TOUCH, ">", $repo->path . "/" . $_ ) or die "Could not touch $_ for repo: $!"; + close( TOUCH ); + }; }; foreach( "info", "logs" ) { -- cgit v1.2.3 From e3e99770ed9a3b00b383fbcb4eaf009f0e22ac8c Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Mon, 2 May 2011 21:14:49 -0700 Subject: Fix syntax error with previous commit. --- libpiny/lib/Piny/Repo.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index b81f9bf..cfe7b1d 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -395,7 +395,7 @@ 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" ) { - unless( -e $s->path . "/" . $_ ) { + unless( -e $repo->path . "/" . $_ ) { open( TOUCH, ">", $repo->path . "/" . $_ ) or die "Could not touch $_ for repo: $!"; close( TOUCH ); }; -- cgit v1.2.3 From 4277b3c43a3c8a491974b99ae31e64b8e3c47fb6 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Tue, 3 May 2011 20:18:38 -0700 Subject: Make pinyconfigs only Recommend: pinyweb --- pinyconfigs/debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. . -- cgit v1.2.3