Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 593718 - net-p2p/retroshare-0.6.1 version bump
Summary: net-p2p/retroshare-0.6.1 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Sergey Popov
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2016-09-14 09:59 UTC by Gioacchino Mazzurco
Modified: 2016-12-06 12:32 UTC (History)
2 users (show)

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


Attachments
retroshare 0.6.1 ebuild (retroshare-0.6.1.ebuild,3.90 KB, text/plain)
2016-09-14 10:01 UTC, Gioacchino Mazzurco
Details
Ebuild v2 (retroshare-0.6.1.ebuild,3.94 KB, text/plain)
2016-11-07 14:26 UTC, Gioacchino Mazzurco
Details
Third version ebuild (retroshare-0.6.1-r3.ebuild,3.96 KB, text/plain)
2016-11-09 12:17 UTC, Gioacchino Mazzurco
Details
Ebuild v4 (retroshare-0.6.1-r4.ebuild,3.96 KB, text/plain)
2016-11-09 16:18 UTC, Gioacchino Mazzurco
Details
Ebuild v5 (retroshare-0.6.1-r5.ebuild,3.99 KB, text/plain)
2016-11-11 23:09 UTC, Amadeusz Żołnowski (RETIRED)
Details
Ebuild v6 (retroshare-0.6.1-r6.ebuild,3.77 KB, text/plain)
2016-12-01 22:39 UTC, Amadeusz Żołnowski (RETIRED)
Details
Ebuild v7 (retroshare-0.6.1-r7.ebuild,3.80 KB, text/plain)
2016-12-03 12:27 UTC, Amadeusz Żołnowski (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gioacchino Mazzurco 2016-09-14 09:59:25 UTC
Hi! from retroshare development team, we realeased a new version and we would like to have the version on Gentoo portage updated, in the attacchments you can find an ebuild that correctly build the new version

Reproducible: Always
Comment 1 Gioacchino Mazzurco 2016-09-14 10:01:11 UTC
Created attachment 445670 [details]
retroshare 0.6.1 ebuild
Comment 2 Gioacchino Mazzurco 2016-09-30 13:48:23 UTC
A more recently updated ebuild is availabe in eigenlay overlay

Cheers!
Comment 3 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-11-06 14:54:55 UTC
Could you please attach the newer version here, please?


> @@ -16,8 +16,9 @@
>  KEYWORDS="amd64 x86"
> 
>  IUSE="cli feedreader qt4 +qt5 voip"
> -REQUIRED_USE="^^ ( qt4 qt5 )
> -       || ( cli qt4 qt5 )
> +REQUIRED_USE="|| ( cli qt4 qt5 )
> +       qt4? ( !qt5 )
> +       qt5? ( !qt4 )
>         feedreader? ( || ( qt4 qt5 ) )
>         voip? ( || ( qt4 qt5 ) )"

Why changing it?


>  S="${WORKDIR}/RetroShare-${PV}"
> 
> -PATCHES=( "${FILESDIR}/${P}-c11-compat.patch" )
> +#PATCHES=( "${FILESDIR}/${P}-c11-compat.patch" )
> 
>  src_prepare() {
>         local dir
> @@ -101,7 +96,7 @@
>                 retroshare-gui/src/retroshare-gui.pro \
>                 retroshare-nogui/src/retroshare-nogui.pro || die 'sed on retroshare-gui/src/retroshare-gui.pro failed'
> 
> -       epatch ${PATCHES[@]}
> +       #epatch ${PATCHES[@]}
>         eapply_user
>  }

Please don't comment out, just remove what's no longer needed.


@@ -140,7 +135,7 @@
        doins libbitdht/src/bitdht/bdboot.txt

        insinto /usr/share/RetroShare06/webui
-       doins libresapi/src/webfiles/*
+       doins libresapi/src/webui/*

        dodoc README.md
        make_desktop_entry RetroShare06

You could recursively call `doins` and insert into `/usr/share/RetroShare06`.
Comment 4 Gioacchino Mazzurco 2016-11-07 14:23:32 UTC
(In reply to Amadeusz Żołnowski from comment #3)
> Could you please attach the newer version here, please?
> 
> 
> > @@ -16,8 +16,9 @@
> >  KEYWORDS="amd64 x86"
> > 
> >  IUSE="cli feedreader qt4 +qt5 voip"
> > -REQUIRED_USE="^^ ( qt4 qt5 )
> > -       || ( cli qt4 qt5 )
> > +REQUIRED_USE="|| ( cli qt4 qt5 )
> > +       qt4? ( !qt5 )
> > +       qt5? ( !qt4 )
> >         feedreader? ( || ( qt4 qt5 ) )
> >         voip? ( || ( qt4 qt5 ) )"
> 
> Why changing it?

Because past version required to have either qt5 or qt4 enabled while they are not mandatory, now the user can install cli only


> 
> >  S="${WORKDIR}/RetroShare-${PV}"
> > 
> > -PATCHES=( "${FILESDIR}/${P}-c11-compat.patch" )
> > +#PATCHES=( "${FILESDIR}/${P}-c11-compat.patch" )
> > 
> >  src_prepare() {
> >         local dir
> > @@ -101,7 +96,7 @@
> >                 retroshare-gui/src/retroshare-gui.pro \
> >                 retroshare-nogui/src/retroshare-nogui.pro || die 'sed on retroshare-gui/src/retroshare-gui.pro failed'
> > 
> > -       epatch ${PATCHES[@]}
> > +       #epatch ${PATCHES[@]}
> >         eapply_user
> >  }
> 
> Please don't comment out, just remove what's no longer needed.

Should be already removed in newer version


> 
> @@ -140,7 +135,7 @@
>         doins libbitdht/src/bitdht/bdboot.txt
> 
>         insinto /usr/share/RetroShare06/webui
> -       doins libresapi/src/webfiles/*
> +       doins libresapi/src/webui/*
> 
>         dodoc README.md
>         make_desktop_entry RetroShare06
> 
> You could recursively call `doins` and insert into `/usr/share/RetroShare06`.

you mean like this?

insinto /usr/share/RetroShare06
doins libresapi/src/webui

Cheers!
Comment 5 Gioacchino Mazzurco 2016-11-07 14:26:07 UTC
Created attachment 452618 [details]
Ebuild v2
Comment 6 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-11-08 21:39:15 UTC
(In reply to Gioacchino Mazzurco from comment #4)
> > 
> > @@ -140,7 +135,7 @@
> >         doins libbitdht/src/bitdht/bdboot.txt
> > 
> >         insinto /usr/share/RetroShare06/webui
> > -       doins libresapi/src/webfiles/*
> > +       doins libresapi/src/webui/*
> > 
> >         dodoc README.md
> >         make_desktop_entry RetroShare06
> > 
> > You could recursively call `doins` and insert into `/usr/share/RetroShare06`.
> 
> you mean like this?
> 
> insinto /usr/share/RetroShare06
> doins libresapi/src/webui

doins -r libresapi/src/webui
Comment 7 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-11-08 21:52:22 UTC
Comparing  retroshare 0.6.1 ebuild (2016-09-14 10:01 UTC) with Ebuild v2
(2016-11-07 14:26 UTC):

> @@ -67,14 +67,13 @@
>                 virtual/ffmpeg[encode]
>         )"
>  DEPEND="${RDEPEND}
> -       qt4? ( dev-qt/designer:4 )
> -       qt5? ( dev-qt/designer:5 )
> +       qt4? ( dev-qt/qtcore:4 )
> +       !qt4? ( dev-qt/qtcore:5 )
> +       qt5? ( dev-qt/qtwidgets:5 )
>         virtual/pkgconfig"
> 
>  S="${WORKDIR}/RetroShare-${PV}"

This change confuses me. For `qt4` you require `dev-qt/qtcore:4`, but if `qt4`
is disabled you require `dev-qt/qtcore:5`, but you've just said that GUI is no
longer needed, so why importing `qtcore:5`?

The same here:

>  src_configure() {
>         for dir in ${rs_src_dirs} ; do
>                 pushd "${S}/${dir}" 2>/dev/null || die
> -               use qt4 && eqmake4
> -               use qt5 && eqmake5
> +               use qt4 && eqmake4 || eqmake5
>                 popd 2>/dev/null || die
>         done
>  }

Why `eqmake5` is always called in case of `qt4` flag being disabled. Another
issue with this change is that if `eqmake4` fails (and it doesn't die) it will
run `eqmake5`.

By the way, I've noticed you redirect `popd` and `pushd` stderr output, but you
probably meant to redirect stdout to `/dev/null`.
Comment 8 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-11-08 21:53:18 UTC
Sergey, I will bump version in the weekend, if you don't mind.
Comment 9 Sergey Popov gentoo-dev 2016-11-09 06:35:11 UTC
(In reply to Amadeusz Żołnowski from comment #8)
> Sergey, I will bump version in the weekend, if you don't mind.

Be aware that even if retroshare can be build without GUI, it still needs qtcore(either 5 or 4). So, if you bump it, please do not break this for CLI users. Retroshare CLI is not very useful(i prefer to run GUI app and X server on 24/7 node rather than poor CLI), but it is an useful option for some users that do not want to set up X server on their VPS.

So, basically, ^^ can be replaced by ?? in REQUIRED_USE, but the problem is, that this set of flags not only selects which Qt would be chosen for GUI, but also - which would be chosen for cli.

So, current logic is - build GUI version always and built cli only if requested. It seems that we should introduce some other enabled-by-default USE-flag, like 'gui' and make proper deps using it.
Comment 10 Gioacchino Mazzurco 2016-11-09 12:17:30 UTC
Created attachment 452794 [details]
Third version ebuild

This ebuild has suggested modification applied
Comment 11 Gioacchino Mazzurco 2016-11-09 12:39:10 UTC
(In reply to Amadeusz Żołnowski from comment #8)
> Sergey, I will bump version in the weekend, if you don't mind.

Please use the v3 version that has some cleaning that has been suggested here
Comment 12 Gioacchino Mazzurco 2016-11-09 12:41:51 UTC
(In reply to Amadeusz Żołnowski from comment #7)
> Comparing  retroshare 0.6.1 ebuild (2016-09-14 10:01 UTC) with Ebuild v2
> (2016-11-07 14:26 UTC):
> 
> > @@ -67,14 +67,13 @@
> >                 virtual/ffmpeg[encode]
> >         )"
> >  DEPEND="${RDEPEND}
> > -       qt4? ( dev-qt/designer:4 )
> > -       qt5? ( dev-qt/designer:5 )
> > +       qt4? ( dev-qt/qtcore:4 )
> > +       !qt4? ( dev-qt/qtcore:5 )
> > +       qt5? ( dev-qt/qtwidgets:5 )
> >         virtual/pkgconfig"
> > 
> >  S="${WORKDIR}/RetroShare-${PV}"
> 
> This change confuses me. For `qt4` you require `dev-qt/qtcore:4`, but if
> `qt4`
> is disabled you require `dev-qt/qtcore:5`, but you've just said that GUI is
> no
> longer needed, so why importing `qtcore:5`?
> 
> The same here:
> 
> >  src_configure() {
> >         for dir in ${rs_src_dirs} ; do
> >                 pushd "${S}/${dir}" 2>/dev/null || die
> > -               use qt4 && eqmake4
> > -               use qt5 && eqmake5
> > +               use qt4 && eqmake4 || eqmake5
> >                 popd 2>/dev/null || die
> >         done
> >  }
> 
> Why `eqmake5` is always called in case of `qt4` flag being disabled.

The RetroShare building require qmake also if the GUI is not enabled because of that qtcore is required


> Another
> issue with this change is that if `eqmake4` fails (and it doesn't die) it
> will
> run `eqmake5`.

I have fixed this in v3 ;) thanks for suggestion


> By the way, I've noticed you redirect `popd` and `pushd` stderr output, but
> you
> probably meant to redirect stdout to `/dev/null`.

I have fixed this in v3 ;) thanks for suggestion
Comment 13 Gioacchino Mazzurco 2016-11-09 16:18:32 UTC
Created attachment 452816 [details]
Ebuild v4

Fix an issue with logic operator precedence and keywording
Comment 14 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-11-11 23:09:09 UTC
Created attachment 453072 [details]
Ebuild v5
Comment 15 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-11-11 23:09:33 UTC
Sergey, could you review please the latest version attached?

Gioacchino, find my comments below explaining why I've changed some things.

> --- retroshare-0.6.1-r4.ebuild	2016-11-11 23:02:01.148018654 +0000
> +++ retroshare-0.6.1-r5.ebuild	2016-11-11 23:01:23.070433344 +0000
> @@ -13,14 +13,15 @@
>  # pegmarkdown can also be used with MIT
>  LICENSE="GPL-2 GPL-3 Apache-2.0 LGPL-2.1"
>  SLOT="0"
> -KEYWORDS="amd64 x86"
> +KEYWORDS="~amd64 ~x86"

This needs to be testing when bumping.

>  
> -IUSE="cli feedreader qt4 +qt5 voip"
> -REQUIRED_USE="|| ( cli qt4 qt5 )
> -	qt4? ( !qt5 )
> -	qt5? ( !qt4 )
> -	feedreader? ( || ( qt4 qt5 ) )
> -	voip? ( || ( qt4 qt5 ) )"
> +IUSE="cli feedreader +gui qt4 +qt5 voip"
> +REQUIRED_USE="
> +	|| ( cli gui )
> +	gui? ( ^^ ( qt4 qt5 ) )
> +	cli? ( ^^ ( qt4 qt5 ) )
> +	feedreader? ( gui )
> +	voip? ( gui )"

Following Sergey suggestion wrt gui flag. I think that's more clear now.

>  
>  RDEPEND="
>  	app-arch/bzip2
> @@ -68,8 +69,10 @@
>  	)"
>  DEPEND="${RDEPEND}
>  	qt4? ( dev-qt/qtcore:4 )
> -	!qt4? ( dev-qt/qtcore:5 )
> -	qt5? ( dev-qt/qtwidgets:5 )
> +	qt5? (
> +		dev-qt/qtcore:5
> +		gui? ( dev-qt/qtwidgets:5 )
> +	)
>  	virtual/pkgconfig"

Because it used to duplicate the logic implemented in REQUIRED_USE.

>  
>  S="${WORKDIR}/RetroShare-${PV}"
> @@ -103,10 +106,13 @@
>  
>  src_configure() {
>  	for dir in ${rs_src_dirs} ; do
> -		pushd "${S}/${dir}" &>/dev/null || die
> -		use qt4 && { eqmake4 || die; }
> -		use qt4 || eqmake5 || die
> -		popd &> /dev/null || die
> +		pushd "${S}/${dir}" >/dev/null || die
> +		if use qt4; then
> +			eqmake4 || die
> +		elif use qt5; then
> +		   	eqmake5 || die
> +		fi
> +		popd >/dev/null || die

"use qt4 || ..." duplicates the logic implemented in REQUIRED_USE.

>  	done
>  }
Comment 16 Gioacchino Mazzurco 2016-11-12 09:46:05 UTC
Amadeusz thank you for edits and explaining!

The new version you proposed seems ok to me!
Comment 17 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-12-01 22:39:21 UTC
Created attachment 454868 [details]
Ebuild v6

Restructure dependencies after introducing `gui` flag. Remove some duplicates. The part I am most unsure about is what's in `qt5? ()` - are almost all Qt deps meant for GUI?
Comment 18 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-12-01 22:45:33 UTC
Sergey, could you review Ebuild v6, please? Gioacchino, could you take a look whether deps are fine, please?
Comment 19 Gioacchino Mazzurco 2016-12-03 11:13:03 UTC
dev-qt/qtcore is not a runtme dependency if gui is not enabled, so it should go inside DEPEND not RDEPEND as it is needed only for building
Comment 20 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-12-03 12:27:00 UTC
Created attachment 454968 [details]
Ebuild v7

I have moved all qt deps in runtime under gui flag. I have reverted back qtcore in build-time deps.

Does it look correct now?

I'd appreciate if someone would test different flags configuration as I don't have Gentoo setup on a hardware good enough for that at the moment.
Comment 21 Gioacchino Mazzurco 2016-12-03 21:52:35 UTC
I have tested v7 (i have pushed it to eigenlay) with this two different sets of USE on different machines

USE="cli qt5* -feedreader -gui% -qt4 -voip"
USE="cli gui%* qt5 voip -feedreader -qt4"

Worked fine :)
Comment 22 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-12-04 11:14:53 UTC
Thanks. Did you have qt deps (other than qtcore) installed when testing -gui?
Comment 23 Gioacchino Mazzurco 2016-12-04 14:22:41 UTC
No I don't have other Qt dependencies installed with -gui :)
Comment 24 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-12-04 15:01:09 UTC
Good, thank you! :-)
Comment 25 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-12-04 15:01:22 UTC
Sergey, I think it's ready to go. Do you approve v7?
Comment 26 Sergey Popov gentoo-dev 2016-12-06 12:32:20 UTC
commit d5a9552e68bd0a2629af5b7337474f3c41442b97
Author: Sergey Popov <pinkbyte@gentoo.org>
Date:   Tue Dec 6 15:28:18 2016 +0300

    net-p2p/retroshare: version bump

    Implement optional(enabled by default) 'gui' USE-flag:
    now it is possible to build only CLI version of RetroShare.
    Rearrange dependencies, thanks to Gioacchino Mazzurco
    and Amadeusz Żołnowski. Sync live ebuild with this changes.

    Reported-by: Gioacchino Mazzurco <gio@eigenlab.org>
    Gentoo-Bug: 593718

    Package-Manager: portage-2.3.2


I have applied most of suggested changes. qtcore is missing from DEPEND because it is properly included in RDEPEND(i did not apply 'use gui && use qt4' logic, prefer to stick with 'use qt4 && use gui' instead). Thanks everyone for help!