View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006657 | unreal | ircd | public | 2026-11-10 23:21 | 2026-11-19 18:54 |
| Reporter | rafaelgrether | Assigned To | syzop | ||
| Priority | normal | Severity | tweak | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 6.2.7 | ||||
| Fixed in Version | 6.2.8 | ||||
| Summary | 0006657: ./unrealircd hot-patch is not working on FreeBSD | ||||
| Description | Hi! This week I tried to apply hot-patch on my 6.2.7 version. The execution apparently went well, as it displayed the message "Patch applied successfully and installed. Reprocessing your IRCd..." and my ircd was rehashed. But looking closely, I noticed that no module was compiled or installed. I did all the checks to make sure everything was like it was before. On IRC, Jellis also helped me with some checks. I looked into the problem today and found that the fault is in these lines of unrealricd script: make || gmake || exit 1 make install || gmake install || exit 1 This happens because when running the make command, the BSDMakefile returns 0, so gmake never gets executed. # make Please use GNU Make (gmake) to build UnrealIRCd # echo $? 0 I thought of a few solutions, and the easiest solution (IMO) would be to change BSDMake by putting an @exit 1 That way, make wouldn't run with exit 1, and gmake would be called automatically. The only problem with this (if you consider this a problem) is that when running "make" on a clean build, the command would give a very verbose error output: Please use GNU Make (gmake) to build UnrealIRCd *** Error code 1 Stop. make: stopped making ".DONE" in /usr/local/unrealircd/unrealircd-6.2.7 Another solution would be to modify the unrealircd script to check the operating system and call make/gmake accordingly, something like: -------------------- case "$(uname -s)" in FreeBSD|OpenBSD|NetBSD) MAKE=gmake ;; *) MAKE=make ;; esac "$MAKE" || exit 1 "$MAKE" install || exit 1 ----------------- What do you think? But any better solution would be very welcome! Thanks, devnull | ||||
| Additional Information | Tested on FreeBSD and OpenBSD | ||||
| 3rd party modules | |||||
|
|
Fixed, thanks for the report! Hot-patching silently failing was not good indeed :D. Glad you followed the whole description to verify modversion. https://github.com/unrealircd/unrealircd/commit/073566d1907addb83b5de4fcc0df13b3b45a77e5 commit 073566d1907addb83b5de4fcc0df13b3b45a77e5 (HEAD -> unreal60_dev, origin/unreal60_dev, origin/HEAD) Author: Bram Matthys <[email protected]> Date: Fri Nov 13 17:50:47 2026 +0100 Detect (g)make in ./unrealircd hot-patch and exit 1 properly. This makes ./unrealircd hot-patch use gmake on FreeBSD. And "make" with bsd make already printed an error: Please use GNU Make (gmake) to build UnrealIRCd .. but it had exit code 0 (success). We now exit 1. Reported by rafaelgrether in https://bugs.unrealircd.org/view.php?id=6657 |
|
|
Thanks Syzop! It solved for FreeBSD! On OpenBSD, "./unrealircd hot-patch" hangs silently after the GPG verification succeeds. The cause is this: if patch --dry-run -p1 -R <patch 1>/dev/null 2>&1; then When the patch has not been applied yet, BSD patch detects an unreversed patch and asks interactively: Unreversed patch detected! Ignore -R? [y] BSD patch reads this answer from /dev/tty, not from stdin, so redirecting stdin from the patch file does not prevent the prompt. Since stdout/stderr go to /dev/null, the prompt is invisible, and for the user, apparently hangs. GNU patch does not show this behaviour because it only prompts when stdin is a terminal. The solution is adding "-f" to both dry-run checks: - if patch --dry-run -p1 -R <patch 1>/dev/null 2>&1; then + if patch -f --dry-run -p1 -R <patch 1>/dev/null 2>&1; then - if ! patch --dry-run -p1 -N <patch 1>/dev/null 2>&1; then + if ! patch -f --dry-run -p1 -N <patch 1>/dev/null 2>&1; then "patch -f" works on Gnu Linux and BSD* for --dry-run It would be a small change to keep compatibility with OpenBSD/NetBSD... if you're interested. Thanks! |
|
|
Thanks Rafael, for reopening, definitely wanted this fixed yeah :] https://github.com/unrealircd/unrealircd/commit/3cb1eecf5c7165cb23aa4ea40a1678d0f3c20f0f commit 3cb1eecf5c7165cb23aa4ea40a1678d0f3c20f0f (HEAD -> unreal60_dev, origin/unreal60_dev, origin/HEAD) Author: Bram Matthys <[email protected]> Date: Wed Nov 18 09:28:03 2026 +0100 Fix ./unrealircd hot-patch script failing on OpenBSD (Re-)Reported by rafaelgrether in https://bugs.unrealircd.org/view.php?id=6657 |
|
|
And another fix for the fix: commit 4c0a89f21a6547ae49760f60657f6f19b406f1c1 (HEAD -> unreal60_dev, origin/unreal60_dev, origin/HEAD) Author: Bram Matthys <[email protected]> Date: Thu Nov 19 18:47:38 2026 +0100 Fix ./unrealircd hot-patch on *BSD This also fixes fix 3cb1eecf5c7165cb23aa4ea40a1678d0f3c20f0f :-) It's becoming a bit elaborate this patching: 1) I did not want to touch the Linux route because that works well 2) I could not always pass -f since it can have side effects on Linux 3) Ugh.. i don't want to talk any more about this :-) And release notes are now: * Multiple `./unrealircd hot-patch` fixes: .... * With non-GNU patch on *BSD it would hang and say "Patch already applied" after pressing ENTER (which wasn't true). * On FreeBSD it would fail to recompile too and report success. Thanks! |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-10 23:21 | rafaelgrether | New Issue | |
| 2026-11-13 17:53 | syzop | Assigned To | => syzop |
| 2026-11-13 17:53 | syzop | Status | new => resolved |
| 2026-11-13 17:53 | syzop | Resolution | open => fixed |
| 2026-11-13 17:53 | syzop | Fixed in Version | => 6.2.8-rc1 |
| 2026-11-13 17:53 | syzop | Note Added: 0023737 | |
| 2026-11-13 17:54 | syzop | Note Edited: 0023737 | |
| 2026-11-16 22:50 | rafaelgrether | Status | resolved => feedback |
| 2026-11-16 22:50 | rafaelgrether | Resolution | fixed => reopened |
| 2026-11-16 22:50 | rafaelgrether | Note Added: 0023742 | |
| 2026-11-18 09:37 | syzop | Status | feedback => resolved |
| 2026-11-18 09:37 | syzop | Resolution | reopened => fixed |
| 2026-11-18 09:37 | syzop | Fixed in Version | 6.2.8-rc1 => 6.2.8 |
| 2026-11-18 09:37 | syzop | Note Added: 0023743 | |
| 2026-11-19 18:54 | syzop | Note Added: 0023748 |