Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927207 - net-p2p/retroshare-0.6.7 version bump
Summary: net-p2p/retroshare-0.6.7 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gioacchino Mazzurco
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-03-17 18:43 UTC by gentoo
Modified: 2024-05-24 07:51 UTC (History)
4 users (show)

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


Attachments
The updated ebuild (retroshare-0.6.7.ebuild,3.63 KB, text/plain)
2024-03-17 18:44 UTC, gentoo
Details
net-p2p/retroshare-0.6.7-r1.ebuild (retroshare-0.6.7-r1.ebuild,3.68 KB, text/plain)
2024-03-27 16:21 UTC, mehw
Details
retroshare-0.6.7-r2.ebuild (retroshare-0.6.7-r2.ebuild,3.86 KB, application/vnd.gentoo.ebuild)
2024-03-28 14:07 UTC, gentoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gentoo 2024-03-17 18:43:55 UTC
Retroshare 0.6.7 came out and I want to update it.
Comment 1 gentoo 2024-03-17 18:44:24 UTC
Created attachment 887848 [details]
The updated ebuild
Comment 2 Mike Gilbert gentoo-dev 2024-03-17 19:36:12 UTC
Please write better bug summaries.

Also, do not copy arches on random bug reports.
Comment 3 gentoo 2024-03-17 19:48:38 UTC
(In reply to Mike Gilbert from comment #2)
> Please write better bug summaries.
> 
> Also, do not copy arches on random bug reports.

I have changed AMD64 to all.

I wanted to copy the link to `Gentoo forum → Portage → Help me update the ebuild for retroshare` but since my account is new, I was unable to.


User szatox explains most of the changes in (as of right now) the fourth newest reply.
Comment 4 Gioacchino Mazzurco 2024-03-17 20:14:41 UTC
(In reply to gentoo from comment #1)
> Created attachment 887848 [details]
> The updated ebuild

The proposed ebuild looks good, I'll test it ASAP

Thanks
Comment 5 mehw 2024-03-27 16:21:33 UTC
Created attachment 888779 [details]
net-p2p/retroshare-0.6.7-r1.ebuild

(In reply to gentoo from comment #1)
> Created attachment 887848 [details]
> The updated ebuild

Hello,

May I suggest some modifications to your ebuild?

It would also be helpful if you open a https://github.com/gentoo/gentoo PR ;)

Compiling with the 'plugins' use flag enabled may trigger multiple errors about not declared functions/macros in plugins/VOIP/gui/VideoProcessor.cpp when >=media-video/ffmpeg-5 is installed in the system:

avcodec_register_all
AV_CODEC_CAP_TRUNCATED
AV_CODEC_FLAG_TRUNCATED
avcodec_encode_video2
avcodec_decode_video2
av_free_packet

The aforementioned functions/macros have all been removed from FFmpeg by upstream at some point after v4.5:

https://github.com/FFmpeg/FFmpeg/tree/c361fa9e215cf21fb0e5b3395d675aec3d216719

So, I believe that a restriction to <media-video/ffmpeg-5 is required for the 'plugins' use flag.


Also, the 'plugins' use flag requires the 'gui' use flag to be enabled:

make: *** No rule to make target 'retroshare_gui-make_first', needed by 'plugins-make_first'.  Stop.

You may read in the file RetroShare.pro:

retroshare_plugins {
    SUBDIRS += plugins
    plugins.file = plugins/plugins.pro
    plugins.depends = retroshare_gui
    plugins.target = plugins
}


These are the use flags that I used:

ABI_X86="(64)"
USE="cli gui jsonapi keyring miniupnp service sqlcipher -libupnp -plugins"

With the above use flags ('plugins' use flag disabled), net-p2p/retroshare-0.6.7 compiles and starts fine.  I didn't verify any other requirement for the 'plugins' use flag, nor I compiled it with <media-video/ffmpeg-5 installed.


retroshare-0.6.7.ebuild: https://bugs.gentoo.org/attachment.cgi?id=887848

$ diff -Nuar retroshare-0.6.7.ebuild retroshare-0.6.7-r1.ebuild 
--- retroshare-0.6.7.ebuild     2024-03-27 15:48:44.850802544 +0000
+++ retroshare-0.6.7-r1.ebuild  2024-03-27 15:48:32.923902769 +0000
@@ -12,12 +12,13 @@
 
 LICENSE="AGPL-3 Apache-2.0 CC-BY-SA-4.0 GPL-2 GPL-3 LGPL-3"
 SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="keyring cli +gui +jsonapi libupnp +miniupnp +service +sqlcipher -plugins"
+KEYWORDS="~amd64 ~x86"
+IUSE="keyring cli +gui +jsonapi libupnp +miniupnp +service +sqlcipher plugins"
 
 REQUIRED_USE="
        || ( gui service )
        ?? ( libupnp miniupnp )
+       plugins? ( gui )
        service? ( || ( cli jsonapi ) )"
 
 RDEPEND="
@@ -44,7 +45,10 @@
        service? ( dev-qt/qtcore:5 )
        sqlcipher? ( dev-db/sqlcipher )
        !sqlcipher? ( dev-db/sqlite:3 )
-       plugins? ( media-libs/speex )"
+       plugins? (
+               media-libs/speex
+               <media-video/ffmpeg-5
+       )"
 
 DEPEND="${RDEPEND}
        dev-qt/qtcore:5
Comment 6 gentoo 2024-03-28 14:04:15 UTC
> May I suggest some modifications to your ebuild?

Of course!

I have tried it:
With the 0.6.7-r1 ebuild + your patch i get those errors:
```
 * ERROR: net-p2p/retroshare-0.6.7-r1::local failed (prepare phase):
 *   The source directory '/var/tmp/portage/net-p2p/retroshare-0.6.7-r1/work/RetroShare' doesn't exist
 * 
 * Call stack:
 *            ebuild.sh, line  784:  Called __ebuild_main 'prepare'
 *   phase-functions.sh, line 1071:  Called __dyn_prepare
 *   phase-functions.sh, line  400:  Called die
 * The specific snippet of code:
 *   		die "The source directory '${S}' doesn't exist"
```
That is because the source directory is not `RetroShare` but `RetroShare-0.6.7`.
When I edit that part of the ebuild I get this error:
```
Cannot find file: /var/tmp/portage/net-p2p/retroshare-0.6.7-r1/work/RetroShare-0.6.7/openpgpsdk/src/openpgpsdk.pro.
Cannot find file: /var/tmp/portage/net-p2p/retroshare-0.6.7-r1/work/RetroShare-0.6.7/libbitdht/src/libbitdht.pro.
make: *** [Makefile:53: sub-openpgpsdk-src-openpgpsdk-pro-make_first] Error 2
make: *** Waiting for unfinished jobs....
make: *** [Makefile:103: sub-libbitdht-src-libbitdht-pro-make_first] Error 2
```
And indeed there are no files in the nested `src` directories.

This happens for compilation for amd64 with both your flags and this set:
USE="gui jsonapi miniupnp service sqlcipher -cli -keyring -libupnp -plugins"


Also in the new file I have:
1. changed the description
2. fixed the plugins flag (there should be no "-" as pkgcheck scan said)
3. Suggested new source URI

> It would also be helpful if you open a https://github.com/gentoo/gentoo PR ;)

Aren't PRs for stuff already to be merged? I was thinking that I could do that once the thing is more stable.
Comment 7 gentoo 2024-03-28 14:07:24 UTC
Created attachment 888918 [details]
retroshare-0.6.7-r2.ebuild

r2 is basically r1 with the patches described above
Comment 8 mehw 2024-03-29 09:16:08 UTC
(In reply to gentoo from comment #6)
> I have tried it:
> With the 0.6.7-r1 ebuild + your patch i get those errors:
> ```
>  * ERROR: net-p2p/retroshare-0.6.7-r1::local failed (prepare phase):
>  *   The source directory
> '/var/tmp/portage/net-p2p/retroshare-0.6.7-r1/work/RetroShare' doesn't exist
>  * 
>  * Call stack:
>  *            ebuild.sh, line  784:  Called __ebuild_main 'prepare'
>  *   phase-functions.sh, line 1071:  Called __dyn_prepare
>  *   phase-functions.sh, line  400:  Called die
>  * The specific snippet of code:
>  *   		die "The source directory '${S}' doesn't exist"
> ```
> That is because the source directory is not `RetroShare` but
> `RetroShare-0.6.7`.
> When I edit that part of the ebuild I get this error:
> ```
> Cannot find file:
> /var/tmp/portage/net-p2p/retroshare-0.6.7-r1/work/RetroShare-0.6.7/
> openpgpsdk/src/openpgpsdk.pro.
> Cannot find file:
> /var/tmp/portage/net-p2p/retroshare-0.6.7-r1/work/RetroShare-0.6.7/libbitdht/
> src/libbitdht.pro.
> make: *** [Makefile:53: sub-openpgpsdk-src-openpgpsdk-pro-make_first] Error 2
> make: *** Waiting for unfinished jobs....
> make: *** [Makefile:103: sub-libbitdht-src-libbitdht-pro-make_first] Error 2
> ```
> And indeed there are no files in the nested `src` directories.
> 
> This happens for compilation for amd64 with both your flags and this set:
> USE="gui jsonapi miniupnp service sqlcipher -cli -keyring -libupnp -plugins"

Please, don't mix the sources, they are different, if you save both as "${P}.tar.gz", that might lead to confusion:

https://download.opensuse.org/repositories/network:/retroshare/Debian_Testing/retroshare-common_0.6.7.orig.tar.gz
https://github.com/RetroShare/RetroShare/archive/refs/tags/v0.6.7.tar.gz

The latter requires you to get some submodules (`git submodule update ...`) to have the missing files/pieces, i.e. the openpgpsdk.pro and libbitdht.pro which you mentioned.

The working directory is also different:

retroshare-common_0.6.7.orig.tar.gz: RetroShare
v0.6.7.tar.gz: RetroShare-0.6.7

If you are using a local overlay, what I may suggest is to:

1. cd to your local net-p2p/retroshare overlay
2. remove the Manifest file
3. remove the cached distfile "${P}.tar.gz" (i.e. retroshare-0.6.7.tar.gz)
4. be sure to not use different SRC_URI saving to the same "${P}.tar.gz" in your .ebuild files
5. `pkgdev manifest`
6. `ebuild retroshare-0.6.7-r1.ebuild clean`
7. `ebuild retroshare-0.6.7-r1.ebuild compile`


> Also in the new file I have:
> 1. changed the description
> 2. fixed the plugins flag (there should be no "-" as pkgcheck scan said)
> 3. Suggested new source URI

There are some extra tabs that you may remove in your latest r2 ebuild:

```
$ diff retroshare-0.6.7-r2.ebuild retroshare-0.6.7-r3.ebuild
10,13c10,14
< SRC_URI="http://download.opensuse.org/repositories/network:/retroshare/Debian_Testing/retroshare-common_${PV}.orig.tar.gz -> ${P}.tar.gz"
< # REVIEW: This URI is closer to upstream
< # SRC_URI="http://github.com/RetroShare/RetroShare/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
< S="${WORKDIR}/RetroShare-${PV}"
---
> SRC_URI="https://download.opensuse.org/repositories/network:/retroshare/Debian_Testing/retroshare-common_${PV}.orig.tar.gz -> ${P}.tar.gz"
> S="${WORKDIR}/RetroShare"
> # NOTE: The upstream archive doens't include submodules
> # SRC_URI="https://github.com/RetroShare/RetroShare/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
> # S="${WORKDIR}/RetroShare-${PV}"
51,52c52,53
< 			media-libs/speex
< 			<media-video/ffmpeg-5
---
> 		media-libs/speex
> 		<media-video/ffmpeg-5
```


> > It would also be helpful if you open a https://github.com/gentoo/gentoo PR ;)
> 
> Aren't PRs for stuff already to be merged? I was thinking that I could do
> that once the thing is more stable.

PRs also trigger sanity checks and update the "See Also" field in Gentoo's Bugzilla with what might close the bug:

https://wiki.gentoo.org/wiki/GitHub_Pull_Requests
https://www.gentoo.org/glep/glep-0076.html
Comment 9 gentoo 2024-04-20 13:52:44 UTC
I have put all this together in a PR:
https://github.com/gentoo/gentoo/pull/36328

I thank you all for the help as I couldn't have done this without you.
Comment 10 Larry the Git Cow gentoo-dev 2024-05-24 07:51:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9dd6ba06e91a78043f7688d5bf5f6673da61a383

commit 9dd6ba06e91a78043f7688d5bf5f6673da61a383
Author:     gentoo-setan <gentoo@supporter.addy.io>
AuthorDate: 2024-05-16 09:11:01 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2024-05-24 07:50:11 +0000

    net-p2p/retroshare: add 0.6.7
    
    Closes: https://bugs.gentoo.org/927207
    Closes: https://github.com/gentoo/gentoo/pull/36697
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 net-p2p/retroshare/Manifest                |   1 +
 net-p2p/retroshare/metadata.xml            |   1 +
 net-p2p/retroshare/retroshare-0.6.7.ebuild | 138 +++++++++++++++++++++++++++++
 3 files changed, 140 insertions(+)