From 10f282b3a4930a84cdca247e4bb771f428bd778e Mon Sep 17 00:00:00 2001 From: "jrayhawk+piny.be@omgwallhack.org" Date: Mon, 20 Dec 2010 21:42:14 -0800 Subject: Make builddebs usable by people other than Jules --- builddebs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/builddebs b/builddebs index 287457d..d06c554 100755 --- a/builddebs +++ b/builddebs @@ -5,13 +5,19 @@ set -o pipefail if ls *.changes > /dev/null 2> /dev/null; then 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 pinyadmin pinyconfigs; do (cd "$SOURCE"; debuild $SIGNARGS -tc "$@"); done echo echo -n "Install packages on this machine? (y/N) " @@ -29,4 +35,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 -- cgit v1.2.3 From a672e2c082559edfcf686199eeef2411abe78ab0 Mon Sep 17 00:00:00 2001 From: "jrayhawk+piny.be@omgwallhack.org" Date: Mon, 20 Dec 2010 22:11:32 -0800 Subject: Make Piny::Config deal with empty config files a bit more gracefully. --- libpiny/lib/Piny/Config.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- cgit v1.2.3 From db57ebeeccaacf08c62dc7c12455138608b247b9 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Mon, 20 Dec 2010 22:28:55 -0800 Subject: Add an echo for interface consistency. --- builddebs | 1 + 1 file changed, 1 insertion(+) diff --git a/builddebs b/builddebs index d06c554..b3a226b 100755 --- a/builddebs +++ b/builddebs @@ -4,6 +4,7 @@ set -e set -o pipefail if ls *.changes > /dev/null 2> /dev/null; then + echo echo ".changes files already exist!" echo -n "Clean repo before building? (y/N) " read -n 1 PRECLEAN -- cgit v1.2.3 From 599d8ef054d361982a48216063b04038fe2bcb7a Mon Sep 17 00:00:00 2001 From: "jrayhawk+piny.be@omgwallhack.org" Date: Tue, 21 Dec 2010 01:00:37 -0800 Subject: Adding build and config infrastructure for Piny CGIs --- builddebs | 2 +- pinyconfigs/etc/apache2/sites-available/piny | 12 ++++++++++++ pinyweb/Makefile | 5 +++++ pinyweb/cgi-bin/piny-newuser.cgi | 9 +++++++++ pinyweb/debian/changelog | 5 +++++ pinyweb/debian/compat | 1 + pinyweb/debian/control | 14 ++++++++++++++ pinyweb/debian/copyright | 3 +++ pinyweb/debian/rules | 4 ++++ pinyweb/debian/source/format | 1 + 10 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 pinyweb/Makefile create mode 100644 pinyweb/cgi-bin/piny-newuser.cgi create mode 100644 pinyweb/debian/changelog create mode 100644 pinyweb/debian/compat create mode 100644 pinyweb/debian/control create mode 100644 pinyweb/debian/copyright create mode 100755 pinyweb/debian/rules create mode 100644 pinyweb/debian/source/format diff --git a/builddebs b/builddebs index d06c554..25b6147 100755 --- a/builddebs +++ b/builddebs @@ -17,7 +17,7 @@ read -n 1 SIGN echo if [ "$SIGN" == "y" ]; then SIGNARGS=""; else SIGNARGS="-uc -us"; fi -for SOURCE in libpiny piny pinyadmin pinyconfigs; do (cd "$SOURCE"; debuild $SIGNARGS -tc "$@"); done +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) " 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 + + AuthPAM_Enabled on + AuthGROUP_Enabled on + AuthPAM_FallThrough off + AuthBasicAuthoritative off + AuthType Basic + AuthName "User account for piny.be needed." + Require valid-user + + 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 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 +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 +Copyright © 2010 Julian Blake Kongslie +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) -- cgit v1.2.3