Bugzilla: Difference between revisions

From wikinotes
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Install =
An opensource bugtracker.
<blockquote>


{{
= Documentation =
TODO |
need to extend the size of mysql tables so that they can receive attachments
}}
 
 
== System ==
<blockquote>
<blockquote>
<syntaxhighlight lang="bash">
{| class="wikitable"
sudo pkg install mysql56-server bugzilla50 nginx perl5 fcgiwrap postfix
|-
 
| github || https://github.com/bugzilla/bugzilla
adduser www ## for nginx
|-
adduser backup ## to backup fs, and database
|}
 
</blockquote><!-- Documentation -->
</syntaxhighlight>
 
 
<syntaxhighlight lang="bash">
#### /etc/rc.conf
sshd_enable="YES"
mysql_enable="YES"
nginx_enable="YES"
postfix_enable="YES"
fastcgi_enable="YES"
fastcgi_user="www"
 
####
 
 
## Set timezone
cp /usr/share/zoneinfo/America/Toronto /etc/localtime


</syntaxhighlight>
= Notes =
</blockquote><!-- System -->
 
== MySQL ==
<blockquote>
<blockquote>
<syntaxhighlight lang="mysql">
{|
## Create the bugs database
|-
CREATE DATABASE bugs;
| [[bugzilla install]]
 
|-
 
| [[bugzilla configuration]]
 
|-
## Create user backup for automated mysqldumps
|}
GRANT  SELECT, LOCK TABLES, SHOW VIEW
</blockquote><!-- Notes -->
ON      *.*
TO      'bugs'@'%'
IDENTIFIED BY <password>;
 
 
## Create user bugs, used by bugzilla
## to update the tables
GRANT  SELECT,
        INSERT,
        UPDATE,
  DELETE,
  INDEX,
  ALTER,
  CREATE,
  LOCK TABLES,
        CREATE TEMPORARY TABLES,
  DROP,
  REFERENCES
 
ON      bugs.*
TO      bugs@localhost IDENTIFIED BY <password>;
 
 
 
## Flush privileges so that new settings take effect
FLUSH PRIVILEGES;
 
</syntaxhighlight>
</blockquote><!-- MySQL -->
 
 
 
== fastcgiwrap ==
<blockquote>
cgi scripts are written in Perl, nginx does not parse fcgi so you need something
else nginx can use to render them. All configuration is done in <code>/etc/rc.conf</code>.
 
 
</blockquote><!-- fastcgiwrap -->
 
 
== Nginx ==
<blockquote>
<syntaxhighlight lang="C">
## /usr/local/etc/nginx/nginx.conf                                                                                                                                                                                                    |1
 
                                                                                                                                                                                                                                      |
user www www;                                                                                                                                                                                                                          |
worker_processes 1;                                                                                                                                                                                                                    |
                                                                                                                                                                                                                                      |
events {                                                                                                                                                                                                                              |
  worker_connections 1024;                                                                                                                                                                                                            |
}                                                                                                                                                                                                                                      |
                                                                                                                                                                                                                                      |
                                                                                                                                                                                                                                      |
http {                                                                                                                                                                                                                                 |
                                                                                                                                                                                                                                      |
  ## Default page type is HTML with CSS                                                                                                                                                                                              |
  include      /usr/local/etc/nginx/mime.types;                                                                                                                                                                                      |
  default_type  application/octet-stream;                                                                                                                                                                                            |
                                                                                                                                                                                                                                      |
                                                                                                                                                                                                                                      |
  ## HTTP                                                                                                                                                                                                                            |
  server {                                                                                                                                                                                                                            |
      listen        80;                                                                                                                                                                                                              |
      server_name    localhost;                                                                                                                                                                                                        |
                                                                                                                                                                                                                                      |
      charset utf-8;                                                                                                                                                                                                                  |
      root      /usr/local/www/bugzilla;                                                                                                                                                                                              |
      index      index.cgi;                                                                                                                                                                                                            |
                                                                                                                                                                                                                                      |
                                                                                                                                                                                                                                      |
      location ~ ^.*\.cgi$ {                                                                                                                                                                                                          |
        fastcgi_pass    unix:/var/run/fcgiwrap/fcgiwrap.sock;                                                                                                                                                                        |
        fastcgi_index index.cgi;                                                                                                                                                                                                      |
        fastcgi_param SCRIPT_FILENAME /usr/local/www/bugzilla/$fastcgi_script_name;                                                                                                                                                  |
        include fastcgi_params;                                                                                                                                                                                                      |
                                                                                                                                                                                                                                      |
        ## Prevent 502 Bad Gateway                                                                                                                                                                                                    |
        #fastcgi_connect_timeout 60;                                                                                                                                                                                                  |
        #fastcgi_send_timeout 180;                                                                                                                                                                                                    |
        #fastcgi_read_timeout 180;                                                                                                                                                                                                    |
        #fastcgi_buffer_size 128k;                                                                                                                                                                                                    |
        #fastcgi_buffers 4 256k;                                                                                                                                                                                                      |
        #fastcgi_busy_buffers_size 256k;                                                                                                                                                                                              |
      }                                                                                                                                                                                                                                |
  }                                                                                                                                                                                                                                  |
}
 
</syntaxhighlight>
 
 
</blockquote><!-- Nginx -->
 
= postfix =
<blockquote>
http://bugzilla.readthedocs.io/en/latest/installing/essential-post-install-config.html
 
We don't need a full postfix install, we only need the sendmail (SMTP)
portion of it. For the most part, the default config just works:
 
See [[postfix]].
 
<syntaxhighlight lang="bash">
#### /usr/local/etc/postfix/main.cf
recipient_delimiter = +;
 
####
</syntaxhighlight>
 
<syntaxhighlight lang="bash">
service postfix start
echo "Email Body" | mail -s "Test Subject" willjpittman@gmail.com ## check in spam
</syntaxhighlight>
</blockquote><!-- postfix -->
 
== Bugzilla ==
<blockquote>
 
 
<syntaxhighlight lang="bash">
## Bugzilla needs an assortment of PERL modules in order
## to start.
 
sudo -i
cd /usr/local/www/bugzilla
 
perl  installmodule.pl  MIME::Parser
perl  installmodule.pl  LWP::UserAgent
perl  installmodule.pl  XML::Twig   
perl  installmodule.pl  Net::LDAP                                                                                                                                                                                                | 3 #!TODO: kind of a major oversight. Currently the way tha this is working
perl  installmodule.pl  Authen::Radius                                                                                                                                                                                            |  2 #!      it is going to strip all comments from the output file. This should
perl  installmodule.pl  SOAP::Lite                                                                                                                                                                                                |  1 #!      be fixed...
perl  installmodule.pl  XMLRPC::Lite                                                                                                                                                                                              |30
perl  installmodule.pl  JSON::RPC                                                                                                                                                                                                |  1
perl  installmodule.pl  Test::Taint                                                                                                                                                                                              |  2 class ModifyKeyVals( object ):
perl  installmodule.pl  Email::Reply                                                                                                                                                                                              |  3 +-- 87 lines: #@ __init__                                                                            --------------------------------------------------------------------------------------------------------------------
perl  installmodule.pl  HTML::FormatText::WithLinks                                                                                                                                                                              |  4 +-- 10 lines: #@ main                                                                                --------------------------------------------------------------------------------------------------------------------
perl  installmodule.pl  TheSchwartz                                                                                                                                                                                              |  5 +-- 13 lines: #@ _validate_args                                                                      --------------------------------------------------------------------------------------------------------------------
perl  installmodule.pl  Daemon::Generic                                                                                                                                                                                          |  6
perl  installmodule.pl  Apache2::SizeLimit                                                                                                                                                                                        |  7 +-- 17 lines: #@ strip_comments                                                                      --------------------------------------------------------------------------------------------------------------------
perl  installmodule.pl  File::MimeInfo::Magic                                                                                                                                                                                    |  8 +--109 lines: #@ _strip_multiline_comments                                                          --------------------------------------------------------------------------------------------------------------------
perl  installmodule.pl  IO::Scalar                                                                                                                                                                                                |  9 +-- 21 lines: #@ _strip_line_comments                                                                --------------------------------------------------------------------------------------------------------------------
perl  installmodule.pl  Cache::Memcached                                                                                                                                                                                          | 10
perl  installmodule.pl  File::Copy::Recursive                                                                                                                                                                                    | 11 +-- 32 lines: #@ write_tempfile                                                                      --------------------------------------------------------------------------------------------------------------------
perl  installmodule.pl  File::Which                                                                                                                                                                                              | 12 +-- 39 lines: #@ replace_keyvals                                                                    --------------------------------------------------------------------------------------------------------------------
perl  installmodule.pl  DBD::mysql                                                                                                                                                                                                | 13 +-- 17 lines: #@ write_to_config                                                                    --------------------------------------------------------------------------------------------------------------------
 
</syntaxhighlight>
 
<syntaxhighlight lang="bash">
## Run Bugzilla Installer
sudo -i
cd    /usr/local/www/bugzilla
perl  checksetup.pl
 
</syntaxhighlight>
 
</blockquote><!-- Bugzilla -->
 
 
 
</blockquote><!-- Install -->
 
= Usage =
<blockquote>
 
</blockquote><!-- Usage -->
 
= Configuration =
<blockquote>
 
<syntaxhighlight lang="bash">
Administration > Bugzilla
 
Required Settings:
- urlbase
 
Maintainer:
- user@domain.com
 
User Authentication:
- remember login: yes
 
Bug Fields:
- Default Priority: normal
- Default Severity: normal
 
Email:
- mail_delivery_method: sendmail
- mailfrom:            bugzilla@domain.com ## domain doesn't exist
#  that is alright. must match hostname's fake domain.
 
 
</syntaxhighlight>
 
 
</blockquote><!-- Configuration -->

Latest revision as of 20:05, 19 September 2021

An opensource bugtracker.

Documentation

github https://github.com/bugzilla/bugzilla

Notes

bugzilla install
bugzilla configuration