Bug 282757 - devel/premake5: update to beta3
Summary: devel/premake5: update to beta3
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: Robert Clausecker
URL: https://github.com/premake/premake-co...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-14 13:20 UTC by Martin Filla
Modified: 2024-11-18 01:02 UTC (History)
2 users (show)

See Also:


Attachments
0001-premake5-update-to-beta3.patch (3.08 KB, patch)
2024-11-14 13:20 UTC, Martin Filla
freebsd: maintainer-approval+
Details | Diff
0001-premake5-update-to-beta3.patch (1.89 KB, patch)
2024-11-15 21:08 UTC, Martin Filla
freebsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Filla 2024-11-14 13:20:07 UTC
Created attachment 255169 [details]
0001-premake5-update-to-beta3.patch

Hi,
this is an update to beta3.

===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=root UID=0 GID=0
===>  Deinstalling for premake5
===>   Deinstalling premake5-5.0.0.b3
Updating database digests format: ..... done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	premake5: 5.0.0.b3

Number of packages to be removed: 1

The operation will free 2 MiB.
[141amd64-default] [1/1] Deinstalling premake5-5.0.0.b3...
[141amd64-default] [1/1] Deleting files for premake5-5.0.0.b3: .... done
===========================================================================
=>> Checking for extra files and directories
[00:00:25] Installing from package
[141amd64-default] Installing premake5-5.0.0.b3...
[141amd64-default] Extracting premake5-5.0.0.b3: .... done
[00:00:25] Cleaning up
===>  Cleaning for premake5-5.0.0.b3
[00:00:25] Deinstalling package
Updating database digests format: . done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	premake5: 5.0.0.b3

Number of packages to be removed: 1

The operation will free 2 MiB.
[141amd64-default] [1/1] Deinstalling premake5-5.0.0.b3...
[141amd64-default] [1/1] Deleting files for premake5-5.0.0.b3: .... done
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2024-11-14 22:35:48 UTC
Remember to set the "maintainer-approved" flag on your patches so they get looked at quicker.

sysctl "hw.ncpu" is correct to get the number of processors; why did you patch this one out?
Comment 2 Martin Filla 2024-11-14 22:41:04 UTC
(In reply to Robert Clausecker from comment #1)
new patch is for this issue: https://github.com/premake/premake-core/issues/2328
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2024-11-15 11:49:12 UTC
Thank you, that makes sense.
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2024-11-15 13:25:02 UTC
A test build fails in the patch phase.  Whitespace issues perhaps?

===>  Patching for premake5-5.0.0.b3
===>   Converting DOS text files to UNIX text files
===>  Applying FreeBSD patches for premake5-5.0.0.b3 from /usr/home/ports/main.ports/devel/premake5/files
1 out of 1 hunks failed--saving rejects to src/host/os_getnumcpus.c.rej
===>  FAILED Applying FreeBSD patch-src_host_os__getnumcpus.c
===> FAILED to apply cleanly FreeBSD patch(es)  patch-src_host_os__getnumcpus.c
Comment 5 Martin Filla 2024-11-15 13:29:43 UTC
(In reply to Robert Clausecker from comment #4)
I don't know. This case is strange. I tested this patch in poudriere and without issue.
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2024-11-15 13:32:52 UTC
Was there perhaps any Windows machine involved in uploading the patch that could have munged line endings?  Or did you copy and paste the patch in a way that could have destroyed whitespace and tabs?  This happens from time to time.

Returning to open until a working patch is supplied.
Comment 7 Martin Filla 2024-11-15 21:08:39 UTC
Created attachment 255204 [details]
0001-premake5-update-to-beta3.patch
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2024-11-15 21:55:12 UTC
This is not the release tarball of 5.0.0-beta3 but rather some inbetween version. 
While it is permitted by policy to ship inbetween versions, these must be reflected in PORTVERSION as indicated in Porter's Handbook. Also, this violates upstreams explicit instructions not to use github-generated tarballs.

Instead, I recommend you switch back to the upstream tarball and apply the bug fix as a patch like this (untested):

PATCH_SITES= https://github.com/premake/premake-core/commit/
PATCHFILES= ffcb7790f013bdceacc14ba5fda1c5cd107aac08.diff:-p1

This applies commit ffcb7790f013bdceacc14ba5fda1c5cd107aac08 as a patch to the distribution.  Give it a try, perhaps it works!
Comment 9 Martin Filla 2024-11-15 22:26:06 UTC
(In reply to Robert Clausecker from comment #8)
Thank you for your tip but it doesn't work

ffcb7790f013bdceacc14ba5fda1c5cd107aac08.diff          898  B   11 MBps    00s
===> Fetching all distfiles required by premake5-5.0.0.b3 for building
===>  Extracting for premake5-5.0.0.b3
=> SHA256 Checksum OK for premake-5.0.0-beta3-src.zip.
=> SHA256 Checksum OK for ffcb7790f013bdceacc14ba5fda1c5cd107aac08.diff.
===>  Patching for premake5-5.0.0.b3
===>   Converting DOS text files to UNIX text files
===>  Applying distribution patches for premake5-5.0.0.b3
1 out of 1 hunks failed--saving rejects to src/host/os_getnumcpus.c.rej
===>  FAILED Applying distribution patch ffcb7790f013bdceacc14ba5fda1c5cd107aac08.diff with -p1
Comment 10 Robert Clausecker freebsd_committer freebsd_triage 2024-11-15 22:32:13 UTC
Very unfortunate.  I'll have a look at it and adapt your patch so it works.
Comment 11 Robert Clausecker freebsd_committer freebsd_triage 2024-11-15 22:59:13 UTC
This is a line ending issue.  The files in the project all have CRLF line endings, but something stipped off the CR from the line endings in the patch.
I'll fix this by applying dos2unix to more files.

Please check for such things.  You're clearly passing your patches through something that eats line endings.  Make sure this does not happen.
Comment 12 commit-hook freebsd_committer freebsd_triage 2024-11-18 00:59:17 UTC
A commit in branch main references this bug:

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

commit 42f8aa523e750a8b5917f87fb014bd43b8579022
Author:     Charlie Root <root@hades.lan>
AuthorDate: 2024-11-14 13:15:01 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2024-11-18 00:57:53 +0000

    devel/premake5: update to 5.0.0-beta3

     - add patch for upstream isue #2328

    Changelog: https://github.com/premake/premake-core/releases/tag/v5.0.0-beta3

    PR:             282757
    See also:       https://github.com/premake/premake-core/issues/2328

 devel/premake5/Makefile                            |  4 +--
 devel/premake5/distinfo                            |  6 ++--
 .../files/patch-src_host_os__getnumcpus.c (new)    | 33 ++++++++++++++++++++++
 devel/premake5/files/patch-tests___tests.lua       |  4 +--
 4 files changed, 40 insertions(+), 7 deletions(-)
Comment 13 Robert Clausecker freebsd_committer freebsd_triage 2024-11-18 01:02:08 UTC
Thank you for your contribution.