summaryrefslogtreecommitdiffstats
path: root/aux-files
diff options
context:
space:
mode:
Diffstat (limited to 'aux-files')
-rw-r--r--aux-files/openbox/openbox-add-fix-for-glib2-exposed-segfault.patch50
-rw-r--r--aux-files/openbox/openbox-python3.patch165
-rw-r--r--aux-files/python-bugwarrior/gitea-support.patch149
3 files changed, 358 insertions, 6 deletions
diff --git a/aux-files/openbox/openbox-add-fix-for-glib2-exposed-segfault.patch b/aux-files/openbox/openbox-add-fix-for-glib2-exposed-segfault.patch
new file mode 100644
index 0000000..ef68d31
--- /dev/null
+++ b/aux-files/openbox/openbox-add-fix-for-glib2-exposed-segfault.patch
@@ -0,0 +1,50 @@
+From 9ed6fdd71890c5cc43747f105382d5677e5d37e7 Mon Sep 17 00:00:00 2001
+From: pldubouilh <pldubouilh@gmail.com>
+Date: Fri, 17 Mar 2023 18:23:47 +0100
+Subject: [PATCH] Fix list traversal issue in client_calc_layer
+
+The calls to client_calc_layer_internal can modify stacking_list, which
+can cause us to follow dangling ->next pointers (either by the pointer
+itself already being freed, or it pointing to a freed area). Avoid this
+by copying the list first, the goal is to visit every client in the list
+once so this should be fine.
+---
+ openbox/client.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/openbox/client.c b/openbox/client.c
+index 7168b2407..b8264587c 100644
+--- a/openbox/client.c
++++ b/openbox/client.c
+@@ -2742,9 +2742,12 @@ static void client_calc_layer_internal(ObClient *self)
+ void client_calc_layer(ObClient *self)
+ {
+ GList *it;
++ /* the client_calc_layer_internal calls below modify stacking_list,
++ so we have to make a copy to iterate over */
++ GList *list = g_list_copy(stacking_list);
+
+ /* skip over stuff above fullscreen layer */
+- for (it = stacking_list; it; it = g_list_next(it))
++ for (it = list; it; it = g_list_next(it))
+ if (window_layer(it->data) <= OB_STACKING_LAYER_FULLSCREEN) break;
+
+ /* find the windows in the fullscreen layer, and mark them not-visited */
+@@ -2757,7 +2760,7 @@ void client_calc_layer(ObClient *self)
+ client_calc_layer_internal(self);
+
+ /* skip over stuff above fullscreen layer */
+- for (it = stacking_list; it; it = g_list_next(it))
++ for (it = list; it; it = g_list_next(it))
+ if (window_layer(it->data) <= OB_STACKING_LAYER_FULLSCREEN) break;
+
+ /* now recalc any windows in the fullscreen layer which have not
+@@ -2768,6 +2771,8 @@ void client_calc_layer(ObClient *self)
+ !WINDOW_AS_CLIENT(it->data)->visited)
+ client_calc_layer_internal(it->data);
+ }
++
++ g_list_free(it);
+ }
+
+ gboolean client_should_show(ObClient *self)
diff --git a/aux-files/openbox/openbox-python3.patch b/aux-files/openbox/openbox-python3.patch
new file mode 100644
index 0000000..782524d
--- /dev/null
+++ b/aux-files/openbox/openbox-python3.patch
@@ -0,0 +1,165 @@
+Retrieved from the openbox Debian package.
+
+From acfbbc4ea40932f183617bb7006700140fe5f61e Mon Sep 17 00:00:00 2001
+From: Troy Curtis Jr <troycurtisjr@gmail.com>
+Date: Wed, 13 Sep 2017 21:59:48 -0500
+Subject: [PATCH] Add python3 support to openbox-xdg-autostart.
+
+Updated syntax in openbox-xdg-autostart to support both python2 and
+python3.
+
+Added a configure substitution to set the chosen python at build time.
+
+https://bugzilla.icculus.org/show_bug.cgi?id=6444
+---
+ .gitignore | 1 +
+ configure.ac | 3 +
+ ...xdg-autostart => openbox-xdg-autostart.in} | 70 +++++++++----------
+ 3 files changed, 38 insertions(+), 36 deletions(-)
+ rename data/autostart/{openbox-xdg-autostart => openbox-xdg-autostart.in} (77%)
+
+diff --git a/configure.ac b/configure.ac
+index ca1602670..9a31e9845 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -103,6 +103,8 @@ AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h grp.h locale.h pwd.h)
+ AC_CHECK_HEADERS(signal.h string.h stdio.h stdlib.h unistd.h sys/stat.h)
+ AC_CHECK_HEADERS(sys/select.h sys/socket.h sys/time.h sys/types.h sys/wait.h)
+
++AM_PATH_PYTHON([2],,)
++
+ AC_PATH_PROG([SED], [sed], [no])
+ if test "$SED" = "no"; then
+ AC_MSG_ERROR([The program "sed" is not available. This program is required to build Openbox.])
+@@ -259,6 +261,7 @@ AC_CONFIG_FILES([
+ obrender/version.h
+ obt/version.h
+ version.h
++ data/autostart/openbox-xdg-autostart
+ ])
+ AC_CONFIG_COMMANDS([doc],
+ [test -d doc || mkdir doc])
+diff --git a/data/autostart/openbox-xdg-autostart b/data/autostart/openbox-xdg-autostart.in
+similarity index 77%
+rename from data/autostart/openbox-xdg-autostart
+rename to data/autostart/openbox-xdg-autostart.in
+index 04a17a199..3c365b112 100755
+--- a/data/autostart/openbox-xdg-autostart
++++ b/data/autostart/openbox-xdg-autostart.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!@PYTHON@
+
+ # openbox-xdg-autostart runs things based on the XDG autostart specification
+ # Copyright (C) 2008 Dana Jansens
+@@ -28,9 +28,7 @@ try:
+ from xdg.DesktopEntry import DesktopEntry
+ from xdg.Exceptions import ParsingError
+ except ImportError:
+- print
+- print >>sys.stderr, "ERROR:", ME, "requires PyXDG to be installed"
+- print
++ sys.stderr.write("\nERROR: %s requires PyXDG to be installed\n" % ME)
+ sys.exit(1)
+
+ def main(argv=sys.argv):
+@@ -51,7 +49,7 @@ def main(argv=sys.argv):
+ try:
+ autofile = AutostartFile(path)
+ except ParsingError:
+- print "Invalid .desktop file: " + path
++ print("Invalid .desktop file: " + path)
+ else:
+ if not autofile in files:
+ files.append(autofile)
+@@ -99,9 +97,9 @@ class AutostartFile:
+
+ def _alert(self, str, info=False):
+ if info:
+- print "\t ", str
++ print("\t ", str)
+ else:
+- print "\t*", str
++ print("\t*", str)
+
+ def _showInEnvironment(self, envs, verbose=False):
+ default = not self.de.getOnlyShowIn()
+@@ -146,14 +144,14 @@ class AutostartFile:
+
+ def display(self, envs):
+ if self._shouldRun(envs):
+- print "[*] " + self.de.getName()
++ print("[*] " + self.de.getName())
+ else:
+- print "[ ] " + self.de.getName()
++ print("[ ] " + self.de.getName())
+ self._alert("File: " + self.path, info=True)
+ if self.de.getExec():
+ self._alert("Executes: " + self.de.getExec(), info=True)
+ self._shouldRun(envs, True)
+- print
++ print()
+
+ def run(self, envs):
+ here = os.getcwd()
+@@ -165,34 +163,34 @@ class AutostartFile:
+ os.chdir(here)
+
+ def show_help():
+- print "Usage:", ME, "[OPTION]... [ENVIRONMENT]..."
+- print
+- print "This tool will run xdg autostart .desktop files"
+- print
+- print "OPTIONS"
+- print " --list Show a list of the files which would be run"
+- print " Files which would be run are marked with an asterix"
+- print " symbol [*]. For files which would not be run,"
+- print " information is given for why they are excluded"
+- print " --help Show this help and exit"
+- print " --version Show version and copyright information"
+- print
+- print "ENVIRONMENT specifies a list of environments for which to run autostart"
+- print "applications. If none are specified, only applications which do not "
+- print "limit themselves to certain environments will be run."
+- print
+- print "ENVIRONMENT can be one or more of:"
+- print " GNOME Gnome Desktop"
+- print " KDE KDE Desktop"
+- print " ROX ROX Desktop"
+- print " XFCE XFCE Desktop"
+- print " Old Legacy systems"
+- print
++ print("Usage:", ME, "[OPTION]... [ENVIRONMENT]...")
++ print()
++ print("This tool will run xdg autostart .desktop files")
++ print()
++ print("OPTIONS")
++ print(" --list Show a list of the files which would be run")
++ print(" Files which would be run are marked with an asterix")
++ print(" symbol [*]. For files which would not be run,")
++ print(" information is given for why they are excluded")
++ print(" --help Show this help and exit")
++ print(" --version Show version and copyright information")
++ print()
++ print("ENVIRONMENT specifies a list of environments for which to run autostart")
++ print("applications. If none are specified, only applications which do not ")
++ print("limit themselves to certain environments will be run.")
++ print()
++ print("ENVIRONMENT can be one or more of:")
++ print(" GNOME Gnome Desktop")
++ print(" KDE KDE Desktop")
++ print(" ROX ROX Desktop")
++ print(" XFCE XFCE Desktop")
++ print(" Old Legacy systems")
++ print()
+
+ def show_version():
+- print ME, VERSION
+- print "Copyright (c) 2008 Dana Jansens"
+- print
++ print(ME, VERSION)
++ print("Copyright (c) 2008 Dana Jansens")
++ print()
+
+ if __name__ == "__main__":
+ sys.exit(main())
diff --git a/aux-files/python-bugwarrior/gitea-support.patch b/aux-files/python-bugwarrior/gitea-support.patch
index 6c2c331..80ccb4b 100644
--- a/aux-files/python-bugwarrior/gitea-support.patch
+++ b/aux-files/python-bugwarrior/gitea-support.patch
@@ -1,7 +1,7 @@
From 6d7e50b5d1f7e79a685b08045cd91ea0b24f2154 Mon Sep 17 00:00:00 2001
From: wamsachel <wamsachel@gmail.com>
Date: Wed, 1 Apr 2020 22:27:52 +0000
-Subject: [PATCH 1/2] (WIP) Adding service support for Gitea
+Subject: [PATCH 1/8] (WIP) Adding service support for Gitea
Imported from https://github.com/GothenburgBitFactory/bugwarrior/pull/720
---
@@ -568,7 +568,7 @@ index c761a231..b5306da5 100644
From 80cd03d1ff85244f8a2c2beb37eab16af11e1adf Mon Sep 17 00:00:00 2001
From: msglm <msglm@techchud.xyz>
Date: Tue, 21 May 2024 04:21:35 -0500
-Subject: [PATCH 2/2] Add basic Gitea support
+Subject: [PATCH 2/8] Add basic Gitea support
Builds off PR #720 to add gitea integration to bugwarrior.
---
@@ -844,7 +844,7 @@ index a4c174c8..445846ff 100644
From 81b3fa0b47db93fb83a54c6727f5ee3c408797c5 Mon Sep 17 00:00:00 2001
From: msglm <msglm@techchud.xyz>
Date: Wed, 22 May 2024 20:59:54 -0500
-Subject: [PATCH 3/4] Add basic documentation
+Subject: [PATCH 3/8] Add basic documentation
mish-mash between the github and gitlab documentation with everything I
don't think is supported removed.
@@ -987,7 +987,7 @@ index 00000000..6ccf2308
From 1626a36c15013fc42e369cdc9ef98c23e10845c2 Mon Sep 17 00:00:00 2001
From: msglm <msglm@techchud.xyz>
Date: Wed, 22 May 2024 21:00:20 -0500
-Subject: [PATCH 4/4] Remove Six usage and clean the codebase
+Subject: [PATCH 4/8] Remove Six usage and clean the codebase
Suggestions from here are implemented
https://github.com/GothenburgBitFactory/bugwarrior/pull/1048#pullrequestreview-2070021239
@@ -1057,7 +1057,7 @@ index 445846ff..341ec617 100644
From 17b725774281e9742b786dbcbcf791f7f3dacf61 Mon Sep 17 00:00:00 2001
From: msglm <msglm@techchud.xyz>
Date: Thu, 23 May 2024 05:03:39 -0500
-Subject: [PATCH 5/6] Intake Critique and simplify
+Subject: [PATCH 5/8] Intake Critique and simplify
Remove user+pass auth, token only now.
Added issue API Querying for writing custom queries
@@ -1367,7 +1367,7 @@ index 341ec617..28a92e96 100644
From 3eb6e743c7ee4c7892525c05d880f5d05d3f8600 Mon Sep 17 00:00:00 2001
From: msglm <msglm@techchud.xyz>
Date: Thu, 23 May 2024 05:13:33 -0500
-Subject: [PATCH 6/6] Documentation for previous commit
+Subject: [PATCH 6/8] Documentation for previous commit
---
bugwarrior/docs/services/gitea.rst | 31 +++++++++++++++++++++++++++---
@@ -1424,3 +1424,140 @@ index 6ccf2308..19e0930a 100644
Provided UDA Fields
-------------------
+
+From 439c3f02338a43dcd0309fe297a706f0232a6138 Mon Sep 17 00:00:00 2001
+From: msglm <msglm@techchud.xyz>
+Date: Wed, 19 Feb 2025 03:32:02 -0600
+Subject: [PATCH 7/8] Update to modern standards
+
+---
+ bugwarrior/services/gitea.py | 37 +++++++++++++++---------------------
+ 1 file changed, 15 insertions(+), 22 deletions(-)
+
+diff --git a/bugwarrior/services/gitea.py b/bugwarrior/services/gitea.py
+index 28a92e96..8814633a 100644
+--- a/bugwarrior/services/gitea.py
++++ b/bugwarrior/services/gitea.py
+@@ -3,9 +3,9 @@
+ """Bugwarrior service support class for Gitea
+
+ Available classes:
+-- GiteaClient(ServiceClient): Constructs Gitea API strings
++- GiteaClient(Service): Constructs Gitea API strings
+ - GiteaIssue(Issue): TaskWarrior Interface
+-- GiteaService(IssueService): Engine for firing off requests
++- GiteaService(Issue): Engine for firing off requests
+
+ Todo:
+ * Add token support
+@@ -25,7 +25,7 @@
+ from jinja2 import Template
+
+ from bugwarrior import config
+-from bugwarrior.services import IssueService, Issue, ServiceClient
++from bugwarrior.services import Issue, Service, Client
+
+ log = logging.getLogger(__name__) # pylint: disable-msg=C0103
+
+@@ -62,7 +62,7 @@ def get(self, key, default=None, to_type=None):
+ return default
+
+
+-class GiteaClient(ServiceClient):
++class GiteaClient(Client):
+ """Builds Gitea API strings
+ Args:
+ host (str): remote gitea server
+@@ -263,8 +263,11 @@ class GiteaIssue(Issue):
+ @staticmethod
+ def _normalize_label_to_tag(label):
+ return re.sub(r'[^a-zA-Z0-9]', '_', label)
++ def get_tags(self):
++ labels = [label['name'] for label in self.record.get('labels', [])]
++ return self.get_tags_from_labels(labels)
+
+- def to_taskwarrior(self):
++ def to_taskwarrior(self) -> dict:
+ milestone = self.record['milestone']
+ if milestone:
+ milestone = milestone['title']
+@@ -302,31 +305,18 @@ def to_taskwarrior(self):
+ self.NAMESPACE: self.extra['namespace'],
+ self.STATE: self.record.get('state', '')
+ }
+- def get_tags(self):
+- labels = [label['name'] for label in self.record.get('labels', [])]
+- return self.get_tags_from_labels(labels)
+-
+- def get_default_description(self):
+- log.info('In get_default_description')
+- return self.build_default_description(
+- title=self.record['title'],
+- url=self.get_processed_url(self.record['url']),
+- number=self.record['number'],
+- cls=self.extra['type'],
+- )
+-
+
+ def get_default_description(self):
+ log.info('In get_default_description')
+ return self.build_default_description(
+ title=self.record['title'],
+- url=self.get_processed_url(self.record['url']),
++ url=self.record['url'],
+ number=self.record['number'],
+ cls=self.extra['type'],
+ )
+
+
+-class GiteaService(IssueService):
++class GiteaService(Service):
+ ISSUE_CLASS = GiteaIssue
+ CONFIG_SCHEMA = GiteaConfig
+ CONFIG_PREFIX = 'gitea'
+@@ -455,7 +445,7 @@ def annotations(self, tag, issue, issue_obj):
+ ) for c in comments)
+ annotations_result = self.build_annotations(
+ annotations,
+- issue_obj.get_processed_url(url))
++ url)
+ log.info('annotations: {}'.format(annotations_result))
+ return annotations_result
+
+@@ -573,6 +563,9 @@ def issues(self):
+ 'annotations': [issue['body']],
+ 'namespace': self.username,
+ }
+- issue_obj.update_extra(extra)
++ issue_obj.extra.update(extra)
+ yield issue_obj
+
++
++
++
+
+From db4c47837d15cb126cb97a97f72db061052db5ab Mon Sep 17 00:00:00 2001
+From: msglm <msglm@techchud.xyz>
+Date: Wed, 19 Feb 2025 03:34:16 -0600
+Subject: [PATCH 8/8] Do not yield on AttributeError
+
+Previously, when there is an AttributeError in a service, the service
+will return its issue object instead of a dictionary representation of
+the issue. This fixes it by raising an error if this happens.
+---
+ bugwarrior/collect.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bugwarrior/collect.py b/bugwarrior/collect.py
+index 8d435461..34af838a 100644
+--- a/bugwarrior/collect.py
++++ b/bugwarrior/collect.py
+@@ -100,7 +100,7 @@ def aggregate_issues(conf, main_section, debug):
+ log.error(f"Aborted [{target}] due to critical error.")
+ yield ('SERVICE FAILED', target)
+ continue
+- yield issue
++ raise
+
+ log.info("Done aggregating remote issues.")
+