This is on amd64 running 13.2-STABLE, and security/gsa is at 22.7.1. Early in the build phase this happens: -------------------------------------------------------------------------------- -- Phase: build -------------------------------------------------------------------------------- ===> Building for gsa-22.7.1 yarn install v1.22.19 info No lockfile found. warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [1/5] Validating package.json... [2/5] Resolving packages... error Couldn't find any versions for "@babel/core" that matches "7.22.17" in our cache (possible versions are ""). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. *** Error code 1
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8fbb33494a2e4f4da97163c65666c69c67eedb3a commit 8fbb33494a2e4f4da97163c65666c69c67eedb3a Author: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> AuthorDate: 2023-10-05 17:29:44 +0000 Commit: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> CommitDate: 2023-10-05 17:29:44 +0000 security/gsa: Fix build - It seems like cache tarball was generated incomplete PR: 274276 Reported by: Trond Endrestøl <Trond.Endrestol _at_ ximalas.info> security/gsa/Makefile | 1 + security/gsa/distinfo | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-)
Hello, could you try with latest version of gsa? it seems like cache file was generated incomplete. It could take some hours for new cache tarball will be replicated to freebsd mirrors
(In reply to Jose Alonso Cardenas Marquez from comment #2) I'm sorry, no dice. -------------------------------------------------------------------------------- -- Phase: build -------------------------------------------------------------------------------- ===> Building for gsa-22.7.1_1 yarn install v1.22.19 info No lockfile found. warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [1/5] Validating package.json... [2/5] Resolving packages... error Couldn't find any versions for "@babel/core" that matches "7.22.17" in our cache (possible versions are ""). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. *** Error code 1
I am also seeing this bug with Poudriere building it for 13.2-RELEASE: =======================<phase: build >============================ ===== env: NO_DEPENDS=yes USER=root UID=0 GID=0 ===> Building for gsa-22.7.1_1 yarn install v1.22.19 info No lockfile found. warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [1/5] Validating package.json... [2/5] Resolving packages... error Couldn't find any versions for "@babel/core" that matches "7.22.17" in our cache (possible versions are ""). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. *** Error code 1 Stop. make: stopped in /usr/ports/security/gsa =>> Cleaning up wrkdir ===> Cleaning for gsa-22.7.1_1 build of security/gsa | gsa-22.7.1_1 ended at Mon Oct 16 09:33:47 EDT 2023 build time: 00:00:30 !!! build failure encountered !!!
My presentation of this error (initially through Poudriere, but subsequently tested on a box with gsa installed via ports directly) is a bit different, and indicates that yarn is looking for packages in the global cache, and not using the "yarn-offline-mirror" setting in work/gsa-22.7.1/.yarnrc > error Couldn't find any versions for "@babel/core" that matches "7.22.17" in our cache (possible versions are "7.10.4, 7.22.11, 7.23.2, 7.9.0"). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue. The "possible versions" list corresponds to the versions already installed in the global cache /usr/local/share/.cache/yarn/v6 Suspecting this is due to the missing lockfile, I ran 'yarn install' from work/gsa-22.7.1, which generated the missing yarn.lock file, at which point the port was able to build. I'm not familiar enough with this workflow to know if the yarn.lock should be generated by the make process, or included in the dist.
(In reply to Mark Staudinger from comment #5) > Suspecting this is due to the missing lockfile, I ran 'yarn install' from work/gsa-22.7.1, which generated the missing yarn.lock file, at which point the port was able to build. This little change got me past the choke point all the way to the package stage. $ git -C /usr/ports diff diff --git a/security/gsa/Makefile b/security/gsa/Makefile index c70c532ad595..8b916c6b58e8 100644 --- a/security/gsa/Makefile +++ b/security/gsa/Makefile @@ -46,6 +46,8 @@ post-patch: ${WRKSRC}/.yarnrc do-build: + @cd ${WRKSRC} && \ + ${YARN_BIN} install @cd ${WRKSRC} && \ ${YARN_BIN} ${YARN_ARGS} @cd ${WRKSRC} && \ > I'm not familiar enough with this workflow to know if the yarn.lock should be generated by the make process, or included in the dist. Ditto.
Same here. Clean build in poudriere fails. Latest distfiles that match distinfo: # cat distinfo TIMESTAMP = 1696526628 SHA256 (gsa-cache-22.7.1.tar.gz) = 56c1a1c900c2b45d711a1f31588fb98a90979b0866c68ec391795d0e9a2bc6fc SIZE (gsa-cache-22.7.1.tar.gz) = 48729903 SHA256 (greenbone-gsa-v22.7.1_GH0.tar.gz) = 89c159db61df19fe21713fa02c0454e730653673e7ef9b4dc30485666a631a05 SIZE (greenbone-gsa-v22.7.1_GH0.tar.gz) = 3607415 Doing ktrace on the 'make build', it does look for yarn.lock and fails: 14853 node 1697716321.550391 CALL access(0x804706280,0<F_OK>) 14853 node 1697716321.550393 NAMI "/wrkdirs/usr/ports/security/gsa/work/gsa-22.7.1/yarn.lock" 14853 node 1697716321.550403 CALL kevent(0xb,0x7ffffffee580,0,0x7ffffffee580,0x400,0x7ffffffee560) 14853 node 1697716321.550405 STRU struct kevent[] = { } 14853 node 1697716321.550405 RET access -1 errno 2 No such file or directory . . ===> Building for gsa-22.7.1_1 cd /wrkdirs/usr/ports/security/gsa/work/gsa-22.7.1 && /usr/local/bin/yarn --offline yarn install v1.22.19 info No lockfile found. warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [1/5] Validating package.json... [2/5] Resolving packages... error Couldn't find any versions for "@babel/core" that matches "7.22.17" in our cache (possible versions are ""). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. *** Error code 1 Stop. make: stopped in /usr/ports/security/gsa Copying in a yarn.lock that is generated from a 'yarn install' run does not help: ===> Building for gsa-22.7.1_1 cd /wrkdirs/usr/ports/security/gsa/work/gsa-22.7.1 && /usr/local/bin/yarn --offline yarn install v1.22.19 warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... [------------------------------------------------------------------------------------------------------------------------------]error Can't make a request in offline mode ("https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.2.tgz") info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. *** Error code 1 Note that when trying to reproduce this failure, make sure /usr/local/share/.cache/yarn does not exist.
(In reply to John Hein from comment #7) Also note that @babel-core-7.22.17.tgz exists in work/yarn-offline-cache. But ktrace is showing that yarn --offline does not find the babel-core tarball there despite the hint in .yarnrc: # cat /wrkdirs/usr/ports/security/gsa/work/gsa-22.7.1/.yarnrc yarn-offline-mirror "/wrkdirs/usr/ports/security/gsa/work/yarn-offline-cache" # ls /wrkdirs/usr/ports/security/gsa/work/yarn-offline-cache/ | grep babel.core @babel-core-7.22.17.tgz @babel-core-7.23.0.tgz # kdump -TT | grep -e babel.core -e yarn.offline.cache "yarn-offline-mirror "/wrkdirs/usr/ports/security/gsa/work/yarn-offline-cache" "yarn-offline-mirror "/wrkdirs/usr/ports/security/gsa/work/yarn-offline-cache" "@babel/core": "7.22.17", "yarn-offline-mirror "/wrkdirs/usr/ports/security/gsa/work/yarn-offline-cache" "yarn-offline-mirror "/wrkdirs/usr/ports/security/gsa/work/yarn-offline-cache" 38115 node 1697717690.759913 NAMI "/wrkdirs/usr/ports/security/gsa/work/yarn-offline-cache" 38115 node 1697717690.760035 NAMI "/wrkdirs/usr/ports/security/gsa/work/yarn-offline-cache" "@babel/core": "7.22.17", "@babel/core": "7.22.17", "@babel/core": "7.22.17", "@babel/core": "7.22.17", 0x0020 7920 7665 7273 696f 6e73 2066 6f72 2022 4062 6162 656c 2f63 6f72 6522 2074 6861 |y versions for "@babel/core" tha|
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3d5bec0e07b8106bc02a875b7efb27dc7438723f commit 3d5bec0e07b8106bc02a875b7efb27dc7438723f Author: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> AuthorDate: 2023-10-20 07:05:11 +0000 Commit: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> CommitDate: 2023-10-20 07:05:11 +0000 security/gsa: Fix build - Move from yarn to npm PR: 274276 Reported by: Trond Endrestøl <Trond.Endrestol _at_ ximalas.info> security/gsa/Makefile | 26 ++++++++++++-------------- security/gsa/distinfo | 6 +++--- 2 files changed, 15 insertions(+), 17 deletions(-)
I have modified security/gsa port. It should compile without problems right now. Test it and close this PR if evertything is working now
Excerpt from the log from my most recent successful build: -------------------------------------------------------------------------------- -- Phase: build -------------------------------------------------------------------------------- ===> Building for gsa-22.7.1_2 > gsa@22.7.1 build > INLINE_RUNTIME_CHUNK=false react-scripts build && rm -f build/*.js* Creating an optimized production build... Compiled successfully. File sizes after gzip: 754.44 kB build/static/js/main.2a269446.js 2.28 kB build/static/css/main.d6631c26.css The bundle size is significantly larger than recommended. Consider reducing it with code splitting: https://goo.gl/9VhYWB You can also analyze the project dependencies: https://goo.gl/LeUzfb The project was built assuming it is hosted at /. You can control this with the homepage field in your package.json. The build folder is ready to be deployed. You may serve it with a static server: npm install -g serve serve -s build Find out more about deployment here: https://cra.link/deployment npm notice npm notice New patch version of npm available! 10.2.0 -> 10.2.1 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.1> npm notice Run `npm install -g npm@10.2.1` to update! npm notice
A commit in branch 2023Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=aa316ba7d20994e0f78395f5ee3780692b510206 commit aa316ba7d20994e0f78395f5ee3780692b510206 Author: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> AuthorDate: 2023-10-20 07:05:11 +0000 Commit: Jose Alonso Cardenas Marquez <acm@FreeBSD.org> CommitDate: 2023-10-23 18:59:49 +0000 security/gsa: Fix build - Move from yarn to npm PR: 274276 Reported by: Trond Endrestøl <Trond.Endrestol _at_ ximalas.info> (cherry picked from commit 3d5bec0e07b8106bc02a875b7efb27dc7438723f) security/gsa/Makefile | 25 ++++++++++++------------- security/gsa/distinfo | 6 +++--- 2 files changed, 15 insertions(+), 16 deletions(-)