Commit Graph

83 Commits

Author SHA1 Message Date
tersec 14e0c55e89
quote and library paths for use in passc/passl to allow embedded spaces (#79) 2024-03-26 18:36:14 +00:00
Etan Kissling 3866a8ab98
remove `Nim-csources-v1` and `nimble` checkouts (#75)
When `build_nim.sh` detects that `skipIntegrityCheck` is supported,
it runs the upstream toolchain for building Nim, ignoring the locally
checked out `Nim-csources-v1` and `nimble` sub-repositories. So, having
those repos checked out is not useful in that scenario.

When `skipIntegrityCheck` is unsupported, `build_nim.sh` uses the local
sub-repositories if they are available. But, it also clones them if they
are unavailable using commits as specified by environment variables.
Because the clone will happen as part of the script, having the repos
linked as sub-repositories is also not useful. Even worse, if the script
has different commit hashes than the subrepository, the behaviour is
different depending on whether `build_nim.sh` is run before or after
the submodules are checked out.

Therefore, we can remove the `Nim-csources-v1` and `nimble` sub-repos,
using the upstream build system if available, or the hardcoded commits
inside `build_nim.sh` to have a manual build, as before.

Also moves the various variables that control the used versions into
the manual section to emphasize that these only take effect in manual
mode, but not when using upstream build system (`skipIntegrityCheck`).

If one wants to use a custom `Nimble` version, fork `Nim` and adjust the
config in that fork. That also works with the upstream build system.
2024-01-15 16:21:06 +01:00
Etan Kissling c01eb708bc
adjust `CSOURCES_V1_COMMIT` variable with recent bump (#73) (#74)
Forgot to update the ref in the build script to actually use the new
commit. Do that now.
2024-01-15 15:51:12 +01:00
Etan Kissling 239c3a7fbb
install Nimble CA cert when `skipIntegrityCheck` (#62)
In #61 a regression was introduced where Nimble fails to build packages.

```
    Prompt: No local packages.json found, download it from internet? -> [forced yes]
Downloading Official package list
       Tip: 6 messages have been suppressed, use --verbose to show them.
     Error: Refresh failed
        ... Could not download: No SSL/TLS CA certificates found.
Error: Process completed with exit code 1.
```

Ensure that CA cert is being downloaded once more, even when `koch`
supports `skipIntegrityCheck`.
2023-06-09 20:26:55 +02:00
markspanbroek 17d85dac6f
Fix checking out of recent Nim tags in shallow repo (#58)
* Fix checking out of recent Nim tags in shallow repo

When calling `git fetch` on a shallow repo, recent
tags or commits are refused. Fetching with `--tags`
ensures that the latest tags and the commits that
they point to are fetched.

More info:
https://git-scm.com/docs/git-fetch#Documentation/git-fetch.txt---update-shallow

Co-authored-by: Tanguy <tanguy@status.im>
2023-06-07 12:36:06 +02:00
Tanguy cb65dbcd80
Use upstream build system when possible (#61) 2023-05-22 15:55:06 +02:00
Zahary Karadjov 95afb33019
Generate nimbus-build-system.paths from env.sh again
The model where nimbus-build-system.paths were generated as a dependency
from `update-common` proved to create various issues in practice:

* It was not working properly during the repository bootstrapping
  because the paths file generation script is assuming that all
  submodules are already checked out

* It was not always triggered from builds of the top-level targets
  due to missing or already satisfied dependencies on `update-common`.

A more proper solution would structure the dependencies like this:

top-level-project -> nimbus-build-system.paths -> vendor-modules

... but this requires a larger refactoring of the Makefiles, so I'm
merging this interim solution as a way to improve the status quo.
2023-02-23 17:12:35 +02:00
Tanguy 72d51e4c32
Fix windows CI building (#56)
Linking doesn't work properly on github actions windows machines
2023-01-12 13:38:06 +01:00
Tanguy c488f87b09
Automatic csources selection (#55) 2023-01-05 10:40:49 +01:00
Jacek Sieka 8c59324e8f
introduce `NIMC` to control which `nim` to call (#53) 2022-11-24 17:07:01 +01:00
Zahary Karadjov dc535cd462
Better compatibility with direnv
Scripts sourcing a project env.sh file (e.g. direnv's .envrc) can specify
the `NBS_ONLY_LOAD_ENV_VARS` env variable to avoid any attempts from NBS
to execute a target script. Previously, the script was trying to detect
only sourcing from an interactive shell.
2022-10-15 00:59:16 +03:00
Zahary Karadjov b1d380e07e
Allow the paths file to be created outside of the build system env 2022-10-15 00:21:53 +03:00
Zahary Karadjov d548b20ecd
Generate the paths file in 'make update' 2022-10-14 23:43:51 +03:00
Ivan Yonchovski daff2b4670
Make sure the path is understandable for nim on windows (#49) 2022-09-12 12:50:14 +03:00
Zahary Karadjov c7977002fb
Support vendor packages with a 'src' folder 2022-08-25 22:17:48 +03:00
Ivan Yonchovski daca2e58bd
Initial step to make NBS work with --noNimblePath (#48)
Here POC on what are the other steps that have to be performed to allow using NBS.

0961d3acc2

Once all projects migrate to this approach, the code related to building
NIMBLE_PATH can be deleted from the repo

cc @zah
2022-08-11 13:09:15 +03:00
Ștefan Talpalaru a8ab2dc39a
build_nim.sh: hide stderr from "ls" (#43) 2022-03-18 21:09:01 +01:00
Ștefan Talpalaru 041544c2b7
build_nim.sh: fix "cacert.pem" corner case (#42) 2022-03-18 10:29:00 +01:00
Ștefan Talpalaru 8377eed7c0
build_nim.sh: limit the number of Nim binaries (#41)
The most recent 10 compiler binaries should be enough for everyone.
2022-03-18 10:21:21 +01:00
Ștefan Talpalaru f62fa395f7
build_nim.sh: handle manual symlink deletion (#39) 2022-01-26 11:54:34 +01:00
Ștefan Talpalaru bc4791418a
remove build_p2pd.sh (#38)
nim-libp2p has its own copy
2022-01-20 03:24:43 +01:00
Ștefan Talpalaru 36e57b833d
EXCLUDED_NIM_PACKAGES (#37) 2022-01-20 00:44:30 +01:00
Ștefan Talpalaru b4ae7bbc92
hide some annoying stderr (#32) 2021-12-08 13:20:56 +01:00
Ștefan Talpalaru 8d226580a0
build_nim.sh: don't set a default NIM_COMMIT value
Targeting a branch doesn't work, when it's a submodule pointing to an
older commit that we're dealing with.
2021-11-10 09:46:43 +01:00
Ștefan Talpalaru 15bc75d4cf QUICK_AND_DIRTY_NIMBLE 2021-09-07 18:28:47 +03:00
Ștefan Talpalaru 7897dfe46c
deal w/ a diverged local branch where a ff merge is not possible 2021-07-30 21:34:43 +02:00
Ștefan Talpalaru 0e709abc28
build_nim.sh: deal with old local branches used as Nim targets (#23) 2021-07-30 01:12:26 +02:00
Ștefan Talpalaru a1da1f403d
don't build csources twice on Nim devel 2021-06-17 04:52:02 +02:00
Ștefan Talpalaru 77747657f6
support old Git versions, like the one from Ubuntu-18.04 2021-05-25 19:51:12 +02:00
Ștefan Talpalaru e125ec9a51
build_nim.sh: change csources repo
Nim devel no longer builds with the old one
2021-05-22 17:13:58 +02:00
Ștefan Talpalaru 8758242198
build_nim.sh: update "last_built_commit" 2021-05-22 04:44:06 +02:00
Ștefan Talpalaru 12c3591fc1
speculative fix 2021-05-05 12:25:14 +02:00
Ștefan Talpalaru 38e81f10d3
Windows: the "nim" symlinks lacked a suffix 2021-04-29 13:22:35 +02:00
Ștefan Talpalaru 47b4317888
deal with local modifications in the working copy 2021-04-29 01:31:35 +02:00
Ștefan Talpalaru 135e43468f
add an upstream remote to the Status Nim fork repo
and fix the Nimble commit that went missing upstream at some point
2021-04-29 01:07:25 +02:00
Ștefan Talpalaru 7d418e44da move from timestamps to commit hashes
This allows a faster path for the most common scenario and avoiding a
hard link that probably doesn't work on Windows.
2021-04-28 18:00:44 +03:00
Zahary Karadjov dc8e54b1e9 Allow the user to specify the Nim version in an ENV variable 2021-04-28 18:00:44 +03:00
Ștefan Talpalaru 820aeaec8e
download CA cert for Nimble 2021-02-26 01:34:21 +01:00
Ștefan Talpalaru 316f033bad
Nim-1.2.10 2021-02-23 20:53:00 +01:00
Ștefan Talpalaru 17aeb26a24
comment 2021-02-11 02:15:06 +01:00
Ștefan Talpalaru 53870bc6bc
add_submodule.sh: ignore only untracked files in submodules 2021-01-20 20:02:59 +01:00
Ștefan Talpalaru 98b580a00e
QUICK_AND_DIRTY_COMPILER: add a bootstrap iteration 2021-01-10 22:53:15 +01:00
Ștefan Talpalaru f7c732a150 new variable: QUICK_AND_DIRTY_COMPILER
Don't re-build the Nim compiler multiple times until we get identical
binaries, like "build_all.sh" does. Don't build any tools either.

Disabled by default, useful in CI.
2021-01-06 14:54:31 +02:00
Ștefan Talpalaru 92e5042667
USE_SYSTEM_NIM: print message to stderr 2020-10-14 01:25:15 +02:00
Ștefan Talpalaru 79469de156
libnatpmp.a: use CFLAGS from the environment 2020-09-22 19:32:19 +02:00
Mamy André-Ratsimbazafy 525772599d
support Linux 32-bit builds 2020-09-18 19:51:17 +02:00
Jakub 384264142c
use env bash shebangs for portability (#11)
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-13 15:37:57 +02:00
Ștefan Talpalaru 9bad27f6c2
show-deps: also show commit hashes 2020-07-16 21:02:06 +02:00
Ștefan Talpalaru 077cba3487
build_nim.sh: quiet Git cloning 2020-06-19 00:46:22 +02:00
Ștefan Talpalaru f764fdf7f2
build_p2pd.sh: print target version 2020-06-18 23:07:56 +02:00