/!\ gnat12-12.4.0: Makefile errors /!\ you cannot include bsd.port[.pre].mk twice Defining both PORTVERSION and DISTVERSION is wrong, only set one, if necessary, set DISTNAME *** Error code 1 Stop.
Broken in "lang/gnat1?: fix build with GNU strip"[1]. What is the point of the Porter's Handbook, going to efforts to modernise the Port, Maintainers, and Reviews if this happens? gnat12 is not the only Port, there are many. Committers should be actors if they love the performance so much, or is it laziness, or they are too good to apply standards to their own work? 1: https://codeberg.org/FreeBSD/freebsd-ports/commit/3d69dd6df87f1ef85fb4869f15be3ddc6099e605
So of course all the version of GNAT in the Ports Tree will be effected.
somebody forgot to -.include <bsd.port.mk> +.include <bsd.port.post.mk> indeed
and they had no DEVELOPER on and portlint -C WARN: Makefile: Consider adding support for a NLS knob to conditionally disable gett ext support. WARN: Makefile: [145]: possible direct use of command "file" found. use ${FILE} inst ead. WARN: Makefile: possible use of absolute pathname "/sbin:/bin:/usr/sbin...". WARN: Makefile: possible use of absolute pathname "/usr/bin/bsdtar". WARN: Makefile: how about using "${MASTER_SITE_GCC}" with "MASTER_SITE_SUBDIR=releas es/gcc-${DISTVERSION}", instead of "http://gcc.gnu.org/pub/gcc/releases/gcc-${DISTVE RSION}/:gcc"? FATAL: work: be sure to cleanup the working directory before committing the port. 1 fatal error and 5 warnings found. i think it needs more love than i can come up with hmm
You need to check those suggestions against the Makefile. Do you see the use of file(1)? The the absolute paths are encapsulated in an environment variable, ${_TOOLCHAIN_PATHS}, which is passed to GNU configure and make, can system paths be isolated like with ${LOCALBASE}, and ${PREFIX}? > somebody forgot to > > -.include <bsd.port.mk> > +.include <bsd.port.post.mk> And probably drop bsd.port.options.mk. I am not able to test and create a patch at the moment.
of course some are false positives portlint also misses some but lets see what maintainer says first
Yes, portlint issues many false-positive, do not try bindly to fix everything.
(In reply to Sulev-Madis Silber from comment #0) Vould you please describe how you get this error?
There are some issues, using tar over ${TAR}, the GCC master site, and the sorting of some the PLIST magic, using bsd.port.pre.mk without the matching bsd.port.post.mk, and possibly nesting bsd.port.options.mk within that pair. I am testing a patch now.
The gettext-runtime might also be move to NLS specific USES.
(In reply to Alastair Hogge from comment #9) - There is no problem with bsd.port.post.mk because the port includes bsd.port.options.mk. - yes, there is a possible case with NLS / gettext, but I don't think that it matters with such a port. - yes, ${TAR} could be used.
I believe the following might be legitimate issues from the various Port Tools: * ${PIE_UNSAFE} is in the incorrect block * ${GNU_CONFIGURE_PREFIX} is not sorted * The if ${UID} conditional introduced in bug #294657 is in the wrong spot, it should be below the Port's specific internal _FOO variables, and captured within the bsd.port.pre.mk directive there * The sorting of the architecture specific ${PLIST_SUB} entries
(In reply to Thierry Thomas from comment #8) i have DEVELOPER on
however makefile has no PORTVERSION at all, so wtf?
i have no idea if ports itself is broken
(In reply to Sulev-Madis Silber from comment #15) It is on your end. That is one of your artifacts I have not been able to replicate locally.
Sorry, you may be onto something, the error is from poudriere-testport: > =======================<phase: check-sanity >============================ > ===== env: DEVELOPER_MODE=yes DEVELOPER=1 STRICT_DEPENDS=yes USER=pkgbuild UID=65532 GID=65532 > /!\ gnat12-12.4.0: Makefile errors /!\ > > you cannot include bsd.port[.pre].mk twice > > Defining both PORTVERSION and DISTVERSION is wrong, only set one, if necessary, > set DISTNAME > > *** Error code 1 > > Stop. > make: stopped making "check-sanity" in /usr/ports/lang/gnat12 > =======================<phase: Interactive >============================
Yeah, I think we need to switch back to the bsd.port.pre.mk/bsd.port.post.mk pair.
cat /etc/make.conf DEVELOPER=yes MAKE_JOBS_NUMBER_LIMIT=1 uname -r 14.4-RELEASE-p5 git log '--pretty=format:%H - %s' -n 1 6f27a855657dde75c5cb95f7b7b72517618b3ee3 - devel/p5-Sys-Virt: update to 12.4.0 which mistakes i have made locally?
and did local build without poudriere
yes, i realize that it will pass in "prod"
the wrong includes probably define those, i didn't check what ports internals does if you use it wrong
Created attachment 271545 [details] WIP port(clippy|fmt|lint) housekeeping patch Not the complete, and tested patch, also only for GNAT-12. I am still testing the NLS option.
Regarding ${TAR}, can that be removed now? I thought a recent commit to the Ports Tree converted to preferring UTF-8 locale over ASCII?
Mk/bsd.port.mk: Add EXTRACT_ENV[1] 1: https://codeberg.org/FreeBSD/freebsd-ports/commit/98103f19430200b36e9adcb10ed8831ce9ffc42f
Created attachment 271550 [details] [PATCH] lang/gnat1[2-4]: Restore check-phase * After PR 294657, restore the testing target check-phase, move the if conditional on ${UID} != 0 below the GNAT Ports' internal _ marked variables, and drop bsd.port.options.mk, and terminate the Port with bsd.port.post.mk over bsd.port.mk * Move ${PIE_UNSAFE} to the correct block (portclippy) * Move gettext-runtime from ${USES} to ${NLS_USES} * Regroup internal variables and sort * Remove ${EXTRACT_CMD} from aarch64 specific section to chase the update to how the Ports Mk framework which by default now uses LC_ALL=en_US.UTF-8 * Sort ${GNU_CONFIGURE_PREFIX} * Sort the architecture specific ${PLIST_SUB} entries * Specific to GNAT-12, make use of ${MASTER_SITE_GCC} in ${MASTER_SITES} poudriere-testport: lang/gnat12 NLS on/off on 16-CURRENT-amd64 OK; 15.0-RELEASE-amd64 OK lang/gnat13 NLS on/off on 16-CURRENT-amd64 OK; 15.0-RELEASE-amd64 OK lang/gnat14 NLS on/off on 16-CURRENT-amd64 OK; 15.0-RELEASE-amd64 OK I am not able to test aarch64, and i386 is broken at least on 14.4-RELEASE
Thanks for petting this port, but why do you modify MASTER_SITES? Now it would be unfetchable.
(In reply to Thierry Thomas from comment #27) > Thanks for petting this port, but why do you modify MASTER_SITES? Flagged by portlint (comment #4) > Now it would be unfetchable Was sure I tested that. Will sort it out.
So for GNAT-12 ${MASTER_SITES} should follow the convention in GNAT-13 and 14.
Created attachment 271569 [details] lang/gnat1[2-4]: Restore check-phase lang/gnat12,13, and 14: * After PR 294657, restore the testing target check-phase, move the if conditional on ${UID} != 0 below the GNAT Ports' internal _ marked variables, and drop bsd.port.options.mk, and terminate the Port with bsd.port.post.mk over bsd.port.mk * Add fix for rpath (PR 292708) * Move ${PIE_UNSAFE} to the correct block (portclippy) * Move gettext-runtime from ${USES} to ${NLS_USES} * Regroup internal variables and sort * Remove ${EXTRACT_CMD} from aarch64 specific section syncing with the update to the Ports Mk infrastructure (D57295) which by default now uses LC_ALL=en_US.UTF-8 in the environment * Sort ${GNU_CONFIGURE_PREFIX} * Specific to GNAT-12, follow GNAT-13 and 14's use of ${MASTER_SITE_GCC} in ${MASTER_SITES}; sort the architecture specific ${PLIST_SUB} entries
(In reply to myself from comment #30) poudriere-testport lang/gnat12: 15_0-amd64-release: Pass main-amd64-default: Pass poudriere-testport lang/gnat13: 15_0-amd64-release: Pass main-amd64-default: Pass poudriere-testport lang/gnat14: 15_0-amd64-release: Pass main-amd64-default: Pass
this portpetting has been awesome! i was so overwhelmed about port count and makefile size and complexity that i didn't even start. tho i was curious and wanted i wonder how many other ports have questionable makefiles committed in. after all everyone's a human and if they commit, perhaps commit their ports in by themselves, if maintainer has commit access, things happen i once ran ports conflicts checker which semiautomatically submitted reports about missing conflicts i thought about checking maintainer mails, tho failure could be temporary and scan could be flagged as attack or spam for distfiles there are checks already iirc? or no i would guess that artificially imposed checks just generate too much work and as-needed approach is better but i could run things locally just for fun to see what happens out of scope discussion here i guess tho
(In reply to Sulev-Madis Silber from comment #32) > i wonder how many other ports have questionable makefiles committed in. after all everyone's a human and if they commit, perhaps commit their ports in by themselves, if maintainer has commit access, things happen Fuck tons, unfortunately. Some committers behave as if their ego and their way outweighs the Ports Tree, and the Porter's Handbook, The Project, and the user base, and all the other emergent properties.
(In reply to Alastair Hogge from comment #28) As I said previously, portlint is a great tool, but its warnings are just advice; you don't necessarily have to follow them blindly. Same for portfmt: it is a linter, fine for the ports you maintain and the unmaintained ones, but if a maintainer prefers his own style it's fine too. Anyways, I'll check your patch!
(In reply to Thierry Thomas from comment #34) The Port is currently broken, it does not pass test, and most of the issues are regressions, because they were addressed previously[1], and I am not blindly following the linters, tho I have not be able to replicate why NLS_USES was removed, using the bootstrap method had not failed me. The problem with preferring one's own style is that it goes against the Porter's Handbook, and volunteer's cannot read minds, if they follow the Handbook, their labour is wasted when a ${MAINTAINER} prefers their own style. 1: https://codeberg.org/FreeBSD/freebsd-ports/commit/8bb96e3f34f057bf41034902075e2ced885db33d
while here, porter's handbook is also wrong! for example it tells wrong format for new port summary, needs to have colon after port name. many put it there anyway despite this it's not a bible! but it needs to reflect real life. or real life needs to reflect that. usual de jure vs. de facto i don't get much angry on this, just confuses me that said, i can't find anything other than fbsd to have so good handbooks and manpages, despite mistakes i sometimes laugh at creating standards and then not following here right now, the maintainer and committer simply didn't turn dev modes on nor tested with poudriere, which is a mistake but happens. since it worked, did build otherwise and generated packages, nobody noticed. until i came along and manually built it this way
Committed, thanks. Remark: the port is BROKEN on arm7 (I'm waiting for help from friends on this case), but it does not fail on the other archs and packages are built. E.g. see for amd64: https://portsfallout.com/fallout?port=&maintainer=thierry%40freebsd.org&env=amd64&category=&categories=lang&flavor=
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=dca58708f52c9dece16980bc1f85294888af2a3c commit dca58708f52c9dece16980bc1f85294888af2a3c Author: Alastair Hogge <agh@riseup.net> AuthorDate: 2026-06-07 00:51:02 +0000 Commit: Thierry Thomas <thierry@FreeBSD.org> CommitDate: 2026-06-07 10:56:52 +0000 lang/gnat1[2-4]: Restore check-phase lang/gnat12,13, and 14: * After PR 294657, restore the testing target check-phase, move the if conditional on ${UID} != 0 below the GNAT Ports' internal _ marked variables, and drop bsd.port.options.mk, and terminate the Port with bsd.port.post.mk over bsd.port.mk * Add fix for rpath (PR 292708) * Move ${PIE_UNSAFE} to the correct block (portclippy) * Move gettext-runtime from ${USES} to ${NLS_USES} * Regroup internal variables and sort * Remove ${EXTRACT_CMD} from aarch64 specific section syncing with the update to the Ports Mk infrastructure (D57295) which by default now uses LC_ALL=en_US.UTF-8 in the environment * Sort ${GNU_CONFIGURE_PREFIX} * Specific to GNAT-12, follow GNAT-13 and 14's use of ${MASTER_SITE_GCC} in ${MASTER_SITES}; sort the architecture specific ${PLIST_SUB} entries PR: 295872 Co-authored-by: Marcin Cieślak <saper@saper.info> Reported by: Sulev-Madis Silber lang/gnat12/Makefile | 51 ++++++++++++++++++++++++++------------------------- lang/gnat13/Makefile | 38 +++++++++++++++++++------------------- lang/gnat14/Makefile | 38 +++++++++++++++++++------------------- 3 files changed, 64 insertions(+), 63 deletions(-)
(In reply to Sulev-Madis Silber from comment #36) WTF? I always test in poudriere before pushing a commit, and DEVELOPER=yes is set in my /etc/make.conf for testing outside.
but you committed it in? doesn't even matter. several people reviwed it, it was in bugzilla, phab, etc. then came me and i just tried to build it fun how bugs happen. luckily it wasn't security issue
(In reply to Thierry Thomas from comment #37) Thanks for restoring that.