From dcf17d3d5d9764c84874567ad4576419a968fecf Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Thu, 21 Aug 2014 17:29:51 +0200 Subject: [PATCH] policycoreutils: fix build on i686 for ZHF --- pkgs/os-specific/linux/policycoreutils/default.nix | 6 +++++- .../linux/policycoreutils/size_format.patch | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 pkgs/os-specific/linux/policycoreutils/size_format.patch diff --git a/pkgs/os-specific/linux/policycoreutils/default.nix b/pkgs/os-specific/linux/policycoreutils/default.nix index d312e25fc2e..ef7e76824db 100644 --- a/pkgs/os-specific/linux/policycoreutils/default.nix +++ b/pkgs/os-specific/linux/policycoreutils/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "1lpwxr5hw3dwhlp2p7y8jcr18mvfcrclwd8c2idz3lmmb3pglk46"; }; - patchPhase = '' + preConfigure = '' substituteInPlace po/Makefile --replace /usr/bin/install install find . -type f -exec sed -i 's,/usr/bin/python,${python}/bin/python,' {} \; ''; @@ -36,6 +36,10 @@ stdenv.mkDerivation rec { makeFlags = "PREFIX=$(out) DESTDIR=$(out) LOCALEDIR=$(out)/share/locale"; + patches = [ ./size_format.patch ]; + + patchFlags = [ "-p0" ]; + meta = with stdenv.lib; { description = "SELinux policy core utilities"; license = licenses.gpl2; diff --git a/pkgs/os-specific/linux/policycoreutils/size_format.patch b/pkgs/os-specific/linux/policycoreutils/size_format.patch new file mode 100644 index 00000000000..04432098547 --- /dev/null +++ b/pkgs/os-specific/linux/policycoreutils/size_format.patch @@ -0,0 +1,11 @@ +--- setfiles/restore.c.orig 2014-08-21 17:26:00.200788259 +0200 ++++ setfiles/restore.c 2014-08-21 17:26:04.728888118 +0200 +@@ -118,7 +118,7 @@ + r_opts->count++; + if (r_opts->count % STAR_COUNT == 0) { + if (r_opts->progress == 1) { +- fprintf(stdout, "\r%luk", (size_t) r_opts->count / STAR_COUNT ); ++ fprintf(stdout, "\r%zuk", (size_t) r_opts->count / STAR_COUNT ); + } else { + if (r_opts->nfile > 0) { + progress = (r_opts->count < r_opts->nfile) ? (100.0 * r_opts->count / r_opts->nfile) : 100;