Bug 278181 - games/renpy: Take over maintainership
Summary: games/renpy: Take over maintainership
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Rodrigo Osorio
URL:
Keywords:
Depends on: 278189 278275
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-05 06:36 UTC by Brad D
Modified: 2024-04-19 14:41 UTC (History)
3 users (show)

See Also:


Attachments
maintainer application patch (1.32 KB, patch)
2024-04-05 06:36 UTC, Brad D
no flags Details | Diff
Renpy running locally with neofetch info (279.85 KB, image/png)
2024-04-05 06:37 UTC, Brad D
no flags Details
Here's the clean patch for the upgrades required for Ren'py (523.61 KB, patch)
2024-04-09 14:09 UTC, Brad D
no flags Details | Diff
Poudriere initial setup for the port (268.11 KB, image/png)
2024-04-09 22:13 UTC, Brad D
no flags Details
Current snapshot of my version control right now (67.76 KB, image/png)
2024-04-12 10:27 UTC, Brad D
no flags Details
renpy ldd dump (5.65 KB, text/plain)
2024-04-14 10:38 UTC, Brad D
no flags Details
Ren'py 8.2.1 upgrade patch: includes pkg-plist, pkg-message, and other goodies (171.31 KB, patch)
2024-04-16 02:22 UTC, Brad D
no flags Details | Diff
Add this with the previous patch to fix some minor oversights on my part (3.52 KB, patch)
2024-04-16 10:38 UTC, Brad D
no flags Details | Diff
Fixed permissions issues with this patch (3.58 KB, patch)
2024-04-17 10:01 UTC, Brad D
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brad D 2024-04-05 06:36:50 UTC
Created attachment 249731 [details]
maintainer application patch

I want to take over maintainership of this port and will be updating and patching both it and its main dependency devel/py-game_sdl2. Both will need to be updated together to upgrade the port to 8.2.1, which I've gotten to work natively with official sources outside of the ports repo. (will share the image in a reply)

I'm also porting the official Ren'Py build system to work on and compile for FreeBSD here: https://github.com/bedwardly-down/FreeBSD_renpy_build
Comment 1 Brad D 2024-04-05 06:37:54 UTC
Created attachment 249732 [details]
Renpy running locally with neofetch info
Comment 2 Brad D 2024-04-06 01:13:44 UTC
There's an internal library used by Ren'py called tinyfd (tinyfiledialogs) that I made a new port for here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278189
Comment 3 Brad D 2024-04-06 12:21:24 UTC
Ported the Renpy port to 8.2.1 and submitted patch here to close out this bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268946
Comment 4 Brad D 2024-04-09 12:10:50 UTC
Current update: I have both Python 2.7 and Python 3.9 native binaries building with a modified official build toolchain. These are because the engine runs in "testing mode" when using the internal python interpreter. That disables some things (like text input if a game calls for it), makes the F key change from windowed to fullscreen without any way to rebind that key in engine or settings, and a few other things.

I'm attempting to create a workaround for that part but it's promising that the binaries exist, making the engine at least somewhat closer to being on par with its Windows, Linux and Mac counterparts.

I will be fixing permissions in the next update. I have two different branches I'm working on right now: a native build and the port version. If I can get the binaries fully working, developers can ship FreeBSD builds of their games along with the other platforms, making the engine more viable for external developers. I'm stoked
Comment 5 Brad D 2024-04-09 14:09:31 UTC
Created attachment 249857 [details]
Here's the clean patch for the upgrades required for Ren'py
Comment 6 Brad D 2024-04-09 22:13:23 UTC
Created attachment 249866 [details]
Poudriere initial setup for the port

If Windows, Mac, and Linux binaries can be produced with Poudriere, that would solve at least one security warning. Upstream Ren-py's source and binaries are built against OpenSSL-1.1.1s (see here: https://github.com/renpy/renpy-build/blob/master/tasks/openssl.py). My FreeBSD fork of the that build system has been ported over to using OpenSSL-3.2 (https://github.com/bedwardly-down/FreeBSD_renpy_build/blob/master/tasks/openssl.py).

I'll also be attaching the current binaries produced for both 2.7 and 3.9 using my port of the official toolchain in the next attachment. If you would like to test against that and have any feedback on it, the README in the repo has been updated with the steps required. https://github.com/bedwardly-down/FreeBSD_renpy_build . The build system uses clean sysroot jails that are not fully dependent on the host system. The original toolchain was not built to be easily extended for new platforms, so I gutted all platforms but FreeBSD for it to make maintenance and supporting different release versions more manageable. Thanks again.
Comment 7 Brad D 2024-04-09 22:29:52 UTC
https://github.com/bedwardly-down/FreeBSD_renpy_build/releases/tag/renpy-binaries-test

Here's those initial binaries
Comment 8 Brad D 2024-04-11 02:11:31 UTC
I've got poudriere setup with a custom overlay and tests and builds working. I'm restarting my process with this port tonight and am working on doing incremental builds and tests to get it back to where it was in my initial port.

Since Ren'py's SDK is built against an insecure release of OpenSSL and the only real reasons to use that release and not build directly from source are for the bundled Windows, Mac, and Linux builds along with precompiled code, I'm first determining if the current 4.7.11 release can be safely compiled from source. If so, I'll be releasing a patch for that first so that those that do use this port in its current state can continue using it until the full upgrade is finished. Not sure how long that will be yet but I've got a plan this time. I've also gotten help from the mailing list from a variety of people about the tinyfiledialogs library concerns you had.

If you have interest, I can forward you the email chain.
Comment 9 shamaz.mazum 2024-04-12 08:57:42 UTC
I hope all those patches will be merged someday
Comment 10 Brad D 2024-04-12 09:42:55 UTC
(In reply to shamaz.mazum from comment #9)

I love hearing that. It's coming along nicely. The biggest part of going to source is converting several parts of the Ren'py Build Toolchain into something Poudriere can use. That part's almost done.

Do you build and or play games made with Ren'py?
Comment 11 Brad D 2024-04-12 10:20:42 UTC
At the end of the build process, it generates some custom runtime c code that Ren'py looks for (see here under build and link: https://github.com/bedwardly-down/FreeBSD_renpy_build/blob/master/tasks/renpython.py). Getting native binaries built means I hopefully won't need to do heavy edits to Ren'py's code itself. Right now, I have FreeBSD platform checks integrated into the engine where needed but those rely on the binaries existing to be useful.
Comment 12 Brad D 2024-04-12 10:27:42 UTC
Created attachment 249929 [details]
Current snapshot of my version control right now

Some of these will be removed but if I can reuse the bare minimum needed from my port of the buildchain, I'll do it. All of the compiling is in the Makefile right now but the C generation is still python. If it needs to be moved into the Makefile, I'll do it but avoiding that is preferable for that part.
Comment 13 shamaz.mazum 2024-04-12 11:00:55 UTC
(In reply to Brad D from comment #10)

I played Everlasting Summer once ;)
Comment 14 Brad D 2024-04-13 03:51:52 UTC
(In reply to shamaz.mazum from comment #13)

Never played that one but it's got solid reviews and a fun aesthetic to it. Added to my checkout sometime list
Comment 15 Brad D 2024-04-14 10:38:26 UTC
Created attachment 249963 [details]
renpy ldd dump

I currently have FreeBSD binaries building with Poudriere. There's a memory segfault issue but that's because it's currently not detecting librenpython.so (its library). I'll be working on this more after work. :D
Comment 16 commit-hook freebsd_committer freebsd_triage 2024-04-14 11:09:15 UTC
A commit in branch main references this bug:

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

commit a1d828e84fc891d8165a9626e0878d2f1ad45b35
Author:     Rodrigo Osorio <rodrigo@FreeBSD.org>
AuthorDate: 2024-04-09 12:08:48 +0000
Commit:     Rodrigo Osorio <rodrigo@FreeBSD.org>
CommitDate: 2024-04-14 11:07:56 +0000

    devel/py-game_sdl2: take maintenership

    PR:       278181
    Reported by:  Brad D <social@brandongrows.me>

 devel/py-game_sdl2/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 17 Brad D 2024-04-16 02:22:16 UTC
Created attachment 250002 [details]
Ren'py 8.2.1 upgrade patch: includes pkg-plist, pkg-message, and other goodies

* Permissions will probably need tweaking (organized plist to show my changes at the top)
* Binaries now build and link properly using both poudriere and normal make stage / make package (currently not yet in use by the application but available for perusal)
* At least one of the internal Python modules is not building and linking properly (I suspect it's due to age more than anything, but I'll need to research and test a bit)
Comment 18 Brad D 2024-04-16 10:38:04 UTC
Created attachment 250003 [details]
Add this with the previous patch to fix some minor oversights on my part
Comment 19 Brad D 2024-04-17 10:01:31 UTC
Created attachment 250022 [details]
Fixed permissions issues with this patch

Instead of changing the permissions of /usr/local/share/renpy , just copying the files over to a local directory and pointing Ren'py to that directory every time it runs solved the issue.
Comment 20 Brad D 2024-04-17 12:09:27 UTC
I’m ready for feedback. Right now, it’s in a usable, testable state. The module fixes for the binaries can be a future update since they aren’t being used yet (it’s currently using system Python)
Comment 21 Brad D 2024-04-19 14:41:58 UTC
I’m not interested in continuing anymore on this. My local version works for my needs, and I’m already way out of my element. Someone will have to clean up my mess if anything I do with this gets accepted. I don’t want that and no one needs that. Thanks for your time.