Bug 281303

Summary: irc/epic4: Update to 3.0
Product: Ports & Packages Reporter: epic
Component: Individual Port(s)Assignee: Gabriel M. Dutra <dutra>
Status: Closed FIXED    
Severity: Affects Some People CC: diizzy, dutra, epic, mew14930xvi, vvd
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
epic4-3.0.patch
epic: maintainer-approval+
epic4-3.0.patch (corrected)
epic: maintainer-approval+
epic4-3.0.patch (corrected, again)
epic: maintainer-approval+
epic4-3.0.patch (corrected, post-extract removed) epic: maintainer-approval+

Description epic 2024-09-05 20:16:10 UTC
Created attachment 253362 [details]
epic4-3.0.patch

irc/epic4: Update to 3.0

From the KNOWNBUGS file:
    * Fix configure probes for sockaddr_storage et al on glibc >= 2.39
    * Celebrating 30 years of EPIC with ceremonial 3.0 release

Tested with `poudriere testport` and `portlint`.
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2024-09-06 04:12:38 UTC
What's up with hacking of CFLAGS (optimizations) and -g for debugging?

PLIST_SUB --> DISTVERSION

post-extract section seems to be obsolete?
Comment 2 epic 2024-09-06 05:50:34 UTC
Created attachment 253370 [details]
epic4-3.0.patch (corrected)

(In reply to Daniel Engberg from comment #1)
epic4 is a C90 program which makes significant use of type punning/aliasing and modern compilers too aggressively "optimize" the source. Using -O2 will result in "undefined behavior." I don't think it does anything with -g? Isn't that a regular expression flag? Maybe I'm misunderstanding?

I believe if I remove the Makefile line from post-patch section it'll result in the Makefile being copied to the help/ directory (necessitating a pkg-plist update, which I don't think is necessary). However, replacing -lcurses with -lncurses does seem superfluous, so I've removed it.

Updated PLIST_SUB.

Thank you for the close eye!
Comment 3 Gabriel M. Dutra freebsd_committer freebsd_triage 2024-09-07 16:14:35 UTC
Hi,

I couldn't apply the patch.

error: error: corrupt patch at line 54


Please, use git format-patch to generate the patch file. See the handbook:

https://docs.freebsd.org/en/books/porters-handbook/quick-porting/#porting-submitting
Comment 4 epic 2024-09-07 16:26:19 UTC
Created attachment 253403 [details]
epic4-3.0.patch (corrected, again)

Looks the same to me, should have worked with `patch -p1 < epic4-3.0.patch`, but here it is generated by `git format-patch` instead. Cheers!
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2024-09-07 16:29:47 UTC
Thanks for clearing up my questions and updating the patch.
I meant to ask about post-extract though (sorry), the committers can remove this as I cant seem to find a reason to keep it.
https://cgit.freebsd.org/ports/tree/irc/epic4/Makefile#n40

Just "git diff > foo.patch" will do fine too :)
Comment 6 epic 2024-09-07 16:31:51 UTC
(In reply to Daniel Engberg from comment #5)

Hah, getting confused now. `git diff` is how I made all the previous patches!

I'll review the post-extract section now and update the patch again. I think I might have accidentally replaced the tabs with spaces in the last one.
Comment 7 epic 2024-09-07 16:43:15 UTC
Created attachment 253404 [details]
epic4-3.0.patch (corrected, post-extract removed)

Generated with `git diff`, post-extract section confirmed unnecessary & removed. Tested with `poudriere testport` and verified it applies to clean ports tree:

root@ports01:/usr/local/poudriere/ports/HEAD # git diff irc/epic4 > epic4-3.0.patch
root@ports01:/usr/local/poudriere/ports/HEAD # rm -rf irc/epic4
root@ports01:/usr/local/poudriere/ports/HEAD # git checkout origin/main -- irc/epic4
root@ports01:/usr/local/poudriere/ports/HEAD # patch -p1 < epic4-3.0.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/irc/epic4/Makefile b/irc/epic4/Makefile
|index 5c812c2e00f0..29ebfff908a6 100644
|--- a/irc/epic4/Makefile
|+++ b/irc/epic4/Makefile
--------------------------
Patching file irc/epic4/Makefile using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 16.
Hunk #3 succeeded at 37.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/irc/epic4/distinfo b/irc/epic4/distinfo
|index 8f4e8e5b814e..53d52c7a7e7a 100644
|--- a/irc/epic4/distinfo
|+++ b/irc/epic4/distinfo
--------------------------
Patching file irc/epic4/distinfo using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/irc/epic4/pkg-plist b/irc/epic4/pkg-plist
|index 1fb34f82e389..86fbc92ef142 100644
|--- a/irc/epic4/pkg-plist
|+++ b/irc/epic4/pkg-plist
--------------------------
Patching file irc/epic4/pkg-plist using Plan A...
Hunk #1 succeeded at 1.
done
Comment 8 Gabriel M. Dutra freebsd_committer freebsd_triage 2024-09-07 18:33:49 UTC
Sorry, but the patch couldn't not be applied here.

Try using git format-patch.


Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/irc/epic4/Makefile b/irc/epic4/Makefile
|index 5c812c2e00f0..29ebfff908a6 100644
|--- a/irc/epic4/Makefile
|+++ b/irc/epic4/Makefile
--------------------------
Patching file irc/epic4/Makefile using Plan A...
Hunk #1 failed at 1.
Hunk #2 failed at 16.
Hunk #3 failed at 37.
3 out of 3 hunks failed--saving rejects to irc/epic4/Makefile.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/irc/epic4/distinfo b/irc/epic4/distinfo
|index 8f4e8e5b814e..53d52c7a7e7a 100644
|--- a/irc/epic4/distinfo
|+++ b/irc/epic4/distinfo
--------------------------
Patching file irc/epic4/distinfo using Plan A...
Hunk #1 failed at 1.
1 out of 1 hunks failed--saving rejects to irc/epic4/distinfo.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/irc/epic4/pkg-plist b/irc/epic4/pkg-plist
|index 1fb34f82e389..86fbc92ef142 100644
|--- a/irc/epic4/pkg-plist
|+++ b/irc/epic4/pkg-plist
--------------------------
Patching file irc/epic4/pkg-plist using Plan A...
Hunk #1 failed at 1.
1 out of 1 hunks failed--saving rejects to irc/epic4/pkg-plist.rej
Hmm...  Ignoring the trailing garbage.
done
Comment 9 mew14930xvi 2024-09-07 19:13:42 UTC
It could be applied as follow.

tr -d '\15' <file_281303.txt >file_281303.patch
printf '\n' >>file_281303.patch
git apply file_281303.patch
Comment 10 mew14930xvi 2024-09-07 19:28:55 UTC
Try ‘attach a file’ instead of ‘paste text as attachment’.
Comment 11 commit-hook freebsd_committer freebsd_triage 2024-09-07 21:38:09 UTC
A commit in branch main references this bug:

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

commit bfb1c4a0dfd18db18a8c71233a73ab87a42e3ba2
Author:     Gabriel M. Dutra <dutra@FreeBSD.org>
AuthorDate: 2024-09-07 21:32:35 +0000
Commit:     Gabriel M. Dutra <dutra@FreeBSD.org>
CommitDate: 2024-09-07 21:36:43 +0000

    irc/epic4: Update to 3.0

    changes:
      * Fix configure probes for sockaddr_storage et al on glibc >= 2.39
      * Celebrating 30 years of EPIC with ceremonial 3.0 release

    PR:             281303
    Reported by:    epic at dsllsn.net

 irc/epic4/Makefile  | 10 +++-------
 irc/epic4/distinfo  |  6 +++---
 irc/epic4/pkg-plist |  2 +-
 3 files changed, 7 insertions(+), 11 deletions(-)
Comment 12 Gabriel M. Dutra freebsd_committer freebsd_triage 2024-09-07 21:38:46 UTC
Committed, thank you!