[freeside-commits] branch master updated. 737c5d8b82defb7e3e40a14ee33c4f80c64a8f71

Ivan ivan at 420.am
Thu Feb 7 21:12:28 PST 2013


The branch, master has been updated
       via  737c5d8b82defb7e3e40a14ee33c4f80c64a8f71 (commit)
       via  154b0303d425ad2d670dd3ae74fd78d1bbff7f14 (commit)
       via  b808053966fd3c43edefa1b7c4b93cbeb7cf546e (commit)
       via  d14c7526763013113dcddd4ec60c383a5f1c5473 (commit)
       via  ef43d389f50b6ebbbca5a511d262c6da9ccb2c5c (commit)
      from  fed12e8214a8a951377961ccbe7a09171b1e38c2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 737c5d8b82defb7e3e40a14ee33c4f80c64a8f71
Merge: 154b030 fed12e8
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Feb 7 21:12:22 2013 -0800

    Merge branch 'master' of git.freeside.biz:/home/git/freeside


commit 154b0303d425ad2d670dd3ae74fd78d1bbff7f14
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Feb 7 21:11:22 2013 -0800

    checkpoint deb packaging wip

diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index 4ea1678..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,3 +0,0 @@
-See:
-
-http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation#Installation_and_upgrades
diff --git a/etc/megapop.pl b/bin/megapop.pl
similarity index 100%
rename from etc/megapop.pl
rename to bin/megapop.pl
diff --git a/debian/config b/debian/OLD/config
similarity index 100%
rename from debian/config
rename to debian/OLD/config
diff --git a/debian/cron.d b/debian/OLD/cron.d
similarity index 100%
rename from debian/cron.d
rename to debian/OLD/cron.d
diff --git a/debian/dbconfig-common.install b/debian/OLD/dbconfig-common.install
similarity index 100%
rename from debian/dbconfig-common.install
rename to debian/OLD/dbconfig-common.install
diff --git a/debian/dbconfig-common.upgrade b/debian/OLD/dbconfig-common.upgrade
similarity index 100%
rename from debian/dbconfig-common.upgrade
rename to debian/OLD/dbconfig-common.upgrade
diff --git a/debian/freeside.apache-alias.conf b/debian/OLD/freeside.apache-alias.conf
similarity index 100%
rename from debian/freeside.apache-alias.conf
rename to debian/OLD/freeside.apache-alias.conf
diff --git a/debian/postinst b/debian/OLD/postinst
similarity index 100%
rename from debian/postinst
rename to debian/OLD/postinst
diff --git a/debian/postrm b/debian/OLD/postrm
similarity index 100%
rename from debian/postrm
rename to debian/OLD/postrm
diff --git a/debian/prerm b/debian/OLD/prerm
similarity index 100%
rename from debian/prerm
rename to debian/OLD/prerm
diff --git a/debian/TODO b/debian/TODO
index 15fed69..d2928e6 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -1,20 +1,57 @@
+--- High ---
+
+web stuff going to /var/www/freeside/masondocs oops
+
+apache configs going to
+./etc/freeside/apache2/freeside-rt.conf
+??  oh there's links etc.  check
+
+file
+./and..?/
+in freeside-lib?  oops wtf
+also
+./default_conf/
+and
+/#for/
+
+test actually installing!
+- FS files
+- /var/www/ files
+- what else should package install?
+  - init script
+  - apache config
+  - /usr/local/etc/freeside/default_conf for new installs
+
+test RT was missing, but we're cheating more now by ignoring a huge remap
+to deb policy-comliant paths.  get it working
+
+init.d/freeside-init
+htetc/handler.pl
+
+#copied to /usr/local/etc/freeside by make install-docs
+htetc/htpasswd.logout
+
+init.d/insserv-override-apache2
+
+etc/longtable.sty
+
+--- Medium --- 
 
 test) freeside-webui /etc/apache/conf.d/freeside.conf
   AuthUserFile is wrong (just fucked)
 
-test its working) somes sort of Alias /freeside /usr/share/freeside/www is needed
-
 test in postinst) freeside package var/cache/freeside/cache.<datasrc is missing>
 
-test RT is missing.  doh.  get it working.
-
-test actually installing!
+--- Low ---
 
---- rc2... right? ---
+bin/* ?  Anything here needed in a live customer install should be moved to FS/bin so it installs as part of the packaging.
 
 freeside-selfservice-client doesn't install at all
 
-start freeside-sqlradius-radacctd from /etc/default/freeside too
+--- Debian ---
+
+redo & test its working) somes sort of Alias /freeside /usr/share/freeside/www is needed
+/var/www/freeside -> /usr/lib/freeside and Alias in apache
 
 Added to README.Debian... do something else?
 Ensure apache is set to run as User freeside.
@@ -24,15 +61,9 @@ init.d.ex or init.d.lsb.ex
 
 finish 
 
-RT install locations (or for now: disable for unstable, enable for
-experiemental.  but try to get it finished off in time for lenny)
+RT install locations (?  maybe our RT libraries shouldn't conflict with
+upstream ones?)
 
 debian/copyright administrivia
 
-AGPL drama
-
 upload
-
-AGPL drama or silent waiting for days or years
-
-profit!  err
diff --git a/debian/changelog b/debian/changelog
index d070c46..0aadb48 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+freeside (3.0~20130205-1) UNRELEASED; urgency=low
+
+  * Another stab at packaging.
+
+ -- Ivan Kohler <ivan-debian at 420.am>  Tue, 05 Feb 2013 17:00:36 -0800
+
 freeside (2.1.1-1) UNRELEASED; urgency=low
 
   * New upstream release
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..45a4fb7 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+8
diff --git a/debian/control b/debian/control
index 4ea4815..1572406 100644
--- a/debian/control
+++ b/debian/control
@@ -5,20 +5,22 @@ Maintainer: Ivan Kohler <ivan-debian at 420.am>
 Build-Depends: debhelper (>= 5), perl (>= 5.8)
 Standards-Version: 3.7.2
 Homepage: http://www.freeside.biz/freeside
-Vcs-Browser: http://www.freeside.biz/cgi-bin/viewvc.cgi/freeside/
-Vcs-Cvs: :pserver:anonymous:anonymous at cvs.420.am:/home/cvs/cvsroot freeside
+#Vcs-Browser: http://www.freeside.biz/cgi-bin/viewvc.cgi/freeside/
+#Vcs-Cvs: :pserver:anonymous:anonymous at cvs.420.am:/home/cvs/cvsroot freeside
 
 Package: freeside
 Architecture: all
-Pre-Depends: freeside-lib, dbconfig-common
+Pre-Depends: freeside-lib
+# dbconfig-common
 Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}, freeside-webui, debconf, adduser (>= 3.11)
 Recommends: cron
 Suggests: gnupg
 Description: Billing and trouble ticketing for service providers
- Freeside is a web-based billing and trouble ticketing application.  It
- includes features for ISPs, hosting providers, and VoIP providers, but can
- also be used as a generic customer database, invoicing and membership
- application.  If you like buzzwords, call it an "BSS/OSS and CRM solution".
+ Freeside is a web-based billing, trouble ticketing and network monitoring
+ application.  It includes features for ISPs and WISPs, hosting providers and
+ VoIP providers, but can also be used as a generic customer database, invoicing
+ and membership application.  If you like buzzwords, you can call it a
+ "BSS/OSS and CRM solution".
 
 Package: freeside-lib
 Architecture: all
@@ -28,7 +30,9 @@ Suggests: libbusiness-onlinepayment-perl
 Description: Libraries for Freeside billing and trouble ticketing
  Freeside is a web-based billing and trouble ticketing application.
  .
- This package provides the perl libraries and command line utilities.
+ This package provides the perl libraries and command line utilities.  Also,
+ the init script and daemons used by the system are currently provided by this
+ package.
 
 #Package: freeside-bin
 #Architecture: all
diff --git a/debian/copyright b/debian/copyright
index c409cb9..e521a70 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -9,7 +9,7 @@ Upstream Author(s):
 
 Copyright: 
 
-Copyright (C) 2005-2008 Freeside Internet Services, Inc.
+Copyright (C) 2005-2013 Freeside Internet Services, Inc.
 Copyright (C) 2000-2005 Ivan Kohler
 Copyright (C) 1999 Silicon Interactive Software Design
 All rights reserved
diff --git a/debian/freeside.docs b/debian/freeside.docs
index e845566..f4a511b 100644
--- a/debian/freeside.docs
+++ b/debian/freeside.docs
@@ -1 +1,2 @@
 README
+AGPL
diff --git a/debian/init.d.ex b/debian/init.d.ex
deleted file mode 100644
index 2480f51..0000000
--- a/debian/init.d.ex
+++ /dev/null
@@ -1,157 +0,0 @@
-#! /bin/sh
-#
-# skeleton	example file to build /etc/init.d/ scripts.
-#		This file should be used to construct scripts for /etc/init.d.
-#
-#		Written by Miquel van Smoorenburg <miquels at cistron.nl>.
-#		Modified for Debian 
-#		by Ian Murdock <imurdock at gnu.ai.mit.edu>.
-#               Further changes by Javier Fernandez-Sanguino <jfs at debian.org>
-#
-# Version:	@(#)skeleton  1.9  26-Feb-2001  miquels at cistron.nl
-#
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/sbin/freeside
-NAME=freeside
-DESC=freeside
-
-test -x $DAEMON || exit 0
-
-LOGDIR=/var/log/freeside
-PIDFILE=/var/run/$NAME.pid
-DODTIME=1                   # Time to wait for the server to die, in seconds
-                            # If this value is set too low you might not
-                            # let some servers to die gracefully and
-                            # 'restart' will not work
-
-# Include freeside defaults if available
-if [ -f /etc/default/freeside ] ; then
-	. /etc/default/freeside
-fi
-
-set -e
-
-running_pid()
-{
-    # Check if a given process pid's cmdline matches a given name
-    pid=$1
-    name=$2
-    [ -z "$pid" ] && return 1 
-    [ ! -d /proc/$pid ] &&  return 1
-    cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
-    # Is this the expected child?
-    [ "$cmd" != "$name" ] &&  return 1
-    return 0
-}
-
-running()
-{
-# Check if the process is running looking at /proc
-# (works for all users)
-
-    # No pidfile, probably no daemon present
-    [ ! -f "$PIDFILE" ] && return 1
-    # Obtain the pid and check it against the binary name
-    pid=`cat $PIDFILE`
-    running_pid $pid $NAME || return 1
-    return 0
-}
-
-force_stop() {
-# Forcefully kill the process
-    [ ! -f "$PIDFILE" ] && return
-    if running ; then
-        kill -15 $pid
-        # Is it really dead?
-        [ -n "$DODTIME" ] && sleep "$DODTIME"s
-        if running ; then
-            kill -9 $pid
-            [ -n "$DODTIME" ] && sleep "$DODTIME"s
-            if running ; then
-                echo "Cannot kill $LABEL (pid=$pid)!"
-                exit 1
-            fi
-        fi
-    fi
-    rm -f $PIDFILE
-    return 0
-}
-
-case "$1" in
-  start)
-	echo -n "Starting $DESC: "
-	start-stop-daemon --start --quiet --pidfile $PIDFILE \
-		--exec $DAEMON -- $DAEMON_OPTS
-        if running then
-            echo "$NAME."
-        else
-            echo " ERROR."
-        fi
-	;;
-  stop)
-	echo -n "Stopping $DESC: "
-	start-stop-daemon --stop --quiet --pidfile $PIDFILE \
-		--exec $DAEMON
-	echo "$NAME."
-	;;
-  force-stop)
-	echo -n "Forcefully stopping $DESC: "
-        force_stop
-        if ! running then
-            echo "$NAME."
-        else
-            echo " ERROR."
-        fi
-	;;
-  #reload)
-	#
-	#	If the daemon can reload its config files on the fly
-	#	for example by sending it SIGHUP, do it here.
-	#
-	#	If the daemon responds to changes in its config file
-	#	directly anyway, make this a do-nothing entry.
-	#
-	# echo "Reloading $DESC configuration files."
-	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
-	#	/var/run/$NAME.pid --exec $DAEMON
-  #;;
-  force-reload)
-	#
-	#	If the "reload" option is implemented, move the "force-reload"
-	#	option to the "reload" entry above. If not, "force-reload" is
-	#	just the same as "restart" except that it does nothing if the
-	#   daemon isn't already running.
-	# check wether $DAEMON is running. If so, restart
-	start-stop-daemon --stop --test --quiet --pidfile \
-		/var/run/$NAME.pid --exec $DAEMON \
-	&& $0 restart \
-	|| exit 0
-	;;
-  restart)
-    echo -n "Restarting $DESC: "
-	start-stop-daemon --stop --quiet --pidfile \
-		/var/run/$NAME.pid --exec $DAEMON
-	[ -n "$DODTIME" ] && sleep $DODTIME
-	start-stop-daemon --start --quiet --pidfile \
-		/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
-	echo "$NAME."
-	;;
-  status)
-    echo -n "$LABEL is "
-    if running ;  then
-        echo "running"
-    else
-        echo " not running."
-        exit 1
-    fi
-    ;;
-  *)
-	N=/etc/init.d/$NAME
-	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
-	echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
-	exit 1
-	;;
-esac
-
-exit 0
diff --git a/debian/init.d.lsb.ex b/debian/init.d.lsb.ex
deleted file mode 100644
index 1223129..0000000
--- a/debian/init.d.lsb.ex
+++ /dev/null
@@ -1,281 +0,0 @@
-#!/bin/sh 
-#
-# Example init.d script with LSB support.
-#
-# Please read this init.d carefully and modify the sections to
-# adjust it to the program you want to run.
-#
-# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs at debian.org>
-#
-# This is free software; you may redistribute it and/or modify
-# it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2,
-# or (at your option) any later version.
-#
-# This is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License with
-# the Debian operating system, in /usr/share/common-licenses/GPL;  if
-# not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
-#
-### BEGIN INIT INFO
-# Provides:          freeside
-# Required-Start:    $network $local_fs
-# Required-Stop:     
-# Should-Start:      $named
-# Should-Stop:       
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: <Enter a short description of the sortware>
-# Description:       <Enter a long description of the software>
-#                    <...>
-#                    <...>
-### END INIT INFO
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-
-DAEMON=/usr/sbin/freeside # Introduce the server's location here
-NAME=#PACKAGE              # Introduce the short server's name here
-DESC=#PACKAGE              # Introduce a short description here
-LOGDIR=/var/log/freeside  # Log directory to use
-
-PIDFILE=/var/run/$NAME.pid 
-
-test -x $DAEMON || exit 0
-test -x $DAEMON_WRAPPER || exit 0
-
-. /lib/lsb/init-functions
-
-# Default options, these can be overriden by the information
-# at /etc/default/$NAME
-DAEMON_OPTS=""          # Additional options given to the server 
-
-DODTIME=10              # Time to wait for the server to die, in seconds
-                        # If this value is set too low you might not
-                        # let some servers to die gracefully and
-                        # 'restart' will not work
-                        
-LOGFILE=$LOGDIR/$NAME.log  # Server logfile
-#DAEMONUSER=freeside   # Users to run the daemons as. If this value
-                        # is set start-stop-daemon will chuid the server
-
-# Include defaults if available
-if [ -f /etc/default/$NAME ] ; then
-	. /etc/default/$NAME
-fi
-
-# Use this if you want the user to explicitly set 'RUN' in 
-# /etc/default/
-#if [ "x$RUN" != "xyes" ] ; then
-#    log_failure_msg "$NAME disabled, please adjust the configuration to your needs "
-#    log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it."
-#    exit 1
-#fi
-
-# Check that the user exists (if we set a user)
-# Does the user exist?
-if [ -n "$DAEMONUSER" ] ; then
-    if getent passwd | grep -q "^$DAEMONUSER:"; then
-        # Obtain the uid and gid
-        DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'`
-        DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'`
-    else
-        log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist."
-        exit 1
-    fi
-fi
-
-
-set -e
-
-running_pid() {
-# Check if a given process pid's cmdline matches a given name
-    pid=$1
-    name=$2
-    [ -z "$pid" ] && return 1 
-    [ ! -d /proc/$pid ] &&  return 1
-    cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
-    # Is this the expected server
-    [ "$cmd" != "$name" ] &&  return 1
-    return 0
-}
-
-running() {
-# Check if the process is running looking at /proc
-# (works for all users)
-
-    # No pidfile, probably no daemon present
-    [ ! -f "$PIDFILE" ] && return 1
-    pid=`cat $PIDFILE`
-    running_pid $pid $DAEMON_WRAPPER || return 1
-    return 0
-}
-
-start_server() {
-# Start the process using the wrapper
-        if [ -z "$DAEMONUSER" ] ; then
-            start-stop-daemon --start --quiet --pidfile $PIDFILE \
-                        --exec $DAEMON -- $DAEMON_OPTS
-            errcode=$?
-        else
-# if we are using a daemonuser then change the user id
-            start-stop-daemon --start --quiet --pidfile $PIDFILE \
-                        --chuid $DAEMONUSER \
-                        --exec $DAEMON -- $DAEMON_OPTS
-            errcode=$?
-        fi
-	return $errcode
-}
-
-stop_server() {
-# Stop the process using the wrapper
-        if [ -z "$DAEMONUSER" ] ; then
-            start-stop-daemon --stop --quiet --pidfile $PIDFILE \
-                        --exec $DAEMON
-            errcode=$
-        else
-# if we are using a daemonuser then look for process that match
-            start-stop-daemon --stop --quiet --pidfile $PIDFILE \
-                        --user $DAEMONUSER \
-                        --exec $DAEMON
-            errcode=$
-        fi
-
-	return $errcode
-}
-
-reload_server() {
-    [ ! -f "$PIDFILE" ] && return 1
-    pid=`cat $PIDFILE` # This is the daemon's pid
-    # Send a SIGHUP
-    kill -1 $pid
-    return $?
-}
-
-force_stop() {
-# Force the process to die killing it manually
-	[ ! -e "$PIDFILE" ] && return
-	if running ; then
-		kill -15 $pid
-	# Is it really dead?
-		sleep "$DIETIME"s
-		if running ; then
-			kill -9 $pid
-			sleep "$DIETIME"s
-			if running ; then
-				echo "Cannot kill $NAME (pid=$pid)!"
-				exit 1
-			fi
-		fi
-	fi
-	rm -f $PIDFILE
-}
-
-
-case "$1" in
-  start)
-	log_daemon_msg "Starting $DESC " "$NAME"
-        # Check if it's running first
-        if running ;  then
-            log_progress_msg "apparently already running"
-            log_end_msg 0
-            exit 0
-        fi
-        if start_server && running ;  then
-            # It's ok, the server started and is running
-            log_end_msg 0
-        else
-            # Either we could not start it or it is not running
-            # after we did
-            # NOTE: Some servers might die some time after they start,
-            # this code does not try to detect this and might give
-            # a false positive (use 'status' for that)
-            log_end_msg 1
-        fi
-	;;
-  stop)
-        log_daemon_msg "Stopping $DESC" "$NAME"
-        if running ; then
-            # Only stop the server if we see it running
-            stop_server
-            log_end_msg $?
-        else
-            # If it's not running don't do anything
-            log_progress_msg "apparently not running"
-            log_end_msg 0
-            exit 0
-        fi
-        ;;
-  force-stop)
-        # First try to stop gracefully the program
-        $0 stop
-        if running; then
-            # If it's still running try to kill it more forcefully
-            log_daemon_msg "Stopping (force) $DESC" "$NAME"
-            force_stop
-            log_end_msg $?
-        fi
-	;;
-  restart|force-reload)
-        log_daemon_msg "Restarting $DESC" "$NAME"
-        stop_server
-        # Wait some sensible amount, some server need this
-        [ -n "$DIETIME" ] && sleep $DIETIME
-        start_server
-        running
-        log_end_msg $?
-	;;
-  status)
-
-        log_daemon_msg "Checking status of $DESC" "$NAME"
-        if running ;  then
-            log_progress_msg "running"
-            log_end_msg 0
-        else
-            log_progress_msg "apparently not running"
-            log_end_msg 1
-            exit 1
-        fi
-        ;;
-  # Use this if the daemon cannot reload
-  reload)
-        log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon"
-        log_warning_msg "cannot re-read the config file (use restart)."
-        ;;
-  # And this if it cann
-  #reload)
-          #
-          # If the daemon can reload its config files on the fly
-          # for example by sending it SIGHUP, do it here.
-          #
-          # If the daemon responds to changes in its config file
-          # directly anyway, make this a do-nothing entry.
-          #
-          # log_daemon_msg "Reloading $DESC configuration files" "$NAME"
-          # if running ; then
-          #    reload_server
-          #    if ! running ;  then
-          # Process died after we tried to reload
-          #       log_progress_msg "died on reload"
-          #       log_end_msg 1
-          #       exit 1
-          #    fi
-          # else
-          #    log_progress_msg "server is not running"
-          #    log_end_msg 1
-          #    exit 1
-          # fi
-                                                                                    #;;
-
-  *)
-	N=/etc/init.d/$NAME
-	echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
-	exit 1
-	;;
-esac
-
-exit 0
diff --git a/debian/rules b/debian/rules
index d37dfd1..a8835e5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,30 +12,37 @@ PERL   ?= /usr/bin/perl
 #PACKAGE = $(shell dh_listpackages)
 PACKAGE = freeside
 TMP     = $(CURDIR)/debian/$(PACKAGE)
-DBC_SCRIPTS = $(TMP)/usr/share/dbconfig-common/scripts/freeside
+#DBC_SCRIPTS = $(TMP)/usr/share/dbconfig-common/scripts/freeside
 
-#this is gotten from dbconfig-common
-DB_TYPE = db_type_is_configured_during_pkg_install_by_dbconfig-common_not_at_build_time
+##this is gotten from dbconfig-common
+#DB_TYPE = db_type_is_configured_during_pkg_install_by_dbconfig-common_not_at_build_time
 
 #no chance, it doesn't get backslash-interpolted now...
-#DEBVERSION                    = `head -1 debian/changelog | cut -d')' -f1 | cut -c11-`
-DEBVERSION                    = 1.7.3~rc2-1
-export VERSION                = $(DEBVERSION) (Debian)
+##DEBVERSION                    = `head -1 debian/changelog | cut -d')' -f1 | cut -c11-`
+#DEBVERSION                    = 1.7.3~rc2-1
+#export VERSION                = $(DEBVERSION) (Debian)
 
-export FREESIDE_CONF          = /etc/freeside
-export FREESIDE_LOG           = /var/log/freeside
-export FREESIDE_LOCK          = /var/lock/freeside
-export FREESIDE_CACHE         = $(TMP)/var/cache/freeside
-FREESIDE_CACHE         = $(TMP)/var/cache/freeside
+#export FREESIDE_CONF          = /etc/freeside
+#export FREESIDE_LOG           = /var/log/freeside
+#export FREESIDE_LOCK          = /var/lock/freeside
+#export FREESIDE_CACHE         = $(TMP)/var/cache/freeside
+#FREESIDE_CACHE         = $(TMP)/var/cache/freeside
 
 #XXX huh?
-export FREESIDE_EXPORT        = /var/spool/freeside
+#export FREESIDE_EXPORT        = /var/spool/freeside
+
+export FREESIDE_CONF = $(TMP)/usr/local/etc/freeside
+export FREESIDE_LOG = $(TMP)/usr/local/etc/freeside
+export FREESIDE_LOCK = $(TMP)/usr/local/etc/freeside
+export FREESIDE_CACHE = $(TMP)/usr/local/etc/freeside
+export FREESIDE_EXPORT = $(TMP)/usr/local/etc/freeside
 
 #XXX own subdir?
-export MASON_HANDLER          = $(TMP)-webui/usr/share/freeside/handler.pl
+#export MASON_HANDLER          = $(TMP)-webui/usr/share/freeside/handler.pl
+export MASON_HANDLER=$(TMP)-webui/usr/local/etc/freeside/handler.pl
 
-export APACHE_VERSION         = 2
-export FREESIDE_DOCUMENT_ROOT = $(TMP)-webui/usr/share/freeside/www
+#export FREESIDE_DOCUMENT_ROOT = $(TMP)-webui/usr/share/freeside/www
+export FREESIDE_DOCUMENT_ROOT = $(TMP)-webui/var/www/freeside
 export INIT_FILE              = $(TMP).init
 export INIT_INSTALL           = /bin/true
 export HTTPD_RESTART          = /bin/true
@@ -49,22 +56,22 @@ export INSTALLGROUP           = adm
 export SELFSERVICE_MACHINES   = 
 
 #prompt ?   XXX these are runtime, not buildtime :/
-export RT_DOMAIN              = `dnsdomainname`
-export RT_TIMEZONE            = `cat /etc/timezone`
+#export RT_DOMAIN              = `dnsdomainname`
+#export RT_TIMEZONE            = `cat /etc/timezone`
 
-export HOSTNAME               = `hostname -f`
-export FREESIDE_URL           = http://$(HOSTNAME)/freeside/
+#export HOSTNAME               = `hostname -f`
+#export FREESIDE_URL           = http://$(HOSTNAME)/freeside/
 
 #specific to deb pkg, for purposes of saving off a permanent copy of default
 #config for postinst and that sort of thing
-export DIST_CONF           = $(TMP)/usr/share/freeside/default_conf
+#export DIST_CONF           = $(TMP)/usr/share/freeside/default_conf
 
 #XXX yuck.  proper RT layout is entirely necessary
 #this seems to infect way to much of RT with the build location, requiring
 # a kludge to hack it out afterwords.  look into using fakeroot (didn't
 # realize it would need to be explicit argh)
 # (but leaving it for now, otherwise can't get RT to put files where we need em)
-export RT_PATH                = $(TMP)/var/opt/freeside/rt
+#export RT_PATH                = $(TMP)/var/opt/freeside/rt
 
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
@@ -114,14 +121,14 @@ install-stamp: build-stamp
 
         #false laziness w/install-perl-modules now
 	#install this for postinst later (no create-config)
-	install -d $(DIST_CONF)
+	##install -d $(DIST_CONF)
 	#install conf/[a-z]* $(DEFAULT_CONF)
 	#CVS is not [a-z]
-	install `ls -d conf/[a-z]* | grep -v CVS` $(DIST_CONF)
+	##install `ls -d conf/[a-z]* | grep -v CVS` $(DIST_CONF)
 
 	install -d $(FREESIDE_DOCUMENT_ROOT)
 	install -d $(FREESIDE_CACHE)/masondata #MASONDATA
-	$(MAKE) -e install-docs
+	$(MAKE) -e DESTDIR=$(TMP)-webui install-docs
 
 	#hack the build dir out of Freeside too.  oh yeah, sucky.
 	perl -p -i -e "\
@@ -131,71 +138,75 @@ install-stamp: build-stamp
 	  ${TMP}/usr/share/perl5/FS/*/* \
 	  ${TMP}/usr/bin/*
 
-	rm -r $(FREESIDE_DOCUMENT_ROOT).*
+	#rm -r $(FREESIDE_DOCUMENT_ROOT).*
 
 	install -d $(APACHE_CONF)
-	install debian/freeside.apache-alias.conf $(APACHE_CONF)/freeside-alias.conf
-	FREESIDE_DOCUMENT_ROOT=/usr/share/freeside/www MASON_HANDLER=/usr/share/freeside/handler.pl FREESIDE_CONF=/etc/freeside $(MAKE) -e install-apache
+	#install debian/freeside.apache-alias.conf $(APACHE_CONF)/freeside-alias.conf
+	#FREESIDE_DOCUMENT_ROOT=/usr/share/freeside/www MASON_HANDLER=/usr/share/freeside/handler.pl FREESIDE_CONF=/etc/freeside $(MAKE) -e install-apache
+	$(MAKE) -e install-apache
 
 	$(MAKE) -e install-init
 
 	#RT
 	#(configure-rt)
-
-	# XXX need to adjust db-type, db-database, db-rt-user, db-rt-pass
-	# based on info from dbc
-	( cd rt; \
-	  cp config.layout.in config.layout; \
-	  perl -p -i -e "\
-	    s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g;\
-	    s'%%%MASONDATA%%%'${FREESIDE_CACHE}/masondata'g;\
-	  " config.layout; \
-	  ./configure --prefix=${RT_PATH} \
-	              --enable-layout=Freeside \
-	              --with-db-type=Pg \
-	              --with-db-dba=freeside \
-	              --with-db-database=_DBC_DBNAME_ \
-	              --with-db-rt-user=_DBC_DBUSER_ \
-	              --with-db-rt-pass=_DBC_DBPASS_ \
-	              --with-web-user=freeside \
-	              --with-web-group=freeside \
-	              --with-rt-group=freeside \
-	)
-
-	#(create-rt)
-	install -d $(RT_PATH)
-	( cd rt; make install )
-	#hack the build dir out of RT.  yeah, sucky.
-	perl -p -i -e "\
-	  s'${TMP}''g;\
-	" ${RT_PATH}/etc/RT_Config.pm \
-	  ${RT_PATH}/lib/RT.pm \
-	  ${RT_PATH}/bin/mason_handler.fcgi \
-	  ${RT_PATH}/bin/mason_handler.scgi \
-	  ${RT_PATH}/bin/standalone_httpd \
-	  ${RT_PATH}/bin/webmux.pl \
-	  ${RT_PATH}/bin/rt-crontool \
-	  ${RT_PATH}/sbin/rt-dump-database \
-	  ${RT_PATH}/sbin/rt-setup-database
-	
-	#hack @INC dir out of RT (well, handler.pl) too.
-	perl -p -i -e "\
-	  s'/opt/rt3/'/var/opt/freeside/rt/'g;\
-	" ${TMP}-webui/usr/share/freeside/handler.pl
-
-	mv ${RT_PATH}/etc/RT_Config.pm ${RT_PATH}/etc/RT_Config.pm.dbc
-
-	perl -p -i -e "\
-	  s'%%%RT_DOMAIN%%%'${RT_DOMAIN}'g;\
-	  s'%%%RT_TIMEZONE%%%'${RT_TIMEZONE}'g;\
-	  s'%%%FREESIDE_URL%%%'${FREESIDE_URL}'g;\
-	" ${RT_PATH}/etc/RT_SiteConfig.pm
-
-	install -D debian/dbconfig-common.install $(DBC_SCRIPTS)/install/pgsql
-	install -D debian/dbconfig-common.install $(DBC_SCRIPTS)/install/mysql
+	$(MAKE) -e configure-rt
+
+	## XXX need to adjust db-type, db-database, db-rt-user, db-rt-pass
+	## based on info from dbc
+	#( cd rt; \
+	#  cp config.layout.in config.layout; \
+	#  perl -p -i -e "\
+	#    s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g;\
+	#    s'%%%MASONDATA%%%'${FREESIDE_CACHE}/masondata'g;\
+	#  " config.layout; \
+	#  ./configure --prefix=${RT_PATH} \
+	#              --enable-layout=Freeside \
+	#              --with-db-type=Pg \
+	#              --with-db-dba=freeside \
+	#              --with-db-database=_DBC_DBNAME_ \
+	#              --with-db-rt-user=_DBC_DBUSER_ \
+	#              --with-db-rt-pass=_DBC_DBPASS_ \
+	#              --with-web-user=freeside \
+	#              --with-web-group=freeside \
+	#              --with-rt-group=freeside \
+	#)
+
+	##(create-rt)
+	#$(MAKE) -e create-rt
+
+	#install -d $(RT_PATH)
+	#( cd rt; make install )
+	##hack the build dir out of RT.  yeah, sucky.
+	#perl -p -i -e "\
+	#  s'${TMP}''g;\
+	#" ${RT_PATH}/etc/RT_Config.pm \
+	#  ${RT_PATH}/lib/RT.pm \
+	#  ${RT_PATH}/bin/mason_handler.fcgi \
+	#  ${RT_PATH}/bin/mason_handler.scgi \
+	#  ${RT_PATH}/bin/standalone_httpd \
+	#  ${RT_PATH}/bin/webmux.pl \
+	#  ${RT_PATH}/bin/rt-crontool \
+	#  ${RT_PATH}/sbin/rt-dump-database \
+	#  ${RT_PATH}/sbin/rt-setup-database
+	#
+	##hack @INC dir out of RT (well, handler.pl) too.
+	#perl -p -i -e "\
+	#  s'/opt/rt3/'/var/opt/freeside/rt/'g;\
+	#" ${TMP}-webui/usr/share/freeside/handler.pl
+
+	#mv ${RT_PATH}/etc/RT_Config.pm ${RT_PATH}/etc/RT_Config.pm.dbc
+
+	#perl -p -i -e "\
+	#  s'%%%RT_DOMAIN%%%'${RT_DOMAIN}'g;\
+	#  s'%%%RT_TIMEZONE%%%'${RT_TIMEZONE}'g;\
+	#  s'%%%FREESIDE_URL%%%'${FREESIDE_URL}'g;\
+	#" ${RT_PATH}/etc/RT_SiteConfig.pm
+
+	#install -D debian/dbconfig-common.install $(DBC_SCRIPTS)/install/pgsql
+	#install -D debian/dbconfig-common.install $(DBC_SCRIPTS)/install/mysql
 	
-	install -D debian/dbconfig-common.upgrade $(DBC_SCRIPTS)/upgrade/pgsql/$(DEBVERSION)
-	install -D debian/dbconfig-common.upgrade $(DBC_SCRIPTS)/upgrade/mysql/$(DEBVERSION)
+	#install -D debian/dbconfig-common.upgrade $(DBC_SCRIPTS)/upgrade/pgsql/$(DEBVERSION)
+	#install -D debian/dbconfig-common.upgrade $(DBC_SCRIPTS)/upgrade/mysql/$(DEBVERSION)
 	
 	dh_install
 
@@ -207,7 +218,6 @@ binary-arch:
 binary-indep: build install
 	dh_testdir
 	dh_testroot
-	dh_installchangelogs ChangeLog
 	dh_installdocs #freeside.docs README AGPL
 	dh_installexamples eg/*
 #	dh_installmenu
diff --git a/debian/templates b/debian/templates
deleted file mode 100644
index e69de29..0000000

commit b808053966fd3c43edefa1b7c4b93cbeb7cf546e
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Feb 7 21:09:11 2013 -0800

    fix leading and trailing spaces in customer,, contact, prospect names and companies, RT#19860

diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 16031e1..42af68c 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -2513,10 +2513,29 @@ sub ut_name {
 #  warn "ut_name allowed alphanumerics: +(sort grep /\w/, map { chr() } 0..255), "\n";
   $self->getfield($field) =~ /^([\w \,\.\-\']+)$/
     or return gettext('illegal_name'). " $field: ". $self->getfield($field);
-  $self->setfield($field,$1);
+  my $name = $1;
+  $name =~ s/^\s+//; 
+  $name =~ s/\s+$//; 
+  $name =~ s/\s+/ /g;
+  $self->setfield($field, $name);
   '';
 }
 
+=item ut_namen COLUMN
+
+Check/untaint proper names; allows alphanumerics, spaces and the following
+punctuation: , . - '
+
+May not be null.
+
+=cut
+
+sub ut_namen {
+  my( $self, $field ) = @_;
+  return $self->setfield($field, '') if $self->getfield($field) =~ /^$/;
+  $self->ut_name($field);
+}
+
 =item ut_zip COLUMN
 
 Check/untaint zip codes.
diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm
index f84af42..8fcd724 100644
--- a/FS/FS/contact.pm
+++ b/FS/FS/contact.pm
@@ -326,8 +326,8 @@ sub check {
     || $self->ut_foreign_keyn('custnum',     'cust_main',     'custnum')
     || $self->ut_foreign_keyn('locationnum', 'cust_location', 'locationnum')
     || $self->ut_foreign_keyn('classnum',    'contact_class', 'classnum')
-    || $self->ut_textn('last')
-    || $self->ut_textn('first')
+    || $self->ut_namen('last')
+    || $self->ut_namen('first')
     || $self->ut_textn('title')
     || $self->ut_textn('comment')
     || $self->ut_enum('disabled', [ '', 'Y' ])
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index be910c6..bcb8fc0 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1792,6 +1792,12 @@ sub check {
     || $self->ut_enum('locale', [ '', FS::Locales->locales ])
   ;
 
+  my $company = $self->company;
+  $company =~ s/^\s+//; 
+  $company =~ s/\s+$//; 
+  $company =~ s/\s+/ /g;
+  $self->company($company);
+
   #barf.  need message catalogs.  i18n.  etc.
   $error .= "Please select an advertising source."
     if $error =~ /^Illegal or empty \(numeric\) refnum: /;
@@ -5080,12 +5086,12 @@ sub process_censustract_update {
 }
 
 #starting to take quite a while for big dbs
+#   (JRNL: journaled so it only happens once per database)
 # - seq scan of h_cust_main (yuck), but not going to index paycvv, so
-# - seq scan of cust_main on signupdate... index signupdate?  will that help?
-# - seq scan of cust_main on paydate... index on substrings?  maybe set an
-#    upgrade journal flag now that we have that, yyyy-m-dd paydates are ancient
-# - seq scan of cust_main on payinfo.. certainly not going toi ndex that...
-#    upgrade journal again?  this is also an ancient problem
+# JRNL seq scan of cust_main on signupdate... index signupdate?  will that help?
+# JRNL seq scan of cust_main on paydate... index on substrings?  maybe set an
+# JRNL seq scan of cust_main on payinfo.. certainly not going toi ndex that...
+# JRNL leading/trailing spaces in first, last, company
 # - otaker upgrade?  journal and call it good?  (double check to make sure
 #    we're not still setting otaker here)
 #
@@ -5140,6 +5146,26 @@ sub _upgrade_data { #class method
   local($ignore_banned_card) = 1;
   local($skip_fuzzyfiles) = 1;
   local($import) = 1; #prevent automatic geocoding (need its own variable?)
+
+  unless ( FS::upgrade_journal->is_done('cust_main__trimspaces') ) {
+
+    foreach my $cust_main ( qsearch({
+      'table'     => 'cust_main', 
+      'hashref'   => {},
+      'extra_sql' => 'WHERE '.
+                       join(' OR ',
+                         map "$_ LIKE ' %' OR $_ LIKE '% ' OR $_ LIKE '%  %'",
+                           qw( first last company )
+                       ),
+    }) ) {
+      my $error = $cust_main->replace;
+      die $error if $error;
+    }
+
+    FS::upgrade_journal->set_done('cust_main__trimspaces');
+
+  }
+
   $class->_upgrade_otaker(%opts);
 
   FS::cust_main::Location->_upgrade_data(%opts);
diff --git a/FS/FS/prospect_main.pm b/FS/FS/prospect_main.pm
index b5d51d3..a04af86 100644
--- a/FS/FS/prospect_main.pm
+++ b/FS/FS/prospect_main.pm
@@ -208,6 +208,12 @@ sub check {
   ;
   return $error if $error;
 
+  my $company = $self->company;
+  $company =~ s/^\s+//; 
+  $company =~ s/\s+$//; 
+  $company =~ s/\s+/ /g;
+  $self->company($company);
+
   $self->SUPER::check;
 }
 

commit d14c7526763013113dcddd4ec60c383a5f1c5473
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Feb 6 01:14:19 2013 -0800

    remove obsolete price plan

diff --git a/FS/MANIFEST b/FS/MANIFEST
index 3ef42b1..4d6bb12 100644
--- a/FS/MANIFEST
+++ b/FS/MANIFEST
@@ -149,7 +149,6 @@ FS/part_pkg/sqlradacct_hour.pm
 FS/part_pkg/subscription.pm
 FS/part_pkg/voip_sqlradacct.pm
 FS/part_pkg/voip_cdr.pm
-FS/part_pkg/base_rate.pm
 FS/part_pkg/base_delayed.pm
 FS/part_pop_local.pm
 FS/part_referral.pm

commit ef43d389f50b6ebbbca5a511d262c6da9ccb2c5c
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Feb 5 18:13:37 2013 -0800

    remove obsolete and awful base_rate price plan, RT#11114

diff --git a/FS/FS/part_pkg/base_rate.pm b/FS/FS/part_pkg/base_rate.pm
deleted file mode 100644
index 43a0506..0000000
--- a/FS/FS/part_pkg/base_rate.pm
+++ /dev/null
@@ -1,97 +0,0 @@
-package FS::part_pkg::base_rate;
-
-use strict;
-use vars qw(@ISA %info);
-#use FS::Record qw(qsearch);
-use FS::part_pkg;
-
- at ISA = qw(FS::part_pkg);
-
-%info = (
-  'name' => 'Base rate (anniversary billing, Times units ordered)',
-            # XXX it multiplies recurring fee by cust_pkg option "units", how to
-            # express that
-  'shortname' => 'Bulk (manual from "units" option)',
-  'inherit_fields' => [ 'global_Mixin' ],
-  'fields' => {
-    'externalid' => { 'name'    => 'Optional External ID',
-                      'default' => '',
-                    },
-  },
-  'fieldorder' => [ qw( externalid ) ],
-  'weight' => 52,
-);
-
-sub price_info {
-    my $self = shift;
-    my $conf = new FS::Conf;
-    my $money_char = $conf->config('money_char') || '$';
-    my $setup = $self->option('setup_fee') || 0;
-    my $recur = $self->option('recur_fee', 1) || 0;
-    my $str = '';
-    $str = $money_char . $setup . ' one-time' if $setup;
-    $str .= ', ' if ($setup && $recur);
-    $str .= $money_char . $recur . ' recurring per unit ' if $recur;
-    $str;
-}
-
-
-sub calc_setup {
-  my($self, $cust_pkg, $sdate, $details ) = @_;
-
-  my $i = 0;
-  my $count = $self->option( 'additional_count', 'quiet' ) || 0;
-  while ($i < $count) {
-    push @$details, $self->option( 'additional_info' . $i++ );
-  }
-
-  $self->option('setup_fee');
-}
-
-sub calc_recur {
-  my($self, $cust_pkg) = @_;
-  $self->base_recur($cust_pkg);
-}
-
-sub base_recur {
-  my($self, $cust_pkg) = @_;
-  my $units = $cust_pkg->option('units') ? $cust_pkg->option('units') : 1 ;
-  	# default to 1 if not found
-  sprintf("%.2f", 
-	  ($self->option('recur_fee') * $units ) 
-  );
-}
-
-sub calc_remain {
-  my ($self, $cust_pkg, %options) = @_;
-  my $time = $options{'time'} || time;
-  my $next_bill = $cust_pkg->getfield('bill') || 0;
-  return 0 if  ! $self->base_recur($cust_pkg)
-              || ! $next_bill
-              || $next_bill < $time;
-
-  my %sec = (
-    'h' =>    3600, # 60 * 60
-    'd' =>   86400, # 60 * 60 * 24
-    'w' =>  604800, # 60 * 60 * 24 * 7
-    'm' => 2629744, # 60 * 60 * 24 * 365.2422 / 12 
-  );
-
-  $self->freq =~ /^(\d+)([hdwm]?)$/
-    or die 'unparsable frequency: '. $self->freq;
-  my $freq_sec = $1 * $sec{$2||'m'};
-  return 0 unless $freq_sec;
-
-  sprintf("%.2f", $self->base_recur($cust_pkg) * ( $next_bill - $time ) / $freq_sec );
-
-}
-
-sub is_free_options {
-  qw( setup_fee recur_fee );
-}
-
-sub is_prepaid {
-  0; #no, we're postpaid
-}
-
-1;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Record.pm                             |   21 ++-
 FS/FS/contact.pm                            |    4 +-
 FS/FS/cust_main.pm                          |   36 +++-
 FS/FS/part_pkg/base_rate.pm                 |   97 ---------
 FS/FS/prospect_main.pm                      |    6 +
 FS/MANIFEST                                 |    1 -
 INSTALL                                     |    3 -
 {etc => bin}/megapop.pl                     |    0
 debian/{ => OLD}/config                     |    0
 debian/{ => OLD}/cron.d                     |    0
 debian/{ => OLD}/dbconfig-common.install    |    0
 debian/{ => OLD}/dbconfig-common.upgrade    |    0
 debian/{ => OLD}/freeside.apache-alias.conf |    0
 debian/{ => OLD}/postinst                   |    0
 debian/{ => OLD}/postrm                     |    0
 debian/{ => OLD}/prerm                      |    0
 debian/TODO                                 |   61 +++++--
 debian/changelog                            |    6 +
 debian/compat                               |    2 +-
 debian/control                              |   20 ++-
 debian/copyright                            |    2 +-
 debian/freeside.docs                        |    1 +
 debian/init.d.ex                            |  157 ---------------
 debian/init.d.lsb.ex                        |  281 ---------------------------
 debian/rules                                |  174 +++++++++--------
 25 files changed, 218 insertions(+), 654 deletions(-)
 delete mode 100644 FS/FS/part_pkg/base_rate.pm
 delete mode 100644 INSTALL
 rename {etc => bin}/megapop.pl (100%)
 rename debian/{ => OLD}/config (100%)
 rename debian/{ => OLD}/cron.d (100%)
 rename debian/{ => OLD}/dbconfig-common.install (100%)
 rename debian/{ => OLD}/dbconfig-common.upgrade (100%)
 rename debian/{ => OLD}/freeside.apache-alias.conf (100%)
 rename debian/{ => OLD}/postinst (100%)
 rename debian/{ => OLD}/postrm (100%)
 rename debian/{ => OLD}/prerm (100%)
 delete mode 100644 debian/init.d.ex
 delete mode 100644 debian/init.d.lsb.ex
 delete mode 100644 debian/templates




More information about the freeside-commits mailing list