# HG changeset patch # User Marcin Kuzminski # Date 2017-11-03 14:14:01 # Node ID a3f9910f07fff1a12d008a64466f463ed6d04b77 # Parent d9df4e0a725cec7c29fc163005264e22eb08372b # Parent e4546c5513bf80917fc709ebb9e5b4d3ebc2d696 release: Merge default into stable for release preparation diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.9.1 +current_version = 4.10.0 message = release: Bump version {current_version} to {new_version} [bumpversion:file:vcsserver/VERSION] diff --git a/.release.cfg b/.release.cfg --- a/.release.cfg +++ b/.release.cfg @@ -5,12 +5,10 @@ done = false done = true [task:fixes_on_stable] -done = true [task:pip2nix_generated] -done = true [release] -state = prepared -version = 4.9.1 +state = in_progress +version = 4.10.0 diff --git a/default.nix b/default.nix --- a/default.nix +++ b/default.nix @@ -16,12 +16,19 @@ let pkgs = pkgs_.overridePackages (self: super: { # bump GIT version git = pkgs.lib.overrideDerivation pkgs_.git (oldAttrs: { - name = "git-2.9.5"; + name = "git-2.13.5"; src = pkgs.fetchurl { - url = "https://www.kernel.org/pub/software/scm/git/git-2.9.5.tar.xz"; - sha256 = "00ir7qmgfszwrhxjzxwixk7wp35gxvvw467gr30bagwsrdza7gm4"; + url = "https://www.kernel.org/pub/software/scm/git/git-2.13.5.tar.xz"; + sha256 = "18fi18103n7grshm4ffb0fwsnvbl48sbqy5gqx528vf8maff5j91"; }; + patches = [ + ./pkgs/git_patches/docbook2texi.patch + ./pkgs/git_patches/symlinks-in-bin.patch + ./pkgs/git_patches/git-sh-i18n.patch + ./pkgs/git_patches/ssh-path.patch + ]; + }); # Override subversion derivation to diff --git a/pkgs/git_patches/docbook2texi.patch b/pkgs/git_patches/docbook2texi.patch new file mode 100644 --- /dev/null +++ b/pkgs/git_patches/docbook2texi.patch @@ -0,0 +1,37 @@ +This patch does two things: (1) use the right name for `docbook2texi', +and (2) make sure `gitman.info' isn't produced since it's broken (duplicate +node names). + +diff -ru git-1.8.4-orig/Documentation/Makefile git-1.8.4/Documentation/Makefile +--- git-1.8.4-orig/Documentation/Makefile 2013-08-23 21:38:43.000000000 +0200 ++++ git-1.8.4/Documentation/Makefile 2013-09-30 14:48:51.532890378 +0200 +@@ -101,7 +101,7 @@ + + MAKEINFO = makeinfo + INSTALL_INFO = install-info +-DOCBOOK2X_TEXI = docbook2x-texi ++DOCBOOK2X_TEXI = docbook2texi + DBLATEX = dblatex + ifndef PERL_PATH + PERL_PATH = /usr/bin/perl +@@ -205,7 +205,7 @@ + man5: $(DOC_MAN5) + man7: $(DOC_MAN7) + +-info: git.info gitman.info ++info: git.info + + pdf: user-manual.pdf + +@@ -221,10 +221,9 @@ + + install-info: info + $(INSTALL) -d -m 755 $(DESTDIR)$(infodir) +- $(INSTALL) -m 644 git.info gitman.info $(DESTDIR)$(infodir) ++ $(INSTALL) -m 644 git.info $(DESTDIR)$(infodir) + if test -r $(DESTDIR)$(infodir)/dir; then \ + $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) git.info ;\ +- $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) gitman.info ;\ + else \ + echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \ + fi diff --git a/pkgs/git_patches/git-sh-i18n.patch b/pkgs/git_patches/git-sh-i18n.patch new file mode 100644 --- /dev/null +++ b/pkgs/git_patches/git-sh-i18n.patch @@ -0,0 +1,94 @@ +--- a/git-sh-i18n.sh ++++ b/git-sh-i18n.sh +@@ -15,87 +15,11 @@ + fi + export TEXTDOMAINDIR + +-# First decide what scheme to use... +-GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough +-if test -n "@@USE_GETTEXT_SCHEME@@" +-then +- GIT_INTERNAL_GETTEXT_SH_SCHEME="@@USE_GETTEXT_SCHEME@@" +-elif test -n "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" +-then +- : no probing necessary +-elif test -n "$GIT_GETTEXT_POISON" +-then +- GIT_INTERNAL_GETTEXT_SH_SCHEME=poison +-elif type gettext.sh >/dev/null 2>&1 +-then +- # GNU libintl's gettext.sh +- GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu +-elif test "$(gettext -h 2>&1)" = "-h" +-then +- # gettext binary exists but no gettext.sh. likely to be a gettext +- # binary on a Solaris or something that is not GNU libintl and +- # lack eval_gettext. +- GIT_INTERNAL_GETTEXT_SH_SCHEME=gettext_without_eval_gettext +-fi +-export GIT_INTERNAL_GETTEXT_SH_SCHEME +- +-# ... and then follow that decision. +-case "$GIT_INTERNAL_GETTEXT_SH_SCHEME" in +-gnu) +- # Use libintl's gettext.sh, or fall back to English if we can't. +- . gettext.sh +- ;; +-gettext_without_eval_gettext) +- # Solaris has a gettext(1) but no eval_gettext(1) +- eval_gettext () { +- gettext "$1" | ( +- export PATH $(git sh-i18n--envsubst --variables "$1"); +- git sh-i18n--envsubst "$1" +- ) +- } +- +- eval_ngettext () { +- ngettext "$1" "$2" "$3" | ( +- export PATH $(git sh-i18n--envsubst --variables "$2"); +- git sh-i18n--envsubst "$2" +- ) +- } +- ;; +-poison) +- # Emit garbage so that tests that incorrectly rely on translatable +- # strings will fail. +- gettext () { +- printf "%s" "# GETTEXT POISON #" +- } +- +- eval_gettext () { +- printf "%s" "# GETTEXT POISON #" +- } +- +- eval_ngettext () { +- printf "%s" "# GETTEXT POISON #" +- } +- ;; +-*) +- gettext () { +- printf "%s" "$1" +- } +- +- eval_gettext () { +- printf "%s" "$1" | ( +- export PATH $(git sh-i18n--envsubst --variables "$1"); +- git sh-i18n--envsubst "$1" +- ) +- } ++# GNU gettext ++export GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu ++export PATH=@gettext@/bin:$PATH + +- eval_ngettext () { +- (test "$3" = 1 && printf "%s" "$1" || printf "%s" "$2") | ( +- export PATH $(git sh-i18n--envsubst --variables "$2"); +- git sh-i18n--envsubst "$2" +- ) +- } +- ;; +-esac ++. @gettext@/bin/gettext.sh + + # Git-specific wrapper functions + gettextln () { diff --git a/pkgs/git_patches/ssh-path.patch b/pkgs/git_patches/ssh-path.patch new file mode 100644 --- /dev/null +++ b/pkgs/git_patches/ssh-path.patch @@ -0,0 +1,26 @@ +diff --git a/connect.c b/connect.c +index fd7ffe1..20cd992 100644 +--- a/connect.c ++++ b/connect.c +@@ -768,7 +768,7 @@ + + ssh = getenv("GIT_SSH"); + if (!ssh) +- ssh = "ssh"; ++ ssh = "@ssh@"; + else + handle_ssh_variant(ssh, 0, + &port_option, +diff --git a/git-gui/lib/remote_add.tcl b/git-gui/lib/remote_add.tcl +index 50029d0..17b9594 100644 +--- a/git-gui/lib/remote_add.tcl ++++ b/git-gui/lib/remote_add.tcl +@@ -139,7 +139,7 @@ + # Parse the location + if { [regexp {(?:git\+)?ssh://([^/]+)(/.+)} $location xx host path] + || [regexp {([^:][^:]+):(.+)} $location xx host path]} { +- set ssh ssh ++ set ssh @ssh@ + if {[info exists env(GIT_SSH)]} { + set ssh $env(GIT_SSH) + } diff --git a/pkgs/git_patches/symlinks-in-bin.patch b/pkgs/git_patches/symlinks-in-bin.patch new file mode 100644 --- /dev/null +++ b/pkgs/git_patches/symlinks-in-bin.patch @@ -0,0 +1,13 @@ +diff -ru -x '*~' git-1.8.2.1-orig/Makefile git-1.8.2.1/Makefile +--- git-1.8.2.1-orig/Makefile 2013-04-08 00:52:04.000000000 +0200 ++++ git-1.8.2.1/Makefile 2013-04-22 15:46:42.906026940 +0200 +@@ -2319,8 +2319,7 @@ + { test "$$bindir/" = "$$execdir/" || \ + for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ + $(RM) "$$execdir/$$p" && \ +- test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \ +- ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \ ++ ln -s "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \ + cp "$$bindir/$$p" "$$execdir/$$p" || exit; \ + done; \ + } && \ diff --git a/pkgs/python-packages.nix b/pkgs/python-packages.nix --- a/pkgs/python-packages.nix +++ b/pkgs/python-packages.nix @@ -3,13 +3,13 @@ { Beaker = super.buildPythonPackage { - name = "Beaker-1.7.0"; + name = "Beaker-1.9.0"; buildInputs = with self; []; doCheck = false; - propagatedBuildInputs = with self; []; + propagatedBuildInputs = with self; [funcsigs]; src = fetchurl { - url = "https://pypi.python.org/packages/97/8e/409d2e7c009b8aa803dc9e6f239f1db7c3cdf578249087a404e7c27a505d/Beaker-1.7.0.tar.gz"; - md5 = "386be3f7fe427358881eee4622b428b3"; + url = "https://pypi.python.org/packages/93/b2/12de6937b06e9615dbb3cb3a1c9af17f133f435bdef59f4ad42032b6eb49/Beaker-1.9.0.tar.gz"; + md5 = "38b3fcdfa24faf97c6cf66991eb54e9c"; }; meta = { license = [ pkgs.lib.licenses.bsdOriginal ]; @@ -29,13 +29,13 @@ }; }; Mako = super.buildPythonPackage { - name = "Mako-1.0.6"; + name = "Mako-1.0.7"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; [MarkupSafe]; src = fetchurl { - url = "https://pypi.python.org/packages/56/4b/cb75836863a6382199aefb3d3809937e21fa4cb0db15a4f4ba0ecc2e7e8e/Mako-1.0.6.tar.gz"; - md5 = "a28e22a339080316b2acc352b9ee631c"; + url = "https://pypi.python.org/packages/eb/f3/67579bb486517c0d49547f9697e36582cd19dafb5df9e687ed8e22de57fa/Mako-1.0.7.tar.gz"; + md5 = "5836cc997b1b773ef389bf6629c30e65"; }; meta = { license = [ pkgs.lib.licenses.mit ]; @@ -68,26 +68,26 @@ }; }; WebOb = super.buildPythonPackage { - name = "WebOb-1.3.1"; + name = "WebOb-1.7.3"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; []; src = fetchurl { - url = "https://pypi.python.org/packages/16/78/adfc0380b8a0d75b2d543fa7085ba98a573b1ae486d9def88d172b81b9fa/WebOb-1.3.1.tar.gz"; - md5 = "20918251c5726956ba8fef22d1556177"; + url = "https://pypi.python.org/packages/46/87/2f96d8d43b2078fae6e1d33fa86b95c228cebed060f4e3c7576cc44ea83b/WebOb-1.7.3.tar.gz"; + md5 = "350028baffc508e3d23c078118e35316"; }; meta = { license = [ pkgs.lib.licenses.mit ]; }; }; WebTest = super.buildPythonPackage { - name = "WebTest-1.4.3"; + name = "WebTest-2.0.27"; buildInputs = with self; []; doCheck = false; - propagatedBuildInputs = with self; [WebOb]; + propagatedBuildInputs = with self; [six WebOb waitress beautifulsoup4]; src = fetchurl { - url = "https://pypi.python.org/packages/51/3d/84fd0f628df10b30c7db87895f56d0158e5411206b721ca903cb51bfd948/WebTest-1.4.3.zip"; - md5 = "631ce728bed92c681a4020a36adbc353"; + url = "https://pypi.python.org/packages/80/fa/ca3a759985c72e3a124cbca3e1f8a2e931a07ffd31fd45d8f7bf21cb95cf/WebTest-2.0.27.tar.gz"; + md5 = "54e6515ac71c51b6fc90179483c749ad"; }; meta = { license = [ pkgs.lib.licenses.mit ]; @@ -106,6 +106,19 @@ license = [ pkgs.lib.licenses.mit ]; }; }; + beautifulsoup4 = super.buildPythonPackage { + name = "beautifulsoup4-4.6.0"; + buildInputs = with self; []; + doCheck = false; + propagatedBuildInputs = with self; []; + src = fetchurl { + url = "https://pypi.python.org/packages/fa/8d/1d14391fdaed5abada4e0f63543fef49b8331a34ca60c88bd521bcf7f782/beautifulsoup4-4.6.0.tar.gz"; + md5 = "c17714d0f91a23b708a592cb3c697728"; + }; + meta = { + license = [ pkgs.lib.licenses.mit ]; + }; + }; configobj = super.buildPythonPackage { name = "configobj-5.0.6"; buildInputs = with self; []; @@ -184,14 +197,27 @@ license = [ pkgs.lib.licenses.bsdOriginal ]; }; }; + funcsigs = super.buildPythonPackage { + name = "funcsigs-1.0.2"; + buildInputs = with self; []; + doCheck = false; + propagatedBuildInputs = with self; []; + src = fetchurl { + url = "https://pypi.python.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz"; + md5 = "7e583285b1fb8a76305d6d68f4ccc14e"; + }; + meta = { + license = [ { fullName = "ASL"; } pkgs.lib.licenses.asl20 ]; + }; + }; gevent = super.buildPythonPackage { - name = "gevent-1.1.2"; + name = "gevent-1.2.2"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; [greenlet]; src = fetchurl { - url = "https://pypi.python.org/packages/43/8f/cb3224a0e6ab663547f45c10d0651cfd52633fde4283bf68d627084df8cc/gevent-1.1.2.tar.gz"; - md5 = "bb32a2f852a4997138014d5007215c6e"; + url = "https://pypi.python.org/packages/1b/92/b111f76e54d2be11375b47b213b56687214f258fd9dae703546d30b837be/gevent-1.2.2.tar.gz"; + md5 = "7f0baf355384fe5ff2ecf66853422554"; }; meta = { license = [ pkgs.lib.licenses.mit ]; @@ -211,26 +237,26 @@ }; }; greenlet = super.buildPythonPackage { - name = "greenlet-0.4.10"; + name = "greenlet-0.4.12"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; []; src = fetchurl { - url = "https://pypi.python.org/packages/67/62/ca2a95648666eaa2ffeb6a9b3964f21d419ae27f82f2e66b53da5b943fc4/greenlet-0.4.10.zip"; - md5 = "bed0c4b3b896702131f4d5c72f87c41d"; + url = "https://pypi.python.org/packages/be/76/82af375d98724054b7e273b5d9369346937324f9bcc20980b45b068ef0b0/greenlet-0.4.12.tar.gz"; + md5 = "e8637647d58a26c4a1f51ca393e53c00"; }; meta = { license = [ pkgs.lib.licenses.mit ]; }; }; gunicorn = super.buildPythonPackage { - name = "gunicorn-19.6.0"; + name = "gunicorn-19.7.1"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; []; src = fetchurl { - url = "https://pypi.python.org/packages/84/ce/7ea5396efad1cef682bbc4068e72a0276341d9d9d0f501da609fab9fcb80/gunicorn-19.6.0.tar.gz"; - md5 = "338e5e8a83ea0f0625f768dba4597530"; + url = "https://pypi.python.org/packages/30/3a/10bb213cede0cc4d13ac2263316c872a64bf4c819000c8ccd801f1d5f822/gunicorn-19.7.1.tar.gz"; + md5 = "174d3c3cd670a5be0404d84c484e590c"; }; meta = { license = [ pkgs.lib.licenses.mit ]; @@ -250,18 +276,31 @@ }; }; hgsubversion = super.buildPythonPackage { - name = "hgsubversion-1.8.6"; + name = "hgsubversion-1.8.7"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; [mercurial subvertpy]; src = fetchurl { - url = "https://pypi.python.org/packages/ce/97/032e5093ad250e9908cea04395cbddb6902d587f712a79b53b2d778bdfdd/hgsubversion-1.8.6.tar.gz"; - md5 = "9310cb266031cf8d0779885782a84a5b"; + url = "https://pypi.python.org/packages/1c/b8/ff4d2e0ec486f9765b410f09728c02a010e7485d68d6154968074498a403/hgsubversion-1.8.7.tar.gz"; + md5 = "289f1c36c13bd6a3435a9be390a77bdc"; }; meta = { license = [ pkgs.lib.licenses.gpl1 ]; }; }; + hupper = super.buildPythonPackage { + name = "hupper-1.0"; + buildInputs = with self; []; + doCheck = false; + propagatedBuildInputs = with self; []; + src = fetchurl { + url = "https://pypi.python.org/packages/2e/07/df892c564dc09bb3cf6f6deb976c26adf9117db75ba218cb4353dbc9d826/hupper-1.0.tar.gz"; + md5 = "26e77da7d5ac5858f59af050d1a6eb5a"; + }; + meta = { + license = [ pkgs.lib.licenses.mit ]; + }; + }; infrae.cache = super.buildPythonPackage { name = "infrae.cache-1.0.1"; buildInputs = with self; []; @@ -276,13 +315,13 @@ }; }; ipdb = super.buildPythonPackage { - name = "ipdb-0.10.1"; + name = "ipdb-0.10.3"; buildInputs = with self; []; doCheck = false; - propagatedBuildInputs = with self; [ipython setuptools]; + propagatedBuildInputs = with self; [setuptools ipython]; src = fetchurl { - url = "https://pypi.python.org/packages/eb/0a/0a37dc19572580336ad3813792c0d18c8d7117c2d66fc63c501f13a7a8f8/ipdb-0.10.1.tar.gz"; - md5 = "4aeab65f633ddc98ebdb5eebf08dc713"; + url = "https://pypi.python.org/packages/ad/cc/0e7298e1fbf2efd52667c9354a12aa69fb6f796ce230cca03525051718ef/ipdb-0.10.3.tar.gz"; + md5 = "def1f6ac075d54bdee07e6501263d4fa"; }; meta = { license = [ pkgs.lib.licenses.bsdOriginal ]; @@ -354,13 +393,13 @@ }; }; pathlib2 = super.buildPythonPackage { - name = "pathlib2-2.1.0"; + name = "pathlib2-2.3.0"; buildInputs = with self; []; doCheck = false; - propagatedBuildInputs = with self; [six]; + propagatedBuildInputs = with self; [six scandir]; src = fetchurl { - url = "https://pypi.python.org/packages/c9/27/8448b10d8440c08efeff0794adf7d0ed27adb98372c70c7b38f3947d4749/pathlib2-2.1.0.tar.gz"; - md5 = "38e4f58b4d69dfcb9edb49a54a8b28d2"; + url = "https://pypi.python.org/packages/a1/14/df0deb867c2733f7d857523c10942b3d6612a1b222502fdffa9439943dfb/pathlib2-2.3.0.tar.gz"; + md5 = "89c90409d11fd5947966b6a30a47d18c"; }; meta = { license = [ pkgs.lib.licenses.mit ]; @@ -392,40 +431,66 @@ license = [ pkgs.lib.licenses.mit ]; }; }; + plaster = super.buildPythonPackage { + name = "plaster-0.5"; + buildInputs = with self; []; + doCheck = false; + propagatedBuildInputs = with self; [setuptools]; + src = fetchurl { + url = "https://pypi.python.org/packages/99/b3/d7ca1fe31d2b56dba68a238721fda6820770f9c2a3de17a582d4b5b2edcc/plaster-0.5.tar.gz"; + md5 = "c59345a67a860cfcaa1bd6a81451399d"; + }; + meta = { + license = [ pkgs.lib.licenses.mit ]; + }; + }; + plaster-pastedeploy = super.buildPythonPackage { + name = "plaster-pastedeploy-0.4.1"; + buildInputs = with self; []; + doCheck = false; + propagatedBuildInputs = with self; [PasteDeploy plaster]; + src = fetchurl { + url = "https://pypi.python.org/packages/9d/6e/f8be01ed41c94e6c54ac97cf2eb142a702aae0c8cce31c846f785e525b40/plaster_pastedeploy-0.4.1.tar.gz"; + md5 = "f48d5344b922e56c4978eebf1cd2e0d3"; + }; + meta = { + license = [ pkgs.lib.licenses.mit ]; + }; + }; prompt-toolkit = super.buildPythonPackage { - name = "prompt-toolkit-1.0.14"; + name = "prompt-toolkit-1.0.15"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; [six wcwidth]; src = fetchurl { - url = "https://pypi.python.org/packages/55/56/8c39509b614bda53e638b7500f12577d663ac1b868aef53426fc6a26c3f5/prompt_toolkit-1.0.14.tar.gz"; - md5 = "f24061ae133ed32c6b764e92bd48c496"; + url = "https://pypi.python.org/packages/8a/ad/cf6b128866e78ad6d7f1dc5b7f99885fb813393d9860778b2984582e81b5/prompt_toolkit-1.0.15.tar.gz"; + md5 = "8fe70295006dbc8afedd43e5eba99032"; }; meta = { license = [ pkgs.lib.licenses.bsdOriginal ]; }; }; ptyprocess = super.buildPythonPackage { - name = "ptyprocess-0.5.1"; + name = "ptyprocess-0.5.2"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; []; src = fetchurl { - url = "https://pypi.python.org/packages/db/d7/b465161910f3d1cef593c5e002bff67e0384898f597f1a7fdc8db4c02bf6/ptyprocess-0.5.1.tar.gz"; - md5 = "94e537122914cc9ec9c1eadcd36e73a1"; + url = "https://pypi.python.org/packages/51/83/5d07dc35534640b06f9d9f1a1d2bc2513fb9cc7595a1b0e28ae5477056ce/ptyprocess-0.5.2.tar.gz"; + md5 = "d3b8febae1b8c53b054bd818d0bb8665"; }; meta = { license = [ ]; }; }; py = super.buildPythonPackage { - name = "py-1.4.31"; + name = "py-1.4.34"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; []; src = fetchurl { - url = "https://pypi.python.org/packages/f4/9a/8dfda23f36600dd701c6722316ba8a3ab4b990261f83e7d3ffc6dfedf7ef/py-1.4.31.tar.gz"; - md5 = "5d2c63c56dc3f2115ec35c066ecd582b"; + url = "https://pypi.python.org/packages/68/35/58572278f1c097b403879c1e9369069633d1cbad5239b9057944bb764782/py-1.4.34.tar.gz"; + md5 = "d9c3d8f734b0819ff48e355d77bf1730"; }; meta = { license = [ pkgs.lib.licenses.mit ]; @@ -445,13 +510,13 @@ }; }; pyramid = super.buildPythonPackage { - name = "pyramid-1.7.4"; + name = "pyramid-1.9.1"; buildInputs = with self; []; doCheck = false; - propagatedBuildInputs = with self; [setuptools WebOb repoze.lru zope.interface zope.deprecation venusian translationstring PasteDeploy]; + propagatedBuildInputs = with self; [setuptools WebOb repoze.lru zope.interface zope.deprecation venusian translationstring PasteDeploy plaster plaster-pastedeploy hupper]; src = fetchurl { - url = "https://pypi.python.org/packages/33/91/55f5c661f8923902cd1f68d75f2b937c45e7682857356cf18f0be5493899/pyramid-1.7.4.tar.gz"; - md5 = "6ef1dfdcff9136d04490410757c4c446"; + url = "https://pypi.python.org/packages/9a/57/73447be9e7d0512d601e3f0a1fb9d7d1efb941911f49efdfe036d2826507/pyramid-1.9.1.tar.gz"; + md5 = "0163e19c58c2d12976a3b6fdb57e052d"; }; meta = { license = [ { fullName = "Repoze Public License"; } { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; @@ -484,13 +549,13 @@ }; }; pytest = super.buildPythonPackage { - name = "pytest-3.0.5"; + name = "pytest-3.1.2"; buildInputs = with self; []; doCheck = false; - propagatedBuildInputs = with self; [py]; + propagatedBuildInputs = with self; [py setuptools]; src = fetchurl { - url = "https://pypi.python.org/packages/a8/87/b7ca49efe52d2b4169f2bfc49aa5e384173c4619ea8e635f123a0dac5b75/pytest-3.0.5.tar.gz"; - md5 = "cefd527b59332688bf5db4a10aa8a7cb"; + url = "https://pypi.python.org/packages/72/2b/2d3155e01f45a5a04427857352ee88220ee39550b2bc078f9db3190aea46/pytest-3.1.2.tar.gz"; + md5 = "c4d179f89043cc925e1c169d03128e02"; }; meta = { license = [ pkgs.lib.licenses.mit ]; @@ -510,52 +575,52 @@ }; }; pytest-cov = super.buildPythonPackage { - name = "pytest-cov-2.4.0"; + name = "pytest-cov-2.5.1"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; [pytest coverage]; src = fetchurl { - url = "https://pypi.python.org/packages/00/c0/2bfd1fcdb9d407b8ac8185b1cb5ff458105c6b207a9a7f0e13032de9828f/pytest-cov-2.4.0.tar.gz"; - md5 = "2fda09677d232acc99ec1b3c5831e33f"; + url = "https://pypi.python.org/packages/24/b4/7290d65b2f3633db51393bdf8ae66309b37620bc3ec116c5e357e3e37238/pytest-cov-2.5.1.tar.gz"; + md5 = "5acf38d4909e19819eb5c1754fbfc0ac"; }; meta = { license = [ pkgs.lib.licenses.bsdOriginal pkgs.lib.licenses.mit ]; }; }; pytest-profiling = super.buildPythonPackage { - name = "pytest-profiling-1.2.2"; + name = "pytest-profiling-1.2.6"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; [six pytest gprof2dot]; src = fetchurl { - url = "https://pypi.python.org/packages/73/e8/804681323bac0bc45c520ec34185ba8469008942266d0074699b204835c1/pytest-profiling-1.2.2.tar.gz"; - md5 = "0a16d7dda2d23b91e9730fa4558cf728"; + url = "https://pypi.python.org/packages/f9/0d/df67fb9ce16c2cef201693da956321b1bccfbf9a4ead39748b9f9d1d74cb/pytest-profiling-1.2.6.tar.gz"; + md5 = "50eb4c66c3762a2f1a49669bedc0b894"; }; meta = { license = [ pkgs.lib.licenses.mit ]; }; }; pytest-runner = super.buildPythonPackage { - name = "pytest-runner-2.9"; + name = "pytest-runner-2.11.1"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; []; src = fetchurl { - url = "https://pypi.python.org/packages/11/d4/c335ddf94463e451109e3494e909765c3e5205787b772e3b25ee8601b86a/pytest-runner-2.9.tar.gz"; - md5 = "2212a2e34404b0960b2fdc2c469247b2"; + url = "https://pypi.python.org/packages/9e/4d/08889e5e27a9f5d6096b9ad257f4dea1faabb03c5ded8f665ead448f5d8a/pytest-runner-2.11.1.tar.gz"; + md5 = "bdb73eb18eca2727944a2dcf963c5a81"; }; meta = { license = [ pkgs.lib.licenses.mit ]; }; }; pytest-sugar = super.buildPythonPackage { - name = "pytest-sugar-0.7.1"; + name = "pytest-sugar-0.8.0"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; [pytest termcolor]; src = fetchurl { - url = "https://pypi.python.org/packages/03/97/05d988b4fa870e7373e8ee4582408543b9ca2bd35c3c67b569369c6f9c49/pytest-sugar-0.7.1.tar.gz"; - md5 = "7400f7c11f3d572b2c2a3b60352d35fe"; + url = "https://pypi.python.org/packages/a5/b0/b2773dee078f17773a5bf2dfad49b0be57b6354bbd84bbefe4313e509d87/pytest-sugar-0.8.0.tar.gz"; + md5 = "8cafbdad648068e0e44b8fc5f9faae42"; }; meta = { license = [ pkgs.lib.licenses.bsdOriginal ]; @@ -588,7 +653,7 @@ }; }; rhodecode-vcsserver = super.buildPythonPackage { - name = "rhodecode-vcsserver-4.9.1"; + name = "rhodecode-vcsserver-4.10.0"; buildInputs = with self; [pytest py pytest-cov pytest-sugar pytest-runner pytest-catchlog pytest-profiling gprof2dot pytest-timeout mock WebTest cov-core coverage configobj]; doCheck = true; propagatedBuildInputs = with self; [Beaker configobj decorator dulwich hgsubversion hg-evolve infrae.cache mercurial msgpack-python pyramid pyramid-jinja2 pyramid-mako repoze.lru simplejson subprocess32 subvertpy six translationstring WebOb wheel zope.deprecation zope.interface ipdb ipython gevent greenlet gunicorn waitress pytest py pytest-cov pytest-sugar pytest-runner pytest-catchlog pytest-profiling gprof2dot pytest-timeout mock WebTest cov-core coverage]; @@ -597,6 +662,19 @@ license = [ { fullName = "GPL V3"; } { fullName = "GNU General Public License v3 or later (GPLv3+)"; } ]; }; }; + scandir = super.buildPythonPackage { + name = "scandir-1.5"; + buildInputs = with self; []; + doCheck = false; + propagatedBuildInputs = with self; []; + src = fetchurl { + url = "https://pypi.python.org/packages/bd/f4/3143e0289faf0883228017dbc6387a66d0b468df646645e29e1eb89ea10e/scandir-1.5.tar.gz"; + md5 = "a2713043de681bba6b084be42e7a8a44"; + }; + meta = { + license = [ pkgs.lib.licenses.bsdOriginal { fullName = "New BSD License"; } ]; + }; + }; setuptools = super.buildPythonPackage { name = "setuptools-30.1.0"; buildInputs = with self; []; @@ -624,13 +702,13 @@ }; }; simplejson = super.buildPythonPackage { - name = "simplejson-3.7.2"; + name = "simplejson-3.11.1"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; []; src = fetchurl { - url = "https://pypi.python.org/packages/6d/89/7f13f099344eea9d6722779a1f165087cb559598107844b1ac5dbd831fb1/simplejson-3.7.2.tar.gz"; - md5 = "a5fc7d05d4cb38492285553def5d4b46"; + url = "https://pypi.python.org/packages/08/48/c97b668d6da7d7bebe7ea1817a6f76394b0ec959cb04214ca833c34359df/simplejson-3.11.1.tar.gz"; + md5 = "6e2f1bd5fb0a926facf5d89d217a7183"; }; meta = { license = [ { fullName = "Academic Free License (AFL)"; } pkgs.lib.licenses.mit ]; @@ -650,13 +728,13 @@ }; }; subprocess32 = super.buildPythonPackage { - name = "subprocess32-3.2.6"; + name = "subprocess32-3.2.7"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; []; src = fetchurl { - url = "https://pypi.python.org/packages/28/8d/33ccbff51053f59ae6c357310cac0e79246bbed1d345ecc6188b176d72c3/subprocess32-3.2.6.tar.gz"; - md5 = "754c5ab9f533e764f931136974b618f1"; + url = "https://pypi.python.org/packages/b8/2f/49e53b0d0e94611a2dc624a1ad24d41b6d94d0f1b0a078443407ea2214c2/subprocess32-3.2.7.tar.gz"; + md5 = "824c801e479d3e916879aae3e9c15e16"; }; meta = { license = [ pkgs.lib.licenses.psfl ]; @@ -715,26 +793,26 @@ }; }; venusian = super.buildPythonPackage { - name = "venusian-1.0"; + name = "venusian-1.1.0"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; []; src = fetchurl { - url = "https://pypi.python.org/packages/86/20/1948e0dfc4930ddde3da8c33612f6a5717c0b4bc28f591a5c5cf014dd390/venusian-1.0.tar.gz"; - md5 = "dccf2eafb7113759d60c86faf5538756"; + url = "https://pypi.python.org/packages/38/24/b4b470ab9e0a2e2e9b9030c7735828c8934b4c6b45befd1bb713ec2aeb2d/venusian-1.1.0.tar.gz"; + md5 = "56bc5e6756e4bda37bcdb94f74a72b8f"; }; meta = { license = [ { fullName = "BSD-derived (http://www.repoze.org/LICENSE.txt)"; } ]; }; }; waitress = super.buildPythonPackage { - name = "waitress-1.0.1"; + name = "waitress-1.0.2"; buildInputs = with self; []; doCheck = false; propagatedBuildInputs = with self; []; src = fetchurl { - url = "https://pypi.python.org/packages/78/7d/84d11b96c3f60164dec3bef4a859a03aeae0231aa93f57fbe0d05fa4ff36/waitress-1.0.1.tar.gz"; - md5 = "dda92358a7569669086155923a46e57c"; + url = "https://pypi.python.org/packages/cd/f4/400d00863afa1e03618e31fd7e2092479a71b8c9718b00eb1eeb603746c6/waitress-1.0.2.tar.gz"; + md5 = "b968f39e95d609f6194c6e50425d4bb7"; }; meta = { license = [ pkgs.lib.licenses.zpt21 ]; diff --git a/requirements.txt b/requirements.txt --- a/requirements.txt +++ b/requirements.txt @@ -1,40 +1,41 @@ ## core setuptools==30.1.0 -Beaker==1.7.0 +Beaker==1.9.0 configobj==5.0.6 decorator==4.0.11 dulwich==0.13.0 -hgsubversion==1.8.6 +hgsubversion==1.8.7 hg-evolve==6.6.0 infrae.cache==1.0.1 mercurial==4.2.3 msgpack-python==0.4.8 pyramid-jinja2==2.5 -pyramid==1.7.4 +pyramid==1.9.1 pyramid-mako==1.0.2 repoze.lru==0.6 -simplejson==3.7.2 -subprocess32==3.2.6 +simplejson==3.11.1 +subprocess32==3.2.7 # Custom subvertpy that is not available on pypi. https://code.rhodecode.com/upstream/subvertpy/archive/subvertpy-0.9.3.tar.gz?md5=4e49da2fe07608239cc9a80a7bb8f33c#egg=subvertpy==0.9.3 six==1.9.0 translationstring==1.3 -WebOb==1.3.1 +WebOb==1.7.3 wheel==0.29.0 zope.deprecation==4.1.2 zope.interface==4.1.3 +## http servers +gevent==1.2.2 +greenlet==0.4.12 +gunicorn==19.7.1 +waitress==1.0.2 + ## debug -ipdb==0.10.1 +ipdb==0.10.3 ipython==5.1.0 -# http servers -gevent==1.1.2 -greenlet==0.4.10 -gunicorn==19.6.0 -waitress==1.0.1 ## test related requirements -r requirements_test.txt diff --git a/requirements_test.txt b/requirements_test.txt --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,15 +1,15 @@ # test related requirements -pytest==3.0.5 -py==1.4.31 -pytest-cov==2.4.0 -pytest-sugar==0.7.1 -pytest-runner==2.9.0 +pytest==3.1.2 +py==1.4.34 +pytest-cov==2.5.1 +pytest-sugar==0.8.0 +pytest-runner==2.11.1 pytest-catchlog==1.2.2 -pytest-profiling==1.2.2 +pytest-profiling==1.2.6 gprof2dot==2016.10.13 pytest-timeout==1.2.0 mock==1.0.1 -WebTest==1.4.3 +WebTest==2.0.27 cov-core==1.15.0 coverage==3.7.1 diff --git a/vcsserver/VERSION b/vcsserver/VERSION --- a/vcsserver/VERSION +++ b/vcsserver/VERSION @@ -1,1 +1,1 @@ -4.9.1 \ No newline at end of file +4.10.0 \ No newline at end of file diff --git a/vcsserver/echo_stub/echo_app.py b/vcsserver/echo_stub/echo_app.py --- a/vcsserver/echo_stub/echo_app.py +++ b/vcsserver/echo_stub/echo_app.py @@ -21,11 +21,31 @@ class EchoApp(object): log.debug("Content-Length: %s", environ.get('CONTENT_LENGTH')) environ['wsgi.input'].read() status = '200 OK' - headers = [] + headers = [('Content-Type', 'text/plain')] start_response(status, headers) return ["ECHO"] +class EchoAppStream(object): + + def __init__(self, repo_path, repo_name, config): + self._repo_path = repo_path + log.info("EchoApp initialized for %s", repo_path) + + def __call__(self, environ, start_response): + log.debug("EchoApp called for %s", self._repo_path) + log.debug("Content-Length: %s", environ.get('CONTENT_LENGTH')) + environ['wsgi.input'].read() + status = '200 OK' + headers = [('Content-Type', 'text/plain')] + start_response(status, headers) + + def generator(): + for _ in xrange(1000000): + yield "ECHO" + return generator() + + def create_app(): """ Allows to run this app directly in a WSGI server. diff --git a/vcsserver/git.py b/vcsserver/git.py --- a/vcsserver/git.py +++ b/vcsserver/git.py @@ -628,6 +628,7 @@ class GitRemote(object): return ''.join(p), ''.join(p.error) except (EnvironmentError, OSError) as err: + cmd = ' '.join(cmd) # human friendly CMD tb_err = ("Couldn't run git command (%s).\n" "Original error was:%s\n" % (cmd, err)) log.exception(tb_err) diff --git a/vcsserver/hg.py b/vcsserver/hg.py --- a/vcsserver/hg.py +++ b/vcsserver/hg.py @@ -33,8 +33,8 @@ from vcsserver.hgcompat import ( archival, bin, clone, config as hgconfig, diffopts, hex, hg_url as url_parser, httpbasicauthhandler, httpdigestauthhandler, httppeer, localrepository, match, memctx, exchange, memfilectx, nullrev, - patch, peer, revrange, ui, Abort, LookupError, RepoError, RepoLookupError, - InterventionRequired, RequirementError) + patch, peer, revrange, ui, hg_tag, Abort, LookupError, RepoError, + RepoLookupError, InterventionRequired, RequirementError) log = logging.getLogger(__name__) @@ -127,6 +127,9 @@ class HgRemote(object): "message": self.ctx_description, "parents": self.ctx_parents, "status": self.ctx_status, + "obsolete": self.ctx_obsolete, + "phase": self.ctx_phase, + "hidden": self.ctx_hidden, "_file_paths": self.ctx_list, } @@ -629,7 +632,7 @@ class HgRemote(object): date = (tag_time, tag_timezone) try: - repo.tag(name, node, message, local, user, date) + hg_tag.tag(repo, name, node, message, local, user, date) except Abort as e: log.exception("Tag operation aborted") # Exception can contain unicode which we convert @@ -725,11 +728,11 @@ class HgRemote(object): commands.merge(baseui, repo, rev=revision) @reraise_safe_exceptions - def commit(self, wire, message, username): + def commit(self, wire, message, username, close_branch=False): repo = self._factory.repo(wire) baseui = self._factory._create_config(wire['config']) repo.ui.setconfig('ui', 'username', username) - commands.commit(baseui, repo, message=message) + commands.commit(baseui, repo, message=message, close_branch=close_branch) @reraise_safe_exceptions def rebase(self, wire, source=None, dest=None, abort=False): diff --git a/vcsserver/hgcompat.py b/vcsserver/hgcompat.py --- a/vcsserver/hgcompat.py +++ b/vcsserver/hgcompat.py @@ -36,6 +36,7 @@ from mercurial import unionrepo from mercurial import localrepo from mercurial import merge as hg_merge from mercurial import subrepo +from mercurial import tags as hg_tag from mercurial.commands import clone, nullid, pull from mercurial.context import memctx, memfilectx diff --git a/vcsserver/hooks.py b/vcsserver/hooks.py --- a/vcsserver/hooks.py +++ b/vcsserver/hooks.py @@ -18,6 +18,7 @@ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import io +import os import sys import json import logging @@ -124,6 +125,7 @@ def _get_hooks_client(extras): def _call_hook(hook_name, extras, writer): hooks = _get_hooks_client(extras) result = hooks(hook_name, extras) + log.debug('Hooks got result: %s', result) writer.write(result['output']) _handle_exception(result) @@ -131,22 +133,14 @@ def _call_hook(hook_name, extras, writer def _extras_from_ui(ui): - extras = json.loads(ui.config('rhodecode', 'RC_SCM_DATA')) + hook_data = ui.config('rhodecode', 'RC_SCM_DATA') + if not hook_data: + # maybe it's inside environ ? + hook_data = os.environ.get('RC_SCM_DATA') + extras = json.loads(hook_data) return extras -def repo_size(ui, repo, **kwargs): - return _call_hook('repo_size', _extras_from_ui(ui), HgMessageWriter(ui)) - - -def pre_pull(ui, repo, **kwargs): - return _call_hook('pre_pull', _extras_from_ui(ui), HgMessageWriter(ui)) - - -def post_pull(ui, repo, **kwargs): - return _call_hook('post_pull', _extras_from_ui(ui), HgMessageWriter(ui)) - - def _rev_range_hash(repo, node): commits = [] @@ -159,6 +153,33 @@ def _rev_range_hash(repo, node): return commits +def repo_size(ui, repo, **kwargs): + extras = _extras_from_ui(ui) + return _call_hook('repo_size', extras, HgMessageWriter(ui)) + + +def pre_pull(ui, repo, **kwargs): + extras = _extras_from_ui(ui) + return _call_hook('pre_pull', extras, HgMessageWriter(ui)) + + +def pre_pull_ssh(ui, repo, **kwargs): + if _extras_from_ui(ui).get('SSH'): + return pre_pull(ui, repo, **kwargs) + return 0 + + +def post_pull(ui, repo, **kwargs): + extras = _extras_from_ui(ui) + return _call_hook('post_pull', extras, HgMessageWriter(ui)) + + +def post_pull_ssh(ui, repo, **kwargs): + if _extras_from_ui(ui).get('SSH'): + return post_pull(ui, repo, **kwargs) + return 0 + + def pre_push(ui, repo, node=None, **kwargs): extras = _extras_from_ui(ui) @@ -182,6 +203,27 @@ def pre_push(ui, repo, node=None, **kwar return _call_hook('pre_push', extras, HgMessageWriter(ui)) +def pre_push_ssh(ui, repo, node=None, **kwargs): + if _extras_from_ui(ui).get('SSH'): + return pre_push(ui, repo, node, **kwargs) + + return 0 + + +def pre_push_ssh_auth(ui, repo, node=None, **kwargs): + extras = _extras_from_ui(ui) + if extras.get('SSH'): + permission = extras['SSH_PERMISSIONS'] + + if 'repository.write' == permission or 'repository.admin' == permission: + return 0 + + # non-zero ret code + return 1 + + return 0 + + def post_push(ui, repo, node, **kwargs): extras = _extras_from_ui(ui) @@ -208,12 +250,19 @@ def post_push(ui, repo, node, **kwargs): return _call_hook('post_push', extras, HgMessageWriter(ui)) +def post_push_ssh(ui, repo, node, **kwargs): + if _extras_from_ui(ui).get('SSH'): + return post_push(ui, repo, node, **kwargs) + return 0 + + def key_push(ui, repo, **kwargs): if kwargs['new'] != '0' and kwargs['namespace'] == 'bookmarks': # store new bookmarks in our UI object propagated later to post_push ui._rc_pushkey_branches = repo[kwargs['key']].bookmarks() return + # backward compat log_pull_action = post_pull diff --git a/vcsserver/http_main.py b/vcsserver/http_main.py --- a/vcsserver/http_main.py +++ b/vcsserver/http_main.py @@ -23,6 +23,7 @@ import wsgiref.util import traceback from itertools import chain +import simplejson as json import msgpack from beaker.cache import CacheManager from beaker.util import parse_cache_config_options @@ -269,7 +270,8 @@ class HTTPApplication(object): return resp def status_view(self, request): - return {'status': 'OK'} + import vcsserver + return {'status': 'OK', 'vcsserver_version': vcsserver.__version__} def service_view(self, request): import vcsserver @@ -310,6 +312,25 @@ class HTTPApplication(object): return value return _render + def set_env_from_config(self, environ, config): + dict_conf = {} + try: + for elem in config: + if elem[0] == 'rhodecode': + dict_conf = json.loads(elem[2]) + break + except Exception: + log.exception('Failed to fetch SCM CONFIG') + return + + username = dict_conf.get('username') + if username: + environ['REMOTE_USER'] = username + + ip = dict_conf.get('ip') + if ip: + environ['REMOTE_HOST'] = ip + def hg_proxy(self): @wsgiapp def _hg_proxy(environ, start_response): @@ -334,6 +355,7 @@ class HTTPApplication(object): else: @wsgiapp def _hg_stream(environ, start_response): + log.debug('http-app: handling hg stream') repo_path = environ['HTTP_X_RC_REPO_PATH'] repo_name = environ['HTTP_X_RC_REPO_NAME'] packed_config = base64.b64decode( @@ -342,9 +364,13 @@ class HTTPApplication(object): app = scm_app.create_hg_wsgi_app( repo_path, repo_name, config) - # Consitent path information for hgweb + # Consistent path information for hgweb environ['PATH_INFO'] = environ['HTTP_X_RC_PATH_INFO'] environ['REPO_NAME'] = repo_name + self.set_env_from_config(environ, config) + + log.debug('http-app: starting app handler ' + 'with %s and process request', app) return app(environ, ResponseFilter(start_response)) return _hg_stream @@ -358,6 +384,7 @@ class HTTPApplication(object): else: @wsgiapp def _git_stream(environ, start_response): + log.debug('http-app: handling git stream') repo_path = environ['HTTP_X_RC_REPO_PATH'] repo_name = environ['HTTP_X_RC_REPO_NAME'] packed_config = base64.b64decode( @@ -365,6 +392,8 @@ class HTTPApplication(object): config = msgpack.unpackb(packed_config) environ['PATH_INFO'] = environ['HTTP_X_RC_PATH_INFO'] + self.set_env_from_config(environ, config) + content_type = environ.get('CONTENT_TYPE', '') path = environ['PATH_INFO'] @@ -388,6 +417,9 @@ class HTTPApplication(object): else: app = scm_app.create_git_wsgi_app( repo_path, repo_name, config) + + log.debug('http-app: starting app handler ' + 'with %s and process request', app) return app(environ, start_response) return _git_stream