Early Draft of Bugzilla Dev Setup

Dylan Hardison dylan at mozilla.com
Fri May 13 14:27:55 UTC 2016


I've included those fixes in the current post. Thanks dkl!

In particular the restarting is because of the -R ., which means it
starts when any files change in the root. Obviously that is wrong, so
I've updated the list.
To work 100% of the time I'd need to make it watch each .cgi.. and
this is turning into magic incantation land, so I've filed
https://bugzilla.mozilla.org/show_bug.cgi?id=1272673 to make this
simple.

On Fri, May 13, 2016 at 9:42 AM, David Lawrence <dlawrence at mozilla.com> wrote:
> Using Ubuntu 16.04 LTS (Docker)
>
>> Firstly, we need some system dependencies:
>>
>>    Ubuntu users: sudo apt-get install git perl-modules
>>    build-essential cpanminus
>
> Ubuntu users:
>   $ sudo apt-get update
>   $ sudo apt-get install git perl-modules build-essential cpanminus \
>     libssl-dev libexpat1-dev
>
>>    CentOS/RPM users: TODO
>>
>> A checkout of bugzilla is required, and everything we do will be from
>> that directory.
>>
>> git clone https://github.com/bugzilla/bugzilla
>> cd bugzilla
>>
>> Next, we can run checksetup.pl with its fancy new –cpanm flag to
>> install all our dependencies into local directory. Note that we
>> do not need to be root for any of these commands, and nothing
>> (from this point on) needs to be installed to the system.
>>
>> perl checksetup.pl --cpanm
>
> ! Installing the dependencies failed: Module 'Net::SMTP::SSL' is not
> installed, Module 'SOAP::Lite' is not installed, Module 'XMLRPC::Lite'
> is not installed, Module 'XML::Twig' is not installed
> ! Bailing out the installation for Bugzilla-5.1.
>
> Added libssl-dev above to fix Net::SMTP::SSL build issue.
> Added libexpat1-dev above to fix SOAP::Lite, XMLRPC::Lite, and XML::Twig
> build issues.
>
>> If all goes well, that should complete with a message saying you
>> need to edit localconfig and re-run checksetup. If you’re fine just
>> using SQLite, you do not need to edit localconfig. Just re-run
>> checksetup.pl, as below:
>>
>> perl checksetup.pl
>>
>> The above will prompt you for an email, username, realname and
>> password. After you provide those details, it will configure the
>> database.
>>
>> Now we can run a development server, with the following perl command
>> below:
>>
>> perl -Ilocal/lib/perl5 bin/plackup -R . app.psgi
>
> Change to:
> perl -Ilocal/lib/perl5 local/bin/plackup -R . app.psgi
>
>> This will start an http on http://localhost:5000.
>>
>> Navigate to it, and login using the email/password you used above.
>>
>> Bugzilla will direct you to set the urlbase – which you can set
>> to the same “http://localhost:5000” above.
>
> The site seems to work fine. But the plack output says it kills the
> server and restarts after each page load. Is this normal?
>
> Killing the existing server (pid:688)
> Successfully killed! Restarting the new server process.
> HTTP::Server::PSGI: Accepting connections at http://0:5000/
> 10.211.55.2 - - [13/May/2016:13:40:35 +0000] "POST /process_bug.cgi
> HTTP/1.1" 200 7688 "http://docker:5000/show_bug.cgi?id=1" "Mozilla/5.0
> (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0"
> 10.211.55.2 - - [13/May/2016:13:40:35 +0000] "GET
> /data/assets/51af664f3910b417cf7544987d29336d.css HTTP/1.1" 200 80589
> "http://docker:5000/process_bug.cgi" "Mozilla/5.0 (Macintosh; Intel Mac
> OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0"
> 10.211.55.2 - - [13/May/2016:13:40:35 +0000] "GET
> /data/assets/aae018547291cb399f8ae4d70aa29abc.js HTTP/1.1" 200 488706
> "http://docker:5000/process_bug.cgi" "Mozilla/5.0 (Macintosh; Intel Mac
> OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0"
> 10.211.55.2 - - [13/May/2016:13:40:35 +0000] "GET
> /data/assets/bea14174a90e472c2f5105b100c45963.js HTTP/1.1" 200 48008
> "http://docker:5000/process_bug.cgi" "Mozilla/5.0 (Macintosh; Intel Mac
> OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0"
> -- /bugzilla/data/db/bugs updated.
> Killing the existing server (pid:689)
> Successfully killed! Restarting the new server process.
> HTTP::Server::PSGI: Accepting connections at http://0:5000/
>
> dkl
>
> On 5/12/16 10:28 PM, Dylan Hardison wrote:
>> This post has been rattling around in my head for a bit.
>> Eventually it needs to end up in docs.
>>
>> http://dylanwh.tumblr.com/post/144277013247/developing-bugzilla-with-plackup-and-cpanminus
>> -
>> To view or change your list settings, click here:
>> <http://bugzilla.org/cgi-bin/mj_wwwusr?user=dkl@mozilla.com>
>>
>
> --
> David Lawrence
> dkl at mozilla.com
> bugzilla.mozilla.org
> -
> To view or change your list settings, click here:
> <http://bugzilla.org/cgi-bin/mj_wwwusr?user=dylan@mozilla.com>



More information about the developers mailing list