Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 905708 - net-vpn/tor - an upgrade of app-arch/zstd should trigger a rebuild of Tor
Summary: net-vpn/tor - an upgrade of app-arch/zstd should trigger a rebuild of Tor
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: John Helmert III
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-04 16:36 UTC by Toralf Förster
Modified: 2023-09-19 09:52 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-05-04 16:36:04 UTC
Otherwise the user gets in the Tor log sth like: 

Tor was compiled with zstd 1.5.4, but is running with zstd 1.5.5. For safety, we'll avoid using advanced zstd functionality.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-05 05:25:11 UTC
We also can't really do it without inflicting rebuilds on other packages totally unnecessarily.

So, let's instead pass --disable-zstd-advanced-apis. Per https://github.com/facebook/zstd/blob/dev/lib/README.md#advanced-api, it's not really something people should be using in production anyway, let alone Tor which is pretty critical...
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-05 05:27:12 UTC
(In reply to Sam James from comment #1)
> We also can't really do it without inflicting rebuilds on other packages
> totally unnecessarily.
> 
> So, let's instead pass --disable-zstd-advanced-apis. Per
> https://github.com/facebook/zstd/blob/dev/lib/README.md#advanced-api, it's
> not really something people should be using in production anyway, let alone
> Tor which is pretty critical...

wait, we already pass it? We did it for bug 727406.

What tor package version was this?
Comment 3 Toralf Förster gentoo-dev 2023-05-05 07:03:34 UTC
Oh, I do use my own ebuild for that : https://github.com/toralf/tgro/tree/main/net-vpn/tor

If zstd is not activated in main ebuild then I'll handle it by my own, sure.
Comment 4 Toralf Förster gentoo-dev 2023-05-05 07:04:59 UTC
(In reply to Toralf Förster from comment #3)
> If zstd is not activated in main ebuild then I'll handle it by my own, sure.

eg https://github.com/toralf/torutils/blob/main/update_tor.sh#L60
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-05 07:06:14 UTC
(In reply to Toralf Förster from comment #3)
> Oh, I do use my own ebuild for that :
> https://github.com/toralf/tgro/tree/main/net-vpn/tor
> 
> If zstd is not activated in main ebuild then I'll handle it by my own, sure.

Ah, you need to pass --disable-zstd-advanced-apis.

We support zstd in the main ebuild, but not this option which seems a bit dangerous (given upstream zstd's description of it).

Do you want me to bring 9999 into ::gentoo?
Comment 6 Toralf Förster gentoo-dev 2023-05-05 07:10:09 UTC
(In reply to Sam James from comment #5)

> Do you want me to bring 9999 into ::gentoo?
Oh - yes, thx Sam - that option then has to be unset per default, right ?

I run -9999 here since 1-2 yrs, so it works AFAICT.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-05 07:11:21 UTC
(In reply to Toralf Förster from comment #6)
> (In reply to Sam James from comment #5)
> 
> > Do you want me to bring 9999 into ::gentoo?
> Oh - yes, thx Sam - that option then has to be unset per default, right ?
> 

Yeah, it's unset by default sadly (which is surprising) (so default = experimental options!)

> I run -9999 here since 1-2 yrs, so it works AFAICT.

Thanks! I will do that now
Comment 8 Larry the Git Cow gentoo-dev 2023-05-05 07:29:50 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23026087ef73829b1554ce1a8ac35e3652df870f

commit 23026087ef73829b1554ce1a8ac35e3652df870f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-05 07:28:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-05 07:29:40 +0000

    net-vpn/tor: add commentary wrt --disable-zstd-advanced-apis
    
    Bug: https://bugs.gentoo.org/727406
    Bug: https://bugs.gentoo.org/905708
    Signed-off-by: Sam James <sam@gentoo.org>

 net-vpn/tor/tor-0.4.7.13-r1.ebuild | 8 ++++++++
 net-vpn/tor/tor-9999.ebuild        | 8 ++++++++
 2 files changed, 16 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9134c79752e263fa310ffdfc9c03e1af3ae22e41

commit 9134c79752e263fa310ffdfc9c03e1af3ae22e41
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-05 07:19:49 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-05 07:29:39 +0000

    net-vpn/tor: add 9999
    
    Adding for toralf. Based on https://github.com/toralf/tgro/tree/main/net-vpn/tor.
    
    Bug: https://bugs.gentoo.org/905708
    Signed-off-by: Sam James <sam@gentoo.org>

 net-vpn/tor/tor-9999.ebuild | 154 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 154 insertions(+)
Comment 9 Larry the Git Cow gentoo-dev 2023-09-19 09:24:01 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c24abe3c96312a18be71666f9fb6b3bbb986514

commit 2c24abe3c96312a18be71666f9fb6b3bbb986514
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-19 09:18:21 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-19 09:18:21 +0000

    net-vpn/tor: add 0.4.8.6
    
    Drop setting --disable-zstd-advanced-apis per https://gitlab.torproject.org/tpo/core/tor/-/issues/40815
    as it's been downgraded to a far less scary message.
    
    Bug: https://gitlab.torproject.org/tpo/core/tor/-/issues/40815
    Closes: https://bugs.gentoo.org/727406
    Closes: https://bugs.gentoo.org/905708
    Signed-off-by: Sam James <sam@gentoo.org>

 net-vpn/tor/Manifest           |   3 +
 net-vpn/tor/tor-0.4.8.6.ebuild | 177 +++++++++++++++++++++++++++++++++++++++++
 net-vpn/tor/tor-9999.ebuild    |  10 +--
 3 files changed, 181 insertions(+), 9 deletions(-)