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

[Help wanted] ruTorrent - Generic Service approach #3175

Closed
wants to merge 1 commit into from

Conversation

Safihre
Copy link
Contributor

@Safihre Safihre commented Feb 26, 2018

I thought I could convert this package, but I need help. The changes between DSM5 and 6 in WebStation workings are still a mystery to me and I am not sure if I even want to dive into this.

If anyone wants to help me to figure out what is needed to get it to work I am happy to implement the code. In this issue (#2215) they have some information already that should get things rolling.
Problems I identified:

  • Need somehow to force dependency on Web-Station and the PHP package (is Apache also needed?).
  • I think the package-user needs to be added to http group, not 100% sure.
  • Figure out what config-files need to be edited to add the open_basedir.
  • Figure out the process to restart after the changes are made.
  • Don't break anything on DSM5.

As mentioned above: I can help and do parts of the implementation, just need to know how to do it.

Linked issues: #3062 #3016 #2805 #2766 #2751 #2392 #2240 #2215 #2206

Checklist

  • [] Build rule all-supported completed successfully
  • [] Package upgrade completed successfully
  • [] New installation of package completed successfully

@Johnito
Copy link

Johnito commented Feb 26, 2018

Hello,

The rutorrent package is special : the user has to achieve several steps within DSM6 to make the package actually work. The very same steps have to be achieved with the old synocommunity package.

  1. Both official 'PHP7' and 'Apache HTTP Server 2.4' packages need to be installed (mandatory).
  2. The PHP profile used in webstation needs to have curl and sockets extensions checked to have full compatibility with rutorrent plugins (those two extensions are not checked by default).
  3. open_basedir has to be personnalised indeed : /var/services/tmp:/var/services/web:/usr/local/rutorrent:/volume1/downloadfolder
  4. The http group needs to have reading/writing rights on downloadfolder
  5. (optional) A line to add in /usr/local/etc/apache24/conf/httpd24.conf : LoadModule auth_basic_module modules/mod_auth_basic.so (probably to be able to use .htaccess ?)

When all steps are done, Apache HTTP Server 2.4 has to be stopped/launched. Some prefer to reboot completely. This package may be complicated to configure at first, but is definitely worth it since rutorrent is by far the most powerful/secure torrent client available. IMO, the only advanced setting here is the optional httpd24.conf editing. If this can be done automatically when installing, this would be a plus.

I'm at your disposal for any infos or tests in DSM6. I'm already running your rutorrent 6.1_3.8-1 compilation without any issues on two different setups. Some of the steps aforementioned are not necessary when package is installed in DSM5, but i cannot help you that much with this since all devices i have run DSM6.

@Safihre
Copy link
Contributor Author

Safihre commented Feb 27, 2018

@Johnito Wow, that's a lot of steps. For actual decent package, this should all be automated during install.
I hope we can do 1 via the package's INFO file.
Is there a way to somehow locate the config-file and force the requirements you mention in 2?
3 we should be able to do with the info in #2215.
4 and 5 we should be able to do during install.

@Johnito
Copy link

Johnito commented Feb 27, 2018

If 3/4/5 can be automated, this already will be a huge improvement over the current package.

About the PHP thing, I am not sure i found the right setting file at all. The file having the required settings is obviously related to the PHP profile used by DSM/WebStation. I only found these three files ...

  • /etc/php/php.ini
  • /usr/local/etc/php70/php.ini
  • /usr/local/etc/php70/php-fpm.conf

... but none seem to actually reflect the checked extensions in the Webstation PHP profile. etc/php/php.ini lists a few extensions, but they do not seem to be the ones i checked myself or i do not get it :

_[PHP]
engine = On
short_open_tag = On
asp_tags = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
serialize_precision = 17
disable_functions =
disable_classes =
zend.enable_gc = On
expose_php = Off
max_execution_time = 240
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = Off
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 32M
default_mimetype = "text/html"
default_charset = "UTF-8"
include_path = "."
extension_dir = "/usr/lib/php/modules"
sys_temp_dir = "/var/services/tmp"
enable_dl = Off
file_uploads = On
upload_tmp_dir = "/var/services/tmp"
upload_max_filesize = 32M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60

extension = bcmath.so
extension = bz2.so
extension = curl.so
extension = iconv.so
extension = ldap.so
extension = mcrypt.so
extension = openssl.so
extension = pdo_sqlite.so
extension = posix.so
extension = phar.so
extension = shmop.so
extension = sockets.so
extension = sqlite3.so
extension = zip.so

extension = syno_compiler.so

[CLI Server]
cli_server.color = On

[Date]
date.timezone = Europe/Amsterdam

[Phar]
phar.readonly = Off

[mail function]
sendmail_path = /usr/bin/ssmtp -t
mail.add_x_header = On

[SQL]
sql.safe_mode = Off

[bcmath]
bcmath.scale = 0

[Session]
session.save_handler = files
session.save_path = "/var/services/tmp"
session.use_cookies = 1
session.use_only_cookies = 0
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = Off
session.bug_compat_warn = Off
session.referer_check =
session.entropy_length = 0
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
session.upload_progress.enabled = On
session.upload_progress.cleanup = On
session.upload_progress.prefix = "upload_progress_"
session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS"
session.upload_progress.freq = "1%"
session.upload_progress.min_freq = "1"_

@Safihre
Copy link
Contributor Author

Safihre commented Feb 28, 2018

I see here in PR #2591 that there is a way to force dependency on Web Station and PHP, good to know.

@Johnito
Copy link

Johnito commented Mar 22, 2018

Hey @Safihre , any luck on this ?

@ymartin59
Copy link
Contributor

@Safihre OK for you if I go on with this?

@Safihre
Copy link
Contributor Author

Safihre commented Mar 22, 2018

Sure, I tried a bit but didn't like the way this package would need to have hard code all these paths.
Or many manual steps of the user.

@albertusQuelle
Copy link

Can i help to accelerate the request in any way?

@ymartin59
Copy link
Contributor

I find too complex at the moment. I am learning PHP application publication with simpler bicbucstriim package first before looking at ruTurrent

@albertusQuelle
Copy link

@ymartin59 what do you mean with too complex? To port that package?

@albertusQuelle
Copy link

looking forward on ruTorrent :)

@defaultsecurity
Copy link

Me too!

@ymartin59
Copy link
Contributor

ymartin59 commented Apr 9, 2020

@ymartin59 ymartin59 mentioned this pull request Apr 9, 2020
2 tasks
@Safihre
Copy link
Contributor Author

Safihre commented Apr 12, 2020

In 2 years I didn't make any progress so will close this. Probably somebody has to start from scratch..

@Safihre Safihre closed this Apr 12, 2020
@ymartin59
Copy link
Contributor

@Safihre I prefer to go on from your work. I got it locally to work on it... later...

@ymartin59 ymartin59 mentioned this pull request Oct 10, 2020
3 tasks
@Safihre Safihre deleted the rutorrent branch March 30, 2021 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

5 participants