From bf671476136b42ccddc92746a303baabc3538f9a Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Wed, 6 Jul 2022 08:04:19 +0200 Subject: [PATCH] gertty, new python recipe (#7027) patchset Co-autorhered-by: Adrien Destugues --- dev-util/gertty/gertty-1.5.0.recipe | 75 -- dev-util/gertty/gertty-1.6.0.recipe | 95 ++ dev-util/gertty/patches/gertty-1.5.0.patchset | 250 ------ dev-util/gertty/patches/gertty-1.6.0.patchset | 847 ++++++++++++++++++ 4 files changed, 942 insertions(+), 325 deletions(-) delete mode 100644 dev-util/gertty/gertty-1.5.0.recipe create mode 100644 dev-util/gertty/gertty-1.6.0.recipe delete mode 100644 dev-util/gertty/patches/gertty-1.5.0.patchset create mode 100644 dev-util/gertty/patches/gertty-1.6.0.patchset diff --git a/dev-util/gertty/gertty-1.5.0.recipe b/dev-util/gertty/gertty-1.5.0.recipe deleted file mode 100644 index 9204adeda..000000000 --- a/dev-util/gertty/gertty-1.5.0.recipe +++ /dev/null @@ -1,75 +0,0 @@ -SUMMARY="Console interface to Gerrit Code Review" -DESCRIPTION="Gertty is a console-based interface to the Gerrit Code Review \ -system. - -As compared to the web interface, the main advantages are: -* Workflow: the interface is designed to support a workflow similar to reading \ -network news or mail. In particular, it is designed to deal with a large \ -number of review requests across a large number of projects. -* Offline Use: Gertty syncs information about changes in subscribed projects \ -to a local database and local git repos. All review operations are performed \ -against that database and then synced back to Gerrit. -* Speed: user actions modify locally cached content and need not wait for \ -server interaction. -* Convenience: because Gertty downloads all changes to local git repos, a \ -single command instructs it to checkout a change into that repo for detailed \ -examination or testing of larger changes." -HOMEPAGE="https://github.com/openstack/gertty" -COPYRIGHT="2014-2018 OpenStack Foundation, Hewlett-Packard Development Company, L.P." -LICENSE="Apache v2" -SOURCE_URI="https://files.pythonhosted.org/packages/67/b2/a19b590919cfc659b64e7dcd21ed8b7d3aa46844227e172c2ffe67d64413/gertty-$portVersion.tar.gz" -CHECKSUM_SHA256="290e4dc688b2f4d6886f0493b861c01a8c0419dd6c49a925fba0b936d3f28b23" -REVISION="2" -PATCHES="gertty-$portVersion.patchset" - -ARCHITECTURES="any" - -PROVIDES=" - gertty = $portVersion - cmd:gertty = $portVersion - " -REQUIRES=" - haiku - cmd:python3 - dateutil_python3 - gitdb_python3 - gitpython_python3 - pbr_python3 - ply_python3 - pypandoc_python3 - six_python3 - smmap_python3 - sqlalchemy_python3 - " - -BUILD_REQUIRES=" - haiku_devel - " - -PYTHON_PACKAGES=(python3) -PYTHON_VERSIONS=(3.7) -for i in "${!PYTHON_PACKAGES[@]}"; do -pythonPackage=${PYTHON_PACKAGES[i]} -pythonVersion=${PYTHON_VERSIONS[$i]} -BUILD_REQUIRES="$BUILD_REQUIRES - setuptools_$pythonPackage" -BUILD_PREREQUIRES="$BUILD_PREREQUIRES - cmd:python$pythonVersion" -done - -INSTALL() -{ - for i in "${!PYTHON_PACKAGES[@]}"; do - pythonPackage=${PYTHON_PACKAGES[i]} - pythonVersion=${PYTHON_VERSIONS[$i]} - - python=python$pythonVersion - installLocation=$prefix/lib/$python/vendor-packages/ - export PYTHONPATH=$installLocation:$PYTHONPATH - mkdir -p $installLocation - rm -rf build - $python setup.py build install \ - --root=/ --prefix=$prefix - done -} - diff --git a/dev-util/gertty/gertty-1.6.0.recipe b/dev-util/gertty/gertty-1.6.0.recipe new file mode 100644 index 000000000..b1edbff9a --- /dev/null +++ b/dev-util/gertty/gertty-1.6.0.recipe @@ -0,0 +1,95 @@ +SUMMARY="A console-based interface to the Gerrit Code Review system" +DESCRIPTION="Gertty is a console-based interface to the Gerrit Code Review system. + +As compared to the web interface, the main advantages are: + + * Workflow -- the interface is designed to support a workflow similar to reading network news or \ +mail. In particular, it is designed to deal with a large number of review requests across a \ +large number of projects. + + * Offline Use -- Gertty syncs information about changes in subscribed projects to a local \ +database and local git repos. All review operations are performed against that database and then \ +synced back to Gerrit. + + * Speed -- user actions modify locally cached content and need not wait for server interaction. + + * Convenience -- because Gertty downloads all changes to local git repos, a single command \ +instructs it to checkout a change into that repo for detailed examination or testing of larger \ +changes." +HOMEPAGE="https://pypi.org/project/gertty/" +COPYRIGHT="2022 The TTY Group" +LICENSE="Apache v2" +REVISION="1" +pypiVersion="13/fa/67165ece7a08f7142bcfda2e5cee145dbda78e003c11924098bfc6efaf0e" +SOURCE_URI="https://files.pythonhosted.org/packages/$pypiVersion/gertty-$portVersion.tar.gz" +CHECKSUM_SHA256="1c3593d2e6ce53bd84b27d6ac92df4a86d8923afd18b4f4f8e2c979f8a6277df" +PATCHES="gertty-$portVersion.patchset" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_PACKAGES=(python3) +PYTHON_VERSIONS=(3.7) +for i in "${!PYTHON_PACKAGES[@]}"; do +pythonPackage=${PYTHON_PACKAGES[i]} +pythonVersion=${PYTHON_VERSIONS[$i]} +eval "PROVIDES_${pythonPackage}=\"\ + ${portName}_$pythonPackage = $portVersion\n\ + cmd:gertty\ + \"; \ +REQUIRES_$pythonPackage=\"\ + haiku\n\ + cmd:python$pythonVersion\n\ + alembic_py_$pythonPackage\n\ + dateutil_$pythonPackage\n\ + gitpython_$pythonPackage\n\ + mako_$pythonPackage\n\ + pbr_$pythonPackage\n\ + ply_$pythonPackage\n\ + pyyaml_$pythonPackage\n\ + requests_$pythonPackage\n\ + sqlalchemy_$pythonPackage\n\ + typing_extentions_$pythonPackage\n\ + urwid_$pythonPackage\n\ + voluptuous_$pythonPackage\ + \"" +BUILD_REQUIRES="$BUILD_REQUIRES + pbr_$pythonPackage + requests_$pythonPackage + setuptools_$pythonPackage + wheel_$pythonPackage" +BUILD_PREREQUIRES="$BUILD_PREREQUIRES + cmd:python$pythonVersion + " +done + +INSTALL() +{ + for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + python=python$pythonVersion + installLocation=$prefix/lib/$python/vendor-packages/ + export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation + rm -rf build + $python setup.py build install \ + --root=/ --prefix=$prefix + + packageEntries $pythonPackage \ + $prefix/lib/python* \ + $prefix/bin \ + $docDir + done +} diff --git a/dev-util/gertty/patches/gertty-1.5.0.patchset b/dev-util/gertty/patches/gertty-1.5.0.patchset deleted file mode 100644 index 788fd3aa0..000000000 --- a/dev-util/gertty/patches/gertty-1.5.0.patchset +++ /dev/null @@ -1,250 +0,0 @@ -From a1d9209b9d917506fe9de37f3477e36fbe12fd13 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Fri, 27 Jul 2018 18:32:09 +0200 -Subject: Put documentation at the right place. - - -diff --git a/PKG-INFO b/PKG-INFO -index 0a11826..60565f4 100644 ---- a/PKG-INFO -+++ b/PKG-INFO -@@ -95,7 +95,7 @@ Description: Gertty - ``~/.gertty.yaml``. Several sample configuration files are included. - You can find them in the examples/ directory of the - `source distribution `_ -- or the share/gertty/examples directory after installation. -+ or the documentation/packages/gertty/examples directory after installation. - - Select one of the sample config files, copy it to ~/.gertty.yaml and - edit as necessary. Search for ``CHANGEME`` to find parameters that -diff --git a/README.rst b/README.rst -index c00b43c..9e9759f 100644 ---- a/README.rst -+++ b/README.rst -@@ -87,7 +87,7 @@ Gertty uses a YAML based configuration file that it looks for at - ``~/.gertty.yaml``. Several sample configuration files are included. - You can find them in the examples/ directory of the - `source distribution `_ --or the share/gertty/examples directory after installation. -+or the documentation/packages/gertty/examples directory after installation. - - Select one of the sample config files, copy it to ~/.gertty.yaml and - edit as necessary. Search for ``CHANGEME`` to find parameters that -diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst -index 56e7718..bcb638a 100644 ---- a/doc/source/configuration.rst -+++ b/doc/source/configuration.rst -@@ -5,7 +5,7 @@ Gertty uses a YAML based configuration file that it looks for at - ``~/.gertty.yaml``. Several sample configuration files are included. - You can find them in the examples/ directory of the - `source distribution `_ --or the share/gertty/examples directory after installation. -+or the documentation/packages/gertty/examples directory after installation. - - Select one of the sample config files, copy it to ~/.gertty.yaml and - edit as necessary. Search for ``CHANGEME`` to find parameters that -diff --git a/gertty.egg-info/PKG-INFO b/gertty.egg-info/PKG-INFO -index 0a11826..60565f4 100644 ---- a/gertty.egg-info/PKG-INFO -+++ b/gertty.egg-info/PKG-INFO -@@ -95,7 +95,7 @@ Description: Gertty - ``~/.gertty.yaml``. Several sample configuration files are included. - You can find them in the examples/ directory of the - `source distribution `_ -- or the share/gertty/examples directory after installation. -+ or the documentation/packages/gertty/examples directory after installation. - - Select one of the sample config files, copy it to ~/.gertty.yaml and - edit as necessary. Search for ``CHANGEME`` to find parameters that -diff --git a/gertty/config.py b/gertty/config.py -index 1c6f94a..e17624a 100644 ---- a/gertty/config.py -+++ b/gertty/config.py -@@ -255,7 +255,7 @@ class Config(object): - return None - - def printSample(self): -- filename = 'share/gertty/examples' -+ filename = 'documentation/packages/gertty/examples' - print("""Gertty requires a configuration file at ~/.gertty.yaml - If the file contains a password then permissions must be set to 0600. - -diff --git a/setup.cfg b/setup.cfg -index 37691b3..3882402 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -22,7 +22,7 @@ keywords = gerrit console urwid review - packages = - gertty - data_files = -- share/gertty/examples = examples/* -+ documentation/packages/gertty/examples = examples/* - - [entry_points] - console_scripts = --- -2.16.4 - - -From 10e815bd16f45bc9a35445303f29f0659384e2bb Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Sun, 12 Aug 2018 14:12:49 +0200 -Subject: Fix config file location. - - -diff --git a/PKG-INFO b/PKG-INFO -index 60565f4..be5f98d 100644 ---- a/PKG-INFO -+++ b/PKG-INFO -@@ -92,12 +92,12 @@ Description: Gertty - pip install . - - Gertty uses a YAML based configuration file that it looks for at -- ``~/.gertty.yaml``. Several sample configuration files are included. -+ ``~/config/settings/gertty.yaml``. Several sample configuration files are included. - You can find them in the examples/ directory of the - `source distribution `_ - or the documentation/packages/gertty/examples directory after installation. - -- Select one of the sample config files, copy it to ~/.gertty.yaml and -+ Select one of the sample config files, copy it to ~/config/settings/gertty.yaml and - edit as necessary. Search for ``CHANGEME`` to find parameters that - need to be supplied. The sample config files are as follows: - -diff --git a/README.rst b/README.rst -index 9e9759f..f044a80 100644 ---- a/README.rst -+++ b/README.rst -@@ -84,12 +84,12 @@ To install from a git checkout:: - pip install . - - Gertty uses a YAML based configuration file that it looks for at --``~/.gertty.yaml``. Several sample configuration files are included. -+``~/config/gertty.yaml``. Several sample configuration files are included. - You can find them in the examples/ directory of the - `source distribution `_ - or the documentation/packages/gertty/examples directory after installation. - --Select one of the sample config files, copy it to ~/.gertty.yaml and -+Select one of the sample config files, copy it to ~/config/gertty.yaml and - edit as necessary. Search for ``CHANGEME`` to find parameters that - need to be supplied. The sample config files are as follows: - -diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst -index bcb638a..6204cb4 100644 ---- a/doc/source/configuration.rst -+++ b/doc/source/configuration.rst -@@ -2,12 +2,12 @@ Configuration - ------------- - - Gertty uses a YAML based configuration file that it looks for at --``~/.gertty.yaml``. Several sample configuration files are included. -+``~/config/settings/gertty.yaml``. Several sample configuration files are included. - You can find them in the examples/ directory of the - `source distribution `_ - or the documentation/packages/gertty/examples directory after installation. - --Select one of the sample config files, copy it to ~/.gertty.yaml and -+Select one of the sample config files, copy it to ~/config/settings/gertty.yaml and - edit as necessary. Search for ``CHANGEME`` to find parameters that - need to be supplied. The sample config files are as follows: - -diff --git a/examples/googlesource-gertty.yaml b/examples/googlesource-gertty.yaml -index 0663e48..eabee65 100644 ---- a/examples/googlesource-gertty.yaml -+++ b/examples/googlesource-gertty.yaml -@@ -1,4 +1,4 @@ --# This is an example ~/.gertty.yaml file for use with installations of -+# This is an example ~/config/settings/gertty.yaml file for use with installations of - # Gerrit running on googlesource.com. Most of these options are not - # required, rather, they customize Gertty to better deal with the - # particulars of Google's Gerrit configuration. -diff --git a/examples/minimal-gertty.yaml b/examples/minimal-gertty.yaml -index c61e943..c46e40d 100644 ---- a/examples/minimal-gertty.yaml -+++ b/examples/minimal-gertty.yaml -@@ -1,4 +1,4 @@ --# This is an example ~/.gertty.yaml file with only the required -+# This is an example ~/config/settings/gertty.yaml file with only the required - # settings. - - # This file does not list all of the available options. For a full -diff --git a/examples/openstack-gertty.yaml b/examples/openstack-gertty.yaml -index 3014bc0..4536a0d 100644 ---- a/examples/openstack-gertty.yaml -+++ b/examples/openstack-gertty.yaml -@@ -1,4 +1,4 @@ --# This is an example ~/.gertty.yaml file for use with OpenStack's -+# This is an example ~/config/settings/gertty.yaml file for use with OpenStack's - # Gerrit. Most of these options are not required, rather, they - # customize Gertty to better deal with the particulars of OpenStack's - # Gerrit configuration. -diff --git a/examples/reference-gertty.yaml b/examples/reference-gertty.yaml -index 83b4e3c..be7d44b 100644 ---- a/examples/reference-gertty.yaml -+++ b/examples/reference-gertty.yaml -@@ -1,4 +1,4 @@ --# This is an example ~/.gertty.yaml with an exhaustive listing of -+# This is an example ~/config/settings/gertty.yaml with an exhaustive listing of - # options with commentary. - - # This section lists the servers that Gertty can talk to. Multiple -diff --git a/gertty.egg-info/PKG-INFO b/gertty.egg-info/PKG-INFO -index 60565f4..9330074 100644 ---- a/gertty.egg-info/PKG-INFO -+++ b/gertty.egg-info/PKG-INFO -@@ -92,12 +92,12 @@ Description: Gertty - pip install . - - Gertty uses a YAML based configuration file that it looks for at -- ``~/.gertty.yaml``. Several sample configuration files are included. -+ ``~/config/gertty.yaml``. Several sample configuration files are included. - You can find them in the examples/ directory of the - `source distribution `_ - or the documentation/packages/gertty/examples directory after installation. - -- Select one of the sample config files, copy it to ~/.gertty.yaml and -+ Select one of the sample config files, copy it to ~/config/gertty.yaml and - edit as necessary. Search for ``CHANGEME`` to find parameters that - need to be supplied. The sample config files are as follows: - -diff --git a/gertty/config.py b/gertty/config.py -index e17624a..2d82b84 100644 ---- a/gertty/config.py -+++ b/gertty/config.py -@@ -35,7 +35,7 @@ try: - except AttributeError: - OrderedDict = ordereddict.OrderedDict - --DEFAULT_CONFIG_PATH='~/.gertty.yaml' -+DEFAULT_CONFIG_PATH='~/config/settings/gertty.yaml' - - class ConfigSchema(object): - server = {v.Required('name'): str, -@@ -256,7 +256,7 @@ class Config(object): - - def printSample(self): - filename = 'documentation/packages/gertty/examples' -- print("""Gertty requires a configuration file at ~/.gertty.yaml -+ print("""Gertty requires a configuration file at ~/config/settings/gertty.yaml - If the file contains a password then permissions must be set to 0600. - - Several sample configuration files were installed with Gertty and are -diff --git a/setup.cfg b/setup.cfg -index 3882402..979a14b 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -23,6 +23,10 @@ packages = - gertty - data_files = - documentation/packages/gertty/examples = examples/* -+package-data = -+ gertty = alembic/versions/* -+ gertty = alembic/*.py alembic/*.mako alembic/README -+ gertty = *.ini - - [entry_points] - console_scripts = --- -2.16.4 - diff --git a/dev-util/gertty/patches/gertty-1.6.0.patchset b/dev-util/gertty/patches/gertty-1.6.0.patchset new file mode 100644 index 000000000..ab99aabd4 --- /dev/null +++ b/dev-util/gertty/patches/gertty-1.6.0.patchset @@ -0,0 +1,847 @@ +From 06c271ef071ef7a91cfb600de1683f83de485dfb Mon Sep 17 00:00:00 2001 +From: begasus +Date: Tue, 5 Jul 2022 13:30:07 +0200 +Subject: Put documentation at the right place. + + +diff --git a/PKG-INFO b/PKG-INFO +index be9b976..1892406 100644 +--- a/PKG-INFO ++++ b/PKG-INFO +@@ -8,118 +8,118 @@ Author-email: openstack-infra@lists.openstack.org + License: UNKNOWN + Description: Gertty + ====== +- ++ + Gertty is a console-based interface to the Gerrit Code Review system. +- ++ + As compared to the web interface, the main advantages are: +- ++ + * Workflow -- the interface is designed to support a workflow similar + to reading network news or mail. In particular, it is designed to + deal with a large number of review requests across a large number + of projects. +- ++ + * Offline Use -- Gertty syncs information about changes in subscribed + projects to a local database and local git repos. All review + operations are performed against that database and then synced back + to Gerrit. +- ++ + * Speed -- user actions modify locally cached content and need not + wait for server interaction. +- ++ + * Convenience -- because Gertty downloads all changes to local git + repos, a single command instructs it to checkout a change into that + repo for detailed examination or testing of larger changes. +- ++ + Installation + ------------ +- ++ + Debian + ~~~~~~ +- ++ + Gertty is packaged in Debian and is currently available in: +- ++ + * unstable + * testing + * stable +- ++ + You can install it with:: +- ++ + apt-get install gertty +- ++ + Fedora + ~~~~~~ +- ++ + Gertty is packaged starting in Fedora 21. You can install it with:: +- ++ + dnf install python-gertty +- ++ + openSUSE + ~~~~~~~~ +- ++ + Gertty is packaged for openSUSE 13.1 onwards. You can install it via + `1-click install from the Open Build Service `_. +- ++ + Gentoo + ~~~~~~ +- ++ + Gertty is available in the main Gentoo repository. You can install it with:: +- ++ + emerge gertty +- ++ + Arch Linux + ~~~~~~~~~~ +- ++ + Gertty packages are available in the Arch User Repository packages. You + can get the package from:: +- ++ + https://aur.archlinux.org/packages/python2-gertty/ +- ++ + Source + ~~~~~~ +- ++ + When installing from source, it is recommended (but not required) to + install Gertty in a virtualenv. To set one up:: +- ++ + virtualenv gertty-env + source gertty-env/bin/activate +- ++ + To install the latest version from the cheeseshop:: +- ++ + pip install gertty +- ++ + To install from a git checkout:: +- ++ + pip install . +- ++ + Gertty uses a YAML based configuration file that it looks for at + ``~/.config/gertty/gertty.yaml``. Several sample configuration files + are included. You can find them in the examples/ directory of the + `source distribution + `_ or +- the share/gertty/examples directory after installation. +- ++ or the documentation/packages/gertty/examples directory after installation. ++ + Select one of the sample config files, copy it to + ~/.config/gertty/gertty.yaml and edit as necessary. Search for + ``CHANGEME`` to find parameters that need to be supplied. The sample + config files are as follows: +- ++ + **minimal-gertty.yaml** + Only contains the parameters required for Gertty to actually run. +- ++ + **reference-gertty.yaml** + An exhaustive list of all supported options with examples. +- ++ + **opendev-gertty.yaml** + A configuration designed for use with OpenDev's installation of + Gerrit. +- ++ + **googlesource-gertty.yaml** + A configuration designed for use with installations of Gerrit + running on googlesource.com. +- ++ + You will need your Gerrit password which you can generate or retrieve + by navigating to ``Settings``, then ``HTTP Password``. +- ++ + Gertty uses local git repositories to perform much of its work. These + can be the same git repositories that you use when developing a + project. Gertty will not alter the working directory or index unless +@@ -127,46 +127,46 @@ Description: Gertty + accidentally losing work remain in place). You will need to supply + the name of a directory where Gertty will find or clone git + repositories for your projects as the ``git-root`` parameter. +- ++ + The config file is designed to support multiple Gerrit instances. The + first one is used by default, but others can be specified by supplying + the name on the command line. +- ++ + Usage + ----- +- ++ + After installing Gertty, you should be able to run it by invoking + ``gertty``. If you installed it in a virtualenv, you can invoke it + without activating the virtualenv with ``/path/to/venv/bin/gertty`` + which you may wish to add to your shell aliases. Use ``gertty + --help`` to see a list of command line options available. +- ++ + Once Gertty is running, you will need to start by subscribing to some + projects. Use 'L' to list all of the projects and then 's' to + subscribe to the ones you are interested in. Hit 'L' again to shrink + the list to your subscribed projects. +- ++ + In general, pressing the F1 key will show help text on any screen, and + ESC will take you to the previous screen. +- ++ + Gertty works seamlessly offline or online. All of the actions that it + performs are first recorded in a local database (in ``~/.gertty.db`` + by default), and are then transmitted to Gerrit. If Gertty is unable + to contact Gerrit for any reason, it will continue to operate against + the local database, and once it re-establishes contact, it will + process any pending changes. +- ++ + The status bar at the top of the screen displays the current number of + outstanding tasks that Gertty must perform in order to be fully up to + date. Some of these tasks are more complicated than others, and some + of them will end up creating new tasks (for instance, one task may be + to search for new changes in a project which will then produce 5 new + tasks if there are 5 new changes). +- ++ + If Gertty is offline, it will so indicate in the status bar. It will + retry requests if needed, and will switch between offline and online + mode automatically. +- ++ + If you review a change while offline with a positive vote, and someone + else leaves a negative vote on that change in the same category before + Gertty is able to upload your review, Gertty will detect the situation +@@ -176,36 +176,36 @@ Description: Gertty + `F12` key by default). When viewing a change, the "held" flag may be + toggled with the exclamation key (`!`). Once held, a change must be + explicitly un-held in this manner for your review to be uploaded. +- ++ + If Gertty encounters an error, this will also be indicated in the + status bar. You may wish to examine ~/.gertty.log to see what the + error was. In many cases, Gertty can continue after encountering an + error. The error flag will be cleared when you leave the current + screen. +- ++ + To select text (e.g., to copy to the clipboard), hold Shift while + selecting the text. +- ++ + MacOS + ~~~~~ +- ++ + The MacOS terminal blocks ctrl+o, which is the default search key combo in + Gertty. To fix this, a custom keymap can be used on MacOS which modifies the + search key combo. For example:: +- ++ + keymaps: + - name: default # MacOS blocks ctrl+o + change-search: 'ctrl s' + interactive-search: 'ctrl i' +- ++ + Terminal Integration + -------------------- +- ++ + If you use rxvt-unicode, you can add something like the following to + ``.Xresources`` to make Gerrit URLs that are displayed in your + terminal (perhaps in an email or irc client) clickable links that open + in Gertty:: +- ++ + URxvt.perl-ext: default,matcher + URxvt.url-launcher: sensible-browser + URxvt.keysym.C-Delete: perl:matcher:last +@@ -213,22 +213,22 @@ Description: Gertty + URxvt.matcher.button: 1 + URxvt.matcher.pattern.1: https:\/\/review.example.org/(\\#\/c\/)?(\\d+)[\w]* + URxvt.matcher.launcher.1: gertty --open $0 +- ++ + You will want to adjust the pattern to match the review site you are + interested in; multiple patterns may be added as needed. +- ++ + Contributing + ------------ +- ++ + For information on how to contribute to Gertty, please see the + contents of the CONTRIBUTING.rst file. +- ++ + Bugs + ---- +- ++ + Bugs are handled at: https://storyboard.openstack.org/#!/project/ttygroup/gertty +- +- ++ ++ + Keywords: gerrit console urwid review + Platform: UNKNOWN + Classifier: Topic :: Utilities +diff --git a/README.rst b/README.rst +index 8717fa1..0de1004 100644 +--- a/README.rst ++++ b/README.rst +@@ -88,7 +88,7 @@ Gertty uses a YAML based configuration file that it looks for at + are included. You can find them in the examples/ directory of the + `source distribution + `_ or +-the share/gertty/examples directory after installation. ++the documentation/packages/gertty/examples directory after installation. + + Select one of the sample config files, copy it to + ~/.config/gertty/gertty.yaml and edit as necessary. Search for +diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst +index f9ba291..2c0c744 100644 +--- a/doc/source/configuration.rst ++++ b/doc/source/configuration.rst +@@ -6,7 +6,7 @@ Gertty uses a YAML based configuration file that it looks for at + are included. You can find them in the examples/ directory of the + `source distribution + `_ or +-the share/gertty/examples directory after installation. ++the documentation/packages/gertty/examples directory after installation. + + Select one of the sample config files, copy it to ~/.config/gertty/gertty.yaml + and edit as necessary. Search for ``CHANGEME`` to find parameters that need to +diff --git a/gertty.egg-info/PKG-INFO b/gertty.egg-info/PKG-INFO +index be9b976..560c155 100644 +--- a/gertty.egg-info/PKG-INFO ++++ b/gertty.egg-info/PKG-INFO +@@ -8,118 +8,118 @@ Author-email: openstack-infra@lists.openstack.org + License: UNKNOWN + Description: Gertty + ====== +- ++ + Gertty is a console-based interface to the Gerrit Code Review system. +- ++ + As compared to the web interface, the main advantages are: +- ++ + * Workflow -- the interface is designed to support a workflow similar + to reading network news or mail. In particular, it is designed to + deal with a large number of review requests across a large number + of projects. +- ++ + * Offline Use -- Gertty syncs information about changes in subscribed + projects to a local database and local git repos. All review + operations are performed against that database and then synced back + to Gerrit. +- ++ + * Speed -- user actions modify locally cached content and need not + wait for server interaction. +- ++ + * Convenience -- because Gertty downloads all changes to local git + repos, a single command instructs it to checkout a change into that + repo for detailed examination or testing of larger changes. +- ++ + Installation + ------------ +- ++ + Debian + ~~~~~~ +- ++ + Gertty is packaged in Debian and is currently available in: +- ++ + * unstable + * testing + * stable +- ++ + You can install it with:: +- ++ + apt-get install gertty +- ++ + Fedora + ~~~~~~ +- ++ + Gertty is packaged starting in Fedora 21. You can install it with:: +- ++ + dnf install python-gertty +- ++ + openSUSE + ~~~~~~~~ +- ++ + Gertty is packaged for openSUSE 13.1 onwards. You can install it via + `1-click install from the Open Build Service `_. +- ++ + Gentoo + ~~~~~~ +- ++ + Gertty is available in the main Gentoo repository. You can install it with:: +- ++ + emerge gertty +- ++ + Arch Linux + ~~~~~~~~~~ +- ++ + Gertty packages are available in the Arch User Repository packages. You + can get the package from:: +- ++ + https://aur.archlinux.org/packages/python2-gertty/ +- ++ + Source + ~~~~~~ +- ++ + When installing from source, it is recommended (but not required) to + install Gertty in a virtualenv. To set one up:: +- ++ + virtualenv gertty-env + source gertty-env/bin/activate +- ++ + To install the latest version from the cheeseshop:: +- ++ + pip install gertty +- ++ + To install from a git checkout:: +- ++ + pip install . +- ++ + Gertty uses a YAML based configuration file that it looks for at + ``~/.config/gertty/gertty.yaml``. Several sample configuration files + are included. You can find them in the examples/ directory of the + `source distribution + `_ or +- the share/gertty/examples directory after installation. +- ++ the documentation/packages/gertty/examples directory after installation. ++ + Select one of the sample config files, copy it to + ~/.config/gertty/gertty.yaml and edit as necessary. Search for + ``CHANGEME`` to find parameters that need to be supplied. The sample + config files are as follows: +- ++ + **minimal-gertty.yaml** + Only contains the parameters required for Gertty to actually run. +- ++ + **reference-gertty.yaml** + An exhaustive list of all supported options with examples. +- ++ + **opendev-gertty.yaml** + A configuration designed for use with OpenDev's installation of + Gerrit. +- ++ + **googlesource-gertty.yaml** + A configuration designed for use with installations of Gerrit + running on googlesource.com. +- ++ + You will need your Gerrit password which you can generate or retrieve + by navigating to ``Settings``, then ``HTTP Password``. +- ++ + Gertty uses local git repositories to perform much of its work. These + can be the same git repositories that you use when developing a + project. Gertty will not alter the working directory or index unless +@@ -127,46 +127,46 @@ Description: Gertty + accidentally losing work remain in place). You will need to supply + the name of a directory where Gertty will find or clone git + repositories for your projects as the ``git-root`` parameter. +- ++ + The config file is designed to support multiple Gerrit instances. The + first one is used by default, but others can be specified by supplying + the name on the command line. +- ++ + Usage + ----- +- ++ + After installing Gertty, you should be able to run it by invoking + ``gertty``. If you installed it in a virtualenv, you can invoke it + without activating the virtualenv with ``/path/to/venv/bin/gertty`` + which you may wish to add to your shell aliases. Use ``gertty + --help`` to see a list of command line options available. +- ++ + Once Gertty is running, you will need to start by subscribing to some + projects. Use 'L' to list all of the projects and then 's' to + subscribe to the ones you are interested in. Hit 'L' again to shrink + the list to your subscribed projects. +- ++ + In general, pressing the F1 key will show help text on any screen, and + ESC will take you to the previous screen. +- ++ + Gertty works seamlessly offline or online. All of the actions that it + performs are first recorded in a local database (in ``~/.gertty.db`` + by default), and are then transmitted to Gerrit. If Gertty is unable + to contact Gerrit for any reason, it will continue to operate against + the local database, and once it re-establishes contact, it will + process any pending changes. +- ++ + The status bar at the top of the screen displays the current number of + outstanding tasks that Gertty must perform in order to be fully up to + date. Some of these tasks are more complicated than others, and some + of them will end up creating new tasks (for instance, one task may be + to search for new changes in a project which will then produce 5 new + tasks if there are 5 new changes). +- ++ + If Gertty is offline, it will so indicate in the status bar. It will + retry requests if needed, and will switch between offline and online + mode automatically. +- ++ + If you review a change while offline with a positive vote, and someone + else leaves a negative vote on that change in the same category before + Gertty is able to upload your review, Gertty will detect the situation +@@ -176,36 +176,36 @@ Description: Gertty + `F12` key by default). When viewing a change, the "held" flag may be + toggled with the exclamation key (`!`). Once held, a change must be + explicitly un-held in this manner for your review to be uploaded. +- ++ + If Gertty encounters an error, this will also be indicated in the + status bar. You may wish to examine ~/.gertty.log to see what the + error was. In many cases, Gertty can continue after encountering an + error. The error flag will be cleared when you leave the current + screen. +- ++ + To select text (e.g., to copy to the clipboard), hold Shift while + selecting the text. +- ++ + MacOS + ~~~~~ +- ++ + The MacOS terminal blocks ctrl+o, which is the default search key combo in + Gertty. To fix this, a custom keymap can be used on MacOS which modifies the + search key combo. For example:: +- ++ + keymaps: + - name: default # MacOS blocks ctrl+o + change-search: 'ctrl s' + interactive-search: 'ctrl i' +- ++ + Terminal Integration + -------------------- +- ++ + If you use rxvt-unicode, you can add something like the following to + ``.Xresources`` to make Gerrit URLs that are displayed in your + terminal (perhaps in an email or irc client) clickable links that open + in Gertty:: +- ++ + URxvt.perl-ext: default,matcher + URxvt.url-launcher: sensible-browser + URxvt.keysym.C-Delete: perl:matcher:last +@@ -213,22 +213,22 @@ Description: Gertty + URxvt.matcher.button: 1 + URxvt.matcher.pattern.1: https:\/\/review.example.org/(\\#\/c\/)?(\\d+)[\w]* + URxvt.matcher.launcher.1: gertty --open $0 +- ++ + You will want to adjust the pattern to match the review site you are + interested in; multiple patterns may be added as needed. +- ++ + Contributing + ------------ +- ++ + For information on how to contribute to Gertty, please see the + contents of the CONTRIBUTING.rst file. +- ++ + Bugs + ---- +- ++ + Bugs are handled at: https://storyboard.openstack.org/#!/project/ttygroup/gertty +- +- ++ ++ + Keywords: gerrit console urwid review + Platform: UNKNOWN + Classifier: Topic :: Utilities +diff --git a/gertty/config.py b/gertty/config.py +index 4f38d14..1a33a2d 100644 +--- a/gertty/config.py ++++ b/gertty/config.py +@@ -281,7 +281,7 @@ class Config(object): + return None + + def printSample(self): +- filename = 'share/gertty/examples' ++ filename = 'documentation/packages/gertty/examples' + print("""Gertty requires a configuration file at ~/.gertty.yaml + If the file contains a password then permissions must be set to 0600. + +diff --git a/setup.cfg b/setup.cfg +index 0879e81..25952d5 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -1,12 +1,12 @@ + [metadata] + name = gertty + summary = Gertty is a console-based interface to the Gerrit Code Review system. +-description-file = ++description-file = + README.rst + author = The TTY Group + author-email = openstack-infra@lists.openstack.org + home-page = http://ttygroup.org/ +-classifier = ++classifier = + Topic :: Utilities + Intended Audience :: Developers + Intended Audience :: Information Technology +@@ -19,16 +19,16 @@ classifier = + keywords = gerrit console urwid review + + [files] +-packages = ++packages = + gertty +-data_files = +- share/gertty/examples = examples/* ++data_files = ++ documentation/packages/gertty/examples = examples/* + + [entry_points] +-console_scripts = ++console_scripts = + gertty = gertty.app:main + + [egg_info] +-tag_build = ++tag_build = + tag_date = 0 + +-- +2.36.1 + + +From 7067333ec2e70a91ddf83d1bb3a5adc9fa0cd3e6 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Tue, 5 Jul 2022 13:47:02 +0200 +Subject: Fix config file location. + +Co-authored-by: Adrien Destugues + +diff --git a/PKG-INFO b/PKG-INFO +index 1892406..4098449 100644 +--- a/PKG-INFO ++++ b/PKG-INFO +@@ -92,14 +92,14 @@ Description: Gertty + pip install . + + Gertty uses a YAML based configuration file that it looks for at +- ``~/.config/gertty/gertty.yaml``. Several sample configuration files ++ ``~/config/settings/gertty.yaml``. Several sample configuration files are included. + are included. You can find them in the examples/ directory of the + `source distribution + `_ or + or the documentation/packages/gertty/examples directory after installation. + + Select one of the sample config files, copy it to +- ~/.config/gertty/gertty.yaml and edit as necessary. Search for ++ ~/config/settings/gertty.yaml and edit as necessary. Search for + ``CHANGEME`` to find parameters that need to be supplied. The sample + config files are as follows: + +diff --git a/README.rst b/README.rst +index 0de1004..71c706f 100644 +--- a/README.rst ++++ b/README.rst +@@ -84,14 +84,14 @@ To install from a git checkout:: + pip install . + + Gertty uses a YAML based configuration file that it looks for at +-``~/.config/gertty/gertty.yaml``. Several sample configuration files ++``~/config/settings/gertty.yaml``. Several sample configuration files + are included. You can find them in the examples/ directory of the + `source distribution + `_ or + the documentation/packages/gertty/examples directory after installation. + + Select one of the sample config files, copy it to +-~/.config/gertty/gertty.yaml and edit as necessary. Search for ++~/config/settings/gertty.yaml and edit as necessary. Search for + ``CHANGEME`` to find parameters that need to be supplied. The sample + config files are as follows: + +diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst +index 2c0c744..e0c6780 100644 +--- a/doc/source/configuration.rst ++++ b/doc/source/configuration.rst +@@ -2,13 +2,13 @@ Configuration + ------------- + + Gertty uses a YAML based configuration file that it looks for at +-``~/.config/gertty/gertty.yaml``. Several sample configuration files ++``~/config/settings/gertty.yaml``. Several sample configuration files + are included. You can find them in the examples/ directory of the + `source distribution + `_ or + the documentation/packages/gertty/examples directory after installation. + +-Select one of the sample config files, copy it to ~/.config/gertty/gertty.yaml ++Select one of the sample config files, copy it to ~/config/settings/gertty.yaml + and edit as necessary. Search for ``CHANGEME`` to find parameters that need to + be supplied. The sample config files are as follows: + +diff --git a/examples/googlesource-gertty.yaml b/examples/googlesource-gertty.yaml +index c749cab..2932dec 100644 +--- a/examples/googlesource-gertty.yaml ++++ b/examples/googlesource-gertty.yaml +@@ -1,4 +1,4 @@ +-# This is an example ~/.config/gertty/gertty.yaml file for use with ++# This is an example ~/config/settings/gertty.yaml file for use with + # installations of Gerrit running on googlesource.com. Most of these options + # are not required, rather, they customize Gertty to better deal with the + # particulars of Google's Gerrit configuration. +diff --git a/examples/minimal-gertty.yaml b/examples/minimal-gertty.yaml +index 22a9aa3..c46e40d 100644 +--- a/examples/minimal-gertty.yaml ++++ b/examples/minimal-gertty.yaml +@@ -1,4 +1,4 @@ +-# This is an example ~/.config/gertty/gertty.yaml file with only the required ++# This is an example ~/config/settings/gertty.yaml file with only the required + # settings. + + # This file does not list all of the available options. For a full +diff --git a/examples/opendev-gertty.yaml b/examples/opendev-gertty.yaml +index 33fc67e..7beb700 100644 +--- a/examples/opendev-gertty.yaml ++++ b/examples/opendev-gertty.yaml +@@ -1,4 +1,4 @@ +-# This is an example ~/.config/gertty/gertty.yaml file for use with ++# This is an example ~/config/settings/gertty.yaml file for use with + # OpenDev's Gerrit. Most of these options are not required, rather, + # they customize Gertty to better deal with the particulars of + # OpenDev's Gerrit configuration. +diff --git a/examples/rdo-gertty.yaml b/examples/rdo-gertty.yaml +index 3e8c69f..4be47ce 100644 +--- a/examples/rdo-gertty.yaml ++++ b/examples/rdo-gertty.yaml +@@ -1,4 +1,4 @@ +-# This is an example ~/.config/gertty/gertty.yaml file for use with ++# This is an example ~/config/settings/gertty.yaml file for use with + # RDO's Gerrit. Most of these options are not required, rather, they + # customize Gertty to better deal with the particulars of RDO's Gerrit + # configuration. +diff --git a/examples/reference-gertty.yaml b/examples/reference-gertty.yaml +index b6f65b7..75ed86b 100644 +--- a/examples/reference-gertty.yaml ++++ b/examples/reference-gertty.yaml +@@ -1,4 +1,4 @@ +-# This is an example ~/.config/gertty/gertty.yaml with an exhaustive listing of ++# This is an example ~/config/settings/gertty.yaml with an exhaustive listing of + # options with commentary. + + # This section lists the servers that Gertty can talk to. Multiple +diff --git a/gertty.egg-info/PKG-INFO b/gertty.egg-info/PKG-INFO +index 560c155..ad2f072 100644 +--- a/gertty.egg-info/PKG-INFO ++++ b/gertty.egg-info/PKG-INFO +@@ -92,14 +92,14 @@ Description: Gertty + pip install . + + Gertty uses a YAML based configuration file that it looks for at +- ``~/.config/gertty/gertty.yaml``. Several sample configuration files ++ ``~/config/settings/gertty.yaml``. Several sample configuration files + are included. You can find them in the examples/ directory of the + `source distribution + `_ or + the documentation/packages/gertty/examples directory after installation. + + Select one of the sample config files, copy it to +- ~/.config/gertty/gertty.yaml and edit as necessary. Search for ++ ~/config/settings/gertty.yaml and edit as necessary. Search for + ``CHANGEME`` to find parameters that need to be supplied. The sample + config files are as follows: + +diff --git a/gertty/config.py b/gertty/config.py +index 1a33a2d..21348f0 100644 +--- a/gertty/config.py ++++ b/gertty/config.py +@@ -282,7 +282,7 @@ class Config(object): + + def printSample(self): + filename = 'documentation/packages/gertty/examples' +- print("""Gertty requires a configuration file at ~/.gertty.yaml ++ print("""Gertty requires a configuration file at ~/config/settings/gertty.yaml + If the file contains a password then permissions must be set to 0600. + + Several sample configuration files were installed with Gertty and are +diff --git a/setup.cfg b/setup.cfg +index 25952d5..634ce27 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -23,6 +23,10 @@ packages = + gertty + data_files = + documentation/packages/gertty/examples = examples/* ++package-data = ++ gertty = alembic/versions/* ++ gertty = alembic/*.py alembic/*.mako alembic/README ++ gertty = *.ini + + [entry_points] + console_scripts = +-- +2.36.1 +