Skip to content

Conversation

@mreid-tt
Copy link
Contributor

@mreid-tt mreid-tt commented Nov 22, 2025

Description

This PR contains the following:

  1. Bump ruTorrent to 5.2.10
  2. Bump rtorrent/libtorrent to 0.16.4
  3. Align PHP dependency with DSM version (PHP 8.0 on DSM 7.0/7.1, 8.2 on 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 self-assigned this Nov 22, 2025
@mreid-tt
Copy link
Contributor Author

hey @smaarn, I've gone ahead and updated ruTorrent in a number of areas. Most importantly we are changing the PHP back-end to support newer DSM versions. Let me know if you have time for a review.

Copy link
Contributor

@smaarn smaarn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few changes which seem to be some kind of convention changes (this thing migrating \`` to $(` which is beyond my expertise I must confess.

I only have a few comments / questions (would need to test it, will try to see if I can do that by EOD)

@hgy59
Copy link
Contributor

hgy59 commented Nov 23, 2025

@mreid-tt please omit the php version in the profile description for all php profiles.
The php profile list in DSM shows the PHP version as a dedicated column.
But the main reason is, that the description in the php profile is not updated on package updates.
i.e. when Synology provides PHP 8.4 and we update the package for PHP 8.4 the profile description will still stay "PHP 8.2 profile for ruTorrent".

@hgy59
Copy link
Contributor

hgy59 commented Nov 23, 2025

regarding libmediainfo:
I propose to stay on version 25.04, since it seems that the latest version is not required by rutorrent.

If you really want to use 25.10 for newer compilers, you must update the mediainfo package too and drop support for DSM < 7.x.

I recently updated the mediainfo package and have chosen to use the latest version that builds for DSM 6.
The former version was 21.09 so an update was not often demanded.

@mreid-tt
Copy link
Contributor Author

regarding libmediainfo: I propose to stay on version 25.04, since it seems that the latest version is not required by rutorrent.

If you really want to use 25.10 for newer compilers, you must update the mediainfo package too and drop support for DSM < 7.x.

Yes, both libmediainfo and mediainfo were updated to v25.10, and since this package already doesn’t support DSM < 7, I didn’t see any issue with moving to the latest version. I also updated the framework to handle different versions based on their GCC requirements, similar to how it’s done in other examples. That should keep things consistent for the other packages as well.

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Nov 24, 2025

Hey @smaarn, I came across an interesting discussion here: Novik/ruTorrent#2983 about the long-standing issue where newer rTorrent versions break the ratio plugin. I downloaded the latest rTorrent, applied one of the suggested patches plus one of my own, and it seems to build and install correctly.

Here’s the current run if you’d like to test it:
---removed---

I’m not planning to push this to the PR yet, since the latest rTorrent release has an open bug (rakshasa/rtorrent#1650). I’ll wait for the next version and try again once it’s out.

My limited tests (on DSM 7.1) so far show:

  • clean install
  • ratio plugin working
  • able to download a test torrent

—but that’s as far as I’ve tested for now.

@hgy59
Copy link
Contributor

hgy59 commented Nov 24, 2025

Yes, both libmediainfo and mediainfo were updated to v25.10, and since this package already doesn’t support DSM < 7, I didn’t see any issue with moving to the latest version. I also updated the framework to handle different versions based on their GCC requirements, similar to how it’s done in other examples. That should keep things consistent for the other packages as well.

This is a missunderstanding.
you splitted mediainfo to cross/mediainfo, cross/mediainfo-25.04 and cross/mediainfo-latests
but for spk/mediainfo we only need cross/mediainfo depending on cross/libmediainfo-latest.
We shouldn't provide mutliple versions if not required.

OK, now I can see that spk/rutorrent/Makefile depends on cross/mediainfo
I thought that it depends on cross/libmediainfo...
Why does rutorrent depend on cross/mediainfo? does it need the mediainfo tool at runtime or does it need the libraries at build time?

If rutorrent only needs mediainfo at runtime, we should remove the mediainfo dependency completely and add SPK_DEPENDS = mediainfo instead.

If rutorrent requires mediainfo at build time, I guess it can depend on cross/libmediainfo instead of cross/mediainfo.

The least required change is to modify spk/mediainfo/Makefile to depend on either cross/mediainfo-25.04 OR on cross/mediainfo-latest but not on a gcc version dependent cross package. Otherwise we will build packages for DSM 6 with invalid version number.


further thoughts:
also nzbdrone (aka sonarr3) depends on cross/mediainfo and I guess it is the same story here (should depend on cross/libmediainfo or SPK_DEPENDS on mediainfo)
BUT this brings a different topic to discussion.
IMHO the sonarr3 package is outdated and should be removed from spksrc and from the synocommunity repo.
this includes the drop of the mono sources and packages (including the open PR #6083).
(and this will free 2.7 GB of the repo storage)

/CC @th0ma7 @publicarray

@mreid-tt
Copy link
Contributor Author

This is a missunderstanding. you splitted mediainfo to cross/mediainfo, cross/mediainfo-25.04 and cross/mediainfo-latests but for spk/mediainfo we only need cross/mediainfo depending on cross/libmediainfo-latest. We shouldn't provide mutliple versions if not required.

Hmm, the reason I split both mediainfo and libmediainfo is because they have different releases upstream and I assumed that they needed to have matching versions. i.e. We shouldn't have a cross/mediainfo that may depend on cross/libmediainfo-latest when it really needs cross/libmediainfo-25.04 as I assumed it needed a matching version to build correctly.

OK, now I can see that spk/rutorrent/Makefile depends on cross/mediainfo I thought that it depends on cross/libmediainfo... Why does rutorrent depend on cross/mediainfo? does it need the mediainfo tool at runtime or does it need the libraries at build time?

If rutorrent only needs mediainfo at runtime, we should remove the mediainfo dependency completely and add SPK_DEPENDS = mediainfo instead.

If rutorrent requires mediainfo at build time, I guess it can depend on cross/libmediainfo instead of cross/mediainfo.

I'm not exactly sure what type of dependency it needs but I assume it has something to do with the mediainfo plugin (https://github.com/Novik/ruTorrent/wiki/PluginMediainfo). This is not a package I'm intimate with and it has many layers so I was trying to make minimal changes.

The least required change is to modify spk/mediainfo/Makefile to depend on either cross/mediainfo-25.04 OR on cross/mediainfo-latest but not on a gcc version dependent cross package. Otherwise we will build packages for DSM 6 with invalid version number.

If I"m understanding you correctly, you are concerned about the spk/mediainfo package possibly building from the cross/mediainfo based on the GCC version which could result in the 25.04 version building on a 25.10 cross if it's a newer GCC? If so that is a fair call and we would probably need to change spk/mediainfo to just depend on latest and restrict the spk/mediainfo to DSM 7 only. If I'm not understanding you correctly please let me know.

@hgy59
Copy link
Contributor

hgy59 commented Nov 24, 2025

looking deeper:

rutorrent needs the mediainfo binary for the mediainfo plugin. The path to mediainfo is defined in config.php and the code to patch this file is in service-setup.sh. So it is easy to remove mediainfo from the rutorrent package and depend on the mediainfo package and adjust the path.

Analysis of service-setup.sh showed another issue.
The path to php is patched to /bin/php in config.php and this must be fixed to use the correct php binary of version 8.0 or 8.2.

ATM the config.php file is updated on package install but not on upgrade, so this must be fixed for upgrades too,

Additionally I propose to remove the DSM 6 to DSM 7 migration in this release and, for the rare case that someone still tries to migrate from DSM 6, to display an error that to update rutorrent a manuall update with package version 5.1.12-18 has to be done first (and for some time we must not remove rutorrent 5.1.12-18 in the repo).
It is now time to get rid of the extra migration code in service-setup.sh.
If we support package update only from 5.1.12-18, we can simplify code in service_save and service_restore in service-setup.sh.

Another proposal is to use pgrep of cross/procps-ng to get rid of the busybox stuff (dependency and configuration for build, and initialization in service-setup).

@mreid-tt
Copy link
Contributor Author

rutorrent needs the mediainfo binary for the mediainfo plugin. The path to mediainfo is defined in config.php and the code to patch this file is in service-setup.sh. So it is easy to remove mediainfo from the rutorrent package and depend on the mediainfo package and adjust the path.

Okay so we can switch the package to have mediainfo as a package dependency rather than build dependency. I'm okay with that. @smaarn any objections?

Analysis of service-setup.sh showed another issue. The path to php is patched to /bin/php in config.php and this must be fixed to use the correct php binary of version 8.0 or 8.2.

Good catch. I've tested on a DSM 7.3 box and you're right that the existing path with pick up the OS version as follows:

$ /bin/php --version
PHP 8.1.32 (cli) (built: Jun 20 2025 08:09:01) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.32, Copyright (c) Zend Technologies

Whereas a specific path to the installed expected version would report this:

$ /usr/local/bin/php82 --version
PHP 8.2.28 (cli) (built: Jun 16 2025 16:09:43) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.28, Copyright (c) Zend Technologies

ATM the config.php file is updated on package install but not on upgrade, so this must be fixed for upgrades too,

Agreed, as this could create a potential edge-case where we would need to re-evaluate this if the user upgrades their DSM version and they then need a package upgrade but the package dependencies may no longer match what's in the config.php. Will think on this some more.

Additionally I propose to remove the DSM 6 to DSM 7 migration in this release and, for the rare case that someone still tries to migrate from DSM 6, to display an error that to update rutorrent a manuall update with package version 5.1.12-18 has to be done first (and for some time we must not remove rutorrent 5.1.12-18 in the repo). It is now time to get rid of the extra migration code in service-setup.sh. If we support package update only from 5.1.12-18, we can simplify code in service_save and service_restore in service-setup.sh.

I thought I removed some of it but will look again.

Another proposal is to use pgrep of cross/procps-ng to get rid of the busybox stuff (dependency and configuration for build, and initialization in service-setup).

I'm not familiar with this so will need to do some research.

@hgy59
Copy link
Contributor

hgy59 commented Nov 24, 2025

I'm not familiar with this so will need to do some research.

only this is needed:

  1. replace DEPENDS += cross/busybox by DEPENDS += cross/procps-ng in spk/rutorrent/Makefile (the comment still matches)
  2. remove export BUSYBOX_CONFIG=procutils (in the same file)
  3. remove these lines in service-setup.sh
     # Install busybox stuff
     "${SYNOPKG_PKGDEST}/bin/busybox" --install "${SYNOPKG_PKGDEST}/bin"
    

@smaarn
Copy link
Contributor

smaarn commented Nov 24, 2025

rutorrent needs the mediainfo binary for the mediainfo plugin. The path to mediainfo is defined in config.php and the code to patch this file is in service-setup.sh. So it is easy to remove mediainfo from the rutorrent package and depend on the mediainfo package and adjust the path.

Okay so we can switch the package to have mediainfo as a package dependency rather than build dependency. I'm okay with that. @smaarn any objections?

No objection. I would even recommend it. Personally I think it's easier to maintain this way since it makes maintenance decorrelated.

ATM the config.php file is updated on package install but not on upgrade, so this must be fixed for upgrades too,

Agreed, as this could create a potential edge-case where we would need to re-evaluate this if the user upgrades their DSM version and they then need a package upgrade but the package dependencies may no longer match what's in the config.php. Will think on this some more.

Actually those are defined by the below kind of lines:

    if is_not_defined_external_program 'php'; then
        define_external_program 'php' '/bin/php' '/usr/bin/php'
    fi

If you wish to force the PHP binary path you can use those sections but I'm not sure it's even relevant (last time I checked it didn't cause an issue).

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Nov 25, 2025

Hey @hgy59 @smaarn, I think I’ve made some solid progress on the update. Now that the latest rTorrent/libtorrent (0.16.4) releases have landed, I’ve integrated them into the package. I also removed the version bumps and the mediainfo split, switching to the existing external package instead. As suggested, I’ve dropped BusyBox and refactored a good portion of the service-setup script to address DSM 7 concerns, removing the older DSM 6 logic entirely.

I’ve tested the build successfully on DSM 7.1 and 7.2, but DSM 7.3 is proving problematic. There’s very little in the logs to point to the issue. The diskspace plugin fails to load from the plugins tab, and on DSM 7.3 the watch folder never picks anything up. Torrents added manually remain stuck in a “Pausing” state and never download.

I’ve kicked off a workflow run here so you can try the DSM 7.2+ build on DSM 7.3 if you have a moment:
https://github.com/mreid-tt/spksrc/actions/runs/19680817712

If we can’t resolve the DSM 7.3 issues, I’ll exclude it from the supported versions for now.

At this point, the only remaining cleanup I can see is the installation wizard. Let me know if your reviews highlight anything else.

@smaarn smaarn self-requested a review November 29, 2025 10:53
Copy link
Contributor

@th0ma7 th0ma7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work, LGTM!

@smaarn
Copy link
Contributor

smaarn commented Nov 29, 2025

I get the below error when starting the UI, not sure of the impact though:

[29.11.2025 19:41:02] JS error: [http://mallinas2.local/rutorrent/ : 98] ReferenceError: Can't find variable: theOptionsWindow

Copy link
Contributor

@smaarn smaarn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong opinion on my side really, apart from the complexity of the external software path handling which seem overly complex to me but 🤷

I'm only wondering about the warning of the UI

@smaarn
Copy link
Contributor

smaarn commented Nov 29, 2025

I get the below error when starting the UI, not sure of the impact though:

[29.11.2025 19:41:02] JS error: [http://mallinas2.local/rutorrent/ : 98] ReferenceError: Can't find variable: theOptionsWindow

When opening the console it seems that it's related to the autotools plugin which fails loading:

Plugin "autotools" failed to load:
ReferenceError: Can't find variable: theOptionsWindow
(fonction anonyme) — rutorrent:98:583
(fonction anonyme) — rutorrent:131:3854
(fonction anonyme) — plugins.js:164
Code général — rutorrent:29
appendChild
m — jquery.js:2:892
globalEval — jquery.js:2:3033
text script — jquery.js:2:81005
(fonction anonyme) — jquery.js:2:77351
l — jquery.js:2:77467
(fonction anonyme) — jquery.js:2:80267

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Nov 29, 2025

I get the below error when starting the UI, not sure of the impact though:

[29.11.2025 19:41:02] JS error: [http://mallinas2.local/rutorrent/ : 98] ReferenceError: Can't find variable: theOptionsWindow

When opening the console it seems that it's related to the autotools plugin which fails loading:

Plugin "autotools" failed to load:
ReferenceError: Can't find variable: theOptionsWindow
(fonction anonyme) — rutorrent:98:583
(fonction anonyme) — rutorrent:131:3854
(fonction anonyme) — plugins.js:164
Code général — rutorrent:29
appendChild
m — jquery.js:2:892
globalEval — jquery.js:2:3033
text script — jquery.js:2:81005
(fonction anonyme) — jquery.js:2:77351
l — jquery.js:2:77467
(fonction anonyme) — jquery.js:2:80267

Can you tell me a bit more about your setup? Running in DSM 7.1 or 7.2 I have no entries in my console and the plugins all look clean:

Screenshot 2025-11-29 at 3 23 14 PM

EDIT: I've found ruTorrent to be finicky in the past with the UI. Does it still happen if you open in a new private window?

@smaarn
Copy link
Contributor

smaarn commented Nov 29, 2025

I get the below error when starting the UI, not sure of the impact though:

[29.11.2025 19:41:02] JS error: [http://mallinas2.local/rutorrent/ : 98] ReferenceError: Can't find variable: theOptionsWindow

When opening the console it seems that it's related to the autotools plugin which fails loading:

Plugin "autotools" failed to load:
ReferenceError: Can't find variable: theOptionsWindow
(fonction anonyme) — rutorrent:98:583
(fonction anonyme) — rutorrent:131:3854
(fonction anonyme) — plugins.js:164
Code général — rutorrent:29
appendChild
m — jquery.js:2:892
globalEval — jquery.js:2:3033
text script — jquery.js:2:81005
(fonction anonyme) — jquery.js:2:77351
l — jquery.js:2:77467
(fonction anonyme) — jquery.js:2:80267

Can you tell me a bit more about your setup? Running in DSM 7.1 or 7.2 I have no entries in my console and the plugins all look clean:

Screenshot 2025-11-29 at 3 23 14 PM EDIT: I've found ruTorrent to be finicky in the past with the UI. Does it still happen if you open in a new private window?

Indeed reloading seems to make the error go away. 🤷

(I'm using DSM 7.3 and Safari)

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Nov 29, 2025

Indeed reloading seems to make the error go away. 🤷

(I'm using DSM 7.3 and Safari)

You have it working successfully on DSM 7.3?!? I couldn't get it to work at all. Do you have any of the errors I noted above?

EDIT: Because I couldn't get DSM 7.3 to work I included a commit to limit its installation to DSM 7.2.

EDIT: Merging as-is and we can re-visit DSM 7.3 support at a later date.

@mreid-tt mreid-tt merged commit 15d718a into SynoCommunity:master Dec 1, 2025
15 checks passed
@mreid-tt mreid-tt deleted the rutorrent-update-5.2.10 branch December 1, 2025 03:02
@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 Dec 1, 2025
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.

4 participants