Created attachment 253363 [details] New Port py-calibreweb 0.6.23 New port for the Calibre-Web Application (https://github.com/janeczku/calibre-web). This port includes two patches; one for adding the binary locations on FreeBSD and the other for addressing an upstream bug that I found when converting books (https://github.com/janeczku/calibre-web/issues/3143). In addition, several ports were also created to support the optional features in Calibre-Web. www/py-calibreweb www/py-comicapi [Support Comic Metadata APIs] textproc/py-text2digits textproc/py-wordninja www/py-Goodreads [Support Goodreads API] www/py-flask-simpleldap [LDAP] archivers/py-py7zr [Support Metadata Extraction from Archive Files] archivers/py-inflate64 [RUN DEPEND] archivers/py-multivolumefile [RUN DEPEND] archivers/py-pybcj [RUN DEPEND] archivers/py-pyppmd [RUN DEPEND] www/py-scholarly [Support Google Scholar API] www/py-free-proxy [RUN DEPEND] www/py-flask-dance [OAUTH Support] www/py-flask-sphinx-themes [DOCS BUILD DEPEND] textproc/py-sphinxcontrib-seqdiag [DOCS BUILD DEPEND] textproc/py-sphinxcontrib-spelling [DOCS BUILD DEPEND]
Created attachment 255227 [details] New Port py-calibreweb 0.6.24
Hello Matthew Ideally we have a PR for every port that is added. Do you think you can make this happen, you can link other PR's to this PR than as dependent? If not I'll try to split up the patch in different commits and all link them to this PR, which is not ideal ... :-)
(In reply to Dries Michiels from comment #2) Yes I can do that. It will take a bit. Should I open a bug for each Port?
Yes please, this way I can tackle every added port one by one and give feedback if any one by one. You can tag me in all the PR's. I'll take care of the commits.
Created attachment 255282 [details] New Port py-calibreweb 0.6.24 v2
(In reply to Dries Michiels from comment #4) Created the following Bugs archivers/py-py7zr [bug #282838] archivers/py-inflate64 [bug #282834] archivers/py-multivolumefile [bug #282835] archivers/py-pybcj [bug #282836] archivers/py-pyppmd [bug #282837] www/py-comicapi [bug #282841] textproc/py-text2digits [bug #282839] textproc/py-wordninja [bug #282840] www/py-flask-dance [bug #282844] textproc/py-sphinxcontrib-spelling [bug #282842] www/py-flask-sphinx-themes [bug #282843] www/py-scholarly [bug #282846] www/py-free-proxy [bug #282845] www/py-pydrive2 [bug #282847] www/py-Goodreads [bug #282848] www/py-flask-simpleldap [bug #282849]
Created attachment 255293 [details] New Port py-calibreweb 0.6.24 v3
Created attachment 255294 [details] New Port py-calibreweb 0.6.24 v3
Created attachment 255303 [details] New Port py-calibreweb 0.6.24 v4
Created attachment 255316 [details] New Port py-calibreweb 0.6.24 v5
Is the patch regarding unrar location something we can upstream?
Basically this whole patch; patch-src_calibreweb_cps_config__sql.py
(In reply to Dries Michiels from comment #11) (In reply to Dries Michiels from comment #12) Well, we can try. https://github.com/janeczku/calibre-web/pull/3240
(In reply to Matthew Wener from comment #13) Change was merged. Patch can be removed in the next release.
Created attachment 255407 [details] New Port py-calibreweb 0.6.24 v6 Add PATCH from Github
Created attachment 255415 [details] New Port py-calibreweb 0.6.24 v7 Fixes the patch.
Created attachment 255416 [details] New Port py-calibreweb 0.6.24 v8 Remove the *.orig post patch.
Created attachment 255434 [details] New Port py-calibreweb 0.6.24 v9
Hello Matthew, I'm trying to get the daemon to start but it fails silently instantly. I think I'm also missing some extra steps for new users to install the package. Where do they define the location of the calibre database? And if the calibre option is unchecked, maybe the port can install an empty metadata.db? I also miss the location to be configured in the script? Or it is by defualt in /usr/local/share. https://github.com/janeczku/calibre-web/tree/master/library rcname_flags should not be added in the individual rc scripts of daemons. this is taken care of by the framework. Every rc.script has this option to add flags the the end of the full start command. By defining it in the rc script itself, the options are appended twice.
I was also noticing that sqlalcehmy tools by default is build against sqla1.4.*.(LDAP dependency) The port is build using by default sqlal2.0.*, I think maybe we need an SQLA20_PREVENTS= LDAP, if users toggle the LDAP option the dependency chain has issues.
Created attachment 255546 [details] New Port py-calibreweb 0.6.24 v10 (In reply to Dries Michiels from comment #20) Updated apscheduler->APScheduler due to port rename. Added LDAP_PREVENTS. (In reply to Dries Michiels from comment #19) Removed rcname_flags Also, I'm running a clean build to see what could be wrong with the script. It should take a few hours to finish building all the dependencies. As for the location of the calibre db location, it gets set in the web interface the first time the application is run.
Created attachment 255553 [details] New Port py-calibreweb 0.6.24 v11 Fix Unterminated quoted string
(In reply to Dries Michiels from comment #19) Can you retry with the latest patch? I couldn't replicate the issue on clean install. The service starts correctly for me, and I am able to reach the web server at <IP Address>:8083. The log should be in /var/log/calibreweb/calibreweb.log
Ok I got it to start, good. Are the allocations at the start done on purpose (distinction between =, or :=)? : ${%%RC_NAME%%_enable:=NO} : ${%%RC_NAME%%_user:=%%USER%%} : ${%%RC_NAME%%_group:=%%GROUP%%} : ${%%RC_NAME%%_ip_addr="0.0.0.0"} : ${%%RC_NAME%%_conf_dir="%%DATADIR%%"} : ${%%RC_NAME%%_settings="${%%RC_NAME%%_conf_dir}/app.db"} : ${%%RC_NAME%%_gdrive="${%%RC_NAME%%_conf_dir}/gdrive.db"} : ${%%RC_NAME%%_pid:="%%PORTNAME%%.pid"} : ${%%RC_NAME%%_pid_dir:="/var/run/%%PORTNAME%%"} : ${%%RC_NAME%%_log:="%%PORTNAME%%.log"} : ${%%RC_NAME%%_log_dir:="/var/log/%%PORTNAME%%"} Is there a reason we are not just referencing the variables above? Or declaring everything above and then use only variables in command_args? command_args="-p $pidfile $procname \ ${%%RC_NAME%%_ip_addr:+-i ${%%RC_NAME%%_ip_addr}} \ ${%%RC_NAME%%_settings:+-p ${%%RC_NAME%%_settings}} \ ${%%RC_NAME%%_gdrive:+-g ${%%RC_NAME%%_gdrive}} \ ${%%RC_NAME%%_cert:+-c ${%%RC_NAME%%_cert}} \ ${%%RC_NAME%%_key:+-k ${%%RC_NAME%%_key}} \ ${logfile:+-o $logfile}" Something like this; could work if you define them above command_args="-p $pidfile $procname \ -i ${%%RC_NAME%%_ip_addr} \ -p ${%%RC_NAME%%_settings} \ -g ${%%RC_NAME%%_gdrive} \ -c ${%%RC_NAME%%_cert} \ -k ${%%RC_NAME%%_key} \ -o $logfile"
cert and key are the only one missing
(In reply to Dries Michiels from comment #24) I think my thought process here was if someone was to unset the variables and allow Calibre Web to use the default locations instead of %%DATADIR%% the flags shouldn't be set as blanks. Not sure what the best approach is here. (In reply to Dries Michiels from comment #25) As for why Cert and Key are not being set to a default, it is because they aren't required to run the application. However, they were listed as it would be highly recommended to be set these if the intention is to expose Calibre-Web to the open internet.
And if we assign cert and key to nothing? eg "", does it work? This way we can all have the declaration above, and only reference the varaible in command_args. Accomplishing this would be very nice: command_args="-p $pidfile $procname \ -i ${%%RC_NAME%%_ip_addr} \ -p ${%%RC_NAME%%_settings} \ -g ${%%RC_NAME%%_gdrive} \ -c ${%%RC_NAME%%_cert} \ -k ${%%RC_NAME%%_key} \ -o $logfile"
(In reply to Matthew Wener from comment #26) I think my thought process here was if someone was to unset the variables and allow Calibre Web to use the default locations instead of %%DATADIR%% the flags shouldn't be set as blanks. Not sure what the best approach is here. We can assume that if someone is tinkering with the default values (unsetting, assign to something else, eg) they know what they are doing. So I would advocate to use := for every variable.
Created attachment 255729 [details] New Port py-calibreweb 0.6.24 v12 (In reply to Dries Michiels from comment #27) For the flags that are not defaulted they need to be unset unless active. The rest can be set.
Created attachment 255730 [details] New Port py-calibreweb 0.6.24 v13
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=ba6612833358392e3fe2b1472143eec622033dad commit ba6612833358392e3fe2b1472143eec622033dad Author: Matthew Wener <matthew@wener.org> AuthorDate: 2024-11-28 20:06:14 +0000 Commit: Dries Michiels <driesm@FreeBSD.org> CommitDate: 2024-12-09 17:01:59 +0000 www/py-calibreweb: add new port Web app that offers an interface for browsing a Calibre Library DB. PR: 281304 GIDs | 2 +- UIDs | 2 +- www/Makefile | 1 + www/py-calibreweb/Makefile (new) | 141 +++++++++++++++++++++++++++ www/py-calibreweb/distinfo (new) | 5 + www/py-calibreweb/files/calibreweb.in (new) | 91 +++++++++++++++++ www/py-calibreweb/files/pkg-message.in (new) | 17 ++++ www/py-calibreweb/pkg-descr (new) | 3 + 8 files changed, 260 insertions(+), 2 deletions(-)
Committed!
Thanks!