From 4d04a25b6c3054499f7fcbe774f0af39feb30654 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 8 Dec 2012 16:50:11 +0100 Subject: REMOTE_HOST seems to be tricky, so 'properly' work around it... --- etc/apache2/sites-available/jenkins.debian.net | 2 ++ etc/cron.daily/jenkins | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 etc/cron.daily/jenkins (limited to 'etc') diff --git a/etc/apache2/sites-available/jenkins.debian.net b/etc/apache2/sites-available/jenkins.debian.net index ddd739ee..0a6f3d09 100644 --- a/etc/apache2/sites-available/jenkins.debian.net +++ b/etc/apache2/sites-available/jenkins.debian.net @@ -24,7 +24,9 @@ # allow certain params only from alioth (token is used to trigger builds) RewriteEngine on RewriteCond %{REMOTE_ADDR} !217\.196\.43\.140 + # git.d.o is really vasks.d.o, so just allowing this trigger from any debian host should be fine. Anyone can run curl on alioth anyway #RewriteCond %{REMOTE_HOST} !.*.debian.org + # FIXME: REMOTE_HOST surely must work somehow? Also see etc/cron.daily/jenkins RewriteCond %{QUERY_STRING} token RewriteRule ^ - [F] diff --git a/etc/cron.daily/jenkins b/etc/cron.daily/jenkins new file mode 100644 index 00000000..8100995e --- /dev/null +++ b/etc/cron.daily/jenkins @@ -0,0 +1,9 @@ +#!/bin/sh + +# maybe I'm too stupid to use apaches REMOTE_HOST directive correctly +# I couldn't get it to work. so I use REMOTE_ADDR... +# see etc/apache2/sites-available/jenkins.debian.net + +if [ "$(host git.debian.org)" != "git.debian.org has address 217.196.43.140" ] ; then + echo "IP address of git.debian.org has changed, please update etc/apache2/sites-available/jenkins.debian.net and etc/cron.daily/jenkins" +fi -- cgit v1.2.3-70-g09d2