summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@richardiv.omgwallhack.org>2010-12-27 01:23:57 -0800
committerJoe Rayhawk <jrayhawk@richardiv.omgwallhack.org>2010-12-27 01:23:57 -0800
commit875650426369fb2607b6179883141f3adfe42359 (patch)
tree20d614b74a4996b6e4e86155265b2c425266474e
parent7bf6a597faf653358d83f6c8ca54843ffc43c782 (diff)
parent8f342b641236d9c15530664c00889d00635b61f6 (diff)
downloadpiny-code-875650426369fb2607b6179883141f3adfe42359.tar.gz
piny-code-875650426369fb2607b6179883141f3adfe42359.zip
Merge branch 'master' of piny.be:/srv/git/piny-code
-rwxr-xr-xbuilddebs15
-rw-r--r--libpiny/lib/Piny/Config.pm8
-rw-r--r--pinyconfigs/etc/apache2/sites-available/piny12
-rw-r--r--pinyweb/Makefile5
-rw-r--r--pinyweb/cgi-bin/piny-newuser.cgi9
-rw-r--r--pinyweb/debian/changelog5
-rw-r--r--pinyweb/debian/compat1
-rw-r--r--pinyweb/debian/control14
-rw-r--r--pinyweb/debian/copyright3
-rwxr-xr-xpinyweb/debian/rules4
-rw-r--r--pinyweb/debian/source/format1
11 files changed, 69 insertions, 8 deletions
diff --git a/builddebs b/builddebs
index 287457d..c75c43d 100755
--- a/builddebs
+++ b/builddebs
@@ -4,14 +4,21 @@ set -e
set -o pipefail
if ls *.changes > /dev/null 2> /dev/null; then
+ echo
echo ".changes files already exist!"
- echo "Clean repo before building? (y/N) "
+ echo -n "Clean repo before building? (y/N) "
read -n 1 PRECLEAN
echo
- if [ "$PRECLEAN" == "y" ]; then git clean; else exit 1; fi
+ if [ "$PRECLEAN" == "y" ]; then git clean -f; else exit 1; fi
fi
-for SOURCE in libpiny piny pinyadmin pinyconfigs; do (cd "$SOURCE"; debuild -tc "$@"); done
+echo
+echo -n "Sign built packages? (y/N) "
+read -n 1 SIGN
+echo
+if [ "$SIGN" == "y" ]; then SIGNARGS=""; else SIGNARGS="-uc -us"; fi
+
+for SOURCE in libpiny piny pinyweb pinyadmin pinyconfigs; do (cd "$SOURCE"; debuild $SIGNARGS -tc "$@"); done
echo
echo -n "Install packages on this machine? (y/N) "
@@ -29,4 +36,4 @@ echo
echo -n "Clean repo? (y/N) "
read -n 1 CLEAN
echo
-if [ "$CLEAN" == "y" ]; then git clean; fi
+if [ "$CLEAN" == "y" ]; then git clean -f; fi
diff --git a/libpiny/lib/Piny/Config.pm b/libpiny/lib/Piny/Config.pm
index 1242c8f..5cd99da 100644
--- a/libpiny/lib/Piny/Config.pm
+++ b/libpiny/lib/Piny/Config.pm
@@ -85,7 +85,7 @@ sub _build__conf {
$conf = { };
};
- if ( -e "/etc/piny-default.conf" ) {
+ if ( -s "/etc/piny-default.conf" ) {
my $default = Config::Simple->new( "/etc/piny-default.conf" )->vars;
@@ -97,7 +97,7 @@ sub _build__conf {
};
- if ( -e "/etc/piny-override.conf" ) {
+ if ( -s "/etc/piny-override.conf" ) {
my $override = Config::Simple->new( "/etc/piny-override.conf" )->vars;
@@ -119,7 +119,7 @@ sub save {
croak "Can't save a Piny::Config if the confpath is not set!";
};
- if ( -e "/etc/piny-override.conf" ) {
+ if ( -s "/etc/piny-override.conf" ) {
my $override = Config::Simple->new( "/etc/piny-override.conf" )->vars;
@@ -131,7 +131,7 @@ sub save {
};
- if ( -e "/etc/piny-default.conf" ) {
+ if ( -s "/etc/piny-default.conf" ) {
my $default = Config::Simple->new( "/etc/piny-default.conf" )->vars;
diff --git a/pinyconfigs/etc/apache2/sites-available/piny b/pinyconfigs/etc/apache2/sites-available/piny
index 05808f4..6dbbf87 100644
--- a/pinyconfigs/etc/apache2/sites-available/piny
+++ b/pinyconfigs/etc/apache2/sites-available/piny
@@ -48,7 +48,19 @@
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
</Directory>
+ <Directory "/usr/lib/cgi-bin/piny">
+ AuthPAM_Enabled on
+ AuthGROUP_Enabled on
+ AuthPAM_FallThrough off
+ AuthBasicAuthoritative off
+ AuthType Basic
+ AuthName "User account for piny.be needed."
+ Require valid-user
+ </Directory>
+
ScriptAlias /cgit /usr/lib/cgi-bin/cgit.cgi
+ ScriptAlias /piny-newuser /usr/lib/cgi-bin/piny-newuser.cgi
+ ScriptAlias /piny/ /usr/lib/cgi-bin/piny/
Include /etc/apache2/piny-enabled
diff --git a/pinyweb/Makefile b/pinyweb/Makefile
new file mode 100644
index 0000000..5b1f010
--- /dev/null
+++ b/pinyweb/Makefile
@@ -0,0 +1,5 @@
+build:
+
+install:
+ install -o root -g root -m 755 -d $(DESTDIR)/usr/lib/cgi-bin
+ install -o root -g root -m 755 cgi-bin/* $(DESTDIR)/usr/lib/cgi-bin
diff --git a/pinyweb/cgi-bin/piny-newuser.cgi b/pinyweb/cgi-bin/piny-newuser.cgi
new file mode 100644
index 0000000..d10c6ba
--- /dev/null
+++ b/pinyweb/cgi-bin/piny-newuser.cgi
@@ -0,0 +1,9 @@
+#!/usr/bin/perl
+
+use warnings;
+
+use CGI;
+
+print 'Content-type: text/plain
+
+hello'
diff --git a/pinyweb/debian/changelog b/pinyweb/debian/changelog
new file mode 100644
index 0000000..e8e9f8d
--- /dev/null
+++ b/pinyweb/debian/changelog
@@ -0,0 +1,5 @@
+pinyweb (0.1) unstable; urgency=low
+
+ * Initial release.
+
+ -- jrayhawk+piny.be@omgwallhack.org <jrayhawk@dev.piny.svcs.cs.pdx.edu> Mon, 20 Dec 2010 22:38:02 -0800
diff --git a/pinyweb/debian/compat b/pinyweb/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/pinyweb/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/pinyweb/debian/control b/pinyweb/debian/control
new file mode 100644
index 0000000..6abae90
--- /dev/null
+++ b/pinyweb/debian/control
@@ -0,0 +1,14 @@
+Source: pinyweb
+Maintainer: Julian Blake Kongslie <jblake@omgwallhack.org>
+Section: admin
+Build-depends: debhelper (>= 7)
+Priority: extra
+Homepage: http://www.piny.be/piny-code/
+Standards-version: 3.8.4
+
+Package: pinyweb
+Architecture: all
+Depends: ${perl:Depends}, ${misc:Depends}, libpiny-perl (>= 0.14)
+Description: CGIs for managing piny repositories
+ The CGI programs for day-to-day administrative tasks in the Piny
+ infrastructure.
diff --git a/pinyweb/debian/copyright b/pinyweb/debian/copyright
new file mode 100644
index 0000000..9d12aab
--- /dev/null
+++ b/pinyweb/debian/copyright
@@ -0,0 +1,3 @@
+Copyright © 2010 Joe Rayhawk <jrayhawk@omgwallhack.org>
+Copyright © 2010 Julian Blake Kongslie <jblake@omgwallhack.org>
+Licensed under the BSD 3-clause license.
diff --git a/pinyweb/debian/rules b/pinyweb/debian/rules
new file mode 100755
index 0000000..2d33f6a
--- /dev/null
+++ b/pinyweb/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
diff --git a/pinyweb/debian/source/format b/pinyweb/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/pinyweb/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)