Page MenuHomeFreeBSD

[NEW] deskutils/bookworm: Simple, focused ebook reader
ClosedPublic

Authored by miguel_gocobachi.dev on Jul 6 2020, 12:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 6, 11:02 AM
Unknown Object (File)
Mar 14 2024, 4:32 AM
Unknown Object (File)
Jan 31 2024, 2:18 AM
Unknown Object (File)
Jan 31 2024, 2:18 AM
Unknown Object (File)
Jan 20 2024, 8:38 PM
Unknown Object (File)
Jan 13 2024, 12:33 AM
Unknown Object (File)
Dec 26 2023, 6:45 PM
Unknown Object (File)
Dec 25 2023, 1:01 AM
Subscribers

Details

Summary
[NEW] deskutils/bookworm: Simple, focused ebook reader

Bookworm is a simple, focused eBook reader.

Read the books you love without having to worry about the different format
complexities like epub, pdf, mobi, cbr, etc. This version supports EPUB, PDF
and Comics (CBR and CBZ) formats with support for more formats to follow soon.

WWW: https://babluboy.github.io/bookworm/

Reviewed_by: ??
Differential_Revision: D25569
Test Plan

ePub, MOBI, PDF working so far

  • portlint: ??
  • testport: ??
  • maketest: ?? (ninja test)
  • runtime: ??

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Hmm, it looks like make test is failing (at least when I test it in poudriere).

Have you experienced that? This is the relevant part from the logs of make test:

cd /wrkdirs/usr/ports/deskutils/bookworm/work/bookworm-1.1.2/build && ninja test                                                                                                                           [135/5179]
[0/1] Running all tests.
1/2 Validate desktop file OK             0.01s
2/2 Validate appdata file FAIL           13.55s (exit status 1)

Ok:                 1
Expected Fail:      0
Fail:               1
Unexpected Pass:    0
Skipped:            0
Timeout:            0


The output from the failed tests:

2/2 Validate appdata file FAIL           13.55s (exit status 1)

--- command ---
20:18:52 /usr/local/bin/appstream-util validate /wrkdirs/usr/ports/deskutils/bookworm/work/bookworm-1.1.2/build/data/com.github.babluboy.bookworm.appdata.xml
--- stdout ---
/wrkdirs/usr/ports/deskutils/bookworm/work/bookworm-1.1.2/build/data/com.github.babluboy.bookworm.appdata.xml: FAILED:
? tag-missing           : <translation> not specified
? tag-invalid           : <release> version was duplicated
? attribute-invalid     : <screenshot> height too large [https://raw.githubusercontent.com/babluboy/bookworm/gh-pages/images/BookwormLibraryView.png] maximum is 900px
? style-invalid         : <image> has vertical padding [https://raw.githubusercontent.com/babluboy/bookworm/gh-pages/images/BookwormLibraryView.png]
? style-invalid         : <image> has horizontal padding [https://raw.githubusercontent.com/babluboy/bookworm/gh-pages/images/BookwormLibraryView.png]
? style-invalid         : <p> does not end in '.|:|!' [Right to Left Reading]
? style-invalid         : <li> cannot end in '.' [Use of GResource to speed up loading of icons, scripts, etc.]
? style-invalid         : <p> does not end in '.|:|!' [Annotations and two page views]
? style-invalid         : <p> is too short [Annotations and two page views]
? style-invalid         : <p> does not end in '.|:|!' [Support for MOBI format and UX improvements]
? style-invalid         : <p> is too short [Support for MOBI format and UX improvements]
? style-invalid         : <p> does not end in '.|:|!' [UX improvements for list view and other preference customizations]
? style-invalid         : <p> does not end in '.|:|!' [Comics support and UX improvements]
? style-invalid         : <p> is too short [Comics support and UX improvements]
? style-invalid         : <p> does not end in '.|:|!' [PDF support and UX improvements]
? style-invalid         : <p> is too short [PDF support and UX improvements]
? style-invalid         : <p> does not end in '.|:|!' [Initial release with support for EPUB format]
? style-invalid         : <p> is too short [Initial release with support for EPUB format]
? tag-invalid           : <release> versions are not in order [1.0.0 before 1.1.0]
--- stderr ---
Validation of files failed
-------
In D25569#573948, @0mp wrote:

Hmm, it looks like make test is failing (at least when I test it in poudriere).

Have you experienced that? This is the relevant part from the logs of make test:

cd /wrkdirs/usr/ports/deskutils/bookworm/work/bookworm-1.1.2/build && ninja test                                                                                                                           [135/5179]
[0/1] Running all tests.
1/2 Validate desktop file OK             0.01s
2/2 Validate appdata file FAIL           13.55s (exit status 1)

Ok:                 1
Expected Fail:      0
Fail:               1
Unexpected Pass:    0
Skipped:            0
Timeout:            0


The output from the failed tests:

2/2 Validate appdata file FAIL           13.55s (exit status 1)

--- command ---
20:18:52 /usr/local/bin/appstream-util validate /wrkdirs/usr/ports/deskutils/bookworm/work/bookworm-1.1.2/build/data/com.github.babluboy.bookworm.appdata.xml
--- stdout ---
/wrkdirs/usr/ports/deskutils/bookworm/work/bookworm-1.1.2/build/data/com.github.babluboy.bookworm.appdata.xml: FAILED:
? tag-missing           : <translation> not specified
? tag-invalid           : <release> version was duplicated
? attribute-invalid     : <screenshot> height too large [https://raw.githubusercontent.com/babluboy/bookworm/gh-pages/images/BookwormLibraryView.png] maximum is 900px
? style-invalid         : <image> has vertical padding [https://raw.githubusercontent.com/babluboy/bookworm/gh-pages/images/BookwormLibraryView.png]
? style-invalid         : <image> has horizontal padding [https://raw.githubusercontent.com/babluboy/bookworm/gh-pages/images/BookwormLibraryView.png]
? style-invalid         : <p> does not end in '.|:|!' [Right to Left Reading]
? style-invalid         : <li> cannot end in '.' [Use of GResource to speed up loading of icons, scripts, etc.]
? style-invalid         : <p> does not end in '.|:|!' [Annotations and two page views]
? style-invalid         : <p> is too short [Annotations and two page views]
? style-invalid         : <p> does not end in '.|:|!' [Support for MOBI format and UX improvements]
? style-invalid         : <p> is too short [Support for MOBI format and UX improvements]
? style-invalid         : <p> does not end in '.|:|!' [UX improvements for list view and other preference customizations]
? style-invalid         : <p> does not end in '.|:|!' [Comics support and UX improvements]
? style-invalid         : <p> is too short [Comics support and UX improvements]
? style-invalid         : <p> does not end in '.|:|!' [PDF support and UX improvements]
? style-invalid         : <p> is too short [PDF support and UX improvements]
? style-invalid         : <p> does not end in '.|:|!' [Initial release with support for EPUB format]
? style-invalid         : <p> is too short [Initial release with support for EPUB format]
? tag-invalid           : <release> versions are not in order [1.0.0 before 1.1.0]
--- stderr ---
Validation of files failed
-------

I actually did not run that, I was leaving the rest to you.

0mp added a subscriber: 0mp.

Thanks for the update! Unfortunately, I cannot test the patch myself at the moment. I'll change reviewers to Contributor Reviewers (ports)

Would you like to become the maintainer of this port, @miguel_gocobachi.dev? You've done all the heavy lifting here!

Also, the port is ready to land. I'll commit it once you give me green light.

This revision is now accepted and ready to land.Oct 6 2021, 7:47 PM
In D25569#729852, @0mp wrote:

Would you like to become the maintainer of this port, @miguel_gocobachi.dev? You've done all the heavy lifting here!

Also, the port is ready to land. I'll commit it once you give me green light.

Okay, I guess that is fair. I will take it as maintainer then. Thank you.

This revision was automatically updated to reflect the committed changes.
koobs retitled this revision from deskutils/bookworm to [NEW] deskutils/bookworm: Simple, focused ebook reader.Oct 16 2021, 12:49 AM
koobs edited the summary of this revision. (Show Details)
koobs edited the test plan for this revision. (Show Details)
koobs edited the summary of this revision. (Show Details)
koobs added a subscriber: koobs.
koobs added inline comments.
deskutils/bookworm/Makefile
28
  • USES=python defaults to build,run, not necessary to specify.
  • Does upstream declare specific version support? If so, add :<version-spec> to this.
29–31

Group USES/USE together, GH_*` can go in the next block

61

Provide full paths to required binaries, as they may or may not be on the default path in various environments: LOCALBASE/bin/ninja

deskutils/bookworm/files/patch-data_com.github.babluboy.bookworm.appdata.xml.in
2

Add comments to patch headers summarising what the patch is for, and include upstream refs/links where available (issues, commits, pr's)

deskutils/bookworm/pkg-plist
4–13

Python will produce pyo/pyc files for each of these on first run, which will be orphaned on pkg deinstall

Port needs to "pre-build" them post install, and adjust the pkg-plist entries because the filenames will be different based on the Python version it is build with.

There's a number of ports that do/need this, for reference:

[koobs@140-CURRENT-amd64-564d] find /usr/ports -name Makefile -exec grep -H compileall {} +
/usr/ports/mail/mailman/Makefile:           && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
/usr/ports/textproc/ibus-typing-booster/Makefile:       && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
/usr/ports/textproc/ibus-typing-booster/Makefile:       && ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
/usr/ports/textproc/gtk-doc/Makefile:   ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
/usr/ports/textproc/gtk-doc/Makefile:   ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
/usr/ports/textproc/py-qt5-xml/Makefile:        ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
/usr/ports/textproc/py-qt5-xml/Makefile:        ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
/usr/ports/astro/gpsd/Makefile: ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
/usr/ports/astro/gpsd/Makefile: ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
/usr/ports/astro/weather/Makefile:      ${PYTHON_CMD} -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
...
deskutils/bookworm/Makefile
28
  • USES=python defaults to build,run, not necessary to specify.

Thanks!

  • Does upstream declare specific version support? If so, add :<version-spec> to this.

No, we patch in Python 3 support on our own.

29–31

Thank you, koobs, but portclippy disagrees with this recommendation. I'll keep it as it is for now.

deskutils/bookworm/files/patch-data_com.github.babluboy.bookworm.appdata.xml.in
2

I'll leave this part to the maintainer. @miguel_gocobachi.dev

deskutils/bookworm/pkg-plist
4–13

Ach, that's good to know, thanks!

This should probably be something along the lines of

_MOBI_LIB_DIR_REL=	share/com.github.babluboy.bookworm/scripts/mobi_lib
_MOBI_LIB_DIR=		${PREFIX}/${_MOBI_LIB_DIR_REL}

# Generate .py[co] files for the installed modules.
# Unless it's done, the module directories will be polluted
# with these files when a module is imported by root user.
post-install:
	(cd ${STAGEDIR}${PREFIX} && \
	${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
		-d ${_MOBI_LIB_DIR} -f ${_MOBI_LIB_DIR_REL} && \
	${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
		-d ${_MOBI_LIB_DIR} -f ${_MOBI_LIB_DIR_REL})

but I cannot test it right now. Could you take a look at it, @miguel_gocobachi.dev?

This revision was not accepted when it landed; it landed in state Needs Review.Dec 20 2021, 10:35 AM
This revision was automatically updated to reflect the committed changes.