aboutsummaryrefslogtreecommitdiff
path: root/tools
Commit message (Expand)AuthorAge
* Python 3.8 support•••Enable Python 3.8 in our tests and list it as a supported version. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Daniel Axtens <dja@axtens.net> Andrew Donnellan2019-10-24
* docker: Require GID also•••If you don't do this, created files end up with a group of 'gcc' or whatever group has an ID of 1000. Signed-off-by: Stephen Finucane <stephen@that.guru> Stephen Finucane2019-10-17
* docker: Rely on caching•••It seems less likely that tox and tox-pyenv will change than our requirements. Split up the 'RUN' steps so we don't have to reinstall the former every time the latter change. Signed-off-by: Stephen Finucane <stephen@that.guru> Stephen Finucane2019-10-17
* docker: Use pyenv for Python versions•••This is slightly slower to initially configure but requires less hacking to get the same environment and should be a lot more maintainable (just a simple modification to change the Python version). Signed-off-by: Stephen Finucane <stephen@that.guru> Stephen Finucane2019-09-08
* docker: Simplify MySQL reset•••Just use the hardcoded configuration. Signed-off-by: Stephen Finucane <stephen@that.guru> Stephen Finucane2019-09-08
* Drop support for Python 3.4, add Python 3.7•••It's no longer supported upstream and the *second* last Ubuntu LTS release provides something newer. Time to move on. Signed-off-by: Stephen Finucane <stephen@that.guru> Stephen Finucane2019-09-08
* docker: *Actually* don't require rebuilding if unnecessary•••Because we were using 'set -e', we were erroring out as soon as something - a diff in this case - failed. Temporarily disable it for this one check. Signed-off-by: Stephen Finucane <stephen@that.guru> Fixes: 0b5b4e8c ("docker: Don't require rebuilding if unnecessary") Cc: Daniel Axtens <dja@axtens.net> Signed-off-by: Daniel Axtens <dja@axtens.net> Stephen Finucane2019-08-21
* Remove pwclient•••Let's start managing this via a separate project, which will allow the client to evolve separately from the server. No redirect is added for the old '/pwclient' URL as it seems wiser to return a HTTP 404 error code. Signed-off-by: Stephen Finucane <stephen@that.guru> Stephen Finucane2019-06-17
* docker: Use Ubuntu ports repositories on non-x86 architectures•••This should allow Patchwork to run "out of the box" in Docker on any architecture with a) an Ubuntu port and b) support in the Postgres multiarch Docker image, which includes at least arm64 and ppc64le. It's a little gross hacking the Dockerfile like this, but I'm not sure there's a more elegant way to do it. Unfortunately it doesn't seem like there's any way to do conditional COPY, and anything in RUN is plain /bin/sh, so that's why it looks like it does. Tested on ppc64le and on x86_64. Signed-off-by: Russell Currey <ruscur@russell.cc> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Daniel Axtens <dja@axtens.net> Russell Currey2019-05-03
* docker: Install libpq-dev to fix psycopg2-binary build•••psycopg2-binary fails if pg_config isn't installed, which is provided by libpq-dev. This seems strange to me since psycopg2-binary suggests that you use psycopg2-binary instead (of itself) if you don't want to build psycopg2 so you wouldn't need pg_config, which is very confusing. It's possible that psycopg2-binary only needs to compile itself on non-x86 platforms, since I hit this on ppc64le. Anyway, it works when this is added. Signed-off-by: Russell Currey <ruscur@russell.cc> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Daniel Axtens <dja@axtens.net> Russell Currey2019-05-03
* Update license header•••The FSF has a new address since 2005 that hasn't been noted in any file except the COPYING file. Rather than fix these, simply remove the headers in favour of a SPDX license header. IANAL but the combination of the header and the COPYING file in source should resolve this issue. Note that copyright notices are retained. Signed-off-by: Stephen Finucane <stephen@that.guru> Closes: #210 Reviewed-by: Veronika Kabatova <vkabatov@redhat.com> Stephen Finucane2018-09-19
* docker: Use heredocs where possible•••This was suggested in a recent review [1]. Make it happen. [1] http://patchwork.ozlabs.org/patch/933979/#1941584 Signed-off-by: Stephen Finucane <stephen@that.guru> Suggested-by: Petr Vorel <petr.vorel@gmail.com> Reviewed-by: Petr Vorel <pvorel@suse.cz> Stephen Finucane2018-08-30
* docker: Don't require rebuilding if unnecessary•••Now that we're pinning versions, we're going to see more frequent dependency version changes. Requiring a rebuild after every one of these is tiresome so don't force it and instead display a helpful message merely suggesting that a rebuild may be necessary. Signed-off-by: Stephen Finucane <stephen@that.guru> Cc: Daniel Axtens <dja@axtens.net> Acked-by: Daniel Axtens <dja@axtens.net> [dja: we're not currently pinning versions because I dropped that patch as it broke postgres. But this can stay - sfin has been asking for it for ages.] Signed-off-by: Daniel Axtens <dja@axtens.net> Stephen Finucane2018-08-26
* docker: Bump to bionic•••As noted in commit 94dd1d411, we can and should start using Bionic once it's out. This is now the case. Signed-off-by: Stephen Finucane <stephen@that.guru> Stephen Finucane2018-04-26
* docker-compose: Switch to 3.0 syntax•••Ubuntu 18.04 (Bionic Beaver) providers 'docker-compose' 1.17.1 [1] at release which supports the 3.0 syntax [2]. Using this allows some users (me) to resolve a long standing issue caused by a UID that's not 1000. [1] https://packages.ubuntu.com/bionic/docker-compose [2] https://docs.docker.com/compose/compose-file/ Signed-off-by: Stephen Finucane <stephen@that.guru> Stephen Finucane2018-04-26
* docker: Remove bash aliases•••These seem to be a hangover from the Vagrant days. I don't personally use them anymore and I'm not sure anyone else does. I think they can go. Signed-off-by: Stephen Finucane <stephen@that.guru> Cc: Daniel Axtens <dja@axtens.net> Stephen Finucane2018-04-26
* tests: Remove Selenium tests•••These were added quite some time ago in order to allow some level of UI testing. However, I've personally never used them, they're not used by the CI, and no one has shown any desire in extending them in their time here. It is time to bid these tests adieu. Removing these allows us to remove a whole load of wiring that existed just to enable these. Some of this, like the '--quick-tox' option for the Dockerfile, is retained so we don't need to use different commands for various versions of Patchwork, but the majority is just stripped out. Signed-off-by: Stephen Finucane <stephen@that.guru> Cc: Daniel Axtens <dja@axtens.net> Stephen Finucane2018-04-26
* docker: Replace tabs with spaces•••Maintain your chill, people. Signed-off-by: Stephen Finucane <stephen@that.guru> Stephen Finucane2018-04-26
* docker: set timezone to Australia/Canberra•••The tzinfo package isn't installed in docker, which makes the default timezone UTC. This is unfortunate: the Django TZ in settings/base.py is Australia/Canberra, and having a non-UTC TZ is good for exposing faulty assumptions about what is and isn't UTC. Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Stephen Finucane <stephen@that.guru> Daniel Axtens2018-04-05
* tools: drop vagrant•••It served us well, but it's now outdated (Trusty, Python 3.4, etc) There is no indication that anyone uses it or keeps it up to date. Signed-off-by: Daniel Axtens <dja@axtens.net> Acked-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Daniel Axtens2018-02-27
* docker: add Python3.6 to image•••This is needed to support py3.6-django111 in tox - otherwise tox fails. Python3.6 is not in Xenial, so this - irritatingly - requires pulling in either a PPA, or the package from Artful. PPAs are icky, so pull it in from Artful. We can either add an Artful repo (like we do for Trusty to pull in python3.4), or move the image to Artful and add in the Xenial repo to get python3.5. It's more efficient to move the entire image to Artful and pull in 3.5 from Xenial - otherwise most packages get downloaded from Artful anyway. It does mean we're going to need to move again to Bionic in a few months, but we'll just have to deal. Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Stephen Finucane <stephen@that.guru> Daniel Axtens2018-01-26
* post-receive.hook: Handle failure to find patch number•••When pwclient info -h fails to come up with the number for the change in question it will exit with a non-zero exit code. This failure will propagate upwards and exit the script there. Make our call to get_patch_id or in true so that our script here will see an empty id and we continue on with the list. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Stephen Finucane <stephen@that.guru> Tom Rini2018-01-04
* Support testing with PostgreSQL•••This allows us to easily test against PostgreSQL using the same tooling we normally use. This is helpful in (for example) shaking out the test failures that were observed on ozlabs.org To use it: docker-compose -f docker-compose-pg.yml <usual argument> (You may find in necessary to do a 'docker-compose down' first, depending on what state the system is in and what command you're running.) Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Stephen Finucane <stephen@that.guru> Daniel Axtens2017-10-28
* Simplify docker-compose MySQL setup•••This moves the config from a separate Dockerfile to something integrated into the docker-compose.yml file. Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Stephen Finucane <stephen@that.guru> Daniel Axtens2017-10-28
* docker: pass additional args to manage.py test•••Signed-off-by: Sean Farley <sean@farley.io> Reviewed-by: Stephen Finucane <stephen@that.guru> Sean Farley2017-07-12
* docker: increase database connection timeout•••When starting the Docker environment, if the web container can't see the database immediately, it waits 5 seconds, tries again, then waits 15 seconds more to account for first-time start-ups where it takes a bit longer for the database to be initialised. Some of us, unfortunately, have slow computers with slow mechanical hard drives which take just a bit longer. Increase the second timeout from 15 seconds to 60 seconds, testing every 5 seconds. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Acked-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Stephen Finucane <stephen@that.guru> Andrew Donnellan2017-05-26
* templates: Add Patchwork version•••This is managed using a combination of hardcoded string, for installations from tarball, and 'git describe', for installations from a Git repo. This includes installing Git in the Docker environment, to enable this in the development environment. Signed-off-by: Stephen Finucane <stephen@that.guru> Acked-by: Daniel Axtens <dja@axtens.net> Stephen Finucane2017-03-01
* trivial: Standardize variable naming in scripts•••Just so we can interact with them as expected. Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Daniel Axtens <dja@axtens.net> Stephen Finucane2017-02-06
* tools: Run scripts through shellcheck•••This mostly results in the addition of quotes to prevent globbing. Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Daniel Axtens <dja@axtens.net> Stephen Finucane2017-02-06
* tools: Update to use 'hasher'•••The old 'parser' module used to extract diffs from their surrounding mbox fluff before hashing this. Seeing as this was only used in the context of an actual git repo, avoid all of that rigmarole by just using 'git diff', which produces a plain diff, rather than 'git show'. Signed-off-by: Stephen Finucane <stephen@that.guru> Tested-by: Tom Rini <trini@konsulko.com> Closes-bug: #63 Stephen Finucane2016-12-01
* tools: Trivial formatting fixes•••These tools are currently broken, but before beginning surgery let's clean things up. Use standard 4 spaces and the longer, but easier to read, if-else-fi syntax for comparison. Missing license headers are added for completeness sake. Signed-off-by: Stephen Finucane <stephen@that.guru> Tested-by: Tom Rini <trini@konsulko.com> Stephen Finucane2016-12-01
* docker: Install dependencies for Python 2 also•••Aspects of both Patchwork and Django, such as the 'makemigrations' management command, function differently under Python 3. It should be possible to run these commands under Python 2. Install dependencies in the Python 2 environment to make this a possibility. Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com> Acked-by: Daniel Axtens <dja@axtens.net> Stephen Finucane2016-09-20
* docker: Install Python 3.4•••Currently, we tox test against Python 3.4. Python 3.4 is included with Ubuntu 14.04, which is supported for several years to come, so we want to keep supporting it. However, Python 3.4 isn't included with Ubuntu 16.04, which is what the Docker image is based on. We could downgrade the container to 14.04, but then we'd struggle to get Python 3.5 into the container. Python 3.5 is the most recent in the Python 3 series, so we should also be supporting it. Add the apt sources for Trusty and pull in Python 3.4 from there. Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com> Daniel Axtens2016-09-01
* docs: Update readthedocs URLs•••'readthedocs.io' is preferred to 'readthedocs.org'. Update all relevant links. Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com> Stephen Finucane2016-09-01
* docs: Document SELinux issues•••Initial Docker setup caused me some heartache on Fedora. Briefly document the issues encountered to help other users. Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com> Reviewed-by: Daniel Axtens <dja@axtens.net> Stephen Finucane2016-09-01
* docker: Move 'docker' directory to 'tools'•••...like the Vagrant scripts (which have been renamed also). Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com> Acked-by: Daniel Axtens <dja@axtens.net> Stephen Finucane2016-09-01
* post-receive: Use correct default installation path•••The documentation recommends to use /opt/patchwork instead of /srv/patchwork since version 1.1. This change should be reflected in the PWDIR variable of the post-receive hook. Signed-off-by: Sven Eckelmann <sven@narfation.org> Reviewed-by: Stephen Finucane <stephen.finucane@intel.com> Sven Eckelmann2016-05-09
* post-receive.hook: rename detection•••patches which descripes renamed files show different hashes with git show and pwclient. Use git show -C (Detect copies as well as renames.) Signed-off-by: Jan Remmet <j.remmet@phytec.de> Reviewed-by: Stephen Finucane <stephen.finucane@intel.com> Jan Remmet2016-05-09
* tools: Use 'Patchwork' consistently•••The docs referred to both 'patchwork' and 'Patchwork'. Use the title case variant consistently. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com> Stephen Finucane2016-03-29
* docs: Refer to fixtures by name, not path•••It's not necessary to use paths for fixtures, so update the docs and Vagrant install scripts to remove these. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com> Stephen Finucane2016-03-13
* vagrant: Add Vagrant-based development environment•••Integrate Vagrant by way of a Vagrantfile and a simple install script. This follows many of the instructions found in the development guide with the exceptions of the superuser creation, which is optional, the loading of archives, which requires per-user authentication, and the use of virtual environments, which are unnecessary in a teardown environment such as this. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com> Stephen Finucane2016-02-10
* Move to a more recent django project structure•••This change updates patchwor to the newer project struture: we've moved the actual application out of the apps/ directory, and the patchwork-specific templates to under the patchwork application. This gives us the manage.py script in the top-level now. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2015-05-27
* post-receive: exclude commits from the patch update step•••When merging upstream work related to other projects into your own project repository, you probably don't want to check for (and try to update) the status on every change-set in the merge. So add a list of references (branches, tags, commits, etc.) whose commits should be ignored in the patch update step. This could be used, for example, to set: EXCLUDE="refs/heads/upstream" Then when you're ready to merge in new upstream code, you first update the 'upstream' branch before pushing your own. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Brian Norris2014-07-24
* post-receive: Fix error message when pushing to an unmapped branch•••Previously, if STATE_MAP contained only refs/heads/master and a user pushed to a branch such as refs/heads/stable, the hook emitted a misleading error message: E: no mapping for refname refs/heads/master Fix this by correctly printing the reference being looked for, rather than the reference most recently found in STATE_MAP. Also, reword the message slightly to point the user to STATE_MAP and to use an actual word "branch" instead of the non-word "refname". Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Carl Worth2014-01-29
* Make the post-receive hook more efficient (using pwclient info, not view)•••Older versions of patchwork shipped with a version of pwclient that had the view command, but not info command. Now that info exists, it's inefficient to use it to obtain the patchwork ID value, (since it requires the server to send the entire patch content in response to an XML RPC request). So be kind to the server by using info instead, (which has a small, fixed-length response). Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Carl Worth2014-01-29
* tools/post-receive.hook: don't update the previously pushed commit•••Previously, the post-receive hook would always examine one commit that had been previously pushed, (when the purpose of the hook is only to example newly-pushed commits). We fix this by simply dropping the '^' in the commit-range specification. Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Carl Worth2014-01-29
* patchwork-update-commits: add missing `update` to command line•••Otherwise the following error is shown: Too many arguments specified Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Paul Menzel2011-03-30
* patchwork-update-commits: autodetect patchwork install directory•••Make patchwork-update-commits work from outside the Patchwork git repository so it can be used for other projects. Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Sascha Silbe2011-02-28
* tools: add simple patchwork-update-commits script•••Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2010-08-10
* tools: Update license for post-receive hook.•••Martin has allowed distribution under the GPL. http://lists.ozlabs.org/pipermail/patchwork/2010-June/000263.html Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Jeremy Kerr2010-08-10