Bug 243379 - games/dMagnetic: Update to 0.20
Summary: games/dMagnetic: Update to 0.20
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Loïc Bartoletti
URL: http://www.dettus.net/dMagnetic
Depends on:
Reported: 2020-01-15 21:11 UTC by Thomas Dettbarn
Modified: 2020-01-22 07:13 UTC (History)
1 user (show)

See Also:
dettus: maintainer-feedback+

The diff to the Makefile and the distinfo. (1.03 KB, patch)
2020-01-15 21:11 UTC, Thomas Dettbarn
dettus: maintainer-approval+
Details | Diff
dMagnetic 0.20 (1.12 KB, patch)
2020-01-15 22:40 UTC, Loïc Bartoletti
no flags Details | Diff
dMagnetic 0.20 (1.11 KB, patch)
2020-01-16 20:07 UTC, Loïc Bartoletti
no flags Details | Diff
dMagnetic 0.21 (1.72 KB, patch)
2020-01-19 08:13 UTC, Loïc Bartoletti
no flags Details | Diff
dMagnetic 0.21 test update (1.63 KB, patch)
2020-01-20 18:52 UTC, Loïc Bartoletti
lbartoletti: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Dettbarn 2020-01-15 21:11:39 UTC
Created attachment 210776 [details]
The diff to the Makefile and the distinfo.


dMagnetic saw the release of version 0.20, so the FreeBSD port needs to be updated as well. It is my understanding that having the sha256 sum encoded as base64 is preferable, so this is being written in the distinfo. Please find the patch to the Makefile and the distinfo attached to this email.


Thomas Dettbarn
Comment 1 Loïc Bartoletti freebsd_committer 2020-01-15 22:40:34 UTC
Created attachment 210779 [details]
dMagnetic 0.20

I change the distinfo. FYI, you can create it with "make makesum" https://www.freebsd.org/doc/en/books/porters-handbook/book.html#porting-checksum

While I'm here, I move EXTRACT_SUFX to pet portlint.

Do you have a Changelog?
Comment 2 Loïc Bartoletti freebsd_committer 2020-01-15 22:43:13 UTC
games/dMagnetic: Update to 0.20

 * Update to 0.20
 * Move EXTRACT_SUFX (pet portlint)


   http://www.dettus.net/dMagnetic/ ?


  * portlint: OK (looks fine.)
  * testport: OK (poudriere: 11/12/13, i386/amd64)
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-16 00:23:59 UTC
Use USES=tar:<suffix> instead of EXTRACT_SUFX:

Comment 4 Thomas Dettbarn 2020-01-16 06:08:55 UTC
(In reply to Loïc Bartoletti from comment #1)

Hello Loic. 

Thank you so very much!
I must confess that keeping track of all the ports and the packages is a bit of a hassle, so I mostly generate them in one sitting. Which, unfortunately, means that some operating systems are getting more pampered than others.... Sorry!
In a perfect world, I would just develop my code, and would not have to worry about the ports and packages....

To answer your question: No, I do not have a changelog. It would have been good practice to keep one, but I did not. What I do have, however, are those:

Comment 5 Loïc Bartoletti freebsd_committer 2020-01-16 20:07:01 UTC
Created attachment 210800 [details]
dMagnetic 0.20

Use USES=tar:<suffix> instead of EXTRACT_SUFX
Comment 6 Loïc Bartoletti freebsd_committer 2020-01-18 08:25:25 UTC
(In reply to Thomas Dettbarn from comment #4)
You're welcome!

I only asked you a changelog to match with our template: https://wiki.freebsd.org/KubilayKocak/ThePerfectPortsIssue#General

I updated the patch. I need your approval to ask to commit it.

Comment 7 Thomas Dettbarn 2020-01-18 11:01:08 UTC
(In reply to Loïc Bartoletti from comment #6)
Well... actually... could I trouble you for a small favor?

The OpenBSD guys were so nice as to add a do-test: target to their ports.

Is it possible to include this in the FreeBSD Makefile as well?

	cd ${WRKSRC}/testcode; if [ `echo Hello | ../dMagnetic \
	    -mag minitest.mag -gfx minitest.gfx \
	    -vmode low_ansi -vecho -vcols 300 -vrows 300 | \
	    sha256 -b` == 6DhbUg1shZBuSXIm3PNK1/fMfRQ5RIHCuLPik+IkeQM= ]; \
	    then echo ok; else echo expected output not seen; exit 1; fi

Explanation: Given the input, the output should always be the same, meaning that the sha256 sum should always be the same. Essentially, my project is a virtual machine, that is running ancient bytecode. I took the liberty of hand-writing such bytecode myself, and running it is testing several aspects of the machine.
When it finishes, it has produces a deterministic output, hence the sha256 sum. 

A match means, that the machine can run the bytecode on the current hardware.

This gives users the confidence that it is worth the effort to purchase the original bytecode for the games (which is, of course, copyrighted material).
Comment 8 Thomas Dettbarn 2020-01-18 11:01:36 UTC
(In reply to Loïc Bartoletti from comment #6)
Otherwise: Yes, approved!

Thank you!!!!
Comment 9 Loïc Bartoletti freebsd_committer 2020-01-18 19:53:14 UTC
(In reply to Thomas Dettbarn from comment #7)
There is no "-b" option on FreeBSD for sha256. I modified the test with the hex value:

	cd ${WRKSRC}/testcode; if [ `echo Hello | ../dMagnetic \
	-mag minitest.mag -gfx minitest.gfx \
	-vmode low_ansi -vecho -vcols 300 -vrows 300 | \
	sha256 ` == 86ca2731a4333ed24203c5bda33e71a222e864cb22debe656de52157e89ab1ea ]; \
	then echo ok; else echo expected output not seen; exit 1; fi
Comment 10 Thomas Dettbarn 2020-01-18 21:38:57 UTC
(In reply to Loïc Bartoletti from comment #9)


Thank you!!
Err.... Btw... I found a bug, and I was forced to do a new release.... 0.21 is the most recent one.... 

Comment 11 Loïc Bartoletti freebsd_committer 2020-01-19 08:13:31 UTC
Created attachment 210857 [details]
dMagnetic 0.21

Update to 0.21
Comment 12 Loïc Bartoletti freebsd_committer 2020-01-19 08:13:44 UTC
(In reply to Thomas Dettbarn from comment #10)
No worries!
Comment 13 Thomas Dettbarn 2020-01-19 08:26:09 UTC
(In reply to Loïc Bartoletti from comment #12)

Well then! 
One more thing: -vmode low_ansi MIGHT create a different output on machines, where dMagnetic has been configured. 
A more robust parameter for the test would be -vmode high_ansi (which, of course, will result in a different sha256 output).

Gosh, I HOPE that is the last thing... Can you please apply the patch to the svn? ;)
Comment 14 Loïc Bartoletti freebsd_committer 2020-01-20 18:52:20 UTC
Created attachment 210901 [details]
dMagnetic 0.21 test update
Comment 15 Thomas Dettbarn 2020-01-21 04:12:29 UTC

thank you so so much!
Comment 16 commit-hook freebsd_committer 2020-01-22 07:12:48 UTC
A commit references this bug:

Author: lbartoletti
Date: Wed Jan 22 07:12:04 UTC 2020
New revision: 523796
URL: https://svnweb.freebsd.org/changeset/ports/523796

  games/dMagnetic: Update to 0.21

  - Update to 0.21
  - Remove EXTRACT_SUFX and use USE=tar:bz2 instead (pet portlint)



  PR:	243379
  Reported by:	Thomas Dettbarn (maintainer)
  Reviewed by:	koobs
  Approved by:	tcberner (mentor)
  Differential Revision:	https://reviews.freebsd.org/D23214