From a85f739d1a63e03b309a13d8667879a997622231 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Nov 2011 12:35:33 +0000 Subject: [PATCH] * Add a patch to prevent Starman from changing its process name to "starman worker" or "starman master". This prevented libcgroup from determining the process name correctly. svn path=/nixpkgs/trunk/; revision=30556 --- .../starman-dont-change-name.patch | 23 +++++++++++++++++++ pkgs/top-level/perl-packages.nix | 1 + 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/perl-modules/starman-dont-change-name.patch diff --git a/pkgs/development/perl-modules/starman-dont-change-name.patch b/pkgs/development/perl-modules/starman-dont-change-name.patch new file mode 100644 index 00000000000..82454cfdd16 --- /dev/null +++ b/pkgs/development/perl-modules/starman-dont-change-name.patch @@ -0,0 +1,23 @@ +Changing the process name breaks applying libcgroup rules, so don't do it. + +diff -ru -x '*~' Starman-0.2014-orig/lib/Starman/Server.pm Starman-0.2014/lib/Starman/Server.pm +--- Starman-0.2014-orig/lib/Starman/Server.pm 2011-08-27 01:19:43.000000000 +0200 ++++ Starman-0.2014/lib/Starman/Server.pm 2011-11-25 13:30:24.570434653 +0100 +@@ -100,7 +100,7 @@ + + sub run_parent { + my $self = shift; +- $0 = "starman master " . join(" ", @{$self->{options}{argv} || []}); ++ #$0 = "starman master " . join(" ", @{$self->{options}{argv} || []}); + $self->SUPER::run_parent(@_); + } + +@@ -113,7 +113,7 @@ + DEBUG && warn "[$$] Initializing the PSGI app\n"; + $self->{app} = $self->{options}->{psgi_app_builder}->(); + } +- $0 = "starman worker " . join(" ", @{$self->{options}{argv} || []}); ++ #$0 = "starman worker " . join(" ", @{$self->{options}{argv} || []}); + } + + sub post_accept_hook { diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 0266295f355..a993171ff8c 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -3024,6 +3024,7 @@ rec { url = "mirror://cpan/modules/by-module/Plack/${name}.tar.gz"; sha256 = "0hf3wpm2q4zcgjahjrpkkzy4fn74vkddg9yqs7p97xb290pvlbki"; }; + patches = [ ../development/perl-modules/starman-dont-change-name.patch ]; buildInputs = [ TestRequires TestTCP ]; propagatedBuildInputs = [ Plack DataDump HTTPParserXS NetServer ]; doCheck = false; # binds to various TCP ports1