Subject: [bug#69126] [PATCH 1/2] gnu: Add debug-assert.

From: Skyler Ferris <[email-masked]>
Date: Wed, 14 Feb 2024 21:29:05 +0000

Things needing attention:

`guix lint` issues a warning that the beginning of the description 
starts with a lowercase letter. IMO this is reasonable because the first 
word is the name of the project, and it is a common convention for 
project names to remain lowercased (the README in the project follows 
this convention). However I am not sure how the Guix maintainers 
consider this.

The arguments form is attached to a comment saying that there are no 
tests, but it looks like the repository does contain a test in the 
`test_package` directory with a separate CMakelists.txt file. I haven't 
spent much time with the cmake build system in Guix, would it be 
reasonable to replace the check phase with a procedure that uses the 
file in this directory? If not then it might be helpful to replace the 
comment with one explaining that, while tests exist, it is not feasible 
to run them for some specific reason.

More details:

This diff applies cleanly to commit 
ac470c516e19f194228edf9e348bdbc7fc10f97a.

The following paragraph contains notes about the confidence level of 
source integrity. These notes are provided to indicate that due 
attention has been given to this matter and to provide transparency into 
the level of confidence in the source as well as the entities trusted 
with maintaining integrity. The "optimal" level of confidence is 
use-case dependent, as is the trustability of any given entity. These 
notes are provided for transparency to the committer and any other 
interested parties and should not be interpreted as criticism of the commit.

The commit used in the source form is signed by PGP key 
5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23. The key is expired but NOT 
revoked. It is available on the Ubuntu keyserver 
(http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x5de3e0509c47ea3cf04a42d34aee18f83afdeb23) 
with several other signatures, though none that are trusted by my 
keyring. It is also available on the OpenPGP keyserver 
(https://keys.openpgp.org/vks/v1/by-fingerprint/5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23) 
but without a UID, meaning the email address was not verified. Note that 
one of the UIDs listed in the Ubuntu server is "GitHub (web-flow 
commit)", implying that the GitHub server is ultimately responsible for 
maintaining integrity.

`./pre-inst-env guix build debug-assert` succeeded on my machine, an 
x86_64 Xen guest. Additionally, the following program (based on the 
example in the README) successfully compiled and produced the expected 
output.

main.cpp
```
#include <debug_assert.hpp>

struct mymodule : debug_assert::default_handler, 
debug_assert::set_level<static_cast<unsigned int>(-1)> {};

int main(void) {
     DEBUG_ASSERT(1 +1 == 3, my_module{}, debug_assert::level<2>{});
}
```

```
$ ./pre-inst-env guix shell gcc-toolchain debug-assert -C -- g++ 
-std=c++11 main.cpp
$ ./a.out
[debug assert] main.cpp:6: Assertion '1 +1 == 3' failed.
Aborted
```

The LICENSE file provided in the source repository matches the contents 
I see at https://directory.fsf.org/wiki/License:Zlib.