Closed Bug 1678960 Opened 4 years ago Closed 4 years ago

checksetup.pl not generating .htaccess files

Categories

(Bugzilla :: Installation & Upgrading, defect)

Harmony
x86_64
FreeBSD
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: vasko.tim, Unassigned)

Details

$ uname -a
FreeBSD bugzilla 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC  amd64

The checksetup.pl script is not generating any .htaccess files.

Using fresh checkout of https://github.com/bugzilla/harmony:master, base localconfig is generated successfully and it explicitly sets:

$create_htaccess = 1; 

Having updated the localconfig with group, db data, baseurl, etc. - checksetup.pl is executed again and finishes successfully - but no .htaccess file is created.

Re-running check setup.pl doesn't help:

* This is Bugzilla 20200805.1 on Perl 5.32.0
* Running on FreeBSD 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC
Checking for Algorithm::BloomFilter (0.02)      ok: found v0.02 
Checking for Bytes::Random::Secure (any)       ok: found v0.29 
Checking for                  CGI (4.31)      ok: found v4.50 
Checking for         CGI::Compile (any)       ok: found v0.25 
Checking for   CGI::Emulate::PSGI (any)       ok: found v0.23 
Checking for  CPAN::Meta::Prereqs (2.132830)  ok: found v2.150010 
Checking for CPAN::Meta::Requirements (2.121)     ok: found v2.140 
Checking for    Class::XSAccessor (1.18)      ok: found v1.19 
Checking for           Crypt::CBC (any)       ok: found v2.33 
Checking for           Crypt::DES (any)       ok: found v2.07 
Checking for      Crypt::DES_EDE3 (any)       ok: found v0.01 
Checking for       Crypt::OpenPGP (1.12)      ok: found v1.12 
Checking for         Crypt::SMIME (any)       ok: found v0.27 
Checking for                  DBI (1.614)     ok: found v1.643 
Checking for          DBIx::Class (any)       ok: found v0.082842 
Checking for DBIx::Class::Helpers (== 2.034002) ok: found v2.034002 
Checking for      DBIx::Connector (any)       ok: found v0.56 
Checking for      Daemon::Generic (any)       ok: found v0.85 
Checking for Data::Password::passwdqc (0.08)      ok: found v0.09 
Checking for         Date::Format (2.23)      ok: found v2.24 
Checking for          Date::Parse (2.31)      ok: found v2.33 
Checking for             DateTime (0.75)      ok: found v1.52 
Checking for   DateTime::TimeZone (2.11)      ok: found v2.39 
Checking for       Devel::NYTProf (6.04)      ok: found v6.06 
Checking for          Digest::SHA (5.47)      ok: found v6.02 
Checking for                   EV (4.0)       ok: found v4.33 
Checking for       Email::Address (any)       ok: found v1.912 
Checking for          Email::MIME (1.904)     ok: found v1.949 
Checking for          Email::Send (1.911)     ok: found v2.201 
Checking for  ExtUtils::MakeMaker (7.22)      ok: found v7.44 
Checking for        FFI::Platypus (any)       ok: found v1.33 
Checking for File::MimeInfo::Magic (any)       ok: found v0.30 
Checking for               Future (0.34)      ok: found v0.46 
Checking for         HTML::Escape (1.10)      ok: found v1.10 
Checking for           HTML::Tree (any)       ok: found v5.07 
Checking for            IO::Async (0.71)      ok: found v0.77 
Checking for   IO::Compress::Gzip (any)       ok: found v2.093 
Checking for           IO::Scalar (any)       ok: found v2.113 
Checking for  IPC::System::Simple (any)       ok: found v1.30 
Checking for        JSON::MaybeXS (1.003008)  ok: found v1.004003 
Checking for      JSON::Validator (3.05)      ok: found v4.10 
Checking for             JSON::XS (2.0)       ok: found v4.02 
Checking for LWP::Protocol::https (6.07)      ok: found v6.09 
Checking for       LWP::UserAgent (6.44)      ok: found v6.49 
Checking for LWP::UserAgent::Determined (any)       ok: found v1.07 
Checking for      List::MoreUtils (0.418)     ok: found v0.428 
Checking for        Log::Dispatch (2.67)      ok: found v2.70 
Checking for        Log::Log4perl (1.49)      ok: found v1.53 
Checking for  Math::Random::ISAAC (v1.0.1)    ok: found v1.004 
Checking for     Module::Metadata (1.000033)  ok: found v1.000037 
Checking for      Module::Runtime (0.014)     ok: found v0.016 
Checking for            Mojo::JWT (0.07)      ok: found v0.09 
Checking for MojoX::Log::Log4perl (0.04)      ok: found v0.12 
Checking for          Mojolicious (8.42)      ok: found v8.65 
Checking for Mojolicious::Plugin::OAuth2::Server (0.44)      ok: found v0.47 
Checking for                  Moo (2.002004)  ok: found v2.004000 
Checking for MooX::StrictConstructor (0.008)     ok: found v0.011 
Checking for          Mozilla::CA (20160104)  ok: found v20200520 
Checking for             Net::DNS (any)       ok: found v1.29 
Checking for       Package::Stash (0.37)      ok: found v0.38 
Checking for    Parse::CPAN::Meta (1.44)      ok: found v2.150010 
Checking for         PerlX::Maybe (any)       ok: found v1.201 
Checking for       Regexp::Common (any)       ok: found v2017060201 
Checking for           Role::Tiny (2.000003)  ok: found v2.001004 
Checking for         Scope::Guard (0.21)      ok: found v0.21 
Checking for               Sereal (4.004)     ok: found v4.018 
Checking for           Sub::Quote (2.005000)  ok: found v2.006006 
Checking for          Sys::Syslog (any)       ok: found v0.36 
Checking for             Template (2.24)      ok: found v3.009 
Checking for         Text::CSV_XS (1.26)      ok: found v1.44 
Checking for           Text::Diff (any)       ok: found v1.45 
Checking for            Throwable (0.200013)  ok: found v0.200013 
Checking for          Tie::IxHash (any)       ok: found v1.23 
Checking for           Type::Tiny (1.004004)  ok: found v1.012000 
Checking for                  URI (1.55)      ok: found v1.76 
Checking for      URI::Escape::XS (0.14)      ok: found v0.14 
Checking for                 perl (5.010001)  ok: found v5.032000 
Checking for              version (0.87)      ok: found v0.9924 

Optional features:
Feature 'alien_cmark': Support GitHub-flavored markdown
  Checking for  Alien::libcmark_gfm (3)         not found 

Feature 'argon2': Support hashing passwords with Argon2
  Checking for        Crypt::Argon2 (0.004)     ok: found v0.007 

Feature 'auth_ldap': LDAP Authentication
  Checking for            Net::LDAP (any)       not found 

Feature 'auth_radius': RADIUS Authentication
  Checking for       Authen::Radius (any)       not found 

Feature 'better_xff': Improved behavior of MOJO_REVERSE_PROXY
  Checking for Mojolicious::Plugin::ForwardedFor (any)       ok: found v0.001 

Feature 'bmo': features that BMO needs
  Checking for  Alien::libcmark_gfm (3)         not found 
  Checking for     Auth::GoogleAuth (1.01)      ok: found v1.02 
  Checking for Cache::Memcached::Fast (0.17)      ok: found v0.26 
  Checking for       Chart::Clicker (any)       not found 
  Checking for         Chart::Lines (v2.4.10)   ok: found v2.4.10 
  Checking for Class::Accessor::Fast (any)       ok: found v0.51 
  Checking for        Crypt::Argon2 (0.004)     ok: found v0.007 
  Checking for           DBD::mysql (4.037)     ok: found v4.050 
  Checking for      Daemon::Generic (any)       ok: found v0.85 
  Checking for   DataDog::DogStatsd (0.05)      ok: found v0.06 
  Checking for DateTime::Format::MySQL (0.06)      ok: found v0.06 
  Checking for Email::MIME::Attachment::Stripper (any)       ok: found v1.317 
  Checking for         Email::Reply (any)       ok: found v1.204 
  Checking for               Encode (2.21)      ok: found v3.06 
  Checking for       Encode::Detect (any)       ok: found v1.01 
  Checking for File::Copy::Recursive (any)       ok: found v0.45 
  Checking for File::MimeInfo::Magic (any)       ok: found v0.30 
  Checking for          File::Which (any)       ok: found v1.23 
  Checking for                   GD (1.20)      ok: found v2.72 
  Checking for  GD::Barcode::QRcode (any)       ok: found v0.01 
  Checking for            GD::Graph (any)       ok: found v1.54 
  Checking for             GD::Text (any)       ok: found v0.86 
  Checking for         HTML::Parser (3.67)      ok: found v3.72 
  Checking for       HTML::Scrubber (any)       ok: found v0.19 
  Checking for           IO::Scalar (any)       ok: found v2.113 
  Checking for            JSON::RPC (== 1.01)   not found 
  Checking for Log::Log4perl::Appender::Raven (0.006)     ok: found v0.006 
  Checking for         MIME::Parser (5.406)     ok: found v5.509 
  Checking for Mojolicious::Plugin::ForwardedFor (any)       ok: found v0.001 
  Checking for          PatchReader (v0.9.6)    ok: found v0.9.6 
  Checking for           SOAP::Lite (0.712)     ok: found v1.27 
  Checking for Search::Elasticsearch (any)       ok: found v7.30 
  Checking for Template::Plugin::GD::Image (any)       ok: found v1.56 
  Checking for          Test::Taint (1.06)      ok: found v1.08 
  Checking for  Text::MultiMarkdown (1.000034)  not found 
  Checking for          TheSchwartz (1.10)      ok: found v1.15 
  Checking for          URI::Escape (any)       ok: found v3.31 
  Checking for    Unicode::GCString (any)       ok: found v2013.10 
  CheckiInvalid parameter: phabricator_auth_callback_url
Invalid parameter: comment_taggers_group
Invalid parameter: phabricator_app_id
ng for          XML::Simple (any)       ok: found v2.25 
  Checking for            XML::Twig (any)       ok: found v3.52 
  Checking for         XMLRPC::Lite (0.712)     ok: found v0.717 

Feature 'chart_clicker': Support nice-looking charts
  Checking for       Chart::Clicker (any)       not found 

Feature 'datadog': Data Dog support
  Checking for   DataDog::DogStatsd (0.05)      ok: found v0.06 

Feature 'detect_charset': Automatic charset detection for text attachments
  Checking for               Encode (2.21)      ok: found v3.06 
  Checking for       Encode::Detect (any)       ok: found v1.01 

Feature 'documentation': Documentation
  Checking for File::Copy::Recursive (any)       ok: found v0.45 
  Checking for          File::Which (any)       ok: found v1.23 

Feature 'elasticsearch': Elasticsearch-powered searches
  Checking for Search::Elasticsearch (any)       ok: found v7.30 

Feature 'extension_push_optional': unknown
  Checking for          XML::Simple (any)       ok: found v2.25 

Feature 'graphical_reports': Graphical Reports
  Checking for                   GD (1.20)      ok: found v2.72 
  Checking for            GD::Graph (any)       ok: found v1.54 
  Checking for             GD::Text (any)       ok: found v0.86 
  Checking for Template::Plugin::GD::Image (any)       ok: found v1.56 

Feature 'html_desc': More HTML in Product/Group Descriptions
  Checking for         HTML::Parser (3.67)      ok: found v3.72 
  Checking for       HTML::Scrubber (any)       ok: found v0.19 

Feature 'inbound_email': Inbound Email
  Checking for Email::MIME::Attachment::Stripper (any)       ok: found v1.317 
  Checking for         Email::Reply (any)       ok: found v1.204 

Feature 'jobqueue': Mail Queueing
  Checking for      Daemon::Generic (any)       ok: found v0.85 
  Checking for          TheSchwartz (1.10)      ok: found v1.15 

Feature 'jsonrpc': JSON-RPC Interface
  Checking for            JSON::RPC (== 1.01)   not found 
  Checking for          Test::Taint (1.06)      ok: found v1.08 

Feature 'linux_pdeath': Linux::Pdeathsig for a good parent/child relationships
  Checking for     Linux::Pdeathsig (any)       not found 

Feature 'linux_pid': Linux::PID
  Checking for           Linux::Pid (any)       ok: found v0.04 

Feature 'linux_smaps': Linux::Smaps::Tiny for limiting memory usage
  Checking for        BSD::Resource (any)       ok: found v1.2911 
  Checking for   Linux::Smaps::Tiny (any)       ok: found v0.10 

Feature 'markdown': Markdown syntax support for comments
  Checking for  Text::MultiMarkdown (1.000034)  not found 
  Checking for    Unicode::GCString (any)       ok: found v2013.10 

Feature 'memcached': Memcached Support
  Checking for Cache::Memcached::Fast (0.17)      ok: found v0.26 

Feature 'mfa': Multi-Factor Authentication
  Checking for     Auth::GoogleAuth (1.01)      ok: found v1.02 
  Checking for  GD::Barcode::QRcode (any)       ok: found v0.01 

Feature 'moving': Move Bugs Between Installations
  Checking for         MIME::Parser (5.406)     ok: found v5.509 
  Checking for            XML::Twig (any)       ok: found v3.52 

Feature 'mysql': MySQL database support
  Checking for           DBD::mysql (4.037)     ok: found v4.050 
  Checking for DateTime::Format::MySQL (0.06)      ok: found v0.06 

Feature 'new_charts': New Charts
  Checking for         Chart::Lines (v2.4.10)   ok: found v2.4.10 
  Checking for                   GD (1.20)      ok: found v2.72 

Feature 'old_charts': Old Charts
  Checking for         Chart::Lines (v2.4.10)   ok: found v2.4.10 
  Checking for                   GD (1.20)      ok: found v2.72 

Feature 'oracle': Oracle database support
  Checking for          DBD::Oracle (1.19)      not found 

Feature 'patch_viewer': Patch Viewer
  Checking for          PatchReader (v0.9.6)    ok: found v0.9.6 

Feature 'pg': Postgres database support
  Checking for              DBD::Pg (v2.19.3)   not found 

Feature 'rest': REST Interface
  Checking for            JSON::RPC (== 1.01)   not found 
  Checking for          Test::Taint (1.06)      ok: found v1.08 

Feature 's3': Amazon S3 Attachment Storage
  Checking for Class::Accessor::Fast (any)       ok: found v0.51 
  Checking for          URI::Escape (any)       ok: found v3.31 
  Checking for          XML::Simple (any)       ok: found v2.25 

Feature 'sentry': Sentry Support
  Checking for Log::Log4perl::Appender::Raven (0.006)     ok: found v0.006 

Feature 'smtp_auth': SMTP Authentication
  Checking for         Authen::SASL (any)       not found 

Feature 'sqlite': SQLite database support
  Checking for          DBD::SQLite (1.29)      ok: found v1.66 
  Checking for DateTime::Format::SQLite (0.11)      ok: found v0.11 

Feature 'typesniffer': Sniff MIME type of attachments
  Checking for File::MimeInfo::Magic (any)       ok: found v0.30 
  Checking for           IO::Scalar (any)       ok: found v2.113 

Feature 'updates': Automatic Update Notifications
  Checking for            XML::Twig (any)       ok: found v3.52 

Feature 'xmlrpc': XML-RPC Interface
  Checking for           SOAP::Lite (0.712)     ok: found v1.27 
  Checking for          Test::Taint (1.06)      ok: found v1.08 
  Checking for         XMLRPC::Lite (0.712)     ok: found v0.717 

Reading /usr/local/www/harmony/localconfig...
Checking for                MySQL (5.6.12)    ok: found v5.7.32-log 

Creating js/yui.js...
Creating js/yui3.js...
Creating skins/yui.css...
Creating skins/yui3.css...
Creating version.json...
Removing existing compiled templates...
Precompiling templates...done.
Fixing file permissions...
checksetup.pl complete.

I'm not skilled with perl, but doing basic debugging reveals that create_htaccess subroutine and plumbing are entirely missing (at least in comparison to 5.0.6):

Checking harmony:master:

www/harmony $ grep -R . -Hne create_htaccess
./.circleci/checksetup_answers.txt:7:$answer{'create_htaccess'} = '1';
./Bugzilla/Install/Localconfig.pm:56:  {name => 'create_htaccess', default => 1,},
./checksetup.pl:464:L<Bugzilla::Install::Filesystem/create_htaccess>.
./conf/checksetup_answers.txt:9:$answer{'create_htaccess'}      = '1';
./qa/config/checksetup_answers.txt:8:$answer{'create_htaccess'} = '';
./scripts/c9-install:40:$answer{'create_htaccess'}      = '';
./template/en/default/setup/strings.txt.pl:127:  localconfig_create_htaccess => <<'END',
./localconfig:9:$create_htaccess = 1;

Checking 5.0.6:

www/bugzilla  $ grep -R . -Hne create_htaccess
./checksetup.pl:89:import Bugzilla::Install::Filesystem qw(update_filesystem create_htaccess
./checksetup.pl:133:create_htaccess() if $lc_hash->{'create_htaccess'};
./checksetup.pl:366:L<Bugzilla::Install::Filesystem/create_htaccess>.
./template/en/default/setup/strings.txt.pl:147:  localconfig_create_htaccess => <<'END',
./Bugzilla/Install/Localconfig.pm:39:  {name => 'create_htaccess',          default => 1,},
./Bugzilla/Install/Filesystem.pm:40:  create_htaccess
./Bugzilla/Install/Filesystem.pm:643:sub create_htaccess {
./Bugzilla/Install/Filesystem.pm:1051:=item C<create_htaccess()>
./localconfig:9:$create_htaccess = 1;

The invocation in 5.0.6 ./checksetup.pl:133:create_htaccess() if $lc_hash->{'create_htaccess'}; is missing, as is the actual subroutine that it is supposed to invoke: ./Bugzilla/Install/Filesystem.pm:643:sub create_htaccess {.

Permissions and basic configs are mimicking those of a working production www/bugzilla instance, and leave no reason to believe that this was a user error on my end, but I'm open to anything.

Sounds like this is intended behavior, since harmony is to be run through mojo. Will go ahead and change this to resolved/invalid.

Some hints for launching bugzilla harmony were shared in the #bugzilla channel:

Sample service: https://github.com/MasterWayZ/harmony/blob/2cecd7756f9aef364a87c6e275c6a04df3c7d951/contrib/bugzilla.service                                                          
Canonical: https://github.com/bugzilla/harmony/blob/2cecd7756f9aef364a87c6e275c6a04df3c7d951/contrib/bugzilla.service#L10 -                                           
Line 10 should be set to 1 if you only have one reverse proxy in front of it.

https://docs.mojolicious.org/Mojolicious/Guides/Cookbook#DEPLOYMENT will tell you all the many ways you can deploy bugzilla because it's a mojolicious app

Leaving the notes/hints (^) here for posterity. Many thanks to dylanwh and justdave on #bugzilla.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.