about summary refs log tree commit diff
path: root/pkgs/tools/system
diff options
context:
space:
mode:
authorIzumi Raine <63145238+IzumiRaine@users.noreply.github.com>2022-09-14 17:42:54 +0200
committerehmry <ehmry@posteo.net>2022-09-14 21:28:55 -0500
commit302b1d05db31ae2eaf7d5456fd260df8b9e7ab97 (patch)
tree022bbca5ac90551458117ded455d733668d1e62f /pkgs/tools/system
parentc35a89ce3aeb0600751e7a470428d3e293134663 (diff)
downloadnixlib-302b1d05db31ae2eaf7d5456fd260df8b9e7ab97.tar
nixlib-302b1d05db31ae2eaf7d5456fd260df8b9e7ab97.tar.gz
nixlib-302b1d05db31ae2eaf7d5456fd260df8b9e7ab97.tar.bz2
nixlib-302b1d05db31ae2eaf7d5456fd260df8b9e7ab97.tar.lz
nixlib-302b1d05db31ae2eaf7d5456fd260df8b9e7ab97.tar.xz
nixlib-302b1d05db31ae2eaf7d5456fd260df8b9e7ab97.tar.zst
nixlib-302b1d05db31ae2eaf7d5456fd260df8b9e7ab97.zip
gptfdisk: 1.0.8 -> 1.0.9
Diffstat (limited to 'pkgs/tools/system')
-rw-r--r--pkgs/tools/system/gptfdisk/default.nix10
-rw-r--r--pkgs/tools/system/gptfdisk/ncurses-6.3.patch96
2 files changed, 2 insertions, 104 deletions
diff --git a/pkgs/tools/system/gptfdisk/default.nix b/pkgs/tools/system/gptfdisk/default.nix
index 3cb8f758eb2a..b470b9cea709 100644
--- a/pkgs/tools/system/gptfdisk/default.nix
+++ b/pkgs/tools/system/gptfdisk/default.nix
@@ -2,21 +2,15 @@
 
 stdenv.mkDerivation rec {
   pname = "gptfdisk";
-  version = "1.0.8";
+  version = "1.0.9";
 
   src = fetchurl {
     # https://www.rodsbooks.com/gdisk/${name}.tar.gz also works, but the home
     # page clearly implies a preference for using SourceForge's bandwidth:
     url = "mirror://sourceforge/gptfdisk/${pname}-${version}.tar.gz";
-    sha256 = "sha256-ldGYVvAE2rxLjDQrJhLo0KnuvdUgBClxiDafFS6dxt8=";
+    sha256 = "sha256-2v6tJpP6646Ll4MrI0B/btWzIZvBeE9ILdhVd04tUMI=";
   };
 
-  patches = [
-    # fix build failure against ncurses-6.3 (pending upstream inclusion):
-    #  https://sourceforge.net/p/gptfdisk/mailman/message/37392412/
-    ./ncurses-6.3.patch
-  ];
-
   postPatch = ''
     patchShebangs gdisk_test.sh
   '' + lib.optionalString stdenv.isDarwin ''
diff --git a/pkgs/tools/system/gptfdisk/ncurses-6.3.patch b/pkgs/tools/system/gptfdisk/ncurses-6.3.patch
deleted file mode 100644
index 4b8ec91aa04e..000000000000
--- a/pkgs/tools/system/gptfdisk/ncurses-6.3.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 9d5032d1487a8fe6ef7229d413418a27e32a28e5 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyich@gmail.com>
-Date: Mon, 1 Nov 2021 07:51:10 +0000
-Subject: [PATCH:gptfdisk] gptcurses.cc: always use "%s"-style format for printf()-style
- functions
-
-`ncuses-6.3` added printf-style function attributes and now makes
-it easier to catch cases when user input is used in palce of format
-string when built with CFLAGS=-Werror=format-security:
-
-    gptcurses.cc:274:10: error:
-        format not a string literal and no format arguments [-Werror=format-security]
-      274 |    printw(theLine.c_str());
-          |    ~~~~~~^~~~~~~~~~~~~~~~~
-
-Let's wrap all the missing places with "%s" format.
----
- gptcurses.cc | 24 ++++++++++++------------
- 1 file changed, 12 insertions(+), 12 deletions(-)
-
---- a/gptcurses.cc
-+++ b/gptcurses.cc
-@@ -239,22 +239,22 @@ Space* GPTDataCurses::ShowSpace(int spaceNum, int lineNum) {
-       ClearLine(lineNum);
-       if (space->partNum == -1) { // space is empty
-          move(lineNum, 12);
--         printw(BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str());
-+         printw("%s", BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str());
-          move(lineNum, 24);
-          printw("free space");
-       } else { // space holds a partition
-          move(lineNum, 3);
-          printw("%d", space->partNum + 1);
-          move(lineNum, 12);
--         printw(BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str());
-+         printw("%s", BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str());
-          move(lineNum, 24);
--         printw(space->origPart->GetTypeName().c_str());
-+         printw("%s", space->origPart->GetTypeName().c_str());
-          move(lineNum, 50);
-          #ifdef USE_UTF16
-          space->origPart->GetDescription().extract(0, 39, temp, 39);
--         printw(temp);
-+         printw("%s", temp);
-          #else
--         printw(space->origPart->GetDescription().c_str());
-+         printw("%s", space->origPart->GetDescription().c_str());
-          #endif
-       } // if/else
-    } // if
-@@ -271,10 +271,10 @@ int GPTDataCurses::DisplayParts(int selected) {
- 
-    move(lineNum++, 0);
-    theLine = "Part. #     Size        Partition Type            Partition Name";
--   printw(theLine.c_str());
-+   printw("%s", theLine.c_str());
-    move(lineNum++, 0);
-    theLine = "----------------------------------------------------------------";
--   printw(theLine.c_str());
-+   printw("%s", theLine.c_str());
-    numToShow = LINES - RESERVED_TOP - RESERVED_BOTTOM;
-    pageNum = selected / numToShow;
-    for (i = pageNum * numToShow; i <= (pageNum + 1) * numToShow - 1; i++) {
-@@ -636,7 +636,7 @@ void GPTDataCurses::DisplayOptions(char selectedKey) {
-          } // if/else
-       } // for
-       move(LINES - 1, (COLS - optionDesc.length()) / 2);
--      printw(optionDesc.c_str());
-+      printw("%s", optionDesc.c_str());
-       currentKey = selectedKey;
-    } // if
- } // GPTDataCurses::DisplayOptions()
-@@ -748,11 +748,11 @@ void GPTDataCurses::DrawMenu(void) {
- 
-    clear();
-    move(0, (COLS - title.length()) / 2);
--   printw(title.c_str());
-+   printw("%s", title.c_str());
-    move(2, (COLS - drive.length()) / 2);
--   printw(drive.c_str());
-+   printw("%s", drive.c_str());
-    move(3, (COLS - size.str().length()) / 2);
--   printw(size.str().c_str());
-+   printw("%s", size.str().c_str());
-    DisplayParts(currentSpaceNum);
- } // DrawMenu
- 
-@@ -802,7 +802,7 @@ void PromptToContinue(void) {
- void Report(string theText) {
-    clear();
-    move(0, 0);
--   printw(theText.c_str());
-+   printw("%s", theText.c_str());
-    move(LINES - 2, (COLS - 29) / 2);
-    printw("Press any key to continue....");
-    cbreak();