Bug 272071 - news/sabnzbd and news/py-sabctools need to be in sync
Summary: news/sabnzbd and news/py-sabctools need to be in sync
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-18 22:12 UTC by Mark Felder
Modified: 2023-07-09 11:02 UTC (History)
6 users (show)

See Also:


Attachments
Patch to news/sabnzbd 4.0.2 (879 bytes, patch)
2023-06-19 00:11 UTC, James French
no flags Details | Diff
Poudriere build log (36.21 KB, text/plain)
2023-06-19 00:13 UTC, James French
no flags Details
Rollback Py-sabctools to 7.0.2 (870 bytes, patch)
2023-06-21 14:48 UTC, James French
no flags Details | Diff
Patch to news/sabnzbd 4.0.2 with upstream 7.1.0 support (7.23 KB, patch)
2023-07-01 01:47 UTC, James French
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Felder freebsd_committer freebsd_triage 2023-06-18 22:12:25 UTC
Sabnzbd 4.0.0 needs sabctools version 7.0.1 or it will error and refuse to work.

The version of sabctools in ports tree is now 7.1.0.

The latest release of Sabnzbd is 4.0.2 which requires sabctools 7.0.2.


Please keep these packages in sync. There is no other consumer of py-sabctools in the tree.
Comment 1 James French 2023-06-19 00:11:37 UTC
Created attachment 242871 [details]
Patch to news/sabnzbd 4.0.2

Patch to 4.0.2 attached.

Please note, I had deliberately opted not to update from 4.0.0 just yet
 - 4.0.1 was a Windows-only fix
 - 4.0.2 was a fix for the new sabctools which was released a week earlier, it breaks without sabctools 7.1.0 and vice versa without any difference in functionality for our users.

Please note, I am *not* the maintainer of sabctools. Keeping these two ports in sync is completely by best effort, if I need sabctools bumped, I generally submit a patch when I patch sabnzbd.

Kind regards,
James
Comment 2 James French 2023-06-19 00:13:33 UTC
Created attachment 242872 [details]
Poudriere build log
Comment 3 Fernando Apesteguía freebsd_committer freebsd_triage 2023-06-19 07:15:36 UTC
^Triage: reporter is committer, assign accordingly.
Comment 4 Mark Felder freebsd_committer freebsd_triage 2023-06-21 14:14:25 UTC
(In reply to James French from comment #1)

This still does not solve the problem:

Essential modules are missing, downloading cannot start.
SABCTools disabled: no correct version found! (Found v7.1.0, expecting v7.0.2)


As I said in the initial bug report, the version of sabctools needs to be 7.0.2 for Sabnzbd 4.0.2. You can see that requirement here:

https://github.com/sabnzbd/sabnzbd/blob/4.0.2/requirements.txt#L3
Comment 5 Mark Felder freebsd_committer freebsd_triage 2023-06-21 14:20:35 UTC
A better link to the exact place in the code where the version is specified is here:

https://github.com/sabnzbd/sabnzbd/blob/4.0.2/sabnzbd/constants.py#L52
Comment 6 James French 2023-06-21 14:48:46 UTC
Created attachment 242924 [details]
Rollback Py-sabctools to 7.0.2

Apologies, I misunderstood your initial report.

There isn't actually anything I can do with news/sabnzbd to resolve the situation for you - no released version has support the version of sabctools in the tree. 4.0.3 is still not expected for a week or so yet. I'll update the patch once it drops.

I would suggest rolling news/py-sabctools back is the fix for now, but as I said above, I'm not the maintainer of that port. The attached patch will do that, but needs approval from sunpoet@
Comment 7 Mark Felder freebsd_committer freebsd_triage 2023-06-21 14:57:56 UTC
I wonder if we should make py-sabctools a slave of sabnzbd port somehow? 

Perhaps:

news/sabnzbd/Makefile.py-sabctools

just so the PORTVERSION controlled in one place by one maintainer?


This is the only port that needs this library so it should not be under the control of anyone except the sabnzbd maintainer.

I'll try to ping someone on portmgr for advice
Comment 8 Florian Smeets freebsd_committer freebsd_triage 2023-06-22 07:32:13 UTC
FWIW, I reported this to sunpoet almost 10 days ago https://lists.freebsd.org/archives/dev-commits-ports-all/2023-June/068550.html
Comment 9 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-06-30 15:44:28 UTC
I believe it is maintainer's duty to use correct *_DEPENDS in the Makefile.

% grep sabctools /usr/ports/news/sabnzbd/Makefile
                ${PYTHON_PKGNAMEPREFIX}sabctools>=0:news/py-sabctools@${PY_FLAVOR} \
Comment 10 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-06-30 15:59:42 UTC
I've checked Makefile of dependent ports before committing an update.
You cannot expect me to dig into the source code of every dependent ports.

In this case, news/sabnzbd/Makefile should be changed from 
    ${PYTHON_PKGNAMEPREFIX}sabctools>=0:news/py-sabctools@${PY_FLAVOR}
to 
    ${PYTHON_PKGNAMEPREFIX}sabctools>=7.0.2<7.0.2_99:news/py-sabctools@${PY_FLAVOR}

BTW, [1] seems to be the solution. It moved from sabctools 7.0.2 to 7.1.0.

[1] https://github.com/sabnzbd/sabnzbd/commit/a179f2a895259e49f3679405ad59cac06e0bf2d9
Comment 11 James French 2023-07-01 01:47:42 UTC
Created attachment 243086 [details]
Patch to news/sabnzbd 4.0.2 with upstream 7.1.0 support

While it's certainly not my preference to cherry pick from the development branch, I'm happy enough that the upstream commit is harmless enough to support it as port patches to get the port working until 4.0.3 drops. Revised 4.0.2 patch attached with that commit included.

I've tested this and haven't run into any immediate show-stoppers

To my knowledge, this is the first time sabnzbd has been particularly finicky about specific sabctools versions. I've amended the depends line accordingly.
Comment 12 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-07-09 10:25:45 UTC
(In reply to James French from comment #11)

Thanks for confirming the fix from upstream and providing a patch. I'll commit it a few minutes later.
Comment 13 commit-hook freebsd_committer freebsd_triage 2023-07-09 10:46:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e93acc87c3f167677ba187bb3934f7de780df844

commit e93acc87c3f167677ba187bb3934f7de780df844
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-07-09 10:31:57 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-07-09 10:31:57 +0000

    news/sabnzbd: Update to 4.0.2

    - Add py-sabctools 7.1.0 support [1]

    PR:             272071
    Approved by:    James French <james@french.id.au> (maintainer)
    Obtained from:  https://github.com/sabnzbd/sabnzbd/commit/a179f2a895259e49f3679405ad59cac06e0bf2d9 [1]

 news/sabnzbd/Makefile                    |   4 +-
 news/sabnzbd/distinfo                    |   6 +-
 news/sabnzbd/files/patch-sabctools (new) | 115 +++++++++++++++++++++++++++++++
 3 files changed, 120 insertions(+), 5 deletions(-)