Closed wikiped closed 5 months ago
This came up with my implementation of COPS as a Home Assistant add-on. It's the same issue discussed at https://github.com/dunxd/HomeAssistantAddons/issues/45#issuecomment-1968766683
Hi @wikiped I'm sorry about that.
As mentioned in the comment @dunxd referred to, COPS and mikespub/php-epub-meta are now using the maennchen/zipstream-php package to update .epub files, and that package requires a 64-bit platform since its version 3.x
If you don't configure COPS to update metadata and you don't re-generate the cover for Kobo devices, you do not need it at all, so you could remove it from the dependencies and continue working on 32-bit platforms.
Thank you @mikespub for the feedback.
Your suggestion sounds like a very acceptable workaround for the issue. The only thing is that it would be great if you (or someone who knows how to actually do that) add literal steps to take to implement it.
- don't configure COPS to update metadata
- don't re-generate the cover for Kobo devices
Does it involve editing config_local.php
or other file to remove those dependencies?
Good guess ;-)
Both options are already disabled by default in config_default.php, but in case you customized your config_local.php
make sure you have the following values set to 0
:
$config['cops_update_epub-metadata'] = '0';
$config['cops_provide_kepub'] = '0';
Removing (or downgrading) the requirement of the mikespub/php-epub-meta
package is a bit more tricky, and depends on how you installed COPS:
The cops-2.x.x.zip release packages already include it, and they don't allow you to (easily) override the dependencies, so you'll need to use the source code installation instead - see README.md option 2.
You'll need the PHP composer tool to install the dependencies. From what I've read for openwrt the command-line installation seems like the best option there.
Then before you run the composer install --no-dev -o
or phar composer.phar install --no-dev -o
command, you need to update the composer.json file to remove (or downgrade) the mikespub/php-epub-meta
package:
In your case, you could simply remove that line if you don't use the epub reader either, or change it to
"mikespub/php-epub-meta": "^1.5",
And the same for the mikespub/epub-loader
package which depends on it:
It can also be removed or replaced with:
"mikespub/epub-loader": "^1.5",
Thank you for taking time to look into this and outlining the steps - very helpful.
Perhaps, it should also be mentioned that composer.lock
file needs to be renamed/removed to avoid version confilicts with composer.json
.
Assuming that this is as far as the solution will go we can close the issue.
Thank you again for helping this.
I had version 2.0.1 installed on an openwrt device.
checkconfig.php showed the following:
Then I tried to install version 2.1.4 and the following was displayed on checkconfig.php:
Unless I missed it, nothing in changelogs or the prerequisites indicates that 64-bit platform is required to run cops.
And this seems like a breaking change worth mentioning somewhere.
If there is anything that could be done to keep cops as portable as it used to be - that would be greatly appreciated!
Thank you for keeping cops alive.