Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data did not match any variant of untagged enum PackageMaintainers at line 334347 column 7 #32

Closed
kjeremy opened this issue Jun 4, 2024 · 6 comments · Fixed by #34
Closed

Comments

@kjeremy
Copy link
Contributor

kjeremy commented Jun 4, 2024

Similar to #21 I am getting:

[00:00:00.000] (7fdeacdbe7c0) INFO   Getting the derivations from .#
[00:00:05.813] (7fdeacdbe7c0) INFO   Found 809 derivations
[00:00:05.813] (7fdeacdbe7c0) INFO   Using the package metadata from packages-metadata.json
Error: "data did not match any variant of untagged enum PackageMaintainers at line 334347 column 7"

That derivation is the following:

  "nixos.ghidra": {
    "meta": {
      "available": true,
      "broken": false,
      "description": "A software reverse engineering (SRE) suite of tools developed by NSA's Research Directorate in support of the Cybersecurity mission",
      "homepage": "https://ghidra-sre.org/",
      "insecure": false,
      "license": {
        "deprecated": false,
        "free": true,
        "fullName": "Apache License 2.0",
        "redistributable": true,
        "shortName": "asl20",
        "spdxId": "Apache-2.0",
        "url": "https://spdx.org/licenses/Apache-2.0.html"
      },
      "maintainers": [
        "roblabla"
      ],
      "name": "ghidra-10.1.2",
      "outputsToInstall": [
        "out"
      ],
      "platforms": [
        "x86_64-linux",
        "x86_64-darwin"
      ],
      "position": "/nix/store/3nyf6ydmhggdskci66mv0vlyfwwinx0l-nixos/nixos/pkgs/tools/security/ghidra/build.nix:171",
      "unfree": false,
      "unsupported": false
    },
    "name": "ghidra-10.1.2",
    "outputName": "out",
    "outputs": {
      "out": null
    },
    "pname": "ghidra",
    "system": "x86_64-linux",
    "version": "10.1.2"
  },

Here is the file:
packages-metadata.zip

@louib
Copy link
Owner

louib commented Jun 5, 2024

@kjeremy thanks for the bug report, should be fixed now!

@kjeremy
Copy link
Contributor Author

kjeremy commented Jun 5, 2024

@louib I have another one for you:

  "nixos.sway-contrib.grimshot": {
    "meta": {
      "available": true,
      "broken": false,
      "description": "A helper for screenshots within sway",
      "homepage": "https://github.com/swaywm/sway/tree/master/contrib",
      "insecure": false,
      "license": {
        "deprecated": false,
        "free": true,
        "fullName": "MIT License",
        "redistributable": true,
        "shortName": "mit",
        "spdxId": "MIT",
        "url": "https://spdx.org/licenses/MIT.html"
      },
      "maintainers": [
        [
          {
            "email": "dev.primeos@gmail.com",
            "github": "primeos",
            "githubId": 7537109,
            "keys": [
              {
                "fingerprint": "86A7 4A55 07D0 58D1 322E  37FD 1308 26A6 C2A3 89FD",
                "longkeyid": "ed25519/0x130826A6C2A389FD"
              },
              {
                "fingerprint": "AF85 991C C950 49A2 4205  1933 BCA9 943D D1DF 4C04",
                "longkeyid": "rsa3072/0xBCA9943DD1DF4C04"
              }
            ],
            "matrix": "@primeos:matrix.org",
            "name": "Michael Weiss"
          },
          {
            "email": "nix@hilhorst.be",
            "github": "Synthetica9",
            "githubId": 7075751,
            "name": "Patrick Hilhorst"
          },
          {
            "email": "maximilian@mbosch.me",
            "github": "ma27",
            "githubId": 6025220,
            "matrix": "@ma27:nicht-so.sexy",
            "name": "Maximilian Bosch"
          }
        ],
        {
          "email": "evils.devils@protonmail.com",
          "github": "evils",
          "githubId": 30512529,
          "matrix": "@evils:nixos.dev",
          "name": "Evils"
        }
      ],
      "name": "grimshot-1.7",
      "outputsToInstall": [
        "out",
        "man"
      ],
      "platforms": [
        "i686-cygwin",
        "x86_64-cygwin",
        "x86_64-darwin",
        "i686-darwin",
        "aarch64-darwin",
        "armv7a-darwin",
        "i686-freebsd",
        "x86_64-freebsd",
        "aarch64-genode",
        "i686-genode",
        "x86_64-genode",
        "x86_64-solaris",
        "js-ghcjs",
        "aarch64-linux",
        "armv5tel-linux",
        "armv6l-linux",
        "armv7a-linux",
        "armv7l-linux",
        "i686-linux",
        "m68k-linux",
        "mipsel-linux",
        "mips64el-linux",
        "powerpc64-linux",
        "powerpc64le-linux",
        "riscv32-linux",
        "riscv64-linux",
        "s390-linux",
        "s390x-linux",
        "x86_64-linux",
        "mmix-mmixware",
        "aarch64-netbsd",
        "armv6l-netbsd",
        "armv7a-netbsd",
        "armv7l-netbsd",
        "i686-netbsd",
        "m68k-netbsd",
        "mipsel-netbsd",
        "powerpc-netbsd",
        "riscv32-netbsd",
        "riscv64-netbsd",
        "x86_64-netbsd",
        "aarch64_be-none",
        "aarch64-none",
        "arm-none",
        "armv6l-none",
        "avr-none",
        "i686-none",
        "msp430-none",
        "or1k-none",
        "m68k-none",
        "powerpc-none",
        "powerpcle-none",
        "riscv32-none",
        "riscv64-none",
        "s390-none",
        "s390x-none",
        "vc4-none",
        "x86_64-none",
        "i686-openbsd",
        "x86_64-openbsd",
        "x86_64-redox",
        "wasm64-wasi",
        "wasm32-wasi",
        "x86_64-windows",
        "i686-windows"
      ],
      "position": "/nix/store/3nyf6ydmhggdskci66mv0vlyfwwinx0l-nixos/nixos/pkgs/applications/window-managers/sway/contrib.nix:59",
      "unfree": false,
      "unsupported": false
    },
    "name": "grimshot-1.7",
    "outputName": "out",
    "outputs": {
      "man": null,
      "out": null
    },
    "pname": "grimshot",
    "system": "x86_64-linux",
    "version": "1.7"
  },

@kjeremy
Copy link
Contributor Author

kjeremy commented Jun 5, 2024

See: package-metadata.zip

@kjeremy
Copy link
Contributor Author

kjeremy commented Jun 5, 2024

I think there are two issues here:

  1. GPG keys (which I implemented locally)
  2. A weird structure for package maintainers which seems to be a combination of EmbeddedList and List.
"maintainers": [
            [
                {
                    "email": "dev.primeos@gmail.com",
                    "github": "primeos",
                    "githubId": 7537109,
                    "keys": [
                        {
                            "fingerprint": "86A7 4A55 07D0 58D1 322E  37FD 1308 26A6 C2A3 89FD",
                            "longkeyid": "ed25519/0x130826A6C2A389FD"
                        },
                        {
                            "fingerprint": "AF85 991C C950 49A2 4205  1933 BCA9 943D D1DF 4C04",
                            "longkeyid": "rsa3072/0xBCA9943DD1DF4C04"
                        }
                    ],
                    "matrix": "@primeos:matrix.org",
                    "name": "Michael Weiss"
                },
                {
                    "email": "nix@hilhorst.be",
                    "github": "Synthetica9",
                    "githubId": 7075751,
                    "name": "Patrick Hilhorst"
                },
                {
                    "email": "maximilian@mbosch.me",
                    "github": "ma27",
                    "githubId": 6025220,
                    "matrix": "@ma27:nicht-so.sexy",
                    "name": "Maximilian Bosch"
                }
            ],
            {
                "email": "evils.devils@protonmail.com",
                "github": "evils",
                "githubId": 30512529,
                "matrix": "@evils:nixos.dev",
                "name": "Evils"
            }
        ],

@louib
Copy link
Owner

louib commented Jun 5, 2024

@kjeremy thanks for the additional details. Please consider opening a PR for the GPG keys, I'd love to see this feature make it into the codebase.

I'll have to refactor the PackageMaintainers enum for allow for heterogeneous list of maintainers. In the meantime, you might be able to use the --no-meta option to disable parsing the package meta dictionary. Not ideal, but it will at least allow you to continue testing the tool.

@kjeremy
Copy link
Contributor Author

kjeremy commented Jun 5, 2024

Please consider opening a PR for the GPG keys, I'd love to see this feature make it into the codebase.

Will do. It just handles the parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants