From bf5454270048ebe558276d9fba7588c48d461a3d Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 13 Apr 2004 22:30:48 +0000 Subject: remove dependancy on Net::Whois that wasn't being used anyway --- FS/FS/svc_domain.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/FS/FS/svc_domain.pm b/FS/FS/svc_domain.pm index 4dd6342c7..b713e3e95 100644 --- a/FS/FS/svc_domain.pm +++ b/FS/FS/svc_domain.pm @@ -7,7 +7,7 @@ use vars qw( @ISA $whois_hack $conf ); use Carp; use Date::Format; -use Net::Whois 1.0; +#use Net::Whois::Raw; use FS::Record qw(fields qsearch qsearchs dbh); use FS::Conf; use FS::svc_Common; @@ -386,15 +386,16 @@ sub catchall_svc_acct { =item whois -Returns the Net::Whois::Domain object (see L) for this domain, or -undef if the domain is not found in whois. +# Returns the Net::Whois::Domain object (see L) for this domain, or +# undef if the domain is not found in whois. (If $FS::svc_domain::whois_hack is true, returns that in all cases instead.) =cut sub whois { - $whois_hack or new Net::Whois::Domain $_[0]->domain; + #$whois_hack or new Net::Whois::Domain $_[0]->domain; + $whois_hack or die "whois_hack not set...\n"; } =item _whois -- cgit v1.2.1 From 7c4645bf020a5ce35079008f5eeab6698c5362d5 Mon Sep 17 00:00:00 2001 From: khoff Date: Wed, 14 Apr 2004 00:48:04 +0000 Subject: Freeside's URI handler for RT3. --- rt/lib/RT/URI/freeside.pm | 188 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 rt/lib/RT/URI/freeside.pm diff --git a/rt/lib/RT/URI/freeside.pm b/rt/lib/RT/URI/freeside.pm new file mode 100644 index 000000000..bfb514df8 --- /dev/null +++ b/rt/lib/RT/URI/freeside.pm @@ -0,0 +1,188 @@ +# BEGIN LICENSE BLOCK +# +# Copyright (c) 2004 Kristian Hoffmann +# Based on the original RT::URI::base and RT::URI::fsck_com_rt. +# +# Copyright (c) 1996-2003 Jesse Vincent +# +# (Except where explictly superceded by other copyright notices) +# +# This work is made available to you under the terms of Version 2 of +# the GNU General Public License. A copy of that license should have +# been provided with this software, but in any event can be snarfed +# from www.gnu.org. +# +# This work 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. +# +# Unless otherwise specified, all modifications, corrections or +# extensions to this work which alter its source code become the +# property of Best Practical Solutions, LLC when submitted for +# inclusion in the work. +# +# +# END LICENSE BLOCK +package RT::URI::freeside; + +use RT::URI::base; +use strict; +use vars qw(@ISA); + +@ISA = qw/RT::URI::base/; + + +=head1 NAME + +RT::URI::base + +=head1 DESCRIPTION + +URI handler for freeside URIs. See http://www.sisd.com/freeside/ for +more information on freeside. + +=cut + + +sub FreesideURIPrefix { + + my $self = shift; + return($self->Scheme . '://freeside'); + +} + +sub FreesideURILabel { + + my $self = shift; + + return(undef) unless (exists($self->{'fstable'}) and + exists($self->{'fspkey'})); + + my $label; + my ($table, $pkey) = ($self->{'fstable'}, $self->{'fspkey'}); + + eval { + use FS::UID qw(dbh); + use FS::Record qw(qsearchs qsearch dbdef); + eval "use FS::$table;"; + use FS::cust_svc; + + my $dbdef = dbdef or die "No dbdef"; + my $pkeyfield = $dbdef->table($table)->primary_key + or die "No primary key for table $table"; + + my $rec = qsearchs($table, { $pkeyfield => $pkey }) + or die "Record with $pkeyfield == $pkey does not exist in table $table"; + + if ($table =~ /^svc_/) { + if ($rec->can('cust_svc')) { + my $cust_svc = $rec->cust_svc or die '$rec->cust_svc failed'; + my ($svc, $tag, $svcdb) = $cust_svc->label; + $label = "Freeside service ${svc}: ${tag}"; + } + } elsif ($table eq 'cust_main') { + my ($last, $first, $company) = map { $rec->getfield($_) } + qw(last first company); + $label = "Freeside customer ${last}, ${first}"; + $label .= ($company ne '') ? " with ${company}" : ''; + } else { + $label = "Freeside ${table}, ${pkeyfield} == ${pkey}"; + } + + #... other cases + + }; + + if ($label and !$@) { + return($label); + } else { + return(undef); + } + + +} + +sub ParseURI { + my $self = shift; + my $uri = shift; + my ($table, $pkey); + + my $uriprefix = $self->FreesideURIPrefix; + if ($uri =~ /^$uriprefix\/(\w+)\/(\d+)$/) { + $table = $1; + $pkey = $2; + $self->{'scheme'} = $self->Scheme; + } else { + return(undef); + } + + $self->{'uri'} = "${uriprefix}/${table}/${pkey}"; + $self->{'fstable'} = $table; + $self->{'fspkey'} = $pkey; + + my $p; + + eval { + use FS::UID qw(dbh); + use FS::CGI qw(popurl); + + if (dbh) { + $p = popurl(3); + } + + }; + + if ($@ or (!$p)) { + $self->{'href'} = $self->{'uri'}; + } else { + $self->{'href'} = "${p}view/${table}.cgi?${pkey}"; + } + + $self->{'uri'}; + +} + +sub Scheme { + my $self = shift; + return('freeside'); + +} + +sub HREF { + my $self = shift; + return($self->{'href'} || $self->{'uri'}); +} + +sub IsLocal { + my $self = shift; + return undef; +} + +=head2 AsString + +Return a "pretty" string representing the URI object. + +This is meant to be used like this: + + % $re = $uri->Resolver; + <% $re->AsString %> + +=cut + +sub AsString { + my $self = shift; + my $prettystring; + if ($prettystring = $self->FreesideURILabel) { + return $prettystring; + } else { + return $self->URI; + } +} + +eval "require RT::URI::base_Vendor"; +die $@ if ($@ && $@ !~ qr{^Can't locate RT/URI/base_Vendor.pm}); +eval "require RT::URI::base_Local"; +die $@ if ($@ && $@ !~ qr{^Can't locate RT/URI/base_Local.pm}); + +1; -- cgit v1.2.1 From db5bfd844fa34e21a82c2d1b62ff5c7275d5dd8e Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 14 Apr 2004 01:00:10 +0000 Subject: keeping track of what's been changed to make life easier when importing new upstream versions --- rt/FREESIDE_MODIFIED | 1 + 1 file changed, 1 insertion(+) diff --git a/rt/FREESIDE_MODIFIED b/rt/FREESIDE_MODIFIED index 84a9f5ea9..3937c30fc 100644 --- a/rt/FREESIDE_MODIFIED +++ b/rt/FREESIDE_MODIFIED @@ -3,3 +3,4 @@ sbin/rt-setup-database.in config.layout config.layout.in etc/RT_SiteConfig.pm +lib/RT/URI/freeside.pm -- cgit v1.2.1 From 1b8f95fc90575c120f1b178e05b3fbd1da35bfc9 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 14 Apr 2004 03:20:26 +0000 Subject: adding preliminary install script for fedora core 1 --- install/fedora/fc1/INSTALL | 66 +++++++++++++++++++++++++++++++++++++++++ install/fedora/fc1/sources.list | 12 ++++++++ 2 files changed, 78 insertions(+) create mode 100755 install/fedora/fc1/INSTALL create mode 100644 install/fedora/fc1/sources.list diff --git a/install/fedora/fc1/INSTALL b/install/fedora/fc1/INSTALL new file mode 100755 index 000000000..c347609b3 --- /dev/null +++ b/install/fedora/fc1/INSTALL @@ -0,0 +1,66 @@ +#!/bin/sh + +wget --passive-ftp --continue http://download.fedora.us/fedora/fedora/1/i386/RPMS.stable/apt-0.5.15cnc5-0.fdr.10.1.i386.rpm +rpm -i apt*i386.rpm + +cp sources.list /etc/apt/sources.list + +apt-get update + +apt-get install perl-Devel-Symdump perl-BSD-Resource + +wget --passive-ftp --continue http://linux.reb00t.com/fedora-current/RPMS/apache-1.3.29-1.n0i.2.MPSSL.i686.rpm http://linux.reb00t.com/fedora-current/RPMS/mm-1.3.0-0.n0i.2.i686.rpm http://mirrors.kernel.org/fedora.us/fedora/fedora/1.91/i386/RPMS.os/db4-4.2.52-3.1.i386.rpm + +apt-get remove httpd mod_perl + +rpm -i mm-1.3.0-0.n0i.2.i686.rpm db4-4.2.52-3.1.i386.rpm apache-1.3.29-1.n0i.2.MPSSL.i686.rpm + +/sbin/chkconfig httpd on + +#edit /etc/httpd/conf/httpd.conf, remove mod_auth_db LoadMoudle and AddModule + +echo 'OPTIONS="-DHAVE_PERL -DHAVE_SSL"' >>/etc/sysconfig/apache + +/etc/init.d/httpd start + +echo 'RPM::Allow-Duplicated { "^db4$"; };' >>/etc/apt/apt.conf + +wget --continue http://atrpms.physik.fu-berlin.de/RPM-GPG-KEY.atrpms +rpm --import RPM-GPG-KEY.atrpms +wget --continue http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt +rpm --import RPM-GPG-KEY.dag.txt + +apt-get install perl-DBD-MySQL perl-DBI perl-DateManip perl-HTML-Parser perl-HTML-Tagset perl-TimeDate perl-URI perl-libwww-perl perl-suidperl rsync postgresql postgresql-docs postgresql-libs postgresql-server postgresql-devel screen zsh lftp cvs gcc gd perl-GD perl-MailTools perl-FreezeThaw perl-NetAddr-IP perl-Chart + +perl -MCPAN -e"install Net::Whois::Raw, Business::CreditCard, \ + File::CounterFile, String::Approx, Text::Template, \ + DBIx::DataSource, DBIx::DBSchema, Net::SSH, \ + String::ShellQuote, Net::SCP, Apache::ASP, \ + Tie::IxHash, Time::Duration, \ + HTML::Widgets::SelectLayers, Apache::DBI, \ + Cache::Cache, IPC::ShareLite, Locale::SubCountry, \ + DBD::Pg, Crypt::PasswdMD5 " + + +#remove perl & ssl LoadModule lines from /etc/httpd/conf/httpd.conf +#as they're statically linked (?) + +/usr/sbin/useradd freeside +chsh freeside -s /bin/bash + +/sbin/chkconfig postgresql on +/etc/init.d/postgresql start + +echo -e '\n\ny\nn" | su postgres -c "createuser -P freeside" + +su freeside -c "createdb freeside" + +#? +cd ../../.. +make install-perl-modules +make create-config +freeside-adduser -c -h /usr/local/etc/freeside/htpasswd ivan +su freeside -c 'freeside-setup ivan' +su freeside -c '/home/ivan/freeside/bin/populate-msgcat ivan' +make deploy + diff --git a/install/fedora/fc1/sources.list b/install/fedora/fc1/sources.list new file mode 100644 index 000000000..9b3624225 --- /dev/null +++ b/install/fedora/fc1/sources.list @@ -0,0 +1,12 @@ +# Fedora Core (Kernel.org, San Francisco California, USA) +rpm http://mirrors.kernel.org/fedora.us/fedora fedora/1/i386 os updates +rpm-src http://mirrors.kernel.org/fedora.us/fedora fedora/1/i386 os updates + +# Fedora Extras (Kernel.org, San Francisco California, USA) +rpm http://mirrors.kernel.org/fedora.us/fedora fedora/1/i386 stable +rpm-src http://mirrors.kernel.org/fedora.us/fedora fedora/1/i386 stable + +### Dag Apt Repository for Red Hat Fedora Core 1 (rhfc1) +rpm http://apt.sw.be redhat/fc1/en/i386 dag + +rpm http://apt.physik.fu-berlin.de redhat/9/en/i386 at-testing -- cgit v1.2.1