Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 680468 - app-misc/recoll-1.25.15 version bump, drop dev-qt/qtwebkit:5 DEPEND
Summary: app-misc/recoll-1.25.15 version bump, drop dev-qt/qtwebkit:5 DEPEND
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: P Purkayastha
URL:
Whiteboard:
Keywords: EBUILD
: 683206 (view as bug list)
Depends on:
Blocks: qtwebkit-removal
  Show dependency tree
 
Reported: 2019-03-15 17:03 UTC by Ulenrich
Modified: 2019-05-08 17:04 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to recoll-1.24.1.ebuild (recoll-1.25.5.patch,570 bytes, patch)
2019-03-17 04:23 UTC, P Purkayastha
Details | Diff
Patch to recoll-1.24.1.ebuild (recoll-1.25.5.patch,3.83 KB, patch)
2019-03-17 05:23 UTC, P Purkayastha
Details | Diff
Patch to recoll-1.24.1.ebuild (recoll-1.25.5.ebuild.patch,4.75 KB, patch)
2019-03-23 14:52 UTC, P Purkayastha
Details | Diff
Patch to recoll-1.24.1.ebuild (recoll-1.25.12.ebuild.diff,4.75 KB, patch)
2019-04-18 13:16 UTC, P Purkayastha
Details | Diff
Patch to recoll-1.24.1.ebuild (recoll-1.25.12.ebuild.diff,4.74 KB, patch)
2019-04-19 08:55 UTC, P Purkayastha
Details | Diff
Patch to recoll-1.24.1.ebuild (recoll-1.25.15.ebuild.diff,4.96 KB, patch)
2019-05-02 11:54 UTC, P Purkayastha
Details | Diff
Patch to recoll-1.24.1.ebuild (recoll-1.25.15.ebuild.diff,5.08 KB, patch)
2019-05-04 06:48 UTC, P Purkayastha
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulenrich 2019-03-15 17:03:56 UTC
app-misc/recoll-1.25.5 provided full python3 support, as you can see:
https://www.lesbonscomptes.com/recoll/release-1.25.html
Comment 1 Ulenrich 2019-03-15 17:06:14 UTC
this upstream doesn't work:  Bugs-to: https://bitbucket.org/medoc/recoll/issues
Comment 2 P Purkayastha 2019-03-17 04:23:10 UTC
Created attachment 569404 [details, diff]
Patch to recoll-1.24.1.ebuild

The patch attached can be applied to recoll-1.24.1.ebuild. It drops python2 support, enables python3 support, and no longer needs the patches from FILESDIR that were being applied to the recoll tree.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-03-17 04:31:08 UTC
Please use -U9999 diffs, and make a copyright policy sign-off.
Comment 4 P Purkayastha 2019-03-17 04:59:49 UTC
(In reply to Michał Górny from comment #3)
> Please use -U9999 diffs, and make a copyright policy sign-off.

Do you have an example / bug report that used the copyright policy sign-off? I need to know what to include in the text.
Comment 5 P Purkayastha 2019-03-17 05:18:11 UTC
Never mind. I got some information here: https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers/Policies_and_Guidelines#Certificate_of_Origin_for_proxied_maintainer_contributions

I will follow the format over there.
Comment 6 P Purkayastha 2019-03-17 05:23:37 UTC
Created attachment 569406 [details, diff]
Patch to recoll-1.24.1.ebuild

app-misc/recoll: 1.25.5 version bump. Change to python-3. Drop external patches.

Bug: https://bugs.gentoo.org/680468
Signed-off-by: Punarbasu Purkayastha <ppurka@gmail.com>
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-03-17 15:13:44 UTC
Comment on attachment 569406 [details, diff]
Patch to recoll-1.24.1.ebuild

>--- recoll-1.24.1.ebuild	2019-03-17 12:05:44.774180150 +0800
>+++ recoll-1.25.5.ebuild	2019-03-17 12:06:59.629694235 +0800
>@@ -1,125 +1,120 @@
> # Copyright 1999-2019 Gentoo Authors
> # Distributed under the terms of the GNU General Public License v2
> 
> EAPI=6
> 
>-PYTHON_COMPAT=( python2_7 )
>+PYTHON_COMPAT=( python{3_4,3_5,3_6,3_7} )
> 
> inherit eutils linux-info python-single-r1 qmake-utils
> 
> DESCRIPTION="A personal full text search package"
> HOMEPAGE="https://www.lesbonscomptes.com/recoll/"
> SRC_URI="https://www.lesbonscomptes.com/recoll/${P}.tar.gz"
> 
> LICENSE="GPL-2"

Have you verified it's not 'GPL-2+'?

> SLOT="0"
> KEYWORDS="amd64 x86"
> 
> IUSE="camelcase doc +inotify qt5 session +spell"
> REQUIRED_USE="session? ( inotify ) ${PYTHON_REQUIRED_USE}"
> 
> CDEPEND="
> 	dev-libs/xapian:=
> 	sys-libs/zlib:=
> 	virtual/libiconv
> 	qt5? (
> 		dev-qt/qtcore:5
> 		dev-qt/qtgui:5
> 		dev-qt/qtprintsupport:5
> 		dev-qt/qtwebkit:5
> 	)
> 	session? (
> 		inotify? (
> 			  x11-libs/libSM

You've got spaces in indent here and below.

> 			  x11-libs/libICE
> 			  x11-libs/libX11
> 		)
> 	)
> 	spell? ( app-text/aspell )
> 	${PYTHON_DEPS}
> "
> 
> DEPEND="
> 	${CDEPEND}
> 	qt5? ( dev-qt/linguist-tools:5 )
> "
> 
> RDEPEND="
> 	${CDEPEND}
> 	app-arch/unzip
> "
> 
>-PATCHES=(
>-	"${FILESDIR}"/${PN}-python3.patch # python3 patch

This comment doesn't add anything that's not 'obvious' from the filename.

>-	"${FILESDIR}"/${P}-qt-5.11.patch # bugs 663028, 660912
>-)
>-
> pkg_setup() {
> 	if has_version "<app-misc/recoll-1.20"; then
> 		einfo "Installing ${PV} over an 1.19 index is possible,"
> 		einfo "but there have been small changes in the way"
> 		einfo "compound words are indexed. So it is best to reset"
> 		einfo "the index. The best method to reset the index is to"
> 		einfo "quit all recoll programs and delete the index directory"
> 		einfo "rm -rf ~/.recoll/xapiandb, then start recoll or recollindex."
> 	fi

This really looks like something best printed in pkg_pretend().  Also elog, einfo is only for progress messages that can be missed with no harm.

> 	if use inotify; then
> 		CONFIG_CHECK="~INOTIFY_USER"

local?

> 		check_extra_config
> 	fi
> 	python-single-r1_pkg_setup
> }
> 
> src_prepare() {
> 	default
> 	python_fix_shebang filters
> }
> 
> src_configure() {
> 	use qt5 && export QMAKE="$(qt5_get_bindir)/qmake"

Does this need to be exported past this phase?  If not, 'local -x'.

> 
> 	econf \
> 		$(use_enable camelcase) \
> 		$(use_enable session x11mon) \
> 		$(use_enable qt5 qtgui) \
> 		$(use_enable qt5 webkit) \
> 		$(use_with inotify) \
> 		$(use_with spell aspell) \
> 		--without-fam \
> 		--enable-recollq

Please look at other ebuilds how to convert this to myconf array and rid of backslash hell.

> }
> 
> src_install() {
> 	emake STRIP="$(type -P true)" DESTDIR="${D}" install

Do you really need STRIP to be a full path?  Wouldn't plain STRIP=: suffice?

> 
> 	# html docs should be placed in /usr/share/doc/${PN}/html
> 	use doc && dodoc -r "${ED}"/usr/share/recoll/doc/.
> 	rm -r "${ED}/usr/share/recoll/doc" || die

Doesn't this cripple the app accidentally?  I.e. doesn't it look for the docs there?  Asking just in case.

> 	find "${D}" -name '*.la' -delete || die
> }
> 
> pkg_postinst() {
> 	einfo "In order to extract the full functionality of "
> 	einfo "recoll, the following packages should be installed "
> 	einfo "to get the corresponding document support."

optfeature uses elog, so you're going to have the features below in log but not the text above.  I'm pretty sure you want both.

> 
> 	optfeature "XML based documents support"    "dev-libs/libxslt[python] dev-libs/libxml2[python]"
> 	optfeature "PDF files support"              app-text/poppler
> 	optfeature "PDF files with OCR support"     app-text/tesseract
> 	optfeature "MS Word files support"          app-text/antiword
> 	optfeature "Wordperfect files support"      "app-text/libwpd[tools]"
> 	optfeature "Lyx files support"              app-office/lyx
> 	optfeature "CHM files support"              dev-python/pychm
> 	optfeature "GNU Info files support"         sys-apps/texinfo
> 	optfeature "RAR archives support"           dev-python/rarfile
> 	optfeature "7zip archives support"          dev-python/pylzma
> 	optfeature "iCalendar files support"        dev-python/icalendar
> 	optfeature "Postscript files support"       app-text/pstotext
> 	optfeature "RTF files support"              app-text/unrtf
> 	optfeature "TeX files support"              dev-text/detex
> 	optfeature "DVI files support"              virtual/tex-base
> 	optfeature "DJVU files support"             app-text/djvu
> 	optfeature "tags in audio files support"    media-libs/mutagen
> 	optfeature "tags in image files support"    media-libs/exiftool
> 	optfeature "Midi karaoke files support"     dev-python/chardet
> }
Comment 8 Ulenrich 2019-03-17 17:53:43 UTC
Apropos all the optfeatures: (though I am not sure what policy Gentoo has about this)
For me as a regular user this is everytime when updating recoll an extra stress to have a look about wanted optfeatures. If these features would be included by using USE flags, it is a one brainer to look at first time install of recoll:
recollxml recollpdf recollocr ...etc
Comment 9 P Purkayastha 2019-03-23 14:52:06 UTC
Created attachment 570380 [details, diff]
Patch to recoll-1.24.1.ebuild

Thanks for the review of the ebuild. Updated the ebuild diff with (most of) the requested changes.

> Have you verified it's not 'GPL-2+'?
It is GPL-2. You can refer to https://opensourceprojects.eu/p/recoll1/code/ci/56d36312453628f928250d6b907bbf57e687815c/tree/src/COPYING

> You've got spaces in indent here and below.
Fixed.

> This comment doesn't add anything that's not 'obvious' from the filename.
These patches are removed from version 1.25.5 onwards.

> This really looks like something best printed in pkg_pretend().  Also elog, einfo is only for progress messages that can be missed with no harm.
Done.

> local?
CONFIG_CHECK is now local.

> Does this need to be exported past this phase?  If not, 'local -x'.
QMAKE is needed beyond the configure stage.

> Please look at other ebuilds how to convert this to myconf array and rid of backslash hell.
Done.

> Do you really need STRIP to be a full path?  Wouldn't plain STRIP=: suffice?
> Doesn't this cripple the app accidentally?  I.e. doesn't it look for the docs there?  Asking just in case.
Not sure what were the reasons for these lines. I haven't changed it since I am unsure of what ebuild policies I might be breaking. Original commit is here: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b7946bf

> optfeature uses elog, so you're going to have the features below in log but not the text above.  I'm pretty sure you want both.
Fixed.

> For me as a regular user this is everytime when updating recoll an extra stress to have a look about wanted optfeatures.
Seems to be Gentoo ebuild policy regarding runtime dependencies. It used to be controlled by USE flags, but was changed in bug 494342 to optfeature.
Comment 10 Ulenrich 2019-03-24 08:07:21 UTC
> Seems to be Gentoo ebuild policy regarding runtime dependencies. It used to be > controlled by USE flags, but was changed in bug 494342 to optfeature.

Yes, now I can see ther in 494342 Pacho Ramos from comment #45 about runtime only:
> optionally. In general USE flags are avoided for this runtime only optional
> deps
Comment 11 P Purkayastha 2019-04-18 13:16:43 UTC
Created attachment 573246 [details, diff]
Patch to recoll-1.24.1.ebuild

Bump to version recoll-1.25.12 @ bug 683206
Comment 12 Anton Bolshakov 2019-04-19 00:41:52 UTC
*** Bug 683206 has been marked as a duplicate of this bug. ***
Comment 13 Anton Bolshakov 2019-04-19 01:10:03 UTC
Hi guys, thank you for your work, I have tested and the ebuild seems works fine.

Just a small note: please consider converting PYTHON_COMPAT to a more visual:

python3_{5,6,7} 

btw, python 3.4 is masked so you can drop too
Comment 14 P Purkayastha 2019-04-19 08:55:33 UTC
Created attachment 573420 [details, diff]
Patch to recoll-1.24.1.ebuild

I have updated the ebuild patch with the PYTHON_COMPAT changes.
Comment 15 Andreas Sturmlechner gentoo-dev 2019-04-28 15:14:59 UTC
> $(use_enable qt5 webkit)

It seems as if dev-qt/qtwebkit is actually optional, but you did not expose this as a USE flag. For a reason? If disabled, Qt textbrowser is used for 'reslist display'.

In fact, 1.25.12 has gained optional support for dev-qt/qtwebengine - did you look at configure.ac in this version? It would be good to at least switch optionally away from qtwebkit wrt bug 684580.

PS: Bonus points if you also bump the ebuild to EAPI-7 ;)
Comment 16 P Purkayastha 2019-04-29 13:06:50 UTC
I will have a look in the coming week or three. qtwebkit used to be mandatory once the qt5 option was chosen.
Comment 17 Andreas Sturmlechner gentoo-dev 2019-04-29 19:43:24 UTC
configure fails unfortunately:

> checking for chm_resolve_object in -lchm... no
> configure: error: --enable-python-chm is set but libchm is not found

In configure.ac we find:

> # Disable building the python module.
> AC_ARG_ENABLE(python-module,
>     AC_HELP_STRING([--disable-python-module],
>     [Do not build the Python module.]),
>         pythonEnabled=$enableval, pythonEnabled=yes)
> 
> AM_CONDITIONAL(MAKEPYTHON, [test X$pythonEnabled = Xyes])
> 
> # Disable building the libchm python wrapper
> AC_ARG_ENABLE(python-chm, AC_HELP_STRING([--disable-python-chm],
>     [Do not build the libchm Python wrapper.]),
>     pythonChmEnabled=$enableval, pythonChmEnabled=yes)
> 
> if test X$pythonChmEnabled = Xyes; then
>    AC_CHECK_LIB([chm], [chm_resolve_object], [],
>    [AC_MSG_ERROR([--enable-python-chm is set but libchm is not found])])
> fi
> 
> AM_CONDITIONAL(MAKEPYTHONCHM, [test X$pythonChmEnabled = Xyes])
Comment 18 Andreas Sturmlechner gentoo-dev 2019-04-29 19:51:06 UTC
Wrt QtWebKit I'd suggest not to bother with it anymore and unconditionally disable it. Then QtWebEngine would be available as fancy viewer I guess, with QTextBrowser (part of dev-qt/qtwidgets:5) as a fallback.
Comment 19 Anton Bolshakov 2019-04-30 15:14:55 UTC
(In reply to Andreas Sturmlechner from comment #18)
> Wrt QtWebKit I'd suggest not to bother with it anymore and unconditionally
> disable it. Then QtWebEngine would be available as fancy viewer I guess,
> with QTextBrowser (part of dev-qt/qtwidgets:5) as a fallback.

I have tested recoll-1.25.15 with QTextBrowser and didn't notice any difference with webkit. So I vote to make it the default backend. 
QtWebEngine can be enabled via optional flag.
Comment 20 P Purkayastha 2019-05-02 11:54:35 UTC
Created attachment 574924 [details, diff]
Patch to recoll-1.24.1.ebuild

- Updated ebuild to be a patch for 1.25.15
- changed EAPI to 7
- added webengine USE flag (should be also added to use.local.desc)
- disabled webkit
Comment 21 Andreas Sturmlechner gentoo-dev 2019-05-02 12:29:45 UTC
Thanks, bump to EAPI-7 is not quite complete:

> qt5? ( dev-qt/linguist-tools:5 )
^ this should move to a separate BDEPEND.

Following that, you can turn CDEPEND into DEPEND, as the above gets rid of your DEPEND-only case.

Did you look into my configure error report?
Comment 22 P Purkayastha 2019-05-04 06:48:47 UTC
Created attachment 575040 [details, diff]
Patch to recoll-1.24.1.ebuild

Updated ebuild patch for recoll-1.25.15:
- The BDEPEND change wasn't obvious to me, after reading the EAPI-7 changes mentioned in https://dev.gentoo.org/~mgorny/articles/the-ultimate-guide-to-eapi-7.html
- Changed CDEPEND to DEPEND
- Changed DEPEND to BDEPEND, as requested
- The chm configure error seems something new, and it wasn't present on my system because I already had chmlib installed. I have added a chm USE flag, and have removed the corresponding optfeature. Reference: https://opensourceprojects.eu/p/recoll1/code/ci/01b2a2ddaa75f10bad3438e0bb4aa5d8c5463391
Comment 23 Andreas Sturmlechner gentoo-dev 2019-05-04 12:08:24 UTC
(In reply to P Purkayastha from comment #22)
> - The chm configure error seems something new, and it wasn't present on my
> system because I already had chmlib installed. I have added a chm USE flag,
> and have removed the corresponding optfeature. Reference:
> https://opensourceprojects.eu/p/recoll1/code/ci/
> 01b2a2ddaa75f10bad3438e0bb4aa5d8c5463391

One of the necessary steps on version bumps is to check upstream's release notes for such changes and compare configure.ac with the previous version available.
Comment 24 Larry the Git Cow gentoo-dev 2019-05-08 17:04:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=062b42a3da95e7d0ba19fd8b204f25b89f652448

commit 062b42a3da95e7d0ba19fd8b204f25b89f652448
Author:     Punarbasu 'ppurka' Purkayastha <ppurka@gmail.com>
AuthorDate: 2019-05-05 17:48:41 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-05-08 17:03:32 +0000

    app-misc/recoll: 1.25.15 version bump, EAPI-7 bump, USE chm,webengine
    
    Drop dev-qt/qtwebkit option.
    
    Closes: https://bugs.gentoo.org/680468
    Package-Manager: Portage-2.3.66, Repoman-2.3.12
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 app-misc/recoll/Manifest              |   1 +
 app-misc/recoll/metadata.xml          |   2 +
 app-misc/recoll/recoll-1.25.15.ebuild | 134 ++++++++++++++++++++++++++++++++++
 3 files changed, 137 insertions(+)