Page MenuHomeSoftware Heritage
Paste P1490

File with "recursive" outputHashAlgo: cannot do anything about it (bit executable not propagated to manifest)
ActivePublic

Authored by ardumont on Oct 6 2022, 2:27 PM.
Definition: https://github.com/NixOS/nixpkgs/blob/350fd0044447ae8712392c6b212a18bdf2433e71/pkgs/development/tools/misc/remarkable/remarkable-toolchain/default.nix
which present an "executable" option not propagated to the manifest so the basic hash computation (nix-store --dump) cannot work without `chmod +x` the file.
```
$ cat /var/tmp/sources-unstable-full.json | jq . | grep -C6 https://storage.googleapis.com/remarkable-codex-toolchain/codex-x86_64-cortexa9hf-neon-rm10x-toolchain-3.1.2.sh
{
"outputHash": "sha256-ocODUUx2pgmqxMk8J+D+OvqlSHBSay6YzcqnxC9n59w=",
"outputHashAlgo": "sha256",
"outputHashMode": "recursive",
"type": "url",
"urls": [
"https://storage.googleapis.com/remarkable-codex-toolchain/codex-x86_64-cortexa9hf-neon-rm10x-toolchain-3.1.2.sh"
],
"integrity": "sha256-ocODUUx2pgmqxMk8J+D+OvqlSHBSay6YzcqnxC9n59w=",
"inferredFetcher": "unclassified"
},
{
"outputHash": "sha256-JKMDRbkvoxwHiTm/o4JdLn3Mm2Ld1LyxTnCCwvnxk4c=",
$ nix-store --dump codex-x86_64-cortexa9hf-neon-rm10x-toolchain-3.1.2.sh | sha256sum
0144c6c6b10f88fbf5c154d9e6beb11c771ad71f36d4d0edfc8c3fc01239dda4 -
$ integrity decode "sha256-ocODUUx2pgmqxMk8J+D+OvqlSHBSay6YzcqnxC9n59w="
sha256 a1c383514c76a609aac4c93c27e0fe3afaa54870526b2e98cdcaa7c42f67e7dc
$ ls -lah codex-x86_64-cortexa9hf-neon-rm10x-toolchain-3.1.2.sh
-rw-r--r-- 1 tony tony 211M Jan 14 2021 codex-x86_64-cortexa9hf-neon-rm10x-toolchain-3.1.2.sh
$ chmod +x codex-x86_64-cortexa9hf-neon-rm10x-toolchain-3.1.2.sh
ls -lah codex-x86_64-cortexa9hf-neon-rm10x-toolchain-3.1.2.sh
-rwxr-xr-x 1 tony tony 211M Jan 14 2021 codex-x86_64-cortexa9hf-neon-rm10x-toolchain-3.1.2.sh
$ integrity decode "sha256-ocODUUx2pgmqxMk8J+D+OvqlSHBSay6YzcqnxC9n59w="
sha256 a1c383514c76a609aac4c93c27e0fe3afaa54870526b2e98cdcaa7c42f67e7dc
$ nix-store --dump codex-x86_64-cortexa9hf-neon-rm10x-toolchain-3.1.2.sh | sha256sum
a1c383514c76a609aac4c93c27e0fe3afaa54870526b2e98cdcaa7c42f67e7dc -
```

Event Timeline

Another one [1] [2]

[1] https://github.com/NixOS/nixpkgs/blob/350fd0044447ae8712392c6b212a18bdf2433e71/pkgs/tools/networking/snmpcheck/default.nix

[2]

    {
      "outputHash": "sha256-9xkLqbgxU1uykx+M9QsbPAH8OI/Cqn9uw6ALe23Lbq0=",
      "outputHashAlgo": "sha256",
      "outputHashMode": "recursive",
      "type": "url",
      "urls": [
        "http://www.nothink.org/codes/snmpcheck/snmpcheck-1.9.rb"
      ],
      "integrity": "sha256-9xkLqbgxU1uykx+M9QsbPAH8OI/Cqn9uw6ALe23Lbq0=",
      "inferredFetcher": "unclassified"
    },

$ wget 'http://www.nothink.org/codes/snmpcheck/snmpcheck-1.9.rb'
--2022-10-06 14:46:40--  http://www.nothink.org/codes/snmpcheck/snmpcheck-1.9.rb
Resolving www.nothink.org (www.nothink.org)... 62.149.140.215
Connecting to www.nothink.org (www.nothink.org)|62.149.140.215|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 33258 (32K)
Saving to: ‘snmpcheck-1.9.rb’

snmpcheck-1.9.rb              100%[================================================>]  32.48K  --.-KB/s    in 0.06s

2022-10-06 14:46:40 (526 KB/s) - ‘snmpcheck-1.9.rb’ saved [33258/33258]

$ integrity decode "sha256-9xkLqbgxU1uykx+M9QsbPAH8OI/Cqn9uw6ALe23Lbq0="
sha256 f7190ba9b831535bb2931f8cf50b1b3c01fc388fc2aa7f6ec3a00b7b6dcb6ead
$ nix-store --dump snmpcheck-1.9.rb | sha256sum
be933832f7ba677117b0159df9e942a51b309119f39ed08bbdf3f23e4d459621  -