-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update Jackett to v0.8.490 and to use generic DSM 5+6 services #3070
Conversation
@kaso17 As to your hints / notes in #3032:
Edit: I have cherry-picked your commits from PR #3032 . As soon as #3032 is merged, I will drop them from my PR here... |
newly installed jackett package for rtd1296 from @Safihre repo will not start. it was starting fine yesterday and updated. but now it wont start. not sure if there was a jackett update yesterday that broke it |
Not related to this PR or spksrc development. Therefore, please report this in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m4tt075 May you please review related issues I have listed and apply minor changes I proposed
spk/jackett/Makefile
Outdated
MAINTAINER = SynoCommunity | ||
DESCRIPTION = "Jackett works as a proxy server: it translates queries from apps into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps." | ||
ADMIN_PORT = 9117 | ||
MAINTAINER = 'kaso17 (Jackett), m4tt075 (spksrc integration)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if spkrepo
will accept packages with such maintainer. As far as I understood/remember, it has to match a user account registered in registry
|
||
INSTALL_PREFIX = /usr/local/$(SPK_NAME) | ||
# Admin link | ||
ADMIN_PORT = $(SERVICE_PORT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it relevant to consider SERVICE_PORT as ADMIN_PORT ? Probably not, but I prefer to keep it for "backward compatibility"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, not sure I understand. Do you want me to remove the comment and the ADMIN_PORT definition or do you want me to keep it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends if link generated in package view is really usable (often http://ip:ADMIN_PORT/
) whereas SERVICE_PORT
is used to provide application link in app/config
which allows finer settings like https
and context path in url.
So if "admin link" in package view is not usable as-is, please remove it. If it works, let it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is usable and works correctly, so I kept it.
spk/jackett/src/service-setup.sh
Outdated
COMMAND="env HOME=${HOME_DIR} PATH=${PATH} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${MONO} --debug ${JACKETT} --PIDFile ${PID_FILE}" | ||
|
||
if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 6 ]; then | ||
su ${EFF_USER} -s /bin/sh -c "cd ${SYNOPKG_PKGDEST}; ${COMMAND}" >> ${LOG_FILE} 2>&1 & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really needed to change process working directory to SYNOPKG_PKGDEST ? (I did it on demoservice
to browse files...)
I think HOME_DIR may be more relevant, and it is already done by su
spk/jackett/src/service-setup.sh
Outdated
HOME_DIR="${SYNOPKG_PKGDEST}/var" | ||
|
||
echo "Starting Jackett as user ${EFF_USER}" >> ${LOG_FILE} | ||
COMMAND="env HOME=${HOME_DIR} PATH=${PATH} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${MONO} --debug ${JACKETT} --PIDFile ${PID_FILE}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is --debug
flag really relevant ?
spk/jackett/src/service-setup.sh
Outdated
fi | ||
} | ||
|
||
service_preinst () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please discard all other hook functions with only logging... I only wrote them for demo, I consider them not relevant for a package
@ymartin59 Thanks for your review. I have addressed your comments, except the ADMIN_PORT one (see my question above). Will drop and squash once #3032 and #3064 are merged. |
@m4tt075 thank you for taking care of this. EDIT: sorry, didn't see that you tested the update mechanism. I don't see any obvious issues. |
@kaso17 All fine. Thanks for reviewing... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still some details but soon ready to go
spk/jackett/src/service-setup.sh
Outdated
if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 6 ]; then | ||
su ${EFF_USER} -s /bin/sh -c "${COMMAND}" >> ${LOG_FILE} 2>&1 & | ||
else | ||
cd ${SYNOPKG_PKGDEST} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You removed "cd" in COMMAND
for DSM 5 and so it should be removed here for DSM 6 too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
|
||
INSTALL_PREFIX = /usr/local/$(SPK_NAME) | ||
# Admin link | ||
ADMIN_PORT = $(SERVICE_PORT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends if link generated in package view is really usable (often http://ip:ADMIN_PORT/
) whereas SERVICE_PORT
is used to provide application link in app/config
which allows finer settings like https
and context path in url.
So if "admin link" in package view is not usable as-is, please remove it. If it works, let it there.
f44fc9c
to
0550633
Compare
@ymartin59 I have addressed your latest comments. Anything else? |
When can we see an update pls? @m4tt075 |
0550633
to
835ef61
Compare
@ymartin59 @kaso17 Following up with your recent comments in #3032, I have...
Should be ready to go now... |
Marvelous. Merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After @Safihre feedback with other packages, I have still some "improvements" to propose
{ | ||
# Replace generic service startup | ||
|
||
MONO_PATH="${SYNOPKG_PKGDEST}/../mono/bin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad idea... Prefer to use /usr/local/mono/bin
echo "Starting Jackett as user ${EFF_USER}" >> ${LOG_FILE} | ||
COMMAND="env HOME=${HOME_DIR} PATH=${PATH} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${MONO} ${JACKETT} --PIDFile ${PID_FILE}" | ||
|
||
if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 6 ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These if statements are same as generic script.
I think moving all variables settings out of service_prestart
(so removing this function) and provide SERVICE_COMMAND
at the begging of this script should work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No that won't work because the process never detaches: no &
at the end when using SERVICE_COMMAND
for processes that don't support deamon.
So DSM will stay in a constant state of Starting
since the start
never returns (since iets running the actual application).
That's why we need this special function. Or integrated in generic approach :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL Just came here to write the same! Agree with @Safihre . This is another candidate for the start-stop-daemon
approach. I propose to keep this package as is for the time being and update once that approach is established...
@ymartin59 This has been merged 6 weeks ago. Anything preventing this from being published? |
@m4tt075 Yes... Mono update. The fix I designed to relocate |
Having just pulled in Mono, and just wanted to pull in Jackett, it fails to upgrade from 0.7.1483-4 to the latest. Complains about corrupt package? |
@jdeluyck Could you restart your NAS and try again? |
@Safihre I'm using a DS916+. |
Hum hum. Corrupt package ? It remembers me trouble with signing process in repository... I have already fixed it (and there was no issue with recent published packages like mono, ffmpeg...) so probably there is a specific failure with Jackett. I am investigating.... |
@jdeluyck As an immediate work-around, open Package Center "Settings" and select "Any publishers" in Trust Level section... sorry for the inconvenience |
Simple re-publish is not fixing it? I indeed also see this error.. |
@ymartin59 that indeed works. So the package is ok, signing is borked. |
Motivation
Contains @kaso17 's Jackett updates and fixes of #3032 and adapts the package to use generic DSM 5+6 services
Linked issues
#3015, #2986, #2881, #1995, Jackett/Jackett#1985, Jackett/Jackett#2217
Notes
Depends on merging of @kaso 's Jackett update PR jackett: update to v0.8.490 #3032.Squashed into this PR on request of @ymartin59 and with agreement of @kaso17Depends on merging of Changes to Generic service #3064. Do NOT merge without it or old configurations will be overwritten on upgrades.Changes to Generic service #3064 merged in the meantime.Further testing needed.Outdated.Checklist
all-supported
completed successfully onXPE 5.2
andXPE 6.1
systems.