Commit graph

3708 commits

Author SHA1 Message Date
Leonidas Spyropoulos
e2c113caee
chore(release): prepare for 6.2.5
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-06-22 19:22:56 +01:00
moson-mo
143575c9de
fix: restore command, remove premature creation of pkgbase
We're currently creating a "PackageBases" when the "restore" command is executed.

This is problematic for pkgbases that never existed before.
In those cases it will create the record but fail in the update.py script.
Thus it leaves an orphan "PackageBases" record in the DB
(which does not have any related "Packages" record(s))

Navigating to such a packages /pkgbase/... URL will result in a crash
since it is not foreseen to have "orphan" pkgbase records.

We can safely remove the early creation of that record because
it'll be taken care of in the update.py script that is being called

We'll also fix some tests. Before it was executing a dummy script
instead of "update.py" which might be a bit misleading
since it did not check the real outcome of our "restore" action.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-06-16 14:22:22 +02:00
moson-mo
c6c81f0789
housekeep: Amend .gitignore and .dockerignore
Prevent some files/dirs to end up in the repo / docker image:
* directories typically used for python virtualenvs
* files that are being generated by running tests

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-06-16 13:33:39 +02:00
moson-mo
32461f28ea
fix(docker): Suppress error PEP-668
When using docker (compose), we don't create a venv and just install
python packages system-wide.

With python 3.11 (PEP 668) we need to explicitly tell pip to allow this.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-06-15 14:19:02 +02:00
moson-mo
58158505b0
fix: browser hints for password fields
Co-authored-by: eNV25 <env252525@gmail.com>
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-06-11 21:04:35 +02:00
moson-mo
ed17486da6
change(git): allow keys/pgp subdir with .asc files
This allows migration of git history for packages dropped from a repo to AUR
in case they contain PGP key material

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-06-11 12:20:02 +02:00
moson-mo
1c11c901a2
feat: switch requests filter for pkgname to "contains"
Use "contains" filtering instead of an exact match
when a package name filter is given.

This makes it easier to find requests for a "group" of packages.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-06-10 09:40:35 +02:00
Christian Heusel
26b2566b3f
change: print the user name if connecting via ssh
this is similar to the message that gitlab produces:

$ ssh -T aur.archlinux.org
Welcome to AUR, gromit! Interactive shell is disabled.
Try `ssh ssh://aur@aur.archlinux.org help` for a list of commands.

$ ssh -T gitlab.archlinux.org
Welcome to GitLab, @gromit!

Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-06-08 12:47:27 +02:00
Christian Heusel
e9cc2fb437
change: only require .SRCINFO in the latest revision
This is done in order to relax the constraints so that dropping packages
from the official repos can be done with preserving their history.

Its sufficient to also have this present in the latest commit of a push.

Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-06-07 18:54:31 +02:00
Leonidas Spyropoulos
ed2f85ad04
chore(release): prepare for 6.2.4
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-05-27 14:28:48 +01:00
renovate
2709585a70
fix(deps): update dependency fastapi to v0.95.2 2023-05-27 11:24:46 +00:00
renovate
d1a3fee9fe fix(deps): update all non-major dependencies 2023-05-26 21:12:13 +00:00
moson-mo
49e98d64f4
chore: increase default session/cookie timeout
change from 2 to 4 hours.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-26 23:03:38 +02:00
moson-mo
a7882c7533
refactor: remove session_time from user.login
The parameter is not used, we can remove it and adapt the callers.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-26 23:02:38 +02:00
moson-mo
22fe4a988a
fix: make AURSID a session cookie if "remember me" is not checked
This should match more closely the expectation of a user.
A session cookie should vanish on browser close
and you thus they need to authenticate again.

There is no need to bump the expiration of AURSID either,
so we can remove that part.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-26 22:57:47 +02:00
moson-mo
0807ae6b7c
test: add tests for cookie handling
add a bunch of test cases to ensure our cookies work properly

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-26 22:57:46 +02:00
moson-mo
d366377231
fix: make AURREMEMBER cookie a permanent one
If it's a session cookie it poses issues for users
whose browsers wipe session cookies after close.
They'd be logged out early even if they chose
the "remember me" option when they log in.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-26 22:57:46 +02:00
moson-mo
57c154a72c
fix: increase expiry for AURLANG cookie; only set when needed
We add a new config option for cookies with a 400 day lifetime.
AURLANG should survive longer for unauthenticated users.
Today they have to set this again after each browser restart.
(for users whose browsers wipe session cookies on close)

authenticated users don't need this cookie
since the setting is saved to the DB

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-26 22:57:46 +02:00
moson-mo
638ca7b1d0
chore: remove setting AURLANG and AURTZ on login
We don't need to set these cookies when logging in.
These settings are saved to the DB anyways.
(and they are picked up from there as well for any web requests,
when no cookies are given)

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-26 22:57:46 +02:00
moson-mo
edc4ac332d
chore: remove setting AURLANG and AURTZ on account edit
We don't need to set these cookies when an account is edited.
These settings are saved to the DB anyways.
(and they are picked up from there as well for any web requests,
when no cookies are given)

Setting these cookies can even be counter-productive:
Imagine a TU/Dev editing another users account.
They would overwrite their own cookies with the other users TZ/LANG settings.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-26 22:57:46 +02:00
moson-mo
2eacc84cd0
fix: properly evaluate AURREMEMBER cookie
Whenever the AURREMEMBER cookie was defined, regardless of its value,
"remember_me" is always set to True

The get method of a dict returns a string,
converting a value of str "False" into a bool -> True

We have to check AURREMEMBERs value instead.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-26 22:57:46 +02:00
Daniel M. Capella
5fe375bdc3
feat: add link to MergeBaseName in requests.html 2023-05-26 13:26:41 -04:00
renovate
1b41e8572a
fix(deps): update all non-major dependencies 2023-05-26 02:24:39 +00:00
moson-mo
7a88aeb673
chore: update .gitignore for test-emails
emails generated when running tests are stored in test-emails/ dir

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-25 11:18:08 +02:00
moson-mo
f24fae0ce6
feat: Add "Requests" filter option for package name
- Add package name textbox for filtering requests (with auto-suggest)
- Make "x pending requests" a link for TU/Dev on the package details page

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-25 11:18:08 +02:00
Leonidas Spyropoulos
acdb2864de
Merge branch 'aurblup-update-repo' into 'master'
fix: update repo information with aurblup script / git packaging repo changes

See merge request archlinux/aurweb!710
2023-05-25 10:06:44 +01:00
moson-mo
146943b3b6
housekeep: support new default repos after git migration
community is merged into extra
testing -> core-testing & extra-testing

Announcement: https://archlinux.org/news/git-migration-announcement/

We list "testing" repos first:
See d0b0e4d88b

Co-authored-by: artafinde <artafinde@archlinux.org>
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-18 13:06:21 +02:00
moson-mo
d0b0e4d88b
fix: update repo information with aurblup script
Currently, the "Repo" column in "OfficialProviders" is not updated
when a package is moved from one repository to another.

Note that we only save a package/provides combination once,
hence if a package is available in core and testing at the same time,
it would only put just one record into the OfficialProviders table.

We iterate through the repos one by one and the last value
is kept for mapping a (package/provides) combination to a repo.
Due to that, the repos listed in the "sync-db" config setting
should be ordered such that the "testing" repos are listed first.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-17 18:22:53 +02:00
moson-mo
3253a6ad29
fix(deps): remove urllib3 from dependency list
Previously pinned urllib3 to v1.x. This is not needed though.
The incompatibility of v2.x is with poetry itself, but not aurweb.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-07 09:58:17 +02:00
Daniel M. Capella
d2e8fa0249
chore(deps): "Group all minor and patch updates together"
Treat FastAPI separately due to regular breakage.

Co-authored-by: moson-mo <mo-son@mailbox.org>
2023-05-06 18:03:05 -04:00
Leonidas Spyropoulos
1d627edbe7
chore(release): prepare for 6.2.3
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-05-06 20:34:54 +01:00
moson-mo
b115aedf97
chore(deps): update several dependencies
- Removing rfc3986 (1.5.0)
- Updating coverage (7.2.4 -> 7.2.5)
- Updating fastapi (0.94.1 -> 0.95.1)
- Updating httpcore (0.16.3 -> 0.17.0)
- Updating sqlalchemy (1.4.47 -> 1.4.48)
- Updating httpx (0.23.3 -> 0.24.0)
- Updating prometheus-fastapi-instrumentator (5.11.2 -> 6.0.0)
- Updating protobuf (4.22.3 -> 4.22.4)
- Updating pytest-asyncio (0.20.3 -> 0.21.0)
- Updating requests (2.29.0 -> 2.30.0)
- Updating uvicorn (0.21.1 -> 0.22.0)
- Updating watchfiles (0.18.1 -> 0.19.0)
- Updating werkzeug (2.3.2 -> 2.3.3)

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-06 20:29:05 +02:00
Christian Heusel
af4239bcac
replace reference to AUR TU Guidelines with AUR Submission Guidelines
Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-05-06 19:47:01 +02:00
Leonidas Spyropoulos
a8d14e0194
housekeep: remove unused templates and rework existing ones
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-05-01 10:44:45 +01:00
moson-mo
8c5b85db5c
housekeep: remove fix for poetry installer
The problems with the "modern installer" got fixed.
We don't need this workaround anymore.

https://github.com/python-poetry/poetry/issues/7572
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-01 10:23:34 +02:00
moson-mo
b3fcfb7679
doc: improve instructions for setting up a dev/test env
Provide more detailed information how to get started with a dev/test env.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-01 10:23:34 +02:00
Leonidas Spyropoulos
e896edaccc
chore: support for python 3.11 and poetry.lock update
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-04-30 10:12:09 +01:00
moson-mo
bab17a9d26
doc: amend INSTALL instructions
change path for metadata archive files

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-04-29 09:59:34 +02:00
moson-mo
ad61c443f4
fix: restore & move cgit html files
restore files accidentally deleted with PHP cleanup.

1325c71712/web/template/cgit
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-04-29 09:55:54 +02:00
moson-mo
8ca63075e9
housekeep: remove PHP implementation
removal of the PHP codebase

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-04-28 16:10:32 +02:00
moson-mo
97d0eac303
housekeep: copy static files
we copy static files used by PHP and Python versions into /static

preparation work for the removal of the PHP version

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-04-28 10:53:22 +02:00
Leonidas Spyropoulos
1325c71712
chore: update poetry.lock
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-04-24 09:13:38 +01:00
Leonidas Spyropoulos
6ede837b4f
feat: allow users to hide deleted comments
Closes: #435

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-04-24 09:13:38 +01:00
Leonidas Spyropoulos
174af5f025
chore(release): prepare for 6.2.2
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-03-15 12:09:47 +00:00
moson-mo
993a044680
fix(poetry): use classic installer
The "install" module (v0.6.0) which is being used by poetry 1.4.0
has problems installing certain packages.

Disable the modern installer for now, until things are fixed.

https://github.com/python-poetry/poetry/issues/7572
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-14 17:57:57 +01:00
moson-mo
bf0d4a2be7
fix(deps): bump dependencies
bump all deps except sqlalchemy.

- Updating exceptiongroup (1.1.0 -> 1.1.1)
- Updating pydantic (1.10.5 -> 1.10.6)
- Updating starlette (0.25.0 -> 0.26.1)
- Updating charset-normalizer (3.0.1 -> 3.1.0)
- Updating fastapi (0.92.0 -> 0.94.1)
- Updating setuptools (67.4.0 -> 67.6.0)
- Updating urllib3 (1.26.14 -> 1.26.15)
- Updating alembic (1.9.4 -> 1.10.2)
- Updating fakeredis (2.9.2 -> 2.10.0)
- Updating prometheus-fastapi-instrumentator (5.10.0 -> 5.11.1)
- Updating protobuf (4.22.0 -> 4.22.1)
- Updating pytest-xdist (3.2.0 -> 3.2.1)
- Updating uvicorn (0.20.0 -> 0.21.0)
- Updating filelock (3.9.0 -> 3.9.1)

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-14 17:57:56 +01:00
moson-mo
b9df7541b3
fix: add comments in email for direct deletion/merge
TUs and Devs can delete and merge packages directly.
Currently the comments they enter, don't end up in the ML notification.

Include the comment in the notifications for direct deletion / merge

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-14 11:17:45 +01:00
moson-mo
7d1827ffc5
feat: cancel button for comment editing
Adds button that allows cancellation while editing a comment

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-09 21:48:58 +01:00
moson-mo
52c962a590
fix(deps): fastapi 0.92.0 upgrade
middleware must be added before startup:

fixes: "RuntimeError: Cannot add middleware after an application has started"

https://fastapi.tiangolo.com/release-notes/#0910
Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-04 10:29:54 +01:00
moson-mo
c0390240bc
housekeep(deps): bump dependencies
update all poetry deps to the latest version (except of sqlalchemy)

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-04 10:27:57 +01:00