View | Details | Raw Unified | Return to bug 239921 | Differences between
and this patch

Collapse All | Expand All

(-)b/www/rutorrent/Makefile (+282 lines)
Added Link Here
1
PORTNAME=	rutorrent
2
PORTVERSION=	5.1.9.hotfix
3
DISTVERSIONPREFIX=v
4
CATEGORIES=	www
5
6
PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
7
PATCHFILES+=	f68e87a37ecf4ab6901b8a7d929c837dd11edf60.patch:-p1 # https://github.com/Novik/ruTorrent/pull/2910
8
PATCHFILES+=	0dce8b693db18ffed50c2e9e42d41e35f1941a51.patch:-p1 # https://github.com/Novik/ruTorrent/pull/2911
9
PATCHFILES+=	0a81e714b5653e9497638d31544cf03f6d559b5c.patch:-p1 # https://github.com/Novik/ruTorrent/pull/2912
10
11
MAINTAINER=	rozhuk.im@gmail.com
12
COMMENT=	Web front-end for the Bittorrent client rtorrent.
13
14
LICENSE=	GPLv3
15
LICENSE_FILE=	${WRKSRC}/LICENSE.md
16
17
USES=		php
18
19
NO_BUILD=	yes
20
NO_ARCH=	yes
21
USE_GITHUB=	yes
22
PORTEXAMPLES=	rutorent.conf
23
SUB_FILES=	pkg-message
24
GH_ACCOUNT=	Novik
25
GH_PROJECT=	ruTorrent
26
GH_TAGNAME=	c55d338d9fe83228f0aa0ea8a6953463fc5c320a
27
28
OPTIONS_DEFINE=	EXAMPLES
29
OPTIONS_GROUP=	PLUGINS 3RDPARTY
30
OPTIONS_GROUP_PLUGINS=	AUTOTOOLS BULKMAGNET CHECKPORT CHUNKS COOKIES CPULOAD \
31
		CREATE DATA DATADIR DISKSPACE EDIT ERASEDATA EXTRATIO \
32
		EXTSEARCH FEEDS FILEDROP GEOIP HISTORY HTTPRPC IPAD \
33
		LOGINMGR LOOKAT MEDIAINFO RATIO RETRACKERS RSS \
34
		RUTRKCHK SCHEDULER SCREENSHOTS SEEDINGTIME \
35
		SWTORRENT SOURCE SPECTROGRAM THEME THROTTLE TRACKLBLS \
36
		TRAFIC UNPACK UPLOADETA XMPP
37
OPTIONS_GROUP_3RDPARTY=	HOSTNAME MOBILE INSTANTSEARCH PAUSEWEBUI \
38
		RATIOCOLOR
39
OPTIONS_DEFAULT=CHUNKS CREATE DATADIR EDIT ERASEDATA HOSTNAME \
40
		SCHEDULER SEEDINGTIME SOURCE TRACKLBLS TRAFIC
41
OPTIONS_SUB=	yes
42
43
3RDPARTY_DESC=	3rd party plugins
44
45
AUTOTOOLS_DESC=	Provides some possibilities on automation
46
AUTOTOOLS_DIRS=	autotools
47
48
BULKMAGNET_DESC=Allows bulk operations with magnet links
49
BULKMAGNET_DIRS=bulk_magnet
50
51
CHECKPORT_DESC=	Adds incoming port status indicator
52
CHECKPORT_DIRS=	check_port
53
54
CHUNKS_DESC=	Shows the download status of torrent chunks
55
CHUNKS_DIRS=	chunks
56
57
COOKIES_DESC=	Use cookies for client authentication on trackers
58
COOKIES_DIRS=	cookies
59
60
CPULOAD_DESC=	Adds a CPU Load usage bar to the bottom toolbar
61
CPULOAD_DIRS=	cpuload
62
63
CREATE_DESC=	Allows for the creation of new .torrent files
64
CREATE_DIRS=	create
65
66
DATA_DESC=	Adds the "Get File" item to the right click menu
67
DATA_DIRS=	data
68
69
DATADIR_DESC=	Replacement of the cur torrent data dir
70
DATADIR_DIRS=	datadir
71
72
DISKSPACE_DESC=	Adds an easy to read disk meter
73
DISKSPACE_DIRS=	diskspace
74
75
EDIT_DESC=	Edit list of trackers and comment of the torrent
76
EDIT_DIRS=	edit
77
78
ERASEDATA_DESC=	Allows to delete data via context menu
79
ERASEDATA_DIRS=	erasedata
80
81
EXTRATIO_DESC=	Extends the functionality of the ratio plugin
82
EXTRATIO_DIRS=	extratio
83
EXTRATIO_IMPLIES=RATIO
84
85
EXTSEARCH_DESC=	Allows to search many popular torrent sites
86
EXTSEARCH_DIRS=	extsearch
87
88
FEEDS_DESC=	Making RSS feeds with information of torrents
89
FEEDS_DIRS=	feeds
90
91
FILEDROP_DESC=	Allows to drag multiple torrents to the browser
92
FILEDROP_DIRS=	filedrop
93
94
GEOIP_DESC=	Shows geolocation of peers for the selected torrent
95
GEOIP_DIRS=	geoip
96
97
HISTORY_DESC=	Log a history of torrents
98
HISTORY_DIRS=	history
99
100
HTTPRPC_DESC=	Replacement for the mod_scgi webserver module
101
HTTPRPC_DIRS=	httprpc
102
103
IPAD_DESC=	Use scrolling and right-click mouse button
104
IPAD_DIRS=	ipad
105
106
LOGINMGR_DESC=	Used to login to 3rd party torrent sites
107
LOGINMGR_DIRS=	loginmgr
108
109
LOOKAT_DESC=	Search for torrent name in external sources
110
LOOKAT_DIRS=	lookat
111
112
MEDIAINFO_DESC=		Display media file information
113
MEDIAINFO_DIRS=		mediainfo
114
MEDIAINFO_RUN_DEPENDS=	mediainfo:multimedia/mediainfo
115
116
RATIO_DESC=	Set ratio limits for groups of torrents
117
RATIO_DIRS=	extratio ratio
118
119
RETRACKERS_DESC=Add specified trackers to newly added torrents
120
RETRACKERS_DIRS=retrackers
121
122
RSS_DESC=	Fetch torrents via rss download links
123
RSS_DIRS=	rss rssurlrewrite
124
125
RUTRKCHK_DESC=	Checks the rutracker.org for changed torrents
126
RUTRKCHK_DIRS=	rutracker_check
127
128
SCHEDULER_DESC=	Scheduler to control limits
129
SCHEDULER_DIRS=	scheduler
130
131
SCREENSHOTS_DESC=	Show screenshots from video
132
SCREENSHOTS_DIRS=	screenshots
133
SCREENSHOTS_RUN_DEPENDS=ffmpeg:multimedia/ffmpeg
134
135
SEEDINGTIME_DESC=Adds the columns 'Finished' and 'Added'
136
SEEDINGTIME_DIRS=seedingtime
137
138
SWTORRENT_DESC=	Show peers like wTorrent
139
SWTORRENT_DIRS=	show_peers_like_wtorrent
140
141
SOURCE_DESC=	Adds a "Get .torrent" to the click context menu
142
SOURCE_DIRS=	source
143
144
SPECTROGRAM_DESC=	Show spectrogram of audio files
145
SPECTROGRAM_DIRS=	spectrogram
146
SPECTROGRAM_RUN_DEPENDS=sox:audio/sox
147
148
THEME_DESC=	Allows change gui theme
149
THEME_DIRS=	theme
150
151
THROTTLE_DESC=	Set limits of speed for groups of torrents
152
THROTTLE_DIRS=	throttle
153
154
TRACKLBLS_DESC=	Adds a set of labels on the category panel
155
TRACKLBLS_DIRS=	tracklabels
156
157
TRAFIC_DESC=	Subsystem for monitoring rtorrent traffic totals
158
TRAFIC_DIRS=	trafic
159
160
UNPACK_DESC=		unrar/unzip torrent data
161
UNPACK_DIRS=		unpack
162
UNPACK_RUN_DEPENDS=	unrar:archivers/unrar
163
164
UPLOADETA_DESC=	Add upload target and ETA columns
165
UPLOADETA_DIRS=	uploadeta
166
167
XMPP_DESC=	Send notification via xmpp about finished downloads
168
XMPP_DIRS=	xmpp
169
170
HOSTNAME_DESC=		Add hostname column to peers tab
171
HOSTNAME_DIRS=		hostname
172
HOSTNAME_GH_ACCOUNT=	rozhuk-im:plugin_hostname
173
HOSTNAME_GH_PROJECT=	rutorrent-hostname:plugin_hostname
174
HOSTNAME_GH_TAGNAME=	3ea65a6934144c403d534ba1bc86c57263686c6e:plugin_hostname
175
176
INSTANTSEARCH_DESC=	Searchresults appears instantly
177
INSTANTSEARCH_DIRS=	instantsearch
178
INSTANTSEARCH_GH_ACCOUNT=Gyran:plugin_instantsearch
179
INSTANTSEARCH_GH_PROJECT=rutorrent-instantsearch:plugin_instantsearch
180
INSTANTSEARCH_GH_TAGNAME=d1bc52d6ef6547bc643312b5868c3662c7118a9b:plugin_instantsearch
181
182
MOBILE_DESC=		Mobile version of ruTorrent
183
MOBILE_DIRS=		mobile
184
MOBILE_GH_ACCOUNT=	xombiemp:plugin_mobile
185
MOBILE_GH_PROJECT=	rutorrentMobile:plugin_mobile
186
MOBILE_GH_TAGNAME=	e3555a935469f810ea755516a6f0d85046571114:plugin_mobile
187
188
PAUSEWEBUI_DESC=	Adds an button to pause the webui from updating
189
PAUSEWEBUI_DIRS=	pausewebui
190
PAUSEWEBUI_GH_ACCOUNT=	Gyran:plugin_pausewebui
191
PAUSEWEBUI_GH_PROJECT=	rutorrent-pausewebui:plugin_pausewebui
192
PAUSEWEBUI_GH_TAGNAME=	b398483f1e70c8e215ddbe34dfe3af3fc5f192ef:plugin_pausewebui
193
194
RATIOCOLOR_DESC=	Change color of ratio column depending on ratio
195
RATIOCOLOR_DIRS=	ratiocolor
196
RATIOCOLOR_GH_ACCOUNT=	Gyran:plugin_ratiocolor
197
RATIOCOLOR_GH_PROJECT=	rutorrent-ratiocolor:plugin_ratiocolor
198
RATIOCOLOR_GH_TAGNAME=	3ab4962be86d17fb83649b6db44767796ee377de:plugin_ratiocolor
199
200
.include <bsd.port.pre.mk>
201
202
.if ${PORT_OPTIONS:MIPAD} && ${PORT_OPTIONS:MMOBILE}
203
IGNORE=			options IPAD and WebUI are incopatible
204
.endif
205
206
post-extract-HOSTNAME-on:
207
	@${MKDIR} ${WRKSRC}/plugins/hostname/
208
	@${MV} ${WRKSRC_plugin_hostname}/* ${WRKSRC}/plugins/hostname/
209
210
post-extract-INSTANTSEARCH-on:
211
	@${MKDIR} ${WRKSRC}/plugins/instantsearch/
212
	@${MV} ${WRKSRC_plugin_instantsearch}/* ${WRKSRC}/plugins/instantsearch/
213
214
post-extract-MOBILE-on:
215
	@${MKDIR} ${WRKSRC}/plugins/mobile/
216
	@${MV} ${WRKSRC_plugin_mobile}/* ${WRKSRC}/plugins/mobile/
217
218
post-extract-PAUSEWEBUI-on:
219
	@${MKDIR} ${WRKSRC}/plugins/pausewebui/
220
	@${MV} ${WRKSRC_plugin_pausewebui}/* ${WRKSRC}/plugins/pausewebui/
221
222
post-extract-RATIOCOLOR-on:
223
	@${MKDIR} ${WRKSRC}/plugins/ratiocolor/
224
	@${MV} ${WRKSRC_plugin_ratiocolor}/* ${WRKSRC}/plugins/ratiocolor/
225
226
do-install:
227
	# Prepare.
228
	@${FIND} ${WRKSRC} -type f \( \
229
		-name '*.orig' \
230
		-o -name '*.bak' \
231
		-o -name '.gitignore' \) -delete
232
	@${MKDIR} ${STAGEDIR}${WWWDIR}
233
	# Install base files.
234
.for _dir in conf css images js lang php share
235
	@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${_dir} ${STAGEDIR}${WWWDIR})
236
.endfor
237
.for _file in index.html
238
	${INSTALL_DATA} ${WRKSRC}/${_file} ${STAGEDIR}${WWWDIR}/
239
.endfor
240
	# Install base plugins.
241
	@${MKDIR} ${STAGEDIR}${WWWDIR}/plugins
242
.for _dir in _cloudflare _getdir _noty _noty2 _task
243
	@(cd ${WRKSRC}/plugins && ${COPYTREE_SHARE} ${_dir} ${STAGEDIR}${WWWDIR}/plugins)
244
.endfor
245
	# Install selected plugins.
246
.for _opt in ${OPTIONS_GROUP_PLUGINS} ${OPTIONS_GROUP_3RDPARTY}
247
.  if ${PORT_OPTIONS:M${_opt}}
248
.    for _dir in ${${_opt}_DIRS}
249
	@(cd ${WRKSRC}/plugins && ${COPYTREE_SHARE} ${_dir} ${STAGEDIR}${WWWDIR}/plugins)
250
.    endfor
251
.  endif
252
.endfor
253
	# Fix perms.
254
	@${FIND} ${STAGEDIR}${WWWDIR} -type f -name "*.sh" -exec ${CHMOD} +x {} \+
255
	# Rename config files to .sample.
256
.for _conf in access.ini config.php plugins.ini
257
	@${MV} ${STAGEDIR}${WWWDIR}/conf/${_conf} ${STAGEDIR}${WWWDIR}/conf/${_conf}.sample
258
.endfor
259
	# Rename plugins configs to .sample.
260
	@${FIND} ${STAGEDIR}${WWWDIR}/plugins -maxdepth 2 -type f \
261
		-name "conf.php" -exec ${MV} {} {}.sample \;
262
263
post-install-EXAMPLES-on:
264
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
265
	${INSTALL_DATA} ${FILESDIR}/rutorent.conf ${STAGEDIR}${EXAMPLESDIR}/
266
267
post-stage:
268
	# Generate plist.
269
	@${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh makeplist | \
270
		${GREP} -v ^\/ | \
271
		${SED} -e 's|%%WWWDIR%%|www/${PORTNAME}|' \
272
			-e 's|%%PORTEXAMPLES%%||' \
273
			-e 's|%%EXAMPLESDIR%%|share/examples/${PORTNAME}|' \
274
			> ${TMPPLIST}
275
	# Mark config files as samples in plist.
276
	@${REINPLACE_CMD} -E "s|(.*\.sample)$$|@sample \1|" ${TMPPLIST}
277
	# Fix perms.
278
	@${ECHO_CMD} "@postexec chown -R root:${WWWGRP} ${WWWDIR}/share" >> ${TMPPLIST}
279
	@${ECHO_CMD} "@postexec chmod -R u=rwX,g=rwX,o=rwX ${WWWDIR}/share" >> ${TMPPLIST}
280
	@${ECHO_CMD} "@postexec chmod u=rw,g=r,o=r ${WWWDIR}/share/.htaccess" >> ${TMPPLIST}
281
282
.include <bsd.port.post.mk>
(-)b/www/rutorrent/distinfo (+11 lines)
Added Link Here
1
TIMESTAMP = 1746312698
2
SHA256 (Novik-ruTorrent-v5.1.9.hotfix-c55d338d9fe83228f0aa0ea8a6953463fc5c320a_GH0.tar.gz) = 90e7715b95cf3793d9b0a0fee4fc0af115b2900d984c0e6dde2046bba2df202a
3
SIZE (Novik-ruTorrent-v5.1.9.hotfix-c55d338d9fe83228f0aa0ea8a6953463fc5c320a_GH0.tar.gz) = 2743406
4
SHA256 (rozhuk-im-rutorrent-hostname-3ea65a6934144c403d534ba1bc86c57263686c6e_GH0.tar.gz) = 6beefd8cfbfbd547c23fd87f1cd2cd907039722afcfdfa47732807da570ed516
5
SIZE (rozhuk-im-rutorrent-hostname-3ea65a6934144c403d534ba1bc86c57263686c6e_GH0.tar.gz) = 4416
6
SHA256 (f68e87a37ecf4ab6901b8a7d929c837dd11edf60.patch) = 7b9b78a52afdd4d873b4f361894a2ce436801c39f9ecaab5851aec6dc5abee98
7
SIZE (f68e87a37ecf4ab6901b8a7d929c837dd11edf60.patch) = 2510
8
SHA256 (0dce8b693db18ffed50c2e9e42d41e35f1941a51.patch) = ccb1e206c0ac9533290139414944c2878ad69774f631a3e75c862cfd546ffed6
9
SIZE (0dce8b693db18ffed50c2e9e42d41e35f1941a51.patch) = 1257
10
SHA256 (0a81e714b5653e9497638d31544cf03f6d559b5c.patch) = 33d0c170192bb8c1b0376e4e42b141430b6aa66382e0c53c7464f5e6e261d7f3
11
SIZE (0a81e714b5653e9497638d31544cf03f6d559b5c.patch) = 962
(-)b/www/rutorrent/files/patch-conf_config.php (+51 lines)
Added Link Here
1
--- conf/config.php.orig	2024-10-27 15:31:31 UTC
2
+++ conf/config.php
3
@@ -30,14 +30,14 @@
4
 
5
 	$log_file = '/tmp/errors.log';		// path to log file (comment or leave blank to disable logging)
6
 
7
-	$saveUploadedTorrents = true;		// Save uploaded torrents to profile/torrents directory or not
8
+	$saveUploadedTorrents = false;		// Save uploaded torrents to profile/torrents directory or not
9
 	$overwriteUploadedTorrents = false;	// Overwrite existing uploaded torrents in profile/torrents directory or make unique name
10
 
11
 	$topDirectory = '/';			// Upper available directory. Absolute path with trail slash.
12
 	$forbidUserSettings = false;
13
 
14
-	$scgi_port = 5000;
15
-	$scgi_host = "127.0.0.1";
16
+	$scgi_port = 0;
17
+	$scgi_host = "unix:///var/run/rtorrent-rpc.sock";
18
 
19
 	// For web->rtorrent link through unix domain socket
20
 	// (scgi_local in rtorrent conf file), change variables
21
@@ -52,11 +52,17 @@
22
 	// Can't be greater then 327625*1024 due to limitation in libtorrent ResourceManager::set_max_upload_unchoked function.
23
 
24
 	$pathToExternals = array(
25
-		"php"	=> '',			// Something like /usr/bin/php. If empty, will be found in PATH.
26
-		"curl"	=> '',			// Something like /usr/bin/curl. If empty, will be found in PATH.
27
-		"gzip"	=> '',			// Something like /usr/bin/gzip. If empty, will be found in PATH.
28
-		"id"	=> '',			// Something like /usr/bin/id. If empty, will be found in PATH.
29
-		"stat"	=> '',			// Something like /usr/bin/stat. If empty, will be found in PATH.
30
+		"php"	=> '/usr/local/bin/php',	// Something like /usr/bin/php. If empty, will be found in PATH.
31
+		"curl"	=> '/usr/local/bin/curl',	// Something like /usr/bin/curl. If empty, will be found in PATH.
32
+		"gzip"	=> '/usr/bin/gzip',		// Something like /usr/bin/gzip. If empty, will be found in PATH.
33
+		"id"	=> '/usr/bin/id',		// Something like /usr/bin/id. If empty, will be found in PATH.
34
+		"stat"	=> '/usr/bin/stat',		// Something like /usr/bin/stat. If empty, will be found in PATH.
35
+		"pgrep"	=> '/bin/pgrep',
36
+		"unzip"	=> '/usr/bin/unzip',
37
+		"unrar"	=> '/usr/local/bin/unrar',
38
+		"ffmpeg"=> '/usr/local/bin/ffmpeg',
39
+		"sox"	=> '/usr/local/bin/sox',
40
+		"mediainfo"=> '/usr/local/bin/mediainfo',
41
 	);
42
 
43
 	$localHostedMode = false;		// Set to true if rTorrent is hosted on the SAME machine as ruTorrent
44
@@ -65,6 +71,7 @@
45
 										// Required to clear web browser cache when upgrading versions	
46
 
47
 	$localhosts = array(			// list of local interfaces
48
+		"::1",
49
 		"127.0.0.1",
50
 		"localhost",
51
 	);
(-)b/www/rutorrent/files/pkg-message.in (+30 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
5
rtorrent must be build with xml-rpc support.
6
7
An example configuration file for nginx has been installed in
8
%%EXAMPLESDIR%%.
9
10
More information about setup:
11
https://github.com/Novik/ruTorrent/wiki/MainInstall
12
https://github.com/Novik/ruTorrent/wiki/Config
13
https://github.com/Novik/ruTorrent/wiki/WebSERVER
14
15
16
17
Do not forget add to rtorrent.conf:
18
19
in case no rutorrent users configured:
20
execute2 = {sh,-c,/usr/local/bin/php /usr/local/www/rutorrent/php/initplugins.php &}
21
22
in case you have "USER" configured in rutorrent:
23
execute2 = {sh,-c,/usr/local/bin/php /usr/local/www/rutorrent/php/initplugins.php USER &}
24
25
More info: https://github.com/Novik/ruTorrent/wiki/Plugins#starting-plugins-with-rtorrent
26
27
28
EOM
29
}
30
]
(-)b/www/rutorrent/files/rutorent.conf (+28 lines)
Added Link Here
1
### Rozhuk Ivan 2009.04-2024
2
### nginx configuration file
3
### PHP rutorrent HTTP request handler
4
5
6
# You can include this to nginx server.
7
# Before use:
8
# 1. Check scgi_pass and fastcgi_pass.
9
# 2. Make sure that you secure HTTP access to it.
10
11
12
# SCGI for rtorrent.
13
location ^~ /RPC2 {
14
	include			scgi_params;
15
	scgi_pass		unix:/var/run/rtorrent-rpc.sock;
16
}
17
18
# Handle PHP files.
19
location ~* /rutorrent/ {
20
	index			index.html;
21
	location ~* \.php$ {
22
		try_files	$fastcgi_script_name = 404;
23
		include		fastcgi_params;
24
		fastcgi_pass	unix:/var/run/PHP-FCGI.sock;
25
		fastcgi_param	SCRIPT_FILENAME $document_root$fastcgi_script_name;
26
		fastcgi_param	PATH_INFO $uri;
27
	}
28
}
(-)b/www/rutorrent/pkg-descr (+10 lines)
Added Link Here
1
ruTorrent is a web frontend for rtorrent designed to emulate the look
2
and feel of uTorrent WebUI so its appearance is quite similar to the
3
"parent".
4
The name "ruTorrent" is the combination of uTorrent and rtorrent.
5
6
The original version of ruTorrent was based on an older version of
7
uTorrent Webui but has been completely rewritten as of 3.0.
8
9
10
WWW: https://github.com/Novik/ruTorrent

Return to bug 239921