Bug 275329 - net-p2p/jigdo: Upgrade to 0.8.2
Summary: net-p2p/jigdo: Upgrade to 0.8.2
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: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-25 11:15 UTC by mc.dhuibh
Modified: 2024-03-03 17:40 UTC (History)
2 users (show)

See Also:


Attachments
Patch to upgrade net-p2p/jigdo to v0.8.2 (6.67 KB, patch)
2023-11-25 11:15 UTC, mc.dhuibh
no flags Details | Diff
0002 Patch to upgrade net-p2p/jigdo to v0.8.2 (8.46 KB, patch)
2023-12-10 23:45 UTC, mc.dhuibh
no flags Details | Diff
0003 Patch to upgrade net-p2p/jigdo to v0.8.2 (8.69 KB, patch)
2024-02-27 01:26 UTC, mc.dhuibh
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mc.dhuibh 2023-11-25 11:15:11 UTC
Created attachment 246561 [details]
Patch to upgrade net-p2p/jigdo to v0.8.2

As mentioned in PR 266573 the author of net-p2p/jigdo has updated the software to use sha256 instead of MD5. The current version is now 0.8.2 though. I'm submitting the attached patch, which successfully builds in Poudriere with FreeBSD 12.4 and 13.2 jails. I can also test on the just-released v14.

I needed to add both docbook-utils as well as sgmlformat dependencies to get the man pages to build. I was unable to get the html versions of the documentation to build using docbook2html, which is expected by the way the author structured the build. I don't know if the problem is with docbook-utils or the source files or another explanation. The porters handbook implies the html documentation is optional, so I modified the makefiles to only build the man pages.

One of the sed calls used to rename the man page output of docbook2man I could not get to work. (The makefiles don't have comments explaining, but it looks like the sgml to man file conversion by docbook2man produces filenames with locale information that the author's scripts removed.) So I did the file renaming using brename and added a dependency to make sure it' available. I didn't see direction in the porters handbook about preferred renaming utilities, so if using brename is the wrong way to do this, I can try again a different way.

I did need to set MAKE_JOBS_UNSAFE, I think because I couldn't use the author's makefile code to move the man pages out of the temporary directory the author uses to create them, and the line or two I added do it instead didn't like multiple jobs. I wasn't sure how to fix that though.

The new distfile I checked using the author's gpg key and signature, which he provides on his webpage.

With the attached patch I removed from the package Makefile the GUI options, because it looks like this depended on Glade2/GTK2 and I guess those are not really in FreeBSD ports anymore? So didn't see how the GUI option could be built any longer from available ports.

Portlint complained there was no license field completed, but that's also the case with the current port version. The author seems to be using a modified version of GPLv2, so I added the name of the file that contains the license information, but wasn't sure what else to do because the license wasn't strictly GPL.

Docbook2man objected to a missing closing paragraph tag in one of the sgml source files used to build the documentation, so I patched that too.

The porters handbook says prefer not to manually strip binaries produced with the port, but the current port does that and when I tried removing the post-install call that strips the binary the resulting package had an unstripped binary. I don't know if that was supposed to happen, so I left the post-install STRIP_CMD alone.

Thank you for considering upgrading this port to 0.8.2!
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2023-11-27 08:12:51 UTC
Thanks for your submission!

Have you considered to use USES=localbase in the Makefile?
Also, why does the WWW and MASTER_SITE change?

Cheers.
Comment 2 mc.dhuibh 2023-12-10 23:45:52 UTC
Created attachment 246962 [details]
0002 Patch to upgrade net-p2p/jigdo to v0.8.2

Thank you for the localbase suggestion!  I noticed that the current dependencies I needed to add to get jigdo to build were using some libraries under $LOCALBASE so I went ahead and added localbase:ldflags to the USES line.  I also reviewed the porter's handbook discussion of LOCALBASE, and made a change to the line in the Makefile calling brename to refer to the binary under $LOCALBASE/bin/brename instead of just calling brename.

I moved some of the variables in the port Makefile around to address portlint warnings about their locations.  I found an item that I must have missed earlier for pkg-plist, so I've included that now too (share/locale/de/LC_MESSAGES/jigdo.mo)

I ran the tests described in the porter's handbook with this updated patch, which builds with poudriere testport with a recent ports tree checkout and FreeBSD versions 12.4, 13.2, and 14.0.  I also installed the patched port in a FreeBSD 14.0 jail and it looks to be working for me there.

According to Steve McIntyre's website (https://www.einval.com/~steve/software/jigdo/), the original author of jigdo is Richard Atterer.  Steve McIntyre explains how he added the SH256 algorithm starting with jigdo version 0.8.0. Prior versions appear used MD5. Steve McIntyre points to http://atterer.org/jigdo for an explanation about the handover from Richard Atterer.  The original content no longer seems to be up, but I was able to find an archived version at https://web.archive.org/web/20230227215619/http://atterer.org/jigdo That site appears to explain that Richard Atterer wasn't maintaining jigdo any longer so development was handed over to Steve McIntyre ("a forked version") and directs users to einval.com

The debian project uses jigdo for distributing large images and making mirroring less burdensome. I was able to find an old bug from 2014 where Steve McIntyre (current jigdo maintainer for debian) says he was taking over maintenance of the package. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772110  He says there "Hmmm, it's probably time that somebody picked up jigdo-file and maintained it I guess. I'll add it to my list."  His debian biography says he's team lead for Debian-CD (https://nm.debian.org/person/93sam/) and the project is still using jigdo for software distribution.

Since all uses of jigdo I was able to find seemed to point back to Steve McIntyre's site at this time, and because Richard Atter's jigdo site appears to be offline, it looked like einval.com was the right place to retrieve the version 0.8.2 source code for jigdo now instead of atterer.org.
Comment 3 mc.dhuibh 2024-02-21 06:22:01 UTC
I was concerned to find a proposal to remove jigdo from ports? https://reviews.freebsd.org/R11:f92c1373ea8d12d0cf7fc9e9f3a06aa1d793943b

Losing access to jigdo would be unfortunate. It's useful, actively maintained software that is packaged for users of other OSes. Can we keep it packaged for FreeBSD users too? 

Is there anything missing from the patch I submitted that prevents updating jigdo to the current version (0.8.2) in ports?
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2024-02-23 13:48:59 UTC
Hi there,

Would you have a look at the patch?

$ git apply ~/Downloads/Updates-net-p2p-jigdo-version-to-0.8.2.patch
/home/fernape/Downloads/Updates-net-p2p-jigdo-version-to-0.8.2.patch:117: space before tab in indent.
                    $(INSTALL_EXE) src/jigdo-file "$$jdir"; \
/home/fernape/Downloads/Updates-net-p2p-jigdo-version-to-0.8.2.patch:118: space before tab in indent.
                    grep -v "^##" $(srcdir)/doc/README-bindist.txt \
/home/fernape/Downloads/Updates-net-p2p-jigdo-version-to-0.8.2.patch:119: space before tab in indent.
                        >"$$jdir/README"; \
/home/fernape/Downloads/Updates-net-p2p-jigdo-version-to-0.8.2.patch:121: space before tab in indent.
                    $(INSTALL_DATA) $(srcdir)/doc/*.1    "$$jdir"; \
/home/fernape/Downloads/Updates-net-p2p-jigdo-version-to-0.8.2.patch:122: space before tab in indent.
                    $(INSTALL_DATA) $(srcdir)/COPYING    "$$jdir"; \
error: patch failed: net-p2p/jigdo/Makefile:1
error: net-p2p/jigdo/Makefile: patch does not apply
Comment 5 mc.dhuibh 2024-02-27 01:26:15 UTC
Created attachment 248771 [details]
0003 Patch to upgrade net-p2p/jigdo to v0.8.2

(In reply to Fernando Apesteguía from comment #4)

Thank you Fernando! It looks like two commits to jigdo happened since December: one deprecates the older version currently in ports, the second moved jigdo's manpages to ${PREFIX}/share/man (https://lists.freebsd.org/archives/freebsd-ports/2024-January/005181.html)

Starting with ports commit ac77685e810efffdc9cf9e6b64ce70bb8d4855a0 I recreated the patch with the changes from earlier in the PR. I also set PORTREVISION back to 0 with this patch, because it's a whole version upgrade. It also removes the DEPRECATED and EXPIRATION_DATE entries.

For me this patch successfully passes poudriere testport as of ports commit ac77685e810 with current jails of FreeBSD 14.0 and 13.2.
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2024-03-02 18:33:47 UTC
^Triage: If there is a changelog or release notes URL available for this version, please add it to the URL field.


Thanks!
Comment 7 Fernando Apesteguía freebsd_committer freebsd_triage 2024-03-03 17:40:35 UTC
Committed,

Thanks!
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-03-03 17:40:39 UTC
A commit in branch main references this bug:

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

commit eda7dc55648b0f6003a5b6c546234e380d5fc60c
Author:     Fernando Apesteguía <fernape@FreeBSD.org>
AuthorDate: 2024-03-02 18:33:24 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2024-03-03 17:40:10 +0000

    net-p2p/jigdo: Upgrade to 0.8.2

    PR:             275329
    Reported by:    mc.dhuibh@proton.me

 net-p2p/jigdo/Makefile                             | 32 +++++++-------
 net-p2p/jigdo/distinfo                             |  5 ++-
 net-p2p/jigdo/files/patch-Makefile.in (new)        | 18 ++++++++
 net-p2p/jigdo/files/patch-doc_Makefile.in (new)    | 49 ++++++++++++++++++++++
 .../jigdo/files/patch-doc_jigdo-file.sgml (new)    | 11 +++++
 net-p2p/jigdo/files/patch-src__compat.hh (gone)    | 10 -----
 net-p2p/jigdo/pkg-plist                            | 13 +-----
 7 files changed, 97 insertions(+), 41 deletions(-)