Skip to content

Cleanup compression#130928

Merged
SuperSandro2000 merged 17 commits intoNixOS:masterfrom
SuperSandro2000:cleanup-compression
Jul 22, 2021
Merged

Cleanup compression#130928
SuperSandro2000 merged 17 commits intoNixOS:masterfrom
SuperSandro2000:cleanup-compression

Conversation

@SuperSandro2000
Copy link
Member

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Relase notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot requested review from 7c6f434c, abbradar, svanderburg and viric July 21, 2021 12:13
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jul 21, 2021
@Artturin
Copy link
Member

Artturin commented Jul 21, 2021

the patch for pxz isn't needed anymore

diff --git a/pkgs/tools/compression/pxz/_SC_ARG_MAX.patch b/pkgs/tools/compression/pxz/_SC_ARG_MAX.patch
deleted file mode 100644
index fac8f1fc147..00000000000
--- a/pkgs/tools/compression/pxz/_SC_ARG_MAX.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From b8f9827fc4de9296c7a6f5e6fdac46e070cd6cb4 Mon Sep 17 00:00:00 2001
-From: Igor Pashev <pashev.igor@gmail.com>
-Date: Sat, 1 Nov 2014 18:10:05 +0300
-Subject: [PATCH] Fixed crash on Linux when stack size is unlimited
-
----
- pxz.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/pxz.c b/pxz.c
-index 9cb843e..52713e2 100644
---- a/pxz.c
-+++ b/pxz.c
-@@ -65,7 +65,7 @@ FILE **ftemp;
- char str[0x100];
- char buf[BUFFSIZE];
- char *xzcmd;
--size_t xzcmd_max;
-+const size_t xzcmd_max = 10240;
- 
- unsigned opt_complevel = 6, opt_stdout, opt_keep, opt_threads, opt_verbose;
- unsigned opt_force, opt_stdout;
-@@ -243,9 +243,12 @@ int main( int argc, char **argv ) {
- 	lzma_filter filters[LZMA_FILTERS_MAX + 1];
- 	lzma_options_lzma lzma_options;
- 	
--	xzcmd_max = sysconf(_SC_ARG_MAX);
- 	page_size = sysconf(_SC_PAGE_SIZE);
- 	xzcmd = malloc(xzcmd_max);
-+	if (!xzcmd) {
-+		fprintf(stderr, "Failed to allocate %lu bytes for xz command.\n", xzcmd_max);
-+		return -1;
-+	}
- 	snprintf(xzcmd, xzcmd_max, XZ_BINARY);
- 	
- 	parse_args(argc, argv);
diff --git a/pkgs/tools/compression/pxz/default.nix b/pkgs/tools/compression/pxz/default.nix
index 725dd4defb9..4ea95a3f78a 100644
--- a/pkgs/tools/compression/pxz/default.nix
+++ b/pkgs/tools/compression/pxz/default.nix
@@ -13,8 +13,6 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ xz ];
 
-  patches = [ ./_SC_ARG_MAX.patch ];
-
   buildPhase = ''
     gcc -o pxz pxz.c -llzma \
         -fopenmp -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2 \

@r-rmcgibbo

This comment has been minimized.

@SuperSandro2000
Copy link
Member Author

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).

Result of nixpkgs-review pr 130928 run on x86_64-linux 1

21 packages built:
  • automysqlbackup
  • bareboxTools
  • bsc
  • dtrx
  • gzrt
  • hydra-unstable
  • kzipmix
  • lbzip2
  • lhasa
  • lzop
  • mcomix3
  • milkytracker
  • pigz
  • pixz
  • pxz
  • python38Packages.condaInstallHook
  • python39Packages.condaInstallHook
  • rzip
  • sanoid
  • xarchiver
  • zsync

@SuperSandro2000 SuperSandro2000 merged commit a55ab60 into NixOS:master Jul 22, 2021
@SuperSandro2000 SuperSandro2000 deleted the cleanup-compression branch July 22, 2021 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants