Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 621362 - app-backup/zbackup protobuf dependency should be relaxed ... maybe
Summary: app-backup/zbackup protobuf dependency should be relaxed ... maybe
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Vladimir Pavljuchenkov (SpiderX)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-10 01:47 UTC by Greg Turner
Modified: 2017-12-28 15:09 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 Greg Turner 2017-06-10 01:47:58 UTC
Still trying to decode this so apologies for this bug which is kind of a cry for help.

It pertains to the "<dev-libs/protobuf-3:0=" restriction in the DEPEND of app-backup/zbackup (in particular, the "<" part).  Downgrading protobuf does not look like a practical solution for me so I'm trying to find alternatives.

There is an open pull request to zbackup stating that protobuf-3 is incompatible due to a type conflict (zero_copy_stream::ByteCount was int64_t and became google::protobuf::int64) and macro collision (CHECK in check.hh).  That PR is here:

https://github.com/zbackup/zbackup/pull/130

So clearly, at some point, the "<dev-libs/protobuf-3:0=" DEPEND was correctly specified.

However, now, if I force the installation anyhow (i.e., by manually running the ebuild at the command-line), it all works.  

The failure this is supposed to cause is depicted here:

https://gist.github.com/ejb1123/f7cdbe982564a2ef4814f2e7bdf12aa3

check.hh still contains the CHECK macro so the logical conclusion looks to me to be that since this DEPEND was codified, protobuf has thought better of trying to stake out "CHECK" for itself in the global macro namespace and released a version that no longer conflicts with zbackup.

How the int64_t thing is not a problem anymore I have not investigated yet.  Perhaps also Google decided int64_t was good enough and went back, or provided an overloaded backward compatibility method, but those explanations seem less plausible.

Anyhow, I don't see any type-conflict warning during the build.  I have not done any runtime testing yet (so I sure as hell am not going to assume any backups are good without some testing :)).  I suppose it's also possible this code only gets pulled in conditionally -- I believe this has to do with the encryption feature of zbackup which I presume is activated in my build.

Anyone have an idea of what the heck is going on?  It'd like to play with zbackup but not if it means uninstalling everything under the sun including my DE and music player...

Assuming recent protobuf is not incompatible, then there is the question of how to fix the zbackup DEPEND in the ebuild -- specifically, is there a working way to deal with unslotted all-except-this-range-of-versions dependencies that won't cause portage to freak out?

Disclaimer: My portage tree is slightly out-of-date (May 21 2017) and I don't want to mess with it ATM.  So if I've created any noise due to that, please accept my apologies in advance.  I doubt it, however -- zbackup seems idle on github since late 2016.
Comment 1 Vladimir Pavljuchenkov (SpiderX) 2017-07-04 15:49:18 UTC
> Assuming recent protobuf is not incompatible, then there is the question of how to fix the zbackup DEPEND in the ebuild -- specifically, is there a working way to deal with unslotted all-except-this-range-of-versions dependencies that won't cause portage to freak out?

You always can create a local overlay and put original ebuild into it.
Modify it by removing "<".

HowTo - https://wiki.gentoo.org/wiki/Custom_repository

As for addressing this issue in portage.
An ideal solution will be a merge PR you have mention with main source tree of zbackup on github.
If this will not happen, then patch from PR can be introduced for ebuild, and we can make something like this:

DEPEND="app-arch/lzma
        dev-libs/lzo:2
        sys-libs/zlib
        protobuf-2? ( <dev-libs/protobuf-3:0= )
        !protobuf-2? ( >=dev-libs/protobuf-3:0= )
        !libressl? ( dev-libs/openssl:0= )
        libressl? ( dev-libs/libressl:0= )"

But before doing this two things have to happen:

1. A patch from PL should be well tested.
2. Protobuf-3 ebuild should be stabilized.
Comment 2 Vladimir Pavljuchenkov (SpiderX) 2017-12-25 14:51:11 UTC
I have tested build and further work zbackup with all protobuf versions available in portage and I didn't find any issues.
I don't see any reason to keep "<dev-libs/protobuf-3:0=" in ebuild anymore.

As for links you provided (https://github.com/zbackup/zbackup/pull/130) this is not needed anymore. For example, [CHECK moved to GOOGLE_CHECK](https://github.com/haberman/protobuf/commit/874e382fde23bb169a2a9cb0f28063c54f8eed4e)
Comment 3 Larry the Git Cow gentoo-dev 2017-12-28 15:09:48 UTC
The bug has been closed via the following commit(s):

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

commit caefab200144aa674b38e522bcb3d08540625b9b
Author:     Vladimir Pavljuchenkov (SpiderX) <spiderx@spiderx.dp.ua>
AuthorDate: 2017-12-25 14:45:46 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2017-12-28 15:09:29 +0000

    app-backup/zbackup: relax protobuf dependency (wrt #621362)
    
    Closes: https://bugs.gentoo.org/621362
    Package-Manager: Portage-2.3.13, Repoman-2.3.3

 app-backup/zbackup/zbackup-9999.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)