pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/py-jupyter_client py-jupyter_client: set sticky ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/cda73de82a9f
branches: trunk
changeset: 459579:cda73de82a9f
user: gutteridge <gutteridge%pkgsrc.org@localhost>
date: Sat Oct 09 23:20:24 2021 +0000
description:
py-jupyter_client: set sticky bit only on the directory
Addresses PR pkg/56437 from Chavdar Ivanov, who also supplied the patch
that has already been integrated upstream (but not yet in a release
branch).
diffstat:
devel/py-jupyter_client/Makefile | 3 +-
devel/py-jupyter_client/distinfo | 3 +-
devel/py-jupyter_client/patches/patch-jupyter__client_connect.py | 44 ++++++++++
3 files changed, 48 insertions(+), 2 deletions(-)
diffs (72 lines):
diff -r 00d1b659edb6 -r cda73de82a9f devel/py-jupyter_client/Makefile
--- a/devel/py-jupyter_client/Makefile Sat Oct 09 20:56:11 2021 +0000
+++ b/devel/py-jupyter_client/Makefile Sat Oct 09 23:20:24 2021 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.20 2021/06/29 09:23:30 nia Exp $
+# $NetBSD: Makefile,v 1.21 2021/10/09 23:20:24 gutteridge Exp $
DISTNAME= jupyter_client-6.1.12
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION= 1
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_PYPI:=j/jupyter_client/}
diff -r 00d1b659edb6 -r cda73de82a9f devel/py-jupyter_client/distinfo
--- a/devel/py-jupyter_client/distinfo Sat Oct 09 20:56:11 2021 +0000
+++ b/devel/py-jupyter_client/distinfo Sat Oct 09 23:20:24 2021 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.16 2021/10/07 13:43:18 nia Exp $
+$NetBSD: distinfo,v 1.17 2021/10/09 23:20:24 gutteridge Exp $
RMD160 (jupyter_client-6.1.12.tar.gz) = 1e2bf8a6a8ec37e0744a7d5cb85895224636b43e
SHA512 (jupyter_client-6.1.12.tar.gz) = f31ff1a24b264c32d35d07491785e1d77935cdb463243e90e4aadcb0a093a074cdce75f01662591766588f39b146077639ca697f71157309dc92f12ae04d5cdd
Size (jupyter_client-6.1.12.tar.gz) = 301499 bytes
+SHA1 (patch-jupyter__client_connect.py) = 0fd1aeeff32eb89d270324aada38f91d5decefb6
diff -r 00d1b659edb6 -r cda73de82a9f devel/py-jupyter_client/patches/patch-jupyter__client_connect.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-jupyter_client/patches/patch-jupyter__client_connect.py Sat Oct 09 23:20:24 2021 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-jupyter__client_connect.py,v 1.1 2021/10/09 23:20:24 gutteridge Exp $
+
+Set sticky bit only on the directory.
+https://github.com/jupyter/jupyter_client/pull/711/
+
+--- jupyter_client/connect.py.orig 2021-03-14 00:34:45.000000000 +0000
++++ jupyter_client/connect.py
+@@ -137,31 +137,20 @@ def write_connection_file(fname=None, sh
+ f.write(json.dumps(cfg, indent=2))
+
+ if hasattr(stat, 'S_ISVTX'):
+- # set the sticky bit on the file and its parent directory
+- # to avoid periodic cleanup
+- paths = [fname]
++ # set the sticky bit on the parent directory of the file
++ # to ensure only owner can remove it
+ runtime_dir = os.path.dirname(fname)
+ if runtime_dir:
+- paths.append(runtime_dir)
+- for path in paths:
+- permissions = os.stat(path).st_mode
++ permissions = os.stat(runtime_dir).st_mode
+ new_permissions = permissions | stat.S_ISVTX
+ if new_permissions != permissions:
+ try:
+- os.chmod(path, new_permissions)
++ os.chmod(runtime_dir, new_permissions)
+ except OSError as e:
+- if e.errno == errno.EPERM and path == runtime_dir:
++ if e.errno == errno.EPERM:
+ # suppress permission errors setting sticky bit on runtime_dir,
+ # which we may not own.
+ pass
+- else:
+- # failed to set sticky bit, probably not a big deal
+- warnings.warn(
+- "Failed to set sticky bit on %r: %s"
+- "\nProbably not a big deal, but runtime files may be cleaned up periodically." % (path, e),
+- RuntimeWarning,
+- )
+-
+ return fname, cfg
+
+
Home |
Main Index |
Thread Index |
Old Index