From e14f9cea94f08abdbf78b8fdd0a3ca2d3144b073 Mon Sep 17 00:00:00 2001 From: "Christoph Neidahl (OPNA2608)" Date: Tue, 16 Oct 2018 11:40:27 +0200 Subject: [PATCH 1/4] x11vnc: 0.9.13 -> 0.9.15 updated x11vnc to use the GitHub repo and up-to-date version 0.9.15 --- pkgs/tools/X11/x11vnc/default.nix | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/X11/x11vnc/default.nix b/pkgs/tools/X11/x11vnc/default.nix index 2dc6d8ffd78c..d91c91b10e20 100644 --- a/pkgs/tools/X11/x11vnc/default.nix +++ b/pkgs/tools/X11/x11vnc/default.nix @@ -1,34 +1,42 @@ -{ stdenv, fetchurl, openssl, zlib, libjpeg, xorg, coreutils }: +{ stdenv, fetchFromGitHub, + openssl, zlib, libjpeg, xorg, coreutils, libvncserver, + autoreconfHook, pkgconfig }: stdenv.mkDerivation rec { - name = "x11vnc-0.9.13"; + name = "x11vnc-${version}"; + version = "0.9.15"; - src = fetchurl { - url = "mirror://sourceforge/libvncserver/${name}.tar.gz"; - sha256 = "0fzib5xb1vbs8kdprr4z94v0fshj2c5hhaz69llaarwnc8p9z0pn"; + src = fetchFromGitHub { + owner = "LibVNC"; + repo = "x11vnc"; + rev = version; + sha256 = "1a1b65k1hsy4nhg2sx1yrpaz3vx6s7rmrx8nwygpaam8wpdlkh8p"; }; + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + buildInputs = [ xorg.libXfixes xorg.fixesproto openssl xorg.libXdamage xorg.damageproto zlib xorg.libX11 xorg.xproto libjpeg xorg.libXtst xorg.libXinerama xorg.xineramaproto xorg.libXrandr xorg.randrproto xorg.libXext xorg.xextproto xorg.inputproto xorg.recordproto xorg.libXi xorg.libXrender xorg.renderproto + libvncserver ]; preConfigure = '' configureFlags="--mandir=$out/share/man" - substituteInPlace x11vnc/unixpw.c \ + substituteInPlace src/unixpw.c \ --replace '"/bin/su"' '"/run/wrappers/bin/su"' \ --replace '"/bin/true"' '"${coreutils}/bin/true"' - sed -i -e '/#!\/bin\/sh/a"PATH=${xorg.xdpyinfo}\/bin:${xorg.xauth}\/bin:$PATH\\n"' -e 's|/bin/su|/run/wrappers/bin/su|g' x11vnc/ssltools.h + sed -i -e '/#!\/bin\/sh/a"PATH=${xorg.xdpyinfo}\/bin:${xorg.xauth}\/bin:$PATH\\n"' -e 's|/bin/su|/run/wrappers/bin/su|g' src/ssltools.h ''; meta = with stdenv.lib; { description = "A VNC server connected to a real X11 screen"; - homepage = http://www.karlrunge.com/x11vnc/; + homepage = https://github.com/LibVNC/x11vnc/; platforms = platforms.linux; license = licenses.gpl2; }; From 09504f62a72ea38435a3cb1217c8cd12a695a79d Mon Sep 17 00:00:00 2001 From: "Christoph Neidahl (OPNA2608)" Date: Tue, 16 Oct 2018 11:43:48 +0200 Subject: [PATCH 2/4] x11vnc: added maintainer adding myself as maintainer --- maintainers/maintainer-list.nix | 5 +++++ pkgs/tools/X11/x11vnc/default.nix | 1 + 2 files changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 5f33e316e183..3791c6772c4f 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3110,6 +3110,11 @@ github = "olynch"; name = "Owen Lynch"; }; + OPNA2608 = { + email = "christoph.neidahl@gmail.com"; + github = "OPNA2608"; + name = "Christoph Neidahl"; + }; orbekk = { email = "kjetil.orbekk@gmail.com"; github = "orbekk"; diff --git a/pkgs/tools/X11/x11vnc/default.nix b/pkgs/tools/X11/x11vnc/default.nix index d91c91b10e20..51307f0df09f 100644 --- a/pkgs/tools/X11/x11vnc/default.nix +++ b/pkgs/tools/X11/x11vnc/default.nix @@ -39,5 +39,6 @@ stdenv.mkDerivation rec { homepage = https://github.com/LibVNC/x11vnc/; platforms = platforms.linux; license = licenses.gpl2; + maintainers = with maintainers; [ OPNA2608 ]; }; } From 0800c3a72208eaf9d2087c72746da46b69b10483 Mon Sep 17 00:00:00 2001 From: "Christoph Neidahl (OPNA2608)" Date: Wed, 17 Oct 2018 10:09:16 +0200 Subject: [PATCH 3/4] x11vnc: don't build broken Xdummy script patching the currently broken Xdummy script out of the Makefile.am, else it gets put into bin. this is not a regression of functionality, as it doesn't appear to be put into bin in the upstream version either. --- pkgs/tools/X11/x11vnc/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/X11/x11vnc/default.nix b/pkgs/tools/X11/x11vnc/default.nix index 51307f0df09f..9e38a2bc888e 100644 --- a/pkgs/tools/X11/x11vnc/default.nix +++ b/pkgs/tools/X11/x11vnc/default.nix @@ -32,6 +32,7 @@ stdenv.mkDerivation rec { --replace '"/bin/true"' '"${coreutils}/bin/true"' sed -i -e '/#!\/bin\/sh/a"PATH=${xorg.xdpyinfo}\/bin:${xorg.xauth}\/bin:$PATH\\n"' -e 's|/bin/su|/run/wrappers/bin/su|g' src/ssltools.h + sed -i -e '/^\tXdummy.c\ \\$/,$d' -e 's/\tx11vnc_loop\ \\/\tx11vnc_loop/' misc/Makefile.am ''; meta = with stdenv.lib; { From 07f135c7f55cfb96bd1e49170b98abbbb847da90 Mon Sep 17 00:00:00 2001 From: "Christoph Neidahl (OPNA2608)" Date: Wed, 17 Oct 2018 20:13:07 +0200 Subject: [PATCH 4/4] x11vnc: moving substitutions, commenting sed line moved substitutions to postPatch phase and commented on workaround sed line, as requested in the code reviews --- pkgs/tools/X11/x11vnc/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/X11/x11vnc/default.nix b/pkgs/tools/X11/x11vnc/default.nix index 9e38a2bc888e..6dc785621b59 100644 --- a/pkgs/tools/X11/x11vnc/default.nix +++ b/pkgs/tools/X11/x11vnc/default.nix @@ -24,17 +24,21 @@ stdenv.mkDerivation rec { libvncserver ]; - preConfigure = '' - configureFlags="--mandir=$out/share/man" - + postPatch = '' substituteInPlace src/unixpw.c \ --replace '"/bin/su"' '"/run/wrappers/bin/su"' \ --replace '"/bin/true"' '"${coreutils}/bin/true"' sed -i -e '/#!\/bin\/sh/a"PATH=${xorg.xdpyinfo}\/bin:${xorg.xauth}\/bin:$PATH\\n"' -e 's|/bin/su|/run/wrappers/bin/su|g' src/ssltools.h + + # Xdummy script is currently broken, so we avoid building it. This removes everything Xdummy-related from the affected Makefile sed -i -e '/^\tXdummy.c\ \\$/,$d' -e 's/\tx11vnc_loop\ \\/\tx11vnc_loop/' misc/Makefile.am ''; + preConfigure = '' + configureFlags="--mandir=$out/share/man" + ''; + meta = with stdenv.lib; { description = "A VNC server connected to a real X11 screen"; homepage = https://github.com/LibVNC/x11vnc/;