Page MenuHomePhorge

Roundcube 1.3 in Winterfell is missing jquery.min.js
Closed, ResolvedPublic

Description

after login, there is an attempt to load roundcubemail/assets/program/js/jquery.min.js but that fails with 404.
Without jquery, the hamburger menu does not open, and other functionality is also not available.

I cannot find that file jquery.min.js in the tarball.
I checked the rpm in Fedora, and it seems we have to use the -complete tarball from https://roundcube.net/download/
https://src.fedoraproject.org/cgit/rpms/roundcubemail.git/commit/?id=6006b781543cf8f162557d8c754ea0f21136ac63

Any suggestions?

Details

Ticket Type
Task

Event Timeline

pokorra renamed this task from Roundcube in Winterfell is missing jquery.min.js to Roundcube 1.3 in Winterfell is missing jquery.min.js.Jul 29 2017, 9:24 PM
pokorra created this task.
pokorra added a project: Roundcube.
pokorra added a subscriber: vanmeeuwen.

Since Roundcube 1.3 external javascript libraries are not anymore in the git repository. There's a script to download them and install in bin/install-jsdeps.sh (it uses jsdeps.json file in root folder). So, either we use -complete tarball (not /vendor folder there) or fetch js deps in package create stage. Or maybe in post-install script?

I have now built the roundcube package with the -complete tarball, in https://obs.kolabsys.com/package/show/home:tpokorra:branches:Kolab:Winterfell/roundcubemail

it works for CentOS7, and the files now are installed properly.

Unfortunately, for Debian 8, I get an error from composer, which I don't understand.

https://obs.kolabsys.com/package/live_build_log/home:tpokorra:branches:Kolab:Winterfell/roundcubemail/Debian_8.0/x86_64

[UnexpectedValueException]                                          
[   54s]   Could not parse version constraint ^4: Invalid version string "^4"  
[   54s]                                                                       
[   54s] 
[   54s] 
[   54s] Exception trace:
[   54s]  () at phar:///usr/lib/composer/composer.phar/src/Composer/Package/Version/VersionParser.php:378
[   54s]  Composer\Package\Version\VersionParser->parseConstraint() at phar:///usr/lib/composer/composer.phar/src/Composer/Package/Version/VersionParser.php:244
[   54s]  Composer\Package\Version\VersionParser->parseConstraints() at phar:///usr/lib/composer/composer.phar/src/Composer/Package/Version/VersionParser.php:207
[   54s]  Composer\Package\Version\VersionParser->parseLinks() at phar:///usr/lib/composer/composer.phar/src/Composer/Package/Loader/ArrayLoader.php:123
[   54s]  Composer\Package\Loader\ArrayLoader->load() at phar:///usr/lib/composer/composer.phar/src/Composer/Repository/FilesystemRepository.php:62
[   54s]  Composer\Repository\FilesystemRepository->initialize() at phar:///usr/lib/composer/composer.phar/src/Composer/Repository/ArrayRepository.php:170
[   54s]  Composer\Repository\ArrayRepository->getPackages() at phar:///usr/lib/composer/composer.phar/src/Composer/Plugin/PluginManager.php:112
[   54s]  Composer\Plugin\PluginManager->loadRepository() at phar:///usr/lib/composer/composer.phar/src/Composer/Plugin/PluginManager.php:67
[   54s]  Composer\Plugin\PluginManager->loadInstalledPlugins() at phar:///usr/lib/composer/composer.phar/src/Composer/Factory.php:288
[   54s]  Composer\Factory->createComposer() at phar:///usr/lib/composer/composer.phar/src/Composer/Factory.php:474
[   54s]  Composer\Factory::create() at phar:///usr/lib/composer/composer.phar/src/Composer/Console/Application.php:198
[   54s]  Composer\Console\Application->getComposer() at phar:///usr/lib/composer/composer.phar/src/Composer/Command/Command.php:51
[   54s]  Composer\Command\Command->getComposer() at phar:///usr/lib/composer/composer.phar/src/Composer/Command/DumpAutoloadCommand.php:45
[   54s]  Composer\Command\DumpAutoloadCommand->execute() at phar:///usr/lib/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:252
[   54s]  Symfony\Component\Console\Command\Command->run() at phar:///usr/lib/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:889
[   54s]  Symfony\Component\Console\Application->doRunCommand() at phar:///usr/lib/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:193
[   54s]  Symfony\Component\Console\Application->doRun() at phar:///usr/lib/composer/composer.phar/src/Composer/Console/Application.php:137
[   54s]  Composer\Console\Application->doRun() at phar:///usr/lib/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:124
[   54s]  Symfony\Component\Console\Application->run() at phar:///usr/lib/composer/composer.phar/src/Composer/Console/Application.php:83
[   54s]  Composer\Console\Application->run() at phar:///usr/lib/composer/composer.phar/bin/composer:43
[   54s]  require() at /usr/lib/composer/composer.phar:15

any ideas?

Maybe the composer version is too old. Many dependencies require phpunit using version constraint "^4" or similar. I think you can solve this simply by excluding developer dependencies. Use composer with --no-dev argument.

I tried with --no-dev, but that did not seem to make a difference.
Then I tried to upgrade to Composer 1.2.4, which is the version used in Debian Stable: https://obs.kolabsys.com/package/show/home:tpokorra:branches:Kolab:Winterfell/composer

But now I get an error on CentOS7:

[  100s] PHP Fatal error:  Interface 'Psr\Log\LoggerInterface' not found in /usr/share/php/Composer/IO/BaseIO.php on line 21
[  100s] 
[  100s] Fatal error: Interface 'Psr\Log\LoggerInterface' not found in /usr/share/php/Composer/IO/BaseIO.php on line 21
[  100s] error: Bad exit status from /var/tmp/rpm-tmp.yWoqnz (%build)

and on Debian 8 still the error Could not parse version constraint ^4: Invalid version string "^4"

Strangely, it does not build for Debian 9 anymore, I get this:

[   78s] PHP Fatal error:  Cannot use 'String' as class name as it is reserved in phar:///usr/lib/composer/composer.phar/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/String.php on line 18
[   78s] 
[   78s] Fatal error: Cannot use 'String' as class name as it is reserved in phar:///usr/lib/composer/composer.phar/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/String.php on line 18
[   78s] debian/rules:9: recipe for target 'override_dh_auto_build' failed

The first error is something internal to composer. In my CentOS system I have composer-1.0.0-3.1.el7.kolab_wf and I have /usr/share/php/Psr/Log/LoggerInterface.php file.

The second error is incompatibility of justinrainbow/json-schema (included in composer) with PHP7, so it looks that this version of composer is not compatible with PHP7.

pokorra claimed this task.

Thanks to Jeroen for fixing roundcubemail in Winterfell, it is now working fine, my nightly tests succeed again!
Thank you!