Nim/changelogs
Timothy Alexander dde556665a
Fix #19052; [backport:1.6.0] (#19053)
* Fix #19052; [backport:1.6.0]

Adds a compile flag to avoid a getrandom syscall, fixing #19052.

This is neccesary when the getrandom syscall is missing, as noted in #19052, particularly in kernel versions < 3.17 when getrandom was introduced. Specifically relevant is this is missing from kernel 3.10, which is the supported kernel throughout RHEL 7 and CentOS 7, which is widely used at many organizations. Without this, versions of nim that include sysrand (i.e. versions >= 1.6.0) will not compile without modification, however with this change a compile flag may be used to fall back using /dev/urandom as done with any unknown Posix OS (preferred here as a fallback since it already supplies a cryptographically secure PRNG and existing code deals with entropy pool init, etc).

The change is placed behind a compile flag, as discussed in github ticket #19052 (summed up here):
* First, I can't seem to catch that a importc such as SYS_getrandom is declared without using it (the declared proc returns true, but compiler throws an undeclared identifier flag when referencing it).
* Second, it seemed preferable to be behaviorally explicit vs implicit when considering this is intended to be a cryptographically secure PRNG.
* Third, if I intend to compile on a kernel >= 3.17 while running the binary on at least one system < 3.17, I'll want to be able to target this without relying on a compile time determination if the getrandom syscall is available.

* Documenting compile flag for -d:nimNoGetRandom and adding changelog entry
Related to #19052 and comments in PR #19053. Also created a new changelog file since none currently exists.

Co-authored-by: Timothy Alexander <talexander@midwestlabs.com>
2021-10-26 20:32:52 +02:00
..
changelog.md Fix #19052; [backport:1.6.0] (#19053) 2021-10-26 20:32:52 +02:00
changelog_0_18_1.md [backport] Fix spelling typos (#12755) 2019-11-28 08:30:55 +01:00
changelog_0_19_0.md use more .} (#18542) 2021-07-20 20:12:15 +08:00
changelog_0_20_0.md more changelog fixes 2019-06-06 08:57:50 +02:00
changelog_0_20_2.md update changelogs [ci skip] 2019-07-17 21:20:28 +02:00
changelog_1_0_0.md Revert "improvements for httpcore (#12228)" 2019-09-23 19:06:55 +02:00
changelog_1_0_2.md add changelog for v1.0.2 2019-10-23 14:35:31 +02:00
changelog_1_2_0.md fix #14064 xmltree should allow create text node with raw text(non-es… (#14070) 2020-04-22 19:46:55 +02:00
changelog_1_4_0.md cosmetic fixes for the 1.4 changelog [ci skip] 2020-10-16 13:18:31 +02:00
changelog_1_6_0.md changelog_1_6_0: mention breaking change in effect tracking (#18995) 2021-10-15 09:10:27 +02:00
changelog_X_XX_X.md followup #17700 put changelog in wrong file (#17729) 2021-04-15 22:45:51 +02:00
readme.md fixes #9376: old changelogs should be kept instead of erased (#9428) 2018-10-19 09:33:42 +02:00

Update changelog

After each release, call:

git mv changelog.md changelogs/changelog_0_19_0.md # use correct version
cp changelogs/changelog_X_XX_X.md changelog.md
git add changelog.md

Recent changelogs are saved here (with their git history)

Older changelogs are stored in https://github.com/nim-lang/website

source files:

urls: