diff options
author | atatat <atatat@pkgsrc.org> | 2002-09-19 21:40:45 +0000 |
---|---|---|
committer | atatat <atatat@pkgsrc.org> | 2002-09-19 21:40:45 +0000 |
commit | 47195b7a871163f847aef7b12cd320ccb8a6b342 (patch) | |
tree | f8cbffa0f34b77c6b34f22c52b65a353ffdaaa05 /devel/rt-mysql/patches | |
parent | 0f7ec6140dcf05d8e3c2961ffb56a203c07c09be (diff) | |
download | pkgsrc-47195b7a871163f847aef7b12cd320ccb8a6b342.tar.gz |
Initial import of a pkg for the RT ticketing system.
RT is an industrial-grade ticketing system. It lets a group of
people intelligently and efficiently manage requests submitted by
a community of users. RT is used by systems administrators, customer
support staffs, NOCs, developers and even marketing departments at
over a thousand sites around the world.
This version is backed by the mysql database.
Diffstat (limited to 'devel/rt-mysql/patches')
-rw-r--r-- | devel/rt-mysql/patches/patch-aa | 411 |
1 files changed, 411 insertions, 0 deletions
diff --git a/devel/rt-mysql/patches/patch-aa b/devel/rt-mysql/patches/patch-aa new file mode 100644 index 00000000000..7b9ea7b7cb7 --- /dev/null +++ b/devel/rt-mysql/patches/patch-aa @@ -0,0 +1,411 @@ +$NetBSD: patch-aa,v 1.1.1.1 2002/09/19 21:40:46 atatat Exp $ + +This patch basically just rips up the standard rt Makefile so that +we can do the two stages (installation and database configuration) +in two completely separate steps. + +--- Makefile.orig Wed Mar 27 22:59:34 2002 ++++ Makefile +@@ -2,7 +2,7 @@ + # Request Tracker is Copyright 1996-2002 Jesse Vincent <jessebestpractical.com> + # RT is distributed under the terms of the GNU General Public License, version 2 + +-PERL = /usr/bin/perl ++PERL = @PREFIX@/bin/perl + + RT_VERSION_MAJOR = 2 + RT_VERSION_MINOR = 0 +@@ -15,7 +15,7 @@ + BRANCH = HEAD + + # This is the group that all of the installed files will be chgrp'ed to. +-RTGROUP = rt ++RTGROUP = @RT_GROUP@ + + + # User which should own rt binaries. +@@ -40,7 +40,7 @@ + # RT_PATH is the name of the directory you want make to install RT in + # RT must be installed in its own directory (don't set this to /usr/local) + +-RT_PATH = /opt/rt2 ++RT_PATH = @RT_PATH@ + + # The rest of these paths are all configurable, but you probably don't want to + # put them elsewhere +@@ -48,6 +48,7 @@ + RT_LIB_PATH = $(RT_PATH)/lib + RT_ETC_PATH = $(RT_PATH)/etc + RT_BIN_PATH = $(RT_PATH)/bin ++WRAPPED_RT_BIN_PATH = $(RT_BIN_PATH)/real + RT_MAN_PATH = $(RT_PATH)/man + MASON_HTML_PATH = $(RT_PATH)/WebRT/html + +@@ -59,10 +60,10 @@ + + # RT needs to be able to write to MASON_DATA_PATH and MASON_SESSION_PATH + # RT will create and chown these directories. Don't just set them to /tmp +-MASON_DATA_PATH = $(RT_PATH)/WebRT/data +-MASON_SESSION_PATH = $(RT_PATH)/WebRT/sessiondata ++MASON_DATA_PATH = @RT_DATA_PATH@ ++MASON_SESSION_PATH = @RT_SESSION_PATH@ + +-RT_LOG_PATH = /tmp ++RT_LOG_PATH = @RT_LOG_PATH@ + + # RT_READABLE_DIR_MODE is the mode of directories that are generally meant + # to be accessable +@@ -78,17 +79,22 @@ + + # RT_FASTCGI_HANDLER is the mason handler script for FastCGI + # THIS HANDLER IS NOT CURRENTLY SUPPORTED +-RT_FASTCGI_HANDLER = $(RT_BIN_PATH)/mason_handler.fcgi ++RT_FASTCGI_HANDLER = $(WRAPPED_RT_BIN_PATH)/mason_handler.fcgi ++RT_FASTCGI_HANDLER_WRAPPER= $(RT_BIN_PATH)/mason_handler.fcgi + + # RT_SPEEDYCGI_HANDLER is the mason handler script for SpeedyCGI + # THIS HANDLER IS NOT CURRENTLY SUPPORTED +-RT_SPEEDYCGI_HANDLER = $(RT_BIN_PATH)/mason_handler.scgi ++RT_SPEEDYCGI_HANDLER = $(WRAPPED_RT_BIN_PATH)/mason_handler.scgi ++RT_SPEEDYCGI_HANDLER_WRAPPER= $(RT_BIN_PATH)/mason_handler.scgi + + # The following are the names of the various binaries which make up RT + +-RT_CLI_BIN = $(RT_BIN_PATH)/rt +-RT_CLI_ADMIN_BIN = $(RT_BIN_PATH)/rtadmin +-RT_MAILGATE_BIN = $(RT_BIN_PATH)/rt-mailgate ++RT_CLI_BIN = $(WRAPPED_RT_BIN_PATH)/rt ++RT_CLI_ADMIN_BIN = $(WRAPPED_RT_BIN_PATH)/rtadmin ++RT_MAILGATE_BIN = $(WRAPPED_RT_BIN_PATH)/rt-mailgate ++RT_CLI_BIN_WRAPPER = $(RT_BIN_PATH)/rt ++RT_CLI_ADMIN_BIN_WRAPPER= $(RT_BIN_PATH)/rtadmin ++RT_MAILGATE_BIN_WRAPPER = $(RT_BIN_PATH)/rt-mailgate + + # }}} + +@@ -100,13 +106,13 @@ + # "Pg" is known to work + # "Oracle" is in the early stages of working. + +-DB_TYPE = mysql ++DB_TYPE = @RT_DB_TYPE@ + + # DB_HOME is where the Database's commandline tools live. $DB_HOME/bin + # should contain the binaries themselves, e.g. if "which mysql" gives + # "/usr/local/mysql/bin/mysql", $DB_HOME should be "/usr/local/mysql" + +-DB_HOME = /usr ++DB_HOME = @PREFIX@ + + # Set DBA to the name of a unix account with the proper permissions and + # environment to run your commandline SQL tools +@@ -119,21 +125,21 @@ + # For Pg, you probably want 'postgres' + # For oracle, you want 'system' + +-DB_DBA = root +-DB_DBA_PASSWORD = ++DB_DBA = @RT_DB_DBA@ ++DB_DBA_PASSWORD = @RT_DB_DBA_PASSWORD@ + + # + # Set this to the Fully Qualified Domain Name of your database server. + # If the database is local, rather than on a remote host, using "localhost" + # will greatly enhance performance. + +-DB_HOST = localhost ++DB_HOST = @RT_DB_HOST@ + + # If you're not running your database server on its default port, + # specifiy the port the database server is running on below. + # It's generally safe to leave this blank + +-DB_PORT = ++DB_PORT = @RT_DB_PORT@ + + # + # Set this to the canonical name of the interface RT will be talking to the +@@ -143,21 +149,21 @@ + # to grant those database rights by hand. + # + +-DB_RT_HOST = localhost ++DB_RT_HOST = @RT_DB_HOST@ + + # set this to the name you want to give to the RT database in + # your database server. For Oracle, this should be the name of your sid + +-DB_DATABASE = rt2 ++DB_DATABASE = @RT_DB_DATABASE@ + + # Set this to the name of the rt database user + +-DB_RT_USER = rt_user ++DB_RT_USER = @RT_DB_USER@ + + # Set this to the password used by the rt database user + # *** Change This Before Installation*** + +-DB_RT_PASS = rt_pass ++DB_RT_PASS = @RT_DB_PASS@ + + # }}} + +@@ -166,8 +172,8 @@ + # The user your webserver runs as. needed so that webrt can cache mason + # objectcode + +-WEB_USER = www +-WEB_GROUP = rt ++WEB_USER = @RT_WEB_USER@ ++WEB_GROUP = @RT_WEB_GROUP@ + + # }}} + +@@ -180,7 +186,7 @@ + @echo "Please read RT's readme before installing. Not doing so could" + @echo "be dangerous." + +-install: dirs initialize.$(DB_TYPE) upgrade insert instruct ++install: dirs initialize.$(DB_TYPE) upgrade insert + + instruct: + @echo "Congratulations. RT has been installed. " +@@ -189,9 +195,11 @@ + + + insert: insert-install ++ ++XXX-insert: # post pkg install + $(PERL) $(RT_ETC_PATH)/insertdata + +-upgrade: dirs config-replace upgrade-noclobber upgrade-instruct ++upgrade: dirs config-replace upgrade-noclobber + + upgrade-instruct: + @echo "Congratulations. RT has been upgraded. You should now check-over" +@@ -200,7 +208,7 @@ + @echo " $(RT_ETC_PATH)/insertdata <version>" + @echo "where <version> is the version of RT you're upgrading from." + +-upgrade-noclobber: insert-install libs-install html-install bin-install nondestruct ++upgrade-noclobber: insert-install libs-install perl-install html-install bin-install nondestruct + + nondestruct: fixperms + +@@ -212,8 +220,8 @@ + + + +-all: +- @echo "Read the readme." ++all: perl-build ++ @(cd src ; make wrapper) + + fixperms: + # Make the libraries readable +@@ -228,40 +236,54 @@ + chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_BIN_PATH) + chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_BIN_PATH) + +- chmod 0755 $(DESTDIR)/$(RT_ETC_PATH) +- chmod 0500 $(DESTDIR)/$(RT_ETC_PATH)/* ++ chmod 0750 $(DESTDIR)/$(RT_ETC_PATH) + + #TODO: the config file should probably be able to have its + # owner set seperately from the binaries. + chown -R $(BIN_OWNER) $(DESTDIR)/$(RT_ETC_PATH) + chgrp -R $(RTGROUP) $(DESTDIR)/$(RT_ETC_PATH) + +- chmod 0550 $(DESTDIR)/$(RT_CONFIG) ++ chmod 0550 $(DESTDIR)/$(RT_CONFIG).default + + # Make the interfaces executable and setgid rt + chown $(BIN_OWNER) $(DESTDIR)/$(RT_MAILGATE_BIN) \ + $(DESTDIR)/$(RT_FASTCGI_HANDLER) \ + $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \ + $(DESTDIR)/$(RT_CLI_BIN) \ +- $(DESTDIR)/$(RT_CLI_ADMIN_BIN) ++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN) \ ++ $(DESTDIR)/$(RT_MAILGATE_BIN_WRAPPER) \ ++ $(DESTDIR)/$(RT_FASTCGI_HANDLER_WRAPPER) \ ++ $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER_WRAPPER) \ ++ $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) \ ++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN_WRAPPER) + + chgrp $(RTGROUP) $(DESTDIR)/$(RT_MAILGATE_BIN) \ + $(DESTDIR)/$(RT_FASTCGI_HANDLER) \ + $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \ + $(DESTDIR)/$(RT_CLI_BIN) \ +- $(DESTDIR)/$(RT_CLI_ADMIN_BIN) ++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN) \ ++ $(DESTDIR)/$(RT_MAILGATE_BIN_WRAPPER) \ ++ $(DESTDIR)/$(RT_FASTCGI_HANDLER_WRAPPER) \ ++ $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER_WRAPPER) \ ++ $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) \ ++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN_WRAPPER) + + chmod 0755 $(DESTDIR)/$(RT_MAILGATE_BIN) \ + $(DESTDIR)/$(RT_FASTCGI_HANDLER) \ + $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \ + $(DESTDIR)/$(RT_CLI_BIN) \ +- $(DESTDIR)/$(RT_CLI_ADMIN_BIN) +- +- chmod g+s $(DESTDIR)/$(RT_MAILGATE_BIN) \ +- $(DESTDIR)/$(RT_FASTCGI_HANDLER) \ +- $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \ +- $(DESTDIR)/$(RT_CLI_BIN) \ +- $(DESTDIR)/$(RT_CLI_ADMIN_BIN) ++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN) \ ++ $(DESTDIR)/$(RT_MAILGATE_BIN_WRAPPER) \ ++ $(DESTDIR)/$(RT_FASTCGI_HANDLER_WRAPPER) \ ++ $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER_WRAPPER) \ ++ $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) \ ++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN_WRAPPER) ++ ++ chmod u+s $(DESTDIR)/$(RT_MAILGATE_BIN_WRAPPER) \ ++ $(DESTDIR)/$(RT_FASTCGI_HANDLER_WRAPPER) \ ++ $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER_WRAPPER) \ ++ $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) \ ++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN_WRAPPER) + + # Make the web ui readable by all. + chmod -R u+rwX,go-w,go+rX $(DESTDIR)/$(MASON_HTML_PATH) \ +@@ -271,6 +293,7 @@ + chgrp -R $(LIBS_GROUP) $(DESTDIR)/$(MASON_HTML_PATH) \ + $(DESTDIR)/$(MASON_LOCAL_HTML_PATH) + ++XXX-fixperms: # post pkg install + # Make the web ui's data dir writable + chmod 0770 $(DESTDIR)/$(MASON_DATA_PATH) \ + $(DESTDIR)/$(MASON_SESSION_PATH) +@@ -278,27 +301,36 @@ + $(DESTDIR)/$(MASON_SESSION_PATH) + chgrp -R $(WEB_GROUP) $(DESTDIR)/$(MASON_DATA_PATH) \ + $(DESTDIR)/$(MASON_SESSION_PATH) ++ + dirs: + mkdir -p $(DESTDIR)/$(RT_BIN_PATH) ++ mkdir -p $(DESTDIR)/$(WRAPPED_RT_BIN_PATH) + mkdir -p $(DESTDIR)/$(MASON_DATA_PATH) + mkdir -p $(DESTDIR)/$(MASON_SESSION_PATH) + mkdir -p $(DESTDIR)/$(RT_ETC_PATH) + mkdir -p $(DESTDIR)/$(RT_LIB_PATH) + mkdir -p $(DESTDIR)/$(MASON_HTML_PATH) + mkdir -p $(DESTDIR)/$(MASON_LOCAL_HTML_PATH) ++ mkdir -p $(DESTDIR)/$(RT_LOG_PATH) + + libs-install: + [ -d $(DESTDIR)/$(RT_LIB_PATH) ] || mkdir $(DESTDIR)/$(RT_LIB_PATH) + chown -R $(LIBS_OWNER) $(DESTDIR)/$(RT_LIB_PATH) + chgrp -R $(LIBS_GROUP) $(DESTDIR)/$(RT_LIB_PATH) + chmod -R $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_LIB_PATH) ++ ++perl-build: + ( cd ./lib; \ +- $(PERL) Makefile.PL INSTALLSITELIB=$(DESTDIR)/$(RT_LIB_PATH) \ ++ $(PERL) -p -i -e " s'!!RT_VERSION!!'$(RT_VERSION)'g;" RT.pm \ ++ && $(PERL) Makefile.PL INSTALLSITELIB=$(DESTDIR)/$(RT_LIB_PATH) \ + INSTALLMAN1DIR=$(DESTDIR)/$(RT_MAN_PATH)/man1 \ + INSTALLMAN3DIR=$(DESTDIR)/$(RT_MAN_PATH)/man3 \ + && make \ + && make test \ +- && $(PERL) -p -i -e " s'!!RT_VERSION!!'$(RT_VERSION)'g;" blib/lib/RT.pm ;\ ++ ) ++ ++perl-install: ++ ( cd ./lib; \ + make install \ + INSTALLSITEMAN1DIR=$(DESTDIR)/$(RT_MAN_PATH)/man1 \ + INSTALLSITEMAN3DIR=$(DESTDIR)/$(RT_MAN_PATH)/man3 \ +@@ -320,13 +352,16 @@ + initialize.Oracle: acls initdb.rtuser + + acls: +- cp etc/acl.$(DB_TYPE) '$(DESTDIR)/$(RT_ETC_PATH)/acl.$(DB_TYPE)' +- $(PERL) -p -i -e " s'!!DB_TYPE!!'"$(DB_TYPE)"'g;\ +- s'!!DB_HOST!!'"$(DB_HOST)"'g;\ +- s'!!DB_RT_PASS!!'"$(DB_RT_PASS)"'g;\ +- s'!!DB_RT_HOST!!'"$(DB_RT_HOST)"'g;\ +- s'!!DB_RT_USER!!'"$(DB_RT_USER)"'g;\ +- s'!!DB_DATABASE!!'"$(DB_DATABASE)"'g;" $(DESTDIR)/$(RT_ETC_PATH)/acl.$(DB_TYPE) ++ cp etc/acl.* '$(DESTDIR)/$(RT_ETC_PATH)' ++ cp etc/schema.* '$(DESTDIR)/$(RT_ETC_PATH)' ++ $(PERL) -p -i -e " s@!!DB_TYPE!!@"$(DB_TYPE)"@g;\ ++ s@!!DB_HOST!!@"$(DB_HOST)"@g;\ ++ s@!!DB_RT_PASS!!@"$(DB_RT_PASS)"@g;\ ++ s@!!DB_RT_HOST!!@"$(DB_RT_HOST)"@g;\ ++ s@!!DB_RT_USER!!@"$(DB_RT_USER)"@g;\ ++ s@!!DB_DATABASE!!@"$(DB_DATABASE)"@g;" $(DESTDIR)/$(RT_ETC_PATH)/acl.$(DB_TYPE) ++ ++XXX-acls: # post pkg install + bin/initacls.$(DB_TYPE) '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_DBA)' '$(DB_DBA_PASSWORD)' '$(DB_DATABASE)' '$(DESTDIR)/$(RT_ETC_PATH)/acl.$(DB_TYPE)' + + +@@ -336,21 +371,35 @@ + + + createdb: ++ ++XXX-createdb: # post pkg installl + $(PERL) tools/initdb '$(DB_TYPE)' '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_DBA)' '$(DB_DATABASE)' create + initdb.dba: ++ ++XXX-initdb.dba: # post pkg install + $(PERL) tools/initdb '$(DB_TYPE)' '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_DBA)' '$(DB_DATABASE)' insert + + initdb.rtuser: ++ ++XXX-initdb.rtuser: # post pkg install + $(PERL) tools/initdb '$(DB_TYPE)' '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_RT_USER)' '$(DB_DATABASE)' insert + + + + insert-install: +- cp -rp ./tools/insertdata \ ++ cp -rp ./tools/insertdata ./tools/initdb \ + $(DESTDIR)/$(RT_ETC_PATH) + $(PERL) -p -i -e " s'!!RT_ETC_PATH!!'$(RT_ETC_PATH)'g;\ + s'!!RT_LIB_PATH!!'$(RT_LIB_PATH)'g;"\ + $(DESTDIR)/$(RT_ETC_PATH)/insertdata ++ cp -rp ./bin/initacls.* \ ++ $(DESTDIR)/$(RT_ETC_PATH) ++ cp -rp ./rtconfig \ ++ $(DESTDIR)/$(RT_ETC_PATH) ++ cp -rp ./README \ ++ $(DESTDIR)/$(RT_ETC_PATH)/README.rt ++ cp -rp ./README.pkg \ ++ $(DESTDIR)/$(RT_ETC_PATH) + + bin-install: + cp -p ./bin/webmux.pl $(DESTDIR)/$(RT_MODPERL_HANDLER) +@@ -359,6 +408,11 @@ + cp -p ./bin/rt $(DESTDIR)/$(RT_CLI_BIN) + cp -p ./bin/mason_handler.fcgi $(DESTDIR)/$(RT_FASTCGI_HANDLER) + cp -p ./bin/mason_handler.scgi $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) ++ cp -p ./src/wrapper $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) ++ ln -f $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) $(DESTDIR)/$(RT_MAILGATE_BIN_WRAPPER) ++ ln -f $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) $(DESTDIR)/$(RT_CLI_ADMIN_BIN_WRAPPER) ++ ln -f $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) $(DESTDIR)/$(RT_FASTCGI_HANDLER_WRAPPER) ++ ln -f $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER_WRAPPER) + + $(PERL) -p -i -e "s'!!RT_PATH!!'"$(RT_PATH)"'g;\ + s'!!PERL!!'"$(PERL)"'g;\ +@@ -377,7 +431,7 @@ + -[ -f $(DESTDIR)/$(RT_CONFIG) ] && \ + mv $(DESTDIR)/$(RT_CONFIG) $(DESTDIR)/$(RT_CONFIG).old && \ + chmod 000 $(DESTDIR)/$(RT_CONFIG).old +- cp -rp ./etc/config.pm $(DESTDIR)/$(RT_CONFIG) ++ cp -rp ./etc/config.pm $(DESTDIR)/$(RT_CONFIG).default + $(PERL) -p -i -e "\ + s'!!DB_TYPE!!'"$(DB_TYPE)"'g;\ + s'!!DB_HOST!!'"$(DB_HOST)"'g;\ +@@ -391,7 +445,7 @@ + s'!!MASON_DATA_PATH!!'"$(MASON_DATA_PATH)"'g;\ + s'!!RT_LOG_PATH!!'"$(RT_LOG_PATH)"'g;\ + s'!!RT_VERSION!!'"$(RT_VERSION)"'g;\ +- " $(DESTDIR)/$(RT_CONFIG) ++ " $(DESTDIR)/$(RT_CONFIG).default + + + commit: |