From b668a392de1229c0c4598597ad0c71ac82e13782 Mon Sep 17 00:00:00 2001 From: Dragan Dosen Date: Thu, 15 Aug 2013 21:08:17 +0200 Subject: [PATCH] Prva inacica paketa za Debian wheezy distribuciju. --- README.CARNet | 3 +-- debian/changelog | 13 +++++++++++++ debian/compat | 2 +- debian/control | 18 +++++++++--------- debian/copyright | 2 +- debian/postinst | 44 +++++++++++++++++++++++++++++--------------- debian/source/format | 1 + 7 files changed, 55 insertions(+), 28 deletions(-) create mode 100644 debian/source/format diff --git a/README.CARNet b/README.CARNet index bb905e5..e47c68e 100644 --- a/README.CARNet +++ b/README.CARNet @@ -16,5 +16,4 @@ sadrzi popis korisnika i zaporke nalazi se na lokaciji: Pocetna zaporka za pristup je poslana root korisniku prilikom instalacije paketa. - - -- Dragan Dosen Sat, 30 Apr 2011 12:31:10 +0200 + -- Dragan Dosen Tue, 13 Aug 2013 12:44:03 +0200 diff --git a/debian/changelog b/debian/changelog index 74e6c2f..d25b3f1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +webalizer-cn (2.23.05+1) stable; urgency=low + + * Prva inacica paketa za Debian wheezy distribuciju. + * Azurirane datoteke debian/README.CARNet, debian/copyright, + debian/compat i ovisnosti unutar debian/control. + * Dodana datoteka debian/source/format. + * debian/postinst - dodatne provjere konfiguracije, reload Apache2 + samo u slucaju azuriranja Webalizer konfiguracije, preskakanje + datoteke /var/www/webalizer/.htpasswd ako se ustanovi da je + vrijednost za OutputDir razlicita od one koja je zadana paketom. + + -- Dragan Dosen Tue, 13 Aug 2013 12:44:03 +0200 + webalizer-cn (2.01.10+2) stable; urgency=low * Promjena e-mail adrese odrzavatelja paketa. diff --git a/debian/compat b/debian/compat index 7f8f011..45a4fb7 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +8 diff --git a/debian/control b/debian/control index f52e3a0..a6fc252 100644 --- a/debian/control +++ b/debian/control @@ -2,20 +2,20 @@ Source: webalizer-cn Section: web Priority: optional Maintainer: Dragan Dosen -Build-Depends: debhelper (>= 7) -Standards-Version: 3.9.1 +Build-Depends: debhelper (>= 8.0.0) +Standards-Version: 3.9.3 Package: webalizer-cn Architecture: all -Pre-Depends: apache2-cn (>= 2.2) -Depends: webalizer (>= 2.01.10-32.7), makepasswd, carnet-tools-cn (>= 3.0.0), ${misc:Depends} +Pre-Depends: apache2-cn (>= 2.2.22+1) +Depends: webalizer (>= 2.23.05-1), makepasswd, carnet-tools-cn (>= 3.0.4), ${misc:Depends} Description: web server log analysis program The Webalizer was designed to scan web server log files in various formats - and produce usage statistics in HTML format for viewing through a browser. - The Webalizer produces yearly, monthly, daily and hourly statistics. In the - monthly reports, various statistics may be produced to show overall usage, - usage by day and hour, usage by visiting sites, URLs, user agents - (browsers), referrers and country. The Webalizer is highly configurable by + and produce usage statistics in HTML format for viewing through a browser. + The Webalizer produces yearly, monthly, daily and hourly statistics. In + the monthly reports, various statistics may be produced to show overall + usage, usage by day and hour, usage by visiting sites, URLs, user agents + (browsers), referrers and country. The Webalizer is highly configurable by use of either command line options or a configuration file, allowing the program to be tailored to individual needs easily. . diff --git a/debian/copyright b/debian/copyright index 5350ae7..dd9254d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,4 +1,4 @@ -Copyright 2011 CARNet +Copyright 2013 CARNet You are free to distribute this software package under the terms of the GNU General Public License. diff --git a/debian/postinst b/debian/postinst index 6d76d60..2203c52 100755 --- a/debian/postinst +++ b/debian/postinst @@ -35,6 +35,8 @@ WCONFBAK=`basename $WCONF` oldreporttitle="usage statistics for" reporttitle="Statistika pristupa za" +customized=0 +need_restart=0 if [ -f "$WCONF" ]; then @@ -46,7 +48,9 @@ if [ -f "$WCONF" ]; then # Check for OutputDir temp=`awk 'tolower($1) == "outputdir" { print $2; }' $WCONF | tail -n 1` if [ "$temp" != "$WDIR" ]; then + cp_echo "CN: Found custom OutputDir value: $temp" db_set webalizer/directory "$temp" || true + customized=1 fi # Check for ReportTitle @@ -58,9 +62,11 @@ if [ -f "$WCONF" ]; then "s/$temp_re/ReportTitle ${reporttitle}/I" \ "$WCONF" || true db_set webalizer/doc_title "$reporttitle" || true + need_restart=1 fi else cp_echo "CN: Configuration file $WCONF is missing." + customized=1 fi db_stop || true @@ -68,26 +74,34 @@ db_stop || true # Check Apache2 web server configuration and reload Apache2 web server. # -if apache2ctl configtest 2>/dev/null; then - invoke-rc.d apache2 force-reload || true -else - # Something is broken. - cp_echo "CN: Your Apache2 configuration is broken." - cp_echo "CN: Please, check the service after the installation finishes!" +if [ $need_restart -eq 1 ]; then + if apache2ctl configtest 2>/dev/null; then + invoke-rc.d apache2 force-reload || true + else + # Something is broken. + cp_echo "CN: Your Apache2 configuration is broken." + cp_echo "CN: Please, check the service after the installation finishes!" + fi fi # Generate e-mail message with informations (username and password). # -if [ ! -f "$WHTPASSWD" ]; then - passwd="$(makepasswd --chars 8)" - htpasswd -bcm $WHTPASSWD admin $passwd 2> /dev/null - cp_echo "" - cp_echo "CN: Webalizer URL is http://`hostname -f`/stats/" - cp_echo "CN: User: admin" - cp_echo "CN: Password: $passwd" - cp_echo "" - cp_echo "CN: Use \"htpasswd -m $WHTPASSWD admin\" to change it." +if [ $customized -eq 0 ]; then + if [ ! -f "$WHTPASSWD" ]; then + passwd="$(makepasswd --chars 8)" + htpasswd -bcm $WHTPASSWD admin $passwd 2> /dev/null + cp_echo "" + cp_echo "CN: Webalizer URL is http://`hostname -f`/stats/" + cp_echo "CN: User: admin" + cp_echo "CN: Password: $passwd" + cp_echo "" + cp_echo "CN: Use \"htpasswd -m $WHTPASSWD admin\" to change it." + else + cp_echo "CN: File $WHTPASSWD already exists." + fi +else + cp_echo "CN: Skipping file $WHTPASSWD" fi # Mail root. diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) -- 1.7.10.4