Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BicBucStriim: Update to v3.4.2 #6229

Merged
merged 7 commits into from
Oct 3, 2024

Conversation

mreid-tt
Copy link
Contributor

@mreid-tt mreid-tt commented Sep 14, 2024

Description

This updates to the latest BicBucStriim v3.4.2 which now requires PHP 8.2 and DSM 7.2.

Fixes #

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Package update

@mreid-tt mreid-tt force-pushed the bicbucstriim-update branch 9 times, most recently from 254a5e0 to c9de2ab Compare September 14, 2024 15:48
@mreid-tt mreid-tt self-assigned this Sep 14, 2024
@mreid-tt
Copy link
Contributor Author

@hgy59, this package update is ready to merge however one thing I noted from the build is that it is building a noarch for firmware 3.1-1594 even though the Makefile has REQUIRED_MIN_DSM = 7.0. How can we fix this?

@hgy59
Copy link
Contributor

hgy59 commented Sep 14, 2024

@mreid-tt I can't find any requirement for PHP 8.2 only for 8.x. Doesn't it work with PHP 8.0?
There are models that will not get updates for DSM > 7.1 (and are limitted to PHP 8.0).
And the build actions still use 7.1 for DSM 7 for this reason.

@mreid-tt
Copy link
Contributor Author

@hgy59, unfortunately no, it does not work with PHP 8.0 as the following PHP error log shows when I tested this earlier:

[14-Sep-2024 11:13:00 America/La_Paz] PHP Fatal error:  Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.0.30. in /volume1/web_packages/bbs/vendor/composer/platform_check.php on line 24
[14-Sep-2024 11:13:00 America/La_Paz] PHP Stack trace:
[14-Sep-2024 11:13:00 America/La_Paz] PHP   1. {main}() /volume1/web_packages/bbs/index.php:0
[14-Sep-2024 11:13:00 America/La_Paz] PHP   2. require() /volume1/web_packages/bbs/index.php:10
[14-Sep-2024 11:13:00 America/La_Paz] PHP   3. ComposerAutoloaderInit162b7708d614dbc0fffdde6590b09cd5::getLoader() /volume1/web_packages/bbs/vendor/autoload.php:25
[14-Sep-2024 11:13:00 America/La_Paz] PHP   4. require() /volume1/web_packages/bbs/vendor/composer/autoload_real.php:25
[14-Sep-2024 11:13:00 America/La_Paz] PHP   5. trigger_error($message = 'Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.0.30.', $error_level = 256) /volume1/web_packages/bbs/vendor/composer/platform_check.php:24

@hgy59
Copy link
Contributor

hgy59 commented Sep 14, 2024

@mreid-tt I propose to first update to version 1.7.2 that runs hopefully on all models that support current version 1.5.3.

There was never a 2.x version released (not like COPS) but probably we can create a new v3.x package for BicBucStream too?

BTW since both BicBucStream and COPS are now hosted by the same github user (https://github.com/mikespub-org) is there a future for both of them?

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Sep 14, 2024

@hgy59, yes I can confirm that version 1.7.2 works with PHP ">= 7.4.0". So this can be built.

I was really looking forward to jettisoning all the DSM 6.x code as it makes the package very bulky. Any particular reason you would want to split out the DSM 7.x compatible code to a new package? I suspect that updates for users running 1.x to 3.x of the package would be a bit more complex but I suppose I could handle it like the Sonarr v3 to v4 update.

As for the future of the source repo it seems to be having semi-regular updates so perhaps there is a future?

@mreid-tt mreid-tt changed the title BicBucStriim: Update to v3.4.2 BicBucStriim: Update to v1.7.2 Sep 14, 2024
@hgy59
Copy link
Contributor

hgy59 commented Sep 14, 2024

Any particular reason you would want to split out the DSM 7.x compatible code to a new package?

It would not need to support migration on package update
If the configuration of the shared folder is enough, I think we can omit the migration.

BTW I missed a wiki page with information about the package

  • username/password for login
  • link to permission managment for the folder that is manually configured in bbs UI and the name of the service user (sc-bicbucstream)

Version 1.7.2 reports "BicBucStriim requires PHP 8.0 or higher"
Version 1.6.6 reports "Fatal error: Uncaught TypeError: Return value of L10n::offsetGet() must be an instance of mixed, string returned in /volume1/web_packages/bbs/lib/BicBucStriim/l10n.php on line 79"
@mreid-tt
Copy link
Contributor Author

@hgy59 I tried going back to v1.7.2 but on login it reported the following error:

Parse error: syntax error, unexpected 'static' (T_STATIC) in /volume1/web_packages/bbs/vendor/gabordemooij/redbean/RedBeanPHP/TypedModel.php on line 32

Based on the Installation check page it had a configuration that said "BicBucStriim requires PHP 8.0 or higher. Otherwise some functions might fail.". As such, I attempted to downgrade to v1.6.6 then v1.6.5 but both reported the following error on login:

Fatal error: Uncaught TypeError: Return value of L10n::offsetGet() must be an instance of mixed, string returned in /volume1/web_packages/bbs/lib/BicBucStriim/l10n.php on line 79

TypeError: Return value of L10n::offsetGet() must be an instance of mixed, string returned in /volume1/web_packages/bbs/lib/BicBucStriim/l10n.php on line 79

Call Stack:
    0.0206     368504   1. {main}() /volume1/web_packages/bbs/index.php:0
    0.1467     967128   2. Slim\Slim->run() /volume1/web_packages/bbs/index.php:215
    0.1468     967448   3. CachingMiddleware->call() /volume1/web_packages/bbs/vendor/slim/slim/Slim/Slim.php:1300
    0.1506     971560   4. OwnConfigMiddleware->call() /volume1/web_packages/bbs/lib/BicBucStriim/caching_middleware.php:43
    0.1526     975440   5. LoginMiddleware->call() /volume1/web_packages/bbs/lib/BicBucStriim/own_config_middleware.php:33
    0.1526     976944   6. CalibreConfigMiddleware->call() /volume1/web_packages/bbs/lib/BicBucStriim/login_middleware.php:39
    0.1527     976944   7. Slim\Middleware\MethodOverride->call() /volume1/web_packages/bbs/lib/BicBucStriim/calibre_config_middleware.php:56
    0.1527     976944   8. Slim\Middleware\Flash->call() /volume1/web_packages/bbs/vendor/slim/slim/Slim/Middleware/MethodOverride.php:92
    0.1527     976944   9. Slim\Slim->call() /volume1/web_packages/bbs/vendor/slim/slim/Slim/Middleware/Flash.php:85
    0.1652    1026152  10. Slim\Route->dispatch() /volume1/web_packages/bbs/vendor/slim/slim/Slim/Slim.php:1355
    0.1653    1026152  11. call_user_func_array:{/volume1/web_packages/bbs/vendor/slim/slim/Slim/Route.php:468}($function_name = 'show_login', $parameters = []) /volume1/web_packages/bbs/vendor/slim/slim/Slim/Route.php:468
    0.1653    1026240  12. show_login() /volume1/web_packages/bbs/vendor/slim/slim/Slim/Route.php:468
    0.1656    1092896  13. Slim\Slim->render($template = 'login.html', $data = ['page' => ['title' => 'BicBucStriim :: Login', 'rot' => '/bbs', 'h1' => 'Login', 'version' => '1.6.6', 'glob' => [...], 'menu' => 0, 'level' => 0, 'auth' => FALSE, 'admin' => FALSE]], $status = ???) /volume1/web_packages/bbs/index.php:242
    0.1657    1092896  14. Slim\View->display($template = 'login.html', $data = ???) /volume1/web_packages/bbs/vendor/slim/slim/Slim/Slim.php:755
    0.1657    1092896  15. Slim\View->fetch($template = 'login.html', $data = NULL) /volume1/web_packages/bbs/vendor/slim/slim/Slim/View.php:243
    0.1657    1092896  16. Slim\Views\Twig->render($template = 'login.html', $data = NULL) /volume1/web_packages/bbs/vendor/slim/slim/Slim/View.php:255
    0.2947    1641352  17. Twig\Template->render($context = ['flash' => class Slim\Middleware\Flash { protected $settings = [...]; protected $messages = [...]; protected $app = class Slim\Slim { ... }; protected $next = class Slim\Slim { ... } }, 'page' => ['title' => 'BicBucStriim :: Login', 'rot' => '/bbs', 'h1' => 'Login', 'version' => '1.6.6', 'glob' => [...], 'menu' => 0, 'level' => 0, 'auth' => FALSE, 'admin' => FALSE]]) /volume1/web_packages/bbs/vendor/slim/views/Twig.php:91

Looking into this specific line it was introduced in this commit: add fixes for PHP 8.2. This commit was part of 1.6.2 Add fixes for PHP 8.2 which is before they added vendor packages which are required for the PHP code to function.

Based on this there is no usable version in this repo before PHP 8.x compatibility. I will re-apply my original scope for this PR.

@mreid-tt mreid-tt changed the title BicBucStriim: Update to v1.7.2 BicBucStriim: Update to v3.4.2 Sep 14, 2024
@mikespub
Copy link

mikespub commented Sep 24, 2024

@mreid-tt I propose to first update to version 1.7.2 that runs hopefully on all models that support current version 1.5.3.

There was never a 2.x version released (not like COPS) but probably we can create a new v3.x package for BicBucStream too?

BTW since both BicBucStream and COPS are now hosted by the same github user (https://github.com/mikespub-org) is there a future for both of them?

Hi @hgy59 yes, I'm maintaining both COPS and BBS as I've been using them for ages ... on a Synology NAS :-)

The COPS one is more active as there is a linuxserver container image for it, and users tend to pop up from all over.

But I try to resolve any BBS issues as well when they appear - it just may take more time to do it...

Thanks to @mreid-tt for the updated packages, and sorry for the incompatible bicbucstriim-* distribution .zip files. They do contain vendor/ packages that I installed with composer on a PHP 8.x platform, so it's very possible that they wouldn't run as such on a PHP 7.4 platform. You'd need to install from source and run composer on PHP 7.4 to see if there are really things the 1.7.2 version doesn't support there - it could be, but then it would not be intentional, sorry...

Note: that's how the container image build works btw: it downloads the latest release source .zip and then runs composer install --no-dev -o on it to get the right vendor/ packages for the x64 or arm platform.

Not sure how that translates to Synology packages, but I would imagine you'd need to do the same for the different architectures you want to support, unless you can run composer as part of the install process. How do more complex PHP applications deal with it?

@mreid-tt
Copy link
Contributor Author

Hey @mikespub, thanks for reaching out! No need to apologize—we’re all learning together in the open-source community. I’m not too experienced with PHP myself, so I haven’t used Composer in any of the applications we package. I typically follow the standard installation instructions: download, extract into the web server folder, and configure as needed. I tried out the Composer tool you mentioned on my local setup, but I'm unsure if it's included in our packaging environment.

I'm currently working on modernising some of our older PHP applications packaged for Synology, and I have several PRs open for review. Your work in maintaining the upstream repositories has been invaluable, as I often reference them in our builds. We really appreciate all the effort you put in—thank you!

@mreid-tt
Copy link
Contributor Author

BTW I missed a wiki page with information about the package

  • username/password for login
  • link to permission managment for the folder that is manually configured in bbs UI and the name of the service user (sc-bicbucstream)

I've updated the Wiki with this page: FAQ BicBucStriim

@mreid-tt mreid-tt merged commit 62d4e79 into SynoCommunity:master Oct 3, 2024
17 checks passed
@mreid-tt mreid-tt deleted the bicbucstriim-update branch October 3, 2024 09:31
@mreid-tt mreid-tt added status/published Published and activated (may take up to 48h until visible in DSM package manager) and removed status/ready-to-merge labels Oct 3, 2024
@mikespub
Copy link

Hi @mreid-tt

just to let you know that with the latest release 3.5.2 of BicBucStriim I included the composer.json file in the release bicbucstriim-3.5.2.zip package.

That way even if you don't download the full release source code, you could still run composer update -o after extracting the .zip file if you need any version-specific vendor packages.

Something for the future maybe... :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/published Published and activated (may take up to 48h until visible in DSM package manager)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants