Add allinone (clean/vendor/build) default target to Makefile, Remove gui/providers/providers.json from git repo, Don't use unlink on *nix in Makefile
Fixes #867 (closed)
Makes developing a bit easier.
I removed the auto-generated providers.json from the repo. It seems like git also removed the upper directory. Seems like there was nothing else inside.... Nevermind: I had to change the gen-providersjson python script to create the directory....
Merge request reports
Activity
changed milestone to %2024.10 LEAP VPN Release
assigned to @peanut2
changed title from *Add ollinone (clean/vendor/build) default target to Makefile, Remove gui/providers/providers.json from git repo, Don't use unlin on nix to *Add ollinone (clean/vendor/build) default target to Makefile, Remove gui/providers/providers.json from git repo, Don't use unlink on nix in Makefile
- Resolved by Pea Nut
added 6 commits
-
8bc5fc06 - 1 commit from branch
main
- 7d1c9d19 - Create working dir in gen-providers-json helper script
- 6f9e737f - Remove gui/providers/providers.json from git repo
- 0c7f6eef - [Makefile] Use unlink only on Windows for make clean
- 28a1dc43 - [Makefile] Add default target allinone (clean/vendor/build)
- 14c523e1 - [Makefile] Remove install_go target
Toggle commit list-
8bc5fc06 - 1 commit from branch
- Resolved by Pea Nut
- Resolved by Pea Nut
added 17 commits
-
14c523e1...1256c39b - 13 commits from branch
main
- 08365033 - Remove gui/providers/providers.json from git repo
- 21577654 - [Makefile] Use unlink only on Windows for make clean
- 60ea4b93 - [Makefile] Add default target allinone (clean/vendor/build)
- 9e539d6b - [Makefile] Remove install_go target
Toggle commit list-
14c523e1...1256c39b - 13 commits from branch
I have some really strange behaviour:
If I run
PROVIDER=riseup QMAKE=qmake6 make allinone
, eveything works.
If I run it with-j $(nproc)
, it fails!pea@peabox:bitmask-vpn PROVIDER=riseup QMAKE=qmake6 make allinone -j $(nproc) RUNNING CLEAN RUNNING vendor [+] Generating providers.json... output: gui/providers/providers.json [+] Got provider riseup from environment [+] Configured provider: riseup git archive HEAD | tar -x -C ./build/bitmask-vpn_0.24.8-rc.2-7-g9e539d6b-src GEN PKG SNAP generate.py hooks local snapcraft-template.yaml [+] Got provider riseup from environment [+] Configured provider: riseup ['branding/scripts/generate-snap', 'build/riseup/snap/data.json'] Traceback (most recent call last): File "/home/pea/projects/leap/bitmask-vpn/branding/scripts/generate-snap", line 39, in <module> writeOutput(data, outputf) File "/home/pea/projects/leap/bitmask-vpn/branding/scripts/generate-snap", line 19, in writeOutput with open(outfile, 'w') as outf: ^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'build/riseup/snap/data.json' make: *** [Makefile:405: gen_pkg_snap] Error 1 make: *** Waiting for unfinished jobs.... pea@peabox:bitmask-vpn
This is the exact error we have in #887 (closed). But I can't reproduce on current main (that's the issue others have...). Super spooky.
Edited by Pea NutThe problem is that
build/riseup
directory does not exist.
Normally, it gets created in theprepare_templates
target.prepare_templates: tgz + @echo "RUNNING prepare_templates" @mkdir -p build/${PROVIDER}/bin/ deploy
I also added an echo here. The strange thing here is: If I run with
-j $(nproc)
theprepare_templates
target does not get called. We could just fix it (without understanding it):- create the
build/$PROVIDER
directory like described here: https://aur.archlinux.org/packages/riseup-vpn-git#comment-983938 - remove the
-j $(nproc)
and add it into the Makefile
Nevertheless I would like to understand. @jkito can you reproduce?
Edited by Pea Nut- create the
changed title from *Add ollinone (clean/vendor/build) default target to Makefile, Remove gui/providers/providers.json from git repo, Don't use unlink on nix in Makefile to *Add allinone (clean/vendor/build) default target to Makefile, Remove gui/providers/providers.json from git repo, Don't use unlink on nix in Makefile
- Resolved by Pea Nut
I found the issue: Calling make with
-j
calls the targets at the same time. Also the dependencies. Our Makefile expects the dependency targets to be run in the order they are specified:
vendor: gen_providers_json prepare_templates gen_pkg_snap gen_pkg_deb
That means:
- Calling
make -j
runs random targets. That's why errors are that random - We currently can't run
make -j
. We could fix it by creating the build/$PRIVDER directory in other targets, but I don't know if that solves all race condition errors - still strange: I don't have this issue on main (others have - some? Arch Linux people). We don't have the issue creating the build in the CI. And you @jkito - can you reproduce
?
If I run it without
-j
, it only uses a single core on my computer (mpstat -P ALL 1). That's the issue we should solve here by adding this into the Makefile. Then we can update the PKGBUILD in the CI/AUR.Edited by Pea Nut - Calling
added 22 commits
-
9e539d6b...bd2b8dcd - 15 commits from branch
main
- 7e9dfbe4 - Remove gui/providers/providers.json from git repo
- bfcecdaa - [Makefile] Use unlink only on Windows for make clean
- 5c05a2f5 - [Makefile] Add default target allinone (clean/vendor/build)
- ac5fd432 - [Makefile] Remove install_go target
- 4c0a8b2d - [makefile] Fix racecondition in Makefile
- 5694fa8b - [makefile] Use qmake6 instead of qmake6
- 6f47fa44 - [makefile] Always build with -j $(nproc)
Toggle commit list-
9e539d6b...bd2b8dcd - 15 commits from branch
- Resolved by Pea Nut
I added some changes. Now
- we can call it with -j or without - the directories will be created in each target
- use qmake6 as default - Today I forgot to set QMAKE=qmak6 and got random compilation errors. That's super confusing
- always use -j $(nproc)
requested review from @jkito
added 14 commits
-
3c999225...4b200a2b - 8 commits from branch
main
- d04fd4d3 - Remove gui/providers/providers.json from git repo
- acd8dc18 - [Makefile] Use unlink only on Windows for make clean
- 32152325 - [Makefile] Add default target allinone (clean/vendor/build)
- a0543ecc - [Makefile] Remove install_go target
- e4607f5c - [makefile] Fix racecondition in Makefile
- fa6ca683 - [makefile] Don't overwrite QMAKE env when calling build.sh
Toggle commit list-
3c999225...4b200a2b - 8 commits from branch
- Resolved by Pea Nut
enabled an automatic merge when the pipeline for 89e85ee2 succeeds
mentioned in issue #887 (closed)