-
-
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
Upgrade cops 1.0.1 => 1.1.3 + DSM 7 #5192
Conversation
d1a193b
to
060d6d0
Compare
There is an open question regarding the beta flag: personally I would flag it as non beta on DSM 7 since the PHP configuration is really native. But then that's just me :) |
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.
LGTM and indeed, the beta flag probably can be removed along with updating #4524
spk/cops/src/service-setup.sh
Outdated
if [ "${BUILDNUMBER}" -ge "4458" ]; then | ||
# DSM5+ | ||
# Set permissions on directory structure | ||
set_syno_permissions "${wizard_calibre_dir}" | ||
# Set permissions on metadata.db | ||
if [ ! "`synoacltool -get "${wizard_calibre_dir}/metadata.db"| grep "group:${SC_GROUP}:allow:rwxpdDaARWc."`" ]; then | ||
synoacltool -add "${wizard_calibre_dir}/metadata.db" "group:${SC_GROUP}:allow:rwxpdDaARWc:----" > /dev/null 2>&1 | ||
fi | ||
else | ||
#DSM4 | ||
chown ${USER} ${wizard_calibre_dir:=/volume1/calibre/} | ||
chmod u+rw ${wizard_calibre_dir:=/volume1/calibre/} | ||
chown ${USER} ${wizard_calibre_dir:=/volume1/calibre/}/metadata.db | ||
chmod u+rw ${wizard_calibre_dir:=/volume1/calibre/}/metadata.db |
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 this still relevant?
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.
Good point. Given the comment I guess it can be removed safely.
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.
So I removed everything which sounded like DSM 4 specifics.
The only thing is that I don't own a DSM 6 to validate it still works on those :/
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 got one, let me know the specifics you'd need testing on and I'll check it out.
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.
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.
Actually it's supposed to be the path to an existing calibre directory...
I haven't noticed if this was clearly mentionned. Couldn't it generate an "empty" db file in case it's non-existant? On the other hand, I don't know exactly what this app is for nor how to use it so take this comment with a grain of salt.
The idea of this app is to come as a companion to an existing calibre installation which would be handling the writing and organizing part. cops is "merely" a browser component which integrates smoothly with web browsers and is compliant with other ebook readers (for example Kobo ones, and it happens I use one :) ).
I believe we could generate an empty DB but I'm not sure of the added value here (nor that it would be maintainable). Will be checking.
Otherwise, if you want me to test that out could you provide me with an default db file that I could confirm testing with on DSM6? Perhaps that "empty" db file could actually be provided with the package... just a thought.
That's for sure. I'll attach one to the PR right away.
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.
Did a git pull and rebuilt the package and extracted your zip into /volume1
:
root@th0ma7-nas:/volume1# ll -R calibre/
calibre/:
total 352
d---------+ 1 th0ma7 1000 80 May 1 10:25 .
drwxr-xr-x 1 root root 1054 May 1 15:53 ..
----------+ 1 th0ma7 1000 348160 May 1 10:25 metadata.db
-rw-r--r-- 1 th0ma7 1000 11977 May 1 10:25 metadata_db_prefs_backup.json
It's nice to mention which PHP extensions are needed but having a URL to point for help would be beneficial as otherwise the user will ask himself : am I missing something? We could probably create a WebStation wiki page on our spksrc github and include our finding for creating packages and al (just a thought).
Additionally, perhaps you should include an additional SPK_DEPENDS
for php?
An error occured while changing permissions:
2022/05/01 15:58:31 ===> Step postinst. USER=http GROUP= SHARE_PATH=
2022/05/01 15:58:31 Begin save_wizard_variables
2022/05/01 15:58:31 End save_wizard_variables
2022/05/01 15:58:31 Begin service_postinst
2022/05/01 15:58:31 ACL version: 1
2022/05/01 15:58:31 Archive: has_ACL,is_support_ACL
2022/05/01 15:58:31 Owner: [th0ma7(user)]
2022/05/01 15:58:31 ---------------------
2022/05/01 15:58:31 [0] group:administrators:allow:rwxpdDaARWc--:fd-- (level:0)
2022/05/01 15:58:31 Granting '' group permissions on /volume1/calibre
2022/05/01 15:58:31 (synoacltool.c, 125)No such Group
2022/05/01 15:58:31 Granting '' group basic permissions on /volume1/calibre
2022/05/01 15:58:31 (synoacltool.c, 125)No such Group
2022/05/01 15:58:32 End service_postinst
2022/05/01 15:58:32 install cops 1.1.3-6 End postinst ret=[0]
2022/05/01 15:58:32 install cops 1.1.3-6 Begin /bin/rm -rf /volume1/@tmp/pkginstall
2022/05/01 15:58:32 install cops 1.1.3-6 End /bin/rm -rf /volume1/@tmp/pkginstall ret=[0]
2022/05/01 15:58:36 install cops 1.1.3-6 Begin start-stop-status start
2022/05/01 15:58:36 install cops 1.1.3-6 End start-stop-status start ret=[0]
This leads to the same output as previously (e.g. Database error
) as it can't find the db file, and I assume that's the reason why.
EDIT: I now wonder, perhaps I should have created the folder first through the web interface and grant ACL on it then extract the DB in the directory? ... humm. Will revisit later.
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.
Re-tested but this time I made sure to create a /volume1/calibre
folder using the GUI and that ACL was enabled. Errors are now different which makes me think you would be better off adding a warning that ACL must be turned on.
Errors:
2022/05/03 10:05:24 ===> Step postinst. USER=http GROUP= SHARE_PATH=
2022/05/03 10:05:24 Begin save_wizard_variables
2022/05/03 10:05:24 End save_wizard_variables
2022/05/03 10:05:24 Begin service_postinst
2022/05/03 10:05:24 Granting '' group permissions on /volume1/calibre
2022/05/03 10:05:24 (synoacltool.c, 125)No such Group
2022/05/03 10:05:24 Granting '' group basic permissions on /volume1/calibre
2022/05/03 10:05:24 (synoacltool.c, 125)No such Group
2022/05/03 10:05:24 End service_postins
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.
Actualy this is related to another issue (which I will be fixing).
But agree on the permissions message to add !
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.
Added permissions related message + fixed the GROUP logic to not have the failures reported
Attaching an "empty" library folder: |
0d1012e
to
8cd8cc5
Compare
Rebased @ head. |
@smaarn cycles have been limited lately. Is there a need for another review before merging or where you good to go? |
@th0ma7 thanks for circling back, and no worries I had no cycles available lately so can't complain :D Actually an extra review could be appreciated regarding the pseudo fragment mechanism used for the wizards (basically they are brutally concatenated). Since it can be seen as pretty ugly just wanted to know if it was ok. |
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.
LGTM
@smaarn Let me give it a shot on some of my NAS over the week-end to confirm it works all-right. Now I need to find back the metadata :) BTW, I see you have a really good handle on WebStation type packages. Perhaps you could help me out to make rutorrent compatible on DSM7 part of your free-time? I could then update it to the latest version. |
@smaarn as you use a resource worker to define a package specific php profile with the required extensions enabled, what is the wizard page for, that tells to activate php extensions? BTW: resource worker works with DSM 6 and DSM 7. |
@hgy59 I'm not sure I'm understanding what you mean. The resource worker doesn't require in itself any wizard page, it's basically replacing what you can configure through Web Station and PHP profiles (which is documented in the installation wizard of DSM 6 on how to do it manually), was it your question ? Unfortunately the web resource worker don't work in DSM 6 from what I recall. |
Thanks for your help ! I'll try having a look at rutorrent but it may prove to be a little bit more complex since it requires a set of authorization mechanisms which I'm not totally operational with (basically some folders need to be both writable for the web part and the non web part... I remember last time I played with it it was kind of a nightmare :) ). Things are going a little bit more quiet over here so I may have some cycles over the coming weeks to check it. |
8cd8cc5
to
8e35e5f
Compare
* Add explicit wizard message regarding DSM permissions * Add explicit wizard message regarding directory and library structure requirements * Removal of DSM 4 specificities (???) * Migrated to SERVICE_SETUP
8e35e5f
to
cfa0b75
Compare
Squashing all the commits after rebase at head in order to be able to merge by EOD (CET time) if everything goes fine. |
@hgy59, I was trying to publish some packages that were previously merged. I noted that for the |
expected versions in INFO file
This is correct with my scripts to build and publish noarch packages make_all_noarch.sh #!/bin/bash
# make all noarch packages
echo ""
echo "===> MAKE noarch (default = DSM 3.1) <==="
make
echo ""
echo "===> MAKE noarch for SRM 1.1 <==="
make TCVERSION=1.1
echo ""
echo "===> MAKE noarch for DSM 6.1 <==="
make TCVERSION=6.1
echo ""
echo "===> MAKE noarch for DSM 7.0 <==="
make TCVERSION=7.0
echo "" publish_all_noarch.sh #!/bin/bash
# publish all noarch packages
echo ""
echo "===> PUBLISH noarch (default = DSM 3.1) <==="
make publish
echo ""
echo "===> PUBLISH noarch for SRM 1.1 <==="
make publish TCVERSION=1.1
echo ""
echo "===> PUBLISH noarch for DSM 6.1 <==="
make publish TCVERSION=6.1
echo ""
echo "===> PUBLISH noarch for DSM 7.0 <==="
make publish TCVERSION=7.0
echo "" |
@mreid-tt I have deleted the two packages of cops 1.1.3 now, so you can restart the deployment. |
hmm, recall I don't have a local build instance and only publish via GitHub. Would a possible solution be to update the matrix in this line: spksrc/.github/workflows/build.yml Line 84 in c817629
Perhaps changing |
@mreid-tt indeed it was the 6.0 vs 6.1 version
building with TCVERSION=6.0 creates the same package as without TCVERSION (i.e. the same as it is now fixed on head on master branch. |
Thanks so much for this @hgy59, thanks for merging the fix into the master branch.
I was able to run a new job and all builds completed successfully. The package has now been published. |
Description
Two objectives:
Checklist
all-supported
completed successfullyType of change
Binaries are available here: https://github.com/smaarn/spksrc/releases/tag/cops-1.1.3-rc-2