[PATCH] Fetch Transifex image from https://www.transifex.com

2020-12-28 Thread Lukas Fleischer
Fixes GitLab issue #3. Signed-off-by: Lukas Fleischer --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f7285a5..77f3b13 100644 --- a/README.md +++ b/README.md @@ -45,4 +45,4 @@ Translations Translations are welcome via our Transifex

[PATCH] .gitignore: add test/trash directory*

2020-12-28 Thread Lukas Fleischer
Signed-off-by: Lukas Fleischer --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7c9fa60..4d961d1 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ aur.git/ __pycache__/ *.py[cod] test/test-results/ +test/trash directory* schema/aur

Re: Highlight orphaned packages in table (Marcus Andersson)

2020-09-22 Thread Lukas Fleischer
On Tue, 22 Sep 2020 at 09:35:34, wrote: > Yes, exactly, changing the font color to red of the word "orphan". I > think that the background color can stay the same, it will be easy > enough to differentiate an orphaned package from a maintained one if > the text color is different. Yes,

Re: Highlight orphaned packages in table

2020-09-21 Thread Lukas Fleischer
Hi Marcus, Sorry, this somehow fell through the cracks. I like the idea in general. Do you have something more specific in mind? What would the highlighted entry look like? Red text color for the word "orphan"? Best, Lukas

[PATCH v2] pkg_search_page: Limit number of results on package search

2020-09-05 Thread Lukas Fleischer
on the following: * 250 hits per page max * 10 pages We can maybe consider having it lower, but it seems easier to just have this a multiple of 250 in the first iteration. Signed-off-by: Morten Linderud Signed-off-by: Lukas Fleischer --- web/lib/pkgfuncs.inc.php | 7 +++ 1 file changed

[PATCH] Deliver emails to Cc in smtplib code path

2020-08-27 Thread Lukas Fleischer
When using the sendmail() function with smtplib.SMTP or smtplib.SMTP_SSL, the list of actual recipients for the email (to be translated to RCPT commands) has to be provided as a parameter. Update the notification script and add all Cc recipients to that parameter. Signed-off-by: Lukas Fleischer

Re: [PATCH 1/4] spawn: expand AUR_CONFIG to the full path

2020-08-13 Thread Lukas Fleischer
On Thu, 13 Aug 2020 at 10:45:58, Filipe Laíns wrote: > This allows using a relative path for the config. PHP didn't play well > with it. > > Signed-off-by: Filipe Laíns > --- > aurweb/spawn.py | 4 > 1 file changed, 4 insertions(+) Merged into pu (with a typo fix for the commit message of

Re: [PATCH] Redirect to referer after SSO login

2020-08-02 Thread Lukas Fleischer
On Wed, 29 Jul 2020 at 11:25:44, Frédéric Mangano-Tarumi wrote: > Introduce a `redirect` query argument to SSO login endpoints so that > users are redirected to the page they were originally on when they > clicked the Login link. > --- > aurweb/routers/sso.py | 23 +-- >

Re: [PATCH] Remove the per-user session limit

2020-08-02 Thread Lukas Fleischer
On Wed, 29 Jul 2020 at 07:46:10, Frédéric Mangano-Tarumi wrote: > This feature was originally introduced by > f961ffd9c7f2d3d51d3e3b060990a4fef9e56c1b as a fix for FS#12898 > . > > As of today, it is broken because of the `q.SessionID IS NULL` condition > in

Re: [PATCH 1/3] Update last login information on SSO login

2020-07-28 Thread Lukas Fleischer
On Tue, 28 Jul 2020 at 10:33:12, Frédéric Mangano-Tarumi wrote: > --- > aurweb/routers/sso.py | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) Merged all three patches in this patch set, thanks!

Re: [PATCH 2/2] Stop redirecting stderr with proc_open

2020-07-27 Thread Lukas Fleischer
On Mon, 27 Jul 2020 at 08:44:03, Frédéric Mangano-Tarumi wrote: > Error outputs were piped to a temporary buffer that wasn\u2019t read by > anyone, making debugging hard because errors were completely silenced. > By not explicitly redirecting stderr on proc_open, the subprocess > inherits its

Re: [PATCH 1/2] aurweb.spawn: Support stdout redirections to non-tty

2020-07-27 Thread Lukas Fleischer
On Mon, 27 Jul 2020 at 08:43:48, Frédéric Mangano-Tarumi wrote: > Only ttys have a terminal size. If we can\u2019t obtain it, we\u2019ll just > use 80 > as a sane default. > --- > aurweb/spawn.py | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) Merged, thanks!

Re: [PATCH v2] Exclude suspended Users from being notified

2020-07-25 Thread Lukas Fleischer
On Wed, 15 Jul 2020 at 14:45:54, Kevin Morris wrote: > The existing notify.py script was grabbing entries regardless > of user suspension. This has been modified to only send notifications > to unsuspended users. > > This change was written as a solution to >

Re: [PATCH 1/3] SSO: Port IP ban checking

2020-07-25 Thread Lukas Fleischer
On Mon, 20 Jul 2020 at 10:25:11, Frédéric Mangano-Tarumi wrote: > --- > aurweb/routers/sso.py | 19 +-- > 1 file changed, 17 insertions(+), 2 deletions(-) Thanks Frédéric! Merged all patches in this series to pu!

Re: [PATCH 1/4] SSO: Explain the rationale behind prompt=login

2020-07-14 Thread Lukas Fleischer
On Tue, 14 Jul 2020 at 09:34:06, Frédéric Mangano-Tarumi wrote: > We might reconsider it in the future. > --- > aurweb/routers/sso.py | 7 +++ > 1 file changed, 7 insertions(+) Queued all patches in this patch series in pu, thanks Frédéric!

Re: [PATCH] Exclude suspended Users from being notified

2020-07-14 Thread Lukas Fleischer
On Tue, 14 Jul 2020 at 18:25:04, Lukas Fleischer wrote: > On Mon, 13 Jul 2020 at 10:47:03, Frédéric Mangano-Tarumi wrote: > > In that last line, `+,` is not a valid Python syntax. The test suite is > > screaming. > > Thanks for the pointer Frédéric, I amended the patch.

Re: [PATCH] Fix typos in CONTRIBUTING.md

2020-07-14 Thread Lukas Fleischer
On Mon, 13 Jul 2020 at 11:05:37, Frédéric Mangano-Tarumi wrote: > --- > CONTRIBUTING.md | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Merged, thanks!

Re: [PATCH] Exclude suspended Users from being notified

2020-07-14 Thread Lukas Fleischer
On Mon, 13 Jul 2020 at 10:47:03, Frédéric Mangano-Tarumi wrote: > In that last line, `+,` is not a valid Python syntax. The test suite is > screaming. Thanks for the pointer Frédéric, I amended the patch.

Re: [PATCH v3] Support conjunctive keyword search in RPC interface

2020-07-06 Thread Lukas Fleischer
On Mon, 06 Jul 2020 at 16:39:59, Kevin Morris wrote: > Sweet! Thanks for all your time/help with this, Lukas. I'm growing more > familiar with the codebase, I'll work on reducing the amount of patchsets > I send through for stuff. Sorry about all of them. No worries, as long as revisions are

Re: [PATCH v3] Support conjunctive keyword search in RPC interface

2020-07-06 Thread Lukas Fleischer
On Sun, 05 Jul 2020 at 21:19:06, Kevin Morris wrote: > Newly supported API Version 6 modifies `type=search` for _by_ type > `name-desc`: it now behaves the same as `name-desc` search through the > https://aur.archlinux.org/packages/ search page. > > Search for packages containing the literal

Re: [PATCH] Support conjunctive keyword search in RPC interface

2020-07-05 Thread Lukas Fleischer
On Sun, 05 Jul 2020 at 01:13:25, Kevin Morris wrote: > Alright, patch sent; I used `-v1` this time with `git send-email`... I > can't find documentation for that switch yet. I've tested basic search > through both paths; the only refactoring that needed to be done was to > remove the extra "AND ("

Re: [PATCH] Support conjunctive keyword search in RPC interface

2020-07-05 Thread Lukas Fleischer
On Sun, 05 Jul 2020 at 01:10:07, Kevin Morris wrote: > Newly supported API Version 6 modifies `type=search` functionality; it > now behaves the same as `name` or `name-desc` search through the > https://aur.archlinux.org/packages/ search page. > > Search for packages containing the literal

Re: [PATCH] Bump RPC API Version 6

2020-07-04 Thread Lukas Fleischer
On Sat, 04 Jul 2020 at 20:52:09, Kevin Morris wrote: > Awesome! I do like the sound better of using the same exact search sql for > both RPC and Web, and so your suggestion seems like a great idea to me. > I'll start looking at this today! Sounds great, I am looking forward to a new patch. And

Re: [PATCH] Bump RPC API Version 6

2020-07-04 Thread Lukas Fleischer
On Sat, 04 Jul 2020 at 17:14:26, Kevin Morris wrote: > API Version 6 modifies `type=search` functionality: Split `arg` into > keywords separated by spaces (quoted keywords are preserved). > [...] > Signed-off-by: Kevin Morris > --- > doc/rpc.txt | 4 +++ >

Re: [PATCH] Bump RPC API Version 6

2020-07-04 Thread Lukas Fleischer
On Thu, 02 Jul 2020 at 23:10:40, Kevin Morris wrote: > [...] > Signed-off-by: Kevin Morris > --- > doc/rpc.txt | 4 +++ > web/lib/aurjson.class.php | 66 ++- > 2 files changed, 62 insertions(+), 8 deletions(-) Thanks Kevin! A few comments

Re: [PATCH] Exclude suspended Users from being notified

2020-07-04 Thread Lukas Fleischer
On Fri, 03 Jul 2020 at 21:29:16, Kevin Morris wrote: > The existing notify.py script was grabbing entries regardless > of user suspension. This has been modified to only send notifications > to unsuspended users. > > This change was written as a solution to >

Re: [PATCH] Add search_type url parameter

2020-07-02 Thread Lukas Fleischer
Hi Kevin, Thanks for your quick reply and your willingness to improve on your first submission! On Thu, 02 Jul 2020 at 20:04:10, Kevin Morris wrote: > The refraining from #2 is due to me being a bit worried due to it changing > how the API behaves, didn't think about the complete picture ("arch

Re: aurweb tests and ci

2020-07-02 Thread Lukas Fleischer
Hi Kevin, On Tue, 30 Jun 2020 at 17:57:57, Kevin Morris wrote: > Working on some things in aurweb at the moment, and I noticed that on > master tests are failing on my system, and .travis.yml doesn't seem to > properly setup the environment needed to run tests (sqlalchemy is not > installed, db

Re: [PATCH] Add search_type url parameter

2020-07-02 Thread Lukas Fleischer
Hi Kevin, Thanks for the patch! On Tue, 30 Jun 2020 at 19:36:01, Kevin Morris wrote: > This commit introduces new functionality: When `search_type` is `web`, > search behavior matches aurweb's HTML search page. > > New parameters: `search_type` > Valid search_type values: `rpc` (default), `web`

Re: [PATCH 3/3] Open AUR sessions from SSO

2020-06-14 Thread Lukas Fleischer
On Mon, 08 Jun 2020 at 14:16:49, Frédéric Mangano-Tarumi wrote: > Only the core functionality is implemented here. See the TODOs. > --- > aurweb/routers/sso.py | 51 +-- > 1 file changed, 49 insertions(+), 2 deletions(-) Merged all three patches of this

Re: [PATCH] aurweb.l10n: Translate without side effects

2020-06-09 Thread Lukas Fleischer
On Tue, 09 Jun 2020 at 14:25:22, Frédéric Mangano-Tarumi wrote: > The install method in Python\u2019s gettext API aliases the translator\u2019s > gettext method to an application-global _(). We don\u2019t use that anywhere, > and it\u2019s clear from aurweb\u2019s Translator interface that we want

Re: [PATCH 4/4] Guide to setting up Keycloak for the SSO

2020-06-06 Thread Lukas Fleischer
On Thu, 04 Jun 2020 at 16:00:34, Frédéric Mangano-Tarumi wrote: > --- > conf/config.dev | 2 +- > doc/SSO | 38 ++ Nit: Can we name this file sso.txt, following the convention in the doc/ directory? > 2 files changed, 39 insertions(+), 1 deletion(-)

Re: [PATCH 3/4] Crude OpenID Connect client using Authlib

2020-06-06 Thread Lukas Fleischer
On Thu, 04 Jun 2020 at 16:00:20, Frédéric Mangano-Tarumi wrote: > Developers can go to /sso/login to get redirected to the SSO. On > successful login, the ID token is displayed. > --- > .gitlab-ci.yml | 3 ++- > TESTING| 3 ++- > aurweb/asgi.py | 13

Re: Tech stack for Python aurweb

2020-06-03 Thread Lukas Fleischer
On Wed, 03 Jun 2020 at 17:37:00, Baptiste Jonglez wrote: > Right, I had not understood this would be such a strong design constraint. > In that case, yes, Django is clearly out of the loop. Yes, should definitely have been more clear about this in the initial email, especially since I was asking

Re: [PATCH v3 2/2] Introduce conf/config.dev for development

2020-06-02 Thread Lukas Fleischer
On Tue, 02 Jun 2020 at 20:04:02, Frédéric Mangano-Tarumi wrote: > conf/config.dev\u2019s purpose is to provide a lighter configuration template > for developers, and split development-specific options off the default > configuration file. > --- > TESTING | 11 ++- >

Re: [PATCH v2 1/5] refactor code to comply with flake8 and isort

2020-06-02 Thread Lukas Fleischer
Nit: We usually capitalize the first word in commit messages. On Mon, 01 Jun 2020 at 18:35:25, Filipe Laíns wrote: > Signed-off-by: Filipe Laíns > --- > aurweb/git/auth.py | 3 +- > aurweb/git/serve.py | 14 +- > aurweb/git/update.py| 6 +- >

Re: [PATCH v2 2/2] Introduce conf/config.dev for development

2020-06-02 Thread Lukas Fleischer
On Tue, 02 Jun 2020 at 08:41:28, Frédéric Mangano-Tarumi wrote: > > Saying ${AUR_CONFIG}.defaults here is elegant, short, precise and clear > > to everybody who is familiar with the code base. However, given that > > those comments are mainly relevant to new contributors setting up a dev > >

Re: Tech stack for Python aurweb

2020-06-02 Thread Lukas Fleischer
Thank you for your comments Ricardo and Baptiste. On Tue, 02 Jun 2020 at 09:07:21, Baptiste Jonglez wrote: > I generally don't like the kind of comments that go "it would be nicer if > you do X and Y" from people that won't actually participate, but I still > feel it's relevant: One of the

Re: [PATCH v2 2/2] Introduce conf/config.dev for development

2020-06-01 Thread Lukas Fleischer
On Mon, 01 Jun 2020 at 12:50:23, Frédéric Mangano-Tarumi wrote: > conf/config.dev\u2019s purpose is to provide a lighter configuration template > for developers, and split development-specific options off the default > configuration file. > --- > TESTING | 8 +++- >

Re: [PATCH 1/3] flake8: add initial config

2020-06-01 Thread Lukas Fleischer
On Mon, 01 Jun 2020 at 16:51:05, Filipe Laíns wrote: > Signed-off-by: Filipe Laíns > --- > aurweb/git/auth.py| 1 - > aurweb/git/serve.py | 14 +- > aurweb/git/update.py | 4 +- > aurweb/l10n.py

Re: [PATCH] aurweb.spawn: Integrate FastAPI and nginx

2020-05-31 Thread Lukas Fleischer
On Sun, 31 May 2020 at 17:20:45, Frédéric Mangano-Tarumi wrote: > > Even if the dev-only options are indicated by comments, I am not sure > > whether it's a good idea to mix production and development configuration > > like this. Can we put them in a separate file or at least a separate > >

Re: [PATCH] aurweb.spawn: Integrate FastAPI and nginx

2020-05-31 Thread Lukas Fleischer
Thanks a lot for the patch; two minor comments inline in addition to what Filipe mentioned previously (I am fine with ^C instead of CTRL+C by the way but don't care much either way). On Sat, 30 May 2020 at 13:41:07, Frédéric Mangano-Tarumi wrote: > aurweb.spawn used to launch only PHP\u2019s

Re: Tech stack for Python aurweb

2020-05-24 Thread Lukas Fleischer
On Mon, 18 May 2020 at 18:10:14, Filipe Laíns wrote: > On Mon, 2020-05-18 at 17:49 -0400, Lukas Fleischer wrote: > > Everybody involved in these efforts seemed to prefer Flask [1] so far. > > It's a mature micro framework and has a relatively low barrier of entry. > >

aurweb Git repository moved to GitLab

2020-05-24 Thread Lukas Fleischer
The official aurweb Git repository has been moved to our new GitLab instance. The new upstream URL is https://gitlab.archlinux.org/archlinux/aurweb.git For the time being, we will accept aurweb bug reports and requests via the mailing list, Flyspray and the GitLab issue tracker. Patches can

Re: [PATCH] First HTTP functional test of the RPC interface

2020-05-23 Thread Lukas Fleischer
On Sat, 23 May 2020 at 12:58:32, Frédéric Mangano-Tarumi wrote: > I submitted this patch when we were considering porting the whole > PHP\u202fcode base to Python. However, if we instead port the code as we make > new features, then the new framework would provide testing tools without > requiring

Re: [PATCH] ci: remove Travis CI

2020-05-23 Thread Lukas Fleischer
On Sat, 23 May 2020 at 12:54:07, Filipe Laíns wrote: > We are are moving to Gitlab CI. > > Signed-off-by: Filipe Laíns > --- > .travis.yml | 23 --- > 1 file changed, 23 deletions(-) > delete mode 100644 .travis.yml Merged, thanks

Re: [PATCH] First HTTP functional test of the RPC interface

2020-05-23 Thread Lukas Fleischer
On Sun, 12 Apr 2020 at 12:55:46, Frédéric Mangano-Tarumi wrote: > Though barely useful in its current state, it shows how to integrate > pytest with SQLAlchemy and Werkzeug, providing a test framework for the > potential future Flask port, while actually testing the current PHP > implementation. >

Tech stack for Python aurweb

2020-05-18 Thread Lukas Fleischer
Context: In light of growing demand/requests for modernizing the aurweb code base and switching the code base to a more popular programming language, we did some preparatory research and work to allow for writing new subsystems in Python. Frédéric proposed a lightweight dual stack implementation

Re: aurweb testing environment using Docker

2020-05-18 Thread Lukas Fleischer
On Tue, 24 Mar 2020 at 22:06:53, Lukas Fleischer wrote: > On Tue, 24 Mar 2020 at 18:47:30, Filipe Laíns wrote: > > I think we should build on our existent ansible infrastructure and use > > ansible-bender for this. We already have all the required roles and the > > aur-dev pl

Re: [PATCH] Create aurweb.spawn for spawing the test server

2020-05-03 Thread Lukas Fleischer
On Sun, 19 Apr 2020 at 14:11:02, Frédéric Mangano-Tarumi wrote: > This program makes it easier for developers to spawn the PHP server > since it fetches automatically what it needs from the configuration > file, rather than having the user explicitly pass arguments to the php > executable. > >

Re: Append latest commit link to package update notification

2020-05-01 Thread Lukas Fleischer
On Thu, 30 Apr 2020 at 15:26:08, Daniel M. Capella wrote: > > So appending latest commit link "helps" and "encourages" people to > > check latest update and I don't think in any possible way has a > > downside except for a little more text to email which I assume it's > > OK. > [...] > IIRC when I

Re: [PATCH] First HTTP functional test of the RPC interface

2020-04-16 Thread Lukas Fleischer
On Wed, 15 Apr 2020 at 17:54:45, Frédéric Mangano-Tarumi wrote: > When I run test/t2600-rendercomment.t and measure the time, it spends > almost 8 seconds on setup.sh, then 3 seconds to actually run the tests. > That\u2019s quite significant. > > $ ./t2600-rendercomment.t | ts -s %.s > 0.10

Re: [PATCH] First HTTP functional test of the RPC interface

2020-04-15 Thread Lukas Fleischer
On Wed, 15 Apr 2020 at 08:44:44, Frédéric Mangano-Tarumi wrote: > Lukas Fleischer [2020-04-15 08:08:08 -0400] > > Our test suite already uses a separate configuration which is > > auto-generated in test/setup.sh, so it is already self-contained in that > > sense; w

Re: [PATCH] First HTTP functional test of the RPC interface

2020-04-15 Thread Lukas Fleischer
On Tue, 14 Apr 2020 at 09:49:06, Frédéric Mangano-Tarumi wrote: > My bad, you\u2019re right. I had changed it following the TESTING > instructions. aur_location is clearly the variable to use, but in the > current state some people will miss it and the test suite would send > requests to

Re: [PATCH] First HTTP functional test of the RPC interface

2020-04-14 Thread Lukas Fleischer
On Tue, 14 Apr 2020 at 09:26:44, Frédéric Mangano-Tarumi wrote: > Hi Lukas, > > Lukas Fleischer [2020-04-14 08:54:03 -0400] > > On Sun, 12 Apr 2020 at 12:55:46, Frédéric Mangano-Tarumi wrote: > > > +base_uri = aurweb.config.get("options", "aur_loca

Re: [PATCH] First HTTP functional test of the RPC interface

2020-04-14 Thread Lukas Fleischer
Hi Frédéric, Thanks for the work! My first thoughts below. On Sun, 12 Apr 2020 at 12:55:46, Frédéric Mangano-Tarumi wrote: > Though barely useful in its current state, it shows how to integrate > pytest with SQLAlchemy and Werkzeug, providing a test framework for the > potential future Flask

[PATCH 2/2] Fix PHP notices in the account form

2020-04-05 Thread Lukas Fleischer
Signed-off-by: Lukas Fleischer --- web/html/account.php | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/html/account.php b/web/html/account.php index c05d136..d70f4ce 100644 --- a/web/html/account.php +++ b/web/html/account.php @@ -25,7 +25,7 @@ if ($action

[PATCH 1/2] Fix invalid session ID check

2020-04-05 Thread Lukas Fleischer
Signed-off-by: Lukas Fleischer --- web/lib/aur.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php index dbcc23a..f4ad6b4 100644 --- a/web/lib/aur.inc.php +++ b/web/lib/aur.inc.php @@ -50,7 +50,7 @@ function check_sid

aurweb 5.0.0 released

2020-03-27 Thread Lukas Fleischer
Dear aurweb contributors and users, aurweb 5.0.0 has just been released! You can now add a secondary email address that can be used to recover your account in case access to the primary email address is lost. Reset keys for an account are always sent to both the primary and the backup email

[PATCH v2] Add new upgrade instructions

2020-03-27 Thread Lukas Fleischer
Signed-off-by: Lukas Fleischer --- Add missing raw SQL upgrade instructions. upgrading/{4.9.0.txt => 5.x.x.txt} | 8 1 file changed, 8 insertions(+) rename upgrading/{4.9.0.txt => 5.x.x.txt} (54%) diff --git a/upgrading/4.9.0.txt b/upgrading/5.x.x.txt similarity index 54% renam

[PATCH] Add new upgrade instructions

2020-03-27 Thread Lukas Fleischer
Signed-off-by: Lukas Fleischer --- upgrading/5.x.x.txt | 4 1 file changed, 4 insertions(+) create mode 100644 upgrading/5.x.x.txt diff --git a/upgrading/5.x.x.txt b/upgrading/5.x.x.txt new file mode 100644 index 000..ba74e28 --- /dev/null +++ b/upgrading/5.x.x.txt @@ -0,0 +1,4

Re: aurweb testing environment using Docker

2020-03-24 Thread Lukas Fleischer
On Tue, 24 Mar 2020 at 18:47:30, Filipe Laíns wrote: > I think we should build on our existent ansible infrastructure and use > ansible-bender for this. We already have all the required roles and the > aur-dev playbook defined. Using ansible-bender we can generate from a > playbook. I don't have

Re: aurweb testing environment using Docker

2020-03-24 Thread Lukas Fleischer
Thank you for all your comments. On Tue, 24 Mar 2020 at 15:06:49, Yaron Shahrabani wrote: > The big catch here is this: > Adding more complexity to the main docker requires more layers, thus making > the docker building process slower and each and every modification of a > building block requires

aurweb testing environment using Docker

2020-03-23 Thread Lukas Fleischer
We are currently working on a testing environment using Docker. The idea is to have something that is super easy to set up and still mirrors our production environment as closely as possible. It should ideally allow future contributors to test their patch submissions without having to go through

Re: TAP testing in Python

2020-03-22 Thread Lukas Fleischer
On Sun, 22 Mar 2020 at 21:03:31, Frédéric Mangano-Tarumi wrote: > I didn\u2019t realize it at first, but since pytest-tap outputs TAP already, > a very simple shell wrapper invoking pytest with the right arguments > should be enough to integrate it with the existing test structure. > Great! >

Re: TAP testing in Python

2020-03-22 Thread Lukas Fleischer
On Sat, 21 Mar 2020 at 12:29:41, Filipe Laíns wrote: > Why should we use unittest over pytest? pytest is easier to read and > write, more extensible/has more integrations and has a larger userbase. > The only caveat is that people would have to fo a quick read on > fixtures before they start

Re: [PATCH] Map BIGINT to INTEGER for SQLite

2020-03-22 Thread Lukas Fleischer
On Sat, 21 Mar 2020 at 14:13:45, Frédéric Mangano-Tarumi wrote: > --- > aurweb/schema.py | 11 +++ > 1 file changed, 11 insertions(+) Merged, thanks!

Re: [PATCH] Proof-of-concept of a dual PHP–Python stack

2020-03-15 Thread Lukas Fleischer
On Sun, 15 Mar 2020 at 09:16:52, Frédéric Mangano-Tarumi wrote: > Lukas Fleischer [2020-03-15 08:25:31 -0400] > > Being overloaded is a relative term. Yes, the AUR servers are often > > under heavy load, with millions of requests every day. > > To get more concrete: are the

Re: Functional HTTP testing

2020-03-15 Thread Lukas Fleischer
On Sat, 14 Mar 2020 at 10:58:54, Frédéric Mangano-Tarumi wrote: > With the current plans of porting the PHP codebase to Python, we should > consider setting up a suite of functional tests to squash most bugs > introduced by the rewrite. > [...] > HTTP testing being a kind of language-agnostic

Re: [PATCH] Proof-of-concept of a dual PHP–Python stack

2020-03-15 Thread Lukas Fleischer
On Fri, 13 Mar 2020 at 14:13:56, Frédéric Mangano-Tarumi wrote: > Lukas Fleischer [2020-03-11 19:44:37 -0400] > > Thanks! I like the approach. I wonder what the performance impact of > > always querying the Python backend first would be, though, especially at > > the beginni

Re: [PATCH] Proof-of-concept of a dual PHP–Python stack

2020-03-11 Thread Lukas Fleischer
On Sat, 07 Mar 2020 at 16:01:52, Frédéric Mangano-Tarumi wrote: > Here\u2019s a demonstration of a Python web stack running next to the current > PHP stack, such that it\u2019s invisible to the client. > > This approach aims at providing a way to migrate the PHP code base to > Python, one

Re: [PATCH 2/4] Support running tests from any directory

2020-02-29 Thread Lukas Fleischer
On Sat, 29 Feb 2020 at 01:01:38, Frédéric Mangano-Tarumi wrote: > --- > test/setup.sh | 5 ++--- > test/t1100-git-auth.t | 2 +- > test/t1200-git-serve.t | 2 +- > test/t1300-git-update.t | 2 +- > test/t2100-mkpkglists.t | 2 +- > test/t2200-tuvotereminder.t | 2

Re: [PATCH 3/4] test/Makefile: Run tests with prove when available

2020-02-29 Thread Lukas Fleischer
On Sat, 29 Feb 2020 at 01:02:04, Frédéric Mangano-Tarumi wrote: > --- > test/Makefile | 7 +++ > 1 file changed, 7 insertions(+) Merged, thanks!

[PATCH] Properly escape passwords in the account edit form

2020-02-27 Thread Lukas Fleischer
Addresses FS#65639. Signed-off-by: Lukas Fleischer --- Our live setup at aur.archlinux.org is already patched. web/template/account_edit_form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php

[PATCH] Properly escape passwords in the account edit form

2020-02-27 Thread Lukas Fleischer
Addresses FS#65639. Signed-off-by: Lukas Fleischer --- web/template/account_edit_form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php index a4ea994..4ce6b87 100644 --- a/web/template

Re: [PATCH] Set up Alembic for database migrations

2020-02-27 Thread Lukas Fleischer
On Wed, 26 Feb 2020 at 22:10:09, Frédéric Mangano-Tarumi wrote: > Lukas Fleischer [2020-02-26 14:00:51 +0100] > > We should also think about phasing out the text files in the upgrading/ > > subdirectory. Maybe we should simply keep them for one or two releases > > and remove t

Re: [PATCH] Set up Alembic for database migrations

2020-02-26 Thread Lukas Fleischer
On Sat, 22 Feb 2020 at 22:31:26, Frédéric Mangano-Tarumi wrote: > --- > INSTALL | 4 +- > TESTING | 3 +- > alembic.ini | 86 +++ > aurweb/initdb.py | 9 > aurweb/schema.py | 8 >

Re: [PATCH] Change the extension of TAP test suites to .t

2020-02-26 Thread Lukas Fleischer
On Sun, 23 Feb 2020 at 19:53:13, Frédéric Mangano-Tarumi wrote: > This is the common convention for TAP, and makes harnesses like prove > automatically detect them. Plus, test suites don\u2019t have to be shell > scripts anymore. > --- > test/Makefile|

Re: [PATCH] migrate the database schema to SQLAlchemy

2020-02-23 Thread Lukas Fleischer
On Sat, 22 Feb 2020 at 23:28:25, Frédéric Mangano-Tarumi wrote: > Lukas Fleischer [2020-02-22 22:43:31 +0100] > > > +5) Create a new MySQL database and a user and import the aurweb SQL > > > schema: > > > + > > > +$ python -m aurweb.initdb > > >

Re: [PATCH] migrate the database schema to SQLAlchemy

2020-02-22 Thread Lukas Fleischer
On Sun, 16 Feb 2020 at 21:56:10, Frédéric Mangano-Tarumi wrote: > The new schema was generated with sqlacodegen and then manually adjusted > to fit schema/aur-schema.sql faithfully, both in the organisation of the > code and in the SQL generated by SQLAlchemy. > > Initializing the database now

Re: TAP conventions for aurweb’s test suites

2020-02-22 Thread Lukas Fleischer
On Sat, 22 Feb 2020 at 16:24:54, Frédéric Mangano-Tarumi wrote: > Exactly. Using .t instead of .sh is about opening doors. Rewriting > existing tests would have no benefit per se. The beauty of TAP\u2019s > language-agnosticness is the liberty to use to right tool for the right > job. I\u2019ll

[PATCH] Fix HTML code in the account search results table

2020-02-22 Thread Lukas Fleischer
Do not add an opening tag for every row. Instead, wrap all rows in . While at it, also simplify the code used to color the rows. Signed-off-by: Lukas Fleischer --- web/template/account_search_results.php | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git

Re: TAP conventions for aurweb’s test suites

2020-02-22 Thread Lukas Fleischer
On Fri, 21 Feb 2020 at 23:41:06, Frédéric Mangano-Tarumi wrote: > prove comes with its conventions, which are from the original TAP. > First, it expects test programs to end with `.t`, which is restrictive > enough to exclude non-test files, but doesn\u2019t bind to any specific > language since

[PATCH 1/2] README.md: fix a small typo

2020-02-21 Thread Lukas Fleischer
From: Yaron Shahrabani Signed-off-by: Lukas Fleischer --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4ab584..b2095b3 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ and installed using the Arch Linux package manager `pacman

[PATCH 2/2] README.md: add references to Transifex

2020-02-21 Thread Lukas Fleischer
Signed-off-by: Lukas Fleischer --- README.md | 8 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index b2095b3..f7285a5 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,11 @@ Links * Questions, comments, and patches related to aurweb can be sent to the AUR

Re: [aur-dev][PATCH 0/2] php warning fixes

2020-02-12 Thread Lukas Fleischer
On Wed, 12 Feb 2020 at 21:16:36, Eli Schwartz wrote: > I had this sitting around since December and forgot to send it in, > offered FWIW. It's slightly different in implementation and has more > wordy commit messages. Thanks. I will discard the other patch I submitted earlier (Verify that

[PATCH v2] Verify that returned rows exist before extracting columns

2020-02-12 Thread Lukas Fleischer
Fix PHP notices such as "Trying to access array offset on value of type bool" or "Trying to access array offset on value of type null". Signed-off-by: Lukas Fleischer --- web/html/login.php | 4 +++- web/lib/aur.inc.php | 21 + web/lib/p

[PATCH] Verify that return rows exist before extracting columns

2020-02-12 Thread Lukas Fleischer
Signed-off-by: Lukas Fleischer --- web/lib/aur.inc.php | 21 + web/lib/pkgfuncs.inc.php | 3 +++ 2 files changed, 24 insertions(+) diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php index e9530fc..2507df6 100644 --- a/web/lib/aur.inc.php +++ b/web/lib/aur.inc.php

[PATCH v5 2/2] Make SMTP port and authentication configurable

2020-02-11 Thread Lukas Fleischer
of these options. Authentication can be configured using smtp-user and smtp-password. Authentication is disabled if either of these values is empty. Signed-off-by: Lukas Fleischer --- aurweb/scripts/notify.py | 20 +++- conf/config.defaults | 5 + 2 files changed, 24

[PATCH v5 1/2] Support smtplib for sending emails

2020-02-11 Thread Lukas Fleischer
Support mail delivery without a local MTA. Instead, an SMTP server can now be configured using the smtp-server option in the [notifications] section. In order to use this option, the value of the sendmail option must be empty. Signed-off-by: Lukas Fleischer --- Disable debug output. aurweb

[PATCH v4 2/2] Make SMTP port and authentication configurable

2020-02-10 Thread Lukas Fleischer
of these options. Authentication can be configured using smtp-user and smtp-password. Authentication is disabled if either of these values is empty. Signed-off-by: Lukas Fleischer --- Fix variable naming inconsistency with the user and passwd variables. aurweb/scripts/notify.py | 20

[PATCH v4 1/2] Support smtplib for sending emails

2020-02-10 Thread Lukas Fleischer
Support mail delivery without a local MTA. Instead, an SMTP server can now be configured using the smtp-server option in the [notifications] section. In order to use this option, the value of the sendmail option must be empty. Signed-off-by: Lukas Fleischer --- aurweb/scripts/notify.py | 22

[PATCH] Update README and convert to Markdown syntax

2020-02-10 Thread Lukas Fleischer
Signed-off-by: Lukas Fleischer --- README => README.md | 34 -- 1 file changed, 8 insertions(+), 26 deletions(-) rename README => README.md (73%) diff --git a/README b/README.md similarity index 73% rename from README rename to README.md index e633ec3..a

[PATCH v3 1/2] Support smtplib for sending emails

2020-02-10 Thread Lukas Fleischer
Support mail delivery without a local MTA. Instead, an SMTP server can now be configured using the smtp-server option in the [notifications] section. In order to use this option, the value of the sendmail option must be empty. Signed-off-by: Lukas Fleischer --- Reintroduce the option to use

[PATCH v3 2/2] Make SMTP port and authentication configurable

2020-02-10 Thread Lukas Fleischer
of these options. Authentication can be configured using smtp-user and smtp-password. Authentication is disabled if either of these values is empty. Signed-off-by: Lukas Fleischer --- aurweb/scripts/notify.py | 20 +++- conf/config.defaults | 5 + 2 files changed, 24

[PATCH v2 1/2] Use smtplib for sending emails

2020-02-07 Thread Lukas Fleischer
Support mail delivery without a local MTA. Instead, an SMTP server can now be configured using the smtp-server option in the [notifications] section. Signed-off-by: Lukas Fleischer --- Change the default configuration to use localhost. aurweb/scripts/notify.py | 13 - conf

[PATCH v2 2/2] Make SMTP port and authentication configurable

2020-02-07 Thread Lukas Fleischer
Signed-off-by: Lukas Fleischer --- Change the default configuration to use localhost. aurweb/scripts/notify.py | 19 ++- conf/config.defaults | 5 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/aurweb/scripts/notify.py b/aurweb/scripts/notify.py index

[PATCH] Make SMTP port and authentication configurable

2020-02-07 Thread Lukas Fleischer
Signed-off-by: Lukas Fleischer --- aurweb/scripts/notify.py | 19 ++- conf/config.defaults | 5 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/aurweb/scripts/notify.py b/aurweb/scripts/notify.py index 35d2701..ddf4736 100755 --- a/aurweb/scripts

[PATCH] Use smtplib for sending emails

2020-02-07 Thread Lukas Fleischer
Support mail delivery without a local MTA. Instead, an SMTP server can now be configured using the smtp-server option in the [notifications] section. Signed-off-by: Lukas Fleischer --- aurweb/scripts/notify.py | 13 - conf/config.defaults | 2 +- 2 files changed, 9 insertions

Re: Automated database migrations with Alembic

2020-02-07 Thread Lukas Fleischer
Hi Frédéric, Thanks for the proposal! On Fri, 07 Feb 2020 at 01:51:28, Frédéric Mangano-Tarumi wrote: > We want to be able to deploy new versions of aurweb from Ansible without > requiring manual intervention for data migration. That is correct. We are still working closely with the DevOps team

  1   2   3   4   5   6   7   8   9   10   >