Greetings, I was the original submitter of this port way back in 2002, and included a patch to correct a bug in the original code. Just now I was compiling that code again and noticed another bug which I had missed back then. Around line 2706 of taipan.c, we see: hkw_[0] = 0; hkw_[1] = 0; hkw_[3] = 0; hkw_[4] = 0; That last subscript is out of bounds. The subscripts in those lines should be 0, 1, 2, 3. Could someone update files/patch-taipan.c to fix the subscripts too? Thanks, Dave
Created attachment 166331 [details] Patch for taipan.c Please copy the patch to /usr/ports/games/taipan/files, Apply the patch and check the file taipan.c. Please verify if the game works as expected. I have made the patch file only. Kind regards, Christoph
@Christoph, Could you generate a patch against the port head using `make makepatch` please? Instructions can be found here: https://www.freebsd.org/doc/en/books/porters-handbook/slow-patch.html Also this port does not have a maintainer, so confirmation of passing QA (portlint, poudriere) will help it make progress
@Kubilay, Yes, I will do that.
Created attachment 166336 [details] Patch of taipan.c by make makepatch Please find attached the patch using make makepatch.
Created attachment 166337 [details] The LICENSE is added Dear Kubilay, I am not sure if the attachment counts as patch because it is related to /usr/ports/games/taipan/Makefile. portlint -C reported a missing license information. I took the information from http://www.gtlib.gatech.edu/pub/Linux/games/textrpg/taipan-0.9.lsm which claims GPL. # portlint -C /usr/ports/games/taipan WARN: Consider to set DEVELOPER=yes in /etc/make.conf 0 fatal errors and 1 warning found. I have just chosen -C because pedantic sounds good.
Created attachment 166338 [details] Poudriere FreeBSD 10.3-PRERELEASE amd64 Dear Kubilay, please find attached the poudriere log file. Kind regards, Christoph
I think I have made a mistake by adding the LICENSE information after poudriere. Now there is an error message as ---End make.conf--- =======================<phase: check-sanity >============================ ===> taipan-0.9_1 License GPL needs confirmation, but BATCH is defined. *** Error code 1 I will try to fix this.
Dear Kubilay, when I change the license information from GPL to GPLv1 or GPLv2 poudriere works. The relavant part in the log seems to be ---End make.conf--- =======================<phase: check-sanity >============================ ===> License GPLv1 accepted by the user =========================================================================== =======================<phase: pkg-depends >============================ ===> taipan-0.9_1 depends on file: /usr/local/sbin/pkg - not found ===> Installing existing package /packages/All/pkg-1.6.3.txz I have only seen textproc/aft and dns/bundy with GPL-only, but then GPL appears in LICENSE_GROUPS. Their LICENSE definitions are is CART and ISC. It seems to be necessary to use either GPLv1, GPLv2 or not to specify LICENSE. How to proceed? Kind regards, Christoph
Thanks Christoph :) Could you run the diff against the port directory itself (after make makepatch generates the files/patch-blah file) The easiest way to do this is to: * Checkout the ports tree using svn (if you haven't already) * run `make patch` * make your extra (new) source change * run 'make makepatch' These steps will produces a 'new' version of current files/patch-taipan.c file * run svn diff > taipan-patch.diff in the port dir * Attach taipan-patch.diff here :) In summary, all changes to the port (including updating the existing patch in files/ should be in one attachment, as a 'diff against the port' Jump in #freebsd-ports on freenode IRC if you have any questions :)
(In reply to c.brinkhaus from comment #8) This is correct, LICENSE= takes values that are defined in /usr/ports/Mk/bsd.licenses.db.mk 'GPL' is ambiguous, which is why there are granular and version-specific values
Created attachment 166366 [details] svn diff of patch-taipan.c Dear Kubilay, please find attached the diff based on the svn repository. https://www.freshports.org/misc/py-spdx-lookup/ did not found any license information. Therefore I left the Makefile untouched. Kind regards, Christoph
Created attachment 166525 [details] patch of taipan.c against svn I have tried to contact the author regarding the license but the mail could not be delivered. Therefore I have kept the Makefile without license entry as it is. The output of portlint -A is WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy. WARN: Makefile: new ports should not set PORTREVISION. WARN: Makefile: new ports should not be maintained by ports@FreeBSD.org. WARN: Makefile: Consider defining LICENSE. WARN: Consider to set DEVELOPER=yes in /etc/make.conf 0 fatal errors and 5 warnings found. Poudiere is still happy. Please find attached the current patch for taipan.c. In the last one I have had a stale taipan.c.orig. I am sorry for that. By the way, I have seen in the output of "make makepatch" that the original taipan.c is from 2001.
A commit references this bug: Author: junovitch Date: Sun Apr 10 01:21:51 UTC 2016 New revision: 412884 URL: https://svnweb.freebsd.org/changeset/ports/412884 Log: games/taipan: fix out of bounds array subscript taipan.c:2709:7: warning: array index 4 is past the end of the array (which contains 4 elements) [-Warray-bounds] PR: 206771 Submitted by: Dave Walton <dw-fbsd@digger.net> Submitted by: c.brinkhaus@t-online.de Changes: head/games/taipan/Makefile head/games/taipan/files/patch-taipan.c
A commit references this bug: Author: junovitch Date: Sun Apr 10 01:22:24 UTC 2016 New revision: 412885 URL: https://svnweb.freebsd.org/changeset/ports/412885 Log: MFH: r412884 games/taipan: fix out of bounds array subscript taipan.c:2709:7: warning: array index 4 is past the end of the array (which contains 4 elements) [-Warray-bounds] PR: 206771 Submitted by: Dave Walton <dw-fbsd@digger.net> Submitted by: c.brinkhaus@t-online.de Approved by: ports-secteam (with hat) Changes: _U branches/2016Q2/ branches/2016Q2/games/taipan/Makefile branches/2016Q2/games/taipan/files/patch-taipan.c
Both GCC and Clang will warn when compiling outside of the ports collection so I just added this as is without any LICENSE changes and MFH'd this as a fix. David, thank you for the report! Christoph, thanks for the patch! Technically PR patches would normally be generated from doing something along the lines of `cd /usr/ports/games/taipan; svn diff > ~/taipain.patch`. You attached just the patch-taipan.c file. That was fine in this simple case as it just replaced the existing patch-taipan.c file and at a minimal required a PORTREVISION bump to the Makefile. That's easy enough for me to do pre-commit but keep this in mind and take a look at the helpful guidance in the Porter's Handbook next time. [1] [1] https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/