Per RFC 9110, [section 8.8.1][1], different representations of the same
resource should have different Etags:
> A strong validator is unique across all versions of all
> representations associated with a particular resource over time.
> However, there is no implication of uniqueness across representations
> of different resources (i.e., the same strong validator might be in
> use for representations of multiple resources at the same time and
> does not imply that those representations are equivalent)
When serving statically compressed files (ie, when there is an existing
corresponding .gz/.br/etc. file on disk), Nginx sends the Etag marked
as strong. These tags should be different for each compressed format
(as shown in an explicit example in section [8.8.3.3][2] of the RFC).
Upstream Etags are composed of the file modification timestamp and
content length, and the latter generally changes between these
representations.
Previous implementation of Nix-specific Etags for things served from
store used the store hash. This is fine to share between different
files, but it becomes a problem for statically compressed versions of
the same file, as it means Nginx was serving different representations
of the same resource with the same Etag, marked as strong.
This patch addresses this by imitating the upstream Nginx behavior, and
appending the value of content length to the store hash.
[1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-validator-fields
[2]:
https://www.rfc-editor.org/rfc/rfc9110.html#name-example-entity-tags-varying
this commit removes the static assignments for the ntfy-sh user and
group. furthermore, it removes some tmpfiles.d rules which where
initially put in place by https://github.com/NixOS/nixpkgs/pull/234811.
these are however not required, as ntfy-sh will automatically create the
required files and systemd automatically handles the migration process.
A nixosTest is added to demonstrate that the migration is working
reliably.
This also fixes an issue with where systemd would sometimes not start
ntfy-sh. The tmpfiles rules in combination with impermanence caused `/
var/lib/ntfy-sh` to be a directory when it should have been a symlink.
* nixos/tests/systemtap: init smoke test
* linuxPackages.systemtap: use --sysroot instead of -r
* nixos/tests/systemtap: rule out warnings
* linuxPackages.systemtap: smaller sysroot
* nixos/tests/systemtap: test on a few more kernels
* linuxPackages.systemtap: provide debuginfo for tracing kernel.function
* linuxPackages.systemtap: test kernel.function probe
* linuxPackages.systemtap: 4.8 -> 5.0a