0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-24 15:26:14 +00:00
termux-packages/disabled-packages/pypanel/PyPanel-2.4_pypanel.patch
Tee KOBAYASHI 235c11e73e pypanel, python2-{six,xlib}: Disabled
due to run-time dependency on python2.

Python 2 is long since EOL and has a bunch of known vulnerabilities now.
It should not be used other than in some restricted cases such as build
dependency of pypy{,3}.
2023-02-12 04:18:33 +00:00

27 lines
985 B
Diff

diff -uNr PyPanel-2.4/pypanel PyPanel-2.4.mod/pypanel
--- PyPanel-2.4/pypanel 2005-06-27 02:24:43.000000000 +0300
+++ PyPanel-2.4.mod/pypanel 2017-12-12 17:52:16.987058639 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python -OO
+#!@TERMUX_PREFIX@/bin/python2
"""
PyPanel v2.4 - Lightweight panel/taskbar for X11 window managers
Copyright (c) 2003-2005 Jon Gelo (ziljian@users.sourceforge.net)
@@ -921,9 +921,13 @@
try:
src = None
dst = None
- home = pwd.getpwuid(os.getuid())[5]
- if os.access("/etc/pypanelrc", os.F_OK|os.R_OK):
- src = "/etc/pypanelrc"
+ home = os.getenv("HOME")
+
+ if not home:
+ home = "@TERMUX_HOME@"
+
+ if os.access("@TERMUX_PREFIX@/etc/pypanelrc", os.F_OK|os.R_OK):
+ src = "@TERMUX_PREFIX@/etc/pypanelrc"
execfile(src)
if not os.access("%s/.pypanelrc" % home, os.F_OK|os.R_OK):
# Create ~/.pypanelrc from /etc/pypanelrc if it exists else