[HOWTO] pyLoad 0.4.9 (self-made port)

mrhanky

Cadet
Joined
Jul 16, 2013
Messages
1
Hi people,
I've created a FreeBSD port for pyLoad 0.4.9. I want to submit this port to the FreeBSD ports collection (creating a binary package later?). I'm also planning creating a FreeNAS PBI. I would like to share this with the FreeNAS Community, hoping for feedback.
I created this on my FreeNAS Box (8.3.1-RELEASE-x86_64) in a plugins jail. The following instructions require a working jail.

  • Required ports or binary packages:
    • database/py-sqlite3
    • ftp/py-curl
    • graphics/py-imaging
    • lang/python
    • security/py-pycrypto
    • www/py-django
  • SSL support:
    • security/py-openssl
  • Unpacking downloads:
    • archivers/unrar
    • archivers/unzip
  • JS-Enginge for Click'n'Load:
    • lang/spidermonkey17
  • Captcha solving:
    • graphics/gocr
    • graphics/tesseract
    • graphics/tesseract-data
Installation

1. Make sure you have the ports tree, if not run (will take a while). Install git via port or binary package
Code:
# portsnap fetch extract
# cd /usr/ports/devel/git && make install clean
# pkg_add -r git


2. Clone my port repo to your ports tree and install it:
Code:
# cd /usr/ports/www
# git clone https://github.com/mrhanky17/pyload-freebsd.git pyload
# cd pyload/ && make install clean


3. Enable and run pyLoad (if no pyload.conf exists, setup will be called first):
Code:
# echo 'pyload_enable="YES"' >> /etc/rc.conf
# service pyload start


4. Optional settings (add to /etc/rc.conf):
  • pyload_config="/usr/local/etc/pyload"
  • pyload_flags="--daemon"
  • pyload_pid="/var/run/pyload.pid"

5. Finished, go to the web interface or use the command line interface. :)
Symlinks in /usr/local/bin:
Code:
# pyload
# pyload-cli
# pyload-gui (will be obsolete in next pyLoad version, dependencies have to be installed per hand)


https://github.com/mrhanky17/pyload-freebsd
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You should wait until 9.1 hits RELEASE status to do the PBI. The PBIs in 8.3.1 are not compatible with the FreeNAS 9+ versions.

Good work. Definitely going to watch and see where this goes. :)
 

ClassicGOD

Contributor
Joined
Jul 28, 2011
Messages
145
Installed pyLoad on my FreeNAS 9.1.1 today using your port and instructions. Thanks!

I created standard vanilla Jail, no vimage then proceeded according to your instructions remembering to select COOKIES support every time it asked me for curl configuration (and if I remember corretly it only asked me during git compilation not during the pyLoad install). I also had to run pyLoad setup manually (I recommend using threaded web interface) and default config path was '/root/pyload' instead of '/usr/local/etc/pyload'.

It runs beautifully and now with download manager, torrent, automatic backups of my home computers and PLEX my NAS is complete and it makes me very happy so thanks again!
 

ernie-t

Cadet
Joined
Sep 27, 2013
Messages
7
@ClassicGOD

How did you do that?

i do all of the instruction

after make install clean comes the following error:

...
No such file or directory
pkg-static: lstat(/usr/ports/www/pyload/work/stage/usr/local/www/pyload/): No such file or directory
*** [fake-pkg] Error code 74

Stop in /usr/ports/www/pyload.
*** [install] Error code 1

Stop in /usr/ports/www/pyload.
*** [reinstall] Error code 1

Stop in /usr/ports/www/pyload.

it wont work

:-(
 

ClassicGOD

Contributor
Joined
Jul 28, 2011
Messages
145
Hi,
Just tried to recreate my pyLoad install in a new jail and something is not right. I managed to make it run but it won't auto start with the jail. I don't know if something changed with the jail or with the port and I don't have time right now to dig into it, sorry.

This is what I did to make it run:

1. Login into your Freenas go to Jails and click 'Add Jails'
2. Click 'Advanced Mode'; Put in jail name; make note of the IP address; put in 'IPv4 default gateway'; make sure 'autostart' is enabled; 'typ'e is standard; 'VIMAGE', 'NAT' and '32Bit' are disabled and 'vanilla' is enabled and click OK
3. Use any terminal (Putty on Win, Terminal on OSX etc) to login with SSH to your NAS (SSH has to be enabled in services) as root or use the 'Shell' from the GUI
4. Type in 'jls' (without quotes) and make note of JID of your jail
5. Type in 'jexec # csh' (where # is the JID of your jail)
6. Once in the jail type in 'portsnap fetch extract' (it'll take a while to finish)
7. 'cd /usr/ports/devel/git'
8. 'make install clean'
9. During the compilation it will ask you for the configuration of required packages - leave everything as is but make sure that when it asks for CURL you select Cookies support - it's disabled by default. (use arrows to move and space to check and uncheck the fields, enter to continue)
10. 'cd /usr/ports/www'
11. 'git clone https://github.com/mrhanky17/pyload-freebsd.git pyload'
12. 'cd pyload/'
13. 'make install clean' (you'll get the [install] Error code 1 at the end, ignore it)
14. 'pyload'
15. go through the setup
16. 'echo 'pyload_enable="YES"' >> /etc/rc.conf'
17. 'ln -s /usr/local/bin/pyload /etc/rc.d/pyload'
18. 'service pyload start' (may ask you to go through the setup again, remember to provide correct config path: /root/pyload )
19. 'service pyload start' it should run and you should have access to it through web interface with the IP you saw in step 2.
 

ernie-t

Cadet
Joined
Sep 27, 2013
Messages
7
YEAH!!!!!!!!

ClassicGOD you're my man.

Everything worked except the autostart. Unfortunately, I do not know where to look for the problem
 

ernie-t

Cadet
Joined
Sep 27, 2013
Messages
7
@ClassicGOD

could you upload / share your working "/etc/rc.d/pyload", please?

so I could compare yours with my.
 

ernie-t

Cadet
Joined
Sep 27, 2013
Messages
7
I solved the problem with the autostart!!!! :D

17. 'ln -s /usr/local/bin/pyload /etc/rc.d/pyload'

MUST BE CORRECTED IN

17. 'ln -s /usr/ports/www/pyload/work/stage/usr/local/etc/rc.d/pyload /etc/rc.d/pyload'
 

xaibex

Patron
Joined
Mar 19, 2013
Messages
340
Thank you ClassicGOD for your great Step by Step Guide. And thank you ernie-t for your Addition.

I would like to add something too.

For keeping it simple to track changes i will post the whole step by step guide. My Additions are marked as Blue Text.

1. Login into your Freenas go to Jails and click 'Add Jails'
2. Click 'Advanced Mode'; Put in jail name; make note of the IP address; put in 'IPv4 default gateway'; make sure 'autostart' is enabled; 'type' is standard; 'VIMAGE', 'NAT' and '32Bit' are disabled and 'vanilla' is enabled and click OK
3. Use any terminal (Putty on Win, Terminal on OSX etc) to login with SSH to your NAS (SSH has to be enabled in services) as root or use the 'Shell' from the GUI.
4. Type in 'jls' (without quotes) and make note of JID of your jail
5. Type in 'jexec # csh' (where # is the JID of your jail)
6. Once in the jail type in 'portsnap fetch extract' (it'll take a while to finish)
7. 'cd /usr/ports/devel/git'
8. 'make install clean'
9. During the compilation it will ask you for the configuration of required packages - leave everything as is but make sure that when it asks for CURL you select Cookies support - it's disabled by default. (use arrows to move and space to check and uncheck the fields, enter to continue)
10. 'cd /usr/ports/www'
11. 'git clone https://github.com/mrhanky17/pyload-freebsd.git pyload'
12. 'cd pyload/'
13. 'make install clean' (you'll get the [install] Error code 1 at the end, ignore it)
14. 'pyload'
15. go through the setup
16. 'echo 'pyload_enable="YES"' >> /etc/rc.conf'
17. 'echo 'pyload_flags="--daemon"' >> /etc/rc.conf'
18. 'echo 'pyload_pid="/var/run/pyload.pid" ' >> /etc/rc.conf'
19. 'echo 'pyload_config="/root/pyload"' >> /etc/rc.conf' Note that this is the config Path you choose in the pyload Setup (Step 14-15). If you don't changed the Path its '/root/pyload'.
20. 'ln -s /usr/ports/www/pyload/work/stage/usr/local/etc/rc.d/pyload /etc/rc.d/pyload'
21. 'service pyload start'
22. pyload should run and you should have access to it through web interface with IP you saw in step 2. http://IP:8000/
 

ClassicGOD

Contributor
Joined
Jul 28, 2011
Messages
145
Hi, I didn't have time to check on this thread recently but I see you managed to solve it. Thanks, It will come in handy if I will have to recreate my pyLoad jail :)
 

nikro

Dabbler
Joined
Mar 6, 2012
Messages
11
Hello
thanks a lot for your work, it seems interesting !

I'm running Freenas 9.1.1
I tried to follow your tutorial but I got an error at step 9. on the GUI shell (see below), I've tried to continue thru the process but after that step 11. send me git: command not found.

Could you help me having it working? Thanks in advance
===> Generating temporary packing list ===> Checking if devel/git already installed ===> Creating users and/or groups. Syntax error: ";" unexpected *** [create-users-groups] Error code 2 Stop in /usr/ports/devel/git. *** [install] Error code 1 Stop in /usr/ports/devel/git.
 

ClassicGOD

Contributor
Joined
Jul 28, 2011
Messages
145
What error did you get at step 9? Make sure you didn't make any error in steps before that.
 

nikro

Dabbler
Joined
Mar 6, 2012
Messages
11
Hi,
I did it once again and it works!!!

It is just amazing guys!! thanks a lot for your incredible work!!!
Life gets easier, thanks to guys like you!
 

nikro

Dabbler
Joined
Mar 6, 2012
Messages
11
Sorry I'm really a newbee but I can download files but I don't know how to find them afterwords...
I've try to make a share of my path: /mnt/NAS/jails/pyload/root/pyload/Downloads
But my mac can't see it, I don't know what to check!?
Do you have an idea to help?
tks a lot
 

ClassicGOD

Contributor
Joined
Jul 28, 2011
Messages
145
1. Type in 'jexec # csh' (where # is the JID of your jail)
2. mkdir /mnt/Downloads
3. chmod 777 /mnt/Downloads
4. Now in your FreeNAS Admin interface go to 'Add Storage' in your jail and create storage with the source of a folder on your Volume and destination of /mnt/Downloads
5. in pyLoad web interface go to Config Menu>General and in Download Folder put /mnt/Downloads

now pyLoad Downloads should be available in the folder on your Volume you pointed in Source in step 4.
 
Joined
Dec 6, 2013
Messages
4
Hello, thank you for all the work you've done.
I'm running freenas 9.1.1 release
I completed the installation but I can't start pyload. When I type 'pyload service start', I have the following message :
/etc/rc.d/pyload: WARNING: /root/pyload/pyload.conf is not readable
/etc/rc.d/pyload: WARNING: /root/pyload/pyload.conf is not readable
Have you got any idea to solve this problem?
Thanks
 
Joined
Dec 6, 2013
Messages
4
I finally found how to make it run. I typed 'pyload start' instead of 'service pyload start'. Thanks

Envoyé depuis mon LG-P500 avec Tapatalk
 
Joined
Dec 6, 2013
Messages
4
Hi, everything works fine for me but I don't know how to access the pyload gui from another computer on another network. I forwarded the port 7227 to the ip address of my jail in my box but it doesn't work.
Can you help me please?

Envoyé depuis mon LG-P500 avec Tapatalk
 

nchantmnt

Cadet
Joined
Dec 18, 2013
Messages
2
Hello. I am running FreeNAS-9.1.1-RELEASE-x64.
I was able to follow the setup until step 13 which ended with install error 1 like you said.
Code:
***
[pre-build] Error code 1
 
Stop in /usr/ports/graphics/netpbm.
*** [install] Error code 1
 
Stop in /usr/ports/graphics/netpbm.
*** [lib-depends] Error code 1
 
Stop in /usr/ports/graphics/gocr.
*** [install] Error code 1
 
Stop in /usr/ports/graphics/gocr.
*** [run-depends] Error code 1
 
Stop in /usr/ports/www/pyload.
*** [install] Error code 1


If i try to start pyload setup it say command not found. Any ideas would be great.
 
Top