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

rutorrent: DSM7 support + fix torrent creation wizard #5455

Merged
merged 28 commits into from
Feb 21, 2023

Conversation

smaarn
Copy link
Contributor

@smaarn smaarn commented Oct 16, 2022

Description

Having rutorrent DSM7 ready + fix cryptic php error when trying to create torrent file via wizard

Fixes #5288

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully (DSM 7)
  • New installation of package completed successfully (DSM 6)
  • Package upgrade completed successfully (Manually install the package again) (DSM 7)
  • Package upgrade completed successfully (Manually install the package again) (DSM 6)
  • Package functionality was tested

Type of change

  • Package update
  • Bugfix

@th0ma7
Copy link
Contributor

th0ma7 commented Oct 16, 2022

@smaarn this is awesome, thnx for your assistance on this, really much appreciated.

A few things for considerations:

Let me know if/how I can provide assistance.

@smaarn
Copy link
Contributor Author

smaarn commented Oct 16, 2022

@th0ma7 will be having a look at the deluge folder conventions to see if I can match it easily with the defaults.

Regarding your "2x" services startup I'm not sure what you mean but will be having a look at how it's done in deluge.

The rutorrent 4.0 migration is definitely something we should be doing asap but I will be, for now, focusing on having the DSM 7 installation working and operational before diving into 4.0 migration (since their documentation on what was "changed" is pretty scarce I would tend to favor a conservative approach).

@th0ma7
Copy link
Contributor

th0ma7 commented Oct 18, 2022

Regarding your "2x" services startup I'm not sure what you mean but will be having a look at how it's done in deluge.

I revisited this and you're right, there isn't "two" daemons but rather:

  1. uses the default synology web server (where we could provide something else but is it worth it?)
  2. calls a screen and invoke rutorrent. That's done from a side script called rtorrent-daemon

So there really is only one daemon and it's call could be integrated into the service-setup.sh script instead of being left aside which would simplify maintenance later on.

BTW, if you want to play with the screen session, first identify it:

$ sudo su -s /bin/bash sc-rutorrent -c 'screen -ls'
Password: 
There is a screen on:
	22652..th0ma7-nas	(Detached)
1 Socket in /tmp/uscreens/S-sc-rutorrent.

Then attach to it:

$ sudo su -s /bin/bash sc-rutorrent -c 'screen -x'

To get help once connected use CTRL-a + h and to disconnect CTRL-a + d

@smaarn smaarn force-pushed the rutorrent/upgrade-dsm-7 branch from 46058a3 to 5e4f359 Compare October 23, 2022 20:04
@smaarn smaarn force-pushed the rutorrent/upgrade-dsm-7 branch from 881b1d1 to b8218c2 Compare November 12, 2022 21:45
@smaarn smaarn marked this pull request as ready for review November 12, 2022 21:47
@smaarn smaarn changed the title [WIP] rutorrent: DSM7 support rutorrent: DSM7 support Nov 12, 2022
@smaarn
Copy link
Contributor Author

smaarn commented Nov 12, 2022

Package tested manually under DSM 7: both install and upgrade works fine.

The open point is about DSM 6 not being broken (don't have a DSM 6 around so ... :/ ). Don't see why it would but then I changed a few things regarding the upgrade process which may have some unforeseen impacts.

Will be following up on this in the coming days.

@th0ma7
Copy link
Contributor

th0ma7 commented Nov 12, 2022

This is awesome work! I still have a dsm6 so I'll test it over the coming days. Again, great work and long overdue!

@smaarn smaarn force-pushed the rutorrent/upgrade-dsm-7 branch from cdb351e to a2f4ece Compare November 13, 2022 16:45
@smaarn smaarn changed the title rutorrent: DSM7 support rutorrent: DSM7 support + fix torrent creation wizard Nov 13, 2022
@hgy59
Copy link
Contributor

hgy59 commented Nov 13, 2022

I propose to remove the configuration of the port range from the wizards.
As long as the firewall ports (in *.sc file or resources) are not adjusted to the ports from the wizard at installation time, it will not be possible to use these ports with activated firewall.

Comment on lines 53 to 72
{
"desc": "If the specified share does not exist, it will be created. You can use an existing share by specifying the name of the folder."
},
{
"type": "textfield",
"desc": "Watch a directory for torrent files and add them to ruTorrent. Leave empty to disable",
"subitems": [
{
"key": "wizard_watch_dir",
"desc": "Watch directory",
"validator": {
"allowBlank": true,
"regex": {
"expr": "/^\\\/volume[0-9]+\\\//",
"errorText": "Path should begin with /volume?/ with ? the number of the volume"
}
}
}
]
},
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO this share must be separated to volume and share name as above for the download location
OR you use the same volume as above (we did not test whether the creation of multiple shared folders on different volumes for the same package is supported by DSM).
OR you create the watch folder as a sub directory of the download shared folder, then you have to adjust at least the validation regex.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would add, why not simply follow the exact same directory tree as deluge and enforce that by default such as:

downloads/
├── complete
├── incomplete
└── watch

There's a dsm6-7 "compatible" method to create the folders from deluge service-setup.sh script:

# Create download directories
install -m 0775 -o ${EFF_USER} -g ${GROUP} -d "${incomplete_folder}"
install -m 0775 -o ${EFF_USER} -g ${GROUP} -d "${complete_folder}"
install -m 0775 -o ${EFF_USER} -g ${GROUP} -d "${watch_folder}"

Copy link
Contributor

Choose a reason for hiding this comment

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

We should use a different watch folder for each package, as we do not want to download a watched file by all watching applications (and it will depend on whether an application removes the files in the watch folder when download starts vs when the download is completed).

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point, maybe worth defaulting it to watch-<appname> then? I could make the changes to deluge while i have an opened pr.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I would propose to have a combination of

  1. A checkbox allowing for usage of a watch directory (disabled by default)
  2. An input component defaulted to the "watch" subdirectory

WDYT ?

I am actually not sure that rutorrent supports the complete / incomplete logics.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good to me.

As for the complete vs incomplete directories, if I recall you have to set the default directory to incomplete and use the move upon completion feature so it, well, move the resulting torrent to the complete folder once over.

One thing i noticed is the incredible performance difference between deluge vs rutorrent. Deluge is numerous time more performant ... There may be config options to fine tune rutorrent...

Traveling this week so my availability may vary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for the delays here.

First things first: my idea of having a checkbox is actually not feasible it seems with regards to the current Javascript framework which is used to handle the installer logics (short version: can't listen for a checkbox change to actually change visibility of a component, I can only do that on page changes)

I'm not (at all) an expert in rtorrent configuration, I may be having a look at this but it may take some time.

And for the performance part I must confess I don't use rutorrent (apart for testing, I'm more of a transmission user) and only had a crack at it to unblock some python logics so I can't really argue with you here :)

Will try having a look today.

Copy link
Contributor

Choose a reason for hiding this comment

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

@smaarn, is this concern regarding the UI wizard logic now resolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mreid-tt no it's not. The wizard option is actually a dead-end and the actual rutorrent options need being tested.

I must confess I didn't consider investing more time in "normalizing" those options. TBH as a Transmission user I found it puzzling on my last upgrade to see the paths change so not sure it's something we want to force, is it ?

I mean, for an initial installation, it's arguable, but I'd say that for an existing installation it can be seen as a little bit "invasive" for a policy, is it not ?

Copy link
Contributor

Choose a reason for hiding this comment

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

First things first: my idea of having a checkbox is actually not feasible it seems with regards to the current Javascript framework which is used to handle the installer logics (short version: can't listen for a checkbox change to actually change visibility of a component, I can only do that on page changes)

@smaarn, as a side note, I was working on a more robust uninstall UI wizard for ownCloud (uninstall_uifile.sh) and after going down a trial-and-error rabbit-hole, I can confirm the issue with checkboxes and component visibility. I did get it to partially listen for a checkbox to make another item visible using a validation function but there were two major issues:

  1. The actual checkbox itself when clicked didn't do anything
  2. The checkbox label did trigger the change but only after clicking elsewhere (remove focus)

Either way, this was not an ideal situation. I did however find a use-case to apply a validation function to a text field and based on the input, enable checkboxes (or other fields) as required. From a UX perspective it works because the user would want to click one of the empty checkboxes after entering a path and this action would make the text field loose focus – immediately enabling the checkboxes before the click is registered. I remembered this when I wrapped up and thought I'd share my findings.

@smaarn
Copy link
Contributor Author

smaarn commented Nov 13, 2022

I propose to remove the configuration of the port range from the wizards.
As long as the firewall ports (in *.sc file or resources) are not adjusted to the ports from the wizard at installation time, it will not be possible to use these ports with activated firewall.

I would even add that altering the file configuration wouldn't make it work natively (meaning we would need to ensure that upon file configuration changes the firewall settings are updated... which could be a terrible thing to implement and do).

Doing that would require actually adding a rutorrent documentation section to be fair.

@th0ma7
Copy link
Contributor

th0ma7 commented Nov 13, 2022

@smaarn upgrading from DSM6 failed. Overall the logs looks ok rutorrent-DSM6-upgrade.txt like it failed silently?

Looking further, it actually fails at fixing permissions somewhere (/var/packages/rutorrent/var/rutorrent_install.log) :

Fixing shared folder rights for /volume1/@appstore/rutorrent/tmp
(synoacltool.c, 455)Unknown error
Fixing shared folder access for everyone
ACL version: 1
Archive: has_ACL,is_support_ACL
Owner: [sc-rutorrent(user)]
---------------------
     [0] everyone::allow:r-x----------:fd--  (level:0)

EDIT: Although excellent news, it works really well with a fresh install! woot! so just needing to figure out what's wrong with the update.

Capture d’écran du 2022-11-13 14-08-28

EDIT (additional findings) - /var/log/messages shows the following at installation time:

2022-11-13T14:13:17-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_2_check[6313]: pkgtool.cpp:3136 Package deluge stops but service pkgctl-deluge start
2022-11-13T14:13:22-05:00 th0ma7-nas php: Signature file not found in archive.
2022-11-13T14:13:24-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_1_install[6313]: pkgtool.cpp:3136 Package deluge stops but service pkgctl-deluge start
2022-11-13T14:13:38-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_1_install[9879]: resource_api.cpp:289 Release service-cfg for rutorrent when 0x0002 (done)
2022-11-13T14:13:39-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_1_install[9909]: resource_api.cpp:289 Release data-share for rutorrent when 0x0002 (done)
2022-11-13T14:13:39-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_1_install[9909]: resource_api.cpp:289 Release data-share for rutorrent when 0x0002 (done)
2022-11-13T14:13:39-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_1_install[9909]: resource_api.cpp:289 Release data-share for rutorrent when 0x0002 (done)
2022-11-13T14:13:40-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_1_install: SYSTEM:	Last message 'resource_api.cpp:289' repeated 2 times, suppressed by syslog-ng on th0ma7-nas
2022-11-13T14:13:40-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_1_install[9984]: resource_api.cpp:190 Acquire data-share for rutorrent when 0x0002 (done)
2022-11-13T14:13:42-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_1_install[10500]: resource_api.cpp:190 Acquire service-cfg for rutorrent when 0x0002 (done)
2022-11-13T14:13:42-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_1_install[10500]: resource_api.cpp:190 Acquire data-share for rutorrent when 0x0002 (fail)
2022-11-13T14:13:42-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_1_install[6313]: pkginstall.cpp:1221 Failed to acquire resource after install rutorrent [0xD900 manager.cpp:204]
2022-11-13T14:14:55-05:00 th0ma7-nas synoscgi_SYNO.Core.Package.Installation_1_install[6313]: pkginstall.cpp:295 Failed to repair package rutorrent, status: 277

/var/log/synopkg.log :

2022/11/13 14:11:26	upgrade rutorrent 3.10-13 Begin preupgrade
2022/11/13 14:11:28	upgrade rutorrent 3.10-13 End preupgrade ret=[0]
2022/11/13 14:11:28	upgrade rutorrent 3.10-13 Begin preuninst
2022/11/13 14:11:28	upgrade rutorrent 3.10-13 End preuninst ret=[0]
2022/11/13 14:11:28	upgrade rutorrent 3.10-13 Begin /bin/rm -rf /volume1/@appstore/rutorrent
2022/11/13 14:11:29	upgrade rutorrent 3.10-13 End /bin/rm -rf /volume1/@appstore/rutorrent ret=[0]
2022/11/13 14:11:29	upgrade rutorrent 3.10-13 Begin postuninst
2022/11/13 14:11:29	upgrade rutorrent 3.10-13 End postuninst ret=[0]
2022/11/13 14:11:30	upgrade rutorrent: Uninstall 3.10-13 successfully
2022/11/13 14:11:30	upgrade rutorrent 3.10-13 Begin preinst
2022/11/13 14:11:30	upgrade rutorrent 3.10-13 End preinst ret=[0]
2022/11/13 14:11:30	upgrade rutorrent 3.10-13 Begin /bin/rm -rf /volume1/@appstore/rutorrent
2022/11/13 14:11:30	upgrade rutorrent 3.10-13 End /bin/rm -rf /volume1/@appstore/rutorrent ret=[0]
2022/11/13 14:11:30	upgrade rutorrent 3.10-13 Begin /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/rutorrent
2022/11/13 14:11:30	upgrade rutorrent 3.10-13 End /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/rutorrent ret=[0]
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 Begin /bin/mkdir -p /var/packages/rutorrent
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 End /bin/mkdir -p /var/packages/rutorrent ret=[0]
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 Begin /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/rutorrent/INFO
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 End /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/rutorrent/INFO ret=[0]
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 Begin /bin/rm -rf /var/packages/rutorrent/scripts
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 End /bin/rm -rf /var/packages/rutorrent/scripts ret=[0]
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 Begin /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/rutorrent/scripts
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 End /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/rutorrent/scripts ret=[0]
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 Begin /bin/rm -rf /var/packages/rutorrent/WIZARD_UIFILES
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 End /bin/rm -rf /var/packages/rutorrent/WIZARD_UIFILES ret=[0]
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 Begin /bin/mv -f /volume1/@tmp/pkginstall/WIZARD_UIFILES /var/packages/rutorrent/WIZARD_UIFILES
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 End /bin/mv -f /volume1/@tmp/pkginstall/WIZARD_UIFILES /var/packages/rutorrent/WIZARD_UIFILES ret=[0]
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 Begin /bin/rm -rf /var/packages/rutorrent/conf
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 End /bin/rm -rf /var/packages/rutorrent/conf ret=[0]
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 Begin /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/rutorrent/conf
2022/11/13 14:11:31	upgrade rutorrent 3.10-13 End /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/rutorrent/conf ret=[0]
2022/11/13 14:11:33	upgrade rutorrent 3.10-13 Begin postinst
2022/11/13 14:12:46	upgrade rutorrent 3.10-13 End postinst ret=[0]
2022/11/13 14:12:46	upgrade rutorrent 3.10-13 Begin postupgrade
2022/11/13 14:12:48	upgrade rutorrent 3.10-13 End postupgrade ret=[0]
2022/11/13 14:12:48	upgrade rutorrent from 3.10-13 to 3.10-13 failed
2022/11/13 14:12:48	upgrade rutorrent 3.10-13 Begin /bin/rm -rf /volume1/@tmp/pkginstall
2022/11/13 14:12:48	upgrade rutorrent 3.10-13 End /bin/rm -rf /volume1/@tmp/pkginstall ret=[0]

@th0ma7
Copy link
Contributor

th0ma7 commented Nov 13, 2022

Recap, success so far:

  • clean install works great!
  • can download/upload, overall it looks good
  • all plugins looks like working all right
  • kudos, kudos, kudos!

issues found so far:

  • upgrade from earlier version on DSM6 fails
  • missing geoIP plugin? It's actually there but it is missing the flag in the Peers torrent sub-tab.
  • max queue of 1 currently (e.g. only download 1x torrent at a time). I believe to solve this we have to set max_downloads_div and max_uploads_div to 0.
  • Listening Port: ports are set by default to 6881-6999. I noticed under it the checked option: Randomize port each time rTorrent starts. Hopefully the randomization is being done into the port range? Also the port range is quite big, but that may be ok, duno.

@smaarn
Copy link
Contributor Author

smaarn commented Nov 14, 2022

issues found so far:

upgrade from earlier version on DSM6 fails

Need to fix the handling of former wizard variables.

missing geoIP plugin? It's actually there but it is missing the flag in the Peers torrent sub-tab.

... Need to check.

max queue of 1 currently (e.g. only download 1x torrent at a time). I believe to solve this we have to set max_downloads_div and max_uploads_div to 0.

Can change the default but I believe this was already the case before.

Listening Port: ports are set by default to 6881-6999. I noticed under it the checked option: Randomize port each time rTorrent starts. Hopefully the randomization is being done into the port range? Also the port range is quite big, but that may be ok, duno.

It's indeed randomized within the specified range. Not too sure about the range size TBH.

@smaarn smaarn force-pushed the rutorrent/upgrade-dsm-7 branch from 67708c0 to b7360fe Compare December 11, 2022 11:43
@smaarn
Copy link
Contributor Author

smaarn commented Dec 11, 2022

Ok so some news:

  1. DSM 6 upgrade actually highlighted an unexpected issue: the reload_inst_variables doesn't seem to work as expected => fix proposal included in this MR
  2. I reworked the wizard mechanism to use shell generating wizards (to avoid all those JSON hanging around and to remain as much as possible compliant with standard DSM mechanisms) which allows for handling older versions' upgrade
  3. Remove the possibility in the wizard to customize the port range

With regards to the proposed folder structures I actually wonder if it's really worth having a watch directory enforced by default and worrying about concurrent application usages.
I would propose instead to provide with a checkbox "use watch folder" and have the default being the proposed convention (e.g. ./watch under the download directory).

mk/spksrc.service.installer.functions Outdated Show resolved Hide resolved
spk/rutorrent/Makefile Outdated Show resolved Hide resolved
ENV += BUSYBOX_CONFIG="$(BUSYBOX_CONFIG)"

# some dependents require C++11 support
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS)
# unsupported with cross/rtorrent
UNSUPPORTED_ARCHS += $(ARMv7L_ARCHS)

SYSTEM_GROUP = http

ICON_DIR = $(STAGING_DIR)/$(DSM_UI_DIR)/images
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a hack to force the generation of icons. A rework of the framework could be useful to force them (otherwise DSM 7 specific resource workers wouldn't be using available icons)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I follow, what's missing exactly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What's missing is that without this trick the icons are not automatically generated. Will rehave a look because framework has evolved lately but it seems icons were only generated in some very specific context.

Copy link
Contributor

Choose a reason for hiding this comment

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

looking at spksrc.icon.mk, icons are created when DSM_UI_DIR and SPK_ICON and SERVICE_PORT are defined and NO_SERVICE_SHORTCUT is not defined.

I suppose this will be fixed by adding to Makefile:
SERVICE_PORT = 8050

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Won't this be causing issues with the interactions with the way you can "open" the page ? (Checking)

Copy link
Contributor

Choose a reason for hiding this comment

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

And probably you can use the SERVICE_PORT variable when patching the scgi_port in config.php at installation time.

Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this be causing issues with the interactions with the way you can "open" the page ? (Checking)

I suppose it does not. It could change the generation of the app/config file, but you have a custom app/config file that is in src/app/config and is installed in rutorrent_extra_install. So you have to check that this file is still the same when adding SERVICE_PORT definition.

Copy link
Contributor

Choose a reason for hiding this comment

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

@smaarn, is this concern regarding the package icon generation now resolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mreid-tt issue should now be fixed. Thanks for following up on this and sorry for not answering earlier.

@hgy59 Found a much more more elegant way by the way to keep my app/config customization (by using an already existing framework option

@smaarn smaarn requested review from hgy59 and th0ma7 December 11, 2022 11:59
@smaarn smaarn force-pushed the rutorrent/upgrade-dsm-7 branch from b7360fe to 5dac8d4 Compare December 18, 2022 10:11
@smaarn smaarn marked this pull request as draft December 18, 2022 10:17
@smaarn
Copy link
Contributor Author

smaarn commented Dec 18, 2022

(flagging as draft since I did a few rework on the installation / upgrade procedure, still need to retest everything)

@smaarn smaarn marked this pull request as ready for review December 18, 2022 11:23
@smaarn
Copy link
Contributor Author

smaarn commented Dec 18, 2022

@hgy59 : removed the port customization feature
@th0ma7 : I have made several changes which should enable the upgrade from DSM 6

There are two open points:

  1. The folders' separation logics
  2. 4.0 upgrade

It turns out that

  1. Implementing the idea with the checkbox for the watch folder logic was actually... not feasible (the javascript framework doesn't allow me to do this it seems)
  2. The 4.0 upgrade doesn't work as is (separated MR for that)

I will try to find some time to work on the folders' separation logic and 4.0 upgrade within the coming weeks.

As is, though (once the DSM 6 update scenario is validated), I believe it should be worth merging it. WDYT ?

@smaarn smaarn force-pushed the rutorrent/upgrade-dsm-7 branch from 055bce9 to 1c26149 Compare February 19, 2023 15:16
@mreid-tt
Copy link
Contributor

@smaarn, new build seems to resolve all remaining issues in DSM6. no errors in the interface when launched...

Screenshot 2023-02-19 at 11 43 35 AM

Installation log also looks clean -- https://pastebin.com/Ev0j4zUi.

@mreid-tt
Copy link
Contributor

I also did a test download Test Torrent and confirmed that the application does download the torrent successfully...

Screenshot 2023-02-19 at 11 50 22 AM

Resulting in these in the downloads folder...

Screenshot 2023-02-19 at 11 51 12 AM

@mreid-tt
Copy link
Contributor

mreid-tt commented Feb 19, 2023

@smaarn, an upgrade from the current v3.10-10 on DSM6 is reporting as failed. The installation log seems to be fine though... https://pastebin.com/cJSQGY27.

Screenshot 2023-02-19 at 12 14 39 PM

EDIT: I'm seeing this in the /var/log/messages

2023-02-19T12:27:22-04:00 DSM62 synoscgi_SYNO.Core.Package.Installation_1_install[1445]: resource_api.cpp:289 Release service-cfg for rutorrent when 0x0002 (done)
2023-02-19T12:27:24-04:00 DSM62 synoscgi_SYNO.Core.Package.Installation_1_install[1496]: resource_api.cpp:190 Acquire data-share for rutorrent when 0x0002 (done)
2023-02-19T12:27:29-04:00 DSM62 synoscgi_SYNO.Core.Package.Installation_1_install[1615]: resource_api.cpp:190 Acquire service-cfg for rutorrent when 0x0002 (done)
2023-02-19T12:27:29-04:00 DSM62 synoscgi_SYNO.Core.Package.Installation_1_install[1615]: resource_api.cpp:190 Acquire data-share for rutorrent when 0x0002 (fail)

The failed data-share acquisition may be the cause... because in a fresh install it looks like this:

2023-02-19T12:49:16-04:00 DSM62 synoscgi_SYNO.Core.Package.Installation_1_install[14256]: resource_api.cpp:190 Acquire data-share for rutorrent when 0x0001 (done)
2023-02-19T12:49:22-04:00 DSM62 synoscgi_SYNO.Core.Package.Installation_1_install[14362]: resource_api.cpp:190 Acquire service-cfg for rutorrent when 0x0001 (done)
2023-02-19T12:49:22-04:00 DSM62 synoscgi_SYNO.Core.Package.Installation_1_install[14362]: resource_api.cpp:190 Acquire data-share for rutorrent when 0x0001 (done)
2023-02-19T12:50:12-04:00 DSM62 synopkgctl: resource_api.cpp:190 Acquire data-share for rutorrent when 0x0001 (done)

EDIT: This may have come up before with the framework in #4766. Perhaps this can help.

@mreid-tt
Copy link
Contributor

mreid-tt commented Feb 19, 2023

@smaarn, your latest build was a success for upgrades from the current v3.10-10 on DSM6!
EDIT: Upgrade log: https://pastebin.com/AjfeX63T

See video...

rutorrent_x64-6.1_3.10-13.spk-upgrade.mp4

@smaarn
Copy link
Contributor Author

smaarn commented Feb 19, 2023

Thanks a lot for the help in testing !

@smaarn smaarn marked this pull request as ready for review February 19, 2023 18:44
@smaarn smaarn merged commit 19af0ec into SynoCommunity:master Feb 21, 2023
@smaarn smaarn deleted the rutorrent/upgrade-dsm-7 branch February 21, 2023 17:44
@smaarn
Copy link
Contributor Author

smaarn commented Feb 21, 2023

4.0.2 upgrade comming in a follow up MR (here: #5617 ) but with my limited availabilities didn't want to put it in the critical path. Here we have now a DSM 7 ready version to publish

@th0ma7
Copy link
Contributor

th0ma7 commented Mar 9, 2023

@smaarn was this published? I don't see it online. Let me know if you need assistance.

@smaarn
Copy link
Contributor Author

smaarn commented Mar 10, 2023

@smaarn was this published? I don't see it online. Let me know if you need assistance.

@th0ma7 I don't believe this was published indeed.
TBH I don't have any idea on how to publish packages. Do you have any pointers on the procedure to follow ? (will be rechecking on my side if I find anything)

@th0ma7
Copy link
Contributor

th0ma7 commented Mar 14, 2023

I don't believe this was published indeed.

@smaarn I'll take care of it.

TBH I don't have any idea on how to publish packages. Do you have any pointers on the procedure to follow ? (will be rechecking on my side if I find anything)

Yes, @publicarray made an awesome documentation online.

  • The manual process is here (usefull for complex packages such as ffmpeg and friends): https://github.com/SynoCommunity/spksrc/wiki/Package-Update-Policy (look for the section "Publish Process")
  • The semi-automated process is here: https://github.com/SynoCommunity/spksrc/wiki/Publish-a-package-from-Github Simply said, you enable actions within your cloned spksrc repository and invoke builds from there (instead of automated within the official repository). Although first you have to setup your account and enable your identifier key so that at the end of the build it does publish correctly using your id. Also, our server online isn't quite good at handling parallel uploads so often some builds "fails". You only have to rebuild failed ones and yoi're eventually good to go (it may need to be triggerred a few time).

So now on my way to publish this PR.

EDIT: build + publishing online in progress https://github.com/th0ma7/spksrc/actions/runs/4420411967

EDIT2: Now published

@hgy59 hgy59 added status/published Published and activated (may take up to 48h until visible in DSM package manager) and removed status/to-publish labels Mar 19, 2023
AlexPresso pushed a commit to AlexPresso/spksrc that referenced this pull request Jan 30, 2025
…5455)

* Add DSM 7 support
* Migrated to PHP 7.4
* Fix torrent creation wizard (SynoCommunity#5288)
* Add explicit dependency on WebStation
* Add firewall service port declarations
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.

Creating Torrent file
4 participants