diff options
author | Marius Brehler <marbre@linux.sungazer.de> | 2015-11-28 18:52:16 +0100 |
---|---|---|
committer | Marius Brehler <marbre@linux.sungazer.de> | 2015-11-28 18:52:16 +0100 |
commit | 374b2ddcb384c9a37adfe96c26278e5f59256542 (patch) | |
tree | a9c31d3e7dc6325689279d90fe021d0b04f8478a | |
parent | dev-python/ipykernel: Moved to tree; Drop old (diff) | |
download | sci-374b2ddcb384c9a37adfe96c26278e5f59256542.tar.gz sci-374b2ddcb384c9a37adfe96c26278e5f59256542.tar.bz2 sci-374b2ddcb384c9a37adfe96c26278e5f59256542.zip |
dev-python/notebook: Drop old
Package-Manager: portage-2.2.20.1
RepoMan-Options: --force
7 files changed, 8 insertions, 286 deletions
diff --git a/dev-python/notebook/ChangeLog b/dev-python/notebook/ChangeLog index be4952250..876f16fb6 100644 --- a/dev-python/notebook/ChangeLog +++ b/dev-python/notebook/ChangeLog @@ -2,6 +2,14 @@ # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 # $Id$ + 28 Nov 2015; Marius Brehler <marbre@linux.sungazer.de> + -files/notebook-4.0.4-Don-t-redirect-from-edit-to-files.patch, + -files/notebook-4.0.4-only-redirect-to-editor-for-text-documents.patch, + -files/notebook-4.0.4-set-mime-type-on-files.patch, + -files/notebook-4.0.4-set-model-mimetype-even-when-content-False.patch, + -notebook-4.0.4-r3.ebuild: + dev-python/notebook: Drop old + *notebook-4.0.6 (16 Oct 2015) 16 Oct 2015; Marius Brehler <marbre@linux.sungazer.de> +notebook-4.0.6.ebuild, diff --git a/dev-python/notebook/Manifest b/dev-python/notebook/Manifest index 80201ab4e..896c9f68e 100644 --- a/dev-python/notebook/Manifest +++ b/dev-python/notebook/Manifest @@ -1,2 +1 @@ -DIST notebook-4.0.4.tar.gz 6682601 SHA256 a57852514bce1b1cf41fa0311f6cf894960cf68b083b55e6c408316b598d5648 SHA512 52c1c17a7fe80cd4a392a2d99b852337806d910ac8f821f32defe6e2e0ba55336dccc653f0d848262c5801a2796e6b629d25bb1e9976d76f81b8a38c606a2b05 WHIRLPOOL d0b9fcb0bcc42932c5f3828f3417d4967f3a071a864d35a1cc8813da79991166cf2658f40a955379e278bff85eb4dc82d0760d3745c3f5ff3997f88149da2b31 DIST notebook-4.0.6.tar.gz 6705277 SHA256 f62e7a6afbc00bab3615b927595d27b1874cff3218bddcbab62f97f6dae567c3 SHA512 9ce9ca21adcb967725aeb7a18543ace8aca4e88497d3d2fd708a603511e8ef4a932b39337d134d684df03b273bbc442958a37ced8cd499cb7b97a1c29758eeb0 WHIRLPOOL 764afabfa220d37e048a359952bd9cc4de0b791de782ed7cf2a22e8c0e9719b39630fd5c1c7acbf163715924662805f92b406bf6198600f2c4a35d239a12df11 diff --git a/dev-python/notebook/files/notebook-4.0.4-Don-t-redirect-from-edit-to-files.patch b/dev-python/notebook/files/notebook-4.0.4-Don-t-redirect-from-edit-to-files.patch deleted file mode 100644 index 76d0e61e4..000000000 --- a/dev-python/notebook/files/notebook-4.0.4-Don-t-redirect-from-edit-to-files.patch +++ /dev/null @@ -1,55 +0,0 @@ -Upstream patch to fix -"Maliciously crafted text files in IPython/Jupyter editor". - -http://seclists.org/oss-sec/2015/q3/558 -https://bugs.gentoo.org/show_bug.cgi?id=560708 - - -From 23162fd2895ad7445fdbe095b8fc8633d95ec6e6 Mon Sep 17 00:00:00 2001 -From: Min RK <benjaminrk@gmail.com> -Date: Mon, 20 Jul 2015 12:11:23 -0700 -Subject: [PATCH 4/4] Don't redirect from /edit/ to /files/ - -show failure to decode, instead ---- - notebook/static/edit/js/editor.js | 15 +++------------ - 1 file changed, 3 insertions(+), 12 deletions(-) - -diff --git a/notebook/static/edit/js/editor.js b/notebook/static/edit/js/editor.js -index ddbc2de..421fa57 100644 ---- a/notebook/static/edit/js/editor.js -+++ b/notebook/static/edit/js/editor.js -@@ -90,19 +90,10 @@ function($, - }).catch( - function(error) { - that.events.trigger("file_load_failed.Editor", error); -- if (((error.xhr||{}).responseJSON||{}).reason === 'bad format') { -- window.location = utils.url_path_join( -- that.base_url, -- 'files', -- that.file_path -- ); -- } else { -- console.warn('Error while loading: the error was:') -- console.warn(error) -- } -+ console.warn('Error loading: ', error); - cm.setValue("Error! " + error.message + - "\nSaving disabled.\nSee Console for more details."); -- cm.setOption('readOnly','nocursor') -+ cm.setOption('readOnly','nocursor'); - that.save_enabled = false; - } - ); -@@ -186,7 +177,7 @@ function($, - Editor.prototype._clean_state = function(){ - var clean = this.codemirror.isClean(this.generation); - if (clean === this.clean){ -- return -+ return; - } else { - this.clean = clean; - } --- -2.4.6 - diff --git a/dev-python/notebook/files/notebook-4.0.4-only-redirect-to-editor-for-text-documents.patch b/dev-python/notebook/files/notebook-4.0.4-only-redirect-to-editor-for-text-documents.patch deleted file mode 100644 index 899cd3165..000000000 --- a/dev-python/notebook/files/notebook-4.0.4-only-redirect-to-editor-for-text-documents.patch +++ /dev/null @@ -1,38 +0,0 @@ -Upstream patch to fix -"Maliciously crafted text files in IPython/Jupyter editor". - -http://seclists.org/oss-sec/2015/q3/558 -https://bugs.gentoo.org/show_bug.cgi?id=560708 - - -From 4f0b3b8c10811d460efc67cf61e9f4df83d2a0a7 Mon Sep 17 00:00:00 2001 -From: Min RK <benjaminrk@gmail.com> -Date: Mon, 20 Jul 2015 12:11:04 -0700 -Subject: [PATCH 3/4] only redirect to editor for text documents - -treat unidentified mime-types as text ---- - notebook/static/tree/js/notebooklist.js | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/notebook/static/tree/js/notebooklist.js b/notebook/static/tree/js/notebooklist.js -index 6308d7f..0b71f42 100644 ---- a/notebook/static/tree/js/notebooklist.js -+++ b/notebook/static/tree/js/notebooklist.js -@@ -536,6 +536,13 @@ define([ - icon = 'running_' + icon; - } - var uri_prefix = NotebookList.uri_prefixes[model.type]; -+ if (model.type === 'file' && -+ model.mimetype && model.mimetype.substr(0,5) !== 'text/' -+ ) { -+ // send text/unidentified files to editor, others go to raw viewer -+ uri_prefix = 'files'; -+ } -+ - item.find(".item_icon").addClass(icon).addClass('icon-fixed-width'); - var link = item.find("a.item_link") - .attr('href', --- -2.4.6 - diff --git a/dev-python/notebook/files/notebook-4.0.4-set-mime-type-on-files.patch b/dev-python/notebook/files/notebook-4.0.4-set-mime-type-on-files.patch deleted file mode 100644 index 055685f8e..000000000 --- a/dev-python/notebook/files/notebook-4.0.4-set-mime-type-on-files.patch +++ /dev/null @@ -1,35 +0,0 @@ -Upstream patch to fix -"Maliciously crafted text files in IPython/Jupyter editor". - -http://seclists.org/oss-sec/2015/q3/558 -https://bugs.gentoo.org/show_bug.cgi?id=560708 - - -From 6ec427b5234bfc6c97065f130f762aee8ee67df4 Mon Sep 17 00:00:00 2001 -From: Min RK <benjaminrk@gmail.com> -Date: Mon, 20 Jul 2015 12:10:10 -0700 -Subject: [PATCH 1/4] set mime-type on /files/ - ---- - notebook/files/handlers.py | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/notebook/files/handlers.py b/notebook/files/handlers.py -index def3ec6..9d27261 100644 ---- a/notebook/files/handlers.py -+++ b/notebook/files/handlers.py -@@ -40,6 +40,11 @@ class FilesHandler(IPythonHandler): - cur_mime = mimetypes.guess_type(name)[0] - if cur_mime is not None: - self.set_header('Content-Type', cur_mime) -+ else: -+ if model['format'] == 'base64': -+ self.set_header('Content-Type', 'application/octet-stream') -+ else: -+ self.set_header('Content-Type', 'text/plain') - - if model['format'] == 'base64': - b64_bytes = model['content'].encode('ascii') --- -2.4.6 - diff --git a/dev-python/notebook/files/notebook-4.0.4-set-model-mimetype-even-when-content-False.patch b/dev-python/notebook/files/notebook-4.0.4-set-model-mimetype-even-when-content-False.patch deleted file mode 100644 index 46ef4272c..000000000 --- a/dev-python/notebook/files/notebook-4.0.4-set-model-mimetype-even-when-content-False.patch +++ /dev/null @@ -1,64 +0,0 @@ -Upstream patch to fix -"Maliciously crafted text files in IPython/Jupyter editor". - -http://seclists.org/oss-sec/2015/q3/558 -https://bugs.gentoo.org/show_bug.cgi?id=560708 - - -From f64aa490e3574ee2c2b504d0e0b39641c709a34f Mon Sep 17 00:00:00 2001 -From: Min RK <benjaminrk@gmail.com> -Date: Mon, 20 Jul 2015 12:10:25 -0700 -Subject: [PATCH 2/4] set model mimetype, even when content=False - ---- - notebook/services/contents/filemanager.py | 12 +++++++----- - notebook/services/contents/handlers.py | 3 --- - 2 files changed, 7 insertions(+), 8 deletions(-) - -diff --git a/notebook/services/contents/filemanager.py b/notebook/services/contents/filemanager.py -index ff8ac7d..637ff52 100644 ---- a/notebook/services/contents/filemanager.py -+++ b/notebook/services/contents/filemanager.py -@@ -278,18 +278,20 @@ class FileContentsManager(FileManagerMixin, ContentsManager): - model['type'] = 'file' - - os_path = self._get_os_path(path) -+ model['mimetype'] = mimetypes.guess_type(os_path)[0] - - if content: - content, format = self._read_file(os_path, format) -- default_mime = { -- 'text': 'text/plain', -- 'base64': 'application/octet-stream' -- }[format] -+ if model['mimetype'] is None: -+ default_mime = { -+ 'text': 'text/plain', -+ 'base64': 'application/octet-stream' -+ }[format] -+ model['mimetype'] = default_mime - - model.update( - content=content, - format=format, -- mimetype=mimetypes.guess_type(os_path)[0] or default_mime, - ) - - return model -diff --git a/notebook/services/contents/handlers.py b/notebook/services/contents/handlers.py -index 2a0a4cc..521aae5 100644 ---- a/notebook/services/contents/handlers.py -+++ b/notebook/services/contents/handlers.py -@@ -55,9 +55,6 @@ def validate_model(model, expect_content): - ) - - maybe_none_keys = ['content', 'format'] -- if model['type'] == 'file': -- # mimetype should be populated only for file models -- maybe_none_keys.append('mimetype') - if expect_content: - errors = [key for key in maybe_none_keys if model[key] is None] - if errors: --- -2.4.6 - diff --git a/dev-python/notebook/notebook-4.0.4-r3.ebuild b/dev-python/notebook/notebook-4.0.4-r3.ebuild deleted file mode 100644 index 45820badd..000000000 --- a/dev-python/notebook/notebook-4.0.4-r3.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 -PYTHON_COMPAT=( python2_7 python{3_3,3_4} ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 - -DESCRIPTION="Jupyter Interactive Notebook" -HOMEPAGE="http://jupyter.org" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" -KEYWORDS="~amd64 ~x86" - -LICENSE="BSD" -SLOT="0" -IUSE="doc test" -RDEPEND=" - >=dev-libs/mathjax-2.4 - dev-python/jinja[${PYTHON_USEDEP}] - >=dev-python/terminado-0.3.3[${PYTHON_USEDEP}] - >=www-servers/tornado-4.0[${PYTHON_USEDEP}] - dev-python/ipython_genutils[${PYTHON_USEDEP}] - dev-python/traitlets[${PYTHON_USEDEP}] - dev-python/jupyter_core[${PYTHON_USEDEP}] - dev-python/jupyter_client[${PYTHON_USEDEP}] - dev-python/nbformat[${PYTHON_USEDEP}] - dev-python/nbconvert[${PYTHON_USEDEP}] - dev-python/ipykernel[${PYTHON_USEDEP}] - " -DEPEND="${RDEPEND} - dev-python/setuptools[${PYTHON_USEDEP}] - test? ( - $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) - >=dev-python/nose-0.10.1[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}] - dev-python/coverage[${PYTHON_USEDEP}] - ) - doc? ( - app-text/pandoc - >=dev-python/ipython-4.0.0[${PYTHON_USEDEP}] - >=dev-python/sphinx-1.1[${PYTHON_USEDEP}] - ) - " - -PATCHES=( - "${FILESDIR}/${P}"-set-mime-type-on-files.patch - "${FILESDIR}/${P}"-set-model-mimetype-even-when-content-False.patch - "${FILESDIR}/${P}"-only-redirect-to-editor-for-text-documents.patch - "${FILESDIR}/${P}"-Don-t-redirect-from-edit-to-files.patch -) - -python_prepare_all() { - sed \ - -e "/import setup/s:$:\nimport setuptools:g" \ - -i setup.py || die - - # disable bundled mathjax - sed -i 's/^.*MathJax.*$//' bower.json || die - sed -i 's/mj(/#mj(/' setupbase.py || die - - # Prevent un-needed download during build - if use doc; then - sed -e "/^ 'sphinx.ext.intersphinx',/d" -i docs/source/conf.py || die - fi - - distutils-r1_python_prepare_all -} - -python_compile_all() { - use doc && emake -C docs html -} - -python_test() { - nosetests --with-coverage --cover-package=notebook notebook || die -} - -python_install() { - distutils-r1_python_install - - ln -sf "${EPREFIX}/usr/share/mathjax" "${D}$(python_get_sitedir)/notebook/static/components/MathJax" || die -} - -python_install_all() { - use doc && HTML_DOCS=( docs/build/html/. ) - distutils-r1_python_install_all -} - -pkg_preinst() { - # remove old mathjax folder if present - rm -rf "${EROOT}"/usr/lib*/python*/site-packages/notebook/static/components/MathJax -} |