Page MenuHomeFreeBSD

net-p2p/qbittorrent: Add rc.d support for nox flavor

Authored by on Jan 11 2019, 12:18 AM.



Add rc.d script for headless operation for nox flavor
Claim UID and GID 850

net-p2p/transmission-cli/files/ used as template

Test Plan

Tested on FreeBSD 12.0

Diff Detail

rP FreeBSD ports repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

yuri added inline comments.Jan 11 2019, 12:41 AM
33 ↗(On Diff #52753)

/usr/local should be based on the $PREFIX variable in all places.

33 ↗(On Diff #52753)

Thanks for the quick review however I don't understand your intention with the change as $PREFIX is an empty variable?
This change also seems inconsistent with a handful of other ports I looked at which use a full path.

Best regards

yuri added inline comments.Jan 11 2019, 7:54 AM
33 ↗(On Diff #52753)

Intention: it should be installable into any prefix, not only /usr/local.

Please see audio/oss/files/ for an example.

Use %%PREFIX%% as suggested by maintainer marked 2 inline comments as done.Jan 11 2019, 9:44 AM added inline comments.
33 ↗(On Diff #52753)

I see, thanks for the pointers. marked an inline comment as done.Jan 11 2019, 10:03 AM
mat added inline comments.Jan 11 2019, 11:04 AM
36 ↗(On Diff #52762)

Why different handling for this variable?

36 ↗(On Diff #52762)

I'm not very familiar with rc.d scripting and it's the same method transmission-cli uses. If you have a better solution please point me to a good example as I'm trying to learn.

Adjust group variable as suggested by mat
Fix typo in variable description for rc.d script
Change qbittorrent_ variables to = and use quotes where it makes sense
Remove extra_command marked an inline comment as done.Jan 12 2019, 2:09 PM added inline comments.
36 ↗(On Diff #52762)

Looks ok now? @mat

mat added inline comments.Jan 14 2019, 1:35 PM
34–35 ↗(On Diff #52793)

While putting a home directory in etc feels between strange and wrong, putting a directory where you download things into is clearly a very bad idea.

From hier(7):

/etc/      system configuration files and scripts
34–35 ↗(On Diff #52793)

While I agree that's pretty much where all clients saves their config, "session files etc" by default. We could override that but I'm not sure how much we want to diverge from default settings and not all paths are configurable via switches . I'm not sure if having a buch of "dummy" directories in /home is a better choice.

Perhaps a better idea would be to require the user to provide a download dir and lease the rest as is?

yuri added inline comments.Jan 14 2019, 4:13 PM
34–35 ↗(On Diff #52793)

Default the download directory to /var/db/qbittorrent-nox. Install this directory by the port with the right permissions. Otherwise, this user doesn't need the home directory.

34–35 ↗(On Diff #52793)

Sorry for the late reply, you mean like this example?

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
yuri added a comment.Jan 27 2019, 4:29 AM

Thank you for your submission, Daniel!