GIT branch of plugin

Status
Not open for further replies.

Messlow

Dabbler
Joined
Jan 12, 2015
Messages
10
Hi all,
After searching for some time, I can't find any clear answer to my question. I'm running freeNAS 9.3, and was wondering if ts it possible to update an installed plugin with a git repo from a different user? Perhaps something like a GIT_PATH field in a config.ini?

I don't think that's possible though, since if I understand correctly, the plugins update are not directly related to the git repo, but to the pbi, right? In this case, would it be possible to overwrite the installation folder with the installation folder of the wantes git user? For example, doing a "git clone github/... /usr/pbi/plugin/share/plugin"? I've tried that already, but it seems like I've still some files left of the previous repo, maybe in /var/db...
I guess another solution would be to start from a clean new jail, and grabbing every lib needed, and then the git repo.

I'm totally new to FreeNAS btw, installed it less than a week ago, so please be forgiving if I'm just being stupid!!
Anyway, thank you for your time!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi all,
After searching for some time, I can't find any clear answer to my question. I'm running freeNAS 9.3, and was wondering if ts it possible to update an installed plugin with a git repo from a different user? Perhaps something like a GIT_PATH field in a config.ini?

I don't think that's possible though, since if I understand correctly, the plugins update are not directly related to the git repo, but to the pbi, right? In this case, would it be possible to overwrite the installation folder with the installation folder of the wantes git user? For example, doing a "git clone github/... /usr/pbi/plugin/share/plugin"? I've tried that already, but it seems like I've still some files left of the previous repo, maybe in /var/db...
I guess another solution would be to start from a clean new jail, and grabbing every lib needed, and then the git repo.

I'm totally new to FreeNAS btw, installed it less than a week ago, so please be forgiving if I'm just being stupid!!
Anyway, thank you for your time!
depends on the plugin. alot the Python ones I authored can be modified to use different source, you'd basically be just using the plugin for the easy start/stop mechanism.
 

Messlow

Dabbler
Joined
Jan 12, 2015
Messages
10
So basically, you're saying that if the author is allowing the use of a different source (as you do in your sources), there should be a GIT_PATH-like variable in a config file, right? I'll have a deeper look at the different config files to try and find such a variable, even though I've already given that a quick look. I'm gonna try to contact directly the source author if I can't find this by myself, in case they didn't allow a change of source.
And yes, the objective would be to facilitate the installation and the use of the plugin. I find it easier indeed to just install the plugin through FreeNAS web UI, and then simply edit a config file, rather than installing the whole source and the required libs from scratch. Plus this allows the easy start/stop mechanism as you pointed.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
So basically, you're saying that if the author is allowing the use of a different source (as you do in your sources), there should be a GIT_PATH-like variable in a config file, right? I'll have a deeper look at the different config files to try and find such a variable, even though I've already given that a quick look. I'm gonna try to contact directly the source author if I can't find this by myself, in case they didn't allow a change of source.
And yes, the objective would be to facilitate the installation and the use of the plugin. I find it easier indeed to just install the plugin through FreeNAS web UI, and then simply edit a config file, rather than installing the whole source and the required libs from scratch. Plus this allows the easy start/stop mechanism as you pointed.
not exactly. I'm just saying you replace the source for many of the programs and it will work with that new branch. give me the program and branch and I can give you the command needed.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
ignore
 

Messlow

Dabbler
Joined
Jan 12, 2015
Messages
10
Thank you for your time.
I meant a different "fork" instead of "branch", sorry for the confusion... I guess that changes quite a lot of thing !! Here is the fork I'm trying to install in place of the headphones default one : https://github.com/sarakha63/headphones
I'm trying to install it in a new jail from scratch right now, I'll report here if I pulled it off or not !
 

Messlow

Dabbler
Joined
Jan 12, 2015
Messages
10
Well installed it in an empty jail, works like a charm, too bad for the easy start/stop service, I'll manage without it. Thanks anyway !
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Well installed it in an empty jail, works like a charm, too bad for the easy start/stop service, I'll manage without it. Thanks anyway !
you can modify the HP plugin to use whatever fork/branch you want.
Code:
pkg install git
service headphones onestop
rm -r /usr/pbi/headphones-amd64/share/headphones/headphones /var/db/headphones/*
git clone git://github.com/sarakha63/headphones /usr/pbi/headphones-amd64/share/headphones/headphones
chown -R media:media /usr/pbi/headphones-amd64/share/headphones/headphones
service headphones start
 
Last edited:

Messlow

Dabbler
Joined
Jan 12, 2015
Messages
10
That's what i tried, but I kept getting some problems (service not starting, or other errors). Perhaps because installing a plugin creates a local git repo or something, or some config files stored elsewhere than /usr/pbi/headphones-amd64/share/headphones/?
Anyway, it was simpler to start from an empty new jail. Plus it taught me a bit about daemons, users, ...
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
That's what i tried, but I kept getting some problems (service not starting, or other errors). Perhaps because installing a plugin creates a local git repo or something, or some config files stored elsewhere than /usr/pbi/headphones-amd64/share/headphones/?
Anyway, it was simpler to start from an empty new jail. Plus it taught me a bit about daemons, users, ...
this plugin does not use git. it uses the source method of installing and updating.

maybe the configs/databases are incopatible. for the plugin they are stored in /var/db/headphones
I added a step to the instructions I posted incase that was the issue and people want to try this.
 

Messlow

Dabbler
Joined
Jan 12, 2015
Messages
10
maybe the configs/databases are incopatible. for the plugin they are stored in /var/db/headphones
My thoughts exactly. Tried to remove and replace the installation dir with custom ones from gits for different plugins (couchpotato, sickbeard and headphones), but to no avail. I had errors (or wrong behaviours) in each case.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
the steps I listed above should work. I just didn't have the step to clean the /var/db/PLUGIN/* directories earlier.

I didn't know there were forks of CP and headphones. any advantages? why don't they just contribute to the upstream project?
 

Messlow

Dabbler
Joined
Jan 12, 2015
Messages
10
The main advantage is the addition of other torrent trackers, especially t411 (a french tracker, but contains tons of torrents, especially for music). Plus it allows easier search for french movies/music. Basically, it's a must-have if you're french or if you like french movies/music. Or if you want rare torrents.
For CP, Ruudburger refused to add any language-specific tracker into his git, but instead invited the trackers' administrators to make their own custom plugins to add to CP. However, no custom plugins exist yet for those trackers. That's why there was a need for a fork (to my understanding, but I may be wrong). But I think it's getting quite far behind now, even though it's still being updated continuously.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
The main advantage is the addition of other torrent trackers, especially t411 (a french tracker, but contains tons of torrents, especially for music). Plus it allows easier search for french movies/music. Basically, it's a must-have if you're french or if you like french movies/music. Or if you want rare torrents.
For CP, Ruudburger refused to add any language-specific tracker into his git, but instead invited the trackers' administrators to make their own custom plugins to add to CP. However, no custom plugins exist yet for those trackers. That's why there was a need for a fork (to my understanding, but I may be wrong). But I think it's getting quite far behind now, even though it's still being updated continuously.
ahh, I see. well glad you got it working
 
Status
Not open for further replies.
Top