Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1655324 - borgmatic package is missing dependencies in CentOS 7
Summary: borgmatic package is missing dependencies in CentOS 7
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: borgmatic
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Felix Kaechele
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1808090 1763554
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-02 19:10 UTC by Julien Nicoulaud
Modified: 2020-07-19 16:01 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Julien Nicoulaud 2018-12-02 19:10:25 UTC
Description of problem:
borgmatic package is missing at least 2 runtime dependencies when installed in CentOS 7.5.1804:
 * ruamel.yaml<=0.15 (which is available in EPEL: python34-ruamel-yaml-0.13.14-1.el7.x86_64)
 * pykwalify>=1.6.0 (which is not available)


Version-Release number of selected component (if applicable):
version 1.1.15 release 2.el7

How reproducible:
Always

Steps to Reproduce:
1. yum install borgmatic
2. borgmatic

Actual results:
```
Traceback (most recent call last):
  File "/usr/bin/borgmatic", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 3140, in <module>
    @_call_aside
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 3126, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 3153, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 640, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 941, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 828, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'ruamel.yaml<=0.15' distribution was not found and is required by borgmatic
```


Expected results:
No import error

Additional info:
The source RPM at dl.fedoraproject.org/pub/epel/7/SRPMS/Packages/b/borgmatic-1.1.15-2.el7.src.rpm indicates those dependencies are included in Fedora, but only as build deps, so I believe the package requires fixing for Fedora as well.

Comment 1 Jelle de Jong 2019-04-05 10:04:02 UTC
I can confirm this bug on latest centos 7 versions, can somebody take a look at the bug and fix the dependencies?

Comment 2 Jb 2019-06-04 23:39:08 UTC
Confirm bug still present in Fedora 29 and 30, with impossible-to-meet dependencies of python3-ruamel-yaml

    # dnf install borgmatic
    [...]
    Error: 
     Problem: conflicting requests
      - nothing provides python3.7dist(ruamel.yaml) <= 0.15 needed by borgmatic-1.2.0-3.fc30.x86_64

First of all: should I open a separate ticket for the Fedora aspect of this? (issue definitely related but different platform than initially reported)

Now for some digging: (tell me if misguided!)

Available version of package in F30:

    # dnf info python3-ruamel-yaml
    Name         : python3-ruamel-yaml
    Version      : 0.15.41
    Release      : 4.fc30
    Architecture : x86_64
    Size         : 1.2 M
    Source       : python-ruamel-yaml-0.15.41-4.fc30.src.rpm
    [...]

Borgmatic upstream test-requirements.txt file[1] states `ruamel.yaml>0.15.0,<0.16.0` is ok, so the package available in Fedora30 should be ok to use, which makes me think it's the Fedora repackaging that's pinning down ruamel.yaml unnecesarily.
Reading the package spec of Fedora[2] doesn't reveal any specific package version pinning (but I've never worked with Fedora's package spec system, might be wrong there).

Out of curiosity, I started digging for why ruamel-yaml >0.15.0 could be bad, and came up with package description warning of API deprecation[3], but a discussion on borgmatic tracker[4] which concluded the 0.15.0 pinning requirement was obsolete and a commit in master[5] removed it.

---

Summarizing: Dependency seems pinned in borgmatic's Fedora packaging (but I couldn't see explicitly where that is done in package spec), and the pinning seems unnecessary since upstream tests with a similar version Fedora has available in package repos.
If someone can help me find the place where that dep is pinned, we can try changing the spec, build the pkg, giving it a go, and hopefully fix this wonderful package for everyone.



[1]: https://projects.torsion.org/witten/borgmatic/src/branch/master/test_requirements.txt#L23
[2]: https://apps.fedoraproject.org/packages/borgmatic/sources/spec/
[3]: https://pypi.org/project/ruamel.yaml/
[4]: https://projects.torsion.org/witten/borgmatic/issues/38
[5]: https://projects.torsion.org/witten/borgmatic/commit/d29c7956bc17ef106483c17ef5d256077463f571

Comment 3 Jb 2019-06-07 00:59:12 UTC
(In reply to Jb from comment #2)
> Summarizing: Dependency seems pinned in borgmatic's Fedora packaging (but I
> couldn't see explicitly where that is done in package spec), and the pinning
> seems unnecessary since upstream tests with a similar version Fedora has
> available in package repos.

Hah, I was so wrong. I downloaded the impossible-to-install RPM file from dnf and it is the upstream python package's requirements.txt[1] that has the "pinning", causing dnf to fail installation.
Turns out the restriction on package version was loosened in 1.2.1[2], one patch release after 1.2.0 that fedora is trying to ship.

So I'll try bumping the required version of package in fedora's packaging system[3]. 

Funny enough, this change would be in line with the "upgrade the package version" bug[4], even though we'd just go to 1.2.1 instead of latest=1.3.4



[1]: In borgmatic-1.2.0-3.fc30.x86_64.rpm the file is usr/lib/python3.7/site-packages/borgmatic-1.2.0-py3.7.egg-info/requires.txt which states ruamel.yaml<=0.15
[2]: version 1.2.1 shipped this change https://projects.torsion.org/witten/borgmatic/commit/d29c7956bc17ef106483c17ef5d256077463f571 
[3]: https://src.fedoraproject.org/rpms/borgmatic/blob/master/f/sources
[4]: https://bugzilla.redhat.com/show_bug.cgi?id=1592160

Comment 4 Felix Kaechele 2020-06-07 16:59:45 UTC
Unfortunately, I am not getting any response from the maintainer of pykwalify on the blocker bug.
Meanwhile, feel free to use my COPR which has current builds + dependencies for EPEL7 and EPEL8.

Comment 5 Felix Kaechele 2020-07-19 16:01:14 UTC
python36-ruamel-yaml will need updating to. I am hoping the recent CVE filed for it provides enough incentive to bump the version in EPEL 7.


Note You need to log in before you can comment on or make changes to this bug.