Commit graph

43 commits

Author SHA1 Message Date
Kevin Morris
1180565d0c
Merge branch 'upd-metadata-doc' 2022-09-26 01:39:09 -07:00
Kevin Morris
e00b0059f7
doc: remove --spec popularity from cron recommendations
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-09-26 01:27:37 -07:00
moson-mo
137644e919
docs: suggest shallow clone in git-archive.md
we should be suggesting to make a shallow clone to reduce
the amount of data that is being transferred initially

Signed-off-by: moson-mo <mo-son@mailbox.org>
2022-09-25 10:03:05 +02:00
Kevin Morris
30e72d2db5 feat: archive git repository (experimental)
See doc/git-archive.md for general Git archive specifications
See doc/repos/metadata-repo.md for info and direction related to the new Git metadata archive
2022-09-24 16:51:25 +00:00
Joakim Saario
9c6c13b78a
style: Run pre-commit 2022-08-22 22:40:45 +02:00
Kevin Morris
8e43932aa6
fix(doc): re-add Max-Age to list of secure cookie attributes
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-08-18 14:57:42 -07:00
Joakim Saario
f10732960c
fix: Use SameSite=Lax on cookies 2022-08-18 23:42:33 +02:00
Kevin Morris
fb1fb2ef3b
feat: documentation for web authentication (login, verification)
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-08-17 09:59:56 -07:00
Kevin Morris
1bb4daa36a
doc: merge CodingGuidelines into CONTRIBUTING.md
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-23 18:54:35 -08:00
Kevin Morris
f928a49c8a
doc(rpc): Request Types -> Request Methods & reword description
The POST description was ridiculously confusing. This cleans up the
doc a bit and is hopefully a bit more straight-forward.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-10 00:16:32 -08:00
Kevin Morris
40a0e866e7
feat(archives): add {archive}.sha256 and construct archives in tmpdir
This change brings some new additions to our archives:
- SHA-256 .sha256 hexdigests
- We construct our archives in a tmpdir now and move them to the
archive destination when all are completed. This removes some
corrupted downloading when archiving is in-process.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-08 13:28:39 -08:00
Kevin Morris
2dfa41c9a5
feat(rpc): support POST method
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-07 00:49:34 -08:00
Kevin Morris
c1420b52fb
fix: rpc doc should not have v=6 information
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-05 03:47:15 -08:00
Kevin Morris
6986d1bb1e
fix: update rpc documentation
- we no longer prefer the use of trailing slashes on the AUR
  website.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-04 21:27:01 -08:00
Kevin Morris
a2dfb97b6b
fix: add dependency step to docker.md
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-19 08:15:28 -08:00
Kevin Morris
5e52bafb5c
add doc/docker.md & update README.md
Changes to README.md:
- Added Documentation links to various documents in the repository.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-19 08:13:35 -08:00
Kevin Morris
a467b18474
Merge branch 'pu': pre-v6.0.0
Release v6.0.0 - Python

This documents UX and functional changes for the v6.0.0 aurweb release.
Following this release, we'll be working on a few very nice features
noted at the end of this article in Upcoming Work.

Preface
-------

This v6.0.0 release makes the long-awaited Python port official.

Along with the development of the python port, we have modified a
number of features. There have been some integral changes to how
package requests are dealt with, so _Trusted Users_ should read
the entirety of this document.

Legend
------

There are a few terms which I'd like to define to increase
understanding of these changes as they are listed:

- _self_
    - Refers to a user viewing or doing something regarding their own account
- _/pkgbase/{name}/{action}_
    - Refers to a POST action which can be triggered via the relevent package
      page at `/{pkgbase,packages}/{name}`.

Grouped changes explained in multiple items will always be prefixed with
the same letter surrounded by braces. Example:

- [A] Some feature that does something
- [A] The same feature where another thing has changed

Infrastructure
--------------

- Python packaging is now done with poetry.
- SQLite support has been removed. This was done because even though
  SQLAlchemy is an ORM, SQLite has quite a few SQL-server-like features
  missing both out of the box and integrally which force us to account
  for the different database types. We now only support mysql, and should
  be able to support postgresql without much effort in the future.
  Note: Users wishing to easily spin up a database quickly can use
  `docker-compose up -d mariadb` for a Docker-hosted mariadb service.
- An example systemd service has been included at `examples/aurweb.service`.
- Example wrappers to `aurweb-git-(auth|serve|update)` have been included
  at `examples/aurweb-git-(auth|serve|update).sh` and should be used to
  call these scripts when aurweb is installed into a poetry virtualenv.

HTML
----

- Pagers have all been modified. They still serve the same purpose, but
  they have slightly different display.
- Some markup and methods around the website has been changed for
  post requests, and some forms have been completely reworked.

Package Requests
----------------

- Normal users can now view and close their own requests
- [A] Requests can no longer be accepted through manual closures
- [A] Requests are now closed via their relevent actions
    - Deletion
        - Through `/packages` bulk delete action
        - Through `/pkgbase/{name}/delete`
    - Merge
        - Through `/pkgbase/{name}/merge`
    - Orphan
        - Through `/packages` bulk disown action
        - Through `/pkgbase/{name}/disown`
- Deletion and merge requests (and their closures) are now autogenerated
  if no pre-existing request exists. This was done to increase tracking of
  package modifications performed by those with access to do so (TUs).
- Deletion, merge and orphan request actions now close all (1 or more)
  requests pertaining to the action performed. This comes with the downside
  of multiple notifications sent out about a closure if more than one
  request (or no request) exists for them
- Merge actions now automatically reject other pre-existing merge requests
  with a mismatched `MergeBaseName` column when a merge action is performed
- The last `/requests` page no longer goes nowhere

Package Bulk Actions: /packages
-------------------------------

- The `Merge into` field has been removed. Merges now require being
  performed via the `/pkgbase/{name}/merge` action.

Package View
------------

- Some cached metadata is no longer cached (pkginfo). Previously,
  this was defaulted to a one day cache for some package information.
  If we need to bring this back, we can.

TU Proposals
------------

- A valid username is now required for any addition or removal of a TU.

RPC
---

- `type=get-comment-form` has been removed and is now located at
  `/pkgbase/{name}/comments/{id}/form`.
- Support for versions 1-4 have been removed.
- JSON key ordering is different than PHP's JSON.
- `type=search` performance is overall slightly worse than PHP's. This
  should not heavily affect users, as a 3,000 record query is returned
  in roughly 0.20ms from a local standpoint. We will be working on this
  in aim to push it over PHP.

Archives
--------

- Added metadata archive `packages-meta-v1.json.gz`.
- Added metadata archive `packages-meta-ext-v1.json.gz`.
    - Enable this by passing `--extended` to `aurweb-mkpkglists`.

Performance Changes
-------------------

As is expected from a complete rewrite of the website, performance
has changed across the board. In most places, Python's implementation
now performs better than the pre-existing PHP implementation, with the
exception of a few routes. Notably:

- `/` loads much quicker as it is now persistently cached forcibly
  for five minutes at a time.
- `/packages` search is much quicker.
- `/packages/{name}` view is slightly slower; we are no longer caching
  various pieces of package info for `cache_pkginfo_ttl`, which is
  defaulted to 86400 seconds, or one day.
- Request actions are slower due to the removal of the `via` parameter.
  We now query the database for requests related to the action based on
  the current state of the DB.
- `/rpc?type=info` queries are slightly quicker.
- `/rpc?type=search` queries of low result counts are quicker.
- `/rpc?type=search` queries of large result counts (> 2500) are slower.
    - We are not satisfied with this. We'll be working on pushing this
      over the edge along with the rest of the DB-intensive routes.
      However, the speed degredation is quite negligible for users'
      experience: 0.12ms PHP vs 0.15ms Python on a 3,000 record query
      on my local 4-core 8-thread system.

Upcoming Work
-------------

This release is the first major release of the Python implementation.
We have multiple tasks up for work immediately, which will bring us
a few more minor versions forward as they are completed.

- Update request and tu vote pagers
- Archive differentials
- Archive mimetypes
- (a) Git scripts to ORM conversion
- (a) Sharness removal
- Restriction of number of requests users can submit
2022-01-18 10:39:59 -08:00
Kevin Morris
fca175ed84
update more documentation
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-18 01:55:41 -08:00
Kevin Morris
3102736b13
update documentation
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-18 01:41:14 -08:00
Kevin Morris
d62af4ceb5
feat(mkpkglists): added metadata archives
Two new archives are available:

- packages-meta-v1.json.gz
    - RPC search formatted data for all packages
    - ~2.1MB at the time of writing.
- packages-meta-ext-v1.json.gz (via --extended)
    - RPC multiinfo formatted data for all packages.
    - ~9.8MB at the time of writing.

New dependencies are required for this update:

- `python-orjson`

All archives served out by aur.archlinux.org distribute the Last-Modified
header and support the If-Modified-Since header, which should be
populated with Last-Modified's value. These should be used by clients
to avoid redownloading the archive when unnecessary.

Additionally, the new meta archives contain a format suitable for
streaming the data as the file is retrieved. It is still in JSON
format, however, users can parse package objects line by line after
the first '[' found in the file, until the last ']'; both contained
on their own lines.

Note: This commit is a documentation change and commit body.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-09 02:07:04 -08:00
Kevin Morris
cdca8bd295
feat(mkpkglists): added metadata archives
Two new archives are available:

- packages-meta-v1.json.gz
    - RPC search formatted data for all packages
    - ~2.1MB at the time of writing.
- packages-meta-ext-v1.json.gz (via --extended)
    - RPC multiinfo formatted data for all packages.
    - ~9.8MB at the time of writing.

New dependencies are required for this update:

- `python-orjson`

All archives served out by aur.archlinux.org distribute the Last-Modified
header and support the If-Modified-Since header, which should be
populated with Last-Modified's value. These should be used by clients
to avoid redownloading the archive when unnecessary.

Additionally, the new meta archives contain a format suitable for
streaming the data as the file is retrieved. It is still in JSON
format, however, users can parse package objects line by line after
the first '[' found in the file, until the last ']'; both contained
on their own lines.

Note: This commit is a documentation change and commit body.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-06 16:42:12 -07:00
turret-dev
8bf6384504
migrate all links from git.archlinux.org -> gitlab.archlinux.org
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2021-07-14 21:46:47 -04:00
Kristian Klausen
bab74dd307
Update wiki links to the new short URL
Done with: find -type f -exec sed -Ee ':wiki.archlinux.org: s:(wiki.archlinux.org)/index.php/:\1/title/:g' -i {} \;

Fixes #16

[1] https://gitlab.archlinux.org/archlinux/infrastructure/-/merge_requests/335

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2021-05-09 18:06:32 -04:00
Kevin Morris
efe99dc16f Support conjunctive keyword search in RPC interface
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 keyword `blah blah` AND `haha`:
https://aur.archlinux.org/rpc/?v=6&type=search&arg="blah blah"%20haha

Search for packages containing the literal keyword `abc 123`:
https://aur.archlinux.org/rpc/?v=6&type=search&arg="abc 123"

The following example searches for packages that contain `blah` AND `abc`:
https://aur.archlinux.org/rpc/?v=6&type=search&arg=blah%20abc

The legacy method still searches for packages that contain `blah abc`:
https://aur.archlinux.org/rpc/?v=5&type=search&arg=blah%20abc
https://aur.archlinux.org/rpc/?v=5&type=search&arg=blah%20abc

API Version 6 is currently only considered during a `search` of `name-desc`.

Note: This change was written as a solution to
https://bugs.archlinux.org/task/49133.

PS: + Some spacing issues fixed in comments.

Signed-off-by: Kevin Morris <kevr.gtalk@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2021-02-20 11:24:30 -05:00
Frédéric Mangano-Tarumi
2b439b8199 Guide to setting up Keycloak for the SSO
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2021-02-20 11:24:30 -05:00
Lukas Fleischer
a29155ac5b Document maintenance tasks and internals
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2019-11-01 16:45:31 -04:00
Lukas Fleischer
840ee20f7b Rename translation resources from aur to aurweb
* Rename the aur project to aurweb on Transifex.
* Rename aur.pot to aurweb.pot.
* Update documentation and Makefile.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2018-07-07 16:05:12 +02:00
Baptiste Jonglez
1ff409874e RPC: Allow to search packages by "*depends" fields
It is now possible to search for packages that depend on a given package,
for instance:

    /rpc/?v=5&type=search&by=depends&arg=ocaml

It is similarly possible to match on "makedepends", "checkdepends" and
"optdepends".

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2018-02-24 14:57:31 +01:00
Eli Schwartz
c5302d3a33 Require TUs to explicitly request to overwrite a pkgbase
AUR_PRIVILEGED allows people with privileged AUR accounts to evade the
block on non-fast-forward commits. While valid in this case, we should
not do so by default, since in at least one case a TU did this without
realizing there was an existing package.
( https://aur.archlinux.org/packages/rtmidi/ )

Switch to using allow_overwrite to check for destructive actions.
Use .ssh/config "SendEnv" on the TU's side and and sshd_config
"AcceptEnv" in the AUR server to specifically request overwrite access.
TUs should use: `AUR_OVERWRITE=1 git push --force`

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-07-25 20:12:11 +02:00
Lukas Fleischer
ad4acfb9aa Document new git-serve commands
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-07-22 17:46:54 +02:00
Lukas Fleischer
087b539cbc Document garbage collection settings for Git
Add a note to the Git/SSH interface documentation that we recommend to
disable automatic garbage collection and use a maintenance script to
cleanup and optimize the Git repository instead.

Also, add a reference to the Git/SSH interface documentation to the Git
repository setup instructions in INSTALL.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-17 08:50:21 +01:00
Lukas Fleischer
9cab008e15 Update the Git/SSH interface documentation
Add information on the new set-keywords command and slightly reword some
paragraphs.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-07-11 17:45:48 +02:00
Lukas Fleischer
333596ab4a Update Arch Linux projects subdomain
The projects.archlinux.org subdomain was moved to git.archlinux.org.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-06-08 22:23:57 +02:00
Lukas Fleischer
ff36b23153 Fix instructions for omitting "have" lines
In 002d348 (Describe how to omit "have" lines, 2015-11-14), we added
instructions on how to omit "have" lines originating from other package
repositories. Fix those instructions such that the HEAD ref of the
repository is transferred properly.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-15 17:58:45 +01:00
Lukas Fleischer
002d348d90 Describe how to omit "have" lines
A new feature in Git allows for omitting "have" lines corresponding to
refs outside the current Git namespace. Explain how to enable this
feature in the INSTALL instructions and in the Git interface
documentation.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-11-14 13:40:53 +01:00
Lukas Fleischer
1f6237ffa7 aurjson: Rename the search_by parameter to "by"
This parameter is only supported by the search command. We do not need
to repeat ourselves.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-09 17:35:51 +02:00
Lukas Fleischer
a99c0fe5d3 Add documentation Makefile
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-04 11:40:38 +02:00
Lukas Fleischer
a8552f5444 Update RPC interface documentation
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-04 11:40:38 +02:00
Lukas Fleischer
bc2ee0c63f Add documentation of the RPC interface
Convert the RPC interface documentation from web/html/rpc.php to
AsciiDoc and add it to the documentation directory.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-04 09:30:08 +02:00
Stefan Auditor
7eaab63216 Update translation documentation
Update the link to the project page on Transifex and remove an outdated link
to the Arch Wiki.

Fixes FS#45966.

Signed-off-by: Stefan Auditor <stefan.auditor@erdfisch.de>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-16 21:35:31 +02:00
Lukas Fleischer
4112e572aa Add a restore command to the SSH interface
Implement a new command that can be used to restore deleted package
bases without having to push a new commit.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-16 06:49:12 +02:00
Lukas Fleischer
e8a6fe1efc Document the Git/SSH interface
Add a document describing how the Git/SSH interface works internally.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Lukas Fleischer
ab25775259 Move documentation to a subdirectory
Create a new subdirectory doc/ that contains documentation.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00