Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a53ed231d218
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 11c84a902ef9
Choose a head ref
  • 2 commits
  • 3 files changed
  • 3 contributors

Commits on Jun 7, 2020

  1. epkowa: fix parsing of interpreters (#82909) (#89506)

    Building with -std=c99 breaks the obsolete "%as" format string, which
    completely breaks the parsing of epkowa interpreters. This means that
    no scanner requiring plugins worked.
    
    (cherry picked from commit e22eb2d)
    
    Co-authored-by: Dominik Honnef <dominik@honnef.co>
    symphorien and dominikh authored Jun 7, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    samueljsb Samuel Searles-Bryant
    Copy the full SHA
    0c2ddc1 View commit details
  2. boot: fix order of arguments for hasPrefix (#89751)

    (cherry picked from commit e4f4450)
    Nadrieril authored and Ekleog committed Jun 7, 2020
    Copy the full SHA
    11c84a9 View commit details
Showing with 31 additions and 1 deletion.
  1. +1 −1 nixos/modules/system/boot/stage-1.nix
  2. +1 −0 pkgs/misc/drivers/epkowa/default.nix
  3. +29 −0 pkgs/misc/drivers/epkowa/sscanf.patch
2 changes: 1 addition & 1 deletion nixos/modules/system/boot/stage-1.nix
Original file line number Diff line number Diff line change
@@ -571,7 +571,7 @@ in
{ assertion = !config.boot.loader.supportsInitrdSecrets ->
all (source:
builtins.isPath source ||
(builtins.isString source && hasPrefix source builtins.storeDir))
(builtins.isString source && hasPrefix builtins.storeDir source))
(attrValues config.boot.initrd.secrets);
message = ''
boot.loader.initrd.secrets values must be unquoted paths when
1 change: 1 addition & 0 deletions pkgs/misc/drivers/epkowa/default.nix
Original file line number Diff line number Diff line change
@@ -244,6 +244,7 @@ stdenv.mkDerivation rec {
sha256 = "04y70qjd220dpyh771fiq50lha16pms98mfigwjczdfmx6kpj1jd";
})
./firmware_location.patch
./sscanf.patch
];
patchFlags = [ "-p0" ];

29 changes: 29 additions & 0 deletions pkgs/misc/drivers/epkowa/sscanf.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
The "%as" verb requests sscanf to allocate a buffer for us. However,
this use of 'a' has been long deprecated, and gcc doesn't support it
in this manner when using -std=c99. The modern replacement is "%ms".

Without this change, iscan couldn't read the interpreter file, in turn
breaking all scanners that require plugins.
--- backend/cfg-obj.c.orig 2020-03-19 01:27:17.254762077 +0100
+++ backend/cfg-obj.c 2020-03-19 02:01:52.293329873 +0100
@@ -1026,7 +1026,7 @@
char *vendor = NULL;
char *model = NULL;

- sscanf (string, "%*s %as %as", &vendor, &model);
+ sscanf (string, "%*s %ms %ms", &vendor, &model);

if (list_append (_cfg->seen[CFG_KEY_SCSI], info))
{
@@ -1108,10 +1112,10 @@
char *library = NULL;
char *firmware = NULL;

- sscanf (string, "%*s %*s %x %x %as %as",
+ sscanf (string, "%*s %*s %x %x %ms %ms",
&vendor, &product, &library, &firmware);

if (library && _cfg_have_interpreter (library, firmware)
&& list_append (_cfg->seen[CFG_KEY_INTERPRETER], info))
{