diff --git a/.coveragerc b/.coveragerc index f732c9c0..69c153ce 100644 --- a/.coveragerc +++ b/.coveragerc @@ -3,7 +3,7 @@ disable_warnings = already-imported [report] include = aurweb/* -fail_under = 95 +fail_under = 85 exclude_lines = if __name__ == .__main__.: pragma: no cover diff --git a/.dockerignore b/.dockerignore index 56ac1964..6ec5547d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,23 +1,6 @@ -# Config files +*/*.mo conf/config conf/config.sqlite conf/config.sqlite.defaults conf/docker conf/docker.defaults - -# Compiled translation files -**/*.mo - -# Typical virtualenv directories -env/ -venv/ -.venv/ - -# Test output -htmlcov/ -test-emails/ -test/__pycache__ -test/test-results -test/trash_directory* -.coverage -.pytest_cache diff --git a/.editorconfig b/.editorconfig index 1a8f5d77..5a751aad 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,5 @@ # EditorConfig configuration for aurweb -# https://editorconfig.org +# https://EditorConfig.org # Top-most EditorConfig file root = true @@ -8,3 +8,6 @@ root = true end_of_line = lf insert_final_newline = true charset = utf-8 + +[*.{php,t}] +indent_style = tab diff --git a/.env b/.env index bf6c48c4..22846cb4 100644 --- a/.env +++ b/.env @@ -1,6 +1,7 @@ FASTAPI_BACKEND="uvicorn" FASTAPI_WORKERS=2 MARIADB_SOCKET_DIR="/var/run/mysqld/" +AURWEB_PHP_PREFIX=https://localhost:8443 AURWEB_FASTAPI_PREFIX=https://localhost:8444 AURWEB_SSHD_PREFIX=ssh://aur@localhost:2222 GIT_DATA_DIR="./aur.git/" diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs deleted file mode 100644 index d3c9887b..00000000 --- a/.git-blame-ignore-revs +++ /dev/null @@ -1,2 +0,0 @@ -# style: Run pre-commit -9c6c13b78a30cb9d800043410799e29631f803d2 diff --git a/.gitignore b/.gitignore index 97157118..8388694c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -/data/ __pycache__/ *.py[cod] .vim/ @@ -24,6 +23,7 @@ conf/docker conf/docker.defaults data.sql dummy-data.sql* +env/ fastapi_aw/ htmlcov/ po/*.mo @@ -31,7 +31,7 @@ po/*.po~ po/POTFILES schema/aur-schema-sqlite.sql test/test-results/ -test/trash_directory* +test/trash directory* web/locale/*/ web/html/*.gz @@ -43,21 +43,3 @@ doc/rpc.html # Ignore .python-version file from Pyenv .python-version - -# Ignore coverage report -coverage.xml - -# Ignore pytest report -report.xml - -# Ignore test emails -test-emails/ - -# Ignore typical virtualenv directories -env/ -venv/ -.venv/ - -# Ignore some terraform files -/ci/tf/.terraform -/ci/tf/terraform.tfstate* diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f30994c7..c5554e92 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,8 +4,6 @@ cache: paths: # For some reason Gitlab CI only supports storing cache/artifacts in a path relative to the build directory - .pkg-cache - - .venv - - .pre-commit variables: AUR_CONFIG: conf/config # Default MySQL config setup in before_script. @@ -13,27 +11,28 @@ variables: TEST_RECURSION_LIMIT: 10000 CURRENT_DIR: "$(pwd)" LOG_CONFIG: logging.test.conf - DEV_FQDN: aurweb-$CI_COMMIT_REF_SLUG.sandbox.archlinux.page - INFRASTRUCTURE_REPO: https://gitlab.archlinux.org/archlinux/infrastructure.git lint: + variables: + # Space-separated list of directories that should be linted. + REQUIRES_LINT: "aurweb test migrations" stage: .pre before_script: - - pacman -Sy --noconfirm --noprogressbar + - pacman -Sy --noconfirm --noprogressbar --cachedir .pkg-cache archlinux-keyring - - pacman -Syu --noconfirm --noprogressbar - git python python-pre-commit + - pacman -Syu --noconfirm --noprogressbar --cachedir .pkg-cache + python python-isort flake8 script: - - export XDG_CACHE_HOME=.pre-commit - - pre-commit run -a + - bash -c 'flake8 --count $(echo "$REQUIRES_LINT" | xargs); exit $?' + - bash -c 'isort --check-only $(echo "$REQUIRES_LINT" | xargs); exit $?' test: stage: test + tags: + - fast-single-thread before_script: - export PATH="$HOME/.poetry/bin:${PATH}" - ./docker/scripts/install-deps.sh - - virtualenv -p python3 .venv - - source .venv/bin/activate # Enable our virtualenv cache - ./docker/scripts/install-python-deps.sh - useradd -U -d /aurweb -c 'AUR User' aur - ./docker/mariadb-entrypoint.sh @@ -49,113 +48,42 @@ test: # Run sharness. - make -C test sh # Run pytest. - - pytest --junitxml="pytest-report.xml" + - pytest - make -C test coverage # Produce coverage reports. - coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' + coverage: '/TOTAL.*\s+(\d+\%)/' artifacts: reports: - junit: pytest-report.xml - coverage_report: - coverage_format: cobertura - path: coverage.xml + cobertura: coverage.xml -.init_tf: &init_tf - - pacman -Syu --needed --noconfirm terraform - - export TF_VAR_name="aurweb-${CI_COMMIT_REF_SLUG}" - - TF_ADDRESS="${CI_API_V4_URL}/projects/${TF_STATE_PROJECT}/terraform/state/${CI_COMMIT_REF_SLUG}" - - cd ci/tf - - > - terraform init \ - -backend-config="address=${TF_ADDRESS}" \ - -backend-config="lock_address=${TF_ADDRESS}/lock" \ - -backend-config="unlock_address=${TF_ADDRESS}/lock" \ - -backend-config="username=x-access-token" \ - -backend-config="password=${TF_STATE_GITLAB_ACCESS_TOKEN}" \ - -backend-config="lock_method=POST" \ - -backend-config="unlock_method=DELETE" \ - -backend-config="retry_wait_min=5" - -deploy_review: +deploy: stage: deploy - script: - - *init_tf - - terraform apply -auto-approve - environment: - name: review/$CI_COMMIT_REF_NAME - url: https://$DEV_FQDN - on_stop: stop_review - auto_stop_in: 1 week + tags: + - secure rules: - - if: $CI_COMMIT_REF_NAME =~ /^renovate\// - when: never - - if: $CI_MERGE_REQUEST_ID && $CI_PROJECT_PATH == "archlinux/aurweb" + - if: $CI_COMMIT_BRANCH == "pu" when: manual - -provision_review: - stage: deploy - needs: - - deploy_review + variables: + FASTAPI_BACKEND: gunicorn + FASTAPI_WORKERS: 5 + AURWEB_PHP_PREFIX: https://aur-dev.archlinux.org + AURWEB_FASTAPI_PREFIX: https://aur-dev.archlinux.org + AURWEB_SSHD_PREFIX: ssh://aur@aur-dev.archlinux.org:2222 + COMMIT_HASH: $CI_COMMIT_SHA + GIT_DATA_DIR: git_data script: - - *init_tf - - pacman -Syu --noconfirm --needed ansible git openssh jq - # Get ssh key from terraform state file - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - terraform show -json | - jq -r '.values.root_module.resources[] | - select(.address == "tls_private_key.this") | - .values.private_key_openssh' > ~/.ssh/id_ed25519 - - chmod 400 ~/.ssh/id_ed25519 - # Clone infra repo - - git clone $INFRASTRUCTURE_REPO - - cd infrastructure - # Remove vault files - - rm $(git grep -l 'ANSIBLE_VAULT;1.1;AES256$') - # Remove vault config - - sed -i '/^vault/d' ansible.cfg - # Add host config - - mkdir -p host_vars/$DEV_FQDN - - 'echo "filesystem: btrfs" > host_vars/$DEV_FQDN/misc' - # Add host - - echo "$DEV_FQDN" > hosts - # Add our pubkey and hostkeys - - ssh-keyscan $DEV_FQDN >> ~/.ssh/known_hosts - - ssh-keygen -f ~/.ssh/id_ed25519 -y > pubkeys/aurweb-dev.pub - # Run our ansible playbook - - > - ansible-playbook playbooks/aur-dev.archlinux.org.yml \ - -e "aurdev_fqdn=$DEV_FQDN" \ - -e "aurweb_repository=$CI_REPOSITORY_URL" \ - -e "aurweb_version=$CI_COMMIT_SHA" \ - -e "{\"vault_mariadb_users\":{\"root\":\"aur\"}}" \ - -e "vault_aurweb_db_password=aur" \ - -e "vault_aurweb_gitlab_instance=https://does.not.exist" \ - -e "vault_aurweb_error_project=set-me" \ - -e "vault_aurweb_error_token=set-me" \ - -e "vault_aurweb_secret=aur" \ - -e "vault_goaurrpc_metrics_token=aur" \ - -e '{"root_additional_keys": ["moson.pub", "aurweb-dev.pub"]}' - environment: - name: review/$CI_COMMIT_REF_NAME - action: access - rules: - - if: $CI_COMMIT_REF_NAME =~ /^renovate\// - when: never - - if: $CI_MERGE_REQUEST_ID && $CI_PROJECT_PATH == "archlinux/aurweb" + - pacman -Syu --noconfirm docker docker-compose socat openssh + - chmod 600 ${SSH_KEY} + - socat "UNIX-LISTEN:/tmp/docker.sock,reuseaddr,fork" EXEC:"ssh -o UserKnownHostsFile=${SSH_KNOWN_HOSTS} -Ti ${SSH_KEY} ${SSH_USER}@${SSH_HOST}" & + - export DOCKER_HOST="unix:///tmp/docker.sock" + # Set secure login config for aurweb. + - sed -ri "s/^(disable_http_login).*$/\1 = 1/" conf/config.dev + - docker-compose build + - docker-compose -f docker-compose.yml -f docker-compose.aur-dev.yml down --remove-orphans + - docker-compose -f docker-compose.yml -f docker-compose.aur-dev.yml up -d + - docker image prune -f + - docker container prune -f + - docker volume prune -f -stop_review: - stage: deploy - needs: - - deploy_review - script: - - *init_tf - - terraform destroy -auto-approve - - 'curl --silent --show-error --fail --header "Private-Token: ${TF_STATE_GITLAB_ACCESS_TOKEN}" --request DELETE "${CI_API_V4_URL}/projects/${TF_STATE_PROJECT}/terraform/state/${CI_COMMIT_REF_SLUG}"' environment: - name: review/$CI_COMMIT_REF_NAME - action: stop - rules: - - if: $CI_COMMIT_REF_NAME =~ /^renovate\// - when: never - - if: $CI_MERGE_REQUEST_ID && $CI_PROJECT_PATH == "archlinux/aurweb" - when: manual + name: development + url: https://aur-dev.archlinux.org diff --git a/.gitlab/issue_templates/Account Request.md b/.gitlab/issue_templates/Account Request.md new file mode 100644 index 00000000..6831d3ad --- /dev/null +++ b/.gitlab/issue_templates/Account Request.md @@ -0,0 +1,14 @@ +## Checklist + +- [ ] I have set a Username in the Details section +- [ ] I have set an Email in the Details section +- [ ] I have set a valid Account Type in the Details section + +## Details + +- Instance: aur-dev.archlinux.org +- Username: the_username_you_want +- Email: valid@email.org +- Account Type: (User|Trusted User) + +/label account-request diff --git a/.gitlab/issue_templates/Bug.md b/.gitlab/issue_templates/Bug.md index 9e20aadb..3e7a04bf 100644 --- a/.gitlab/issue_templates/Bug.md +++ b/.gitlab/issue_templates/Bug.md @@ -1,24 +1,12 @@ - -/label ~bug ~unconfirmed -/title [BUG] - - ### Checklist -**NOTE:** This bug template is meant to provide bug issues for code existing in -the aurweb repository. +This bug template is meant to provide bug issues for code existing in +the aurweb repository. This bug template is **not meant** to handle +bugs with user-uploaded packages. -**This bug template is not meant to handle bugs with user-uploaded packages.** -To report issues you might have found in a user-uploaded package, contact -the package's maintainer in comments. +To work out a bug you have found in a user-uploaded package, contact +the package's maintainer first. If you receive no response, file the +relevant package request against it so TUs can deal with cleanup. - [ ] I confirm that this is an issue with aurweb's code and not a user-uploaded package. @@ -41,7 +29,7 @@ this bug. ### Logs -If you have any logs relevant to the bug, include them here in +If you have any logs relevent to the bug, include them here in quoted or code blocks. ### Version(s) diff --git a/.gitlab/issue_templates/Feature.md b/.gitlab/issue_templates/Feature.md index 630c53c3..c907adcd 100644 --- a/.gitlab/issue_templates/Feature.md +++ b/.gitlab/issue_templates/Feature.md @@ -1,25 +1,3 @@ - -/label ~feature ~unconfirmed -/title [FEATURE] - - -### Checklist - -**NOTE:** This bug template is meant to provide bug issues for code existing in -the aurweb repository. - -**This bug template is not meant to handle bugs with user-uploaded packages.** -To report issues you might have found in a user-uploaded package, contact -the package's maintainer in comments. - - [ ] I have summed up the feature in concise words in the [Summary](#summary) section. - [ ] I have completely described the feature in the [Description](#description) section. - [ ] I have completed the [Blockers](#blockers) section. @@ -50,3 +28,5 @@ Example: - [Feature] Do not allow users to be Tyrants - \<(issue|merge_request)_link\> + +/label feature unconsidered diff --git a/.gitlab/issue_templates/Feedback.md b/.gitlab/issue_templates/Feedback.md new file mode 100644 index 00000000..950ec0c6 --- /dev/null +++ b/.gitlab/issue_templates/Feedback.md @@ -0,0 +1,58 @@ +**NOTE:** This issue template is only applicable to FastAPI implementations +in the code-base, which only exists within the `pu` branch. If you wish to +file an issue for the current PHP implementation of aurweb, please file a +standard issue prefixed with `[Bug]` or `[Feature]`. + + +**Checklist** + +- [ ] I have prefixed the issue title with `[Feedback]` along with a message + pointing to the route or feature tested. + - Example: `[Feedback] /packages/{name}` +- [ ] I have completed the [Changes](#changes) section. +- [ ] I have completed the [Bugs](#bugs) section. +- [ ] I have completed the [Improvements](#improvements) section. +- [ ] I have completed the [Summary](#summary) section. + +### Changes + +Please describe changes in user experience when compared to the PHP +implementation. This section can actually hold a lot of info if you +are up for it -- changes in routes, HTML rendering, back-end behavior, +etc. + +If you cannot see any changes from your standpoint, include a short +statement about that fact. + +### Bugs + +Please describe any bugs you've experienced while testing the route +pertaining to this issue. A "perfect" bug report would include your +specific experience, what you expected to occur, and what happened +otherwise. If you can, please include output of `docker-compose logs fastapi` +with your report; especially if any unintended exceptions occurred. + +### Improvements + +If you've experienced improvements in the route when compared to PHP, +please do include those here. We'd like to know if users are noticing +these improvements and how they feel about them. + +There are multiple routes with no improvements. For these, just include +a short sentence about the fact that you've experienced none. + +### Summary + +First: If you've gotten here and completed the [Changes](#changes), +[Bugs](#bugs), and [Improvements](#improvements) sections, we'd like +to thank you very much for your contribution and willingness to test. +We are not a company, and we are not a large team; any bit of assistance +here helps the project astronomically and moves us closer toward a +new release. + +That being said: please include an overall summary of your experience +and how you felt about the current implementation which you're testing +in comparison with PHP (current aur.archlinux.org, or https://localhost:8443 +through docker). + +/label feedback diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2431eb3d..525c7eb8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,36 +1,24 @@ +hooks: + - &base + language: python + types: [python] + require_serial: true + exclude: ^migrations/versions + - &flake8 + id: flake8 + name: flake8 + entry: flake8 + <<: *base + - &isort + id: isort + name: isort + entry: isort + <<: *base + repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + - repo: local hooks: - - id: check-added-large-files - - id: check-case-conflict - - id: check-merge-conflict - - id: check-toml - - id: end-of-file-fixer - - id: trailing-whitespace - exclude: ^po/ - - id: debug-statements + - <<: *flake8 + - <<: *isort + args: ['--check-only', '--diff'] - - repo: https://github.com/myint/autoflake - rev: v2.3.1 - hooks: - - id: autoflake - args: - - --in-place - - --remove-all-unused-imports - - --ignore-init-module-imports - - - repo: https://github.com/pycqa/isort - rev: 5.13.2 - hooks: - - id: isort - - - repo: https://github.com/psf/black - rev: 24.4.1 - hooks: - - id: black - - - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 - hooks: - - id: flake8 diff --git a/.tx/config b/.tx/config index 9ba46244..e986f81c 100644 --- a/.tx/config +++ b/.tx/config @@ -1,7 +1,7 @@ [main] -host = https://app.transifex.com +host = https://www.transifex.com -[o:lfleischer:p:aurweb:r:aurwebpot] +[aurweb.aurwebpot] file_filter = po/.po source_file = po/aurweb.pot source_lang = en diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1957ae22..d1b0da60 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,105 +1,19 @@ # Contributing -Patches should be sent to the [aur-dev@lists.archlinux.org][1] mailing list -or included in a merge request on the [aurweb repository][2]. +Patches should be sent to the [aur-dev@lists.archlinux.org][1] mailing list. Before sending patches, you are recommended to run `flake8` and `isort`. You can add a git hook to do this by installing `python-pre-commit` and running `pre-commit install`. -[1]: https://lists.archlinux.org/mailman3/lists/aur-dev.lists.archlinux.org/ -[2]: https://gitlab.archlinux.org/archlinux/aurweb +[1] https://lists.archlinux.org/listinfo/aur-dev ### Coding Guidelines -DISCLAIMER: We realise the code doesn't necessarily follow all the rules. -This is an attempt to establish a standard coding style for future -development. - 1. All source modified or added within a patchset **must** maintain equivalent - or increased coverage by providing tests that use the functionality -2. Please keep your source within an 80 column width -3. Use four space indentation -4. Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) -5. DRY: Don't Repeat Yourself -6. All code should be tested for good _and_ bad cases (see [test/README.md][3]) + or increased coverage by providing tests that use the functionality. -[3]: https://gitlab.archlinux.org/archlinux/aurweb/-/blob/master/test/README.md +2. Please keep your source within an 80 column width. Test patches that increase coverage in the codebase are always welcome. - -### Coding Style - -We use `autoflake`, `isort`, `black` and `flake8` to enforce coding style in a -PEP-8 compliant way. These tools run in GitLab CI using `pre-commit` to verify -that any pushed code changes comply with this. - -To enable the `pre-commit` git hook, install the `pre-commit` package either -with `pacman` or `pip` and then run `pre-commit install --install-hooks`. This -will ensure formatting is done before any code is commited to the git -repository. - -There are plugins for editors or IDEs which automate this process. Some -example plugins: - -- [tenfyzhong/autoflake.vim](https://github.com/tenfyzhong/autoflake.vim) -- [fisadev/vim-isort](https://github.com/fisadev/vim-isort) -- [psf/black](https://github.com/psf/black) -- [nvie/vim-flake8](https://github.com/nvie/vim-flake8) -- [prabirshrestha/vim-lsp](https://github.com/prabirshrestha/vim-lsp) -- [dense-analysis/ale](https://github.com/dense-analysis/ale) - -See `setup.cfg`, `pyproject.toml` and `.pre-commit-config.yaml` for tool -specific configurations. - -### Development Environment - -To get started with local development, an instance of aurweb must be -brought up. This can be done using the following sections: - -- [Using Docker](#using-docker) -- [Using INSTALL](#using-install) - -There are a number of services aurweb employs to run the application -in its entirety: - -- ssh -- cron jobs -- starlette/fastapi asgi server - -Project structure: - -- `./aurweb`: `aurweb` Python package -- `./templates`: Jinja2 templates -- `./docker`: Docker scripts and configuration files - -#### Using Docker - -Using Docker, we can run the entire infrastructure in two steps: - - # Build the aurweb:latest image - $ docker-compose build - - # Start all services in the background - $ docker-compose up -d nginx - -`docker-compose` services will generate a locally signed root certificate -at `./data/root_ca.crt`. Users can import this into ca-certificates or their -browser if desired. - -Accessible services (on the host): - -- https://localhost:8444 (python via nginx) -- localhost:13306 (mariadb) -- localhost:16379 (redis) - -Docker services, by default, are setup to be hot reloaded when source code -is changed. - -For detailed setup instructions have a look at [TESTING](TESTING) - -#### Using INSTALL - -The [INSTALL](INSTALL) file describes steps to install the application on -bare-metal systems. diff --git a/Dockerfile b/Dockerfile index 1f667611..16e6514e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,10 @@ FROM archlinux:base-devel VOLUME /root/.cache/pypoetry/cache VOLUME /root/.cache/pypoetry/artifacts -VOLUME /root/.cache/pre-commit ENV PATH="/root/.poetry/bin:${PATH}" ENV PYTHONPATH=/aurweb ENV AUR_CONFIG=conf/config -ENV COMPOSE=1 # Install system-wide dependencies. COPY ./docker/scripts/install-deps.sh /install-deps.sh @@ -29,7 +27,7 @@ RUN cp -vf conf/config.dev conf/config RUN sed -i "s;YOUR_AUR_ROOT;/aurweb;g" conf/config # Install Python dependencies. -RUN /docker/scripts/install-python-deps.sh compose +RUN /docker/scripts/install-python-deps.sh # Compile asciidocs. RUN make -C doc @@ -42,6 +40,3 @@ RUN ln -sf /usr/share/zoneinfo/UTC /etc/localtime # Install translations. RUN make -C po all install - -# Install pre-commit repositories and run lint check. -RUN pre-commit run -a diff --git a/INSTALL b/INSTALL index 23fb6c3d..03459726 100644 --- a/INSTALL +++ b/INSTALL @@ -14,7 +14,8 @@ read the instructions below. $ cd aurweb $ poetry install -2) Setup a web server with MySQL. The following block can be used with nginx: +2) Setup a web server with PHP and MySQL. Configure the web server to redirect + all URLs to /index.php/foo/bar/. The following block can be used with nginx: server { # https is preferred and can be done easily with LetsEncrypt @@ -30,6 +31,14 @@ read the instructions below. ssl_certificate /etc/ssl/certs/aur.cert.pem; ssl_certificate_key /etc/ssl/private/aur.key.pem; + # Asset root. This is used to match against gzip archives. + root /srv/http/aurweb/web/html; + + # TU Bylaws redirect. + location = /trusted-user/TUbylaws.html { + return 301 https://tu-bylaws.aur.archlinux.org; + } + # smartgit location. location ~ "^/([a-z0-9][a-z0-9.+_-]*?)(\.git)?/(git-(receive|upload)-pack|HEAD|info/refs|objects/(info/(http-)?alternates|packs)|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))$" { include uwsgi_params; @@ -54,9 +63,6 @@ read the instructions below. # Static archive assets. location ~ \.gz$ { - # Asset root. This is used to match against gzip archives. - root /srv/http/aurweb/archives; - types { application/gzip text/plain } default_type text/plain; add_header Content-Encoding gzip; @@ -120,7 +126,7 @@ interval: */2 * * * * bash -c 'poetry run aurweb-pkgmaint' */2 * * * * bash -c 'poetry run aurweb-usermaint' */2 * * * * bash -c 'poetry run aurweb-popupdate' - */12 * * * * bash -c 'poetry run aurweb-votereminder' + */12 * * * * bash -c 'poetry run aurweb-tuvotereminder' 7) Create a new database and a user and import the aurweb SQL schema: diff --git a/README.md b/README.md index adf78c35..3f156455 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ The aurweb project includes * A web interface to search for packaging scripts and display package details. * An SSH/Git interface to submit and update packages and package meta data. * Community features such as comments, votes, package flagging and requests. -* Editing/deletion of packages and accounts by Package Maintainers and Developers. -* Area for Package Maintainers to post AUR-related proposals and vote on them. +* Editing/deletion of packages and accounts by Trusted Users and Developers. +* Area for Trusted Users to post AUR-related proposals and vote on them. Directory Layout ---------------- @@ -26,6 +26,7 @@ Directory Layout * `schema`: schema for the SQL database * `test`: test suite and test cases * `upgrading`: instructions for upgrading setups from one release to another +* `web`: PHP-based web interface for the AUR Documentation ------------- @@ -43,7 +44,7 @@ Links ----- * The repository is hosted at https://gitlab.archlinux.org/archlinux/aurweb - -- see [CONTRIBUTING.md](./CONTRIBUTING.md) for information on the patch submission process. + -- see doc/CodingGuidelines for information on the patch submission process. * Bugs can (and should) be submitted to the aurweb bug tracker: https://gitlab.archlinux.org/archlinux/aurweb/-/issues/new?issuable_template=Bug @@ -56,7 +57,7 @@ Translations ------------ Translations are welcome via our Transifex project at -https://www.transifex.com/lfleischer/aurweb; see [doc/i18n.md](./doc/i18n.md) for details. +https://www.transifex.com/lfleischer/aurweb; see `doc/i18n.txt` for details. ![Transifex](https://www.transifex.com/projects/p/aurweb/chart/image_png) diff --git a/TESTING b/TESTING index e9cbf33b..776be2f4 100644 --- a/TESTING +++ b/TESTING @@ -1,130 +1,50 @@ Setup Testing Environment ========================= -The quickest way to get you hacking on aurweb is to utilize docker. -In case you prefer to run it bare-metal see instructions further below. - -Containerized environment -------------------------- - -1) Clone the aurweb project: - - $ git clone https://gitlab.archlinux.org/archlinux/aurweb.git - $ cd aurweb - -2) Install the necessary packages: - - # pacman -S --needed docker docker-compose - -3) Build the aurweb:latest image: - - # systemctl start docker - # docker compose build - -4) Run local Docker development instance: - - # docker compose up -d - -5) Browse to local aurweb development server. - - https://localhost:8444/ - -6) [Optionally] populate the database with dummy data: - - # docker compose exec mariadb /bin/bash - # pacman -S --noconfirm words fortune-mod - # poetry run schema/gendummydata.py dummy_data.sql - # mariadb -uaur -paur aurweb < dummy_data.sql - # exit - - Inspect `dummy_data.sql` for test credentials. - Passwords match usernames. - -We now have fully set up environment which we can start and stop with: - - # docker compose start - # docker compose stop - -Proceed with topic "Setup for running tests" - - -Bare Metal installation ------------------------ - Note that this setup is only to test the web interface. If you need to have a full aurweb instance with cgit, ssh interface, etc, follow the directions in INSTALL. +docker-compose +-------------- + 1) Clone the aurweb project: - $ git clone git://git.archlinux.org/aurweb.git - $ cd aurweb + $ git clone https://gitlab.archlinux.org/archlinux/aurweb.git 2) Install the necessary packages: - # pacman -S --needed python-poetry mariadb words fortune-mod nginx + # pacman -S docker-compose -3) Install the package/dependencies via `poetry`: +2) Build the aurweb:latest image: - $ poetry install + $ cd /path/to/aurweb/ + $ docker-compose build -4) Copy conf/config.dev to conf/config and replace YOUR_AUR_ROOT by the absolute - path to the root of your aurweb clone. sed can do both tasks for you: +3) Run local Docker development instance: - $ sed -e "s;YOUR_AUR_ROOT;$PWD;g" conf/config.dev > conf/config + $ cd /path/to/aurweb/ + $ docker-compose up -d nginx - Note that when the upstream config.dev is updated, you should compare it to - your conf/config, or regenerate your configuration with the command above. +4) Browse to local aurweb development server. -5) Set up mariadb: + Python: https://localhost:8444/ + PHP: https://localhost:8443/ - # mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql - # systemctl start mariadb - # mariadb -u root - > CREATE USER 'aur'@'localhost' IDENTIFIED BY 'aur'; - > GRANT ALL ON *.* TO 'aur'@'localhost' WITH GRANT OPTION; - > CREATE DATABASE aurweb; - > exit +Bare Metal +---------- -6) Prepare a database and insert dummy data: +1) Clone the aurweb project: - $ AUR_CONFIG=conf/config poetry run python -m aurweb.initdb - $ poetry run schema/gendummydata.py dummy_data.sql - $ mariadb -uaur -paur aurweb < dummy_data.sql + $ git clone git://git.archlinux.org/aurweb.git -7) Run the test server: +2) Install the necessary packages: - ## set AUR_CONFIG to our locally created config - $ export AUR_CONFIG=conf/config + # pacman -S python-poetry - ## with aurweb.spawn - $ poetry run python -m aurweb.spawn - - ## with systemd service - $ sudo install -m644 examples/aurweb.service /etc/systemd/system/ - # systemctl enable --now aurweb.service - - -Setup for running tests ------------------------ - -If you've set up a docker environment, you can run the full test-suite with: - # docker compose run test - -You can collect code-coverage data with: - $ ./util/fix-coverage data/.coverage - -See information further below on how to visualize the data. - -For running individual tests, we need to perform a couple of additional steps. -In case you did the bare-metal install, steps 2, 3, 4 and 5 should be skipped. - -1) Install the necessary packages: - - # pacman -S --needed python-poetry mariadb-libs asciidoc openssh - -2) Install the package/dependencies via `poetry`: +4) Install the package/dependencies via `poetry`: + $ cd /path/to/aurweb/ $ poetry install 3) Copy conf/config.dev to conf/config and replace YOUR_AUR_ROOT by the absolute @@ -135,51 +55,23 @@ In case you did the bare-metal install, steps 2, 3, 4 and 5 should be skipped. Note that when the upstream config.dev is updated, you should compare it to your conf/config, or regenerate your configuration with the command above. -4) Edit the config file conf/config and change the mysql/mariadb portion +4) Prepare a database: - We can make use of our mariadb docker container instead of having to install - mariadb. Change the config as follows: + $ cd /path/to/aurweb/ - --------------------------------------------------------------------- - ; MySQL database information. User defaults to root for containerized - ; testing with mysqldb. This should be set to a non-root user. - user = root - password = aur - host = 127.0.0.1 - port = 13306 - ;socket = /var/run/mysqld/mysqld.sock - --------------------------------------------------------------------- + $ AUR_CONFIG=conf/config poetry run python -m aurweb.initdb -5) Start our mariadb docker container + $ poetry run schema/gendummydata.py dummy_data.sql + $ mysql -uaur -paur aurweb < dummy_data.sql - # docker compose start mariadb +5) Run the test server: -6) Set environment variables + ## set AUR_CONFIG to our locally created config + $ export AUR_CONFIG=conf/config - $ export AUR_CONFIG=conf/config - $ export LOG_CONFIG=logging.test.conf + ## with aurweb.spawn + $ poetry run python -m aurweb.spawn -7) Compile translation & doc files - - $ make -C po install - $ make -C doc - -Now we can run our python test-suite or individual tests with: - - $ poetry run pytest test/ - $ poetry run pytest test/test_whatever.py - -To run Sharness tests: - - $ poetry run make -C test sh - -The e-Mails that have been generated can be found at test-emails/ - -After test runs, code-coverage reports can be created with: - ## CLI report - $ coverage report - - ## HTML version stored at htmlcov/ - $ coverage html - -More information about tests can be found at test/README.md + ## with systemd service + $ sudo install -m644 examples/aurweb.service /etc/systemd/system/ + $ systemctl enable --now aurweb.service diff --git a/aurweb/archives/__init__.py b/aurweb/archives/__init__.py deleted file mode 100644 index 47020641..00000000 --- a/aurweb/archives/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# aurweb.archives diff --git a/aurweb/archives/spec/__init__.py b/aurweb/archives/spec/__init__.py deleted file mode 100644 index b6e376b4..00000000 --- a/aurweb/archives/spec/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# aurweb.archives.spec diff --git a/aurweb/archives/spec/base.py b/aurweb/archives/spec/base.py deleted file mode 100644 index 60f734f2..00000000 --- a/aurweb/archives/spec/base.py +++ /dev/null @@ -1,77 +0,0 @@ -from pathlib import Path -from typing import Any, Dict, Iterable, List, Set - - -class GitInfo: - """Information about a Git repository.""" - - """ Path to Git repository. """ - path: str - - """ Local Git repository configuration. """ - config: Dict[str, Any] - - def __init__(self, path: str, config: Dict[str, Any] = dict()) -> "GitInfo": - self.path = Path(path) - self.config = config - - -class SpecOutput: - """Class used for git_archive.py output details.""" - - """ Filename relative to the Git repository root. """ - filename: Path - - """ Git repository information. """ - git_info: GitInfo - - """ Bytes bound for `SpecOutput.filename`. """ - data: bytes - - def __init__(self, filename: str, git_info: GitInfo, data: bytes) -> "SpecOutput": - self.filename = filename - self.git_info = git_info - self.data = data - - -class SpecBase: - """ - Base for Spec classes defined in git_archve.py --spec modules. - - All supported --spec modules must contain the following classes: - - Spec(SpecBase) - """ - - """ A list of SpecOutputs, each of which contain output file data. """ - outputs: List[SpecOutput] = list() - - """ A set of repositories to commit changes to. """ - repos: Set[str] = set() - - def generate(self) -> Iterable[SpecOutput]: - """ - "Pure virtual" output generator. - - `SpecBase.outputs` and `SpecBase.repos` should be populated within an - overridden version of this function in SpecBase derivatives. - """ - raise NotImplementedError() - - def add_output(self, filename: str, git_info: GitInfo, data: bytes) -> None: - """ - Add a SpecOutput instance to the set of outputs. - - :param filename: Filename relative to the git repository root - :param git_info: GitInfo instance - :param data: Binary data bound for `filename` - """ - if git_info.path not in self.repos: - self.repos.add(git_info.path) - - self.outputs.append( - SpecOutput( - filename, - git_info, - data, - ) - ) diff --git a/aurweb/archives/spec/metadata.py b/aurweb/archives/spec/metadata.py deleted file mode 100644 index ce7c6f30..00000000 --- a/aurweb/archives/spec/metadata.py +++ /dev/null @@ -1,85 +0,0 @@ -from typing import Iterable - -import orjson - -from aurweb import config, db -from aurweb.models import Package, PackageBase, User -from aurweb.rpc import RPC - -from .base import GitInfo, SpecBase, SpecOutput - -ORJSON_OPTS = orjson.OPT_SORT_KEYS | orjson.OPT_INDENT_2 - - -class Spec(SpecBase): - def __init__(self) -> "Spec": - self.metadata_repo = GitInfo( - config.get("git-archive", "metadata-repo"), - ) - - def generate(self) -> Iterable[SpecOutput]: - # Base query used by the RPC. - base_query = ( - db.query(Package) - .join(PackageBase) - .join(User, PackageBase.MaintainerUID == User.ID, isouter=True) - ) - - # Create an instance of RPC, use it to get entities from - # our query and perform a metadata subquery for all packages. - rpc = RPC(version=5, type="info") - print("performing package database query") - packages = rpc.entities(base_query).all() - print("performing package database subqueries") - rpc.subquery({pkg.ID for pkg in packages}) - - pkgbases, pkgnames = dict(), dict() - for package in packages: - # Produce RPC type=info data for `package` - data = rpc.get_info_json_data(package) - - pkgbase_name = data.get("PackageBase") - pkgbase_data = { - "ID": data.pop("PackageBaseID"), - "URLPath": data.pop("URLPath"), - "FirstSubmitted": data.pop("FirstSubmitted"), - "LastModified": data.pop("LastModified"), - "OutOfDate": data.pop("OutOfDate"), - "Maintainer": data.pop("Maintainer"), - "Keywords": data.pop("Keywords"), - "NumVotes": data.pop("NumVotes"), - "Popularity": data.pop("Popularity"), - "PopularityUpdated": package.PopularityUpdated.timestamp(), - } - - # Store the data in `pkgbases` dict. We do this so we only - # end up processing a single `pkgbase` if repeated after - # this loop - pkgbases[pkgbase_name] = pkgbase_data - - # Remove Popularity and NumVotes from package data. - # These fields change quite often which causes git data - # modification to explode. - # data.pop("NumVotes") - # data.pop("Popularity") - - # Remove the ID key from package json. - data.pop("ID") - - # Add the `package`.Name to the pkgnames set - name = data.get("Name") - pkgnames[name] = data - - # Add metadata outputs - self.add_output( - "pkgname.json", - self.metadata_repo, - orjson.dumps(pkgnames, option=ORJSON_OPTS), - ) - self.add_output( - "pkgbase.json", - self.metadata_repo, - orjson.dumps(pkgbases, option=ORJSON_OPTS), - ) - - return self.outputs diff --git a/aurweb/archives/spec/pkgbases.py b/aurweb/archives/spec/pkgbases.py deleted file mode 100644 index db2085cc..00000000 --- a/aurweb/archives/spec/pkgbases.py +++ /dev/null @@ -1,26 +0,0 @@ -from typing import Iterable - -import orjson - -from aurweb import config, db -from aurweb.models import PackageBase - -from .base import GitInfo, SpecBase, SpecOutput - -ORJSON_OPTS = orjson.OPT_SORT_KEYS | orjson.OPT_INDENT_2 - - -class Spec(SpecBase): - def __init__(self) -> "Spec": - self.pkgbases_repo = GitInfo(config.get("git-archive", "pkgbases-repo")) - - def generate(self) -> Iterable[SpecOutput]: - query = db.query(PackageBase.Name).order_by(PackageBase.Name.asc()).all() - pkgbases = [pkgbase.Name for pkgbase in query] - - self.add_output( - "pkgbase.json", - self.pkgbases_repo, - orjson.dumps(pkgbases, option=ORJSON_OPTS), - ) - return self.outputs diff --git a/aurweb/archives/spec/pkgnames.py b/aurweb/archives/spec/pkgnames.py deleted file mode 100644 index 3df62af6..00000000 --- a/aurweb/archives/spec/pkgnames.py +++ /dev/null @@ -1,31 +0,0 @@ -from typing import Iterable - -import orjson - -from aurweb import config, db -from aurweb.models import Package, PackageBase - -from .base import GitInfo, SpecBase, SpecOutput - -ORJSON_OPTS = orjson.OPT_SORT_KEYS | orjson.OPT_INDENT_2 - - -class Spec(SpecBase): - def __init__(self) -> "Spec": - self.pkgnames_repo = GitInfo(config.get("git-archive", "pkgnames-repo")) - - def generate(self) -> Iterable[SpecOutput]: - query = ( - db.query(Package.Name) - .join(PackageBase, PackageBase.ID == Package.PackageBaseID) - .order_by(Package.Name.asc()) - .all() - ) - pkgnames = [pkg.Name for pkg in query] - - self.add_output( - "pkgname.json", - self.pkgnames_repo, - orjson.dumps(pkgnames, option=ORJSON_OPTS), - ) - return self.outputs diff --git a/aurweb/archives/spec/users.py b/aurweb/archives/spec/users.py deleted file mode 100644 index 80da1641..00000000 --- a/aurweb/archives/spec/users.py +++ /dev/null @@ -1,26 +0,0 @@ -from typing import Iterable - -import orjson - -from aurweb import config, db -from aurweb.models import User - -from .base import GitInfo, SpecBase, SpecOutput - -ORJSON_OPTS = orjson.OPT_SORT_KEYS | orjson.OPT_INDENT_2 - - -class Spec(SpecBase): - def __init__(self) -> "Spec": - self.users_repo = GitInfo(config.get("git-archive", "users-repo")) - - def generate(self) -> Iterable[SpecOutput]: - query = db.query(User.Username).order_by(User.Username.asc()).all() - users = [user.Username for user in query] - - self.add_output( - "users.json", - self.users_repo, - orjson.dumps(users, option=ORJSON_OPTS), - ) - return self.outputs diff --git a/aurweb/asgi.py b/aurweb/asgi.py index 4a0c1113..fa2526ed 100644 --- a/aurweb/asgi.py +++ b/aurweb/asgi.py @@ -6,21 +6,17 @@ import re import sys import traceback import typing -from contextlib import asynccontextmanager + from urllib.parse import quote_plus import requests + from fastapi import FastAPI, HTTPException, Request, Response from fastapi.responses import RedirectResponse from fastapi.staticfiles import StaticFiles from jinja2 import TemplateNotFound -from opentelemetry import trace -from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter -from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor -from opentelemetry.sdk.resources import Resource -from opentelemetry.sdk.trace import TracerProvider -from opentelemetry.sdk.trace.export import BatchSpanProcessor -from sqlalchemy import and_ +from prometheus_client import multiprocess +from sqlalchemy import and_, or_ from starlette.exceptions import HTTPException as StarletteHTTPException from starlette.middleware.authentication import AuthenticationMiddleware from starlette.middleware.sessions import SessionMiddleware @@ -28,29 +24,23 @@ from starlette.middleware.sessions import SessionMiddleware import aurweb.captcha # noqa: F401 import aurweb.config import aurweb.filters # noqa: F401 -from aurweb import aur_logging, prometheus, util -from aurweb.aur_redis import redis_connection +import aurweb.logging +import aurweb.pkgbase.util as pkgbaseutil + +from aurweb import logging, prometheus, util from aurweb.auth import BasicAuthBackend from aurweb.db import get_engine, query from aurweb.models import AcceptedTerm, Term from aurweb.packages.util import get_pkg_or_base from aurweb.prometheus import instrumentator +from aurweb.redis import redis_connection from aurweb.routers import APP_ROUTES from aurweb.templates import make_context, render_template -logger = aur_logging.get_logger(__name__) -session_secret = aurweb.config.get("fastapi", "session_secret") - - -@asynccontextmanager -async def lifespan(app: FastAPI): - await app_startup() - yield - +logger = logging.get_logger(__name__) # Setup the FastAPI app. -app = FastAPI(lifespan=lifespan) - +app = FastAPI() # Instrument routes with the prometheus-fastapi-instrumentator # library with custom collectors and expose /metrics. @@ -59,17 +49,7 @@ instrumentator().add(prometheus.http_requests_total()) instrumentator().instrument(app) -# Instrument FastAPI for tracing -FastAPIInstrumentor.instrument_app(app) - -resource = Resource(attributes={"service.name": "aurweb"}) -otlp_endpoint = aurweb.config.get("tracing", "otlp_endpoint") -otlp_exporter = OTLPSpanExporter(endpoint=otlp_endpoint) -span_processor = BatchSpanProcessor(otlp_exporter) -trace.set_tracer_provider(TracerProvider(resource=resource)) -trace.get_tracer_provider().add_span_processor(span_processor) - - +@app.on_event("startup") async def app_startup(): # https://stackoverflow.com/questions/67054759/about-the-maximum-recursion-error-in-fastapi # Test failures have been observed by internal starlette code when @@ -80,39 +60,53 @@ async def app_startup(): # provided by the user. Docker uses .env's TEST_RECURSION_LIMIT # when running test suites. # TODO: Find a proper fix to this issue. - recursion_limit = int( - os.environ.get("TEST_RECURSION_LIMIT", sys.getrecursionlimit() + 1000) - ) + recursion_limit = int(os.environ.get( + "TEST_RECURSION_LIMIT", sys.getrecursionlimit() + 1000)) sys.setrecursionlimit(recursion_limit) backend = aurweb.config.get("database", "backend") if backend not in aurweb.db.DRIVERS: raise ValueError( f"The configured database backend ({backend}) is unsupported. " - f"Supported backends: {str(aurweb.db.DRIVERS.keys())}" - ) + f"Supported backends: {str(aurweb.db.DRIVERS.keys())}") + session_secret = aurweb.config.get("fastapi", "session_secret") if not session_secret: raise Exception("[fastapi] session_secret must not be empty") if not os.environ.get("PROMETHEUS_MULTIPROC_DIR", None): - logger.warning( - "$PROMETHEUS_MULTIPROC_DIR is not set, the /metrics " - "endpoint is disabled." - ) + logger.warning("$PROMETHEUS_MULTIPROC_DIR is not set, the /metrics " + "endpoint is disabled.") - app.mount("/static", StaticFiles(directory="static"), name="static_files") + app.mount("/static/css", + StaticFiles(directory="web/html/css"), + name="static_css") + app.mount("/static/js", + StaticFiles(directory="web/html/js"), + name="static_js") + app.mount("/static/images", + StaticFiles(directory="web/html/images"), + name="static_images") + + # Add application middlewares. + app.add_middleware(AuthenticationMiddleware, backend=BasicAuthBackend()) + app.add_middleware(SessionMiddleware, secret_key=session_secret) # Add application routes. def add_router(module): app.include_router(module.router) - util.apply_all(APP_ROUTES, add_router) # Initialize the database engine and ORM. get_engine() +def child_exit(server, worker): # pragma: no cover + """ This function is required for gunicorn customization + of prometheus multiprocessing. """ + multiprocess.mark_process_dead(worker.pid) + + async def internal_server_error(request: Request, exc: Exception) -> Response: """ Catch all uncaught Exceptions thrown in a route. @@ -183,7 +177,9 @@ async def internal_server_error(request: Request, exc: Exception) -> Response: else: # post form_data = str(dict(request.state.form_data)) - desc = desc + [f"- Data: `{form_data}`"] + ["", f"```{tb}```"] + desc = desc + [ + f"- Data: `{form_data}`" + ] + ["", f"```{tb}```"] headers = {"Authorization": f"Bearer {token}"} data = { @@ -195,12 +191,11 @@ async def internal_server_error(request: Request, exc: Exception) -> Response: logger.info(endp) resp = requests.post(endp, json=data, headers=headers) if resp.status_code != http.HTTPStatus.CREATED: - logger.error(f"Unable to report exception to {repo}: {resp.text}") + logger.error( + f"Unable to report exception to {repo}: {resp.text}") else: - logger.warning( - "Unable to report an exception found due to " - "unset notifications.error-{{project,token}}" - ) + logger.warning("Unable to report an exception found due to " + "unset notifications.error-{{project,token}}") # Log details about the exception traceback. logger.error(f"FATAL[{tb_id}]: An unexpected exception has occurred.") @@ -208,17 +203,14 @@ async def internal_server_error(request: Request, exc: Exception) -> Response: else: retval = retval.decode() - return render_template( - request, - "errors/500.html", - context, - status_code=http.HTTPStatus.INTERNAL_SERVER_ERROR, - ) + return render_template(request, "errors/500.html", context, + status_code=http.HTTPStatus.INTERNAL_SERVER_ERROR) @app.exception_handler(StarletteHTTPException) -async def http_exception_handler(request: Request, exc: HTTPException) -> Response: - """Handle an HTTPException thrown in a route.""" +async def http_exception_handler(request: Request, exc: HTTPException) \ + -> Response: + """ Handle an HTTPException thrown in a route. """ phrase = http.HTTPStatus(exc.status_code).phrase context = make_context(request, phrase) context["exc"] = exc @@ -228,30 +220,24 @@ async def http_exception_handler(request: Request, exc: HTTPException) -> Respon if exc.status_code == http.HTTPStatus.NOT_FOUND: tokens = request.url.path.split("/") matches = re.match("^([a-z0-9][a-z0-9.+_-]*?)(\\.git)?$", tokens[1]) - if matches and len(tokens) == 2: + if matches: try: pkgbase = get_pkg_or_base(matches.group(1)) - context["pkgbase"] = pkgbase - context["git_clone_uri_anon"] = aurweb.config.get( - "options", "git_clone_uri_anon" - ) - context["git_clone_uri_priv"] = aurweb.config.get( - "options", "git_clone_uri_priv" - ) + context = pkgbaseutil.make_context(request, pkgbase) except HTTPException: pass try: - return render_template( - request, f"errors/{exc.status_code}.html", context, exc.status_code - ) + return render_template(request, f"errors/{exc.status_code}.html", + context, exc.status_code) except TemplateNotFound: - return render_template(request, "errors/detail.html", context, exc.status_code) + return render_template(request, "errors/detail.html", + context, exc.status_code) @app.middleware("http") async def add_security_headers(request: Request, call_next: typing.Callable): - """This middleware adds the CSP, XCTO, XFO and RP security + """ This middleware adds the CSP, XCTO, XFO and RP security headers to the HTTP response associated with request. CSP: Content-Security-Policy @@ -267,16 +253,10 @@ async def add_security_headers(request: Request, call_next: typing.Callable): # Add CSP header. nonce = request.user.nonce csp = "default-src 'self'; " - - # swagger-ui needs access to cdn.jsdelivr.net javascript - script_hosts = ["cdn.jsdelivr.net"] - csp += f"script-src 'self' 'unsafe-inline' 'nonce-{nonce}' " + " ".join( - script_hosts - ) - - # swagger-ui needs access to cdn.jsdelivr.net css - css_hosts = ["cdn.jsdelivr.net"] - csp += "; style-src 'self' 'unsafe-inline' " + " ".join(css_hosts) + script_hosts = [] + csp += f"script-src 'self' 'nonce-{nonce}' " + ' '.join(script_hosts) + # It's fine if css is inlined. + csp += "; style-src 'self' 'unsafe-inline'" response.headers["Content-Security-Policy"] = csp # Add XTCO header. @@ -296,22 +276,17 @@ async def add_security_headers(request: Request, call_next: typing.Callable): @app.middleware("http") async def check_terms_of_service(request: Request, call_next: typing.Callable): - """This middleware function redirects authenticated users if they - have any outstanding Terms to agree to.""" + """ This middleware function redirects authenticated users if they + have any outstanding Terms to agree to. """ if request.user.is_authenticated() and request.url.path != "/tos": - accepted = ( - query(Term) - .join(AcceptedTerm) - .filter( - and_( - AcceptedTerm.UsersID == request.user.ID, - AcceptedTerm.TermsID == Term.ID, - AcceptedTerm.Revision >= Term.Revision, - ), - ) - ) - if query(Term).count() - accepted.count() > 0: - return RedirectResponse("/tos", status_code=int(http.HTTPStatus.SEE_OTHER)) + unaccepted = query(Term).join(AcceptedTerm).filter( + or_(AcceptedTerm.UsersID != request.user.ID, + and_(AcceptedTerm.UsersID == request.user.ID, + AcceptedTerm.TermsID == Term.ID, + AcceptedTerm.Revision < Term.Revision))) + if query(Term).count() > unaccepted.count(): + return RedirectResponse( + "/tos", status_code=int(http.HTTPStatus.SEE_OTHER)) return await util.error_or_result(call_next, request) @@ -326,14 +301,9 @@ async def id_redirect_middleware(request: Request, call_next: typing.Callable): for k, v in request.query_params.items(): if k != "id": qs.append(f"{k}={quote_plus(str(v))}") - qs = str() if not qs else "?" + "&".join(qs) + qs = str() if not qs else '?' + '&'.join(qs) - path = request.url.path.rstrip("/") + path = request.url.path.rstrip('/') return RedirectResponse(f"{path}/{id}{qs}") return await util.error_or_result(call_next, request) - - -# Add application middlewares. -app.add_middleware(AuthenticationMiddleware, backend=BasicAuthBackend()) -app.add_middleware(SessionMiddleware, secret_key=session_secret) diff --git a/aurweb/auth/__init__.py b/aurweb/auth/__init__.py index e895dcdb..cb6f3e4d 100644 --- a/aurweb/auth/__init__.py +++ b/aurweb/auth/__init__.py @@ -1,22 +1,25 @@ import functools + from http import HTTPStatus from typing import Callable import fastapi + from fastapi import HTTPException from fastapi.responses import RedirectResponse from starlette.authentication import AuthCredentials, AuthenticationBackend from starlette.requests import HTTPConnection import aurweb.config + from aurweb import db, filters, l10n, time, util from aurweb.models import Session, User from aurweb.models.account_type import ACCOUNT_TYPE_ID class StubQuery: - """Acts as a stubbed version of an orm.Query. Typically used - to masquerade fake records for an AnonymousUser.""" + """ Acts as a stubbed version of an orm.Query. Typically used + to masquerade fake records for an AnonymousUser. """ def filter(self, *args): return StubQuery() @@ -26,21 +29,19 @@ class StubQuery: class AnonymousUser: - """A stubbed User class used when an unauthenticated User - makes a request against FastAPI.""" - + """ A stubbed User class used when an unauthenticated User + makes a request against FastAPI. """ # Stub attributes used to mimic a real user. ID = 0 Username = "N/A" Email = "N/A" class AccountType: - """A stubbed AccountType static class. In here, we use an ID + """ A stubbed AccountType static class. In here, we use an ID and AccountType which do not exist in our constant records. All records primary keys (AccountType.ID) should be non-zero, so using a zero here means that we'll never match against a - real AccountType.""" - + real AccountType. """ ID = 0 AccountType = "Anonymous" @@ -71,7 +72,7 @@ class AnonymousUser: return False @staticmethod - def is_package_maintainer(): + def is_trusted_user(): return False @staticmethod @@ -96,7 +97,6 @@ class AnonymousUser: class BasicAuthBackend(AuthenticationBackend): - @db.async_retry_deadlock async def authenticate(self, conn: HTTPConnection): unauthenticated = (None, AnonymousUser()) sid = conn.cookies.get("AURSID") @@ -104,9 +104,11 @@ class BasicAuthBackend(AuthenticationBackend): return unauthenticated timeout = aurweb.config.getint("options", "login_timeout") - remembered = conn.cookies.get("AURREMEMBER") == "True" + remembered = ("AURREMEMBER" in conn.cookies + and bool(conn.cookies.get("AURREMEMBER"))) if remembered: - timeout = aurweb.config.getint("options", "persistent_cookie_timeout") + timeout = aurweb.config.getint("options", + "persistent_cookie_timeout") # If no session with sid and a LastUpdateTS now or later exists. now_ts = time.utcnow() @@ -121,11 +123,12 @@ class BasicAuthBackend(AuthenticationBackend): # At this point, we cannot have an invalid user if the record # exists, due to ForeignKey constraints in the schema upheld # by mysqlclient. - user = db.query(User).filter(User.ID == record.UsersID).first() + with db.begin(): + user = db.query(User).filter(User.ID == record.UsersID).first() user.nonce = util.make_nonce() user.authenticated = True - return AuthCredentials(["authenticated"]), user + return (AuthCredentials(["authenticated"]), user) def _auth_required(auth_goal: bool = True): @@ -157,45 +160,40 @@ def _auth_required(auth_goal: bool = True): # page itself is not directly possible (e.g. submitting a form). if request.method in ("GET", "HEAD"): url = request.url.path - elif referer := request.headers.get("Referer"): + elif (referer := request.headers.get("Referer")): aur = aurweb.config.get("options", "aur_location") + "/" if not referer.startswith(aur): _ = l10n.get_translator_for_request(request) - raise HTTPException( - status_code=HTTPStatus.BAD_REQUEST, - detail=_("Bad Referer header."), - ) - url = referer[len(aur) - 1 :] + raise HTTPException(status_code=HTTPStatus.BAD_REQUEST, + detail=_("Bad Referer header.")) + url = referer[len(aur) - 1:] url = "/login?" + filters.urlencode({"next": url}) return RedirectResponse(url, status_code=int(HTTPStatus.SEE_OTHER)) - return wrapper return decorator def requires_auth(func: Callable) -> Callable: - """Require an authenticated session for a particular route.""" + """ Require an authenticated session for a particular route. """ @functools.wraps(func) async def wrapper(*args, **kwargs): return await _auth_required(True)(func)(*args, **kwargs) - return wrapper def requires_guest(func: Callable) -> Callable: - """Require a guest (unauthenticated) session for a particular route.""" + """ Require a guest (unauthenticated) session for a particular route. """ @functools.wraps(func) async def wrapper(*args, **kwargs): return await _auth_required(False)(func)(*args, **kwargs) - return wrapper def account_type_required(one_of: set): - """A decorator that can be used on FastAPI routes to dictate + """ A decorator that can be used on FastAPI routes to dictate that a user belongs to one of the types defined in one_of. This decorator should be run after an @auth_required(True) is @@ -205,7 +203,7 @@ def account_type_required(one_of: set): @router.get('/some_route') @auth_required(True) - @account_type_required({"Package Maintainer", "Package Maintainer & Developer"}) + @account_type_required({"Trusted User", "Trusted User & Developer"}) async def some_route(request: fastapi.Request): return Response() @@ -213,15 +211,18 @@ def account_type_required(one_of: set): :return: Return the FastAPI function this decorator wraps. """ # Convert any account type string constants to their integer IDs. - one_of = {ACCOUNT_TYPE_ID[atype] for atype in one_of if isinstance(atype, str)} + one_of = { + ACCOUNT_TYPE_ID[atype] + for atype in one_of + if isinstance(atype, str) + } def decorator(func): @functools.wraps(func) async def wrapper(request: fastapi.Request, *args, **kwargs): if request.user.AccountTypeID not in one_of: - return RedirectResponse("/", status_code=int(HTTPStatus.SEE_OTHER)) + return RedirectResponse("/", + status_code=int(HTTPStatus.SEE_OTHER)) return await func(request, *args, **kwargs) - return wrapper - return decorator diff --git a/aurweb/auth/creds.py b/aurweb/auth/creds.py index 594188ca..100aad8c 100644 --- a/aurweb/auth/creds.py +++ b/aurweb/auth/creds.py @@ -1,9 +1,4 @@ -from aurweb.models.account_type import ( - DEVELOPER_ID, - PACKAGE_MAINTAINER_AND_DEV_ID, - PACKAGE_MAINTAINER_ID, - USER_ID, -) +from aurweb.models.account_type import DEVELOPER_ID, TRUSTED_USER_AND_DEV_ID, TRUSTED_USER_ID, USER_ID from aurweb.models.user import User ACCOUNT_CHANGE_TYPE = 1 @@ -30,53 +25,52 @@ PKGBASE_VOTE = 16 PKGREQ_FILE = 23 PKGREQ_CLOSE = 17 PKGREQ_LIST = 18 -PM_ADD_VOTE = 19 -PM_LIST_VOTES = 20 -PM_VOTE = 21 +TU_ADD_VOTE = 19 +TU_LIST_VOTES = 20 +TU_VOTE = 21 PKGBASE_MERGE = 29 -user_developer_or_package_maintainer = set( - [USER_ID, PACKAGE_MAINTAINER_ID, DEVELOPER_ID, PACKAGE_MAINTAINER_AND_DEV_ID] -) -package_maintainer_or_dev = set( - [PACKAGE_MAINTAINER_ID, DEVELOPER_ID, PACKAGE_MAINTAINER_AND_DEV_ID] -) -developer = set([DEVELOPER_ID, PACKAGE_MAINTAINER_AND_DEV_ID]) -package_maintainer = set([PACKAGE_MAINTAINER_ID, PACKAGE_MAINTAINER_AND_DEV_ID]) +user_developer_or_trusted_user = set([USER_ID, TRUSTED_USER_ID, DEVELOPER_ID, TRUSTED_USER_AND_DEV_ID]) +trusted_user_or_dev = set([TRUSTED_USER_ID, DEVELOPER_ID, TRUSTED_USER_AND_DEV_ID]) +developer = set([DEVELOPER_ID, TRUSTED_USER_AND_DEV_ID]) +trusted_user = set([TRUSTED_USER_ID, TRUSTED_USER_AND_DEV_ID]) cred_filters = { - PKGBASE_FLAG: user_developer_or_package_maintainer, - PKGBASE_NOTIFY: user_developer_or_package_maintainer, - PKGBASE_VOTE: user_developer_or_package_maintainer, - PKGREQ_FILE: user_developer_or_package_maintainer, - ACCOUNT_CHANGE_TYPE: package_maintainer_or_dev, - ACCOUNT_EDIT: package_maintainer_or_dev, - ACCOUNT_LAST_LOGIN: package_maintainer_or_dev, - ACCOUNT_LIST_COMMENTS: package_maintainer_or_dev, - ACCOUNT_SEARCH: package_maintainer_or_dev, - COMMENT_DELETE: package_maintainer_or_dev, - COMMENT_UNDELETE: package_maintainer_or_dev, - COMMENT_VIEW_DELETED: package_maintainer_or_dev, - COMMENT_EDIT: package_maintainer_or_dev, - COMMENT_PIN: package_maintainer_or_dev, - PKGBASE_ADOPT: package_maintainer_or_dev, - PKGBASE_SET_KEYWORDS: package_maintainer_or_dev, - PKGBASE_DELETE: package_maintainer_or_dev, - PKGBASE_EDIT_COMAINTAINERS: package_maintainer_or_dev, - PKGBASE_DISOWN: package_maintainer_or_dev, - PKGBASE_LIST_VOTERS: package_maintainer_or_dev, - PKGBASE_UNFLAG: package_maintainer_or_dev, - PKGREQ_CLOSE: package_maintainer_or_dev, - PKGREQ_LIST: package_maintainer_or_dev, - PM_ADD_VOTE: package_maintainer, - PM_LIST_VOTES: package_maintainer_or_dev, - PM_VOTE: package_maintainer, + PKGBASE_FLAG: user_developer_or_trusted_user, + PKGBASE_NOTIFY: user_developer_or_trusted_user, + PKGBASE_VOTE: user_developer_or_trusted_user, + PKGREQ_FILE: user_developer_or_trusted_user, + ACCOUNT_CHANGE_TYPE: trusted_user_or_dev, + ACCOUNT_EDIT: trusted_user_or_dev, + ACCOUNT_LAST_LOGIN: trusted_user_or_dev, + ACCOUNT_LIST_COMMENTS: trusted_user_or_dev, + ACCOUNT_SEARCH: trusted_user_or_dev, + COMMENT_DELETE: trusted_user_or_dev, + COMMENT_UNDELETE: trusted_user_or_dev, + COMMENT_VIEW_DELETED: trusted_user_or_dev, + COMMENT_EDIT: trusted_user_or_dev, + COMMENT_PIN: trusted_user_or_dev, + PKGBASE_ADOPT: trusted_user_or_dev, + PKGBASE_SET_KEYWORDS: trusted_user_or_dev, + PKGBASE_DELETE: trusted_user_or_dev, + PKGBASE_EDIT_COMAINTAINERS: trusted_user_or_dev, + PKGBASE_DISOWN: trusted_user_or_dev, + PKGBASE_LIST_VOTERS: trusted_user_or_dev, + PKGBASE_UNFLAG: trusted_user_or_dev, + PKGREQ_CLOSE: trusted_user_or_dev, + PKGREQ_LIST: trusted_user_or_dev, + TU_ADD_VOTE: trusted_user, + TU_LIST_VOTES: trusted_user_or_dev, + TU_VOTE: trusted_user, ACCOUNT_EDIT_DEV: developer, - PKGBASE_MERGE: package_maintainer_or_dev, + PKGBASE_MERGE: trusted_user_or_dev, } -def has_credential(user: User, credential: int, approved: list = tuple()): - if user in approved: +def has_credential(user: User, + credential: int, + approved_users: list = tuple()): + + if user in approved_users: return True return user.AccountTypeID in cred_filters[credential] diff --git a/aurweb/benchmark.py b/aurweb/benchmark.py index 83969962..7086fb08 100644 --- a/aurweb/benchmark.py +++ b/aurweb/benchmark.py @@ -1,4 +1,4 @@ -from datetime import UTC, datetime +from datetime import datetime class Benchmark: @@ -6,16 +6,16 @@ class Benchmark: self.start() def _timestamp(self) -> float: - """Generate a timestamp.""" - return float(datetime.now(UTC).timestamp()) + """ Generate a timestamp. """ + return float(datetime.utcnow().timestamp()) def start(self) -> int: - """Start a benchmark.""" + """ Start a benchmark. """ self.current = self._timestamp() return self.current def end(self): - """Return the diff between now - start().""" + """ Return the diff between now - start(). """ n = self._timestamp() - self.current self.current = float(0) return n diff --git a/aurweb/cache.py b/aurweb/cache.py index 477f6780..697473b8 100644 --- a/aurweb/cache.py +++ b/aurweb/cache.py @@ -1,64 +1,20 @@ -import pickle -from typing import Any, Callable - +from redis import Redis from sqlalchemy import orm -from aurweb import config -from aurweb.aur_redis import redis_connection -from aurweb.prometheus import SEARCH_REQUESTS -_redis = redis_connection() - - -def lambda_cache(key: str, value: Callable[[], Any], expire: int = None) -> list: - """Store and retrieve lambda results via redis cache. - - :param key: Redis key - :param value: Lambda callable returning the value - :param expire: Optional expiration in seconds - :return: result of callable or cache - """ - result = _redis.get(key) - if result is not None: - return pickle.loads(result) - - _redis.set(key, (pickle.dumps(result := value())), ex=expire) - return result - - -def db_count_cache(key: str, query: orm.Query, expire: int = None) -> int: - """Store and retrieve a query.count() via redis cache. +async def db_count_cache(redis: Redis, key: str, query: orm.Query, + expire: int = None) -> int: + """ Store and retrieve a query.count() via redis cache. + :param redis: Redis handle :param key: Redis key :param query: SQLAlchemy ORM query :param expire: Optional expiration in seconds :return: query.count() """ - result = _redis.get(key) + result = redis.get(key) if result is None: - _redis.set(key, (result := int(query.count()))) + redis.set(key, (result := int(query.count()))) if expire: - _redis.expire(key, expire) + redis.expire(key, expire) return int(result) - - -def db_query_cache(key: str, query: orm.Query, expire: int = None) -> list: - """Store and retrieve query results via redis cache. - - :param key: Redis key - :param query: SQLAlchemy ORM query - :param expire: Optional expiration in seconds - :return: query.all() - """ - result = _redis.get(key) - if result is None: - SEARCH_REQUESTS.labels(cache="miss").inc() - if _redis.dbsize() > config.getint("cache", "max_search_entries", 50000): - return query.all() - _redis.set(key, (result := pickle.dumps(query.all()))) - if expire: - _redis.expire(key, expire) - else: - SEARCH_REQUESTS.labels(cache="hit").inc() - - return pickle.loads(result) diff --git a/aurweb/captcha.py b/aurweb/captcha.py index 52e834ac..34d99e53 100644 --- a/aurweb/captcha.py +++ b/aurweb/captcha.py @@ -1,9 +1,7 @@ """ This module consists of aurweb's CAPTCHA utility functions and filters. """ - import hashlib from jinja2 import pass_context -from sqlalchemy import func from aurweb.db import query from aurweb.models import User @@ -11,9 +9,8 @@ from aurweb.templates import register_filter def get_captcha_salts(): - """Produce salts based on the current user count.""" - count = query(func.count(User.ID)).scalar() - + """ Produce salts based on the current user count. """ + count = query(User).count() salts = [] for i in range(0, 6): salts.append(f"aurweb-{count - i}") @@ -21,19 +18,19 @@ def get_captcha_salts(): def get_captcha_token(salt): - """Produce a token for the CAPTCHA salt.""" + """ Produce a token for the CAPTCHA salt. """ return hashlib.md5(salt.encode()).hexdigest()[:3] def get_captcha_challenge(salt): - """Get a CAPTCHA challenge string (shell command) for a salt.""" + """ Get a CAPTCHA challenge string (shell command) for a salt. """ token = get_captcha_token(salt) return f"LC_ALL=C pacman -V|sed -r 's#[0-9]+#{token}#g'|md5sum|cut -c1-6" def get_captcha_answer(token): - """Compute the answer via md5 of the real template text, return the - first six digits of the hexadecimal hash.""" + """ Compute the answer via md5 of the real template text, return the + first six digits of the hexadecimal hash. """ text = r""" .--. Pacman v%s.%s.%s - libalpm v%s.%s.%s / _.-' .-. .-. .-. Copyright (C) %s-%s Pacman Development Team @@ -41,16 +38,14 @@ def get_captcha_answer(token): '--' This program may be freely redistributed under the terms of the GNU General Public License. -""" % tuple( - [token] * 10 - ) +""" % tuple([token] * 10) return hashlib.md5((text + "\n").encode()).hexdigest()[:6] @register_filter("captcha_salt") @pass_context def captcha_salt_filter(context): - """Returns the most recent CAPTCHA salt in the list of salts.""" + """ Returns the most recent CAPTCHA salt in the list of salts. """ salts = get_captcha_salts() return salts[0] @@ -58,5 +53,5 @@ def captcha_salt_filter(context): @register_filter("captcha_cmdline") @pass_context def captcha_cmdline_filter(context, salt): - """Returns a CAPTCHA challenge for a given salt.""" + """ Returns a CAPTCHA challenge for a given salt. """ return get_captcha_challenge(salt) diff --git a/aurweb/config.py b/aurweb/config.py index 46c6b182..c2b8be79 100644 --- a/aurweb/config.py +++ b/aurweb/config.py @@ -1,8 +1,12 @@ import configparser import os + from typing import Any -import tomlkit +# Publicly visible version of aurweb. This is used to display +# aurweb versioning in the footer and must be maintained. +# Todo: Make this dynamic/automated. +AURWEB_VERSION = "v6.0.19" _parser = None @@ -11,8 +15,8 @@ def _get_parser(): global _parser if not _parser: - path = os.environ.get("AUR_CONFIG", "/etc/aurweb/config") - defaults = os.environ.get("AUR_CONFIG_DEFAULTS", path + ".defaults") + path = os.environ.get('AUR_CONFIG', '/etc/aurweb/config') + defaults = os.environ.get('AUR_CONFIG_DEFAULTS', path + '.defaults') _parser = configparser.RawConfigParser() _parser.optionxform = lambda option: option @@ -25,7 +29,7 @@ def _get_parser(): def rehash(): - """Globally rehash the configuration parser.""" + """ Globally rehash the configuration parser. """ global _parser _parser = None _get_parser() @@ -39,18 +43,6 @@ def get(section, option): return _get_parser().get(section, option) -def _get_project_meta(): - with open(os.path.join(get("options", "aurwebdir"), "pyproject.toml")) as pyproject: - file_contents = pyproject.read() - - return tomlkit.parse(file_contents)["tool"]["poetry"] - - -# Publicly visible version of aurweb. This is used to display -# aurweb versioning in the footer and must be maintained. -AURWEB_VERSION = str(_get_project_meta()["version"]) - - def getboolean(section, option): return _get_parser().getboolean(section, option) diff --git a/aurweb/cookies.py b/aurweb/cookies.py index 84c43f9b..442a4c0a 100644 --- a/aurweb/cookies.py +++ b/aurweb/cookies.py @@ -1,8 +1,68 @@ +from fastapi import Request +from fastapi.responses import Response + +from aurweb import config + + def samesite() -> str: - """Produce cookie SameSite value. + """ Produce cookie SameSite value based on options.disable_http_login. - Currently this is hard-coded to return "lax" + When options.disable_http_login is True, "strict" is returned. Otherwise, + "lax" is returned. - :returns "lax" + :returns "strict" if options.disable_http_login else "lax" """ - return "lax" + secure = config.getboolean("options", "disable_http_login") + return "strict" if secure else "lax" + + +def timeout(extended: bool) -> int: + """ Produce a session timeout based on `remember_me`. + + This method returns one of AUR_CONFIG's options.persistent_cookie_timeout + and options.login_timeout based on the `extended` argument. + + The `extended` argument is typically the value of the AURREMEMBER + cookie, defaulted to False. + + If `extended` is False, options.login_timeout is returned. Otherwise, + if `extended` is True, options.persistent_cookie_timeout is returned. + + :param extended: Flag which generates an extended timeout when True + :returns: Cookie timeout based on configuration options + """ + timeout = config.getint("options", "login_timeout") + if bool(extended): + timeout = config.getint("options", "persistent_cookie_timeout") + return timeout + + +def update_response_cookies(request: Request, response: Response, + aurtz: str = None, aurlang: str = None, + aursid: str = None) -> Response: + """ Update session cookies. This method is particularly useful + when updating a cookie which was already set. + + The AURSID cookie's expiration is based on the AURREMEMBER cookie, + which is retrieved from `request`. + + :param request: FastAPI request + :param response: FastAPI response + :param aurtz: Optional AURTZ cookie value + :param aurlang: Optional AURLANG cookie value + :param aursid: Optional AURSID cookie value + :returns: Updated response + """ + secure = config.getboolean("options", "disable_http_login") + if aurtz: + response.set_cookie("AURTZ", aurtz, secure=secure, httponly=secure, + samesite=samesite()) + if aurlang: + response.set_cookie("AURLANG", aurlang, secure=secure, httponly=secure, + samesite=samesite()) + if aursid: + remember_me = bool(request.cookies.get("AURREMEMBER", False)) + response.set_cookie("AURSID", aursid, secure=secure, httponly=secure, + max_age=timeout(remember_me), + samesite=samesite()) + return response diff --git a/aurweb/db.py b/aurweb/db.py index f1b8210f..4c53730a 100644 --- a/aurweb/db.py +++ b/aurweb/db.py @@ -1,14 +1,34 @@ -# Supported database drivers. -DRIVERS = {"mysql": "mysql+mysqldb"} +import functools +import hashlib +import math +import os +import re + +from typing import Iterable, NewType + +import sqlalchemy + +from sqlalchemy import create_engine, event +from sqlalchemy.engine.base import Engine +from sqlalchemy.engine.url import URL +from sqlalchemy.orm import Query, Session, SessionTransaction, scoped_session, sessionmaker + +import aurweb.config +import aurweb.util + +DRIVERS = { + "mysql": "mysql+mysqldb" +} + +# Some types we don't get access to in this module. +Base = NewType("Base", "aurweb.models.declarative_base.Base") def make_random_value(table: str, column: str, length: int): - """Generate a unique, random value for a string column in a table. + """ Generate a unique, random value for a string column in a table. :return: A unique string that is not in the database """ - import aurweb.util - string = aurweb.util.make_random_string(length) while query(table).filter(column == string).first(): string = aurweb.util.make_random_string(length) @@ -32,11 +52,8 @@ def test_name() -> str: :return: Unhashed database name """ - import os - - import aurweb.config - - db = os.environ.get("PYTEST_CURRENT_TEST", aurweb.config.get("database", "name")) + db = os.environ.get("PYTEST_CURRENT_TEST", + aurweb.config.get("database", "name")) return db.split(":")[0] @@ -53,11 +70,7 @@ def name() -> str: dbname = test_name() if not dbname.startswith("test/"): return dbname - - import hashlib - sha1 = hashlib.sha1(dbname.encode()).hexdigest() - return "db" + sha1 @@ -65,20 +78,18 @@ def name() -> str: _sessions = dict() -def get_session(engine=None): - """Return aurweb.db's global session.""" +def get_session(engine: Engine = None) -> Session: + """ Return aurweb.db's global session. """ dbname = name() global _sessions if dbname not in _sessions: - from sqlalchemy.orm import scoped_session, sessionmaker if not engine: # pragma: no cover engine = get_engine() Session = scoped_session( - sessionmaker(autocommit=True, autoflush=False, bind=engine) - ) + sessionmaker(autocommit=True, autoflush=False, bind=engine)) _sessions[dbname] = Session() return _sessions.get(dbname) @@ -95,17 +106,13 @@ def pop_session(dbname: str) -> None: _sessions.pop(dbname) -def refresh(model): - """ - Refresh the session's knowledge of `model`. - - :returns: Passed in `model` - """ +def refresh(model: Base) -> Base: + """ Refresh the session's knowledge of `model`. """ get_session().refresh(model) return model -def query(Model, *args, **kwargs): +def query(Model: Base, *args, **kwargs) -> Query: """ Perform an ORM query against the database session. @@ -117,7 +124,7 @@ def query(Model, *args, **kwargs): return get_session().query(Model).filter(*args, **kwargs) -def create(Model, *args, **kwargs): +def create(Model: Base, *args, **kwargs) -> Base: """ Create a record and add() it to the database session. @@ -128,7 +135,7 @@ def create(Model, *args, **kwargs): return add(instance) -def delete(model) -> None: +def delete(model: Base) -> None: """ Delete a set of records found by Query.filter(*args, **kwargs). @@ -137,133 +144,81 @@ def delete(model) -> None: get_session().delete(model) -def delete_all(iterable) -> None: - """Delete each instance found in `iterable`.""" - import aurweb.util - +def delete_all(iterable: Iterable) -> None: + """ Delete each instance found in `iterable`. """ session_ = get_session() aurweb.util.apply_all(iterable, session_.delete) def rollback() -> None: - """Rollback the database session.""" + """ Rollback the database session. """ get_session().rollback() -def add(model): - """Add `model` to the database session.""" +def add(model: Base) -> Base: + """ Add `model` to the database session. """ get_session().add(model) return model -def begin(): - """Begin an SQLAlchemy SessionTransaction.""" +def begin() -> SessionTransaction: + """ Begin an SQLAlchemy SessionTransaction. """ return get_session().begin() -def retry_deadlock(func): - from sqlalchemy.exc import OperationalError - - def wrapper(*args, _i: int = 0, **kwargs): - # Retry 10 times, then raise the exception - # If we fail before the 10th, recurse into `wrapper` - # If we fail on the 10th, continue to throw the exception - limit = 10 - try: - return func(*args, **kwargs) - except OperationalError as exc: - if _i < limit and "Deadlock found" in str(exc): - # Retry on deadlock by recursing into `wrapper` - return wrapper(*args, _i=_i + 1, **kwargs) - # Otherwise, just raise the exception - raise exc - - return wrapper - - -def async_retry_deadlock(func): - from sqlalchemy.exc import OperationalError - - async def wrapper(*args, _i: int = 0, **kwargs): - # Retry 10 times, then raise the exception - # If we fail before the 10th, recurse into `wrapper` - # If we fail on the 10th, continue to throw the exception - limit = 10 - try: - return await func(*args, **kwargs) - except OperationalError as exc: - if _i < limit and "Deadlock found" in str(exc): - # Retry on deadlock by recursing into `wrapper` - return await wrapper(*args, _i=_i + 1, **kwargs) - # Otherwise, just raise the exception - raise exc - - return wrapper - - -def get_sqlalchemy_url(): +def get_sqlalchemy_url() -> URL: """ Build an SQLAlchemy URL for use with create_engine. :return: sqlalchemy.engine.url.URL """ - import sqlalchemy - from sqlalchemy.engine.url import URL - - import aurweb.config - constructor = URL - parts = sqlalchemy.__version__.split(".") + parts = sqlalchemy.__version__.split('.') major = int(parts[0]) minor = int(parts[1]) if major == 1 and minor >= 4: # pragma: no cover constructor = URL.create - aur_db_backend = aurweb.config.get("database", "backend") - if aur_db_backend == "mysql": + aur_db_backend = aurweb.config.get('database', 'backend') + if aur_db_backend == 'mysql': param_query = {} port = aurweb.config.get_with_fallback("database", "port", None) if not port: - param_query["unix_socket"] = aurweb.config.get("database", "socket") + param_query["unix_socket"] = aurweb.config.get( + "database", "socket") return constructor( DRIVERS.get(aur_db_backend), - username=aurweb.config.get("database", "user"), - password=aurweb.config.get_with_fallback( - "database", "password", fallback=None - ), - host=aurweb.config.get("database", "host"), + username=aurweb.config.get('database', 'user'), + password=aurweb.config.get_with_fallback('database', 'password', + fallback=None), + host=aurweb.config.get('database', 'host'), database=name(), port=port, - query=param_query, + query=param_query ) - elif aur_db_backend == "sqlite": + elif aur_db_backend == 'sqlite': return constructor( - "sqlite", - database=aurweb.config.get("database", "name"), + 'sqlite', + database=aurweb.config.get('database', 'name'), ) else: - raise ValueError("unsupported database backend") + raise ValueError('unsupported database backend') def sqlite_regexp(regex, item) -> bool: # pragma: no cover - """Method which mimics SQL's REGEXP for SQLite.""" - import re - + """ Method which mimics SQL's REGEXP for SQLite. """ return bool(re.search(regex, str(item))) -def setup_sqlite(engine) -> None: # pragma: no cover - """Perform setup for an SQLite engine.""" - from sqlalchemy import event - +def setup_sqlite(engine: Engine) -> None: # pragma: no cover + """ Perform setup for an SQLite engine. """ @event.listens_for(engine, "connect") def do_begin(conn, record): - import functools - create_deterministic_function = functools.partial( - conn.create_function, deterministic=True + conn.create_function, + deterministic=True ) create_deterministic_function("REGEXP", 2, sqlite_regexp) @@ -272,7 +227,7 @@ def setup_sqlite(engine) -> None: # pragma: no cover _engines = dict() -def get_engine(dbname: str = None, echo: bool = False): +def get_engine(dbname: str = None, echo: bool = False) -> Engine: """ Return the SQLAlchemy engine for `dbname`. @@ -283,8 +238,6 @@ def get_engine(dbname: str = None, echo: bool = False): :param echo: Flag passed through to sqlalchemy.create_engine :return: SQLAlchemy Engine instance """ - import aurweb.config - if not dbname: dbname = name() @@ -297,13 +250,11 @@ def get_engine(dbname: str = None, echo: bool = False): if is_sqlite: # pragma: no cover connect_args["check_same_thread"] = False - kwargs = {"echo": echo, "connect_args": connect_args} - from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor - from sqlalchemy import create_engine - - engine = create_engine(get_sqlalchemy_url(), **kwargs) - SQLAlchemyInstrumentor().instrument(engine=engine) - _engines[dbname] = engine + kwargs = { + "echo": echo, + "connect_args": connect_args + } + _engines[dbname] = create_engine(get_sqlalchemy_url(), **kwargs) if is_sqlite: # pragma: no cover setup_sqlite(_engines.get(dbname)) @@ -323,7 +274,7 @@ def pop_engine(dbname: str) -> None: def kill_engine() -> None: - """Close the current session and dispose of the engine.""" + """ Close the current session and dispose of the engine. """ dbname = name() session = get_session() @@ -350,16 +301,12 @@ class ConnectionExecutor: _conn = None _paramstyle = None - def __init__(self, conn, backend=None): - import aurweb.config - - backend = backend or aurweb.config.get("database", "backend") + def __init__(self, conn, backend=aurweb.config.get("database", "backend")): self._conn = conn if backend == "mysql": self._paramstyle = "format" elif backend == "sqlite": import sqlite3 - self._paramstyle = sqlite3.paramstyle def paramstyle(self): @@ -367,13 +314,13 @@ class ConnectionExecutor: def execute(self, query, params=()): # pragma: no cover # TODO: SQLite support has been removed in FastAPI. It remains - # here to fund its support for the Sharness testsuite. - if self._paramstyle in ("format", "pyformat"): - query = query.replace("%", "%%").replace("?", "%s") - elif self._paramstyle == "qmark": + # here to fund its support for PHP until it is removed. + if self._paramstyle in ('format', 'pyformat'): + query = query.replace('%', '%%').replace('?', '%s') + elif self._paramstyle == 'qmark': pass else: - raise ValueError("unsupported paramstyle") + raise ValueError('unsupported paramstyle') cur = self._conn.cursor() cur.execute(query, params) @@ -392,36 +339,30 @@ class Connection: _conn = None def __init__(self): - import aurweb.config + aur_db_backend = aurweb.config.get('database', 'backend') - aur_db_backend = aurweb.config.get("database", "backend") - - if aur_db_backend == "mysql": + if aur_db_backend == 'mysql': import MySQLdb - - aur_db_host = aurweb.config.get("database", "host") + aur_db_host = aurweb.config.get('database', 'host') aur_db_name = name() - aur_db_user = aurweb.config.get("database", "user") - aur_db_pass = aurweb.config.get_with_fallback("database", "password", str()) - aur_db_socket = aurweb.config.get("database", "socket") - self._conn = MySQLdb.connect( - host=aur_db_host, - user=aur_db_user, - passwd=aur_db_pass, - db=aur_db_name, - unix_socket=aur_db_socket, - ) - elif aur_db_backend == "sqlite": # pragma: no cover + aur_db_user = aurweb.config.get('database', 'user') + aur_db_pass = aurweb.config.get_with_fallback( + 'database', 'password', str()) + aur_db_socket = aurweb.config.get('database', 'socket') + self._conn = MySQLdb.connect(host=aur_db_host, + user=aur_db_user, + passwd=aur_db_pass, + db=aur_db_name, + unix_socket=aur_db_socket) + elif aur_db_backend == 'sqlite': # pragma: no cover # TODO: SQLite support has been removed in FastAPI. It remains - # here to fund its support for Sharness testsuite. - import math + # here to fund its support for PHP until it is removed. import sqlite3 - - aur_db_name = aurweb.config.get("database", "name") + aur_db_name = aurweb.config.get('database', 'name') self._conn = sqlite3.connect(aur_db_name) self._conn.create_function("POWER", 2, math.pow) else: - raise ValueError("unsupported database backend") + raise ValueError('unsupported database backend') self._conn = ConnectionExecutor(self._conn, aur_db_backend) diff --git a/aurweb/defaults.py b/aurweb/defaults.py index 84d91c55..51072e8f 100644 --- a/aurweb/defaults.py +++ b/aurweb/defaults.py @@ -6,9 +6,6 @@ O = 0 # Default [P]er [P]age PP = 50 -# Default Comments Per Page -COMMENTS_PER_PAGE = 10 - # A whitelist of valid PP values PP_WHITELIST = {50, 100, 250} @@ -17,8 +14,8 @@ RPC_SEARCH_BY = "name-desc" def fallback_pp(per_page: int) -> int: - """If `per_page` is a valid value in PP_WHITELIST, return it. - Otherwise, return defaults.PP.""" + """ If `per_page` is a valid value in PP_WHITELIST, return it. + Otherwise, return defaults.PP. """ if per_page not in PP_WHITELIST: return PP return per_page diff --git a/aurweb/exceptions.py b/aurweb/exceptions.py index e24eb607..30a3df08 100644 --- a/aurweb/exceptions.py +++ b/aurweb/exceptions.py @@ -1,4 +1,5 @@ import functools + from typing import Any, Callable import fastapi @@ -18,61 +19,61 @@ class BannedException(AurwebException): class PermissionDeniedException(AurwebException): def __init__(self, user): - msg = "permission denied: {:s}".format(user) + msg = 'permission denied: {:s}'.format(user) super(PermissionDeniedException, self).__init__(msg) class BrokenUpdateHookException(AurwebException): def __init__(self, cmd): - msg = "broken update hook: {:s}".format(cmd) + msg = 'broken update hook: {:s}'.format(cmd) super(BrokenUpdateHookException, self).__init__(msg) class InvalidUserException(AurwebException): def __init__(self, user): - msg = "unknown user: {:s}".format(user) + msg = 'unknown user: {:s}'.format(user) super(InvalidUserException, self).__init__(msg) class InvalidPackageBaseException(AurwebException): def __init__(self, pkgbase): - msg = "package base not found: {:s}".format(pkgbase) + msg = 'package base not found: {:s}'.format(pkgbase) super(InvalidPackageBaseException, self).__init__(msg) class InvalidRepositoryNameException(AurwebException): def __init__(self, pkgbase): - msg = "invalid repository name: {:s}".format(pkgbase) + msg = 'invalid repository name: {:s}'.format(pkgbase) super(InvalidRepositoryNameException, self).__init__(msg) class PackageBaseExistsException(AurwebException): def __init__(self, pkgbase): - msg = "package base already exists: {:s}".format(pkgbase) + msg = 'package base already exists: {:s}'.format(pkgbase) super(PackageBaseExistsException, self).__init__(msg) class InvalidReasonException(AurwebException): def __init__(self, reason): - msg = "invalid reason: {:s}".format(reason) + msg = 'invalid reason: {:s}'.format(reason) super(InvalidReasonException, self).__init__(msg) class InvalidCommentException(AurwebException): def __init__(self, comment): - msg = "comment is too short: {:s}".format(comment) + msg = 'comment is too short: {:s}'.format(comment) super(InvalidCommentException, self).__init__(msg) class AlreadyVotedException(AurwebException): def __init__(self, comment): - msg = "already voted for package base: {:s}".format(comment) + msg = 'already voted for package base: {:s}'.format(comment) super(AlreadyVotedException, self).__init__(msg) class NotVotedException(AurwebException): def __init__(self, comment): - msg = "missing vote for package base: {:s}".format(comment) + msg = 'missing vote for package base: {:s}'.format(comment) super(NotVotedException, self).__init__(msg) @@ -108,5 +109,4 @@ def handle_form_exceptions(route: Callable) -> fastapi.Response: async def wrapper(request: fastapi.Request, *args, **kwargs): request.state.form_data = await request.form() return await route(request, *args, **kwargs) - return wrapper diff --git a/aurweb/filters.py b/aurweb/filters.py index f39bd560..45cb6d83 100644 --- a/aurweb/filters.py +++ b/aurweb/filters.py @@ -1,23 +1,26 @@ import copy import math -from datetime import UTC, datetime -from typing import Any, Union + +from datetime import datetime +from typing import Any, Dict, Union from urllib.parse import quote_plus, urlencode from zoneinfo import ZoneInfo import fastapi import paginate + from jinja2 import pass_context -from jinja2.filters import do_format import aurweb.models + from aurweb import config, l10n from aurweb.templates import register_filter, register_function @register_filter("pager_nav") @pass_context -def pager_nav(context: dict[str, Any], page: int, total: int, prefix: str) -> str: +def pager_nav(context: Dict[str, Any], + page: int, total: int, prefix: str) -> str: page = int(page) # Make sure this is an int. pp = context.get("PP", 50) @@ -40,9 +43,10 @@ def pager_nav(context: dict[str, Any], page: int, total: int, prefix: str) -> st return f"{prefix}?{qs}" # Use the paginate module to produce our linkage. - pager = paginate.Page( - [], page=page + 1, items_per_page=pp, item_count=total, url_maker=create_url - ) + pager = paginate.Page([], page=page + 1, + items_per_page=pp, + item_count=total, + url_maker=create_url) return pager.pager( link_attr={"class": "page"}, @@ -52,8 +56,7 @@ def pager_nav(context: dict[str, Any], page: int, total: int, prefix: str) -> st symbol_first="« First", symbol_previous="‹ Previous", symbol_next="Next ›", - symbol_last="Last »", - ) + symbol_last="Last »") @register_function("config_getint") @@ -68,16 +71,17 @@ def do_round(f: float) -> int: @register_filter("tr") @pass_context -def tr(context: dict[str, Any], value: str): - """A translation filter; example: {{ "Hello" | tr("de") }}.""" +def tr(context: Dict[str, Any], value: str): + """ A translation filter; example: {{ "Hello" | tr("de") }}. """ _ = l10n.get_translator_for_request(context.get("request")) return _(value) @register_filter("tn") @pass_context -def tn(context: dict[str, Any], count: int, singular: str, plural: str) -> str: - """A singular and plural translation filter. +def tn(context: Dict[str, Any], count: int, + singular: str, plural: str) -> str: + """ A singular and plural translation filter. Example: {{ some_integer | tn("singular %d", "plural %d") }} @@ -94,7 +98,7 @@ def tn(context: dict[str, Any], count: int, singular: str, plural: str) -> str: @register_filter("dt") def timestamp_to_datetime(timestamp: int): - return datetime.fromtimestamp(timestamp, UTC) + return datetime.utcfromtimestamp(int(timestamp)) @register_filter("as_timezone") @@ -103,8 +107,8 @@ def as_timezone(dt: datetime, timezone: str): @register_filter("extend_query") -def extend_query(query: dict[str, Any], *additions) -> dict[str, Any]: - """Add additional key value pairs to query.""" +def extend_query(query: Dict[str, Any], *additions) -> Dict[str, Any]: + """ Add additional key value pairs to query. """ q = copy.copy(query) for k, v in list(additions): q[k] = v @@ -112,26 +116,26 @@ def extend_query(query: dict[str, Any], *additions) -> dict[str, Any]: @register_filter("urlencode") -def to_qs(query: dict[str, Any]) -> str: +def to_qs(query: Dict[str, Any]) -> str: return urlencode(query, doseq=True) @register_filter("get_vote") def get_vote(voteinfo, request: fastapi.Request): - from aurweb.models import Vote - - return voteinfo.votes.filter(Vote.User == request.user).first() + from aurweb.models import TUVote + return voteinfo.tu_votes.filter(TUVote.User == request.user).first() @register_filter("number_format") def number_format(value: float, places: int): - """A converter function similar to PHP's number_format.""" + """ A converter function similar to PHP's number_format. """ return f"{value:.{places}f}" @register_filter("account_url") @pass_context -def account_url(context: dict[str, Any], user: "aurweb.models.user.User") -> str: +def account_url(context: Dict[str, Any], + user: "aurweb.models.user.User") -> str: base = aurweb.config.get("options", "aur_location") return f"{base}/account/{user.Username}" @@ -148,7 +152,8 @@ def ceil(*args, **kwargs) -> int: @register_function("date_strftime") @pass_context -def date_strftime(context: dict[str, Any], dt: Union[int, datetime], fmt: str) -> str: +def date_strftime(context: Dict[str, Any], dt: Union[int, datetime], fmt: str) \ + -> str: if isinstance(dt, int): dt = timestamp_to_datetime(dt) tz = context.get("timezone") @@ -157,25 +162,11 @@ def date_strftime(context: dict[str, Any], dt: Union[int, datetime], fmt: str) - @register_function("date_display") @pass_context -def date_display(context: dict[str, Any], dt: Union[int, datetime]) -> str: +def date_display(context: Dict[str, Any], dt: Union[int, datetime]) -> str: return date_strftime(context, dt, "%Y-%m-%d (%Z)") @register_function("datetime_display") @pass_context -def datetime_display(context: dict[str, Any], dt: Union[int, datetime]) -> str: +def datetime_display(context: Dict[str, Any], dt: Union[int, datetime]) -> str: return date_strftime(context, dt, "%Y-%m-%d %H:%M (%Z)") - - -@register_filter("format") -def safe_format(value: str, *args: Any, **kwargs: Any) -> str: - """Wrapper for jinja2 format function to perform additional checks.""" - - # If we don't have anything to be formatted, just return the value. - # We have some translations that do not contain placeholders for replacement. - # In these cases the jinja2 function is throwing an error: - # "TypeError: not all arguments converted during string formatting" - if "%" not in value: - return value - - return do_format(value, *args, **kwargs) diff --git a/aurweb/git/auth.py b/aurweb/git/auth.py index 759fce89..abecd276 100755 --- a/aurweb/git/auth.py +++ b/aurweb/git/auth.py @@ -9,12 +9,12 @@ import aurweb.db def format_command(env_vars, command, ssh_opts, ssh_key): - environment = "" + environment = '' for key, var in env_vars.items(): - environment += "{}={} ".format(key, shlex.quote(var)) + environment += '{}={} '.format(key, shlex.quote(var)) command = shlex.quote(command) - command = "{}{}".format(environment, command) + command = '{}{}'.format(environment, command) # The command is being substituted into an authorized_keys line below, # so we need to escape the double quotes. @@ -24,10 +24,10 @@ def format_command(env_vars, command, ssh_opts, ssh_key): def main(): - valid_keytypes = aurweb.config.get("auth", "valid-keytypes").split() - username_regex = aurweb.config.get("auth", "username-regex") - git_serve_cmd = aurweb.config.get("auth", "git-serve-cmd") - ssh_opts = aurweb.config.get("auth", "ssh-options") + valid_keytypes = aurweb.config.get('auth', 'valid-keytypes').split() + username_regex = aurweb.config.get('auth', 'username-regex') + git_serve_cmd = aurweb.config.get('auth', 'git-serve-cmd') + ssh_opts = aurweb.config.get('auth', 'ssh-options') keytype = sys.argv[1] keytext = sys.argv[2] @@ -36,13 +36,11 @@ def main(): conn = aurweb.db.Connection() - cur = conn.execute( - "SELECT Users.Username, Users.AccountTypeID FROM Users " - "INNER JOIN SSHPubKeys ON SSHPubKeys.UserID = Users.ID " - "WHERE SSHPubKeys.PubKey = ? AND Users.Suspended = 0 " - "AND NOT Users.Passwd = ''", - (keytype + " " + keytext,), - ) + cur = conn.execute("SELECT Users.Username, Users.AccountTypeID FROM Users " + "INNER JOIN SSHPubKeys ON SSHPubKeys.UserID = Users.ID " + "WHERE SSHPubKeys.PubKey = ? AND Users.Suspended = 0 " + "AND NOT Users.Passwd = ''", + (keytype + " " + keytext,)) row = cur.fetchone() if not row or cur.fetchone(): @@ -53,13 +51,13 @@ def main(): exit(1) env_vars = { - "AUR_USER": user, - "AUR_PRIVILEGED": "1" if account_type > 1 else "0", + 'AUR_USER': user, + 'AUR_PRIVILEGED': '1' if account_type > 1 else '0', } - key = keytype + " " + keytext + key = keytype + ' ' + keytext print(format_command(env_vars, git_serve_cmd, ssh_opts, key)) -if __name__ == "__main__": +if __name__ == '__main__': main() diff --git a/aurweb/git/serve.py b/aurweb/git/serve.py index 5888c6b4..b91f1a13 100755 --- a/aurweb/git/serve.py +++ b/aurweb/git/serve.py @@ -11,16 +11,16 @@ import aurweb.config import aurweb.db import aurweb.exceptions -notify_cmd = aurweb.config.get("notifications", "notify-cmd") +notify_cmd = aurweb.config.get('notifications', 'notify-cmd') -repo_path = aurweb.config.get("serve", "repo-path") -repo_regex = aurweb.config.get("serve", "repo-regex") -git_shell_cmd = aurweb.config.get("serve", "git-shell-cmd") -git_update_cmd = aurweb.config.get("serve", "git-update-cmd") -ssh_cmdline = aurweb.config.get("serve", "ssh-cmdline") +repo_path = aurweb.config.get('serve', 'repo-path') +repo_regex = aurweb.config.get('serve', 'repo-regex') +git_shell_cmd = aurweb.config.get('serve', 'git-shell-cmd') +git_update_cmd = aurweb.config.get('serve', 'git-update-cmd') +ssh_cmdline = aurweb.config.get('serve', 'ssh-cmdline') -enable_maintenance = aurweb.config.getboolean("options", "enable-maintenance") -maintenance_exc = aurweb.config.get("options", "maintenance-exceptions").split() +enable_maintenance = aurweb.config.getboolean('options', 'enable-maintenance') +maintenance_exc = aurweb.config.get('options', 'maintenance-exceptions').split() def pkgbase_from_name(pkgbase): @@ -43,16 +43,14 @@ def list_repos(user): if userid == 0: raise aurweb.exceptions.InvalidUserException(user) - cur = conn.execute( - "SELECT Name, PackagerUID FROM PackageBases " + "WHERE MaintainerUID = ?", - [userid], - ) + cur = conn.execute("SELECT Name, PackagerUID FROM PackageBases " + + "WHERE MaintainerUID = ?", [userid]) for row in cur: - print((" " if row[1] else "*") + row[0]) + print((' ' if row[1] else '*') + row[0]) conn.close() -def validate_pkgbase(pkgbase, user): +def create_pkgbase(pkgbase, user): if not re.match(repo_regex, pkgbase): raise aurweb.exceptions.InvalidRepositoryNameException(pkgbase) if pkgbase_exists(pkgbase): @@ -62,12 +60,23 @@ def validate_pkgbase(pkgbase, user): cur = conn.execute("SELECT ID FROM Users WHERE Username = ?", [user]) userid = cur.fetchone()[0] - - conn.close() - if userid == 0: raise aurweb.exceptions.InvalidUserException(user) + now = int(time.time()) + cur = conn.execute("INSERT INTO PackageBases (Name, SubmittedTS, " + + "ModifiedTS, SubmitterUID, MaintainerUID, " + + "FlaggerComment) VALUES (?, ?, ?, ?, ?, '')", + [pkgbase, now, now, userid, userid]) + pkgbase_id = cur.lastrowid + + cur = conn.execute("INSERT INTO PackageNotifications " + + "(PackageBaseID, UserID) VALUES (?, ?)", + [pkgbase_id, userid]) + + conn.commit() + conn.close() + def pkgbase_adopt(pkgbase, user, privileged): pkgbase_id = pkgbase_from_name(pkgbase) @@ -76,10 +85,8 @@ def pkgbase_adopt(pkgbase, user, privileged): conn = aurweb.db.Connection() - cur = conn.execute( - "SELECT ID FROM PackageBases WHERE ID = ? AND " + "MaintainerUID IS NULL", - [pkgbase_id], - ) + cur = conn.execute("SELECT ID FROM PackageBases WHERE ID = ? AND " + + "MaintainerUID IS NULL", [pkgbase_id]) if not privileged and not cur.fetchone(): raise aurweb.exceptions.PermissionDeniedException(user) @@ -88,25 +95,19 @@ def pkgbase_adopt(pkgbase, user, privileged): if userid == 0: raise aurweb.exceptions.InvalidUserException(user) - cur = conn.execute( - "UPDATE PackageBases SET MaintainerUID = ? " + "WHERE ID = ?", - [userid, pkgbase_id], - ) + cur = conn.execute("UPDATE PackageBases SET MaintainerUID = ? " + + "WHERE ID = ?", [userid, pkgbase_id]) - cur = conn.execute( - "SELECT COUNT(*) FROM PackageNotifications WHERE " - + "PackageBaseID = ? AND UserID = ?", - [pkgbase_id, userid], - ) + cur = conn.execute("SELECT COUNT(*) FROM PackageNotifications WHERE " + + "PackageBaseID = ? AND UserID = ?", + [pkgbase_id, userid]) if cur.fetchone()[0] == 0: - cur = conn.execute( - "INSERT INTO PackageNotifications " - + "(PackageBaseID, UserID) VALUES (?, ?)", - [pkgbase_id, userid], - ) + cur = conn.execute("INSERT INTO PackageNotifications " + + "(PackageBaseID, UserID) VALUES (?, ?)", + [pkgbase_id, userid]) conn.commit() - subprocess.Popen((notify_cmd, "adopt", str(userid), str(pkgbase_id))) + subprocess.Popen((notify_cmd, 'adopt', str(userid), str(pkgbase_id))) conn.close() @@ -114,16 +115,13 @@ def pkgbase_adopt(pkgbase, user, privileged): def pkgbase_get_comaintainers(pkgbase): conn = aurweb.db.Connection() - cur = conn.execute( - "SELECT UserName FROM PackageComaintainers " - + "INNER JOIN Users " - + "ON Users.ID = PackageComaintainers.UsersID " - + "INNER JOIN PackageBases " - + "ON PackageBases.ID = PackageComaintainers.PackageBaseID " - + "WHERE PackageBases.Name = ? " - + "ORDER BY Priority ASC", - [pkgbase], - ) + cur = conn.execute("SELECT UserName FROM PackageComaintainers " + + "INNER JOIN Users " + + "ON Users.ID = PackageComaintainers.UsersID " + + "INNER JOIN PackageBases " + + "ON PackageBases.ID = PackageComaintainers.PackageBaseID " + + "WHERE PackageBases.Name = ? " + + "ORDER BY Priority ASC", [pkgbase]) return [row[0] for row in cur.fetchall()] @@ -142,7 +140,8 @@ def pkgbase_set_comaintainers(pkgbase, userlist, user, privileged): uids_old = set() for olduser in userlist_old: - cur = conn.execute("SELECT ID FROM Users WHERE Username = ?", [olduser]) + cur = conn.execute("SELECT ID FROM Users WHERE Username = ?", + [olduser]) userid = cur.fetchone()[0] if userid == 0: raise aurweb.exceptions.InvalidUserException(user) @@ -150,7 +149,8 @@ def pkgbase_set_comaintainers(pkgbase, userlist, user, privileged): uids_new = set() for newuser in userlist: - cur = conn.execute("SELECT ID FROM Users WHERE Username = ?", [newuser]) + cur = conn.execute("SELECT ID FROM Users WHERE Username = ?", + [newuser]) userid = cur.fetchone()[0] if userid == 0: raise aurweb.exceptions.InvalidUserException(user) @@ -162,33 +162,24 @@ def pkgbase_set_comaintainers(pkgbase, userlist, user, privileged): i = 1 for userid in uids_new: if userid in uids_add: - cur = conn.execute( - "INSERT INTO PackageComaintainers " - + "(PackageBaseID, UsersID, Priority) " - + "VALUES (?, ?, ?)", - [pkgbase_id, userid, i], - ) - subprocess.Popen( - (notify_cmd, "comaintainer-add", str(userid), str(pkgbase_id)) - ) + cur = conn.execute("INSERT INTO PackageComaintainers " + + "(PackageBaseID, UsersID, Priority) " + + "VALUES (?, ?, ?)", [pkgbase_id, userid, i]) + subprocess.Popen((notify_cmd, 'comaintainer-add', str(userid), + str(pkgbase_id))) else: - cur = conn.execute( - "UPDATE PackageComaintainers " - + "SET Priority = ? " - + "WHERE PackageBaseID = ? AND UsersID = ?", - [i, pkgbase_id, userid], - ) + cur = conn.execute("UPDATE PackageComaintainers " + + "SET Priority = ? " + + "WHERE PackageBaseID = ? AND UsersID = ?", + [i, pkgbase_id, userid]) i += 1 for userid in uids_rem: - cur = conn.execute( - "DELETE FROM PackageComaintainers " - + "WHERE PackageBaseID = ? AND UsersID = ?", - [pkgbase_id, userid], - ) - subprocess.Popen( - (notify_cmd, "comaintainer-remove", str(userid), str(pkgbase_id)) - ) + cur = conn.execute("DELETE FROM PackageComaintainers " + + "WHERE PackageBaseID = ? AND UsersID = ?", + [pkgbase_id, userid]) + subprocess.Popen((notify_cmd, 'comaintainer-remove', + str(userid), str(pkgbase_id))) conn.commit() conn.close() @@ -197,21 +188,18 @@ def pkgbase_set_comaintainers(pkgbase, userlist, user, privileged): def pkgreq_by_pkgbase(pkgbase_id, reqtype): conn = aurweb.db.Connection() - cur = conn.execute( - "SELECT PackageRequests.ID FROM PackageRequests " - + "INNER JOIN RequestTypes ON " - + "RequestTypes.ID = PackageRequests.ReqTypeID " - + "WHERE PackageRequests.Status = 0 " - + "AND PackageRequests.PackageBaseID = ? " - + "AND RequestTypes.Name = ?", - [pkgbase_id, reqtype], - ) + cur = conn.execute("SELECT PackageRequests.ID FROM PackageRequests " + + "INNER JOIN RequestTypes ON " + + "RequestTypes.ID = PackageRequests.ReqTypeID " + + "WHERE PackageRequests.Status = 0 " + + "AND PackageRequests.PackageBaseID = ? " + + "AND RequestTypes.Name = ?", [pkgbase_id, reqtype]) return [row[0] for row in cur.fetchall()] def pkgreq_close(reqid, user, reason, comments, autoclose=False): - statusmap = {"accepted": 2, "rejected": 3} + statusmap = {'accepted': 2, 'rejected': 3} if reason not in statusmap: raise aurweb.exceptions.InvalidReasonException(reason) status = statusmap[reason] @@ -227,20 +215,16 @@ def pkgreq_close(reqid, user, reason, comments, autoclose=False): raise aurweb.exceptions.InvalidUserException(user) now = int(time.time()) - conn.execute( - "UPDATE PackageRequests SET Status = ?, ClosedTS = ?, " - + "ClosedUID = ?, ClosureComment = ? " - + "WHERE ID = ?", - [status, now, userid, comments, reqid], - ) + conn.execute("UPDATE PackageRequests SET Status = ?, ClosedTS = ?, " + + "ClosedUID = ?, ClosureComment = ? " + + "WHERE ID = ?", [status, now, userid, comments, reqid]) conn.commit() conn.close() if not userid: userid = 0 - subprocess.Popen( - (notify_cmd, "request-close", str(userid), str(reqid), reason) - ).wait() + subprocess.Popen((notify_cmd, 'request-close', str(userid), str(reqid), + reason)).wait() def pkgbase_disown(pkgbase, user, privileged): @@ -255,9 +239,9 @@ def pkgbase_disown(pkgbase, user, privileged): # TODO: Support disowning package bases via package request. # Scan through pending orphan requests and close them. - comment = "The user {:s} disowned the package.".format(user) - for reqid in pkgreq_by_pkgbase(pkgbase_id, "orphan"): - pkgreq_close(reqid, user, "accepted", comment, True) + comment = 'The user {:s} disowned the package.'.format(user) + for reqid in pkgreq_by_pkgbase(pkgbase_id, 'orphan'): + pkgreq_close(reqid, user, 'accepted', comment, True) comaintainers = [] new_maintainer_userid = None @@ -265,22 +249,19 @@ def pkgbase_disown(pkgbase, user, privileged): conn = aurweb.db.Connection() # Make the first co-maintainer the new maintainer, unless the action was - # enforced by a Package Maintainer. + # enforced by a Trusted User. if initialized_by_owner: comaintainers = pkgbase_get_comaintainers(pkgbase) if len(comaintainers) > 0: new_maintainer = comaintainers[0] - cur = conn.execute( - "SELECT ID FROM Users WHERE Username = ?", [new_maintainer] - ) + cur = conn.execute("SELECT ID FROM Users WHERE Username = ?", + [new_maintainer]) new_maintainer_userid = cur.fetchone()[0] comaintainers.remove(new_maintainer) pkgbase_set_comaintainers(pkgbase, comaintainers, user, privileged) - cur = conn.execute( - "UPDATE PackageBases SET MaintainerUID = ? " + "WHERE ID = ?", - [new_maintainer_userid, pkgbase_id], - ) + cur = conn.execute("UPDATE PackageBases SET MaintainerUID = ? " + + "WHERE ID = ?", [new_maintainer_userid, pkgbase_id]) conn.commit() @@ -289,7 +270,7 @@ def pkgbase_disown(pkgbase, user, privileged): if userid == 0: raise aurweb.exceptions.InvalidUserException(user) - subprocess.Popen((notify_cmd, "disown", str(userid), str(pkgbase_id))) + subprocess.Popen((notify_cmd, 'disown', str(userid), str(pkgbase_id))) conn.close() @@ -309,16 +290,14 @@ def pkgbase_flag(pkgbase, user, comment): raise aurweb.exceptions.InvalidUserException(user) now = int(time.time()) - conn.execute( - "UPDATE PackageBases SET " - + "OutOfDateTS = ?, FlaggerUID = ?, FlaggerComment = ? " - + "WHERE ID = ? AND OutOfDateTS IS NULL", - [now, userid, comment, pkgbase_id], - ) + conn.execute("UPDATE PackageBases SET " + + "OutOfDateTS = ?, FlaggerUID = ?, FlaggerComment = ? " + + "WHERE ID = ? AND OutOfDateTS IS NULL", + [now, userid, comment, pkgbase_id]) conn.commit() - subprocess.Popen((notify_cmd, "flag", str(userid), str(pkgbase_id))) + subprocess.Popen((notify_cmd, 'flag', str(userid), str(pkgbase_id))) def pkgbase_unflag(pkgbase, user): @@ -334,15 +313,12 @@ def pkgbase_unflag(pkgbase, user): raise aurweb.exceptions.InvalidUserException(user) if user in pkgbase_get_comaintainers(pkgbase): - conn.execute( - "UPDATE PackageBases SET OutOfDateTS = NULL " + "WHERE ID = ?", [pkgbase_id] - ) + conn.execute("UPDATE PackageBases SET OutOfDateTS = NULL " + + "WHERE ID = ?", [pkgbase_id]) else: - conn.execute( - "UPDATE PackageBases SET OutOfDateTS = NULL " - + "WHERE ID = ? AND (MaintainerUID = ? OR FlaggerUID = ?)", - [pkgbase_id, userid, userid], - ) + conn.execute("UPDATE PackageBases SET OutOfDateTS = NULL " + + "WHERE ID = ? AND (MaintainerUID = ? OR FlaggerUID = ?)", + [pkgbase_id, userid, userid]) conn.commit() @@ -359,24 +335,17 @@ def pkgbase_vote(pkgbase, user): if userid == 0: raise aurweb.exceptions.InvalidUserException(user) - cur = conn.execute( - "SELECT COUNT(*) FROM PackageVotes " - + "WHERE UsersID = ? AND PackageBaseID = ?", - [userid, pkgbase_id], - ) + cur = conn.execute("SELECT COUNT(*) FROM PackageVotes " + + "WHERE UsersID = ? AND PackageBaseID = ?", + [userid, pkgbase_id]) if cur.fetchone()[0] > 0: raise aurweb.exceptions.AlreadyVotedException(pkgbase) now = int(time.time()) - conn.execute( - "INSERT INTO PackageVotes (UsersID, PackageBaseID, VoteTS) " - + "VALUES (?, ?, ?)", - [userid, pkgbase_id, now], - ) - conn.execute( - "UPDATE PackageBases SET NumVotes = NumVotes + 1 " + "WHERE ID = ?", - [pkgbase_id], - ) + conn.execute("INSERT INTO PackageVotes (UsersID, PackageBaseID, VoteTS) " + + "VALUES (?, ?, ?)", [userid, pkgbase_id, now]) + conn.execute("UPDATE PackageBases SET NumVotes = NumVotes + 1 " + + "WHERE ID = ?", [pkgbase_id]) conn.commit() @@ -392,22 +361,16 @@ def pkgbase_unvote(pkgbase, user): if userid == 0: raise aurweb.exceptions.InvalidUserException(user) - cur = conn.execute( - "SELECT COUNT(*) FROM PackageVotes " - + "WHERE UsersID = ? AND PackageBaseID = ?", - [userid, pkgbase_id], - ) + cur = conn.execute("SELECT COUNT(*) FROM PackageVotes " + + "WHERE UsersID = ? AND PackageBaseID = ?", + [userid, pkgbase_id]) if cur.fetchone()[0] == 0: raise aurweb.exceptions.NotVotedException(pkgbase) - conn.execute( - "DELETE FROM PackageVotes WHERE UsersID = ? AND " + "PackageBaseID = ?", - [userid, pkgbase_id], - ) - conn.execute( - "UPDATE PackageBases SET NumVotes = NumVotes - 1 " + "WHERE ID = ?", - [pkgbase_id], - ) + conn.execute("DELETE FROM PackageVotes WHERE UsersID = ? AND " + + "PackageBaseID = ?", [userid, pkgbase_id]) + conn.execute("UPDATE PackageBases SET NumVotes = NumVotes - 1 " + + "WHERE ID = ?", [pkgbase_id]) conn.commit() @@ -418,12 +381,11 @@ def pkgbase_set_keywords(pkgbase, keywords): conn = aurweb.db.Connection() - conn.execute("DELETE FROM PackageKeywords WHERE PackageBaseID = ?", [pkgbase_id]) + conn.execute("DELETE FROM PackageKeywords WHERE PackageBaseID = ?", + [pkgbase_id]) for keyword in keywords: - conn.execute( - "INSERT INTO PackageKeywords (PackageBaseID, Keyword) " + "VALUES (?, ?)", - [pkgbase_id, keyword], - ) + conn.execute("INSERT INTO PackageKeywords (PackageBaseID, Keyword) " + + "VALUES (?, ?)", [pkgbase_id, keyword]) conn.commit() conn.close() @@ -432,30 +394,24 @@ def pkgbase_set_keywords(pkgbase, keywords): def pkgbase_has_write_access(pkgbase, user): conn = aurweb.db.Connection() - cur = conn.execute( - "SELECT COUNT(*) FROM PackageBases " - + "LEFT JOIN PackageComaintainers " - + "ON PackageComaintainers.PackageBaseID = PackageBases.ID " - + "INNER JOIN Users " - + "ON Users.ID = PackageBases.MaintainerUID " - + "OR PackageBases.MaintainerUID IS NULL " - + "OR Users.ID = PackageComaintainers.UsersID " - + "WHERE Name = ? AND Username = ?", - [pkgbase, user], - ) + cur = conn.execute("SELECT COUNT(*) FROM PackageBases " + + "LEFT JOIN PackageComaintainers " + + "ON PackageComaintainers.PackageBaseID = PackageBases.ID " + + "INNER JOIN Users " + + "ON Users.ID = PackageBases.MaintainerUID " + + "OR PackageBases.MaintainerUID IS NULL " + + "OR Users.ID = PackageComaintainers.UsersID " + + "WHERE Name = ? AND Username = ?", [pkgbase, user]) return cur.fetchone()[0] > 0 def pkgbase_has_full_access(pkgbase, user): conn = aurweb.db.Connection() - cur = conn.execute( - "SELECT COUNT(*) FROM PackageBases " - + "INNER JOIN Users " - + "ON Users.ID = PackageBases.MaintainerUID " - + "WHERE Name = ? AND Username = ?", - [pkgbase, user], - ) + cur = conn.execute("SELECT COUNT(*) FROM PackageBases " + + "INNER JOIN Users " + + "ON Users.ID = PackageBases.MaintainerUID " + + "WHERE Name = ? AND Username = ?", [pkgbase, user]) return cur.fetchone()[0] > 0 @@ -463,11 +419,9 @@ def log_ssh_login(user, remote_addr): conn = aurweb.db.Connection() now = int(time.time()) - conn.execute( - "UPDATE Users SET LastSSHLogin = ?, " - + "LastSSHLoginIPAddress = ? WHERE Username = ?", - [now, remote_addr, user], - ) + conn.execute("UPDATE Users SET LastSSHLogin = ?, " + + "LastSSHLoginIPAddress = ? WHERE Username = ?", + [now, remote_addr, user]) conn.commit() conn.close() @@ -476,7 +430,8 @@ def log_ssh_login(user, remote_addr): def bans_match(remote_addr): conn = aurweb.db.Connection() - cur = conn.execute("SELECT COUNT(*) FROM Bans WHERE IPAddress = ?", [remote_addr]) + cur = conn.execute("SELECT COUNT(*) FROM Bans WHERE IPAddress = ?", + [remote_addr]) return cur.fetchone()[0] > 0 @@ -503,13 +458,13 @@ def usage(cmds): def checkarg_atleast(cmdargv, *argdesc): if len(cmdargv) - 1 < len(argdesc): - msg = "missing {:s}".format(argdesc[len(cmdargv) - 1]) + msg = 'missing {:s}'.format(argdesc[len(cmdargv) - 1]) raise aurweb.exceptions.InvalidArgumentsException(msg) def checkarg_atmost(cmdargv, *argdesc): if len(cmdargv) - 1 > len(argdesc): - raise aurweb.exceptions.InvalidArgumentsException("too many arguments") + raise aurweb.exceptions.InvalidArgumentsException('too many arguments') def checkarg(cmdargv, *argdesc): @@ -525,23 +480,23 @@ def serve(action, cmdargv, user, privileged, remote_addr): # noqa: C901 raise aurweb.exceptions.BannedException log_ssh_login(user, remote_addr) - if action == "git" and cmdargv[1] in ("upload-pack", "receive-pack"): - action = action + "-" + cmdargv[1] + if action == 'git' and cmdargv[1] in ('upload-pack', 'receive-pack'): + action = action + '-' + cmdargv[1] del cmdargv[1] - if action == "git-upload-pack" or action == "git-receive-pack": - checkarg(cmdargv, "path") + if action == 'git-upload-pack' or action == 'git-receive-pack': + checkarg(cmdargv, 'path') - path = cmdargv[1].rstrip("/") - if not path.startswith("/"): - path = "/" + path - if not path.endswith(".git"): - path = path + ".git" + path = cmdargv[1].rstrip('/') + if not path.startswith('/'): + path = '/' + path + if not path.endswith('.git'): + path = path + '.git' pkgbase = path[1:-4] if not re.match(repo_regex, pkgbase): raise aurweb.exceptions.InvalidRepositoryNameException(pkgbase) - if action == "git-receive-pack" and pkgbase_exists(pkgbase): + if action == 'git-receive-pack' and pkgbase_exists(pkgbase): if not privileged and not pkgbase_has_write_access(pkgbase, user): raise aurweb.exceptions.PermissionDeniedException(user) @@ -552,60 +507,65 @@ def serve(action, cmdargv, user, privileged, remote_addr): # noqa: C901 os.environ["AUR_PKGBASE"] = pkgbase os.environ["GIT_NAMESPACE"] = pkgbase cmd = action + " '" + repo_path + "'" - os.execl(git_shell_cmd, git_shell_cmd, "-c", cmd) - elif action == "set-keywords": - checkarg_atleast(cmdargv, "repository name") + os.execl(git_shell_cmd, git_shell_cmd, '-c', cmd) + elif action == 'set-keywords': + checkarg_atleast(cmdargv, 'repository name') pkgbase_set_keywords(cmdargv[1], cmdargv[2:]) - elif action == "list-repos": + elif action == 'list-repos': checkarg(cmdargv) list_repos(user) - elif action == "restore": - checkarg(cmdargv, "repository name") + elif action == 'setup-repo': + checkarg(cmdargv, 'repository name') + warn('{:s} is deprecated. ' + 'Use `git push` to create new repositories.'.format(action)) + create_pkgbase(cmdargv[1], user) + elif action == 'restore': + checkarg(cmdargv, 'repository name') pkgbase = cmdargv[1] - validate_pkgbase(pkgbase, user) + create_pkgbase(pkgbase, user) os.environ["AUR_USER"] = user os.environ["AUR_PKGBASE"] = pkgbase - os.execl(git_update_cmd, git_update_cmd, "restore") - elif action == "adopt": - checkarg(cmdargv, "repository name") + os.execl(git_update_cmd, git_update_cmd, 'restore') + elif action == 'adopt': + checkarg(cmdargv, 'repository name') pkgbase = cmdargv[1] pkgbase_adopt(pkgbase, user, privileged) - elif action == "disown": - checkarg(cmdargv, "repository name") + elif action == 'disown': + checkarg(cmdargv, 'repository name') pkgbase = cmdargv[1] pkgbase_disown(pkgbase, user, privileged) - elif action == "flag": - checkarg(cmdargv, "repository name", "comment") + elif action == 'flag': + checkarg(cmdargv, 'repository name', 'comment') pkgbase = cmdargv[1] comment = cmdargv[2] pkgbase_flag(pkgbase, user, comment) - elif action == "unflag": - checkarg(cmdargv, "repository name") + elif action == 'unflag': + checkarg(cmdargv, 'repository name') pkgbase = cmdargv[1] pkgbase_unflag(pkgbase, user) - elif action == "vote": - checkarg(cmdargv, "repository name") + elif action == 'vote': + checkarg(cmdargv, 'repository name') pkgbase = cmdargv[1] pkgbase_vote(pkgbase, user) - elif action == "unvote": - checkarg(cmdargv, "repository name") + elif action == 'unvote': + checkarg(cmdargv, 'repository name') pkgbase = cmdargv[1] pkgbase_unvote(pkgbase, user) - elif action == "set-comaintainers": - checkarg_atleast(cmdargv, "repository name") + elif action == 'set-comaintainers': + checkarg_atleast(cmdargv, 'repository name') pkgbase = cmdargv[1] userlist = cmdargv[2:] pkgbase_set_comaintainers(pkgbase, userlist, user, privileged) - elif action == "help": + elif action == 'help': cmds = { "adopt ": "Adopt a package base.", "disown ": "Disown a package base.", @@ -615,6 +575,7 @@ def serve(action, cmdargv, user, privileged, remote_addr): # noqa: C901 "restore ": "Restore a deleted package base.", "set-comaintainers [...]": "Set package base co-maintainers.", "set-keywords [...]": "Change package base keywords.", + "setup-repo ": "Create a repository (deprecated).", "unflag ": "Remove out-of-date flag from a package base.", "unvote ": "Remove vote from a package base.", "vote ": "Vote for a package base.", @@ -623,21 +584,21 @@ def serve(action, cmdargv, user, privileged, remote_addr): # noqa: C901 } usage(cmds) else: - msg = "invalid command: {:s}".format(action) + msg = 'invalid command: {:s}'.format(action) raise aurweb.exceptions.InvalidArgumentsException(msg) def main(): - user = os.environ.get("AUR_USER") - privileged = os.environ.get("AUR_PRIVILEGED", "0") == "1" - ssh_cmd = os.environ.get("SSH_ORIGINAL_COMMAND") - ssh_client = os.environ.get("SSH_CLIENT") + user = os.environ.get('AUR_USER') + privileged = (os.environ.get('AUR_PRIVILEGED', '0') == '1') + ssh_cmd = os.environ.get('SSH_ORIGINAL_COMMAND') + ssh_client = os.environ.get('SSH_CLIENT') if not ssh_cmd: - die_with_help(f"Welcome to AUR, {user}! Interactive shell is disabled.") + die_with_help("Interactive shell is disabled.") cmdargv = shlex.split(ssh_cmd) action = cmdargv[0] - remote_addr = ssh_client.split(" ")[0] if ssh_client else None + remote_addr = ssh_client.split(' ')[0] if ssh_client else None try: serve(action, cmdargv, user, privileged, remote_addr) @@ -646,10 +607,10 @@ def main(): except aurweb.exceptions.BannedException: die("The SSH interface is disabled for your IP address.") except aurweb.exceptions.InvalidArgumentsException as e: - die_with_help("{:s}: {}".format(action, e)) + die_with_help('{:s}: {}'.format(action, e)) except aurweb.exceptions.AurwebException as e: - die("{:s}: {}".format(action, e)) + die('{:s}: {}'.format(action, e)) -if __name__ == "__main__": +if __name__ == '__main__': main() diff --git a/aurweb/git/update.py b/aurweb/git/update.py index 1118340d..2424bf6c 100755 --- a/aurweb/git/update.py +++ b/aurweb/git/update.py @@ -13,23 +13,23 @@ import srcinfo.utils import aurweb.config import aurweb.db -notify_cmd = aurweb.config.get("notifications", "notify-cmd") +notify_cmd = aurweb.config.get('notifications', 'notify-cmd') -repo_path = aurweb.config.get("serve", "repo-path") -repo_regex = aurweb.config.get("serve", "repo-regex") +repo_path = aurweb.config.get('serve', 'repo-path') +repo_regex = aurweb.config.get('serve', 'repo-regex') -max_blob_size = aurweb.config.getint("update", "max-blob-size") +max_blob_size = aurweb.config.getint('update', 'max-blob-size') def size_humanize(num): - for unit in ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB"]: + for unit in ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB']: if abs(num) < 2048.0: if isinstance(num, int): return "{}{}".format(num, unit) else: return "{:.2f}{}".format(num, unit) num /= 1024.0 - return "{:.2f}{}".format(num, "YiB") + return "{:.2f}{}".format(num, 'YiB') def extract_arch_fields(pkginfo, field): @@ -39,20 +39,20 @@ def extract_arch_fields(pkginfo, field): for val in pkginfo[field]: values.append({"value": val, "arch": None}) - for arch in pkginfo["arch"]: - if field + "_" + arch in pkginfo: - for val in pkginfo[field + "_" + arch]: + for arch in pkginfo['arch']: + if field + '_' + arch in pkginfo: + for val in pkginfo[field + '_' + arch]: values.append({"value": val, "arch": arch}) return values def parse_dep(depstring): - dep, _, desc = depstring.partition(": ") - depname = re.sub(r"(<|=|>).*", "", dep) - depcond = dep[len(depname) :] + dep, _, desc = depstring.partition(': ') + depname = re.sub(r'(<|=|>).*', '', dep) + depcond = dep[len(depname):] - return depname, desc, depcond + return (depname, desc, depcond) def create_pkgbase(conn, pkgbase, user): @@ -60,18 +60,15 @@ def create_pkgbase(conn, pkgbase, user): userid = cur.fetchone()[0] now = int(time.time()) - cur = conn.execute( - "INSERT INTO PackageBases (Name, SubmittedTS, " - + "ModifiedTS, SubmitterUID, MaintainerUID, " - + "FlaggerComment) VALUES (?, ?, ?, ?, ?, '')", - [pkgbase, now, now, userid, userid], - ) + cur = conn.execute("INSERT INTO PackageBases (Name, SubmittedTS, " + + "ModifiedTS, SubmitterUID, MaintainerUID, " + + "FlaggerComment) VALUES (?, ?, ?, ?, ?, '')", + [pkgbase, now, now, userid, userid]) pkgbase_id = cur.lastrowid - cur = conn.execute( - "INSERT INTO PackageNotifications " + "(PackageBaseID, UserID) VALUES (?, ?)", - [pkgbase_id, userid], - ) + cur = conn.execute("INSERT INTO PackageNotifications " + + "(PackageBaseID, UserID) VALUES (?, ?)", + [pkgbase_id, userid]) conn.commit() @@ -80,10 +77,9 @@ def create_pkgbase(conn, pkgbase, user): def save_metadata(metadata, conn, user): # noqa: C901 # Obtain package base ID and previous maintainer. - pkgbase = metadata["pkgbase"] - cur = conn.execute( - "SELECT ID, MaintainerUID FROM PackageBases " "WHERE Name = ?", [pkgbase] - ) + pkgbase = metadata['pkgbase'] + cur = conn.execute("SELECT ID, MaintainerUID FROM PackageBases " + "WHERE Name = ?", [pkgbase]) (pkgbase_id, maintainer_uid) = cur.fetchone() was_orphan = not maintainer_uid @@ -93,142 +89,119 @@ def save_metadata(metadata, conn, user): # noqa: C901 # Update package base details and delete current packages. now = int(time.time()) - conn.execute( - "UPDATE PackageBases SET ModifiedTS = ?, " - + "PackagerUID = ?, OutOfDateTS = NULL WHERE ID = ?", - [now, user_id, pkgbase_id], - ) - conn.execute( - "UPDATE PackageBases SET MaintainerUID = ? " - + "WHERE ID = ? AND MaintainerUID IS NULL", - [user_id, pkgbase_id], - ) - for table in ("Sources", "Depends", "Relations", "Licenses", "Groups"): - conn.execute( - "DELETE FROM Package" - + table - + " WHERE EXISTS (" - + "SELECT * FROM Packages " - + "WHERE Packages.PackageBaseID = ? AND " - + "Package" - + table - + ".PackageID = Packages.ID)", - [pkgbase_id], - ) + conn.execute("UPDATE PackageBases SET ModifiedTS = ?, " + + "PackagerUID = ?, OutOfDateTS = NULL WHERE ID = ?", + [now, user_id, pkgbase_id]) + conn.execute("UPDATE PackageBases SET MaintainerUID = ? " + + "WHERE ID = ? AND MaintainerUID IS NULL", + [user_id, pkgbase_id]) + for table in ('Sources', 'Depends', 'Relations', 'Licenses', 'Groups'): + conn.execute("DELETE FROM Package" + table + " WHERE EXISTS (" + + "SELECT * FROM Packages " + + "WHERE Packages.PackageBaseID = ? AND " + + "Package" + table + ".PackageID = Packages.ID)", + [pkgbase_id]) conn.execute("DELETE FROM Packages WHERE PackageBaseID = ?", [pkgbase_id]) for pkgname in srcinfo.utils.get_package_names(metadata): pkginfo = srcinfo.utils.get_merged_package(pkgname, metadata) - if "epoch" in pkginfo and int(pkginfo["epoch"]) > 0: - ver = "{:d}:{:s}-{:s}".format( - int(pkginfo["epoch"]), pkginfo["pkgver"], pkginfo["pkgrel"] - ) + if 'epoch' in pkginfo and int(pkginfo['epoch']) > 0: + ver = '{:d}:{:s}-{:s}'.format(int(pkginfo['epoch']), + pkginfo['pkgver'], + pkginfo['pkgrel']) else: - ver = "{:s}-{:s}".format(pkginfo["pkgver"], pkginfo["pkgrel"]) + ver = '{:s}-{:s}'.format(pkginfo['pkgver'], pkginfo['pkgrel']) - for field in ("pkgdesc", "url"): + for field in ('pkgdesc', 'url'): if field not in pkginfo: pkginfo[field] = None # Create a new package. - cur = conn.execute( - "INSERT INTO Packages (PackageBaseID, Name, " - + "Version, Description, URL) " - + "VALUES (?, ?, ?, ?, ?)", - [pkgbase_id, pkginfo["pkgname"], ver, pkginfo["pkgdesc"], pkginfo["url"]], - ) + cur = conn.execute("INSERT INTO Packages (PackageBaseID, Name, " + + "Version, Description, URL) " + + "VALUES (?, ?, ?, ?, ?)", + [pkgbase_id, pkginfo['pkgname'], ver, + pkginfo['pkgdesc'], pkginfo['url']]) conn.commit() pkgid = cur.lastrowid # Add package sources. - for source_info in extract_arch_fields(pkginfo, "source"): - conn.execute( - "INSERT INTO PackageSources (PackageID, Source, " - + "SourceArch) VALUES (?, ?, ?)", - [pkgid, source_info["value"], source_info["arch"]], - ) + for source_info in extract_arch_fields(pkginfo, 'source'): + conn.execute("INSERT INTO PackageSources (PackageID, Source, " + + "SourceArch) VALUES (?, ?, ?)", + [pkgid, source_info['value'], source_info['arch']]) # Add package dependencies. - for deptype in ("depends", "makedepends", "checkdepends", "optdepends"): - cur = conn.execute( - "SELECT ID FROM DependencyTypes WHERE Name = ?", [deptype] - ) + for deptype in ('depends', 'makedepends', + 'checkdepends', 'optdepends'): + cur = conn.execute("SELECT ID FROM DependencyTypes WHERE Name = ?", + [deptype]) deptypeid = cur.fetchone()[0] for dep_info in extract_arch_fields(pkginfo, deptype): - depname, depdesc, depcond = parse_dep(dep_info["value"]) - deparch = dep_info["arch"] - conn.execute( - "INSERT INTO PackageDepends (PackageID, " - + "DepTypeID, DepName, DepDesc, DepCondition, " - + "DepArch) VALUES (?, ?, ?, ?, ?, ?)", - [pkgid, deptypeid, depname, depdesc, depcond, deparch], - ) + depname, depdesc, depcond = parse_dep(dep_info['value']) + deparch = dep_info['arch'] + conn.execute("INSERT INTO PackageDepends (PackageID, " + + "DepTypeID, DepName, DepDesc, DepCondition, " + + "DepArch) VALUES (?, ?, ?, ?, ?, ?)", + [pkgid, deptypeid, depname, depdesc, depcond, + deparch]) # Add package relations (conflicts, provides, replaces). - for reltype in ("conflicts", "provides", "replaces"): - cur = conn.execute("SELECT ID FROM RelationTypes WHERE Name = ?", [reltype]) + for reltype in ('conflicts', 'provides', 'replaces'): + cur = conn.execute("SELECT ID FROM RelationTypes WHERE Name = ?", + [reltype]) reltypeid = cur.fetchone()[0] for rel_info in extract_arch_fields(pkginfo, reltype): - relname, _, relcond = parse_dep(rel_info["value"]) - relarch = rel_info["arch"] - conn.execute( - "INSERT INTO PackageRelations (PackageID, " - + "RelTypeID, RelName, RelCondition, RelArch) " - + "VALUES (?, ?, ?, ?, ?)", - [pkgid, reltypeid, relname, relcond, relarch], - ) + relname, _, relcond = parse_dep(rel_info['value']) + relarch = rel_info['arch'] + conn.execute("INSERT INTO PackageRelations (PackageID, " + + "RelTypeID, RelName, RelCondition, RelArch) " + + "VALUES (?, ?, ?, ?, ?)", + [pkgid, reltypeid, relname, relcond, relarch]) # Add package licenses. - if "license" in pkginfo: - for license in pkginfo["license"]: - cur = conn.execute("SELECT ID FROM Licenses WHERE Name = ?", [license]) + if 'license' in pkginfo: + for license in pkginfo['license']: + cur = conn.execute("SELECT ID FROM Licenses WHERE Name = ?", + [license]) row = cur.fetchone() if row: licenseid = row[0] else: - cur = conn.execute( - "INSERT INTO Licenses (Name) " + "VALUES (?)", [license] - ) + cur = conn.execute("INSERT INTO Licenses (Name) " + + "VALUES (?)", [license]) conn.commit() licenseid = cur.lastrowid - conn.execute( - "INSERT INTO PackageLicenses (PackageID, " - + "LicenseID) VALUES (?, ?)", - [pkgid, licenseid], - ) + conn.execute("INSERT INTO PackageLicenses (PackageID, " + + "LicenseID) VALUES (?, ?)", + [pkgid, licenseid]) # Add package groups. - if "groups" in pkginfo: - for group in pkginfo["groups"]: - cur = conn.execute("SELECT ID FROM `Groups` WHERE Name = ?", [group]) + if 'groups' in pkginfo: + for group in pkginfo['groups']: + cur = conn.execute("SELECT ID FROM `Groups` WHERE Name = ?", + [group]) row = cur.fetchone() if row: groupid = row[0] else: - cur = conn.execute( - "INSERT INTO `Groups` (Name) VALUES (?)", [group] - ) + cur = conn.execute("INSERT INTO `Groups` (Name) VALUES (?)", + [group]) conn.commit() groupid = cur.lastrowid - conn.execute( - "INSERT INTO PackageGroups (PackageID, " "GroupID) VALUES (?, ?)", - [pkgid, groupid], - ) + conn.execute("INSERT INTO PackageGroups (PackageID, " + "GroupID) VALUES (?, ?)", [pkgid, groupid]) # Add user to notification list on adoption. if was_orphan: - cur = conn.execute( - "SELECT COUNT(*) FROM PackageNotifications WHERE " - + "PackageBaseID = ? AND UserID = ?", - [pkgbase_id, user_id], - ) + cur = conn.execute("SELECT COUNT(*) FROM PackageNotifications WHERE " + + "PackageBaseID = ? AND UserID = ?", + [pkgbase_id, user_id]) if cur.fetchone()[0] == 0: - conn.execute( - "INSERT INTO PackageNotifications " - + "(PackageBaseID, UserID) VALUES (?, ?)", - [pkgbase_id, user_id], - ) + conn.execute("INSERT INTO PackageNotifications " + + "(PackageBaseID, UserID) VALUES (?, ?)", + [pkgbase_id, user_id]) conn.commit() @@ -239,7 +212,7 @@ def update_notify(conn, user, pkgbase_id): user_id = int(cur.fetchone()[0]) # Execute the notification script. - subprocess.Popen((notify_cmd, "update", str(user_id), str(pkgbase_id))) + subprocess.Popen((notify_cmd, 'update', str(user_id), str(pkgbase_id))) def die(msg): @@ -252,91 +225,28 @@ def warn(msg): def die_commit(msg, commit): - sys.stderr.write("error: The following error " + "occurred when parsing commit\n") + sys.stderr.write("error: The following error " + + "occurred when parsing commit\n") sys.stderr.write("error: {:s}:\n".format(commit)) sys.stderr.write("error: {:s}\n".format(msg)) exit(1) -def validate_metadata(metadata, commit): # noqa: C901 - try: - metadata_pkgbase = metadata["pkgbase"] - except KeyError: - die_commit( - "invalid .SRCINFO, does not contain a pkgbase (is the file empty?)", - str(commit.id), - ) - if not re.match(repo_regex, metadata_pkgbase): - die_commit("invalid pkgbase: {:s}".format(metadata_pkgbase), str(commit.id)) - - if not metadata["packages"]: - die_commit("missing pkgname entry", str(commit.id)) - - for pkgname in set(metadata["packages"].keys()): - pkginfo = srcinfo.utils.get_merged_package(pkgname, metadata) - - for field in ("pkgver", "pkgrel", "pkgname"): - if field not in pkginfo: - die_commit( - "missing mandatory field: {:s}".format(field), str(commit.id) - ) - - if "epoch" in pkginfo and not pkginfo["epoch"].isdigit(): - die_commit("invalid epoch: {:s}".format(pkginfo["epoch"]), str(commit.id)) - - if not re.match(r"[a-z0-9][a-z0-9\.+_-]*$", pkginfo["pkgname"]): - die_commit( - "invalid package name: {:s}".format(pkginfo["pkgname"]), - str(commit.id), - ) - - max_len = {"pkgname": 255, "pkgdesc": 255, "url": 8000} - for field in max_len.keys(): - if field in pkginfo and len(pkginfo[field]) > max_len[field]: - die_commit( - "{:s} field too long: {:s}".format(field, pkginfo[field]), - str(commit.id), - ) - - for field in ("install", "changelog"): - if field in pkginfo and not pkginfo[field] in commit.tree: - die_commit( - "missing {:s} file: {:s}".format(field, pkginfo[field]), - str(commit.id), - ) - - for field in extract_arch_fields(pkginfo, "source"): - fname = field["value"] - if len(fname) > 8000: - die_commit("source entry too long: {:s}".format(fname), str(commit.id)) - if "://" in fname or "lp:" in fname: - continue - if fname not in commit.tree: - die_commit("missing source file: {:s}".format(fname), str(commit.id)) - - -def validate_blob_size(blob: pygit2.Object, commit: pygit2.Commit): - if isinstance(blob, pygit2.Blob) and blob.size > max_blob_size: - die_commit( - "maximum blob size ({:s}) exceeded".format(size_humanize(max_blob_size)), - str(commit.id), - ) - - def main(): # noqa: C901 repo = pygit2.Repository(repo_path) user = os.environ.get("AUR_USER") pkgbase = os.environ.get("AUR_PKGBASE") - privileged = os.environ.get("AUR_PRIVILEGED", "0") == "1" - allow_overwrite = (os.environ.get("AUR_OVERWRITE", "0") == "1") and privileged + privileged = (os.environ.get("AUR_PRIVILEGED", '0') == '1') + allow_overwrite = (os.environ.get("AUR_OVERWRITE", '0') == '1') and privileged warn_or_die = warn if privileged else die if len(sys.argv) == 2 and sys.argv[1] == "restore": - if "refs/heads/" + pkgbase not in repo.listall_references(): - die("{:s}: repository not found: {:s}".format(sys.argv[1], pkgbase)) + if 'refs/heads/' + pkgbase not in repo.listall_references(): + die('{:s}: repository not found: {:s}'.format(sys.argv[1], + pkgbase)) refname = "refs/heads/master" - branchref = "refs/heads/" + pkgbase + branchref = 'refs/heads/' + pkgbase sha1_old = sha1_new = repo.lookup_reference(branchref).target elif len(sys.argv) == 4: refname, sha1_old, sha1_new = sys.argv[1:4] @@ -356,115 +266,137 @@ def main(): # noqa: C901 die("denying non-fast-forward (you should pull first)") # Prepare the walker that validates new commits. - walker = repo.walk(sha1_new, pygit2.GIT_SORT_REVERSE) + walker = repo.walk(sha1_new, pygit2.GIT_SORT_TOPOLOGICAL) if sha1_old != "0" * 40: walker.hide(sha1_old) - head_commit = repo[sha1_new] - if ".SRCINFO" not in head_commit.tree: - die_commit("missing .SRCINFO", str(head_commit.id)) - - # Read .SRCINFO from the HEAD commit. - metadata_raw = repo[head_commit.tree[".SRCINFO"].id].data.decode() - (metadata, errors) = srcinfo.parse.parse_srcinfo(metadata_raw) - if errors: - sys.stderr.write( - "error: The following errors occurred " "when parsing .SRCINFO in commit\n" - ) - sys.stderr.write("error: {:s}:\n".format(str(head_commit.id))) - for error in errors: - for err in error["error"]: - sys.stderr.write("error: line {:d}: {:s}\n".format(error["line"], err)) - exit(1) - - # check if there is a correct .SRCINFO file in the latest revision - validate_metadata(metadata, head_commit) - # Validate all new commits. for commit in walker: - if "PKGBUILD" not in commit.tree: - die_commit("missing PKGBUILD", str(commit.id)) + for fname in ('.SRCINFO', 'PKGBUILD'): + if fname not in commit.tree: + die_commit("missing {:s}".format(fname), str(commit.id)) - # Iterate over files in root dir for treeobj in commit.tree: - # Don't allow any subdirs besides "keys/" - if isinstance(treeobj, pygit2.Tree) and treeobj.name != "keys": - die_commit( - "the repository must not contain subdirectories", - str(commit.id), - ) + blob = repo[treeobj.id] - # Check size of files in root dir - validate_blob_size(treeobj, commit) + if isinstance(blob, pygit2.Tree): + die_commit("the repository must not contain subdirectories", + str(commit.id)) - # If we got a subdir keys/, - # make sure it only contains a pgp/ subdir with key files - if "keys" in commit.tree: - # Check for forbidden files/dirs in keys/ - for keyobj in commit.tree["keys"]: - if not isinstance(keyobj, pygit2.Tree) or keyobj.name != "pgp": - die_commit( - "the keys/ subdir may only contain a pgp/ directory", - str(commit.id), - ) - # Check for forbidden files in keys/pgp/ - if "keys/pgp" in commit.tree: - for pgpobj in commit.tree["keys/pgp"]: - if not isinstance(pgpobj, pygit2.Blob) or not pgpobj.name.endswith( - ".asc" - ): - die_commit( - "the subdir may only contain .asc (PGP pub key) files", - str(commit.id), - ) - # Check file size for pgp key files - validate_blob_size(pgpobj, commit) + if not isinstance(blob, pygit2.Blob): + die_commit("not a blob object: {:s}".format(treeobj), + str(commit.id)) + + if blob.size > max_blob_size: + die_commit("maximum blob size ({:s}) exceeded".format( + size_humanize(max_blob_size)), str(commit.id)) + + metadata_raw = repo[commit.tree['.SRCINFO'].id].data.decode() + (metadata, errors) = srcinfo.parse.parse_srcinfo(metadata_raw) + if errors: + sys.stderr.write("error: The following errors occurred " + "when parsing .SRCINFO in commit\n") + sys.stderr.write("error: {:s}:\n".format(str(commit.id))) + for error in errors: + for err in error['error']: + sys.stderr.write("error: line {:d}: {:s}\n".format( + error['line'], err)) + exit(1) + + try: + metadata_pkgbase = metadata['pkgbase'] + except KeyError: + die_commit('invalid .SRCINFO, does not contain a pkgbase (is the file empty?)', + str(commit.id)) + if not re.match(repo_regex, metadata_pkgbase): + die_commit('invalid pkgbase: {:s}'.format(metadata_pkgbase), + str(commit.id)) + + if not metadata['packages']: + die_commit('missing pkgname entry', str(commit.id)) + + for pkgname in set(metadata['packages'].keys()): + pkginfo = srcinfo.utils.get_merged_package(pkgname, metadata) + + for field in ('pkgver', 'pkgrel', 'pkgname'): + if field not in pkginfo: + die_commit('missing mandatory field: {:s}'.format(field), + str(commit.id)) + + if 'epoch' in pkginfo and not pkginfo['epoch'].isdigit(): + die_commit('invalid epoch: {:s}'.format(pkginfo['epoch']), + str(commit.id)) + + if not re.match(r'[a-z0-9][a-z0-9\.+_-]*$', pkginfo['pkgname']): + die_commit('invalid package name: {:s}'.format( + pkginfo['pkgname']), str(commit.id)) + + max_len = {'pkgname': 255, 'pkgdesc': 255, 'url': 8000} + for field in max_len.keys(): + if field in pkginfo and len(pkginfo[field]) > max_len[field]: + die_commit('{:s} field too long: {:s}'.format(field, + pkginfo[field]), str(commit.id)) + + for field in ('install', 'changelog'): + if field in pkginfo and not pkginfo[field] in commit.tree: + die_commit('missing {:s} file: {:s}'.format(field, + pkginfo[field]), str(commit.id)) + + for field in extract_arch_fields(pkginfo, 'source'): + fname = field['value'] + if len(fname) > 8000: + die_commit('source entry too long: {:s}'.format(fname), + str(commit.id)) + if "://" in fname or "lp:" in fname: + continue + if fname not in commit.tree: + die_commit('missing source file: {:s}'.format(fname), + str(commit.id)) # Display a warning if .SRCINFO is unchanged. if sha1_old not in ("0000000000000000000000000000000000000000", sha1_new): - srcinfo_id_old = repo[sha1_old].tree[".SRCINFO"].id - srcinfo_id_new = repo[sha1_new].tree[".SRCINFO"].id + srcinfo_id_old = repo[sha1_old].tree['.SRCINFO'].id + srcinfo_id_new = repo[sha1_new].tree['.SRCINFO'].id if srcinfo_id_old == srcinfo_id_new: - warn(".SRCINFO unchanged. " "The package database will not be updated!") + warn(".SRCINFO unchanged. " + "The package database will not be updated!") + + # Read .SRCINFO from the HEAD commit. + metadata_raw = repo[repo[sha1_new].tree['.SRCINFO'].id].data.decode() + (metadata, errors) = srcinfo.parse.parse_srcinfo(metadata_raw) # Ensure that the package base name matches the repository name. - metadata_pkgbase = metadata["pkgbase"] + metadata_pkgbase = metadata['pkgbase'] if metadata_pkgbase != pkgbase: - die("invalid pkgbase: {:s}, expected {:s}".format(metadata_pkgbase, pkgbase)) + die('invalid pkgbase: {:s}, expected {:s}'.format(metadata_pkgbase, + pkgbase)) # Ensure that packages are neither blacklisted nor overwritten. - pkgbase = metadata["pkgbase"] + pkgbase = metadata['pkgbase'] cur = conn.execute("SELECT ID FROM PackageBases WHERE Name = ?", [pkgbase]) row = cur.fetchone() pkgbase_id = row[0] if row else 0 cur = conn.execute("SELECT Name FROM PackageBlacklist") blacklist = [row[0] for row in cur.fetchall()] - if pkgbase in blacklist: - warn_or_die("pkgbase is blacklisted: {:s}".format(pkgbase)) cur = conn.execute("SELECT Name, Repo FROM OfficialProviders") providers = dict(cur.fetchall()) for pkgname in srcinfo.utils.get_package_names(metadata): pkginfo = srcinfo.utils.get_merged_package(pkgname, metadata) - pkgname = pkginfo["pkgname"] + pkgname = pkginfo['pkgname'] if pkgname in blacklist: - warn_or_die("package is blacklisted: {:s}".format(pkgname)) + warn_or_die('package is blacklisted: {:s}'.format(pkgname)) if pkgname in providers: - warn_or_die( - "package already provided by [{:s}]: {:s}".format( - providers[pkgname], pkgname - ) - ) + warn_or_die('package already provided by [{:s}]: {:s}'.format( + providers[pkgname], pkgname)) - cur = conn.execute( - "SELECT COUNT(*) FROM Packages WHERE Name = ? " + "AND PackageBaseID <> ?", - [pkgname, pkgbase_id], - ) + cur = conn.execute("SELECT COUNT(*) FROM Packages WHERE Name = ? " + + "AND PackageBaseID <> ?", [pkgname, pkgbase_id]) if cur.fetchone()[0] > 0: - die("cannot overwrite package: {:s}".format(pkgname)) + die('cannot overwrite package: {:s}'.format(pkgname)) # Create a new package base if it does not exist yet. if pkgbase_id == 0: @@ -475,7 +407,7 @@ def main(): # noqa: C901 # Create (or update) a branch with the name of the package base for better # accessibility. - branchref = "refs/heads/" + pkgbase + branchref = 'refs/heads/' + pkgbase repo.create_reference(branchref, sha1_new, True) # Work around a Git bug: The HEAD ref is not updated when using @@ -483,7 +415,7 @@ def main(): # noqa: C901 # mainline. See # http://git.661346.n2.nabble.com/PATCH-receive-pack-Create-a-HEAD-ref-for-ref-namespace-td7632149.html # for details. - headref = "refs/namespaces/" + pkgbase + "/HEAD" + headref = 'refs/namespaces/' + pkgbase + '/HEAD' repo.create_reference(headref, sha1_new, True) # Send package update notifications. @@ -494,5 +426,5 @@ def main(): # noqa: C901 conn.close() -if __name__ == "__main__": +if __name__ == '__main__': main() diff --git a/aurweb/initdb.py b/aurweb/initdb.py index 7181ea3e..a4a9f621 100644 --- a/aurweb/initdb.py +++ b/aurweb/initdb.py @@ -3,46 +3,34 @@ import argparse import alembic.command import alembic.config -import aurweb.aur_logging import aurweb.db +import aurweb.logging import aurweb.schema def feed_initial_data(conn): - conn.execute( - aurweb.schema.AccountTypes.insert(), - [ - {"ID": 1, "AccountType": "User"}, - {"ID": 2, "AccountType": "Package Maintainer"}, - {"ID": 3, "AccountType": "Developer"}, - {"ID": 4, "AccountType": "Package Maintainer & Developer"}, - ], - ) - conn.execute( - aurweb.schema.DependencyTypes.insert(), - [ - {"ID": 1, "Name": "depends"}, - {"ID": 2, "Name": "makedepends"}, - {"ID": 3, "Name": "checkdepends"}, - {"ID": 4, "Name": "optdepends"}, - ], - ) - conn.execute( - aurweb.schema.RelationTypes.insert(), - [ - {"ID": 1, "Name": "conflicts"}, - {"ID": 2, "Name": "provides"}, - {"ID": 3, "Name": "replaces"}, - ], - ) - conn.execute( - aurweb.schema.RequestTypes.insert(), - [ - {"ID": 1, "Name": "deletion"}, - {"ID": 2, "Name": "orphan"}, - {"ID": 3, "Name": "merge"}, - ], - ) + conn.execute(aurweb.schema.AccountTypes.insert(), [ + {'ID': 1, 'AccountType': 'User'}, + {'ID': 2, 'AccountType': 'Trusted User'}, + {'ID': 3, 'AccountType': 'Developer'}, + {'ID': 4, 'AccountType': 'Trusted User & Developer'}, + ]) + conn.execute(aurweb.schema.DependencyTypes.insert(), [ + {'ID': 1, 'Name': 'depends'}, + {'ID': 2, 'Name': 'makedepends'}, + {'ID': 3, 'Name': 'checkdepends'}, + {'ID': 4, 'Name': 'optdepends'}, + ]) + conn.execute(aurweb.schema.RelationTypes.insert(), [ + {'ID': 1, 'Name': 'conflicts'}, + {'ID': 2, 'Name': 'provides'}, + {'ID': 3, 'Name': 'replaces'}, + ]) + conn.execute(aurweb.schema.RequestTypes.insert(), [ + {'ID': 1, 'Name': 'deletion'}, + {'ID': 2, 'Name': 'orphan'}, + {'ID': 3, 'Name': 'merge'}, + ]) def run(args): @@ -52,8 +40,8 @@ def run(args): # the last step and leave the database in an inconsistent state. The # configuration is loaded lazily, so we query it to force its loading. if args.use_alembic: - alembic_config = alembic.config.Config("alembic.ini") - alembic_config.get_main_option("script_location") + alembic_config = alembic.config.Config('alembic.ini') + alembic_config.get_main_option('script_location') alembic_config.attributes["configure_logger"] = False engine = aurweb.db.get_engine(echo=(args.verbose >= 1)) @@ -63,21 +51,17 @@ def run(args): conn.close() if args.use_alembic: - alembic.command.stamp(alembic_config, "head") + alembic.command.stamp(alembic_config, 'head') -if __name__ == "__main__": +if __name__ == '__main__': parser = argparse.ArgumentParser( - prog="python -m aurweb.initdb", description="Initialize the aurweb database." - ) - parser.add_argument( - "-v", "--verbose", action="count", default=0, help="increase verbosity" - ) - parser.add_argument( - "--no-alembic", - help="disable Alembic migrations support", - dest="use_alembic", - action="store_false", - ) + prog='python -m aurweb.initdb', + description='Initialize the aurweb database.') + parser.add_argument('-v', '--verbose', action='count', default=0, + help='increase verbosity') + parser.add_argument('--no-alembic', + help='disable Alembic migrations support', + dest='use_alembic', action='store_false') args = parser.parse_args() run(args) diff --git a/aurweb/l10n.py b/aurweb/l10n.py index 1ce5e956..4998d8ee 100644 --- a/aurweb/l10n.py +++ b/aurweb/l10n.py @@ -1,44 +1,43 @@ import gettext + from collections import OrderedDict from fastapi import Request import aurweb.config -SUPPORTED_LANGUAGES = OrderedDict( - { - "ar": "العربية", - "ast": "Asturianu", - "ca": "Català", - "cs": "Český", - "da": "Dansk", - "de": "Deutsch", - "el": "Ελληνικά", - "en": "English", - "es": "Español", - "es_419": "Español (Latinoamérica)", - "fi": "Suomi", - "fr": "Français", - "he": "עברית", - "hr": "Hrvatski", - "hu": "Magyar", - "it": "Italiano", - "ja": "日本語", - "nb": "Norsk", - "nl": "Nederlands", - "pl": "Polski", - "pt_BR": "Português (Brasil)", - "pt_PT": "Português (Portugal)", - "ro": "Română", - "ru": "Русский", - "sk": "Slovenčina", - "sr": "Srpski", - "tr": "Türkçe", - "uk": "Українська", - "zh_CN": "简体中文", - "zh_TW": "正體中文", - } -) +SUPPORTED_LANGUAGES = OrderedDict({ + "ar": "العربية", + "ast": "Asturianu", + "ca": "Català", + "cs": "Český", + "da": "Dansk", + "de": "Deutsch", + "el": "Ελληνικά", + "en": "English", + "es": "Español", + "es_419": "Español (Latinoamérica)", + "fi": "Suomi", + "fr": "Français", + "he": "עברית", + "hr": "Hrvatski", + "hu": "Magyar", + "it": "Italiano", + "ja": "日本語", + "nb": "Norsk", + "nl": "Nederlands", + "pl": "Polski", + "pt_BR": "Português (Brasil)", + "pt_PT": "Português (Portugal)", + "ro": "Română", + "ru": "Русский", + "sk": "Slovenčina", + "sr": "Srpski", + "tr": "Türkçe", + "uk": "Українська", + "zh_CN": "简体中文", + "zh_TW": "正體中文" +}) RIGHT_TO_LEFT_LANGUAGES = ("he", "ar") @@ -46,14 +45,15 @@ RIGHT_TO_LEFT_LANGUAGES = ("he", "ar") class Translator: def __init__(self): - self._localedir = aurweb.config.get("options", "localedir") + self._localedir = aurweb.config.get('options', 'localedir') self._translator = {} def get_translator(self, lang: str): if lang not in self._translator: - self._translator[lang] = gettext.translation( - "aurweb", self._localedir, languages=[lang], fallback=True - ) + self._translator[lang] = gettext.translation("aurweb", + self._localedir, + languages=[lang], + fallback=True) return self._translator.get(lang) def translate(self, s: str, lang: str): @@ -64,24 +64,11 @@ class Translator: translator = Translator() -def get_request_language(request: Request) -> str: - """Get a request's language from either query param, user setting or - cookie. We use the configuration's [options] default_lang otherwise. - - @param request FastAPI request - """ - request_lang = request.query_params.get("language") - cookie_lang = request.cookies.get("AURLANG") - if request_lang and request_lang in SUPPORTED_LANGUAGES: - return request_lang - elif ( - request.user.is_authenticated() - and request.user.LangPreference in SUPPORTED_LANGUAGES - ): +def get_request_language(request: Request): + if request.user.is_authenticated(): return request.user.LangPreference - elif cookie_lang and cookie_lang in SUPPORTED_LANGUAGES: - return cookie_lang - return aurweb.config.get_with_fallback("options", "default_lang", "en") + default_lang = aurweb.config.get("options", "default_lang") + return request.cookies.get("AURLANG", default_lang) def get_raw_translator_for_request(request: Request): diff --git a/aurweb/aur_logging.py b/aurweb/logging.py similarity index 92% rename from aurweb/aur_logging.py rename to aurweb/logging.py index d90edfdd..116421e4 100644 --- a/aurweb/aur_logging.py +++ b/aurweb/logging.py @@ -15,7 +15,7 @@ logging.getLogger("root").addHandler(logging.NullHandler()) def get_logger(name: str) -> logging.Logger: - """A logging.getLogger wrapper. Importing this function and + """ A logging.getLogger wrapper. Importing this function and using it to get a module-local logger ensures that logging.conf initialization is performed wherever loggers are used. diff --git a/aurweb/models/__init__.py b/aurweb/models/__init__.py index 90f3c93f..a06077ad 100644 --- a/aurweb/models/__init__.py +++ b/aurweb/models/__init__.py @@ -1,5 +1,4 @@ """ Collection of all aurweb SQLAlchemy declarative models. """ - from .accepted_term import AcceptedTerm # noqa: F401 from .account_type import AccountType # noqa: F401 from .api_rate_limit import ApiRateLimit # noqa: F401 @@ -27,6 +26,6 @@ from .request_type import RequestType # noqa: F401 from .session import Session # noqa: F401 from .ssh_pub_key import SSHPubKey # noqa: F401 from .term import Term # noqa: F401 +from .tu_vote import TUVote # noqa: F401 +from .tu_voteinfo import TUVoteInfo # noqa: F401 from .user import User # noqa: F401 -from .vote import Vote # noqa: F401 -from .voteinfo import VoteInfo # noqa: F401 diff --git a/aurweb/models/accepted_term.py b/aurweb/models/accepted_term.py index 022075e8..0f9b187e 100644 --- a/aurweb/models/accepted_term.py +++ b/aurweb/models/accepted_term.py @@ -13,16 +13,12 @@ class AcceptedTerm(Base): __mapper_args__ = {"primary_key": [__table__.c.TermsID]} User = relationship( - _User, - backref=backref("accepted_terms", lazy="dynamic"), - foreign_keys=[__table__.c.UsersID], - ) + _User, backref=backref("accepted_terms", lazy="dynamic"), + foreign_keys=[__table__.c.UsersID]) Term = relationship( - _Term, - backref=backref("accepted_terms", lazy="dynamic"), - foreign_keys=[__table__.c.TermsID], - ) + _Term, backref=backref("accepted_terms", lazy="dynamic"), + foreign_keys=[__table__.c.TermsID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -31,12 +27,10 @@ class AcceptedTerm(Base): raise IntegrityError( statement="Foreign key UsersID cannot be null.", orig="AcceptedTerms.UserID", - params=("NULL"), - ) + params=("NULL")) if not self.Term and not self.TermsID: raise IntegrityError( statement="Foreign key TermID cannot be null.", orig="AcceptedTerms.TermID", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/account_type.py b/aurweb/models/account_type.py index 70bfc2c5..a849df02 100644 --- a/aurweb/models/account_type.py +++ b/aurweb/models/account_type.py @@ -2,21 +2,21 @@ from aurweb import schema from aurweb.models.declarative import Base USER = "User" -PACKAGE_MAINTAINER = "Package Maintainer" +TRUSTED_USER = "Trusted User" DEVELOPER = "Developer" -PACKAGE_MAINTAINER_AND_DEV = "Package Maintainer & Developer" +TRUSTED_USER_AND_DEV = "Trusted User & Developer" USER_ID = 1 -PACKAGE_MAINTAINER_ID = 2 +TRUSTED_USER_ID = 2 DEVELOPER_ID = 3 -PACKAGE_MAINTAINER_AND_DEV_ID = 4 +TRUSTED_USER_AND_DEV_ID = 4 # Map string constants to integer constants. ACCOUNT_TYPE_ID = { USER: USER_ID, - PACKAGE_MAINTAINER: PACKAGE_MAINTAINER_ID, + TRUSTED_USER: TRUSTED_USER_ID, DEVELOPER: DEVELOPER_ID, - PACKAGE_MAINTAINER_AND_DEV: PACKAGE_MAINTAINER_AND_DEV_ID, + TRUSTED_USER_AND_DEV: TRUSTED_USER_AND_DEV_ID } # Reversed ACCOUNT_TYPE_ID mapping. @@ -24,8 +24,7 @@ ACCOUNT_TYPE_NAME = {v: k for k, v in ACCOUNT_TYPE_ID.items()} class AccountType(Base): - """An ORM model of a single AccountTypes record.""" - + """ An ORM model of a single AccountTypes record. """ __table__ = schema.AccountTypes __tablename__ = __table__.name __mapper_args__ = {"primary_key": [__table__.c.ID]} @@ -37,4 +36,5 @@ class AccountType(Base): return str(self.AccountType) def __repr__(self): - return "" % (self.ID, str(self)) + return "" % ( + self.ID, str(self)) diff --git a/aurweb/models/api_rate_limit.py b/aurweb/models/api_rate_limit.py index ce195a80..19b656df 100644 --- a/aurweb/models/api_rate_limit.py +++ b/aurweb/models/api_rate_limit.py @@ -16,12 +16,10 @@ class ApiRateLimit(Base): raise IntegrityError( statement="Column Requests cannot be null.", orig="ApiRateLimit.Requests", - params=("NULL"), - ) + params=("NULL")) if self.WindowStart is None: raise IntegrityError( statement="Column WindowStart cannot be null.", orig="ApiRateLimit.WindowStart", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/ban.py b/aurweb/models/ban.py index d2a7250d..0fcb6d2e 100644 --- a/aurweb/models/ban.py +++ b/aurweb/models/ban.py @@ -2,7 +2,6 @@ from fastapi import Request from aurweb import db, schema from aurweb.models.declarative import Base -from aurweb.util import get_client_ip class Ban(Base): @@ -15,6 +14,6 @@ class Ban(Base): def is_banned(request: Request): - ip = get_client_ip(request) + ip = request.client.host exists = db.query(Ban).filter(Ban.IPAddress == ip).exists() return db.query(exists).scalar() diff --git a/aurweb/models/declarative.py b/aurweb/models/declarative.py index 22df31c7..20ddd20c 100644 --- a/aurweb/models/declarative.py +++ b/aurweb/models/declarative.py @@ -6,19 +6,26 @@ from aurweb import util def to_dict(model): - return {c.name: getattr(model, c.name) for c in model.__table__.columns} + return { + c.name: getattr(model, c.name) + for c in model.__table__.columns + } def to_json(model, indent: int = None): - return json.dumps( - {k: util.jsonify(v) for k, v in to_dict(model).items()}, indent=indent - ) + return json.dumps({ + k: util.jsonify(v) + for k, v in to_dict(model).items() + }, indent=indent) Base = declarative_base() # Setup __table_args__ applicable to every table. -Base.__table_args__ = {"autoload": False, "extend_existing": True} +Base.__table_args__ = { + "autoload": False, + "extend_existing": True +} # Setup Base.as_dict and Base.json. # diff --git a/aurweb/models/group.py b/aurweb/models/group.py index a6870db6..0275ed94 100644 --- a/aurweb/models/group.py +++ b/aurweb/models/group.py @@ -15,5 +15,4 @@ class Group(Base): raise IntegrityError( statement="Column Name cannot be null.", orig="Groups.Name", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/license.py b/aurweb/models/license.py index f2b02a87..86aeaa86 100644 --- a/aurweb/models/license.py +++ b/aurweb/models/license.py @@ -16,5 +16,4 @@ class License(Base): raise IntegrityError( statement="Column Name cannot be null.", orig="Licenses.Name", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/official_provider.py b/aurweb/models/official_provider.py index 0da9f76c..e111569e 100644 --- a/aurweb/models/official_provider.py +++ b/aurweb/models/official_provider.py @@ -21,19 +21,16 @@ class OfficialProvider(Base): raise IntegrityError( statement="Column Name cannot be null.", orig="OfficialProviders.Name", - params=("NULL"), - ) + params=("NULL")) if not self.Repo: raise IntegrityError( statement="Column Repo cannot be null.", orig="OfficialProviders.Repo", - params=("NULL"), - ) + params=("NULL")) if not self.Provides: raise IntegrityError( statement="Column Provides cannot be null.", orig="OfficialProviders.Provides", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/package.py b/aurweb/models/package.py index e98029f3..64c6a195 100644 --- a/aurweb/models/package.py +++ b/aurweb/models/package.py @@ -12,10 +12,9 @@ class Package(Base): __mapper_args__ = {"primary_key": [__table__.c.ID]} PackageBase = relationship( - _PackageBase, - backref=backref("packages", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.PackageBaseID], - ) + _PackageBase, backref=backref("packages", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.PackageBaseID]) # No Package instances are official packages. is_official = False @@ -27,12 +26,10 @@ class Package(Base): raise IntegrityError( statement="Foreign key PackageBaseID cannot be null.", orig="Packages.PackageBaseID", - params=("NULL"), - ) + params=("NULL")) if self.Name is None: raise IntegrityError( statement="Column Name cannot be null.", orig="Packages.Name", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/package_base.py b/aurweb/models/package_base.py index 26d9165f..37ad63ce 100644 --- a/aurweb/models/package_base.py +++ b/aurweb/models/package_base.py @@ -12,28 +12,20 @@ class PackageBase(Base): __mapper_args__ = {"primary_key": [__table__.c.ID]} Flagger = relationship( - _User, - backref=backref("flagged_bases", lazy="dynamic"), - foreign_keys=[__table__.c.FlaggerUID], - ) + _User, backref=backref("flagged_bases", lazy="dynamic"), + foreign_keys=[__table__.c.FlaggerUID]) Submitter = relationship( - _User, - backref=backref("submitted_bases", lazy="dynamic"), - foreign_keys=[__table__.c.SubmitterUID], - ) + _User, backref=backref("submitted_bases", lazy="dynamic"), + foreign_keys=[__table__.c.SubmitterUID]) Maintainer = relationship( - _User, - backref=backref("maintained_bases", lazy="dynamic"), - foreign_keys=[__table__.c.MaintainerUID], - ) + _User, backref=backref("maintained_bases", lazy="dynamic"), + foreign_keys=[__table__.c.MaintainerUID]) Packager = relationship( - _User, - backref=backref("package_bases", lazy="dynamic"), - foreign_keys=[__table__.c.PackagerUID], - ) + _User, backref=backref("package_bases", lazy="dynamic"), + foreign_keys=[__table__.c.PackagerUID]) # A set used to check for floatable values. TO_FLOAT = {"Popularity"} @@ -45,8 +37,7 @@ class PackageBase(Base): raise IntegrityError( statement="Column Name cannot be null.", orig="PackageBases.Name", - params=("NULL"), - ) + params=("NULL")) # If no SubmittedTS/ModifiedTS is provided on creation, set them # here to the current utc timestamp. @@ -64,13 +55,3 @@ class PackageBase(Base): if key in PackageBase.TO_FLOAT and not isinstance(attr, float): return float(attr) return attr - - -def popularity_decay(pkgbase: PackageBase, utcnow: int): - """Return the delta between now and the last time popularity was updated, in days""" - return int((utcnow - pkgbase.PopularityUpdated.timestamp()) / 86400) - - -def popularity(pkgbase: PackageBase, utcnow: int): - """Return up-to-date popularity""" - return float(pkgbase.Popularity) * (0.98 ** popularity_decay(pkgbase, utcnow)) diff --git a/aurweb/models/package_blacklist.py b/aurweb/models/package_blacklist.py index 7f6e75ea..0f8f0cee 100644 --- a/aurweb/models/package_blacklist.py +++ b/aurweb/models/package_blacklist.py @@ -16,5 +16,4 @@ class PackageBlacklist(Base): raise IntegrityError( statement="Column Name cannot be null.", orig="PackageBlacklist.Name", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/package_comaintainer.py b/aurweb/models/package_comaintainer.py index 4bd7f6b3..b5cdcf38 100644 --- a/aurweb/models/package_comaintainer.py +++ b/aurweb/models/package_comaintainer.py @@ -10,19 +10,19 @@ from aurweb.models.user import User as _User class PackageComaintainer(Base): __table__ = schema.PackageComaintainers __tablename__ = __table__.name - __mapper_args__ = {"primary_key": [__table__.c.UsersID, __table__.c.PackageBaseID]} + __mapper_args__ = { + "primary_key": [__table__.c.UsersID, __table__.c.PackageBaseID] + } User = relationship( - _User, - backref=backref("comaintained", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.UsersID], - ) + _User, backref=backref("comaintained", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.UsersID]) PackageBase = relationship( - _PackageBase, - backref=backref("comaintainers", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.PackageBaseID], - ) + _PackageBase, backref=backref("comaintainers", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.PackageBaseID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -31,19 +31,16 @@ class PackageComaintainer(Base): raise IntegrityError( statement="Foreign key UsersID cannot be null.", orig="PackageComaintainers.UsersID", - params=("NULL"), - ) + params=("NULL")) if not self.PackageBase and not self.PackageBaseID: raise IntegrityError( statement="Foreign key PackageBaseID cannot be null.", orig="PackageComaintainers.PackageBaseID", - params=("NULL"), - ) + params=("NULL")) if not self.Priority: raise IntegrityError( statement="Column Priority cannot be null.", orig="PackageComaintainers.Priority", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/package_comment.py b/aurweb/models/package_comment.py index 64b339a0..7ab1f218 100644 --- a/aurweb/models/package_comment.py +++ b/aurweb/models/package_comment.py @@ -13,28 +13,21 @@ class PackageComment(Base): __mapper_args__ = {"primary_key": [__table__.c.ID]} PackageBase = relationship( - _PackageBase, - backref=backref("comments", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.PackageBaseID], - ) + _PackageBase, backref=backref("comments", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.PackageBaseID]) User = relationship( - _User, - backref=backref("package_comments", lazy="dynamic"), - foreign_keys=[__table__.c.UsersID], - ) + _User, backref=backref("package_comments", lazy="dynamic"), + foreign_keys=[__table__.c.UsersID]) Editor = relationship( - _User, - backref=backref("edited_comments", lazy="dynamic"), - foreign_keys=[__table__.c.EditedUsersID], - ) + _User, backref=backref("edited_comments", lazy="dynamic"), + foreign_keys=[__table__.c.EditedUsersID]) Deleter = relationship( - _User, - backref=backref("deleted_comments", lazy="dynamic"), - foreign_keys=[__table__.c.DelUsersID], - ) + _User, backref=backref("deleted_comments", lazy="dynamic"), + foreign_keys=[__table__.c.DelUsersID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -43,31 +36,27 @@ class PackageComment(Base): raise IntegrityError( statement="Foreign key PackageBaseID cannot be null.", orig="PackageComments.PackageBaseID", - params=("NULL"), - ) + params=("NULL")) if not self.User and not self.UsersID: raise IntegrityError( statement="Foreign key UsersID cannot be null.", orig="PackageComments.UsersID", - params=("NULL"), - ) + params=("NULL")) if self.Comments is None: raise IntegrityError( statement="Column Comments cannot be null.", orig="PackageComments.Comments", - params=("NULL"), - ) + params=("NULL")) if self.RenderedComment is None: self.RenderedComment = str() def maintainers(self): - return list( - filter( - lambda e: e is not None, - [self.PackageBase.Maintainer] - + [c.User for c in self.PackageBase.comaintainers], - ) - ) + return list(filter( + lambda e: e is not None, + [self.PackageBase.Maintainer] + [ + c.User for c in self.PackageBase.comaintainers + ] + )) diff --git a/aurweb/models/package_dependency.py b/aurweb/models/package_dependency.py index 9cf1eda0..2fd87f2a 100644 --- a/aurweb/models/package_dependency.py +++ b/aurweb/models/package_dependency.py @@ -1,3 +1,5 @@ +from typing import List + from sqlalchemy import and_, literal from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import backref, relationship @@ -22,16 +24,14 @@ class PackageDependency(Base): } Package = relationship( - _Package, - backref=backref("package_dependencies", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.PackageID], - ) + _Package, backref=backref("package_dependencies", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.PackageID]) DependencyType = relationship( _DependencyType, backref=backref("package_dependencies", lazy="dynamic"), - foreign_keys=[__table__.c.DepTypeID], - ) + foreign_keys=[__table__.c.DepTypeID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -40,61 +40,43 @@ class PackageDependency(Base): raise IntegrityError( statement="Foreign key PackageID cannot be null.", orig="PackageDependencies.PackageID", - params=("NULL"), - ) + params=("NULL")) if not self.DependencyType and not self.DepTypeID: raise IntegrityError( statement="Foreign key DepTypeID cannot be null.", orig="PackageDependencies.DepTypeID", - params=("NULL"), - ) + params=("NULL")) if self.DepName is None: raise IntegrityError( statement="Column DepName cannot be null.", orig="PackageDependencies.DepName", - params=("NULL"), - ) - - def is_aur_package(self) -> bool: - pkg = db.query(_Package).filter(_Package.Name == self.DepName).exists() - return db.query(pkg).scalar() + params=("NULL")) def is_package(self) -> bool: - official = ( - db.query(_OfficialProvider) - .filter(_OfficialProvider.Name == self.DepName) - .exists() - ) - return self.is_aur_package() or db.query(official).scalar() + pkg = db.query(_Package).filter(_Package.Name == self.DepName).exists() + official = db.query(_OfficialProvider).filter( + _OfficialProvider.Name == self.DepName).exists() + return db.query(pkg).scalar() or db.query(official).scalar() - def provides(self) -> list[PackageRelation]: + def provides(self) -> List[PackageRelation]: from aurweb.models.relation_type import PROVIDES_ID - rels = ( - db.query(PackageRelation) - .join(_Package) - .filter( - and_( - PackageRelation.RelTypeID == PROVIDES_ID, - PackageRelation.RelName == self.DepName, - ) - ) - .with_entities(_Package.Name, literal(False).label("is_official")) - .order_by(_Package.Name.asc()) - ) + rels = db.query(PackageRelation).join(_Package).filter( + and_(PackageRelation.RelTypeID == PROVIDES_ID, + PackageRelation.RelName == self.DepName) + ).with_entities( + _Package.Name, + literal(False).label("is_official") + ).order_by(_Package.Name.asc()) - official_rels = ( - db.query(_OfficialProvider) - .filter( - and_( - _OfficialProvider.Provides == self.DepName, - _OfficialProvider.Name != self.DepName, - ) - ) - .with_entities(_OfficialProvider.Name, literal(True).label("is_official")) - .order_by(_OfficialProvider.Name.asc()) - ) + official_rels = db.query(_OfficialProvider).filter( + and_(_OfficialProvider.Provides == self.DepName, + _OfficialProvider.Name != self.DepName) + ).with_entities( + _OfficialProvider.Name, + literal(True).label("is_official") + ).order_by(_OfficialProvider.Name.asc()) return rels.union(official_rels).all() diff --git a/aurweb/models/package_group.py b/aurweb/models/package_group.py index 4e7c55ee..dd212051 100644 --- a/aurweb/models/package_group.py +++ b/aurweb/models/package_group.py @@ -10,19 +10,19 @@ from aurweb.models.package import Package as _Package class PackageGroup(Base): __table__ = schema.PackageGroups __tablename__ = __table__.name - __mapper_args__ = {"primary_key": [__table__.c.PackageID, __table__.c.GroupID]} + __mapper_args__ = { + "primary_key": [__table__.c.PackageID, __table__.c.GroupID] + } Package = relationship( - _Package, - backref=backref("package_groups", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.PackageID], - ) + _Package, backref=backref("package_groups", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.PackageID]) Group = relationship( - _Group, - backref=backref("package_groups", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.GroupID], - ) + _Group, backref=backref("package_groups", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.GroupID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -31,12 +31,10 @@ class PackageGroup(Base): raise IntegrityError( statement="Primary key PackageID cannot be null.", orig="PackageGroups.PackageID", - params=("NULL"), - ) + params=("NULL")) if not self.Group and not self.GroupID: raise IntegrityError( statement="Primary key GroupID cannot be null.", orig="PackageGroups.GroupID", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/package_keyword.py b/aurweb/models/package_keyword.py index dfacd7c0..581aafdc 100644 --- a/aurweb/models/package_keyword.py +++ b/aurweb/models/package_keyword.py @@ -9,13 +9,14 @@ from aurweb.models.package_base import PackageBase as _PackageBase class PackageKeyword(Base): __table__ = schema.PackageKeywords __tablename__ = __table__.name - __mapper_args__ = {"primary_key": [__table__.c.PackageBaseID, __table__.c.Keyword]} + __mapper_args__ = { + "primary_key": [__table__.c.PackageBaseID, __table__.c.Keyword] + } PackageBase = relationship( - _PackageBase, - backref=backref("keywords", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.PackageBaseID], - ) + _PackageBase, backref=backref("keywords", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.PackageBaseID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -24,5 +25,4 @@ class PackageKeyword(Base): raise IntegrityError( statement="Primary key PackageBaseID cannot be null.", orig="PackageKeywords.PackageBaseID", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/package_license.py b/aurweb/models/package_license.py index c421defe..43dd0339 100644 --- a/aurweb/models/package_license.py +++ b/aurweb/models/package_license.py @@ -10,19 +10,19 @@ from aurweb.models.package import Package as _Package class PackageLicense(Base): __table__ = schema.PackageLicenses __tablename__ = __table__.name - __mapper_args__ = {"primary_key": [__table__.c.PackageID, __table__.c.LicenseID]} + __mapper_args__ = { + "primary_key": [__table__.c.PackageID, __table__.c.LicenseID] + } Package = relationship( - _Package, - backref=backref("package_licenses", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.PackageID], - ) + _Package, backref=backref("package_licenses", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.PackageID]) License = relationship( - _License, - backref=backref("package_licenses", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.LicenseID], - ) + _License, backref=backref("package_licenses", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.LicenseID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -31,12 +31,10 @@ class PackageLicense(Base): raise IntegrityError( statement="Primary key PackageID cannot be null.", orig="PackageLicenses.PackageID", - params=("NULL"), - ) + params=("NULL")) if not self.License and not self.LicenseID: raise IntegrityError( statement="Primary key LicenseID cannot be null.", orig="PackageLicenses.LicenseID", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/package_notification.py b/aurweb/models/package_notification.py index 7d5489d4..327b92a6 100644 --- a/aurweb/models/package_notification.py +++ b/aurweb/models/package_notification.py @@ -10,19 +10,20 @@ from aurweb.models.user import User as _User class PackageNotification(Base): __table__ = schema.PackageNotifications __tablename__ = __table__.name - __mapper_args__ = {"primary_key": [__table__.c.UserID, __table__.c.PackageBaseID]} + __mapper_args__ = { + "primary_key": [__table__.c.UserID, __table__.c.PackageBaseID] + } User = relationship( - _User, - backref=backref("notifications", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.UserID], - ) + _User, backref=backref("notifications", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.UserID]) PackageBase = relationship( _PackageBase, - backref=backref("notifications", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.PackageBaseID], - ) + backref=backref("notifications", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.PackageBaseID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -31,12 +32,10 @@ class PackageNotification(Base): raise IntegrityError( statement="Foreign key UserID cannot be null.", orig="PackageNotifications.UserID", - params=("NULL"), - ) + params=("NULL")) if not self.PackageBase and not self.PackageBaseID: raise IntegrityError( statement="Foreign key PackageBaseID cannot be null.", orig="PackageNotifications.PackageBaseID", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/package_relation.py b/aurweb/models/package_relation.py index 60988a56..4910934d 100644 --- a/aurweb/models/package_relation.py +++ b/aurweb/models/package_relation.py @@ -19,16 +19,13 @@ class PackageRelation(Base): } Package = relationship( - _Package, - backref=backref("package_relations", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.PackageID], - ) + _Package, backref=backref("package_relations", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.PackageID]) RelationType = relationship( - _RelationType, - backref=backref("package_relations", lazy="dynamic"), - foreign_keys=[__table__.c.RelTypeID], - ) + _RelationType, backref=backref("package_relations", lazy="dynamic"), + foreign_keys=[__table__.c.RelTypeID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -37,19 +34,16 @@ class PackageRelation(Base): raise IntegrityError( statement="Foreign key PackageID cannot be null.", orig="PackageRelations.PackageID", - params=("NULL"), - ) + params=("NULL")) if not self.RelationType and not self.RelTypeID: raise IntegrityError( statement="Foreign key RelTypeID cannot be null.", orig="PackageRelations.RelTypeID", - params=("NULL"), - ) + params=("NULL")) if not self.RelName: raise IntegrityError( statement="Column RelName cannot be null.", orig="PackageRelations.RelName", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/package_request.py b/aurweb/models/package_request.py index 94ff064b..9669ec46 100644 --- a/aurweb/models/package_request.py +++ b/aurweb/models/package_request.py @@ -1,10 +1,7 @@ -import base64 -import hashlib - from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import backref, relationship -from aurweb import config, schema +from aurweb import schema from aurweb.models.declarative import Base from aurweb.models.package_base import PackageBase as _PackageBase from aurweb.models.request_type import RequestType as _RequestType @@ -28,34 +25,26 @@ class PackageRequest(Base): __mapper_args__ = {"primary_key": [__table__.c.ID]} RequestType = relationship( - _RequestType, - backref=backref("package_requests", lazy="dynamic"), - foreign_keys=[__table__.c.ReqTypeID], - ) + _RequestType, backref=backref("package_requests", lazy="dynamic"), + foreign_keys=[__table__.c.ReqTypeID]) User = relationship( - _User, - backref=backref("package_requests", lazy="dynamic"), - foreign_keys=[__table__.c.UsersID], - ) + _User, backref=backref("package_requests", lazy="dynamic"), + foreign_keys=[__table__.c.UsersID]) PackageBase = relationship( - _PackageBase, - backref=backref("requests", lazy="dynamic"), - foreign_keys=[__table__.c.PackageBaseID], - ) + _PackageBase, backref=backref("requests", lazy="dynamic"), + foreign_keys=[__table__.c.PackageBaseID]) Closer = relationship( - _User, - backref=backref("closed_requests", lazy="dynamic"), - foreign_keys=[__table__.c.ClosedUID], - ) + _User, backref=backref("closed_requests", lazy="dynamic"), + foreign_keys=[__table__.c.ClosedUID]) STATUS_DISPLAY = { PENDING_ID: PENDING, CLOSED_ID: CLOSED, ACCEPTED_ID: ACCEPTED, - REJECTED_ID: REJECTED, + REJECTED_ID: REJECTED } def __init__(self, **kwargs): @@ -65,57 +54,38 @@ class PackageRequest(Base): raise IntegrityError( statement="Foreign key ReqTypeID cannot be null.", orig="PackageRequests.ReqTypeID", - params=("NULL"), - ) + params=("NULL")) if not self.PackageBase and not self.PackageBaseID: raise IntegrityError( statement="Foreign key PackageBaseID cannot be null.", orig="PackageRequests.PackageBaseID", - params=("NULL"), - ) + params=("NULL")) if not self.PackageBaseName: raise IntegrityError( statement="Column PackageBaseName cannot be null.", orig="PackageRequests.PackageBaseName", - params=("NULL"), - ) + params=("NULL")) if not self.User and not self.UsersID: raise IntegrityError( statement="Foreign key UsersID cannot be null.", orig="PackageRequests.UsersID", - params=("NULL"), - ) + params=("NULL")) if self.Comments is None: raise IntegrityError( statement="Column Comments cannot be null.", orig="PackageRequests.Comments", - params=("NULL"), - ) + params=("NULL")) if self.ClosureComment is None: raise IntegrityError( statement="Column ClosureComment cannot be null.", orig="PackageRequests.ClosureComment", - params=("NULL"), - ) + params=("NULL")) def status_display(self) -> str: - """Return a display string for the Status column.""" + """ Return a display string for the Status column. """ return self.STATUS_DISPLAY[self.Status] - - def ml_message_id_hash(self) -> str: - """Return the X-Message-ID-Hash that is used in the mailing list archive.""" - # X-Message-ID-Hash is a base32 encoded SHA1 hash - msgid = f"pkg-request-{str(self.ID)}@aur.archlinux.org" - sha1 = hashlib.sha1(msgid.encode()).digest() - - return base64.b32encode(sha1).decode() - - def ml_message_url(self) -> str: - """Return the mailing list URL for the request.""" - url = config.get("options", "ml_thread_url") % (self.ml_message_id_hash()) - return url diff --git a/aurweb/models/package_source.py b/aurweb/models/package_source.py index a6d0f958..4ea1645b 100644 --- a/aurweb/models/package_source.py +++ b/aurweb/models/package_source.py @@ -9,13 +9,17 @@ from aurweb.models.package import Package as _Package class PackageSource(Base): __table__ = schema.PackageSources __tablename__ = __table__.name - __mapper_args__ = {"primary_key": [__table__.c.PackageID, __table__.c.Source]} + __mapper_args__ = { + "primary_key": [ + __table__.c.PackageID, + __table__.c.Source + ] + } Package = relationship( - _Package, - backref=backref("package_sources", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.PackageID], - ) + _Package, backref=backref("package_sources", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.PackageID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -24,8 +28,7 @@ class PackageSource(Base): raise IntegrityError( statement="Foreign key PackageID cannot be null.", orig="PackageSources.PackageID", - params=("NULL"), - ) + params=("NULL")) if not self.Source: self.Source = "/dev/null" diff --git a/aurweb/models/package_vote.py b/aurweb/models/package_vote.py index b9e233d9..8da88210 100644 --- a/aurweb/models/package_vote.py +++ b/aurweb/models/package_vote.py @@ -10,19 +10,18 @@ from aurweb.models.user import User as _User class PackageVote(Base): __table__ = schema.PackageVotes __tablename__ = __table__.name - __mapper_args__ = {"primary_key": [__table__.c.UsersID, __table__.c.PackageBaseID]} + __mapper_args__ = { + "primary_key": [__table__.c.UsersID, __table__.c.PackageBaseID] + } User = relationship( - _User, - backref=backref("package_votes", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.UsersID], - ) + _User, backref=backref("package_votes", lazy="dynamic"), + foreign_keys=[__table__.c.UsersID]) PackageBase = relationship( - _PackageBase, - backref=backref("package_votes", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.PackageBaseID], - ) + _PackageBase, backref=backref("package_votes", lazy="dynamic", + cascade="all, delete"), + foreign_keys=[__table__.c.PackageBaseID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -31,19 +30,16 @@ class PackageVote(Base): raise IntegrityError( statement="Foreign key UsersID cannot be null.", orig="PackageVotes.UsersID", - params=("NULL"), - ) + params=("NULL")) if not self.PackageBase and not self.PackageBaseID: raise IntegrityError( statement="Foreign key PackageBaseID cannot be null.", orig="PackageVotes.PackageBaseID", - params=("NULL"), - ) + params=("NULL")) if not self.VoteTS: raise IntegrityError( statement="Column VoteTS cannot be null.", orig="PackageVotes.VoteTS", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/request_type.py b/aurweb/models/request_type.py index 1853b0be..cabab3d2 100644 --- a/aurweb/models/request_type.py +++ b/aurweb/models/request_type.py @@ -16,5 +16,5 @@ class RequestType(Base): __mapper_args__ = {"primary_key": [__table__.c.ID]} def name_display(self) -> str: - """Return the Name column with its first char capitalized.""" + """ Return the Name column with its first char capitalized. """ return self.Name.title() diff --git a/aurweb/models/session.py b/aurweb/models/session.py index ff97f017..37ab4bce 100644 --- a/aurweb/models/session.py +++ b/aurweb/models/session.py @@ -12,10 +12,8 @@ class Session(Base): __mapper_args__ = {"primary_key": [__table__.c.UsersID]} User = relationship( - _User, - backref=backref("session", cascade="all, delete", uselist=False), - foreign_keys=[__table__.c.UsersID], - ) + _User, backref=backref("session", uselist=False), + foreign_keys=[__table__.c.UsersID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -31,13 +29,10 @@ class Session(Base): user_exists = db.query(_User).filter(_User.ID == uid).exists() if not db.query(user_exists).scalar(): raise IntegrityError( - statement=( - "Foreign key UsersID cannot be null and " - "must be a valid user's ID." - ), + statement=("Foreign key UsersID cannot be null and " + "must be a valid user's ID."), orig="Sessions.UsersID", - params=("NULL"), - ) + params=("NULL")) def generate_unique_sid(): diff --git a/aurweb/models/ssh_pub_key.py b/aurweb/models/ssh_pub_key.py index c0b59445..53c8c3ac 100644 --- a/aurweb/models/ssh_pub_key.py +++ b/aurweb/models/ssh_pub_key.py @@ -12,17 +12,16 @@ class SSHPubKey(Base): __mapper_args__ = {"primary_key": [__table__.c.Fingerprint]} User = relationship( - "User", - backref=backref("ssh_pub_keys", lazy="dynamic", cascade="all, delete"), - foreign_keys=[__table__.c.UserID], - ) + "User", backref=backref("ssh_pub_keys", lazy="dynamic"), + foreign_keys=[__table__.c.UserID]) def __init__(self, **kwargs): super().__init__(**kwargs) def get_fingerprint(pubkey: str) -> str: - proc = Popen(["ssh-keygen", "-l", "-f", "-"], stdin=PIPE, stdout=PIPE, stderr=PIPE) + proc = Popen(["ssh-keygen", "-l", "-f", "-"], stdin=PIPE, stdout=PIPE, + stderr=PIPE) out, _ = proc.communicate(pubkey.encode()) if proc.returncode: raise ValueError("The SSH public key is invalid.") diff --git a/aurweb/models/term.py b/aurweb/models/term.py index 3aad9884..59534bbc 100644 --- a/aurweb/models/term.py +++ b/aurweb/models/term.py @@ -16,12 +16,10 @@ class Term(Base): raise IntegrityError( statement="Column Description cannot be null.", orig="Terms.Description", - params=("NULL"), - ) + params=("NULL")) if not self.URL: raise IntegrityError( statement="Column URL cannot be null.", orig="Terms.URL", - params=("NULL"), - ) + params=("NULL")) diff --git a/aurweb/models/vote.py b/aurweb/models/tu_vote.py similarity index 53% rename from aurweb/models/vote.py rename to aurweb/models/tu_vote.py index ec20fe9b..efb23b19 100644 --- a/aurweb/models/vote.py +++ b/aurweb/models/tu_vote.py @@ -3,26 +3,24 @@ from sqlalchemy.orm import backref, relationship from aurweb import schema from aurweb.models.declarative import Base +from aurweb.models.tu_voteinfo import TUVoteInfo as _TUVoteInfo from aurweb.models.user import User as _User -from aurweb.models.voteinfo import VoteInfo as _VoteInfo -class Vote(Base): - __table__ = schema.Votes +class TUVote(Base): + __table__ = schema.TU_Votes __tablename__ = __table__.name - __mapper_args__ = {"primary_key": [__table__.c.VoteID, __table__.c.UserID]} + __mapper_args__ = { + "primary_key": [__table__.c.VoteID, __table__.c.UserID] + } VoteInfo = relationship( - _VoteInfo, - backref=backref("votes", lazy="dynamic"), - foreign_keys=[__table__.c.VoteID], - ) + _TUVoteInfo, backref=backref("tu_votes", lazy="dynamic"), + foreign_keys=[__table__.c.VoteID]) User = relationship( - _User, - backref=backref("votes", lazy="dynamic"), - foreign_keys=[__table__.c.UserID], - ) + _User, backref=backref("tu_votes", lazy="dynamic"), + foreign_keys=[__table__.c.UserID]) def __init__(self, **kwargs): super().__init__(**kwargs) @@ -30,13 +28,11 @@ class Vote(Base): if not self.VoteInfo and not self.VoteID: raise IntegrityError( statement="Foreign key VoteID cannot be null.", - orig="Votes.VoteID", - params=("NULL"), - ) + orig="TU_Votes.VoteID", + params=("NULL")) if not self.User and not self.UserID: raise IntegrityError( statement="Foreign key UserID cannot be null.", - orig="Votes.UserID", - params=("NULL"), - ) + orig="TU_Votes.UserID", + params=("NULL")) diff --git a/aurweb/models/voteinfo.py b/aurweb/models/tu_voteinfo.py similarity index 69% rename from aurweb/models/voteinfo.py rename to aurweb/models/tu_voteinfo.py index b7480661..7934a772 100644 --- a/aurweb/models/voteinfo.py +++ b/aurweb/models/tu_voteinfo.py @@ -8,16 +8,14 @@ from aurweb.models.declarative import Base from aurweb.models.user import User as _User -class VoteInfo(Base): - __table__ = schema.VoteInfo +class TUVoteInfo(Base): + __table__ = schema.TU_VoteInfo __tablename__ = __table__.name __mapper_args__ = {"primary_key": [__table__.c.ID]} Submitter = relationship( - _User, - backref=backref("voteinfo_set", lazy="dynamic"), - foreign_keys=[__table__.c.SubmitterID], - ) + _User, backref=backref("tu_voteinfo_set", lazy="dynamic"), + foreign_keys=[__table__.c.SubmitterID]) def __init__(self, **kwargs): # Default Quorum, Yes, No and Abstain columns to 0. @@ -30,46 +28,41 @@ class VoteInfo(Base): if self.Agenda is None: raise IntegrityError( statement="Column Agenda cannot be null.", - orig="VoteInfo.Agenda", - params=("NULL"), - ) + orig="TU_VoteInfo.Agenda", + params=("NULL")) if self.User is None: raise IntegrityError( statement="Column User cannot be null.", - orig="VoteInfo.User", - params=("NULL"), - ) + orig="TU_VoteInfo.User", + params=("NULL")) if self.Submitted is None: raise IntegrityError( statement="Column Submitted cannot be null.", - orig="VoteInfo.Submitted", - params=("NULL"), - ) + orig="TU_VoteInfo.Submitted", + params=("NULL")) if self.End is None: raise IntegrityError( statement="Column End cannot be null.", - orig="VoteInfo.End", - params=("NULL"), - ) + orig="TU_VoteInfo.End", + params=("NULL")) if not self.Submitter: raise IntegrityError( statement="Foreign key SubmitterID cannot be null.", - orig="VoteInfo.SubmitterID", - params=("NULL"), - ) + orig="TU_VoteInfo.SubmitterID", + params=("NULL")) def __setattr__(self, key: str, value: typing.Any): - """Customize setattr to stringify any Quorum keys given.""" + """ Customize setattr to stringify any Quorum keys given. """ if key == "Quorum": value = str(value) return super().__setattr__(key, value) def __getattribute__(self, key: str): - """Customize getattr to floatify any fetched Quorum values.""" + """ Customize getattr to floatify any fetched Quorum values. """ attr = super().__getattribute__(key) if key == "Quorum": return float(attr) diff --git a/aurweb/models/user.py b/aurweb/models/user.py index ee2889d2..c375fcbc 100644 --- a/aurweb/models/user.py +++ b/aurweb/models/user.py @@ -1,7 +1,9 @@ import hashlib -from typing import Set + +from typing import List, Set import bcrypt + from fastapi import Request from sqlalchemy import or_ from sqlalchemy.exc import IntegrityError @@ -10,19 +12,19 @@ from sqlalchemy.orm import backref, relationship import aurweb.config import aurweb.models.account_type import aurweb.schema -from aurweb import aur_logging, db, schema, time, util + +from aurweb import db, logging, schema, time, util from aurweb.models.account_type import AccountType as _AccountType from aurweb.models.ban import is_banned from aurweb.models.declarative import Base -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) SALT_ROUNDS_DEFAULT = 12 class User(Base): - """An ORM model of a single Users record.""" - + """ An ORM model of a single Users record. """ __table__ = schema.Users __tablename__ = __table__.name __mapper_args__ = {"primary_key": [__table__.c.ID]} @@ -31,8 +33,7 @@ class User(Base): _AccountType, backref=backref("users", lazy="dynamic"), foreign_keys=[__table__.c.AccountTypeID], - uselist=False, - ) + uselist=False) # High-level variables used to track authentication (not in DB). authenticated = False @@ -40,50 +41,50 @@ class User(Base): # Make this static to the class just in case SQLAlchemy ever # does something to bypass our constructor. - salt_rounds = aurweb.config.getint("options", "salt_rounds", SALT_ROUNDS_DEFAULT) + salt_rounds = aurweb.config.getint("options", "salt_rounds", + SALT_ROUNDS_DEFAULT) def __init__(self, Passwd: str = str(), **kwargs): super().__init__(**kwargs, Passwd=str()) # Run this again in the constructor in case we rehashed config. - self.salt_rounds = aurweb.config.getint( - "options", "salt_rounds", SALT_ROUNDS_DEFAULT - ) + self.salt_rounds = aurweb.config.getint("options", "salt_rounds", + SALT_ROUNDS_DEFAULT) if Passwd: self.update_password(Passwd) def update_password(self, password): self.Passwd = bcrypt.hashpw( - password.encode(), bcrypt.gensalt(rounds=self.salt_rounds) - ).decode() + password.encode(), + bcrypt.gensalt(rounds=self.salt_rounds)).decode() @staticmethod def minimum_passwd_length(): return aurweb.config.getint("options", "passwd_min_len") def is_authenticated(self): - """Return internal authenticated state.""" + """ Return internal authenticated state. """ return self.authenticated def valid_password(self, password: str): - """Check authentication against a given password.""" + """ Check authentication against a given password. """ if password is None: return False password_is_valid = False try: - password_is_valid = bcrypt.checkpw(password.encode(), self.Passwd.encode()) + password_is_valid = bcrypt.checkpw(password.encode(), + self.Passwd.encode()) except ValueError: pass # If our Salt column is not empty, we're using a legacy password. if not password_is_valid and self.Salt != str(): # Try to login with legacy method. - password_is_valid = ( - hashlib.md5(f"{self.Salt}{password}".encode()).hexdigest() - == self.Passwd - ) + password_is_valid = hashlib.md5( + f"{self.Salt}{password}".encode() + ).hexdigest() == self.Passwd # We got here, we passed the legacy authentication. # Update the password to our modern hash style. @@ -95,8 +96,9 @@ class User(Base): def _login_approved(self, request: Request): return not is_banned(request) and not self.Suspended - def login(self, request: Request, password: str) -> str: - """Login and authenticate a request.""" + def login(self, request: Request, password: str, + session_time: int = 0) -> str: + """ Login and authenticate a request. """ from aurweb import db from aurweb.models.session import Session, generate_unique_sid @@ -122,12 +124,12 @@ class User(Base): try: with db.begin(): self.LastLogin = now_ts - self.LastLoginIPAddress = util.get_client_ip(request) + self.LastLoginIPAddress = request.client.host if not self.session: sid = generate_unique_sid() - self.session = db.create( - Session, User=self, SessionID=sid, LastUpdateTS=now_ts - ) + self.session = db.create(Session, User=self, + SessionID=sid, + LastUpdateTS=now_ts) else: last_updated = self.session.LastUpdateTS if last_updated and last_updated < now_ts: @@ -146,36 +148,36 @@ class User(Base): return self.session.SessionID - def has_credential(self, credential: Set[int], approved: list["User"] = list()): + def has_credential(self, credential: Set[int], + approved: List["User"] = list()): from aurweb.auth.creds import has_credential - return has_credential(self, credential, approved) - def logout(self, request: Request) -> None: + def logout(self, request: Request): self.authenticated = False if self.session: with db.begin(): db.delete(self.session) - def is_package_maintainer(self): + def is_trusted_user(self): return self.AccountType.ID in { - aurweb.models.account_type.PACKAGE_MAINTAINER_ID, - aurweb.models.account_type.PACKAGE_MAINTAINER_AND_DEV_ID, + aurweb.models.account_type.TRUSTED_USER_ID, + aurweb.models.account_type.TRUSTED_USER_AND_DEV_ID } def is_developer(self): return self.AccountType.ID in { aurweb.models.account_type.DEVELOPER_ID, - aurweb.models.account_type.PACKAGE_MAINTAINER_AND_DEV_ID, + aurweb.models.account_type.TRUSTED_USER_AND_DEV_ID } def is_elevated(self): - """A User is 'elevated' when they have either a - Package Maintainer or Developer AccountType.""" + """ A User is 'elevated' when they have either a + Trusted User or Developer AccountType. """ return self.AccountType.ID in { - aurweb.models.account_type.PACKAGE_MAINTAINER_ID, + aurweb.models.account_type.TRUSTED_USER_ID, aurweb.models.account_type.DEVELOPER_ID, - aurweb.models.account_type.PACKAGE_MAINTAINER_AND_DEV_ID, + aurweb.models.account_type.TRUSTED_USER_AND_DEV_ID, } def can_edit_user(self, target: "User") -> bool: @@ -188,28 +190,24 @@ class User(Base): In short, a user must at least have credentials and be at least the same account type as the target. - User < Package Maintainer < Developer < Package Maintainer & Developer + User < Trusted User < Developer < Trusted User & Developer :param target: Target User to be edited :return: Boolean indicating whether `self` can edit `target` """ from aurweb.auth import creds - has_cred = self.has_credential(creds.ACCOUNT_EDIT, approved=[target]) return has_cred and self.AccountTypeID >= target.AccountTypeID def voted_for(self, package) -> bool: - """Has this User voted for package?""" + """ Has this User voted for package? """ from aurweb.models.package_vote import PackageVote - - return bool( - package.PackageBase.package_votes.filter( - PackageVote.UsersID == self.ID - ).scalar() - ) + return bool(package.PackageBase.package_votes.filter( + PackageVote.UsersID == self.ID + ).scalar()) def notified(self, package) -> bool: - """Is this User being notified about package (or package base)? + """ Is this User being notified about package (or package base)? :param package: Package or PackageBase instance :return: Boolean indicating state of package notification @@ -227,14 +225,12 @@ class User(Base): # Run an exists() query where a pkgbase-related # PackageNotification exists for self (a user). - return bool( - db.query( - query.filter(PackageNotification.UserID == self.ID).exists() - ).scalar() - ) + return bool(db.query( + query.filter(PackageNotification.UserID == self.ID).exists() + ).scalar()) def packages(self): - """Returns an ORM query to Package objects owned by this user. + """ Returns an ORM query to Package objects owned by this user. This should really be replaced with an internal ORM join configured for the User model. This has not been done yet @@ -245,24 +241,16 @@ class User(Base): """ from aurweb.models.package import Package from aurweb.models.package_base import PackageBase - - return ( - db.query(Package) - .join(PackageBase) - .filter( - or_( - PackageBase.PackagerUID == self.ID, - PackageBase.MaintainerUID == self.ID, - ) + return db.query(Package).join(PackageBase).filter( + or_( + PackageBase.PackagerUID == self.ID, + PackageBase.MaintainerUID == self.ID ) ) def __repr__(self): return "" % ( - self.ID, - str(self.AccountType), - self.Username, - ) + self.ID, str(self.AccountType), self.Username) def __str__(self) -> str: return self.Username diff --git a/aurweb/packages/requests.py b/aurweb/packages/requests.py index be35a3d3..6aaa59ab 100644 --- a/aurweb/packages/requests.py +++ b/aurweb/packages/requests.py @@ -1,4 +1,4 @@ -from typing import Optional, Set +from typing import List, Optional, Set from fastapi import Request from sqlalchemy import and_, orm @@ -7,55 +7,46 @@ from aurweb import config, db, l10n, time, util from aurweb.exceptions import InvariantError from aurweb.models import PackageBase, PackageRequest, User from aurweb.models.package_request import ACCEPTED_ID, PENDING_ID, REJECTED_ID -from aurweb.models.request_type import ( - DELETION, - DELETION_ID, - MERGE, - MERGE_ID, - ORPHAN, - ORPHAN_ID, -) +from aurweb.models.request_type import DELETION, DELETION_ID, MERGE, MERGE_ID, ORPHAN, ORPHAN_ID from aurweb.scripts import notify class ClosureFactory: - """A factory class used to autogenerate closure comments.""" + """ A factory class used to autogenerate closure comments. """ - REQTYPE_NAMES = {DELETION_ID: DELETION, MERGE_ID: MERGE, ORPHAN_ID: ORPHAN} + REQTYPE_NAMES = { + DELETION_ID: DELETION, + MERGE_ID: MERGE, + ORPHAN_ID: ORPHAN + } - def _deletion_closure( - self, requester: User, pkgbase: PackageBase, target: PackageBase = None - ): - return f"[Autogenerated] Accepted deletion for {pkgbase.Name}." + def _deletion_closure(self, requester: User, + pkgbase: PackageBase, + target: PackageBase = None): + return (f"[Autogenerated] Accepted deletion for {pkgbase.Name}.") - def _merge_closure( - self, requester: User, pkgbase: PackageBase, target: PackageBase = None - ): - return ( - f"[Autogenerated] Accepted merge for {pkgbase.Name} " f"into {target.Name}." - ) + def _merge_closure(self, requester: User, + pkgbase: PackageBase, + target: PackageBase = None): + return (f"[Autogenerated] Accepted merge for {pkgbase.Name} " + f"into {target.Name}.") - def _orphan_closure( - self, requester: User, pkgbase: PackageBase, target: PackageBase = None - ): - return f"[Autogenerated] Accepted orphan for {pkgbase.Name}." + def _orphan_closure(self, requester: User, + pkgbase: PackageBase, + target: PackageBase = None): + return (f"[Autogenerated] Accepted orphan for {pkgbase.Name}.") - def _rejected_merge_closure( - self, requester: User, pkgbase: PackageBase, target: PackageBase = None - ): - return ( - f"[Autogenerated] Another request to merge {pkgbase.Name} " - f"into {target.Name} has rendered this request invalid." - ) + def _rejected_merge_closure(self, requester: User, + pkgbase: PackageBase, + target: PackageBase = None): + return (f"[Autogenerated] Another request to merge {pkgbase.Name} " + f"into {target.Name} has rendered this request invalid.") - def get_closure( - self, - reqtype_id: int, - requester: User, - pkgbase: PackageBase, - target: PackageBase = None, - status: int = ACCEPTED_ID, - ) -> str: + def get_closure(self, reqtype_id: int, + requester: User, + pkgbase: PackageBase, + target: PackageBase = None, + status: int = ACCEPTED_ID) -> str: """ Return a closure comment handled by this class. @@ -78,9 +69,8 @@ class ClosureFactory: return handler(requester, pkgbase, target) -def update_closure_comment( - pkgbase: PackageBase, reqtype_id: int, comments: str, target: PackageBase = None -) -> None: +def update_closure_comment(pkgbase: PackageBase, reqtype_id: int, + comments: str, target: PackageBase = None) -> None: """ Update all pending requests related to `pkgbase` with a closure comment. @@ -100,10 +90,8 @@ def update_closure_comment( return query = pkgbase.requests.filter( - and_( - PackageRequest.ReqTypeID == reqtype_id, PackageRequest.Status == PENDING_ID - ) - ) + and_(PackageRequest.ReqTypeID == reqtype_id, + PackageRequest.Status == PENDING_ID)) if reqtype_id == MERGE_ID: query = query.filter(PackageRequest.MergeBaseName == target.Name) @@ -112,8 +100,9 @@ def update_closure_comment( def verify_orphan_request(user: User, pkgbase: PackageBase): - """Verify that an undue orphan request exists in `requests`.""" - requests = pkgbase.requests.filter(PackageRequest.ReqTypeID == ORPHAN_ID) + """ Verify that an undue orphan request exists in `requests`. """ + requests = pkgbase.requests.filter( + PackageRequest.ReqTypeID == ORPHAN_ID) for pkgreq in requests: idle_time = config.getint("options", "request_idle_time") time_delta = time.utcnow() - pkgreq.RequestTS @@ -126,13 +115,9 @@ def verify_orphan_request(user: User, pkgbase: PackageBase): return False -def close_pkgreq( - pkgreq: PackageRequest, - closer: User, - pkgbase: PackageBase, - target: Optional[PackageBase], - status: int, -) -> None: +def close_pkgreq(pkgreq: PackageRequest, closer: User, + pkgbase: PackageBase, target: Optional[PackageBase], + status: int) -> None: """ Close a package request with `pkgreq`.Status == `status`. @@ -145,20 +130,16 @@ def close_pkgreq( now = time.utcnow() pkgreq.Status = status pkgreq.Closer = closer - pkgreq.ClosureComment = pkgreq.ClosureComment or ClosureFactory().get_closure( - pkgreq.ReqTypeID, closer, pkgbase, target, status + pkgreq.ClosureComment = ( + pkgreq.ClosureComment or ClosureFactory().get_closure( + pkgreq.ReqTypeID, closer, pkgbase, target, status) ) pkgreq.ClosedTS = now -@db.retry_deadlock -def handle_request( - request: Request, - reqtype_id: int, - pkgbase: PackageBase, - target: PackageBase = None, - comments: str = str(), -) -> list[notify.Notification]: +def handle_request(request: Request, reqtype_id: int, + pkgbase: PackageBase, + target: PackageBase = None) -> List[notify.Notification]: """ Handle package requests before performing an action. @@ -177,27 +158,24 @@ def handle_request( :param pkgbase: PackageBase which the request is about :param target: Optional target to merge into """ - notifs: list[notify.Notification] = [] + notifs: List[notify.Notification] = [] # If it's an orphan request, perform further verification # regarding existing requests. if reqtype_id == ORPHAN_ID: if not verify_orphan_request(request.user, pkgbase): _ = l10n.get_translator_for_request(request) - raise InvariantError( - _("No due existing orphan requests to accept for %s.") % pkgbase.Name - ) + raise InvariantError(_( + "No due existing orphan requests to accept for %s." + ) % pkgbase.Name) # Produce a base query for requests related to `pkgbase`, based # on ReqTypeID matching `reqtype_id`, pending status and a correct # PackagBaseName column. query: orm.Query = pkgbase.requests.filter( - and_( - PackageRequest.ReqTypeID == reqtype_id, - PackageRequest.Status == PENDING_ID, - PackageRequest.PackageBaseName == pkgbase.Name, - ) - ) + and_(PackageRequest.ReqTypeID == reqtype_id, + PackageRequest.Status == PENDING_ID, + PackageRequest.PackageBaseName == pkgbase.Name)) # Build a query for records we should accept. For merge requests, # this is specific to a matching MergeBaseName. For others, this @@ -205,16 +183,17 @@ def handle_request( accept_query: orm.Query = query if target: # If a `target` was supplied, filter by MergeBaseName - accept_query = query.filter(PackageRequest.MergeBaseName == target.Name) + accept_query = query.filter( + PackageRequest.MergeBaseName == target.Name) # Build an accept list out of `accept_query`. - to_accept: list[PackageRequest] = accept_query.all() + to_accept: List[PackageRequest] = accept_query.all() accepted_ids: Set[int] = set(p.ID for p in to_accept) # Build a reject list out of `query` filtered by IDs not found # in `to_accept`. That is, unmatched records of the same base # query properties. - to_reject: list[PackageRequest] = query.filter( + to_reject: List[PackageRequest] = query.filter( ~PackageRequest.ID.in_(accepted_ids) ).all() @@ -224,16 +203,14 @@ def handle_request( if not to_accept: utcnow = time.utcnow() with db.begin(): - pkgreq = db.create( - PackageRequest, - ReqTypeID=reqtype_id, - RequestTS=utcnow, - User=request.user, - PackageBase=pkgbase, - PackageBaseName=pkgbase.Name, - Comments="Autogenerated by aurweb.", - ClosureComment=comments, - ) + pkgreq = db.create(PackageRequest, + ReqTypeID=reqtype_id, + RequestTS=utcnow, + User=request.user, + PackageBase=pkgbase, + PackageBaseName=pkgbase.Name, + Comments="Autogenerated by aurweb.", + ClosureComment=str()) # If it's a merge request, set MergeBaseName to `target`.Name. if pkgreq.ReqTypeID == MERGE_ID: @@ -244,25 +221,16 @@ def handle_request( to_accept.append(pkgreq) # Update requests with their new status and closures. - @db.retry_deadlock - def retry_closures(): - with db.begin(): - util.apply_all( - to_accept, - lambda p: close_pkgreq(p, request.user, pkgbase, target, ACCEPTED_ID), - ) - util.apply_all( - to_reject, - lambda p: close_pkgreq(p, request.user, pkgbase, target, REJECTED_ID), - ) - - retry_closures() + with db.begin(): + util.apply_all(to_accept, lambda p: close_pkgreq( + p, request.user, pkgbase, target, ACCEPTED_ID)) + util.apply_all(to_reject, lambda p: close_pkgreq( + p, request.user, pkgbase, target, REJECTED_ID)) # Create RequestCloseNotifications for all requests involved. - for pkgreq in to_accept + to_reject: + for pkgreq in (to_accept + to_reject): notif = notify.RequestCloseNotification( - request.user.ID, pkgreq.ID, pkgreq.status_display() - ) + request.user.ID, pkgreq.ID, pkgreq.status_display()) notifs.append(notif) # Return notifications to the caller for sending. diff --git a/aurweb/packages/search.py b/aurweb/packages/search.py index 78b27a9a..4a6eb75f 100644 --- a/aurweb/packages/search.py +++ b/aurweb/packages/search.py @@ -3,23 +3,16 @@ from typing import Set from sqlalchemy import and_, case, or_, orm from aurweb import db, models -from aurweb.models import Group, Package, PackageBase, User -from aurweb.models.dependency_type import ( - CHECKDEPENDS_ID, - DEPENDS_ID, - MAKEDEPENDS_ID, - OPTDEPENDS_ID, -) +from aurweb.models import Package, PackageBase, User +from aurweb.models.dependency_type import CHECKDEPENDS_ID, DEPENDS_ID, MAKEDEPENDS_ID, OPTDEPENDS_ID from aurweb.models.package_comaintainer import PackageComaintainer -from aurweb.models.package_group import PackageGroup from aurweb.models.package_keyword import PackageKeyword from aurweb.models.package_notification import PackageNotification from aurweb.models.package_vote import PackageVote -from aurweb.models.relation_type import CONFLICTS_ID, PROVIDES_ID, REPLACES_ID class PackageSearch: - """A Package search query builder.""" + """ A Package search query builder. """ # A constant mapping of short to full name sort orderings. FULL_SORT_ORDER = {"d": "desc", "a": "asc"} @@ -31,18 +24,14 @@ class PackageSearch: if self.user: self.query = self.query.join( PackageVote, - and_( - PackageVote.PackageBaseID == PackageBase.ID, - PackageVote.UsersID == self.user.ID, - ), - isouter=True, + and_(PackageVote.PackageBaseID == PackageBase.ID, + PackageVote.UsersID == self.user.ID), + isouter=True ).join( PackageNotification, - and_( - PackageNotification.PackageBaseID == PackageBase.ID, - PackageNotification.UserID == self.user.ID, - ), - isouter=True, + and_(PackageNotification.PackageBaseID == PackageBase.ID, + PackageNotification.UserID == self.user.ID), + isouter=True ) self.ordering = "d" @@ -58,7 +47,7 @@ class PackageSearch: "m": self._search_by_maintainer, "c": self._search_by_comaintainer, "M": self._search_by_co_or_maintainer, - "s": self._search_by_submitter, + "s": self._search_by_submitter } # Setup SB (Sort By) callbacks. @@ -69,7 +58,7 @@ class PackageSearch: "w": self._sort_by_voted, "o": self._sort_by_notify, "m": self._sort_by_maintainer, - "l": self._sort_by_last_modified, + "l": self._sort_by_last_modified } self._joined_user = False @@ -77,10 +66,12 @@ class PackageSearch: self._joined_comaint = False def _join_user(self, outer: bool = True) -> orm.Query: - """Centralized joining of a package base's maintainer.""" + """ Centralized joining of a package base's maintainer. """ if not self._joined_user: self.query = self.query.join( - User, User.ID == PackageBase.MaintainerUID, isouter=outer + User, + User.ID == PackageBase.MaintainerUID, + isouter=outer ) self._joined_user = True return self.query @@ -96,7 +87,7 @@ class PackageSearch: self.query = self.query.join( PackageComaintainer, PackageComaintainer.PackageBaseID == PackageBase.ID, - isouter=isouter, + isouter=isouter ) self._joined_comaint = True return self.query @@ -104,10 +95,8 @@ class PackageSearch: def _search_by_namedesc(self, keywords: str) -> orm.Query: self._join_user() self.query = self.query.filter( - or_( - Package.Name.like(f"%{keywords}%"), - Package.Description.like(f"%{keywords}%"), - ) + or_(Package.Name.like(f"%{keywords}%"), + Package.Description.like(f"%{keywords}%")) ) return self @@ -136,17 +125,15 @@ class PackageSearch: self._join_user() self._join_keywords() keywords = set(k.lower() for k in keywords) - self.query = self.query.filter(PackageKeyword.Keyword.in_(keywords)).group_by( - models.Package.Name - ) - + self.query = self.query.filter(PackageKeyword.Keyword.in_(keywords)) return self def _search_by_maintainer(self, keywords: str) -> orm.Query: self._join_user() if keywords: self.query = self.query.filter( - and_(User.Username == keywords, User.ID == PackageBase.MaintainerUID) + and_(User.Username == keywords, + User.ID == PackageBase.MaintainerUID) ) else: self.query = self.query.filter(PackageBase.MaintainerUID.is_(None)) @@ -195,13 +182,13 @@ class PackageSearch: def _sort_by_votes(self, order: str): column = getattr(models.PackageBase.NumVotes, order) - name = getattr(models.PackageBase.Name, order) + name = getattr(models.Package.Name, order) self.query = self.query.order_by(column(), name()) return self def _sort_by_popularity(self, order: str): column = getattr(models.PackageBase.Popularity, order) - name = getattr(models.PackageBase.Name, order) + name = getattr(models.Package.Name, order) self.query = self.query.order_by(column(), name()) return self @@ -210,7 +197,8 @@ class PackageSearch: # in terms of performance. We should improve this; there's no # reason it should take _longer_. column = getattr( - case([(models.PackageVote.UsersID == self.user.ID, 1)], else_=0), order + case([(models.PackageVote.UsersID == self.user.ID, 1)], else_=0), + order ) name = getattr(models.Package.Name, order) self.query = self.query.order_by(column(), name()) @@ -221,8 +209,9 @@ class PackageSearch: # in terms of performance. We should improve this; there's no # reason it should take _longer_. column = getattr( - case([(models.PackageNotification.UserID == self.user.ID, 1)], else_=0), - order, + case([(models.PackageNotification.UserID == self.user.ID, 1)], + else_=0), + order ) name = getattr(models.Package.Name, order) self.query = self.query.order_by(column(), name()) @@ -236,7 +225,7 @@ class PackageSearch: def _sort_by_last_modified(self, order: str): column = getattr(models.PackageBase.ModifiedTS, order) - name = getattr(models.PackageBase.Name, order) + name = getattr(models.Package.Name, order) self.query = self.query.order_by(column(), name()) return self @@ -250,16 +239,16 @@ class PackageSearch: return callback(ordering) def count(self) -> int: - """Return internal query's count.""" + """ Return internal query's count. """ return self.query.count() def results(self) -> orm.Query: - """Return internal query.""" + """ Return internal query. """ return self.query class RPCSearch(PackageSearch): - """A PackageSearch-derived RPC package search query builder. + """ A PackageSearch-derived RPC package search query builder. With RPC search, we need a subset of PackageSearch's handlers, with a few additional handlers added. So, within the RPCSearch @@ -272,7 +261,7 @@ class RPCSearch(PackageSearch): sanitization done for the PackageSearch `by` argument. """ - keys_removed = ("b", "N", "B", "M") + keys_removed = ("b", "N", "B", "k", "c", "M", "s") def __init__(self) -> "RPCSearch": super().__init__() @@ -281,112 +270,52 @@ class RPCSearch(PackageSearch): # We keep: "nd", "n" and "m". We also overlay four new by params # on top: "depends", "makedepends", "optdepends" and "checkdepends". self.search_by_cb = { - k: v - for k, v in self.search_by_cb.items() + k: v for k, v in self.search_by_cb.items() if k not in RPCSearch.keys_removed } - self.search_by_cb.update( - { - "depends": self._search_by_depends, - "makedepends": self._search_by_makedepends, - "optdepends": self._search_by_optdepends, - "checkdepends": self._search_by_checkdepends, - "provides": self._search_by_provides, - "conflicts": self._search_by_conflicts, - "replaces": self._search_by_replaces, - "groups": self._search_by_groups, - } - ) + self.search_by_cb.update({ + "depends": self._search_by_depends, + "makedepends": self._search_by_makedepends, + "optdepends": self._search_by_optdepends, + "checkdepends": self._search_by_checkdepends + }) # We always want an optional Maintainer in the RPC. self._join_user() def _join_depends(self, dep_type_id: int) -> orm.Query: - """Join Package with PackageDependency and filter results + """ Join Package with PackageDependency and filter results based on `dep_type_id`. :param dep_type_id: DependencyType ID :returns: PackageDependency-joined orm.Query """ self.query = self.query.join(models.PackageDependency).filter( - models.PackageDependency.DepTypeID == dep_type_id - ) - return self.query - - def _join_relations(self, rel_type_id: int) -> orm.Query: - """Join Package with PackageRelation and filter results - based on `rel_type_id`. - - :param rel_type_id: RelationType ID - :returns: PackageRelation-joined orm.Query - """ - self.query = self.query.join(models.PackageRelation).filter( - models.PackageRelation.RelTypeID == rel_type_id - ) - return self.query - - def _join_groups(self) -> orm.Query: - """Join Package with PackageGroup and Group. - - :returns: PackageGroup/Group-joined orm.Query - """ - self.query = self.query.join(PackageGroup).join(Group) + models.PackageDependency.DepTypeID == dep_type_id) return self.query def _search_by_depends(self, keywords: str) -> "RPCSearch": self.query = self._join_depends(DEPENDS_ID).filter( - models.PackageDependency.DepName == keywords - ) + models.PackageDependency.DepName == keywords) return self def _search_by_makedepends(self, keywords: str) -> "RPCSearch": self.query = self._join_depends(MAKEDEPENDS_ID).filter( - models.PackageDependency.DepName == keywords - ) + models.PackageDependency.DepName == keywords) return self def _search_by_optdepends(self, keywords: str) -> "RPCSearch": self.query = self._join_depends(OPTDEPENDS_ID).filter( - models.PackageDependency.DepName == keywords - ) + models.PackageDependency.DepName == keywords) return self def _search_by_checkdepends(self, keywords: str) -> "RPCSearch": self.query = self._join_depends(CHECKDEPENDS_ID).filter( - models.PackageDependency.DepName == keywords - ) - return self - - def _search_by_provides(self, keywords: str) -> "RPCSearch": - self.query = self._join_relations(PROVIDES_ID).filter( - models.PackageRelation.RelName == keywords - ) - return self - - def _search_by_conflicts(self, keywords: str) -> "RPCSearch": - self.query = self._join_relations(CONFLICTS_ID).filter( - models.PackageRelation.RelName == keywords - ) - return self - - def _search_by_replaces(self, keywords: str) -> "RPCSearch": - self.query = self._join_relations(REPLACES_ID).filter( - models.PackageRelation.RelName == keywords - ) - return self - - def _search_by_groups(self, keywords: str) -> "RPCSearch": - self._join_groups() - self.query = self.query.filter(Group.Name == keywords) - return self - - def _search_by_keywords(self, keywords: str) -> "RPCSearch": - self._join_keywords() - self.query = self.query.filter(PackageKeyword.Keyword == keywords) + models.PackageDependency.DepName == keywords) return self def search_by(self, by: str, keywords: str) -> "RPCSearch": - """Override inherited search_by. In this override, we reduce the + """ Override inherited search_by. In this override, we reduce the scope of what we handle within this function. We do not set `by` to a default of "nd" in the RPC, as the RPC returns an error when incorrect `by` fields are specified. @@ -400,4 +329,6 @@ class RPCSearch(PackageSearch): return result def results(self) -> orm.Query: - return self.query + return self.query.filter( + models.PackageBase.PackagerUID.isnot(None) + ) diff --git a/aurweb/packages/util.py b/aurweb/packages/util.py index a2c6cbaa..e8569f29 100644 --- a/aurweb/packages/util.py +++ b/aurweb/packages/util.py @@ -1,21 +1,21 @@ from collections import defaultdict from http import HTTPStatus -from typing import Tuple, Union -from urllib.parse import quote_plus +from typing import Dict, List, Tuple, Union import orjson + from fastapi import HTTPException from sqlalchemy import orm from aurweb import config, db, models -from aurweb.aur_redis import redis_connection from aurweb.models import Package from aurweb.models.official_provider import OFFICIAL_BASE, OfficialProvider from aurweb.models.package_dependency import PackageDependency from aurweb.models.package_relation import PackageRelation +from aurweb.redis import redis_connection from aurweb.templates import register_filter -Providers = list[Union[PackageRelation, OfficialProvider]] +Providers = List[Union[PackageRelation, OfficialProvider]] def dep_extra_with_arch(dep: models.PackageDependency, annotation: str) -> str: @@ -43,10 +43,10 @@ def dep_optdepends_extra(dep: models.PackageDependency) -> str: @register_filter("dep_extra") def dep_extra(dep: models.PackageDependency) -> str: - """Some dependency types have extra text added to their + """ Some dependency types have extra text added to their display. This function provides that output. However, it **assumes** that the dep passed is bound to a valid one - of: depends, makedepends, checkdepends or optdepends.""" + of: depends, makedepends, checkdepends or optdepends. """ f = globals().get(f"dep_{dep.DependencyType.Name}_extra") return f(dep) @@ -61,13 +61,13 @@ def dep_extra_desc(dep: models.PackageDependency) -> str: @register_filter("pkgname_link") def pkgname_link(pkgname: str) -> str: - record = db.query(Package).filter(Package.Name == pkgname).exists() + record = db.query(Package).filter( + Package.Name == pkgname).exists() if db.query(record).scalar(): return f"/packages/{pkgname}" - official = ( - db.query(OfficialProvider).filter(OfficialProvider.Name == pkgname).exists() - ) + official = db.query(OfficialProvider).filter( + OfficialProvider.Name == pkgname).exists() if db.query(official).scalar(): base = "/".join([OFFICIAL_BASE, "packages"]) return f"{base}/?q={pkgname}" @@ -83,17 +83,17 @@ def package_link(package: Union[Package, OfficialProvider]) -> str: @register_filter("provides_markup") def provides_markup(provides: Providers) -> str: - links = [] - for pkg in provides: - aur = "AUR" if not pkg.is_official else "" - links.append(f'{pkg.Name}{aur}') - return ", ".join(links) + return ", ".join([ + f'{pkg.Name}' + for pkg in provides + ]) def get_pkg_or_base( - name: str, cls: Union[models.Package, models.PackageBase] = models.PackageBase -) -> Union[models.Package, models.PackageBase]: - """Get a PackageBase instance by its name or raise a 404 if + name: str, + cls: Union[models.Package, models.PackageBase] = models.PackageBase) \ + -> Union[models.Package, models.PackageBase]: + """ Get a PackageBase instance by its name or raise a 404 if it can't be found in the database. :param name: {Package,PackageBase}.Name @@ -102,13 +102,15 @@ def get_pkg_or_base( :raises HTTPException: With status code 404 if record doesn't exist :return: {Package,PackageBase} instance """ - instance = db.query(cls).filter(cls.Name == name).first() + with db.begin(): + instance = db.query(cls).filter(cls.Name == name).first() if not instance: raise HTTPException(status_code=HTTPStatus.NOT_FOUND) return instance -def get_pkgbase_comment(pkgbase: models.PackageBase, id: int) -> models.PackageComment: +def get_pkgbase_comment(pkgbase: models.PackageBase, id: int) \ + -> models.PackageComment: comment = pkgbase.comments.filter(models.PackageComment.ID == id).first() if not comment: raise HTTPException(status_code=HTTPStatus.NOT_FOUND) @@ -120,8 +122,9 @@ def out_of_date(packages: orm.Query) -> orm.Query: return packages.filter(models.PackageBase.OutOfDateTS.isnot(None)) -def updated_packages(limit: int = 0, cache_ttl: int = 600) -> list[models.Package]: - """Return a list of valid Package objects ordered by their +def updated_packages(limit: int = 0, + cache_ttl: int = 600) -> List[models.Package]: + """ Return a list of valid Package objects ordered by their ModifiedTS column in descending order from cache, after setting the cache when no key yet exists. @@ -135,26 +138,27 @@ def updated_packages(limit: int = 0, cache_ttl: int = 600) -> list[models.Packag # If we already have a cache, deserialize it and return. return orjson.loads(packages) - query = ( - db.query(models.Package) - .join(models.PackageBase) - .order_by(models.PackageBase.ModifiedTS.desc()) - ) + with db.begin(): + query = db.query(models.Package).join(models.PackageBase).filter( + models.PackageBase.PackagerUID.isnot(None) + ).order_by( + models.PackageBase.ModifiedTS.desc() + ) - if limit: - query = query.limit(limit) + if limit: + query = query.limit(limit) packages = [] for pkg in query: # For each Package returned by the query, append a dict # containing Package columns we're interested in. - packages.append( - { - "Name": pkg.Name, - "Version": pkg.Version, - "PackageBase": {"ModifiedTS": pkg.PackageBase.ModifiedTS}, + packages.append({ + "Name": pkg.Name, + "Version": pkg.Version, + "PackageBase": { + "ModifiedTS": pkg.PackageBase.ModifiedTS } - ) + }) # Store the JSON serialization of the package_updates key into Redis. redis.set("package_updates", orjson.dumps(packages)) @@ -164,8 +168,9 @@ def updated_packages(limit: int = 0, cache_ttl: int = 600) -> list[models.Packag return packages -def query_voted(query: list[models.Package], user: models.User) -> dict[int, bool]: - """Produce a dictionary of package base ID keys to boolean values, +def query_voted(query: List[models.Package], + user: models.User) -> Dict[int, bool]: + """ Produce a dictionary of package base ID keys to boolean values, which indicate whether or not the package base has a vote record related to user. @@ -175,18 +180,20 @@ def query_voted(query: list[models.Package], user: models.User) -> dict[int, boo """ output = defaultdict(bool) query_set = {pkg.PackageBaseID for pkg in query} - voted = ( - db.query(models.PackageVote) - .join(models.PackageBase, models.PackageBase.ID.in_(query_set)) - .filter(models.PackageVote.UsersID == user.ID) + voted = db.query(models.PackageVote).join( + models.PackageBase, + models.PackageBase.ID.in_(query_set) + ).filter( + models.PackageVote.UsersID == user.ID ) for vote in voted: output[vote.PackageBase.ID] = True return output -def query_notified(query: list[models.Package], user: models.User) -> dict[int, bool]: - """Produce a dictionary of package base ID keys to boolean values, +def query_notified(query: List[models.Package], + user: models.User) -> Dict[int, bool]: + """ Produce a dictionary of package base ID keys to boolean values, which indicate whether or not the package base has a notification record related to user. @@ -196,17 +203,19 @@ def query_notified(query: list[models.Package], user: models.User) -> dict[int, """ output = defaultdict(bool) query_set = {pkg.PackageBaseID for pkg in query} - notified = ( - db.query(models.PackageNotification) - .join(models.PackageBase, models.PackageBase.ID.in_(query_set)) - .filter(models.PackageNotification.UserID == user.ID) + notified = db.query(models.PackageNotification).join( + models.PackageBase, + models.PackageBase.ID.in_(query_set) + ).filter( + models.PackageNotification.UserID == user.ID ) for notif in notified: output[notif.PackageBase.ID] = True return output -def pkg_required(pkgname: str, provides: list[str]) -> list[PackageDependency]: +def pkg_required(pkgname: str, provides: List[str], limit: int) \ + -> List[PackageDependency]: """ Get dependencies that match a string in `[pkgname] + provides`. @@ -216,14 +225,10 @@ def pkg_required(pkgname: str, provides: list[str]) -> list[PackageDependency]: :return: List of PackageDependency instances """ targets = set([pkgname] + provides) - query = ( - db.query(PackageDependency) - .join(Package) - .options(orm.contains_eager(PackageDependency.Package)) - .filter(PackageDependency.DepName.in_(targets)) - .order_by(Package.Name.asc()) - ) - return query + query = db.query(PackageDependency).join(Package).filter( + PackageDependency.DepName.in_(targets) + ).order_by(Package.Name.asc()).limit(limit) + return query.all() @register_filter("source_uri") @@ -242,12 +247,12 @@ def source_uri(pkgsrc: models.PackageSource) -> Tuple[str, str]: the package base name. :param pkgsrc: PackageSource instance - :return text, uri)tuple + :return (text, uri) tuple """ if "::" in pkgsrc.Source: return pkgsrc.Source.split("::", 1) elif "://" in pkgsrc.Source: - return pkgsrc.Source, pkgsrc.Source + return (pkgsrc.Source, pkgsrc.Source) path = config.get("options", "source_file_uri") - pkgbasename = quote_plus(pkgsrc.Package.PackageBase.Name) - return pkgsrc.Source, path % (pkgsrc.Source, pkgbasename) + pkgbasename = pkgsrc.Package.PackageBase.Name + return (pkgsrc.Source, path % (pkgsrc.Source, pkgbasename)) diff --git a/aurweb/pkgbase/actions.py b/aurweb/pkgbase/actions.py index d2471d8d..229d52b9 100644 --- a/aurweb/pkgbase/actions.py +++ b/aurweb/pkgbase/actions.py @@ -1,8 +1,10 @@ +from typing import List + from fastapi import Request -from aurweb import aur_logging, db, util +from aurweb import db, logging, util from aurweb.auth import creds -from aurweb.models import PackageBase, User +from aurweb.models import PackageBase from aurweb.models.package_comaintainer import PackageComaintainer from aurweb.models.package_notification import PackageNotification from aurweb.models.request_type import DELETION_ID, MERGE_ID, ORPHAN_ID @@ -10,30 +12,19 @@ from aurweb.packages.requests import handle_request, update_closure_comment from aurweb.pkgbase import util as pkgbaseutil from aurweb.scripts import notify, popupdate -logger = aur_logging.get_logger(__name__) - - -@db.retry_deadlock -def _retry_notify(user: User, pkgbase: PackageBase) -> None: - with db.begin(): - db.create(PackageNotification, PackageBase=pkgbase, User=user) +logger = logging.get_logger(__name__) def pkgbase_notify_instance(request: Request, pkgbase: PackageBase) -> None: - notif = db.query( - pkgbase.notifications.filter( - PackageNotification.UserID == request.user.ID - ).exists() - ).scalar() + notif = db.query(pkgbase.notifications.filter( + PackageNotification.UserID == request.user.ID + ).exists()).scalar() has_cred = request.user.has_credential(creds.PKGBASE_NOTIFY) if has_cred and not notif: - _retry_notify(request.user, pkgbase) - - -@db.retry_deadlock -def _retry_unnotify(notif: PackageNotification, pkgbase: PackageBase) -> None: - with db.begin(): - db.delete(notif) + with db.begin(): + db.create(PackageNotification, + PackageBase=pkgbase, + User=request.user) def pkgbase_unnotify_instance(request: Request, pkgbase: PackageBase) -> None: @@ -42,38 +33,25 @@ def pkgbase_unnotify_instance(request: Request, pkgbase: PackageBase) -> None: ).first() has_cred = request.user.has_credential(creds.PKGBASE_NOTIFY) if has_cred and notif: - _retry_unnotify(notif, pkgbase) - - -@db.retry_deadlock -def _retry_unflag(pkgbase: PackageBase) -> None: - with db.begin(): - pkgbase.OutOfDateTS = None - pkgbase.Flagger = None - pkgbase.FlaggerComment = str() + with db.begin(): + db.delete(notif) def pkgbase_unflag_instance(request: Request, pkgbase: PackageBase) -> None: has_cred = request.user.has_credential( - creds.PKGBASE_UNFLAG, - approved=[pkgbase.Flagger, pkgbase.Maintainer] - + [c.User for c in pkgbase.comaintainers], - ) + creds.PKGBASE_UNFLAG, approved=[pkgbase.Flagger, pkgbase.Maintainer]) if has_cred: - _retry_unflag(pkgbase) + with db.begin(): + pkgbase.OutOfDateTS = None + pkgbase.Flagger = None + pkgbase.FlaggerComment = str() -@db.retry_deadlock -def _retry_disown(request: Request, pkgbase: PackageBase): - notifs: list[notify.Notification] = [] - - is_maint = request.user == pkgbase.Maintainer - - comaint = pkgbase.comaintainers.filter( - PackageComaintainer.User == request.user - ).one_or_none() - is_comaint = comaint is not None +def pkgbase_disown_instance(request: Request, pkgbase: PackageBase) -> None: + disowner = request.user + notifs = [notify.DisownNotification(disowner.ID, pkgbase.ID)] + is_maint = disowner == pkgbase.Maintainer if is_maint: with db.begin(): # Comaintainer with the lowest Priority value; next-in-line. @@ -87,61 +65,46 @@ def _retry_disown(request: Request, pkgbase: PackageBase): else: # Otherwise, just orphan the package completely. pkgbase.Maintainer = None - elif is_comaint: - # This disown request is from a Comaintainer - with db.begin(): - notif = pkgbaseutil.remove_comaintainer(comaint) - notifs.append(notif) elif request.user.has_credential(creds.PKGBASE_DISOWN): # Otherwise, the request user performing this disownage is a - # Package Maintainer and we treat it like a standard orphan request. + # Trusted User and we treat it like a standard orphan request. notifs += handle_request(request, ORPHAN_ID, pkgbase) with db.begin(): pkgbase.Maintainer = None db.delete_all(pkgbase.comaintainers) - return notifs - - -def pkgbase_disown_instance(request: Request, pkgbase: PackageBase) -> None: - disowner = request.user - notifs = [notify.DisownNotification(disowner.ID, pkgbase.ID)] - notifs += _retry_disown(request, pkgbase) util.apply_all(notifs, lambda n: n.send()) -@db.retry_deadlock -def _retry_adopt(request: Request, pkgbase: PackageBase) -> None: +def pkgbase_adopt_instance(request: Request, pkgbase: PackageBase) -> None: with db.begin(): pkgbase.Maintainer = request.user - -def pkgbase_adopt_instance(request: Request, pkgbase: PackageBase) -> None: - _retry_adopt(request, pkgbase) notif = notify.AdoptNotification(request.user.ID, pkgbase.ID) notif.send() -@db.retry_deadlock -def _retry_delete(pkgbase: PackageBase, comments: str) -> None: +def pkgbase_delete_instance(request: Request, pkgbase: PackageBase, + comments: str = str()) \ + -> List[notify.Notification]: + notifs = handle_request(request, DELETION_ID, pkgbase) + [ + notify.DeleteNotification(request.user.ID, pkgbase.ID) + ] + with db.begin(): update_closure_comment(pkgbase, DELETION_ID, comments) db.delete(pkgbase) - -def pkgbase_delete_instance( - request: Request, pkgbase: PackageBase, comments: str = str() -) -> list[notify.Notification]: - notif = notify.DeleteNotification(request.user.ID, pkgbase.ID) - notifs = handle_request(request, DELETION_ID, pkgbase, comments=comments) + [notif] - - _retry_delete(pkgbase, comments) - return notifs -@db.retry_deadlock -def _retry_merge(pkgbase: PackageBase, target: PackageBase) -> None: +def pkgbase_merge_instance(request: Request, pkgbase: PackageBase, + target: PackageBase, comments: str = str()) -> None: + pkgbasename = str(pkgbase.Name) + + # Create notifications. + notifs = handle_request(request, MERGE_ID, pkgbase, target) + # Target votes and notifications sets of user IDs that are # looking to be migrated. target_votes = set(v.UsersID for v in target.package_votes) @@ -171,25 +134,9 @@ def _retry_merge(pkgbase: PackageBase, target: PackageBase) -> None: db.delete(pkg) db.delete(pkgbase) - -def pkgbase_merge_instance( - request: Request, - pkgbase: PackageBase, - target: PackageBase, - comments: str = str(), -) -> None: - pkgbasename = str(pkgbase.Name) - - # Create notifications. - notifs = handle_request(request, MERGE_ID, pkgbase, target, comments) - - _retry_merge(pkgbase, target) - # Log this out for accountability purposes. - logger.info( - f"Package Maintainer '{request.user.Username}' merged " - f"'{pkgbasename}' into '{target.Name}'." - ) + logger.info(f"Trusted User '{request.user.Username}' merged " + f"'{pkgbasename}' into '{target.Name}'.") # Send notifications. util.apply_all(notifs, lambda n: n.send()) diff --git a/aurweb/pkgbase/util.py b/aurweb/pkgbase/util.py index d3c2f35c..18af3df0 100644 --- a/aurweb/pkgbase/util.py +++ b/aurweb/pkgbase/util.py @@ -1,12 +1,10 @@ -from typing import Any +from typing import Any, Dict, List from fastapi import Request from sqlalchemy import and_ -from sqlalchemy.orm import joinedload -from aurweb import config, db, defaults, l10n, time, util +from aurweb import config, db, l10n, util from aurweb.models import PackageBase, User -from aurweb.models.package_base import popularity from aurweb.models.package_comaintainer import PackageComaintainer from aurweb.models.package_comment import PackageComment from aurweb.models.package_request import PENDING_ID, PackageRequest @@ -15,88 +13,51 @@ from aurweb.scripts import notify from aurweb.templates import make_context as _make_context -def make_context( - request: Request, pkgbase: PackageBase, context: dict[str, Any] = None -) -> dict[str, Any]: - """Make a basic context for package or pkgbase. +def make_context(request: Request, pkgbase: PackageBase) -> Dict[str, Any]: + """ Make a basic context for package or pkgbase. :param request: FastAPI request :param pkgbase: PackageBase instance :return: A pkgbase context without specific differences """ - if not context: - context = _make_context(request, pkgbase.Name) + context = _make_context(request, pkgbase.Name) - is_authenticated = request.user.is_authenticated() - - # Per page and offset. - offset, per_page = util.sanitize_params( - request.query_params.get("O", defaults.O), - request.query_params.get("PP", defaults.COMMENTS_PER_PAGE), - ) - context["O"] = offset - context["PP"] = per_page context["git_clone_uri_anon"] = config.get("options", "git_clone_uri_anon") context["git_clone_uri_priv"] = config.get("options", "git_clone_uri_priv") context["pkgbase"] = pkgbase context["comaintainers"] = [ - c.User - for c in pkgbase.comaintainers.options(joinedload(PackageComaintainer.User)) - .order_by(PackageComaintainer.Priority.asc()) - .all() + c.User for c in pkgbase.comaintainers.order_by( + PackageComaintainer.Priority.asc() + ).all() ] - if is_authenticated: - context["unflaggers"] = context["comaintainers"].copy() - context["unflaggers"].extend([pkgbase.Maintainer, pkgbase.Flagger]) - else: - context["unflaggers"] = [] - context["packages_count"] = pkgbase.packages.count() context["keywords"] = pkgbase.keywords - context["comments_total"] = pkgbase.comments.order_by( + context["comments"] = pkgbase.comments.order_by( PackageComment.CommentTS.desc() - ).count() - context["comments"] = ( - pkgbase.comments.order_by(PackageComment.CommentTS.desc()) - .limit(per_page) - .offset(offset) ) context["pinned_comments"] = pkgbase.comments.filter( PackageComment.PinnedTS != 0 ).order_by(PackageComment.CommentTS.desc()) context["is_maintainer"] = bool(request.user == pkgbase.Maintainer) - if is_authenticated: - context["notified"] = request.user.notified(pkgbase) - else: - context["notified"] = False + context["notified"] = request.user.notified(pkgbase) context["out_of_date"] = bool(pkgbase.OutOfDateTS) - if is_authenticated: - context["voted"] = db.query( - request.user.package_votes.filter( - PackageVote.PackageBaseID == pkgbase.ID - ).exists() - ).scalar() - else: - context["voted"] = False + context["voted"] = request.user.package_votes.filter( + PackageVote.PackageBaseID == pkgbase.ID + ).scalar() - if is_authenticated: - context["requests"] = pkgbase.requests.filter( - and_(PackageRequest.Status == PENDING_ID, PackageRequest.ClosedTS.is_(None)) - ).count() - else: - context["requests"] = [] - - context["popularity"] = popularity(pkgbase, time.utcnow()) + context["requests"] = pkgbase.requests.filter( + and_(PackageRequest.Status == PENDING_ID, + PackageRequest.ClosedTS.is_(None)) + ).count() return context -def remove_comaintainer( - comaint: PackageComaintainer, -) -> notify.ComaintainerRemoveNotification: +def remove_comaintainer(comaint: PackageComaintainer) \ + -> notify.ComaintainerRemoveNotification: """ Remove a PackageComaintainer. @@ -116,8 +77,7 @@ def remove_comaintainer( return notif -@db.retry_deadlock -def remove_comaintainers(pkgbase: PackageBase, usernames: list[str]) -> None: +def remove_comaintainers(pkgbase: PackageBase, usernames: List[str]) -> None: """ Remove comaintainers from `pkgbase`. @@ -126,9 +86,9 @@ def remove_comaintainers(pkgbase: PackageBase, usernames: list[str]) -> None: """ notifications = [] with db.begin(): - comaintainers = ( - pkgbase.comaintainers.join(User).filter(User.Username.in_(usernames)).all() - ) + comaintainers = pkgbase.comaintainers.join(User).filter( + User.Username.in_(usernames) + ).all() notifications = [ notify.ComaintainerRemoveNotification(co.User.ID, pkgbase.ID) for co in comaintainers @@ -152,24 +112,23 @@ def latest_priority(pkgbase: PackageBase) -> int: """ # Order comaintainers related to pkgbase by Priority DESC. - record = pkgbase.comaintainers.order_by(PackageComaintainer.Priority.desc()).first() + record = pkgbase.comaintainers.order_by( + PackageComaintainer.Priority.desc()).first() # Use Priority column if record exists, otherwise 0. return record.Priority if record else 0 class NoopComaintainerNotification: - """A noop notification stub used as an error-state return value.""" + """ A noop notification stub used as an error-state return value. """ def send(self) -> None: - """noop""" + """ noop """ return -@db.retry_deadlock -def add_comaintainer( - pkgbase: PackageBase, comaintainer: User -) -> notify.ComaintainerAddNotification: +def add_comaintainer(pkgbase: PackageBase, comaintainer: User) \ + -> notify.ComaintainerAddNotification: """ Add a new comaintainer to `pkgbase`. @@ -185,19 +144,14 @@ def add_comaintainer( new_prio = latest_priority(pkgbase) + 1 with db.begin(): - db.create( - PackageComaintainer, - PackageBase=pkgbase, - User=comaintainer, - Priority=new_prio, - ) + db.create(PackageComaintainer, PackageBase=pkgbase, + User=comaintainer, Priority=new_prio) return notify.ComaintainerAddNotification(comaintainer.ID, pkgbase.ID) -def add_comaintainers( - request: Request, pkgbase: PackageBase, usernames: list[str] -) -> None: +def add_comaintainers(request: Request, pkgbase: PackageBase, + usernames: List[str]) -> None: """ Add comaintainers to `pkgbase`. @@ -241,6 +195,7 @@ def rotate_comaintainers(pkgbase: PackageBase) -> None: :param pkgbase: PackageBase instance """ - comaintainers = pkgbase.comaintainers.order_by(PackageComaintainer.Priority.asc()) + comaintainers = pkgbase.comaintainers.order_by( + PackageComaintainer.Priority.asc()) for i, comaint in enumerate(comaintainers): comaint.Priority = i + 1 diff --git a/aurweb/pkgbase/validate.py b/aurweb/pkgbase/validate.py index b76e1a38..8d05a3d7 100644 --- a/aurweb/pkgbase/validate.py +++ b/aurweb/pkgbase/validate.py @@ -1,55 +1,35 @@ -from http import HTTPStatus -from typing import Any +from typing import Any, Dict -from fastapi import HTTPException - -from aurweb import config, db +from aurweb import db from aurweb.exceptions import ValidationError from aurweb.models import PackageBase -def request( - pkgbase: PackageBase, - type: str, - comments: str, - merge_into: str, - context: dict[str, Any], -) -> None: - # validate comment - comment(comments) +def request(pkgbase: PackageBase, + type: str, comments: str, merge_into: str, + context: Dict[str, Any]) -> None: + if not comments: + raise ValidationError(["The comment field must not be empty."]) if type == "merge": # Perform merge-related checks. if not merge_into: # TODO: This error needs to be translated. - raise ValidationError(['The "Merge into" field must not be empty.']) + raise ValidationError( + ['The "Merge into" field must not be empty.']) - target = db.query(PackageBase).filter(PackageBase.Name == merge_into).first() + target = db.query(PackageBase).filter( + PackageBase.Name == merge_into + ).first() if not target: # TODO: This error needs to be translated. - raise ValidationError( - ["The package base you want to merge into does not exist."] - ) + raise ValidationError([ + "The package base you want to merge into does not exist." + ]) db.refresh(target) if target.ID == pkgbase.ID: # TODO: This error needs to be translated. - raise ValidationError(["You cannot merge a package base into itself."]) - - -def comment(comment: str): - if not comment: - raise ValidationError(["The comment field must not be empty."]) - - if len(comment) > config.getint("options", "max_chars_comment", 5000): - raise ValidationError(["Maximum number of characters for comment exceeded."]) - - -def comment_raise_http_ex(comments: str): - try: - comment(comments) - except ValidationError as err: - raise HTTPException( - status_code=HTTPStatus.BAD_REQUEST, - detail=err.data[0], - ) + raise ValidationError([ + "You cannot merge a package base into itself." + ]) diff --git a/aurweb/prometheus.py b/aurweb/prometheus.py index 40b99a90..dae56320 100644 --- a/aurweb/prometheus.py +++ b/aurweb/prometheus.py @@ -1,49 +1,26 @@ -from typing import Any, Callable, Optional +from typing import Any, Callable, Dict, List, Optional -from prometheus_client import Counter, Gauge +from prometheus_client import Counter from prometheus_fastapi_instrumentator import Instrumentator from prometheus_fastapi_instrumentator.metrics import Info from starlette.routing import Match, Route -from aurweb import aur_logging +from aurweb import logging -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) _instrumentator = Instrumentator() -# Custom metrics -SEARCH_REQUESTS = Counter( - "aur_search_requests", "Number of search requests by cache hit/miss", ["cache"] -) -USERS = Gauge( - "aur_users", "Number of AUR users by type", ["type"], multiprocess_mode="livemax" -) -PACKAGES = Gauge( - "aur_packages", - "Number of AUR packages by state", - ["state"], - multiprocess_mode="livemax", -) -REQUESTS = Gauge( - "aur_requests", - "Number of AUR requests by type and status", - ["type", "status"], - multiprocess_mode="livemax", -) - - def instrumentator(): return _instrumentator -# FastAPI metrics # Taken from https://github.com/stephenhillier/starlette_exporter # Their license is included in LICENSES/starlette_exporter. # The code has been modified to remove child route checks # (since we don't have any) and to stay within an 80-width limit. -def get_matching_route_path( - scope: dict[Any, Any], routes: list[Route], route_name: Optional[str] = None -) -> str: +def get_matching_route_path(scope: Dict[Any, Any], routes: List[Route], + route_name: Optional[str] = None) -> str: """ Find a matching route and return its original path string @@ -57,7 +34,7 @@ def get_matching_route_path( if match == Match.FULL: route_name = route.path - """ + ''' # This path exists in the original function's code, but we # don't need it (currently), so it's been removed to avoid # useless test coverage. @@ -70,7 +47,7 @@ def get_matching_route_path( route_name = None else: route_name += child_route_name - """ + ''' return route_name elif match == Match.PARTIAL and route_name is None: @@ -78,16 +55,11 @@ def get_matching_route_path( def http_requests_total() -> Callable[[Info], None]: - metric = Counter( - "http_requests_total", - "Number of HTTP requests.", - labelnames=("method", "path", "status"), - ) + metric = Counter("http_requests_total", + "Number of HTTP requests.", + labelnames=("method", "path", "status")) def instrumentation(info: Info) -> None: - if info.request.method.lower() in ("head", "options"): # pragma: no cover - return - scope = info.request.scope # Taken from https://github.com/stephenhillier/starlette_exporter @@ -98,19 +70,11 @@ def http_requests_total() -> Callable[[Info], None]: if not (scope.get("endpoint", None) and scope.get("router", None)): return None - root_path = scope.get("root_path", str()) - app = scope.get("app", dict()) - - if hasattr(app, "root_path"): - app_root_path = getattr(app, "root_path") - if root_path.startswith(app_root_path): - root_path = root_path[len(app_root_path) :] - base_scope = { "type": scope.get("type"), - "path": root_path + scope.get("path"), + "path": scope.get("root_path", "") + scope.get("path"), "path_params": scope.get("path_params", {}), - "method": scope.get("method"), + "method": scope.get("method") } method = scope.get("method") @@ -127,13 +91,9 @@ def http_api_requests_total() -> Callable[[Info], None]: metric = Counter( "http_api_requests", "Number of times an RPC API type has been requested.", - labelnames=("type", "status"), - ) + labelnames=("type", "status")) def instrumentation(info: Info) -> None: - if info.request.method.lower() in ("head", "options"): # pragma: no cover - return - if info.request.url.path.rstrip("/") == "/rpc": type = info.request.query_params.get("type", "None") if info.response: diff --git a/aurweb/ratelimit.py b/aurweb/ratelimit.py index 060f8dcb..659ab6b8 100644 --- a/aurweb/ratelimit.py +++ b/aurweb/ratelimit.py @@ -1,12 +1,11 @@ from fastapi import Request from redis.client import Pipeline -from aurweb import aur_logging, config, db, time -from aurweb.aur_redis import redis_connection +from aurweb import config, db, logging, time from aurweb.models import ApiRateLimit -from aurweb.util import get_client_ip +from aurweb.redis import redis_connection -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) def _update_ratelimit_redis(request: Request, pipeline: Pipeline): @@ -14,7 +13,7 @@ def _update_ratelimit_redis(request: Request, pipeline: Pipeline): now = time.utcnow() time_to_delete = now - window_length - host = get_client_ip(request) + host = request.client.host window_key = f"ratelimit-ws:{host}" requests_key = f"ratelimit:{host}" @@ -39,33 +38,27 @@ def _update_ratelimit_db(request: Request): now = time.utcnow() time_to_delete = now - window_length - @db.retry_deadlock - def retry_delete(records: list[ApiRateLimit]) -> None: - with db.begin(): - db.delete_all(records) + records = db.query(ApiRateLimit).filter( + ApiRateLimit.WindowStart < time_to_delete) + with db.begin(): + db.delete_all(records) - records = db.query(ApiRateLimit).filter(ApiRateLimit.WindowStart < time_to_delete) - retry_delete(records) - - @db.retry_deadlock - def retry_create(record: ApiRateLimit, now: int, host: str) -> ApiRateLimit: - with db.begin(): - if not record: - record = db.create(ApiRateLimit, WindowStart=now, IP=host, Requests=1) - else: - record.Requests += 1 - return record - - host = get_client_ip(request) + host = request.client.host record = db.query(ApiRateLimit, ApiRateLimit.IP == host).first() - record = retry_create(record, now, host) + with db.begin(): + if not record: + record = db.create(ApiRateLimit, + WindowStart=now, + IP=host, Requests=1) + else: + record.Requests += 1 logger.debug(record.Requests) return record def update_ratelimit(request: Request, pipeline: Pipeline): - """Update the ratelimit stored in Redis or the database depending + """ Update the ratelimit stored in Redis or the database depending on AUR_CONFIG's [options] cache setting. This Redis-capable function is slightly different than most. If Redis @@ -82,7 +75,7 @@ def update_ratelimit(request: Request, pipeline: Pipeline): def check_ratelimit(request: Request): - """Increment and check to see if request has exceeded their rate limit. + """ Increment and check to see if request has exceeded their rate limit. :param request: FastAPI request :returns: True if the request host has exceeded the rate limit else False @@ -93,7 +86,7 @@ def check_ratelimit(request: Request): record = update_ratelimit(request, pipeline) # Get cache value, else None. - host = get_client_ip(request) + host = request.client.host pipeline.get(f"ratelimit:{host}") requests = pipeline.execute()[0] @@ -101,7 +94,7 @@ def check_ratelimit(request: Request): # valid cache value will be returned which must be converted # to an int. Otherwise, use the database record returned # by update_ratelimit. - if not config.getboolean("ratelimit", "cache") or requests is None: + if not config.getboolean("ratelimit", "cache"): # If we got nothing from pipeline.get, we did not use # the Redis path of logic: use the DB record's count. requests = record.Requests diff --git a/aurweb/aur_redis.py b/aurweb/redis.py similarity index 85% rename from aurweb/aur_redis.py rename to aurweb/redis.py index b735bb84..e29b8e37 100644 --- a/aurweb/aur_redis.py +++ b/aurweb/redis.py @@ -1,18 +1,17 @@ import fakeredis -from opentelemetry.instrumentation.redis import RedisInstrumentor + from redis import ConnectionPool, Redis import aurweb.config -from aurweb import aur_logging -logger = aur_logging.get_logger(__name__) +from aurweb import logging + +logger = logging.get_logger(__name__) pool = None -RedisInstrumentor().instrument() - class FakeConnectionPool: - """A fake ConnectionPool class which holds an internal reference + """ A fake ConnectionPool class which holds an internal reference to a fakeredis handle. We normally deal with Redis by keeping its ConnectionPool globally diff --git a/aurweb/routers/__init__.py b/aurweb/routers/__init__.py index 552d8c28..da79e38f 100644 --- a/aurweb/routers/__init__.py +++ b/aurweb/routers/__init__.py @@ -3,19 +3,7 @@ API routers for FastAPI. See https://fastapi.tiangolo.com/tutorial/bigger-applications/ """ - -from . import ( - accounts, - auth, - html, - package_maintainer, - packages, - pkgbase, - requests, - rpc, - rss, - sso, -) +from . import accounts, auth, html, packages, pkgbase, requests, rpc, rss, sso, trusted_user """ aurweb application routes. This constant can be any iterable @@ -29,7 +17,7 @@ APP_ROUTES = [ packages, pkgbase, requests, - package_maintainer, + trusted_user, rss, rpc, sso, diff --git a/aurweb/routers/accounts.py b/aurweb/routers/accounts.py index a2d167bc..b603d22a 100644 --- a/aurweb/routers/accounts.py +++ b/aurweb/routers/accounts.py @@ -1,15 +1,17 @@ import copy import typing -from http import HTTPStatus -from typing import Any -from fastapi import APIRouter, Form, HTTPException, Request +from http import HTTPStatus +from typing import Any, Dict + +from fastapi import APIRouter, Form, Request from fastapi.responses import HTMLResponse, RedirectResponse from sqlalchemy import and_, or_ import aurweb.config -from aurweb import aur_logging, db, l10n, models, util -from aurweb.auth import account_type_required, creds, requires_auth, requires_guest + +from aurweb import cookies, db, l10n, logging, models, util +from aurweb.auth import account_type_required, requires_auth, requires_guest from aurweb.captcha import get_captcha_salts from aurweb.exceptions import ValidationError, handle_form_exceptions from aurweb.l10n import get_translator_for_request @@ -22,7 +24,7 @@ from aurweb.users import update, validate from aurweb.users.util import get_user_by_name router = APIRouter() -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) @router.get("/passreset", response_class=HTMLResponse) @@ -32,27 +34,24 @@ async def passreset(request: Request): return render_template(request, "passreset.html", context) -@db.async_retry_deadlock @router.post("/passreset", response_class=HTMLResponse) @handle_form_exceptions @requires_guest -async def passreset_post( - request: Request, - user: str = Form(...), - resetkey: str = Form(default=None), - password: str = Form(default=None), - confirm: str = Form(default=None), -): +async def passreset_post(request: Request, + user: str = Form(...), + resetkey: str = Form(default=None), + password: str = Form(default=None), + confirm: str = Form(default=None)): context = await make_variable_context(request, "Password Reset") # The user parameter being required, we can match against criteria = or_(models.User.Username == user, models.User.Email == user) - db_user = db.query(models.User, and_(criteria, models.User.Suspended == 0)).first() + db_user = db.query(models.User, + and_(criteria, models.User.Suspended == 0)).first() if db_user is None: context["errors"] = ["Invalid e-mail."] - return render_template( - request, "passreset.html", context, status_code=HTTPStatus.NOT_FOUND - ) + return render_template(request, "passreset.html", context, + status_code=HTTPStatus.NOT_FOUND) db.refresh(db_user) if resetkey: @@ -60,34 +59,29 @@ async def passreset_post( if not db_user.ResetKey or resetkey != db_user.ResetKey: context["errors"] = ["Invalid e-mail."] - return render_template( - request, "passreset.html", context, status_code=HTTPStatus.NOT_FOUND - ) + return render_template(request, "passreset.html", context, + status_code=HTTPStatus.NOT_FOUND) if not user or not password: context["errors"] = ["Missing a required field."] - return render_template( - request, "passreset.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + return render_template(request, "passreset.html", context, + status_code=HTTPStatus.BAD_REQUEST) if password != confirm: # If the provided password does not match the provided confirm. context["errors"] = ["Password fields do not match."] - return render_template( - request, "passreset.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + return render_template(request, "passreset.html", context, + status_code=HTTPStatus.BAD_REQUEST) if len(password) < models.User.minimum_passwd_length(): # Translate the error here, which simplifies error output # in the jinja2 template. _ = get_translator_for_request(request) - context["errors"] = [ - _("Your password must be at least %s characters.") - % (str(models.User.minimum_passwd_length())) - ] - return render_template( - request, "passreset.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + context["errors"] = [_( + "Your password must be at least %s characters.") % ( + str(models.User.minimum_passwd_length()))] + return render_template(request, "passreset.html", context, + status_code=HTTPStatus.BAD_REQUEST) # We got to this point; everything matched up. Update the password # and remove the ResetKey. @@ -98,9 +92,8 @@ async def passreset_post( db_user.update_password(password) # Render ?step=complete. - return RedirectResponse( - url="/passreset?step=complete", status_code=HTTPStatus.SEE_OTHER - ) + return RedirectResponse(url="/passreset?step=complete", + status_code=HTTPStatus.SEE_OTHER) # If we got here, we continue with issuing a resetkey for the user. resetkey = generate_resetkey() @@ -110,13 +103,13 @@ async def passreset_post( ResetKeyNotification(db_user.ID).send() # Render ?step=confirm. - return RedirectResponse( - url="/passreset?step=confirm", status_code=HTTPStatus.SEE_OTHER - ) + return RedirectResponse(url="/passreset?step=confirm", + status_code=HTTPStatus.SEE_OTHER) -def process_account_form(request: Request, user: models.User, args: dict[str, Any]): - """Process an account form. All fields are optional and only checks +def process_account_form(request: Request, user: models.User, + args: Dict[str, Any]): + """ Process an account form. All fields are optional and only checks requirements in the case they are present. ``` @@ -153,22 +146,23 @@ def process_account_form(request: Request, user: models.User, args: dict[str, An validate.username_in_use, validate.email_in_use, validate.invalid_account_type, - validate.invalid_captcha, + validate.invalid_captcha ] try: for check in checks: check(**args, request=request, user=user, _=_) except ValidationError as exc: - return False, exc.data + return (False, exc.data) - return True, [] + return (True, []) -def make_account_form_context( - context: dict, request: Request, user: models.User, args: dict -): - """Modify a FastAPI context and add attributes for the account form. +def make_account_form_context(context: dict, + request: Request, + user: models.User, + args: dict): + """ Modify a FastAPI context and add attributes for the account form. :param context: FastAPI context :param request: FastAPI request @@ -179,17 +173,15 @@ def make_account_form_context( # Do not modify the original context. context = copy.copy(context) - context["account_types"] = list( - filter( - lambda e: request.user.AccountTypeID >= e[0], - [ - (at.USER_ID, f"Normal {at.USER}"), - (at.PACKAGE_MAINTAINER_ID, at.PACKAGE_MAINTAINER), - (at.DEVELOPER_ID, at.DEVELOPER), - (at.PACKAGE_MAINTAINER_AND_DEV_ID, at.PACKAGE_MAINTAINER_AND_DEV), - ], - ) - ) + context["account_types"] = list(filter( + lambda e: request.user.AccountTypeID >= e[0], + [ + (at.USER_ID, f"Normal {at.USER}"), + (at.TRUSTED_USER_ID, at.TRUSTED_USER), + (at.DEVELOPER_ID, at.DEVELOPER), + (at.TRUSTED_USER_AND_DEV_ID, at.TRUSTED_USER_AND_DEV) + ] + )) if request.user.is_authenticated(): context["username"] = args.get("U", user.Username) @@ -209,7 +201,6 @@ def make_account_form_context( context["cn"] = args.get("CN", user.CommentNotify) context["un"] = args.get("UN", user.UpdateNotify) context["on"] = args.get("ON", user.OwnershipNotify) - context["hdc"] = args.get("HDC", user.HideDeletedComments) context["inactive"] = args.get("J", user.InactivityTS != 0) else: context["username"] = args.get("U", str()) @@ -228,7 +219,6 @@ def make_account_form_context( context["cn"] = args.get("CN", True) context["un"] = args.get("UN", False) context["on"] = args.get("ON", True) - context["hdc"] = args.get("HDC", False) context["inactive"] = args.get("J", False) context["password"] = args.get("P", str()) @@ -239,62 +229,59 @@ def make_account_form_context( @router.get("/register", response_class=HTMLResponse) @requires_guest -async def account_register( - request: Request, - U: str = Form(default=str()), # Username - E: str = Form(default=str()), # Email - H: str = Form(default=False), # Hide Email - BE: str = Form(default=None), # Backup Email - R: str = Form(default=None), # Real Name - HP: str = Form(default=None), # Homepage - I: str = Form(default=None), # IRC Nick - K: str = Form(default=None), # PGP Key FP - L: str = Form(default=aurweb.config.get("options", "default_lang")), - TZ: str = Form(default=aurweb.config.get("options", "default_timezone")), - PK: str = Form(default=None), - CN: bool = Form(default=False), # Comment Notify - CU: bool = Form(default=False), # Update Notify - CO: bool = Form(default=False), # Owner Notify - HDC: bool = Form(default=False), # Hide Deleted Comments - captcha: str = Form(default=str()), -): +async def account_register(request: Request, + U: str = Form(default=str()), # Username + E: str = Form(default=str()), # Email + H: str = Form(default=False), # Hide Email + BE: str = Form(default=None), # Backup Email + R: str = Form(default=None), # Real Name + HP: str = Form(default=None), # Homepage + I: str = Form(default=None), # IRC Nick + K: str = Form(default=None), # PGP Key FP + L: str = Form(default=aurweb.config.get( + "options", "default_lang")), + TZ: str = Form(default=aurweb.config.get( + "options", "default_timezone")), + PK: str = Form(default=None), + CN: bool = Form(default=False), # Comment Notify + CU: bool = Form(default=False), # Update Notify + CO: bool = Form(default=False), # Owner Notify + captcha: str = Form(default=str())): context = await make_variable_context(request, "Register") context["captcha_salt"] = get_captcha_salts()[0] context = make_account_form_context(context, request, None, dict()) return render_template(request, "register.html", context) -@db.async_retry_deadlock @router.post("/register", response_class=HTMLResponse) @handle_form_exceptions @requires_guest -async def account_register_post( - request: Request, - U: str = Form(default=str()), # Username - E: str = Form(default=str()), # Email - H: str = Form(default=False), # Hide Email - BE: str = Form(default=None), # Backup Email - R: str = Form(default=""), # Real Name - HP: str = Form(default=None), # Homepage - I: str = Form(default=None), # IRC Nick - K: str = Form(default=None), # PGP Key - L: str = Form(default=aurweb.config.get("options", "default_lang")), - TZ: str = Form(default=aurweb.config.get("options", "default_timezone")), - PK: str = Form(default=str()), # SSH PubKey - CN: bool = Form(default=False), - UN: bool = Form(default=False), - ON: bool = Form(default=False), - HDC: bool = Form(default=False), - captcha: str = Form(default=None), - captcha_salt: str = Form(...), -): +async def account_register_post(request: Request, + U: str = Form(default=str()), # Username + E: str = Form(default=str()), # Email + H: str = Form(default=False), # Hide Email + BE: str = Form(default=None), # Backup Email + R: str = Form(default=''), # Real Name + HP: str = Form(default=None), # Homepage + I: str = Form(default=None), # IRC Nick + K: str = Form(default=None), # PGP Key + L: str = Form(default=aurweb.config.get( + "options", "default_lang")), + TZ: str = Form(default=aurweb.config.get( + "options", "default_timezone")), + PK: str = Form(default=str()), # SSH PubKey + CN: bool = Form(default=False), + UN: bool = Form(default=False), + ON: bool = Form(default=False), + captcha: str = Form(default=None), + captcha_salt: str = Form(...)): context = await make_variable_context(request, "Register") args = dict(await request.form()) args["K"] = args.get("K", str()).replace(" ", "") K = args.get("K") # Force "H" into a boolean. - args["H"] = H = args.get("H", str()) == "on" + args["H"] = H = (args.get("H", str()) == "on") context = make_account_form_context(context, request, None, args) ok, errors = process_account_form(request, request.user, args) @@ -302,56 +289,42 @@ async def account_register_post( # If the field values given do not meet the requirements, # return HTTP 400 with an error. context["errors"] = errors - return render_template( - request, "register.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + return render_template(request, "register.html", context, + status_code=HTTPStatus.BAD_REQUEST) if not captcha: context["errors"] = ["The CAPTCHA is missing."] - return render_template( - request, "register.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + return render_template(request, "register.html", context, + status_code=HTTPStatus.BAD_REQUEST) # Create a user with no password with a resetkey, then send # an email off about it. resetkey = generate_resetkey() # By default, we grab the User account type to associate with. - atype = db.query( - models.AccountType, models.AccountType.AccountType == "User" - ).first() + atype = db.query(models.AccountType, + models.AccountType.AccountType == "User").first() # Create a user given all parameters available. with db.begin(): - user = db.create( - models.User, - Username=U, - Email=E, - HideEmail=H, - BackupEmail=BE, - RealName=R, - Homepage=HP, - IRCNick=I, - PGPKey=K, - LangPreference=L, - Timezone=TZ, - CommentNotify=CN, - UpdateNotify=UN, - OwnershipNotify=ON, - HideDeletedComments=HDC, - ResetKey=resetkey, - AccountType=atype, - ) + user = db.create(models.User, Username=U, + Email=E, HideEmail=H, BackupEmail=BE, + RealName=R, Homepage=HP, IRCNick=I, PGPKey=K, + LangPreference=L, Timezone=TZ, CommentNotify=CN, + UpdateNotify=UN, OwnershipNotify=ON, + ResetKey=resetkey, AccountType=atype) - # If a PK was given and either one does not exist or the given - # PK mismatches the existing user's SSHPubKey.PubKey. - if PK: - # Get the second element in the PK, which is the actual key. - keys = util.parse_ssh_keys(PK.strip()) - for k in keys: - pk = " ".join(k) - fprint = get_fingerprint(pk) - db.create(models.SSHPubKey, User=user, PubKey=pk, Fingerprint=fprint) + # If a PK was given and either one does not exist or the given + # PK mismatches the existing user's SSHPubKey.PubKey. + if PK: + # Get the second element in the PK, which is the actual key. + keys = util.parse_ssh_keys(PK.strip()) + for k in keys: + pk = " ".join(k) + fprint = get_fingerprint(pk) + with db.begin(): + db.create(models.SSHPubKey, UserID=user.ID, + PubKey=pk, Fingerprint=fprint) # Send a reset key notification to the new user. WelcomeNotification(user.ID).send() @@ -361,9 +334,8 @@ async def account_register_post( return render_template(request, "register.html", context) -def cannot_edit( - request: Request, user: models.User -) -> typing.Optional[RedirectResponse]: +def cannot_edit(request: Request, user: models.User) \ + -> typing.Optional[RedirectResponse]: """ Decide if `request.user` cannot edit `user`. @@ -374,9 +346,6 @@ def cannot_edit( :param user: Target user to be edited :return: RedirectResponse if approval != granted else None """ - # raise 404 if user does not exist - if not user: - raise HTTPException(status_code=HTTPStatus.NOT_FOUND) approved = request.user.can_edit_user(user) if not approved and (to := "/"): if user: @@ -404,32 +373,31 @@ async def account_edit(request: Request, username: str): @router.post("/account/{username}/edit", response_class=HTMLResponse) @handle_form_exceptions @requires_auth -async def account_edit_post( - request: Request, - username: str, - U: str = Form(default=str()), # Username - J: bool = Form(default=False), - E: str = Form(default=str()), # Email - H: str = Form(default=False), # Hide Email - BE: str = Form(default=None), # Backup Email - R: str = Form(default=None), # Real Name - HP: str = Form(default=None), # Homepage - I: str = Form(default=None), # IRC Nick - K: str = Form(default=None), # PGP Key - L: str = Form(aurweb.config.get("options", "default_lang")), - TZ: str = Form(aurweb.config.get("options", "default_timezone")), - P: str = Form(default=str()), # New Password - C: str = Form(default=None), # Password Confirm - S: bool = Form(default=False), # Suspended - PK: str = Form(default=None), # PubKey - CN: bool = Form(default=False), # Comment Notify - UN: bool = Form(default=False), # Update Notify - ON: bool = Form(default=False), # Owner Notify - HDC: bool = Form(default=False), # Hide Deleted Comments - T: int = Form(default=None), - passwd: str = Form(default=str()), -): - user = db.query(models.User).filter(models.User.Username == username).first() +async def account_edit_post(request: Request, + username: str, + U: str = Form(default=str()), # Username + J: bool = Form(default=False), + E: str = Form(default=str()), # Email + H: str = Form(default=False), # Hide Email + BE: str = Form(default=None), # Backup Email + R: str = Form(default=None), # Real Name + HP: str = Form(default=None), # Homepage + I: str = Form(default=None), # IRC Nick + K: str = Form(default=None), # PGP Key + L: str = Form(aurweb.config.get( + "options", "default_lang")), + TZ: str = Form(aurweb.config.get( + "options", "default_timezone")), + P: str = Form(default=str()), # New Password + C: str = Form(default=None), # Password Confirm + PK: str = Form(default=None), # PubKey + CN: bool = Form(default=False), # Comment Notify + UN: bool = Form(default=False), # Update Notify + ON: bool = Form(default=False), # Owner Notify + T: int = Form(default=None), + passwd: str = Form(default=str())): + user = db.query(models.User).filter( + models.User.Username == username).first() response = cannot_edit(request, user) if response: return response @@ -448,15 +416,13 @@ async def account_edit_post( if not passwd: context["errors"] = ["Invalid password."] - return render_template( - request, "account/edit.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + return render_template(request, "account/edit.html", context, + status_code=HTTPStatus.BAD_REQUEST) if not ok: context["errors"] = errors - return render_template( - request, "account/edit.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + return render_template(request, "account/edit.html", context, + status_code=HTTPStatus.BAD_REQUEST) updates = [ update.simple, @@ -464,29 +430,29 @@ async def account_edit_post( update.timezone, update.ssh_pubkey, update.account_type, - update.password, - update.suspend, + update.password ] - # These update functions are all guarded by retry_deadlock; - # there's no need to guard this route itself. for f in updates: f(**args, request=request, user=user, context=context) if not errors: context["complete"] = True - return render_template(request, "account/edit.html", context) + # Update cookies with requests, in case they were changed. + response = render_template(request, "account/edit.html", context) + return cookies.update_response_cookies(request, response, + aurtz=TZ, aurlang=L) @router.get("/account/{username}") async def account(request: Request, username: str): _ = l10n.get_translator_for_request(request) - context = await make_variable_context(request, _("Account") + " " + username) + context = await make_variable_context( + request, _("Account") + " " + username) if not request.user.is_authenticated(): - return render_template( - request, "account/show.html", context, status_code=HTTPStatus.UNAUTHORIZED - ) + return render_template(request, "account/show.html", context, + status_code=HTTPStatus.UNAUTHORIZED) # Get related User record, if possible. user = get_user_by_name(username) @@ -494,10 +460,11 @@ async def account(request: Request, username: str): # Format PGPKey for display with a space between each 4 characters. k = user.PGPKey or str() - context["pgp_key"] = " ".join([k[i : i + 4] for i in range(0, len(k), 4)]) + context["pgp_key"] = " ".join([k[i:i + 4] for i in range(0, len(k), 4)]) login_ts = None - session = db.query(models.Session).filter(models.Session.UsersID == user.ID).first() + session = db.query(models.Session).filter( + models.Session.UsersID == user.ID).first() if session: login_ts = user.session.LastUpdateTS context["login_ts"] = login_ts @@ -513,16 +480,15 @@ async def account_comments(request: Request, username: str): context = make_context(request, "Accounts") context["username"] = username context["comments"] = user.package_comments.order_by( - models.PackageComment.CommentTS.desc() - ) + models.PackageComment.CommentTS.desc()) return render_template(request, "account/comments.html", context) @router.get("/accounts") @requires_auth -@account_type_required( - {at.PACKAGE_MAINTAINER, at.DEVELOPER, at.PACKAGE_MAINTAINER_AND_DEV} -) +@account_type_required({at.TRUSTED_USER, + at.DEVELOPER, + at.TRUSTED_USER_AND_DEV}) async def accounts(request: Request): context = make_context(request, "Accounts") return render_template(request, "account/search.html", context) @@ -531,21 +497,19 @@ async def accounts(request: Request): @router.post("/accounts") @handle_form_exceptions @requires_auth -@account_type_required( - {at.PACKAGE_MAINTAINER, at.DEVELOPER, at.PACKAGE_MAINTAINER_AND_DEV} -) -async def accounts_post( - request: Request, - O: int = Form(default=0), # Offset - SB: str = Form(default=str()), # Sort By - U: str = Form(default=str()), # Username - T: str = Form(default=str()), # Account Type - S: bool = Form(default=False), # Suspended - E: str = Form(default=str()), # Email - R: str = Form(default=str()), # Real Name - I: str = Form(default=str()), # IRC Nick - K: str = Form(default=str()), -): # PGP Key +@account_type_required({at.TRUSTED_USER, + at.DEVELOPER, + at.TRUSTED_USER_AND_DEV}) +async def accounts_post(request: Request, + O: int = Form(default=0), # Offset + SB: str = Form(default=str()), # Sort By + U: str = Form(default=str()), # Username + T: str = Form(default=str()), # Account Type + S: bool = Form(default=False), # Suspended + E: str = Form(default=str()), # Email + R: str = Form(default=str()), # Real Name + I: str = Form(default=str()), # IRC Nick + K: str = Form(default=str())): # PGP Key context = await make_variable_context(request, "Accounts") context["pp"] = pp = 50 # Hits per page. @@ -568,9 +532,9 @@ async def accounts_post( # Convert parameter T to an AccountType ID. account_types = { "u": at.USER_ID, - "t": at.PACKAGE_MAINTAINER_ID, + "t": at.TRUSTED_USER_ID, "d": at.DEVELOPER_ID, - "td": at.PACKAGE_MAINTAINER_AND_DEV_ID, + "td": at.TRUSTED_USER_AND_DEV_ID } account_type_id = account_types.get(T, None) @@ -581,8 +545,7 @@ async def accounts_post( # Populate this list with any additional statements to # be ANDed together. statements = [ - v - for k, v in [ + v for k, v in [ (account_type_id is not None, models.AccountType.ID == account_type_id), (bool(U), models.User.Username.like(f"%{U}%")), (bool(S), models.User.Suspended == S), @@ -590,8 +553,7 @@ async def accounts_post( (bool(R), models.User.RealName.like(f"%{R}%")), (bool(I), models.User.IRCNick.like(f"%{I}%")), (bool(K), models.User.PGPKey.like(f"%{K}%")), - ] - if k + ] if k ] # Filter the query by coe-mbining all statements added above into @@ -609,79 +571,9 @@ async def accounts_post( return render_template(request, "account/index.html", context) -@router.get("/account/{name}/delete") -@requires_auth -async def account_delete(request: Request, name: str): - user = db.query(models.User).filter(models.User.Username == name).first() - if not user: - raise HTTPException(status_code=HTTPStatus.NOT_FOUND) - - has_cred = request.user.has_credential(creds.ACCOUNT_EDIT, approved=[user]) - if not has_cred: - _ = l10n.get_translator_for_request(request) - raise HTTPException( - detail=_("You do not have permission to edit this account."), - status_code=HTTPStatus.UNAUTHORIZED, - ) - - context = make_context(request, "Accounts") - context["name"] = name - return render_template(request, "account/delete.html", context) - - -@db.async_retry_deadlock -@router.post("/account/{name}/delete") -@handle_form_exceptions -@requires_auth -async def account_delete_post( - request: Request, - name: str, - passwd: str = Form(default=str()), - confirm: bool = Form(default=False), -): - user = db.query(models.User).filter(models.User.Username == name).first() - if not user: - raise HTTPException(status_code=HTTPStatus.NOT_FOUND) - - has_cred = request.user.has_credential(creds.ACCOUNT_EDIT, approved=[user]) - if not has_cred: - _ = l10n.get_translator_for_request(request) - raise HTTPException( - detail=_("You do not have permission to edit this account."), - status_code=HTTPStatus.UNAUTHORIZED, - ) - - context = make_context(request, "Accounts") - context["name"] = name - - confirm = util.strtobool(confirm) - if not confirm: - context["errors"] = [ - "The account has not been deleted, check the confirmation checkbox." - ] - return render_template( - request, - "account/delete.html", - context, - status_code=HTTPStatus.BAD_REQUEST, - ) - - if not request.user.valid_password(passwd): - context["errors"] = ["Invalid password."] - return render_template( - request, - "account/delete.html", - context, - status_code=HTTPStatus.BAD_REQUEST, - ) - - with db.begin(): - db.delete(user) - - return RedirectResponse("/", status_code=HTTPStatus.SEE_OTHER) - - -def render_terms_of_service(request: Request, context: dict, terms: typing.Iterable): +def render_terms_of_service(request: Request, + context: dict, + terms: typing.Iterable): if not terms: return RedirectResponse("/", status_code=HTTPStatus.SEE_OTHER) context["unaccepted_terms"] = terms @@ -693,21 +585,14 @@ def render_terms_of_service(request: Request, context: dict, terms: typing.Itera async def terms_of_service(request: Request): # Query the database for terms that were previously accepted, # but now have a bumped Revision that needs to be accepted. - diffs = ( - db.query(models.Term) - .join(models.AcceptedTerm) - .filter(models.AcceptedTerm.Revision < models.Term.Revision) - .all() - ) + diffs = db.query(models.Term).join(models.AcceptedTerm).filter( + models.AcceptedTerm.Revision < models.Term.Revision).all() # Query the database for any terms that have not yet been accepted. - unaccepted = ( - db.query(models.Term) - .filter(~models.Term.ID.in_(db.query(models.AcceptedTerm.TermsID))) - .all() - ) + unaccepted = db.query(models.Term).filter( + ~models.Term.ID.in_(db.query(models.AcceptedTerm.TermsID))).all() - for record in diffs + unaccepted: + for record in (diffs + unaccepted): db.refresh(record) # Translate the 'Terms of Service' part of our page title. @@ -719,26 +604,19 @@ async def terms_of_service(request: Request): return render_terms_of_service(request, context, accept_needed) -@db.async_retry_deadlock @router.post("/tos") @handle_form_exceptions @requires_auth -async def terms_of_service_post(request: Request, accept: bool = Form(default=False)): +async def terms_of_service_post(request: Request, + accept: bool = Form(default=False)): # Query the database for terms that were previously accepted, # but now have a bumped Revision that needs to be accepted. - diffs = ( - db.query(models.Term) - .join(models.AcceptedTerm) - .filter(models.AcceptedTerm.Revision < models.Term.Revision) - .all() - ) + diffs = db.query(models.Term).join(models.AcceptedTerm).filter( + models.AcceptedTerm.Revision < models.Term.Revision).all() # Query the database for any terms that have not yet been accepted. - unaccepted = ( - db.query(models.Term) - .filter(~models.Term.ID.in_(db.query(models.AcceptedTerm.TermsID))) - .all() - ) + unaccepted = db.query(models.Term).filter( + ~models.Term.ID.in_(db.query(models.AcceptedTerm.TermsID))).all() if not accept: # Translate the 'Terms of Service' part of our page title. @@ -750,8 +628,7 @@ async def terms_of_service_post(request: Request, accept: bool = Form(default=Fa # them instead of reiterating the process in terms_of_service. accept_needed = sorted(unaccepted + diffs) return render_terms_of_service( - request, context, util.apply_all(accept_needed, db.refresh) - ) + request, context, util.apply_all(accept_needed, db.refresh)) with db.begin(): # For each term we found, query for the matching accepted term @@ -759,18 +636,13 @@ async def terms_of_service_post(request: Request, accept: bool = Form(default=Fa for term in diffs: db.refresh(term) accepted_term = request.user.accepted_terms.filter( - models.AcceptedTerm.TermsID == term.ID - ).first() + models.AcceptedTerm.TermsID == term.ID).first() accepted_term.Revision = term.Revision # For each term that was never accepted, accept it! for term in unaccepted: db.refresh(term) - db.create( - models.AcceptedTerm, - User=request.user, - Term=term, - Revision=term.Revision, - ) + db.create(models.AcceptedTerm, User=request.user, + Term=term, Revision=term.Revision) return RedirectResponse("/", status_code=HTTPStatus.SEE_OTHER) diff --git a/aurweb/routers/auth.py b/aurweb/routers/auth.py index 88eaa0e6..9f465388 100644 --- a/aurweb/routers/auth.py +++ b/aurweb/routers/auth.py @@ -5,7 +5,8 @@ from fastapi.responses import HTMLResponse, RedirectResponse from sqlalchemy import or_ import aurweb.config -from aurweb import cookies, db + +from aurweb import cookies, db, time from aurweb.auth import requires_auth, requires_guest from aurweb.exceptions import handle_form_exceptions from aurweb.l10n import get_translator_for_request @@ -16,7 +17,7 @@ router = APIRouter() async def login_template(request: Request, next: str, errors: list = None): - """Provide login-specific template context to render_template.""" + """ Provide login-specific template context to render_template. """ context = await make_variable_context(request, "Login", next) context["errors"] = errors context["url_base"] = f"{request.url.scheme}://{request.url.netloc}" @@ -28,95 +29,77 @@ async def login_get(request: Request, next: str = "/"): return await login_template(request, next) -@db.retry_deadlock -def _retry_login(request: Request, user: User, passwd: str) -> str: - return user.login(request, passwd) - - @router.post("/login", response_class=HTMLResponse) @handle_form_exceptions @requires_guest -async def login_post( - request: Request, - next: str = Form(...), - user: str = Form(default=str()), - passwd: str = Form(default=str()), - remember_me: bool = Form(default=False), -): +async def login_post(request: Request, + next: str = Form(...), + user: str = Form(default=str()), + passwd: str = Form(default=str()), + remember_me: bool = Form(default=False)): # TODO: Once the Origin header gets broader adoption, this code can be # slightly simplified to use it. login_path = aurweb.config.get("options", "aur_location") + "/login" referer = request.headers.get("Referer") if not referer or not referer.startswith(login_path): _ = get_translator_for_request(request) - raise HTTPException( - status_code=HTTPStatus.BAD_REQUEST, detail=_("Bad Referer header.") - ) + raise HTTPException(status_code=HTTPStatus.BAD_REQUEST, + detail=_("Bad Referer header.")) + + with db.begin(): + user = db.query(User).filter( + or_(User.Username == user, User.Email == user) + ).first() - user = ( - db.query(User) - .filter( - or_( - User.Username == user, - User.Email == user, - ) - ) - .first() - ) if not user: - return await login_template(request, next, errors=["Bad username or password."]) + return await login_template(request, next, + errors=["Bad username or password."]) if user.Suspended: - return await login_template(request, next, errors=["Account Suspended"]) + return await login_template(request, next, + errors=["Account Suspended"]) - # If "remember me" was not ticked, we set a session cookie for AURSID, - # otherwise we make it a persistent cookie - cookie_timeout = None - if remember_me: - cookie_timeout = aurweb.config.getint("options", "persistent_cookie_timeout") - - perma_timeout = aurweb.config.getint("options", "permanent_cookie_timeout") - sid = _retry_login(request, user, passwd) + cookie_timeout = cookies.timeout(remember_me) + sid = user.login(request, passwd, cookie_timeout) if not sid: - return await login_template(request, next, errors=["Bad username or password."]) + return await login_template(request, next, + errors=["Bad username or password."]) - response = RedirectResponse(url=next, status_code=HTTPStatus.SEE_OTHER) + login_timeout = aurweb.config.getint("options", "login_timeout") + + expires_at = int(time.utcnow() + max(cookie_timeout, login_timeout)) + + response = RedirectResponse(url=next, + status_code=HTTPStatus.SEE_OTHER) secure = aurweb.config.getboolean("options", "disable_http_login") - response.set_cookie( - "AURSID", - sid, - max_age=cookie_timeout, - secure=secure, - httponly=secure, - samesite=cookies.samesite(), - ) - response.set_cookie( - "AURREMEMBER", - remember_me, - max_age=perma_timeout, - secure=secure, - httponly=secure, - samesite=cookies.samesite(), - ) + response.set_cookie("AURSID", sid, expires=expires_at, + secure=secure, httponly=secure, + samesite=cookies.samesite()) + response.set_cookie("AURTZ", user.Timezone, + secure=secure, httponly=secure, + samesite=cookies.samesite()) + response.set_cookie("AURLANG", user.LangPreference, + secure=secure, httponly=secure, + samesite=cookies.samesite()) + response.set_cookie("AURREMEMBER", remember_me, + expires=expires_at, + secure=secure, httponly=secure, + samesite=cookies.samesite()) return response -@db.retry_deadlock -def _retry_logout(request: Request) -> None: - request.user.logout(request) - - @router.post("/logout") @handle_form_exceptions @requires_auth async def logout(request: Request, next: str = Form(default="/")): if request.user.is_authenticated(): - _retry_logout(request) + request.user.logout(request) # Use 303 since we may be handling a post request, that'll get it # to redirect to a get request. - response = RedirectResponse(url=next, status_code=HTTPStatus.SEE_OTHER) + response = RedirectResponse(url=next, + status_code=HTTPStatus.SEE_OTHER) response.delete_cookie("AURSID") - response.delete_cookie("AURREMEMBER") + response.delete_cookie("AURTZ") return response diff --git a/aurweb/routers/html.py b/aurweb/routers/html.py index 25c611d0..d31a32c7 100644 --- a/aurweb/routers/html.py +++ b/aurweb/routers/html.py @@ -1,48 +1,43 @@ """ AURWeb's primary routing module. Define all routes via @app.app.{get,post} decorators in some way; more complex routes should be defined in their own modules and imported here. """ - import os + from http import HTTPStatus from fastapi import APIRouter, Form, HTTPException, Request, Response from fastapi.responses import HTMLResponse, RedirectResponse -from prometheus_client import ( - CONTENT_TYPE_LATEST, - CollectorRegistry, - generate_latest, - multiprocess, -) -from sqlalchemy import case, or_ +from prometheus_client import CONTENT_TYPE_LATEST, CollectorRegistry, generate_latest, multiprocess +from sqlalchemy import and_, case, or_ import aurweb.config import aurweb.models.package_request -from aurweb import aur_logging, cookies, db, models, statistics, time, util + +from aurweb import cookies, db, logging, models, time, util +from aurweb.cache import db_count_cache from aurweb.exceptions import handle_form_exceptions +from aurweb.models.account_type import TRUSTED_USER_AND_DEV_ID, TRUSTED_USER_ID from aurweb.models.package_request import PENDING_ID from aurweb.packages.util import query_notified, query_voted, updated_packages from aurweb.templates import make_context, render_template -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) router = APIRouter() @router.get("/favicon.ico") async def favicon(request: Request): - """Some browsers attempt to find a website's favicon via root uri at - /favicon.ico, so provide a redirection here to our static icon.""" + """ Some browsers attempt to find a website's favicon via root uri at + /favicon.ico, so provide a redirection here to our static icon. """ return RedirectResponse("/static/images/favicon.ico") -@db.async_retry_deadlock @router.post("/language", response_class=RedirectResponse) @handle_form_exceptions -async def language( - request: Request, - set_lang: str = Form(...), - next: str = Form(...), - q: str = Form(default=None), -): +async def language(request: Request, + set_lang: str = Form(...), + next: str = Form(...), + q: str = Form(default=None)): """ A POST route used to set a session's language. @@ -50,48 +45,92 @@ async def language( setting the language on any page, we want to preserve query parameters across the redirect. """ - if next[0] != "/": + if next[0] != '/': return HTMLResponse(b"Invalid 'next' parameter.", status_code=400) query_string = "?" + q if q else str() - response = RedirectResponse( - url=f"{next}{query_string}", status_code=HTTPStatus.SEE_OTHER - ) - # If the user is authenticated, update the user's LangPreference. - # Otherwise set an AURLANG cookie if request.user.is_authenticated(): with db.begin(): request.user.LangPreference = set_lang - else: - secure = aurweb.config.getboolean("options", "disable_http_login") - perma_timeout = aurweb.config.getint("options", "permanent_cookie_timeout") - - response.set_cookie( - "AURLANG", - set_lang, - secure=secure, - httponly=secure, - max_age=perma_timeout, - samesite=cookies.samesite(), - ) + # In any case, set the response's AURLANG cookie that never expires. + response = RedirectResponse(url=f"{next}{query_string}", + status_code=HTTPStatus.SEE_OTHER) + secure = aurweb.config.getboolean("options", "disable_http_login") + response.set_cookie("AURLANG", set_lang, + secure=secure, httponly=secure, + samesite=cookies.samesite()) return response @router.get("/", response_class=HTMLResponse) async def index(request: Request): - """Homepage route.""" + """ Homepage route. """ context = make_context(request, "Home") - context["ssh_fingerprints"] = util.get_ssh_fingerprints() + context['ssh_fingerprints'] = util.get_ssh_fingerprints() - cache_expire = aurweb.config.getint("cache", "expiry_time_statistics", 300) + bases = db.query(models.PackageBase) + + redis = aurweb.redis.redis_connection() + cache_expire = 300 # Five minutes. # Package statistics. - counts = statistics.get_homepage_counts() - for k in counts: - context[k] = counts[k] + query = bases.filter(models.PackageBase.PackagerUID.isnot(None)) + context["package_count"] = await db_count_cache( + redis, "package_count", query, expire=cache_expire) + + query = bases.filter( + and_(models.PackageBase.MaintainerUID.is_(None), + models.PackageBase.PackagerUID.isnot(None)) + ) + context["orphan_count"] = await db_count_cache( + redis, "orphan_count", query, expire=cache_expire) + + query = db.query(models.User) + context["user_count"] = await db_count_cache( + redis, "user_count", query, expire=cache_expire) + + query = query.filter( + or_(models.User.AccountTypeID == TRUSTED_USER_ID, + models.User.AccountTypeID == TRUSTED_USER_AND_DEV_ID)) + context["trusted_user_count"] = await db_count_cache( + redis, "trusted_user_count", query, expire=cache_expire) + + # Current timestamp. + now = time.utcnow() + + seven_days = 86400 * 7 # Seven days worth of seconds. + seven_days_ago = now - seven_days + + one_hour = 3600 + updated = bases.filter( + and_(models.PackageBase.ModifiedTS - models.PackageBase.SubmittedTS >= one_hour, + models.PackageBase.PackagerUID.isnot(None)) + ) + + query = bases.filter( + and_(models.PackageBase.SubmittedTS >= seven_days_ago, + models.PackageBase.PackagerUID.isnot(None)) + ) + context["seven_days_old_added"] = await db_count_cache( + redis, "seven_days_old_added", query, expire=cache_expire) + + query = updated.filter(models.PackageBase.ModifiedTS >= seven_days_ago) + context["seven_days_old_updated"] = await db_count_cache( + redis, "seven_days_old_updated", query, expire=cache_expire) + + year = seven_days * 52 # Fifty two weeks worth: one year. + year_ago = now - year + query = updated.filter(models.PackageBase.ModifiedTS >= year_ago) + context["year_old_updated"] = await db_count_cache( + redis, "year_old_updated", query, expire=cache_expire) + + query = bases.filter( + models.PackageBase.ModifiedTS - models.PackageBase.SubmittedTS < 3600) + context["never_updated"] = await db_count_cache( + redis, "never_updated", query, expire=cache_expire) # Get the 15 most recently updated packages. context["package_updates"] = updated_packages(15, cache_expire) @@ -101,92 +140,78 @@ async def index(request: Request): # the dashboard display. packages = db.query(models.Package).join(models.PackageBase) - maintained = ( - packages.join( - models.PackageComaintainer, - models.PackageComaintainer.PackageBaseID == models.PackageBase.ID, - isouter=True, - ) - .join( - models.User, - or_( - models.PackageBase.MaintainerUID == models.User.ID, - models.PackageComaintainer.UsersID == models.User.ID, - ), - ) - .filter(models.User.ID == request.user.ID) + maintained = packages.join( + models.PackageComaintainer, + models.PackageComaintainer.PackageBaseID == models.PackageBase.ID, + isouter=True + ).join( + models.User, + or_(models.PackageBase.MaintainerUID == models.User.ID, + models.PackageComaintainer.UsersID == models.User.ID) + ).filter( + models.User.ID == request.user.ID ) # Packages maintained by the user that have been flagged. - context["flagged_packages"] = ( - maintained.filter(models.PackageBase.OutOfDateTS.isnot(None)) - .order_by(models.PackageBase.ModifiedTS.desc(), models.Package.Name.asc()) - .limit(50) - .all() - ) + context["flagged_packages"] = maintained.filter( + models.PackageBase.OutOfDateTS.isnot(None) + ).order_by( + models.PackageBase.ModifiedTS.desc(), models.Package.Name.asc() + ).limit(50).all() # Flagged packages that request.user has voted for. context["flagged_packages_voted"] = query_voted( - context.get("flagged_packages"), request.user - ) + context.get("flagged_packages"), request.user) # Flagged packages that request.user is being notified about. context["flagged_packages_notified"] = query_notified( - context.get("flagged_packages"), request.user - ) + context.get("flagged_packages"), request.user) - archive_time = aurweb.config.getint("options", "request_archive_time") - start = time.utcnow() - archive_time + archive_time = aurweb.config.getint('options', 'request_archive_time') + start = now - archive_time # Package requests created by request.user. - context["package_requests"] = ( - request.user.package_requests.filter( - models.PackageRequest.RequestTS >= start - ) - .order_by( - # Order primarily by the Status column being PENDING_ID, - # and secondarily by RequestTS; both in descending order. - case([(models.PackageRequest.Status == PENDING_ID, 1)], else_=0).desc(), - models.PackageRequest.RequestTS.desc(), - ) - .limit(50) - .all() - ) + context["package_requests"] = request.user.package_requests.filter( + models.PackageRequest.RequestTS >= start + ).order_by( + # Order primarily by the Status column being PENDING_ID, + # and secondarily by RequestTS; both in descending order. + case([(models.PackageRequest.Status == PENDING_ID, 1)], + else_=0).desc(), + models.PackageRequest.RequestTS.desc() + ).limit(50).all() # Packages that the request user maintains or comaintains. - context["packages"] = ( - maintained.filter(models.User.ID == models.PackageBase.MaintainerUID) - .order_by(models.PackageBase.ModifiedTS.desc(), models.Package.Name.desc()) - .limit(50) - .all() - ) + context["packages"] = maintained.filter( + models.User.ID == models.PackageBase.MaintainerUID + ).order_by( + models.PackageBase.ModifiedTS.desc(), models.Package.Name.desc() + ).limit(50).all() # Packages that request.user has voted for. - context["packages_voted"] = query_voted(context.get("packages"), request.user) + context["packages_voted"] = query_voted( + context.get("packages"), request.user) # Packages that request.user is being notified about. context["packages_notified"] = query_notified( - context.get("packages"), request.user - ) + context.get("packages"), request.user) # Any packages that the request user comaintains. - context["comaintained"] = ( - packages.join(models.PackageComaintainer) - .filter(models.PackageComaintainer.UsersID == request.user.ID) - .order_by(models.PackageBase.ModifiedTS.desc(), models.Package.Name.desc()) - .limit(50) - .all() - ) + context["comaintained"] = packages.join( + models.PackageComaintainer + ).filter( + models.PackageComaintainer.UsersID == request.user.ID + ).order_by( + models.PackageBase.ModifiedTS.desc(), models.Package.Name.desc() + ).limit(50).all() # Comaintained packages that request.user has voted for. context["comaintained_voted"] = query_voted( - context.get("comaintained"), request.user - ) + context.get("comaintained"), request.user) # Comaintained packages that request.user is being notified about. context["comaintained_notified"] = query_notified( - context.get("comaintained"), request.user - ) + context.get("comaintained"), request.user) return render_template(request, "index.html", context) @@ -207,18 +232,16 @@ async def archive_sha256(request: Request, archive: str): @router.get("/metrics") async def metrics(request: Request): if not os.environ.get("PROMETHEUS_MULTIPROC_DIR", None): - return Response( - "Prometheus metrics are not enabled.", - status_code=HTTPStatus.SERVICE_UNAVAILABLE, - ) - - # update prometheus gauges for packages and users - statistics.update_prometheus_metrics() + return Response("Prometheus metrics are not enabled.", + status_code=HTTPStatus.SERVICE_UNAVAILABLE) registry = CollectorRegistry() multiprocess.MultiProcessCollector(registry) data = generate_latest(registry) - headers = {"Content-Type": CONTENT_TYPE_LATEST, "Content-Length": str(len(data))} + headers = { + "Content-Type": CONTENT_TYPE_LATEST, + "Content-Length": str(len(data)) + } return Response(data, headers=headers) diff --git a/aurweb/routers/package_maintainer.py b/aurweb/routers/package_maintainer.py deleted file mode 100644 index 9ce38d07..00000000 --- a/aurweb/routers/package_maintainer.py +++ /dev/null @@ -1,394 +0,0 @@ -import html -import typing -from http import HTTPStatus -from typing import Any - -from fastapi import APIRouter, Form, HTTPException, Request -from fastapi.responses import RedirectResponse, Response -from sqlalchemy import and_, func, or_ - -from aurweb import aur_logging, db, l10n, models, time -from aurweb.auth import creds, requires_auth -from aurweb.exceptions import handle_form_exceptions -from aurweb.models import User -from aurweb.models.account_type import ( - PACKAGE_MAINTAINER_AND_DEV_ID, - PACKAGE_MAINTAINER_ID, -) -from aurweb.templates import make_context, make_variable_context, render_template - -router = APIRouter() -logger = aur_logging.get_logger(__name__) - -# Some PM route specific constants. -ITEMS_PER_PAGE = 10 # Paged table size. -MAX_AGENDA_LENGTH = 75 # Agenda table column length. - -ADDVOTE_SPECIFICS = { - # This dict stores a vote duration and quorum for a proposal. - # When a proposal is added, duration is added to the current - # timestamp. - # "addvote_type": (duration, quorum) - "add_pm": (7 * 24 * 60 * 60, 0.66), - "remove_pm": (7 * 24 * 60 * 60, 0.75), - "remove_inactive_pm": (5 * 24 * 60 * 60, 0.66), - "bylaws": (7 * 24 * 60 * 60, 0.75), -} - - -def populate_package_maintainer_counts(context: dict[str, Any]) -> None: - pm_query = db.query(User).filter( - or_( - User.AccountTypeID == PACKAGE_MAINTAINER_ID, - User.AccountTypeID == PACKAGE_MAINTAINER_AND_DEV_ID, - ) - ) - context["package_maintainer_count"] = pm_query.count() - - # In case any records have a None InactivityTS. - active_pm_query = pm_query.filter( - or_(User.InactivityTS.is_(None), User.InactivityTS == 0) - ) - context["active_package_maintainer_count"] = active_pm_query.count() - - -@router.get("/package-maintainer") -@requires_auth -async def package_maintainer( - request: Request, - coff: int = 0, # current offset - cby: str = "desc", # current by - poff: int = 0, # past offset - pby: str = "desc", -): # past by - """Proposal listings.""" - - if not request.user.has_credential(creds.PM_LIST_VOTES): - return RedirectResponse("/", status_code=HTTPStatus.SEE_OTHER) - - context = make_context(request, "Package Maintainer") - - current_by, past_by = cby, pby - current_off, past_off = coff, poff - - context["pp"] = pp = ITEMS_PER_PAGE - context["prev_len"] = MAX_AGENDA_LENGTH - - ts = time.utcnow() - - if current_by not in {"asc", "desc"}: - # If a malicious by was given, default to desc. - current_by = "desc" - context["current_by"] = current_by - - if past_by not in {"asc", "desc"}: - # If a malicious by was given, default to desc. - past_by = "desc" - context["past_by"] = past_by - - current_votes = ( - db.query(models.VoteInfo) - .filter(models.VoteInfo.End > ts) - .order_by(models.VoteInfo.Submitted.desc()) - ) - context["current_votes_count"] = current_votes.count() - current_votes = current_votes.limit(pp).offset(current_off) - context["current_votes"] = ( - reversed(current_votes.all()) if current_by == "asc" else current_votes.all() - ) - context["current_off"] = current_off - - past_votes = ( - db.query(models.VoteInfo) - .filter(models.VoteInfo.End <= ts) - .order_by(models.VoteInfo.Submitted.desc()) - ) - context["past_votes_count"] = past_votes.count() - past_votes = past_votes.limit(pp).offset(past_off) - context["past_votes"] = ( - reversed(past_votes.all()) if past_by == "asc" else past_votes.all() - ) - context["past_off"] = past_off - - last_vote = func.max(models.Vote.VoteID).label("LastVote") - last_votes_by_pm = ( - db.query(models.Vote) - .join(models.User) - .join(models.VoteInfo, models.VoteInfo.ID == models.Vote.VoteID) - .filter( - and_( - models.Vote.VoteID == models.VoteInfo.ID, - models.User.ID == models.Vote.UserID, - models.VoteInfo.End < ts, - or_(models.User.AccountTypeID == 2, models.User.AccountTypeID == 4), - ) - ) - .with_entities(models.Vote.UserID, last_vote, models.User.Username) - .group_by(models.Vote.UserID) - .order_by(last_vote.desc(), models.User.Username.asc()) - ) - context["last_votes_by_pm"] = last_votes_by_pm.all() - - context["current_by_next"] = "asc" if current_by == "desc" else "desc" - context["past_by_next"] = "asc" if past_by == "desc" else "desc" - - populate_package_maintainer_counts(context) - - context["q"] = { - "coff": current_off, - "cby": current_by, - "poff": past_off, - "pby": past_by, - } - - return render_template(request, "package-maintainer/index.html", context) - - -def render_proposal( - request: Request, - context: dict, - proposal: int, - voteinfo: models.VoteInfo, - voters: typing.Iterable[models.User], - vote: models.Vote, - status_code: HTTPStatus = HTTPStatus.OK, -): - """Render a single PM proposal.""" - context["proposal"] = proposal - context["voteinfo"] = voteinfo - context["voters"] = voters.all() - - total = voteinfo.total_votes() - participation = (total / voteinfo.ActiveUsers) if voteinfo.ActiveUsers else 0 - context["participation"] = participation - - accepted = (voteinfo.Yes > voteinfo.ActiveUsers / 2) or ( - participation > voteinfo.Quorum and voteinfo.Yes > voteinfo.No - ) - context["accepted"] = accepted - - can_vote = voters.filter(models.Vote.User == request.user).first() is None - context["can_vote"] = can_vote - - if not voteinfo.is_running(): - context["error"] = "Voting is closed for this proposal." - - context["vote"] = vote - context["has_voted"] = vote is not None - - return render_template( - request, "package-maintainer/show.html", context, status_code=status_code - ) - - -@router.get("/package-maintainer/{proposal}") -@requires_auth -async def package_maintainer_proposal(request: Request, proposal: int): - if not request.user.has_credential(creds.PM_LIST_VOTES): - return RedirectResponse("/package-maintainer", status_code=HTTPStatus.SEE_OTHER) - - context = await make_variable_context(request, "Package Maintainer") - proposal = int(proposal) - - voteinfo = db.query(models.VoteInfo).filter(models.VoteInfo.ID == proposal).first() - if not voteinfo: - raise HTTPException(status_code=HTTPStatus.NOT_FOUND) - - voters = ( - db.query(models.User) - .join(models.Vote) - .filter(models.Vote.VoteID == voteinfo.ID) - ) - vote = ( - db.query(models.Vote) - .filter( - and_( - models.Vote.UserID == request.user.ID, - models.Vote.VoteID == voteinfo.ID, - ) - ) - .first() - ) - if not request.user.has_credential(creds.PM_VOTE): - context["error"] = "Only Package Maintainers are allowed to vote." - if voteinfo.User == request.user.Username: - context["error"] = "You cannot vote in an proposal about you." - elif vote is not None: - context["error"] = "You've already voted for this proposal." - - context["vote"] = vote - return render_proposal(request, context, proposal, voteinfo, voters, vote) - - -@db.async_retry_deadlock -@router.post("/package-maintainer/{proposal}") -@handle_form_exceptions -@requires_auth -async def package_maintainer_proposal_post( - request: Request, proposal: int, decision: str = Form(...) -): - if not request.user.has_credential(creds.PM_LIST_VOTES): - return RedirectResponse("/package-maintainer", status_code=HTTPStatus.SEE_OTHER) - - context = await make_variable_context(request, "Package Maintainer") - proposal = int(proposal) # Make sure it's an int. - - voteinfo = db.query(models.VoteInfo).filter(models.VoteInfo.ID == proposal).first() - if not voteinfo: - raise HTTPException(status_code=HTTPStatus.NOT_FOUND) - - voters = ( - db.query(models.User) - .join(models.Vote) - .filter(models.Vote.VoteID == voteinfo.ID) - ) - vote = ( - db.query(models.Vote) - .filter( - and_( - models.Vote.UserID == request.user.ID, - models.Vote.VoteID == voteinfo.ID, - ) - ) - .first() - ) - - status_code = HTTPStatus.OK - if not request.user.has_credential(creds.PM_VOTE): - context["error"] = "Only Package Maintainers are allowed to vote." - status_code = HTTPStatus.UNAUTHORIZED - elif voteinfo.User == request.user.Username: - context["error"] = "You cannot vote in an proposal about you." - status_code = HTTPStatus.BAD_REQUEST - elif vote is not None: - context["error"] = "You've already voted for this proposal." - status_code = HTTPStatus.BAD_REQUEST - - if status_code != HTTPStatus.OK: - return render_proposal( - request, context, proposal, voteinfo, voters, vote, status_code=status_code - ) - - with db.begin(): - if decision in {"Yes", "No", "Abstain"}: - # Increment whichever decision was given to us. - setattr(voteinfo, decision, getattr(voteinfo, decision) + 1) - else: - return Response( - "Invalid 'decision' value.", status_code=HTTPStatus.BAD_REQUEST - ) - - vote = db.create(models.Vote, User=request.user, VoteInfo=voteinfo) - - context["error"] = "You've already voted for this proposal." - return render_proposal(request, context, proposal, voteinfo, voters, vote) - - -@router.get("/addvote") -@requires_auth -async def package_maintainer_addvote( - request: Request, user: str = str(), type: str = "add_pm", agenda: str = str() -): - if not request.user.has_credential(creds.PM_ADD_VOTE): - return RedirectResponse("/package-maintainer", status_code=HTTPStatus.SEE_OTHER) - - context = await make_variable_context(request, "Add Proposal") - - if type not in ADDVOTE_SPECIFICS: - context["error"] = "Invalid type." - type = "add_pm" # Default it. - - context["user"] = user - context["type"] = type - context["agenda"] = agenda - - return render_template(request, "addvote.html", context) - - -@db.async_retry_deadlock -@router.post("/addvote") -@handle_form_exceptions -@requires_auth -async def package_maintainer_addvote_post( - request: Request, - user: str = Form(default=str()), - type: str = Form(default=str()), - agenda: str = Form(default=str()), -): - if not request.user.has_credential(creds.PM_ADD_VOTE): - return RedirectResponse("/package-maintainer", status_code=HTTPStatus.SEE_OTHER) - - # Build a context. - context = await make_variable_context(request, "Add Proposal") - - context["type"] = type - context["user"] = user - context["agenda"] = agenda - - def render_addvote(context, status_code): - """Simplify render_template a bit for this test.""" - return render_template(request, "addvote.html", context, status_code) - - # Alright, get some database records, if we can. - if type != "bylaws": - user_record = db.query(models.User).filter(models.User.Username == user).first() - if user_record is None: - context["error"] = "Username does not exist." - return render_addvote(context, HTTPStatus.NOT_FOUND) - - utcnow = time.utcnow() - voteinfo = ( - db.query(models.VoteInfo) - .filter(and_(models.VoteInfo.User == user, models.VoteInfo.End > utcnow)) - .count() - ) - if voteinfo: - _ = l10n.get_translator_for_request(request) - context["error"] = _("%s already has proposal running for them.") % ( - html.escape(user), - ) - return render_addvote(context, HTTPStatus.BAD_REQUEST) - - if type not in ADDVOTE_SPECIFICS: - context["error"] = "Invalid type." - context["type"] = type = "add_pm" # Default for rendering. - return render_addvote(context, HTTPStatus.BAD_REQUEST) - - if not agenda: - context["error"] = "Proposal cannot be empty." - return render_addvote(context, HTTPStatus.BAD_REQUEST) - - # Gather some mapped constants and the current timestamp. - duration, quorum = ADDVOTE_SPECIFICS.get(type) - timestamp = time.utcnow() - - # Active PM types we filter for. - types = {PACKAGE_MAINTAINER_ID, PACKAGE_MAINTAINER_AND_DEV_ID} - - # Create a new VoteInfo (proposal)! - with db.begin(): - active_pms = ( - db.query(User) - .filter( - and_( - User.Suspended == 0, - User.InactivityTS.isnot(None), - User.AccountTypeID.in_(types), - ) - ) - .count() - ) - voteinfo = db.create( - models.VoteInfo, - User=user, - Agenda=html.escape(agenda), - Submitted=timestamp, - End=(timestamp + duration), - Quorum=quorum, - ActiveUsers=active_pms, - Submitter=request.user, - ) - - # Redirect to the new proposal. - endpoint = f"/package-maintainer/{voteinfo.ID}" - return RedirectResponse(endpoint, status_code=HTTPStatus.SEE_OTHER) diff --git a/aurweb/routers/packages.py b/aurweb/routers/packages.py index 13f30494..bc12455d 100644 --- a/aurweb/routers/packages.py +++ b/aurweb/routers/packages.py @@ -1,41 +1,39 @@ from collections import defaultdict from http import HTTPStatus -from typing import Any +from typing import Any, Dict, List -from fastapi import APIRouter, Form, Query, Request, Response +from fastapi import APIRouter, Form, Request, Response import aurweb.filters # noqa: F401 -from aurweb import aur_logging, config, db, defaults, models, util + +from aurweb import config, db, defaults, logging, models, util from aurweb.auth import creds, requires_auth -from aurweb.cache import db_count_cache, db_query_cache from aurweb.exceptions import InvariantError, handle_form_exceptions from aurweb.models.relation_type import CONFLICTS_ID, PROVIDES_ID, REPLACES_ID from aurweb.packages import util as pkgutil from aurweb.packages.search import PackageSearch from aurweb.packages.util import get_pkg_or_base -from aurweb.pkgbase import actions as pkgbase_actions, util as pkgbaseutil +from aurweb.pkgbase import actions as pkgbase_actions +from aurweb.pkgbase import util as pkgbaseutil from aurweb.templates import make_context, make_variable_context, render_template -from aurweb.util import hash_query -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) router = APIRouter() -async def packages_get( - request: Request, context: dict[str, Any], status_code: HTTPStatus = HTTPStatus.OK -): +async def packages_get(request: Request, context: Dict[str, Any], + status_code: HTTPStatus = HTTPStatus.OK): # Query parameters used in this request. context["q"] = dict(request.query_params) # Per page and offset. offset, per_page = util.sanitize_params( request.query_params.get("O", defaults.O), - request.query_params.get("PP", defaults.PP), - ) + request.query_params.get("PP", defaults.PP)) context["O"] = offset # Limit PP to options.max_search_results - max_search_results = config.getint("options", "max_search_results") + max_search_results = aurweb.config.getint("options", "max_search_results") context["PP"] = per_page = min(per_page, max_search_results) # Query search by. @@ -84,14 +82,13 @@ async def packages_get( if submit == "Orphans": # If the user clicked the "Orphans" button, we only want # orphaned packages. - search.query = search.query.filter(models.PackageBase.MaintainerUID.is_(None)) + search.query = search.query.filter( + models.PackageBase.MaintainerUID.is_(None)) # Collect search result count here; we've applied our keywords. # Including more query operations below, like ordering, will # increase the amount of time required to collect a count. - # we use redis for caching the results of the query - cache_expire = config.getint("cache", "expiry_time_search", 600) - num_packages = db_count_cache(hash_query(search.query), search.query, cache_expire) + num_packages = search.count() # Apply user-specified sort column and ordering. search.sort_by(sort_by, sort_order) @@ -106,24 +103,17 @@ async def packages_get( models.PackageBase.Popularity, models.PackageBase.NumVotes, models.PackageBase.OutOfDateTS, - models.PackageBase.ModifiedTS, models.User.Username.label("Maintainer"), models.PackageVote.PackageBaseID.label("Voted"), - models.PackageNotification.PackageBaseID.label("Notify"), - ) - - # paging - results = results.limit(per_page).offset(offset) - - # we use redis for caching the results of the query - packages = db_query_cache(hash_query(results), results, cache_expire) + models.PackageNotification.PackageBaseID.label("Notify") + ).group_by(models.Package.Name) + packages = results.limit(per_page).offset(offset) context["packages"] = packages context["packages_count"] = num_packages - return render_template( - request, "packages/index.html", context, status_code=status_code - ) + return render_template(request, "packages/index.html", context, + status_code=status_code) @router.get("/packages") @@ -133,25 +123,7 @@ async def packages(request: Request) -> Response: @router.get("/packages/{name}") -async def package( - request: Request, - name: str, - all_deps: bool = Query(default=False), - all_reqs: bool = Query(default=False), -) -> Response: - """ - Get a package by name. - - By default, we limit the number of depends and requires results - to 20. To bypass this and load all of them, which should be triggered - via a "Show more" link near the limited listing. - - :param name: Package.Name - :param all_deps: Boolean indicating whether we should load all depends - :param all_reqs: Boolean indicating whether we should load all requires - :return: FastAPI Response - """ - +async def package(request: Request, name: str) -> Response: # Get the Package. pkg = get_pkg_or_base(name, models.Package) pkgbase = pkg.PackageBase @@ -168,51 +140,25 @@ async def package( # Add our base information. context = pkgbaseutil.make_context(request, pkgbase) - context["q"] = dict(request.query_params) - - context.update({"all_deps": all_deps, "all_reqs": all_reqs}) - context["package"] = pkg # Package sources. context["sources"] = pkg.package_sources.order_by( - models.PackageSource.Source.asc() - ).all() - - # Listing metadata. - context["max_listing"] = max_listing = 20 + models.PackageSource.Source.asc()).all() # Package dependencies. - deps = pkg.package_dependencies.order_by( - models.PackageDependency.DepTypeID.asc(), models.PackageDependency.DepName.asc() - ) - context["depends_count"] = deps.count() - if not all_deps: - deps = deps.limit(max_listing) - context["dependencies"] = deps.all() - # Existing dependencies to avoid multiple lookups - context["dependencies_names_from_aur"] = [ - item.Name - for item in db.query(models.Package) - .filter( - models.Package.Name.in_( - pkg.package_dependencies.with_entities(models.PackageDependency.DepName) - ) - ) - .all() - ] + max_depends = config.getint("options", "max_depends") + context["dependencies"] = pkg.package_dependencies.order_by( + models.PackageDependency.DepTypeID.asc(), + models.PackageDependency.DepName.asc() + ).limit(max_depends).all() # Package requirements (other packages depend on this one). - reqs = pkgutil.pkg_required(pkg.Name, [p.RelName for p in rels_data.get("p", [])]) - context["reqs_count"] = reqs.count() - if not all_reqs: - reqs = reqs.limit(max_listing) - context["required_by"] = reqs.all() + context["required_by"] = pkgutil.pkg_required( + pkg.Name, [p.RelName for p in rels_data.get("p", [])], max_depends) context["licenses"] = pkg.package_licenses - context["groups"] = pkg.package_groups - conflicts = pkg.package_relations.filter( models.PackageRelation.RelTypeID == CONFLICTS_ID ).order_by(models.PackageRelation.RelName.asc()) @@ -231,42 +177,46 @@ async def package( return render_template(request, "packages/show.html", context) -async def packages_unflag(request: Request, package_ids: list[int] = [], **kwargs): +async def packages_unflag(request: Request, package_ids: List[int] = [], + **kwargs): if not package_ids: - return False, ["You did not select any packages to unflag."] + return (False, ["You did not select any packages to unflag."]) # Holds the set of package bases we're looking to unflag. # Constructed below via looping through the packages query. bases = set() package_ids = set(package_ids) # Convert this to a set for O(1). - packages = db.query(models.Package).filter(models.Package.ID.in_(package_ids)).all() + packages = db.query(models.Package).filter( + models.Package.ID.in_(package_ids)).all() for pkg in packages: has_cred = request.user.has_credential( - creds.PKGBASE_UNFLAG, approved=[pkg.PackageBase.Flagger] - ) + creds.PKGBASE_UNFLAG, approved=[pkg.PackageBase.Flagger]) if not has_cred: - return False, ["You did not select any packages to unflag."] + return (False, ["You did not select any packages to unflag."]) if pkg.PackageBase not in bases: bases.update({pkg.PackageBase}) for pkgbase in bases: pkgbase_actions.pkgbase_unflag_instance(request, pkgbase) - return True, ["The selected packages have been unflagged."] + return (True, ["The selected packages have been unflagged."]) -async def packages_notify(request: Request, package_ids: list[int] = [], **kwargs): +async def packages_notify(request: Request, package_ids: List[int] = [], + **kwargs): # In cases where we encounter errors with the request, we'll # use this error tuple as a return value. # TODO: This error does not yet have a translation. - error_tuple = (False, ["You did not select any packages to be notified about."]) + error_tuple = (False, + ["You did not select any packages to be notified about."]) if not package_ids: return error_tuple bases = set() package_ids = set(package_ids) - packages = db.query(models.Package).filter(models.Package.ID.in_(package_ids)).all() + packages = db.query(models.Package).filter( + models.Package.ID.in_(package_ids)).all() for pkg in packages: if pkg.PackageBase not in bases: @@ -274,11 +224,9 @@ async def packages_notify(request: Request, package_ids: list[int] = [], **kwarg # Perform some checks on what the user selected for notify. for pkgbase in bases: - notif = db.query( - pkgbase.notifications.filter( - models.PackageNotification.UserID == request.user.ID - ).exists() - ).scalar() + notif = db.query(pkgbase.notifications.filter( + models.PackageNotification.UserID == request.user.ID + ).exists()).scalar() has_cred = request.user.has_credential(creds.PKGBASE_NOTIFY) # If the request user either does not have credentials @@ -291,23 +239,26 @@ async def packages_notify(request: Request, package_ids: list[int] = [], **kwarg pkgbase_actions.pkgbase_notify_instance(request, pkgbase) # TODO: This message does not yet have a translation. - return True, ["The selected packages' notifications have been enabled."] + return (True, ["The selected packages' notifications have been enabled."]) -async def packages_unnotify(request: Request, package_ids: list[int] = [], **kwargs): +async def packages_unnotify(request: Request, package_ids: List[int] = [], + **kwargs): if not package_ids: # TODO: This error does not yet have a translation. - return False, ["You did not select any packages for notification removal."] + return (False, + ["You did not select any packages for notification removal."]) # TODO: This error does not yet have a translation. error_tuple = ( False, - ["A package you selected does not have notifications enabled."], + ["A package you selected does not have notifications enabled."] ) bases = set() package_ids = set(package_ids) - packages = db.query(models.Package).filter(models.Package.ID.in_(package_ids)).all() + packages = db.query(models.Package).filter( + models.Package.ID.in_(package_ids)).all() for pkg in packages: if pkg.PackageBase not in bases: @@ -315,11 +266,9 @@ async def packages_unnotify(request: Request, package_ids: list[int] = [], **kwa # Perform some checks on what the user selected for notify. for pkgbase in bases: - notif = db.query( - pkgbase.notifications.filter( - models.PackageNotification.UserID == request.user.ID - ).exists() - ).scalar() + notif = db.query(pkgbase.notifications.filter( + models.PackageNotification.UserID == request.user.ID + ).exists()).scalar() if not notif: return error_tuple @@ -327,27 +276,22 @@ async def packages_unnotify(request: Request, package_ids: list[int] = [], **kwa pkgbase_actions.pkgbase_unnotify_instance(request, pkgbase) # TODO: This message does not yet have a translation. - return True, ["The selected packages' notifications have been removed."] + return (True, ["The selected packages' notifications have been removed."]) -async def packages_adopt( - request: Request, package_ids: list[int] = [], confirm: bool = False, **kwargs -): +async def packages_adopt(request: Request, package_ids: List[int] = [], + confirm: bool = False, **kwargs): if not package_ids: - return False, ["You did not select any packages to adopt."] + return (False, ["You did not select any packages to adopt."]) if not confirm: - return ( - False, - [ - "The selected packages have not been adopted, " - "check the confirmation checkbox." - ], - ) + return (False, ["The selected packages have not been adopted, " + "check the confirmation checkbox."]) bases = set() package_ids = set(package_ids) - packages = db.query(models.Package).filter(models.Package.ID.in_(package_ids)).all() + packages = db.query(models.Package).filter( + models.Package.ID.in_(package_ids)).all() for pkg in packages: if pkg.PackageBase not in bases: @@ -358,19 +302,18 @@ async def packages_adopt( has_cred = request.user.has_credential(creds.PKGBASE_ADOPT) if not (has_cred or not pkgbase.Maintainer): # TODO: This error needs to be translated. - return ( - False, - ["You are not allowed to adopt one of the " "packages you selected."], - ) + return (False, ["You are not allowed to adopt one of the " + "packages you selected."]) # Now, really adopt the bases. for pkgbase in bases: pkgbase_actions.pkgbase_adopt_instance(request, pkgbase) - return True, ["The selected packages have been adopted."] + return (True, ["The selected packages have been adopted."]) -def disown_all(request: Request, pkgbases: list[models.PackageBase]) -> list[str]: +def disown_all(request: Request, pkgbases: List[models.PackageBase]) \ + -> List[str]: errors = [] for pkgbase in pkgbases: try: @@ -380,24 +323,19 @@ def disown_all(request: Request, pkgbases: list[models.PackageBase]) -> list[str return errors -async def packages_disown( - request: Request, package_ids: list[int] = [], confirm: bool = False, **kwargs -): +async def packages_disown(request: Request, package_ids: List[int] = [], + confirm: bool = False, **kwargs): if not package_ids: - return False, ["You did not select any packages to disown."] + return (False, ["You did not select any packages to disown."]) if not confirm: - return ( - False, - [ - "The selected packages have not been disowned, " - "check the confirmation checkbox." - ], - ) + return (False, ["The selected packages have not been disowned, " + "check the confirmation checkbox."]) bases = set() package_ids = set(package_ids) - packages = db.query(models.Package).filter(models.Package.ID.in_(package_ids)).all() + packages = db.query(models.Package).filter( + models.Package.ID.in_(package_ids)).all() for pkg in packages: if pkg.PackageBase not in bases: @@ -405,54 +343,43 @@ async def packages_disown( # Check that the user has credentials for every package they selected. for pkgbase in bases: - has_cred = request.user.has_credential( - creds.PKGBASE_DISOWN, approved=[pkgbase.Maintainer] - ) + has_cred = request.user.has_credential(creds.PKGBASE_DISOWN, + approved=[pkgbase.Maintainer]) if not has_cred: # TODO: This error needs to be translated. - return ( - False, - ["You are not allowed to disown one " "of the packages you selected."], - ) + return (False, ["You are not allowed to disown one " + "of the packages you selected."]) # Now, disown all the bases if we can. if errors := disown_all(request, bases): - return False, errors + return (False, errors) - return True, ["The selected packages have been disowned."] + return (True, ["The selected packages have been disowned."]) -async def packages_delete( - request: Request, - package_ids: list[int] = [], - confirm: bool = False, - merge_into: str = str(), - **kwargs, -): +async def packages_delete(request: Request, package_ids: List[int] = [], + confirm: bool = False, merge_into: str = str(), + **kwargs): if not package_ids: - return False, ["You did not select any packages to delete."] + return (False, ["You did not select any packages to delete."]) if not confirm: - return ( - False, - [ - "The selected packages have not been deleted, " - "check the confirmation checkbox." - ], - ) + return (False, ["The selected packages have not been deleted, " + "check the confirmation checkbox."]) if not request.user.has_credential(creds.PKGBASE_DELETE): - return False, ["You do not have permission to delete packages."] + return (False, ["You do not have permission to delete packages."]) # set-ify package_ids and query the database for related records. package_ids = set(package_ids) - packages = db.query(models.Package).filter(models.Package.ID.in_(package_ids)).all() + packages = db.query(models.Package).filter( + models.Package.ID.in_(package_ids)).all() if len(packages) != len(package_ids): # Let the user know there was an issue with their input: they have # provided at least one package_id which does not exist in the DB. # TODO: This error has not yet been translated. - return False, ["One of the packages you selected does not exist."] + return (False, ["One of the packages you selected does not exist."]) # Make a set out of all package bases related to `packages`. bases = {pkg.PackageBase for pkg in packages} @@ -462,18 +389,15 @@ async def packages_delete( notifs += pkgbase_actions.pkgbase_delete_instance(request, pkgbase) # Log out the fact that this happened for accountability. - logger.info( - f"Privileged user '{request.user.Username}' deleted the " - f"following package bases: {str(deleted_bases)}." - ) + logger.info(f"Privileged user '{request.user.Username}' deleted the " + f"following package bases: {str(deleted_bases)}.") util.apply_all(notifs, lambda n: n.send()) - return True, ["The selected packages have been deleted."] - + return (True, ["The selected packages have been deleted."]) # A mapping of action string -> callback functions used within the # `packages_post` route below. We expect any action callback to -# return a tuple in the format: (succeeded: bool, message: list[str]). +# return a tuple in the format: (succeeded: bool, message: List[str]). PACKAGE_ACTIONS = { "unflag": packages_unflag, "notify": packages_notify, @@ -487,12 +411,11 @@ PACKAGE_ACTIONS = { @router.post("/packages") @handle_form_exceptions @requires_auth -async def packages_post( - request: Request, - IDs: list[int] = Form(default=[]), - action: str = Form(default=str()), - confirm: bool = Form(default=False), -): +async def packages_post(request: Request, + IDs: List[int] = Form(default=[]), + action: str = Form(default=str()), + confirm: bool = Form(default=False)): + # If an invalid action is specified, just render GET /packages # with an BAD_REQUEST status_code. if action not in PACKAGE_ACTIONS: diff --git a/aurweb/routers/pkgbase.py b/aurweb/routers/pkgbase.py index 213348cd..2cef5436 100644 --- a/aurweb/routers/pkgbase.py +++ b/aurweb/routers/pkgbase.py @@ -4,7 +4,7 @@ from fastapi import APIRouter, Form, HTTPException, Query, Request, Response from fastapi.responses import JSONResponse, RedirectResponse from sqlalchemy import and_ -from aurweb import aur_logging, config, db, l10n, templates, time, util +from aurweb import config, db, l10n, logging, templates, time, util from aurweb.auth import creds, requires_auth from aurweb.exceptions import InvariantError, ValidationError, handle_form_exceptions from aurweb.models import PackageBase @@ -16,12 +16,14 @@ from aurweb.models.package_vote import PackageVote from aurweb.models.request_type import DELETION_ID, MERGE_ID, ORPHAN_ID from aurweb.packages.requests import update_closure_comment from aurweb.packages.util import get_pkg_or_base, get_pkgbase_comment -from aurweb.pkgbase import actions, util as pkgbaseutil, validate +from aurweb.pkgbase import actions +from aurweb.pkgbase import util as pkgbaseutil +from aurweb.pkgbase import validate from aurweb.scripts import notify, popupdate from aurweb.scripts.rendercomment import update_comment_render_fastapi from aurweb.templates import make_variable_context, render_template -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) router = APIRouter() @@ -42,9 +44,8 @@ async def pkgbase(request: Request, name: str) -> Response: packages = pkgbase.packages.all() pkg = packages[0] if len(packages) == 1 and pkg.Name == pkgbase.Name: - return RedirectResponse( - f"/packages/{pkg.Name}", status_code=int(HTTPStatus.SEE_OTHER) - ) + return RedirectResponse(f"/packages/{pkg.Name}", + status_code=int(HTTPStatus.SEE_OTHER)) # Add our base information. context = pkgbaseutil.make_context(request, pkgbase) @@ -68,7 +69,8 @@ async def pkgbase_voters(request: Request, name: str) -> Response: pkgbase = get_pkg_or_base(name, PackageBase) if not request.user.has_credential(creds.PKGBASE_LIST_VOTERS): - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) context = templates.make_context(request, "Voters") context["pkgbase"] = pkgbase @@ -80,42 +82,35 @@ async def pkgbase_flag_comment(request: Request, name: str): pkgbase = get_pkg_or_base(name, PackageBase) if pkgbase.OutOfDateTS is None: - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) context = templates.make_context(request, "Flag Comment") context["pkgbase"] = pkgbase return render_template(request, "pkgbase/flag-comment.html", context) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/keywords") @handle_form_exceptions -async def pkgbase_keywords( - request: Request, name: str, keywords: str = Form(default=str()) -): +async def pkgbase_keywords(request: Request, name: str, + keywords: str = Form(default=str())): pkgbase = get_pkg_or_base(name, PackageBase) - approved = [pkgbase.Maintainer] + [c.User for c in pkgbase.comaintainers] - has_cred = creds.has_credential( - request.user, creds.PKGBASE_SET_KEYWORDS, approved=approved - ) - if not has_cred: - return Response(status_code=HTTPStatus.UNAUTHORIZED) - # Lowercase all keywords. Our database table is case insensitive, # and providing CI duplicates of keywords is erroneous. - keywords = set(k.lower() for k in keywords.split()) + keywords = set(k.lower() for k in keywords.split(" ")) # Delete all keywords which are not supplied by the user. with db.begin(): - other_keywords = pkgbase.keywords.filter(~PackageKeyword.Keyword.in_(keywords)) - other_keyword_strings = set(kwd.Keyword.lower() for kwd in other_keywords) + other_keywords = pkgbase.keywords.filter( + ~PackageKeyword.Keyword.in_(keywords)) + other_keyword_strings = set( + kwd.Keyword.lower() for kwd in other_keywords) existing_keywords = set( - kwd.Keyword.lower() - for kwd in pkgbase.keywords.filter( - ~PackageKeyword.Keyword.in_(other_keyword_strings) - ) + kwd.Keyword.lower() for kwd in + pkgbase.keywords.filter( + ~PackageKeyword.Keyword.in_(other_keyword_strings)) ) db.delete_all(other_keywords) @@ -123,7 +118,8 @@ async def pkgbase_keywords( for keyword in new_keywords: db.create(PackageKeyword, PackageBase=pkgbase, Keyword=keyword) - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) @router.get("/pkgbase/{name}/flag") @@ -133,33 +129,28 @@ async def pkgbase_flag_get(request: Request, name: str): has_cred = request.user.has_credential(creds.PKGBASE_FLAG) if not has_cred or pkgbase.OutOfDateTS is not None: - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) context = templates.make_context(request, "Flag Package Out-Of-Date") context["pkgbase"] = pkgbase return render_template(request, "pkgbase/flag.html", context) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/flag") @handle_form_exceptions @requires_auth -async def pkgbase_flag_post( - request: Request, name: str, comments: str = Form(default=str()) -): +async def pkgbase_flag_post(request: Request, name: str, + comments: str = Form(default=str())): pkgbase = get_pkg_or_base(name, PackageBase) if not comments: context = templates.make_context(request, "Flag Package Out-Of-Date") context["pkgbase"] = pkgbase - context["errors"] = [ - "The selected packages have not been flagged, " "please enter a comment." - ] - return render_template( - request, "pkgbase/flag.html", context, status_code=HTTPStatus.BAD_REQUEST - ) - - validate.comment_raise_http_ex(comments) + context["errors"] = ["The selected packages have not been flagged, " + "please enter a comment."] + return render_template(request, "pkgbase/flag.html", context, + status_code=HTTPStatus.BAD_REQUEST) has_cred = request.user.has_credential(creds.PKGBASE_FLAG) if has_cred and not pkgbase.OutOfDateTS: @@ -171,56 +162,50 @@ async def pkgbase_flag_post( notify.FlagNotification(request.user.ID, pkgbase.ID).send() - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/comments") @handle_form_exceptions @requires_auth async def pkgbase_comments_post( - request: Request, - name: str, - comment: str = Form(default=str()), - enable_notifications: bool = Form(default=False), -): - """Add a new comment via POST request.""" + request: Request, name: str, + comment: str = Form(default=str()), + enable_notifications: bool = Form(default=False)): + """ Add a new comment via POST request. """ pkgbase = get_pkg_or_base(name, PackageBase) - validate.comment_raise_http_ex(comment) + if not comment: + raise HTTPException(status_code=HTTPStatus.BAD_REQUEST) # If the provided comment is different than the record's version, # update the db record. now = time.utcnow() with db.begin(): - comment = db.create( - PackageComment, - User=request.user, - PackageBase=pkgbase, - Comments=comment, - RenderedComment=str(), - CommentTS=now, - ) + comment = db.create(PackageComment, User=request.user, + PackageBase=pkgbase, + Comments=comment, RenderedComment=str(), + CommentTS=now) if enable_notifications and not request.user.notified(pkgbase): - db.create(PackageNotification, User=request.user, PackageBase=pkgbase) + db.create(PackageNotification, + User=request.user, + PackageBase=pkgbase) update_comment_render_fastapi(comment) notif = notify.CommentNotification(request.user.ID, pkgbase.ID, comment.ID) notif.send() # Redirect to the pkgbase page. - return RedirectResponse( - f"/pkgbase/{pkgbase.Name}#comment-{comment.ID}", - status_code=HTTPStatus.SEE_OTHER, - ) + return RedirectResponse(f"/pkgbase/{pkgbase.Name}#comment-{comment.ID}", + status_code=HTTPStatus.SEE_OTHER) @router.get("/pkgbase/{name}/comments/{id}/form") @requires_auth -async def pkgbase_comment_form( - request: Request, name: str, id: int, next: str = Query(default=None) -): +async def pkgbase_comment_form(request: Request, name: str, id: int, + next: str = Query(default=None)): """ Produce a comment form for comment {id}. @@ -253,16 +238,14 @@ async def pkgbase_comment_form( context["next"] = next form = templates.render_raw_template( - request, "partials/packages/comment_form.html", context - ) + request, "partials/packages/comment_form.html", context) return JSONResponse({"form": form}) @router.get("/pkgbase/{name}/comments/{id}/edit") @requires_auth -async def pkgbase_comment_edit( - request: Request, name: str, id: int, next: str = Form(default=None) -): +async def pkgbase_comment_edit(request: Request, name: str, id: int, + next: str = Form(default=None)): """ Render the non-javascript edit form. @@ -283,32 +266,20 @@ async def pkgbase_comment_edit( return render_template(request, "pkgbase/comments/edit.html", context) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/comments/{id}") @handle_form_exceptions @requires_auth async def pkgbase_comment_post( - request: Request, - name: str, - id: int, - comment: str = Form(default=str()), - enable_notifications: bool = Form(default=False), - next: str = Form(default=None), - cancel: bool = Form(default=False), -): - """Edit an existing comment.""" - if cancel: - return RedirectResponse( - f"/pkgbase/{name}#comment-{id}", status_code=HTTPStatus.SEE_OTHER - ) - + request: Request, name: str, id: int, + comment: str = Form(default=str()), + enable_notifications: bool = Form(default=False), + next: str = Form(default=None)): + """ Edit an existing comment. """ pkgbase = get_pkg_or_base(name, PackageBase) db_comment = get_pkgbase_comment(pkgbase, id) - validate.comment_raise_http_ex(comment) - - if request.user.ID != db_comment.UsersID: - raise HTTPException(status_code=HTTPStatus.UNAUTHORIZED) + if not comment: + raise HTTPException(status_code=HTTPStatus.BAD_REQUEST) # If the provided comment is different than the record's version, # update the db record. @@ -319,32 +290,28 @@ async def pkgbase_comment_post( db_comment.Editor = request.user db_comment.EditedTS = now - if enable_notifications: - with db.begin(): db_notif = request.user.notifications.filter( PackageNotification.PackageBaseID == pkgbase.ID ).first() - if not db_notif: - db.create(PackageNotification, User=request.user, PackageBase=pkgbase) - + if enable_notifications and not db_notif: + db.create(PackageNotification, + User=request.user, + PackageBase=pkgbase) update_comment_render_fastapi(db_comment) if not next: next = f"/pkgbase/{pkgbase.Name}" # Redirect to the pkgbase page anchored to the updated comment. - return RedirectResponse( - f"{next}#comment-{db_comment.ID}", status_code=HTTPStatus.SEE_OTHER - ) + return RedirectResponse(f"{next}#comment-{db_comment.ID}", + status_code=HTTPStatus.SEE_OTHER) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/comments/{id}/pin") @handle_form_exceptions @requires_auth -async def pkgbase_comment_pin( - request: Request, name: str, id: int, next: str = Form(default=None) -): +async def pkgbase_comment_pin(request: Request, name: str, id: int, + next: str = Form(default=None)): """ Pin a comment. @@ -357,15 +324,13 @@ async def pkgbase_comment_pin( pkgbase = get_pkg_or_base(name, PackageBase) comment = get_pkgbase_comment(pkgbase, id) - has_cred = request.user.has_credential( - creds.COMMENT_PIN, approved=comment.maintainers() - ) + has_cred = request.user.has_credential(creds.COMMENT_PIN, + approved=comment.maintainers()) if not has_cred: _ = l10n.get_translator_for_request(request) raise HTTPException( status_code=HTTPStatus.UNAUTHORIZED, - detail=_("You are not allowed to pin this comment."), - ) + detail=_("You are not allowed to pin this comment.")) now = time.utcnow() with db.begin(): @@ -377,13 +342,11 @@ async def pkgbase_comment_pin( return RedirectResponse(next, status_code=HTTPStatus.SEE_OTHER) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/comments/{id}/unpin") @handle_form_exceptions @requires_auth -async def pkgbase_comment_unpin( - request: Request, name: str, id: int, next: str = Form(default=None) -): +async def pkgbase_comment_unpin(request: Request, name: str, id: int, + next: str = Form(default=None)): """ Unpin a comment. @@ -396,15 +359,13 @@ async def pkgbase_comment_unpin( pkgbase = get_pkg_or_base(name, PackageBase) comment = get_pkgbase_comment(pkgbase, id) - has_cred = request.user.has_credential( - creds.COMMENT_PIN, approved=comment.maintainers() - ) + has_cred = request.user.has_credential(creds.COMMENT_PIN, + approved=comment.maintainers()) if not has_cred: _ = l10n.get_translator_for_request(request) raise HTTPException( status_code=HTTPStatus.UNAUTHORIZED, - detail=_("You are not allowed to unpin this comment."), - ) + detail=_("You are not allowed to unpin this comment.")) with db.begin(): comment.PinnedTS = 0 @@ -415,13 +376,11 @@ async def pkgbase_comment_unpin( return RedirectResponse(next, status_code=HTTPStatus.SEE_OTHER) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/comments/{id}/delete") @handle_form_exceptions @requires_auth -async def pkgbase_comment_delete( - request: Request, name: str, id: int, next: str = Form(default=None) -): +async def pkgbase_comment_delete(request: Request, name: str, id: int, + next: str = Form(default=None)): """ Delete a comment. @@ -438,13 +397,13 @@ async def pkgbase_comment_delete( pkgbase = get_pkg_or_base(name, PackageBase) comment = get_pkgbase_comment(pkgbase, id) - authorized = request.user.has_credential(creds.COMMENT_DELETE, [comment.User]) + authorized = request.user.has_credential(creds.COMMENT_DELETE, + [comment.User]) if not authorized: _ = l10n.get_translator_for_request(request) raise HTTPException( status_code=HTTPStatus.UNAUTHORIZED, - detail=_("You are not allowed to delete this comment."), - ) + detail=_("You are not allowed to delete this comment.")) now = time.utcnow() with db.begin(): @@ -457,13 +416,11 @@ async def pkgbase_comment_delete( return RedirectResponse(next, status_code=HTTPStatus.SEE_OTHER) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/comments/{id}/undelete") @handle_form_exceptions @requires_auth -async def pkgbase_comment_undelete( - request: Request, name: str, id: int, next: str = Form(default=None) -): +async def pkgbase_comment_undelete(request: Request, name: str, id: int, + next: str = Form(default=None)): """ Undelete a comment. @@ -480,15 +437,13 @@ async def pkgbase_comment_undelete( pkgbase = get_pkg_or_base(name, PackageBase) comment = get_pkgbase_comment(pkgbase, id) - has_cred = request.user.has_credential( - creds.COMMENT_UNDELETE, approved=[comment.User] - ) + has_cred = request.user.has_credential(creds.COMMENT_UNDELETE, + approved=[comment.User]) if not has_cred: _ = l10n.get_translator_for_request(request) raise HTTPException( status_code=HTTPStatus.UNAUTHORIZED, - detail=_("You are not allowed to undelete this comment."), - ) + detail=_("You are not allowed to undelete this comment.")) with db.begin(): comment.Deleter = None @@ -500,34 +455,40 @@ async def pkgbase_comment_undelete( return RedirectResponse(next, status_code=HTTPStatus.SEE_OTHER) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/vote") @handle_form_exceptions @requires_auth async def pkgbase_vote(request: Request, name: str): pkgbase = get_pkg_or_base(name, PackageBase) - vote = pkgbase.package_votes.filter(PackageVote.UsersID == request.user.ID).first() + vote = pkgbase.package_votes.filter( + PackageVote.UsersID == request.user.ID + ).first() has_cred = request.user.has_credential(creds.PKGBASE_VOTE) if has_cred and not vote: now = time.utcnow() with db.begin(): - db.create(PackageVote, User=request.user, PackageBase=pkgbase, VoteTS=now) + db.create(PackageVote, + User=request.user, + PackageBase=pkgbase, + VoteTS=now) # Update NumVotes/Popularity. popupdate.run_single(pkgbase) - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/unvote") @handle_form_exceptions @requires_auth async def pkgbase_unvote(request: Request, name: str): pkgbase = get_pkg_or_base(name, PackageBase) - vote = pkgbase.package_votes.filter(PackageVote.UsersID == request.user.ID).first() + vote = pkgbase.package_votes.filter( + PackageVote.UsersID == request.user.ID + ).first() has_cred = request.user.has_credential(creds.PKGBASE_VOTE) if has_cred and vote: with db.begin(): @@ -536,115 +497,97 @@ async def pkgbase_unvote(request: Request, name: str): # Update NumVotes/Popularity. popupdate.run_single(pkgbase) - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/notify") @handle_form_exceptions @requires_auth async def pkgbase_notify(request: Request, name: str): pkgbase = get_pkg_or_base(name, PackageBase) actions.pkgbase_notify_instance(request, pkgbase) - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/unnotify") @handle_form_exceptions @requires_auth async def pkgbase_unnotify(request: Request, name: str): pkgbase = get_pkg_or_base(name, PackageBase) actions.pkgbase_unnotify_instance(request, pkgbase) - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/unflag") @handle_form_exceptions @requires_auth async def pkgbase_unflag(request: Request, name: str): pkgbase = get_pkg_or_base(name, PackageBase) actions.pkgbase_unflag_instance(request, pkgbase) - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) @router.get("/pkgbase/{name}/disown") @requires_auth -async def pkgbase_disown_get( - request: Request, name: str, next: str = Query(default=str()) -): +async def pkgbase_disown_get(request: Request, name: str, + next: str = Query(default=str())): pkgbase = get_pkg_or_base(name, PackageBase) - comaints = {c.User for c in pkgbase.comaintainers} - approved = [pkgbase.Maintainer] + list(comaints) - has_cred = request.user.has_credential(creds.PKGBASE_DISOWN, approved=approved) + has_cred = request.user.has_credential(creds.PKGBASE_DISOWN, + approved=[pkgbase.Maintainer]) if not has_cred: - return RedirectResponse(f"/pkgbase/{name}", HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + HTTPStatus.SEE_OTHER) context = templates.make_context(request, "Disown Package") context["pkgbase"] = pkgbase context["next"] = next or "/pkgbase/{name}" - context["is_maint"] = request.user == pkgbase.Maintainer - context["is_comaint"] = request.user in comaints return render_template(request, "pkgbase/disown.html", context) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/disown") @handle_form_exceptions @requires_auth -async def pkgbase_disown_post( - request: Request, - name: str, - comments: str = Form(default=str()), - confirm: bool = Form(default=False), - next: str = Form(default=str()), -): +async def pkgbase_disown_post(request: Request, name: str, + comments: str = Form(default=str()), + confirm: bool = Form(default=False), + next: str = Form(default=str())): pkgbase = get_pkg_or_base(name, PackageBase) - if comments: - validate.comment_raise_http_ex(comments) - - comaints = {c.User for c in pkgbase.comaintainers} - approved = [pkgbase.Maintainer] + list(comaints) - has_cred = request.user.has_credential(creds.PKGBASE_DISOWN, approved=approved) + has_cred = request.user.has_credential(creds.PKGBASE_DISOWN, + approved=[pkgbase.Maintainer]) if not has_cred: - return RedirectResponse(f"/pkgbase/{name}", HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + HTTPStatus.SEE_OTHER) context = templates.make_context(request, "Disown Package") context["pkgbase"] = pkgbase - context["is_maint"] = request.user == pkgbase.Maintainer - context["is_comaint"] = request.user in comaints - if not confirm: - context["errors"] = [ - ( - "The selected packages have not been disowned, " - "check the confirmation checkbox." - ) - ] - return render_template( - request, "pkgbase/disown.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + context["errors"] = [("The selected packages have not been disowned, " + "check the confirmation checkbox.")] + return render_template(request, "pkgbase/disown.html", context, + status_code=HTTPStatus.BAD_REQUEST) - if request.user != pkgbase.Maintainer and request.user not in comaints: - with db.begin(): - update_closure_comment(pkgbase, ORPHAN_ID, comments) + with db.begin(): + update_closure_comment(pkgbase, ORPHAN_ID, comments) try: actions.pkgbase_disown_instance(request, pkgbase) except InvariantError as exc: context["errors"] = [str(exc)] - return render_template( - request, "pkgbase/disown.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + return render_template(request, "pkgbase/disown.html", context, + status_code=HTTPStatus.BAD_REQUEST) + + if not next: + next = f"/pkgbase/{name}" - next = next or f"/pkgbase/{name}" return RedirectResponse(next, status_code=HTTPStatus.SEE_OTHER) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/adopt") @handle_form_exceptions @requires_auth @@ -658,7 +601,8 @@ async def pkgbase_adopt_post(request: Request, name: str): # if no maintainer currently exists. actions.pkgbase_adopt_instance(request, pkgbase) - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) @router.get("/pkgbase/{name}/comaintainers") @@ -669,74 +613,71 @@ async def pkgbase_comaintainers(request: Request, name: str) -> Response: # Unauthorized users (Non-TU/Dev and not the pkgbase maintainer) # get redirected to the package base's page. - has_creds = request.user.has_credential( - creds.PKGBASE_EDIT_COMAINTAINERS, approved=[pkgbase.Maintainer] - ) + has_creds = request.user.has_credential(creds.PKGBASE_EDIT_COMAINTAINERS, + approved=[pkgbase.Maintainer]) if not has_creds: - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) # Add our base information. context = templates.make_context(request, "Manage Co-maintainers") - context.update( - { - "pkgbase": pkgbase, - "comaintainers": [c.User.Username for c in pkgbase.comaintainers], - } - ) + context.update({ + "pkgbase": pkgbase, + "comaintainers": [ + c.User.Username for c in pkgbase.comaintainers + ] + }) return render_template(request, "pkgbase/comaintainers.html", context) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/comaintainers") @handle_form_exceptions @requires_auth -async def pkgbase_comaintainers_post( - request: Request, name: str, users: str = Form(default=str()) -) -> Response: +async def pkgbase_comaintainers_post(request: Request, name: str, + users: str = Form(default=str())) \ + -> Response: # Get the PackageBase. pkgbase = get_pkg_or_base(name, PackageBase) # Unauthorized users (Non-TU/Dev and not the pkgbase maintainer) # get redirected to the package base's page. - has_creds = request.user.has_credential( - creds.PKGBASE_EDIT_COMAINTAINERS, approved=[pkgbase.Maintainer] - ) + has_creds = request.user.has_credential(creds.PKGBASE_EDIT_COMAINTAINERS, + approved=[pkgbase.Maintainer]) if not has_creds: - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) users = {e.strip() for e in users.split("\n") if bool(e.strip())} records = {c.User.Username for c in pkgbase.comaintainers} users_to_rm = records.difference(users) pkgbaseutil.remove_comaintainers(pkgbase, users_to_rm) - logger.debug( - f"{request.user} removed comaintainers from " f"{pkgbase.Name}: {users_to_rm}" - ) + logger.debug(f"{request.user} removed comaintainers from " + f"{pkgbase.Name}: {users_to_rm}") users_to_add = users.difference(records) error = pkgbaseutil.add_comaintainers(request, pkgbase, users_to_add) if error: context = templates.make_context(request, "Manage Co-maintainers") context["pkgbase"] = pkgbase - context["comaintainers"] = [c.User.Username for c in pkgbase.comaintainers] + context["comaintainers"] = [ + c.User.Username for c in pkgbase.comaintainers + ] context["errors"] = [error] return render_template(request, "pkgbase/comaintainers.html", context) - logger.debug( - f"{request.user} added comaintainers to " f"{pkgbase.Name}: {users_to_add}" - ) + logger.debug(f"{request.user} added comaintainers to " + f"{pkgbase.Name}: {users_to_add}") - return RedirectResponse( - f"/pkgbase/{pkgbase.Name}", status_code=HTTPStatus.SEE_OTHER - ) + return RedirectResponse(f"/pkgbase/{pkgbase.Name}", + status_code=HTTPStatus.SEE_OTHER) @router.get("/pkgbase/{name}/request") @requires_auth -async def pkgbase_request( - request: Request, name: str, next: str = Query(default=str()) -): +async def pkgbase_request(request: Request, name: str, + next: str = Query(default=str())): pkgbase = get_pkg_or_base(name, PackageBase) context = await make_variable_context(request, "Submit Request") context["pkgbase"] = pkgbase @@ -744,32 +685,31 @@ async def pkgbase_request( return render_template(request, "pkgbase/request.html", context) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/request") @handle_form_exceptions @requires_auth -async def pkgbase_request_post( - request: Request, - name: str, - type: str = Form(...), - merge_into: str = Form(default=None), - comments: str = Form(default=str()), - next: str = Form(default=str()), -): +async def pkgbase_request_post(request: Request, name: str, + type: str = Form(...), + merge_into: str = Form(default=None), + comments: str = Form(default=str()), + next: str = Form(default=str())): pkgbase = get_pkg_or_base(name, PackageBase) # Create our render context. context = await make_variable_context(request, "Submit Request") context["pkgbase"] = pkgbase - types = {"deletion": DELETION_ID, "merge": MERGE_ID, "orphan": ORPHAN_ID} + types = { + "deletion": DELETION_ID, + "merge": MERGE_ID, + "orphan": ORPHAN_ID + } if type not in types: # In the case that someone crafted a POST request with an invalid # type, just return them to the request form with BAD_REQUEST status. - return render_template( - request, "pkgbase/request.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + return render_template(request, "pkgbase/request.html", context, + status_code=HTTPStatus.BAD_REQUEST) try: validate.request(pkgbase, type, comments, merge_into, context) @@ -781,26 +721,20 @@ async def pkgbase_request_post( # All good. Create a new PackageRequest based on the given type. now = time.utcnow() with db.begin(): - pkgreq = db.create( - PackageRequest, - ReqTypeID=types.get(type), - User=request.user, - RequestTS=now, - PackageBase=pkgbase, - PackageBaseName=pkgbase.Name, - MergeBaseName=merge_into, - Comments=comments, - ClosureComment=str(), - ) + pkgreq = db.create(PackageRequest, + ReqTypeID=types.get(type), + User=request.user, + RequestTS=now, + PackageBase=pkgbase, + PackageBaseName=pkgbase.Name, + MergeBaseName=merge_into, + Comments=comments, + ClosureComment=str()) # Prepare notification object. notif = notify.RequestOpenNotification( - request.user.ID, - pkgreq.ID, - type, - pkgreq.PackageBase.ID, - merge_into=merge_into or None, - ) + request.user.ID, pkgreq.ID, type, + pkgreq.PackageBase.ID, merge_into=merge_into or None) # Send the notification now that we're out of the DB scope. notif.send() @@ -819,13 +753,13 @@ async def pkgbase_request_post( pkgbase.Maintainer = None pkgreq.Status = ACCEPTED_ID notif = notify.RequestCloseNotification( - request.user.ID, pkgreq.ID, pkgreq.status_display() - ) + request.user.ID, pkgreq.ID, pkgreq.status_display()) notif.send() logger.debug(f"New request #{pkgreq.ID} is marked for auto-orphan.") elif type == "deletion" and is_maintainer and outdated: # This request should be auto-accepted. - notifs = actions.pkgbase_delete_instance(request, pkgbase, comments=comments) + notifs = actions.pkgbase_delete_instance( + request, pkgbase, comments=comments) util.apply_all(notifs, lambda n: n.send()) logger.debug(f"New request #{pkgreq.ID} is marked for auto-deletion.") @@ -835,11 +769,11 @@ async def pkgbase_request_post( @router.get("/pkgbase/{name}/delete") @requires_auth -async def pkgbase_delete_get( - request: Request, name: str, next: str = Query(default=str()) -): +async def pkgbase_delete_get(request: Request, name: str, + next: str = Query(default=str())): if not request.user.has_credential(creds.PKGBASE_DELETE): - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) context = templates.make_context(request, "Package Deletion") context["pkgbase"] = get_pkg_or_base(name, PackageBase) @@ -847,65 +781,56 @@ async def pkgbase_delete_get( return render_template(request, "pkgbase/delete.html", context) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/delete") @handle_form_exceptions @requires_auth -async def pkgbase_delete_post( - request: Request, - name: str, - confirm: bool = Form(default=False), - comments: str = Form(default=str()), - next: str = Form(default="/packages"), -): +async def pkgbase_delete_post(request: Request, name: str, + confirm: bool = Form(default=False), + comments: str = Form(default=str()), + next: str = Form(default="/packages")): pkgbase = get_pkg_or_base(name, PackageBase) if not request.user.has_credential(creds.PKGBASE_DELETE): - return RedirectResponse(f"/pkgbase/{name}", status_code=HTTPStatus.SEE_OTHER) + return RedirectResponse(f"/pkgbase/{name}", + status_code=HTTPStatus.SEE_OTHER) if not confirm: context = templates.make_context(request, "Package Deletion") context["pkgbase"] = pkgbase - context["errors"] = [ - ( - "The selected packages have not been deleted, " - "check the confirmation checkbox." - ) - ] - return render_template( - request, "pkgbase/delete.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + context["errors"] = [("The selected packages have not been deleted, " + "check the confirmation checkbox.")] + return render_template(request, "pkgbase/delete.html", context, + status_code=HTTPStatus.BAD_REQUEST) if comments: - validate.comment_raise_http_ex(comments) # Update any existing deletion requests' ClosureComment. with db.begin(): requests = pkgbase.requests.filter( - and_( - PackageRequest.Status == PENDING_ID, - PackageRequest.ReqTypeID == DELETION_ID, - ) + and_(PackageRequest.Status == PENDING_ID, + PackageRequest.ReqTypeID == DELETION_ID) ) for pkgreq in requests: pkgreq.ClosureComment = comments - notifs = actions.pkgbase_delete_instance(request, pkgbase, comments=comments) + notifs = actions.pkgbase_delete_instance( + request, pkgbase, comments=comments) util.apply_all(notifs, lambda n: n.send()) return RedirectResponse(next, status_code=HTTPStatus.SEE_OTHER) @router.get("/pkgbase/{name}/merge") @requires_auth -async def pkgbase_merge_get( - request: Request, - name: str, - into: str = Query(default=str()), - next: str = Query(default=str()), -): +async def pkgbase_merge_get(request: Request, name: str, + into: str = Query(default=str()), + next: str = Query(default=str())): pkgbase = get_pkg_or_base(name, PackageBase) context = templates.make_context(request, "Package Merging") - context.update({"pkgbase": pkgbase, "into": into, "next": next}) + context.update({ + "pkgbase": pkgbase, + "into": into, + "next": next + }) status_code = HTTPStatus.OK # TODO: Lookup errors from credential instead of hardcoding them. @@ -914,27 +839,22 @@ async def pkgbase_merge_get( # Don't take these examples verbatim. We should find good naming. if not request.user.has_credential(creds.PKGBASE_MERGE): context["errors"] = [ - "Only Package Maintainers and Developers can merge packages." - ] + "Only Trusted Users and Developers can merge packages."] status_code = HTTPStatus.UNAUTHORIZED - return render_template( - request, "pkgbase/merge.html", context, status_code=status_code - ) + return render_template(request, "pkgbase/merge.html", context, + status_code=status_code) -@db.async_retry_deadlock @router.post("/pkgbase/{name}/merge") @handle_form_exceptions @requires_auth -async def pkgbase_merge_post( - request: Request, - name: str, - into: str = Form(default=str()), - comments: str = Form(default=str()), - confirm: bool = Form(default=False), - next: str = Form(default=str()), -): +async def pkgbase_merge_post(request: Request, name: str, + into: str = Form(default=str()), + comments: str = Form(default=str()), + confirm: bool = Form(default=False), + next: str = Form(default=str())): + pkgbase = get_pkg_or_base(name, PackageBase) context = await make_variable_context(request, "Package Merging") context["pkgbase"] = pkgbase @@ -942,37 +862,28 @@ async def pkgbase_merge_post( # TODO: Lookup errors from credential instead of hardcoding them. if not request.user.has_credential(creds.PKGBASE_MERGE): context["errors"] = [ - "Only Package Maintainers and Developers can merge packages." - ] - return render_template( - request, "pkgbase/merge.html", context, status_code=HTTPStatus.UNAUTHORIZED - ) + "Only Trusted Users and Developers can merge packages."] + return render_template(request, "pkgbase/merge.html", context, + status_code=HTTPStatus.UNAUTHORIZED) if not confirm: - context["errors"] = [ - "The selected packages have not been deleted, " - "check the confirmation checkbox." - ] - return render_template( - request, "pkgbase/merge.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + context["errors"] = ["The selected packages have not been deleted, " + "check the confirmation checkbox."] + return render_template(request, "pkgbase/merge.html", context, + status_code=HTTPStatus.BAD_REQUEST) try: target = get_pkg_or_base(into, PackageBase) except HTTPException: - context["errors"] = ["Cannot find package to merge votes and comments into."] - return render_template( - request, "pkgbase/merge.html", context, status_code=HTTPStatus.BAD_REQUEST - ) + context["errors"] = [ + "Cannot find package to merge votes and comments into."] + return render_template(request, "pkgbase/merge.html", context, + status_code=HTTPStatus.BAD_REQUEST) if pkgbase == target: context["errors"] = ["Cannot merge a package base with itself."] - return render_template( - request, "pkgbase/merge.html", context, status_code=HTTPStatus.BAD_REQUEST - ) - - if comments: - validate.comment_raise_http_ex(comments) + return render_template(request, "pkgbase/merge.html", context, + status_code=HTTPStatus.BAD_REQUEST) with db.begin(): update_closure_comment(pkgbase, MERGE_ID, comments, target=target) diff --git a/aurweb/routers/requests.py b/aurweb/routers/requests.py index a67419fe..086aa3bc 100644 --- a/aurweb/routers/requests.py +++ b/aurweb/routers/requests.py @@ -2,127 +2,57 @@ from http import HTTPStatus from fastapi import APIRouter, Form, Query, Request from fastapi.responses import RedirectResponse -from sqlalchemy import case, orm +from sqlalchemy import case from aurweb import db, defaults, time, util from aurweb.auth import creds, requires_auth from aurweb.exceptions import handle_form_exceptions -from aurweb.models import PackageBase, PackageRequest, User -from aurweb.models.package_request import ( - ACCEPTED_ID, - CLOSED_ID, - PENDING_ID, - REJECTED_ID, -) +from aurweb.models import PackageRequest, User +from aurweb.models.package_request import PENDING_ID, REJECTED_ID from aurweb.requests.util import get_pkgreq_by_id from aurweb.scripts import notify -from aurweb.statistics import get_request_counts from aurweb.templates import make_context, render_template -FILTER_PARAMS = { - "filter_pending", - "filter_closed", - "filter_accepted", - "filter_rejected", - "filter_maintainers_requests", -} - router = APIRouter() @router.get("/requests") @requires_auth -async def requests( # noqa: C901 - request: Request, - O: int = Query(default=defaults.O), - PP: int = Query(default=defaults.PP), - filter_pending: bool = False, - filter_closed: bool = False, - filter_accepted: bool = False, - filter_rejected: bool = False, - filter_maintainer_requests: bool = False, - filter_pkg_name: str = None, -): +async def requests(request: Request, + O: int = Query(default=defaults.O), + PP: int = Query(default=defaults.PP)): context = make_context(request, "Requests") context["q"] = dict(request.query_params) - # Set pending filter by default if no status filter was provided. - # In case we got a package name filter, but no status filter, - # we enable the other ones too. - if not dict(request.query_params).keys() & FILTER_PARAMS: - filter_pending = True - if filter_pkg_name: - filter_closed = True - filter_accepted = True - filter_rejected = True - - O, PP = util.sanitize_params(str(O), str(PP)) + O, PP = util.sanitize_params(O, PP) context["O"] = O context["PP"] = PP - context["filter_pending"] = filter_pending - context["filter_closed"] = filter_closed - context["filter_accepted"] = filter_accepted - context["filter_rejected"] = filter_rejected - context["filter_maintainer_requests"] = filter_maintainer_requests - context["filter_pkg_name"] = filter_pkg_name - Maintainer = orm.aliased(User) - # A PackageRequest query - query = ( - db.query(PackageRequest) - .join(PackageBase) - .join(User, PackageRequest.UsersID == User.ID, isouter=True) - .join(Maintainer, PackageBase.MaintainerUID == Maintainer.ID, isouter=True) - ) + # A PackageRequest query, with left inner joined User and RequestType. + query = db.query(PackageRequest).join( + User, User.ID == PackageRequest.UsersID) - # Requests statistics - counts = get_request_counts() - for k in counts: - context[k] = counts[k] - - # Apply status filters - in_filters = [] - if filter_pending: - in_filters.append(PENDING_ID) - if filter_closed: - in_filters.append(CLOSED_ID) - if filter_accepted: - in_filters.append(ACCEPTED_ID) - if filter_rejected: - in_filters.append(REJECTED_ID) - filtered = query.filter(PackageRequest.Status.in_(in_filters)) - - # Name filter (contains) - if filter_pkg_name: - filtered = filtered.filter(PackageBase.Name.like(f"%{filter_pkg_name}%")) - - # Additionally filter for requests made from package maintainer - if filter_maintainer_requests: - filtered = filtered.filter(PackageRequest.UsersID == PackageBase.MaintainerUID) # If the request user is not elevated (TU or Dev), then # filter PackageRequests which are owned by the request user. if not request.user.is_elevated(): - filtered = filtered.filter(PackageRequest.UsersID == request.user.ID) + query = query.filter(PackageRequest.UsersID == request.user.ID) + + context["total"] = query.count() + context["results"] = query.order_by( + # Order primarily by the Status column being PENDING_ID, + # and secondarily by RequestTS; both in descending order. + case([(PackageRequest.Status == PENDING_ID, 1)], else_=0).desc(), + PackageRequest.RequestTS.desc() + ).limit(PP).offset(O).all() - context["total"] = filtered.count() - context["results"] = ( - filtered.order_by( - # Order primarily by the Status column being PENDING_ID, - # and secondarily by RequestTS; both in descending order. - case([(PackageRequest.Status == PENDING_ID, 1)], else_=0).desc(), - PackageRequest.RequestTS.desc(), - ) - .limit(PP) - .offset(O) - .all() - ) return render_template(request, "requests.html", context) @router.get("/requests/{id}/close") @requires_auth async def request_close(request: Request, id: int): + pkgreq = get_pkgreq_by_id(id) if not request.user.is_elevated() and request.user != pkgreq.User: # Request user doesn't have permission here: redirect to '/'. @@ -133,13 +63,11 @@ async def request_close(request: Request, id: int): return render_template(request, "requests/close.html", context) -@db.async_retry_deadlock @router.post("/requests/{id}/close") @handle_form_exceptions @requires_auth -async def request_close_post( - request: Request, id: int, comments: str = Form(default=str()) -): +async def request_close_post(request: Request, id: int, + comments: str = Form(default=str())): pkgreq = get_pkgreq_by_id(id) # `pkgreq`.User can close their own request. @@ -159,8 +87,7 @@ async def request_close_post( pkgreq.Status = REJECTED_ID notify_ = notify.RequestCloseNotification( - request.user.ID, pkgreq.ID, pkgreq.status_display() - ) + request.user.ID, pkgreq.ID, pkgreq.status_display()) notify_.send() return RedirectResponse("/requests", status_code=HTTPStatus.SEE_OTHER) diff --git a/aurweb/routers/rpc.py b/aurweb/routers/rpc.py index 645e6b5a..49e98f8c 100644 --- a/aurweb/routers/rpc.py +++ b/aurweb/routers/rpc.py @@ -1,36 +1,12 @@ -""" -RPC API routing module - -For legacy route documentation, see https://aur.archlinux.org/rpc - -Legacy Routes: -- GET /rpc -- POST /rpc - -Legacy example (version 5): /rpc?v=5&type=info&arg=my-package - -For OpenAPI route documentation, see https://aur.archlinux.org/docs - -OpenAPI Routes: -- GET /rpc/v{version}/info/{arg} -- GET /rpc/v{version}/info -- POST /rpc/v{version}/info -- GET /rpc/v{version}/search/{arg} -- GET /rpc/v{version}/search -- POST /rpc/v{version}/search -- GET /rpc/v{version}/suggest/{arg} - -OpenAPI example (version 5): /rpc/v5/info/my-package - -""" - import hashlib import re + from http import HTTPStatus -from typing import Optional +from typing import List, Optional from urllib.parse import unquote import orjson + from fastapi import APIRouter, Form, Query, Request, Response from fastapi.responses import JSONResponse @@ -43,7 +19,7 @@ router = APIRouter() def parse_args(request: Request): - """Handle legacy logic of 'arg' and 'arg[]' query parameter handling. + """ Handle legacy logic of 'arg' and 'arg[]' query parameter handling. When 'arg' appears as the last argument given to the query string, that argument is used by itself as one single argument, regardless @@ -63,7 +39,9 @@ def parse_args(request: Request): # Create a list of (key, value) pairs of the given 'arg' and 'arg[]' # query parameters from last to first. query = list(reversed(unquote(request.url.query).split("&"))) - parts = [e.split("=", 1) for e in query if e.startswith(("arg=", "arg[]="))] + parts = [ + e.split("=", 1) for e in query if e.startswith(("arg=", "arg[]=")) + ] args = [] if parts: @@ -85,27 +63,24 @@ def parse_args(request: Request): return args -JSONP_EXPR = re.compile(r"^[a-zA-Z0-9()_.]{1,128}$") +JSONP_EXPR = re.compile(r'^[a-zA-Z0-9()_.]{1,128}$') -async def rpc_request( - request: Request, - v: Optional[int] = None, - type: Optional[str] = None, - by: Optional[str] = defaults.RPC_SEARCH_BY, - arg: Optional[str] = None, - args: Optional[list[str]] = [], - callback: Optional[str] = None, -): +async def rpc_request(request: Request, + v: Optional[int] = None, + type: Optional[str] = None, + by: Optional[str] = defaults.RPC_SEARCH_BY, + arg: Optional[str] = None, + args: Optional[List[str]] = [], + callback: Optional[str] = None): + # Create a handle to our RPC class. rpc = RPC(version=v, type=type) # If ratelimit was exceeded, return a 429 Too Many Requests. if check_ratelimit(request): - return JSONResponse( - rpc.error("Rate limit reached"), - status_code=int(HTTPStatus.TOO_MANY_REQUESTS), - ) + return JSONResponse(rpc.error("Rate limit reached"), + status_code=int(HTTPStatus.TOO_MANY_REQUESTS)) # If `callback` was provided, produce a text/javascript response # valid for the jsonp callback. Otherwise, by default, return @@ -140,11 +115,15 @@ async def rpc_request( # The ETag header expects quotes to surround any identifier. # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag - headers = {"Content-Type": content_type, "ETag": f'"{etag}"'} + headers = { + "Content-Type": content_type, + "ETag": f'"{etag}"' + } if_none_match = request.headers.get("If-None-Match", str()) - if if_none_match and if_none_match.strip('\t\n\r" ') == etag: - return Response(headers=headers, status_code=int(HTTPStatus.NOT_MODIFIED)) + if if_none_match and if_none_match.strip("\t\n\r\" ") == etag: + return Response(headers=headers, + status_code=int(HTTPStatus.NOT_MODIFIED)) if callback: content = f"/**/{callback}({content.decode()})" @@ -156,15 +135,13 @@ async def rpc_request( @router.get("/rpc.php") # Temporary! Remove on 03/04 @router.get("/rpc/") @router.get("/rpc") -async def rpc( - request: Request, - v: Optional[int] = Query(default=None), - type: Optional[str] = Query(default=None), - by: Optional[str] = Query(default=defaults.RPC_SEARCH_BY), - arg: Optional[str] = Query(default=None), - args: Optional[list[str]] = Query(default=[], alias="arg[]"), - callback: Optional[str] = Query(default=None), -): +async def rpc(request: Request, + v: Optional[int] = Query(default=None), + type: Optional[str] = Query(default=None), + by: Optional[str] = Query(default=defaults.RPC_SEARCH_BY), + arg: Optional[str] = Query(default=None), + args: Optional[List[str]] = Query(default=[], alias="arg[]"), + callback: Optional[str] = Query(default=None)): if not request.url.query: return documentation() return await rpc_request(request, v, type, by, arg, args, callback) @@ -175,146 +152,11 @@ async def rpc( @router.post("/rpc/") @router.post("/rpc") @handle_form_exceptions -async def rpc_post( - request: Request, - v: Optional[int] = Form(default=None), - type: Optional[str] = Form(default=None), - by: Optional[str] = Form(default=defaults.RPC_SEARCH_BY), - arg: Optional[str] = Form(default=None), - args: list[str] = Form(default=[], alias="arg[]"), - callback: Optional[str] = Form(default=None), -): +async def rpc_post(request: Request, + v: Optional[int] = Form(default=None), + type: Optional[str] = Form(default=None), + by: Optional[str] = Form(default=defaults.RPC_SEARCH_BY), + arg: Optional[str] = Form(default=None), + args: Optional[List[str]] = Form(default=[], alias="arg[]"), + callback: Optional[str] = Form(default=None)): return await rpc_request(request, v, type, by, arg, args, callback) - - -@router.get("/rpc/v{version}/info/{name}") -async def rpc_openapi_info(request: Request, version: int, name: str): - return await rpc_request( - request, - version, - "info", - defaults.RPC_SEARCH_BY, - name, - [], - ) - - -@router.get("/rpc/v{version}/info") -async def rpc_openapi_multiinfo( - request: Request, - version: int, - args: Optional[list[str]] = Query(default=[], alias="arg[]"), -): - arg = args.pop(0) if args else None - return await rpc_request( - request, - version, - "info", - defaults.RPC_SEARCH_BY, - arg, - args, - ) - - -@router.post("/rpc/v{version}/info") -async def rpc_openapi_multiinfo_post( - request: Request, - version: int, -): - data = await request.json() - - args = data.get("arg", []) - if not isinstance(args, list): - rpc = RPC(version, "info") - return JSONResponse( - rpc.error("the 'arg' parameter must be of array type"), - status_code=HTTPStatus.BAD_REQUEST, - ) - - arg = args.pop(0) if args else None - return await rpc_request( - request, - version, - "info", - defaults.RPC_SEARCH_BY, - arg, - args, - ) - - -@router.get("/rpc/v{version}/search/{arg}") -async def rpc_openapi_search_arg( - request: Request, - version: int, - arg: str, - by: Optional[str] = Query(default=defaults.RPC_SEARCH_BY), -): - return await rpc_request( - request, - version, - "search", - by, - arg, - [], - ) - - -@router.get("/rpc/v{version}/search") -async def rpc_openapi_search( - request: Request, - version: int, - arg: Optional[str] = Query(default=str()), - by: Optional[str] = Query(default=defaults.RPC_SEARCH_BY), -): - return await rpc_request( - request, - version, - "search", - by, - arg, - [], - ) - - -@router.post("/rpc/v{version}/search") -async def rpc_openapi_search_post( - request: Request, - version: int, -): - data = await request.json() - by = data.get("by", defaults.RPC_SEARCH_BY) - if not isinstance(by, str): - rpc = RPC(version, "search") - return JSONResponse( - rpc.error("the 'by' parameter must be of string type"), - status_code=HTTPStatus.BAD_REQUEST, - ) - - arg = data.get("arg", str()) - if not isinstance(arg, str): - rpc = RPC(version, "search") - return JSONResponse( - rpc.error("the 'arg' parameter must be of string type"), - status_code=HTTPStatus.BAD_REQUEST, - ) - - return await rpc_request( - request, - version, - "search", - by, - arg, - [], - ) - - -@router.get("/rpc/v{version}/suggest/{arg}") -async def rpc_openapi_suggest(request: Request, version: int, arg: str): - return await rpc_request( - request, - version, - "suggest", - defaults.RPC_SEARCH_BY, - arg, - [], - ) diff --git a/aurweb/routers/rss.py b/aurweb/routers/rss.py index 180cbb23..0996f3cd 100644 --- a/aurweb/routers/rss.py +++ b/aurweb/routers/rss.py @@ -1,19 +1,22 @@ +from datetime import datetime + from fastapi import APIRouter, Request from fastapi.responses import Response from feedgen.feed import FeedGenerator -from aurweb import config, db, filters -from aurweb.cache import lambda_cache +from aurweb import db, filters from aurweb.models import Package, PackageBase router = APIRouter() -def make_rss_feed(request: Request, packages: list): - """Create an RSS Feed string for some packages. +def make_rss_feed(request: Request, packages: list, + date_attr: str): + """ Create an RSS Feed string for some packages. :param request: A FastAPI request :param packages: A list of packages to add to the RSS feed + :param date_attr: The date attribute (DB column) to use :return: RSS Feed string """ @@ -23,67 +26,58 @@ def make_rss_feed(request: Request, packages: list): base = f"{request.url.scheme}://{request.url.netloc}" feed.link(href=base, rel="alternate") feed.link(href=f"{base}/rss", rel="self") - feed.image( - title="AUR Newest Packages", - url=f"{base}/static/css/archnavbar/aurlogo.png", - link=base, - description="AUR Newest Packages Feed", - ) + feed.image(title="AUR Newest Packages", + url=f"{base}/static/css/archnavbar/aurlogo.png", + link=base, + description="AUR Newest Packages Feed") for pkg in packages: entry = feed.add_entry(order="append") entry.title(pkg.Name) entry.link(href=f"{base}/packages/{pkg.Name}", rel="alternate") + entry.link(href=f"{base}/rss", rel="self", type="application/rss+xml") entry.description(pkg.Description or str()) - dt = filters.timestamp_to_datetime(pkg.Timestamp) + + attr = getattr(pkg.PackageBase, date_attr) + dt = filters.timestamp_to_datetime(attr) dt = filters.as_timezone(dt, request.user.Timezone) entry.pubDate(dt.strftime("%Y-%m-%d %H:%M:%S%z")) - entry.guid(f"{pkg.Name}-{pkg.Timestamp}") + + entry.source(f"{base}") + if pkg.PackageBase.Maintainer: + entry.author(author={"name": pkg.PackageBase.Maintainer.Username}) + entry.guid(f"{pkg.Name} - {attr}") return feed.rss_str() @router.get("/rss/") async def rss(request: Request): - packages = ( - db.query(Package) - .join(PackageBase) - .order_by(PackageBase.SubmittedTS.desc()) - .limit(100) - .with_entities( - Package.Name, - Package.Description, - PackageBase.SubmittedTS.label("Timestamp"), - ) - ) - - # we use redis for caching the results of the feedgen - cache_expire = config.getint("cache", "expiry_time_rss", 300) - feed = lambda_cache("rss", lambda: make_rss_feed(request, packages), cache_expire) + packages = db.query(Package).join(PackageBase).order_by( + PackageBase.SubmittedTS.desc()).limit(100) + feed = make_rss_feed(request, packages, "SubmittedTS") response = Response(feed, media_type="application/rss+xml") + package = packages.first() + if package: + dt = datetime.utcfromtimestamp(package.PackageBase.SubmittedTS) + modified = dt.strftime("%a, %d %m %Y %H:%M:%S GMT") + response.headers["Last-Modified"] = modified + return response @router.get("/rss/modified") async def rss_modified(request: Request): - packages = ( - db.query(Package) - .join(PackageBase) - .order_by(PackageBase.ModifiedTS.desc()) - .limit(100) - .with_entities( - Package.Name, - Package.Description, - PackageBase.ModifiedTS.label("Timestamp"), - ) - ) - - # we use redis for caching the results of the feedgen - cache_expire = config.getint("cache", "expiry_time_rss", 300) - feed = lambda_cache( - "rss_modified", lambda: make_rss_feed(request, packages), cache_expire - ) + packages = db.query(Package).join(PackageBase).order_by( + PackageBase.ModifiedTS.desc()).limit(100) + feed = make_rss_feed(request, packages, "ModifiedTS") response = Response(feed, media_type="application/rss+xml") + package = packages.first() + if package: + dt = datetime.utcfromtimestamp(package.PackageBase.ModifiedTS) + modified = dt.strftime("%a, %d %m %Y %H:%M:%S GMT") + response.headers["Last-Modified"] = modified + return response diff --git a/aurweb/routers/sso.py b/aurweb/routers/sso.py index fb99edd6..eff1c63f 100644 --- a/aurweb/routers/sso.py +++ b/aurweb/routers/sso.py @@ -1,9 +1,11 @@ import time import uuid + from http import HTTPStatus from urllib.parse import urlencode import fastapi + from authlib.integrations.starlette_client import OAuth, OAuthError from fastapi import Depends, HTTPException from fastapi.responses import RedirectResponse @@ -12,6 +14,7 @@ from starlette.requests import Request import aurweb.config import aurweb.db + from aurweb import util from aurweb.l10n import get_translator_for_request from aurweb.schema import Bans, Sessions, Users @@ -40,18 +43,14 @@ async def login(request: Request, redirect: str = None): The `redirect` argument is a query parameter specifying the post-login redirect URL. """ - authenticate_url = ( - aurweb.config.get("options", "aur_location") + "/sso/authenticate" - ) + authenticate_url = aurweb.config.get("options", "aur_location") + "/sso/authenticate" if redirect: authenticate_url = authenticate_url + "?" + urlencode([("redirect", redirect)]) return await oauth.sso.authorize_redirect(request, authenticate_url, prompt="login") def is_account_suspended(conn, user_id): - row = conn.execute( - select([Users.c.Suspended]).where(Users.c.ID == user_id) - ).fetchone() + row = conn.execute(select([Users.c.Suspended]).where(Users.c.ID == user_id)).fetchone() return row is not None and bool(row[0]) @@ -61,29 +60,23 @@ def open_session(request, conn, user_id): """ if is_account_suspended(conn, user_id): _ = get_translator_for_request(request) - raise HTTPException( - status_code=HTTPStatus.FORBIDDEN, detail=_("Account suspended") - ) + raise HTTPException(status_code=HTTPStatus.FORBIDDEN, + detail=_('Account suspended')) # TODO This is a terrible message because it could imply the attempt at # logging in just caused the suspension. sid = uuid.uuid4().hex - conn.execute( - Sessions.insert().values( - UsersID=user_id, - SessionID=sid, - LastUpdateTS=time.time(), - ) - ) + conn.execute(Sessions.insert().values( + UsersID=user_id, + SessionID=sid, + LastUpdateTS=time.time(), + )) # Update user’s last login information. - conn.execute( - Users.update() - .where(Users.c.ID == user_id) - .values( - LastLogin=int(time.time()), LastLoginIPAddress=util.get_client_ip(request) - ) - ) + conn.execute(Users.update() + .where(Users.c.ID == user_id) + .values(LastLogin=int(time.time()), + LastLoginIPAddress=request.client.host)) return sid @@ -105,23 +98,18 @@ def is_aur_url(url): @router.get("/sso/authenticate") -async def authenticate( - request: Request, redirect: str = None, conn=Depends(aurweb.db.connect) -): +async def authenticate(request: Request, redirect: str = None, conn=Depends(aurweb.db.connect)): """ Receive an OpenID Connect ID token, validate it, then process it to create an new AUR session. """ - if is_ip_banned(conn, util.get_client_ip(request)): + if is_ip_banned(conn, request.client.host): _ = get_translator_for_request(request) raise HTTPException( status_code=HTTPStatus.FORBIDDEN, - detail=_( - "The login form is currently disabled for your IP address, " - "probably due to sustained spam attacks. Sorry for the " - "inconvenience." - ), - ) + detail=_('The login form is currently disabled for your IP address, ' + 'probably due to sustained spam attacks. Sorry for the ' + 'inconvenience.')) try: token = await oauth.sso.authorize_access_token(request) @@ -132,41 +120,30 @@ async def authenticate( _ = get_translator_for_request(request) raise HTTPException( status_code=HTTPStatus.BAD_REQUEST, - detail=_("Bad OAuth token. Please retry logging in from the start."), - ) + detail=_('Bad OAuth token. Please retry logging in from the start.')) sub = user.get("sub") # this is the SSO account ID in JWT terminology if not sub: _ = get_translator_for_request(request) - raise HTTPException( - status_code=HTTPStatus.BAD_REQUEST, - detail=_("JWT is missing its `sub` field."), - ) + raise HTTPException(status_code=HTTPStatus.BAD_REQUEST, + detail=_("JWT is missing its `sub` field.")) - aur_accounts = conn.execute( - select([Users.c.ID]).where(Users.c.SSOAccountID == sub) - ).fetchall() + aur_accounts = conn.execute(select([Users.c.ID]).where(Users.c.SSOAccountID == sub)) \ + .fetchall() if not aur_accounts: return "Sorry, we don’t seem to know you Sir " + sub elif len(aur_accounts) == 1: sid = open_session(request, conn, aur_accounts[0][Users.c.ID]) - response = RedirectResponse( - redirect if redirect and is_aur_url(redirect) else "/" - ) + response = RedirectResponse(redirect if redirect and is_aur_url(redirect) else "/") secure_cookies = aurweb.config.getboolean("options", "disable_http_login") - response.set_cookie( - key="AURSID", value=sid, httponly=True, secure=secure_cookies - ) + response.set_cookie(key="AURSID", value=sid, httponly=True, + secure=secure_cookies) if "id_token" in token: # We save the id_token for the SSO logout. It’s not too important # though, so if we can’t find it, we can live without it. - response.set_cookie( - key="SSO_ID_TOKEN", - value=token["id_token"], - path="/sso/", - httponly=True, - secure=secure_cookies, - ) + response.set_cookie(key="SSO_ID_TOKEN", value=token["id_token"], + path="/sso/", httponly=True, + secure=secure_cookies) return util.add_samesite_fields(response, "strict") else: # We’ve got a severe integrity violation. @@ -188,12 +165,8 @@ async def logout(request: Request): return RedirectResponse("/") metadata = await oauth.sso.load_server_metadata() - query = urlencode( - { - "post_logout_redirect_uri": aurweb.config.get("options", "aur_location"), - "id_token_hint": id_token, - } - ) - response = RedirectResponse(metadata["end_session_endpoint"] + "?" + query) + query = urlencode({'post_logout_redirect_uri': aurweb.config.get('options', 'aur_location'), + 'id_token_hint': id_token}) + response = RedirectResponse(metadata["end_session_endpoint"] + '?' + query) response.delete_cookie("SSO_ID_TOKEN", path="/sso/") return response diff --git a/aurweb/routers/trusted_user.py b/aurweb/routers/trusted_user.py new file mode 100644 index 00000000..2d6ea92c --- /dev/null +++ b/aurweb/routers/trusted_user.py @@ -0,0 +1,318 @@ +import html +import typing + +from http import HTTPStatus + +from fastapi import APIRouter, Form, HTTPException, Request +from fastapi.responses import RedirectResponse, Response +from sqlalchemy import and_, func, or_ + +from aurweb import db, l10n, logging, models, time +from aurweb.auth import creds, requires_auth +from aurweb.exceptions import handle_form_exceptions +from aurweb.models import User +from aurweb.models.account_type import TRUSTED_USER_AND_DEV_ID, TRUSTED_USER_ID +from aurweb.templates import make_context, make_variable_context, render_template + +router = APIRouter() +logger = logging.get_logger(__name__) + +# Some TU route specific constants. +ITEMS_PER_PAGE = 10 # Paged table size. +MAX_AGENDA_LENGTH = 75 # Agenda table column length. + +ADDVOTE_SPECIFICS = { + # This dict stores a vote duration and quorum for a proposal. + # When a proposal is added, duration is added to the current + # timestamp. + # "addvote_type": (duration, quorum) + "add_tu": (7 * 24 * 60 * 60, 0.66), + "remove_tu": (7 * 24 * 60 * 60, 0.75), + "remove_inactive_tu": (5 * 24 * 60 * 60, 0.66), + "bylaws": (7 * 24 * 60 * 60, 0.75) +} + + +@router.get("/tu") +@requires_auth +async def trusted_user(request: Request, + coff: int = 0, # current offset + cby: str = "desc", # current by + poff: int = 0, # past offset + pby: str = "desc"): # past by + if not request.user.has_credential(creds.TU_LIST_VOTES): + return RedirectResponse("/", status_code=HTTPStatus.SEE_OTHER) + + context = make_context(request, "Trusted User") + + current_by, past_by = cby, pby + current_off, past_off = coff, poff + + context["pp"] = pp = ITEMS_PER_PAGE + context["prev_len"] = MAX_AGENDA_LENGTH + + ts = time.utcnow() + + if current_by not in {"asc", "desc"}: + # If a malicious by was given, default to desc. + current_by = "desc" + context["current_by"] = current_by + + if past_by not in {"asc", "desc"}: + # If a malicious by was given, default to desc. + past_by = "desc" + context["past_by"] = past_by + + current_votes = db.query(models.TUVoteInfo).filter( + models.TUVoteInfo.End > ts).order_by( + models.TUVoteInfo.Submitted.desc()) + context["current_votes_count"] = current_votes.count() + current_votes = current_votes.limit(pp).offset(current_off) + context["current_votes"] = reversed(current_votes.all()) \ + if current_by == "asc" else current_votes.all() + context["current_off"] = current_off + + past_votes = db.query(models.TUVoteInfo).filter( + models.TUVoteInfo.End <= ts).order_by( + models.TUVoteInfo.Submitted.desc()) + context["past_votes_count"] = past_votes.count() + past_votes = past_votes.limit(pp).offset(past_off) + context["past_votes"] = reversed(past_votes.all()) \ + if past_by == "asc" else past_votes.all() + context["past_off"] = past_off + + last_vote = func.max(models.TUVote.VoteID).label("LastVote") + last_votes_by_tu = db.query(models.TUVote).join(models.User).join( + models.TUVoteInfo, + models.TUVoteInfo.ID == models.TUVote.VoteID + ).filter( + and_(models.TUVote.VoteID == models.TUVoteInfo.ID, + models.User.ID == models.TUVote.UserID, + models.TUVoteInfo.End < ts, + or_(models.User.AccountTypeID == 2, + models.User.AccountTypeID == 4)) + ).with_entities( + models.TUVote.UserID, + last_vote, + models.User.Username + ).group_by(models.TUVote.UserID).order_by( + last_vote.desc(), models.User.Username.asc()) + context["last_votes_by_tu"] = last_votes_by_tu.all() + + context["current_by_next"] = "asc" if current_by == "desc" else "desc" + context["past_by_next"] = "asc" if past_by == "desc" else "desc" + + context["q"] = { + "coff": current_off, + "cby": current_by, + "poff": past_off, + "pby": past_by + } + + return render_template(request, "tu/index.html", context) + + +def render_proposal(request: Request, context: dict, proposal: int, + voteinfo: models.TUVoteInfo, + voters: typing.Iterable[models.User], + vote: models.TUVote, + status_code: HTTPStatus = HTTPStatus.OK): + """ Render a single TU proposal. """ + context["proposal"] = proposal + context["voteinfo"] = voteinfo + context["voters"] = voters.all() + + total = voteinfo.total_votes() + participation = (total / voteinfo.ActiveTUs) if voteinfo.ActiveTUs else 0 + context["participation"] = participation + + accepted = (voteinfo.Yes > voteinfo.ActiveTUs / 2) or \ + (participation > voteinfo.Quorum and voteinfo.Yes > voteinfo.No) + context["accepted"] = accepted + + can_vote = voters.filter(models.TUVote.User == request.user).first() is None + context["can_vote"] = can_vote + + if not voteinfo.is_running(): + context["error"] = "Voting is closed for this proposal." + + context["vote"] = vote + context["has_voted"] = vote is not None + + return render_template(request, "tu/show.html", context, + status_code=status_code) + + +@router.get("/tu/{proposal}") +@requires_auth +async def trusted_user_proposal(request: Request, proposal: int): + if not request.user.has_credential(creds.TU_LIST_VOTES): + return RedirectResponse("/tu", status_code=HTTPStatus.SEE_OTHER) + + context = await make_variable_context(request, "Trusted User") + proposal = int(proposal) + + voteinfo = db.query(models.TUVoteInfo).filter( + models.TUVoteInfo.ID == proposal).first() + if not voteinfo: + raise HTTPException(status_code=HTTPStatus.NOT_FOUND) + + voters = db.query(models.User).join(models.TUVote).filter( + models.TUVote.VoteID == voteinfo.ID) + vote = db.query(models.TUVote).filter( + and_(models.TUVote.UserID == request.user.ID, + models.TUVote.VoteID == voteinfo.ID)).first() + if not request.user.has_credential(creds.TU_VOTE): + context["error"] = "Only Trusted Users are allowed to vote." + if voteinfo.User == request.user.Username: + context["error"] = "You cannot vote in an proposal about you." + elif vote is not None: + context["error"] = "You've already voted for this proposal." + + context["vote"] = vote + return render_proposal(request, context, proposal, voteinfo, voters, vote) + + +@router.post("/tu/{proposal}") +@handle_form_exceptions +@requires_auth +async def trusted_user_proposal_post(request: Request, proposal: int, + decision: str = Form(...)): + if not request.user.has_credential(creds.TU_LIST_VOTES): + return RedirectResponse("/tu", status_code=HTTPStatus.SEE_OTHER) + + context = await make_variable_context(request, "Trusted User") + proposal = int(proposal) # Make sure it's an int. + + voteinfo = db.query(models.TUVoteInfo).filter( + models.TUVoteInfo.ID == proposal).first() + if not voteinfo: + raise HTTPException(status_code=HTTPStatus.NOT_FOUND) + + voters = db.query(models.User).join(models.TUVote).filter( + models.TUVote.VoteID == voteinfo.ID) + vote = db.query(models.TUVote).filter( + and_(models.TUVote.UserID == request.user.ID, + models.TUVote.VoteID == voteinfo.ID)).first() + + status_code = HTTPStatus.OK + if not request.user.has_credential(creds.TU_VOTE): + context["error"] = "Only Trusted Users are allowed to vote." + status_code = HTTPStatus.UNAUTHORIZED + elif voteinfo.User == request.user.Username: + context["error"] = "You cannot vote in an proposal about you." + status_code = HTTPStatus.BAD_REQUEST + elif vote is not None: + context["error"] = "You've already voted for this proposal." + status_code = HTTPStatus.BAD_REQUEST + + if status_code != HTTPStatus.OK: + return render_proposal(request, context, proposal, + voteinfo, voters, vote, + status_code=status_code) + + if decision in {"Yes", "No", "Abstain"}: + # Increment whichever decision was given to us. + setattr(voteinfo, decision, getattr(voteinfo, decision) + 1) + else: + return Response("Invalid 'decision' value.", + status_code=HTTPStatus.BAD_REQUEST) + + with db.begin(): + vote = db.create(models.TUVote, User=request.user, VoteInfo=voteinfo) + voteinfo.ActiveTUs += 1 + + context["error"] = "You've already voted for this proposal." + return render_proposal(request, context, proposal, voteinfo, voters, vote) + + +@router.get("/addvote") +@requires_auth +async def trusted_user_addvote(request: Request, user: str = str(), + type: str = "add_tu", agenda: str = str()): + if not request.user.has_credential(creds.TU_ADD_VOTE): + return RedirectResponse("/tu", status_code=HTTPStatus.SEE_OTHER) + + context = await make_variable_context(request, "Add Proposal") + + if type not in ADDVOTE_SPECIFICS: + context["error"] = "Invalid type." + type = "add_tu" # Default it. + + context["user"] = user + context["type"] = type + context["agenda"] = agenda + + return render_template(request, "addvote.html", context) + + +@router.post("/addvote") +@handle_form_exceptions +@requires_auth +async def trusted_user_addvote_post(request: Request, + user: str = Form(default=str()), + type: str = Form(default=str()), + agenda: str = Form(default=str())): + if not request.user.has_credential(creds.TU_ADD_VOTE): + return RedirectResponse("/tu", status_code=HTTPStatus.SEE_OTHER) + + # Build a context. + context = await make_variable_context(request, "Add Proposal") + + context["type"] = type + context["user"] = user + context["agenda"] = agenda + + def render_addvote(context, status_code): + """ Simplify render_template a bit for this test. """ + return render_template(request, "addvote.html", context, status_code) + + # Alright, get some database records, if we can. + if type != "bylaws": + user_record = db.query(models.User).filter( + models.User.Username == user).first() + if user_record is None: + context["error"] = "Username does not exist." + return render_addvote(context, HTTPStatus.NOT_FOUND) + + voteinfo = db.query(models.TUVoteInfo).filter( + models.TUVoteInfo.User == user).count() + if voteinfo: + _ = l10n.get_translator_for_request(request) + context["error"] = _( + "%s already has proposal running for them.") % ( + html.escape(user),) + return render_addvote(context, HTTPStatus.BAD_REQUEST) + + if type not in ADDVOTE_SPECIFICS: + context["error"] = "Invalid type." + context["type"] = type = "add_tu" # Default for rendering. + return render_addvote(context, HTTPStatus.BAD_REQUEST) + + if not agenda: + context["error"] = "Proposal cannot be empty." + return render_addvote(context, HTTPStatus.BAD_REQUEST) + + # Gather some mapped constants and the current timestamp. + duration, quorum = ADDVOTE_SPECIFICS.get(type) + timestamp = time.utcnow() + + # Active TU types we filter for. + types = {TRUSTED_USER_ID, TRUSTED_USER_AND_DEV_ID} + + # Create a new TUVoteInfo (proposal)! + with db.begin(): + active_tus = db.query(User).filter( + and_(User.Suspended == 0, + User.InactivityTS.isnot(None), + User.AccountTypeID.in_(types)) + ).count() + voteinfo = db.create(models.TUVoteInfo, User=user, + Agenda=html.escape(agenda), + Submitted=timestamp, End=(timestamp + duration), + Quorum=quorum, ActiveTUs=active_tus, + Submitter=request.user) + + # Redirect to the new proposal. + endpoint = f"/tu/{voteinfo.ID}" + return RedirectResponse(endpoint, status_code=HTTPStatus.SEE_OTHER) diff --git a/aurweb/rpc.py b/aurweb/rpc.py index 5fcbbb78..70d8c2fd 100644 --- a/aurweb/rpc.py +++ b/aurweb/rpc.py @@ -1,15 +1,16 @@ import os + from collections import defaultdict -from typing import Any, Callable, NewType, Union +from typing import Any, Callable, Dict, List, NewType, Union from fastapi.responses import HTMLResponse from sqlalchemy import and_, literal, orm import aurweb.config as config -from aurweb import db, defaults, models, time + +from aurweb import db, defaults, models from aurweb.exceptions import RPCError from aurweb.filters import number_format -from aurweb.models.package_base import popularity from aurweb.packages.search import RPCSearch TYPE_MAPPING = { @@ -22,7 +23,8 @@ TYPE_MAPPING = { "replaces": "Replaces", } -DataGenerator = NewType("DataGenerator", Callable[[models.Package], dict[str, Any]]) +DataGenerator = NewType("DataGenerator", + Callable[[models.Package], Dict[str, Any]]) def documentation(): @@ -38,7 +40,7 @@ def documentation(): class RPC: - """RPC API handler class. + """ RPC API handler class. There are various pieces to RPC's process, and encapsulating them inside of a class means that external users do not abuse the @@ -64,58 +66,36 @@ class RPC: # A set of RPC types supported by this API. EXPOSED_TYPES = { - "info", - "multiinfo", - "search", - "msearch", - "suggest", - "suggest-pkgbase", + "info", "multiinfo", + "search", "msearch", + "suggest", "suggest-pkgbase" } # A mapping of type aliases. TYPE_ALIASES = {"info": "multiinfo"} EXPOSED_BYS = { - "name-desc", - "name", - "maintainer", - "depends", - "makedepends", - "optdepends", - "checkdepends", - "provides", - "conflicts", - "replaces", - "groups", - "submitter", - "keywords", - "comaintainers", + "name-desc", "name", "maintainer", + "depends", "makedepends", "optdepends", "checkdepends" } # A mapping of by aliases. - BY_ALIASES = { - "name-desc": "nd", - "name": "n", - "maintainer": "m", - "submitter": "s", - "keywords": "k", - "comaintainers": "c", - } + BY_ALIASES = {"name-desc": "nd", "name": "n", "maintainer": "m"} def __init__(self, version: int = 0, type: str = None) -> "RPC": self.version = version self.type = RPC.TYPE_ALIASES.get(type, type) - def error(self, message: str) -> dict[str, Any]: + def error(self, message: str) -> Dict[str, Any]: return { "version": self.version, "results": [], "resultcount": 0, "type": "error", - "error": message, + "error": message } - def _verify_inputs(self, by: str = [], args: list[str] = []) -> None: + def _verify_inputs(self, by: str = [], args: List[str] = []) -> None: if self.version is None: raise RPCError("Please specify an API version.") @@ -131,19 +111,20 @@ class RPC: if self.type not in RPC.EXPOSED_TYPES: raise RPCError("Incorrect request type specified.") - def _enforce_args(self, args: list[str]) -> None: + def _enforce_args(self, args: List[str]) -> None: if not args: raise RPCError("No request type/data specified.") - def get_json_data(self, package: models.Package) -> dict[str, Any]: - """Produce dictionary data of one Package that can be JSON-serialized. + def _get_json_data(self, package: models.Package) -> Dict[str, Any]: + """ Produce dictionary data of one Package that can be JSON-serialized. :param package: Package instance :returns: JSON-serializable dictionary """ - # Normalize Popularity for RPC output to 6 decimal precision - pop = popularity(package, time.utcnow()) + # Produce RPC API compatible Popularity: If zero, it's an integer + # 0, otherwise, it's formatted to the 6th decimal place. + pop = package.Popularity pop = 0 if not pop else float(number_format(pop, 6)) snapshot_uri = config.get("options", "snapshot_uri") @@ -154,24 +135,26 @@ class RPC: "PackageBase": package.PackageBaseName, # Maintainer should be set following this update if one exists. "Maintainer": package.Maintainer, - "Submitter": package.Submitter, "Version": package.Version, "Description": package.Description, "URL": package.URL, - "URLPath": snapshot_uri % package.PackageBaseName, + "URLPath": snapshot_uri % package.Name, "NumVotes": package.NumVotes, "Popularity": pop, "OutOfDate": package.OutOfDateTS, "FirstSubmitted": package.SubmittedTS, - "LastModified": package.ModifiedTS, + "LastModified": package.ModifiedTS } - def get_info_json_data(self, package: models.Package) -> dict[str, Any]: - data = self.get_json_data(package) + def _get_info_json_data(self, package: models.Package) -> Dict[str, Any]: + data = self._get_json_data(package) # All info results have _at least_ an empty list of # License and Keywords. - data.update({"License": [], "Keywords": []}) + data.update({ + "License": [], + "Keywords": [] + }) # If we actually got extra_info records, update data with # them for this particular package. @@ -180,9 +163,9 @@ class RPC: return data - def _assemble_json_data( - self, packages: list[models.Package], data_generator: DataGenerator - ) -> list[dict[str, Any]]: + def _assemble_json_data(self, packages: List[models.Package], + data_generator: DataGenerator) \ + -> List[Dict[str, Any]]: """ Assemble JSON data out of a list of packages. @@ -191,129 +174,108 @@ class RPC: """ return [data_generator(pkg) for pkg in packages] - def entities(self, query: orm.Query) -> orm.Query: - """Select specific RPC columns on `query`.""" - Submitter = orm.aliased(models.User) + def _entities(self, query: orm.Query) -> orm.Query: + """ Select specific RPC columns on `query`. """ + return query.with_entities( + models.Package.ID, + models.Package.Name, + models.Package.Version, + models.Package.Description, + models.Package.URL, + models.Package.PackageBaseID, + models.PackageBase.Name.label("PackageBaseName"), + models.PackageBase.NumVotes, + models.PackageBase.Popularity, + models.PackageBase.OutOfDateTS, + models.PackageBase.SubmittedTS, + models.PackageBase.ModifiedTS, + models.User.Username.label("Maintainer"), + ).group_by(models.Package.ID) - query = ( - query.join( - Submitter, - Submitter.ID == models.PackageBase.SubmitterUID, - isouter=True, - ) - .with_entities( - models.Package.ID, - models.Package.Name, - models.Package.Version, - models.Package.Description, - models.Package.URL, - models.Package.PackageBaseID, - models.PackageBase.Name.label("PackageBaseName"), - models.PackageBase.NumVotes, - models.PackageBase.Popularity, - models.PackageBase.PopularityUpdated, - models.PackageBase.OutOfDateTS, - models.PackageBase.SubmittedTS, - models.PackageBase.ModifiedTS, - models.User.Username.label("Maintainer"), - Submitter.Username.label("Submitter"), - ) - .group_by(models.Package.ID) - ) + def _handle_multiinfo_type(self, args: List[str] = [], **kwargs) \ + -> List[Dict[str, Any]]: + self._enforce_args(args) + args = set(args) - return query + packages = db.query(models.Package).join(models.PackageBase).join( + models.User, + models.User.ID == models.PackageBase.MaintainerUID, + isouter=True + ).filter(models.Package.Name.in_(args)) - def subquery(self, ids: set[int]): + max_results = config.getint("options", "max_rpc_results") + packages = self._entities(packages).limit(max_results + 1) + + if packages.count() > max_results: + raise RPCError("Too many package results.") + + ids = {pkg.ID for pkg in packages} + + # Aliases for 80-width. Package = models.Package PackageKeyword = models.PackageKeyword subqueries = [ # PackageDependency - db.query(models.PackageDependency) - .join(models.DependencyType) - .filter(models.PackageDependency.PackageID.in_(ids)) - .with_entities( + db.query( + models.PackageDependency + ).join(models.DependencyType).filter( + models.PackageDependency.PackageID.in_(ids) + ).with_entities( models.PackageDependency.PackageID.label("ID"), models.DependencyType.Name.label("Type"), models.PackageDependency.DepName.label("Name"), - models.PackageDependency.DepCondition.label("Cond"), - ) - .distinct() - .order_by("Name"), + models.PackageDependency.DepCondition.label("Cond") + ).distinct().order_by("Name"), + # PackageRelation - db.query(models.PackageRelation) - .join(models.RelationType) - .filter(models.PackageRelation.PackageID.in_(ids)) - .with_entities( + db.query( + models.PackageRelation + ).join(models.RelationType).filter( + models.PackageRelation.PackageID.in_(ids) + ).with_entities( models.PackageRelation.PackageID.label("ID"), models.RelationType.Name.label("Type"), models.PackageRelation.RelName.label("Name"), - models.PackageRelation.RelCondition.label("Cond"), - ) - .distinct() - .order_by("Name"), + models.PackageRelation.RelCondition.label("Cond") + ).distinct().order_by("Name"), + # Groups - db.query(models.PackageGroup) - .join( + db.query(models.PackageGroup).join( models.Group, - and_( - models.PackageGroup.GroupID == models.Group.ID, - models.PackageGroup.PackageID.in_(ids), - ), - ) - .with_entities( + and_(models.PackageGroup.GroupID == models.Group.ID, + models.PackageGroup.PackageID.in_(ids)) + ).with_entities( models.PackageGroup.PackageID.label("ID"), literal("Groups").label("Type"), models.Group.Name.label("Name"), - literal(str()).label("Cond"), - ) - .distinct() - .order_by("Name"), + literal(str()).label("Cond") + ).distinct().order_by("Name"), + # Licenses - db.query(models.PackageLicense) - .join(models.License, models.PackageLicense.LicenseID == models.License.ID) - .filter(models.PackageLicense.PackageID.in_(ids)) - .with_entities( + db.query(models.PackageLicense).join( + models.License, + models.PackageLicense.LicenseID == models.License.ID + ).filter( + models.PackageLicense.PackageID.in_(ids) + ).with_entities( models.PackageLicense.PackageID.label("ID"), literal("License").label("Type"), models.License.Name.label("Name"), - literal(str()).label("Cond"), - ) - .distinct() - .order_by("Name"), + literal(str()).label("Cond") + ).distinct().order_by("Name"), + # Keywords - db.query(models.PackageKeyword) - .join( + db.query(models.PackageKeyword).join( models.Package, - and_( - Package.PackageBaseID == PackageKeyword.PackageBaseID, - Package.ID.in_(ids), - ), - ) - .with_entities( + and_(Package.PackageBaseID == PackageKeyword.PackageBaseID, + Package.ID.in_(ids)) + ).with_entities( models.Package.ID.label("ID"), literal("Keywords").label("Type"), models.PackageKeyword.Keyword.label("Name"), - literal(str()).label("Cond"), - ) - .distinct() - .order_by("Name"), - # Co-Maintainer - db.query(models.PackageComaintainer) - .join(models.User, models.User.ID == models.PackageComaintainer.UsersID) - .join( - models.Package, - models.Package.PackageBaseID - == models.PackageComaintainer.PackageBaseID, - ) - .with_entities( - models.Package.ID, - literal("CoMaintainers").label("Type"), - models.User.Username.label("Name"), - literal(str()).label("Cond"), - ) - .distinct() # A package could have the same co-maintainer multiple times - .order_by("Name"), + literal(str()).label("Cond") + ).distinct().order_by("Name") ] # Union all subqueries together. @@ -331,37 +293,10 @@ class RPC: self.extra_info[record.ID][type_].append(name) - def _handle_multiinfo_type( - self, args: list[str] = [], **kwargs - ) -> list[dict[str, Any]]: - self._enforce_args(args) - args = set(args) + return self._assemble_json_data(packages, self._get_info_json_data) - packages = ( - db.query(models.Package) - .join(models.PackageBase) - .join( - models.User, - models.User.ID == models.PackageBase.MaintainerUID, - isouter=True, - ) - .filter(models.Package.Name.in_(args)) - ) - - max_results = config.getint("options", "max_rpc_results") - packages = self.entities(packages).limit(max_results + 1) - - if packages.count() > max_results: - raise RPCError("Too many package results.") - - ids = {pkg.ID for pkg in packages} - self.subquery(ids) - - return self._assemble_json_data(packages, self.get_info_json_data) - - def _handle_search_type( - self, by: str = defaults.RPC_SEARCH_BY, args: list[str] = [] - ) -> list[dict[str, Any]]: + def _handle_search_type(self, by: str = defaults.RPC_SEARCH_BY, + args: List[str] = []) -> List[Dict[str, Any]]: # If `by` isn't maintainer and we don't have any args, raise an error. # In maintainer's case, return all orphans if there are no args, # so we need args to pass through to the handler without errors. @@ -376,77 +311,56 @@ class RPC: search.search_by(by, arg) max_results = config.getint("options", "max_rpc_results") + results = self._entities(search.results()).limit(max_results + 1).all() - query = self.entities(search.results()).limit(max_results + 1) - - # For "provides", we need to union our relation search - # with an exact search since a package always provides itself. - # Turns out that doing this with an OR statement is extremely slow - if by == "provides": - search = RPCSearch() - search._search_by_exact_name(arg) - query = query.union(self.entities(search.results())) - - results = query.all() if len(results) > max_results: raise RPCError("Too many package results.") - data = self._assemble_json_data(results, self.get_json_data) + return self._assemble_json_data(results, self._get_json_data) - # remove Submitter for search results - for pkg in data: - pkg.pop("Submitter") - - return data - - def _handle_msearch_type( - self, args: list[str] = [], **kwargs - ) -> list[dict[str, Any]]: + def _handle_msearch_type(self, args: List[str] = [], **kwargs)\ + -> List[Dict[str, Any]]: return self._handle_search_type(by="m", args=args) - def _handle_suggest_type(self, args: list[str] = [], **kwargs) -> list[str]: + def _handle_suggest_type(self, args: List[str] = [], **kwargs)\ + -> List[str]: if not args: return [] arg = args[0] - packages = ( - db.query(models.Package.Name) - .join(models.PackageBase) - .filter(models.Package.Name.like(f"{arg}%")) - .order_by(models.Package.Name.asc()) - .limit(20) - ) + packages = db.query(models.Package.Name).join( + models.PackageBase + ).filter( + and_(models.PackageBase.PackagerUID.isnot(None), + models.Package.Name.like(f"%{arg}%")) + ).order_by(models.Package.Name.asc()).limit(20) return [pkg.Name for pkg in packages] - def _handle_suggest_pkgbase_type(self, args: list[str] = [], **kwargs) -> list[str]: + def _handle_suggest_pkgbase_type(self, args: List[str] = [], **kwargs)\ + -> List[str]: if not args: return [] - arg = args[0] - packages = ( - db.query(models.PackageBase.Name) - .filter(models.PackageBase.Name.like(f"{arg}%")) - .order_by(models.PackageBase.Name.asc()) - .limit(20) - ) + packages = db.query(models.PackageBase.Name).filter( + and_(models.PackageBase.PackagerUID.isnot(None), + models.PackageBase.Name.like(f"%{args[0]}%")) + ).order_by(models.PackageBase.Name.asc()).limit(20) return [pkg.Name for pkg in packages] def _is_suggestion(self) -> bool: return self.type.startswith("suggest") - def _handle_callback( - self, by: str, args: list[str] - ) -> Union[list[dict[str, Any]], list[str]]: + def _handle_callback(self, by: str, args: List[str])\ + -> Union[List[Dict[str, Any]], List[str]]: # Get a handle to our callback and trap an RPCError with # an empty list of results based on callback's execution. callback = getattr(self, f"_handle_{self.type.replace('-', '_')}_type") results = callback(by=by, args=args) return results - def handle( - self, by: str = defaults.RPC_SEARCH_BY, args: list[str] = [] - ) -> Union[list[dict[str, Any]], dict[str, Any]]: - """Request entrypoint. A router should pass v, type and args + def handle(self, by: str = defaults.RPC_SEARCH_BY, args: List[str] = [])\ + -> Union[List[Dict[str, Any]], Dict[str, Any]]: + """ Request entrypoint. A router should pass v, type and args to this function and expect an output dictionary to be returned. :param v: RPC version argument @@ -477,5 +391,8 @@ class RPC: return results # Return JSON output. - data.update({"resultcount": len(results), "results": results}) + data.update({ + "resultcount": len(results), + "results": results + }) return data diff --git a/aurweb/schema.py b/aurweb/schema.py index 76fd6556..d2644541 100644 --- a/aurweb/schema.py +++ b/aurweb/schema.py @@ -5,18 +5,8 @@ Changes here should always be accompanied by an Alembic migration, which can be usually be automatically generated. See `migrations/README` for details. """ -from sqlalchemy import ( - CHAR, - TIMESTAMP, - Column, - ForeignKey, - Index, - MetaData, - String, - Table, - Text, - text, -) + +from sqlalchemy import CHAR, TIMESTAMP, Column, ForeignKey, Index, MetaData, String, Table, Text, text from sqlalchemy.dialects.mysql import BIGINT, DECIMAL, INTEGER, TINYINT from sqlalchemy.ext.compiler import compiles @@ -25,13 +15,13 @@ import aurweb.config db_backend = aurweb.config.get("database", "backend") -@compiles(TINYINT, "sqlite") +@compiles(TINYINT, 'sqlite') def compile_tinyint_sqlite(type_, compiler, **kw): # pragma: no cover """TINYINT is not supported on SQLite. Substitute it with INTEGER.""" - return "INTEGER" + return 'INTEGER' -@compiles(BIGINT, "sqlite") +@compiles(BIGINT, 'sqlite') def compile_bigint_sqlite(type_, compiler, **kw): # pragma: no cover """ For SQLite's AUTOINCREMENT to work on BIGINT columns, we need to map BIGINT @@ -39,585 +29,429 @@ def compile_bigint_sqlite(type_, compiler, **kw): # pragma: no cover See https://docs.sqlalchemy.org/en/13/dialects/sqlite.html#allowing-autoincrement-behavior-sqlalchemy-types-other-than-integer-integer """ # noqa: E501 - return "INTEGER" + return 'INTEGER' metadata = MetaData() # Define the Account Types for the AUR. AccountTypes = Table( - "AccountTypes", - metadata, - Column("ID", TINYINT(unsigned=True), primary_key=True), - Column("AccountType", String(32), nullable=False, server_default=text("''")), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'AccountTypes', metadata, + Column('ID', TINYINT(unsigned=True), primary_key=True), + Column('AccountType', String(32), nullable=False, server_default=text("''")), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci' ) # User information for each user regardless of type. Users = Table( - "Users", - metadata, - Column("ID", INTEGER(unsigned=True), primary_key=True), - Column( - "AccountTypeID", - ForeignKey("AccountTypes.ID", ondelete="NO ACTION"), - nullable=False, - server_default=text("1"), - ), - Column( - "Suspended", TINYINT(unsigned=True), nullable=False, server_default=text("0") - ), - Column("Username", String(32), nullable=False, unique=True), - Column("Email", String(254), nullable=False, unique=True), - Column("BackupEmail", String(254)), - Column( - "HideEmail", TINYINT(unsigned=True), nullable=False, server_default=text("0") - ), - Column("Passwd", String(255), nullable=False), - Column("Salt", CHAR(32), nullable=False, server_default=text("''")), - Column("ResetKey", CHAR(32), nullable=False, server_default=text("''")), - Column("RealName", String(64), nullable=False, server_default=text("''")), - Column("LangPreference", String(6), nullable=False, server_default=text("'en'")), - Column("Timezone", String(32), nullable=False, server_default=text("'UTC'")), - Column("Homepage", Text), - Column("IRCNick", String(32), nullable=False, server_default=text("''")), - Column("PGPKey", String(40)), - Column( - "LastLogin", BIGINT(unsigned=True), nullable=False, server_default=text("0") - ), - Column("LastLoginIPAddress", String(45)), - Column( - "LastSSHLogin", BIGINT(unsigned=True), nullable=False, server_default=text("0") - ), - Column("LastSSHLoginIPAddress", String(45)), - Column( - "InactivityTS", BIGINT(unsigned=True), nullable=False, server_default=text("0") - ), - Column( - "RegistrationTS", - TIMESTAMP, - nullable=False, - server_default=text("CURRENT_TIMESTAMP"), - ), - Column("CommentNotify", TINYINT(1), nullable=False, server_default=text("1")), - Column("UpdateNotify", TINYINT(1), nullable=False, server_default=text("0")), - Column("OwnershipNotify", TINYINT(1), nullable=False, server_default=text("1")), - Column("SSOAccountID", String(255), nullable=True, unique=True), - Index("UsersAccountTypeID", "AccountTypeID"), - Column( - "HideDeletedComments", - TINYINT(unsigned=True), - nullable=False, - server_default=text("0"), - ), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'Users', metadata, + Column('ID', INTEGER(unsigned=True), primary_key=True), + Column('AccountTypeID', ForeignKey('AccountTypes.ID', ondelete="NO ACTION"), nullable=False, server_default=text("1")), + Column('Suspended', TINYINT(unsigned=True), nullable=False, server_default=text("0")), + Column('Username', String(32), nullable=False, unique=True), + Column('Email', String(254), nullable=False, unique=True), + Column('BackupEmail', String(254)), + Column('HideEmail', TINYINT(unsigned=True), nullable=False, server_default=text("0")), + Column('Passwd', String(255), nullable=False), + Column('Salt', CHAR(32), nullable=False, server_default=text("''")), + Column('ResetKey', CHAR(32), nullable=False, server_default=text("''")), + Column('RealName', String(64), nullable=False, server_default=text("''")), + Column('LangPreference', String(6), nullable=False, server_default=text("'en'")), + Column('Timezone', String(32), nullable=False, server_default=text("'UTC'")), + Column('Homepage', Text), + Column('IRCNick', String(32), nullable=False, server_default=text("''")), + Column('PGPKey', String(40)), + Column('LastLogin', BIGINT(unsigned=True), nullable=False, server_default=text("0")), + Column('LastLoginIPAddress', String(45)), + Column('LastSSHLogin', BIGINT(unsigned=True), nullable=False, server_default=text("0")), + Column('LastSSHLoginIPAddress', String(45)), + Column('InactivityTS', BIGINT(unsigned=True), nullable=False, server_default=text("0")), + Column('RegistrationTS', TIMESTAMP, nullable=False, server_default=text("CURRENT_TIMESTAMP")), + Column('CommentNotify', TINYINT(1), nullable=False, server_default=text("1")), + Column('UpdateNotify', TINYINT(1), nullable=False, server_default=text("0")), + Column('OwnershipNotify', TINYINT(1), nullable=False, server_default=text("1")), + Column('SSOAccountID', String(255), nullable=True, unique=True), + Index('UsersAccountTypeID', 'AccountTypeID'), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # SSH public keys used for the aurweb SSH/Git interface. SSHPubKeys = Table( - "SSHPubKeys", - metadata, - Column("UserID", ForeignKey("Users.ID", ondelete="CASCADE"), nullable=False), - Column("Fingerprint", String(44), primary_key=True), - Column("PubKey", String(4096), nullable=False), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_bin", + 'SSHPubKeys', metadata, + Column('UserID', ForeignKey('Users.ID', ondelete='CASCADE'), nullable=False), + Column('Fingerprint', String(44), primary_key=True), + Column('PubKey', String(4096), nullable=False), + mysql_engine='InnoDB', mysql_charset='utf8mb4', mysql_collate='utf8mb4_bin', ) # Track Users logging in/out of AUR web site. Sessions = Table( - "Sessions", - metadata, - Column("UsersID", ForeignKey("Users.ID", ondelete="CASCADE"), nullable=False), - Column("SessionID", CHAR(32), nullable=False, unique=True), - Column("LastUpdateTS", BIGINT(unsigned=True), nullable=False), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_bin", + 'Sessions', metadata, + Column('UsersID', ForeignKey('Users.ID', ondelete='CASCADE'), nullable=False), + Column('SessionID', CHAR(32), nullable=False, unique=True), + Column('LastUpdateTS', BIGINT(unsigned=True), nullable=False), + mysql_engine='InnoDB', mysql_charset='utf8mb4', mysql_collate='utf8mb4_bin', ) # Information on package bases PackageBases = Table( - "PackageBases", - metadata, - Column("ID", INTEGER(unsigned=True), primary_key=True), - Column("Name", String(255), nullable=False, unique=True), - Column( - "NumVotes", INTEGER(unsigned=True), nullable=False, server_default=text("0") - ), - Column( - "Popularity", - DECIMAL(10, 6, unsigned=True) if db_backend == "mysql" else String(17), - nullable=False, - server_default=text("0"), - ), - Column( - "PopularityUpdated", - TIMESTAMP, - nullable=False, - server_default=text("'1970-01-01 00:00:01.000000'"), - ), - Column("OutOfDateTS", BIGINT(unsigned=True)), - Column("FlaggerComment", Text, nullable=False), - Column("SubmittedTS", BIGINT(unsigned=True), nullable=False), - Column("ModifiedTS", BIGINT(unsigned=True), nullable=False), - Column( - "FlaggerUID", ForeignKey("Users.ID", ondelete="SET NULL") - ), # who flagged the package out-of-date? + 'PackageBases', metadata, + Column('ID', INTEGER(unsigned=True), primary_key=True), + Column('Name', String(255), nullable=False, unique=True), + Column('NumVotes', INTEGER(unsigned=True), nullable=False, server_default=text("0")), + Column('Popularity', + DECIMAL(10, 6, unsigned=True) + if db_backend == "mysql" else String(17), + nullable=False, server_default=text("0")), + Column('OutOfDateTS', BIGINT(unsigned=True)), + Column('FlaggerComment', Text, nullable=False), + Column('SubmittedTS', BIGINT(unsigned=True), nullable=False), + Column('ModifiedTS', BIGINT(unsigned=True), nullable=False), + Column('FlaggerUID', ForeignKey('Users.ID', ondelete='SET NULL')), # who flagged the package out-of-date? # deleting a user will cause packages to be orphaned, not deleted - Column( - "SubmitterUID", ForeignKey("Users.ID", ondelete="SET NULL") - ), # who submitted it? - Column("MaintainerUID", ForeignKey("Users.ID", ondelete="SET NULL")), # User - Column("PackagerUID", ForeignKey("Users.ID", ondelete="SET NULL")), # Last packager - Index("BasesMaintainerUID", "MaintainerUID"), - Index("BasesNumVotes", "NumVotes"), - Index("BasesPackagerUID", "PackagerUID"), - Index("BasesSubmitterUID", "SubmitterUID"), - Index("BasesSubmittedTS", "SubmittedTS"), - Index("BasesModifiedTS", "ModifiedTS"), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + Column('SubmitterUID', ForeignKey('Users.ID', ondelete='SET NULL')), # who submitted it? + Column('MaintainerUID', ForeignKey('Users.ID', ondelete='SET NULL')), # User + Column('PackagerUID', ForeignKey('Users.ID', ondelete='SET NULL')), # Last packager + Index('BasesMaintainerUID', 'MaintainerUID'), + Index('BasesNumVotes', 'NumVotes'), + Index('BasesPackagerUID', 'PackagerUID'), + Index('BasesSubmitterUID', 'SubmitterUID'), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Keywords of package bases PackageKeywords = Table( - "PackageKeywords", - metadata, - Column( - "PackageBaseID", - ForeignKey("PackageBases.ID", ondelete="CASCADE"), - primary_key=True, - nullable=True, - ), - Column( - "Keyword", - String(255), - primary_key=True, - nullable=False, - server_default=text("''"), - ), - Index("KeywordsPackageBaseID", "PackageBaseID"), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'PackageKeywords', metadata, + Column('PackageBaseID', ForeignKey('PackageBases.ID', ondelete='CASCADE'), primary_key=True, nullable=True), + Column('Keyword', String(255), primary_key=True, nullable=False, server_default=text("''")), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Information about the actual packages Packages = Table( - "Packages", - metadata, - Column("ID", INTEGER(unsigned=True), primary_key=True), - Column( - "PackageBaseID", - ForeignKey("PackageBases.ID", ondelete="CASCADE"), - nullable=False, - ), - Column("Name", String(255), nullable=False, unique=True), - Column("Version", String(255), nullable=False, server_default=text("''")), - Column("Description", String(255)), - Column("URL", String(8000)), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'Packages', metadata, + Column('ID', INTEGER(unsigned=True), primary_key=True), + Column('PackageBaseID', ForeignKey('PackageBases.ID', ondelete='CASCADE'), nullable=False), + Column('Name', String(255), nullable=False, unique=True), + Column('Version', String(255), nullable=False, server_default=text("''")), + Column('Description', String(255)), + Column('URL', String(8000)), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Information about licenses Licenses = Table( - "Licenses", - metadata, - Column("ID", INTEGER(unsigned=True), primary_key=True), - Column("Name", String(255), nullable=False, unique=True), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'Licenses', metadata, + Column('ID', INTEGER(unsigned=True), primary_key=True), + Column('Name', String(255), nullable=False, unique=True), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Information about package-license-relations PackageLicenses = Table( - "PackageLicenses", - metadata, - Column( - "PackageID", - ForeignKey("Packages.ID", ondelete="CASCADE"), - primary_key=True, - nullable=True, - ), - Column( - "LicenseID", - ForeignKey("Licenses.ID", ondelete="CASCADE"), - primary_key=True, - nullable=True, - ), - mysql_engine="InnoDB", + 'PackageLicenses', metadata, + Column('PackageID', ForeignKey('Packages.ID', ondelete='CASCADE'), primary_key=True, nullable=True), + Column('LicenseID', ForeignKey('Licenses.ID', ondelete='CASCADE'), primary_key=True, nullable=True), + mysql_engine='InnoDB', ) # Information about groups Groups = Table( - "Groups", - metadata, - Column("ID", INTEGER(unsigned=True), primary_key=True), - Column("Name", String(255), nullable=False, unique=True), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'Groups', metadata, + Column('ID', INTEGER(unsigned=True), primary_key=True), + Column('Name', String(255), nullable=False, unique=True), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Information about package-group-relations PackageGroups = Table( - "PackageGroups", - metadata, - Column( - "PackageID", - ForeignKey("Packages.ID", ondelete="CASCADE"), - primary_key=True, - nullable=True, - ), - Column( - "GroupID", - ForeignKey("Groups.ID", ondelete="CASCADE"), - primary_key=True, - nullable=True, - ), - mysql_engine="InnoDB", + 'PackageGroups', metadata, + Column('PackageID', ForeignKey('Packages.ID', ondelete='CASCADE'), primary_key=True, nullable=True), + Column('GroupID', ForeignKey('Groups.ID', ondelete='CASCADE'), primary_key=True, nullable=True), + mysql_engine='InnoDB', ) # Define the package dependency types DependencyTypes = Table( - "DependencyTypes", - metadata, - Column("ID", TINYINT(unsigned=True), primary_key=True), - Column("Name", String(32), nullable=False, server_default=text("''")), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'DependencyTypes', metadata, + Column('ID', TINYINT(unsigned=True), primary_key=True), + Column('Name', String(32), nullable=False, server_default=text("''")), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Track which dependencies a package has PackageDepends = Table( - "PackageDepends", - metadata, - Column("PackageID", ForeignKey("Packages.ID", ondelete="CASCADE"), nullable=False), - Column( - "DepTypeID", - ForeignKey("DependencyTypes.ID", ondelete="NO ACTION"), - nullable=False, - ), - Column("DepName", String(255), nullable=False), - Column("DepDesc", String(255)), - Column("DepCondition", String(255)), - Column("DepArch", String(255)), - Index("DependsDepName", "DepName"), - Index("DependsPackageID", "PackageID"), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'PackageDepends', metadata, + Column('PackageID', ForeignKey('Packages.ID', ondelete='CASCADE'), nullable=False), + Column('DepTypeID', ForeignKey('DependencyTypes.ID', ondelete="NO ACTION"), nullable=False), + Column('DepName', String(255), nullable=False), + Column('DepDesc', String(255)), + Column('DepCondition', String(255)), + Column('DepArch', String(255)), + Index('DependsDepName', 'DepName'), + Index('DependsPackageID', 'PackageID'), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Define the package relation types RelationTypes = Table( - "RelationTypes", - metadata, - Column("ID", TINYINT(unsigned=True), primary_key=True), - Column("Name", String(32), nullable=False, server_default=text("''")), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'RelationTypes', metadata, + Column('ID', TINYINT(unsigned=True), primary_key=True), + Column('Name', String(32), nullable=False, server_default=text("''")), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Track which conflicts, provides and replaces a package has PackageRelations = Table( - "PackageRelations", - metadata, - Column("PackageID", ForeignKey("Packages.ID", ondelete="CASCADE"), nullable=False), - Column( - "RelTypeID", - ForeignKey("RelationTypes.ID", ondelete="NO ACTION"), - nullable=False, - ), - Column("RelName", String(255), nullable=False), - Column("RelCondition", String(255)), - Column("RelArch", String(255)), - Index("RelationsPackageID", "PackageID"), - Index("RelationsRelName", "RelName"), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'PackageRelations', metadata, + Column('PackageID', ForeignKey('Packages.ID', ondelete='CASCADE'), nullable=False), + Column('RelTypeID', ForeignKey('RelationTypes.ID', ondelete="NO ACTION"), nullable=False), + Column('RelName', String(255), nullable=False), + Column('RelCondition', String(255)), + Column('RelArch', String(255)), + Index('RelationsPackageID', 'PackageID'), + Index('RelationsRelName', 'RelName'), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Track which sources a package has PackageSources = Table( - "PackageSources", - metadata, - Column("PackageID", ForeignKey("Packages.ID", ondelete="CASCADE"), nullable=False), - Column("Source", String(8000), nullable=False, server_default=text("'/dev/null'")), - Column("SourceArch", String(255)), - Index("SourcesPackageID", "PackageID"), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'PackageSources', metadata, + Column('PackageID', ForeignKey('Packages.ID', ondelete='CASCADE'), nullable=False), + Column('Source', String(8000), nullable=False, server_default=text("'/dev/null'")), + Column('SourceArch', String(255)), + Index('SourcesPackageID', 'PackageID'), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Track votes for packages PackageVotes = Table( - "PackageVotes", - metadata, - Column("UsersID", ForeignKey("Users.ID", ondelete="CASCADE"), nullable=False), - Column( - "PackageBaseID", - ForeignKey("PackageBases.ID", ondelete="CASCADE"), - nullable=False, - ), - Column("VoteTS", BIGINT(unsigned=True), nullable=False), - Index("VoteUsersIDPackageID", "UsersID", "PackageBaseID", unique=True), - Index("VotesPackageBaseID", "PackageBaseID"), - Index("VotesUsersID", "UsersID"), - mysql_engine="InnoDB", + 'PackageVotes', metadata, + Column('UsersID', ForeignKey('Users.ID', ondelete='CASCADE'), nullable=False), + Column('PackageBaseID', ForeignKey('PackageBases.ID', ondelete='CASCADE'), nullable=False), + Column('VoteTS', BIGINT(unsigned=True), nullable=False), + Index('VoteUsersIDPackageID', 'UsersID', 'PackageBaseID', unique=True), + Index('VotesPackageBaseID', 'PackageBaseID'), + Index('VotesUsersID', 'UsersID'), + mysql_engine='InnoDB', ) # Record comments for packages PackageComments = Table( - "PackageComments", - metadata, - Column("ID", BIGINT(unsigned=True), primary_key=True), - Column( - "PackageBaseID", - ForeignKey("PackageBases.ID", ondelete="CASCADE"), - nullable=False, - ), - Column("UsersID", ForeignKey("Users.ID", ondelete="SET NULL")), - Column("Comments", Text, nullable=False), - Column("RenderedComment", Text, nullable=False), - Column( - "CommentTS", BIGINT(unsigned=True), nullable=False, server_default=text("0") - ), - Column("EditedTS", BIGINT(unsigned=True)), - Column("EditedUsersID", ForeignKey("Users.ID", ondelete="SET NULL")), - Column("DelTS", BIGINT(unsigned=True)), - Column("DelUsersID", ForeignKey("Users.ID", ondelete="CASCADE")), - Column("PinnedTS", BIGINT(unsigned=True), nullable=False, server_default=text("0")), - Index("CommentsPackageBaseID", "PackageBaseID"), - Index("CommentsUsersID", "UsersID"), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'PackageComments', metadata, + Column('ID', BIGINT(unsigned=True), primary_key=True), + Column('PackageBaseID', ForeignKey('PackageBases.ID', ondelete='CASCADE'), nullable=False), + Column('UsersID', ForeignKey('Users.ID', ondelete='SET NULL')), + Column('Comments', Text, nullable=False), + Column('RenderedComment', Text, nullable=False), + Column('CommentTS', BIGINT(unsigned=True), nullable=False, server_default=text("0")), + Column('EditedTS', BIGINT(unsigned=True)), + Column('EditedUsersID', ForeignKey('Users.ID', ondelete='SET NULL')), + Column('DelTS', BIGINT(unsigned=True)), + Column('DelUsersID', ForeignKey('Users.ID', ondelete='CASCADE')), + Column('PinnedTS', BIGINT(unsigned=True), nullable=False, server_default=text("0")), + Index('CommentsPackageBaseID', 'PackageBaseID'), + Index('CommentsUsersID', 'UsersID'), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Package base co-maintainers PackageComaintainers = Table( - "PackageComaintainers", - metadata, - Column("UsersID", ForeignKey("Users.ID", ondelete="CASCADE"), nullable=False), - Column( - "PackageBaseID", - ForeignKey("PackageBases.ID", ondelete="CASCADE"), - nullable=False, - ), - Column("Priority", INTEGER(unsigned=True), nullable=False), - Index("ComaintainersPackageBaseID", "PackageBaseID"), - Index("ComaintainersUsersID", "UsersID"), - mysql_engine="InnoDB", + 'PackageComaintainers', metadata, + Column('UsersID', ForeignKey('Users.ID', ondelete='CASCADE'), nullable=False), + Column('PackageBaseID', ForeignKey('PackageBases.ID', ondelete='CASCADE'), nullable=False), + Column('Priority', INTEGER(unsigned=True), nullable=False), + Index('ComaintainersPackageBaseID', 'PackageBaseID'), + Index('ComaintainersUsersID', 'UsersID'), + mysql_engine='InnoDB', ) # Package base notifications PackageNotifications = Table( - "PackageNotifications", - metadata, - Column( - "PackageBaseID", - ForeignKey("PackageBases.ID", ondelete="CASCADE"), - nullable=False, - ), - Column("UserID", ForeignKey("Users.ID", ondelete="CASCADE"), nullable=False), - Index("NotifyUserIDPkgID", "UserID", "PackageBaseID", unique=True), - mysql_engine="InnoDB", + 'PackageNotifications', metadata, + Column('PackageBaseID', ForeignKey('PackageBases.ID', ondelete='CASCADE'), nullable=False), + Column('UserID', ForeignKey('Users.ID', ondelete='CASCADE'), nullable=False), + Index('NotifyUserIDPkgID', 'UserID', 'PackageBaseID', unique=True), + mysql_engine='InnoDB', ) # Package name blacklist PackageBlacklist = Table( - "PackageBlacklist", - metadata, - Column("ID", INTEGER(unsigned=True), primary_key=True), - Column("Name", String(64), nullable=False, unique=True), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'PackageBlacklist', metadata, + Column('ID', INTEGER(unsigned=True), primary_key=True), + Column('Name', String(64), nullable=False, unique=True), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Providers in the official repositories OfficialProviders = Table( - "OfficialProviders", - metadata, - Column("ID", INTEGER(unsigned=True), primary_key=True), - Column("Name", String(64), nullable=False), - Column("Repo", String(64), nullable=False), - Column("Provides", String(64), nullable=False), - Index("ProviderNameProvides", "Name", "Provides", unique=True), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_bin", + 'OfficialProviders', metadata, + Column('ID', INTEGER(unsigned=True), primary_key=True), + Column('Name', String(64), nullable=False), + Column('Repo', String(64), nullable=False), + Column('Provides', String(64), nullable=False), + Index('ProviderNameProvides', 'Name', 'Provides', unique=True), + mysql_engine='InnoDB', mysql_charset='utf8mb4', mysql_collate='utf8mb4_bin', ) # Define package request types RequestTypes = Table( - "RequestTypes", - metadata, - Column("ID", TINYINT(unsigned=True), primary_key=True), - Column("Name", String(32), nullable=False, server_default=text("''")), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'RequestTypes', metadata, + Column('ID', TINYINT(unsigned=True), primary_key=True), + Column('Name', String(32), nullable=False, server_default=text("''")), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Package requests PackageRequests = Table( - "PackageRequests", - metadata, - Column("ID", BIGINT(unsigned=True), primary_key=True), - Column( - "ReqTypeID", ForeignKey("RequestTypes.ID", ondelete="NO ACTION"), nullable=False - ), - Column("PackageBaseID", ForeignKey("PackageBases.ID", ondelete="SET NULL")), - Column("PackageBaseName", String(255), nullable=False), - Column("MergeBaseName", String(255)), - Column("UsersID", ForeignKey("Users.ID", ondelete="SET NULL")), - Column("Comments", Text, nullable=False), - Column("ClosureComment", Text, nullable=False), - Column( - "RequestTS", BIGINT(unsigned=True), nullable=False, server_default=text("0") - ), - Column("ClosedTS", BIGINT(unsigned=True)), - Column("ClosedUID", ForeignKey("Users.ID", ondelete="SET NULL")), - Column("Status", TINYINT(unsigned=True), nullable=False, server_default=text("0")), - Index("RequestsPackageBaseID", "PackageBaseID"), - Index("RequestsUsersID", "UsersID"), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'PackageRequests', metadata, + Column('ID', BIGINT(unsigned=True), primary_key=True), + Column('ReqTypeID', ForeignKey('RequestTypes.ID', ondelete="NO ACTION"), nullable=False), + Column('PackageBaseID', ForeignKey('PackageBases.ID', ondelete='SET NULL')), + Column('PackageBaseName', String(255), nullable=False), + Column('MergeBaseName', String(255)), + Column('UsersID', ForeignKey('Users.ID', ondelete='SET NULL')), + Column('Comments', Text, nullable=False), + Column('ClosureComment', Text, nullable=False), + Column('RequestTS', BIGINT(unsigned=True), nullable=False, server_default=text("0")), + Column('ClosedTS', BIGINT(unsigned=True)), + Column('ClosedUID', ForeignKey('Users.ID', ondelete='SET NULL')), + Column('Status', TINYINT(unsigned=True), nullable=False, server_default=text("0")), + Index('RequestsPackageBaseID', 'PackageBaseID'), + Index('RequestsUsersID', 'UsersID'), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Vote information -VoteInfo = Table( - "VoteInfo", - metadata, - Column("ID", INTEGER(unsigned=True), primary_key=True), - Column("Agenda", Text, nullable=False), - Column("User", String(32), nullable=False), - Column("Submitted", BIGINT(unsigned=True), nullable=False), - Column("End", BIGINT(unsigned=True), nullable=False), - Column( - "Quorum", - DECIMAL(2, 2, unsigned=True) if db_backend == "mysql" else String(5), - nullable=False, - ), - Column("SubmitterID", ForeignKey("Users.ID", ondelete="CASCADE"), nullable=False), - Column("Yes", INTEGER(unsigned=True), nullable=False, server_default=text("'0'")), - Column("No", INTEGER(unsigned=True), nullable=False, server_default=text("'0'")), - Column( - "Abstain", INTEGER(unsigned=True), nullable=False, server_default=text("'0'") - ), - Column( - "ActiveUsers", - INTEGER(unsigned=True), - nullable=False, - server_default=text("'0'"), - ), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", +TU_VoteInfo = Table( + 'TU_VoteInfo', metadata, + Column('ID', INTEGER(unsigned=True), primary_key=True), + Column('Agenda', Text, nullable=False), + Column('User', String(32), nullable=False), + Column('Submitted', BIGINT(unsigned=True), nullable=False), + Column('End', BIGINT(unsigned=True), nullable=False), + Column('Quorum', + DECIMAL(2, 2, unsigned=True) + if db_backend == "mysql" else String(5), + nullable=False), + Column('SubmitterID', ForeignKey('Users.ID', ondelete='CASCADE'), nullable=False), + Column('Yes', INTEGER(unsigned=True), nullable=False, server_default=text("'0'")), + Column('No', INTEGER(unsigned=True), nullable=False, server_default=text("'0'")), + Column('Abstain', INTEGER(unsigned=True), nullable=False, server_default=text("'0'")), + Column('ActiveTUs', INTEGER(unsigned=True), nullable=False, server_default=text("'0'")), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Individual vote records -Votes = Table( - "Votes", - metadata, - Column("VoteID", ForeignKey("VoteInfo.ID", ondelete="CASCADE"), nullable=False), - Column("UserID", ForeignKey("Users.ID", ondelete="CASCADE"), nullable=False), - mysql_engine="InnoDB", +TU_Votes = Table( + 'TU_Votes', metadata, + Column('VoteID', ForeignKey('TU_VoteInfo.ID', ondelete='CASCADE'), nullable=False), + Column('UserID', ForeignKey('Users.ID', ondelete='CASCADE'), nullable=False), + mysql_engine='InnoDB', ) # Malicious user banning Bans = Table( - "Bans", - metadata, - Column("IPAddress", String(45), primary_key=True), - Column("BanTS", TIMESTAMP, nullable=False), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'Bans', metadata, + Column('IPAddress', String(45), primary_key=True), + Column('BanTS', TIMESTAMP, nullable=False), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Terms and Conditions Terms = Table( - "Terms", - metadata, - Column("ID", INTEGER(unsigned=True), primary_key=True), - Column("Description", String(255), nullable=False), - Column("URL", String(8000), nullable=False), - Column( - "Revision", INTEGER(unsigned=True), nullable=False, server_default=text("1") - ), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'Terms', metadata, + Column('ID', INTEGER(unsigned=True), primary_key=True), + Column('Description', String(255), nullable=False), + Column('URL', String(8000), nullable=False), + Column('Revision', INTEGER(unsigned=True), nullable=False, server_default=text("1")), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) # Terms and Conditions accepted by users AcceptedTerms = Table( - "AcceptedTerms", - metadata, - Column("UsersID", ForeignKey("Users.ID", ondelete="CASCADE"), nullable=False), - Column("TermsID", ForeignKey("Terms.ID", ondelete="CASCADE"), nullable=False), - Column( - "Revision", INTEGER(unsigned=True), nullable=False, server_default=text("0") - ), - mysql_engine="InnoDB", + 'AcceptedTerms', metadata, + Column('UsersID', ForeignKey('Users.ID', ondelete='CASCADE'), nullable=False), + Column('TermsID', ForeignKey('Terms.ID', ondelete='CASCADE'), nullable=False), + Column('Revision', INTEGER(unsigned=True), nullable=False, server_default=text("0")), + mysql_engine='InnoDB', ) # Rate limits for API ApiRateLimit = Table( - "ApiRateLimit", - metadata, - Column("IP", String(45), primary_key=True, unique=True, default=str()), - Column("Requests", INTEGER(11), nullable=False), - Column("WindowStart", BIGINT(20), nullable=False), - Index("ApiRateLimitWindowStart", "WindowStart"), - mysql_engine="InnoDB", - mysql_charset="utf8mb4", - mysql_collate="utf8mb4_general_ci", + 'ApiRateLimit', metadata, + Column('IP', String(45), primary_key=True, unique=True, default=str()), + Column('Requests', INTEGER(11), nullable=False), + Column('WindowStart', BIGINT(20), nullable=False), + Index('ApiRateLimitWindowStart', 'WindowStart'), + mysql_engine='InnoDB', + mysql_charset='utf8mb4', + mysql_collate='utf8mb4_general_ci', ) diff --git a/aurweb/scripts/adduser.py b/aurweb/scripts/adduser.py index dc928b1f..4cc059d1 100644 --- a/aurweb/scripts/adduser.py +++ b/aurweb/scripts/adduser.py @@ -6,12 +6,12 @@ See `aurweb-adduser --help` for documentation. Copyright (C) 2022 aurweb Development Team All Rights Reserved """ - import argparse import sys import traceback import aurweb.models.account_type as at + from aurweb import db from aurweb.models.account_type import AccountType from aurweb.models.ssh_pub_key import SSHPubKey, get_fingerprint @@ -30,9 +30,8 @@ def parse_args(): parser.add_argument("--ssh-pubkey", help="SSH PubKey") choices = at.ACCOUNT_TYPE_NAME.values() - parser.add_argument( - "-t", "--type", help="Account Type", choices=choices, default=at.USER - ) + parser.add_argument("-t", "--type", help="Account Type", + choices=choices, default=at.USER) return parser.parse_args() @@ -41,29 +40,25 @@ def main(): args = parse_args() db.get_engine() - type = db.query(AccountType, AccountType.AccountType == args.type).first() + type = db.query(AccountType, + AccountType.AccountType == args.type).first() with db.begin(): - user = db.create( - User, - Username=args.username, - Email=args.email, - Passwd=args.password, - RealName=args.realname, - IRCNick=args.ircnick, - PGPKey=args.pgp_key, - AccountType=type, - ) + user = db.create(User, Username=args.username, + Email=args.email, Passwd=args.password, + RealName=args.realname, IRCNick=args.ircnick, + PGPKey=args.pgp_key, AccountType=type) if args.ssh_pubkey: pubkey = args.ssh_pubkey.strip() # Remove host from the pubkey if it's there. - pubkey = " ".join(pubkey.split(" ")[:2]) + pubkey = ' '.join(pubkey.split(' ')[:2]) with db.begin(): - db.create( - SSHPubKey, User=user, PubKey=pubkey, Fingerprint=get_fingerprint(pubkey) - ) + db.create(SSHPubKey, + User=user, + PubKey=pubkey, + Fingerprint=get_fingerprint(pubkey)) print(user.json()) return 0 diff --git a/aurweb/scripts/aurblup.py b/aurweb/scripts/aurblup.py index 10da1d98..9c9059ec 100755 --- a/aurweb/scripts/aurblup.py +++ b/aurweb/scripts/aurblup.py @@ -3,9 +3,11 @@ import re import pyalpm + from sqlalchemy import and_ import aurweb.config + from aurweb import db, util from aurweb.models import OfficialProvider @@ -16,8 +18,8 @@ def _main(force: bool = False): repomap = dict() db_path = aurweb.config.get("aurblup", "db-path") - sync_dbs = aurweb.config.get("aurblup", "sync-dbs").split(" ") - server = aurweb.config.get("aurblup", "server") + sync_dbs = aurweb.config.get('aurblup', 'sync-dbs').split(' ') + server = aurweb.config.get('aurblup', 'server') h = pyalpm.Handle("/", db_path) for sync_db in sync_dbs: @@ -33,46 +35,28 @@ def _main(force: bool = False): providers.add((pkg.name, pkg.name)) repomap[(pkg.name, pkg.name)] = repo.name for provision in pkg.provides: - provisionname = re.sub(r"(<|=|>).*", "", provision) + provisionname = re.sub(r'(<|=|>).*', '', provision) providers.add((pkg.name, provisionname)) repomap[(pkg.name, provisionname)] = repo.name with db.begin(): old_providers = set( - db.query(OfficialProvider) - .with_entities( + db.query(OfficialProvider).with_entities( OfficialProvider.Name.label("Name"), - OfficialProvider.Provides.label("Provides"), - ) - .distinct() - .order_by("Name") - .all() + OfficialProvider.Provides.label("Provides") + ).distinct().order_by("Name").all() ) - # delete providers not existing in any of our alpm repos for name, provides in old_providers.difference(providers): - db.delete_all( - db.query(OfficialProvider).filter( - and_( - OfficialProvider.Name == name, - OfficialProvider.Provides == provides, - ) - ) - ) + db.delete_all(db.query(OfficialProvider).filter( + and_(OfficialProvider.Name == name, + OfficialProvider.Provides == provides) + )) - # add new providers that do not yet exist in our DB for name, provides in providers.difference(old_providers): repo = repomap.get((name, provides)) - db.create(OfficialProvider, Name=name, Repo=repo, Provides=provides) - - # update providers where a pkg was moved from one repo to another - all_providers = db.query(OfficialProvider) - - for op in all_providers: - new_repo = repomap.get((op.Name, op.Provides)) - - if op.Repo != new_repo: - op.Repo = new_repo + db.create(OfficialProvider, Name=name, + Repo=repo, Provides=provides) def main(force: bool = False): @@ -80,5 +64,5 @@ def main(force: bool = False): _main(force) -if __name__ == "__main__": +if __name__ == '__main__': main() diff --git a/aurweb/scripts/config.py b/aurweb/scripts/config.py index 4da3296e..e7c91dd1 100644 --- a/aurweb/scripts/config.py +++ b/aurweb/scripts/config.py @@ -3,7 +3,6 @@ Perform an action on the aurweb config. When AUR_CONFIG_IMMUTABLE is set, the `set` action is noop. """ - import argparse import configparser import os @@ -51,12 +50,12 @@ def parse_args(): actions = ["get", "set", "unset"] parser = argparse.ArgumentParser( description="aurweb configuration tool", - formatter_class=lambda prog: fmt_cls(prog=prog, max_help_position=80), - ) + formatter_class=lambda prog: fmt_cls(prog=prog, max_help_position=80)) parser.add_argument("action", choices=actions, help="script action") parser.add_argument("section", help="config section") parser.add_argument("option", help="config option") - parser.add_argument("value", nargs="?", default=0, help="config option value") + parser.add_argument("value", nargs="?", default=0, + help="config option value") return parser.parse_args() diff --git a/aurweb/scripts/git_archive.py b/aurweb/scripts/git_archive.py deleted file mode 100644 index 8e47cb77..00000000 --- a/aurweb/scripts/git_archive.py +++ /dev/null @@ -1,125 +0,0 @@ -import argparse -import importlib -import os -import sys -import traceback -from datetime import UTC, datetime - -import orjson -import pygit2 - -from aurweb import config - -# Constants -REF = "refs/heads/master" -ORJSON_OPTS = orjson.OPT_SORT_KEYS | orjson.OPT_INDENT_2 - - -def init_repository(git_info) -> None: - pygit2.init_repository(git_info.path) - repo = pygit2.Repository(git_info.path) - for k, v in git_info.config.items(): - repo.config[k] = v - - -def parse_args(): - parser = argparse.ArgumentParser() - parser.add_argument( - "--spec", - type=str, - required=True, - help="name of spec module in the aurweb.archives.spec package", - ) - return parser.parse_args() - - -def update_repository(repo: pygit2.Repository): - # Use git status to determine file changes - has_changes = False - changes = repo.status() - for filepath, flags in changes.items(): - if flags != pygit2.GIT_STATUS_CURRENT: - has_changes = True - break - - if has_changes: - print("diff detected, committing") - # Add everything in the tree. - print("adding files to git tree") - - # Add the tree to staging - repo.index.read() - repo.index.add_all() - repo.index.write() - tree = repo.index.write_tree() - - # Determine base commit; if repo.head.target raises GitError, - # we have no current commits - try: - base = [repo.head.target] - except pygit2.GitError: - base = [] - - utcnow = datetime.now(UTC) - author = pygit2.Signature( - config.get("git-archive", "author"), - config.get("git-archive", "author-email"), - int(utcnow.timestamp()), - 0, - ) - - # Commit the changes - timestamp = utcnow.strftime("%Y-%m-%d %H:%M:%S") - title = f"update - {timestamp}" - repo.create_commit(REF, author, author, title, tree, base) - - print("committed changes") - else: - print("no diff detected") - - -def main() -> int: - args = parse_args() - - print(f"loading '{args.spec}' spec") - spec_package = "aurweb.archives.spec" - module_path = f"{spec_package}.{args.spec}" - spec_module = importlib.import_module(module_path) - print(f"loaded '{args.spec}'") - - # Track repositories that the spec modifies. After we run - # through specs, we want to make a single commit for all - # repositories that contain changes. - repos = dict() - - print(f"running '{args.spec}' spec...") - spec = spec_module.Spec() - for output in spec.generate(): - if not os.path.exists(output.git_info.path / ".git"): - init_repository(output.git_info) - - path = output.git_info.path / output.filename - with open(path, "wb") as f: - f.write(output.data) - - if output.git_info.path not in repos: - repos[output.git_info.path] = pygit2.Repository(output.git_info.path) - - print(f"done running '{args.spec}' spec") - - print("processing repositories") - for path in spec.repos: - print(f"processing repository: {path}") - update_repository(pygit2.Repository(path)) - - return 0 - - -if __name__ == "__main__": - try: - sys.exit(main()) - except KeyboardInterrupt: - sys.exit(0) - except Exception: - traceback.print_exc() - sys.exit(1) diff --git a/aurweb/scripts/mkpkglists.py b/aurweb/scripts/mkpkglists.py index d85a79b9..00096d74 100755 --- a/aurweb/scripts/mkpkglists.py +++ b/aurweb/scripts/mkpkglists.py @@ -24,18 +24,22 @@ import io import os import shutil import sys +import tempfile + from collections import defaultdict -from typing import Any +from typing import Any, Dict import orjson + from sqlalchemy import literal, orm import aurweb.config -from aurweb import aur_logging, db, filters, models, util + +from aurweb import db, filters, logging, models, util from aurweb.benchmark import Benchmark from aurweb.models import Package, PackageBase, User -logger = aur_logging.get_logger("aurweb.scripts.mkpkglists") +logger = logging.get_logger("aurweb.scripts.mkpkglists") TYPE_MAP = { @@ -86,83 +90,68 @@ def get_extended_dict(query: orm.Query): def get_extended_fields(): subqueries = [ # PackageDependency - db.query(models.PackageDependency) - .join(models.DependencyType) - .with_entities( + db.query( + models.PackageDependency + ).join(models.DependencyType).with_entities( models.PackageDependency.PackageID.label("ID"), models.DependencyType.Name.label("Type"), models.PackageDependency.DepName.label("Name"), - models.PackageDependency.DepCondition.label("Cond"), - ) - .distinct() # A package could have the same dependency multiple times - .order_by("Name"), + models.PackageDependency.DepCondition.label("Cond") + ).distinct().order_by("Name"), + # PackageRelation - db.query(models.PackageRelation) - .join(models.RelationType) - .with_entities( + db.query( + models.PackageRelation + ).join(models.RelationType).with_entities( models.PackageRelation.PackageID.label("ID"), models.RelationType.Name.label("Type"), models.PackageRelation.RelName.label("Name"), - models.PackageRelation.RelCondition.label("Cond"), - ) - .distinct() # A package could have the same relation multiple times - .order_by("Name"), + models.PackageRelation.RelCondition.label("Cond") + ).distinct().order_by("Name"), + # Groups - db.query(models.PackageGroup) - .join(models.Group, models.PackageGroup.GroupID == models.Group.ID) - .with_entities( + db.query(models.PackageGroup).join( + models.Group, + models.PackageGroup.GroupID == models.Group.ID + ).with_entities( models.PackageGroup.PackageID.label("ID"), literal("Groups").label("Type"), models.Group.Name.label("Name"), - literal(str()).label("Cond"), - ) - .order_by("Name"), + literal(str()).label("Cond") + ).distinct().order_by("Name"), + # Licenses - db.query(models.PackageLicense) - .join(models.License, models.PackageLicense.LicenseID == models.License.ID) - .with_entities( + db.query(models.PackageLicense).join( + models.License, + models.PackageLicense.LicenseID == models.License.ID + ).with_entities( models.PackageLicense.PackageID.label("ID"), literal("License").label("Type"), models.License.Name.label("Name"), - literal(str()).label("Cond"), - ) - .order_by("Name"), + literal(str()).label("Cond") + ).distinct().order_by("Name"), + # Keywords - db.query(models.PackageKeyword) - .join( - models.Package, Package.PackageBaseID == models.PackageKeyword.PackageBaseID - ) - .with_entities( + db.query(models.PackageKeyword).join( + models.Package, + Package.PackageBaseID == models.PackageKeyword.PackageBaseID + ).with_entities( models.Package.ID.label("ID"), literal("Keywords").label("Type"), models.PackageKeyword.Keyword.label("Name"), - literal(str()).label("Cond"), - ) - .order_by("Name"), - # Co-Maintainer - db.query(models.PackageComaintainer) - .join(models.User, models.User.ID == models.PackageComaintainer.UsersID) - .join( - models.Package, - models.Package.PackageBaseID == models.PackageComaintainer.PackageBaseID, - ) - .with_entities( - models.Package.ID, - literal("CoMaintainers").label("Type"), - models.User.Username.label("Name"), - literal(str()).label("Cond"), - ) - .distinct() # A package could have the same co-maintainer multiple times - .order_by("Name"), + literal(str()).label("Cond") + ).distinct().order_by("Name") ] query = subqueries[0].union_all(*subqueries[1:]) return get_extended_dict(query) -EXTENDED_FIELD_HANDLERS = {"--extended": get_extended_fields} +EXTENDED_FIELD_HANDLERS = { + "--extended": get_extended_fields +} -def as_dict(package: Package) -> dict[str, Any]: +def as_dict(package: Package) -> Dict[str, Any]: return { "ID": package.ID, "Name": package.Name, @@ -175,7 +164,6 @@ def as_dict(package: Package) -> dict[str, Any]: "Popularity": float(package.Popularity), "OutOfDate": package.OutOfDate, "Maintainer": package.Maintainer, - "Submitter": package.Submitter, "FirstSubmitted": package.FirstSubmitted, "LastModified": package.LastModified, } @@ -193,54 +181,49 @@ def _main(): archivedir = aurweb.config.get("mkpkglists", "archivedir") os.makedirs(archivedir, exist_ok=True) - PACKAGES = aurweb.config.get("mkpkglists", "packagesfile") - META = aurweb.config.get("mkpkglists", "packagesmetafile") - META_EXT = aurweb.config.get("mkpkglists", "packagesmetaextfile") - PKGBASE = aurweb.config.get("mkpkglists", "pkgbasefile") - USERS = aurweb.config.get("mkpkglists", "userfile") + PACKAGES = aurweb.config.get('mkpkglists', 'packagesfile') + META = aurweb.config.get('mkpkglists', 'packagesmetafile') + META_EXT = aurweb.config.get('mkpkglists', 'packagesmetaextfile') + PKGBASE = aurweb.config.get('mkpkglists', 'pkgbasefile') + USERS = aurweb.config.get('mkpkglists', 'userfile') bench = Benchmark() - logger.warning(f"{sys.argv[0]} is deprecated and will be soon be removed") logger.info("Started re-creating archives, wait a while...") - Submitter = orm.aliased(User) - - query = ( - db.query(Package) - .join(PackageBase, PackageBase.ID == Package.PackageBaseID) - .join(User, PackageBase.MaintainerUID == User.ID, isouter=True) - .join(Submitter, PackageBase.SubmitterUID == Submitter.ID, isouter=True) - .with_entities( - Package.ID, - Package.Name, - PackageBase.ID.label("PackageBaseID"), - PackageBase.Name.label("PackageBase"), - Package.Version, - Package.Description, - Package.URL, - PackageBase.NumVotes, - PackageBase.Popularity, - PackageBase.OutOfDateTS.label("OutOfDate"), - User.Username.label("Maintainer"), - Submitter.Username.label("Submitter"), - PackageBase.SubmittedTS.label("FirstSubmitted"), - PackageBase.ModifiedTS.label("LastModified"), - ) - .order_by("Name") - ) + query = db.query(Package).join( + PackageBase, + PackageBase.ID == Package.PackageBaseID + ).join( + User, + PackageBase.MaintainerUID == User.ID, + isouter=True + ).filter(PackageBase.PackagerUID.isnot(None)).with_entities( + Package.ID, + Package.Name, + PackageBase.ID.label("PackageBaseID"), + PackageBase.Name.label("PackageBase"), + Package.Version, + Package.Description, + Package.URL, + PackageBase.NumVotes, + PackageBase.Popularity, + PackageBase.OutOfDateTS.label("OutOfDate"), + User.Username.label("Maintainer"), + PackageBase.SubmittedTS.label("FirstSubmitted"), + PackageBase.ModifiedTS.label("LastModified") + ).distinct().order_by("Name") # Produce packages-meta-v1.json.gz output = list() snapshot_uri = aurweb.config.get("options", "snapshot_uri") - tmp_packages = f"{PACKAGES}.tmp" - tmp_meta = f"{META}.tmp" - tmp_metaext = f"{META_EXT}.tmp" + tmpdir = tempfile.mkdtemp() + tmp_packages = os.path.join(tmpdir, os.path.basename(PACKAGES)) + tmp_meta = os.path.join(tmpdir, os.path.basename(META)) + tmp_metaext = os.path.join(tmpdir, os.path.basename(META_EXT)) gzips = { - "packages": gzip.GzipFile( - filename=PACKAGES, mode="wb", fileobj=open(tmp_packages, "wb") - ), - "meta": gzip.GzipFile(filename=META, mode="wb", fileobj=open(tmp_meta, "wb")), + "packages": gzip.open(tmp_packages, "wt"), + "meta": gzip.open(tmp_meta, "wb"), } # Append list opening to the metafile. @@ -249,9 +232,7 @@ def _main(): # Produce packages.gz + packages-meta-ext-v1.json.gz extended = False if len(sys.argv) > 1 and sys.argv[1] in EXTENDED_FIELD_HANDLERS: - gzips["meta_ext"] = gzip.GzipFile( - filename=META_EXT, mode="wb", fileobj=open(tmp_metaext, "wb") - ) + gzips["meta_ext"] = gzip.open(tmp_metaext, "wb") # Append list opening to the meta_ext file. gzips.get("meta_ext").write(b"[\n") f = EXTENDED_FIELD_HANDLERS.get(sys.argv[1]) @@ -260,29 +241,28 @@ def _main(): results = query.all() n = len(results) - 1 - with io.TextIOWrapper(gzips.get("packages")) as p: - for i, result in enumerate(results): - # Append to packages.gz. - p.write(f"{result.Name}\n") + for i, result in enumerate(results): + # Append to packages.gz. + gzips.get("packages").write(f"{result.Name}\n") - # Construct our result JSON dictionary. - item = as_dict(result) - item["URLPath"] = snapshot_uri % result.Name + # Construct our result JSON dictionary. + item = as_dict(result) + item["URLPath"] = snapshot_uri % result.Name - # We stream out package json objects line per line, so - # we also need to include the ',' character at the end - # of package lines (excluding the last package). - suffix = b",\n" if i < n else b"\n" + # We stream out package json objects line per line, so + # we also need to include the ',' character at the end + # of package lines (excluding the last package). + suffix = b",\n" if i < n else b'\n' - # Write out to packagesmetafile - output.append(item) - gzips.get("meta").write(orjson.dumps(output[-1]) + suffix) + # Write out to packagesmetafile + output.append(item) + gzips.get("meta").write(orjson.dumps(output[-1]) + suffix) - if extended: - # Write out to packagesmetaextfile. - data_ = data.get(result.ID, {}) - output[-1].update(data_) - gzips.get("meta_ext").write(orjson.dumps(output[-1]) + suffix) + if extended: + # Write out to packagesmetaextfile. + data_ = data.get(result.ID, {}) + output[-1].update(data_) + gzips.get("meta_ext").write(orjson.dumps(output[-1]) + suffix) # Append the list closing to meta/meta_ext. gzips.get("meta").write(b"]") @@ -293,19 +273,16 @@ def _main(): util.apply_all(gzips.values(), lambda gz: gz.close()) # Produce pkgbase.gz - query = db.query(PackageBase.Name).all() - tmp_pkgbase = f"{PKGBASE}.tmp" - pkgbase_gzip = gzip.GzipFile( - filename=PKGBASE, mode="wb", fileobj=open(tmp_pkgbase, "wb") - ) - with io.TextIOWrapper(pkgbase_gzip) as f: + query = db.query(PackageBase.Name).filter( + PackageBase.PackagerUID.isnot(None)).all() + tmp_pkgbase = os.path.join(tmpdir, os.path.basename(PKGBASE)) + with gzip.open(tmp_pkgbase, "wt") as f: f.writelines([f"{base.Name}\n" for i, base in enumerate(query)]) # Produce users.gz query = db.query(User.Username).all() - tmp_users = f"{USERS}.tmp" - users_gzip = gzip.GzipFile(filename=USERS, mode="wb", fileobj=open(tmp_users, "wb")) - with io.TextIOWrapper(users_gzip) as f: + tmp_users = os.path.join(tmpdir, os.path.basename(USERS)) + with gzip.open(tmp_users, "wt") as f: f.writelines([f"{user.Username}\n" for i, user in enumerate(query)]) files = [ @@ -319,7 +296,7 @@ def _main(): for src, dst in files: checksum = sha256sum(src) - base = os.path.basename(dst) + base = os.path.basename(src) checksum_formatted = f"SHA256 ({base}) = {checksum}" checksum_file = f"{dst}.sha256" @@ -329,6 +306,7 @@ def _main(): # Move the new archive into its rightful place. shutil.move(src, dst) + os.removedirs(tmpdir) seconds = filters.number_format(bench.end(), 4) logger.info(f"Completed in {seconds} seconds.") @@ -339,5 +317,5 @@ def main(): _main() -if __name__ == "__main__": +if __name__ == '__main__': main() diff --git a/aurweb/scripts/notify.py b/aurweb/scripts/notify.py index 0e548be4..c823b09e 100755 --- a/aurweb/scripts/notify.py +++ b/aurweb/scripts/notify.py @@ -13,26 +13,27 @@ import aurweb.config import aurweb.db import aurweb.filters import aurweb.l10n -from aurweb import aur_logging, db + +from aurweb import db, logging from aurweb.models import PackageBase, User from aurweb.models.package_comaintainer import PackageComaintainer from aurweb.models.package_comment import PackageComment from aurweb.models.package_notification import PackageNotification from aurweb.models.package_request import PackageRequest from aurweb.models.request_type import RequestType -from aurweb.models.vote import Vote +from aurweb.models.tu_vote import TUVote -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) -aur_location = aurweb.config.get("options", "aur_location") +aur_location = aurweb.config.get('options', 'aur_location') def headers_msgid(thread_id): - return {"Message-ID": thread_id} + return {'Message-ID': thread_id} def headers_reply(thread_id): - return {"In-Reply-To": thread_id, "References": thread_id} + return {'In-Reply-To': thread_id, 'References': thread_id} class Notification: @@ -45,68 +46,65 @@ class Notification: def get_cc(self): return [] - def get_bcc(self): - return [] - def get_body_fmt(self, lang): - body = "" + body = '' for line in self.get_body(lang).splitlines(): - if line == "--": - body += "--\n" + if line == '--': + body += '--\n' continue - body += textwrap.fill(line, break_long_words=False) + "\n" + body += textwrap.fill(line, break_long_words=False) + '\n' for i, ref in enumerate(self.get_refs()): - body += "\n" + "[%d] %s" % (i + 1, ref) + body += '\n' + '[%d] %s' % (i + 1, ref) return body.rstrip() def _send(self) -> None: - sendmail = aurweb.config.get("notifications", "sendmail") - sender = aurweb.config.get("notifications", "sender") - reply_to = aurweb.config.get("notifications", "reply-to") + sendmail = aurweb.config.get('notifications', 'sendmail') + sender = aurweb.config.get('notifications', 'sender') + reply_to = aurweb.config.get('notifications', 'reply-to') reason = self.__class__.__name__ - if reason.endswith("Notification"): - reason = reason[: -len("Notification")] + if reason.endswith('Notification'): + reason = reason[:-len('Notification')] for recipient in self.get_recipients(): to, lang = recipient - msg = email.mime.text.MIMEText(self.get_body_fmt(lang), "plain", "utf-8") - msg["Subject"] = self.get_subject(lang) - msg["From"] = sender - msg["Reply-to"] = reply_to - msg["To"] = to + msg = email.mime.text.MIMEText(self.get_body_fmt(lang), + 'plain', 'utf-8') + msg['Subject'] = self.get_subject(lang) + msg['From'] = sender + msg['Reply-to'] = reply_to + msg['To'] = to if self.get_cc(): - msg["Cc"] = str.join(", ", self.get_cc()) - msg["X-AUR-Reason"] = reason - msg["Date"] = email.utils.formatdate(localtime=True) + msg['Cc'] = str.join(', ', self.get_cc()) + msg['X-AUR-Reason'] = reason + msg['Date'] = email.utils.formatdate(localtime=True) for key, value in self.get_headers().items(): msg[key] = value - sendmail = aurweb.config.get("notifications", "sendmail") + sendmail = aurweb.config.get('notifications', 'sendmail') if sendmail: # send email using the sendmail binary specified in the # configuration file - p = subprocess.Popen([sendmail, "-t", "-oi"], stdin=subprocess.PIPE) + p = subprocess.Popen([sendmail, '-t', '-oi'], + stdin=subprocess.PIPE) p.communicate(msg.as_bytes()) else: # send email using smtplib; no local MTA required - server_addr = aurweb.config.get("notifications", "smtp-server") - server_port = aurweb.config.getint("notifications", "smtp-port") - use_ssl = aurweb.config.getboolean("notifications", "smtp-use-ssl") - use_starttls = aurweb.config.getboolean( - "notifications", "smtp-use-starttls" - ) - user = aurweb.config.get("notifications", "smtp-user") - passwd = aurweb.config.get("notifications", "smtp-password") + server_addr = aurweb.config.get('notifications', 'smtp-server') + server_port = aurweb.config.getint('notifications', + 'smtp-port') + use_ssl = aurweb.config.getboolean('notifications', + 'smtp-use-ssl') + use_starttls = aurweb.config.getboolean('notifications', + 'smtp-use-starttls') + user = aurweb.config.get('notifications', 'smtp-user') + passwd = aurweb.config.get('notifications', 'smtp-password') classes = { False: smtplib.SMTP, True: smtplib.SMTP_SSL, } - smtp_timeout = aurweb.config.getint("notifications", "smtp-timeout") - server = classes[use_ssl]( - server_addr, server_port, timeout=smtp_timeout - ) + server = classes[use_ssl](server_addr, server_port) if use_starttls: server.ehlo() @@ -117,7 +115,7 @@ class Notification: server.login(user, passwd) server.set_debuglevel(0) - deliver_to = [to] + self.get_cc() + self.get_bcc() + deliver_to = [to] + self.get_cc() server.sendmail(sender, deliver_to, msg.as_bytes()) server.quit() @@ -125,28 +123,23 @@ class Notification: try: self._send() except OSError as exc: - logger.error( - "Unable to emit notification due to an " - "OSError (precise exception following)." - ) + logger.error("Unable to emit notification due to an " + "OSError (precise exception following).") logger.error(str(exc)) class ResetKeyNotification(Notification): def __init__(self, uid): - user = ( - db.query(User) - .filter(and_(User.ID == uid, User.Suspended == 0)) - .with_entities( - User.Username, - User.Email, - User.BackupEmail, - User.LangPreference, - User.ResetKey, - ) - .order_by(User.Username.asc()) - .first() - ) + + user = db.query(User).filter( + and_(User.ID == uid, User.Suspended == 0) + ).with_entities( + User.Username, + User.Email, + User.BackupEmail, + User.LangPreference, + User.ResetKey + ).order_by(User.Username.asc()).first() self._username = user.Username self._to = user.Email @@ -163,65 +156,55 @@ class ResetKeyNotification(Notification): return [(self._to, self._lang)] def get_subject(self, lang): - return aurweb.l10n.translator.translate("AUR Password Reset", lang) + return aurweb.l10n.translator.translate('AUR Password Reset', lang) def get_body(self, lang): return aurweb.l10n.translator.translate( - "A password reset request was submitted for the account " - "{user} associated with your email address. If you wish to " - "reset your password follow the link [1] below, otherwise " - "ignore this message and nothing will happen.", - lang, - ).format(user=self._username) + 'A password reset request was submitted for the account ' + '{user} associated with your email address. If you wish to ' + 'reset your password follow the link [1] below, otherwise ' + 'ignore this message and nothing will happen.', + lang).format(user=self._username) def get_refs(self): - return (aur_location + "/passreset/?resetkey=" + self._resetkey,) + return (aur_location + '/passreset/?resetkey=' + self._resetkey,) class WelcomeNotification(ResetKeyNotification): def get_subject(self, lang): return aurweb.l10n.translator.translate( - "Welcome to the Arch User Repository", lang - ) + 'Welcome to the Arch User Repository', + lang) def get_body(self, lang): return aurweb.l10n.translator.translate( - "Welcome to the Arch User Repository! In order to set an " - "initial password for your new account, please click the " - "link [1] below. If the link does not work, try copying and " - "pasting it into your browser.", - lang, - ) + 'Welcome to the Arch User Repository! In order to set an ' + 'initial password for your new account, please click the ' + 'link [1] below. If the link does not work, try copying and ' + 'pasting it into your browser.', lang) class CommentNotification(Notification): def __init__(self, uid, pkgbase_id, comment_id): - self._user = db.query(User.Username).filter(User.ID == uid).first().Username - self._pkgbase = ( - db.query(PackageBase.Name).filter(PackageBase.ID == pkgbase_id).first().Name - ) - query = ( - db.query(User) - .join(PackageNotification) - .filter( - and_( - User.CommentNotify == 1, - PackageNotification.UserID != uid, - PackageNotification.PackageBaseID == pkgbase_id, - User.Suspended == 0, - ) - ) - .with_entities(User.Email, User.LangPreference) - .distinct() - ) + self._user = db.query(User.Username).filter( + User.ID == uid).first().Username + self._pkgbase = db.query(PackageBase.Name).filter( + PackageBase.ID == pkgbase_id).first().Name + + query = db.query(User).join(PackageNotification).filter( + and_(User.CommentNotify == 1, + PackageNotification.UserID != uid, + PackageNotification.PackageBaseID == pkgbase_id, + User.Suspended == 0) + ).with_entities( + User.Email, + User.LangPreference + ).distinct() self._recipients = [(u.Email, u.LangPreference) for u in query] - pkgcomment = ( - db.query(PackageComment.Comments) - .filter(PackageComment.ID == comment_id) - .first() - ) + pkgcomment = db.query(PackageComment.Comments).filter( + PackageComment.ID == comment_id).first() self._text = pkgcomment.Comments super().__init__() @@ -231,55 +214,49 @@ class CommentNotification(Notification): def get_subject(self, lang): return aurweb.l10n.translator.translate( - "AUR Comment for {pkgbase}", lang - ).format(pkgbase=self._pkgbase) + 'AUR Comment for {pkgbase}', + lang).format(pkgbase=self._pkgbase) def get_body(self, lang): body = aurweb.l10n.translator.translate( - "{user} [1] added the following comment to {pkgbase} [2]:", lang - ).format(user=self._user, pkgbase=self._pkgbase) - body += "\n\n" + self._text + "\n\n--\n" - dnlabel = aurweb.l10n.translator.translate("Disable notifications", lang) + '{user} [1] added the following comment to {pkgbase} [2]:', + lang).format(user=self._user, pkgbase=self._pkgbase) + body += '\n\n' + self._text + '\n\n--\n' + dnlabel = aurweb.l10n.translator.translate( + 'Disable notifications', lang) body += aurweb.l10n.translator.translate( - "If you no longer wish to receive notifications about this " - "package, please go to the package page [2] and select " - '"{label}".', - lang, - ).format(label=dnlabel) + 'If you no longer wish to receive notifications about this ' + 'package, please go to the package page [2] and select ' + '"{label}".', lang).format(label=dnlabel) return body def get_refs(self): - return ( - aur_location + "/account/" + self._user + "/", - aur_location + "/pkgbase/" + self._pkgbase + "/", - ) + return (aur_location + '/account/' + self._user + '/', + aur_location + '/pkgbase/' + self._pkgbase + '/') def get_headers(self): - thread_id = "" + thread_id = '' return headers_reply(thread_id) class UpdateNotification(Notification): def __init__(self, uid, pkgbase_id): - self._user = db.query(User.Username).filter(User.ID == uid).first().Username - self._pkgbase = ( - db.query(PackageBase.Name).filter(PackageBase.ID == pkgbase_id).first().Name - ) - query = ( - db.query(User) - .join(PackageNotification) - .filter( - and_( - User.UpdateNotify == 1, - PackageNotification.UserID != uid, - PackageNotification.PackageBaseID == pkgbase_id, - User.Suspended == 0, - ) - ) - .with_entities(User.Email, User.LangPreference) - .distinct() - ) + self._user = db.query(User.Username).filter( + User.ID == uid).first().Username + self._pkgbase = db.query(PackageBase.Name).filter( + PackageBase.ID == pkgbase_id).first().Name + + query = db.query(User).join(PackageNotification).filter( + and_(User.UpdateNotify == 1, + PackageNotification.UserID != uid, + PackageNotification.PackageBaseID == pkgbase_id, + User.Suspended == 0) + ).with_entities( + User.Email, + User.LangPreference + ).distinct() self._recipients = [(u.Email, u.LangPreference) for u in query] super().__init__() @@ -289,63 +266,55 @@ class UpdateNotification(Notification): def get_subject(self, lang): return aurweb.l10n.translator.translate( - "AUR Package Update: {pkgbase}", lang - ).format(pkgbase=self._pkgbase) + 'AUR Package Update: {pkgbase}', + lang).format(pkgbase=self._pkgbase) def get_body(self, lang): body = aurweb.l10n.translator.translate( - "{user} [1] pushed a new commit to {pkgbase} [2].", lang - ).format(user=self._user, pkgbase=self._pkgbase) - body += "\n\n--\n" - dnlabel = aurweb.l10n.translator.translate("Disable notifications", lang) + '{user} [1] pushed a new commit to {pkgbase} [2].', + lang).format(user=self._user, pkgbase=self._pkgbase) + body += '\n\n--\n' + dnlabel = aurweb.l10n.translator.translate( + 'Disable notifications', lang) body += aurweb.l10n.translator.translate( - "If you no longer wish to receive notifications about this " - "package, please go to the package page [2] and select " - '"{label}".', - lang, - ).format(label=dnlabel) + 'If you no longer wish to receive notifications about this ' + 'package, please go to the package page [2] and select ' + '"{label}".', lang).format(label=dnlabel) return body def get_refs(self): - return ( - aur_location + "/account/" + self._user + "/", - aur_location + "/pkgbase/" + self._pkgbase + "/", - ) + return (aur_location + '/account/' + self._user + '/', + aur_location + '/pkgbase/' + self._pkgbase + '/') def get_headers(self): - thread_id = "" + thread_id = '' return headers_reply(thread_id) class FlagNotification(Notification): def __init__(self, uid, pkgbase_id): - self._user = db.query(User.Username).filter(User.ID == uid).first().Username - self._pkgbase = ( - db.query(PackageBase.Name).filter(PackageBase.ID == pkgbase_id).first().Name - ) - query = ( - db.query(User) - .join(PackageComaintainer, isouter=True) - .join( - PackageBase, - or_( - PackageBase.MaintainerUID == User.ID, - PackageBase.ID == PackageComaintainer.PackageBaseID, - ), - ) - .filter(and_(PackageBase.ID == pkgbase_id, User.Suspended == 0)) - .with_entities(User.Email, User.LangPreference) - .distinct() - .order_by(User.Email) - ) + self._user = db.query(User.Username).filter( + User.ID == uid).first().Username + self._pkgbase = db.query(PackageBase.Name).filter( + PackageBase.ID == pkgbase_id).first().Name + + query = db.query(User).join(PackageComaintainer, isouter=True).join( + PackageBase, + or_(PackageBase.MaintainerUID == User.ID, + PackageBase.ID == PackageComaintainer.PackageBaseID) + ).filter( + and_(PackageBase.ID == pkgbase_id, + User.Suspended == 0) + ).with_entities( + User.Email, + User.LangPreference + ).distinct() self._recipients = [(u.Email, u.LangPreference) for u in query] - pkgbase = ( - db.query(PackageBase.FlaggerComment) - .filter(PackageBase.ID == pkgbase_id) - .first() - ) + pkgbase = db.query(PackageBase.FlaggerComment).filter( + PackageBase.ID == pkgbase_id).first() self._text = pkgbase.FlaggerComment super().__init__() @@ -355,52 +324,43 @@ class FlagNotification(Notification): def get_subject(self, lang): return aurweb.l10n.translator.translate( - "AUR Out-of-date Notification for {pkgbase}", lang - ).format(pkgbase=self._pkgbase) + 'AUR Out-of-date Notification for {pkgbase}', + lang).format(pkgbase=self._pkgbase) def get_body(self, lang): body = aurweb.l10n.translator.translate( - "Your package {pkgbase} [1] has been flagged out-of-date by " "{user} [2]:", - lang, - ).format(pkgbase=self._pkgbase, user=self._user) - body += "\n\n" + self._text + 'Your package {pkgbase} [1] has been flagged out-of-date by ' + '{user} [2]:', lang).format(pkgbase=self._pkgbase, + user=self._user) + body += '\n\n' + self._text return body def get_refs(self): - return ( - aur_location + "/pkgbase/" + self._pkgbase + "/", - aur_location + "/account/" + self._user + "/", - ) + return (aur_location + '/pkgbase/' + self._pkgbase + '/', + aur_location + '/account/' + self._user + '/') class OwnershipEventNotification(Notification): def __init__(self, uid, pkgbase_id): - self._user = db.query(User.Username).filter(User.ID == uid).first().Username - self._pkgbase = ( - db.query(PackageBase.Name).filter(PackageBase.ID == pkgbase_id).first().Name - ) - query = ( - db.query(User) - .join(PackageNotification) - .filter( - and_( - User.OwnershipNotify == 1, - PackageNotification.UserID != uid, - PackageNotification.PackageBaseID == pkgbase_id, - User.Suspended == 0, - ) - ) - .with_entities(User.Email, User.LangPreference) - .distinct() - ) + self._user = db.query(User.Username).filter( + User.ID == uid).first().Username + self._pkgbase = db.query(PackageBase.Name).filter( + PackageBase.ID == pkgbase_id).first().Name + + query = db.query(User).join(PackageNotification).filter( + and_(User.OwnershipNotify == 1, + PackageNotification.UserID != uid, + PackageNotification.PackageBaseID == pkgbase_id, + User.Suspended == 0) + ).with_entities( + User.Email, + User.LangPreference + ).distinct() self._recipients = [(u.Email, u.LangPreference) for u in query] - pkgbase = ( - db.query(PackageBase.FlaggerComment) - .filter(PackageBase.ID == pkgbase_id) - .first() - ) + pkgbase = db.query(PackageBase.FlaggerComment).filter( + PackageBase.ID == pkgbase_id).first() self._text = pkgbase.FlaggerComment super().__init__() @@ -410,42 +370,42 @@ class OwnershipEventNotification(Notification): def get_subject(self, lang): return aurweb.l10n.translator.translate( - "AUR Ownership Notification for {pkgbase}", lang - ).format(pkgbase=self._pkgbase) + 'AUR Ownership Notification for {pkgbase}', + lang).format(pkgbase=self._pkgbase) def get_refs(self): - return ( - aur_location + "/pkgbase/" + self._pkgbase + "/", - aur_location + "/account/" + self._user + "/", - ) + return (aur_location + '/pkgbase/' + self._pkgbase + '/', + aur_location + '/account/' + self._user + '/') class AdoptNotification(OwnershipEventNotification): def get_body(self, lang): return aurweb.l10n.translator.translate( - "The package {pkgbase} [1] was adopted by {user} [2].", lang - ).format(pkgbase=self._pkgbase, user=self._user) + 'The package {pkgbase} [1] was adopted by {user} [2].', + lang).format(pkgbase=self._pkgbase, user=self._user) class DisownNotification(OwnershipEventNotification): def get_body(self, lang): return aurweb.l10n.translator.translate( - "The package {pkgbase} [1] was disowned by {user} " "[2].", lang - ).format(pkgbase=self._pkgbase, user=self._user) + 'The package {pkgbase} [1] was disowned by {user} ' + '[2].', lang).format(pkgbase=self._pkgbase, + user=self._user) class ComaintainershipEventNotification(Notification): def __init__(self, uid, pkgbase_id): - self._pkgbase = ( - db.query(PackageBase.Name).filter(PackageBase.ID == pkgbase_id).first().Name - ) - user = ( - db.query(User) - .filter(User.ID == uid) - .with_entities(User.Email, User.LangPreference) - .first() - ) + self._pkgbase = db.query(PackageBase.Name).filter( + PackageBase.ID == pkgbase_id).first().Name + + user = db.query(User).filter( + and_(User.ID == uid, + User.Suspended == 0) + ).with_entities( + User.Email, + User.LangPreference + ).first() self._to = user.Email self._lang = user.LangPreference @@ -457,59 +417,48 @@ class ComaintainershipEventNotification(Notification): def get_subject(self, lang): return aurweb.l10n.translator.translate( - "AUR Co-Maintainer Notification for {pkgbase}", lang - ).format(pkgbase=self._pkgbase) + 'AUR Co-Maintainer Notification for {pkgbase}', + lang).format(pkgbase=self._pkgbase) def get_refs(self): - return (aur_location + "/pkgbase/" + self._pkgbase + "/",) + return (aur_location + '/pkgbase/' + self._pkgbase + '/',) class ComaintainerAddNotification(ComaintainershipEventNotification): def get_body(self, lang): return aurweb.l10n.translator.translate( - "You were added to the co-maintainer list of {pkgbase} [1].", lang - ).format(pkgbase=self._pkgbase) + 'You were added to the co-maintainer list of {pkgbase} [1].', + lang).format(pkgbase=self._pkgbase) class ComaintainerRemoveNotification(ComaintainershipEventNotification): def get_body(self, lang): return aurweb.l10n.translator.translate( - "You were removed from the co-maintainer list of {pkgbase} " "[1].", lang - ).format(pkgbase=self._pkgbase) + 'You were removed from the co-maintainer list of {pkgbase} ' + '[1].', lang).format(pkgbase=self._pkgbase) class DeleteNotification(Notification): def __init__(self, uid, old_pkgbase_id, new_pkgbase_id=None): - self._user = db.query(User.Username).filter(User.ID == uid).first().Username - self._old_pkgbase = ( - db.query(PackageBase.Name) - .filter(PackageBase.ID == old_pkgbase_id) - .first() - .Name - ) + + self._user = db.query(User.Username).filter( + User.ID == uid).first().Username + self._old_pkgbase = db.query(PackageBase.Name).filter( + PackageBase.ID == old_pkgbase_id).first().Name self._new_pkgbase = None if new_pkgbase_id: - self._new_pkgbase = ( - db.query(PackageBase.Name) - .filter(PackageBase.ID == new_pkgbase_id) - .first() - .Name - ) + self._new_pkgbase = db.query(PackageBase.Name).filter( + PackageBase.ID == new_pkgbase_id).first().Name - query = ( - db.query(User) - .join(PackageNotification) - .filter( - and_( - PackageNotification.UserID != uid, - PackageNotification.PackageBaseID == old_pkgbase_id, - User.Suspended == 0, - ) - ) - .with_entities(User.Email, User.LangPreference) - .distinct() - ) + query = db.query(User).join(PackageNotification).filter( + and_(PackageNotification.UserID != uid, + PackageNotification.PackageBaseID == old_pkgbase_id, + User.Suspended == 0) + ).with_entities( + User.Email, + User.LangPreference + ).distinct() self._recipients = [(u.Email, u.LangPreference) for u in query] super().__init__() @@ -519,77 +468,64 @@ class DeleteNotification(Notification): def get_subject(self, lang): return aurweb.l10n.translator.translate( - "AUR Package deleted: {pkgbase}", lang - ).format(pkgbase=self._old_pkgbase) + 'AUR Package deleted: {pkgbase}', + lang).format(pkgbase=self._old_pkgbase) def get_body(self, lang): if self._new_pkgbase: - dnlabel = aurweb.l10n.translator.translate("Disable notifications", lang) + dnlabel = aurweb.l10n.translator.translate( + 'Disable notifications', lang) return aurweb.l10n.translator.translate( - "{user} [1] merged {old} [2] into {new} [3].\n\n" - "--\n" - "If you no longer wish receive notifications about the " + '{user} [1] merged {old} [2] into {new} [3].\n\n' + '--\n' + 'If you no longer wish receive notifications about the ' 'new package, please go to [3] and click "{label}".', - lang, - ).format( - user=self._user, - old=self._old_pkgbase, - new=self._new_pkgbase, - label=dnlabel, - ) + lang).format(user=self._user, old=self._old_pkgbase, + new=self._new_pkgbase, label=dnlabel) else: return aurweb.l10n.translator.translate( - "{user} [1] deleted {pkgbase} [2].\n\n" - "You will no longer receive notifications about this " - "package.", - lang, - ).format(user=self._user, pkgbase=self._old_pkgbase) + '{user} [1] deleted {pkgbase} [2].\n\n' + 'You will no longer receive notifications about this ' + 'package.', lang).format(user=self._user, + pkgbase=self._old_pkgbase) def get_refs(self): - refs = ( - aur_location + "/account/" + self._user + "/", - aur_location + "/pkgbase/" + self._old_pkgbase + "/", - ) + refs = (aur_location + '/account/' + self._user + '/', + aur_location + '/pkgbase/' + self._old_pkgbase + '/') if self._new_pkgbase: - refs += (aur_location + "/pkgbase/" + self._new_pkgbase + "/",) + refs += (aur_location + '/pkgbase/' + self._new_pkgbase + '/',) return refs class RequestOpenNotification(Notification): def __init__(self, uid, reqid, reqtype, pkgbase_id, merge_into=None): - self._user = db.query(User.Username).filter(User.ID == uid).first().Username - self._pkgbase = ( - db.query(PackageBase.Name).filter(PackageBase.ID == pkgbase_id).first().Name - ) - self._to = aurweb.config.get("options", "aur_request_ml") + self._user = db.query(User.Username).filter( + User.ID == uid).first().Username + self._pkgbase = db.query(PackageBase.Name).filter( + PackageBase.ID == pkgbase_id).first().Name - query = ( - db.query(PackageRequest) - .join(PackageBase) - .join( - PackageComaintainer, - PackageComaintainer.PackageBaseID == PackageRequest.PackageBaseID, - isouter=True, - ) - .join( - User, - or_( - User.ID == PackageRequest.UsersID, - User.ID == PackageBase.MaintainerUID, - User.ID == PackageComaintainer.UsersID, - ), - ) - .filter(and_(PackageRequest.ID == reqid, User.Suspended == 0)) - .with_entities(User.Email, User.HideEmail) - .distinct() - ) - self._cc = [u.Email for u in query if u.HideEmail == 0] - self._bcc = [u.Email for u in query if u.HideEmail == 1] + self._to = aurweb.config.get('options', 'aur_request_ml') - pkgreq = ( - db.query(PackageRequest.Comments).filter(PackageRequest.ID == reqid).first() - ) + query = db.query(PackageRequest).join(PackageBase).join( + PackageComaintainer, + PackageComaintainer.PackageBaseID == PackageRequest.PackageBaseID, + isouter=True + ).join( + User, + or_(User.ID == PackageRequest.UsersID, + User.ID == PackageBase.MaintainerUID, + User.ID == PackageComaintainer.UsersID) + ).filter( + and_(PackageRequest.ID == reqid, + User.Suspended == 0) + ).with_entities( + User.Email + ).distinct() + self._cc = [u.Email for u in query] + + pkgreq = db.query(PackageRequest.Comments).filter( + PackageRequest.ID == reqid).first() self._text = pkgreq.Comments self._reqid = int(reqid) @@ -597,51 +533,36 @@ class RequestOpenNotification(Notification): self._merge_into = merge_into def get_recipients(self): - return [(self._to, "en")] + return [(self._to, 'en')] def get_cc(self): return self._cc - def get_bcc(self): - return self._bcc - def get_subject(self, lang): - return "[PRQ#%d] %s Request for %s" % ( - self._reqid, - self._reqtype.title(), - self._pkgbase, - ) + return '[PRQ#%d] %s Request for %s' % \ + (self._reqid, self._reqtype.title(), self._pkgbase) def get_body(self, lang): if self._merge_into: - body = "%s [1] filed a request to merge %s [2] into %s [3]:" % ( - self._user, - self._pkgbase, - self._merge_into, - ) - body += "\n\n" + self._text + body = '%s [1] filed a request to merge %s [2] into %s [3]:' % \ + (self._user, self._pkgbase, self._merge_into) + body += '\n\n' + self._text else: - an = "an" if self._reqtype[0] in "aeiou" else "a" - body = "%s [1] filed %s %s request for %s [2]:" % ( - self._user, - an, - self._reqtype, - self._pkgbase, - ) - body += "\n\n" + self._text + an = 'an' if self._reqtype[0] in 'aeiou' else 'a' + body = '%s [1] filed %s %s request for %s [2]:' % \ + (self._user, an, self._reqtype, self._pkgbase) + body += '\n\n' + self._text return body def get_refs(self): - refs = ( - aur_location + "/account/" + self._user + "/", - aur_location + "/pkgbase/" + self._pkgbase + "/", - ) + refs = (aur_location + '/account/' + self._user + '/', + aur_location + '/pkgbase/' + self._pkgbase + '/') if self._merge_into: - refs += (aur_location + "/pkgbase/" + self._merge_into + "/",) + refs += (aur_location + '/pkgbase/' + self._merge_into + '/',) return refs def get_headers(self): - thread_id = "" + thread_id = '' # Use a deterministic Message-ID for the first email referencing a # request. headers = headers_msgid(thread_id) @@ -649,46 +570,37 @@ class RequestOpenNotification(Notification): class RequestCloseNotification(Notification): + def __init__(self, uid, reqid, reason): user = db.query(User.Username).filter(User.ID == uid).first() self._user = user.Username if user else None - self._to = aurweb.config.get("options", "aur_request_ml") + self._to = aurweb.config.get('options', 'aur_request_ml') - query = ( - db.query(PackageRequest) - .join(PackageBase) - .join( - PackageComaintainer, - PackageComaintainer.PackageBaseID == PackageRequest.PackageBaseID, - isouter=True, - ) - .join( - User, - or_( - User.ID == PackageRequest.UsersID, - User.ID == PackageBase.MaintainerUID, - User.ID == PackageComaintainer.UsersID, - ), - ) - .filter(and_(PackageRequest.ID == reqid, User.Suspended == 0)) - .with_entities(User.Email, User.HideEmail) - .distinct() - ) - self._cc = [u.Email for u in query if u.HideEmail == 0] - self._bcc = [u.Email for u in query if u.HideEmail == 1] + query = db.query(PackageRequest).join(PackageBase).join( + PackageComaintainer, + PackageComaintainer.PackageBaseID == PackageRequest.PackageBaseID, + isouter=True + ).join( + User, + or_(User.ID == PackageRequest.UsersID, + User.ID == PackageBase.MaintainerUID, + User.ID == PackageComaintainer.UsersID) + ).filter( + and_(PackageRequest.ID == reqid, + User.Suspended == 0) + ).with_entities( + User.Email + ).distinct() + self._cc = [u.Email for u in query] - pkgreq = ( - db.query(PackageRequest) - .join(RequestType) - .filter(PackageRequest.ID == reqid) - .with_entities( - PackageRequest.ClosureComment, - RequestType.Name, - PackageRequest.PackageBaseName, - ) - .first() - ) + pkgreq = db.query(PackageRequest).join(RequestType).filter( + PackageRequest.ID == reqid + ).with_entities( + PackageRequest.ClosureComment, + RequestType.Name, + PackageRequest.PackageBaseName + ).first() self._text = pkgreq.ClosureComment self._reqtype = pkgreq.Name @@ -698,67 +610,54 @@ class RequestCloseNotification(Notification): self._reason = reason def get_recipients(self): - return [(self._to, "en")] + return [(self._to, 'en')] def get_cc(self): return self._cc - def get_bcc(self): - return self._bcc - def get_subject(self, lang): - return "[PRQ#%d] %s Request for %s %s" % ( - self._reqid, - self._reqtype.title(), - self._pkgbase, - self._reason.title(), - ) + return '[PRQ#%d] %s Request for %s %s' % (self._reqid, + self._reqtype.title(), + self._pkgbase, + self._reason.title()) def get_body(self, lang): if self._user: - body = "Request #%d has been %s by %s [1]" % ( - self._reqid, - self._reason, - self._user, - ) + body = 'Request #%d has been %s by %s [1]' % \ + (self._reqid, self._reason, self._user) else: - body = ( - "Request #%d has been %s automatically by the Arch User " - "Repository package request system" % (self._reqid, self._reason) - ) - if self._text.strip() == "": - body += "." + body = 'Request #%d has been %s automatically by the Arch User ' \ + 'Repository package request system' % \ + (self._reqid, self._reason) + if self._text.strip() == '': + body += '.' else: - body += ":\n\n" + self._text + body += ':\n\n' + self._text return body def get_refs(self): if self._user: - return (aur_location + "/account/" + self._user + "/",) + return (aur_location + '/account/' + self._user + '/',) else: return () def get_headers(self): - thread_id = "" + thread_id = '' headers = headers_reply(thread_id) return headers -class VoteReminderNotification(Notification): +class TUVoteReminderNotification(Notification): def __init__(self, vote_id): self._vote_id = int(vote_id) - subquery = db.query(Vote.UserID).filter(Vote.VoteID == vote_id) - query = ( - db.query(User) - .filter( - and_( - User.AccountTypeID.in_((2, 4)), - ~User.ID.in_(subquery), - User.Suspended == 0, - ) - ) - .with_entities(User.Email, User.LangPreference) + subquery = db.query(TUVote.UserID).filter(TUVote.VoteID == vote_id) + query = db.query(User).filter( + and_(User.AccountTypeID.in_((2, 4)), + ~User.ID.in_(subquery), + User.Suspended == 0) + ).with_entities( + User.Email, User.LangPreference ) self._recipients = [(u.Email, u.LangPreference) for u in query] @@ -769,37 +668,36 @@ class VoteReminderNotification(Notification): def get_subject(self, lang): return aurweb.l10n.translator.translate( - "Package Maintainer Vote Reminder: Proposal {id}", lang - ).format(id=self._vote_id) + 'TU Vote Reminder: Proposal {id}', + lang).format(id=self._vote_id) def get_body(self, lang): return aurweb.l10n.translator.translate( - "Please remember to cast your vote on proposal {id} [1]. " - "The voting period ends in less than 48 hours.", - lang, - ).format(id=self._vote_id) + 'Please remember to cast your vote on proposal {id} [1]. ' + 'The voting period ends in less than 48 hours.', + lang).format(id=self._vote_id) def get_refs(self): - return (aur_location + "/package-maintainer/?id=" + str(self._vote_id),) + return (aur_location + '/tu/?id=' + str(self._vote_id),) def main(): db.get_engine() action = sys.argv[1] action_map = { - "send-resetkey": ResetKeyNotification, - "welcome": WelcomeNotification, - "comment": CommentNotification, - "update": UpdateNotification, - "flag": FlagNotification, - "adopt": AdoptNotification, - "disown": DisownNotification, - "comaintainer-add": ComaintainerAddNotification, - "comaintainer-remove": ComaintainerRemoveNotification, - "delete": DeleteNotification, - "request-open": RequestOpenNotification, - "request-close": RequestCloseNotification, - "vote-reminder": VoteReminderNotification, + 'send-resetkey': ResetKeyNotification, + 'welcome': WelcomeNotification, + 'comment': CommentNotification, + 'update': UpdateNotification, + 'flag': FlagNotification, + 'adopt': AdoptNotification, + 'disown': DisownNotification, + 'comaintainer-add': ComaintainerAddNotification, + 'comaintainer-remove': ComaintainerRemoveNotification, + 'delete': DeleteNotification, + 'request-open': RequestOpenNotification, + 'request-close': RequestCloseNotification, + 'tu-vote-reminder': TUVoteReminderNotification, } with db.begin(): @@ -807,5 +705,5 @@ def main(): notification.send() -if __name__ == "__main__": +if __name__ == '__main__': main() diff --git a/aurweb/scripts/pkgmaint.py b/aurweb/scripts/pkgmaint.py index 3d695f8f..2a2c638a 100755 --- a/aurweb/scripts/pkgmaint.py +++ b/aurweb/scripts/pkgmaint.py @@ -11,22 +11,16 @@ def _main(): limit_to = time.utcnow() - 86400 query = db.query(PackageBase).filter( - and_(PackageBase.SubmittedTS < limit_to, PackageBase.PackagerUID.is_(None)) - ) + and_(PackageBase.SubmittedTS < limit_to, + PackageBase.PackagerUID.is_(None))) db.delete_all(query) def main(): - # Previously used to clean up "reserved" packages which never got pushed. - # Let's deactivate this for now since "setup-repo" is gone and we see - # other issue where deletion of a user account might cause unintended - # removal of a package (where PackagerUID account was deleted) - return - db.get_engine() with db.begin(): _main() -if __name__ == "__main__": +if __name__ == '__main__': main() diff --git a/aurweb/scripts/popupdate.py b/aurweb/scripts/popupdate.py index 83506e22..a2a796fd 100755 --- a/aurweb/scripts/popupdate.py +++ b/aurweb/scripts/popupdate.py @@ -1,14 +1,16 @@ #!/usr/bin/env python3 -from datetime import datetime + +from typing import List from sqlalchemy import and_, func -from sqlalchemy.sql.functions import coalesce, sum as _sum +from sqlalchemy.sql.functions import coalesce +from sqlalchemy.sql.functions import sum as _sum -from aurweb import config, db, time +from aurweb import db, time from aurweb.models import PackageBase, PackageVote -def run_variable(pkgbases: list[PackageBase] = []) -> None: +def run_variable(pkgbases: List[PackageBase] = []) -> None: """ Update popularity on a list of PackageBases. @@ -20,26 +22,18 @@ def run_variable(pkgbases: list[PackageBase] = []) -> None: now = time.utcnow() # NumVotes subquery. - votes_subq = ( - db.get_session() - .query(func.count("*")) - .select_from(PackageVote) - .filter(PackageVote.PackageBaseID == PackageBase.ID) + votes_subq = db.get_session().query( + func.count("*") + ).select_from(PackageVote).filter( + PackageVote.PackageBaseID == PackageBase.ID ) # Popularity subquery. - pop_subq = ( - db.get_session() - .query( - coalesce(_sum(func.pow(0.98, (now - PackageVote.VoteTS) / 86400)), 0.0), - ) - .select_from(PackageVote) - .filter( - and_( - PackageVote.PackageBaseID == PackageBase.ID, - PackageVote.VoteTS.isnot(None), - ) - ) + pop_subq = db.get_session().query( + coalesce(_sum(func.pow(0.98, (now - PackageVote.VoteTS) / 86400)), 0.0), + ).select_from(PackageVote).filter( + and_(PackageVote.PackageBaseID == PackageBase.ID, + PackageVote.VoteTS.isnot(None)) ) with db.begin(): @@ -47,30 +41,17 @@ def run_variable(pkgbases: list[PackageBase] = []) -> None: ids = set() if pkgbases: - # If `pkgbases` were given, we should forcefully update the given - # package base records' popularities. ids = {pkgbase.ID for pkgbase in pkgbases} query = query.filter(PackageBase.ID.in_(ids)) - else: - # Otherwise, we should only update popularities which have exceeded - # the popularity interval length. - interval = config.getint("git-archive", "popularity-interval") - query = query.filter( - PackageBase.PopularityUpdated - <= datetime.fromtimestamp((now - interval)) - ) - query.update( - { - "NumVotes": votes_subq.scalar_subquery(), - "Popularity": pop_subq.scalar_subquery(), - "PopularityUpdated": datetime.fromtimestamp(now), - } - ) + query.update({ + "NumVotes": votes_subq.scalar_subquery(), + "Popularity": pop_subq.scalar_subquery() + }) def run_single(pkgbase: PackageBase) -> None: - """A single popupdate. The given pkgbase instance will be + """ A single popupdate. The given pkgbase instance will be refreshed after the database update is done. NOTE: This function is compatible only with aurweb FastAPI. @@ -86,5 +67,5 @@ def main(): run_variable() -if __name__ == "__main__": +if __name__ == '__main__': main() diff --git a/aurweb/scripts/rendercomment.py b/aurweb/scripts/rendercomment.py index 7ff477b7..87f8b89f 100755 --- a/aurweb/scripts/rendercomment.py +++ b/aurweb/scripts/rendercomment.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys + from urllib.parse import quote_plus from xml.etree.ElementTree import Element @@ -9,10 +10,11 @@ import markdown import pygit2 import aurweb.config -from aurweb import aur_logging, db, util + +from aurweb import db, logging, util from aurweb.models import PackageComment -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) class LinkifyExtension(markdown.extensions.Extension): @@ -23,15 +25,13 @@ class LinkifyExtension(markdown.extensions.Extension): # Captures http(s) and ftp URLs until the first non URL-ish character. # Excludes trailing punctuation. - _urlre = ( - r"(\b(?:https?|ftp):\/\/[\w\/\#~:.?+=&%@!\-;,]+?" - r"(?=[.:?\-;,]*(?:[^\w\/\#~:.?+=&%@!\-;,]|$)))" - ) + _urlre = (r'(\b(?:https?|ftp):\/\/[\w\/\#~:.?+=&%@!\-;,]+?' + r'(?=[.:?\-;,]*(?:[^\w\/\#~:.?+=&%@!\-;,]|$)))') def extendMarkdown(self, md): processor = markdown.inlinepatterns.AutolinkInlineProcessor(self._urlre, md) # Register it right after the default <>-link processor (priority 120). - md.inlinePatterns.register(processor, "linkify", 119) + md.inlinePatterns.register(processor, 'linkify', 119) class FlysprayLinksInlineProcessor(markdown.inlinepatterns.InlineProcessor): @@ -43,16 +43,16 @@ class FlysprayLinksInlineProcessor(markdown.inlinepatterns.InlineProcessor): """ def handleMatch(self, m, data): - el = Element("a") - el.set("href", f"https://bugs.archlinux.org/task/{m.group(1)}") + el = Element('a') + el.set('href', f'https://bugs.archlinux.org/task/{m.group(1)}') el.text = markdown.util.AtomicString(m.group(0)) - return el, m.start(0), m.end(0) + return (el, m.start(0), m.end(0)) class FlysprayLinksExtension(markdown.extensions.Extension): def extendMarkdown(self, md): - processor = FlysprayLinksInlineProcessor(r"\bFS#(\d+)\b", md) - md.inlinePatterns.register(processor, "flyspray-links", 118) + processor = FlysprayLinksInlineProcessor(r'\bFS#(\d+)\b', md) + md.inlinePatterns.register(processor, 'flyspray-links', 118) class GitCommitsInlineProcessor(markdown.inlinepatterns.InlineProcessor): @@ -65,30 +65,26 @@ class GitCommitsInlineProcessor(markdown.inlinepatterns.InlineProcessor): """ def __init__(self, md, head): - repo_path = aurweb.config.get("serve", "repo-path") + repo_path = aurweb.config.get('serve', 'repo-path') self._repo = pygit2.Repository(repo_path) self._head = head - super().__init__(r"\b([0-9a-f]{7,40})\b", md) + super().__init__(r'\b([0-9a-f]{7,40})\b', md) def handleMatch(self, m, data): oid = m.group(1) - # Lookup might raise ValueError in case multiple object ID's were found - try: - if oid not in self._repo: - # Unknown OID; preserve the orginal text. - return None, None, None - except ValueError: - # Multiple OID's found; preserve the orginal text. - return None, None, None + if oid not in self._repo: + # Unknown OID; preserve the orginal text. + return (None, None, None) - el = Element("a") + el = Element('a') commit_uri = aurweb.config.get("options", "commit_uri") prefixlen = util.git_search(self._repo, oid) - el.set( - "href", commit_uri % (quote_plus(self._head), quote_plus(oid[:prefixlen])) - ) + el.set('href', commit_uri % ( + quote_plus(self._head), + quote_plus(oid[:prefixlen]) + )) el.text = markdown.util.AtomicString(oid[:prefixlen]) - return el, m.start(0), m.end(0) + return (el, m.start(0), m.end(0)) class GitCommitsExtension(markdown.extensions.Extension): @@ -101,7 +97,7 @@ class GitCommitsExtension(markdown.extensions.Extension): def extendMarkdown(self, md): try: processor = GitCommitsInlineProcessor(md, self._head) - md.inlinePatterns.register(processor, "git-commits", 117) + md.inlinePatterns.register(processor, 'git-commits', 117) except pygit2.GitError: logger.error(f"No git repository found for '{self._head}'.") @@ -109,30 +105,16 @@ class GitCommitsExtension(markdown.extensions.Extension): class HeadingTreeprocessor(markdown.treeprocessors.Treeprocessor): def run(self, doc): for elem in doc: - if elem.tag == "h1": - elem.tag = "h5" - elif elem.tag in ["h2", "h3", "h4", "h5"]: - elem.tag = "h6" + if elem.tag == 'h1': + elem.tag = 'h5' + elif elem.tag in ['h2', 'h3', 'h4', 'h5']: + elem.tag = 'h6' class HeadingExtension(markdown.extensions.Extension): def extendMarkdown(self, md): # Priority doesn't matter since we don't conflict with other processors. - md.treeprocessors.register(HeadingTreeprocessor(md), "heading", 30) - - -class StrikethroughInlineProcessor(markdown.inlinepatterns.InlineProcessor): - def handleMatch(self, m, data): - el = Element("del") - el.text = m.group(1) - return el, m.start(0), m.end(0) - - -class StrikethroughExtension(markdown.extensions.Extension): - def extendMarkdown(self, md): - pattern = r"~~(.*?)~~" - processor = StrikethroughInlineProcessor(pattern, md) - md.inlinePatterns.register(processor, "del", 40) + md.treeprocessors.register(HeadingTreeprocessor(md), 'heading', 30) def save_rendered_comment(comment: PackageComment, html: str): @@ -148,31 +130,16 @@ def update_comment_render(comment: PackageComment) -> None: text = comment.Comments pkgbasename = comment.PackageBase.Name - html = markdown.markdown( - text, - extensions=[ - "md_in_html", - "fenced_code", - LinkifyExtension(), - FlysprayLinksExtension(), - GitCommitsExtension(pkgbasename), - HeadingExtension(), - StrikethroughExtension(), - ], - ) + html = markdown.markdown(text, extensions=[ + 'fenced_code', + LinkifyExtension(), + FlysprayLinksExtension(), + GitCommitsExtension(pkgbasename), + HeadingExtension() + ]) - allowed_tags = list(bleach.sanitizer.ALLOWED_TAGS) + [ - "p", - "pre", - "h4", - "h5", - "h6", - "br", - "hr", - "del", - "details", - "summary", - ] + allowed_tags = (bleach.sanitizer.ALLOWED_TAGS + + ['p', 'pre', 'h4', 'h5', 'h6', 'br', 'hr']) html = bleach.clean(html, tags=allowed_tags) save_rendered_comment(comment, html) db.refresh(comment) @@ -181,9 +148,11 @@ def update_comment_render(comment: PackageComment) -> None: def main(): db.get_engine() comment_id = int(sys.argv[1]) - comment = db.query(PackageComment).filter(PackageComment.ID == comment_id).first() + comment = db.query(PackageComment).filter( + PackageComment.ID == comment_id + ).first() update_comment_render(comment) -if __name__ == "__main__": +if __name__ == '__main__': main() diff --git a/aurweb/scripts/tuvotereminder.py b/aurweb/scripts/tuvotereminder.py new file mode 100755 index 00000000..742fa6d4 --- /dev/null +++ b/aurweb/scripts/tuvotereminder.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 + +from sqlalchemy import and_ + +import aurweb.config + +from aurweb import db, time +from aurweb.models import TUVoteInfo +from aurweb.scripts import notify + +notify_cmd = aurweb.config.get('notifications', 'notify-cmd') + + +def main(): + db.get_engine() + + now = time.utcnow() + + start = aurweb.config.getint("tuvotereminder", "range_start") + filter_from = now + start + + end = aurweb.config.getint("tuvotereminder", "range_end") + filter_to = now + end + + query = db.query(TUVoteInfo.ID).filter( + and_(TUVoteInfo.End >= filter_from, + TUVoteInfo.End <= filter_to) + ) + for voteinfo in query: + notif = notify.TUVoteReminderNotification(voteinfo.ID) + notif.send() + + +if __name__ == '__main__': + main() diff --git a/aurweb/scripts/usermaint.py b/aurweb/scripts/usermaint.py index fb79aeaf..69f9db04 100755 --- a/aurweb/scripts/usermaint.py +++ b/aurweb/scripts/usermaint.py @@ -9,16 +9,14 @@ from aurweb.models import User def _main(): limit_to = time.utcnow() - 86400 * 7 - update_ = ( - update(User).where(User.LastLogin < limit_to).values(LastLoginIPAddress=None) - ) + update_ = update(User).where( + User.LastLogin < limit_to + ).values(LastLoginIPAddress=None) db.get_session().execute(update_) - update_ = ( - update(User) - .where(User.LastSSHLogin < limit_to) - .values(LastSSHLoginIPAddress=None) - ) + update_ = update(User).where( + User.LastSSHLogin < limit_to + ).values(LastSSHLoginIPAddress=None) db.get_session().execute(update_) @@ -28,5 +26,5 @@ def main(): _main() -if __name__ == "__main__": +if __name__ == '__main__': main() diff --git a/aurweb/scripts/votereminder.py b/aurweb/scripts/votereminder.py deleted file mode 100755 index 7d5c0c3b..00000000 --- a/aurweb/scripts/votereminder.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python3 - -from sqlalchemy import and_ - -import aurweb.config -from aurweb import db, time -from aurweb.models import VoteInfo -from aurweb.scripts import notify - -notify_cmd = aurweb.config.get("notifications", "notify-cmd") - - -def main(): - db.get_engine() - - now = time.utcnow() - - start = aurweb.config.getint("votereminder", "range_start") - filter_from = now + start - - end = aurweb.config.getint("votereminder", "range_end") - filter_to = now + end - - query = db.query(VoteInfo.ID).filter( - and_(VoteInfo.End >= filter_from, VoteInfo.End <= filter_to) - ) - for voteinfo in query: - notif = notify.VoteReminderNotification(voteinfo.ID) - notif.send() - - -if __name__ == "__main__": - main() diff --git a/aurweb/spawn.py b/aurweb/spawn.py index cfad54e1..46f2f021 100644 --- a/aurweb/spawn.py +++ b/aurweb/spawn.py @@ -7,6 +7,7 @@ This module uses a global state, since you can’t open two servers with the sam configuration anyway. """ + import argparse import atexit import os @@ -15,17 +16,23 @@ import subprocess import sys import tempfile import time -from typing import Iterable + +from typing import Iterable, List import aurweb.config import aurweb.schema +from aurweb.exceptions import AurwebException + children = [] temporary_dir = None verbosity = 0 -asgi_backend = "" +asgi_backend = '' workers = 1 +PHP_BINARY = os.environ.get("PHP_BINARY", "php") +PHP_MODULES = ["pdo_mysql", "pdo_sqlite"] +PHP_NGINX_PORT = int(os.environ.get("PHP_NGINX_PORT", 8001)) FASTAPI_NGINX_PORT = int(os.environ.get("FASTAPI_NGINX_PORT", 8002)) @@ -42,55 +49,90 @@ class ProcessExceptions(Exception): super().__init__("\n- ".join(messages)) +def validate_php_config() -> None: + """ + Perform a validation check against PHP_BINARY's configuration. + + AurwebException is raised here if checks fail to pass. We require + the 'pdo_mysql' and 'pdo_sqlite' modules to be enabled. + + :raises: AurwebException + :return: None + """ + try: + proc = subprocess.Popen([PHP_BINARY, "-m"], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + out, _ = proc.communicate() + except FileNotFoundError: + raise AurwebException(f"Unable to locate the '{PHP_BINARY}' " + "executable.") + + assert proc.returncode == 0, ("Received non-zero error code " + f"{proc.returncode} from '{PHP_BINARY}'.") + + modules = out.decode().splitlines() + for module in PHP_MODULES: + if module not in modules: + raise AurwebException( + f"PHP does not have the '{module}' module enabled.") + + def generate_nginx_config(): """ Generate an nginx configuration based on aurweb's configuration. The file is generated under `temporary_dir`. Returns the path to the created configuration file. """ + php_bind = aurweb.config.get("php", "bind_address") + php_host = php_bind.split(":")[0] fastapi_bind = aurweb.config.get("fastapi", "bind_address") fastapi_host = fastapi_bind.split(":")[0] config_path = os.path.join(temporary_dir, "nginx.conf") - with open(config_path, "w") as config: - # We double nginx's braces because they conflict with Python's f-strings. - config.write( - f""" - events {{}} - daemon off; - error_log /dev/stderr info; - pid {os.path.join(temporary_dir, "nginx.pid")}; - http {{ - access_log /dev/stdout; - client_body_temp_path {os.path.join(temporary_dir, "client_body")}; - proxy_temp_path {os.path.join(temporary_dir, "proxy")}; - fastcgi_temp_path {os.path.join(temporary_dir, "fastcgi")}1 2; - uwsgi_temp_path {os.path.join(temporary_dir, "uwsgi")}; - scgi_temp_path {os.path.join(temporary_dir, "scgi")}; - server {{ - listen {fastapi_host}:{FASTAPI_NGINX_PORT}; - location / {{ - try_files $uri @proxy_to_app; - }} - location @proxy_to_app {{ - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_redirect off; - proxy_buffering off; - proxy_pass http://{fastapi_bind}; - }} + config = open(config_path, "w") + # We double nginx's braces because they conflict with Python's f-strings. + config.write(f""" + events {{}} + daemon off; + error_log /dev/stderr info; + pid {os.path.join(temporary_dir, "nginx.pid")}; + http {{ + access_log /dev/stdout; + client_body_temp_path {os.path.join(temporary_dir, "client_body")}; + proxy_temp_path {os.path.join(temporary_dir, "proxy")}; + fastcgi_temp_path {os.path.join(temporary_dir, "fastcgi")}1 2; + uwsgi_temp_path {os.path.join(temporary_dir, "uwsgi")}; + scgi_temp_path {os.path.join(temporary_dir, "scgi")}; + server {{ + listen {php_host}:{PHP_NGINX_PORT}; + location / {{ + proxy_pass http://{php_bind}; }} }} - """ - ) + server {{ + listen {fastapi_host}:{FASTAPI_NGINX_PORT}; + location / {{ + try_files $uri @proxy_to_app; + }} + location @proxy_to_app {{ + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_redirect off; + proxy_buffering off; + proxy_pass http://{fastapi_bind}; + }} + }} + }} + """) return config_path -def spawn_child(_args): +def spawn_child(args): """Open a subprocess and add it to the global state.""" if verbosity >= 1: - print(f":: Spawning {_args}", file=sys.stderr) - children.append(subprocess.Popen(_args)) + print(f":: Spawning {args}", file=sys.stderr) + children.append(subprocess.Popen(args)) def start(): @@ -104,28 +146,30 @@ def start(): return atexit.register(stop) - if "AUR_CONFIG" in os.environ: - os.environ["AUR_CONFIG"] = os.path.realpath(os.environ["AUR_CONFIG"]) + if 'AUR_CONFIG' in os.environ: + os.environ['AUR_CONFIG'] = os.path.realpath(os.environ['AUR_CONFIG']) try: terminal_width = os.get_terminal_size().columns except OSError: terminal_width = 80 - print( - "{ruler}\n" - "Spawing FastAPI, then nginx as a reverse proxy.\n" - "Check out {aur_location}\n" - "Hit ^C to terminate everything.\n" - "{ruler}".format( - ruler=("-" * terminal_width), - aur_location=aurweb.config.get("options", "aur_location"), - ) - ) + print("{ruler}\n" + "Spawing PHP and FastAPI, then nginx as a reverse proxy.\n" + "Check out {aur_location}\n" + "Hit ^C to terminate everything.\n" + "{ruler}" + .format(ruler=("-" * terminal_width), + aur_location=aurweb.config.get('options', 'aur_location'))) + + # PHP + php_address = aurweb.config.get("php", "bind_address") + php_host = php_address.split(":")[0] + htmldir = aurweb.config.get("php", "htmldir") + spawn_child(["php", "-S", php_address, "-t", htmldir]) # FastAPI - fastapi_host, fastapi_port = aurweb.config.get("fastapi", "bind_address").rsplit( - ":", 1 - ) + fastapi_host, fastapi_port = aurweb.config.get( + "fastapi", "bind_address").rsplit(":", 1) # Logging config. aurwebdir = aurweb.config.get("options", "aurwebdir") @@ -134,54 +178,42 @@ def start(): backend_args = { "hypercorn": ["-b", f"{fastapi_host}:{fastapi_port}"], "uvicorn": ["--host", fastapi_host, "--port", fastapi_port], - "gunicorn": [ - "--bind", - f"{fastapi_host}:{fastapi_port}", - "-k", - "uvicorn.workers.UvicornWorker", - "-w", - str(workers), - ], + "gunicorn": ["--bind", f"{fastapi_host}:{fastapi_port}", + "-k", "uvicorn.workers.UvicornWorker", + "-w", str(workers)] } backend_args = backend_args.get(asgi_backend) - spawn_child( - [ - "python", - "-m", - asgi_backend, - "--log-config", - fastapi_log_config, - ] - + backend_args - + ["aurweb.asgi:app"] - ) + spawn_child([ + "python", "-m", asgi_backend, + "--log-config", fastapi_log_config, + ] + backend_args + ["aurweb.asgi:app"]) # nginx spawn_child(["nginx", "-p", temporary_dir, "-c", generate_nginx_config()]) - print( - f""" + print(f""" > Started nginx. > - > FastAPI backend: http://{fastapi_host}:{fastapi_port} + > PHP backend: http://{php_address} + > FastAPI backend: http://{fastapi_host}:{fastapi_port} + > + > PHP frontend: http://{php_host}:{PHP_NGINX_PORT} > FastAPI frontend: http://{fastapi_host}:{FASTAPI_NGINX_PORT} > > Frontends are hosted via nginx and should be preferred. -""" - ) +""") -def _kill_children(_children: Iterable, exceptions=None) -> list[Exception]: +def _kill_children(children: Iterable, exceptions: List[Exception] = []) \ + -> List[Exception]: """ Kill each process found in `children`. - :param _children: Iterable of child processes + :param children: Iterable of child processes :param exceptions: Exception memo :return: `exceptions` """ - if exceptions is None: - exceptions = [] - for p in _children: + for p in children: try: p.terminate() if verbosity >= 1: @@ -191,17 +223,16 @@ def _kill_children(_children: Iterable, exceptions=None) -> list[Exception]: return exceptions -def _wait_for_children(_children: Iterable, exceptions=None) -> list[Exception]: +def _wait_for_children(children: Iterable, exceptions: List[Exception] = []) \ + -> List[Exception]: """ Wait for each process to end found in `children`. - :param _children: Iterable of child processes + :param children: Iterable of child processes :param exceptions: Exception memo :return: `exceptions` """ - if exceptions is None: - exceptions = [] - for p in _children: + for p in children: try: rc = p.wait() if rc != 0 and rc != -15: @@ -230,33 +261,29 @@ def stop() -> None: exceptions = _wait_for_children(children, exceptions) children = [] if exceptions: - raise ProcessExceptions("Errors terminating the child processes:", exceptions) + raise ProcessExceptions("Errors terminating the child processes:", + exceptions) -if __name__ == "__main__": +if __name__ == '__main__': parser = argparse.ArgumentParser( - prog="python -m aurweb.spawn", description="Start aurweb's test server." - ) - parser.add_argument( - "-v", "--verbose", action="count", default=0, help="increase verbosity" - ) - choices = ["hypercorn", "gunicorn", "uvicorn"] - parser.add_argument( - "-b", - "--backend", - choices=choices, - default="uvicorn", - help="asgi backend used to launch the python server", - ) - parser.add_argument( - "-w", - "--workers", - default=1, - type=int, - help="number of workers to use in gunicorn", - ) + prog='python -m aurweb.spawn', + description='Start aurweb\'s test server.') + parser.add_argument('-v', '--verbose', action='count', default=0, + help='increase verbosity') + choices = ['hypercorn', 'gunicorn', 'uvicorn'] + parser.add_argument('-b', '--backend', choices=choices, default='uvicorn', + help='asgi backend used to launch the python server') + parser.add_argument("-w", "--workers", default=1, type=int, + help="number of workers to use in gunicorn") args = parser.parse_args() + try: + validate_php_config() + except AurwebException as exc: + print(f"error: {str(exc)}") + sys.exit(1) + verbosity = args.verbose asgi_backend = args.backend workers = args.workers diff --git a/aurweb/statistics.py b/aurweb/statistics.py deleted file mode 100644 index 00a5c151..00000000 --- a/aurweb/statistics.py +++ /dev/null @@ -1,169 +0,0 @@ -from sqlalchemy import func - -from aurweb import config, db, time -from aurweb.cache import db_count_cache, db_query_cache -from aurweb.models import PackageBase, PackageRequest, RequestType, User -from aurweb.models.account_type import ( - PACKAGE_MAINTAINER_AND_DEV_ID, - PACKAGE_MAINTAINER_ID, - USER_ID, -) -from aurweb.models.package_request import ( - ACCEPTED_ID, - CLOSED_ID, - PENDING_ID, - REJECTED_ID, -) -from aurweb.prometheus import PACKAGES, REQUESTS, USERS - -cache_expire = config.getint("cache", "expiry_time_statistics", 300) - -HOMEPAGE_COUNTERS = [ - "package_count", - "orphan_count", - "seven_days_old_added", - "seven_days_old_updated", - "year_old_updated", - "never_updated", - "user_count", - "package_maintainer_count", -] -REQUEST_COUNTERS = [ - "total_requests", - "pending_requests", - "closed_requests", - "accepted_requests", - "rejected_requests", -] -PROMETHEUS_USER_COUNTERS = [ - ("package_maintainer_count", "package_maintainer"), - ("regular_user_count", "user"), -] -PROMETHEUS_PACKAGE_COUNTERS = [ - ("orphan_count", "orphan"), - ("never_updated", "not_updated"), - ("updated_packages", "updated"), -] - - -class Statistics: - seven_days = 86400 * 7 - one_hour = 3600 - year = seven_days * 52 - - def __init__(self, cache_expire: int = None) -> "Statistics": - self.expiry_time = cache_expire - self.now = time.utcnow() - self.seven_days_ago = self.now - self.seven_days - self.year_ago = self.now - self.year - - self.user_query = db.query(User) - self.bases_query = db.query(PackageBase) - self.updated_query = db.query(PackageBase).filter( - PackageBase.ModifiedTS - PackageBase.SubmittedTS >= self.one_hour - ) - self.request_query = db.query(PackageRequest) - - def get_count(self, counter: str) -> int: - query = None - match counter: - # Packages - case "package_count": - query = self.bases_query - case "orphan_count": - query = self.bases_query.filter(PackageBase.MaintainerUID.is_(None)) - case "seven_days_old_added": - query = self.bases_query.filter( - PackageBase.SubmittedTS >= self.seven_days_ago - ) - case "seven_days_old_updated": - query = self.updated_query.filter( - PackageBase.ModifiedTS >= self.seven_days_ago - ) - case "year_old_updated": - query = self.updated_query.filter( - PackageBase.ModifiedTS >= self.year_ago - ) - case "never_updated": - query = self.bases_query.filter( - PackageBase.ModifiedTS - PackageBase.SubmittedTS < self.one_hour - ) - case "updated_packages": - query = self.bases_query.filter( - PackageBase.ModifiedTS - PackageBase.SubmittedTS > self.one_hour, - ~PackageBase.MaintainerUID.is_(None), - ) - # Users - case "user_count": - query = self.user_query - case "package_maintainer_count": - query = self.user_query.filter( - User.AccountTypeID.in_( - ( - PACKAGE_MAINTAINER_ID, - PACKAGE_MAINTAINER_AND_DEV_ID, - ) - ) - ) - case "regular_user_count": - query = self.user_query.filter(User.AccountTypeID == USER_ID) - - # Requests - case "total_requests": - query = self.request_query - case "pending_requests": - query = self.request_query.filter(PackageRequest.Status == PENDING_ID) - case "closed_requests": - query = self.request_query.filter(PackageRequest.Status == CLOSED_ID) - case "accepted_requests": - query = self.request_query.filter(PackageRequest.Status == ACCEPTED_ID) - case "rejected_requests": - query = self.request_query.filter(PackageRequest.Status == REJECTED_ID) - case _: - return -1 - - return db_count_cache(counter, query, expire=self.expiry_time) - - -def update_prometheus_metrics(): - stats = Statistics(cache_expire) - # Users gauge - for counter, utype in PROMETHEUS_USER_COUNTERS: - count = stats.get_count(counter) - USERS.labels(utype).set(count) - - # Packages gauge - for counter, state in PROMETHEUS_PACKAGE_COUNTERS: - count = stats.get_count(counter) - PACKAGES.labels(state).set(count) - - # Requests gauge - query = ( - db.get_session() - .query(PackageRequest, func.count(PackageRequest.ID), RequestType.Name) - .join(RequestType) - .group_by(RequestType.Name, PackageRequest.Status) - ) - results = db_query_cache("request_metrics", query, cache_expire) - for record in results: - status = record[0].status_display() - count = record[1] - rtype = record[2] - REQUESTS.labels(type=rtype, status=status).set(count) - - -def _get_counts(counters: list[str]) -> dict[str, int]: - stats = Statistics(cache_expire) - result = dict() - for counter in counters: - result[counter] = stats.get_count(counter) - - return result - - -def get_homepage_counts() -> dict[str, int]: - return _get_counts(HOMEPAGE_COUNTERS) - - -def get_request_counts() -> dict[str, int]: - return _get_counts(REQUEST_COUNTERS) diff --git a/aurweb/templates.py b/aurweb/templates.py index 51b9d342..ccadb16d 100644 --- a/aurweb/templates.py +++ b/aurweb/templates.py @@ -1,29 +1,28 @@ import copy import functools import os + from http import HTTPStatus from typing import Callable import jinja2 + from fastapi import Request from fastapi.responses import HTMLResponse import aurweb.config -from aurweb import l10n, time + +from aurweb import cookies, l10n, time # Prepare jinja2 objects. -_loader = jinja2.FileSystemLoader( - os.path.join(aurweb.config.get("options", "aurwebdir"), "templates") -) -_env = jinja2.Environment( - loader=_loader, autoescape=True, extensions=["jinja2.ext.i18n"] -) - -DEFAULT_TIMEZONE = aurweb.config.get("options", "default_timezone") +_loader = jinja2.FileSystemLoader(os.path.join( + aurweb.config.get("options", "aurwebdir"), "templates")) +_env = jinja2.Environment(loader=_loader, autoescape=True, + extensions=["jinja2.ext.i18n"]) def register_filter(name: str) -> Callable: - """A decorator that can be used to register a filter. + """ A decorator that can be used to register a filter. Example @register_filter("some_filter") @@ -36,41 +35,35 @@ def register_filter(name: str) -> Callable: :param name: Filter name :return: Callable used for filter """ - def decorator(func): @functools.wraps(func) def wrapper(*args, **kwargs): return func(*args, **kwargs) - _env.filters[name] = wrapper return wrapper - return decorator def register_function(name: str) -> Callable: - """A decorator that can be used to register a function.""" - + """ A decorator that can be used to register a function. + """ def decorator(func): @functools.wraps(func) def wrapper(*args, **kwargs): return func(*args, **kwargs) - if name in _env.globals: raise KeyError(f"Jinja already has a function named '{name}'") _env.globals[name] = wrapper return wrapper - return decorator def make_context(request: Request, title: str, next: str = None): - """Create a context for a jinja2 TemplateResponse.""" + """ Create a context for a jinja2 TemplateResponse. """ import aurweb.auth.creds commit_url = aurweb.config.get_with_fallback("devel", "commit_url", None) commit_hash = aurweb.config.get_with_fallback("devel", "commit_hash", None) - max_chars_comment = aurweb.config.getint("options", "max_chars_comment", 5000) if commit_hash: # Shorten commit_hash to a short Git hash. commit_hash = commit_hash[:7] @@ -92,25 +85,20 @@ def make_context(request: Request, title: str, next: str = None): "config": aurweb.config, "creds": aurweb.auth.creds, "next": next if next else request.url.path, - "version": os.environ.get("COMMIT_HASH", aurweb.config.AURWEB_VERSION), - "max_chars_comment": max_chars_comment, + "version": os.environ.get("COMMIT_HASH", aurweb.config.AURWEB_VERSION) } async def make_variable_context(request: Request, title: str, next: str = None): - """Make a context with variables provided by the user - (query params via GET or form data via POST).""" + """ Make a context with variables provided by the user + (query params via GET or form data via POST). """ context = make_context(request, title, next) - to_copy = ( - dict(request.query_params) - if request.method.lower() == "get" + to_copy = dict(request.query_params) \ + if request.method.lower() == "get" \ else dict(await request.form()) - ) for k, v in to_copy.items(): - if k not in context: - context[k] = v - context["q"] = dict(request.query_params) + context[k] = v return context @@ -121,7 +109,7 @@ def base_template(path: str): def render_raw_template(request: Request, path: str, context: dict): - """Render a Jinja2 multi-lingual template with some context.""" + """ Render a Jinja2 multi-lingual template with some context. """ # Create a deep copy of our jinja2 _environment. The _environment in # total by itself is 48 bytes large (according to sys.getsizeof). # This is done so we can install gettext translations on the template @@ -136,9 +124,19 @@ def render_raw_template(request: Request, path: str, context: dict): return template.render(context) -def render_template( - request: Request, path: str, context: dict, status_code: HTTPStatus = HTTPStatus.OK -): - """Render a template as an HTMLResponse.""" +def render_template(request: Request, + path: str, + context: dict, + status_code: HTTPStatus = HTTPStatus.OK): + """ Render a template as an HTMLResponse. """ rendered = render_raw_template(request, path, context) - return HTMLResponse(rendered, status_code=int(status_code)) + response = HTMLResponse(rendered, status_code=int(status_code)) + + sid = None + if request.user.is_authenticated(): + sid = request.cookies.get("AURSID") + + # Re-emit SID via update_response_cookies with an updated expiration. + # This extends the life of a user session based on the AURREMEMBER + # cookie, which is always set to the "Remember Me" state on login. + return cookies.update_response_cookies(request, response, aursid=sid) diff --git a/aurweb/testing/__init__.py b/aurweb/testing/__init__.py index b9b1d263..8261051d 100644 --- a/aurweb/testing/__init__.py +++ b/aurweb/testing/__init__.py @@ -1,9 +1,10 @@ import aurweb.db + from aurweb import models def setup_test_db(*args): - """This function is to be used to setup a test database before + """ This function is to be used to setup a test database before using it. It takes a variable number of table strings, and for each table in that set of table strings, it deletes all records. @@ -51,8 +52,8 @@ def setup_test_db(*args): models.Session.__tablename__, models.SSHPubKey.__tablename__, models.Term.__tablename__, - models.Vote.__tablename__, - models.VoteInfo.__tablename__, + models.TUVote.__tablename__, + models.TUVoteInfo.__tablename__, models.User.__tablename__, ] diff --git a/aurweb/testing/alpm.py b/aurweb/testing/alpm.py index 61a9315f..6015d859 100644 --- a/aurweb/testing/alpm.py +++ b/aurweb/testing/alpm.py @@ -4,10 +4,12 @@ import re import shutil import subprocess -from aurweb import aur_logging, util +from typing import List + +from aurweb import logging, util from aurweb.templates import base_template -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) class AlpmDatabase: @@ -17,7 +19,6 @@ class AlpmDatabase: This class can be used to add or remove packages from a test repository. """ - repo = "test" def __init__(self, database_root: str): @@ -36,14 +37,13 @@ class AlpmDatabase: os.makedirs(pkgdir) return pkgdir - def add( - self, pkgname: str, pkgver: str, arch: str, provides: list[str] = [] - ) -> None: + def add(self, pkgname: str, pkgver: str, arch: str, + provides: List[str] = []) -> None: context = { "pkgname": pkgname, "pkgver": pkgver, "arch": arch, - "provides": provides, + "provides": provides } template = base_template("testing/alpm_package.j2") pkgdir = self._get_pkgdir(pkgname, pkgver, self.repo) @@ -78,9 +78,8 @@ class AlpmDatabase: self.clean() cmdline = ["bash", "-c", "bsdtar -czvf ../test.db *"] proc = subprocess.run(cmdline, cwd=self.repopath) - assert ( - proc.returncode == 0 - ), f"Bad return code while creating alpm database: {proc.returncode}" + assert proc.returncode == 0, \ + f"Bad return code while creating alpm database: {proc.returncode}" # Print out the md5 hash value of the new test.db. test_db = os.path.join(self.remote, "test.db") diff --git a/aurweb/testing/email.py b/aurweb/testing/email.py index 057ff792..c0be2797 100644 --- a/aurweb/testing/email.py +++ b/aurweb/testing/email.py @@ -5,6 +5,7 @@ import email import os import re import sys + from typing import TextIO @@ -27,7 +28,6 @@ class Email: print(email.headers) """ - TEST_DIR = "test-emails" def __init__(self, serial: int = 1, autoparse: bool = True): @@ -37,15 +37,6 @@ class Email: if autoparse: self._parse() - @staticmethod - def reset() -> None: - # Cleanup all email files for this test suite. - prefix = Email.email_prefix(suite=True) - files = os.listdir(Email.TEST_DIR) - for file in files: - if file.startswith(prefix): - os.remove(os.path.join(Email.TEST_DIR, file)) - @staticmethod def email_prefix(suite: bool = False) -> str: """ @@ -61,7 +52,7 @@ class Email: value = os.environ.get("PYTEST_CURRENT_TEST", "email").split(" ")[0] if suite: value = value.split(":")[0] - return re.sub(r"(\/|\.|,|:)", "_", value) + return re.sub(r'(\/|\.|,|:)', "_", value) @staticmethod def count() -> int: @@ -159,6 +150,6 @@ class Email: lines += [ f"== Email #{i + 1} ==", email.glue(), - f"== End of Email #{i + 1}", + f"== End of Email #{i + 1}" ] print("\n".join(lines), file=file) diff --git a/aurweb/testing/filelock.py b/aurweb/testing/filelock.py index d582f0bf..3a18c153 100644 --- a/aurweb/testing/filelock.py +++ b/aurweb/testing/filelock.py @@ -1,12 +1,13 @@ import hashlib import os + from typing import Callable from posix_ipc import O_CREAT, Semaphore -from aurweb import aur_logging +from aurweb import logging -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) def default_on_create(path): diff --git a/aurweb/testing/git.py b/aurweb/testing/git.py index 39af87de..019d870f 100644 --- a/aurweb/testing/git.py +++ b/aurweb/testing/git.py @@ -1,4 +1,7 @@ import os +import shlex + +from subprocess import PIPE, Popen from typing import Tuple import py @@ -6,7 +9,6 @@ import py from aurweb.models import Package from aurweb.templates import base_template from aurweb.testing.filelock import FileLock -from aurweb.util import shell_exec class GitRepository: @@ -23,7 +25,10 @@ class GitRepository: self.file_lock.lock(on_create=self._setup) def _exec(self, cmdline: str, cwd: str) -> Tuple[int, str, str]: - return shell_exec(cmdline, cwd) + args = shlex.split(cmdline) + proc = Popen(args, cwd=cwd, stdout=PIPE, stderr=PIPE) + out, err = proc.communicate() + return (proc.returncode, out.decode().strip(), err.decode().strip()) def _exec_repository(self, cmdline: str) -> Tuple[int, str, str]: return self._exec(cmdline, cwd=str(self.file_lock.path)) diff --git a/aurweb/testing/html.py b/aurweb/testing/html.py index 16b7322b..f01aaf3d 100644 --- a/aurweb/testing/html.py +++ b/aurweb/testing/html.py @@ -1,4 +1,5 @@ from io import StringIO +from typing import List from lxml import etree @@ -6,7 +7,7 @@ parser = etree.HTMLParser() def parse_root(html: str) -> etree.Element: - """Parse an lxml.etree.ElementTree root from html content. + """ Parse an lxml.etree.ElementTree root from html content. :param html: HTML markup :return: etree.Element @@ -14,11 +15,11 @@ def parse_root(html: str) -> etree.Element: return etree.parse(StringIO(html), parser) -def get_errors(content: str) -> list[etree._Element]: +def get_errors(content: str) -> List[etree._Element]: root = parse_root(content) return root.xpath('//ul[@class="errorlist"]/li') -def get_successes(content: str) -> list[etree._Element]: +def get_successes(content: str) -> List[etree._Element]: root = parse_root(content) return root.xpath('//ul[@class="success"]/li') diff --git a/aurweb/testing/prometheus.py b/aurweb/testing/prometheus.py deleted file mode 100644 index d04190f6..00000000 --- a/aurweb/testing/prometheus.py +++ /dev/null @@ -1,8 +0,0 @@ -from aurweb import prometheus - - -def clear_metrics(): - prometheus.PACKAGES.clear() - prometheus.REQUESTS.clear() - prometheus.SEARCH_REQUESTS.clear() - prometheus.USERS.clear() diff --git a/aurweb/testing/requests.py b/aurweb/testing/requests.py index da463928..be13ab77 100644 --- a/aurweb/testing/requests.py +++ b/aurweb/testing/requests.py @@ -1,9 +1,10 @@ +from typing import Dict + import aurweb.config class User: - """A fake User model.""" - + """ A fake User model. """ # Fake columns. LangPreference = aurweb.config.get("options", "default_lang") Timezone = aurweb.config.get("options", "default_timezone") @@ -16,40 +17,29 @@ class User: class Client: - """A fake FastAPI Request.client object.""" - + """ A fake FastAPI Request.client object. """ # A fake host. host = "127.0.0.1" class URL: - path: str - - def __init__(self, path: str = "/"): - self.path = path + path = "/" class Request: - """A fake Request object which mimics a FastAPI Request for tests.""" - + """ A fake Request object which mimics a FastAPI Request for tests. """ client = Client() url = URL() - def __init__( - self, - user: User = User(), - authenticated: bool = False, - method: str = "GET", - headers: dict[str, str] = dict(), - cookies: dict[str, str] = dict(), - url: str = "/", - query_params: dict[str, str] = dict(), - ) -> "Request": + def __init__(self, + user: User = User(), + authenticated: bool = False, + method: str = "GET", + headers: Dict[str, str] = dict(), + cookies: Dict[str, str] = dict()) -> "Request": self.user = user self.user.authenticated = authenticated self.method = method.upper() self.headers = headers self.cookies = cookies - self.url = URL(path=url) - self.query_params = query_params diff --git a/aurweb/testing/smtp.py b/aurweb/testing/smtp.py index 7596fbe9..da64c93f 100644 --- a/aurweb/testing/smtp.py +++ b/aurweb/testing/smtp.py @@ -2,7 +2,7 @@ class FakeSMTP: - """A fake version of smtplib.SMTP used for testing.""" + """ A fake version of smtplib.SMTP used for testing. """ starttls_enabled = False use_ssl = False @@ -36,11 +36,7 @@ class FakeSMTP: def quit(self) -> None: self.quit_count += 1 - def __call__(self, *args, **kwargs) -> "FakeSMTP": - return self - class FakeSMTP_SSL(FakeSMTP): - """A fake version of smtplib.SMTP_SSL used for testing.""" - + """ A fake version of smtplib.SMTP_SSL used for testing. """ use_ssl = True diff --git a/aurweb/time.py b/aurweb/time.py index 2d5ddcc1..a97ca986 100644 --- a/aurweb/time.py +++ b/aurweb/time.py @@ -1,6 +1,8 @@ import zoneinfo + from collections import OrderedDict -from datetime import UTC, datetime +from datetime import datetime +from urllib.parse import unquote from zoneinfo import ZoneInfo from fastapi import Request @@ -9,7 +11,7 @@ import aurweb.config def tz_offset(name: str): - """Get a timezone offset in the form "+00:00" by its name. + """ Get a timezone offset in the form "+00:00" by its name. Example: tz_offset('America/Los_Angeles') @@ -22,7 +24,7 @@ def tz_offset(name: str): offset = dt.utcoffset().total_seconds() / 60 / 60 # Prefix the offset string with a - or +. - offset_string = "-" if offset < 0 else "+" + offset_string = '-' if offset < 0 else '+' # Remove any negativity from the offset. We want a good offset. :) offset = abs(offset) @@ -40,37 +42,27 @@ def tz_offset(name: str): return offset_string -SUPPORTED_TIMEZONES = OrderedDict( - { - # Flatten out the list of tuples into an OrderedDict. - timezone: offset - for timezone, offset in sorted( - [ - # Comprehend a list of tuples (timezone, offset display string) - # and sort them by (offset, timezone). - (tz, "(UTC%s) %s" % (tz_offset(tz), tz)) - for tz in zoneinfo.available_timezones() - ], - key=lambda element: (tz_offset(element[0]), element[0]), - ) - } -) +SUPPORTED_TIMEZONES = OrderedDict({ + # Flatten out the list of tuples into an OrderedDict. + timezone: offset for timezone, offset in sorted([ + # Comprehend a list of tuples (timezone, offset display string) + # and sort them by (offset, timezone). + (tz, "(UTC%s) %s" % (tz_offset(tz), tz)) + for tz in zoneinfo.available_timezones() + ], key=lambda element: (tz_offset(element[0]), element[0])) +}) -def get_request_timezone(request: Request) -> str: - """Get a request's timezone from either query param or user settings. - We use the configuration's [options] default_timezone otherwise. +def get_request_timezone(request: Request): + """ Get a request's timezone by its AURTZ cookie. We use the + configuration's [options] default_timezone otherwise. @param request FastAPI request """ - request_tz = request.query_params.get("timezone") - if request_tz and request_tz in SUPPORTED_TIMEZONES: - return request_tz - elif ( - request.user.is_authenticated() and request.user.Timezone in SUPPORTED_TIMEZONES - ): - return request.user.Timezone - return aurweb.config.get_with_fallback("options", "default_timezone", "UTC") + default_tz = aurweb.config.get("options", "default_timezone") + if request.user.is_authenticated(): + default_tz = request.user.Timezone + return unquote(request.cookies.get("AURTZ", default_tz)) def now(timezone: str) -> datetime: @@ -89,4 +81,4 @@ def utcnow() -> int: :return: Current UTC timestamp """ - return int(datetime.now(UTC).timestamp()) + return int(datetime.utcnow().timestamp()) diff --git a/aurweb/users/update.py b/aurweb/users/update.py index 759088cd..5a32fd01 100644 --- a/aurweb/users/update.py +++ b/aurweb/users/update.py @@ -1,32 +1,19 @@ -from typing import Any +from typing import Any, Dict from fastapi import Request -from aurweb import db, models, time, util +from aurweb import cookies, db, models, time, util from aurweb.models import SSHPubKey from aurweb.models.ssh_pub_key import get_fingerprint from aurweb.util import strtobool -@db.retry_deadlock -def simple( - U: str = str(), - E: str = str(), - H: bool = False, - BE: str = str(), - R: str = str(), - HP: str = str(), - I: str = str(), - K: str = str(), - J: bool = False, - CN: bool = False, - UN: bool = False, - ON: bool = False, - HDC: bool = False, - S: bool = False, - user: models.User = None, - **kwargs, -) -> None: +def simple(U: str = str(), E: str = str(), H: bool = False, + BE: str = str(), R: str = str(), HP: str = str(), + I: str = str(), K: str = str(), J: bool = False, + CN: bool = False, UN: bool = False, ON: bool = False, + S: bool = False, user: models.User = None, + **kwargs) -> None: now = time.utcnow() with db.begin(): user.Username = U or user.Username @@ -42,38 +29,30 @@ def simple( user.CommentNotify = strtobool(CN) user.UpdateNotify = strtobool(UN) user.OwnershipNotify = strtobool(ON) - user.HideDeletedComments = strtobool(HDC) -@db.retry_deadlock -def language( - L: str = str(), - request: Request = None, - user: models.User = None, - context: dict[str, Any] = {}, - **kwargs, -) -> None: +def language(L: str = str(), + request: Request = None, + user: models.User = None, + context: Dict[str, Any] = {}, + **kwargs) -> None: if L and L != user.LangPreference: with db.begin(): user.LangPreference = L context["language"] = L -@db.retry_deadlock -def timezone( - TZ: str = str(), - request: Request = None, - user: models.User = None, - context: dict[str, Any] = {}, - **kwargs, -) -> None: +def timezone(TZ: str = str(), + request: Request = None, + user: models.User = None, + context: Dict[str, Any] = {}, + **kwargs) -> None: if TZ and TZ != user.Timezone: with db.begin(): user.Timezone = TZ context["language"] = TZ -@db.retry_deadlock def ssh_pubkey(PK: str = str(), user: models.User = None, **kwargs) -> None: if not PK: # If no pubkey is provided, wipe out any pubkeys the user @@ -88,7 +67,8 @@ def ssh_pubkey(PK: str = str(), user: models.User = None, **kwargs) -> None: with db.begin(): # Delete any existing keys we can't find. - to_remove = user.ssh_pub_keys.filter(~SSHPubKey.Fingerprint.in_(fprints)) + to_remove = user.ssh_pub_keys.filter( + ~SSHPubKey.Fingerprint.in_(fprints)) db.delete_all(to_remove) # For each key, if it does not yet exist, create it. @@ -99,29 +79,24 @@ def ssh_pubkey(PK: str = str(), user: models.User = None, **kwargs) -> None: ).exists() if not db.query(exists).scalar(): # No public key exists, create one. - db.create( - models.SSHPubKey, - UserID=user.ID, - PubKey=" ".join([prefix, key]), - Fingerprint=fprints[i], - ) + db.create(models.SSHPubKey, UserID=user.ID, + PubKey=" ".join([prefix, key]), + Fingerprint=fprints[i]) -@db.retry_deadlock -def account_type(T: int = None, user: models.User = None, **kwargs) -> None: +def account_type(T: int = None, + user: models.User = None, + **kwargs) -> None: if T is not None and (T := int(T)) != user.AccountTypeID: with db.begin(): user.AccountTypeID = T -@db.retry_deadlock -def password( - P: str = str(), - request: Request = None, - user: models.User = None, - context: dict[str, Any] = {}, - **kwargs, -) -> None: +def password(P: str = str(), + request: Request = None, + user: models.User = None, + context: Dict[str, Any] = {}, + **kwargs) -> None: if P and not user.valid_password(P): # Remove the fields we consumed for passwords. context["P"] = context["C"] = str() @@ -131,22 +106,8 @@ def password( user.update_password(P) if user == request.user: + remember_me = request.cookies.get("AURREMEMBER", False) + # If the target user is the request user, login with # the updated password to update the Session record. - user.login(request, P) - - -@db.retry_deadlock -def suspend( - S: bool = False, - request: Request = None, - user: models.User = None, - context: dict[str, Any] = {}, - **kwargs, -) -> None: - if S and user.session: - context["S"] = None - with db.begin(): - db.delete_all( - db.query(models.Session).filter(models.Session.UsersID == user.ID) - ) + user.login(request, P, cookies.timeout(remember_me)) diff --git a/aurweb/users/validate.py b/aurweb/users/validate.py index 81484e90..de51e3ff 100644 --- a/aurweb/users/validate.py +++ b/aurweb/users/validate.py @@ -6,11 +6,10 @@ out of form data from /account/register or /account/{username}/edit. All functions in this module raise aurweb.exceptions.ValidationError when encountering invalid criteria and return silently otherwise. """ - from fastapi import Request from sqlalchemy import and_ -from aurweb import aur_logging, config, db, l10n, models, time, util +from aurweb import config, db, l10n, logging, models, time, util from aurweb.auth import creds from aurweb.captcha import get_captcha_answer, get_captcha_salts, get_captcha_token from aurweb.exceptions import ValidationError @@ -18,7 +17,7 @@ from aurweb.models.account_type import ACCOUNT_TYPE_NAME from aurweb.models.ssh_pub_key import get_fingerprint from aurweb.util import strtobool -logger = aur_logging.get_logger(__name__) +logger = logging.get_logger(__name__) def invalid_fields(E: str = str(), U: str = str(), **kwargs) -> None: @@ -26,41 +25,42 @@ def invalid_fields(E: str = str(), U: str = str(), **kwargs) -> None: raise ValidationError(["Missing a required field."]) -def invalid_suspend_permission( - request: Request = None, user: models.User = None, S: str = "False", **kwargs -) -> None: +def invalid_suspend_permission(request: Request = None, + user: models.User = None, + S: str = "False", + **kwargs) -> None: if not request.user.is_elevated() and strtobool(S) != bool(user.Suspended): - raise ValidationError(["You do not have permission to suspend accounts."]) + raise ValidationError([ + "You do not have permission to suspend accounts."]) -def invalid_username( - request: Request = None, U: str = str(), _: l10n.Translator = None, **kwargs -) -> None: +def invalid_username(request: Request = None, U: str = str(), + _: l10n.Translator = None, + **kwargs) -> None: if not util.valid_username(U): username_min_len = config.getint("options", "username_min_len") username_max_len = config.getint("options", "username_max_len") - raise ValidationError( + raise ValidationError([ + "The username is invalid.", [ - "The username is invalid.", - [ - _("It must be between %s and %s characters long") - % (username_min_len, username_max_len), - "Start and end with a letter or number", - "Can contain only one period, underscore or hyphen.", - ], + _("It must be between %s and %s characters long") % ( + username_min_len, username_max_len), + "Start and end with a letter or number", + "Can contain only one period, underscore or hyphen.", ] - ) + ]) -def invalid_password( - P: str = str(), C: str = str(), _: l10n.Translator = None, **kwargs -) -> None: +def invalid_password(P: str = str(), C: str = str(), + _: l10n.Translator = None, **kwargs) -> None: if P: if not util.valid_password(P): - passwd_min_len = config.getint("options", "passwd_min_len") - raise ValidationError( - [_("Your password must be at least %s characters.") % (passwd_min_len)] - ) + username_min_len = config.getint( + "options", "username_min_len") + raise ValidationError([ + _("Your password must be at least %s characters.") % ( + username_min_len) + ]) elif not C: raise ValidationError(["Please confirm your new password."]) elif P != C: @@ -68,21 +68,18 @@ def invalid_password( def is_banned(request: Request = None, **kwargs) -> None: - host = util.get_client_ip(request) + host = request.client.host exists = db.query(models.Ban, models.Ban.IPAddress == host).exists() if db.query(exists).scalar(): - raise ValidationError( - [ - "Account registration has been disabled for your " - "IP address, probably due to sustained spam attacks. " - "Sorry for the inconvenience." - ] - ) + raise ValidationError([ + "Account registration has been disabled for your " + "IP address, probably due to sustained spam attacks. " + "Sorry for the inconvenience." + ]) -def invalid_user_password( - request: Request = None, passwd: str = str(), **kwargs -) -> None: +def invalid_user_password(request: Request = None, passwd: str = str(), + **kwargs) -> None: if request.user.is_authenticated(): if not request.user.valid_password(passwd): raise ValidationError(["Invalid password."]) @@ -100,9 +97,8 @@ def invalid_backup_email(BE: str = str(), **kwargs) -> None: def invalid_homepage(HP: str = str(), **kwargs) -> None: if HP and not util.valid_homepage(HP): - raise ValidationError( - ["The home page is invalid, please specify the full HTTP(s) URL."] - ) + raise ValidationError([ + "The home page is invalid, please specify the full HTTP(s) URL."]) def invalid_pgp_key(K: str = str(), **kwargs) -> None: @@ -110,9 +106,8 @@ def invalid_pgp_key(K: str = str(), **kwargs) -> None: raise ValidationError(["The PGP key fingerprint is invalid."]) -def invalid_ssh_pubkey( - PK: str = str(), user: models.User = None, _: l10n.Translator = None, **kwargs -) -> None: +def invalid_ssh_pubkey(PK: str = str(), user: models.User = None, + _: l10n.Translator = None, **kwargs) -> None: if not PK: return @@ -124,23 +119,15 @@ def invalid_ssh_pubkey( for prefix, key in keys: fingerprint = get_fingerprint(f"{prefix} {key}") - exists = ( - db.query(models.SSHPubKey) - .filter( - and_( - models.SSHPubKey.UserID != user.ID, - models.SSHPubKey.Fingerprint == fingerprint, - ) - ) - .exists() - ) + exists = db.query(models.SSHPubKey).filter( + and_(models.SSHPubKey.UserID != user.ID, + models.SSHPubKey.Fingerprint == fingerprint) + ).exists() if db.query(exists).scalar(): - raise ValidationError( - [ - _("The SSH public key, %s%s%s, is already in use.") - % ("", fingerprint, "") - ] - ) + raise ValidationError([ + _("The SSH public key, %s%s%s, is already in use.") % ( + "", fingerprint, "") + ]) def invalid_language(L: str = str(), **kwargs) -> None: @@ -153,78 +140,60 @@ def invalid_timezone(TZ: str = str(), **kwargs) -> None: raise ValidationError(["Timezone is not currently supported."]) -def username_in_use( - U: str = str(), user: models.User = None, _: l10n.Translator = None, **kwargs -) -> None: - exists = ( - db.query(models.User) - .filter(and_(models.User.ID != user.ID, models.User.Username == U)) - .exists() - ) +def username_in_use(U: str = str(), user: models.User = None, + _: l10n.Translator = None, **kwargs) -> None: + exists = db.query(models.User).filter( + and_(models.User.ID != user.ID, + models.User.Username == U) + ).exists() if db.query(exists).scalar(): # If the username already exists... - raise ValidationError( - [ - _("The username, %s%s%s, is already in use.") - % ("", U, "") - ] - ) + raise ValidationError([ + _("The username, %s%s%s, is already in use.") % ( + "", U, "") + ]) -def email_in_use( - E: str = str(), user: models.User = None, _: l10n.Translator = None, **kwargs -) -> None: - exists = ( - db.query(models.User) - .filter(and_(models.User.ID != user.ID, models.User.Email == E)) - .exists() - ) +def email_in_use(E: str = str(), user: models.User = None, + _: l10n.Translator = None, **kwargs) -> None: + exists = db.query(models.User).filter( + and_(models.User.ID != user.ID, + models.User.Email == E) + ).exists() if db.query(exists).scalar(): # If the email already exists... - raise ValidationError( - [ - _("The address, %s%s%s, is already in use.") - % ("", E, "") - ] - ) + raise ValidationError([ + _("The address, %s%s%s, is already in use.") % ( + "", E, "") + ]) -def invalid_account_type( - T: int = None, - request: Request = None, - user: models.User = None, - _: l10n.Translator = None, - **kwargs, -) -> None: +def invalid_account_type(T: int = None, request: Request = None, + user: models.User = None, + _: l10n.Translator = None, + **kwargs) -> None: if T is not None and (T := int(T)) != user.AccountTypeID: name = ACCOUNT_TYPE_NAME.get(T, None) has_cred = request.user.has_credential(creds.ACCOUNT_CHANGE_TYPE) if name is None: raise ValidationError(["Invalid account type provided."]) elif not has_cred: - raise ValidationError( - ["You do not have permission to change account types."] - ) + raise ValidationError([ + "You do not have permission to change account types."]) elif T > request.user.AccountTypeID: # If the chosen account type is higher than the editor's account # type, the editor doesn't have permission to set the new type. - error = ( - _( - "You do not have permission to change " - "this user's account type to %s." - ) - % name - ) + error = _("You do not have permission to change " + "this user's account type to %s.") % name raise ValidationError([error]) - logger.debug( - f"Package Maintainer '{request.user.Username}' has " - f"modified '{user.Username}' account's type to" - f" {name}." - ) + logger.debug(f"Trusted User '{request.user.Username}' has " + f"modified '{user.Username}' account's type to" + f" {name}.") -def invalid_captcha(captcha_salt: str = None, captcha: str = None, **kwargs) -> None: +def invalid_captcha(captcha_salt: str = None, captcha: str = None, + **kwargs) -> None: if captcha_salt and captcha_salt not in get_captcha_salts(): raise ValidationError(["This CAPTCHA has expired. Please try again."]) diff --git a/aurweb/util.py b/aurweb/util.py index 89efd852..6759794f 100644 --- a/aurweb/util.py +++ b/aurweb/util.py @@ -1,38 +1,39 @@ import math import re import secrets -import shlex import string + from datetime import datetime -from hashlib import sha1 +from distutils.util import strtobool as _strtobool from http import HTTPStatus from subprocess import PIPE, Popen -from typing import Callable, Iterable, Tuple, Union +from typing import Callable, Iterable, List, Tuple, Union from urllib.parse import urlparse import fastapi import pygit2 + from email_validator import EmailSyntaxError, validate_email from fastapi.responses import JSONResponse -from sqlalchemy.orm import Query import aurweb.config -from aurweb import aur_logging, defaults -logger = aur_logging.get_logger(__name__) +from aurweb import defaults, logging + +logger = logging.get_logger(__name__) def make_random_string(length: int) -> str: alphanumerics = string.ascii_lowercase + string.digits - return "".join([secrets.choice(alphanumerics) for i in range(length)]) + return ''.join([secrets.choice(alphanumerics) for i in range(length)]) def make_nonce(length: int = 8): - """Generate a single random nonce. Here, token_hex generates a hex + """ Generate a single random nonce. Here, token_hex generates a hex string of 2 hex characters per byte, where the length give is nbytes. This means that to get our proper string length, we need to cut it in half and truncate off any remaining (in the case that - length was uneven).""" + length was uneven). """ return secrets.token_hex(math.ceil(length / 2))[:length] @@ -45,7 +46,7 @@ def valid_username(username): # Check that username contains: one or more alphanumeric # characters, an optional separator of '.', '-' or '_', followed # by alphanumeric characters. - return re.match(r"^[a-zA-Z0-9]+[.\-_]?[a-zA-Z0-9]+$", username) + return re.match(r'^[a-zA-Z0-9]+[.\-_]?[a-zA-Z0-9]+$', username) def valid_email(email): @@ -82,7 +83,7 @@ def valid_pgp_fingerprint(fp): def jsonify(obj): - """Perform a conversion on obj if it's needed.""" + """ Perform a conversion on obj if it's needed. """ if isinstance(obj, datetime): obj = int(obj.timestamp()) return obj @@ -98,24 +99,24 @@ def apply_all(iterable: Iterable, fn: Callable): return iterable -def sanitize_params(offset_str: str, per_page_str: str) -> Tuple[int, int]: +def sanitize_params(offset: str, per_page: str) -> Tuple[int, int]: try: - offset = defaults.O if int(offset_str) < 0 else int(offset_str) + offset = int(offset) except ValueError: offset = defaults.O try: - per_page = defaults.PP if int(per_page_str) <= 0 else int(per_page_str) + per_page = int(per_page) except ValueError: per_page = defaults.PP - return offset, per_page + return (offset, per_page) def strtobool(value: Union[str, bool]) -> bool: - if not value: - return False - return str(value).lower() in ("y", "yes", "t", "true", "on", "1") + if isinstance(value, str): + return _strtobool(value or "False") + return value def file_hash(filepath: str, hash_function: Callable) -> str: @@ -151,7 +152,8 @@ def git_search(repo: pygit2.Repository, commit_hash: str) -> int: return prefixlen -async def error_or_result(next: Callable, *args, **kwargs) -> fastapi.Response: +async def error_or_result(next: Callable, *args, **kwargs) \ + -> fastapi.Response: """ Try to return a response from `next`. @@ -173,9 +175,9 @@ async def error_or_result(next: Callable, *args, **kwargs) -> fastapi.Response: def parse_ssh_key(string: str) -> Tuple[str, str]: - """Parse an SSH public key.""" + """ Parse an SSH public key. """ invalid_exc = ValueError("The SSH public key is invalid.") - parts = re.sub(r"\s\s+", " ", string.strip()).split() + parts = re.sub(r'\s\s+', ' ', string.strip()).split() if len(parts) < 2: raise invalid_exc @@ -184,35 +186,15 @@ def parse_ssh_key(string: str) -> Tuple[str, str]: if prefix not in prefixes: raise invalid_exc - proc = Popen(["ssh-keygen", "-l", "-f", "-"], stdin=PIPE, stdout=PIPE, stderr=PIPE) + proc = Popen(["ssh-keygen", "-l", "-f", "-"], stdin=PIPE, stdout=PIPE, + stderr=PIPE) out, _ = proc.communicate(f"{prefix} {key}".encode()) if proc.returncode: raise invalid_exc - return prefix, key + return (prefix, key) -def parse_ssh_keys(string: str) -> set[Tuple[str, str]]: - """Parse a list of SSH public keys.""" - return set([parse_ssh_key(e) for e in string.strip().splitlines(True) if e.strip()]) - - -def shell_exec(cmdline: str, cwd: str) -> Tuple[int, str, str]: - args = shlex.split(cmdline) - proc = Popen(args, cwd=cwd, stdout=PIPE, stderr=PIPE) - out, err = proc.communicate() - return proc.returncode, out.decode().strip(), err.decode().strip() - - -def hash_query(query: Query): - return sha1( - str(query.statement.compile(compile_kwargs={"literal_binds": True})).encode() - ).hexdigest() - - -def get_client_ip(request: fastapi.Request) -> str: - """ - Returns the client's IP address for a Request. - Falls back to 'testclient' if request.client is None - """ - return request.client.host if request.client else "testclient" +def parse_ssh_keys(string: str) -> List[Tuple[str, str]]: + """ Parse a list of SSH public keys. """ + return [parse_ssh_key(e) for e in string.splitlines()] diff --git a/ci/tf/.terraform.lock.hcl b/ci/tf/.terraform.lock.hcl deleted file mode 100644 index aa5501c4..00000000 --- a/ci/tf/.terraform.lock.hcl +++ /dev/null @@ -1,61 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/dns" { - version = "3.3.2" - hashes = [ - "h1:HjskPLRqmCw8Q/kiSuzti3iJBSpcAvcBFdlwFFQuoDE=", - "zh:05d2d50e301318362a4a82e6b7a9734ace07bc01abaaa649c566baf98814755f", - "zh:1e9fd1c3bfdda777e83e42831dd45b7b9e794250a0f351e5fd39762e8a0fe15b", - "zh:40e715fc7a2ede21f919567249b613844692c2f8a64f93ee64e5b68bae7ac2a2", - "zh:454d7aa83000a6e2ba7a7bfde4bcf5d7ed36298b22d760995ca5738ab02ee468", - "zh:46124ded51b4153ad90f12b0305fdbe0c23261b9669aa58a94a31c9cca2f4b19", - "zh:55a4f13d20f73534515a6b05701abdbfc54f4e375ba25b2dffa12afdad20e49d", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:7903b1ceb8211e2b8c79290e2e70906a4b88f4fba71c900eb3a425ce12f1716a", - "zh:b79fc4f444ef7a2fd7111a80428c070ad824f43a681699e99ab7f83074dfedbd", - "zh:ca9f45e0c4cb94e7d62536c226024afef3018b1de84f1ea4608b51bcd497a2a0", - "zh:ddc8bd894559d7d176e0ceb0bb1ae266519b01b315362ebfee8327bb7e7e5fa8", - "zh:e77334c0794ef8f9354b10e606040f6b0b67b373f5ff1db65bddcdd4569b428b", - ] -} - -provider "registry.terraform.io/hashicorp/tls" { - version = "4.0.4" - hashes = [ - "h1:pe9vq86dZZKCm+8k1RhzARwENslF3SXb9ErHbQfgjXU=", - "zh:23671ed83e1fcf79745534841e10291bbf34046b27d6e68a5d0aab77206f4a55", - "zh:45292421211ffd9e8e3eb3655677700e3c5047f71d8f7650d2ce30242335f848", - "zh:59fedb519f4433c0fdb1d58b27c210b27415fddd0cd73c5312530b4309c088be", - "zh:5a8eec2409a9ff7cd0758a9d818c74bcba92a240e6c5e54b99df68fff312bbd5", - "zh:5e6a4b39f3171f53292ab88058a59e64825f2b842760a4869e64dc1dc093d1fe", - "zh:810547d0bf9311d21c81cc306126d3547e7bd3f194fc295836acf164b9f8424e", - "zh:824a5f3617624243bed0259d7dd37d76017097dc3193dac669be342b90b2ab48", - "zh:9361ccc7048be5dcbc2fafe2d8216939765b3160bd52734f7a9fd917a39ecbd8", - "zh:aa02ea625aaf672e649296bce7580f62d724268189fe9ad7c1b36bb0fa12fa60", - "zh:c71b4cd40d6ec7815dfeefd57d88bc592c0c42f5e5858dcc88245d371b4b8b1e", - "zh:dabcd52f36b43d250a3d71ad7abfa07b5622c69068d989e60b79b2bb4f220316", - "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", - ] -} - -provider "registry.terraform.io/hetznercloud/hcloud" { - version = "1.42.0" - hashes = [ - "h1:cr9lh26H3YbWSHb7OUnCoYw169cYO3Cjpt3yPnRhXS0=", - "zh:153b5f39d780e9a18bc1ea377d872647d328d943813cbd25d3d20863f8a37782", - "zh:35b9e95760c58cca756e34ad5f4138ac6126aa3e8c41b4a0f1d5dc9ee5666c73", - "zh:47a3cdbce982f2b4e17f73d4934bdb3e905a849b36fb59b80f87d852496ed049", - "zh:6a718c244c2ba300fbd43791661a061ad1ab16225ef3e8aeaa3db8c9eff12c85", - "zh:a2cbfc95c5e2c9422ed0a7b6292192c38241220d5b7813c678f937ab3ef962ae", - "zh:b837e118e08fd36aa8be48af7e9d0d3d112d2680c79cfc71cfe2501fb40dbefa", - "zh:bf66db8c680e18b77e16dc1f20ed1cdcc7876bfb7848c320ccb86f0fb80661ed", - "zh:c1ad80bbe48dc8a272a02dcdb4b12f019606f445606651c01e561b9d72d816b1", - "zh:d4e616701128ad14a6b5a427b0e9145ece4cad02aa3b5f9945c6d0b9ada8ab70", - "zh:d9d01f727037d028720100a5bc9fd213cb01e63e4b439a16f2f482c147976530", - "zh:dea047ee4d679370d4376fb746c4b959bf51dd06047c1c2656b32789c2433643", - "zh:e5ad7a3c556894bd40b28a874e7d2f6924876fa75fa443136a7d6ab9a00abbaa", - "zh:edf6e7e129157bd45e3da4a330d1ace17a336d417c3b77c620f302d440c368e8", - "zh:f610bc729866d58da9cffa4deae34dbfdba96655e855a87c6bb2cb7b35a8961c", - ] -} diff --git a/ci/tf/main.tf b/ci/tf/main.tf deleted file mode 100644 index b149a621..00000000 --- a/ci/tf/main.tf +++ /dev/null @@ -1,67 +0,0 @@ -terraform { - backend "http" { - } -} - -provider "hcloud" { - token = var.hcloud_token -} - -provider "dns" { - update { - server = var.dns_server - key_name = var.dns_tsig_key - key_algorithm = var.dns_tsig_algorithm - key_secret = var.dns_tsig_secret - } -} - -resource "tls_private_key" "this" { - algorithm = "ED25519" -} - -resource "hcloud_ssh_key" "this" { - name = var.name - public_key = tls_private_key.this.public_key_openssh -} - -data "hcloud_image" "this" { - with_selector = "custom_image=archlinux" - most_recent = true - with_status = ["available"] -} - -resource "hcloud_server" "this" { - name = var.name - image = data.hcloud_image.this.id - server_type = var.server_type - datacenter = var.datacenter - ssh_keys = [hcloud_ssh_key.this.name] - - public_net { - ipv4_enabled = true - ipv6_enabled = true - } -} - -resource "hcloud_rdns" "this" { - for_each = { ipv4 : hcloud_server.this.ipv4_address, ipv6 : hcloud_server.this.ipv6_address } - - server_id = hcloud_server.this.id - ip_address = each.value - dns_ptr = "${var.name}.${var.dns_zone}" -} - -resource "dns_a_record_set" "this" { - zone = "${var.dns_zone}." - name = var.name - addresses = [hcloud_server.this.ipv4_address] - ttl = 300 -} - -resource "dns_aaaa_record_set" "this" { - zone = "${var.dns_zone}." - name = var.name - addresses = [hcloud_server.this.ipv6_address] - ttl = 300 -} diff --git a/ci/tf/terraform.tfvars b/ci/tf/terraform.tfvars deleted file mode 100644 index 14818592..00000000 --- a/ci/tf/terraform.tfvars +++ /dev/null @@ -1,4 +0,0 @@ -server_type = "cpx11" -datacenter = "fsn1-dc14" -dns_server = "redirect.archlinux.org" -dns_zone = "sandbox.archlinux.page" diff --git a/ci/tf/variables.tf b/ci/tf/variables.tf deleted file mode 100644 index a4e710ee..00000000 --- a/ci/tf/variables.tf +++ /dev/null @@ -1,36 +0,0 @@ -variable "hcloud_token" { - type = string - sensitive = true -} - -variable "dns_server" { - type = string -} - -variable "dns_tsig_key" { - type = string -} - -variable "dns_tsig_algorithm" { - type = string -} - -variable "dns_tsig_secret" { - type = string -} - -variable "dns_zone" { - type = string -} - -variable "name" { - type = string -} - -variable "server_type" { - type = string -} - -variable "datacenter" { - type = string -} diff --git a/ci/tf/versions.tf b/ci/tf/versions.tf deleted file mode 100644 index 2c72215a..00000000 --- a/ci/tf/versions.tf +++ /dev/null @@ -1,13 +0,0 @@ -terraform { - required_providers { - tls = { - source = "hashicorp/tls" - } - hcloud = { - source = "hetznercloud/hcloud" - } - dns = { - source = "hashicorp/dns" - } - } -} diff --git a/cliff.toml b/cliff.toml index 3d3cb1c7..12cd7e0b 100644 --- a/cliff.toml +++ b/cliff.toml @@ -47,6 +47,6 @@ commit_parsers = [ # filter out the commits that are not matched by commit parsers filter_commits = false # glob pattern for matching git tags -tag_pattern = "v[0-9]." +tag_pattern = "*[0-9]*" # regex for skipping tags skip_tags = "v0.1.0-beta.1" diff --git a/conf/cgitrc.proto b/conf/cgitrc.proto index ed53c51c..1b3eacbd 100644 --- a/conf/cgitrc.proto +++ b/conf/cgitrc.proto @@ -20,8 +20,8 @@ cache-static-ttl=60 root-title=AUR Package Repositories root-desc=Web interface to the AUR Package Repositories -header=/srv/http/aurweb/static/html/cgit/header.html -footer=/srv/http/aurweb/static/html/cgit/footer.html +header=/srv/http/aurweb/web/template/cgit/header.html +footer=/srv/http/aurweb/web/template/cgit/footer.html max-repodesc-length=50 max-blob-size=2048 max-stats=year diff --git a/conf/config.defaults b/conf/config.defaults index c9a6899f..371c99b2 100644 --- a/conf/config.defaults +++ b/conf/config.defaults @@ -14,12 +14,8 @@ passwd_min_len = 8 default_lang = en default_timezone = UTC sql_debug = 0 -; 4 hours - default login_timeout -login_timeout = 14400 -; 30 days - default persistent_cookie_timeout +login_timeout = 7200 persistent_cookie_timeout = 2592000 -; 400 days - default permanent_cookie_timeout -permanent_cookie_timeout = 34560000 max_filesize_uncompressed = 8388608 disable_http_login = 1 aur_location = https://aur.archlinux.org @@ -29,7 +25,6 @@ max_rpc_results = 5000 max_search_results = 2500 max_depends = 1000 aur_request_ml = aur-requests@lists.archlinux.org -ml_thread_url = https://lists.archlinux.org/archives/list/aur-requests@lists.archlinux.org/thread/%s request_idle_time = 1209600 request_archive_time = 15552000 auto_orphan_age = 15552000 @@ -42,15 +37,15 @@ enable-maintenance = 1 maintenance-exceptions = 127.0.0.1 render-comment-cmd = /usr/bin/aurweb-rendercomment localedir = /srv/http/aurweb/web/locale/ -; cache: redis is supported in Python. +; memcache, apc, or redis +; memcache/apc are supported in PHP, redis is supported in Python. cache = none cache_pkginfo_ttl = 86400 +memcache_servers = 127.0.0.1:11211 salt_rounds = 12 redis_address = redis://localhost ; Toggles traceback display in templates/errors/500.html. traceback = 0 -; Maximum number of characters for a comment -max_chars_comment = 5000 [ratelimit] request_limit = 4000 @@ -70,7 +65,6 @@ smtp-use-ssl = 0 smtp-use-starttls = 0 smtp-user = smtp-password = -smtp-timeout = 60 sender = notify@aur.archlinux.org reply-to = noreply@aur.archlinux.org @@ -125,28 +119,16 @@ max-blob-size = 256000 [aurblup] db-path = /srv/http/aurweb/aurblup/ -sync-dbs = core-testing extra-testing multilib-testing core extra multilib +sync-dbs = core extra community multilib testing community-testing server = https://mirrors.kernel.org/archlinux/%s/os/x86_64 [mkpkglists] -archivedir = /srv/http/aurweb/archives -packagesfile = /srv/http/aurweb/archives/packages.gz -packagesmetafile = /srv/http/aurweb/archives/packages-meta-v1.json.gz -packagesmetaextfile = /srv/http/aurweb/archives/packages-meta-ext-v1.json.gz -pkgbasefile = /srv/http/aurweb/archives/pkgbase.gz -userfile = /srv/http/aurweb/archives/users.gz - -[git-archive] -author = git_archive.py -author-email = no-reply@archlinux.org - -; One week worth of seconds (86400 * 7) -popularity-interval = 604800 - -metadata-repo = /srv/http/aurweb/metadata.git -users-repo = /srv/http/aurweb/users.git -pkgbases-repo = /srv/http/aurweb/pkgbases.git -pkgnames-repo = /srv/http/aurweb/pkgnames.git +archivedir = /srv/http/aurweb/web/html +packagesfile = /srv/http/aurweb/web/html/packages.gz +packagesmetafile = /srv/http/aurweb/web/html/packages-meta-v1.json.gz +packagesmetaextfile = /srv/http/aurweb/web/html/packages-meta-ext-v1.json.gz +pkgbasefile = /srv/http/aurweb/web/html/pkgbase.gz +userfile = /srv/http/aurweb/web/html/users.gz [devel] ; commit_url is a format string used to produce a link to a commit hash. @@ -160,23 +142,10 @@ commit_url = https://gitlab.archlinux.org/archlinux/aurweb/-/commits/%s ; sed -r "s/^;?(commit_hash) =.*$/\1 = $(git rev-parse HEAD)/" config ;commit_hash = 1234567 -[votereminder] -; Offsets used to determine when Package Maintainers should be reminded about +[tuvotereminder] +; Offsets used to determine when TUs should be reminded about ; votes that they should make. -; Reminders will be sent out for all votes that a Package Maintainer has not yet +; Reminders will be sent out for all votes that a TU has not yet ; voted on based on `now + range_start <= End <= now + range_end`. range_start = 500 range_end = 172800 - -[cache] -; maximum number of keys/entries (for search results) in our redis cache, default is 50000 -max_search_entries = 50000 -; number of seconds after a cache entry for search queries expires, default is 10 minutes -expiry_time_search = 600 -; number of seconds after a cache entry for statistics queries expires, default is 5 minutes -expiry_time_statistics = 300 -; number of seconds after a cache entry for rss queries expires, default is 5 minutes -expiry_time_rss = 300 - -[tracing] -otlp_endpoint = http://localhost:4318/v1/traces diff --git a/conf/config.dev b/conf/config.dev index 716cafa2..923c34ff 100644 --- a/conf/config.dev +++ b/conf/config.dev @@ -6,6 +6,7 @@ ; development-specific options too. [database] +; PHP options: mysql, sqlite. ; FastAPI options: mysql. backend = mysql @@ -30,6 +31,9 @@ localedir = YOUR_AUR_ROOT/web/locale salt_rounds = 4 ; See config.defaults comment about cache. cache = none +; In docker, the memcached host is available. On a user's system, +; this should be set to localhost (most likely). +memcache_servers = memcached:11211 ; If cache = 'redis' this address is used to connect to Redis. redis_address = redis://127.0.0.1 aur_request_ml = aur-requests@localhost @@ -47,6 +51,13 @@ openid_configuration = http://127.0.0.1:8083/auth/realms/aurweb/.well-known/open client_id = aurweb client_secret = +[php] +; Address PHP should bind when spawned in development mode by aurweb.spawn. +bind_address = 127.0.0.1:8081 + +; Directory containing aurweb's PHP code, required by aurweb.spawn. +htmldir = YOUR_AUR_ROOT/web/html + [fastapi] ; Address uvicorn should bind when spawned in development mode by aurweb.spawn. bind_address = 127.0.0.1:8082 @@ -65,14 +76,5 @@ packagesmetaextfile = /var/lib/aurweb/archives/packages-meta-ext-v1.json.gz pkgbasefile = /var/lib/aurweb/archives/pkgbase.gz userfile = /var/lib/aurweb/archives/users.gz -[git-archive] -metadata-repo = metadata.git -users-repo = users.git -pkgbases-repo = pkgbases.git -pkgnames-repo = pkgnames.git - [aurblup] db-path = YOUR_AUR_ROOT/aurblup/ - -[tracing] -otlp_endpoint = http://tempo:4318/v1/traces diff --git a/doc/CodingGuidelines b/doc/CodingGuidelines new file mode 100644 index 00000000..46537bb2 --- /dev/null +++ b/doc/CodingGuidelines @@ -0,0 +1,54 @@ +Coding Guidelines +================= + +DISCLAIMER: We realise the code doesn't necessarily follow all the rules. +This is an attempt to establish a standard coding style for future +development. + +Coding style +------------ + +Column width: 79 columns or less within reason. + +Indentation: tabs (standard eight column width) +Please don't add any mode lines. Adjust your editor to display tabs to your +preferred width. Generally code should work with the standard eight column +tabs. + +No short open tags. '' +Try embedding as little XHTML in the PHP as possible. +Consider creating templates for XHTML. + +All markup should conform to XHTML 1.0 Strict requirements. +You can use http://validator.w3.org to check the markup. + +Prevent PHP Notices by using isset() or empty() in conditionals that +reference $_GET, $_POST, or $_REQUEST variables. + +MySQL queries should generally go into functions. + +Submitting patches +------------------ + +!!! PLEASE TEST YOUR PATCHES BEFORE SUBMITTING !!! +Submit uncompressed git-formatted patches to aur-dev@archlinux.org. + +You will need to register on the mailing list before submitting: +https://mailman.archlinux.org/mailman/listinfo/aur-dev + +Base your patches on the master branch as forward development is done there. +When writing patches please keep unnecessary changes to a minimum. + +Try to keep your commits small and focused. +Smaller patches are much easier to review and have a better chance of being +pushed more quickly into the main repo. Smaller commits also makes reviewing +the commit history and tracking down specific changes much easier. + +Try to make your commit messages brief but descriptive. + +Glossary +-------- +git-formatted patch: + A patch that is produced via `git format-patch` and is sent via + `git send-email` or as an inline attachment of an email. diff --git a/doc/docker.md b/doc/docker.md index c54184b8..22505f7a 100644 --- a/doc/docker.md +++ b/doc/docker.md @@ -65,9 +65,12 @@ Services | [mariadb](#mariadb) | 127.0.0.1:13306 | | [git](#git) | 127.0.0.1:2222 | | redis | 127.0.0.1:16379 | +| [php-fpm](#php-fpm) | 127.0.0.1:19000 | +| cgit-php | | | [fastapi](#fastapi) | 127.0.0.1:18000 | | cgit-fastapi | | | [nginx](#nginx) (fastapi) | 127.0.0.1:8444 | +| [nginx](#nginx) (php) | 127.0.0.1:8443 | There are more services which have not been referred to here; the services listed above encompass all notable services. Some @@ -110,6 +113,16 @@ to be used for the AUR. This service will perform setup in either case if the repository is not yet initialized. +#### php-fpm + +When running any services which use the _php-fpm_ backend or other +php-related services, users should define: + +- `AURWEB_PHP_PREFIX` + - Default: `https://localhost:8443` +- `AURWEB_SSHD_PREFIX` + - Default: `ssh://aur@localhost:2222` + #### fastapi The _fastapi_ service hosts a `gunicorn`, `uvicorn` or `hypercorn` @@ -132,17 +145,20 @@ backend or other fastapi-related services, users should define: #### nginx -The _nginx_ service binds to host endpoint: 127.0.0.1:8444 (fastapi). -The instance is available over the `https` +The _nginx_ service binds to two host endpoints: 127.0.0.1:8444 (fastapi) +and 127.0.0.1:8443 (php). Each instance is available over the `https` protocol as noted in the table below. | Impl | Host Binding | URL | |--------|----------------|------------------------| | Python | 127.0.0.1:8444 | https://localhost:8444 | +| PHP | 127.0.0.1:8443 | https://localhost:8443 | When running this service, the following variables should be defined: - `AURWEB_FASTAPI_PREFIX` - Default: `https://localhost:8444` +- `AURWEB_PHP_PREFIX` + - Default: `https://localhost:8443` - `AURWEB_SSHD_PREFIX` - Default: `ssh://aur@localhost:2222` diff --git a/doc/git-archive.md b/doc/git-archive.md deleted file mode 100644 index d7c80f76..00000000 --- a/doc/git-archive.md +++ /dev/null @@ -1,75 +0,0 @@ -# aurweb Git Archive Specification - - - WARNING: This aurweb Git Archive implementation is - experimental and may be changed. - - -## Overview - -This git archive specification refers to the archive git repositories -created by [aurweb/scripts/git_archive.py](aurweb/scripts/git_archive.py) -using [spec modules](#spec-modules). - -## Configuration - -- `[git-archive]` - - `author` - - Git commit author - - `author-email` - - Git commit author email - -See an [official spec](#official-specs)'s documentation for spec-specific -configurations. - -## Fetch/Update Archives - -When a client has not yet fetched any initial archives, they should -shallow-clone the repository: - - $ git clone --depth=1 https://aur.archlinux.org/archive.git aurweb-archive - -When updating, the repository is already cloned and changes need to be pulled -from remote: - - # To update: - $ cd aurweb-archive && git pull - -For end-user production applications, see -[Minimize Disk Space](#minimize-disk-space). - -## Minimize Disk Space - -Using `git gc` on the repository will compress revisions and remove -unreachable objects which grow the repository a considerable amount -each commit. It is recommended that the following command is used -after cloning the archive or pulling updates: - - $ cd aurweb-archive && git gc --aggressive - -## Spec Modules - -Each aurweb spec module belongs to the `aurweb.archives.spec` package. For -example: a spec named "example" would be located at -`aurweb.archives.spec.example`. - -[Official spec listings](#official-specs) use the following format: - -- `spec_name` - - Spec description; what this spec produces - - `` - -### Official Specs - -- [metadata](doc/specs/metadata.md) - - Package RPC `type=info` metadata - - [metadata-repo](repos/metadata-repo.md) -- [users](doc/specs/users.md) - - List of users found in the database - - [users-repo](repos/users-repo.md) -- [pkgbases](doc/specs/pkgbases.md) - - List of package bases found in the database - - [pkgbases-repo](repos/pkgbases-repo.md) -- [pkgnames](doc/specs/pkgnames.md) - - List of package names found in the database - - [pkgnames-repo](repos/pkgnames-repo.md) diff --git a/doc/git-interface.txt b/doc/git-interface.txt index 39c2b487..8c6806f7 100644 --- a/doc/git-interface.txt +++ b/doc/git-interface.txt @@ -35,7 +35,7 @@ usually points to the git-serve program. If SSH has been configured to pass on the AUR_OVERWRITE environment variable (via SendEnv, see ssh_config(5) for details) and the user's account is a -registered Package Maintainer or Developer, this will be passed on to the git-update +registered Trusted User or Developer, this will be passed on to the git-update program in order to enable a non-fast-forward push. The INSTALL file in the top-level directory contains detailed instructions on @@ -53,6 +53,7 @@ The git-serve command, the "aurweb shell", provides different subcommands: * The restore command can be used to restore a deleted package base. * The set-comaintainers command modifies the co-maintainers of a package base. * The set-keywords command modifies the keywords assigned to a package base. +* The setup-repo command can be used to create a new repository. * The vote/unvote command can be used to vote/unvote for a package base. * The git-{receive,upload}-pack commands are redirected to git-shell(1). @@ -70,8 +71,8 @@ The Update Hook: git-update The Git update hook, called git-update, performs several subtasks: * Prevent from creating branches or tags other than master. -* Deny non-fast-forwards, except for Package Maintainers and Developers. -* Deny blacklisted packages, except for Package Maintainers and Developers. +* Deny non-fast-forwards, except for Trusted Users and Developers. +* Deny blacklisted packages, except for Trusted Users and Developers. * Verify each new commit (validate meta data, impose file size limits, ...) * Update package base information and package information in the database. * Update the named branch and the namespaced HEAD ref of the package. @@ -109,7 +110,7 @@ is also recommended to disable automatic garbage collection by setting receive.autogc to false. Remember to periodically run `git gc` manually or setup a maintenance script which initiates the garbage collection if you follow this advice. For gc.pruneExpire, we recommend "3.months.ago", such that commits -that became unreachable by Package Maintainer intervention are kept for a while. +that became unreachable by TU intervention are kept for a while. Script Wrappers (poetry) ------------------------ diff --git a/doc/i18n.md b/doc/i18n.txt similarity index 69% rename from doc/i18n.md rename to doc/i18n.txt index d81c467d..44fb0f1f 100644 --- a/doc/i18n.md +++ b/doc/i18n.txt @@ -3,9 +3,9 @@ aurweb Translation This document describes how to create and maintain aurweb translations. -Creating an aurweb translation requires a Transifex (https://app.transifex.com/) +Creating an aurweb translation requires a Transifex (http://www.transifex.com/) account. You will need to register with a translation team on the aurweb -project page (https://app.transifex.com/lfleischer/aurweb/). +project page (http://www.transifex.com/projects/p/aurweb/). Creating a New Translation @@ -21,23 +21,23 @@ strings for the translation to be usable, and it may have to be disabled. 1. Check out the aurweb source using git: - $ git clone https://gitlab.archlinux.org/archlinux/aurweb.git aurweb-git +$ git clone https://gitlab.archlinux.org/archlinux/aurweb.git aurweb-git -2. Go into the "po/" directory in the aurweb source and run [msginit(1)][msginit] to +2. Go into the "po/" directory in the aurweb source and run msginit(1) to create a initial translation file from our translation catalog: - $ cd aurweb-git - $ git checkout master - $ git pull - $ cd po - $ msginit -l -o .po -i aurweb.pot +$ cd aurweb-git +$ git checkout master +$ git pull +$ cd po +$ msginit -l -o .po -i aurweb.pot 3. Use some editor or a translation helper like poedit to add translations: - $ poedit .po +$ poedit .po 5. If you have a working aurweb setup, add a line for the new translation in - "po/Makefile" and test if everything looks right. + "web/lib/config.inc.php.proto" and test if everything looks right. 6. Upload the newly created ".po" file to Transifex. If you don't like the web interface, you can also use transifex-client to do that (see below). @@ -49,15 +49,13 @@ Updating an Existing Translation 1. Download current translation files from Transifex. You can also do this using transifex-client which is available through the AUR: - $ tx pull -a +$ tx pull -a 2. Update the existing translation file using an editor or a tool like poedit: - $ poedit po/.po +$ poedit po/.po 3. Push the updated translation file back to Transifex. Using transifex-client, this works as follows: - $ tx push -r aurweb.aurwebpot -t -l - -[msginit]: https://man.archlinux.org/man/msginit.1 +$ tx push -r aurweb.aurwebpot -t -l diff --git a/doc/maintenance.txt b/doc/maintenance.txt index 68766402..c52cf76f 100644 --- a/doc/maintenance.txt +++ b/doc/maintenance.txt @@ -12,8 +12,8 @@ package maintenance from the command-line. More details can be found in The web interface can be used to browse packages, view package details, manage aurweb accounts, add comments, vote for packages, flag packages, and submit -requests. Package Maintainers can update package maintainers and delete/merge -packages. The web interface also includes an area for Package Maintainers to post +requests. Trusted Users can update package maintainers and delete/merge +packages. The web interface also includes an area for Trusted Users to post AUR-related proposals and vote on them. The RPC interface can be used to query package information via HTTP. @@ -21,7 +21,7 @@ The RPC interface can be used to query package information via HTTP. Installation ------------ -The web backend requires a web server and an SQL database. The Git/SSH +The web backend requires a web server with PHP and an SQL database. The Git/SSH interface requires Python, several Python modules and an up-to-date version of Git. APCu or memcached can be used to reduce load on the database server. @@ -62,58 +62,39 @@ computations and clean up the database: the official repositories. It is also used to prevent users from uploading packages that are in the official repositories already. -* aurweb-votereminder sends out reminders if the voting period for a - Package Maintainer proposal ends soon. +* aurweb-tuvotereminder sends out reminders to TUs if the voting period for a + TU proposal ends soon. * aurweb-popupdate is used to recompute the popularity score of packages. * aurweb-pkgmaint automatically removes empty repositories that were created within the last 24 hours but never populated. -* [Deprecated] aurweb-mkpkglists generates the package list files; it takes - an optional --extended flag, which additionally produces multiinfo metadata. - It also generates {archive.gz}.sha256 files that should be located within +* aurweb-mkpkglists generates the package list files; it takes an optional + --extended flag, which additionally produces multiinfo metadata. It also + generates {archive.gz}.sha256 files that should be located within mkpkglists.archivedir which contain a SHA-256 hash of their matching .gz counterpart. * aurweb-usermaint removes the last login IP address of all users that did not login within the past seven days. -* aurweb-git-archive generates Git repository archives based on a --spec. - This script is a new generation of aurweb-mkpkglists, which creates and - maintains Git repository versions of the archives produced by - aurweb-mkpkglists. See doc/git-archive.md for detailed documentation. - These scripts can be installed by running `poetry install` and are usually scheduled using Cron. The current setup is: ---- -# Run aurweb-git-archive --spec metadata directly after -# aurweb-mkpkglists so that they are executed sequentially, since -# both scripts are quite heavy. `aurweb-mkpkglists` should be removed -# from here once its deprecation period has ended. -*/5 * * * * poetry run aurweb-mkpkglists [--extended] && poetry run aurweb-git-archive --spec metadata - -# Usernames -*/5 * * * * poetry run aurweb-git-archive --spec users - -# Package base names -*/5 * * * * poetry run aurweb-git-archive --spec pkgbases - -# Package names -*/5 * * * * poetry run aurweb-git-archive --spec pkgnames - +*/5 * * * * poetry run aurweb-mkpkglists [--extended] 1 */2 * * * poetry run aurweb-popupdate 2 */2 * * * poetry run aurweb-aurblup 3 */2 * * * poetry run aurweb-pkgmaint 4 */2 * * * poetry run aurweb-usermaint -5 */12 * * * poetry run aurweb-votereminder +5 */12 * * * poetry run aurweb-tuvotereminder ---- Advanced Administrative Features -------------------------------- -Package Maintainers can set the AUR_OVERWRITE environment variable to enable +Trusted Users can set the AUR_OVERWRITE environment variable to enable non-fast-forward pushes to the Git repositories. This feature is documented in `doc/git-interface.txt`. diff --git a/doc/repos/metadata-repo.md b/doc/repos/metadata-repo.md deleted file mode 100644 index cc678f40..00000000 --- a/doc/repos/metadata-repo.md +++ /dev/null @@ -1,121 +0,0 @@ -# Repository: metadata-repo - -## Overview - -The resulting repository contains RPC `type=info` JSON data for packages, -split into two different files: - -- `pkgbase.json` contains details about each package base in the AUR -- `pkgname.json` contains details about each package in the AUR - -See [Data](#data) for a breakdown of how data is presented in this -repository based off of a RPC `type=info` base. - -See [File Layout](#file-layout) for a detailed summary of the layout -of these files and the data contained within. - -**NOTE: `Popularity` now requires a client-side calculation, see [Popularity Calculation](#popularity-calculation).** - -## Data - -This repository contains RPC `type=info` data for all packages found -in AUR's database, reorganized to be suitable for Git repository -changes. - -- `pkgname.json` holds Package-specific metadata - - Some fields have been removed from `pkgname.json` objects - - `ID` - - `PackageBaseID -> ID` (moved to `pkgbase.json`) - - `NumVotes` (moved to `pkgbase.json`) - - `Popularity` (moved to `pkgbase.json`) -- `pkgbase.json` holds PackageBase-specific metadata - - Package Base fields from `pkgname.json` have been moved over to - `pkgbase.json` - - `ID` - - `Keywords` - - `FirstSubmitted` - - `LastModified` - - `OutOfDate` - - `Maintainer` - - `URLPath` - - `NumVotes` - - `Popularity` - - `PopularityUpdated` - -## Popularity Calculation - -Clients intending to use popularity data from this archive **must** -perform a decay calculation on their end to reflect a close approximation -of up-to-date popularity. - -Putting this step onto the client allows the server to maintain -less popularity record updates, dramatically improving archiving -of popularity data. The same calculation is done on the server-side -when producing outputs for RPC `type=info` and package pages. - -``` -Let T = Current UTC timestamp in seconds -Let PU = PopularityUpdated timestamp in seconds - -# The delta between now and PU in days -Let D = (T - PU) / 86400 - -# Calculate up-to-date popularity: -P = Popularity * (0.98^D) -``` - -We can see that the resulting up-to-date popularity value decays as -the exponent is increased: -- `1.0 * (0.98^1) = 0.98` -- `1.0 * (0.98^2) = 0.96039999` -- ... - -This decay calculation is essentially pushing back the date found for -votes by the exponent, which takes into account the time-factor. However, -since this calculation is based off of decimals and exponents, it -eventually becomes imprecise. The AUR updates these records on a forced -interval and whenever a vote is added to or removed from a particular package -to avoid imprecision from being an issue for clients - -## File Layout - -#### pkgbase.json: - - { - "pkgbase1": { - "FirstSubmitted": 123456, - "ID": 1, - "LastModified": 123456, - "Maintainer": "kevr", - "OutOfDate": null, - "URLPath": "/cgit/aur.git/snapshot/pkgbase1.tar.gz", - "NumVotes": 1, - "Popularity": 1.0, - "PopularityUpdated": 12345567753.0 - }, - ... - } - -#### pkgname.json: - - { - "pkg1": { - "CheckDepends": [], # Only included if a check dependency exists - "Conflicts": [], # Only included if a conflict exists - "Depends": [], # Only included if a dependency exists - "Description": "some description", - "Groups": [], # Only included if a group exists - "ID": 1, - "Keywords": [], - "License": [], - "MakeDepends": [], # Only included if a make dependency exists - "Name": "pkg1", - "OptDepends": [], # Only included if an opt dependency exists - "PackageBase": "pkgbase1", - "Provides": [], # Only included if `provides` is defined - "Replaces": [], # Only included if `replaces` is defined - "URL": "https://some_url.com", - "Version": "1.0-1" - }, - ... - } diff --git a/doc/repos/pkgbases-repo.md b/doc/repos/pkgbases-repo.md deleted file mode 100644 index f4cb896f..00000000 --- a/doc/repos/pkgbases-repo.md +++ /dev/null @@ -1,15 +0,0 @@ -# Repository: pkgbases-repo - -## Overview - -- `pkgbase.json` contains a list of package base names - -## File Layout - -### pkgbase.json: - - [ - "pkgbase1", - "pkgbase2", - ... - ] diff --git a/doc/repos/pkgnames-repo.md b/doc/repos/pkgnames-repo.md deleted file mode 100644 index ae6fb4ed..00000000 --- a/doc/repos/pkgnames-repo.md +++ /dev/null @@ -1,15 +0,0 @@ -# Repository: pkgnames-repo - -## Overview - -- `pkgname.json` contains a list of package names - -## File Layout - -### pkgname.json: - - [ - "pkgname1", - "pkgname2", - ... - ] diff --git a/doc/repos/users-repo.md b/doc/repos/users-repo.md deleted file mode 100644 index 23db9cfb..00000000 --- a/doc/repos/users-repo.md +++ /dev/null @@ -1,15 +0,0 @@ -# Repository: users-repo - -## Overview - -- `users.json` contains a list of usernames - -## File Layout - -### users.json: - - [ - "user1", - "user2", - ... - ] diff --git a/doc/specs/metadata.md b/doc/specs/metadata.md deleted file mode 100644 index 282c0dd5..00000000 --- a/doc/specs/metadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# Git Archive Spec: metadata - -## Configuration - -- `[git-archive]` - - `metadata-repo` - - Path to package metadata git repository location - -## Repositories - -For documentation on each one of these repositories, follow their link, -which brings you to a topical markdown for that repository. - -- [metadata-repo](doc/repos/metadata-repo.md) diff --git a/doc/specs/pkgbases.md b/doc/specs/pkgbases.md deleted file mode 100644 index 80279070..00000000 --- a/doc/specs/pkgbases.md +++ /dev/null @@ -1,14 +0,0 @@ -# Git Archive Spec: pkgbases - -## Configuration - -- `[git-archive]` - - `pkgbases-repo` - - Path to pkgbases git repository location - -## Repositories - -For documentation on each one of these repositories, follow their link, -which brings you to a topical markdown for that repository. - -- [pkgbases-repo](doc/repos/pkgbases-repo.md) diff --git a/doc/specs/pkgnames.md b/doc/specs/pkgnames.md deleted file mode 100644 index 0a4a907d..00000000 --- a/doc/specs/pkgnames.md +++ /dev/null @@ -1,14 +0,0 @@ -# Git Archive Spec: pkgnames - -## Configuration - -- `[git-archive]` - - `pkgnames-repo` - - Path to pkgnames git repository location - -## Repositories - -For documentation on each one of these repositories, follow their link, -which brings you to a topical markdown for that repository. - -- [pkgnames-repo](doc/repos/pkgnames-repo.md) diff --git a/doc/specs/popularity.md b/doc/specs/popularity.md deleted file mode 100644 index 3084f458..00000000 --- a/doc/specs/popularity.md +++ /dev/null @@ -1,14 +0,0 @@ -# Git Archive Spec: popularity - -## Configuration - -- `[git-archive]` - - `popularity-repo` - - Path to popularity git repository location - -## Repositories - -For documentation on each one of these repositories, follow their link, -which brings you to a topical markdown for that repository. - -- [popularity-repo](doc/repos/popularity-repo.md) diff --git a/doc/specs/users.md b/doc/specs/users.md deleted file mode 100644 index 25396154..00000000 --- a/doc/specs/users.md +++ /dev/null @@ -1,14 +0,0 @@ -# Git Archive Spec: users - -## Configuration - -- `[git-archive]` - - `users-repo` - - Path to users git repository location - -## Repositories - -For documentation on each one of these repositories, follow their link, -which brings you to a topical markdown for that repository. - -- [users-repo](doc/repos/users-repo.md) diff --git a/doc/web-auth.md b/doc/web-auth.md deleted file mode 100644 index c8604fed..00000000 --- a/doc/web-auth.md +++ /dev/null @@ -1,104 +0,0 @@ -# aurweb Web Authentication - -aurweb uses an HTTP cookie to persist user sessions across requests. -This cookie **must** be delivered with a request in order to be considered -an authenticated user. - -See [HTTP Cookie](#http-cookie) for detailed information about the cookie. - -## HTTP Cookie - -aurweb utilizes an HTTP cookie by the name of `AURSID` to track -user authentication across requests. - -This cookie's requirements changes due to aurweb's configuration -in the following ways: - -- `options.disable_http_login: 0` - - [Samesite=LAX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#samesite_attribute), Max-Age -- `options.disable_http_login: 1` - - [Samesite=LAX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#samesite_attribute), [Secure, HttpOnly](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies), Max-Age - -### Max-Age - -The value used for the `AURSID` Max-Age attribute is decided based -off of the "Remember Me" checkbox on the login page. If it was not -checked, we don't set Max-Age and it becomes a session cookie. -Otherwise we make it a persistent cookie and for the expiry date -we use `options.persistent_cookie_timeout`. -It indicates the number of seconds the session should live. - -### Notes - -At all times, aur.archlinux.org operates over HTTPS. Secure cookies will -only remain intact when subsequently requesting an aurweb route through -the HTTPS scheme at the same host as the cookie was obtained. - -## Login Process - -When a user logs in to aurweb, the following steps are taken: - -1. Was a Referer header delivered from an address starting with -`{aurweb_url}/login`? - 1. No, an HTTP 400 Bad Request response is returned - 2. Yes, move on to 2 -2. Does a Users database record exist for the given username/email? - 1. No, you are returned to the login page with `Bad username or password.` - error - 2. Yes, move on to 3 -3. Is the user suspended? - 1. Yes, you are returned to the login page with `Account Suspended` error - 2. No, move on to 4 -4. Can the user login with the given password? - 1. No, you are returned to the login page with `Bad username or password.` - error - 2. Yes, move on to 5 -5. Update the user's `LastLogin` and `LastLoginIPAddress` columns -6. Does the user have a related Sessions record? - 1. No, generate a new Sessions record with a new unique `SessionID` - 2. Yes, update the Sessions record's `SessionID` column with a new unique - string and update the Sessions record's `LastUpdateTS` column if it has - expired - 3. In both cases, set the user's `InactivityTS` column to `0` - 4. In both cases, return the new `SessionID` column value and move on to 7 -7. Return a redirect to the `next` GET variable with the -following cookies set: - 1. `AURSID` - - Unique session string matching the user's related - `Sessions.SessionID` column - 2. `AURTZ` - - User's timezone setting - 3. `AURLANG` - - User's language setting - 4. `AURREMEMBER` - - Boolean state of the "Remember Me" checkbox when login submitted - -## Auth Verification - -When a request is made toward aurweb, a middleware is responsible for -verifying the user's auth cookie. If no valid `AURSID` cookie could be -found for a user in the database, the request is considered unauthenticated. - -The following list of steps describes exactly how this verification works: -1. Was the `AURSID` cookie delivered? - 1. No, the algorithm ends, you are considered unauthenticated - 2. Yes, move on to 2 -2. Was the `AURREMEMBER` cookie delivered with a value of `True`? - 1. No, set the expected session timeout **T** to `options.login_timeout` - 2. Yes, set the expected session timeout **T** to - `options.persistent_cookie_timeout` -3. Does a Sessions database record exist which matches the `AURSID`? - 1. No, the algorithm ends, you are considered unauthenticated - 2. Yes, move on to 4 -4. Does the Sessions record's LastUpdateTS column fit within `utcnow - T`? - 1. No, the Sessions record at hand is deleted, the algorithm ends, you - are considered unauthenticated - 2. Yes, move on to 5 -5. You are considered authenticated - -## aur.archlinux.org Auth-Related Configuration - -- Operates over HTTPS with a Let's Encrypt SSL certificate -- `options.disable_http_login: 1` -- `options.login_timeout: ` -- `options.persistent_cookie_timeout: ` diff --git a/docker-compose.aur-dev.yml b/docker-compose.aur-dev.yml index 265ba6db..0b91dd93 100644 --- a/docker-compose.aur-dev.yml +++ b/docker-compose.aur-dev.yml @@ -1,10 +1,14 @@ ---- +version: "3.8" + services: ca: volumes: - data:/data - step:/root/.step + memcached: + restart: always + redis: restart: always @@ -28,6 +32,11 @@ services: - data:/data - smartgit_run:/var/run/smartgit + cgit-php: + restart: always + volumes: + - ${GIT_DATA_DIR}:/aurweb/aur.git + cgit-fastapi: restart: always volumes: @@ -39,6 +48,14 @@ services: - mariadb_run:/var/run/mysqld - archives:/var/lib/aurweb/archives + php-fpm: + restart: always + environment: + - AURWEB_PHP_PREFIX=${AURWEB_PHP_PREFIX} + - AURWEB_SSHD_PREFIX=${AURWEB_SSHD_PREFIX} + volumes: + - data:/data + fastapi: restart: always environment: diff --git a/docker-compose.override.yml b/docker-compose.override.yml index b0961521..1e466730 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,10 +1,16 @@ ---- +version: "3.8" + services: ca: volumes: - ./data:/data - step:/root/.step + mariadb_init: + depends_on: + mariadb: + condition: service_healthy + git: volumes: - git_data:/aurweb/aur.git @@ -15,6 +21,20 @@ services: - git_data:/aurweb/aur.git - ./data:/data - smartgit_run:/var/run/smartgit + depends_on: + mariadb: + condition: service_healthy + + php-fpm: + volumes: + - ./data:/data + - ./aurweb:/aurweb/aurweb + - ./migrations:/aurweb/migrations + - ./test:/aurweb/test + - ./web/html:/aurweb/web/html + - ./web/template:/aurweb/web/template + - ./web/lib:/aurweb/web/lib + - ./templates:/aurweb/templates fastapi: volumes: @@ -22,6 +42,9 @@ services: - ./aurweb:/aurweb/aurweb - ./migrations:/aurweb/migrations - ./test:/aurweb/test + - ./web/html:/aurweb/web/html + - ./web/template:/aurweb/web/template + - ./web/lib:/aurweb/web/lib - ./templates:/aurweb/templates nginx: diff --git a/docker-compose.yml b/docker-compose.yml index ad578523..a56cbe72 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ ---- # # Docker service definitions for the aurweb project. # @@ -11,12 +10,16 @@ # - `ca` - Certificate Authority generation # - `git` - `port 2222` - Git over SSH server # - `fastapi` - hypercorn service for aurweb's FastAPI app -# - `nginx` - `port 8444 (FastAPI) -# - You can reach `nginx` via FastAPI at `https://localhost:8444/`. -# CGit can be reached via the `/cgit/` request uri on either server. +# - `php-fpm` - Execution server for PHP aurweb +# - `nginx` - `ports 8444 (FastAPI), 8443 (PHP)` - Everything +# - You can reach `nginx` via FastAPI at `https://localhost:8444/` +# or via PHP at `https://localhost:8443/`. CGit can be reached +# via the `/cgit/` request uri on either server. # # Copyright (C) 2021 aurweb Development # All Rights Reserved. +version: "3.8" + services: aurweb-image: build: . @@ -28,11 +31,17 @@ services: entrypoint: /docker/ca-entrypoint.sh command: /docker/scripts/run-ca.sh healthcheck: - test: "bash /docker/health/ca.sh" - interval: 3s - volumes: - - step:/root/.step + test: "bash /docker/health/run-ca.sh" + interval: 2s + memcached: + image: aurweb:latest + init: true + command: /docker/scripts/run-memcached.sh + healthcheck: + test: "bash /docker/health/memcached.sh" + interval: 2s + redis: image: aurweb:latest init: true @@ -40,7 +49,7 @@ services: command: /docker/scripts/run-redis.sh healthcheck: test: "bash /docker/health/redis.sh" - interval: 3s + interval: 2s ports: - "127.0.0.1:16379:6379" @@ -48,7 +57,7 @@ services: image: aurweb:latest init: true entrypoint: /docker/mariadb-entrypoint.sh - command: /usr/bin/mariadbd-safe --datadir=/var/lib/mysql + command: /usr/bin/mysqld_safe --datadir=/var/lib/mysql ports: # This will expose mariadbd on 127.0.0.1:13306 in the host. # Ex: `mysql -uaur -paur -h 127.0.0.1 -P 13306 aurweb` @@ -58,7 +67,7 @@ services: - mariadb_data:/var/lib/mysql healthcheck: test: "bash /docker/health/mariadb.sh" - interval: 3s + interval: 2s mariadb_init: image: aurweb:latest @@ -80,7 +89,7 @@ services: environment: - MARIADB_PRIVILEGED=1 entrypoint: /docker/mariadb-entrypoint.sh - command: /usr/bin/mariadbd-safe --datadir=/var/lib/mysql + command: /usr/bin/mysqld_safe --datadir=/var/lib/mysql ports: # This will expose mariadbd on 127.0.0.1:13307 in the host. # Ex: `mysql -uaur -paur -h 127.0.0.1 -P 13306 aurweb` @@ -89,7 +98,7 @@ services: - mariadb_test_run:/var/run/mysqld # Bind socket in this volume. healthcheck: test: "bash /docker/health/mariadb.sh" - interval: 3s + interval: 2s git: image: aurweb:latest @@ -104,12 +113,10 @@ services: - "2222:2222" healthcheck: test: "bash /docker/health/sshd.sh" - interval: 3s + interval: 2s depends_on: - mariadb: - condition: service_healthy mariadb_init: - condition: service_completed_successfully + condition: service_started volumes: - mariadb_run:/var/run/mysqld @@ -122,10 +129,27 @@ services: command: /docker/scripts/run-smartgit.sh healthcheck: test: "bash /docker/health/smartgit.sh" - interval: 3s + interval: 2s + + cgit-php: + image: aurweb:latest + init: true + environment: + - AUR_CONFIG=/aurweb/conf/config + - CGIT_CLONE_PREFIX=${AURWEB_PHP_PREFIX} + - CGIT_CSS=/css/cgit.css + entrypoint: /docker/cgit-entrypoint.sh + command: /docker/scripts/run-cgit.sh 3000 + healthcheck: + test: "bash /docker/health/cgit.sh 3000" + interval: 2s depends_on: - mariadb: + git: condition: service_healthy + ports: + - "127.0.0.1:13000:3000" + volumes: + - git_data:/aurweb/aur.git cgit-fastapi: image: aurweb:latest @@ -138,7 +162,7 @@ services: command: /docker/scripts/run-cgit.sh 3000 healthcheck: test: "bash /docker/health/cgit.sh 3000" - interval: 3s + interval: 2s depends_on: git: condition: service_healthy @@ -156,15 +180,39 @@ services: entrypoint: /docker/cron-entrypoint.sh command: /docker/scripts/run-cron.sh depends_on: - mariadb: - condition: service_healthy mariadb_init: - condition: service_completed_successfully + condition: service_started volumes: - ./aurweb:/aurweb/aurweb - mariadb_run:/var/run/mysqld - archives:/var/lib/aurweb/archives + php-fpm: + image: aurweb:latest + init: true + environment: + - AUR_CONFIG=/aurweb/conf/config + - AURWEB_PHP_PREFIX=${AURWEB_PHP_PREFIX} + - AURWEB_SSHD_PREFIX=${AURWEB_SSHD_PREFIX} + - AUR_CONFIG_IMMUTABLE=${AUR_CONFIG_IMMUTABLE:-0} + entrypoint: /docker/php-entrypoint.sh + command: /docker/scripts/run-php.sh + healthcheck: + test: "bash /docker/health/php.sh" + interval: 2s + depends_on: + git: + condition: service_healthy + memcached: + condition: service_healthy + cron: + condition: service_started + volumes: + - mariadb_run:/var/run/mysqld + - archives:/var/lib/aurweb/archives + ports: + - "127.0.0.1:19000:9000" + fastapi: image: aurweb:latest init: true @@ -180,7 +228,7 @@ services: command: /docker/scripts/run-fastapi.sh "${FASTAPI_BACKEND}" healthcheck: test: "bash /docker/health/fastapi.sh ${FASTAPI_BACKEND}" - interval: 3s + interval: 2s depends_on: git: condition: service_healthy @@ -188,12 +236,6 @@ services: condition: service_healthy cron: condition: service_started - mariadb: - condition: service_healthy - mariadb_init: - condition: service_completed_successfully - tempo: - condition: service_healthy volumes: - archives:/var/lib/aurweb/archives - mariadb_run:/var/run/mysqld @@ -208,12 +250,15 @@ services: entrypoint: /docker/nginx-entrypoint.sh command: /docker/scripts/run-nginx.sh ports: + - "127.0.0.1:8443:8443" # PHP - "127.0.0.1:8444:8444" # FastAPI healthcheck: test: "bash /docker/health/nginx.sh" - interval: 3s + interval: 2s depends_on: ca: + condition: service_started + cgit-php: condition: service_healthy cgit-fastapi: condition: service_healthy @@ -221,6 +266,8 @@ services: condition: service_healthy fastapi: condition: service_healthy + php-fpm: + condition: service_healthy sharness: image: aurweb:latest @@ -241,6 +288,9 @@ services: - ./aurweb:/aurweb/aurweb - ./migrations:/aurweb/migrations - ./test:/aurweb/test + - ./web/html:/aurweb/web/html + - ./web/template:/aurweb/web/template + - ./web/lib:/aurweb/web/lib - ./templates:/aurweb/templates pytest-mysql: @@ -267,6 +317,9 @@ services: - ./aurweb:/aurweb/aurweb - ./migrations:/aurweb/migrations - ./test:/aurweb/test + - ./web/html:/aurweb/web/html + - ./web/template:/aurweb/web/template + - ./web/lib:/aurweb/web/lib - ./templates:/aurweb/templates test: @@ -291,58 +344,11 @@ services: - ./aurweb:/aurweb/aurweb - ./migrations:/aurweb/migrations - ./test:/aurweb/test + - ./web/html:/aurweb/web/html + - ./web/template:/aurweb/web/template + - ./web/lib:/aurweb/web/lib - ./templates:/aurweb/templates - grafana: - # TODO: check if we need init: true - image: grafana/grafana:11.1.3 - environment: - - GF_AUTH_ANONYMOUS_ENABLED=true - - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin - - GF_AUTH_DISABLE_LOGIN_FORM=true - - GF_LOG_LEVEL=warn - # check if depends ar ecorrect, does stopping or restarting a child exit grafana? - depends_on: - prometheus: - condition: service_healthy - tempo: - condition: service_healthy - ports: - - "127.0.0.1:3000:3000" - volumes: - - ./docker/config/grafana/datasources:/etc/grafana/provisioning/datasources - - prometheus: - image: prom/prometheus:latest - command: - - --config.file=/etc/prometheus/prometheus.yml - - --web.enable-remote-write-receiver - - --web.listen-address=prometheus:9090 - healthcheck: - # TODO: check if there is a status route - test: "sh /docker/health/prometheus.sh" - interval: 3s - ports: - - "127.0.0.1:9090:9090" - volumes: - - ./docker/config/prometheus.yml:/etc/prometheus/prometheus.yml - - ./docker/health/prometheus.sh:/docker/health/prometheus.sh - - tempo: - image: grafana/tempo:2.5.0 - command: - - -config.file=/etc/tempo/config.yml - healthcheck: - # TODO: check if there is a status route - test: "sh /docker/health/tempo.sh" - interval: 3s - ports: - - "127.0.0.1:3200:3200" - - "127.0.0.1:4318:4318" - volumes: - - ./docker/config/tempo.yml:/etc/tempo/config.yml - - ./docker/health/tempo.sh:/docker/health/tempo.sh - volumes: mariadb_test_run: {} mariadb_run: {} # Share /var/run/mysqld/mysqld.sock diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index e473582b..00000000 --- a/docker/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# Aurweb and Docker - -The `INSTALL` document details a manual Aurweb setup, but Docker images are also -provided here to avoid the complications of database configuration (and so -forth). - -### Setup - -Naturally, both `docker` and `docker-compose` must be installed, and your Docker -service must be started: - -```sh -systemctl start docker.service -``` - -The main image - `aurweb` - must be built manually: - -```sh -docker compose build -``` - -### Starting and Stopping the Services - -With the above steps complete, you can bring up an initial cluster: - -```sh -docker compose up -``` - -Subsequent runs will be done with `start` instead of `up`. The cluster can be -stopped with `docker compose stop`. - -### Testing - -With a running cluster, execute the following in a new terminal: - -```sh -docker compose run test -``` - -### Generating Dummy Data - -Before you can make meaningful queries to the cluster, it needs some data. -Luckily such data can be generated. - -```sh -docker compose exec fastapi /bin/bash -pacman -S words fortune-mod -./schema/gendummydata.py dummy.sql -mariadb aurweb < dummy.sql -``` - -The generation script may prompt you to install other Arch packages before it -can proceed. - -### Querying the RPC - -The Fast (Python) API runs on Port 8444. You can query one like so: - -```sh -curl -k "https://localhost:8444/rpc/?v=5&type=search&arg=python" -``` - -`-k` bypasses local certificate issues that `curl` will otherwise complain about. diff --git a/docker/ca-entrypoint.sh b/docker/ca-entrypoint.sh index 55c7cd75..d03efbbc 100755 --- a/docker/ca-entrypoint.sh +++ b/docker/ca-entrypoint.sh @@ -89,26 +89,34 @@ step_cert_request() { chmod 666 /data/${1}.*.pem } -if [ ! -d /root/.step/config ]; then - # Remove existing certs. - rm -vf /data/localhost.{cert,key}.pem /data/root_ca.crt - +if [ ! -f $DATA_ROOT_CA ]; then setup_step_ca install_step_ca - - start_step_ca - for host in $DATA_CERT_HOSTS; do - step_cert_request $host /data/${host}.cert.pem /data/${host}.key.pem - done - kill_step_ca - - echo -n "WARN: Your certificates are being regenerated to resolve " - echo -n "an inconsistent step-ca state. You will need to re-import " - echo "the root CA certificate into your browser." -else - exec "$@" fi +# For all hosts separated by spaces in $DATA_CERT_HOSTS, perform a check +# for their existence in /data and react accordingly. +for host in $DATA_CERT_HOSTS; do + if [ -f /data/${host}.cert.pem ] && [ -f /data/${host}.key.pem ]; then + # Found an override. Move on to running the service after + # printing a notification to the user. + echo "Found '${host}.{cert,key}.pem' override, skipping..." + echo -n "Note: If you need to regenerate certificates, run " + echo '`rm -f data/*.{cert,key}.pem` before starting this service.' + exec "$@" + else + # Otherwise, we had a missing cert or key, so remove both. + rm -f /data/${host}.cert.pem + rm -f /data/${host}.key.pem + fi +done + +start_step_ca +for host in $DATA_CERT_HOSTS; do + step_cert_request $host /data/${host}.cert.pem /data/${host}.key.pem +done +kill_step_ca + # Set permissions to /data to rwx for everybody. chmod 777 /data diff --git a/docker/cgit-entrypoint.sh b/docker/cgit-entrypoint.sh index 282430e2..a44675e2 100755 --- a/docker/cgit-entrypoint.sh +++ b/docker/cgit-entrypoint.sh @@ -5,8 +5,8 @@ mkdir -p /var/data/cgit cp -vf conf/cgitrc.proto /etc/cgitrc sed -ri "s|clone-prefix=.*|clone-prefix=${CGIT_CLONE_PREFIX}|" /etc/cgitrc -sed -ri 's|header=.*|header=/aurweb/static/html/cgit/header.html|' /etc/cgitrc -sed -ri 's|footer=.*|footer=/aurweb/static/html/cgit/footer.html|' /etc/cgitrc +sed -ri 's|header=.*|header=/aurweb/web/template/cgit/header.html|' /etc/cgitrc +sed -ri 's|footer=.*|footer=/aurweb/web/template/cgit/footer.html|' /etc/cgitrc sed -ri 's|repo\.path=.*|repo.path=/aurweb/aur.git|' /etc/cgitrc sed -ri "s|^(css)=.*$|\1=${CGIT_CSS}|" /etc/cgitrc diff --git a/docker/config/aurweb-cron b/docker/config/aurweb-cron index a8e80ad6..21fd35dc 100644 --- a/docker/config/aurweb-cron +++ b/docker/config/aurweb-cron @@ -4,4 +4,4 @@ AUR_CONFIG='/aurweb/conf/config' */2 * * * * bash -c 'aurweb-pkgmaint' */2 * * * * bash -c 'aurweb-usermaint' */2 * * * * bash -c 'aurweb-popupdate' -*/12 * * * * bash -c 'aurweb-votereminder' +*/12 * * * * bash -c 'aurweb-tuvotereminder' diff --git a/docker/config/grafana/datasources/datasource.yml b/docker/config/grafana/datasources/datasource.yml deleted file mode 100644 index 60a56561..00000000 --- a/docker/config/grafana/datasources/datasource.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -apiVersion: 1 - -deleteDatasources: - - name: Prometheus - - name: Tempo - -datasources: - - name: Prometheus - type: prometheus - uid: prometheus - access: proxy - url: http://prometheus:9090 - orgId: 1 - editable: false - jsonData: - timeInterval: 1m - - name: Tempo - type: tempo - uid: tempo - access: proxy - url: http://tempo:3200 - orgId: 1 - editable: false - jsonData: - tracesToMetrics: - datasourceUid: 'prometheus' - spanStartTimeShift: '1h' - spanEndTimeShift: '-1h' - serviceMap: - datasourceUid: 'prometheus' - nodeGraph: - enabled: true - search: - hide: false - traceQuery: - timeShiftEnabled: true - spanStartTimeShift: '1h' - spanEndTimeShift: '-1h' - spanBar: - type: 'Tag' - tag: 'http.path' diff --git a/docker/config/nginx.conf b/docker/config/nginx.conf index 9b167553..9fdf6015 100644 --- a/docker/config/nginx.conf +++ b/docker/config/nginx.conf @@ -27,6 +27,10 @@ http { server fastapi:8000; } + upstream cgit-php { + server cgit-php:3000; + } + upstream cgit-fastapi { server cgit-fastapi:3000; } @@ -35,6 +39,54 @@ http { server unix:/var/run/smartgit/smartgit.sock; } + server { + listen 8443 ssl http2; + server_name localhost default_server; + + ssl_certificate /etc/ssl/certs/web.cert.pem; + ssl_certificate_key /etc/ssl/private/web.key.pem; + + root /aurweb/web/html; + index index.php; + + location ~ "^/([a-z0-9][a-z0-9.+_-]*?)(\.git)?/(git-(receive|upload)-pack|HEAD|info/refs|objects/(info/(http-)?alternates|packs)|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))$" { + include uwsgi_params; + uwsgi_pass smartgit; + uwsgi_modifier1 9; + uwsgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; + uwsgi_param PATH_INFO /aur.git/$3; + uwsgi_param GIT_HTTP_EXPORT_ALL ""; + uwsgi_param GIT_NAMESPACE $1; + uwsgi_param GIT_PROJECT_ROOT /aurweb; + } + + location ~ ^/cgit { + include uwsgi_params; + rewrite ^/cgit/([^?/]+/[^?]*)?(?:\?(.*))?$ /cgit.cgi?url=$1&$2 last; + uwsgi_modifier1 9; + uwsgi_param CGIT_CONFIG /etc/cgitrc; + uwsgi_pass uwsgi://cgit-php; + } + + location ~ ^/[^/]+\.php($|/) { + fastcgi_pass php-fpm:9000; + fastcgi_index index.php; + fastcgi_split_path_info ^(/[^/]+\.php)(/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + include fastcgi_params; + } + + location ~ .+\.(css|js?|jpe?g|png|svg|ico)/?$ { + try_files $uri =404; + } + + location ~ .* { + rewrite ^/(.*)$ /index.php/$1 last; + } + + } + server { listen 8444 ssl http2; server_name localhost default_server; @@ -95,3 +147,4 @@ http { '' close; } } + diff --git a/docker/config/prometheus.yml b/docker/config/prometheus.yml deleted file mode 100644 index 6f286dd8..00000000 --- a/docker/config/prometheus.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -global: - scrape_interval: 60s - -scrape_configs: - - job_name: tempo - static_configs: - - targets: ['tempo:3200'] - labels: - instance: tempo - - job_name: aurweb - static_configs: - - targets: ['fastapi:8000'] - labels: - instance: aurweb diff --git a/docker/config/tempo.yml b/docker/config/tempo.yml deleted file mode 100644 index a94ae817..00000000 --- a/docker/config/tempo.yml +++ /dev/null @@ -1,54 +0,0 @@ ---- -stream_over_http_enabled: true -server: - http_listen_address: tempo - http_listen_port: 3200 - log_level: info - -query_frontend: - search: - duration_slo: 5s - throughput_bytes_slo: 1.073741824e+09 - trace_by_id: - duration_slo: 5s - -distributor: - receivers: - otlp: - protocols: - http: - endpoint: tempo:4318 - log_received_spans: - enabled: false - metric_received_spans: - enabled: false - -ingester: - max_block_duration: 5m - -compactor: - compaction: - block_retention: 1h - -metrics_generator: - registry: - external_labels: - source: tempo - storage: - path: /tmp/tempo/generator/wal - remote_write: - - url: http://prometheus:9090/api/v1/write - send_exemplars: true - traces_storage: - path: /tmp/tempo/generator/traces - -storage: - trace: - backend: local - wal: - path: /tmp/tempo/wal - local: - path: /tmp/tempo/blocks - -overrides: - metrics_generator_processors: [service-graphs, span-metrics, local-blocks] diff --git a/docker/health/ca.sh b/docker/health/ca.sh index 6bf8360e..3e4bbe8e 100755 --- a/docker/health/ca.sh +++ b/docker/health/ca.sh @@ -1,2 +1,2 @@ -#!/bin/bash -exec curl -qkiI 'https://localhost:8443/' + +exec printf "" 2>>/dev/null >>/dev/tcp/127.0.0.1/8443 diff --git a/docker/health/mariadb.sh b/docker/health/mariadb.sh index a75089ad..cbae37bd 100755 --- a/docker/health/mariadb.sh +++ b/docker/health/mariadb.sh @@ -1,2 +1,2 @@ #!/bin/bash -exec mariadb-admin ping --silent +exec mysqladmin ping --silent diff --git a/docker/health/memcached.sh b/docker/health/memcached.sh new file mode 100755 index 00000000..00f8cd98 --- /dev/null +++ b/docker/health/memcached.sh @@ -0,0 +1,2 @@ +#!/bin/bash +exec pgrep memcached diff --git a/docker/health/nginx.sh b/docker/health/nginx.sh index df76bc2b..c530103d 100755 --- a/docker/health/nginx.sh +++ b/docker/health/nginx.sh @@ -1,2 +1,2 @@ #!/bin/bash -exec curl -k -q https://localhost:8444 +exec curl --no-verify -q https://localhost:8444 diff --git a/docker/health/php.sh b/docker/health/php.sh new file mode 100755 index 00000000..7325946b --- /dev/null +++ b/docker/health/php.sh @@ -0,0 +1,2 @@ +#!/bin/bash +exec printf "" >>/dev/tcp/127.0.0.1/9000 diff --git a/docker/health/prometheus.sh b/docker/health/prometheus.sh deleted file mode 100755 index 4917655f..00000000 --- a/docker/health/prometheus.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec wget -q http://prometheus:9090/status -O /dev/null diff --git a/docker/health/tempo.sh b/docker/health/tempo.sh deleted file mode 100755 index cd316662..00000000 --- a/docker/health/tempo.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec wget -q http://tempo:3200/status -O /dev/null diff --git a/docker/mariadb-entrypoint.sh b/docker/mariadb-entrypoint.sh index 432b591b..a00f6106 100755 --- a/docker/mariadb-entrypoint.sh +++ b/docker/mariadb-entrypoint.sh @@ -6,26 +6,26 @@ MYSQL_DATA=/var/lib/mysql mariadb-install-db --user=mysql --basedir=/usr --datadir=$MYSQL_DATA # Start it up. -mariadbd-safe --datadir=$MYSQL_DATA --skip-networking & -while ! mariadb-admin ping 2>/dev/null; do +mysqld_safe --datadir=$MYSQL_DATA --skip-networking & +while ! mysqladmin ping 2>/dev/null; do sleep 1s done # Configure databases. -DATABASE="aurweb" # Persistent database for fastapi. +DATABASE="aurweb" # Persistent database for fastapi/php-fpm. echo "Taking care of primary database '${DATABASE}'..." -mariadb -u root -e "CREATE USER IF NOT EXISTS 'aur'@'localhost' IDENTIFIED BY 'aur';" -mariadb -u root -e "CREATE USER IF NOT EXISTS 'aur'@'%' IDENTIFIED BY 'aur';" -mariadb -u root -e "CREATE DATABASE IF NOT EXISTS $DATABASE;" +mysql -u root -e "CREATE USER IF NOT EXISTS 'aur'@'localhost' IDENTIFIED BY 'aur';" +mysql -u root -e "CREATE USER IF NOT EXISTS 'aur'@'%' IDENTIFIED BY 'aur';" +mysql -u root -e "CREATE DATABASE IF NOT EXISTS $DATABASE;" -mariadb -u root -e "CREATE USER IF NOT EXISTS 'aur'@'%' IDENTIFIED BY 'aur';" -mariadb -u root -e "GRANT ALL ON aurweb.* TO 'aur'@'localhost';" -mariadb -u root -e "GRANT ALL ON aurweb.* TO 'aur'@'%';" +mysql -u root -e "CREATE USER IF NOT EXISTS 'aur'@'%' IDENTIFIED BY 'aur';" +mysql -u root -e "GRANT ALL ON aurweb.* TO 'aur'@'localhost';" +mysql -u root -e "GRANT ALL ON aurweb.* TO 'aur'@'%';" -mariadb -u root -e "CREATE USER IF NOT EXISTS 'root'@'%' IDENTIFIED BY 'aur';" -mariadb -u root -e "GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;" +mysql -u root -e "CREATE USER IF NOT EXISTS 'root'@'%' IDENTIFIED BY 'aur';" +mysql -u root -e "GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;" -mariadb-admin -uroot shutdown +mysqladmin -uroot shutdown exec "$@" diff --git a/docker/php-entrypoint.sh b/docker/php-entrypoint.sh new file mode 100755 index 00000000..dc1a91de --- /dev/null +++ b/docker/php-entrypoint.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -eou pipefail + +for archive in packages pkgbase users packages-meta-v1.json packages-meta-ext-v1.json; do + ln -vsf /var/lib/aurweb/archives/${archive}.gz /aurweb/web/html/${archive}.gz +done + +# Setup database. +NO_INITDB=1 /docker/mariadb-init-entrypoint.sh + +# Setup some other options. +aurweb-config set options cache 'memcache' +aurweb-config set options aur_location "$AURWEB_PHP_PREFIX" +aurweb-config set options git_clone_uri_anon "${AURWEB_PHP_PREFIX}/%s.git" +aurweb-config set options git_clone_uri_priv "${AURWEB_SSHD_PREFIX}/%s.git" + +# Listen on :9000. +sed -ri 's/^(listen).*/\1 = 0.0.0.0:9000/' /etc/php/php-fpm.d/www.conf +sed -ri 's/^;?(clear_env).*/\1 = no/' /etc/php/php-fpm.d/www.conf + +# Log to stderr. View logs via `docker-compose logs php-fpm`. +sed -ri 's|^(error_log) = .*$|\1 = /proc/self/fd/2|g' /etc/php/php-fpm.conf +sed -ri 's|^;?(access\.log) = .*$|\1 = /proc/self/fd/2|g' \ + /etc/php/php-fpm.d/www.conf + +sed -ri 's/^;?(extension=pdo_mysql)/\1/' /etc/php/php.ini +sed -ri 's/^;?(open_basedir).*$/\1 = \//' /etc/php/php.ini + +# Use the sqlite3 extension line for memcached. +sed -ri 's/^;(extension)=sqlite3$/\1=memcached/' /etc/php/php.ini + +exec "$@" diff --git a/docker/redis-entrypoint.sh b/docker/redis-entrypoint.sh index 669716d7..e92be6c5 100755 --- a/docker/redis-entrypoint.sh +++ b/docker/redis-entrypoint.sh @@ -2,6 +2,5 @@ set -eou pipefail sed -ri 's/^bind .*$/bind 0.0.0.0 -::1/g' /etc/redis/redis.conf -sed -ri 's/protected-mode yes/protected-mode no/g' /etc/redis/redis.conf exec "$@" diff --git a/docker/scripts/install-deps.sh b/docker/scripts/install-deps.sh index 0ad8937f..ced18c81 100755 --- a/docker/scripts/install-deps.sh +++ b/docker/scripts/install-deps.sh @@ -13,10 +13,10 @@ pacman -Sy --noconfirm --noprogressbar archlinux-keyring # Install other OS dependencies. pacman -Syu --noconfirm --noprogressbar \ - git gpgme nginx redis openssh \ + --cachedir .pkg-cache git gpgme nginx redis openssh \ mariadb mariadb-libs cgit-aurweb uwsgi uwsgi-plugin-cgi \ - python-pip pyalpm python-srcinfo curl libeatmydata cronie \ - python-poetry python-poetry-core step-cli step-ca asciidoc \ - python-virtualenv python-pre-commit + php php-fpm memcached php-memcached python-pip pyalpm \ + python-srcinfo curl libeatmydata cronie python-poetry \ + python-poetry-core step-cli step-ca asciidoc exec "$@" diff --git a/docker/scripts/install-python-deps.sh b/docker/scripts/install-python-deps.sh index f1942498..3d5f28f0 100755 --- a/docker/scripts/install-python-deps.sh +++ b/docker/scripts/install-python-deps.sh @@ -1,8 +1,11 @@ #!/bin/bash set -eou pipefail -if [ ! -z "${COMPOSE+x}" ]; then - export PIP_BREAK_SYSTEM_PACKAGES=1 - poetry config virtualenvs.create false -fi +# Upgrade PIP; Arch Linux's version of pip is outdated for Poetry. +pip install --upgrade pip + +# Install the aurweb package and deps system-wide via poetry. +poetry config virtualenvs.create false poetry install --no-interaction --no-ansi + +exec "$@" diff --git a/docker/scripts/run-memcached.sh b/docker/scripts/run-memcached.sh new file mode 100755 index 00000000..90784b0f --- /dev/null +++ b/docker/scripts/run-memcached.sh @@ -0,0 +1,2 @@ +#!/bin/bash +exec /usr/bin/memcached -u memcached -m 64 -c 1024 -l 0.0.0.0 diff --git a/docker/scripts/run-nginx.sh b/docker/scripts/run-nginx.sh index e976f67d..6ece3303 100755 --- a/docker/scripts/run-nginx.sh +++ b/docker/scripts/run-nginx.sh @@ -5,6 +5,8 @@ echo echo " Services:" echo " - FastAPI : https://localhost:8444/" echo " (cgit) : https://localhost:8444/cgit/" +echo " - PHP : https://localhost:8443/" +echo " (cgit) : https://localhost:8443/cgit/" echo echo " Note: Copy root CA (./data/ca.root.pem) to ca-certificates or browser." echo diff --git a/docker/scripts/run-php.sh b/docker/scripts/run-php.sh new file mode 100755 index 00000000..b86f8ce5 --- /dev/null +++ b/docker/scripts/run-php.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -eou pipefail + +exec php-fpm --fpm-config /etc/php/php-fpm.conf --nodaemonize diff --git a/docker/scripts/run-pytests.sh b/docker/scripts/run-pytests.sh index 1df432f8..d8c093d5 100755 --- a/docker/scripts/run-pytests.sh +++ b/docker/scripts/run-pytests.sh @@ -25,7 +25,7 @@ rm -rf $PROMETHEUS_MULTIPROC_DIR mkdir -p $PROMETHEUS_MULTIPROC_DIR # Run pytest with optional targets in front of it. -pytest --junitxml="/data/pytest-report.xml" +pytest # By default, report coverage and move it into cache. if [ $COVERAGE -eq 1 ]; then diff --git a/docker/scripts/run-tests.sh b/docker/scripts/run-tests.sh index 75e562b0..a726c957 100755 --- a/docker/scripts/run-tests.sh +++ b/docker/scripts/run-tests.sh @@ -21,5 +21,8 @@ rm -f /data/.coverage cp -v .coverage /data/.coverage chmod 666 /data/.coverage -# Run pre-commit checks -pre-commit run -a +# Run flake8 and isort checks. +for dir in aurweb test migrations; do + flake8 --count $dir + isort --check-only $dir +done diff --git a/gunicorn.conf.py b/gunicorn.conf.py deleted file mode 100644 index 4f1c3a8c..00000000 --- a/gunicorn.conf.py +++ /dev/null @@ -1,7 +0,0 @@ -from prometheus_client import multiprocess - - -def child_exit(server, worker): # pragma: no cover - """This function is required for gunicorn customization - of prometheus multiprocessing.""" - multiprocess.mark_process_dead(worker.pid) diff --git a/logging.conf b/logging.conf index d27b0153..7dfd30f0 100644 --- a/logging.conf +++ b/logging.conf @@ -50,9 +50,9 @@ formatter=detailedFormatter args=(sys.stdout,) [formatter_simpleFormatter] -format=%(asctime)s %(levelname)-8s | %(name)s @ (%(filename)s:%(lineno)d): %(message)s +format=%(asctime)s %(levelname)-5s | %(name)s: %(message)s datefmt=%H:%M:%S [formatter_detailedFormatter] -format=%(asctime)s %(levelname)-8s | [%(name)s.%(funcName)s() @ %(filename)s:%(lineno)d]: %(message)s +format=%(asctime)s %(levelname)-5s | %(name)s.%(funcName)s() @ L%(lineno)d: %(message)s datefmt=%H:%M:%S diff --git a/logging.prod.conf b/logging.prod.conf deleted file mode 100644 index 63692a28..00000000 --- a/logging.prod.conf +++ /dev/null @@ -1,58 +0,0 @@ -[loggers] -keys=root,aurweb,uvicorn,hypercorn,alembic - -[handlers] -keys=simpleHandler,detailedHandler - -[formatters] -keys=simpleFormatter,detailedFormatter - -[logger_root] -level=INFO -; We add NullHandler programmatically. -handlers= -propogate=0 - -[logger_aurweb] -level=INFO -handlers=simpleHandler -qualname=aurweb -propagate=1 - -[logger_uvicorn] -level=WARN -handlers=simpleHandler -qualname=uvicorn -propagate=0 - -[logger_hypercorn] -level=WARN -handlers=simpleHandler -qualname=hypercorn -propagate=0 - -[logger_alembic] -level=WARN -handlers=simpleHandler -qualname=alembic -propagate=0 - -[handler_simpleHandler] -class=StreamHandler -level=INFO -formatter=simpleFormatter -args=(sys.stdout,) - -[handler_detailedHandler] -class=StreamHandler -level=DEBUG -formatter=detailedFormatter -args=(sys.stdout,) - -[formatter_simpleFormatter] -format=%(asctime)s %(levelname)-8s | %(name)s @ (%(filename)s:%(lineno)d): %(message)s -datefmt=%H:%M:%S - -[formatter_detailedFormatter] -format=%(asctime)s %(levelname)-8s | [%(name)s.%(funcName)s() @ %(filename)s:%(lineno)d]: %(message)s -datefmt=%H:%M:%S diff --git a/migrations/env.py b/migrations/env.py index dcc0329d..774ecdeb 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -2,6 +2,7 @@ import logging import logging.config import sqlalchemy + from alembic import context import aurweb.db @@ -68,7 +69,9 @@ def run_migrations_online(): ) with connectable.connect() as connection: - context.configure(connection=connection, target_metadata=target_metadata) + context.configure( + connection=connection, target_metadata=target_metadata + ) with context.begin_transaction(): context.run_migrations() diff --git a/migrations/versions/38e5b9982eea_add_indicies_on_packagebases_for_rss_.py b/migrations/versions/38e5b9982eea_add_indicies_on_packagebases_for_rss_.py deleted file mode 100644 index e6d5f275..00000000 --- a/migrations/versions/38e5b9982eea_add_indicies_on_packagebases_for_rss_.py +++ /dev/null @@ -1,29 +0,0 @@ -"""add indices on PackageBases for RSS order by - -Revision ID: 38e5b9982eea -Revises: 7d65d35fae45 -Create Date: 2024-08-03 01:35:39.104283 - -""" - -from alembic import op - -# revision identifiers, used by Alembic. -revision = "38e5b9982eea" -down_revision = "7d65d35fae45" -branch_labels = None -depends_on = None - - -def upgrade(): - # ### commands auto generated by Alembic - please adjust! ### - op.create_index("BasesModifiedTS", "PackageBases", ["ModifiedTS"], unique=False) - op.create_index("BasesSubmittedTS", "PackageBases", ["SubmittedTS"], unique=False) - # ### end Alembic commands ### - - -def downgrade(): - # ### commands auto generated by Alembic - please adjust! ### - op.drop_index("BasesSubmittedTS", table_name="PackageBases") - op.drop_index("BasesModifiedTS", table_name="PackageBases") - # ### end Alembic commands ### diff --git a/migrations/versions/56e2ce8e2ffa_utf8mb4_charset_and_collation.py b/migrations/versions/56e2ce8e2ffa_utf8mb4_charset_and_collation.py index 5cbf6de8..c3b79dab 100644 --- a/migrations/versions/56e2ce8e2ffa_utf8mb4_charset_and_collation.py +++ b/migrations/versions/56e2ce8e2ffa_utf8mb4_charset_and_collation.py @@ -5,47 +5,46 @@ Revises: ef39fcd6e1cd Create Date: 2021-05-17 14:23:00.008479 """ - from alembic import op import aurweb.config # revision identifiers, used by Alembic. -revision = "56e2ce8e2ffa" -down_revision = "ef39fcd6e1cd" +revision = '56e2ce8e2ffa' +down_revision = 'ef39fcd6e1cd' branch_labels = None depends_on = None # Tables affected by charset/collate change tables = [ - ("AccountTypes", "utf8mb4", "utf8mb4_general_ci"), - ("ApiRateLimit", "utf8mb4", "utf8mb4_general_ci"), - ("Bans", "utf8mb4", "utf8mb4_general_ci"), - ("DependencyTypes", "utf8mb4", "utf8mb4_general_ci"), - ("Groups", "utf8mb4", "utf8mb4_general_ci"), - ("Licenses", "utf8mb4", "utf8mb4_general_ci"), - ("OfficialProviders", "utf8mb4", "utf8mb4_bin"), - ("PackageBases", "utf8mb4", "utf8mb4_general_ci"), - ("PackageBlacklist", "utf8mb4", "utf8mb4_general_ci"), - ("PackageComments", "utf8mb4", "utf8mb4_general_ci"), - ("PackageDepends", "utf8mb4", "utf8mb4_general_ci"), - ("PackageKeywords", "utf8mb4", "utf8mb4_general_ci"), - ("PackageRelations", "utf8mb4", "utf8mb4_general_ci"), - ("PackageRequests", "utf8mb4", "utf8mb4_general_ci"), - ("PackageSources", "utf8mb4", "utf8mb4_general_ci"), - ("Packages", "utf8mb4", "utf8mb4_general_ci"), - ("RelationTypes", "utf8mb4", "utf8mb4_general_ci"), - ("RequestTypes", "utf8mb4", "utf8mb4_general_ci"), - ("SSHPubKeys", "utf8mb4", "utf8mb4_bin"), - ("Sessions", "utf8mb4", "utf8mb4_bin"), - ("TU_VoteInfo", "utf8mb4", "utf8mb4_general_ci"), - ("Terms", "utf8mb4", "utf8mb4_general_ci"), - ("Users", "utf8mb4", "utf8mb4_general_ci"), + ('AccountTypes', 'utf8mb4', 'utf8mb4_general_ci'), + ('ApiRateLimit', 'utf8mb4', 'utf8mb4_general_ci'), + ('Bans', 'utf8mb4', 'utf8mb4_general_ci'), + ('DependencyTypes', 'utf8mb4', 'utf8mb4_general_ci'), + ('Groups', 'utf8mb4', 'utf8mb4_general_ci'), + ('Licenses', 'utf8mb4', 'utf8mb4_general_ci'), + ('OfficialProviders', 'utf8mb4', 'utf8mb4_bin'), + ('PackageBases', 'utf8mb4', 'utf8mb4_general_ci'), + ('PackageBlacklist', 'utf8mb4', 'utf8mb4_general_ci'), + ('PackageComments', 'utf8mb4', 'utf8mb4_general_ci'), + ('PackageDepends', 'utf8mb4', 'utf8mb4_general_ci'), + ('PackageKeywords', 'utf8mb4', 'utf8mb4_general_ci'), + ('PackageRelations', 'utf8mb4', 'utf8mb4_general_ci'), + ('PackageRequests', 'utf8mb4', 'utf8mb4_general_ci'), + ('PackageSources', 'utf8mb4', 'utf8mb4_general_ci'), + ('Packages', 'utf8mb4', 'utf8mb4_general_ci'), + ('RelationTypes', 'utf8mb4', 'utf8mb4_general_ci'), + ('RequestTypes', 'utf8mb4', 'utf8mb4_general_ci'), + ('SSHPubKeys', 'utf8mb4', 'utf8mb4_bin'), + ('Sessions', 'utf8mb4', 'utf8mb4_bin'), + ('TU_VoteInfo', 'utf8mb4', 'utf8mb4_general_ci'), + ('Terms', 'utf8mb4', 'utf8mb4_general_ci'), + ('Users', 'utf8mb4', 'utf8mb4_general_ci') ] # Indexes affected by charset/collate change # Map of Unique Indexes key = index_name, value = [table_name, column1, column2] -indexes = {"ProviderNameProvides": ["OfficialProviders", "Name", "Provides"]} +indexes = {'ProviderNameProvides': ['OfficialProviders', 'Name', 'Provides']} # Source charset/collation, before this migration is run. src_charset = "utf8" diff --git a/migrations/versions/6441d3b65270_add_popularityupdated_to_packagebase.py b/migrations/versions/6441d3b65270_add_popularityupdated_to_packagebase.py deleted file mode 100644 index 0c817bad..00000000 --- a/migrations/versions/6441d3b65270_add_popularityupdated_to_packagebase.py +++ /dev/null @@ -1,34 +0,0 @@ -"""add PopularityUpdated to PackageBase - -Revision ID: 6441d3b65270 -Revises: d64e5571bc8d -Create Date: 2022-09-22 18:08:03.280664 - -""" - -from alembic import op -from sqlalchemy.exc import OperationalError - -from aurweb.models.package_base import PackageBase -from aurweb.scripts import popupdate - -# revision identifiers, used by Alembic. -revision = "6441d3b65270" -down_revision = "d64e5571bc8d" -branch_labels = None -depends_on = None - -table = PackageBase.__table__ - - -def upgrade(): - try: - op.add_column(table.name, table.c.PopularityUpdated) - except OperationalError: - print(f"table '{table.name}' already exists, skipping migration") - - popupdate.run_variable() - - -def downgrade(): - op.drop_column(table.name, "PopularityUpdated") diff --git a/migrations/versions/6a64dd126029_rename_tu_to_package_maintainer.py b/migrations/versions/6a64dd126029_rename_tu_to_package_maintainer.py deleted file mode 100644 index 489d6e6c..00000000 --- a/migrations/versions/6a64dd126029_rename_tu_to_package_maintainer.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Rename TU to Package Maintainer - -Revision ID: 6a64dd126029 -Revises: c5a6a9b661a0 -Create Date: 2023-09-01 13:48:15.315244 - -""" - -from aurweb import db -from aurweb.models import AccountType - -# revision identifiers, used by Alembic. -revision = "6a64dd126029" -down_revision = "c5a6a9b661a0" -branch_labels = None -depends_on = None - -# AccountTypes -# ID 2 -> Trusted User / Package Maintainer -# ID 4 -> Trusted User & Developer / Package Maintainer & Developer - - -def upgrade(): - with db.begin(): - tu = db.query(AccountType).filter(AccountType.ID == 2).first() - tudev = db.query(AccountType).filter(AccountType.ID == 4).first() - - tu.AccountType = "Package Maintainer" - tudev.AccountType = "Package Maintainer & Developer" - - -def downgrade(): - with db.begin(): - pm = db.query(AccountType).filter(AccountType.ID == 2).first() - pmdev = db.query(AccountType).filter(AccountType.ID == 4).first() - - pm.AccountType = "Trusted User" - pmdev.AccountType = "Trusted User & Developer" diff --git a/migrations/versions/7d65d35fae45_rename_tu_tables_columns.py b/migrations/versions/7d65d35fae45_rename_tu_tables_columns.py deleted file mode 100644 index 9d768f50..00000000 --- a/migrations/versions/7d65d35fae45_rename_tu_tables_columns.py +++ /dev/null @@ -1,48 +0,0 @@ -"""Rename TU tables/columns - -Revision ID: 7d65d35fae45 -Revises: 6a64dd126029 -Create Date: 2023-09-10 10:21:33.092342 - -""" - -from alembic import op -from sqlalchemy.dialects.mysql import INTEGER - -# revision identifiers, used by Alembic. -revision = "7d65d35fae45" -down_revision = "6a64dd126029" -branch_labels = None -depends_on = None - -# TU_VoteInfo -> VoteInfo -# TU_VoteInfo.ActiveTUs -> VoteInfo.ActiveUsers -# TU_Votes -> Votes - - -def upgrade(): - # Tables - op.rename_table("TU_VoteInfo", "VoteInfo") - op.rename_table("TU_Votes", "Votes") - - # Columns - op.alter_column( - "VoteInfo", - "ActiveTUs", - existing_type=INTEGER(unsigned=True), - new_column_name="ActiveUsers", - ) - - -def downgrade(): - # Tables - op.rename_table("VoteInfo", "TU_VoteInfo") - op.rename_table("Votes", "TU_Votes") - - # Columns - op.alter_column( - "TU_VoteInfo", - "ActiveUsers", - existing_type=INTEGER(unsigned=True), - new_column_name="ActiveTUs", - ) diff --git a/migrations/versions/9e3158957fd7_add_packagekeyword_packagebaseuid.py b/migrations/versions/9e3158957fd7_add_packagekeyword_packagebaseuid.py deleted file mode 100644 index 86ee0067..00000000 --- a/migrations/versions/9e3158957fd7_add_packagekeyword_packagebaseuid.py +++ /dev/null @@ -1,25 +0,0 @@ -"""add PackageKeyword.PackageBaseUID index - -Revision ID: 9e3158957fd7 -Revises: 6441d3b65270 -Create Date: 2022-10-17 11:11:46.203322 - -""" - -from alembic import op - -# revision identifiers, used by Alembic. -revision = "9e3158957fd7" -down_revision = "6441d3b65270" -branch_labels = None -depends_on = None - - -def upgrade(): - op.create_index( - "KeywordsPackageBaseID", "PackageKeywords", ["PackageBaseID"], unique=False - ) - - -def downgrade(): - op.drop_index("KeywordsPackageBaseID", table_name="PackageKeywords") diff --git a/migrations/versions/be7adae47ac3_upgrade_voteinfo_integers.py b/migrations/versions/be7adae47ac3_upgrade_voteinfo_integers.py index 02c443a1..d910a14b 100644 --- a/migrations/versions/be7adae47ac3_upgrade_voteinfo_integers.py +++ b/migrations/versions/be7adae47ac3_upgrade_voteinfo_integers.py @@ -15,13 +15,12 @@ Revision ID: be7adae47ac3 Revises: 56e2ce8e2ffa Create Date: 2022-01-06 14:37:07.899778 """ - from alembic import op from sqlalchemy.dialects.mysql import INTEGER, TINYINT # revision identifiers, used by Alembic. -revision = "be7adae47ac3" -down_revision = "56e2ce8e2ffa" +revision = 'be7adae47ac3' +down_revision = '56e2ce8e2ffa' branch_labels = None depends_on = None @@ -33,7 +32,7 @@ DOWNGRADE_T = TINYINT(3, unsigned=True) def upgrade(): - """Upgrade 'Yes', 'No', 'Abstain' and 'ActiveTUs' to unsigned INTEGER.""" + """ Upgrade 'Yes', 'No', 'Abstain' and 'ActiveTUs' to unsigned INTEGER. """ op.alter_column("TU_VoteInfo", "Yes", type_=UPGRADE_T) op.alter_column("TU_VoteInfo", "No", type_=UPGRADE_T) op.alter_column("TU_VoteInfo", "Abstain", type_=UPGRADE_T) diff --git a/migrations/versions/c5a6a9b661a0_add_index_on_packagebases_popularity_.py b/migrations/versions/c5a6a9b661a0_add_index_on_packagebases_popularity_.py deleted file mode 100644 index 3cc146ee..00000000 --- a/migrations/versions/c5a6a9b661a0_add_index_on_packagebases_popularity_.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Add index on PackageBases.Popularity and .Name - -Revision ID: c5a6a9b661a0 -Revises: e4e49ffce091 -Create Date: 2023-07-02 13:46:52.522146 - -""" - -from alembic import op - -# revision identifiers, used by Alembic. -revision = "c5a6a9b661a0" -down_revision = "e4e49ffce091" -branch_labels = None -depends_on = None - - -def upgrade(): - op.create_index( - "BasesPopularityName", "PackageBases", ["Popularity", "Name"], unique=False - ) - - -def downgrade(): - op.drop_index("BasesPopularityName", table_name="PackageBases") diff --git a/migrations/versions/d64e5571bc8d_fix_pkgvote_votets.py b/migrations/versions/d64e5571bc8d_fix_pkgvote_votets.py index 0fda746b..a89d97ef 100644 --- a/migrations/versions/d64e5571bc8d_fix_pkgvote_votets.py +++ b/migrations/versions/d64e5571bc8d_fix_pkgvote_votets.py @@ -5,23 +5,23 @@ Revises: be7adae47ac3 Create Date: 2022-02-18 12:47:05.322766 """ - from datetime import datetime import sqlalchemy as sa + from alembic import op from aurweb import db from aurweb.models import PackageVote # revision identifiers, used by Alembic. -revision = "d64e5571bc8d" -down_revision = "be7adae47ac3" +revision = 'd64e5571bc8d' +down_revision = 'be7adae47ac3' branch_labels = None depends_on = None table = PackageVote.__tablename__ -column = "VoteTS" +column = 'VoteTS' epoch = datetime(1970, 1, 1) diff --git a/migrations/versions/e4e49ffce091_add_hidedeletedcomments_to_user.py b/migrations/versions/e4e49ffce091_add_hidedeletedcomments_to_user.py deleted file mode 100644 index 6637cc0d..00000000 --- a/migrations/versions/e4e49ffce091_add_hidedeletedcomments_to_user.py +++ /dev/null @@ -1,34 +0,0 @@ -"""Add HideDeletedComments to User - -Revision ID: e4e49ffce091 -Revises: 9e3158957fd7 -Create Date: 2023-04-19 23:24:25.854874 - -""" - -from alembic import op -from sqlalchemy.exc import OperationalError - -from aurweb.models.user import User - -# revision identifiers, used by Alembic. -revision = "e4e49ffce091" -down_revision = "9e3158957fd7" -branch_labels = None -depends_on = None - -table = User.__table__ - - -def upgrade(): - try: - op.add_column(table.name, table.c.HideDeletedComments) - except OperationalError: - print( - f"Column HideDeletedComments already exists in '{table.name}'," - f" skipping migration." - ) - - -def downgrade(): - op.drop_column(table.name, "HideDeletedComments") diff --git a/migrations/versions/ef39fcd6e1cd_add_sso_account_id_in_table_users.py b/migrations/versions/ef39fcd6e1cd_add_sso_account_id_in_table_users.py index 260c903b..49bf055a 100644 --- a/migrations/versions/ef39fcd6e1cd_add_sso_account_id_in_table_users.py +++ b/migrations/versions/ef39fcd6e1cd_add_sso_account_id_in_table_users.py @@ -5,34 +5,32 @@ Revises: f47cad5d6d03 Create Date: 2020-06-08 10:04:13.898617 """ - import sqlalchemy as sa + from alembic import op from sqlalchemy.engine.reflection import Inspector # revision identifiers, used by Alembic. -revision = "ef39fcd6e1cd" -down_revision = "f47cad5d6d03" +revision = 'ef39fcd6e1cd' +down_revision = 'f47cad5d6d03' branch_labels = None depends_on = None def table_has_column(table, column_name): for element in Inspector.from_engine(op.get_bind()).get_columns(table): - if element.get("name") == column_name: + if element.get('name') == column_name: return True return False def upgrade(): - if not table_has_column("Users", "SSOAccountID"): - op.add_column( - "Users", sa.Column("SSOAccountID", sa.String(length=255), nullable=True) - ) - op.create_unique_constraint(None, "Users", ["SSOAccountID"]) + if not table_has_column('Users', 'SSOAccountID'): + op.add_column('Users', sa.Column('SSOAccountID', sa.String(length=255), nullable=True)) + op.create_unique_constraint(None, 'Users', ['SSOAccountID']) def downgrade(): - if table_has_column("Users", "SSOAccountID"): - op.drop_constraint("SSOAccountID", "Users", type_="unique") - op.drop_column("Users", "SSOAccountID") + if table_has_column('Users', 'SSOAccountID'): + op.drop_constraint('SSOAccountID', 'Users', type_='unique') + op.drop_column('Users', 'SSOAccountID') diff --git a/migrations/versions/f47cad5d6d03_initial_revision.py b/migrations/versions/f47cad5d6d03_initial_revision.py index a8a007f3..b214beea 100644 --- a/migrations/versions/f47cad5d6d03_initial_revision.py +++ b/migrations/versions/f47cad5d6d03_initial_revision.py @@ -4,9 +4,8 @@ Revision ID: f47cad5d6d03 Create Date: 2020-02-23 13:23:32.331396 """ - # revision identifiers, used by Alembic. -revision = "f47cad5d6d03" +revision = 'f47cad5d6d03' down_revision = None branch_labels = None depends_on = None diff --git a/po/Makefile b/po/Makefile index 8fd17515..0b579f48 100644 --- a/po/Makefile +++ b/po/Makefile @@ -48,12 +48,20 @@ all: ${MOFILES} lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ msgmerge -U --no-location --lang="$$lang" $< aurweb.pot +POTFILES-php: + find ../web -type f -name '*.php' -printf '%P\n' | sort >POTFILES-php + POTFILES-py: find ../aurweb -type f -name '*.py' -printf '%P\n' | sort >POTFILES-py -update-pot: POTFILES-py +update-pot: POTFILES-php POTFILES-py pkgname=AURWEB; \ - pkgver=`sed -n 's/version\s*=\s*"\(.*\)"/\1/p' ../pyproject.toml`; \ + pkgver=`sed -n 's/.*"AURWEB_VERSION", "\(.*\)".*/\1/p' ../web/lib/version.inc.php`; \ + xgettext --default-domain=aurweb -L php --keyword=__ --keyword=_n:1,2 \ + --add-location=file --add-comments=TRANSLATORS: \ + --package-name="$$pkgname" --package-version="$$pkgver" \ + --msgid-bugs-address='${MSGID_BUGS_ADDRESS}' \ + --directory ../web --files-from POTFILES-php -o aurweb.pot; \ xgettext --default-domain=aurweb -L python --join-existing \ --keyword=translate \ --add-location=file --add-comments=TRANSLATORS: \ @@ -65,7 +73,7 @@ update-po: ${MAKE} ${UPDATEPOFILES} clean: - rm -f *.mo *.po\~ POTFILES-py + rm -f *.mo *.po\~ POTFILES-php POTFILES-py install: all for l in ${LOCALES}; do mkdir -p ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done @@ -74,4 +82,4 @@ install: all uninstall: for l in ${LOCALES}; do rm -rf ${DESTDIR}${PREFIX}/$$l/LC_MESSAGES/; done -.PHONY: all update-pot update-po clean install uninstall POTFILES-py +.PHONY: all update-pot update-po clean install uninstall POTFILES-php POTFILES-py diff --git a/po/ar.po b/po/ar.po index 3bd2838c..676a5025 100644 --- a/po/ar.po +++ b/po/ar.po @@ -8,11 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: صفا الفليج , 2015-2016\n" -"Language-Team: Arabic (http://app.transifex.com/lfleischer/aurweb/language/ar/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Arabic (http://www.transifex.com/lfleischer/aurweb/language/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -133,15 +133,15 @@ msgid "Type" msgstr "النّوع" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "إضافة م‌م" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "إزالة م‌م" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -199,10 +199,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "مرحبًا بك في م‌م‌آ! فضلًا اقرأ %sإرشادات مستخدمي م‌م‌آ%s و%sإرشادات مستخدمي م‌م‌آ الموثوقين (م‌م)%s لمعلومات أكثر." #: html/home.php #, php-format @@ -216,8 +215,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "تذكّر أن تصوّت لحزمك المفضّلة!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "قد تكون بعض الحزم متوفّرة كثنائيّات في مستودع المجتمع [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "قد تكون بعض الحزم متوفّرة كثنائيّات في مستودع المجتمع [community]." #: html/home.php msgid "DISCLAIMER" @@ -266,8 +265,8 @@ msgstr "طلب الحذف" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "اطلب أن تُزال الحزمة من مستودع مستخدمي آرتش. فضلًا لا تستخدم هذه إن كانت الحزمة معطوبة ويمكن إصلاحها بسهولة. بدل ذلك تواصل مع مصين الحزمة وأبلغ عن طلب \"يتيمة\" إن تطلّب الأمر." #: html/home.php msgid "Merge Request" @@ -309,11 +308,10 @@ msgstr "النّقاش" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "النّقاشات العاّمة حول مستودع مستخدمي آرتش (م‌م‌آ) وبنية المستخدمين الموثوقين تكون في %saur-general%s. للنّقاشات المتعلّقة بتطوير واجهة وِبّ م‌م‌آ، استخدم قائمة %saur-dev%s البريديّة." #: html/home.php msgid "Bug Reporting" @@ -324,9 +322,9 @@ msgstr "الإبلاغ عن العلل" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "إن وجدت علّة في واجهة وِبّ م‌م‌آ، فضلًا املأ تقريرًا بها في %sمتعقّب العلل%s. استخدم المتعقّب للإبلاغ عن العلل في واجهة وِبّ م‌م‌آ %sفقط%s. للإبلاغ عن علل الحزم راسل مديرها أو اترك تعليقًا في صفحة الحزمة المناسبة." #: html/home.php msgid "Package Search" @@ -526,8 +524,8 @@ msgid "Delete" msgstr "احذف" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "يمكن فقط للمستخدمين الموثوقين والمطوّرين حذف الحزم." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -567,8 +565,8 @@ msgid "Disown" msgstr "تنازل" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "يمكن فقط للمستخدمين الموثوقين والمطوّرين التّنازل عن الحزم." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -657,8 +655,8 @@ msgid "Merge" msgstr "دمج" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "يمكن فقط للمستخدمين الموثوقين والمطوّرين دمج الحزم." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -715,8 +713,8 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "مستخدم موثوق" #: html/tu.php msgid "Could not retrieve proposal details." @@ -727,8 +725,8 @@ msgid "Voting is closed for this proposal." msgstr "أُغلق التّصويت على هذا الرّأي." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "فقط المستخدمين الموثوقين مسموح لهم بالتّصويت." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1223,8 +1221,8 @@ msgstr "مطوّر" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "مستخدم موثوق ومطوّر" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1326,6 +1324,10 @@ msgstr "" msgid "Normal user" msgstr "مستخدم عاديّ" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "مستخدم موثوق" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "حساب معلّق" @@ -1398,15 +1400,6 @@ msgid "" " the Arch User Repository." msgstr "المعلومات الآتية مطلوبة فقط إن أردت تقديم حزم إلى مستودع مستخدمي آرتش." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "مفتاح SSH العموميّ" @@ -1834,22 +1827,22 @@ msgstr "ادمج مع" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2122,8 +2115,8 @@ msgid "Registered Users" msgstr "المستخدمون المسجّلون" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "المستخدمون الموثوقون" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2308,7 +2301,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2362,35 +2355,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/ast.po b/po/ast.po index 94e1fd91..16c363a6 100644 --- a/po/ast.po +++ b/po/ast.po @@ -3,19 +3,17 @@ # This file is distributed under the same license as the AURWEB package. # # Translators: -# enolp , 2014-2015,2017,2020,2022 -# enolp , 2020 -# Ḷḷumex03, 2014 -# Ḷḷumex03, 2014 -# Pablo Lezaeta Reyes , 2014-2015 +# enolp , 2014-2015,2017 +# Ḷḷumex03 , 2014 +# prflr88 , 2014-2015 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: enolp , 2014-2015,2017,2020,2022\n" -"Language-Team: Asturian (http://app.transifex.com/lfleischer/aurweb/language/ast/)\n" +"PO-Revision-Date: 2020-03-07 17:55+0000\n" +"Last-Translator: enolp \n" +"Language-Team: Asturian (http://www.transifex.com/lfleischer/aurweb/language/ast/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -24,7 +22,7 @@ msgstr "" #: html/404.php msgid "Page Not Found" -msgstr "Nun s'atopó la páxina" +msgstr "" #: html/404.php msgid "Sorry, the page you've requested does not exist." @@ -50,7 +48,7 @@ msgstr "" #: html/503.php msgid "Service Unavailable" -msgstr "El serviciu nun ta disponible" +msgstr "" #: html/503.php msgid "" @@ -71,11 +69,11 @@ msgstr "" #: html/account.php msgid "Could not retrieve information for the specified user." -msgstr "Nun se pudo recuperar la información del usuariu especificáu." +msgstr "" #: html/account.php msgid "You do not have permission to edit this account." -msgstr "Nun tienes permisu pa editar esta cuenta." +msgstr "" #: html/account.php lib/acctfuncs.inc.php msgid "Invalid password." @@ -136,15 +134,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -202,9 +200,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -219,7 +216,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -263,18 +260,18 @@ msgstr "" #: html/home.php msgid "Deletion Request" -msgstr "Solicitú de desaniciu" +msgstr "" #: html/home.php msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php msgid "Merge Request" -msgstr "Solicitú de mecíu" +msgstr "" #: html/home.php msgid "" @@ -307,15 +304,14 @@ msgstr "" #: html/home.php msgid "Discussion" -msgstr "Discutiniu" +msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -327,8 +323,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -477,12 +473,6 @@ msgid "" "checkbox." msgstr "" -#: aurweb/routers/packages.py -msgid "" -"The selected packages have not been adopted, check the confirmation " -"checkbox." -msgstr "" - #: html/pkgbase.php lib/pkgreqfuncs.inc.php msgid "Cannot find package to merge votes and comments into." msgstr "" @@ -529,7 +519,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -570,7 +560,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -581,14 +571,6 @@ msgstr "" msgid "Flag Package Out-Of-Date" msgstr "" -#: templates/packages/flag.html -msgid "" -"This seems to be a VCS package. Please do %snot%s flag it out-of-date if the" -" package version in the AUR does not match the most recent commit. Flagging " -"this package should only be done if the sources moved or changes in the " -"PKGBUILD are required because of recent upstream changes." -msgstr "" - #: html/pkgflag.php #, php-format msgid "" @@ -660,7 +642,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -715,22 +697,22 @@ msgstr "" #: html/tos.php msgid "I accept the terms and conditions above." -msgstr "Acepto los términos y les condiciones d'arriba." +msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php msgid "Could not retrieve proposal details." -msgstr "Nun se pudieron recuperar los detalles de la propuesta." +msgstr "" #: html/tu.php msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -885,10 +867,6 @@ msgstr "" msgid "Account suspended" msgstr "" -#: aurweb/routers/accounts.py -msgid "You do not have permission to suspend accounts." -msgstr "" - #: lib/acctfuncs.inc.php #, php-format msgid "" @@ -932,7 +910,7 @@ msgstr "" #: lib/pkgbasefuncs.inc.php msgid "Comment cannot be empty." -msgstr "El comentariu nun pue tar baleru." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "Comment has been added." @@ -940,7 +918,7 @@ msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can edit package information." -msgstr "Tienes d'aniciar la sesión enantes d'editar la información del paquete." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "Missing comment ID." @@ -948,15 +926,15 @@ msgstr "" #: lib/pkgbasefuncs.inc.php msgid "No more than 5 comments can be pinned." -msgstr "Nun se puen fixar más de 5 comentarios." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You are not allowed to pin this comment." -msgstr "Nun tienes permisu pa fixar esti comentariu." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You are not allowed to unpin this comment." -msgstr "Nun tienes permisu pa lliberar esti comentariu." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "Comment has been pinned." @@ -972,30 +950,6 @@ msgstr "" #: lib/pkgbasefuncs.inc.php lib/pkgfuncs.inc.php msgid "Package details could not be found." -msgstr "Nun se pudieron atopar los detalles del paquete." - -#: aurweb/routers/auth.py -msgid "Bad Referer header." -msgstr "" - -#: aurweb/routers/packages.py -msgid "You did not select any packages to be notified about." -msgstr "" - -#: aurweb/routers/packages.py -msgid "The selected packages' notifications have been enabled." -msgstr "" - -#: aurweb/routers/packages.py -msgid "You did not select any packages for notification removal." -msgstr "" - -#: aurweb/routers/packages.py -msgid "A package you selected does not have notifications enabled." -msgstr "" - -#: aurweb/routers/packages.py -msgid "The selected packages' notifications have been removed." msgstr "" #: lib/pkgbasefuncs.inc.php @@ -1034,10 +988,6 @@ msgstr "" msgid "You did not select any packages to delete." msgstr "" -#: aurweb/routers/packages.py -msgid "One of the packages you selected does not exist." -msgstr "" - #: lib/pkgbasefuncs.inc.php msgid "The selected packages have been deleted." msgstr "" @@ -1046,18 +996,10 @@ msgstr "" msgid "You must be logged in before you can adopt packages." msgstr "" -#: aurweb/routers/package.py -msgid "You are not allowed to adopt one of the packages you selected." -msgstr "" - #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can disown packages." msgstr "" -#: aurweb/routers/packages.py -msgid "You are not allowed to disown one of the packages you selected." -msgstr "" - #: lib/pkgbasefuncs.inc.php msgid "You did not select any packages to adopt." msgstr "" @@ -1226,7 +1168,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1329,6 +1271,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1401,15 +1347,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1614,7 +1551,7 @@ msgstr "" #: template/pkgbase_details.php template/pkg_details.php #: template/pkg_search_form.php msgid "Keywords" -msgstr "Pallabres clave" +msgstr "" #: template/pkgbase_details.php template/pkg_details.php #: template/pkg_search_form.php @@ -1833,22 +1770,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -1868,7 +1805,7 @@ msgstr[1] "" #: template/pkgreq_results.php template/pkg_search_results.php #, php-format msgid "Page %d of %d." -msgstr "Páxina %d de %d." +msgstr "" #: template/pkgreq_results.php msgid "Package" @@ -2082,7 +2019,7 @@ msgstr "" #: template/stats/general_stats_table.php msgid "Orphan Packages" -msgstr "Paquetes güérfanos" +msgstr "" #: template/stats/general_stats_table.php msgid "Packages added in the past 7 days" @@ -2102,15 +2039,15 @@ msgstr "" #: template/stats/general_stats_table.php msgid "Registered Users" -msgstr "Usuarios rexistraos" +msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php msgid "Recent Updates" -msgstr "Anovamientos de recién" +msgstr "" #: template/stats/updates_table.php msgid "more" @@ -2155,7 +2092,7 @@ msgstr "" #: template/tu_details.php msgid "Participation" -msgstr "Participación" +msgstr "" #: template/tu_last_votes_list.php msgid "Last Votes by TU" @@ -2291,7 +2228,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2300,80 +2237,3 @@ msgid "" "Please remember to cast your vote on proposal {id} [1]. The voting period " "ends in less than 48 hours." msgstr "" - -#: aurweb/routers/accounts.py -msgid "Invalid account type provided." -msgstr "" - -#: aurweb/routers/accounts.py -msgid "You do not have permission to change account types." -msgstr "" - -#: aurweb/routers/accounts.py -msgid "You do not have permission to change this user's account type to %s." -msgstr "" - -#: aurweb/packages/requests.py -msgid "No due existing orphan requests to accept for %s." -msgstr "" - -#: aurweb/asgi.py -msgid "Internal Server Error" -msgstr "Fallu internu del sirvidor" - -#: templates/errors/500.html -msgid "A fatal error has occurred." -msgstr "Asocedió un fallu fatal." - -#: templates/errors/500.html -msgid "" -"Details have been logged and will be reviewed by the postmaster posthaste. " -"We apologize for any inconvenience this may have caused." -msgstr "" - -#: aurweb/scripts/notify.py -msgid "AUR Server Error" -msgstr "" - -#: templates/pkgbase/merge.html templates/packages/delete.html -#: templates/packages/disown.html -msgid "Related package request closure comments..." -msgstr "" - -#: templates/pkgbase/merge.html templates/packages/delete.html -msgid "" -"This action will close any pending package requests related to it. If " -"%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/aurweb.pot b/po/aurweb.pot index b1a467e4..bec1b672 100644 --- a/po/aurweb.pot +++ b/po/aurweb.pot @@ -132,15 +132,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -198,9 +198,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -215,7 +214,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -265,7 +264,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not " "use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -308,7 +307,7 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package Maintainer " +"General discussion regarding the Arch User Repository (AUR) and Trusted User " "structure takes place on %saur-general%s. For discussion relating to the " "development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" @@ -322,7 +321,7 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface " -"%sonly%s. To report packaging bugs contact the maintainer or leave a " +"%sonly%s. To report packaging bugs contact the package maintainer or leave a " "comment on the appropriate package page." msgstr "" @@ -523,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -564,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +654,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +712,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +724,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1220,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1323,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1395,14 +1398,6 @@ msgid "" "the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1826,14 +1821,14 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the " +"By submitting a deletion request, you ask a Trusted User to delete the " "package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the package " +"By submitting a merge request, you ask a Trusted User to delete the package " "base and transfer its votes and comments to another package base. Merging a " "package does not affect the corresponding Git repositories. Make sure you " "update the Git history of the target package yourself." @@ -1841,7 +1836,7 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2097,7 +2092,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2284,7 +2279,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2339,39 +2334,3 @@ msgid "This action will close any pending package requests " "related to it. If %sComments%s are omitted, a closure " "comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "Note that if you hide your email address, it'll " -"end up on the BCC list for any request notifications. " -"In case someone replies to these notifications, you won't " -"receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Maximum number of characters" -msgstr "" diff --git a/po/az.po b/po/az.po index 4f8e0ba8..7e534b4c 100644 --- a/po/az.po +++ b/po/az.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Azerbaijani (http://app.transifex.com/lfleischer/aurweb/language/az/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Azerbaijani (http://www.transifex.com/lfleischer/aurweb/language/az/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1828,22 +1821,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2100,7 +2093,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2286,7 +2279,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2340,35 +2333,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/az_AZ.po b/po/az_AZ.po index 3f65d694..e903027b 100644 --- a/po/az_AZ.po +++ b/po/az_AZ.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Azerbaijani (Azerbaijan) (http://app.transifex.com/lfleischer/aurweb/language/az_AZ/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Azerbaijani (Azerbaijan) (http://www.transifex.com/lfleischer/aurweb/language/az_AZ/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1828,22 +1821,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2100,7 +2093,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2286,7 +2279,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2340,35 +2333,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/bg.po b/po/bg.po index 22a68d8d..7864f5dc 100644 --- a/po/bg.po +++ b/po/bg.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/lfleischer/aurweb/language/bg/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Bulgarian (http://www.transifex.com/lfleischer/aurweb/language/bg/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1828,22 +1821,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2100,7 +2093,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2286,7 +2279,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2340,35 +2333,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/ca.po b/po/ca.po index 10fd8412..391dd146 100644 --- a/po/ca.po +++ b/po/ca.po @@ -10,11 +10,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Ícar , 2021\n" -"Language-Team: Catalan (http://app.transifex.com/lfleischer/aurweb/language/ca/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Catalan (http://www.transifex.com/lfleischer/aurweb/language/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -135,16 +135,16 @@ msgid "Type" msgstr "Tipus" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Adició d'un TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Elimincació d'un TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Elimincació d'un TU (inactivitat no declarada)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -201,10 +201,9 @@ msgstr "Cerca paquets que co-mantinc" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Benvingut a l'AUR! Si us plau, llegiu les %sdirectrius d'usuari d'AUR%s i les %sdirectrius de TU (usuari de confiança) d'AUR%s per més informació." #: html/home.php #, php-format @@ -218,8 +217,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Recordeu votar els vostres paquets preferits!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Alguns paquets poden ser oferts com binaris a [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Alguns paquets poden ser oferts com binaris a [community]." #: html/home.php msgid "DISCLAIMER" @@ -268,8 +267,8 @@ msgstr "Sol·licitud de supressió" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Sol·liciteu que s'elimini un paquet de l'AUR. Si us plau, no ho utilitzeu si un paquet està trencat i es pot arreglar fàcilment. En lloc d'això, poseu-vos en contacte amb el mantenidor del paquet i sol·liciteu que es se'n renegui si cal." #: html/home.php msgid "Merge Request" @@ -311,11 +310,10 @@ msgstr "Discussió" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "El debat general sobre el repositori per usuaris d'Arch (AUR) i de l'estructura dels Usuaris de Confiança es realitza a %saur-general%s. Per la discussió relacionada amb el desenvolupament de la interfície web de l'AUR, utilitzeu la llista de correu %saur-dev%s." #: html/home.php msgid "Bug Reporting" @@ -326,9 +324,9 @@ msgstr "Comunicar errada" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Si troba un error en la interfície web de l'AUR, si us plau, ompliu un informe d'error al nostre %srastrejador d'errades%s. Utilitzeu el rastrejador per reportar %snomés%s errors de l'interfície web. Per informar d'errades en els paquets contacteu directament amb el responsable del paquet o deixeu un comentari a la pàgina del paquet corresponent." #: html/home.php msgid "Package Search" @@ -528,8 +526,8 @@ msgid "Delete" msgstr "Esborra" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Només els usuaris de confiança (TUs) i desenvolupadors poden eliminar paquets." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -569,7 +567,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -659,8 +657,8 @@ msgid "Merge" msgstr "Fusió" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Només el usuaris de confiança (TUs) i desenvolupadors poden fusionar paquets." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -717,8 +715,8 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Usuari de Confiança" #: html/tu.php msgid "Could not retrieve proposal details." @@ -729,7 +727,7 @@ msgid "Voting is closed for this proposal." msgstr "La votació es va tancar per a aquesta proposta." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1225,7 +1223,7 @@ msgstr "Desenvolupador" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1328,6 +1326,10 @@ msgstr "" msgid "Normal user" msgstr "Usuari normal" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Usuari de Confiança" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "El compte s'ha suspès" @@ -1400,15 +1402,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1832,22 +1825,22 @@ msgstr "Combinar amb" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2104,8 +2097,8 @@ msgid "Registered Users" msgstr "Usuaris registrats" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Usuaris de Confiança" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2290,7 +2283,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2344,35 +2337,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/ca_ES.po b/po/ca_ES.po index 3927d5a2..bad69bd1 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Catalan (Spain) (http://app.transifex.com/lfleischer/aurweb/language/ca_ES/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Catalan (Spain) (http://www.transifex.com/lfleischer/aurweb/language/ca_ES/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1828,22 +1821,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2100,7 +2093,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2286,7 +2279,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2340,35 +2333,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/cs.po b/po/cs.po index f12e07ab..b9bd739a 100644 --- a/po/cs.po +++ b/po/cs.po @@ -5,21 +5,21 @@ # Translators: # Daniel Milde , 2017 # Daniel Peukert , 2021 -# Daniel Peukert , 2021-2022 -# Jaroslav Lichtblau , 2015-2016 -# Jaroslav Lichtblau , 2014 -# Appukonrad , 2017-2018 +# Daniel Peukert , 2021 +# Jaroslav Lichtblau , 2015-2016 +# Jaroslav Lichtblau , 2014 +# Jiří Vírava , 2017-2018 # Lukas Fleischer , 2011 # Lukáš Kucharczyk , 2020 # Pavel Ševeček , 2014 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Daniel Peukert , 2021-2022\n" -"Language-Team: Czech (http://app.transifex.com/lfleischer/aurweb/language/cs/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Czech (http://www.transifex.com/lfleischer/aurweb/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -140,16 +140,16 @@ msgid "Type" msgstr "Typ" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Přidání důvěryhodného uživatele" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Odebrání důvěryhodného uživatele" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Odebrání důvěryhodného uživatele (neohlášená neaktivita)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -206,10 +206,9 @@ msgstr "Hledat balíčky, které spoluspravuji" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Vítejte na webu repozitáře AUR! Další informace naleznete na wiki v článcích o %srepozitáři AUR%s a %sdůvěryhodných uživatelích AUR%s." #: html/home.php #, php-format @@ -223,8 +222,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Nezapomeň hlasovat pro svoje oblíbené balíčky!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Některé balíčky mohou být poskytnuty v binární podobě v repozitáři [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Některé balíčky mohou být poskytnuty v binární podobě v repozitáři [community]." #: html/home.php msgid "DISCLAIMER" @@ -273,8 +272,8 @@ msgstr "Žádost o smazání" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Požádá o smazání z repozitáře AUR. Nepoužívejte, pokud balíček nefunguje a je možné ho snadno opravit. Místo toho kontaktuje správce balíčku nebo v případě potřeby požádejte o odebrání vlastnictví." #: html/home.php msgid "Merge Request" @@ -316,11 +315,10 @@ msgstr "Diskuze" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Obecná diskuze o struktuře repozitáře AUR a důvěryhodných uživatelích se odehrává v poštovní konferenci %saur-general%s. Diskuzi o vývoji webového rozhraní AUR pak naleznete v poštovní konferenci %saur-dev%s." #: html/home.php msgid "Bug Reporting" @@ -331,9 +329,9 @@ msgstr "Hlášení chyb" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Pokud ve webovém rozhraní repozitáře AUR najdete chybu, nahlaste to na %swebu pro sledování chyb%s. Zmíněný web se používá %sjen%s pro chyby webového rozhraní AUR. Pokud chcete nahlásit chyby v balíčcích, kontaktujte správce daného balíčku nebo k balíčku napište komentář." #: html/home.php msgid "Package Search" @@ -533,8 +531,8 @@ msgid "Delete" msgstr "Smazat" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Pouze důvěryhodní uživatelé a vývojáři mohou mazat balíčky." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -574,8 +572,8 @@ msgid "Disown" msgstr "Odebrat vlastnictví" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Pouze důvěryhodní uživatelé a vývojáři mohou odebrat vlastnictví balíčku." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -664,8 +662,8 @@ msgid "Merge" msgstr "Spojit" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Pouze důvěryhodní uživatelé a vývojáři mohou slučovat balíčky." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -722,8 +720,8 @@ msgid "I accept the terms and conditions above." msgstr "Souhlasím s výše uvedenými podmínkami." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Důvěryhodný uživatel" #: html/tu.php msgid "Could not retrieve proposal details." @@ -734,8 +732,8 @@ msgid "Voting is closed for this proposal." msgstr "Toto hlasování již skončilo." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Pouze důvěryhodní uživatelé a vývojáři mohou hlasovat." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -765,7 +763,7 @@ msgstr "Hlasující" msgid "" "Account registration has been disabled for your IP address, probably due to " "sustained spam attacks. Sorry for the inconvenience." -msgstr "Registrace účtu byla pro vaši IP adresu zakázána, pravděpodobně kvůli trvalým spamovým útokům. Za nepříjemnosti se omlouváme." +msgstr "Registrace účtu byla pro vaši IP adresu zakázána, pravděpodobně kvůli trvalým spamovým útokům. Omluvám se za nepříjemnost." #: lib/acctfuncs.inc.php msgid "Missing User ID" @@ -980,7 +978,7 @@ msgstr "Informace o balíčku nebyly nalezeny." #: aurweb/routers/auth.py msgid "Bad Referer header." -msgstr "Chybná hlavička Referer" +msgstr "" #: aurweb/routers/packages.py msgid "You did not select any packages to be notified about." @@ -1230,8 +1228,8 @@ msgstr "Vyvojář" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Důvěryhodný uživatel a vývojář" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1333,6 +1331,10 @@ msgstr "Vaše uživatelské jméno je vaše přihlašovací jméno. Je veřejně msgid "Normal user" msgstr "Běžný uživatel" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Důvěryhodný uživatel" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Účet pozastaven" @@ -1405,15 +1407,6 @@ msgid "" " the Arch User Repository." msgstr "Následující informace jsou požadovány pouze v případě, že máte v plánu do uživatelského repozitáře systému Arch Linux přidávat balíčky." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Veřejný SSH klíč" @@ -1839,26 +1832,26 @@ msgstr "Sloučení" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Vytvořením žádosti o smazání žádáte důvěryhodného uživatele, aby smazal základní balíček. Tento typ požadavku by se měl používat pro duplicitní balíčky, software, který již v upstreamu neexistuje, nebo v případě nelegálních či nezvratně rozbitých balíčků." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Vytvořením žádosti o sloučení žádáte důvěryhodného uživatele, aby smazal základní balíček a přesunul s ním spojené hlasy a komentáře do jiného balíčku. Sloučení balíčku nemá vliv na související repozitáře Git. Aktualizace Git historie cílového balíčku je na vás." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Vytvořením žádosti o odebrání vlastnictví žádáte důvěryhodného uživatele, aby odebral vlastnictví aktuálnímu správci základního balíčku. Tento požadavek používejte jen v případě, že balíček potřebuje zásah správce, správce není k zastižení a již jste se správce pokusili v minulosti kontaktovat." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2119,8 +2112,8 @@ msgid "Registered Users" msgstr "Registrovaní uživatelé" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Důvěryhodní uživatelé" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2305,8 +2298,8 @@ msgstr "Uživatel {user} [1] smazal balíček {pkgbase} [2].\n\nNadále již neb #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "Připomínka k hlasování důvěryhodných uživatelů: návrh {id}" #: scripts/notify.py #, python-brace-format @@ -2329,65 +2322,33 @@ msgstr "Pro změnu typu tohoto účtu na %s nemáte oprávnění." #: aurweb/packages/requests.py msgid "No due existing orphan requests to accept for %s." -msgstr "Žádné žádosti o odebrání vlastnictví balíčku %s momentálně neexistují." +msgstr "" #: aurweb/asgi.py msgid "Internal Server Error" -msgstr "Interní chyba serveru" +msgstr "" #: templates/errors/500.html msgid "A fatal error has occurred." -msgstr "Došlo k fatální chybě." +msgstr "" #: templates/errors/500.html msgid "" "Details have been logged and will be reviewed by the postmaster posthaste. " "We apologize for any inconvenience this may have caused." -msgstr "Detaily chyby byly zalogovány a budou co nejdříve zkontrolovány administrátorem. Za jakékoli způsobené nepříjemnosti se omlouváme." +msgstr "" #: aurweb/scripts/notify.py msgid "AUR Server Error" -msgstr "Chyba serveru AUR" +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "Komentáře k uzavření žádostí vztahujících se k tomuto balíčku..." +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "Tato akce uzavře všechny žádosti čekající na vyřízení vztahující se k tomuto balíčku. Pokud není vyplněno textové Pole %sKomentáře\"%s, komentář k uzavření žádostí bude vygenerován automaticky." - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." msgstr "" diff --git a/po/da.po b/po/da.po index b8768beb..a6f290ea 100644 --- a/po/da.po +++ b/po/da.po @@ -9,11 +9,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Linuxbruger , 2018\n" -"Language-Team: Danish (http://app.transifex.com/lfleischer/aurweb/language/da/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Danish (http://www.transifex.com/lfleischer/aurweb/language/da/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -134,16 +134,16 @@ msgid "Type" msgstr "Type" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Tilføjelse af en TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Bortskaffelse af en TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Bortskaffelse af en TU (ikke erklæret inaktivitet)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -200,10 +200,9 @@ msgstr "Søg efter pakker jeg co-vedligeholder" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Velkommen til AUR! Venligst læs %sAUR Bruger Retningslinier %s og %sAUR TU Retningslinier%s for mere information." #: html/home.php #, php-format @@ -217,7 +216,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "Husk at stemme for dine favorit pakker!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "Nogle pakker kan være stillet til rådighed som binær i (fællesskab)." #: html/home.php @@ -267,7 +266,7 @@ msgstr "Sletning Forespørgsel" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -310,10 +309,9 @@ msgstr "Diskussion" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -325,8 +323,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -527,8 +525,8 @@ msgid "Delete" msgstr "Slet" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Kun betroede brugere og udviklere kan slette pakker." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -568,7 +566,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -658,7 +656,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -716,8 +714,8 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Betroet bruger (TU)" #: html/tu.php msgid "Could not retrieve proposal details." @@ -728,7 +726,7 @@ msgid "Voting is closed for this proposal." msgstr "Afstemningen er lukket for dette forslag." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1224,8 +1222,8 @@ msgstr "Udvikler" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Betroet bruger og udvikler" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1327,6 +1325,10 @@ msgstr "" msgid "Normal user" msgstr "Normal bruger" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Betroet bruger (TU)" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Konto suspenderet" @@ -1399,15 +1401,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1831,22 +1824,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2103,8 +2096,8 @@ msgid "Registered Users" msgstr "Registerede brugere" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Betroede brugere" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2289,7 +2282,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2343,35 +2336,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/de.po b/po/de.po index 39326eac..ec0a0fbe 100644 --- a/po/de.po +++ b/po/de.po @@ -27,11 +27,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Stefan Auditor , 2021\n" -"Language-Team: German (http://app.transifex.com/lfleischer/aurweb/language/de/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: German (http://www.transifex.com/lfleischer/aurweb/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -152,16 +152,16 @@ msgid "Type" msgstr "Typ" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "TU hinzugefügt" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "TU entfernt" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "TU entfernt (unerklärte Inaktivität)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -218,10 +218,9 @@ msgstr "Suche nach Paketen die ich mitbetreue" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Willkommen im AUR! Für weitere Informationen lies bitte die %sAUR User Guidelines%s und die %sAUR TU Guidelines%s." #: html/home.php #, php-format @@ -235,8 +234,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Denk daran, für Deine bevorzugten Pakete zu stimmen!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Manche Pakete könnten als Binär-Pakete in [extra] bereitgestellt sein." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Manche Pakete könnten als Binär-Pakete in [community] bereitgestellt sein." #: html/home.php msgid "DISCLAIMER" @@ -285,8 +284,8 @@ msgstr "Löschanfrage" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Anfrage zum Entfernen eines Pakets aus dem Arch User Repository. Bitte benutze diese nicht, wenn das Paket kaputt ist und leicht repariert werden kann. Kontaktiere stattdessen den Maintainer und reiche eine Verwaisungsanfrage ein, wenn nötig." #: html/home.php msgid "Merge Request" @@ -328,11 +327,10 @@ msgstr "Diskussion" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Grundsätzliche Diskussionen bezüglich des Arch User Repository (AUR) und vertrauenswürdigen Benutzern finden auf %saur-general%s statt. Für Diskussionen im Bezug auf die Entwicklung des AUR Web-Interface benutze die %saur-dev%s Mailingliste." #: html/home.php msgid "Bug Reporting" @@ -343,9 +341,9 @@ msgstr "Fehler melden" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Wenn du einen Fehler im AUR Web-Interface findest, fülle bitte eine Fehler-Meldung in unserem %sbug-tracker%s aus. Benutze den Tracker %snur%s, um Fehler im AUR zu melden. Für falsch gepackte Pakete, wende dich bitte direkt an den zuständigen Maintainer, oder hinterlasse einen Kommentar auf der entsprechenden Seite des Pakets." #: html/home.php msgid "Package Search" @@ -545,8 +543,8 @@ msgid "Delete" msgstr "Löschen" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Nur vertrauenswürdige Benutzer und Entwickler können Pakete löschen." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -586,8 +584,8 @@ msgid "Disown" msgstr "Gebe Paket ab" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Nur TUs und Developer können die Paket-Betreuung abgeben." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -676,8 +674,8 @@ msgid "Merge" msgstr "Verschmelzen" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Nur vertrauenswürdige Benutzer und Entwickler können Pakete verschmelzen." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -734,8 +732,8 @@ msgid "I accept the terms and conditions above." msgstr "Ich akzeptiere die obigen Nutzungsbedingungen." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Vertrauenswürdiger Benutzer (TU)" #: html/tu.php msgid "Could not retrieve proposal details." @@ -746,8 +744,8 @@ msgid "Voting is closed for this proposal." msgstr "Die Abstimmungsphase für diesen Vorschlag ist beendet." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Nur Trusted User dürfen wählen." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1242,8 +1240,8 @@ msgstr "Entwickler" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Vertrauenswürdiger Benutzer & Entwickler" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1345,6 +1343,10 @@ msgstr "Der Benutzername ist der Name, der für die Anmeldung benutzt wird. Er i msgid "Normal user" msgstr "Normaler Benutzer" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Vertrauenswürdiger Benutzer (TU)" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Konto gesperrt" @@ -1417,15 +1419,6 @@ msgid "" " the Arch User Repository." msgstr "Die folgende Information wird nur benötigt, wenn du Pakete beim Arch User Repository einreichen willst." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Öffentlicher SSH Schlüssel" @@ -1849,26 +1842,26 @@ msgstr "Verschmelzen mit" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Durch das Absenden einer Löschanfrage wird ein vertrauenswürdiger Benutzer gefragt die Paketbasis zu löschen. Dieser Typ von Anfragen soll für doppelte Pakete, vom Upstream aufgegebene Software sowie illegale und unreparierbar kaputte Pakete verwendet werden." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Durch das Absenden einer Zusammenfüranfrage wird ein vertrauenswürdiger Benutzer gefragt die Paketbasis zu löschen und die Stimmen und Kommentare zu einer anderen Paketbasis zu transferieren. Das Zusammenführen eines Pakets betrifft nicht die zugehörigen Git-Repositories. Stelle sicher, dass die Git-Historie des Zielpakets von dir aktualisiert wird." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Durch das absenden einer Verwaisanfrage wird ein vertrauenswürdiger Benutzer gebeten die Paketbasis zu enteignen. Bitte tue das nur, wenn das Paket Aufmerksamkeit des Maintainers benötigt, der Maintainer nicht reagiert und Du vorher bereits versucht hast ihn zu kontaktieren." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2121,8 +2114,8 @@ msgid "Registered Users" msgstr "Registrierte Benutzer" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Vertrauenswürdige Benutzer (TU)" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2307,8 +2300,8 @@ msgstr "{user} [1] hat {pkgbase} [2] gelöscht.\n\nDu wirst keine weiteren Benac #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "TU Abstimmungs-Erinnerung: Vorschlag {id}" #: scripts/notify.py #, python-brace-format @@ -2361,35 +2354,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/el.po b/po/el.po index cbb2e32f..f1fe704e 100644 --- a/po/el.po +++ b/po/el.po @@ -8,17 +8,17 @@ # Achilleas Pipinellis, 2013 # Achilleas Pipinellis, 2011 # Achilleas Pipinellis, 2012 -# Leonidas Spyropoulos, 2021-2023 +# Leonidas Spyropoulos, 2021 # Lukas Fleischer , 2011 # flamelab , 2011 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Leonidas Spyropoulos, 2021-2023\n" -"Language-Team: Greek (http://app.transifex.com/lfleischer/aurweb/language/el/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Greek (http://www.transifex.com/lfleischer/aurweb/language/el/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -35,7 +35,7 @@ msgstr "Μας συγχωρείτε, η σελίδα που ζητήσατε δ #: html/404.php template/pkgreq_close_form.php msgid "Note" -msgstr "Σημείωση" +msgstr "" #: html/404.php msgid "Git clone URLs are not meant to be opened in a browser." @@ -139,20 +139,20 @@ msgid "Type" msgstr "Είδος" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Προσθήκη ενός TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Αφαίρεση ενός TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Αφαίρεση ενός TU (αδήλωτη αδράνεια)" #: html/addvote.php msgid "Amendment of Bylaws" -msgstr "Τροποποίηση των Bylaws" +msgstr "Τροποποίηση των " #: html/addvote.php template/tu_list.php msgid "Proposal" @@ -205,10 +205,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Καλωσήρθατε στο AUR! Διαβάστε παρακαλώ τον %sOδηγό Χρηστών του AUR%s και τον %sΟδηγό των Trusted Users%s για περισσότερες πληροφορίες. " #: html/home.php #, php-format @@ -222,8 +221,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Θυμηθείτε να ψηφίσετε τα αγαπημένα σας πακέτα!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Ορισμένα πακέτα μπορεί να μεταφερθούν ως binaries στο [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Ορισμένα πακέτα μπορεί να μεταφερθούν ως binaries στο [community]." #: html/home.php msgid "DISCLAIMER" @@ -272,7 +271,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -315,10 +314,9 @@ msgstr "Συζήτηση" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -330,8 +328,8 @@ msgstr "Αναφορά Σφαλμάτων" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -532,8 +530,8 @@ msgid "Delete" msgstr "Διαγράψτε" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Μόνο οι Trusted Users και οι Developers μπορούν να διαγράψουν πακέτα." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -573,7 +571,7 @@ msgid "Disown" msgstr "Αποδέσμευση" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -663,8 +661,8 @@ msgid "Merge" msgstr "Συγχώνευση" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Μόνο οι Trusted Users και οι Developers μπορούν να συγχωνεύσουν πακέτα." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -721,8 +719,8 @@ msgid "I accept the terms and conditions above." msgstr "Αποδέχομαι τους παραπάνω όρους χρήσης." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Trusted User" #: html/tu.php msgid "Could not retrieve proposal details." @@ -733,8 +731,8 @@ msgid "Voting is closed for this proposal." msgstr "Η ψηφοφορία έχει κλείσει για αυτή την πρόταση." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Μόνο οι Trusted Users έχουν δικαίωμα ψήφου." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1229,7 +1227,7 @@ msgstr "Developer" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1332,6 +1330,10 @@ msgstr "" msgid "Normal user" msgstr "Απλός χρήστης" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Αξιόπιστος χρήστης" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Ο Λογαριασμός έχει Ανασταλεί." @@ -1404,15 +1406,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1836,22 +1829,22 @@ msgstr "Συγχώνευση σε" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2108,8 +2101,8 @@ msgid "Registered Users" msgstr "Εγγεγραμμένοι Χρήστες" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Trusted Users" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2294,7 +2287,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2348,35 +2341,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/es.po b/po/es.po index c723771c..ea7ac099 100644 --- a/po/es.po +++ b/po/es.po @@ -4,31 +4,30 @@ # # Translators: # Adolfo Jayme-Barrientos, 2015 -# Angel Velasquez , 2011,2023 -# Jose Serrano Pérez, 2023 +# Angel Velasquez , 2011 # juantascon , 2011 # Lukas Fleischer , 2011 # neiko , 2011 # Nicolás de la Torre , 2012 -# Pablo Lezaeta Reyes , 2012 -# Pablo Lezaeta Reyes , 2016-2017 -# Pablo Lezaeta Reyes , 2013-2016 -# Pablo Lezaeta Reyes , 2016-2017 -# Pablo Lezaeta Reyes , 2016 -# Pablo Lezaeta Reyes , 2019 +# prflr88 , 2012 +# prflr88 , 2016-2017 +# prflr88 , 2013-2016 +# prflr88 , 2016-2017 +# prflr88 , 2016 +# prflr88 , 2019 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Angel Velasquez , 2011,2023\n" -"Language-Team: Spanish (http://app.transifex.com/lfleischer/aurweb/language/es/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Spanish (http://www.transifex.com/lfleischer/aurweb/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: es\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: html/404.php msgid "Page Not Found" @@ -44,7 +43,7 @@ msgstr "Nota" #: html/404.php msgid "Git clone URLs are not meant to be opened in a browser." -msgstr "Las direcciones de repositorios git no deberían ser abiertas en un navegador." +msgstr "Las direcciones de clonado de Git no deberían ser habiertas en un navegador." #: html/404.php #, php-format @@ -87,7 +86,7 @@ msgstr "No tienes los permisos para editar esta cuenta." #: html/account.php lib/acctfuncs.inc.php msgid "Invalid password." -msgstr "Contraseña inválida." +msgstr "" #: html/account.php msgid "Use this form to search existing accounts." @@ -144,16 +143,16 @@ msgid "Type" msgstr "Tipo" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Agregar a un nuevo usuario de confianza" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Remover a un usuario de confianza" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Remover a un usuario de confianza (no declarado inactivo)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -210,10 +209,9 @@ msgstr "Buscar paquetes que soy coencargado" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "¡Bienvenido al repositorio de usuarios de Arch! Léase las %sDirectrices del usuario del AUR%s y las %sDirectrices del usuario de confianza del AUR%s para mayor información." #: html/home.php #, php-format @@ -227,8 +225,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "¡Recuerda votar tus paquetes favoritos!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Algunos paquetes pueden estar provistos de forma binaria en [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Algunos paquetes pueden estar provistos de forma binaria en [community]." #: html/home.php msgid "DISCLAIMER" @@ -277,8 +275,8 @@ msgstr "Solicitud de eliminación" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Solicitar la eliminación de un paquete del repositorio de usuarios de Arch. No utilices esta opción si un paquete está roto pero puede ser arreglado fácilmente. En cambio, contacta al encargado del paquete y presenta una solicitud de orfandad si es necesario." #: html/home.php msgid "Merge Request" @@ -320,11 +318,10 @@ msgstr "Debate" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "La discusión general sobre el repositorio de usuarios de Arch (AUR) y la estructura de usuarios de confianza se realiza en la lista de correos %saur-general%s. Para la discusión en relación con el desarrollo de la interfaz web del AUR, utiliza la lista de correo %saur-dev%s." #: html/home.php msgid "Bug Reporting" @@ -335,9 +332,9 @@ msgstr "Informe de errores" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Si encuentras un error en la interfaz web del AUR, llena un informe de error en nuestro %srastreador de errores o «bug tracker»%s. Usa este para reportar %súnicamente%s errores de la interfaz web del AUR. Para reportar errores de empaquetado debes contactar al encargado o dejar un comentario en la página respectiva del paquete." #: html/home.php msgid "Package Search" @@ -386,7 +383,7 @@ msgstr "Proporciona tus datos de acceso" #: html/login.php msgid "User name or primary email address" -msgstr "Nombre de usuario o dirección de correo electrónico principal" +msgstr "" #: html/login.php template/account_delete.php template/account_edit_form.php msgid "Password" @@ -537,8 +534,8 @@ msgid "Delete" msgstr "Eliminar" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Solamente usuarios de confianza y desarrolladores pueden eliminar paquetes." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -578,8 +575,8 @@ msgid "Disown" msgstr "Abandonar" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Solamente usuarios de confianza y desarrolladores puede forzar el abandono de paquetes." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -668,8 +665,8 @@ msgid "Merge" msgstr "Unión" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Solamente usuarios de confianza y desarrolladores pueden unir paquetes." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -726,8 +723,8 @@ msgid "I accept the terms and conditions above." msgstr "Acepto los términos y condiciones anteriores." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Usuario de confianza" #: html/tu.php msgid "Could not retrieve proposal details." @@ -738,8 +735,8 @@ msgid "Voting is closed for this proposal." msgstr "Las votaciones para esta propuesta están cerradas." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Solamente usuarios de confianza pueden votar." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1109,12 +1106,12 @@ msgstr "No se pudo añadir a la lista de notificaciones." #: lib/pkgbasefuncs.inc.php #, php-format msgid "You have been added to the comment notification list for %s." -msgstr "Ha sido añadido a la lista de notificaciones de comentarios de %s." +msgstr "Haz sido añadido a la lista de notificaciones de comentarios de %s." #: lib/pkgbasefuncs.inc.php #, php-format msgid "You have been removed from the comment notification list for %s." -msgstr "Ha sido eliminado de la lista de notificaciones de comentarios de %s." +msgstr "Haz sido eliminado de la lista de notificaciones de comentarios de %s." #: lib/pkgbasefuncs.inc.php msgid "You are not allowed to undelete this comment." @@ -1234,8 +1231,8 @@ msgstr "Desarrollador" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Usuarios de confianza y desarrolladores" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1337,6 +1334,10 @@ msgstr "Tu nombre de usuario es el nombre que usarás para iniciar sesión. Es v msgid "Normal user" msgstr "Usuario normal" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Usuario de confianza" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Cuenta suspendida" @@ -1409,15 +1410,6 @@ msgid "" " the Arch User Repository." msgstr "La siguiente información únicamente es necesaria si deseas subir paquetes al repositorio de usuarios de Arch." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Clave pública SSH" @@ -1598,7 +1590,6 @@ msgid "%d pending request" msgid_plural "%d pending requests" msgstr[0] "Hay %d solicitud pendiente" msgstr[1] "Hay %d solicitudes pendientes" -msgstr[2] "Hay %d solicitudes pendientes" #: template/pkgbase_actions.php msgid "Adopt Package" @@ -1842,26 +1833,26 @@ msgstr "Unir en" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Al enviar una solicitud de eliminación, le preguntas a un usuario de confianza que elimine el paquete base. Este tipo de solicitud debe ser utilizado para los duplicados, programas abandonados por el desarrollador principal o encargado, así como programas ilegales e irreparablemente rotos." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Al enviar una solicitud de unión, le preguntas a un usuario de confianza que elimine el paquete base y transfiera sus votos y comentarios a otro paquete base. La unión de un paquete no afecta a los correspondientes repositorios Git. Por tanto asegúrate de actualizar el historia Git del paquete de destino tú mismo." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Al enviar una solicitud de orfandad, le preguntas a un usuario de confianza que remueva la propiedad sobre el paquete base al encargado principal de este. Por favor, haz esto solamente si el paquete necesita una acción de mantenención, el encargado no presenta signos de actividad y ya intentaste ponerte en contacto con él anteriormente." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -1873,7 +1864,6 @@ msgid "%d package request found." msgid_plural "%d package requests found." msgstr[0] "Se encontró %d solicitud para el paquete." msgstr[1] "Se encontraron %d solicitudes para el paquete." -msgstr[2] "Se encontraron %d solicitudes para el paquete." #: template/pkgreq_results.php template/pkg_search_results.php #, php-format @@ -1898,7 +1888,6 @@ msgid "~%d day left" msgid_plural "~%d days left" msgstr[0] "~%d día restante" msgstr[1] "~%d días restantes" -msgstr[2] "~%d días restantes" #: template/pkgreq_results.php #, php-format @@ -1906,7 +1895,6 @@ msgid "~%d hour left" msgid_plural "~%d hours left" msgstr[0] "Aprox. %d hora restante" msgstr[1] "Aprox. %d horas restantes" -msgstr[2] "Aprox. %d horas restantes" #: template/pkgreq_results.php msgid "<1 hour left" @@ -2035,7 +2023,6 @@ msgid "%d package found." msgid_plural "%d packages found." msgstr[0] "%d paquete fue encontrado." msgstr[1] "%d paquetes fueron encontrados." -msgstr[2] "%d paquetes fueron encontrados." #: template/pkg_search_results.php msgid "Version" @@ -2118,8 +2105,8 @@ msgid "Registered Users" msgstr "Usuarios registrados" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Usuarios de confianza" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2304,7 +2291,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2358,35 +2345,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/es_419.po b/po/es_419.po index f1997606..444eccb7 100644 --- a/po/es_419.po +++ b/po/es_419.po @@ -8,25 +8,24 @@ # Lukas Fleischer , 2011 # neiko , 2011 # Nicolás de la Torre , 2012 -# Oliver Hattshire , 2021 -# Pablo Lezaeta Reyes , 2016-2017 -# Pablo Lezaeta Reyes , 2012,2015-2016 -# Pablo Lezaeta Reyes , 2016-2017 -# Pablo Lezaeta Reyes , 2016 -# Pablo Lezaeta Reyes , 2019,2022 +# prflr88 , 2016-2017 +# prflr88 , 2012,2015-2016 +# prflr88 , 2016-2017 +# prflr88 , 2016 +# prflr88 , 2019 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Pablo Lezaeta Reyes , 2019,2022\n" -"Language-Team: Spanish (Latin America) (http://app.transifex.com/lfleischer/aurweb/language/es_419/)\n" +"PO-Revision-Date: 2020-01-31 08:29+0000\n" +"Last-Translator: Lukas Fleischer\n" +"Language-Team: Spanish (Latin America) (http://www.transifex.com/lfleischer/aurweb/language/es_419/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: es_419\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: html/404.php msgid "Page Not Found" @@ -42,7 +41,7 @@ msgstr "Nota" #: html/404.php msgid "Git clone URLs are not meant to be opened in a browser." -msgstr "Las direcciones de clonado de Git no deberían ser abiertas en un navegador." +msgstr "Las direcciones de clonado de Git no deberían ser habiertas en un navegador." #: html/404.php #, php-format @@ -61,7 +60,7 @@ msgstr "Servicio no disponible" #: html/503.php msgid "" "Don't panic! This site is down due to maintenance. We will be back soon." -msgstr "¡No se asuste! El sitio está desactivado por mantenimiento. Pronto volveremos." +msgstr "¡No se asustes! El sitio está desactivado por mantenimiento. Pronto volveremos." #: html/account.php msgid "Account" @@ -77,7 +76,7 @@ msgstr "No está autorizado a acceder a esta área." #: html/account.php msgid "Could not retrieve information for the specified user." -msgstr "No se pudo recuperar la información del usuario especificado." +msgstr "No se pudo obtener la información del usuario especificado." #: html/account.php msgid "You do not have permission to edit this account." @@ -85,7 +84,7 @@ msgstr "No tiene permisos para editar esta cuenta." #: html/account.php lib/acctfuncs.inc.php msgid "Invalid password." -msgstr "Contraseña no válida." +msgstr "" #: html/account.php msgid "Use this form to search existing accounts." @@ -101,7 +100,7 @@ msgstr "Añadir propuesta" #: html/addvote.php msgid "Invalid token for user action." -msgstr "Elemento no válido para la acción del usuario." +msgstr "Elemento inválido para la acción del usuario." #: html/addvote.php msgid "Username does not exist." @@ -130,7 +129,7 @@ msgstr "Envíe una propuesta a la cual votar." #: html/addvote.php msgid "Applicant/TU" -msgstr "Candidato/Usuario de confianza" +msgstr "Candidato/Usuario de confianza (UC)" #: html/addvote.php msgid "(empty if not applicable)" @@ -142,16 +141,16 @@ msgid "Type" msgstr "Tipo" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Agregar a un nuevo Usuario de Confianza" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Remover a un Usuario de Confianza" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Remover a un Usuario de Confianza (no declarado inactivo)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -187,7 +186,7 @@ msgstr "Mis paquetes marcados" #: html/home.php msgid "My Requests" -msgstr "Mis Solicitudes" +msgstr "Mis peticiones" #: html/home.php msgid "My Packages" @@ -208,10 +207,9 @@ msgstr "Buscar paquetes que soy coencargado" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "¡Bienvenido al repositorio de usuarios de Arch! Lea la %sGuía del usuario del AUR%s y la %sGuía del usuario de Confianza del AUR%s para mayor información." #: html/home.php #, php-format @@ -225,8 +223,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "¡Recuerde votar sus paquetes favoritos!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Algunos paquetes pueden estar disponibles de forma binaria en [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Algunos paquetes pueden estar disponibles de forma binaria en [community]." #: html/home.php msgid "DISCLAIMER" @@ -259,13 +257,13 @@ msgstr "Existen tres tipos de peticiones que pueden presentarse en el recuadro % #: html/home.php msgid "Orphan Request" -msgstr "Solicitud de Abandono" +msgstr "Petición de Orfandad" #: html/home.php msgid "" "Request a package to be disowned, e.g. when the maintainer is inactive and " "the package has been flagged out-of-date for a long time." -msgstr "Pedir el abandono de un paquete, por ejemplo, cuando el encargado está inactivo y el paquete fue marcado como desactualizado por un largo tiempo." +msgstr "Pedir la orfandad de un paquete, por ejemplo, cuando el encargado está inactivo y el paquete fue marcado como desactualizado por un largo tiempo." #: html/home.php msgid "Deletion Request" @@ -275,8 +273,8 @@ msgstr "Petición de Borrado" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Pedir que un paquete sea borrado del Repositorio Usuarios de Arch. Por favor, no use esta opción si un paquete está roto y se puede arreglar fácilmente. En cambio, contacte con el encargado del paquete y presentar solicitud orfandad si es necesario." #: html/home.php msgid "Merge Request" @@ -286,14 +284,14 @@ msgstr "Petición de Fusión" msgid "" "Request a package to be merged into another one. Can be used when a package " "needs to be renamed or replaced by a split package." -msgstr "Solicitar que se fusione un paquete en otro. Puede usarla cuando un paquete tiene que ser cambiado de nombre o sustituido por un paquete dividido." +msgstr "Pedir que se fusione un paquete en otro. Puede usarla cuando un paquete tiene que ser cambiado de nombre o sustituido por un paquete dividido." #: html/home.php #, php-format msgid "" "If you want to discuss a request, you can use the %saur-requests%s mailing " "list. However, please do not use that list to file requests." -msgstr "Si quiere discutir una solicitud, puede usar la lista de correo %saur-requests%s. Sin embargo, por favor no utilice esa lista para presentar solicitudes." +msgstr "Si quiere discutir una petición, puede usar la lista de correo %saur-peticiones%s. Sin embargo, por favor no utilice esa lista para presentar solicitudes." #: html/home.php msgid "Submitting Packages" @@ -318,11 +316,10 @@ msgstr "Debate" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "La discusión general acerca del Repositorio de Usuarios de Arch (AUR) y la estructura de Usuarios de Confianza se realiza en la lista de correos %saur-general%s. Para discusiones relacionadas con el desarrollo de la interfaz web del AUR, utilice la lista de correo %saur-dev%s." #: html/home.php msgid "Bug Reporting" @@ -333,9 +330,9 @@ msgstr "Informe de errores" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Si encuentra un error en la interfaz web del AUR, llene un informe de fallo en nuestro %s«bug tracker»%s. Use este para reportar %súnicamente%s errores de la interfaz web del AUR. Para reportar errores de empaquetado debe contactar con el encargado o dejar un comentario en la página respectiva del paquete." #: html/home.php msgid "Package Search" @@ -384,7 +381,7 @@ msgstr "Introduce las credenciales de autentificación" #: html/login.php msgid "User name or primary email address" -msgstr "Nombre de usuario o dirección de correo electrónico principal" +msgstr "" #: html/login.php template/account_delete.php template/account_edit_form.php msgid "Password" @@ -448,7 +445,7 @@ msgstr "Su contraseña fue reiniciada con éxito." #: html/passreset.php msgid "Confirm your user name or primary e-mail address:" -msgstr "Confirma tu nombre de usuario o dirección de correo electrónico principal:" +msgstr "" #: html/passreset.php msgid "Enter your new password:" @@ -467,11 +464,11 @@ msgstr "Continuar" msgid "" "If you have forgotten the user name and the primary e-mail address you used " "to register, please send a message to the %saur-general%s mailing list." -msgstr "Si has olvidado el nombre de usuario y la dirección de correo electrónico principal usados al registrarte, por favor envía un mensaje a la lista de correo %saur-general%s." +msgstr "" #: html/passreset.php msgid "Enter your user name or your primary e-mail address:" -msgstr "Ingresa tu nombre de usuario o tu dirección de correo electrónico principal:" +msgstr "" #: html/pkgbase.php msgid "Package Bases" @@ -483,12 +480,6 @@ msgid "" "checkbox." msgstr "Los paquetes seleccionados no fueron abandonados, marque la casilla de confirmación." -#: aurweb/routers/packages.py -msgid "" -"The selected packages have not been adopted, check the confirmation " -"checkbox." -msgstr "Los paquetes seleccionados no han sido adoptados, marque la casilla de verificación." - #: html/pkgbase.php lib/pkgreqfuncs.inc.php msgid "Cannot find package to merge votes and comments into." msgstr "No se puede encontrar el paquete para fusionar sus votos y comentarios." @@ -535,8 +526,8 @@ msgid "Delete" msgstr "Borrar" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Solo Usuarios de Confianza y Desarrolladores pueden borrar paquetes." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -553,7 +544,7 @@ msgstr "Use este formulario para abandonar el paquete base %s %s %s que incluye msgid "" "By selecting the checkbox, you confirm that you want to no longer be a " "package co-maintainer." -msgstr "Al seleccionar la casilla de verificación, confirmas que ya no quieres ser co-mantenedor del paquete." +msgstr "" #: html/pkgdisown.php #, php-format @@ -576,8 +567,8 @@ msgid "Disown" msgstr "Abandonar" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Solo Usuarios de Confianza y Desarrolladores pueden forzar el abandono de paquetes." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -587,14 +578,6 @@ msgstr "Marcar comentario" msgid "Flag Package Out-Of-Date" msgstr "Marcado como desactualizado" -#: templates/packages/flag.html -msgid "" -"This seems to be a VCS package. Please do %snot%s flag it out-of-date if the" -" package version in the AUR does not match the most recent commit. Flagging " -"this package should only be done if the sources moved or changes in the " -"PKGBUILD are required because of recent upstream changes." -msgstr "Esto parece ser un paquete VCS. 1%sNo1%s lo marque como obsoleto si la versión del paquete en el AUR no coincide con la commit más reciente. Solo se debe marcar este paquete si las fuentes se movieron o si se requiere cambios en el PKGBUILD debido a cambios recientes en las fuentes." - #: html/pkgflag.php #, php-format msgid "" @@ -666,16 +649,16 @@ msgid "Merge" msgstr "Fusión" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Solo Usuarios de Confianza y Desarrolladores pueden fusionar paquetes." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" -msgstr "Enviar Solicitud" +msgstr "Enviar petición" #: html/pkgreq.php template/pkgreq_close_form.php msgid "Close Request" -msgstr "Cerrar Solicitud" +msgstr "Cerrar Petición" #: html/pkgreq.php lib/aur.inc.php lib/pkgfuncs.inc.php msgid "First" @@ -695,7 +678,7 @@ msgstr "Último" #: html/pkgreq.php template/header.php msgid "Requests" -msgstr "Solicitudes" +msgstr "Petición" #: html/register.php template/header.php msgid "Register" @@ -724,8 +707,8 @@ msgid "I accept the terms and conditions above." msgstr "Acepto las Terminos y condiciones anteriores." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Usuario de Confianza" #: html/tu.php msgid "Could not retrieve proposal details." @@ -736,8 +719,8 @@ msgid "Voting is closed for this proposal." msgstr "Las votaciones para esta propuesta están cerradas." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Solo Usuarios de Confianza pueden votar." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -792,7 +775,7 @@ msgstr "Solo puede contener un punto, guion bajo o guion." #: lib/acctfuncs.inc.php msgid "Please confirm your new password." -msgstr "Por favor confirma tu nueva contraseña." +msgstr "" #: lib/acctfuncs.inc.php msgid "The email address is invalid." @@ -800,7 +783,7 @@ msgstr "La dirección de correo no es válida." #: lib/acctfuncs.inc.php msgid "The backup email address is invalid." -msgstr "La dirección de correo electrónico de respaldo no es válida." +msgstr "" #: lib/acctfuncs.inc.php msgid "The home page is invalid, please specify the full HTTP(s) URL." @@ -843,15 +826,15 @@ msgstr "La clave pública SSH %s%s%s ya está en uso." #: lib/acctfuncs.inc.php msgid "The CAPTCHA is missing." -msgstr "Falta el CAPTCHA." +msgstr "" #: lib/acctfuncs.inc.php msgid "This CAPTCHA has expired. Please try again." -msgstr "El CAPTCHA expiró. Por favor intenta de nuevo." +msgstr "" #: lib/acctfuncs.inc.php msgid "The entered CAPTCHA answer is invalid." -msgstr "El CAPTCHA ingresado no es válido." +msgstr "" #: lib/acctfuncs.inc.php #, php-format @@ -891,10 +874,6 @@ msgstr "El formulario de registro ha sido deshabilitado para su dirección IP, p msgid "Account suspended" msgstr "Cuenta suspendida" -#: aurweb/routers/accounts.py -msgid "You do not have permission to suspend accounts." -msgstr "No tiene los permiso para suspender cuentas." - #: lib/acctfuncs.inc.php #, php-format msgid "" @@ -909,7 +888,7 @@ msgstr "Contraseña o nombre de usuario erróneos." #: lib/acctfuncs.inc.php msgid "An error occurred trying to generate a user session." -msgstr "Un error ocurrió intentando generar la sesión de usuario." +msgstr "Un error ocurrió intentando generar la sesión." #: lib/acctfuncs.inc.php msgid "Invalid e-mail and reset key combination." @@ -980,30 +959,6 @@ msgstr "Error al recuperar los detalles del paquete." msgid "Package details could not be found." msgstr "Los detalles del paquete no se pudieron encontrar." -#: aurweb/routers/auth.py -msgid "Bad Referer header." -msgstr "Encabezado de referencia no correcto." - -#: aurweb/routers/packages.py -msgid "You did not select any packages to be notified about." -msgstr "No seleccionó ningún paquete para recibir notificaciones." - -#: aurweb/routers/packages.py -msgid "The selected packages' notifications have been enabled." -msgstr "Se han habilitado las notificaciones de los paquetes seleccionados." - -#: aurweb/routers/packages.py -msgid "You did not select any packages for notification removal." -msgstr "No seleccionó ningún paquete para la eliminación de notificaciones" - -#: aurweb/routers/packages.py -msgid "A package you selected does not have notifications enabled." -msgstr "Un paquete que seleccionó no tiene notificaciones habilitadas." - -#: aurweb/routers/packages.py -msgid "The selected packages' notifications have been removed." -msgstr "Se han eliminado las notificaciones de los paquetes seleccionados." - #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can flag packages." msgstr "Debe autentificarse antes de poder marcar paquetes." @@ -1040,10 +995,6 @@ msgstr "No posee los permisos para borrar paquetes." msgid "You did not select any packages to delete." msgstr "No seleccionó ningún paquete para borrar." -#: aurweb/routers/packages.py -msgid "One of the packages you selected does not exist." -msgstr "Uno de los paquetes que seleccionó no existe." - #: lib/pkgbasefuncs.inc.php msgid "The selected packages have been deleted." msgstr "Los paquetes seleccionados se han borrado." @@ -1052,18 +1003,10 @@ msgstr "Los paquetes seleccionados se han borrado." msgid "You must be logged in before you can adopt packages." msgstr "Debe autentificarse antes de poder adoptar paquetes." -#: aurweb/routers/package.py -msgid "You are not allowed to adopt one of the packages you selected." -msgstr "No puede adoptar uno de los paquetes que seleccionó." - #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can disown packages." msgstr "Debe autentificarse antes de poder abandonar paquetes." -#: aurweb/routers/packages.py -msgid "You are not allowed to disown one of the packages you selected." -msgstr "No puede abandonar uno de los paquetes que seleccionó." - #: lib/pkgbasefuncs.inc.php msgid "You did not select any packages to adopt." msgstr "No seleccionó ningún paquete para adoptar." @@ -1232,8 +1175,8 @@ msgstr "Desarrollador" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Usuarios de Confianza y desarrolladores" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1304,7 +1247,7 @@ msgstr "Editar la cuenta de este usuario" #: template/account_details.php msgid "List this user's comments" -msgstr "Mostrar los comentarios de este usuario" +msgstr "" #: template/account_edit_form.php #, php-format @@ -1319,7 +1262,7 @@ msgstr "Haga clic %saquí%s para ver los detalles del usuario." #: template/account_edit_form.php #, php-format msgid "Click %shere%s to list the comments made by this account." -msgstr "Haz clic %saquí%s para mostrar los comentarios hechos por esta cuenta." +msgstr "" #: template/account_edit_form.php msgid "required" @@ -1335,6 +1278,10 @@ msgstr "Su nombre de usuario es el nombre que usará para iniciar sesión. Es vi msgid "Normal user" msgstr "Usuario normal" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Usuario de Confianza" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Cuenta suspendida" @@ -1358,30 +1305,30 @@ msgid "" "If you do not hide your email address, it is visible to all registered AUR " "users. If you hide your email address, it is visible to members of the Arch " "Linux staff only." -msgstr "Si no esconde su dirección de correo electrónico, esta será visible para todo usuario registrado en el AUR. Si esconde su dirección de correo electrónico, esta será visible sólo por el equipo de Arch Linux." +msgstr "" #: template/account_edit_form.php msgid "Backup Email Address" -msgstr "Dirección de correo electrónico de respaldo" +msgstr "" #: template/account_edit_form.php msgid "" "Optionally provide a secondary email address that can be used to restore " "your account in case you lose access to your primary email address." -msgstr "Opcionalmente proporciona una dirección de correo electrónico secundaria para poder restaurar tu cuenta en caso de que pierdas acceso tu dirección principal." +msgstr "" #: template/account_edit_form.php msgid "" "Password reset links are always sent to both your primary and your backup " "email address." -msgstr "Los enlaces de restauración de contraseña siempre se envían a tus direcciones de correo electrónico primaria y de respaldo." +msgstr "" #: template/account_edit_form.php #, php-format msgid "" "Your backup email address is always only visible to members of the Arch " "Linux staff, independent of the %s setting." -msgstr "Tu dirección de correo de respaldo siempre es sólo visible por el equipo de Arch Linux, sin importar lo seleccionado en la configuración %s." +msgstr "" #: template/account_edit_form.php msgid "Language" @@ -1395,7 +1342,7 @@ msgstr "Zona horaria" msgid "" "If you want to change the password, enter a new password and confirm the new" " password by entering it again." -msgstr "Si quieres cambiar la contraseña, ingresa una nueva y confírmala en el cuadro correspondiente." +msgstr "" #: template/account_edit_form.php msgid "Re-type password" @@ -1407,15 +1354,6 @@ msgid "" " the Arch User Repository." msgstr "La siguiente información es necesaria únicamente si quiere subir paquetes al Repositorio de Usuarios de Arch." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Clave pública SSH" @@ -1438,21 +1376,21 @@ msgstr "Notificarme de cambios de propietario" #: template/account_edit_form.php msgid "To confirm the profile changes, please enter your current password:" -msgstr "Para confirmar los cambios a tu perfil, por favor ingresa tu contraseña:" +msgstr "" #: template/account_edit_form.php msgid "Your current password" -msgstr "Tu contraseña actual" +msgstr "" #: template/account_edit_form.php msgid "" "To protect the AUR against automated account creation, we kindly ask you to " "provide the output of the following command:" -msgstr "Para proteger el AUR contra creaciones de cuentas automatizados, te pedimos amablemente que ingreses la salida del siguiente comando:" +msgstr "" #: template/account_edit_form.php msgid "Answer" -msgstr "Respuesta" +msgstr "" #: template/account_edit_form.php template/pkgbase_details.php #: template/pkg_details.php @@ -1596,7 +1534,6 @@ msgid "%d pending request" msgid_plural "%d pending requests" msgstr[0] "Hay %d petición pendiente" msgstr[1] "Hay %d peticiones pendientes" -msgstr[2] "Hay %d peticiones pendientes" #: template/pkgbase_actions.php msgid "Adopt Package" @@ -1616,7 +1553,7 @@ msgstr "Solo lectura" #: template/pkgbase_details.php template/pkg_details.php msgid "click to copy" -msgstr "haz clic para copiar" +msgstr "" #: template/pkgbase_details.php template/pkg_details.php #: template/pkg_search_form.php @@ -1668,12 +1605,12 @@ msgstr "Agregar un comentario" msgid "" "Git commit identifiers referencing commits in the AUR package repository and" " URLs are converted to links automatically." -msgstr "Los identificadores de commits de Git que referencian URLs y commits del repositorio de paquetes del AUR son convertidos a enlaces automáticamente." +msgstr "" #: template/pkg_comment_form.php #, php-format msgid "%sMarkdown syntax%s is partially supported." -msgstr "La %ssintaxis Markdown%s está parcialmente soportada." +msgstr "" #: template/pkg_comments.php msgid "Pinned Comments" @@ -1685,7 +1622,7 @@ msgstr "Últimos comentarios" #: template/pkg_comments.php msgid "Comments for" -msgstr "Comentarios para" +msgstr "" #: template/pkg_comments.php #, php-format @@ -1700,7 +1637,7 @@ msgstr "Comentario anónimo en %s" #: template/pkg_comments.php #, php-format msgid "Commented on package %s on %s" -msgstr "Comentó en el paquete %s el %s." +msgstr "" #: template/pkg_comments.php #, php-format @@ -1832,7 +1769,7 @@ msgstr "Borrado" #: template/pkgreq_form.php msgid "Orphan" -msgstr "Abandono" +msgstr "Orfandad" #: template/pkgreq_form.php template/pkg_search_results.php msgid "Merge into" @@ -1840,30 +1777,30 @@ msgstr "Fusionar en" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Al enviar una Petición de Borrado, le preguntará a un Usuario de Confianza que elimine dicho paquete base. Este tipo de peticiones debe ser utilizada para duplicados, programas abandonados por el desarrollador principal o encargado, así como programas ilegales e irreparablemente rotos." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Al enviar una Petición de Fusión, le preguntará a un Usuario de Confianza que borre el paquete base y transfiera sus votos y comentarios a otro paquete base. La fusión de un paquete no afecta a los correspondientes repositorios Git. Por lo tanto asegúrese de actualizar el historia Git del paquete de destino uste mismo." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Al enviar una Petición de Orfandad, le preguntarás a un Usuario de Confianza que le quite la propiedad sobre el paquete base al encargado principal de este. Por favor, haga esto solo si el paquete necesita acciones de mantenención para funcionar, el encargado no presenta da de actividad y ya intentó ponerse en contacto con él anteriormente." #: template/pkgreq_results.php msgid "No requests matched your search criteria." -msgstr "Ninguna solicitud coincide con su criterio de búsqueda." +msgstr "Ninguna peticiones coincide con su criterio de búsqueda." #: template/pkgreq_results.php #, php-format @@ -1871,7 +1808,6 @@ msgid "%d package request found." msgid_plural "%d package requests found." msgstr[0] "Se encontró %d solicitud para el paquete." msgstr[1] "Se encontraron %d solicitudes para el paquete." -msgstr[2] "Se encontraron %d solicitudes para el paquete." #: template/pkgreq_results.php template/pkg_search_results.php #, php-format @@ -1896,7 +1832,6 @@ msgid "~%d day left" msgid_plural "~%d days left" msgstr[0] "~%d día restante" msgstr[1] "~%d días restantes" -msgstr[2] "~%d días restantes" #: template/pkgreq_results.php #, php-format @@ -1904,7 +1839,6 @@ msgid "~%d hour left" msgid_plural "~%d hours left" msgstr[0] "Aprox. %d hora restante" msgstr[1] "Aprox. %d horas restantes" -msgstr[2] "Aprox. %d horas restantes" #: template/pkgreq_results.php msgid "<1 hour left" @@ -2017,7 +1951,7 @@ msgstr "Ir" #: template/pkg_search_form.php msgid "Orphans" -msgstr "Abandonados" +msgstr "Huérfanos" #: template/pkg_search_results.php msgid "Error retrieving package list." @@ -2033,7 +1967,6 @@ msgid "%d package found." msgid_plural "%d packages found." msgstr[0] "%d paquete fue encontrado." msgstr[1] "%d paquetes fueron encontrados." -msgstr[2] "%d paquetes fueron encontrados." #: template/pkg_search_results.php msgid "Version" @@ -2053,7 +1986,7 @@ msgstr "Sí" #: template/pkg_search_results.php msgid "orphan" -msgstr "abandonado" +msgstr "huérfano" #: template/pkg_search_results.php msgid "Actions" @@ -2093,7 +2026,7 @@ msgstr "Estadísticas" #: template/stats/general_stats_table.php msgid "Orphan Packages" -msgstr "Paquetes Abandonados" +msgstr "Paquetes huérfanos" #: template/stats/general_stats_table.php msgid "Packages added in the past 7 days" @@ -2116,8 +2049,8 @@ msgid "Registered Users" msgstr "Usuarios registrados" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Usuarios de Confianza" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2170,7 +2103,7 @@ msgstr "Participación" #: template/tu_last_votes_list.php msgid "Last Votes by TU" -msgstr "Últimos votos del Usuario de Confianza" +msgstr "Último voto del Usuario de Confianza" #: template/tu_last_votes_list.php msgid "Last vote" @@ -2198,7 +2131,7 @@ msgid "" "A password reset request was submitted for the account {user} associated " "with your email address. If you wish to reset your password follow the link " "[1] below, otherwise ignore this message and nothing will happen." -msgstr "Una solicitud de reinicio de contraseña fue hecha para la cuenta {user} asociada con tu dirección de correo electrónico. Si deseas reiniciar tu contraseña, sigue el enlace [1] debajo, de lo contrario ignora este mensaje y nada pasará." +msgstr "" #: scripts/notify.py msgid "Welcome to the Arch User Repository" @@ -2209,7 +2142,7 @@ msgid "" "Welcome to the Arch User Repository! In order to set an initial password for" " your new account, please click the link [1] below. If the link does not " "work, try copying and pasting it into your browser." -msgstr "¡Le damos la bienvenida al Repositorio Usuarios de Arch! Para poder configurar su contraseña inicial, por favor haga clic en el enlace [1] de abajo. Si el enlace no funciona, pruebe copiando y pegándolo en su navegador." +msgstr "" #: scripts/notify.py #, python-brace-format @@ -2226,62 +2159,62 @@ msgstr "el usuario {user} [1] agregó el siguiente comentario al paquete base {p msgid "" "If you no longer wish to receive notifications about this package, please go" " to the package page [2] and select \"{label}\"." -msgstr "Si ya no deseas recibir notificaciones sobre este paquete, por favor vé a la página del paquete [2] y selecciona \"{label}\"." +msgstr "" #: scripts/notify.py #, python-brace-format msgid "AUR Package Update: {pkgbase}" -msgstr "Actualización de paquete en el AUR: {pkgbase}" +msgstr "" #: scripts/notify.py #, python-brace-format msgid "{user} [1] pushed a new commit to {pkgbase} [2]." -msgstr "{user} [1] añadió un nuevo commit a {pkgbase} [2]." +msgstr "" #: scripts/notify.py #, python-brace-format msgid "AUR Out-of-date Notification for {pkgbase}" -msgstr "Notificación en el AUR de paquete obsoleto para {pkgbase}" +msgstr "" #: scripts/notify.py #, python-brace-format msgid "Your package {pkgbase} [1] has been flagged out-of-date by {user} [2]:" -msgstr "Tu paquete {pkgbase} [1] ha sido marcado como desactualizado por {user} [2]:" +msgstr "" #: scripts/notify.py #, python-brace-format msgid "AUR Ownership Notification for {pkgbase}" -msgstr "Notificación en el AUR de propiedad para {pkgbase}" +msgstr "" #: scripts/notify.py #, python-brace-format msgid "The package {pkgbase} [1] was adopted by {user} [2]." -msgstr "El paquete {pkgbase} [1] fué adoptado por {user} [2]." +msgstr "" #: scripts/notify.py #, python-brace-format msgid "The package {pkgbase} [1] was disowned by {user} [2]." -msgstr "El paquete {pkgbase} [1] fué abandonado por {user} [2]." +msgstr "" #: scripts/notify.py #, python-brace-format msgid "AUR Co-Maintainer Notification for {pkgbase}" -msgstr "Notificación en el AUR de Coencargado para {pkgbase}" +msgstr "" #: scripts/notify.py #, python-brace-format msgid "You were added to the co-maintainer list of {pkgbase} [1]." -msgstr "Te han añadido a la lista de coencargados de {pkgbase} [1]." +msgstr "" #: scripts/notify.py #, python-brace-format msgid "You were removed from the co-maintainer list of {pkgbase} [1]." -msgstr "Te han eliminado de la lista de coencargados de {pkgbase} [1]." +msgstr "" #: scripts/notify.py #, python-brace-format msgid "AUR Package deleted: {pkgbase}" -msgstr "Paquete en el AUR elimnado: {pkgbase}" +msgstr "" #: scripts/notify.py #, python-brace-format @@ -2290,7 +2223,7 @@ msgid "" "\n" "-- \n" "If you no longer wish receive notifications about the new package, please go to [3] and click \"{label}\"." -msgstr "{user} [1] fusionó {old} [2] en {new} [3].\n\n-- \nSi ya no deseas recibir notificaciones sobre el nuevo paquete, por favor dirigete a [3] y haz clic en \"{label}\"." +msgstr "" #: scripts/notify.py #, python-brace-format @@ -2298,11 +2231,11 @@ msgid "" "{user} [1] deleted {pkgbase} [2].\n" "\n" "You will no longer receive notifications about this package." -msgstr "{user} [1] eliminó {pkgbase} [2].\n\nYo no recibirás actualizaciones de este paquete." +msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2310,81 +2243,4 @@ msgstr "" msgid "" "Please remember to cast your vote on proposal {id} [1]. The voting period " "ends in less than 48 hours." -msgstr "Por favor recuerda efectuar tu voto en la propuesta {id} [1]. El lapso para votar termina en menos de 48 horas." - -#: aurweb/routers/accounts.py -msgid "Invalid account type provided." -msgstr "Se proporcionó un tipo de cuenta no válido." - -#: aurweb/routers/accounts.py -msgid "You do not have permission to change account types." -msgstr "No tiene permisos para cambiar los tipos de cuenta." - -#: aurweb/routers/accounts.py -msgid "You do not have permission to change this user's account type to %s." -msgstr "No tiene permisos para cambiar el tipo de cuenta de este usuario a 1%s." - -#: aurweb/packages/requests.py -msgid "No due existing orphan requests to accept for %s." -msgstr "No existen solicitudes huérfanas pendientes para aceptar de 1%s." - -#: aurweb/asgi.py -msgid "Internal Server Error" -msgstr "Error interno del servidor" - -#: templates/errors/500.html -msgid "A fatal error has occurred." -msgstr "Ha ocurrido un error fatal." - -#: templates/errors/500.html -msgid "" -"Details have been logged and will be reviewed by the postmaster posthaste. " -"We apologize for any inconvenience this may have caused." -msgstr "Los detalles han sido registrados y serán revisados ​​por el administrador de correos inmediatamente. Pedimos disculpas por cualquier inconveniente que esto pueda haber causado." - -#: aurweb/scripts/notify.py -msgid "AUR Server Error" -msgstr "Error del servidor del AUR" - -#: templates/pkgbase/merge.html templates/packages/delete.html -#: templates/packages/disown.html -msgid "Related package request closure comments..." -msgstr "Comentarios de cierre de solicitud de paquete relacionados..." - -#: templates/pkgbase/merge.html templates/packages/delete.html -msgid "" -"This action will close any pending package requests related to it. If " -"%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "Esta acción cerrará cualquier solicitud de paquete pendiente relacionada con este. Si se omiten 1%sComentarios1%s, se generará automáticamente un comentario de cierre." - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." msgstr "" diff --git a/po/et.po b/po/et.po index e25c7eb2..9b6493b5 100644 --- a/po/et.po +++ b/po/et.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Estonian (http://app.transifex.com/lfleischer/aurweb/language/et/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Estonian (http://www.transifex.com/lfleischer/aurweb/language/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1828,22 +1821,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2100,7 +2093,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2286,7 +2279,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2340,35 +2333,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/fi.po b/po/fi.po index eb97a47d..39cfe626 100644 --- a/po/fi.po +++ b/po/fi.po @@ -10,11 +10,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Nikolay Korotkiy , 2018-2019\n" -"Language-Team: Finnish (http://app.transifex.com/lfleischer/aurweb/language/fi/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Finnish (http://www.transifex.com/lfleischer/aurweb/language/fi/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -135,15 +135,15 @@ msgid "Type" msgstr "Tyyppi" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Luotetun käyttäjän (TU) lisääminen" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Luotetun käyttäjän (TU) poisto" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -201,10 +201,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Tervetuloa AURiin! Luethan %sAURin käyttäjä ohjeen%s sekä %sTU-käyttäjän oppaan%s, kun tarvitset lisätietoa." #: html/home.php #, php-format @@ -218,8 +217,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Muista äänestää suosikkipakettejasi!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Jotkin paketit saattavat olla tarjolla valmiina paketteina [extra]-varastossa." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Jotkin paketit saattavat olla tarjolla valmiina paketteina [community]-varastossa." #: html/home.php msgid "DISCLAIMER" @@ -268,8 +267,8 @@ msgstr "Poistopyyntö" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Hallintapyyntö paketin poistamiseksi AUR:ista. Jos paketti on jollain tapaa rikki tai huono, mutta helposti korjattavissa, tulisi ensisijaisesti olla yhteydessä paketin ylläpitäjään ja viimekädessä pistää paketin hylkäämispyyntö menemään." #: html/home.php msgid "Merge Request" @@ -311,11 +310,10 @@ msgstr "Keskustelu" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Yleinen keskustelu AUR:iin ja Luotettuihin käyttäjiin liittyen käydään postitusluettelossa %saur-general%s. AUR-verkkokäyttöliittymän kehittämiseen liittyvä keskustelu käydään postitusluettelossa %saur-dev%s." #: html/home.php msgid "Bug Reporting" @@ -326,9 +324,9 @@ msgstr "Virheiden raportointi" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Jos löydät AUR-verkkokäyttöliittymästa virheen, täytä virheenilmoituslomake %svirheenseurannassamme%s. Käytä sivustoa %sainoastaan%s verkkokäyttöliittymän virheiden ilmoittamiseen. Ilmoittaaksesi pakettien virheistä, ota yhteys paketin ylläpitäjään tai jätä kommentti paketin sivulla." #: html/home.php msgid "Package Search" @@ -528,8 +526,8 @@ msgid "Delete" msgstr "Poista" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Vain Luotetut käyttäjät, sekä kehittäjät voivat poistaa paketteja." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -569,8 +567,8 @@ msgid "Disown" msgstr "Hylkää" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Vain Luotetut käyttäjät, sekä kehittäjät voivat hylätä paketteja." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -659,8 +657,8 @@ msgid "Merge" msgstr "Liitä" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Vain Luotetut käyttäjät, sekä kehittäjät voivat yhdistää paketteja." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -717,8 +715,8 @@ msgid "I accept the terms and conditions above." msgstr "Hyväksyn ylläolevat ehdot." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Luotettu käyttäjä (TU)" #: html/tu.php msgid "Could not retrieve proposal details." @@ -729,8 +727,8 @@ msgid "Voting is closed for this proposal." msgstr "Tämän ehdoksen äänestys on päättynyt." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Vain Luotetut käyttäjät voivat äänestää." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1225,8 +1223,8 @@ msgstr "Kehittäjä" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Luotettu käyttäjä & kehittäjä" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1328,6 +1326,10 @@ msgstr "" msgid "Normal user" msgstr "Tavallinen käyttäjä" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Luotettu käyttäjä (TU)" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Käyttäjätili hyllytetty" @@ -1400,15 +1402,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Julkinen SSH avain" @@ -1832,22 +1825,22 @@ msgstr "Yhdistä pakettiin" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Lähettämällä poistopyynnön pyydät Luotettua käyttäjää poistamaan pakettikannan. Tämän tyyppisiä pyyntöjä tulisi käyttää ainoastaan kaksoiskappaleisiin, laittomiin tai korjaamattoman rikkonaisiin paketteihin sekä ohjelmistoihin, jotka kehittäjä on hylännyt." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Ennen yhdistämispyynnön lähettämistä, pyydä Luotettua käyttäjää poistamaan pakettikanta ja siirtämään sen äänet ja kommentit toiseen pakettikantaan. Paketin yhdistäminen ei vaikuta Git-varastoihin. Varmista, että päivität kohdepaketin Git-historian itse." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2104,8 +2097,8 @@ msgid "Registered Users" msgstr "Rekisteröityjä käyttäjiä" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Luotettuja käyttäjiä" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2290,7 +2283,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2344,35 +2337,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/fi_FI.po b/po/fi_FI.po index e0193ec9..f3253433 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Finnish (Finland) (http://app.transifex.com/lfleischer/aurweb/language/fi_FI/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Finnish (Finland) (http://www.transifex.com/lfleischer/aurweb/language/fi_FI/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1828,22 +1821,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2100,7 +2093,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2286,7 +2279,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2340,35 +2333,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/fr.po b/po/fr.po index b7942b3a..99d01460 100644 --- a/po/fr.po +++ b/po/fr.po @@ -5,12 +5,12 @@ # Translators: # Alexandre Macabies , 2018 # Antoine Lubineau , 2012 -# Antoine Lubineau , 2012-2016,2023 +# Antoine Lubineau , 2012-2016 # Cedric Girard , 2011,2014,2016 # demostanis , 2020 # Kristien , 2020 # lordheavy , 2011 -# lordheavy , 2013-2014,2018,2022 +# lordheavy , 2013-2014,2018 # lordheavy , 2011-2012 # Lukas Fleischer , 2011 # Thibault , 2020 @@ -18,16 +18,16 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Antoine Lubineau , 2012-2016,2023\n" -"Language-Team: French (http://app.transifex.com/lfleischer/aurweb/language/fr/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: French (http://www.transifex.com/lfleischer/aurweb/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: fr\n" -"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" #: html/404.php msgid "Page Not Found" @@ -143,16 +143,16 @@ msgid "Type" msgstr "Type" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Ajout d’un utilisateur de confiance." #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Suppression d’un utilisateur de confiance" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Suppression d’un utilisateur de confiance (inactivité non prévenue)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -209,10 +209,9 @@ msgstr "Rechercher les paquets que je co-maintiens" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Bienvenue sur AUR ! Veuillez lire les %sconsignes pour les utilisateurs d’AUR%s et les %sconsignes pour les utilisateurs de confiance%s pour plus d’information." #: html/home.php #, php-format @@ -226,8 +225,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Pensez à voter pour vos paquets favoris !" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Certains paquets peuvent être disponibles sous forme binaire dans le dépôt [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Certains paquets peuvent être disponibles sous forme binaire dans le dépôt [community]." #: html/home.php msgid "DISCLAIMER" @@ -276,8 +275,8 @@ msgstr "Requête de suppression" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Demande qu'un paquet soit supprimé d'AUR. Prière de ne pas l'utiliser si un paquet est cassé et que le problème peut être réglé facilement. À la place, contactez le mainteneur du paquet, et soumettez une requête de destitution si nécessaire." #: html/home.php msgid "Merge Request" @@ -319,11 +318,10 @@ msgstr "Discussion" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Les discussions générales en rapport avec AUR (Arch User Repository, dépôt des utilisateurs d’Arch Linux) et les TU (Trusted User, utilisateurs de confiance) ont lieu sur %saur-general%s. Pour les discussions en rapport avec le développement de l'interface web d'AUR, utilisez la mailing-list %saur-dev.%s" #: html/home.php msgid "Bug Reporting" @@ -334,9 +332,9 @@ msgstr "Rapports de bug" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Si vous trouvez un bug dans l'interface web d'AUR, merci de remplir un rapport de bug sur le %sbug tracker%s. N’utilisez le tracker %sque%s pour les bugs de l'interface web d'AUR. Pour signaler un bug dans un paquet, contactez directement le mainteneur du paquet, ou laissez un commentaire sur la page du paquet." #: html/home.php msgid "Package Search" @@ -488,7 +486,7 @@ msgstr "Les paquets sélectionnés n'ont pas été destitués, vérifiez la boî msgid "" "The selected packages have not been adopted, check the confirmation " "checkbox." -msgstr "Les paquets sélectionnés n’ont pas été adoptés, vérifiez la case de confirmation." +msgstr "" #: html/pkgbase.php lib/pkgreqfuncs.inc.php msgid "Cannot find package to merge votes and comments into." @@ -536,8 +534,8 @@ msgid "Delete" msgstr "Supprimer" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Seuls les Utilisateur de Confiance et les Développeurs peuvent effacer des paquets." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -577,8 +575,8 @@ msgid "Disown" msgstr "Destituer" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Seuls les Utilisateur de Confiance et les Développeurs peuvent destituer des paquets." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -667,8 +665,8 @@ msgid "Merge" msgstr "Fusionner" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Seuls les Utilisateur de Confiance et les Développeurs peuvent fusionner des paquets." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -725,8 +723,8 @@ msgid "I accept the terms and conditions above." msgstr "J'accepte les modalités ci-avant." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Utilisateur de confiance (TU)" #: html/tu.php msgid "Could not retrieve proposal details." @@ -737,8 +735,8 @@ msgid "Voting is closed for this proposal." msgstr "Le vote est clos pour cette proposition." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Seuls les Utilisateurs de Confiance sont autorisés à voter." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -894,7 +892,7 @@ msgstr "Compte suspendu." #: aurweb/routers/accounts.py msgid "You do not have permission to suspend accounts." -msgstr "Vous n’avez pas la permission de suspendre des comptes." +msgstr "" #: lib/acctfuncs.inc.php #, php-format @@ -983,27 +981,27 @@ msgstr "Les détails du paquet ne peuvent pas être trouvés." #: aurweb/routers/auth.py msgid "Bad Referer header." -msgstr "Mauvais en-tête Referer." +msgstr "" #: aurweb/routers/packages.py msgid "You did not select any packages to be notified about." -msgstr "Vous n’avez sélectionné aucun paquet pour être notifié." +msgstr "" #: aurweb/routers/packages.py msgid "The selected packages' notifications have been enabled." -msgstr "Les notifications des paquets sélectionnés ont été activées." +msgstr "" #: aurweb/routers/packages.py msgid "You did not select any packages for notification removal." -msgstr "Vous n’avez sélectionné aucun paquet pour la suppression de notification." +msgstr "" #: aurweb/routers/packages.py msgid "A package you selected does not have notifications enabled." -msgstr "Un paquet que vous avez sélectionné n’a pas les notifications activées." +msgstr "" #: aurweb/routers/packages.py msgid "The selected packages' notifications have been removed." -msgstr "Les notifications des paquets sélectionnés ont été supprimées." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can flag packages." @@ -1043,7 +1041,7 @@ msgstr "Vous n'avez sélectionné aucun paquet à supprimer." #: aurweb/routers/packages.py msgid "One of the packages you selected does not exist." -msgstr "L’un des paquets que vous avez sélectionnés n’existe pas." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "The selected packages have been deleted." @@ -1055,15 +1053,15 @@ msgstr "Vous devez être authentifié avant de pouvoir adopter des paquets." #: aurweb/routers/package.py msgid "You are not allowed to adopt one of the packages you selected." -msgstr "Vous n’êtes pas autorisé à adopter l’un des paquets que vous avez sélectionnés." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can disown packages." -msgstr "Vous devez être authentifié avant de pouvoir destituer des paquets." +msgstr "Vous devez être authentifié avant de pouvoir abandonner des paquets." #: aurweb/routers/packages.py msgid "You are not allowed to disown one of the packages you selected." -msgstr "Vous n’êtes pas autorisé à destituer l’un des paquets que vous avez sélectionnés." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You did not select any packages to adopt." @@ -1071,7 +1069,7 @@ msgstr "Vous n'avez pas sélectionné de paquet à adopter." #: lib/pkgbasefuncs.inc.php msgid "You did not select any packages to disown." -msgstr "Vous n'avez sélectionné aucun paquet à destituer." +msgstr "Vous n'avez sélectionné aucun paquet à abandonner." #: lib/pkgbasefuncs.inc.php msgid "The selected packages have been adopted." @@ -1079,7 +1077,7 @@ msgstr "Les paquets sélectionnés ont été adoptés." #: lib/pkgbasefuncs.inc.php msgid "The selected packages have been disowned." -msgstr "Les paquets sélectionnés ont été destitués." +msgstr "Les paquets sélectionnés ont été abandonnés." #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can vote for packages." @@ -1233,8 +1231,8 @@ msgstr "Développeur" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Utilisateur de confiance (TU) et Développeur" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1336,6 +1334,10 @@ msgstr "Votre nom d'utilisateur est le nom que vous utilisez pour vous connecter msgid "Normal user" msgstr "Utilisateur normal" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Utilisateur de confiance (TU)" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Compte suspendu" @@ -1408,15 +1410,6 @@ msgid "" " the Arch User Repository." msgstr "L'information suivante est requise uniquement si vous voulez soumettre des paquets sur AUR" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Clé SSH publique" @@ -1597,7 +1590,6 @@ msgid "%d pending request" msgid_plural "%d pending requests" msgstr[0] "%d requête en attente" msgstr[1] "%d requêtes en attente" -msgstr[2] "%d requêtes en attente" #: template/pkgbase_actions.php msgid "Adopt Package" @@ -1841,26 +1833,26 @@ msgstr "Fusionner dans" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "En soumettant une requète de suppression, vous demandez à un utilisateur de confiance de supprimer le paquet de base. Ce type de requète doit être utilisé pour les doublons, les logiciels abandonnés par l'upstream ainsi que pour les paquets illégaux ou irréparables." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "En soumettant une requète de fusion, vous demandez à un utilisateur de confiance de supprimer le paquet de base et de transférer les votes et les commentaires vers un autre paquet de base. Fusionner un paquet n'impacte pas le dépot Git correspondant. Assurez-vous de mettre à jour l'historique Git du paquet cible vous-même." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "En soumettant une requète pour rendre orphelin, vous demandez à un utilisateur de confiance de retirer le mainteneur du paquet de base. Merci de ne faire ceci que si le paquet nécessite l'action d'un mainteneur, que le mainteneur ne répond pas et que vous avez préalablement essayé de contacter le mainteneur." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -1872,7 +1864,6 @@ msgid "%d package request found." msgid_plural "%d package requests found." msgstr[0] "%d paquet demandé trouvé." msgstr[1] "%d paquets demandés trouvés." -msgstr[2] "%d paquets demandés trouvés." #: template/pkgreq_results.php template/pkg_search_results.php #, php-format @@ -1897,7 +1888,6 @@ msgid "~%d day left" msgid_plural "~%d days left" msgstr[0] "~%d jour restant" msgstr[1] "~%d jours restants" -msgstr[2] "~%d jours restants" #: template/pkgreq_results.php #, php-format @@ -1905,7 +1895,6 @@ msgid "~%d hour left" msgid_plural "~%d hours left" msgstr[0] "~%d heure restante" msgstr[1] "%d heures restantes" -msgstr[2] "%d heures restantes" #: template/pkgreq_results.php msgid "<1 hour left" @@ -2034,7 +2023,6 @@ msgid "%d package found." msgid_plural "%d packages found." msgstr[0] "%d paquet trouvé." msgstr[1] "%d paquets trouvés." -msgstr[2] "%d paquets trouvés." #: template/pkg_search_results.php msgid "Version" @@ -2070,7 +2058,7 @@ msgstr "Adopter des paquets" #: template/pkg_search_results.php msgid "Disown Packages" -msgstr "Destituer les paquets" +msgstr "Abandonner les paquets" #: template/pkg_search_results.php msgid "Delete Packages" @@ -2117,8 +2105,8 @@ msgid "Registered Users" msgstr "Utilisateurs enregistrés" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Utilisateurs de confiance (TU)" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2303,8 +2291,8 @@ msgstr "{user} [1] a supprimé {pkgbase} [2].\n\nVous ne recevrez plus de notifi #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "Rappel du vote du TU : proposition {id}" #: scripts/notify.py #, python-brace-format @@ -2315,15 +2303,15 @@ msgstr "N'oubliez pas de voter sur la proposition {id} [1]. La période de vote #: aurweb/routers/accounts.py msgid "Invalid account type provided." -msgstr "Type de compte choisi invalide." +msgstr "" #: aurweb/routers/accounts.py msgid "You do not have permission to change account types." -msgstr "Vous n’avez pas la permission de changer le type de compte." +msgstr "" #: aurweb/routers/accounts.py msgid "You do not have permission to change this user's account type to %s." -msgstr "Vous n’avez pas la permission de changer le type de compte de cet utilisateur en %s." +msgstr "" #: aurweb/packages/requests.py msgid "No due existing orphan requests to accept for %s." @@ -2331,11 +2319,11 @@ msgstr "" #: aurweb/asgi.py msgid "Internal Server Error" -msgstr "Erreur interne du serveur" +msgstr "" #: templates/errors/500.html msgid "A fatal error has occurred." -msgstr "Une erreur fatale s’est produite." +msgstr "" #: templates/errors/500.html msgid "" @@ -2345,7 +2333,7 @@ msgstr "" #: aurweb/scripts/notify.py msgid "AUR Server Error" -msgstr "Erreur du serveur AUR" +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html @@ -2357,35 +2345,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/he.po b/po/he.po index e39a5940..cd4a0f87 100644 --- a/po/he.po +++ b/po/he.po @@ -3,17 +3,17 @@ # This file is distributed under the same license as the AURWEB package. # # Translators: -# gk , 2016 +# GenghisKhan , 2016 # Lukas Fleischer , 2011 -# Yaron Shahrabani , 2016-2023 +# Yaron Shahrabani , 2016-2022 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Yaron Shahrabani , 2016-2023\n" -"Language-Team: Hebrew (http://app.transifex.com/lfleischer/aurweb/language/he/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Hebrew (http://www.transifex.com/lfleischer/aurweb/language/he/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -134,16 +134,16 @@ msgid "Type" msgstr "סוג" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "הוספת מתחזקים לחבילה" +msgid "Addition of a TU" +msgstr "הוספת משתמש מהימן" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "הסרת מתחזקים מהחבילה" +msgid "Removal of a TU" +msgstr "הסרת משתמש מהימן" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "הסרת מתחזקי חבילה (חוסר פעילות לא מוצהרת)" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "הסרת משתמש מהימן (חוסר פעילות בלתי מוצהרת)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -200,10 +200,9 @@ msgstr "חיפוש אחר חבילה שאני מתחזק המשנה שלה" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "ברוך בואך ל־AUR! נא לקרוא את %sההנחיות למשתמשים ב־AUR%s למידע נוסף ואת %sהנחיות ההגשה ל־AUR%s אם מעניין אותך לתרום PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "ברוך בואך ל־AUR, מאגר תרומות המשתמשים של ארץ׳! נא לקרוא את %sהכללים למשתמש ב־AUR%s ואת %sהכללים למשתמשים מהימנים ב־AUR%s." #: html/home.php #, php-format @@ -217,8 +216,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "לא לשכוח להצביע לחבילות המועדפות עליך!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "יתכן שחלק מהחבילות מסופקות בתור קבצים בינריים תחת [extra] (קהילה)." +msgid "Some packages may be provided as binaries in [community]." +msgstr "יתכן שחלק מהחבילות מסופקות בתור קבצים בינריים תחת [community] (קהילה)." #: html/home.php msgid "DISCLAIMER" @@ -267,8 +266,8 @@ msgstr "בקשת מחיקה" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "אפשר לבקש הסרת חבילה ממאגר המשתמשים של Arch ‏(AUR). נא לא להשתמש בזה אם החבילה פגומה ואפשר לתקן אותה בקלות. במקום, יש ליצור קשר עם מתחזקי החבילה ולהגיש בקשת יתמות במקרה הצורך." +"the package maintainer and file orphan request if necessary." +msgstr "ניתן לבקש הסרת חבילה ממאגר המשתמשים של ארץ׳. אין להשתמש בזה אם יש תקלה בחבילה וניתן לתקן אותה בקלות. במקום זאת, יש ליצור קשר עם מתחזק החבילה ולהגיש בקשת יתומה אם יש צורך." #: html/home.php msgid "Merge Request" @@ -310,11 +309,10 @@ msgstr "דיון" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "דיון כללי בנוגע למאגר המשתמשים של Arch‏ (AUR) ומבנה מתחזקי החבילות מתרחש ב־%saur-general%s. לדיון בנוגע לפיתוח האתר של AUR, יש להשתמש ברשימת הדיוור %saur-dev%s." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "הדיון הכללי על מאגר המשתמשים של ארץ׳ (AUR) ומבנה המשתמשים המהימנים מתנהל ברשימה %saur-general%s. לדיון בנוגע לפיתוח של המנשק של AUR, יש להשתמש ברשימה %saur-dev%s." #: html/home.php msgid "Bug Reporting" @@ -325,9 +323,9 @@ msgstr "דיווח על באגים" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "אם מצאת תקלה באתר של AUR, נא למלא דוח תקלה ב%sעוקב התקלות%s שלנו. אפשר להשתמש בעוקב כדי לדווח על תקלות באתר של AUR %sבלבד%s. כדי לדווח על תקלות עם אריזות יש ליצור קשר עם המתחזקים או להשאיר תגובה בעמוד החבילה המתאים." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "אם נתקלת בתקלה במנשק הדפדפן של AUR, נא להגיש דיווח על תקלה ב%sמערכת ניהול התקלות%s שלנו. יש להשתמש במערכת ניהול התקלות כדי לדווח על תקלות במנשק הדפדפן %sבלבד%s. כדי לדווח על תקלות עם אריזה יש ליצור קשר עם מתחזק החבילה או להשאיר הערה בעמוד החבילה בהתאם." #: html/home.php msgid "Package Search" @@ -527,8 +525,8 @@ msgid "Delete" msgstr "מחיקה" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "רק מתחזקי ומפתחי חבילות יכולים למחוק חבילות." +msgid "Only Trusted Users and Developers can delete packages." +msgstr "רק משתמשים מהימנים ומפתחים יכולים למחוק חבילות." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -568,8 +566,8 @@ msgid "Disown" msgstr "ניתוק בעלות" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "רק מתחזקי ומפתחי חבילות יכולים לנשל חבילות." +msgid "Only Trusted Users and Developers can disown packages." +msgstr "רק משתמשים מהימנים ומפתחים יכולים לנתק בעלות של חבילות." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -658,8 +656,8 @@ msgid "Merge" msgstr "מיזוג" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "רק מתחזקי ומפתחי חבילות יכולים למזג חבילות." +msgid "Only Trusted Users and Developers can merge packages." +msgstr "רק משתמשים מהימנים ומפתחים יכולים למזג חבילות." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -716,8 +714,8 @@ msgid "I accept the terms and conditions above." msgstr "התנאים שלעיל מקובלים עלי." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "מתחזקי חבילה" +msgid "Trusted User" +msgstr "משתמש מהימן" #: html/tu.php msgid "Could not retrieve proposal details." @@ -728,8 +726,8 @@ msgid "Voting is closed for this proposal." msgstr "ההצבעה סגורה עבור הצעה זו." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "רק למתחזקי חבילה מותר להצביע." +msgid "Only Trusted Users are allowed to vote." +msgstr "רק משתמשים מהימנים מורשים להצביע." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1224,8 +1222,8 @@ msgstr "מפתח" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "מתחזקי ומפתחי חבילה" +msgid "Trusted User & Developer" +msgstr "משתמש מהימן ומפתח" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1327,6 +1325,10 @@ msgstr "שם המשתמש שלך הוא השם שישמש אותך לכניסה msgid "Normal user" msgstr "משתמש רגיל" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "משתמשים אמינים" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "חשבון מושעה" @@ -1399,15 +1401,6 @@ msgid "" " the Arch User Repository." msgstr "המידע הבא נחוץ רק אם ברצונך להגיש חבילות למאגר החבילות של ארץ׳." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "אפשר לציין מגוון מפתחות SSH, אחד בשורה, אין משמעות לשורה ריקה." - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "הסתרת הערות שנמחקו" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "מפתח SSH ציבורי" @@ -1833,26 +1826,26 @@ msgstr "מיזוג לתוך" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "בקשת מחיקה היא דרישה ממתחזקי החבילה למחוק את בסיס החבילה. יש להשתמש בסוג הזה של הבקשה על כפילויות, תוכנה שננטשה במקור, וגם חבילות בלתי חוקיות ופגומות באופן שלא ניתן לתיקון." +msgstr "בהגשת בקשה למחיקה, משתמש מהימן ישקול אם למחוק בסיס חבילה. סוג כזה של בקשה יכול לשמש במקרים של כפילויות, תכנית שנזנחה במקור לצד חבילה בלתי חוקית או שבורה באופן שלא ניתן לשקם." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "בקשת מיזוג היא דרישה ממתחזקי החבילה למחוק את בסיס החבילה ולהעביר את ההצבעות וההערות לבסיס חבילה אחר. מיזוג חבילה לא משפיע על מאגרי ה־Git התואמים. עדכון היסטוריית ה־Git של חבילת היעד הוא באחריותך. " +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "הגשת בקשת מיזוג מופנית למשתמש מהימן לטובת מחיקת בסיס חבילה והעברת ההצבעות וההערות שלו לבסיס חבילה אחר. מיזוג חבילה לא משפיע על מאגרי ה־Git הקשורים אליו. יש לוודא שעדכנת את היסטוריית ה־Git של חבילת היעד בעצמך." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "בקשת יתמות היא דרישה ממתחזקי החבילה לנשל את בסיס החבילה. נא עשות את זה רק אם החבילה צריכה פעולת תחזוקה, המתחזקים לא זמינים למשך תקופה וכבר ניסית ליצור קשר עם המתחזקים בעבר." +msgstr "הגשת בקשת יתומה מופנית למשתמש מהימן לטובת ביטול שייכות בסיס חבילה. נא להגיש בקשה זו רק אם החבילה דורשת פעולת תחזוקה, המתחזק אינו זמין וכבר ניסית ליצור קשר עם המתחזק בעבר." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2113,8 +2106,8 @@ msgid "Registered Users" msgstr "משתמשים רשומים" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "מתחזקי החבילה" +msgid "Trusted Users" +msgstr "משתמשים מהימנים" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2299,8 +2292,8 @@ msgstr " {pkgbase} [2] נמחקה על ידי{user} [1].\n\nלא תישלחנה #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "תזכורת הצבעה לתחזוקת חבילה: הצעה {id}" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "תזכורת הצבעה למשתמש מהימן: הצעה {id}" #: scripts/notify.py #, python-brace-format @@ -2346,42 +2339,10 @@ msgstr "שגיאת שרת ה־AUR" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "הערות הסגירה התואמות של בקשת החבילה…" +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "פעולה זו תסגור בקשות חבילות ממתינות שקשורות אליה. אם %sתגובות%s מושמטות, תיווצר תגובת סגירה אוטומטית." - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "מוקצית" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "להציג עוד %d" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "תלויות" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "החשבון לא נמחק, נא לבדוק את תיבת האישור." - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "ביטול" - -#: templates/requests.html -msgid "Package name" -msgstr "שם החבילה" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "ראוי לשים לב שהסתרת כתובת הדוא״ל שלך תעביר אותה לרשימת העותק המוסתר בהתראות לבקשה. אם מישהו יגיב להתראות האלה, ההודעות לא תגענה אליך. עם זאת, תגובות בדרך כלל נשלחות לרשימת הדיוור והן אמורות להופיע בארכיון." +msgstr "" diff --git a/po/hi_IN.po b/po/hi_IN.po index f8a66539..37fd082e 100644 --- a/po/hi_IN.po +++ b/po/hi_IN.po @@ -3,15 +3,15 @@ # This file is distributed under the same license as the AURWEB package. # # Translators: -# Panwar108 , 2018,2020-2022 +# Panwar108 , 2018,2020-2021 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Panwar108 , 2018,2020-2022\n" -"Language-Team: Hindi (India) (http://app.transifex.com/lfleischer/aurweb/language/hi_IN/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Hindi (India) (http://www.transifex.com/lfleischer/aurweb/language/hi_IN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -132,16 +132,16 @@ msgid "Type" msgstr "प्रकार" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "विश्वसनीय उपयोक्ता जोड़ना" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "विश्वसनीय उपयोक्ता हटाना" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "विश्वसनीय उपयोक्ता हटाना (अघोषित निष्क्रियता)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -198,10 +198,9 @@ msgstr "मेरे द्वारा सह-अनुरक्षित प #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "AUR में स्वागत है! अधिक जानकारी हेतु %sAUR उपयोक्ता%s व %sAUR विश्वसनीय उपयोक्ता%s दिशा-निर्देश पढ़ें।" #: html/home.php #, php-format @@ -215,8 +214,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "अपने पसंदीदा पैकेज हेतु मतदान अवश्य करें!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "[extra] के कुछ पैकेज बाइनरी फाइल के रूप में उपलब्ध हो सकते हैं।" +msgid "Some packages may be provided as binaries in [community]." +msgstr "[community] के कुछ पैकेज बाइनरी फाइल के रूप में उपलब्ध हो सकते हैं।" #: html/home.php msgid "DISCLAIMER" @@ -265,8 +264,8 @@ msgstr "पैकेज हटाने हेतु अनुरोध" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "आर्च उपयोक्ता पैकेज-संग्रह से पैकेज हटाने हेतु अनुरोध। कृपया पैकेज उपयोग संबंधी समस्या होने पर इसका उपयोग न करें। उचित होगा कि पैकेज अनुरक्षक से संपर्क करें व आवश्यकता हो तो निरर्थक पैकेज हेतु अनुरोध करें।" #: html/home.php msgid "Merge Request" @@ -308,11 +307,10 @@ msgstr "चर्चा" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "आर्च उपयोक्ता पैकेज-संग्रह (AUR) व विश्वसनीय उपयोक्ता संरचना संबंधी सामान्य चर्चा %saur-general%s पर होती है। AUR वेब अंतरफलक के विकास संबंधी चर्चा हेतु %saur-dev%s ईमेल-सूची उपयोग करें।" #: html/home.php msgid "Bug Reporting" @@ -323,9 +321,9 @@ msgstr "समस्या हेतु रिपोर्ट" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "AUR वेब अंतरफलक में समस्या होने पर कृपया हमारे %sसमस्या ट्रैकर%s पर समस्या रिपोर्ट दर्ज करें। ट्रैकर का उपयोग %sकेवल%s AUR वेब अंतरफलक संबंधी समस्याओं के लिए ही करें। पैकेज समस्याओं हेतु पैकेज अनुरक्षक से संपर्क करें या उपयुक्त पैकेज के पृष्ठ पर टिप्पणी करें।" #: html/home.php msgid "Package Search" @@ -525,8 +523,8 @@ msgid "Delete" msgstr "हटाएँ" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "केवल विश्वसनीय उपयोक्ता व व सॉफ्टवेयर विकासकर्ता ही पैकेज हटा सकते हैं।" #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -566,8 +564,8 @@ msgid "Disown" msgstr "स्वामित्व निरस्त करें" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "केवल विश्वसनीय उपयोक्ता व व सॉफ्टवेयर विकासकर्ता ही पैकेज स्वामित्व निरस्त कर सकते हैं।" #: html/pkgflagcomment.php msgid "Flag Comment" @@ -656,8 +654,8 @@ msgid "Merge" msgstr "विलय करें" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "केवल विश्वसनीय उपयोक्ता व व सॉफ्टवेयर विकासकर्ता ही पैकेज विलय कर सकते हैं।" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -714,8 +712,8 @@ msgid "I accept the terms and conditions above." msgstr "मैं ऊपर दिए गए नियम व शर्तों को स्वीकारता हूँ।" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "विश्वसनीय उपयोक्ता" #: html/tu.php msgid "Could not retrieve proposal details." @@ -726,8 +724,8 @@ msgid "Voting is closed for this proposal." msgstr "इस प्रस्ताव हेतु वोट प्रक्रिया बंद है।" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "केवल विश्वसनीय उपयोक्ता ही मतदान कर सकते हैं।" #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -899,7 +897,7 @@ msgstr "अनुचित उपयोक्ता नाम या कूट #: lib/acctfuncs.inc.php msgid "An error occurred trying to generate a user session." -msgstr "उपयोक्ता सत्र बनाने समय त्रुटि हुई।" +msgstr "उपयोक्ता सत्र बनाने हेतु त्रुटि।" #: lib/acctfuncs.inc.php msgid "Invalid e-mail and reset key combination." @@ -1222,8 +1220,8 @@ msgstr "सॉफ्टवेयर विकासकर्ता" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "विश्वसनीय उपयोक्ता व सॉफ्टवेयर विकासकर्ता" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1325,6 +1323,10 @@ msgstr "लॉगिन हेतु प्रयुक्त नाम ही msgid "Normal user" msgstr "सामान्य उपयोक्ता" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "विश्वसनीय उपयोक्ता" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "निलंबित अकाउंट" @@ -1397,15 +1399,6 @@ msgid "" " the Arch User Repository." msgstr "निम्नलिखित जानकारी केवल आर्च उपयोक्ता पैकेज-संग्रह में पैकेज निवेदन करने हेतु ही आवश्यक है।" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "सार्वजनिक एसएसएच कुंजी" @@ -1829,26 +1822,26 @@ msgstr "इसमें विलय करें" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "हटाने हेतु अनुरोध से अभिप्राय है विश्वसनीय उपयोक्ता को पैकेज बेस हटाने हेतु निवेदन। यह प्रतिरूपित प्रोग्राम, स्रोत द्वारा त्यागे गए सॉफ्टवेयर के साथ ही अवैध व समाधान विहीन समस्यात्मक पैकेज हेतु उचित होता है।" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "विलय अनुरोध से अभिप्राय है विश्वसनीय उपयोक्ता को पैकेज बेस हटाकर मत व टिप्पणियाँ अन्य पैकेज बेस में अंतरण हेतु निवेदन। पैकेज बेस हटाने से संबंधित पैकेज-संग्रह प्रभावित नहीं होते हैं। सुनिश्चित करें कि आप लक्षित पैकेज का Git वृतांत स्वयं अपडेट करें।" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "निरर्थक पैकेज अनुरोध से अभिप्राय है विश्वसनीय उपयोक्ता को पैकेज स्वामित्व निरस्त करने हेतु निवेदन। अनुरक्षक कार्य अनिवार्यता, अनुरक्षक की अघोषित अनुपस्थिति और स्वयं अनुरक्षक से संपर्क हेतु प्रयास होने पर ही कृपया ऐसा करें।" #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2101,8 +2094,8 @@ msgid "Registered Users" msgstr "पंजीकृत उपयोक्ता" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "विश्वसनीय उपयोक्ता" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2287,8 +2280,8 @@ msgstr "{user} [1] द्वारा {pkgbase} [2] हटाया गया। #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "विश्वसनीय उपयोक्ता मतदान सूचक : प्रस्ताव {id}" #: scripts/notify.py #, python-brace-format @@ -2315,61 +2308,29 @@ msgstr "%s स्वीकारनें हेतु कोई निरर् #: aurweb/asgi.py msgid "Internal Server Error" -msgstr "आंतरिक सर्वर त्रुटि" +msgstr "" #: templates/errors/500.html msgid "A fatal error has occurred." -msgstr "गंभीर त्रुटि हुई।" +msgstr "" #: templates/errors/500.html msgid "" "Details have been logged and will be reviewed by the postmaster posthaste. " "We apologize for any inconvenience this may have caused." -msgstr "संबंधित सूचना लॉग फाइल में दर्ज की जा चुकी है एवं अतिशीघ्र ही पोस्ट प्रबंधक द्वारा उसकी समीक्षा की जाएगी। इस कारण हुई किसी भी प्रकार की असुविधा हेतु खेद है।" +msgstr "" #: aurweb/scripts/notify.py msgid "AUR Server Error" -msgstr "AUR सर्वर त्रुटि" +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "पैकेज अनुरोध समापन संबंधी टिप्पणियाँ..." +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "इस कार्य द्वारा संबंधित सभी लंबित पैकेज अनुरोध बंद हो जाएँगे। %sटिप्पणियाँ%s न होने की स्थिति में एक समापन टिप्पणी का स्वतः ही सृजन होगा।" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." msgstr "" diff --git a/po/hr.po b/po/hr.po index 931d6fa5..4932bd7e 100644 --- a/po/hr.po +++ b/po/hr.po @@ -7,11 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Lukas Fleischer , 2011\n" -"Language-Team: Croatian (http://app.transifex.com/lfleischer/aurweb/language/hr/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Croatian (http://www.transifex.com/lfleischer/aurweb/language/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -132,15 +132,15 @@ msgid "Type" msgstr "Tip" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -198,9 +198,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -215,7 +214,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -265,7 +264,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -308,10 +307,9 @@ msgstr "Rasprava" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -323,8 +321,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -525,7 +523,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -566,7 +564,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -656,7 +654,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -714,8 +712,8 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Pouzdan korisnik" #: html/tu.php msgid "Could not retrieve proposal details." @@ -726,7 +724,7 @@ msgid "Voting is closed for this proposal." msgstr "Glasanje je zaključeno za ovaj prijedlog" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1222,7 +1220,7 @@ msgstr "Developer" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1325,6 +1323,10 @@ msgstr "" msgid "Normal user" msgstr "Običan korisnik" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Pouzdan korisnik" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Račun je suspendiran" @@ -1397,15 +1399,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1830,22 +1823,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2106,7 +2099,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2292,7 +2285,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2346,35 +2339,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/hu.po b/po/hu.po index 8745b58f..51894457 100644 --- a/po/hu.po +++ b/po/hu.po @@ -11,11 +11,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: PB, 2020\n" -"Language-Team: Hungarian (http://app.transifex.com/lfleischer/aurweb/language/hu/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Hungarian (http://www.transifex.com/lfleischer/aurweb/language/hu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -136,16 +136,16 @@ msgid "Type" msgstr "Típus" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "TU hozzáadása" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "TU eltávolítása" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "TU eltávolítása (be nem jelentett inaktivitás)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -202,10 +202,9 @@ msgstr "Csomagok keresése, amelyeknek társkarbantartója vagyok" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Üdvözlünk az AUR-ban! További információért olvasd el az %sAUR felhasználói irányelveket%s és az %sAUR TU irányelveket%s." #: html/home.php #, php-format @@ -219,8 +218,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Ne felejts el szavazni kedvenc csomagjaidra!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Néhány csomagot lehet, hogy a [extra] binárisként szolgáltat." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Néhány csomagot lehet, hogy a [community] binárisként szolgáltat." #: html/home.php msgid "DISCLAIMER" @@ -269,8 +268,8 @@ msgstr "Törlési kérelem" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Egy csomag Arch User Repositoriból való törlésének kérése. Kérünk, ne használd ezt, ha a csomag törött, és könnyen javítható. Ehelyett vedd fel a kapcsolatot a csomag karbantartójával, és tölts ki megtagadási kérelmet, ha szükséges." #: html/home.php msgid "Merge Request" @@ -312,11 +311,10 @@ msgstr "Megbeszélés" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Az Arch User Repositoryval (AUR) és a Trusted User struktúrával kapcsolatos általános tanácskozás helye az %saur-general%s. Az AUR webes felületének fejlesztésével kapcsolatos tanácskozáshoz az %saur-dev%s levelezőlista használandó." #: html/home.php msgid "Bug Reporting" @@ -327,9 +325,9 @@ msgstr "Hibajelentés" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Ha találsz egy hibát az AUR webes felületén, kérünk, tölts ki egy hibajelentést a %shibakövetőnkben%s. A hibakövetőt %scsak%s az AUR webes felületén található hibák jelentésére használd. Csomagolási hibák jelentéséhez lépj kapcsolatba a csomag fenntartójával, vagy hagyj egy hozzászólást a megfelelő csomag oldalán." #: html/home.php msgid "Package Search" @@ -529,8 +527,8 @@ msgid "Delete" msgstr "Törlés" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Csak megbízható felhasználók és fejlesztők tudnak csomagokat törölni." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -570,8 +568,8 @@ msgid "Disown" msgstr "Megtagadás" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Csak megbízható felhasználók és fejlesztők tudnak megtagadni csomagokat." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -660,8 +658,8 @@ msgid "Merge" msgstr "Beolvasztás" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Csak megbízható felhasználók és fejlesztők tudnak csomagokat beolvasztani." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -718,8 +716,8 @@ msgid "I accept the terms and conditions above." msgstr "Elfogadom a feljebb megadott feltételeket." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Megbízható felhasználó" #: html/tu.php msgid "Could not retrieve proposal details." @@ -730,8 +728,8 @@ msgid "Voting is closed for this proposal." msgstr "A szavazás lezárult erre az indítványra." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "A szavazás csak megbízható felhasználóknak engedélyezett." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1226,8 +1224,8 @@ msgstr "Fejlesztő" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Megbízható felhasználó és fejlesztő" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1329,6 +1327,10 @@ msgstr "A felhasználóneved a bejelentkezéshez használt név lesz. Látható msgid "Normal user" msgstr "Normál felhasználó" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Megbízható felhasználó" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Felhasználói fiók felfüggesztve" @@ -1401,15 +1403,6 @@ msgid "" " the Arch User Repository." msgstr "Az alábbi információ csak akkor szükséges, ha csomagokat szeretnél beküldeni az Arch User Repositoryba." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Nyilvános SSH kulcs" @@ -1833,26 +1826,26 @@ msgstr "Beolvasztás ebbe:" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Törlési kérelem beküldésével megkérsz egy megbízható felhasználót, hogy törölje az alapcsomagot. Ez a típusú kérelem duplikátumok, főági fejlesztők által felhagyott szoftverek, valamint illegális és helyrehozhatatlanul elromlott csomagok esetén használható." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Beolvasztási kérelem beküldésével megkérsz egy megbízható felhasználót, hogy törölje az alapcsomagot, és vigye át a szavazatait és hozzászólásait egy másik alapcsomaghoz. Egy csomag egyesítése nem érinti a kapcsolódó Git tárolókat. Győződj meg róla, hogy frissítetted magadnak a célcsomag Git történetét." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Megtagadási kérelem beküldésével megkérsz egy megbízható felhasználót, hogy tegye árvává az alapcsomagot. Kérünk, hogy ezt csak akkor tedd, ha a csomag igényel fenntartói műveletet, a fenntartó eltűnt, és előzőleg már megpróbáltad felvenni a kapcsolatot a fenntartóval." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2105,8 +2098,8 @@ msgid "Registered Users" msgstr "Regisztrált felhasználók" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Megbízható felhasználók" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2291,8 +2284,8 @@ msgstr "{user} [1] törölte a(z) {pkgbase} [2] csomagt.\n\nTöbbé nem fogsz é #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "Szavazás megbízható felhasználóról: javaslat {id}" #: scripts/notify.py #, python-brace-format @@ -2345,35 +2338,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/id.po b/po/id.po index 62650942..75a6c98b 100644 --- a/po/id.po +++ b/po/id.po @@ -8,11 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: se7entime , 2016\n" -"Language-Team: Indonesian (http://app.transifex.com/lfleischer/aurweb/language/id/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Indonesian (http://www.transifex.com/lfleischer/aurweb/language/id/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -133,16 +133,16 @@ msgid "Type" msgstr "Tipe" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Tambahan dari TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Penghapusan dari TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Penghapusan dari TU (tanpa aktifitas yang tidak dideklarasikan)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -199,10 +199,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Selamat datang di AUR! Harap baca %sPedoman Pengguna AUR%s dan %sPedoman TU AUR%s untuk info lebih lanjut." #: html/home.php #, php-format @@ -216,7 +215,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "Ingat untuk memberika suara untuk paket favorit anda!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "Beberapa paket mungkin disediakan sebagai binabinari di [comunity]." #: html/home.php @@ -266,7 +265,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -309,10 +308,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -324,8 +322,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -526,7 +524,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -567,7 +565,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -657,7 +655,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -715,7 +713,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -727,7 +725,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1223,7 +1221,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1326,6 +1324,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1398,15 +1400,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1829,22 +1822,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2097,7 +2090,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2283,7 +2276,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2337,35 +2330,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/id_ID.po b/po/id_ID.po index 4840ca1e..d01294c8 100644 --- a/po/id_ID.po +++ b/po/id_ID.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Indonesian (Indonesia) (http://app.transifex.com/lfleischer/aurweb/language/id_ID/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Indonesian (Indonesia) (http://www.transifex.com/lfleischer/aurweb/language/id_ID/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1827,22 +1820,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2095,7 +2088,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2281,7 +2274,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2335,35 +2328,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/is.po b/po/is.po index 0ec59559..a7a88b04 100644 --- a/po/is.po +++ b/po/is.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/lfleischer/aurweb/language/is/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Icelandic (http://www.transifex.com/lfleischer/aurweb/language/is/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1828,22 +1821,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2100,7 +2093,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2286,7 +2279,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2340,35 +2333,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/it.po b/po/it.po index bd145ea6..436b6459 100644 --- a/po/it.po +++ b/po/it.po @@ -4,24 +4,23 @@ # # Translators: # Fanfurlio Farolfi , 2021-2022 -# Giovanni Scafora , 2011-2015,2022 -# Giovanni Scafora , 2022-2023 +# Giovanni Scafora , 2011-2015 # Lorenzo Porta , 2014 # Lukas Fleischer , 2011 # mattia_b89 , 2019 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Giovanni Scafora , 2022-2023\n" -"Language-Team: Italian (http://app.transifex.com/lfleischer/aurweb/language/it/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Italian (http://www.transifex.com/lfleischer/aurweb/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: html/404.php msgid "Page Not Found" @@ -42,12 +41,12 @@ msgstr "Le URL per clonare un repository git non sono visualizzabili nel browser #: html/404.php #, php-format msgid "To clone the Git repository of %s, run %s." -msgstr "Per clonare il repository git di %s, esegui %s." +msgstr "Per clonare il reposiroty git di %s, esegui %s." #: html/404.php #, php-format msgid "Click %shere%s to return to the %s details page." -msgstr "Clicca %squi%s per ritornare alla pagina dei dettagli di %s." +msgstr "Clicca %squi%s per tornare alla pagina dei dettagli di %s." #: html/503.php msgid "Service Unavailable" @@ -80,7 +79,7 @@ msgstr "Non hai i permessi necessari per modificare questo account." #: html/account.php lib/acctfuncs.inc.php msgid "Invalid password." -msgstr "La password non è valida." +msgstr "Password non valida." #: html/account.php msgid "Use this form to search existing accounts." @@ -137,20 +136,20 @@ msgid "Type" msgstr "Tipo" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "Aggiunta di un manutentore del pacchetto" +msgid "Addition of a TU" +msgstr "Aggiunta di un TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "Rimozione di un manutentore del pacchetto" +msgid "Removal of a TU" +msgstr "Rimozione di un TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "Rimozione di un manutentore del pacchetto (inattività non dichiarata)" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Rimozione di un TU (inattività non dichiarata)" #: html/addvote.php msgid "Amendment of Bylaws" -msgstr "Modifica del regolamento" +msgstr "Modifica dello statuto" #: html/addvote.php template/tu_list.php msgid "Proposal" @@ -170,7 +169,7 @@ msgstr "Edita il commento" #: html/home.php template/header.php msgid "Dashboard" -msgstr "Pannello" +msgstr "Cruscotto" #: html/home.php template/header.php msgid "Home" @@ -203,10 +202,9 @@ msgstr "Cerca i pacchetti da me co-mantenuti" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "Benvenuti in AUR! Prima di inviare un PKGBUILD, per maggiori informazioni, leggete le %sAUR User Guidelines%s e le %sAUR Submission Guidelines%s." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Benvenuto in AUR! Per maggiori informazioni, leggi le %sAUR User Guidelines%s e le %sAUR TU Guidelines%s." #: html/home.php #, php-format @@ -220,8 +218,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Ricorda di votare i tuoi pacchetti preferiti!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Alcuni pacchetti potrebbero essere disponibili come precompilati in [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Alcuni pacchetti potrebbero essere disponibili come precompilati in [community]." #: html/home.php msgid "DISCLAIMER" @@ -270,8 +268,8 @@ msgstr "Richiesta di rimozione di un pacchetto" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "Richiesta di rimozione di un pacchetto dall'Arch User Repository. Non utilizzare questa procedura se un pacchetto non funziona e può essere sistemato facilmente. Contattare, invece, il manutentore e, se necessario, presentare una richiesta per abbandonarlo." +"the package maintainer and file orphan request if necessary." +msgstr "richiesta per rimuovere un pacchetto dall'Arch User Repository. Non usare questo tipo di richiesta se un pacchetto non funziona e se può essere sistemato facilmente. Contatta il manutentore del pacchetto e, se necessario, invia una richiesta per renderlo orfano." #: html/home.php msgid "Merge Request" @@ -313,11 +311,10 @@ msgstr "Discussione" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "La discussione generale sulla struttura dell'Arch User Repository (AUR) e dei manutentori dei pacchetti si svolge su %saur-general%s. Per le discussioni relative allo sviluppo dell'interfaccia web di AUR, utilizzare la lista di discussione %saur-dev%s." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "La discussione generale sull'Arch User Repository (AUR) e sulla struttura dei TU avviene in %saur-general%s. Per la discussione relativa allo sviluppo dell'interfaccia web di AUR, utilizza la lista di discussione %saur-dev%s." #: html/home.php msgid "Bug Reporting" @@ -328,9 +325,9 @@ msgstr "Segnalazione di un bug" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "Se si trova un bug nell'interfaccia web di AUR, si prega di compilare una segnalazione sul nostro %sbug tracker%s. Utilizzare il tracker %ssolo%s per segnalare bug nell'interfaccia web di AUR. Per segnalare bug relativi ai pacchetti, contattare il manutentore o lasciare un commento nella pagina del pacchetto." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Se trovi un bug nell'interfaccia web di AUR, invia un report al nostro %sbug tracker%s. Usa il tracker %ssolo%s per inviare i bug di AUR. Per segnalare bug inerenti alla pacchettizzazione, contatta il manutentore oppure lascia un commento nella pagina del pacchetto." #: html/home.php msgid "Package Search" @@ -462,7 +459,7 @@ msgstr "Continua" msgid "" "If you have forgotten the user name and the primary e-mail address you used " "to register, please send a message to the %saur-general%s mailing list." -msgstr "Se hai dimenticato il nome utente e l'indirizzo email primario che hai usato per la registrazione, invia un messaggio alla lista di discussione %saur-general%s." +msgstr "Se hai dimenticato il nome utente e l'indirizzo email primario che hai usato per la registrazione, invia un messaggio alla mailing list %saur-general%s." #: html/passreset.php msgid "Enter your user name or your primary e-mail address:" @@ -530,8 +527,8 @@ msgid "Delete" msgstr "Elimina" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "Solo i manutentori del pacchetto e gli sviluppatori possono eliminare i pacchetti." +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Solo i TU e gli sviluppatori possono eliminare i pacchetti." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -571,12 +568,12 @@ msgid "Disown" msgstr "Abbandona" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "Solo i manutentori e gli sviluppatori possono abbandonare un pacchetto." +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Solo i TU e gli sviluppatori possono abbandonare i pacchetti." #: html/pkgflagcomment.php msgid "Flag Comment" -msgstr "Segnala il commento" +msgstr "Segnala Commento" #: html/pkgflag.php msgid "Flag Package Out-Of-Date" @@ -588,7 +585,7 @@ msgid "" " package version in the AUR does not match the most recent commit. Flagging " "this package should only be done if the sources moved or changes in the " "PKGBUILD are required because of recent upstream changes." -msgstr "Sembra un pacchetto VCS. Fai %snon%s segnalarlo come non aggiornato, se la versione in AUR non corrisponde con il commit più recente. Questo pacchetto dovrebbe essere segnalato solo se i sorgenti vengono spostati o se sono necessarie delle modifiche al PKGBUILD a causa delle recenti modifiche al sorgente." +msgstr "Questo appare essere un pacchetto da VCS. Per favore %snon%s marcarlo come non aggiornato se la versione in AUR non corrisponde con il commit più recente, Questo pacchetto dovrebbe essere marcato solo se i sorgenti sono stati spostati o se sono necessari dei cambiamenti al PKGBUILD a causa delle recenti modifiche al sorgente." #: html/pkgflag.php #, php-format @@ -661,8 +658,8 @@ msgid "Merge" msgstr "Unisci" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "Solo i manutentori del pacchetto e gli sviluppatori possono unire i pacchetti." +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Solo i TU e gli sviluppatori possono unire i pacchetti." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -702,12 +699,12 @@ msgstr "Usa questo modulo per creare un account." #: html/tos.php msgid "Terms of Service" -msgstr "Termini di servizio" +msgstr "Termini del Servizio" #: html/tos.php msgid "" "The following documents have been updated. Please review them carefully:" -msgstr "I seguenti documenti sono stati aggiornati. Riesaminali attentamente:" +msgstr "I seguenti documenti sono stati aggiornati. Per favore riesaminali correttamente:" #: html/tos.php #, php-format @@ -719,8 +716,8 @@ msgid "I accept the terms and conditions above." msgstr "Io accetto i termini e le condizioni di cui sopra." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "Manutentore del pacchetto" +msgid "Trusted User" +msgstr "TU" #: html/tu.php msgid "Could not retrieve proposal details." @@ -731,8 +728,8 @@ msgid "Voting is closed for this proposal." msgstr "Non puoi più votare per questa proposta." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "Possono votare solo i manutentori del pacchetto." +msgid "Only Trusted Users are allowed to vote." +msgstr "Solo i TU possono votare." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -787,7 +784,7 @@ msgstr "Può contenere solo un punto, un trattino basso o un trattino." #: lib/acctfuncs.inc.php msgid "Please confirm your new password." -msgstr "Conferma la tua nuova password." +msgstr "Per favore conferma la tua nuova password." #: lib/acctfuncs.inc.php msgid "The email address is invalid." @@ -799,7 +796,7 @@ msgstr "L'indirizzo email di scorta non è valido." #: lib/acctfuncs.inc.php msgid "The home page is invalid, please specify the full HTTP(s) URL." -msgstr "La homepage non è valida, specifica l'URL HTTP(s) completo." +msgstr "La homepage non è valida, per favore specificare l'URL HTTP(s) completo." #: lib/acctfuncs.inc.php msgid "The PGP key fingerprint is invalid." @@ -819,7 +816,7 @@ msgstr "Lingua attualmente non supportata." #: lib/acctfuncs.inc.php msgid "Timezone is not currently supported." -msgstr "Il fuso orario non è attualmente supportato." +msgstr "Fuso orario non attualmente supportato." #: lib/acctfuncs.inc.php #, php-format @@ -838,15 +835,15 @@ msgstr "La chiave pubblica SSH %s%s%s, è già in uso." #: lib/acctfuncs.inc.php msgid "The CAPTCHA is missing." -msgstr "Manca il CAPTCHA." +msgstr "Manca la risposta CAPTCHA." #: lib/acctfuncs.inc.php msgid "This CAPTCHA has expired. Please try again." -msgstr "Il CAPTCHA è scaduto. Riprova." +msgstr "Il CAPTCHA è scaduto, Per favore riprova." #: lib/acctfuncs.inc.php msgid "The entered CAPTCHA answer is invalid." -msgstr "Il CAPTCHA inserito non è valido." +msgstr "La risposta CAPTCHA inserita non è valida." #: lib/acctfuncs.inc.php #, php-format @@ -888,7 +885,7 @@ msgstr "Account sospeso" #: aurweb/routers/accounts.py msgid "You do not have permission to suspend accounts." -msgstr "Non hai il permesso per sospendere gli account." +msgstr "Non hai il permesso per sospendere account." #: lib/acctfuncs.inc.php #, php-format @@ -949,7 +946,7 @@ msgstr "Manca l'ID del commento." #: lib/pkgbasefuncs.inc.php msgid "No more than 5 comments can be pinned." -msgstr "Non possono essere evidenziati più di 5 commenti." +msgstr "Non possono essere inseriti più di 5 commenti." #: lib/pkgbasefuncs.inc.php msgid "You are not allowed to pin this comment." @@ -961,11 +958,11 @@ msgstr "Non sei autorizzato a rimuovere questo commento." #: lib/pkgbasefuncs.inc.php msgid "Comment has been pinned." -msgstr "Il commento è ora in evidenza." +msgstr "Il commento è stato rimosso." #: lib/pkgbasefuncs.inc.php msgid "Comment has been unpinned." -msgstr "I commenti non sono più in evidenza." +msgstr "I commenti sono stati rimossi." #: lib/pkgbasefuncs.inc.php lib/pkgfuncs.inc.php msgid "Error retrieving package details." @@ -1227,8 +1224,8 @@ msgstr "Sviluppatore" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "Manutentore del pacchetto e sviluppatore" +msgid "Trusted User & Developer" +msgstr "TU e sviluppatore" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1299,7 +1296,7 @@ msgstr "Modifica l'account di quest'utente" #: template/account_details.php msgid "List this user's comments" -msgstr "Elenca i commenti di questo utente" +msgstr "Elenca i commenti di quest'utente" #: template/account_edit_form.php #, php-format @@ -1309,7 +1306,7 @@ msgstr "Clicca %squi%s se vuoi eliminare definitivamente questo account." #: template/account_edit_form.php #, php-format msgid "Click %shere%s for user details." -msgstr "Click %squì%s per visualizzare i dettagli dell'utente." +msgstr "Click %squì%s per il dettagli dell'utente." #: template/account_edit_form.php #, php-format @@ -1330,6 +1327,10 @@ msgstr "Il tuo nome utente è il nome che userai per l'accesso. È visibile al p msgid "Normal user" msgstr "Utente normale" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "TU" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Account sospeso" @@ -1363,7 +1364,7 @@ msgstr "Indirizzo email di scorta" msgid "" "Optionally provide a secondary email address that can be used to restore " "your account in case you lose access to your primary email address." -msgstr "Puoi fornire un secondo indirizzo email che potrà essere usato per ripristinare il tuo account, nel caso tu perdessi l'accesso al tuo indirizzo email primario." +msgstr "Puoi fornire un secondo indirizzo email che potrà essere usato per ripristinare il tuo account, nel caso tu perda l'accesso al tuo indirizzo email primario." #: template/account_edit_form.php msgid "" @@ -1390,7 +1391,7 @@ msgstr "Fuso orario" msgid "" "If you want to change the password, enter a new password and confirm the new" " password by entering it again." -msgstr "Se vuoi cambiare la tua password, inseriscine una nuova e confermala digitandola di nuovo." +msgstr "Se vuoi cambiare la tua password, inseriscine una nuova e confermala inserendola di nuovo." #: template/account_edit_form.php msgid "Re-type password" @@ -1402,22 +1403,13 @@ msgid "" " the Arch User Repository." msgstr "La seguente informazione è richiesta solo se vuoi inviare i pacchetti nell'Arch User Repository." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "Specifica più chiavi SSH separate da una nuova riga, le linee vuote saranno ignorate." - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "Nascondi commenti eliminati" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Chiave pubblica SSH" #: template/account_edit_form.php msgid "Notification settings" -msgstr "Impostazioni delle notifiche" +msgstr "Impostazioni notifiche" #: template/account_edit_form.php msgid "Notify of new comments" @@ -1429,11 +1421,11 @@ msgstr "Notifica degli aggiornamenti dei pacchetti" #: template/account_edit_form.php msgid "Notify of ownership changes" -msgstr "Notifica dei cambiamenti di proprietà" +msgstr "Notifica cambiamenti di proprietà" #: template/account_edit_form.php msgid "To confirm the profile changes, please enter your current password:" -msgstr "Per confermare le modifiche al profilo, inserisci la tua password:" +msgstr "Per confermare le modifiche al profilo, per favore inserisci la tua password:" #: template/account_edit_form.php msgid "Your current password" @@ -1507,7 +1499,7 @@ msgstr "Salva" #: template/flag_comment.php #, php-format msgid "Flagged Out-of-Date Comment: %s" -msgstr "Commento per la segnalazione come Non Aggiornato: %s" +msgstr "Commento per la marcatura come Non Aggiornato: %s" #: template/flag_comment.php #, php-format @@ -1521,7 +1513,7 @@ msgstr "%s%s%s non è segnalato come non aggiornato." #: template/flag_comment.php msgid "Return to Details" -msgstr "Ritorna ai dettagli" +msgstr "Ritorna ai Dettagli" #: template/footer.php #, php-format @@ -1591,7 +1583,6 @@ msgid "%d pending request" msgid_plural "%d pending requests" msgstr[0] "%d richiesta in attesa" msgstr[1] "%d richieste in attesa" -msgstr[2] "%d richieste in attesa" #: template/pkgbase_actions.php msgid "Adopt Package" @@ -1663,7 +1654,7 @@ msgstr "Aggiungi un commento" msgid "" "Git commit identifiers referencing commits in the AUR package repository and" " URLs are converted to links automatically." -msgstr "Gli identificatori dei commit Git nel repository dei pacchetti AUR e le URL vengono convertiti automaticamente in link." +msgstr "Gli identificatori dei commit Git nel repository dei pacchetti AUR e le URL vengono convertite automaticamente in link." #: template/pkg_comment_form.php #, php-format @@ -1672,7 +1663,7 @@ msgstr "La %ssintassi Markdown%s è parzialmente supportata." #: template/pkg_comments.php msgid "Pinned Comments" -msgstr "Commenti in evidenza" +msgstr "Elimina i commenti" #: template/pkg_comments.php msgid "Latest Comments" @@ -1685,7 +1676,7 @@ msgstr "Commenti per" #: template/pkg_comments.php #, php-format msgid "%s commented on %s" -msgstr "%s ha commentato il %s" +msgstr "%s ha commentato su %s" #: template/pkg_comments.php #, php-format @@ -1695,27 +1686,27 @@ msgstr "Commento anonimo su %s" #: template/pkg_comments.php #, php-format msgid "Commented on package %s on %s" -msgstr "Ha commentato sul pacchetto %s il %s" +msgstr "Ha commentato sul pacchetto %s su %s" #: template/pkg_comments.php #, php-format msgid "deleted on %s by %s" -msgstr "eliminato il %s da %s" +msgstr "Eliminato su %s da %s" #: template/pkg_comments.php #, php-format msgid "deleted on %s" -msgstr "eliminato il %s" +msgstr "cancellato su %s" #: template/pkg_comments.php #, php-format msgid "edited on %s by %s" -msgstr "modificato il %s da %s" +msgstr "modificato su %s da %s" #: template/pkg_comments.php #, php-format msgid "edited on %s" -msgstr "modificato il %s" +msgstr "modificato su %s" #: template/pkg_comments.php msgid "Undelete comment" @@ -1835,26 +1826,26 @@ msgstr "Unisci con" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "Inviando una richiesta di cancellazione, si chiede al manutentore del pacchetto di eliminare la base del pacchetto. Questo tipo di richiesta dovrebbe essere usata per i duplicati, per il software abbandonato dall'upstream, per i pacchetti illegali e per quelli non più funzionanti." +msgstr "Inserendo una richiesta di cancellazione, stai chiedendo ad un Trusted User di cancellare il pacchetto base. Questo tipo di richiesta dovrebbe essere usato per duplicati, software abbandonati dall'autore, sotware illegalmente distribuiti o pacchetti irreparabili." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "Inviando una richiesta di unione, si chiede al manutentore di eliminare un pacchetto e di trasferire i suoi voti ed i commenti ad un altro pacchetto. L'unione di un pacchetto non influisce sui repository Git corrispondenti. Assicuratevi di aggiornare voi stessi la cronologia Git del pacchetto di destinazione." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Inserendo una richiesta di unione, stai chiedendo ad un Trusted User di cancellare il pacchetto base e trasferire i suoi voti e commenti su un altro pacchetto base. Unire due pacchetti non ha effetto sul corrispondente repository Git. Assicurati di aggiornare lo storico Git del pacchetto di destinazione." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "Inviando una richiesta di abbandono di un pacchetto, si chiede ad un manutentore di abbandonarlo. Si prega di farlo solo se il pacchetto necessita di un intervento del manutentore, se il manutentore è irreperibile e se si è già provato a contattarlo in precedenza." +msgstr "Inserendo una richiesta di abbandono, stai chiedendo ad un Trusted User di rimuovere la proprietà del pacchetto base. Per favore procedi soltanto se il pacchetto necessita di manutenzione, il manutentore attuale non risponde, e hai già provato a contattarlo precedentemente." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -1866,7 +1857,6 @@ msgid "%d package request found." msgid_plural "%d package requests found." msgstr[0] "È stato trovato %d pacchetto." msgstr[1] "Sono stati trovati %d pacchetti." -msgstr[2] "Sono stati trovati %d pacchetti." #: template/pkgreq_results.php template/pkg_search_results.php #, php-format @@ -1891,7 +1881,6 @@ msgid "~%d day left" msgid_plural "~%d days left" msgstr[0] "~%d giorno rimanente" msgstr[1] "~%d giorni rimanenti" -msgstr[2] "~%d giorni rimanenti" #: template/pkgreq_results.php #, php-format @@ -1899,7 +1888,6 @@ msgid "~%d hour left" msgid_plural "~%d hours left" msgstr[0] "~%d ora rimanente" msgstr[1] "~%d ore rimanenti" -msgstr[2] "~%d ore rimanenti" #: template/pkgreq_results.php msgid "<1 hour left" @@ -2028,7 +2016,6 @@ msgid "%d package found." msgid_plural "%d packages found." msgstr[0] "È stato trovato %d pacchetto." msgstr[1] "Sono stati trovati %d pacchetti." -msgstr[2] "Sono stati trovati %d pacchetti." #: template/pkg_search_results.php msgid "Version" @@ -2039,7 +2026,7 @@ msgstr "Versione" msgid "" "Popularity is calculated as the sum of all votes with each vote being " "weighted with a factor of %.2f per day since its creation." -msgstr "La popolarità è calcolata come somma di tutti i voti ponderati con un fattore di %.2f al giorno dalla sua creazione." +msgstr "La popolarità è calcolata come somma di tutti i voti pesati con un fattore di %.2f al giorno, dalla sua creazione." #: template/pkg_search_results.php template/tu_details.php #: template/tu_list.php @@ -2111,8 +2098,8 @@ msgid "Registered Users" msgstr "Utenti registrati" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "Manutentori del pacchetto" +msgid "Trusted Users" +msgstr "TU" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2185,7 +2172,7 @@ msgstr "Precedente" #: scripts/notify.py msgid "AUR Password Reset" -msgstr "Ripristino della password di AUR" +msgstr "Ripristino Password di AUR" #: scripts/notify.py #, python-brace-format @@ -2193,18 +2180,18 @@ msgid "" "A password reset request was submitted for the account {user} associated " "with your email address. If you wish to reset your password follow the link " "[1] below, otherwise ignore this message and nothing will happen." -msgstr "È stata inviata una richiesta per ripristinare la password dell'account {user} associato al tuo indirizzo email. Se desideri ripristinare la tua password, clicca sul link [1] sottostante, altrimenti ignora questo messaggio e non succederà nulla." +msgstr "È stata inviata una richiesta per ripristinare la password dell'account {user} associato al tuo indirizzo e-mail. Se desideri ripristinare la tua password, clicca sul link [1] sottostante, altrimenti ignora questo messaggio e non succederà nulla." #: scripts/notify.py msgid "Welcome to the Arch User Repository" -msgstr "Benvenuto nell' Arch User Repository" +msgstr "Benvenuto nel Arch User Repository" #: scripts/notify.py msgid "" "Welcome to the Arch User Repository! In order to set an initial password for" " your new account, please click the link [1] below. If the link does not " "work, try copying and pasting it into your browser." -msgstr "Benvenuto nell' Arch User Repository! Per impostare una password iniziale per il tuo nuovo account, clicca sul link [1] sottostante. Se il link non funzionasse, prova a copiarlo e ad incollarlo nella barra degli indirizzi del tuo browser." +msgstr "Benvenuto nel Arch User Repository! Per impostare una password iniziale per il tuo nuovo account, per favore segui il collegamento [1] sottostante. Se il collegamento non funziona, prova a copiarlo e incollarlo nel tuo browser." #: scripts/notify.py #, python-brace-format @@ -2221,12 +2208,12 @@ msgstr "{user} [1] ha commentato su {pkgbase} [2]:" msgid "" "If you no longer wish to receive notifications about this package, please go" " to the package page [2] and select \"{label}\"." -msgstr "Se non vuoi più ricevere notifiche su questo pacchetto, vai alla pagina del pacchetto [2] e seleziona \"{label}\"." +msgstr "Se non vuoi più ricevere notifiche su questo pacchetto, per favore vai alla pagina del pacchetto [2] e seleziona \"{label}\"." #: scripts/notify.py #, python-brace-format msgid "AUR Package Update: {pkgbase}" -msgstr "Aggiornamento del pacchetto base: {pkgbase}" +msgstr "Aggiornamento pachetto base: {pkgbase}" #: scripts/notify.py #, python-brace-format @@ -2236,7 +2223,7 @@ msgstr "{user} [1] ha inviato un nuovo commit su {pkgbase} [2]." #: scripts/notify.py #, python-brace-format msgid "AUR Out-of-date Notification for {pkgbase}" -msgstr "Notifica AUR per il pacchetto {pkgbase} non aggiornato" +msgstr "Notifica AUR per pacchetto {pkgbase} non aggiornato" #: scripts/notify.py #, python-brace-format @@ -2246,7 +2233,7 @@ msgstr "Il tuo pacchetto {pkgbase} [1] è stato marcato come non aggiornato dall #: scripts/notify.py #, python-brace-format msgid "AUR Ownership Notification for {pkgbase}" -msgstr "Notifica AUR di proprietà del pacchetto {pkgbase} " +msgstr "Notifica AUR di proprietà per pacchetto {pkgbase} " #: scripts/notify.py #, python-brace-format @@ -2261,7 +2248,7 @@ msgstr "Il pacchetto {pkgbase} [1] è stato abbandonato da {user} [2]." #: scripts/notify.py #, python-brace-format msgid "AUR Co-Maintainer Notification for {pkgbase}" -msgstr "Notifica AUR di co-manutenzione per il pacchetto {pkgbase} " +msgstr "Notifica AUR di co-manutenzione per pacchetto {pkgbase} " #: scripts/notify.py #, python-brace-format @@ -2285,7 +2272,7 @@ msgid "" "\n" "-- \n" "If you no longer wish receive notifications about the new package, please go to [3] and click \"{label}\"." -msgstr "{user} [1] ha unito {old} [2] in {new} [3].\n\n-- \nSe non desideri più ricevere notifiche sul nuovo pacchetto, vai a [3] e clicca su \"{label}\"." +msgstr "{user} [1] ha unito {old} [2] in {new} [3].\n\n-- \nSe non vuoi più ricevere notifiche sul nuovo pacchetto, per favore vai a [3] e clicca su \"{label}\"." #: scripts/notify.py #, python-brace-format @@ -2293,31 +2280,31 @@ msgid "" "{user} [1] deleted {pkgbase} [2].\n" "\n" "You will no longer receive notifications about this package." -msgstr "{user} [1] ha eliminato {pkgbase} [2].\n\nNon riceverai più notifiche per questo pacchetto." +msgstr "{user} [1] ha eliminato {pkgbase} [2].\n\nNon riceverai più notifiche su questo pacchetto." #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "Promemoria per il voto del manutentore dei pacchetti: proposta {id}" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "Promemoria per voto TU: Proposta {id}" #: scripts/notify.py #, python-brace-format msgid "" "Please remember to cast your vote on proposal {id} [1]. The voting period " "ends in less than 48 hours." -msgstr "Ricordati di votare la proposta di {id} [1]. La finestra di voto si chiude fra meno di 48 ore." +msgstr "Per favore ricordati di votare sulla proposta {id} [1]. La finestra di voto si chiude fra meno di 48 ore." #: aurweb/routers/accounts.py msgid "Invalid account type provided." -msgstr "L' account fornito non è valido." +msgstr "Tipo di account non valido." #: aurweb/routers/accounts.py msgid "You do not have permission to change account types." -msgstr "Non hai il permesso per modificare il tipo di account." +msgstr "Non hai il permesso per cambiare il tipo di account." #: aurweb/routers/accounts.py msgid "You do not have permission to change this user's account type to %s." -msgstr "Non hai il permesso per modificare il tipo di account di questo utente in %s." +msgstr "Non hai il permesso per cambiare il tipo di account di questo utente in %s." #: aurweb/packages/requests.py msgid "No due existing orphan requests to accept for %s." @@ -2335,51 +2322,19 @@ msgstr "Si è verificato un errore irreversibile." msgid "" "Details have been logged and will be reviewed by the postmaster posthaste. " "We apologize for any inconvenience this may have caused." -msgstr "I dettagli sono stati registrati e verranno visionati al più presto dal postmaster. Ci scusiamo per gli eventuali disagi causati." +msgstr "I dettagli sono stati registrati e verranno visionati da postmaster velocemente. Ci scusiamo per l'inconvenienza che questo possa aver causato." #: aurweb/scripts/notify.py msgid "AUR Server Error" -msgstr "Errore del server di AUR" +msgstr "Errore server AUR" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "Commenti relativi alla richiesta di chiusura del pacchetto..." +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "Questa azione chiuderà tutte le richieste in sospeso dei pacchetti ad essa correlate. Se %scommenti%s vengono omessi, verrà generato automaticamente un commento di chiusura." - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "assegnato" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "Mostra altri %d" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "dipendenze" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "L'account non è stato eliminato, selezionare la casella di conferma." - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "Annulla" - -#: templates/requests.html -msgid "Package name" -msgstr "Nome del pacchetto" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "Si noti che, se si nasconde il proprio indirizzo e-mail, esso finirà nell'elenco BCC per qualsiasi notifica di richiesta. Nel caso in cui qualcuno risponda a queste notifiche, non si riceverà un'e-mail. Tuttavia, le risposte sono tipicamente inviate alla lista di discussione e saranno, quindi, visibili nell'archivio." +msgstr "" diff --git a/po/ja.po b/po/ja.po index 4d356963..55d056bf 100644 --- a/po/ja.po +++ b/po/ja.po @@ -10,11 +10,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: kusakata, 2013-2018,2020-2022\n" -"Language-Team: Japanese (http://app.transifex.com/lfleischer/aurweb/language/ja/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Japanese (http://www.transifex.com/lfleischer/aurweb/language/ja/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -135,16 +135,16 @@ msgid "Type" msgstr "タイプ" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "TU の追加" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "TU の削除" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "TU の削除 (undeclared inactivity)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -201,10 +201,9 @@ msgstr "共同メンテしているパッケージを検索" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "AUR にようこそ!AUR についての詳しい情報は %sAUR User Guidelines%s や %sAUR TU Guidelines%s を読んで下さい。" #: html/home.php #, php-format @@ -218,8 +217,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "お気に入りのパッケージに投票しましょう!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "パッケージがバイナリとして [extra] で提供されることになるかもしれません。" +msgid "Some packages may be provided as binaries in [community]." +msgstr "パッケージがバイナリとして [community] で提供されることになるかもしれません。" #: html/home.php msgid "DISCLAIMER" @@ -268,8 +267,8 @@ msgstr "削除リクエスト" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Arch User Repository からパッケージを削除するようにリクエストします。パッケージが壊れていて、その不具合を簡単に修正できるような場合、このリクエストは使わないで下さい。代わりに、パッケージのメンテナに連絡したり、必要に応じて孤児リクエストを送りましょう。" #: html/home.php msgid "Merge Request" @@ -311,11 +310,10 @@ msgstr "議論" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Arch User Repository (AUR) や Trusted User に関する一般的な議論は %saur-general%s で行って下さい。AUR ウェブインターフェイスの開発に関しては、%saur-dev%s メーリングリストを使用します。" #: html/home.php msgid "Bug Reporting" @@ -326,9 +324,9 @@ msgstr "バグレポート" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "AUR のウェブインターフェイスにバグを発見した時は%sバグトラッカー%sにバグを報告してください。トラッカーを使って報告できるバグは AUR ウェブインターフェイスのバグ%sだけ%sです。パッケージのバグを報告するときはパッケージのメンテナに連絡するか該当するパッケージのページにコメントを投稿してください。" #: html/home.php msgid "Package Search" @@ -528,8 +526,8 @@ msgid "Delete" msgstr "削除" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Trusted User と開発者だけがパッケージを削除できます。" #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -569,8 +567,8 @@ msgid "Disown" msgstr "放棄" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Trusted User と開発者だけがパッケージを孤児にできます。" #: html/pkgflagcomment.php msgid "Flag Comment" @@ -659,8 +657,8 @@ msgid "Merge" msgstr "マージ" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Trusted User と開発者だけがパッケージをマージできます。" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -717,8 +715,8 @@ msgid "I accept the terms and conditions above." msgstr "私は上記の利用規約を承認します。" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Trusted User" #: html/tu.php msgid "Could not retrieve proposal details." @@ -729,8 +727,8 @@ msgid "Voting is closed for this proposal." msgstr "この提案への投票は締め切られています。" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Trusted User だけが投票できます。" #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1225,8 +1223,8 @@ msgstr "開発者" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Trusted User & 開発者" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1328,6 +1326,10 @@ msgstr "ユーザー名はログインするときに使用する名前です。 msgid "Normal user" msgstr "ノーマルユーザー" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Trusted user" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "休眠アカウント" @@ -1400,15 +1402,6 @@ msgid "" " the Arch User Repository." msgstr "以下の情報は Arch User Repository にパッケージを送信したい場合にのみ必要になります。" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "SSH 公開鍵" @@ -1831,26 +1824,26 @@ msgstr "マージ" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "削除リクエストを送信することで、Trusted User にパッケージベースの削除を要求できます。削除リクエストを使用するケース: パッケージの重複や、上流によってソフトウェアの開発が放棄された場合、違法なパッケージ、あるいはパッケージがどうしようもなく壊れてしまっている場合など。" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "マージリクエストを送信することで、パッケージベースを削除して\n投票数とコメントを他のパッケージベースに移動することを Trusted User に要求できます。パッケージのマージは Git リポジトリに影響を与えません。マージ先のパッケージの Git 履歴は自分で更新してください。" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "孤児リクエストを送信することで、パッケージベースの所有権が放棄されるように Trusted User に要求できます。パッケージにメンテナが何らかの手を加える必要があり、現在のメンテナが行方不明で、メンテナに連絡を取ろうとしても返答がない場合にのみ、リクエストを送信してください。" #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2099,8 +2092,8 @@ msgid "Registered Users" msgstr "登録ユーザー" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Trusted User" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2285,8 +2278,8 @@ msgstr "{user} [1] は {pkgbase} [2] を削除しました。\n\nこのパッケ #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "TU 投票リマインダー: 提案 {id}" #: scripts/notify.py #, python-brace-format @@ -2332,42 +2325,10 @@ msgstr "AUR サーバーエラー" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "関連するパッケージリクエストの取り消しコメント..." +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "このアクションは関連するパッケージリクエストをすべて取り消します。%sコメント%sを省略した場合、自動的にコメントが生成されます。" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." msgstr "" diff --git a/po/ko.po b/po/ko.po index b6d8de3b..808ffe27 100644 --- a/po/ko.po +++ b/po/ko.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Korean (http://app.transifex.com/lfleischer/aurweb/language/ko/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Korean (http://www.transifex.com/lfleischer/aurweb/language/ko/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1827,22 +1820,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2095,7 +2088,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2281,7 +2274,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2335,35 +2328,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/lt.po b/po/lt.po index f9e7f258..d126f193 100644 --- a/po/lt.po +++ b/po/lt.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Lithuanian (http://app.transifex.com/lfleischer/aurweb/language/lt/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Lithuanian (http://www.transifex.com/lfleischer/aurweb/language/lt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1830,22 +1823,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2110,7 +2103,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2296,7 +2289,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2350,35 +2343,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/nb.po b/po/nb.po index f67571d7..1cc090f1 100644 --- a/po/nb.po +++ b/po/nb.po @@ -12,11 +12,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Alexander F. Rødseth , 2015,2017-2019\n" -"Language-Team: Norwegian Bokmål (http://app.transifex.com/lfleischer/aurweb/language/nb/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Norwegian Bokmål (http://www.transifex.com/lfleischer/aurweb/language/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -137,16 +137,16 @@ msgid "Type" msgstr "Type" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Utnevnelse av TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Fjerning av TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Fjerning av TU (inaktiv uten å si i fra)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -203,10 +203,9 @@ msgstr "Søk etter pakker jeg er med på å vedlikeholde" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Velkommen til AUR! Vennligst les %sAUR Brukerveiledning%s og %sAUR TU Veiledning%s for mer informasjon." #: html/home.php #, php-format @@ -220,8 +219,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Husk å stemme på dine favorittpakker!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Noen pakker finnes som binærfiler i [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Noen pakker finnes som binærfiler i [community]." #: html/home.php msgid "DISCLAIMER" @@ -270,8 +269,8 @@ msgstr "Forespør sletting" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Forespør at pakken fjernes fra Arch User Repository. Ikke gjør dette hvis pakken er ødelagt og lett kan fikses. Ta kontakt med vedlikeholderen i stedet, eller forespør at pakken gjøres eierløs." #: html/home.php msgid "Merge Request" @@ -313,11 +312,10 @@ msgstr "Diskusjon" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Generell diskusjon rundt Arch sitt brukerstyrte pakkebibliotek (AUR) og strukturen rundt betrodde brukere, foregår på %saur-general%s. For diskusjoner relatert til utviklingen av AUR web-grensesnittet, bruk %saur-dev%s e-postlisten." #: html/home.php msgid "Bug Reporting" @@ -328,9 +326,9 @@ msgstr "Feilrapportering" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Vennligst fyll ut en feilrapport i %sfeilrapporteringssystemet%s dersom du finner en feil i AUR sitt web-grensesnitt. Bruk denne %skun%s til å rapportere feil som gjelder AUR sitt web-grensesnitt. For å rapportere feil med pakker, kontakt personen som vedlikeholder pakken eller legg igjen en kommentar på siden til den aktuelle pakken." #: html/home.php msgid "Package Search" @@ -530,8 +528,8 @@ msgid "Delete" msgstr "Slett" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Bare betrodde brukere og utviklere kan slette pakker." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -571,8 +569,8 @@ msgid "Disown" msgstr "Gjør eierløs" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Bare betrodde brukere og Arch utviklere kan gjøre pakker eierløse." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -661,8 +659,8 @@ msgid "Merge" msgstr "Slå sammen" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Bare betrodde brukere og utviklere kan slå sammen pakker." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -719,8 +717,8 @@ msgid "I accept the terms and conditions above." msgstr "Jeg godtar betingelsene ovenfor." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Betrodd bruker" #: html/tu.php msgid "Could not retrieve proposal details." @@ -731,8 +729,8 @@ msgid "Voting is closed for this proposal." msgstr "Avstemningen er ferdig for dette forslaget." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Bare betrodde brukere har stemmerett." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1227,8 +1225,8 @@ msgstr "Utvikler" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Betrodd bruker & Utvikler" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1330,6 +1328,10 @@ msgstr "Brukernavnet er navnet du vil bruke for å logge inn med. Det er synlig msgid "Normal user" msgstr "Vanlig bruker" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Betrodd bruker" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Konto suspendert" @@ -1402,15 +1404,6 @@ msgid "" " the Arch User Repository." msgstr "Følgende informasjon behøves bare hvis du har tenkt til å sende inn pakker til Arch sitt brukerstyrte pakkebibliotek." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Offentlig SSH-nøkkel" @@ -1834,26 +1827,26 @@ msgstr "Flett med" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Ved å sende inn en forespørsel om sletting spør du en betrodd bruker om å slette pakken. Slike forespørsler bør brukes om duplikater, forlatt programvare samt ulovlige eller pakker som er så ødelagte at de ikke lenger kan fikses." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Ved å sende inn en forespørsel om sammenslåing spør du en betrodd bruker om å slette pakken. Stemmer og kommentarer vil bli overført til en annen pakke. Å slå sammen en pakke har ingen effekt på korresponderende Git repo. Pass på å oppdatere Git historikken til målpakken selv." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Ved å sende inn en forespørsel om å gjøre en pakke eierløs spør du en betrodd bruker om å utføre dette. Vennligst bare send inn forespørselen dersom pakken trenger vedlikehold, nåværende vedlikeholder er fraværende og du allerede har prøvd å kontakte den som vedlikeholder pakken." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2106,8 +2099,8 @@ msgid "Registered Users" msgstr "Registrerte brukere" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Betrodde brukere" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2292,8 +2285,8 @@ msgstr "{user} [1] slettet {pkgbase} [2].\n\nDu vil ikke få flere beskjeder om #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "TU avstemningspåminnelse: forslag {id}" #: scripts/notify.py #, python-brace-format @@ -2346,35 +2339,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/nb_NO.po b/po/nb_NO.po index e840e869..74af6936 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -8,11 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Kim Nordmo , 2017,2019\n" -"Language-Team: Norwegian Bokmål (Norway) (http://app.transifex.com/lfleischer/aurweb/language/nb_NO/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Norwegian Bokmål (Norway) (http://www.transifex.com/lfleischer/aurweb/language/nb_NO/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -133,15 +133,15 @@ msgid "Type" msgstr "Type" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -199,9 +199,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -216,7 +215,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -266,7 +265,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -309,10 +308,9 @@ msgstr "Diskusjon" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -324,8 +322,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -526,7 +524,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -567,7 +565,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -657,7 +655,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -715,8 +713,8 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Betrodd bruker" #: html/tu.php msgid "Could not retrieve proposal details." @@ -727,7 +725,7 @@ msgid "Voting is closed for this proposal." msgstr "Stemming er avsluttet for dette forslaget." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1223,7 +1221,7 @@ msgstr "Utvikler" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1326,6 +1324,10 @@ msgstr "" msgid "Normal user" msgstr "Vanlig bruker" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Betrodd bruker" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Konto suspendert" @@ -1398,15 +1400,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1830,22 +1823,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2102,7 +2095,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2288,7 +2281,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2342,35 +2335,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/nl.po b/po/nl.po index d8df5765..282b5b40 100644 --- a/po/nl.po +++ b/po/nl.po @@ -13,11 +13,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Heimen Stoffels , 2021-2022\n" -"Language-Team: Dutch (http://app.transifex.com/lfleischer/aurweb/language/nl/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Dutch (http://www.transifex.com/lfleischer/aurweb/language/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -138,16 +138,16 @@ msgid "Type" msgstr "Type" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Toevoeging van een TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Verwijdering van een TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Verwijdering van een TU (onverklaarbare inactiviteit)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -204,10 +204,9 @@ msgstr "Zoeken naar pakketten die ik mede onderhoud" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Welkom op AUR! Bekijk voor meer informatie de %sAUR-gebruikersrichtlijnen%s en %sAUR-ontwikkelaarsrichtlijnen%s." #: html/home.php #, php-format @@ -221,8 +220,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Vergeet niet te stemmen op uw favoriete pakketten!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Sommige pakketten in [extra] kunnen worden aangeleverd als uitvoerbare bestanden." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Sommige pakketten in [community] kunnen worden aangeleverd als uitvoerbare bestanden." #: html/home.php msgid "DISCLAIMER" @@ -271,8 +270,8 @@ msgstr "Verwijderingsverzoek" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Verzoek om een pakket uit de Arch User Repository te laten verwijderen. Gebruik dit niet als een pakket niet naar behoren functioneert en eenvoudig gerepareerd kan worden. Neem in dat geval contact op met de eigenaar en open zo nodig een onteigeningsverzoek." #: html/home.php msgid "Merge Request" @@ -314,11 +313,10 @@ msgstr "Discussiëren" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Algemene discussies met betrekking tot de Arch User Repository (AUR) en de opzet van Trusted Users vinden plaats op %saur-general%s. Discussies met betrekking tot de ontwikkeling van de AUR-webapp vinden plaats op de %saur-dev%s-mailinglijst." #: html/home.php msgid "Bug Reporting" @@ -329,9 +327,9 @@ msgstr "Bugmeldingen" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Als u een bug tegenkomt in de AUR-webapp, open dan een ticket op onze %sbugtracker%s. Gebruik de bugtracker %salléén%s om bugs over AUR te melden. Als u fouten tegenkomt in een pakketsamenstelling, meld dit dan aan de eigenaar of laat een opmerking achter op de bijbehorende pakketpagina." #: html/home.php msgid "Package Search" @@ -531,8 +529,8 @@ msgid "Delete" msgstr "Verwijderen" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Alleen Trusted Users en Developers kunnen pakketten verwijderen." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -572,8 +570,8 @@ msgid "Disown" msgstr "Onteigenen" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Alleen Trusted Users en Developers kunnen pakketten onteigenen." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -662,8 +660,8 @@ msgid "Merge" msgstr "Samenvoegen" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Alleen Trusted Users en Developers kunnen pakketten samenvoegen." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -720,8 +718,8 @@ msgid "I accept the terms and conditions above." msgstr "Ik ga akkoord met de algemene voorwaarden." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Trusted User" #: html/tu.php msgid "Could not retrieve proposal details." @@ -732,8 +730,8 @@ msgid "Voting is closed for this proposal." msgstr "U kunt niet meer stemmen op dit voorstel." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Alleen Trusted Users zijn bevoegd om te stemmen." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1228,8 +1226,8 @@ msgstr "Ontwikkelaar" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Trusted User en ontwikkelaar" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1331,6 +1329,10 @@ msgstr "Uw gebruikersnaam gebruikt u om in te loggen. Deze naam is openbaar, zel msgid "Normal user" msgstr "Normale gebruiker" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Trusted User" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Account geschorst" @@ -1403,15 +1405,6 @@ msgid "" " the Arch User Repository." msgstr "De volgende informatie is alleen verplicht als u pakketten aan de Arch User Repository wilt toevoegen." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Publieke ssh-sleutel" @@ -1835,26 +1828,26 @@ msgstr "Samenvoegen met" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Als u een verwijderingsverzoek doet, vraagt u aan een zogeheten ‘Trusted User’ om het basispakket te verwijderen. Dit verzoek is bedoeld om duplicaten, niet-onderhouden (door upstream), illegale en onherstelbare pakketten te verwijderen." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Als u een samenvoegingsverzoek doet, vraagt u aan een zogeheten ‘Trusted User’ om het basispakket te verwijderen en de bijbehorende opmerkingen en stemmen over te zetten naar een ander basispakket. Dit heeft geen invloed op de bijbehorende git-repo's, maar u dient wél zelf de git-geschiedenis van het doelpakket bij te werken." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Als u een onteigeningsverzoek doet, vraagt u aan een zogeheten ‘Trusted User’ om het basispakket te onteigenen. Doe dit alleen als een pakket dringend onderhoud nodig heeft, maar de eigenaar niet thuis geeft, ook niet na een persoonlijk verzoek." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2107,8 +2100,8 @@ msgid "Registered Users" msgstr "Geregistreerde gebruikers" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Trusted Users" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2293,8 +2286,8 @@ msgstr "{user} [1] heeft {pkgbase} [2] verwijderd.\n\n\nU ontvangt geen meldinge #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "TU-stemherinnering aangaande het voorstel ‘{id}’" #: scripts/notify.py #, python-brace-format @@ -2340,42 +2333,10 @@ msgstr "AUR-serverfout" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "Gerelateerde pakketverzoekreacties…" +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "Met deze actie sluit u elk gerelateerd openstaand verzoek. Als %s reacties%s genegeerd worden, dan wordt er een automatische afsluitreactie geplaatst." - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." msgstr "" diff --git a/po/pl.po b/po/pl.po index e68fa533..4856f22b 100644 --- a/po/pl.po +++ b/po/pl.po @@ -13,17 +13,17 @@ # marcin mikołajczak , 2017 # Michal T , 2016 # Nuc1eoN , 2014 -# Piotr Strębski , 2017-2018,2022 +# Piotr Strębski , 2017-2018 # Piotr Strębski , 2013-2016 # Przemyslaw Ka. , 2021 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Piotr Strębski , 2017-2018,2022\n" -"Language-Team: Polish (http://app.transifex.com/lfleischer/aurweb/language/pl/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Polish (http://www.transifex.com/lfleischer/aurweb/language/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -144,16 +144,16 @@ msgid "Type" msgstr "Rodzaj" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Dodanie ZU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Usunięcie ZU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Usunięcie ZU (niezadeklarowana nieaktywność)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -210,10 +210,9 @@ msgstr "Wyszukaj pakiety, które współ-utrzymuję" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Witamy w AUR! Aby uzyskać więcej informacji, przeczytaj %sInstrukcję Użytkownika AUR%s oraz %sInstrukcję Zaufanego Użytkownika%s." #: html/home.php #, php-format @@ -227,8 +226,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Nie zapomnij zagłosować na swoje ulubione pakiety!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Część pakietów może być dostępna w formie binarnej w [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Część pakietów może być dostępna w formie binarnej w [community]." #: html/home.php msgid "DISCLAIMER" @@ -277,7 +276,7 @@ msgstr "Prośba o usunięcie" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -320,11 +319,10 @@ msgstr "Dyskusja" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Ogólna dyskusja dotycząca Repozytorium Użytkowników Arch (AUR) i struktury Zaufanych Użytkowników odbywa się na %saur-general%s. Dyskusja dotycząca rozwoju interfejsu webowego AUR odbywa się zaś na liście dyskusyjnej %saur-dev%s." #: html/home.php msgid "Bug Reporting" @@ -335,9 +333,9 @@ msgstr "Zgłaszanie błędów" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Jeśli znalazłeś błąd w interfejsie webowym AUR, zgłoś go w naszym %ssystemie śledzenia błędów%s. Używaj go %swyłącznie%s do zgłaszania błędów związanych z interfejsem webowym AUR. Błędy powiązane z pakietami zgłaszaj ich opiekunom lub zostaw komentarz pod odpowiednim pakietem." #: html/home.php msgid "Package Search" @@ -537,8 +535,8 @@ msgid "Delete" msgstr "Usuń" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Tylko Zaufani Użytkownicy i Deweloperzy mogą usuwać pakiety." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -578,8 +576,8 @@ msgid "Disown" msgstr "Porzuć" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Tylko Zaufani Użytkownicy i Programiści mogą porzucać pakiety." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -668,8 +666,8 @@ msgid "Merge" msgstr "Scal" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Tylko Zaufani Użytkownicy i Deweloperzy mogą scalać pakiety." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -714,7 +712,7 @@ msgstr "Zasady korzystania" #: html/tos.php msgid "" "The following documents have been updated. Please review them carefully:" -msgstr "Zaktualizowano następujące dokumenty. Przejrzyj je dokładnie:" +msgstr "" #: html/tos.php #, php-format @@ -726,8 +724,8 @@ msgid "I accept the terms and conditions above." msgstr "Akceptuję powyższe warunki i zasady." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Zaufany Użytkownik" #: html/tu.php msgid "Could not retrieve proposal details." @@ -738,8 +736,8 @@ msgid "Voting is closed for this proposal." msgstr "Głosowanie na tą propozycję jest zamknięte." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Tylko Zaufani Użytkownicy mogą głosować." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -794,7 +792,7 @@ msgstr "Może zawierać tylko jedną kropkę, podkreślnik lub myślnik." #: lib/acctfuncs.inc.php msgid "Please confirm your new password." -msgstr "Potwierdź nowe hasło." +msgstr "" #: lib/acctfuncs.inc.php msgid "The email address is invalid." @@ -802,7 +800,7 @@ msgstr "Adres e-mail jest nieprawidłowy." #: lib/acctfuncs.inc.php msgid "The backup email address is invalid." -msgstr "Zapasowy adres e-mail jest nieprawidłowy." +msgstr "" #: lib/acctfuncs.inc.php msgid "The home page is invalid, please specify the full HTTP(s) URL." @@ -826,7 +824,7 @@ msgstr "Język nie jest obecnie obsługiwany." #: lib/acctfuncs.inc.php msgid "Timezone is not currently supported." -msgstr "Strefa czasowa nie jest obecnie obsługiwana." +msgstr "" #: lib/acctfuncs.inc.php #, php-format @@ -1234,8 +1232,8 @@ msgstr "Deweloper" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Zaufany Użytkownik i Developer" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1337,6 +1335,10 @@ msgstr "" msgid "Normal user" msgstr "Zwykły użytkownik" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Zaufany Użytkownik" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Konto zablokowane" @@ -1409,15 +1411,6 @@ msgid "" " the Arch User Repository." msgstr "Następująca informacja jest wymagana jedynie w sytuacji, gdy chcesz przesłać pakiety do Repozytorium Użytkowników Arch." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Klucz publiczny SSH" @@ -1843,22 +1836,22 @@ msgstr "Scal z" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2123,8 +2116,8 @@ msgid "Registered Users" msgstr "Zarejestrowani użytkownicy" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Zaufani użytkownicy" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2309,7 +2302,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2363,35 +2356,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/pt.po b/po/pt.po index 33e01d7d..b2cf86b2 100644 --- a/po/pt.po +++ b/po/pt.po @@ -7,16 +7,16 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Lukas Fleischer , 2011\n" -"Language-Team: Portuguese (http://app.transifex.com/lfleischer/aurweb/language/pt/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Portuguese (http://www.transifex.com/lfleischer/aurweb/language/pt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt\n" -"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: html/404.php msgid "Page Not Found" @@ -132,15 +132,15 @@ msgid "Type" msgstr "Tipo" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -198,9 +198,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -215,7 +214,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "Lembre-se de votar nos seus pacotes favoritos!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -265,7 +264,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -308,10 +307,9 @@ msgstr "Discussão" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -323,8 +321,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -525,7 +523,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -566,7 +564,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -656,7 +654,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -714,8 +712,8 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Usuário Confiável" #: html/tu.php msgid "Could not retrieve proposal details." @@ -726,7 +724,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1222,7 +1220,7 @@ msgstr "Desenvolvedor" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1325,6 +1323,10 @@ msgstr "" msgid "Normal user" msgstr "Usuário Normal" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Usuário Confiável" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Conta Suspensa" @@ -1397,15 +1399,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1586,7 +1579,6 @@ msgid "%d pending request" msgid_plural "%d pending requests" msgstr[0] "" msgstr[1] "" -msgstr[2] "" #: template/pkgbase_actions.php msgid "Adopt Package" @@ -1830,22 +1822,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -1861,7 +1853,6 @@ msgid "%d package request found." msgid_plural "%d package requests found." msgstr[0] "" msgstr[1] "" -msgstr[2] "" #: template/pkgreq_results.php template/pkg_search_results.php #, php-format @@ -1886,7 +1877,6 @@ msgid "~%d day left" msgid_plural "~%d days left" msgstr[0] "" msgstr[1] "" -msgstr[2] "" #: template/pkgreq_results.php #, php-format @@ -1894,7 +1884,6 @@ msgid "~%d hour left" msgid_plural "~%d hours left" msgstr[0] "" msgstr[1] "" -msgstr[2] "" #: template/pkgreq_results.php msgid "<1 hour left" @@ -2023,7 +2012,6 @@ msgid "%d package found." msgid_plural "%d packages found." msgstr[0] "" msgstr[1] "" -msgstr[2] "" #: template/pkg_search_results.php msgid "Version" @@ -2106,8 +2094,8 @@ msgid "Registered Users" msgstr "Usuários Registrados" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Usuários Confiáveis" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2292,7 +2280,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2346,35 +2334,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index c689a8ab..c9c15d72 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -6,23 +6,23 @@ # Albino Biasutti Neto Bino , 2011 # Fábio Nogueira , 2016 # Rafael Fontenelle , 2012-2015 -# Rafael Fontenelle , 2011,2015-2018,2020-2023 +# Rafael Fontenelle , 2011,2015-2018,2020-2022 # Rafael Fontenelle , 2011 # Sandro , 2011 # Sandro , 2011 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Rafael Fontenelle , 2011,2015-2018,2020-2023\n" -"Language-Team: Portuguese (Brazil) (http://app.transifex.com/lfleischer/aurweb/language/pt_BR/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/lfleischer/aurweb/language/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt_BR\n" -"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" #: html/404.php msgid "Page Not Found" @@ -138,16 +138,16 @@ msgid "Type" msgstr "Tipo" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "Adição de Mantenedor de Pacote" +msgid "Addition of a TU" +msgstr "Adição de um TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "Remoção de um Mantenedor de Pacote" +msgid "Removal of a TU" +msgstr "Remoção de um TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "Remoção de um Mantenedor de Pacote (inatividade não declarada)" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Remoção de um TU (inatividade não declarada)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -204,10 +204,9 @@ msgstr "Pesquisar por pacotes que eu comantenho" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "Bem-vindo ao AUR! Por favor, leia as %sDiretrizes do Usuário do AUR%s para obter mais informações e as %sDiretrizes de Envio para o AUR%s se você quiser contribuir com um PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Bem-vindo ao AUR! Por favor, leia as %sDiretrizes de Usuário do AUR%s e %sDiretrizes de UC do AUR%s para mais informações." #: html/home.php #, php-format @@ -221,8 +220,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Lembre-se de votar nos seus pacotes favoritos!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Alguns pacotes podem ser fornecidos como binários no repositório [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Alguns pacotes podem ser fornecidos como binários no repositório [community]." #: html/home.php msgid "DISCLAIMER" @@ -271,8 +270,8 @@ msgstr "Requisição de exclusão" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "Requisite que um pacote seja removido do Arch User Repository. Por favor, não use esta opção se um pacote está quebrado, mas que pode ser corrigido facilmente. Ao invés disso, contate o mantenedor e, se necessário, preencha uma requisição para tornar o pacote órfão." +"the package maintainer and file orphan request if necessary." +msgstr "Requisite que um pacote seja removido do Arch User Repository. Por favor, não use esta opção se um pacote está quebrado, mas que pode ser corrigido facilmente. Ao invés disso, contate o mantenedor do pacote e, se necessário, preencha uma requisição para tornar o pacote órfão." #: html/home.php msgid "Merge Request" @@ -289,7 +288,7 @@ msgstr "Requisite que um pacote seja mesclado com outro. Pode ser usado quando u msgid "" "If you want to discuss a request, you can use the %saur-requests%s mailing " "list. However, please do not use that list to file requests." -msgstr "Se você quiser discutir uma requisição, você pode usar a lista de discussão %saur-request%s. Porém, por favor, não use essa lista para fazer requisições." +msgstr "Se você quiser discutir uma requisição, você pode usar a lista de discussão %saur-request%s. Porém, por favor não use essa lista para fazer requisições." #: html/home.php msgid "Submitting Packages" @@ -314,11 +313,10 @@ msgstr "Discussão" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "Discussões gerais no que se refere à estrutura do Arch User Repository (AUR) e de Mantenedores de Pacote acontecem no %saur-general%s. Para discussão relacionada ao desenvolvimento da interface web do AUR, use a lista de discussão do %saur-dev%s" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Discussões gerais no que se refere à estrutura do Arch User Repository (AUR) e de Trusted Users acontecem no %saur-general%s. Para discussão relacionada ao desenvolvimento da interface web do AUR, use a lista de discussão do %saur-dev%s" #: html/home.php msgid "Bug Reporting" @@ -329,9 +327,9 @@ msgstr "Relatório de erros" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "Se você encontrar um erro na interface web do AUR, preencha um relatório de erro no nosso %srastreador de erros%s. Use o rastreador para relatar erros encontrados na interface web do AUR, %ssomente%s. Para relatar erros de empacotamento, contate o mantenedor ou deixe um comentário na página de pacote apropriada." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Se você encontrar um erro na interface web do AUR, por favor preencha um relatório de erro no nosso %srastreador de erros%s. Use o rastreador para relatar erros encontrados no AUR web, %ssomente%s. Para relatar erros de empacotamento, contate o mantenedor do pacote ou deixe um comentário na página de pacote apropriada." #: html/home.php msgid "Package Search" @@ -363,12 +361,12 @@ msgstr "Desmarcar" #: html/login.php template/header.php msgid "Login" -msgstr "Login" +msgstr "Conectar" #: html/login.php html/tos.php #, php-format msgid "Logged-in as: %s" -msgstr "Logado como: %s" +msgstr "Conectado como: %s" #: html/login.php template/header.php msgid "Logout" @@ -376,7 +374,7 @@ msgstr "Sair" #: html/login.php msgid "Enter login credentials" -msgstr "Digite as credenciais para se logar" +msgstr "Digite as credenciais para se conectar" #: html/login.php msgid "User name or primary email address" @@ -398,7 +396,7 @@ msgstr "Esqueci minha senha" #, php-format msgid "" "HTTP login is disabled. Please %sswitch to HTTPs%s if you want to login." -msgstr "Acesso por HTTP está desabilitado. %sAcesse via HTTPs%s caso queira se conectar." +msgstr "Acesso por HTTP está desabilitado. Favor %sacesse via HTTPs%s caso queira se conectar." #: html/packages.php template/pkg_search_form.php msgid "Search Criteria" @@ -436,7 +434,7 @@ msgstr "Redefinição de senha" #: html/passreset.php msgid "Check your e-mail for the confirmation link." -msgstr "Confira seu e-mail pelo link de confirmação." +msgstr "Verifique no seu e-mail pelo link de confirmação." #: html/passreset.php msgid "Your password has been reset successfully." @@ -448,7 +446,7 @@ msgstr "Confirme seu nome de usuário ou endereço de e-mail primário:" #: html/passreset.php msgid "Enter your new password:" -msgstr "Digite a sua nova senha:" +msgstr "Digite a sua senha:" #: html/passreset.php msgid "Confirm your new password:" @@ -531,8 +529,8 @@ msgid "Delete" msgstr "Excluir" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "Apenas Mantenedores de Pacote e Desenvolvedores podem excluir pacotes." +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Somente Trusted Users e Desenvolvedores podem excluir pacotes." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -572,8 +570,8 @@ msgid "Disown" msgstr "Abandonar" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "Apenas Mantenedores de Pacote e Desenvolvedores podem tornar órfãos pacotes." +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Apenas Trusted Users e Desenvolvedores podem abandonar pacotes." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -662,8 +660,8 @@ msgid "Merge" msgstr "Mesclar" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "Apenas Mantenedores de Pacote e Desenvolvedores podem mesclar pacotes." +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Somente Trusted Users e Desenvolvedores podem mesclar pacotes." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -720,8 +718,8 @@ msgid "I accept the terms and conditions above." msgstr "Eu aceito os termos e condições acima." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "Mantenedor de Pacote" +msgid "Trusted User" +msgstr "Trusted User" #: html/tu.php msgid "Could not retrieve proposal details." @@ -732,8 +730,8 @@ msgid "Voting is closed for this proposal." msgstr "A votação está encerrada para esta proposta." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "Apenas Mantenedores de Pacote podem votar." +msgid "Only Trusted Users are allowed to vote." +msgstr "Apenas Trusted Users têm permissão para votar." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1228,8 +1226,8 @@ msgstr "Desenvolvedor" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "Mantenedor de Pacote & Desenvolvedor" +msgid "Trusted User & Developer" +msgstr "Trusted User & Desenvolvedor" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1331,6 +1329,10 @@ msgstr "Seu nome de usuário é o nome que você vai usar para se autenticar. É msgid "Normal user" msgstr "Usuário normal" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Trusted user" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Conta suspensa" @@ -1403,15 +1405,6 @@ msgid "" " the Arch User Repository." msgstr "A informação a seguir é necessária apenas se você deseja enviar pacotes para o Arch User Repository." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "Especifique várias chaves SSH separadas por nova linha, linhas vazias são ignoradas." - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "Ocultar comentários excluídos" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Chave pública SSH" @@ -1592,7 +1585,6 @@ msgid "%d pending request" msgid_plural "%d pending requests" msgstr[0] "%d requisição pendente" msgstr[1] "%d requisições pendentes" -msgstr[2] "%d requisições pendentes" #: template/pkgbase_actions.php msgid "Adopt Package" @@ -1836,26 +1828,26 @@ msgstr "Mesclar em" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "Ao enviar uma requisição de exclusão, você solicita que um Mantenedor de Pacote exclua o pacote base. Esse tipo de requisição deveria ser usada em caso de duplicidade, softwares abandonados pelo upstream, assim como pacotes ilegais ou irreparavelmente quebrados." +msgstr "Ao enviar uma requisição de exclusão, você solicita que um Trusted User exclua o pacote base. Esse tipo de requisição deveria ser usada em caso de duplicidade, softwares abandonados pelo upstream, assim como pacotes ilegais ou irreparavelmente quebrados." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "Ao enviar uma requisição de mesclagem, você solicita que um Mantenedor de Pacote exclua o pacote base e transfira seus votos e comentários para um outro pacote base. Mesclar um pacote não afeta os repositórios Git correspondentes. Certifique-se de você mesmo atualizar o histórico Git do pacote alvo." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Ao enviar uma requisição de mesclagem, você solicita que um Trusted User exclua o pacote base e transfira seus votos e comentários para um outro pacote base. Mesclar um pacote não afeta os repositórios Git correspondentes. Certifique-se de você mesmo atualizar o histórico Git do pacote alvo." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "Ao enviar uma requisição de tornar órfão, você pede que um Mantenedor de Pacote abandona o pacote base. Por favor, apenas faça isto se o pacote precise de ação do mantenedor, estando este ausente por muito tempo, e você já tentou – e não conseguiu – contatá-lo anteriormente." +msgstr "Ao enviar uma requisição de tornar órfão, você pede que um Trusted User abandona o pacote base. Por favor, apenas faça isto se o pacote precise de ação do mantenedor, estando este ausente por muito tempo, e você já tentou – e não conseguiu – contatá-lo anteriormente." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -1867,7 +1859,6 @@ msgid "%d package request found." msgid_plural "%d package requests found." msgstr[0] "%d requisição de pacote encontrada." msgstr[1] "%d requisições de pacotes encontradas." -msgstr[2] "%d requisições de pacotes encontradas." #: template/pkgreq_results.php template/pkg_search_results.php #, php-format @@ -1892,7 +1883,6 @@ msgid "~%d day left" msgid_plural "~%d days left" msgstr[0] "~%d dia restante" msgstr[1] "~%d dias restantes" -msgstr[2] "~%d dias restantes" #: template/pkgreq_results.php #, php-format @@ -1900,7 +1890,6 @@ msgid "~%d hour left" msgid_plural "~%d hours left" msgstr[0] "~%d hora restante" msgstr[1] "~%d horas restantes" -msgstr[2] "~%d horas restantes" #: template/pkgreq_results.php msgid "<1 hour left" @@ -2029,7 +2018,6 @@ msgid "%d package found." msgid_plural "%d packages found." msgstr[0] "%d pacote encontrado." msgstr[1] "%d pacotes encontrados." -msgstr[2] "%d pacotes encontrados." #: template/pkg_search_results.php msgid "Version" @@ -2112,8 +2100,8 @@ msgid "Registered Users" msgstr "Usuários registrados" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "Mantenedores de Pacote" +msgid "Trusted Users" +msgstr "Trusted Users" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2298,8 +2286,8 @@ msgstr "{user} [1] excluiu {pkgbase} [2].\n\nVocê não mais receberá notifica #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "Lembrete de Voto de Mantenedor de Pacote: Proposta {id}" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "Lembrete de votação de TU: Proposta {id}" #: scripts/notify.py #, python-brace-format @@ -2345,42 +2333,10 @@ msgstr "Erro do Servidor AUR" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "Comentários relacionados ao fechamento de requisição de pacote..." +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "Esta ação fechará todas as requisições de pacote pendentes relacionadas a ela. Se %sComentários%s forem omitidos, um comentário de encerramento será gerado automaticamente." - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "atribuído" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "Mostrar %d mais" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "dependências" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "A conta não foi excluída, marque a caixa de confirmação." - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "Cancelar" - -#: templates/requests.html -msgid "Package name" -msgstr "Nome do pacote" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "Observe que se você ocultar seu endereço de e-mail, ele será incluído na lista de CCO para quaisquer notificações de requisição. Caso alguém responda a essas notificações, você não receberá um e-mail. No entanto, as respostas geralmente são enviadas para a lista de discussão e, portanto, seriam visíveis no arquivo." +msgstr "" diff --git a/po/pt_PT.po b/po/pt_PT.po index 8d065e15..3518cb7b 100644 --- a/po/pt_PT.po +++ b/po/pt_PT.po @@ -12,16 +12,16 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Christophe Silva , 2018\n" -"Language-Team: Portuguese (Portugal) (http://app.transifex.com/lfleischer/aurweb/language/pt_PT/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Portuguese (Portugal) (http://www.transifex.com/lfleischer/aurweb/language/pt_PT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt_PT\n" -"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: html/404.php msgid "Page Not Found" @@ -137,16 +137,16 @@ msgid "Type" msgstr "Tipo" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Adição de um TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Remoção de um TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Remoção de um TU (inatividade não declarada)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -203,10 +203,9 @@ msgstr "Procurar por pacotes que eu co-mantenho" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Bem-vindo ao AUR! Por favor leia as %sOrientações de Utilizador do AUR%s e %sOrientações de TU do AUR%s para mais informações." #: html/home.php #, php-format @@ -220,8 +219,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Lembre-se de votar nos seus pacotes favoritos!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Alguns dos pacotes podem ser fornecidos como binários no repositório [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Alguns dos pacotes podem ser fornecidos como binários no repositório [community]." #: html/home.php msgid "DISCLAIMER" @@ -270,8 +269,8 @@ msgstr "Pedido para Apagar" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Pedido para que um pacote seja removido do Arch User Repository. Por favor não use este pedido se um pacote está danificado e pode ser resolvido facilmente. Contacte o responsável pelo mesmo e faça um Pedido para Tornar Orfão se necessário." #: html/home.php msgid "Merge Request" @@ -313,11 +312,10 @@ msgstr "Discussão" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "A discussão geral sobre o Repositório do Usuário do Arco (AUR) e a estrutura do Usuário Confiável ocorre em %s aur-general %s. Para discussão relacionada ao desenvolvimento da interface da web AUR, use a lista de emails %s aur-dev %s" #: html/home.php msgid "Bug Reporting" @@ -328,8 +326,8 @@ msgstr "Reportar um Bug" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -530,8 +528,8 @@ msgid "Delete" msgstr "Eliminar" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Apenas Utilizadores de Confiança e Programadores podem eliminar pacotes." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -571,8 +569,8 @@ msgid "Disown" msgstr "Renunciar" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Somente Usuários Verificados e Desenvolvedores podem desaprovar pacotes." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -661,8 +659,8 @@ msgid "Merge" msgstr "Fundir" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Apenas Utilizadores de Confiança e Programadores podem fundir pacotes." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -719,8 +717,8 @@ msgid "I accept the terms and conditions above." msgstr "Eu aceito os termos e condições acima mencionados." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Utilizador de Confiança" #: html/tu.php msgid "Could not retrieve proposal details." @@ -731,8 +729,8 @@ msgid "Voting is closed for this proposal." msgstr "A votação está fechada para esta proposta." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Apenas Utilizadores de Confiança podem votar." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1227,7 +1225,7 @@ msgstr "Desenvolvedor" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1330,6 +1328,10 @@ msgstr "" msgid "Normal user" msgstr "Utilizador normal" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Utilizador de confiança" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Conta Suspensa" @@ -1402,15 +1404,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1591,7 +1584,6 @@ msgid "%d pending request" msgid_plural "%d pending requests" msgstr[0] "%d pedido por atender" msgstr[1] "%d pedidos por atender" -msgstr[2] "%d pedidos por atender" #: template/pkgbase_actions.php msgid "Adopt Package" @@ -1835,22 +1827,22 @@ msgstr "Juntar em" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -1866,7 +1858,6 @@ msgid "%d package request found." msgid_plural "%d package requests found." msgstr[0] "%d pedido de pacote encontrado." msgstr[1] "%d pedidos de pacotes encontrados." -msgstr[2] "%d pedidos de pacotes encontrados." #: template/pkgreq_results.php template/pkg_search_results.php #, php-format @@ -1891,7 +1882,6 @@ msgid "~%d day left" msgid_plural "~%d days left" msgstr[0] "" msgstr[1] "" -msgstr[2] "" #: template/pkgreq_results.php #, php-format @@ -1899,7 +1889,6 @@ msgid "~%d hour left" msgid_plural "~%d hours left" msgstr[0] "" msgstr[1] "" -msgstr[2] "" #: template/pkgreq_results.php msgid "<1 hour left" @@ -2028,7 +2017,6 @@ msgid "%d package found." msgid_plural "%d packages found." msgstr[0] "%d pacote encontrado." msgstr[1] "%d pacotes encontrados." -msgstr[2] "%d pacotes encontrados." #: template/pkg_search_results.php msgid "Version" @@ -2111,8 +2099,8 @@ msgid "Registered Users" msgstr "Utilizadores Registados" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Utilizadores de Confiança" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2297,7 +2285,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2351,35 +2339,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/ro.po b/po/ro.po index 0a58d4fc..fa159928 100644 --- a/po/ro.po +++ b/po/ro.po @@ -5,16 +5,15 @@ # Translators: # Arthur Țițeică , 2013-2015 # Lukas Fleischer , 2011 -# Marius Tcaci, 2023 # Mihai Coman , 2011-2014 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Marius Tcaci, 2023\n" -"Language-Team: Romanian (http://app.transifex.com/lfleischer/aurweb/language/ro/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Romanian (http://www.transifex.com/lfleischer/aurweb/language/ro/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -49,7 +48,7 @@ msgstr "" #: html/503.php msgid "Service Unavailable" -msgstr "Serviciu indisponibil" +msgstr "" #: html/503.php msgid "" @@ -78,7 +77,7 @@ msgstr "Nu ai permisiune pentru a modifica acest cont." #: html/account.php lib/acctfuncs.inc.php msgid "Invalid password." -msgstr "Parolă invalidă" +msgstr "" #: html/account.php msgid "Use this form to search existing accounts." @@ -135,16 +134,16 @@ msgid "Type" msgstr "Tip" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Adăugarea unui TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Înlăturarea unui TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Înlăturarea unui TU (inactivitate nedeclarată)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -164,7 +163,7 @@ msgstr "" #: html/commentedit.php template/pkg_comments.php msgid "Edit comment" -msgstr "Editează comentariul" +msgstr "" #: html/home.php template/header.php msgid "Dashboard" @@ -180,7 +179,7 @@ msgstr "" #: html/home.php msgid "My Requests" -msgstr "Cererile mele" +msgstr "" #: html/home.php msgid "My Packages" @@ -188,7 +187,7 @@ msgstr "Pachetele mele" #: html/home.php msgid "Search for packages I maintain" -msgstr "Caută pachetele pe care le intretin" +msgstr "" #: html/home.php msgid "Co-Maintained Packages" @@ -201,10 +200,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Bine ai venit la AUR! Te rog citește %sGhidul utilizatorului AUR%s și %sGhidul AUR TU%s pentru mai multe informații." #: html/home.php #, php-format @@ -218,8 +216,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Nu uita să votezi pentru pachetele tale favorite!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Unele pachete pot fi furnizate ca binare în [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Unele pachete pot fi furnizate ca binare în [community]." #: html/home.php msgid "DISCLAIMER" @@ -229,11 +227,11 @@ msgstr "DECLARAȚIE DE NEASUMARE A RESPONSABILITĂȚII" msgid "" "AUR packages are user produced content. Any use of the provided files is at " "your own risk." -msgstr "Pachetele AUR sunt continut produs de utilizatori. Orice utilizare a fisierelor puse la dispozitie se face pe propriul risc." +msgstr "" #: html/home.php msgid "Learn more..." -msgstr "Descoperă mai multe..." +msgstr "" #: html/home.php msgid "Support" @@ -268,7 +266,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -311,10 +309,9 @@ msgstr "Discuție" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -326,8 +323,8 @@ msgstr "Semnalare buguri" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -528,8 +525,8 @@ msgid "Delete" msgstr "Șterge" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Numai Dezvoltatorii și Trusted Users pot șterge pachete." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -569,7 +566,7 @@ msgid "Disown" msgstr "Abandonează" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -659,8 +656,8 @@ msgid "Merge" msgstr "Fuzionare" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Numai Dezvoltatorii și Trusted Users pot fuziona pachete." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -717,8 +714,8 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Trusted User" #: html/tu.php msgid "Could not retrieve proposal details." @@ -729,8 +726,8 @@ msgid "Voting is closed for this proposal." msgstr "Votarea este închisă pentru această propunere." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Doar Trusted Users au permisiunea să voteze." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1225,8 +1222,8 @@ msgstr "Dezvoltator" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Utilizator de încredere (TU) & Dezvoltator" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1328,6 +1325,10 @@ msgstr "" msgid "Normal user" msgstr "Utilizator obișnuit" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Trusted user" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Cont suspendat" @@ -1400,15 +1401,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1638,7 +1630,7 @@ msgstr "Voturi" #: template/pkgbase_details.php template/pkg_details.php #: template/pkg_search_form.php template/pkg_search_results.php msgid "Popularity" -msgstr "Popularitate" +msgstr "" #: template/pkgbase_details.php template/pkg_details.php msgid "First Submitted" @@ -1833,22 +1825,22 @@ msgstr "Fuzionează" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -1970,7 +1962,7 @@ msgstr "Votat" #: template/pkg_search_form.php msgid "Last modified" -msgstr "Ultima modificare" +msgstr "" #: template/pkg_search_form.php msgid "Ascending" @@ -2109,8 +2101,8 @@ msgid "Registered Users" msgstr "Utilizatori înregistrați" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Trusted users" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2295,7 +2287,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2349,35 +2341,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/ru.po b/po/ru.po index ca2890a2..75550c8c 100644 --- a/po/ru.po +++ b/po/ru.po @@ -18,11 +18,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Kevin Morris , 2021\n" -"Language-Team: Russian (http://app.transifex.com/lfleischer/aurweb/language/ru/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Russian (http://www.transifex.com/lfleischer/aurweb/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -143,16 +143,16 @@ msgid "Type" msgstr "Тип" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Добавление TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Удаление TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Удаление TU (неактивность без уведомлений)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -209,10 +209,9 @@ msgstr "Поиск пакетов, в которых я сопровождающ #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Добро пожаловать в AUR! Пожалуйста, ознакомьтесь с %sРуководством пользователя AUR%s и с %sРуководством доверенного пользователя AUR%s, чтобы узнать больше." #: html/home.php #, php-format @@ -226,8 +225,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Не забывайте голосовать за понравившиеся вам пакеты!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "В хранилище [extra] некоторые пакеты могут быть представлены в бинарном виде." +msgid "Some packages may be provided as binaries in [community]." +msgstr "В хранилище [community] некоторые пакеты могут быть представлены в бинарном виде." #: html/home.php msgid "DISCLAIMER" @@ -276,8 +275,8 @@ msgstr "Запрос на удаление" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Запросить удаление пакета из AUR. Пожалуйста, не используйте это действие, если пакет не собирается и это может быть легко исправлено. Вместо этого, свяжитесь с сопровождающим и отправьте запрос на смену сопровождающего, если необходимо." #: html/home.php msgid "Merge Request" @@ -319,11 +318,10 @@ msgstr "Обсуждение" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Общее обсуждение Пользовательского Репозитория ArchLinux (AUR) и структуры Доверенных Пользователей ведется в %saur-general%s. Для обсуждение разработки веб-интерфейса AUR используйте %saur-dev%s." #: html/home.php msgid "Bug Reporting" @@ -334,9 +332,9 @@ msgstr "Отчет об ошибке" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Если вы нашли баг в интерфейсе AUR, пожалуйста, отправьте сообщение на %sбаг трекер%s. Используйте данный баг трекер %sтолько%s для сообщениях о багах в AUR. Если вы хотите сообщить о баге в пакете, свяжитесь с сопровождающим, или оставьте комментарий на соответствующей странице." #: html/home.php msgid "Package Search" @@ -536,8 +534,8 @@ msgid "Delete" msgstr "Удалить" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Только Доверенные Пользователи и Разработчики могут удалять пакеты." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -577,8 +575,8 @@ msgid "Disown" msgstr "Бросить" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Только Доверенные Пользователи или разработчики могут бросить пакеты." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -667,8 +665,8 @@ msgid "Merge" msgstr "Объединить" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Только Доверенные Пользователи и Разработчики могут объединять пакеты." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -725,8 +723,8 @@ msgid "I accept the terms and conditions above." msgstr "Я принимаю приведённые выше положения и условия." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Доверенный пользователь" #: html/tu.php msgid "Could not retrieve proposal details." @@ -737,8 +735,8 @@ msgid "Voting is closed for this proposal." msgstr "Голосование закрыто." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Только Доверенные Пользователи имеют право голоса." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1233,8 +1231,8 @@ msgstr "Разработчик" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Доверенные пользователи и Разработчики" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1336,6 +1334,10 @@ msgstr "Имя пользователя имя, которое будет ис msgid "Normal user" msgstr "Обычный пользователь" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Доверенный пользователь" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Действие учетной записи приостановлено" @@ -1408,15 +1410,6 @@ msgid "" " the Arch User Repository." msgstr "Следующая информация необходима, только если вы хотите загружать пакеты в AUR." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Публичный SSH ключ" @@ -1842,26 +1835,26 @@ msgstr "Объединить с" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Отправляя запрос удаления, Вы просите Доверенного Пользователя удалить основной пакет. Этот тип запроса должен использоваться для дубликатов, заброшенных, а также незаконных и безнадёжно сломанных пакетов." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Отправляя запрос на слияние, Вы просите Доверенного Пользователя удалить основной пакет, переместить голоса и комментарии к другому основному пакету. Слияние пакета не влияет на соответствующие Git репозитории. Обновите Git историю целевого пакета самостоятельно." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Отправляя сиротский запрос, Вы просите Доверенного Пользователя бросить основной пакет. Пожалуйста, делайте это, только если пакет нуждается в действиях обслуживающего, который недоступен и вы уже пытались связаться с ним ранее." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2122,8 +2115,8 @@ msgid "Registered Users" msgstr "Зарегистрированных пользователей" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Доверенных пользователей" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2308,7 +2301,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2362,35 +2355,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/sk.po b/po/sk.po index a54f145f..76d3d1a8 100644 --- a/po/sk.po +++ b/po/sk.po @@ -4,16 +4,16 @@ # # Translators: # archetyp , 2013-2016 -# Jose Riha , 2018,2022 +# Jose Riha , 2018 # Matej Ľach , 2011 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Jose Riha , 2018,2022\n" -"Language-Team: Slovak (http://app.transifex.com/lfleischer/aurweb/language/sk/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Slovak (http://www.transifex.com/lfleischer/aurweb/language/sk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -77,7 +77,7 @@ msgstr "Nemáte potrebné oprávnenia, pre úpravu tohoto účtu. " #: html/account.php lib/acctfuncs.inc.php msgid "Invalid password." -msgstr "Neplatné heslo." +msgstr "" #: html/account.php msgid "Use this form to search existing accounts." @@ -134,16 +134,16 @@ msgid "Type" msgstr "Typ" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Pridanie TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Odobranie TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Odobranie TU (neohlásená neaktivita)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -167,7 +167,7 @@ msgstr "Editovať komentár" #: html/home.php template/header.php msgid "Dashboard" -msgstr "Nástenka" +msgstr "" #: html/home.php template/header.php msgid "Home" @@ -175,11 +175,11 @@ msgstr "Domov" #: html/home.php msgid "My Flagged Packages" -msgstr "Moje označené balíčky" +msgstr "" #: html/home.php msgid "My Requests" -msgstr "Moje požiadavky" +msgstr "" #: html/home.php msgid "My Packages" @@ -187,23 +187,22 @@ msgstr "Moje balíčky" #: html/home.php msgid "Search for packages I maintain" -msgstr "Hľadať balíčky, ktoré spravujem" +msgstr "" #: html/home.php msgid "Co-Maintained Packages" -msgstr "Spoločne spravované balíčky" +msgstr "" #: html/home.php msgid "Search for packages I co-maintain" -msgstr "Hľadať balíčky, v ktorých pôsobím ako spolupracovník" +msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Vitajte v AUR! Prečítajte si prosím %sAUR smernicu pre užívateľov%s a %sAUR smernicu pre TU%s pre ďalšie informácie." #: html/home.php #, php-format @@ -217,8 +216,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Nezabudnite hlasovať za svoje obľúbené balíčky!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Niektoré balíčky môžu byť poskytnuté ako binárky v [extra]. " +msgid "Some packages may be provided as binaries in [community]." +msgstr "Niektoré balíčky môžu byť poskytnuté ako binárky v [community]. " #: html/home.php msgid "DISCLAIMER" @@ -240,7 +239,7 @@ msgstr "Podpora" #: html/home.php msgid "Package Requests" -msgstr "Žiadosti týkajúce sa balíčkov" +msgstr "Žiadosti ohľadom balíčkov" #: html/home.php #, php-format @@ -267,8 +266,8 @@ msgstr "Žiadosť o vymazanie" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Žiadosť o odstránenie balíčka z AUR. Nepoužívajte prosím túto možnosť v prípade, že balíček je pokazený a možno ho ľahko opraviť. Namiesto toho radšej kontaktujte jeho správcu alebo v prípade nutnosti požiadajte o jeho osirenie." #: html/home.php msgid "Merge Request" @@ -310,11 +309,10 @@ msgstr "Diskusia" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Všeobecná diskusia týkajúca sa Arch Užívateľského Repozitára (AUR) a štruktúry dôverovaných užívateľov (TU) je na %saur-general%s. Na diskusiu týkajúcu sa vývoja AUR webu použite %saur-dev%s mailing list." #: html/home.php msgid "Bug Reporting" @@ -325,9 +323,9 @@ msgstr "Ohlasovanie chýb" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Ak nájdete chybu vo webovom rozhradní AUR, pošlite prosím správu o chybe na náš %sbug tracker%s. Posielajte sem %slen%s chyby webového rozhrania AUR. Pre nahlásenie chýb balíčkov kontaktujte správcu balíčka alebo zanechate komentár na príslušnej stránke balíčka." #: html/home.php msgid "Package Search" @@ -376,7 +374,7 @@ msgstr "Zadajte prihlasovacie údaje" #: html/login.php msgid "User name or primary email address" -msgstr "Meno používateľa alebo primárna e-mailová adresa" +msgstr "" #: html/login.php template/account_delete.php template/account_edit_form.php msgid "Password" @@ -440,7 +438,7 @@ msgstr "Heslo bolo úspešne obnovené." #: html/passreset.php msgid "Confirm your user name or primary e-mail address:" -msgstr "Potvrďte vaše meno používateľa alebo primárnu e-mailovú adresu:" +msgstr "" #: html/passreset.php msgid "Enter your new password:" @@ -527,8 +525,8 @@ msgid "Delete" msgstr "Vymazať" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Len dôverovaní užívatelia a vývojári môžu vymazať balíčky." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -568,8 +566,8 @@ msgid "Disown" msgstr "Vyvlastniť" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Len dôverovaní užívatelia a vývojári môžu vyvlastňovať balíčky." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -658,8 +656,8 @@ msgid "Merge" msgstr "Zlúčiť" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Len dôverovaní užívatelia a vývojári môžu zlúčiť balíčky." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -709,15 +707,15 @@ msgstr "" #: html/tos.php #, php-format msgid "revision %d" -msgstr "revízia: %d" +msgstr "" #: html/tos.php msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Dôverovaný užívateľ (TU)" #: html/tu.php msgid "Could not retrieve proposal details." @@ -728,8 +726,8 @@ msgid "Voting is closed for this proposal." msgstr "Hlasovanie o tomto návrhu bolo ukončené." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Práve hlasovať majú len dôverovaní užívatelia" #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -792,7 +790,7 @@ msgstr "E-mailová adresa nie je platná." #: lib/acctfuncs.inc.php msgid "The backup email address is invalid." -msgstr "Záložná e-mailová adresa nie je platná." +msgstr "" #: lib/acctfuncs.inc.php msgid "The home page is invalid, please specify the full HTTP(s) URL." @@ -1224,8 +1222,8 @@ msgstr "Vývojár" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Dôverovaný užívateľ & Vývojár" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1258,7 +1256,7 @@ msgstr "PGP otlačok kľúča" #: template/account_details.php template/account_search_results.php #: template/pkgreq_results.php msgid "Status" -msgstr "Stav" +msgstr "Status" #: template/account_details.php msgid "Inactive since" @@ -1327,6 +1325,10 @@ msgstr "" msgid "Normal user" msgstr "Normálny užívateľ" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Dôverovaný užívateľ (TU)" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Účet bol pozastavený" @@ -1399,15 +1401,6 @@ msgid "" " the Arch User Repository." msgstr "Nasledujúca informácia je dôležitá iba v prípade, že chcete podať balíčky do AUR." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Verejný SSH kľúč" @@ -1527,7 +1520,7 @@ msgstr "Copyright %s 2004-%d aurweb Development Team." #: template/header.php msgid " My Account" -msgstr " Môj účet" +msgstr "Môj účet" #: template/pkgbase_actions.php msgid "Package Actions" @@ -1821,7 +1814,7 @@ msgstr "Typ žiadosti" #: template/pkgreq_form.php msgid "Deletion" -msgstr "Vymazať" +msgstr "Vymazanie" #: template/pkgreq_form.php msgid "Orphan" @@ -1833,26 +1826,26 @@ msgstr "Zlúčiť do" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Odoslaním žiadosti na vymazanie balíčka žiadate dôverovaného užívateľa t.j. Trusted User, aby vymazal balíček aj s jeho základňou. Tento typ požiadavky by mal použitý pre duplikáty, softvér ku ktorému už nie sú zdroje ako aj nelegálne a neopraviteľné balíčky." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Odoslaním žiadosti na zlúčenie balíčka žiadate dôverovaného užívateľa t.j. Trusted User, aby vymazal balíček aj s jeho základňou a preniesol hlasy a komentáre na inú základňu balíčka. Zlúčenie balíčka nezasiahne prináležiace Git repozitáre, preto sa uistite, že Git história cieľového balíčka je aktuálna." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Odoslaním žiadosti na osirotenie balíčka žiadate dôverovaného užívateľa t.j. Trusted User, aby vyvlastnil balíček aj s jeho základňou. Toto urobte len vtedy, ak balíček vyžaduje zásah od vlastníka, vlastník nie je zastihnuteľný a už ste sa niekoľkokrát pokúšali vlastníka kontaktovať." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -1862,10 +1855,10 @@ msgstr "" #, php-format msgid "%d package request found." msgid_plural "%d package requests found." -msgstr[0] "Bola nájdená %d požiadavka týkajúc sa balíčka." -msgstr[1] "Boli nájdené %d požiadavky týkajúcich sa balíčkov." -msgstr[2] "Bolo nájdených %d požiadaviek týkajúcich sa balíčkov." -msgstr[3] "Bolo nájdených %d požiadaviek týkajúcich sa balíčkov." +msgstr[0] "Bola nájdená %d požiadavka ohľadom balíčkov." +msgstr[1] "Boli nájdené %d požiadavky ohľadom balíčkov." +msgstr[2] "Bolo nájdených %d požiadaviek ohľadom balíčkov." +msgstr[3] "Bolo nájdených %d požiadaviek ohľadom balíčkov." #: template/pkgreq_results.php template/pkg_search_results.php #, php-format @@ -1993,7 +1986,7 @@ msgstr "Vyhľadávať podľa" #: template/pkg_search_form.php template/stats/user_table.php msgid "Out of Date" -msgstr "Neaktuálne" +msgstr "Neaktuálny" #: template/pkg_search_form.php template/search_accounts_form.php msgid "Sort by" @@ -2113,8 +2106,8 @@ msgid "Registered Users" msgstr "Registrovaní užívatelia" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Dôverovaní užívatelia (TU)" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2223,7 +2216,7 @@ msgstr "" msgid "" "If you no longer wish to receive notifications about this package, please go" " to the package page [2] and select \"{label}\"." -msgstr "Ak si už viac neželáte dostávať upozornenia na tento balíček, prejdite prosím na stránku balíčku [2] a vyberte \"{label}\"." +msgstr "" #: scripts/notify.py #, python-brace-format @@ -2287,7 +2280,7 @@ msgid "" "\n" "-- \n" "If you no longer wish receive notifications about the new package, please go to [3] and click \"{label}\"." -msgstr "{user} [1] zlúčil(a) {old} [2] do {new} [3].\n\n-- \nAk si už viac neželáte dostávať upozornenia na tento balíček, prejdite prosím na stránku balíčku [2] a vyberte \"{label}\"." +msgstr "" #: scripts/notify.py #, python-brace-format @@ -2295,11 +2288,11 @@ msgid "" "{user} [1] deleted {pkgbase} [2].\n" "\n" "You will no longer receive notifications about this package." -msgstr "{user} [1] odstránil(a) {pkgbase} [2].\n\nUpozornenia na tento balíček už viac nebudete dostávať." +msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2346,42 +2339,10 @@ msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "Súvisiace komentáre k žiadosti o uzatvorenie balíčka..." +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "Táto operácia uzavrie všetky súvisiace nevybavené žiadosti balíčkov. Ak %sComments%s vynecháte, použije sa automaticky generovaný komentár." - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." msgstr "" diff --git a/po/sr.po b/po/sr.po index becffa33..dae37bcd 100644 --- a/po/sr.po +++ b/po/sr.po @@ -9,11 +9,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Slobodan Terzić , 2011-2012,2015-2017\n" -"Language-Team: Serbian (http://app.transifex.com/lfleischer/aurweb/language/sr/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Serbian (http://www.transifex.com/lfleischer/aurweb/language/sr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -134,16 +134,16 @@ msgid "Type" msgstr "Vrsta" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Dodavanje TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Uklanjanje TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Uklanjanje TU (nedeklarisana neaktivnost)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -200,10 +200,9 @@ msgstr "Pretraži pakete koje koodržavam" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Dobrodošli u AUR! Molimo pročitajte %sSmernice za korisnike AUR-a%s i %sSmernice za poverljive korinike%s za više informacija." #: html/home.php #, php-format @@ -217,8 +216,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Ne zaboravite da glasate za omiljene pakete!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Neki paketi se dostavljaju u binarnom obliku u riznici [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Neki paketi se dostavljaju u binarnom obliku u riznici [community]." #: html/home.php msgid "DISCLAIMER" @@ -267,8 +266,8 @@ msgstr "Zahtevi za brisanje" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "zahtev za brisanje paketa iz Arčove Korisničke Riznice. Ne koristite ovo ako je paket polomljen i može se lako ispraviti. Umesto toga, kontaktirajte održavaoca paketa i podnesite zahtev za odricanje ukoliko je potreban." #: html/home.php msgid "Merge Request" @@ -310,11 +309,10 @@ msgstr "Diskusija" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Opšta diskusija vezana za Arčovu Korisničku Riznicu (AUR) i strukturu Poverljivih korisnika se vodi na dopisnoj listi %saur-general%s.Za diskusiju o razvoju samog web sučelja AUR-a, pogedajte dopisnu listu %saur-dev%s." #: html/home.php msgid "Bug Reporting" @@ -325,9 +323,9 @@ msgstr "Prijavljivanje grešaka" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Ukoliko nađete grešku u web sučelju AUR-a. molimo da je prijavite na našem %sbubolovcu%s. Bubolovac koristite %sisključivo%s za prjavljivanje grešaka u samom AUR-u. Za prijavu grešaka u samim paketima kontaktirajte održavaoce paketa ili ostavite komentar na odgovarajućoj stranici paketa." #: html/home.php msgid "Package Search" @@ -527,8 +525,8 @@ msgid "Delete" msgstr "Obriši" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Samo Poverljivi korisnici i Programeri mogu brisati pakete." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -568,8 +566,8 @@ msgid "Disown" msgstr "Odrekni se" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Samo Poverljivi korisnici i Programeri mogu vršiti odricanje paketa." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -658,8 +656,8 @@ msgid "Merge" msgstr "Spoji" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Samo Poverljivi korisnici i Programeri mogu da spajaju pakete." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -716,8 +714,8 @@ msgid "I accept the terms and conditions above." msgstr "Prihvatam gore navedene uslove." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Poverljivi korisnik" #: html/tu.php msgid "Could not retrieve proposal details." @@ -728,8 +726,8 @@ msgid "Voting is closed for this proposal." msgstr "Glasanje o ovom predlogu je završeno." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Samo poverljivi korisnici mogu da glasaju." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1224,8 +1222,8 @@ msgstr "Programer" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Poverljivi korisnik i programer" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1327,6 +1325,10 @@ msgstr "Vaše korisničko ime kojim se prijavljujete. Vidljivo je u javnosti, č msgid "Normal user" msgstr "Običan korisnik" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Poverljivi korisnik" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Nalog je suspendovan" @@ -1399,15 +1401,6 @@ msgid "" " the Arch User Repository." msgstr "Sledeće informacije su neophodne ako želite da prilažete pakete u Arčovu korisničku riznicu." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Javni SSH ključ" @@ -1832,26 +1825,26 @@ msgstr "Stopi sa" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Podnošenjem zahteva za brisanje tražili ste of poverljivog korisnika da obriše bazu paketa. Ovaj tip zahteva treba koristiti za duplikate, uzvodno napušten softver, kao i nelegalne ili nepopravljivo pokvarene pakete." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Podnošenjem zahteva za spajanje tražili ste of poverljivog korisnika da obriše bazu paketa i spoji njene glasove sa drugom bazom paketa. Spajanje paketa ne utiče na pripadajuće Git riznice. Postarajte se sami da ažurirate Git istorijat ciljanog paketa." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Podnošenjem zahteva za odricanje tražili ste od poverljivog korisnika da izvrži odricanje od baze paketa. Molimo da ovo tražite samo ukoliko paket zahteva održavanje, a održavalac je nedosupan i već ste pokušali da ga kontaktirate." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2108,8 +2101,8 @@ msgid "Registered Users" msgstr "Registrovanih korisnika" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Poverljivih korisnika" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2294,7 +2287,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2348,35 +2341,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/sr_RS.po b/po/sr_RS.po index cfe5b5d3..985ee007 100644 --- a/po/sr_RS.po +++ b/po/sr_RS.po @@ -7,11 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Nikola Stojković , 2013\n" -"Language-Team: Serbian (Serbia) (http://app.transifex.com/lfleischer/aurweb/language/sr_RS/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Serbian (Serbia) (http://www.transifex.com/lfleischer/aurweb/language/sr_RS/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -132,15 +132,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -198,9 +198,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -215,7 +214,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "Не заборави да гласаш за омиљене пакете!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -265,7 +264,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -308,10 +307,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -323,8 +321,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -525,7 +523,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -566,7 +564,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -656,7 +654,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -714,7 +712,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -726,7 +724,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1222,7 +1220,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1325,6 +1323,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1397,15 +1399,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1830,22 +1823,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2106,7 +2099,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2292,7 +2285,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2346,35 +2339,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/sv_SE.po b/po/sv_SE.po index 651b8bfb..6d09e207 100644 --- a/po/sv_SE.po +++ b/po/sv_SE.po @@ -4,19 +4,18 @@ # # Translators: # Johannes Löthberg , 2015-2016 -# Kevin Morris , 2022 # Kim Svensson , 2011 # Kim Svensson , 2012 -# Luna Jernberg , 2021-2023 +# Luna Jernberg , 2021 # Robin Björnsvik , 2014-2015 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Luna Jernberg , 2021-2023\n" -"Language-Team: Swedish (Sweden) (http://app.transifex.com/lfleischer/aurweb/language/sv_SE/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Swedish (Sweden) (http://www.transifex.com/lfleischer/aurweb/language/sv_SE/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -37,17 +36,17 @@ msgstr "Notera" #: html/404.php msgid "Git clone URLs are not meant to be opened in a browser." -msgstr "git clone URLs är inte avsedda att öppnas i en webbläsare." +msgstr "" #: html/404.php #, php-format msgid "To clone the Git repository of %s, run %s." -msgstr "För att klona Git-förrådet för %s, kör %s." +msgstr "" #: html/404.php #, php-format msgid "Click %shere%s to return to the %s details page." -msgstr "Klicka %shär%s för att återgå till %sdetaljsidan." +msgstr "" #: html/503.php msgid "Service Unavailable" @@ -137,16 +136,16 @@ msgid "Type" msgstr "Typ" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "Tillägg av en paketunderhållare" +msgid "Addition of a TU" +msgstr "Tillägg av en TU" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "Borttagning av en paketunderhållare" +msgid "Removal of a TU" +msgstr "Borttagning av en TU" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "Borttagning av en paketunderhållare (odeklarerad inaktivitet)" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Borttagning av en TU (odeklarerad inaktivitet)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -170,7 +169,7 @@ msgstr "Redigera kommentar" #: html/home.php template/header.php msgid "Dashboard" -msgstr "Informationspanel" +msgstr "" #: html/home.php template/header.php msgid "Home" @@ -198,15 +197,14 @@ msgstr "Sam-ansvariga paket" #: html/home.php msgid "Search for packages I co-maintain" -msgstr "Sök efter paket jag är sam-ansvarig för" +msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "Välkommen till AUR! Vänligen läs %sAUR användarriktlinjer%s för mer information och %sAUR Inlämningsriktlinjer%s om du vill bidra med en PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Välkommen till AUR! Var god och läs %sAUR User Guidelines%s och %sAUR TU Guidelines%s för mer information" #: html/home.php #, php-format @@ -220,8 +218,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Kom ihåg att rösta på dina favorit paket!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Några paket kan vara tillhandahållna som binära filer i [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Några paket kan vara tillhandahållna som binära filer i [community]." #: html/home.php msgid "DISCLAIMER" @@ -270,8 +268,8 @@ msgstr "Raderings förfrågan" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "Begär att ett paket tas bort från Arch User Repository. Vänligen använd inte detta om ett paket är trasigt och lätt kan fixas. Kontakta istället underhållaren och lämna in begäran om ett föräldralöst paket vid behov." +"the package maintainer and file orphan request if necessary." +msgstr "Begär att ett paket ska bli borttaget från Arch User Repository. Snälla använd inte detta om packetet bara är trasigt och kan enkelt bli fixat. Kontakta paket ansvarige istället, och begär att paketet ska bli herrelöst" #: html/home.php msgid "Merge Request" @@ -313,11 +311,10 @@ msgstr "Diskussion" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "Allmän diskussion om Arch User Repository (AUR) och Paketunderhållar-strukturen äger rum på %saur-general%s. För diskussion som rör utvecklingen om AUR-webbgränssnittet, använd %saur-dev%s mailinglistan." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Generella diskussioner om Arch User Repository (AUR) och Trusted User strukturen tar plats på %saur-general%s. För diskussioner om utvecklingen av AUR web interfacet, använd %saur-dev%s maillistan." #: html/home.php msgid "Bug Reporting" @@ -328,9 +325,9 @@ msgstr "Bugg Rapportering" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "Om du hittar ett fel i AUR-webbgränssnittet, vänligen fyll i en felrapport på våran %sfelspårare%s. Använd felspåraren för att rapportera buggar i AUR-webbgränssnittet %sendast%s. För att rapportera paketbuggar kontakta underhållaren eller lämna en kommentar på lämplig paketsida." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Om du hittar en bug i AUR webbgränssnittet, var snäll och fyll i en rapport i vårt %särendehanteringssystem%s. Använd systemet %sbara%s för buggar i webbgränssnittet. För att raportera paketbuggar kontakta den som är ansvarig för paketet istället, eller lämna en kommentar på paketets sida." #: html/home.php msgid "Package Search" @@ -462,7 +459,7 @@ msgstr "Fortsätt" msgid "" "If you have forgotten the user name and the primary e-mail address you used " "to register, please send a message to the %saur-general%s mailing list." -msgstr "Om du har glömt användarnamnet och den primära e-postadress som du använde för att registrera dig, vänligen skicka ett meddelande till %saur-general%s e-postlistan." +msgstr "" #: html/passreset.php msgid "Enter your user name or your primary e-mail address:" @@ -482,7 +479,7 @@ msgstr "De valda paketen har inte gjorts herrelösa, kryssa i konfirmationsrutan msgid "" "The selected packages have not been adopted, check the confirmation " "checkbox." -msgstr "De valda paketen har inte adopteras, markera kryssrutan för bekräftelse." +msgstr "" #: html/pkgbase.php lib/pkgreqfuncs.inc.php msgid "Cannot find package to merge votes and comments into." @@ -530,8 +527,8 @@ msgid "Delete" msgstr "Radera" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "Endast paketunderhållare och utvecklare kan ta bort paket." +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Bara Trusted Users och Developers kan radera paket." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -548,7 +545,7 @@ msgstr "Använd det här formuläret för att göra paket basen %s%s%s och de f msgid "" "By selecting the checkbox, you confirm that you want to no longer be a " "package co-maintainer." -msgstr "Genom att markera kryssrutan bekräftar du att du inte längre vill vara sam-ansvarig för paket." +msgstr "" #: html/pkgdisown.php #, php-format @@ -571,8 +568,8 @@ msgid "Disown" msgstr "Gör herrelös" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "Endast Paketunderhållare och utvecklare kan göra paket herrelösa" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Bara Trusted Users och Developers kan göra paket herrelösa." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -588,7 +585,7 @@ msgid "" " package version in the AUR does not match the most recent commit. Flagging " "this package should only be done if the sources moved or changes in the " "PKGBUILD are required because of recent upstream changes." -msgstr "Detta verkar vara ett VCS-paket. Flagga den %sinte%s som inaktuell om paketversionen i AUR inte matchar den mest senaste commit. Flaggning av detta paket bör endast göras om källkoden har flyttats eller ändringar i PKGBUILD krävs på grund av de senaste uppströmsändringarna." +msgstr "" #: html/pkgflag.php #, php-format @@ -661,8 +658,8 @@ msgid "Merge" msgstr "Slå ihop" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "Endast paketunderhållare och utvecklare kan slå samman paket." +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Bara Trusted Users och Developers kan slå ihop paket." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -719,8 +716,8 @@ msgid "I accept the terms and conditions above." msgstr "Jag accepterar villkoren ovan." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "Paketunderhållare" +msgid "Trusted User" +msgstr "Trusted User" #: html/tu.php msgid "Could not retrieve proposal details." @@ -731,8 +728,8 @@ msgid "Voting is closed for this proposal." msgstr "Röstning för detta förslag är stängt." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "Endast paketunderhållare tillåts rösta." +msgid "Only Trusted Users are allowed to vote." +msgstr "Bara Trusted Users är tillåtna att rösta." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -977,7 +974,7 @@ msgstr "Paket detaljer kunde inte hittas." #: aurweb/routers/auth.py msgid "Bad Referer header." -msgstr "Dåligt referenshuvud." +msgstr "" #: aurweb/routers/packages.py msgid "You did not select any packages to be notified about." @@ -985,19 +982,19 @@ msgstr "Du har inte valt några paket att notifieras om." #: aurweb/routers/packages.py msgid "The selected packages' notifications have been enabled." -msgstr "De valda paket aviseringar har aktiverats." +msgstr "" #: aurweb/routers/packages.py msgid "You did not select any packages for notification removal." -msgstr "Du har inte valt några paket för notifieringsborttagning." +msgstr "" #: aurweb/routers/packages.py msgid "A package you selected does not have notifications enabled." -msgstr "Ett paket du valde har inga notifieringar aktiverade." +msgstr "" #: aurweb/routers/packages.py msgid "The selected packages' notifications have been removed." -msgstr "De valda paketens notifieringar har blivit borttagna." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can flag packages." @@ -1049,7 +1046,7 @@ msgstr "Du måste vara inloggad före du kan adoptera paket." #: aurweb/routers/package.py msgid "You are not allowed to adopt one of the packages you selected." -msgstr "Du är inte tillåten att adoptera ett av paketen du valde." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can disown packages." @@ -1057,7 +1054,7 @@ msgstr "Du måste vara inloggad före du kan göra paket härrelösa." #: aurweb/routers/packages.py msgid "You are not allowed to disown one of the packages you selected." -msgstr "Du har inte tillåtelse att göra ett av paketen du valde herrelöst." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You did not select any packages to adopt." @@ -1227,8 +1224,8 @@ msgstr "Developer" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "Paketunderhållare & Utvecklare" +msgid "Trusted User & Developer" +msgstr "Trusted User & Developer" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1330,6 +1327,10 @@ msgstr "Ditt användarnamn är det namn du kommer att använda för att logga in msgid "Normal user" msgstr "Normal användare" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Trusted user" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Konto avstängt" @@ -1353,7 +1354,7 @@ msgid "" "If you do not hide your email address, it is visible to all registered AUR " "users. If you hide your email address, it is visible to members of the Arch " "Linux staff only." -msgstr "Om du inte döljer din e-postadress är den synlig för alla registrerade AUR-användare. Om du döljer din e-postadress är den endast synlig för medlemmar av Arch Linux-personalen." +msgstr "" #: template/account_edit_form.php msgid "Backup Email Address" @@ -1369,14 +1370,14 @@ msgstr "Ange eventuellt en sekundär e-postadress som kan användas för att åt msgid "" "Password reset links are always sent to both your primary and your backup " "email address." -msgstr "Länkar för återställning av lösenord skickas alltid till både din primära och din reserv epostadress." +msgstr "" #: template/account_edit_form.php #, php-format msgid "" "Your backup email address is always only visible to members of the Arch " "Linux staff, independent of the %s setting." -msgstr "Din backup-e-postadress är alltid endast synlig för medlemmar av Arch Linux-personalen, oberoende av %s inställningen." +msgstr "" #: template/account_edit_form.php msgid "Language" @@ -1402,15 +1403,6 @@ msgid "" " the Arch User Repository." msgstr "Den följande informationen är bara nödvändig om du vill ladda upp paket till Arch User Repository." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "Specificera flera SSH-nycklar separerade med en ny rad, tomma rader ignoreras." - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "Dölj borttagna kommentarer" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "SSH publik nyckel" @@ -1443,7 +1435,7 @@ msgstr "Ditt nuvarande lösenord" msgid "" "To protect the AUR against automated account creation, we kindly ask you to " "provide the output of the following command:" -msgstr "För att skydda AUR mot automatiskt kontoskapande ber vi dig att tillhandahålla utdata från följande kommando:" +msgstr "" #: template/account_edit_form.php msgid "Answer" @@ -1662,7 +1654,7 @@ msgstr "Lägg till kommentar" msgid "" "Git commit identifiers referencing commits in the AUR package repository and" " URLs are converted to links automatically." -msgstr "Git commit-identifierare som refererar till commits i AUR-paketförrådet och URL:er konverteras automatiskt till länkar." +msgstr "" #: template/pkg_comment_form.php #, php-format @@ -1834,26 +1826,26 @@ msgstr "Slå ihop i" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "Genom att skicka en begäran om borttagning ber du en paketunderhållare att ta bort paketbasen. Denna typ av begäran bör användas för dubbletter, programvara som överges av uppström, såväl som olagliga och irreparabelt trasiga paket." +msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "Genom att skicka in en sammanslagningsförfrågan ber du en paketunderhållare att ta bort paketbasen och överföra dess röster och kommentarer till en annan paketbas. Att slå samman ett paket påverkar inte motsvarande Git-förråd. Se till att du själv uppdaterar Git-historiken för målpaketet." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "Genom att skicka in en föräldralös begäran ber du en paketunderhållare att göra paketbasen herrelös. Vänligen gör bara detta om paketet behöver underhållsåtgärder, underhållaren är MIA och du redan försökt kontakta underhållaren tidigare." +msgstr "" #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -1915,7 +1907,7 @@ msgstr "Stäng" #: template/pkgreq_results.php msgid "Pending" -msgstr "Väntar på" +msgstr "" #: template/pkgreq_results.php msgid "Closed" @@ -2034,7 +2026,7 @@ msgstr "Version" msgid "" "Popularity is calculated as the sum of all votes with each vote being " "weighted with a factor of %.2f per day since its creation." -msgstr "Populäritet räknas ut som summan av alla röster, och alla röster har en vikt med en faktor av %.2f per dag sedan den skapades. " +msgstr "" #: template/pkg_search_results.php template/tu_details.php #: template/tu_list.php @@ -2106,8 +2098,8 @@ msgid "Registered Users" msgstr "Registrerade användare" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "Paketunderhållare" +msgid "Trusted Users" +msgstr "Trusted Users" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2188,18 +2180,18 @@ msgid "" "A password reset request was submitted for the account {user} associated " "with your email address. If you wish to reset your password follow the link " "[1] below, otherwise ignore this message and nothing will happen." -msgstr "En begäran om lösenordsåterställning skickades för kontot {user} som är kopplat till din e-postadress. Om du vill återställa ditt lösenord, följ länken [1] nedan, annars ignorera detta meddelande och ingenting kommer att hända." +msgstr "" #: scripts/notify.py msgid "Welcome to the Arch User Repository" -msgstr "Välkommen till Arch User Repository" +msgstr "" #: scripts/notify.py msgid "" "Welcome to the Arch User Repository! In order to set an initial password for" " your new account, please click the link [1] below. If the link does not " "work, try copying and pasting it into your browser." -msgstr "Välkommen till Arch User Repository! För att ställa in ett första lösenord för ditt nya konto, klicka på länken [1] nedan. Om länken inte fungerar, försök att kopiera och klistra in den i din webbläsare." +msgstr "" #: scripts/notify.py #, python-brace-format @@ -2216,7 +2208,7 @@ msgstr "{user} [1] lade till följande kommentar till {pkgbase} [2]:" msgid "" "If you no longer wish to receive notifications about this package, please go" " to the package page [2] and select \"{label}\"." -msgstr "Om du inte längre vill få meddelanden om detta paket, gå till paketsidan [2] och välj \"{label}\"." +msgstr "" #: scripts/notify.py #, python-brace-format @@ -2226,47 +2218,47 @@ msgstr "AUR paket uppdatering: {pkgbase}" #: scripts/notify.py #, python-brace-format msgid "{user} [1] pushed a new commit to {pkgbase} [2]." -msgstr "{user} [1] knuffade en ny commit till {pkgbase} [2]." +msgstr "" #: scripts/notify.py #, python-brace-format msgid "AUR Out-of-date Notification for {pkgbase}" -msgstr "AUR inaktuell avisering för {pkgbase}" +msgstr "" #: scripts/notify.py #, python-brace-format msgid "Your package {pkgbase} [1] has been flagged out-of-date by {user} [2]:" -msgstr "Ditt paket {pkgbase} [1] har flaggats som inaktuellt av {user} [2]:" +msgstr "" #: scripts/notify.py #, python-brace-format msgid "AUR Ownership Notification for {pkgbase}" -msgstr "AUR-ägarskapsmeddelande för {pkgbase}" +msgstr "" #: scripts/notify.py #, python-brace-format msgid "The package {pkgbase} [1] was adopted by {user} [2]." -msgstr "Paketet {pkgbase} [1] adopterades av {user} [2]." +msgstr "" #: scripts/notify.py #, python-brace-format msgid "The package {pkgbase} [1] was disowned by {user} [2]." -msgstr "Paketet {pkgbase} [1] gjordes herrelöst av {user} [2]." +msgstr "" #: scripts/notify.py #, python-brace-format msgid "AUR Co-Maintainer Notification for {pkgbase}" -msgstr "AUR sam-ansvarig meddelande för {pkgbase}" +msgstr "" #: scripts/notify.py #, python-brace-format msgid "You were added to the co-maintainer list of {pkgbase} [1]." -msgstr "Du blev tillagd till sam-ansvarig listan för {pkgbase} [1]." +msgstr "" #: scripts/notify.py #, python-brace-format msgid "You were removed from the co-maintainer list of {pkgbase} [1]." -msgstr "Du blev borttagen från sam-ansvarig listan för {pkgbase} [1]." +msgstr "" #: scripts/notify.py #, python-brace-format @@ -2280,7 +2272,7 @@ msgid "" "\n" "-- \n" "If you no longer wish receive notifications about the new package, please go to [3] and click \"{label}\"." -msgstr "{user} [1] slog ihop {old} [2] till {new} [3].\n\n--\nOm du inte längre vill få meddelanden om det nya paketet, gå till [3] och klicka på \"{label}\"." +msgstr "" #: scripts/notify.py #, python-brace-format @@ -2288,19 +2280,19 @@ msgid "" "{user} [1] deleted {pkgbase} [2].\n" "\n" "You will no longer receive notifications about this package." -msgstr "{user} [1] raderade {pkgbase} [2].\n\nDu kommer inte längre att få aviseringar om detta paket." +msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "Paketunderhållare röstningspåminnelse Förslag {id}" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "" #: scripts/notify.py #, python-brace-format msgid "" "Please remember to cast your vote on proposal {id} [1]. The voting period " "ends in less than 48 hours." -msgstr "Kom ihåg att lägga din röst på förslaget {id} [1]. Omröstningsperioden slutar om mindre än 48 timmar." +msgstr "" #: aurweb/routers/accounts.py msgid "Invalid account type provided." @@ -2316,65 +2308,33 @@ msgstr "Du har inte behörighet att ändra den här användarens kontotyp till % #: aurweb/packages/requests.py msgid "No due existing orphan requests to accept for %s." -msgstr "Inga befintliga herrelösa begäranden att acceptera för %s." +msgstr "" #: aurweb/asgi.py msgid "Internal Server Error" -msgstr "Internt serverfel" +msgstr "" #: templates/errors/500.html msgid "A fatal error has occurred." -msgstr "Ett allvarligt fel har inträffat." +msgstr "" #: templates/errors/500.html msgid "" "Details have been logged and will be reviewed by the postmaster posthaste. " "We apologize for any inconvenience this may have caused." -msgstr "Detaljer har loggats och kommer att granskas av postmästaren så snabbt som möjligt. Vi ber om ursäkt för eventuella besvär som detta kan ha orsakat." +msgstr "" #: aurweb/scripts/notify.py msgid "AUR Server Error" -msgstr "AUR serverfel" +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "Relaterade paketförfrågningar stängningskommentar..." +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "Denna åtgärd kommer att stänga alla väntande paketförfrågningar relaterade till det paketet. %sOm kommentarer%s utelämnas kommer en stängningskommentar att automatiskt genereras." - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "tilldelade" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "Visa %d mer" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "beroenden" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "Kontot har inte raderas, markera kryssrutan för bekräftelse." - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "Avbryt" - -#: templates/requests.html -msgid "Package name" -msgstr "Paketnamn" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "Observera att om du döljer din e-postadress hamnar den på BCC-listan för eventuella begärandemeddelanden. Om någon svarar på dessa aviseringar kommer du inte att få något e-postmeddelande. Svaren skickas dock vanligtvis till e-postlistan och kommer då att vara synliga i arkivet." +msgstr "" diff --git a/po/tr.po b/po/tr.po index 8742b919..83b1e4df 100644 --- a/po/tr.po +++ b/po/tr.po @@ -5,7 +5,7 @@ # Translators: # tarakbumba , 2011,2013-2015 # tarakbumba , 2012,2014 -# Demiray Muhterem , 2015,2020-2022 +# Demiray Muhterem , 2015,2020-2021 # Koray Biçer , 2020 # Lukas Fleischer , 2011 # Samed Beyribey , 2012 @@ -15,11 +15,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Demiray Muhterem , 2015,2020-2022\n" -"Language-Team: Turkish (http://app.transifex.com/lfleischer/aurweb/language/tr/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Turkish (http://www.transifex.com/lfleischer/aurweb/language/tr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -140,16 +140,16 @@ msgid "Type" msgstr "Tür" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Bir GK ekleme" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Bir GK çıkartma" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Bir GK çıkartma (bildirilmemiş hareketsizlik)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -206,10 +206,9 @@ msgstr "Birlikte baktığım paketleri ara" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "AUR'a hoş geldiniz! Bilgi almak için lütfen %sAUR Kullanıcı Rehberi%s ve %sGK Rehberini%s okuyun." #: html/home.php #, php-format @@ -223,8 +222,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Beğendiğiniz paketleri oylamayı unutmayın!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Burada listelenen paketlerin bazıları [extra] deposunda yer almaktadır." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Burada listelenen paketlerin bazıları [community] deposunda yer almaktadır." #: html/home.php msgid "DISCLAIMER" @@ -273,8 +272,8 @@ msgstr "Silme Talebi" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Bir paketin Arch Kullanıcı Deposundan kaldırılması talebidir. Lütfen bunu, bir paket çalışmıyor fakat kolayca düzeltilebiliyorsa kullanmayın. Bunun yerine, paket bakımcısı ile iletişim kurun ve mecbur kalınırsa paketin sahipsiz bırakılması talebinde bulunun." #: html/home.php msgid "Merge Request" @@ -316,11 +315,10 @@ msgstr "Tartışma" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Arch Kullanıcı Deposu (AUR) ve Güvenilir Kullanıcı yapısı ile ilgili genel tartışmalar %saur-general%s üzerinde yapılır. AUR web arayüzü geliştirme süreci ilgili tartışmalar %saur-dev%s listesinde yapılmaktadır." #: html/home.php msgid "Bug Reporting" @@ -331,9 +329,9 @@ msgstr "Hata Bildirimi" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "AUR web arayüzünde bir hata bulursanız, lütfen %s hata izleyicimiz %s üzerinde bir hata raporu doldurun. AUR web arayüzündeki %s hataları raporlamak için sadece %s izleyiciyi kullanın . Paketleme hatalarını bildirmek için paket bakıcısına başvurun veya ilgili paket sayfasına yorum yapın." #: html/home.php msgid "Package Search" @@ -533,8 +531,8 @@ msgid "Delete" msgstr "Sil" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Sadece geliştiriciler ve güvenilir kullanıcılar paket silebilir." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -574,8 +572,8 @@ msgid "Disown" msgstr "Sorumluluğunu bırak" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Sadece geliştiriciler ve güvenilir kullanıcılar paketleri sahipsiz bırakabilir." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -664,8 +662,8 @@ msgid "Merge" msgstr "Birleştir" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Sadece geliştiriciler ve güvenilir kullanıcılar paket birleştirebilir." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -722,8 +720,8 @@ msgid "I accept the terms and conditions above." msgstr "Yukarıdaki şartlar ve koşulları kabul ediyorum." #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Güvenilen Kullanıcı" #: html/tu.php msgid "Could not retrieve proposal details." @@ -734,8 +732,8 @@ msgid "Voting is closed for this proposal." msgstr "Bu öneri için oylama kapanmıştır." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Sadece Güvenilir Kullanıcılar oy kullanabilir." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1230,8 +1228,8 @@ msgstr "Geliştirici" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Güvenilir Kullanıcı & Geliştirici" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1333,6 +1331,10 @@ msgstr "Kullanıcı adınız, oturum açmak için kullanacağınız addır. Hesa msgid "Normal user" msgstr "Normal kullanıcı" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Güvenilen kullanıcı" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Hesap Donduruldu" @@ -1405,15 +1407,6 @@ msgid "" " the Arch User Repository." msgstr "Aşağıdaki bilgi sadece Arch Kullanıcı Deposu' na paket göndermek istiyorsanız gereklidir." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "SSH Kamu Anahtarı" @@ -1837,26 +1830,26 @@ msgstr "Şununla ilişkilendir:" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Silme talebi göndererek, Güvenilir Kullanıcıdan paketi silmesini istiyorsunuz. Bu tür bir istek birden fazla olan paketlerde, geliştirilmesi durdurulmuş yazılımlarda, ve aynı zamanda yasadışı ve onarılamaz bozuklukta olan paketler için kullanılmalıdır." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Birleştirme talebi göndererek, Güvenilir Kullanıcıdan paketi silmesini ve bu paketin oylarını ve yorumlarını diğer pakete transfer etmesini istiyorsunuz. Bir paketi birleştirmek ilgili Git deposunu etkilemeyecektir. Hedef paketin Git geçmişini bizzat güncellediğinizden emin olun. " #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Bir sahipsiz istek göndererek, Güvenilir Kullanıcıdan paket tabanını reddetmesini istersiniz. Lütfen bunu yalnızca paketin sürdürme eylemine ihtiyacı varsa, sürdürücü MIA ise ve daha önce bakım görevlisine başvurmayı denediyseniz yapın." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2109,8 +2102,8 @@ msgid "Registered Users" msgstr "Kayıtlı Kullanıcılar" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Güvenilen Kullanıcılar" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2295,8 +2288,8 @@ msgstr "{user} [1] {pkgbase} [2] paketini sildi.\n\nArtık bu paket hakkında bi #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "TU Oylama Hatırlatıcısı: Teklif {id}" #: scripts/notify.py #, python-brace-format @@ -2323,61 +2316,29 @@ msgstr "%s için kabul edilecek sahipsize gereksinim yok." #: aurweb/asgi.py msgid "Internal Server Error" -msgstr "İç Sunucu Hatası" +msgstr "" #: templates/errors/500.html msgid "A fatal error has occurred." -msgstr "Önemli bir hata oluştu." +msgstr "" #: templates/errors/500.html msgid "" "Details have been logged and will be reviewed by the postmaster posthaste. " "We apologize for any inconvenience this may have caused." -msgstr "Ayrıntılar günlüğe kaydedildi ve posta yöneticisi tarafından gözden geçirilecek. Bunun neden olabileceği rahatsızlıktan dolayı özür dileriz." +msgstr "" #: aurweb/scripts/notify.py msgid "AUR Server Error" -msgstr "AUR Sunucu Hatası" +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "İlgili paket isteği kapatma yorumları..." +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "Bu eylem, kendisiyle ilgili bekleyen paket isteklerini kapatacaktır. %s Yorum %s atlanırsa, bir kapatma yorumu otomatik olarak oluşturulur." - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." msgstr "" diff --git a/po/uk.po b/po/uk.po index 040c5085..a4410185 100644 --- a/po/uk.po +++ b/po/uk.po @@ -7,16 +7,16 @@ # Rax Garfield , 2012 # Rax Garfield , 2012 # Vladislav Glinsky , 2019 -# Yarema aka Knedlyk , 2011-2018,2022 +# Yarema aka Knedlyk , 2011-2018 # Данило Коростіль , 2011 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: Yarema aka Knedlyk , 2011-2018,2022\n" -"Language-Team: Ukrainian (http://app.transifex.com/lfleischer/aurweb/language/uk/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Ukrainian (http://www.transifex.com/lfleischer/aurweb/language/uk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -80,7 +80,7 @@ msgstr "У вас недостатньо прав для редагування #: html/account.php lib/acctfuncs.inc.php msgid "Invalid password." -msgstr "Неправильний пароль" +msgstr "" #: html/account.php msgid "Use this form to search existing accounts." @@ -137,16 +137,16 @@ msgid "Type" msgstr "Тип" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "Додавання довіреного користувача" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "Вилучення довіреного користувача" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "Вилучення довіреного користувача (неоголошена бездіяльність)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -203,10 +203,9 @@ msgstr "Пошук пакунків з сумісним супроводом" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "Раді вітати вас в «AUR» — у сховищі користувацьких пакунків. Розширена довідка надана в %sінструкції користувача AUR%s та %sінструкції довіреного користувача (TU) AUR%s." #: html/home.php #, php-format @@ -220,8 +219,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "Не забудьте проголосувати за улюблені пакунки!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "Деякі пакунки можуть бути в бінарному вигляді у сховищі [extra]." +msgid "Some packages may be provided as binaries in [community]." +msgstr "Деякі пакунки можуть бути в бінарному вигляді у сховищі [community]." #: html/home.php msgid "DISCLAIMER" @@ -270,8 +269,8 @@ msgstr "Запит щодо вилучення" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "Запит щодо вилучення пакунку зі сховища користувацьких пакунків AUR. Будь ласка, не використовуйте його, якщо пакунок містить проблеми, які можна легко виправити. Натомість зв’яжіться з супровідником пакунку та в разі необхідності зробіть запит покинути пакунок." #: html/home.php msgid "Merge Request" @@ -313,11 +312,10 @@ msgstr "Обговорення" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "Загальне обговорення сховища користувацьких пакунків (AUR) та структури довірених користувачів відбувається в %saur-general%s. Для дискусій про розробку AUR використовуйте список розсилання %saur-dev%s." #: html/home.php msgid "Bug Reporting" @@ -328,9 +326,9 @@ msgstr "Повідомлення про вади" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "Якщо Ви знайдете ваду у веб-інтерфейсі AUR, повідомте про це нас на нашому %sтрекері вад%s. Таким чином слід сповіщати %sлише%s про проблеми у веб-інтерфейсі AUR. Про вади пакунка зв’яжіться з його супровідником або залиште коментар на відповідній сторінці цього пакунка." #: html/home.php msgid "Package Search" @@ -379,7 +377,7 @@ msgstr "Увійдіть, ввівши облікові дані." #: html/login.php msgid "User name or primary email address" -msgstr "Назва користувача або адреса електронної пошти" +msgstr "" #: html/login.php template/account_delete.php template/account_edit_form.php msgid "Password" @@ -443,7 +441,7 @@ msgstr "Ваш пароль успішно скинуто." #: html/passreset.php msgid "Confirm your user name or primary e-mail address:" -msgstr "Підтвердити назву користувача або адреса електронної пошти:" +msgstr "" #: html/passreset.php msgid "Enter your new password:" @@ -462,11 +460,11 @@ msgstr "Продовжити" msgid "" "If you have forgotten the user name and the primary e-mail address you used " "to register, please send a message to the %saur-general%s mailing list." -msgstr "Якщо Ви забули назву користувача і адресу електронної пошти, використану при реєстрації, зверніться до списку розсилання %saur-general%s." +msgstr "" #: html/passreset.php msgid "Enter your user name or your primary e-mail address:" -msgstr "Введіть назву користувача або адресу електронної пошти:" +msgstr "" #: html/pkgbase.php msgid "Package Bases" @@ -482,7 +480,7 @@ msgstr "Вибрані пакунки все ще мають власника, msgid "" "The selected packages have not been adopted, check the confirmation " "checkbox." -msgstr "Обрані пакунки не прийнято, перевірте, чи поставлено галочку в полі підтвердження." +msgstr "" #: html/pkgbase.php lib/pkgreqfuncs.inc.php msgid "Cannot find package to merge votes and comments into." @@ -530,8 +528,8 @@ msgid "Delete" msgstr "Вилучити" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "Тільки Довірені Користувачі та Розробники можуть вилучати пакунки." #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -571,8 +569,8 @@ msgid "Disown" msgstr "Відректися" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "Тільки Довірені Користувачі та Розробники можуть забирати права власності на пакунок." #: html/pkgflagcomment.php msgid "Flag Comment" @@ -588,7 +586,7 @@ msgid "" " package version in the AUR does not match the most recent commit. Flagging " "this package should only be done if the sources moved or changes in the " "PKGBUILD are required because of recent upstream changes." -msgstr "Здається, це пакет VCS. Будь ласка, %sне%s позначайте його як застарілий, якщо версія пакета в AUR не відповідає останньому коміту. Позначити цей пакунок слід лише в тому випадку, якщо джерела переміщено або потрібні зміни в PKGBUILD в зв'язку з останніми змінами." +msgstr "" #: html/pkgflag.php #, php-format @@ -661,8 +659,8 @@ msgid "Merge" msgstr "Об’єднати" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "Тільки Довірені Користувачі та Розробники можуть об’єднувати пакунки." #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -719,8 +717,8 @@ msgid "I accept the terms and conditions above." msgstr "Я приймаю подані вище терміни і умови. " #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "Довірений користувач" #: html/tu.php msgid "Could not retrieve proposal details." @@ -731,8 +729,8 @@ msgid "Voting is closed for this proposal." msgstr "Голосування на цю пропозицію закрито." #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "Тільки Довірені Користувачі мають право голосу." #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -787,7 +785,7 @@ msgstr "Може містити тільки один період, підкре #: lib/acctfuncs.inc.php msgid "Please confirm your new password." -msgstr "Підтвердіть новий пароль, будь ласка." +msgstr "" #: lib/acctfuncs.inc.php msgid "The email address is invalid." @@ -795,7 +793,7 @@ msgstr "Адреса електронної пошти неправильна." #: lib/acctfuncs.inc.php msgid "The backup email address is invalid." -msgstr "Неправильна адреса електронної пошти для відновлення." +msgstr "" #: lib/acctfuncs.inc.php msgid "The home page is invalid, please specify the full HTTP(s) URL." @@ -838,15 +836,15 @@ msgstr "Публічний ключ SSH, %s%s%s, вже використовує #: lib/acctfuncs.inc.php msgid "The CAPTCHA is missing." -msgstr "Пропущено CAPTCHA." +msgstr "" #: lib/acctfuncs.inc.php msgid "This CAPTCHA has expired. Please try again." -msgstr "Термін дії цієї CAPTCHA закінчився. Будь ласка, спробуйте ще раз." +msgstr "" #: lib/acctfuncs.inc.php msgid "The entered CAPTCHA answer is invalid." -msgstr "Введена відповідь CAPTCHA недійсна." +msgstr "" #: lib/acctfuncs.inc.php #, php-format @@ -888,7 +886,7 @@ msgstr "Обліковий запис вилучено" #: aurweb/routers/accounts.py msgid "You do not have permission to suspend accounts." -msgstr " \nВи не маєте дозволу на призупинення облікових записів." +msgstr "" #: lib/acctfuncs.inc.php #, php-format @@ -977,27 +975,27 @@ msgstr "Інформації про пакунок не знайдено." #: aurweb/routers/auth.py msgid "Bad Referer header." -msgstr "Поганий заголовок Referer." +msgstr "" #: aurweb/routers/packages.py msgid "You did not select any packages to be notified about." -msgstr "Ви не вибрали жодних пакунків, про які потрібно сповіщати." +msgstr "" #: aurweb/routers/packages.py msgid "The selected packages' notifications have been enabled." -msgstr "Сповіщення для вибраних пакунків увімкнено." +msgstr "" #: aurweb/routers/packages.py msgid "You did not select any packages for notification removal." -msgstr "Ви не вибрали жодних пакунків для видалення сповіщень." +msgstr "" #: aurweb/routers/packages.py msgid "A package you selected does not have notifications enabled." -msgstr "У вибраному вами пакунку не ввімкнено сповіщення." +msgstr "" #: aurweb/routers/packages.py msgid "The selected packages' notifications have been removed." -msgstr "Сповіщення для вибраних пакунків видалено." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can flag packages." @@ -1037,7 +1035,7 @@ msgstr "Не вибрано жодного пакунку для вилучен #: aurweb/routers/packages.py msgid "One of the packages you selected does not exist." -msgstr "Один із вибраних Вами пакунків не існує." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "The selected packages have been deleted." @@ -1049,7 +1047,7 @@ msgstr "Для перейняття пакунків слід увійти." #: aurweb/routers/package.py msgid "You are not allowed to adopt one of the packages you selected." -msgstr "У Вас немає дозволу прийняти один з вибраних Вами пакунків." +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can disown packages." @@ -1057,7 +1055,7 @@ msgstr "Для зречення пакунків слід увійти." #: aurweb/routers/packages.py msgid "You are not allowed to disown one of the packages you selected." -msgstr "У Вас немає дозволу відмовитися від одного з вибраних Вами пакунків" +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You did not select any packages to adopt." @@ -1227,8 +1225,8 @@ msgstr "Розробник" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "Довірений користувач & Розробник" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1299,7 +1297,7 @@ msgstr "Редагувати обліковий запис цього корис #: template/account_details.php msgid "List this user's comments" -msgstr "Показати коментарі цього користувача" +msgstr "" #: template/account_edit_form.php #, php-format @@ -1314,7 +1312,7 @@ msgstr "Клацніть %sтут%s, щоб дізнатися більше пр #: template/account_edit_form.php #, php-format msgid "Click %shere%s to list the comments made by this account." -msgstr "Натисніть %sтут%s, щоб показати коментарі, зроблені цим обліковим записом." +msgstr "" #: template/account_edit_form.php msgid "required" @@ -1330,6 +1328,10 @@ msgstr "Ваша назва користувача є назвою, що буд msgid "Normal user" msgstr "Звичайний користувач" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "Довіренний користувач" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "Обліковий запис призупинено" @@ -1353,30 +1355,30 @@ msgid "" "If you do not hide your email address, it is visible to all registered AUR " "users. If you hide your email address, it is visible to members of the Arch " "Linux staff only." -msgstr "Якщо ви не приховаєте свою адресу електронної пошти, тоді її можуть бачити всі зареєстровані користувачі AUR. Якщо Ви приховаєте свою адресу електронної пошти, тоді її зможуть бачити лише співробітники Arch Linux." +msgstr "" #: template/account_edit_form.php msgid "Backup Email Address" -msgstr "Резервна адреса електронної пошти" +msgstr "" #: template/account_edit_form.php msgid "" "Optionally provide a secondary email address that can be used to restore " "your account in case you lose access to your primary email address." -msgstr "За бажанням вкажіть додаткову адресу електронної пошти, яку можна використовувати для відновлення облікового запису на випадок втрати доступу до своєї основної електронної адреси." +msgstr "" #: template/account_edit_form.php msgid "" "Password reset links are always sent to both your primary and your backup " "email address." -msgstr "Посилання для скидання пароля завжди надсилаються як на вашу основну, так і на резервну адресу електронної пошти." +msgstr "" #: template/account_edit_form.php #, php-format msgid "" "Your backup email address is always only visible to members of the Arch " "Linux staff, independent of the %s setting." -msgstr "Вашу резервну електронну адресу завжди бачать лише співробітники Arch Linux, незалежно від налаштувань. %s ." +msgstr "" #: template/account_edit_form.php msgid "Language" @@ -1390,7 +1392,7 @@ msgstr "Часова зона" msgid "" "If you want to change the password, enter a new password and confirm the new" " password by entering it again." -msgstr "Якщо Ви бажаєте змінити пароль, введіть новий пароль і підтвердьте новий пароль, ввівши його ще раз." +msgstr "" #: template/account_edit_form.php msgid "Re-type password" @@ -1402,15 +1404,6 @@ msgid "" " the Arch User Repository." msgstr "Наступну інформацію потрібно, якщо Ви бажаєте надіслати пакунки до Сховища Користувацьких Пакунків AUR." -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "Публічний ключ SSH" @@ -1433,21 +1426,21 @@ msgstr "Сповіщення про зміну власника" #: template/account_edit_form.php msgid "To confirm the profile changes, please enter your current password:" -msgstr "Щоб підтвердити зміни профілю, введіть поточний пароль:" +msgstr "" #: template/account_edit_form.php msgid "Your current password" -msgstr "Ваш поточний пароль" +msgstr "" #: template/account_edit_form.php msgid "" "To protect the AUR against automated account creation, we kindly ask you to " "provide the output of the following command:" -msgstr "Щоб захистити AUR від автоматичного створення облікового запису, ми просимо Вас надати результат такої команди:" +msgstr "" #: template/account_edit_form.php msgid "Answer" -msgstr "Відповідь" +msgstr "" #: template/account_edit_form.php template/pkgbase_details.php #: template/pkg_details.php @@ -1612,7 +1605,7 @@ msgstr "тільки для читання" #: template/pkgbase_details.php template/pkg_details.php msgid "click to copy" -msgstr "натисніть, щоб скопіювати" +msgstr "" #: template/pkgbase_details.php template/pkg_details.php #: template/pkg_search_form.php @@ -1664,12 +1657,12 @@ msgstr "Додати коментар" msgid "" "Git commit identifiers referencing commits in the AUR package repository and" " URLs are converted to links automatically." -msgstr "Відповідні відсилачі комітів до ідентифікаторів комітів Git в сховищі пакунків AUR та URL-адреси автоматично перетворюються на посилання." +msgstr "" #: template/pkg_comment_form.php #, php-format msgid "%sMarkdown syntax%s is partially supported." -msgstr "%sСинтакс Markdown%s підтримується частково." +msgstr "" #: template/pkg_comments.php msgid "Pinned Comments" @@ -1681,7 +1674,7 @@ msgstr "Останні коментарі" #: template/pkg_comments.php msgid "Comments for" -msgstr "Коментарі для" +msgstr "" #: template/pkg_comments.php #, php-format @@ -1696,7 +1689,7 @@ msgstr "Анонімний коментар про %s" #: template/pkg_comments.php #, php-format msgid "Commented on package %s on %s" -msgstr "Коментовано пакунок %s з датою %s" +msgstr "" #: template/pkg_comments.php #, php-format @@ -1836,26 +1829,26 @@ msgstr "Об'єднати в" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "Надсилаючи запит на вилучення, Ви просите Довіреного Користувача вилучити пакунок з бази пакунків. Цей тип запиту повинен використовуватися для дублікатів, неоновлюваних програм, а також нелегальних і невиправно пошкоджених пакунків." #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "Надсилаючи запит на об'єднання, Ви просите Довіреного Користувача вилучити базу пакунків і перенести всі його голосування і коментарі до іншої бази пакунків. Об'єднання пакунку не впливає на відповідні сховища Git. Впевніться, що Ви самостійно оновили історію Git доцільового пакунку." #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "Надсилаючи запит покинути пакунок, Ви просите Довіреного Користувача позбавити базу пакунків власника. Робіть це, лише коли пакунок потребує якоїсь дії від супровідника, супровідник не робить жодних дій і ви вже попередньо намагалися зв'язатися з ним." #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2116,8 +2109,8 @@ msgid "Registered Users" msgstr "Зареєстровані користувачі" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "Довірені користувачі" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2290,7 +2283,7 @@ msgid "" "\n" "-- \n" "If you no longer wish receive notifications about the new package, please go to [3] and click \"{label}\"." -msgstr "{user} [1] з'єднав {old} [2] до {new} [3].\n\n-- \nЯкщо Ви не бажаєте більше отримувати сповіщення про новий пакунок, перейдіть на сторінку [3] і натисніть \"{label}\"." +msgstr "" #: scripts/notify.py #, python-brace-format @@ -2302,8 +2295,8 @@ msgstr "{user} [1] вилучив {pkgbase} [2].\n\nВи більше не бу #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "Нагадування про голосування на довіреного користувача: Пропозиція {id}" #: scripts/notify.py #, python-brace-format @@ -2314,77 +2307,45 @@ msgstr "Будь ласка, не забудьте подати свій гол #: aurweb/routers/accounts.py msgid "Invalid account type provided." -msgstr "Вказано недійсний тип облікового запису." +msgstr "" #: aurweb/routers/accounts.py msgid "You do not have permission to change account types." -msgstr "У Вас немає дозволу змінювати типи облікових записів." +msgstr "" #: aurweb/routers/accounts.py msgid "You do not have permission to change this user's account type to %s." -msgstr "Ви не маєте дозволу змінити тип облікового запису цього користувача на %s." +msgstr "" #: aurweb/packages/requests.py msgid "No due existing orphan requests to accept for %s." -msgstr "Немає наявних запитів на прийняття для %s." +msgstr "" #: aurweb/asgi.py msgid "Internal Server Error" -msgstr "Внутрішня помилка сервера" +msgstr "" #: templates/errors/500.html msgid "A fatal error has occurred." -msgstr "Сталася фатальна помилка." +msgstr "" #: templates/errors/500.html msgid "" "Details have been logged and will be reviewed by the postmaster posthaste. " "We apologize for any inconvenience this may have caused." -msgstr "Подробиці зареєстровані та будуть переглянуті поштмейстером posthaste. Просимо вибачення за можливі незручності." +msgstr "" #: aurweb/scripts/notify.py msgid "AUR Server Error" -msgstr "Помилка сервера AUR" +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "Пов'язані коментарі щодо закриття запиту на пакунок..." +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "Ця дія закриє всі запити на пакет, що очікують на розгляд. Якщо %sКоментарі%s пропущено, тоді буде автоматично згенеровано коментар закриття." - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." msgstr "" diff --git a/po/vi.po b/po/vi.po index c3f919c4..3ea5bad3 100644 --- a/po/vi.po +++ b/po/vi.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Vietnamese (http://app.transifex.com/lfleischer/aurweb/language/vi/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Vietnamese (http://www.transifex.com/lfleischer/aurweb/language/vi/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1827,22 +1820,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2095,7 +2088,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2281,7 +2274,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2335,35 +2328,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/zh.po b/po/zh.po index 7abbe77e..04fe06f3 100644 --- a/po/zh.po +++ b/po/zh.po @@ -6,11 +6,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Chinese (http://app.transifex.com/lfleischer/aurweb/language/zh/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Chinese (http://www.transifex.com/lfleischer/aurweb/language/zh/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -131,15 +131,15 @@ msgid "Type" msgstr "" #: html/addvote.php -msgid "Addition of a Package Maintainer" +msgid "Addition of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer" +msgid "Removal of a TU" msgstr "" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" +msgid "Removal of a TU (undeclared inactivity)" msgstr "" #: html/addvote.php @@ -197,9 +197,8 @@ msgstr "" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." msgstr "" #: html/home.php @@ -214,7 +213,7 @@ msgid "Remember to vote for your favourite packages!" msgstr "" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." +msgid "Some packages may be provided as binaries in [community]." msgstr "" #: html/home.php @@ -264,7 +263,7 @@ msgstr "" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." +"the package maintainer and file orphan request if necessary." msgstr "" #: html/home.php @@ -307,10 +306,9 @@ msgstr "" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." msgstr "" #: html/home.php @@ -322,8 +320,8 @@ msgstr "" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." msgstr "" #: html/home.php @@ -524,7 +522,7 @@ msgid "Delete" msgstr "" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." +msgid "Only Trusted Users and Developers can delete packages." msgstr "" #: html/pkgdisown.php template/pkgbase_actions.php @@ -565,7 +563,7 @@ msgid "Disown" msgstr "" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." +msgid "Only Trusted Users and Developers can disown packages." msgstr "" #: html/pkgflagcomment.php @@ -655,7 +653,7 @@ msgid "Merge" msgstr "" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." +msgid "Only Trusted Users and Developers can merge packages." msgstr "" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php @@ -713,7 +711,7 @@ msgid "I accept the terms and conditions above." msgstr "" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" +msgid "Trusted User" msgstr "" #: html/tu.php @@ -725,7 +723,7 @@ msgid "Voting is closed for this proposal." msgstr "" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." +msgid "Only Trusted Users are allowed to vote." msgstr "" #: html/tu.php @@ -1221,7 +1219,7 @@ msgstr "" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" +msgid "Trusted User & Developer" msgstr "" #: template/account_details.php template/account_edit_form.php @@ -1324,6 +1322,10 @@ msgstr "" msgid "Normal user" msgstr "" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "" @@ -1396,15 +1398,6 @@ msgid "" " the Arch User Repository." msgstr "" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "" @@ -1827,22 +1820,22 @@ msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." msgstr "" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." @@ -2095,7 +2088,7 @@ msgid "Registered Users" msgstr "" #: template/stats/general_stats_table.php -msgid "Package Maintainers" +msgid "Trusted Users" msgstr "" #: template/stats/updates_table.php @@ -2281,7 +2274,7 @@ msgstr "" #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" +msgid "TU Vote Reminder: Proposal {id}" msgstr "" #: scripts/notify.py @@ -2335,35 +2328,3 @@ msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." msgstr "" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "" diff --git a/po/zh_CN.po b/po/zh_CN.po index f32d628c..53d42bc8 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -8,7 +8,6 @@ # dongfengweixiao , 2015 # Felix Yan , 2014,2021 # Feng Chao , 2012,2021 -# lakejason0 , 2022 # Lukas Fleischer , 2011 # pingplug , 2017-2018 # Feng Chao , 2012 @@ -18,11 +17,11 @@ msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: lakejason0 , 2022\n" -"Language-Team: Chinese (China) (http://app.transifex.com/lfleischer/aurweb/language/zh_CN/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Chinese (China) (http://www.transifex.com/lfleischer/aurweb/language/zh_CN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -43,7 +42,7 @@ msgstr "提示" #: html/404.php msgid "Git clone URLs are not meant to be opened in a browser." -msgstr "Git clone URL 并不应该使用浏览器打开。" +msgstr "Git clone URLs 并不意味着能被浏览器打开。" #: html/404.php #, php-format @@ -66,11 +65,11 @@ msgstr "别慌!本站正在维护中,不久后将恢复。" #: html/account.php msgid "Account" -msgstr "账户" +msgstr "帐户" #: html/account.php template/header.php msgid "Accounts" -msgstr "账户" +msgstr "帐户" #: html/account.php html/addvote.php msgid "You are not allowed to access this area." @@ -82,7 +81,7 @@ msgstr "无法获取指定用户的信息。" #: html/account.php msgid "You do not have permission to edit this account." -msgstr "您没有权限编辑此账户。" +msgstr "您没有权限编辑此帐户。" #: html/account.php lib/acctfuncs.inc.php msgid "Invalid password." @@ -90,11 +89,11 @@ msgstr "密码无效。" #: html/account.php msgid "Use this form to search existing accounts." -msgstr "使用此表单查找存在的账户。" +msgstr "使用此表单查找存在的帐户。" #: html/account.php msgid "You must log in to view user information." -msgstr "您需要登录后才能查看用户信息。" +msgstr "您需要登录后才能察看用户信息。" #: html/addvote.php template/tu_list.php msgid "Add Proposal" @@ -143,16 +142,16 @@ msgid "Type" msgstr "类别" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "" +msgid "Addition of a TU" +msgstr "添加受信用户" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "" +msgid "Removal of a TU" +msgstr "移除受信用户" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "移除受信用户(无故不活跃)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -209,10 +208,9 @@ msgstr "搜索共同维护的软件包" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "欢迎来到 AUR!想了解更多信息,请阅读 %sAUR 用户指南%s 和 %sAUR 受信用户指南%s。" #: html/home.php #, php-format @@ -226,8 +224,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "记得为您喜欢的软件包投票!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "部分软件包将在 [extra] 仓库以二进制包的形式提供。" +msgid "Some packages may be provided as binaries in [community]." +msgstr "部分软件包将在 [community] 仓库以二进制包的形式提供。" #: html/home.php msgid "DISCLAIMER" @@ -276,8 +274,8 @@ msgstr "删除请求" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "" +"the package maintainer and file orphan request if necessary." +msgstr "请求软件包从 AUR 中移除。如果这个包虽然损坏了但是可以被轻易地修好,请不要进行此操作,您应该联系包的维护者或者有必要的情况下发送弃置请求。" #: html/home.php msgid "Merge Request" @@ -319,11 +317,10 @@ msgstr "邮件列表" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "与 Arch 用户仓库(AUR)或者受信用户结构相关的一般讨论在 %saur-general%s 邮件列表。若是与 AUR web 页面开发相关的讨论,请使用 %saur-dev%s 邮件列表。" #: html/home.php msgid "Bug Reporting" @@ -334,9 +331,9 @@ msgstr "Bug 报告" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "如果您在 AUR web 页面发现 Bug,请提交到我们的 %sBug 追踪系统%s。追踪系统 %s只能%s 用来报告 AUR web 页面的 Bug。如果想报告打包方面的 Bug,请联系相应的包维护者,或者在相应的软件包页面留下评论。" #: html/home.php msgid "Package Search" @@ -488,7 +485,7 @@ msgstr "选中的软件包未被弃置,请检查确认复选框。" msgid "" "The selected packages have not been adopted, check the confirmation " "checkbox." -msgstr "选中的软件包未被接管,请检查确认复选框。" +msgstr "" #: html/pkgbase.php lib/pkgreqfuncs.inc.php msgid "Cannot find package to merge votes and comments into." @@ -536,8 +533,8 @@ msgid "Delete" msgstr "删除" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "只有受信用户和开发人员能删除软件包。" #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -577,8 +574,8 @@ msgid "Disown" msgstr "弃置" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "只有受信用户和开发人员能弃置软件包。" #: html/pkgflagcomment.php msgid "Flag Comment" @@ -594,7 +591,7 @@ msgid "" " package version in the AUR does not match the most recent commit. Flagging " "this package should only be done if the sources moved or changes in the " "PKGBUILD are required because of recent upstream changes." -msgstr "这似乎是 VCS 软件包。请%s不要%s因为 AUR 中的软件包版本与最新的 commit 不匹配就将其标记为过期。仅当来源移动或由于最新上游更改需要更改 PKGBUILD 时才标记此软件包。" +msgstr "" #: html/pkgflag.php #, php-format @@ -667,8 +664,8 @@ msgid "Merge" msgstr "合并" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "只有受信用户和开发人员才能删除软件包。" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -704,7 +701,7 @@ msgstr "注册" #: html/register.php msgid "Use this form to create an account." -msgstr "使用此表单创建账户。" +msgstr "使用此表单创建帐号。" #: html/tos.php msgid "Terms of Service" @@ -725,8 +722,8 @@ msgid "I accept the terms and conditions above." msgstr "我接受以上条款与条件。" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "" +msgid "Trusted User" +msgstr "受信用户" #: html/tu.php msgid "Could not retrieve proposal details." @@ -737,8 +734,8 @@ msgid "Voting is closed for this proposal." msgstr "该提议的投票已被关闭。" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "" +msgid "Only Trusted Users are allowed to vote." +msgstr "只有受信用户可以投票。" #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -857,12 +854,12 @@ msgstr "输入的验证码无效。" #: lib/acctfuncs.inc.php #, php-format msgid "Error trying to create account, %s%s%s." -msgstr "尝试创建账户 %s%s%s 失败。" +msgstr "尝试创建帐户 %s%s%s 失败。" #: lib/acctfuncs.inc.php #, php-format msgid "The account, %s%s%s, has been successfully created." -msgstr "账户 %s%s%s 创建成功。" +msgstr "帐户 %s%s%s 创建成功。" #: lib/acctfuncs.inc.php msgid "A password reset key has been sent to your e-mail address." @@ -870,7 +867,7 @@ msgstr "密码重置密钥已经发送到您的邮箱。" #: lib/acctfuncs.inc.php msgid "Click on the Login link above to use your account." -msgstr "点击上方的登录链接以使用您的账户。" +msgstr "点击上方的登录链接以使用您的帐号。" #: lib/acctfuncs.inc.php #, php-format @@ -880,7 +877,7 @@ msgstr "账户 %s%s%s 没有被修改。" #: lib/acctfuncs.inc.php #, php-format msgid "The account, %s%s%s, has been successfully modified." -msgstr "账户 %s%s%s 已被成功修改。" +msgstr "帐号 %s%s%s 已被成功修改。" #: lib/acctfuncs.inc.php msgid "" @@ -890,11 +887,11 @@ msgstr "登录表单目前对您所使用的 IP 地址禁用,原因可能是 #: lib/acctfuncs.inc.php msgid "Account suspended" -msgstr "账户被停用" +msgstr "帐号被停用" #: aurweb/routers/accounts.py msgid "You do not have permission to suspend accounts." -msgstr "您没有权限停用此账户。" +msgstr "" #: lib/acctfuncs.inc.php #, php-format @@ -983,27 +980,27 @@ msgstr "无法找到软件包的详细信息。" #: aurweb/routers/auth.py msgid "Bad Referer header." -msgstr "错误的 Referer 消息头。" +msgstr "" #: aurweb/routers/packages.py msgid "You did not select any packages to be notified about." -msgstr "您没有选择要接受通知的软件包。" +msgstr "" #: aurweb/routers/packages.py msgid "The selected packages' notifications have been enabled." -msgstr "选中的软件包的通知已被启用。" +msgstr "" #: aurweb/routers/packages.py msgid "You did not select any packages for notification removal." -msgstr "您没有选择要移除通知的软件包。" +msgstr "" #: aurweb/routers/packages.py msgid "A package you selected does not have notifications enabled." -msgstr "所选中的软件包并没有启用通知。" +msgstr "" #: aurweb/routers/packages.py msgid "The selected packages' notifications have been removed." -msgstr "选中的软件包的通知已被移除。" +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can flag packages." @@ -1043,7 +1040,7 @@ msgstr "您没有选择要删除的软件包。" #: aurweb/routers/packages.py msgid "One of the packages you selected does not exist." -msgstr "选中的其中一个软件包不存在。" +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "The selected packages have been deleted." @@ -1055,7 +1052,7 @@ msgstr "您需要登录后才能接管软件包。" #: aurweb/routers/package.py msgid "You are not allowed to adopt one of the packages you selected." -msgstr "您不被允许接管选中的其中一个软件包。" +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You must be logged in before you can disown packages." @@ -1063,7 +1060,7 @@ msgstr "您需要登录后才能弃置软件包。" #: aurweb/routers/packages.py msgid "You are not allowed to disown one of the packages you selected." -msgstr "您不被允许弃置选中的其中一个软件包。" +msgstr "" #: lib/pkgbasefuncs.inc.php msgid "You did not select any packages to adopt." @@ -1200,7 +1197,7 @@ msgstr "请求关闭成功。" #: template/account_delete.php #, php-format msgid "You can use this form to permanently delete the AUR account %s." -msgstr "您可以使用这个表单永久删除 AUR 账号 %s。" +msgstr "您可以使用这个表单永久删除 AUR 帐号 %s。" #: template/account_delete.php #, php-format @@ -1219,7 +1216,7 @@ msgstr "用户名" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php msgid "Account Type" -msgstr "账户类别" +msgstr "帐户类别" #: template/account_details.php template/tu_details.php #: template/tu_last_votes_list.php template/tu_list.php @@ -1233,8 +1230,8 @@ msgstr "开发人员" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "" +msgid "Trusted User & Developer" +msgstr "受信用户 & 开发者" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1301,7 +1298,7 @@ msgstr "查看这个用户提交的软件包" #: template/account_details.php msgid "Edit this user's account" -msgstr "编辑此用户的账户" +msgstr "编辑此用户的帐号" #: template/account_details.php msgid "List this user's comments" @@ -1310,7 +1307,7 @@ msgstr "显示此用户的评论" #: template/account_edit_form.php #, php-format msgid "Click %shere%s if you want to permanently delete this account." -msgstr "如果你想永久删除这个账户,请点击 %s这里%s。" +msgstr "如果你想永久删除这个帐号,请点击 %s这里%s。" #: template/account_edit_form.php #, php-format @@ -1336,9 +1333,13 @@ msgstr "您的用户名称将用于您的登录。这是公开的,即使您的 msgid "Normal user" msgstr "普通用户" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "受信用户" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" -msgstr "账户被停用" +msgstr "帐户被暂停" #: template/account_edit_form.php msgid "Inactive" @@ -1369,7 +1370,7 @@ msgstr "备用邮件地址" msgid "" "Optionally provide a secondary email address that can be used to restore " "your account in case you lose access to your primary email address." -msgstr "选择性的提供的备用的邮件地址。该邮件地址将在你的主要邮件地址不可用时用于恢复你的账户。" +msgstr "选择性的提供的备用的邮件地址。该邮件地址将在你的主要邮件地址不可用时用于恢复你的帐号。" #: template/account_edit_form.php msgid "" @@ -1408,15 +1409,6 @@ msgid "" " the Arch User Repository." msgstr "仅当你想向 AUR 提交软件包时才需要填写以下信息。" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "SSH 公钥" @@ -1474,7 +1466,7 @@ msgstr "没有结果符合您的搜索条件。" #: template/account_search_results.php msgid "Edit Account" -msgstr "编辑账户" +msgstr "编辑帐户" #: template/account_search_results.php msgid "Suspended" @@ -1536,7 +1528,7 @@ msgstr "版权所有 %s 2004-%d aurweb 开发组。" #: template/header.php msgid " My Account" -msgstr " 我的账户" +msgstr " 我的帐户" #: template/pkgbase_actions.php msgid "Package Actions" @@ -1839,26 +1831,26 @@ msgstr "合并到" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "" +msgstr "通过提交删除请求,您请求受信用户进行包基础的删除。这种请求应当被用于重复,软件被上游放弃,非法或损坏且无法修复的软件包。" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "通过提交合并请求,您请求受信用户进行包基础的删除,并转移其投票和评论到另一包基础。合并一个软件包不会影响对应的 Git 项目,因此您需要自己更新目标软件包的 Git 项目。" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "" +msgstr "通过提交弃置请求,您请求受信用户进行包基础的弃置。请仅在软件包需要维护者操作,您之前已经尝试联系过维护者但没有回应时提交请求。" #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -2107,8 +2099,8 @@ msgid "Registered Users" msgstr "注册用户" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "" +msgid "Trusted Users" +msgstr "受信用户" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2293,8 +2285,8 @@ msgstr "用户 {user} [1] 删除了软件包 {pkgbase} [2]。\n\n您将不再收 #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "受信用户投票提醒:提案 {id}" #: scripts/notify.py #, python-brace-format @@ -2305,77 +2297,45 @@ msgstr "请记得为提案 {id} [1] 投票,投票时段将于48小时内结束 #: aurweb/routers/accounts.py msgid "Invalid account type provided." -msgstr "提供的账户类别无效。" +msgstr "" #: aurweb/routers/accounts.py msgid "You do not have permission to change account types." -msgstr "您没有权限更改账户类别。" +msgstr "" #: aurweb/routers/accounts.py msgid "You do not have permission to change this user's account type to %s." -msgstr "您没有权限将此用户的账户类别更改为%s。" +msgstr "" #: aurweb/packages/requests.py msgid "No due existing orphan requests to accept for %s." -msgstr "没有为 %s 接受的现有孤立请求。" +msgstr "" #: aurweb/asgi.py msgid "Internal Server Error" -msgstr "内部服务器错误" +msgstr "" #: templates/errors/500.html msgid "A fatal error has occurred." -msgstr "发生了严重的错误。" +msgstr "" #: templates/errors/500.html msgid "" "Details have been logged and will be reviewed by the postmaster posthaste. " "We apologize for any inconvenience this may have caused." -msgstr "详细信息已被记录,并会交由 Postmaster 尽快调查。对您造成的不便,我们深感抱歉。" +msgstr "" #: aurweb/scripts/notify.py msgid "AUR Server Error" -msgstr "AUR 服务器错误" +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "相关软件包请求关闭评论…" +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "此操作将关闭任何有关的未处理的软件包请求。若省略%s评论%s,将会自动生成关闭评论。" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "" - -#: templates/requests.html -msgid "Package name" -msgstr "" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." msgstr "" diff --git a/po/zh_TW.po b/po/zh_TW.po index 40521236..e7399a19 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -4,17 +4,16 @@ # # Translators: # pan93412 , 2018 -# Cycatz , 2022 # 黃柏諺 , 2014-2017 -# 黃柏諺 , 2020-2023 +# 黃柏諺 , 2020-2022 msgid "" msgstr "" "Project-Id-Version: aurweb\n" -"Report-Msgid-Bugs-To: https://gitlab.archlinux.org/archlinux/aurweb/-/issues\n" +"Report-Msgid-Bugs-To: https://bugs.archlinux.org/index.php?project=2\n" "POT-Creation-Date: 2020-01-31 09:29+0100\n" -"PO-Revision-Date: 2011-04-10 13:21+0000\n" -"Last-Translator: 黃柏諺 , 2020-2023\n" -"Language-Team: Chinese (Taiwan) (http://app.transifex.com/lfleischer/aurweb/language/zh_TW/)\n" +"PO-Revision-Date: 2022-01-18 17:18+0000\n" +"Last-Translator: Kevin Morris \n" +"Language-Team: Chinese (Taiwan) (http://www.transifex.com/lfleischer/aurweb/language/zh_TW/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -135,16 +134,16 @@ msgid "Type" msgstr "類型" #: html/addvote.php -msgid "Addition of a Package Maintainer" -msgstr "新增軟體包維護者" +msgid "Addition of a TU" +msgstr "添加受信使用者" #: html/addvote.php -msgid "Removal of a Package Maintainer" -msgstr "移除軟體包維護者" +msgid "Removal of a TU" +msgstr "移除受信使用者" #: html/addvote.php -msgid "Removal of a Package Maintainer (undeclared inactivity)" -msgstr "移除軟體包維護者(無故不活躍)" +msgid "Removal of a TU (undeclared inactivity)" +msgstr "移除受信使用者(無故不活躍)" #: html/addvote.php msgid "Amendment of Bylaws" @@ -201,10 +200,9 @@ msgstr "搜尋我共同維護的套件" #: html/home.php #, php-format msgid "" -"Welcome to the AUR! Please read the %sAUR User Guidelines%s for more " -"information and the %sAUR Submission Guidelines%s if you want to contribute " -"a PKGBUILD." -msgstr "歡迎使用 AUR!請閱讀 %sAUR 使用者指南%s以取得更多資訊,若您想要貢獻 PKGBUILD,也請閱讀 %sAUR 遞交指南%s。" +"Welcome to the AUR! Please read the %sAUR User Guidelines%s and %sAUR TU " +"Guidelines%s for more information." +msgstr "歡迎來到 AUR!請閱讀 %sAUR 使用者指導方針%s 和 %sAUR 受信使用者指導方針%s 以獲取更多的詳細資訊。" #: html/home.php #, php-format @@ -218,8 +216,8 @@ msgid "Remember to vote for your favourite packages!" msgstr "記得投一票給您喜愛的套件!" #: html/home.php -msgid "Some packages may be provided as binaries in [extra]." -msgstr "某些套件可能會在 [extra] 提供二進位檔案。" +msgid "Some packages may be provided as binaries in [community]." +msgstr "某些套件可能會在 [community] 提供二進位檔案。" #: html/home.php msgid "DISCLAIMER" @@ -268,8 +266,8 @@ msgstr "刪除請求" msgid "" "Request a package to be removed from the Arch User Repository. Please do not" " use this if a package is broken and can be fixed easily. Instead, contact " -"the maintainer and file orphan request if necessary." -msgstr "請求軟體包從 Arch 使用者軟體庫中移除。如果軟體包損毀但可以很容易的被修復,請不要使用這個請求。您應該聯絡維護者,並在必要時提出棄置請求。" +"the package maintainer and file orphan request if necessary." +msgstr "請求套件從 Arch 使用者套件庫中移除。如果套件損毀但可以很容易的被修復,請不要使用這個請求。您應該聯絡套件維護者,並在必要時提出棄置請求。" #: html/home.php msgid "Merge Request" @@ -311,11 +309,10 @@ msgstr "討論" #: html/home.php #, php-format msgid "" -"General discussion regarding the Arch User Repository (AUR) and Package " -"Maintainer structure takes place on %saur-general%s. For discussion relating" -" to the development of the AUR web interface, use the %saur-dev%s mailing " -"list." -msgstr "與 Arch 使用者軟體庫 (AUR) 與軟體包維護者結構相關的一般性討論請見 %saur-general%s 。討論關於 AUR 網頁介面的開發,請使用 %saur-dev%s 郵件列表。" +"General discussion regarding the Arch User Repository (AUR) and Trusted User" +" structure takes place on %saur-general%s. For discussion relating to the " +"development of the AUR web interface, use the %saur-dev%s mailing list." +msgstr "與 Arch 使用者套件庫(AUR)及受信使用者結構相關的一般性討論請見 %saur-general%s 。討論關於 AUR 網頁介面的開發,請使用 %saur-dev%s 郵件列表。" #: html/home.php msgid "Bug Reporting" @@ -326,9 +323,9 @@ msgstr "臭蟲回報" msgid "" "If you find a bug in the AUR web interface, please fill out a bug report on " "our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface" -" %sonly%s. To report packaging bugs contact the maintainer or leave a " -"comment on the appropriate package page." -msgstr "如果您在 AUR 網頁介面中發現了臭蟲,請在我們的 %s臭蟲追蹤系統%s 中回報。請%s只%s回報 AUR 網頁介面本身的臭蟲。要回報打包臭蟲,請連絡維護者或是在對應的軟體包頁面中留下評論。" +" %sonly%s. To report packaging bugs contact the package maintainer or leave " +"a comment on the appropriate package page." +msgstr "如果您在 AUR 網頁介面中發現了臭蟲,請在我們的 %s臭蟲追蹤系統%s 中回報。請%s只%s回報 AUR 網頁介面本身的臭蟲。要回報打包臭蟲,請連絡套件的維護者或是在對應的套件頁面中留下評論。" #: html/home.php msgid "Package Search" @@ -528,8 +525,8 @@ msgid "Delete" msgstr "刪除" #: html/pkgdel.php -msgid "Only Package Maintainers and Developers can delete packages." -msgstr "僅軟體包維護者與開發者可以刪除軟體包。" +msgid "Only Trusted Users and Developers can delete packages." +msgstr "只有受信使用者和開發者可以刪除套件。" #: html/pkgdisown.php template/pkgbase_actions.php msgid "Disown Package" @@ -569,8 +566,8 @@ msgid "Disown" msgstr "棄置" #: html/pkgdisown.php -msgid "Only Package Maintainers and Developers can disown packages." -msgstr "僅軟體包維護者與開發者可以棄置軟體包。" +msgid "Only Trusted Users and Developers can disown packages." +msgstr "只有受信使用者和開發者可以棄置套件。" #: html/pkgflagcomment.php msgid "Flag Comment" @@ -659,8 +656,8 @@ msgid "Merge" msgstr "合併" #: html/pkgmerge.php -msgid "Only Package Maintainers and Developers can merge packages." -msgstr "僅軟體包維護者與開發者可以合併軟體包。" +msgid "Only Trusted Users and Developers can merge packages." +msgstr "只有受信使用者和開發者可以合併套件。" #: html/pkgreq.php template/pkgbase_actions.php template/pkgreq_form.php msgid "Submit Request" @@ -717,8 +714,8 @@ msgid "I accept the terms and conditions above." msgstr "我接受上述條款與條件。" #: html/tu.php template/account_details.php template/header.php -msgid "Package Maintainer" -msgstr "軟體包維護者" +msgid "Trusted User" +msgstr "受信使用者" #: html/tu.php msgid "Could not retrieve proposal details." @@ -729,8 +726,8 @@ msgid "Voting is closed for this proposal." msgstr "這個建議的投票已被關閉。" #: html/tu.php -msgid "Only Package Maintainers are allowed to vote." -msgstr "僅軟體包維護者可以投票。" +msgid "Only Trusted Users are allowed to vote." +msgstr "只有受信使用者可以投票。" #: html/tu.php msgid "You cannot vote in an proposal about you." @@ -1225,8 +1222,8 @@ msgstr "開發者" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php -msgid "Package Maintainer & Developer" -msgstr "軟體包維護者與開發者" +msgid "Trusted User & Developer" +msgstr "受信使用者 & 開發者" #: template/account_details.php template/account_edit_form.php #: template/search_accounts_form.php @@ -1328,6 +1325,10 @@ msgstr "您的使用者名稱是您要用於登入的名稱。它是公開的, msgid "Normal user" msgstr "一般使用者" +#: template/account_edit_form.php template/search_accounts_form.php +msgid "Trusted user" +msgstr "受信使用者" + #: template/account_edit_form.php template/search_accounts_form.php msgid "Account Suspended" msgstr "帳號被暫停" @@ -1400,15 +1401,6 @@ msgid "" " the Arch User Repository." msgstr "以下的資訊僅在您想要遞交套件到 Arch 使用者套件庫時是必須的。" -#: templates/partials/account_form.html -msgid "" -"Specify multiple SSH Keys separated by new line, empty lines are ignored." -msgstr "指定多個 SSH 金鑰,以換行符號分隔,將會忽略空行。" - -#: templates/partials/account_form.html -msgid "Hide deleted comments" -msgstr "隱藏已刪除的評論" - #: template/account_edit_form.php msgid "SSH Public Key" msgstr "SSH 公開金鑰" @@ -1831,26 +1823,26 @@ msgstr "合併到" #: template/pkgreq_form.php msgid "" -"By submitting a deletion request, you ask a Package Maintainer to delete the" -" package base. This type of request should be used for duplicates, software " +"By submitting a deletion request, you ask a Trusted User to delete the " +"package base. This type of request should be used for duplicates, software " "abandoned by upstream, as well as illegal and irreparably broken packages." -msgstr "透過遞交刪除請求,您會請求軟體包維護者刪除套件基礎。這個類型的請求應該用於重複、被上游放棄的軟體,以及違法與無法修復的損壞軟體包。" +msgstr "透過遞交刪除請求,您會請求受信使用者刪除套件基礎。這個類型的請求應該用於重複、被上游放棄的軟體,以及違法與無法修復的損壞套件。" #: template/pkgreq_form.php msgid "" -"By submitting a merge request, you ask a Package Maintainer to delete the " -"package base and transfer its votes and comments to another package base. " -"Merging a package does not affect the corresponding Git repositories. Make " -"sure you update the Git history of the target package yourself." -msgstr "透過遞交合併請求,您會請求軟體包維護者刪除軟體包基礎並轉移其投票數到其他的軟體包基礎。合併一個軟體包不會影響相對應的 Git 倉庫。確保您可以自己更新目標軟體包的 Git 歷史。" +"By submitting a merge request, you ask a Trusted User to delete the package " +"base and transfer its votes and comments to another package base. Merging a " +"package does not affect the corresponding Git repositories. Make sure you " +"update the Git history of the target package yourself." +msgstr "透過遞交合併請求,您會請求受信使用者刪除套件基礎並轉移其投票數到其他的套件基礎。合併一個套件不會影響相對應的 Git 倉庫。確保您可以自己更新目標套件的 Git 歷史。" #: template/pkgreq_form.php msgid "" -"By submitting an orphan request, you ask a Package Maintainer to disown the " +"By submitting an orphan request, you ask a Trusted User to disown the " "package base. Please only do this if the package needs maintainer action, " "the maintainer is MIA and you already tried to contact the maintainer " "previously." -msgstr "透過遞交棄置請求,您會請求軟體包維護者棄置軟體包基礎。請僅在該軟體包需要有維護者動作、維護者突然消失且您先前已經連絡過維護者時做此動作。" +msgstr "透過遞交棄置請求,您會請求受信使用者棄置套件基礎。請僅在該套件需要有維護者動作、維護者突然消失且您先前已經連絡過維護者時做此動作。" #: template/pkgreq_results.php msgid "No requests matched your search criteria." @@ -1998,7 +1990,7 @@ msgstr "每頁顯示" #: template/pkg_search_form.php template/pkg_search_results.php msgid "Go" -msgstr "搜尋" +msgstr "到" #: template/pkg_search_form.php msgid "Orphans" @@ -2099,8 +2091,8 @@ msgid "Registered Users" msgstr "已註冊的使用者" #: template/stats/general_stats_table.php -msgid "Package Maintainers" -msgstr "軟體包維護者" +msgid "Trusted Users" +msgstr "受信使用者" #: template/stats/updates_table.php msgid "Recent Updates" @@ -2285,8 +2277,8 @@ msgstr "{user} [1] 已經刪除 {pkgbase} [2]。\n\n您將再也不會收到此 #: scripts/notify.py #, python-brace-format -msgid "Package Maintainer Vote Reminder: Proposal {id}" -msgstr "軟體包維護者投票提醒:編號為 {id} 的建議" +msgid "TU Vote Reminder: Proposal {id}" +msgstr "TU 投票提醒:編號為 {id} 的建議" #: scripts/notify.py #, python-brace-format @@ -2332,42 +2324,10 @@ msgstr "AUR 伺服器錯誤" #: templates/pkgbase/merge.html templates/packages/delete.html #: templates/packages/disown.html msgid "Related package request closure comments..." -msgstr "相關軟體包請求關閉留言……" +msgstr "" #: templates/pkgbase/merge.html templates/packages/delete.html msgid "" "This action will close any pending package requests related to it. If " "%sComments%s are omitted, a closure comment will be autogenerated." -msgstr "此動作將會關閉任何關於此的擱置中軟體包請求。若省略%s留言%s,將會自動產生關閉留言。" - -#: templates/partials/tu/proposal/details.html -msgid "assigned" -msgstr "分配" - -#: templaets/partials/packages/package_metadata.html -msgid "Show %d more" -msgstr "再顯示 %d 個" - -#: templates/partials/packages/package_metadata.html -msgid "dependencies" -msgstr "依賴關係" - -#: aurweb/routers/accounts.py -msgid "The account has not been deleted, check the confirmation checkbox." -msgstr "帳號未被刪除,請檢查確認的核取方塊。" - -#: templates/partials/packages/comment_form.html -msgid "Cancel" -msgstr "取消" - -#: templates/requests.html -msgid "Package name" -msgstr "軟體包名稱" - -#: templates/partials/account_form.html -msgid "" -"Note that if you hide your email address, it'll end up on the BCC list for " -"any request notifications. In case someone replies to these notifications, " -"you won't receive an email. However, replies are typically sent to the " -"mailing-list and would then be visible in the archive." -msgstr "請注意,如果您隱藏您的電子郵件地址,它最終會出現在任何要求通知的密件副本清單中。如果有人回覆這些通知,您將不會收到電子郵件。但是,回覆通常會傳送到郵遞論壇,然後在存檔中可見。" +msgstr "" diff --git a/poetry.lock b/poetry.lock index 72638b4e..c9d0b38a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,145 +1,101 @@ -# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. - [[package]] name = "aiofiles" -version = "24.1.0" +version = "0.7.0" description = "File support for asyncio." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "aiofiles-24.1.0-py3-none-any.whl", hash = "sha256:b4ec55f4195e3eb5d7abd1bf7e061763e864dd4954231fb8539a0ef8bb8260e5"}, - {file = "aiofiles-24.1.0.tar.gz", hash = "sha256:22a075c9e5a3810f0c2e48f3008c94d68c65d763b9b03857924c99e57355166c"}, -] +python-versions = ">=3.6,<4.0" [[package]] name = "alembic" -version = "1.13.2" +version = "1.7.6" description = "A database migration tool for SQLAlchemy." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "alembic-1.13.2-py3-none-any.whl", hash = "sha256:6b8733129a6224a9a711e17c99b08462dbf7cc9670ba8f2e2ae9af860ceb1953"}, - {file = "alembic-1.13.2.tar.gz", hash = "sha256:1ff0ae32975f4fd96028c39ed9bb3c867fe3af956bd7bb37343b54c9fe7445ef"}, -] +python-versions = ">=3.6" [package.dependencies] Mako = "*" SQLAlchemy = ">=1.3.0" -typing-extensions = ">=4" [package.extras] -tz = ["backports.zoneinfo"] - -[[package]] -name = "annotated-types" -version = "0.7.0" -description = "Reusable constraint types to use with typing.Annotated" -optional = false -python-versions = ">=3.8" -files = [ - {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, - {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, -] +tz = ["python-dateutil"] [[package]] name = "anyio" -version = "4.4.0" +version = "3.5.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "anyio-4.4.0-py3-none-any.whl", hash = "sha256:c1b2d8f46a8a812513012e1107cb0e68c17159a7a594208005a57dc776e1bdc7"}, - {file = "anyio-4.4.0.tar.gz", hash = "sha256:5aadc6a1bbb7cdb0bede386cac5e2940f5e2ff3aa20277e991cf028e0585ce94"}, -] +python-versions = ">=3.6.2" [package.dependencies] -exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" -typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] -doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] -trio = ["trio (>=0.23)"] +doc = ["packaging", "sphinx-rtd-theme", "sphinx-autodoc-typehints (>=1.2.0)"] +test = ["coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "pytest (>=6.0)", "pytest-mock (>=3.6.1)", "trustme", "contextlib2", "uvloop (<0.15)", "mock (>=4)", "uvloop (>=0.15)"] +trio = ["trio (>=0.16)"] [[package]] name = "asgiref" -version = "3.8.1" +version = "3.5.0" description = "ASGI specs, helper code, and adapters" -optional = false -python-versions = ">=3.8" -files = [ - {file = "asgiref-3.8.1-py3-none-any.whl", hash = "sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47"}, - {file = "asgiref-3.8.1.tar.gz", hash = "sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590"}, -] - -[package.dependencies] -typing-extensions = {version = ">=4", markers = "python_version < \"3.11\""} - -[package.extras] -tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] - -[[package]] -name = "async-timeout" -version = "4.0.3" -description = "Timeout context manager for asyncio programs" +category = "main" optional = false python-versions = ">=3.7" -files = [ - {file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"}, - {file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"}, -] + +[package.extras] +tests = ["pytest", "pytest-asyncio", "mypy (>=0.800)"] + +[[package]] +name = "atomicwrites" +version = "1.4.0" +description = "Atomic file writes." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "attrs" +version = "21.4.0" +description = "Classes Without Boilerplate" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.extras] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] +docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] [[package]] name = "authlib" -version = "1.3.1" -description = "The ultimate Python library in building OAuth and OpenID Connect servers and clients." +version = "0.15.5" +description = "The ultimate Python library in building OAuth and OpenID Connect servers." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "Authlib-1.3.1-py2.py3-none-any.whl", hash = "sha256:d35800b973099bbadc49b42b256ecb80041ad56b7fe1216a362c7943c088f377"}, - {file = "authlib-1.3.1.tar.gz", hash = "sha256:7ae843f03c06c5c0debd63c9db91f9fda64fa62a42a77419fa15fbb7e7a58917"}, -] +python-versions = "*" [package.dependencies] cryptography = "*" +[package.extras] +client = ["requests"] + [[package]] name = "bcrypt" -version = "4.2.0" +version = "3.2.0" description = "Modern password hashing for your software and your servers" +category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "bcrypt-4.2.0-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:096a15d26ed6ce37a14c1ac1e48119660f21b24cba457f160a4b830f3fe6b5cb"}, - {file = "bcrypt-4.2.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c02d944ca89d9b1922ceb8a46460dd17df1ba37ab66feac4870f6862a1533c00"}, - {file = "bcrypt-4.2.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d84cf6d877918620b687b8fd1bf7781d11e8a0998f576c7aa939776b512b98d"}, - {file = "bcrypt-4.2.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:1bb429fedbe0249465cdd85a58e8376f31bb315e484f16e68ca4c786dcc04291"}, - {file = "bcrypt-4.2.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:655ea221910bcac76ea08aaa76df427ef8625f92e55a8ee44fbf7753dbabb328"}, - {file = "bcrypt-4.2.0-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:1ee38e858bf5d0287c39b7a1fc59eec64bbf880c7d504d3a06a96c16e14058e7"}, - {file = "bcrypt-4.2.0-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:0da52759f7f30e83f1e30a888d9163a81353ef224d82dc58eb5bb52efcabc399"}, - {file = "bcrypt-4.2.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:3698393a1b1f1fd5714524193849d0c6d524d33523acca37cd28f02899285060"}, - {file = "bcrypt-4.2.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:762a2c5fb35f89606a9fde5e51392dad0cd1ab7ae64149a8b935fe8d79dd5ed7"}, - {file = "bcrypt-4.2.0-cp37-abi3-win32.whl", hash = "sha256:5a1e8aa9b28ae28020a3ac4b053117fb51c57a010b9f969603ed885f23841458"}, - {file = "bcrypt-4.2.0-cp37-abi3-win_amd64.whl", hash = "sha256:8f6ede91359e5df88d1f5c1ef47428a4420136f3ce97763e31b86dd8280fbdf5"}, - {file = "bcrypt-4.2.0-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:c52aac18ea1f4a4f65963ea4f9530c306b56ccd0c6f8c8da0c06976e34a6e841"}, - {file = "bcrypt-4.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3bbbfb2734f0e4f37c5136130405332640a1e46e6b23e000eeff2ba8d005da68"}, - {file = "bcrypt-4.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3413bd60460f76097ee2e0a493ccebe4a7601918219c02f503984f0a7ee0aebe"}, - {file = "bcrypt-4.2.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:8d7bb9c42801035e61c109c345a28ed7e84426ae4865511eb82e913df18f58c2"}, - {file = "bcrypt-4.2.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3d3a6d28cb2305b43feac298774b997e372e56c7c7afd90a12b3dc49b189151c"}, - {file = "bcrypt-4.2.0-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:9c1c4ad86351339c5f320ca372dfba6cb6beb25e8efc659bedd918d921956bae"}, - {file = "bcrypt-4.2.0-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:27fe0f57bb5573104b5a6de5e4153c60814c711b29364c10a75a54bb6d7ff48d"}, - {file = "bcrypt-4.2.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:8ac68872c82f1add6a20bd489870c71b00ebacd2e9134a8aa3f98a0052ab4b0e"}, - {file = "bcrypt-4.2.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:cb2a8ec2bc07d3553ccebf0746bbf3d19426d1c6d1adbd4fa48925f66af7b9e8"}, - {file = "bcrypt-4.2.0-cp39-abi3-win32.whl", hash = "sha256:77800b7147c9dc905db1cba26abe31e504d8247ac73580b4aa179f98e6608f34"}, - {file = "bcrypt-4.2.0-cp39-abi3-win_amd64.whl", hash = "sha256:61ed14326ee023917ecd093ee6ef422a72f3aec6f07e21ea5f10622b735538a9"}, - {file = "bcrypt-4.2.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:39e1d30c7233cfc54f5c3f2c825156fe044efdd3e0b9d309512cc514a263ec2a"}, - {file = "bcrypt-4.2.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:f4f4acf526fcd1c34e7ce851147deedd4e26e6402369304220250598b26448db"}, - {file = "bcrypt-4.2.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:1ff39b78a52cf03fdf902635e4c81e544714861ba3f0efc56558979dd4f09170"}, - {file = "bcrypt-4.2.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:373db9abe198e8e2c70d12b479464e0d5092cc122b20ec504097b5f2297ed184"}, - {file = "bcrypt-4.2.0.tar.gz", hash = "sha256:cf69eaf5185fd58f268f805b505ce31f9b9fc2d64b376642164e9244540c1221"}, -] +python-versions = ">=3.6" + +[package.dependencies] +cffi = ">=1.1" +six = ">=1.4.1" [package.extras] tests = ["pytest (>=3.2.1,!=3.3.0)"] @@ -147,504 +103,192 @@ typecheck = ["mypy"] [[package]] name = "bleach" -version = "6.1.0" +version = "4.1.0" description = "An easy safelist-based HTML-sanitizing tool." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "bleach-6.1.0-py3-none-any.whl", hash = "sha256:3225f354cfc436b9789c66c4ee030194bee0568fbf9cbdad3bc8b5c26c5f12b6"}, - {file = "bleach-6.1.0.tar.gz", hash = "sha256:0a31f1837963c41d46bbf1331b8778e1308ea0791db03cc4e7357b97cf42a8fe"}, -] +python-versions = ">=3.6" [package.dependencies] +packaging = "*" six = ">=1.9.0" webencodings = "*" -[package.extras] -css = ["tinycss2 (>=1.1.0,<1.3)"] - [[package]] name = "certifi" -version = "2024.7.4" +version = "2021.10.8" description = "Python package for providing Mozilla's CA Bundle." +category = "main" optional = false -python-versions = ">=3.6" -files = [ - {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"}, - {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, -] +python-versions = "*" [[package]] name = "cffi" -version = "1.17.0" +version = "1.15.0" description = "Foreign Function Interface for Python calling C code." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "cffi-1.17.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f9338cc05451f1942d0d8203ec2c346c830f8e86469903d5126c1f0a13a2bcbb"}, - {file = "cffi-1.17.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a0ce71725cacc9ebf839630772b07eeec220cbb5f03be1399e0457a1464f8e1a"}, - {file = "cffi-1.17.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c815270206f983309915a6844fe994b2fa47e5d05c4c4cef267c3b30e34dbe42"}, - {file = "cffi-1.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6bdcd415ba87846fd317bee0774e412e8792832e7805938987e4ede1d13046d"}, - {file = "cffi-1.17.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8a98748ed1a1df4ee1d6f927e151ed6c1a09d5ec21684de879c7ea6aa96f58f2"}, - {file = "cffi-1.17.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0a048d4f6630113e54bb4b77e315e1ba32a5a31512c31a273807d0027a7e69ab"}, - {file = "cffi-1.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24aa705a5f5bd3a8bcfa4d123f03413de5d86e497435693b638cbffb7d5d8a1b"}, - {file = "cffi-1.17.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:856bf0924d24e7f93b8aee12a3a1095c34085600aa805693fb7f5d1962393206"}, - {file = "cffi-1.17.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:4304d4416ff032ed50ad6bb87416d802e67139e31c0bde4628f36a47a3164bfa"}, - {file = "cffi-1.17.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:331ad15c39c9fe9186ceaf87203a9ecf5ae0ba2538c9e898e3a6967e8ad3db6f"}, - {file = "cffi-1.17.0-cp310-cp310-win32.whl", hash = "sha256:669b29a9eca6146465cc574659058ed949748f0809a2582d1f1a324eb91054dc"}, - {file = "cffi-1.17.0-cp310-cp310-win_amd64.whl", hash = "sha256:48b389b1fd5144603d61d752afd7167dfd205973a43151ae5045b35793232aa2"}, - {file = "cffi-1.17.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c5d97162c196ce54af6700949ddf9409e9833ef1003b4741c2b39ef46f1d9720"}, - {file = "cffi-1.17.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5ba5c243f4004c750836f81606a9fcb7841f8874ad8f3bf204ff5e56332b72b9"}, - {file = "cffi-1.17.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bb9333f58fc3a2296fb1d54576138d4cf5d496a2cc118422bd77835e6ae0b9cb"}, - {file = "cffi-1.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:435a22d00ec7d7ea533db494da8581b05977f9c37338c80bc86314bec2619424"}, - {file = "cffi-1.17.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d1df34588123fcc88c872f5acb6f74ae59e9d182a2707097f9e28275ec26a12d"}, - {file = "cffi-1.17.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:df8bb0010fdd0a743b7542589223a2816bdde4d94bb5ad67884348fa2c1c67e8"}, - {file = "cffi-1.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8b5b9712783415695663bd463990e2f00c6750562e6ad1d28e072a611c5f2a6"}, - {file = "cffi-1.17.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ffef8fd58a36fb5f1196919638f73dd3ae0db1a878982b27a9a5a176ede4ba91"}, - {file = "cffi-1.17.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4e67d26532bfd8b7f7c05d5a766d6f437b362c1bf203a3a5ce3593a645e870b8"}, - {file = "cffi-1.17.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:45f7cd36186db767d803b1473b3c659d57a23b5fa491ad83c6d40f2af58e4dbb"}, - {file = "cffi-1.17.0-cp311-cp311-win32.whl", hash = "sha256:a9015f5b8af1bb6837a3fcb0cdf3b874fe3385ff6274e8b7925d81ccaec3c5c9"}, - {file = "cffi-1.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:b50aaac7d05c2c26dfd50c3321199f019ba76bb650e346a6ef3616306eed67b0"}, - {file = "cffi-1.17.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aec510255ce690d240f7cb23d7114f6b351c733a74c279a84def763660a2c3bc"}, - {file = "cffi-1.17.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2770bb0d5e3cc0e31e7318db06efcbcdb7b31bcb1a70086d3177692a02256f59"}, - {file = "cffi-1.17.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:db9a30ec064129d605d0f1aedc93e00894b9334ec74ba9c6bdd08147434b33eb"}, - {file = "cffi-1.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a47eef975d2b8b721775a0fa286f50eab535b9d56c70a6e62842134cf7841195"}, - {file = "cffi-1.17.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f3e0992f23bbb0be00a921eae5363329253c3b86287db27092461c887b791e5e"}, - {file = "cffi-1.17.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6107e445faf057c118d5050560695e46d272e5301feffda3c41849641222a828"}, - {file = "cffi-1.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb862356ee9391dc5a0b3cbc00f416b48c1b9a52d252d898e5b7696a5f9fe150"}, - {file = "cffi-1.17.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c1c13185b90bbd3f8b5963cd8ce7ad4ff441924c31e23c975cb150e27c2bf67a"}, - {file = "cffi-1.17.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:17c6d6d3260c7f2d94f657e6872591fe8733872a86ed1345bda872cfc8c74885"}, - {file = "cffi-1.17.0-cp312-cp312-win32.whl", hash = "sha256:c3b8bd3133cd50f6b637bb4322822c94c5ce4bf0d724ed5ae70afce62187c492"}, - {file = "cffi-1.17.0-cp312-cp312-win_amd64.whl", hash = "sha256:dca802c8db0720ce1c49cce1149ff7b06e91ba15fa84b1d59144fef1a1bc7ac2"}, - {file = "cffi-1.17.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:6ce01337d23884b21c03869d2f68c5523d43174d4fc405490eb0091057943118"}, - {file = "cffi-1.17.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cab2eba3830bf4f6d91e2d6718e0e1c14a2f5ad1af68a89d24ace0c6b17cced7"}, - {file = "cffi-1.17.0-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:14b9cbc8f7ac98a739558eb86fabc283d4d564dafed50216e7f7ee62d0d25377"}, - {file = "cffi-1.17.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b00e7bcd71caa0282cbe3c90966f738e2db91e64092a877c3ff7f19a1628fdcb"}, - {file = "cffi-1.17.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:41f4915e09218744d8bae14759f983e466ab69b178de38066f7579892ff2a555"}, - {file = "cffi-1.17.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e4760a68cab57bfaa628938e9c2971137e05ce48e762a9cb53b76c9b569f1204"}, - {file = "cffi-1.17.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:011aff3524d578a9412c8b3cfaa50f2c0bd78e03eb7af7aa5e0df59b158efb2f"}, - {file = "cffi-1.17.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:a003ac9edc22d99ae1286b0875c460351f4e101f8c9d9d2576e78d7e048f64e0"}, - {file = "cffi-1.17.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ef9528915df81b8f4c7612b19b8628214c65c9b7f74db2e34a646a0a2a0da2d4"}, - {file = "cffi-1.17.0-cp313-cp313-win32.whl", hash = "sha256:70d2aa9fb00cf52034feac4b913181a6e10356019b18ef89bc7c12a283bf5f5a"}, - {file = "cffi-1.17.0-cp313-cp313-win_amd64.whl", hash = "sha256:b7b6ea9e36d32582cda3465f54c4b454f62f23cb083ebc7a94e2ca6ef011c3a7"}, - {file = "cffi-1.17.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:964823b2fc77b55355999ade496c54dde161c621cb1f6eac61dc30ed1b63cd4c"}, - {file = "cffi-1.17.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:516a405f174fd3b88829eabfe4bb296ac602d6a0f68e0d64d5ac9456194a5b7e"}, - {file = "cffi-1.17.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dec6b307ce928e8e112a6bb9921a1cb00a0e14979bf28b98e084a4b8a742bd9b"}, - {file = "cffi-1.17.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4094c7b464cf0a858e75cd14b03509e84789abf7b79f8537e6a72152109c76e"}, - {file = "cffi-1.17.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2404f3de742f47cb62d023f0ba7c5a916c9c653d5b368cc966382ae4e57da401"}, - {file = "cffi-1.17.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3aa9d43b02a0c681f0bfbc12d476d47b2b2b6a3f9287f11ee42989a268a1833c"}, - {file = "cffi-1.17.0-cp38-cp38-win32.whl", hash = "sha256:0bb15e7acf8ab35ca8b24b90af52c8b391690ef5c4aec3d31f38f0d37d2cc499"}, - {file = "cffi-1.17.0-cp38-cp38-win_amd64.whl", hash = "sha256:93a7350f6706b31f457c1457d3a3259ff9071a66f312ae64dc024f049055f72c"}, - {file = "cffi-1.17.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1a2ddbac59dc3716bc79f27906c010406155031a1c801410f1bafff17ea304d2"}, - {file = "cffi-1.17.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6327b572f5770293fc062a7ec04160e89741e8552bf1c358d1a23eba68166759"}, - {file = "cffi-1.17.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbc183e7bef690c9abe5ea67b7b60fdbca81aa8da43468287dae7b5c046107d4"}, - {file = "cffi-1.17.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bdc0f1f610d067c70aa3737ed06e2726fd9d6f7bfee4a351f4c40b6831f4e82"}, - {file = "cffi-1.17.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6d872186c1617d143969defeadac5a904e6e374183e07977eedef9c07c8953bf"}, - {file = "cffi-1.17.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0d46ee4764b88b91f16661a8befc6bfb24806d885e27436fdc292ed7e6f6d058"}, - {file = "cffi-1.17.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f76a90c345796c01d85e6332e81cab6d70de83b829cf1d9762d0a3da59c7932"}, - {file = "cffi-1.17.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e60821d312f99d3e1569202518dddf10ae547e799d75aef3bca3a2d9e8ee693"}, - {file = "cffi-1.17.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:eb09b82377233b902d4c3fbeeb7ad731cdab579c6c6fda1f763cd779139e47c3"}, - {file = "cffi-1.17.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:24658baf6224d8f280e827f0a50c46ad819ec8ba380a42448e24459daf809cf4"}, - {file = "cffi-1.17.0-cp39-cp39-win32.whl", hash = "sha256:0fdacad9e0d9fc23e519efd5ea24a70348305e8d7d85ecbb1a5fa66dc834e7fb"}, - {file = "cffi-1.17.0-cp39-cp39-win_amd64.whl", hash = "sha256:7cbc78dc018596315d4e7841c8c3a7ae31cc4d638c9b627f87d52e8abaaf2d29"}, - {file = "cffi-1.17.0.tar.gz", hash = "sha256:f3157624b7558b914cb039fd1af735e5e8049a87c817cc215109ad1c8779df76"}, -] +python-versions = "*" [package.dependencies] pycparser = "*" [[package]] name = "charset-normalizer" -version = "3.3.2" +version = "2.0.11" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" optional = false -python-versions = ">=3.7.0" -files = [ - {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, - {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, -] +python-versions = ">=3.5.0" + +[package.extras] +unicode_backport = ["unicodedata2"] [[package]] name = "click" -version = "8.1.7" +version = "8.0.3" description = "Composable command line interface toolkit" +category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, -] +python-versions = ">=3.6" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} [[package]] name = "colorama" -version = "0.4.6" +version = "0.4.4" description = "Cross-platform colored terminal text." +category = "main" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "coverage" -version = "7.6.1" +version = "6.3.1" description = "Code coverage measurement for Python" +category = "dev" optional = false -python-versions = ">=3.8" -files = [ - {file = "coverage-7.6.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b06079abebbc0e89e6163b8e8f0e16270124c154dc6e4a47b413dd538859af16"}, - {file = "coverage-7.6.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cf4b19715bccd7ee27b6b120e7e9dd56037b9c0681dcc1adc9ba9db3d417fa36"}, - {file = "coverage-7.6.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61c0abb4c85b095a784ef23fdd4aede7a2628478e7baba7c5e3deba61070a02"}, - {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd21f6ae3f08b41004dfb433fa895d858f3f5979e7762d052b12aef444e29afc"}, - {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f59d57baca39b32db42b83b2a7ba6f47ad9c394ec2076b084c3f029b7afca23"}, - {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a1ac0ae2b8bd743b88ed0502544847c3053d7171a3cff9228af618a068ed9c34"}, - {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e6a08c0be454c3b3beb105c0596ebdc2371fab6bb90c0c0297f4e58fd7e1012c"}, - {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f5796e664fe802da4f57a168c85359a8fbf3eab5e55cd4e4569fbacecc903959"}, - {file = "coverage-7.6.1-cp310-cp310-win32.whl", hash = "sha256:7bb65125fcbef8d989fa1dd0e8a060999497629ca5b0efbca209588a73356232"}, - {file = "coverage-7.6.1-cp310-cp310-win_amd64.whl", hash = "sha256:3115a95daa9bdba70aea750db7b96b37259a81a709223c8448fa97727d546fe0"}, - {file = "coverage-7.6.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7dea0889685db8550f839fa202744652e87c60015029ce3f60e006f8c4462c93"}, - {file = "coverage-7.6.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ed37bd3c3b063412f7620464a9ac1314d33100329f39799255fb8d3027da50d3"}, - {file = "coverage-7.6.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d85f5e9a5f8b73e2350097c3756ef7e785f55bd71205defa0bfdaf96c31616ff"}, - {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bc572be474cafb617672c43fe989d6e48d3c83af02ce8de73fff1c6bb3c198d"}, - {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0420b573964c760df9e9e86d1a9a622d0d27f417e1a949a8a66dd7bcee7bc6"}, - {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1f4aa8219db826ce6be7099d559f8ec311549bfc4046f7f9fe9b5cea5c581c56"}, - {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:fc5a77d0c516700ebad189b587de289a20a78324bc54baee03dd486f0855d234"}, - {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b48f312cca9621272ae49008c7f613337c53fadca647d6384cc129d2996d1133"}, - {file = "coverage-7.6.1-cp311-cp311-win32.whl", hash = "sha256:1125ca0e5fd475cbbba3bb67ae20bd2c23a98fac4e32412883f9bcbaa81c314c"}, - {file = "coverage-7.6.1-cp311-cp311-win_amd64.whl", hash = "sha256:8ae539519c4c040c5ffd0632784e21b2f03fc1340752af711f33e5be83a9d6c6"}, - {file = "coverage-7.6.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:95cae0efeb032af8458fc27d191f85d1717b1d4e49f7cb226cf526ff28179778"}, - {file = "coverage-7.6.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5621a9175cf9d0b0c84c2ef2b12e9f5f5071357c4d2ea6ca1cf01814f45d2391"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:260933720fdcd75340e7dbe9060655aff3af1f0c5d20f46b57f262ab6c86a5e8"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e2ca0ad381b91350c0ed49d52699b625aab2b44b65e1b4e02fa9df0e92ad2d"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44fee9975f04b33331cb8eb272827111efc8930cfd582e0320613263ca849ca"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877abb17e6339d96bf08e7a622d05095e72b71f8afd8a9fefc82cf30ed944163"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e0cadcf6733c09154b461f1ca72d5416635e5e4ec4e536192180d34ec160f8a"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3c02d12f837d9683e5ab2f3d9844dc57655b92c74e286c262e0fc54213c216d"}, - {file = "coverage-7.6.1-cp312-cp312-win32.whl", hash = "sha256:e05882b70b87a18d937ca6768ff33cc3f72847cbc4de4491c8e73880766718e5"}, - {file = "coverage-7.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:b5d7b556859dd85f3a541db6a4e0167b86e7273e1cdc973e5b175166bb634fdb"}, - {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"}, - {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e81d7a3e58882450ec4186ca59a3f20a5d4440f25b1cff6f0902ad890e6748a"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a78d169acd38300060b28d600344a803628c3fd585c912cacc9ea8790fe96862"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2c09f4ce52cb99dd7505cd0fc8e0e37c77b87f46bc9c1eb03fe3bc9991085388"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6878ef48d4227aace338d88c48738a4258213cd7b74fd9a3d4d7582bb1d8a155"}, - {file = "coverage-7.6.1-cp313-cp313-win32.whl", hash = "sha256:44df346d5215a8c0e360307d46ffaabe0f5d3502c8a1cefd700b34baf31d411a"}, - {file = "coverage-7.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:8284cf8c0dd272a247bc154eb6c95548722dce90d098c17a883ed36e67cdb129"}, - {file = "coverage-7.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3296782ca4eab572a1a4eca686d8bfb00226300dcefdf43faa25b5242ab8a3e"}, - {file = "coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a318d68e92e80af8b00fa99609796fdbcdfef3629c77c6283566c6f02c6d6704"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4421712dbfc5562150f7554f13dde997a2e932a6b5f352edcce948a815efee6f"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:166811d20dfea725e2e4baa71fffd6c968a958577848d2131f39b60043400223"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:225667980479a17db1048cb2bf8bfb39b8e5be8f164b8f6628b64f78a72cf9d3"}, - {file = "coverage-7.6.1-cp313-cp313t-win32.whl", hash = "sha256:170d444ab405852903b7d04ea9ae9b98f98ab6d7e63e1115e82620807519797f"}, - {file = "coverage-7.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b9f222de8cded79c49bf184bdbc06630d4c58eec9459b939b4a690c82ed05657"}, - {file = "coverage-7.6.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6db04803b6c7291985a761004e9060b2bca08da6d04f26a7f2294b8623a0c1a0"}, - {file = "coverage-7.6.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f1adfc8ac319e1a348af294106bc6a8458a0f1633cc62a1446aebc30c5fa186a"}, - {file = "coverage-7.6.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a95324a9de9650a729239daea117df21f4b9868ce32e63f8b650ebe6cef5595b"}, - {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b43c03669dc4618ec25270b06ecd3ee4fa94c7f9b3c14bae6571ca00ef98b0d3"}, - {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8929543a7192c13d177b770008bc4e8119f2e1f881d563fc6b6305d2d0ebe9de"}, - {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:a09ece4a69cf399510c8ab25e0950d9cf2b42f7b3cb0374f95d2e2ff594478a6"}, - {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:9054a0754de38d9dbd01a46621636689124d666bad1936d76c0341f7d71bf569"}, - {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0dbde0f4aa9a16fa4d754356a8f2e36296ff4d83994b2c9d8398aa32f222f989"}, - {file = "coverage-7.6.1-cp38-cp38-win32.whl", hash = "sha256:da511e6ad4f7323ee5702e6633085fb76c2f893aaf8ce4c51a0ba4fc07580ea7"}, - {file = "coverage-7.6.1-cp38-cp38-win_amd64.whl", hash = "sha256:3f1156e3e8f2872197af3840d8ad307a9dd18e615dc64d9ee41696f287c57ad8"}, - {file = "coverage-7.6.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:abd5fd0db5f4dc9289408aaf34908072f805ff7792632250dcb36dc591d24255"}, - {file = "coverage-7.6.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:547f45fa1a93154bd82050a7f3cddbc1a7a4dd2a9bf5cb7d06f4ae29fe94eaf8"}, - {file = "coverage-7.6.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:645786266c8f18a931b65bfcefdbf6952dd0dea98feee39bd188607a9d307ed2"}, - {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e0b2df163b8ed01d515807af24f63de04bebcecbd6c3bfeff88385789fdf75a"}, - {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:609b06f178fe8e9f89ef676532760ec0b4deea15e9969bf754b37f7c40326dbc"}, - {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:702855feff378050ae4f741045e19a32d57d19f3e0676d589df0575008ea5004"}, - {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:2bdb062ea438f22d99cba0d7829c2ef0af1d768d1e4a4f528087224c90b132cb"}, - {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9c56863d44bd1c4fe2abb8a4d6f5371d197f1ac0ebdee542f07f35895fc07f36"}, - {file = "coverage-7.6.1-cp39-cp39-win32.whl", hash = "sha256:6e2cd258d7d927d09493c8df1ce9174ad01b381d4729a9d8d4e38670ca24774c"}, - {file = "coverage-7.6.1-cp39-cp39-win_amd64.whl", hash = "sha256:06a737c882bd26d0d6ee7269b20b12f14a8704807a01056c80bb881a4b2ce6ca"}, - {file = "coverage-7.6.1-pp38.pp39.pp310-none-any.whl", hash = "sha256:e9a6e0eb86070e8ccaedfbd9d38fec54864f3125ab95419970575b42af7541df"}, - {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"}, -] +python-versions = ">=3.7" [package.dependencies] -tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} +tomli = {version = "*", optional = true, markers = "extra == \"toml\""} [package.extras] toml = ["tomli"] [[package]] name = "cryptography" -version = "43.0.0" +version = "36.0.1" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "cryptography-43.0.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:64c3f16e2a4fc51c0d06af28441881f98c5d91009b8caaff40cf3548089e9c74"}, - {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3dcdedae5c7710b9f97ac6bba7e1052b95c7083c9d0e9df96e02a1932e777895"}, - {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d9a1eca329405219b605fac09ecfc09ac09e595d6def650a437523fcd08dd22"}, - {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ea9e57f8ea880eeea38ab5abf9fbe39f923544d7884228ec67d666abd60f5a47"}, - {file = "cryptography-43.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9a8d6802e0825767476f62aafed40532bd435e8a5f7d23bd8b4f5fd04cc80ecf"}, - {file = "cryptography-43.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:cc70b4b581f28d0a254d006f26949245e3657d40d8857066c2ae22a61222ef55"}, - {file = "cryptography-43.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:4a997df8c1c2aae1e1e5ac49c2e4f610ad037fc5a3aadc7b64e39dea42249431"}, - {file = "cryptography-43.0.0-cp37-abi3-win32.whl", hash = "sha256:6e2b11c55d260d03a8cf29ac9b5e0608d35f08077d8c087be96287f43af3ccdc"}, - {file = "cryptography-43.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:31e44a986ceccec3d0498e16f3d27b2ee5fdf69ce2ab89b52eaad1d2f33d8778"}, - {file = "cryptography-43.0.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:7b3f5fe74a5ca32d4d0f302ffe6680fcc5c28f8ef0dc0ae8f40c0f3a1b4fca66"}, - {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac1955ce000cb29ab40def14fd1bbfa7af2017cca696ee696925615cafd0dce5"}, - {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:299d3da8e00b7e2b54bb02ef58d73cd5f55fb31f33ebbf33bd00d9aa6807df7e"}, - {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ee0c405832ade84d4de74b9029bedb7b31200600fa524d218fc29bfa371e97f5"}, - {file = "cryptography-43.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:cb013933d4c127349b3948aa8aaf2f12c0353ad0eccd715ca789c8a0f671646f"}, - {file = "cryptography-43.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fdcb265de28585de5b859ae13e3846a8e805268a823a12a4da2597f1f5afc9f0"}, - {file = "cryptography-43.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:2905ccf93a8a2a416f3ec01b1a7911c3fe4073ef35640e7ee5296754e30b762b"}, - {file = "cryptography-43.0.0-cp39-abi3-win32.whl", hash = "sha256:47ca71115e545954e6c1d207dd13461ab81f4eccfcb1345eac874828b5e3eaaf"}, - {file = "cryptography-43.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:0663585d02f76929792470451a5ba64424acc3cd5227b03921dab0e2f27b1709"}, - {file = "cryptography-43.0.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:2c6d112bf61c5ef44042c253e4859b3cbbb50df2f78fa8fae6747a7814484a70"}, - {file = "cryptography-43.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:844b6d608374e7d08f4f6e6f9f7b951f9256db41421917dfb2d003dde4cd6b66"}, - {file = "cryptography-43.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:51956cf8730665e2bdf8ddb8da0056f699c1a5715648c1b0144670c1ba00b48f"}, - {file = "cryptography-43.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:aae4d918f6b180a8ab8bf6511a419473d107df4dbb4225c7b48c5c9602c38c7f"}, - {file = "cryptography-43.0.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:232ce02943a579095a339ac4b390fbbe97f5b5d5d107f8a08260ea2768be8cc2"}, - {file = "cryptography-43.0.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:5bcb8a5620008a8034d39bce21dc3e23735dfdb6a33a06974739bfa04f853947"}, - {file = "cryptography-43.0.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:08a24a7070b2b6804c1940ff0f910ff728932a9d0e80e7814234269f9d46d069"}, - {file = "cryptography-43.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e9c5266c432a1e23738d178e51c2c7a5e2ddf790f248be939448c0ba2021f9d1"}, - {file = "cryptography-43.0.0.tar.gz", hash = "sha256:b88075ada2d51aa9f18283532c9f60e72170041bba88d7f37e49cbb10275299e"}, -] +python-versions = ">=3.6" [package.dependencies] -cffi = {version = ">=1.12", markers = "platform_python_implementation != \"PyPy\""} +cffi = ">=1.12" [package.extras] -docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"] -docstest = ["pyenchant (>=1.6.11)", "readme-renderer", "sphinxcontrib-spelling (>=4.0.1)"] -nox = ["nox"] -pep8test = ["check-sdist", "click", "mypy", "ruff"] -sdist = ["build"] +docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] +docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +sdist = ["setuptools_rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi", "cryptography-vectors (==43.0.0)", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] -test-randomorder = ["pytest-randomly"] - -[[package]] -name = "deprecated" -version = "1.2.14" -description = "Python @deprecated decorator to deprecate old python classes, functions or methods." -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "Deprecated-1.2.14-py2.py3-none-any.whl", hash = "sha256:6fac8b097794a90302bdbb17b9b815e732d3c4720583ff1b198499d78470466c"}, - {file = "Deprecated-1.2.14.tar.gz", hash = "sha256:e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3"}, -] - -[package.dependencies] -wrapt = ">=1.10,<2" - -[package.extras] -dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "sphinx (<2)", "tox"] +test = ["pytest (>=6.2.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] [[package]] name = "dnspython" -version = "2.6.1" +version = "2.2.0" description = "DNS toolkit" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "dnspython-2.6.1-py3-none-any.whl", hash = "sha256:5ef3b9680161f6fa89daf8ad451b5f1a33b18ae8a1c6778cdf4b43f08c0a6e50"}, - {file = "dnspython-2.6.1.tar.gz", hash = "sha256:e8f0f9c23a7b7cb99ded64e6c3a6f3e701d78f50c55e002b839dea7225cff7cc"}, -] +python-versions = ">=3.6,<4.0" [package.extras] -dev = ["black (>=23.1.0)", "coverage (>=7.0)", "flake8 (>=7)", "mypy (>=1.8)", "pylint (>=3)", "pytest (>=7.4)", "pytest-cov (>=4.1.0)", "sphinx (>=7.2.0)", "twine (>=4.0.0)", "wheel (>=0.42.0)"] -dnssec = ["cryptography (>=41)"] -doh = ["h2 (>=4.1.0)", "httpcore (>=1.0.0)", "httpx (>=0.26.0)"] -doq = ["aioquic (>=0.9.25)"] -idna = ["idna (>=3.6)"] -trio = ["trio (>=0.23)"] -wmi = ["wmi (>=1.5.1)"] +dnssec = ["cryptography (>=2.6,<37.0)"] +curio = ["curio (>=1.2,<2.0)", "sniffio (>=1.1,<2.0)"] +doh = ["h2 (>=4.1.0)", "httpx (>=0.21.1)", "requests (>=2.23.0,<3.0.0)", "requests-toolbelt (>=0.9.1,<0.10.0)"] +idna = ["idna (>=2.1,<4.0)"] +trio = ["trio (>=0.14,<0.20)"] +wmi = ["wmi (>=1.5.1,<2.0.0)"] + +[[package]] +name = "dunamai" +version = "1.8.0" +description = "Dynamic version generation" +category = "main" +optional = false +python-versions = ">=3.5,<4.0" + +[package.dependencies] +packaging = ">=20.9" [[package]] name = "email-validator" -version = "2.2.0" -description = "A robust email address syntax and deliverability validation library." +version = "1.1.3" +description = "A robust email syntax and deliverability validation library for Python 2.x/3.x." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "email_validator-2.2.0-py3-none-any.whl", hash = "sha256:561977c2d73ce3611850a06fa56b414621e0c8faa9d66f2611407d87465da631"}, - {file = "email_validator-2.2.0.tar.gz", hash = "sha256:cb690f344c617a714f22e66ae771445a1ceb46821152df8e165c5f9a364582b7"}, -] +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] -dnspython = ">=2.0.0" +dnspython = ">=1.15.0" idna = ">=2.0.0" -[[package]] -name = "exceptiongroup" -version = "1.2.2" -description = "Backport of PEP 654 (exception groups)" -optional = false -python-versions = ">=3.7" -files = [ - {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, - {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, -] - -[package.extras] -test = ["pytest (>=6)"] - [[package]] name = "execnet" -version = "2.1.1" +version = "1.9.0" description = "execnet: rapid multi-Python deployment" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "execnet-2.1.1-py3-none-any.whl", hash = "sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc"}, - {file = "execnet-2.1.1.tar.gz", hash = "sha256:5189b52c6121c24feae288166ab41b32549c7e2348652736540b9e6e7d4e72e3"}, -] +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] -testing = ["hatch", "pre-commit", "pytest", "tox"] +testing = ["pre-commit"] [[package]] name = "fakeredis" -version = "2.23.5" -description = "Python implementation of redis API, can be used for testing purposes." +version = "1.7.0" +description = "Fake implementation of redis API for testing purposes." +category = "main" optional = false -python-versions = "<4.0,>=3.7" -files = [ - {file = "fakeredis-2.23.5-py3-none-any.whl", hash = "sha256:4d85b1b6b3a80cbbb3a8967f8686f7bf6ddf5bd7cd5ac7ac90b3561d8c3a7ddb"}, - {file = "fakeredis-2.23.5.tar.gz", hash = "sha256:edffc79fdce0f1d83cbb20b52694a9cba4a5fe5beb627c11722a42aa0fa44f52"}, -] +python-versions = ">=3.5" [package.dependencies] -redis = ">=4" -sortedcontainers = ">=2,<3" -typing_extensions = {version = ">=4.7,<5.0", markers = "python_version < \"3.11\""} +packaging = "*" +redis = "<4.1.0" +six = ">=1.12" +sortedcontainers = "*" [package.extras] -bf = ["pyprobables (>=0.6,<0.7)"] -cf = ["pyprobables (>=0.6,<0.7)"] -json = ["jsonpath-ng (>=1.6,<2.0)"] -lua = ["lupa (>=2.1,<3.0)"] -probabilistic = ["pyprobables (>=0.6,<0.7)"] +aioredis = ["aioredis"] +lua = ["lupa"] [[package]] name = "fastapi" -version = "0.112.1" +version = "0.71.0" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "fastapi-0.112.1-py3-none-any.whl", hash = "sha256:bcbd45817fc2a1cd5da09af66815b84ec0d3d634eb173d1ab468ae3103e183e4"}, - {file = "fastapi-0.112.1.tar.gz", hash = "sha256:b2537146f8c23389a7faa8b03d0bd38d4986e6983874557d95eed2acc46448ef"}, -] +python-versions = ">=3.6.1" [package.dependencies] -pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" -starlette = ">=0.37.2,<0.39.0" -typing-extensions = ">=4.8.0" +pydantic = ">=1.6.2,<1.7 || >1.7,<1.7.1 || >1.7.1,<1.7.2 || >1.7.2,<1.7.3 || >1.7.3,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0" +starlette = "0.17.1" [package.extras] -all = ["email_validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.7)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] -standard = ["email_validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "jinja2 (>=2.11.2)", "python-multipart (>=0.0.7)", "uvicorn[standard] (>=0.12.0)"] +all = ["requests (>=2.24.0,<3.0.0)", "jinja2 (>=2.11.2,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "itsdangerous (>=1.1.0,<3.0.0)", "pyyaml (>=5.3.1,<6.0.0)", "ujson (>=4.0.1,<5.0.0)", "orjson (>=3.2.1,<4.0.0)", "email_validator (>=1.1.1,<2.0.0)", "uvicorn[standard] (>=0.12.0,<0.16.0)"] +dev = ["python-jose[cryptography] (>=3.3.0,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "autoflake (>=1.4.0,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "uvicorn[standard] (>=0.12.0,<0.16.0)"] +doc = ["mkdocs (>=1.1.2,<2.0.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "mdx-include (>=1.4.1,<2.0.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.3.0)", "typer-cli (>=0.0.12,<0.0.13)", "pyyaml (>=5.3.1,<6.0.0)"] +test = ["pytest (>=6.2.4,<7.0.0)", "pytest-cov (>=2.12.0,<4.0.0)", "mypy (==0.910)", "flake8 (>=3.8.3,<4.0.0)", "black (==21.9b0)", "isort (>=5.0.6,<6.0.0)", "requests (>=2.24.0,<3.0.0)", "httpx (>=0.14.0,<0.19.0)", "email_validator (>=1.1.1,<2.0.0)", "sqlalchemy (>=1.3.18,<1.5.0)", "peewee (>=3.13.3,<4.0.0)", "databases[sqlite] (>=0.3.2,<0.6.0)", "orjson (>=3.2.1,<4.0.0)", "ujson (>=4.0.1,<5.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "flask (>=1.1.2,<3.0.0)", "anyio[trio] (>=3.2.1,<4.0.0)", "types-ujson (==0.1.1)", "types-orjson (==3.6.0)", "types-dataclasses (==0.1.7)"] [[package]] name = "feedgen" -version = "1.0.0" +version = "0.9.0" description = "Feed Generator (ATOM, RSS, Podcasts)" +category = "main" optional = false python-versions = "*" -files = [ - {file = "feedgen-1.0.0.tar.gz", hash = "sha256:d9bd51c3b5e956a2a52998c3708c4d2c729f2fcc311188e1e5d3b9726393546a"}, -] [package.dependencies] lxml = "*" @@ -652,165 +296,69 @@ python-dateutil = "*" [[package]] name = "filelock" -version = "3.15.4" +version = "3.4.2" description = "A platform independent file lock." -optional = false -python-versions = ">=3.8" -files = [ - {file = "filelock-3.15.4-py3-none-any.whl", hash = "sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7"}, - {file = "filelock-3.15.4.tar.gz", hash = "sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb"}, -] - -[package.extras] -docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-asyncio (>=0.21)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)", "virtualenv (>=20.26.2)"] -typing = ["typing-extensions (>=4.8)"] - -[[package]] -name = "googleapis-common-protos" -version = "1.63.2" -description = "Common protobufs used in Google APIs" +category = "main" optional = false python-versions = ">=3.7" -files = [ - {file = "googleapis-common-protos-1.63.2.tar.gz", hash = "sha256:27c5abdffc4911f28101e635de1533fb4cfd2c37fbaa9174587c799fac90aa87"}, - {file = "googleapis_common_protos-1.63.2-py2.py3-none-any.whl", hash = "sha256:27a2499c7e8aff199665b22741997e485eccc8645aa9176c7c988e6fae507945"}, -] - -[package.dependencies] -protobuf = ">=3.20.2,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0.dev0" [package.extras] -grpc = ["grpcio (>=1.44.0,<2.0.0.dev0)"] +docs = ["furo (>=2021.8.17b43)", "sphinx (>=4.1)", "sphinx-autodoc-typehints (>=1.12)"] +testing = ["covdefaults (>=1.2.0)", "coverage (>=4)", "pytest (>=4)", "pytest-cov", "pytest-timeout (>=1.4.2)"] + +[[package]] +name = "flake8" +version = "4.0.1" +description = "the modular source code checker: pep8 pyflakes and co" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +mccabe = ">=0.6.0,<0.7.0" +pycodestyle = ">=2.8.0,<2.9.0" +pyflakes = ">=2.4.0,<2.5.0" [[package]] name = "greenlet" -version = "3.1.1" +version = "1.1.2" description = "Lightweight in-process concurrent programming" +category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "greenlet-3.1.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:0bbae94a29c9e5c7e4a2b7f0aae5c17e8e90acbfd3bf6270eeba60c39fce3563"}, - {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fde093fb93f35ca72a556cf72c92ea3ebfda3d79fc35bb19fbe685853869a83"}, - {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:36b89d13c49216cadb828db8dfa6ce86bbbc476a82d3a6c397f0efae0525bdd0"}, - {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:94b6150a85e1b33b40b1464a3f9988dcc5251d6ed06842abff82e42632fac120"}, - {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:93147c513fac16385d1036b7e5b102c7fbbdb163d556b791f0f11eada7ba65dc"}, - {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:da7a9bff22ce038e19bf62c4dd1ec8391062878710ded0a845bcf47cc0200617"}, - {file = "greenlet-3.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b2795058c23988728eec1f36a4e5e4ebad22f8320c85f3587b539b9ac84128d7"}, - {file = "greenlet-3.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ed10eac5830befbdd0c32f83e8aa6288361597550ba669b04c48f0f9a2c843c6"}, - {file = "greenlet-3.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:77c386de38a60d1dfb8e55b8c1101d68c79dfdd25c7095d51fec2dd800892b80"}, - {file = "greenlet-3.1.1-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:e4d333e558953648ca09d64f13e6d8f0523fa705f51cae3f03b5983489958c70"}, - {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09fc016b73c94e98e29af67ab7b9a879c307c6731a2c9da0db5a7d9b7edd1159"}, - {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d5e975ca70269d66d17dd995dafc06f1b06e8cb1ec1e9ed54c1d1e4a7c4cf26e"}, - {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b2813dc3de8c1ee3f924e4d4227999285fd335d1bcc0d2be6dc3f1f6a318ec1"}, - {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e347b3bfcf985a05e8c0b7d462ba6f15b1ee1c909e2dcad795e49e91b152c383"}, - {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e8f8c9cb53cdac7ba9793c276acd90168f416b9ce36799b9b885790f8ad6c0a"}, - {file = "greenlet-3.1.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:62ee94988d6b4722ce0028644418d93a52429e977d742ca2ccbe1c4f4a792511"}, - {file = "greenlet-3.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1776fd7f989fc6b8d8c8cb8da1f6b82c5814957264d1f6cf818d475ec2bf6395"}, - {file = "greenlet-3.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:48ca08c771c268a768087b408658e216133aecd835c0ded47ce955381105ba39"}, - {file = "greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:4afe7ea89de619adc868e087b4d2359282058479d7cfb94970adf4b55284574d"}, - {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f406b22b7c9a9b4f8aa9d2ab13d6ae0ac3e85c9a809bd590ad53fed2bf70dc79"}, - {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c3a701fe5a9695b238503ce5bbe8218e03c3bcccf7e204e455e7462d770268aa"}, - {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2846930c65b47d70b9d178e89c7e1a69c95c1f68ea5aa0a58646b7a96df12441"}, - {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99cfaa2110534e2cf3ba31a7abcac9d328d1d9f1b95beede58294a60348fba36"}, - {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1443279c19fca463fc33e65ef2a935a5b09bb90f978beab37729e1c3c6c25fe9"}, - {file = "greenlet-3.1.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b7cede291382a78f7bb5f04a529cb18e068dd29e0fb27376074b6d0317bf4dd0"}, - {file = "greenlet-3.1.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:23f20bb60ae298d7d8656c6ec6db134bca379ecefadb0b19ce6f19d1f232a942"}, - {file = "greenlet-3.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:7124e16b4c55d417577c2077be379514321916d5790fa287c9ed6f23bd2ffd01"}, - {file = "greenlet-3.1.1-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:05175c27cb459dcfc05d026c4232f9de8913ed006d42713cb8a5137bd49375f1"}, - {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:935e943ec47c4afab8965954bf49bfa639c05d4ccf9ef6e924188f762145c0ff"}, - {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:667a9706c970cb552ede35aee17339a18e8f2a87a51fba2ed39ceeeb1004798a"}, - {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b8a678974d1f3aa55f6cc34dc480169d58f2e6d8958895d68845fa4ab566509e"}, - {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:efc0f674aa41b92da8c49e0346318c6075d734994c3c4e4430b1c3f853e498e4"}, - {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0153404a4bb921f0ff1abeb5ce8a5131da56b953eda6e14b88dc6bbc04d2049e"}, - {file = "greenlet-3.1.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:275f72decf9932639c1c6dd1013a1bc266438eb32710016a1c742df5da6e60a1"}, - {file = "greenlet-3.1.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c4aab7f6381f38a4b42f269057aee279ab0fc7bf2e929e3d4abfae97b682a12c"}, - {file = "greenlet-3.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:b42703b1cf69f2aa1df7d1030b9d77d3e584a70755674d60e710f0af570f3761"}, - {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1695e76146579f8c06c1509c7ce4dfe0706f49c6831a817ac04eebb2fd02011"}, - {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7876452af029456b3f3549b696bb36a06db7c90747740c5302f74a9e9fa14b13"}, - {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4ead44c85f8ab905852d3de8d86f6f8baf77109f9da589cb4fa142bd3b57b475"}, - {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8320f64b777d00dd7ccdade271eaf0cad6636343293a25074cc5566160e4de7b"}, - {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6510bf84a6b643dabba74d3049ead221257603a253d0a9873f55f6a59a65f822"}, - {file = "greenlet-3.1.1-cp313-cp313t-musllinux_1_1_aarch64.whl", hash = "sha256:04b013dc07c96f83134b1e99888e7a79979f1a247e2a9f59697fa14b5862ed01"}, - {file = "greenlet-3.1.1-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:411f015496fec93c1c8cd4e5238da364e1da7a124bcb293f085bf2860c32c6f6"}, - {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:47da355d8687fd65240c364c90a31569a133b7b60de111c255ef5b606f2ae291"}, - {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:98884ecf2ffb7d7fe6bd517e8eb99d31ff7855a840fa6d0d63cd07c037f6a981"}, - {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f1d4aeb8891338e60d1ab6127af1fe45def5259def8094b9c7e34690c8858803"}, - {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db32b5348615a04b82240cc67983cb315309e88d444a288934ee6ceaebcad6cc"}, - {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dcc62f31eae24de7f8dce72134c8651c58000d3b1868e01392baea7c32c247de"}, - {file = "greenlet-3.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1d3755bcb2e02de341c55b4fca7a745a24a9e7212ac953f6b3a48d117d7257aa"}, - {file = "greenlet-3.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:b8da394b34370874b4572676f36acabac172602abf054cbc4ac910219f3340af"}, - {file = "greenlet-3.1.1-cp37-cp37m-win32.whl", hash = "sha256:a0dfc6c143b519113354e780a50381508139b07d2177cb6ad6a08278ec655798"}, - {file = "greenlet-3.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:54558ea205654b50c438029505def3834e80f0869a70fb15b871c29b4575ddef"}, - {file = "greenlet-3.1.1-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:346bed03fe47414091be4ad44786d1bd8bef0c3fcad6ed3dee074a032ab408a9"}, - {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dfc59d69fc48664bc693842bd57acfdd490acafda1ab52c7836e3fc75c90a111"}, - {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d21e10da6ec19b457b82636209cbe2331ff4306b54d06fa04b7c138ba18c8a81"}, - {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:37b9de5a96111fc15418819ab4c4432e4f3c2ede61e660b1e33971eba26ef9ba"}, - {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ef9ea3f137e5711f0dbe5f9263e8c009b7069d8a1acea822bd5e9dae0ae49c8"}, - {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:85f3ff71e2e60bd4b4932a043fbbe0f499e263c628390b285cb599154a3b03b1"}, - {file = "greenlet-3.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:95ffcf719966dd7c453f908e208e14cde192e09fde6c7186c8f1896ef778d8cd"}, - {file = "greenlet-3.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:03a088b9de532cbfe2ba2034b2b85e82df37874681e8c470d6fb2f8c04d7e4b7"}, - {file = "greenlet-3.1.1-cp38-cp38-win32.whl", hash = "sha256:8b8b36671f10ba80e159378df9c4f15c14098c4fd73a36b9ad715f057272fbef"}, - {file = "greenlet-3.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:7017b2be767b9d43cc31416aba48aab0d2309ee31b4dbf10a1d38fb7972bdf9d"}, - {file = "greenlet-3.1.1-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:396979749bd95f018296af156201d6211240e7a23090f50a8d5d18c370084dc3"}, - {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca9d0ff5ad43e785350894d97e13633a66e2b50000e8a183a50a88d834752d42"}, - {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f6ff3b14f2df4c41660a7dec01045a045653998784bf8cfcb5a525bdffffbc8f"}, - {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:94ebba31df2aa506d7b14866fed00ac141a867e63143fe5bca82a8e503b36437"}, - {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73aaad12ac0ff500f62cebed98d8789198ea0e6f233421059fa68a5aa7220145"}, - {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:63e4844797b975b9af3a3fb8f7866ff08775f5426925e1e0bbcfe7932059a12c"}, - {file = "greenlet-3.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7939aa3ca7d2a1593596e7ac6d59391ff30281ef280d8632fa03d81f7c5f955e"}, - {file = "greenlet-3.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d0028e725ee18175c6e422797c407874da24381ce0690d6b9396c204c7f7276e"}, - {file = "greenlet-3.1.1-cp39-cp39-win32.whl", hash = "sha256:5e06afd14cbaf9e00899fae69b24a32f2196c19de08fcb9f4779dd4f004e5e7c"}, - {file = "greenlet-3.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:3319aa75e0e0639bc15ff54ca327e8dc7a6fe404003496e3c6925cd3142e0e22"}, - {file = "greenlet-3.1.1.tar.gz", hash = "sha256:4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467"}, -] +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" [package.extras] -docs = ["Sphinx", "furo"] -test = ["objgraph", "psutil"] +docs = ["sphinx"] [[package]] name = "gunicorn" -version = "22.0.0" +version = "20.1.0" description = "WSGI HTTP Server for UNIX" +category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "gunicorn-22.0.0-py3-none-any.whl", hash = "sha256:350679f91b24062c86e386e198a15438d53a7a8207235a78ba1b53df4c4378d9"}, - {file = "gunicorn-22.0.0.tar.gz", hash = "sha256:4a0b436239ff76fb33f11c07a16482c521a7e09c1ce3cc293c2330afe01bec63"}, -] - -[package.dependencies] -packaging = "*" +python-versions = ">=3.5" [package.extras] -eventlet = ["eventlet (>=0.24.1,!=0.36.0)"] +eventlet = ["eventlet (>=0.24.1)"] gevent = ["gevent (>=1.4.0)"] setproctitle = ["setproctitle"] -testing = ["coverage", "eventlet", "gevent", "pytest", "pytest-cov"] tornado = ["tornado (>=0.2)"] [[package]] name = "h11" -version = "0.14.0" +version = "0.12.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, -] +python-versions = ">=3.6" [[package]] name = "h2" version = "4.1.0" description = "HTTP/2 State-Machine based protocol implementation" +category = "main" optional = false python-versions = ">=3.6.1" -files = [ - {file = "h2-4.1.0-py3-none-any.whl", hash = "sha256:03a46bcf682256c95b5fd9e9a99c1323584c3eec6440d379b9903d709476bc6d"}, - {file = "h2-4.1.0.tar.gz", hash = "sha256:a83aca08fbe7aacb79fec788c9c0bac936343560ed9ec18b82a13a12c28d2abb"}, -] [package.dependencies] hpack = ">=4.0,<5" @@ -820,158 +368,136 @@ hyperframe = ">=6.0,<7" name = "hpack" version = "4.0.0" description = "Pure-Python HPACK header compression" +category = "main" optional = false python-versions = ">=3.6.1" -files = [ - {file = "hpack-4.0.0-py3-none-any.whl", hash = "sha256:84a076fad3dc9a9f8063ccb8041ef100867b1878b25ef0ee63847a5d53818a6c"}, - {file = "hpack-4.0.0.tar.gz", hash = "sha256:fc41de0c63e687ebffde81187a948221294896f6bdc0ae2312708df339430095"}, -] [[package]] name = "httpcore" -version = "1.0.5" +version = "0.13.7" description = "A minimal low-level HTTP client." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"}, - {file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"}, -] +python-versions = ">=3.6" [package.dependencies] -certifi = "*" -h11 = ">=0.13,<0.15" +anyio = ">=3.0.0,<4.0.0" +h11 = ">=0.11,<0.13" +sniffio = ">=1.0.0,<2.0.0" [package.extras] -asyncio = ["anyio (>=4.0,<5.0)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (==1.*)"] -trio = ["trio (>=0.22.0,<0.26.0)"] [[package]] name = "httpx" -version = "0.27.0" +version = "0.20.0" description = "The next generation HTTP client." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "httpx-0.27.0-py3-none-any.whl", hash = "sha256:71d5465162c13681bff01ad59b2cc68dd838ea1f10e51574bac27103f00c91a5"}, - {file = "httpx-0.27.0.tar.gz", hash = "sha256:a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5"}, -] +python-versions = ">=3.6" [package.dependencies] -anyio = "*" certifi = "*" -httpcore = "==1.*" -idna = "*" +charset-normalizer = "*" +httpcore = ">=0.13.3,<0.14.0" +rfc3986 = {version = ">=1.3,<2", extras = ["idna2008"]} sniffio = "*" [package.extras] -brotli = ["brotli", "brotlicffi"] -cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] +brotli = ["brotlicffi", "brotli"] +cli = ["click (>=8.0.0,<9.0.0)", "rich (>=10.0.0,<11.0.0)", "pygments (>=2.0.0,<3.0.0)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (==1.*)"] [[package]] name = "hypercorn" -version = "0.17.3" -description = "A ASGI Server based on Hyper libraries and inspired by Gunicorn" +version = "0.11.2" +description = "A ASGI Server based on Hyper libraries and inspired by Gunicorn." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "hypercorn-0.17.3-py3-none-any.whl", hash = "sha256:059215dec34537f9d40a69258d323f56344805efb462959e727152b0aa504547"}, - {file = "hypercorn-0.17.3.tar.gz", hash = "sha256:1b37802ee3ac52d2d85270700d565787ab16cf19e1462ccfa9f089ca17574165"}, -] +python-versions = ">=3.7" [package.dependencies] -exceptiongroup = {version = ">=1.1.0", markers = "python_version < \"3.11\""} h11 = "*" h2 = ">=3.1.0" priority = "*" -taskgroup = {version = "*", markers = "python_version < \"3.11\""} -tomli = {version = "*", markers = "python_version < \"3.11\""} -typing_extensions = {version = "*", markers = "python_version < \"3.11\""} +toml = "*" wsproto = ">=0.14.0" [package.extras] -docs = ["pydata_sphinx_theme", "sphinxcontrib_mermaid"] h3 = ["aioquic (>=0.9.0,<1.0)"] -trio = ["trio (>=0.22.0)"] -uvloop = ["uvloop (>=0.18)"] +tests = ["hypothesis", "mock", "pytest", "pytest-asyncio", "pytest-cov", "pytest-trio", "trio"] +trio = ["trio (>=0.11.0)"] +uvloop = ["uvloop"] [[package]] name = "hyperframe" version = "6.0.1" description = "HTTP/2 framing layer for Python" +category = "main" optional = false python-versions = ">=3.6.1" -files = [ - {file = "hyperframe-6.0.1-py3-none-any.whl", hash = "sha256:0ec6bafd80d8ad2195c4f03aacba3a8265e57bc4cff261e802bf39970ed02a15"}, - {file = "hyperframe-6.0.1.tar.gz", hash = "sha256:ae510046231dc8e9ecb1a6586f63d2347bf4c8905914aa84ba585ae85f28a914"}, -] [[package]] name = "idna" -version = "3.7" +version = "3.3" description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" optional = false python-versions = ">=3.5" -files = [ - {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, - {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, -] [[package]] name = "importlib-metadata" -version = "8.0.0" +version = "4.10.1" description = "Read metadata from Python packages" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "importlib_metadata-8.0.0-py3-none-any.whl", hash = "sha256:15584cf2b1bf449d98ff8a6ff1abef57bf20f3ac6454f431736cd3e660921b2f"}, - {file = "importlib_metadata-8.0.0.tar.gz", hash = "sha256:188bd24e4c346d3f0a933f275c2fec67050326a856b9a359881d7c2a697e8812"}, -] +python-versions = ">=3.7" [package.dependencies] zipp = ">=0.5" [package.extras] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] perf = ["ipython"] -test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" -version = "2.0.0" -description = "brain-dead simple config-ini parsing" +version = "1.1.1" +description = "iniconfig: brain-dead simple config-ini parsing" +category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, -] +python-versions = "*" + +[[package]] +name = "isort" +version = "5.10.1" +description = "A Python utility / library to sort Python imports." +category = "dev" +optional = false +python-versions = ">=3.6.1,<4.0" + +[package.extras] +pipfile_deprecated_finder = ["pipreqs", "requirementslib"] +requirements_deprecated_finder = ["pipreqs", "pip-api"] +colors = ["colorama (>=0.4.3,<0.5.0)"] +plugins = ["setuptools"] [[package]] name = "itsdangerous" -version = "2.2.0" +version = "2.0.1" description = "Safely pass data to untrusted environments and back." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef"}, - {file = "itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173"}, -] +python-versions = ">=3.6" [[package]] name = "jinja2" -version = "3.1.4" +version = "3.0.3" description = "A very fast and expressive template engine." +category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, - {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, -] +python-versions = ">=3.6" [package.dependencies] MarkupSafe = ">=2.0" @@ -981,926 +507,332 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "lxml" -version = "5.3.0" +version = "4.7.1" description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." +category = "main" optional = false -python-versions = ">=3.6" -files = [ - {file = "lxml-5.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:dd36439be765e2dde7660212b5275641edbc813e7b24668831a5c8ac91180656"}, - {file = "lxml-5.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ae5fe5c4b525aa82b8076c1a59d642c17b6e8739ecf852522c6321852178119d"}, - {file = "lxml-5.3.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:501d0d7e26b4d261fca8132854d845e4988097611ba2531408ec91cf3fd9d20a"}, - {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb66442c2546446944437df74379e9cf9e9db353e61301d1a0e26482f43f0dd8"}, - {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9e41506fec7a7f9405b14aa2d5c8abbb4dbbd09d88f9496958b6d00cb4d45330"}, - {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f7d4a670107d75dfe5ad080bed6c341d18c4442f9378c9f58e5851e86eb79965"}, - {file = "lxml-5.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41ce1f1e2c7755abfc7e759dc34d7d05fd221723ff822947132dc934d122fe22"}, - {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:44264ecae91b30e5633013fb66f6ddd05c006d3e0e884f75ce0b4755b3e3847b"}, - {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_ppc64le.whl", hash = "sha256:3c174dc350d3ec52deb77f2faf05c439331d6ed5e702fc247ccb4e6b62d884b7"}, - {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_s390x.whl", hash = "sha256:2dfab5fa6a28a0b60a20638dc48e6343c02ea9933e3279ccb132f555a62323d8"}, - {file = "lxml-5.3.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b1c8c20847b9f34e98080da785bb2336ea982e7f913eed5809e5a3c872900f32"}, - {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2c86bf781b12ba417f64f3422cfc302523ac9cd1d8ae8c0f92a1c66e56ef2e86"}, - {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:c162b216070f280fa7da844531169be0baf9ccb17263cf5a8bf876fcd3117fa5"}, - {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:36aef61a1678cb778097b4a6eeae96a69875d51d1e8f4d4b491ab3cfb54b5a03"}, - {file = "lxml-5.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f65e5120863c2b266dbcc927b306c5b78e502c71edf3295dfcb9501ec96e5fc7"}, - {file = "lxml-5.3.0-cp310-cp310-win32.whl", hash = "sha256:ef0c1fe22171dd7c7c27147f2e9c3e86f8bdf473fed75f16b0c2e84a5030ce80"}, - {file = "lxml-5.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:052d99051e77a4f3e8482c65014cf6372e61b0a6f4fe9edb98503bb5364cfee3"}, - {file = "lxml-5.3.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:74bcb423462233bc5d6066e4e98b0264e7c1bed7541fff2f4e34fe6b21563c8b"}, - {file = "lxml-5.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a3d819eb6f9b8677f57f9664265d0a10dd6551d227afb4af2b9cd7bdc2ccbf18"}, - {file = "lxml-5.3.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b8f5db71b28b8c404956ddf79575ea77aa8b1538e8b2ef9ec877945b3f46442"}, - {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2c3406b63232fc7e9b8783ab0b765d7c59e7c59ff96759d8ef9632fca27c7ee4"}, - {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ecdd78ab768f844c7a1d4a03595038c166b609f6395e25af9b0f3f26ae1230f"}, - {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:168f2dfcfdedf611eb285efac1516c8454c8c99caf271dccda8943576b67552e"}, - {file = "lxml-5.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa617107a410245b8660028a7483b68e7914304a6d4882b5ff3d2d3eb5948d8c"}, - {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:69959bd3167b993e6e710b99051265654133a98f20cec1d9b493b931942e9c16"}, - {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_ppc64le.whl", hash = "sha256:bd96517ef76c8654446fc3db9242d019a1bb5fe8b751ba414765d59f99210b79"}, - {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_s390x.whl", hash = "sha256:ab6dd83b970dc97c2d10bc71aa925b84788c7c05de30241b9e96f9b6d9ea3080"}, - {file = "lxml-5.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:eec1bb8cdbba2925bedc887bc0609a80e599c75b12d87ae42ac23fd199445654"}, - {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6a7095eeec6f89111d03dabfe5883a1fd54da319c94e0fb104ee8f23616b572d"}, - {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6f651ebd0b21ec65dfca93aa629610a0dbc13dbc13554f19b0113da2e61a4763"}, - {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:f422a209d2455c56849442ae42f25dbaaba1c6c3f501d58761c619c7836642ec"}, - {file = "lxml-5.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:62f7fdb0d1ed2065451f086519865b4c90aa19aed51081979ecd05a21eb4d1be"}, - {file = "lxml-5.3.0-cp311-cp311-win32.whl", hash = "sha256:c6379f35350b655fd817cd0d6cbeef7f265f3ae5fedb1caae2eb442bbeae9ab9"}, - {file = "lxml-5.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:9c52100e2c2dbb0649b90467935c4b0de5528833c76a35ea1a2691ec9f1ee7a1"}, - {file = "lxml-5.3.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:e99f5507401436fdcc85036a2e7dc2e28d962550afe1cbfc07c40e454256a859"}, - {file = "lxml-5.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:384aacddf2e5813a36495233b64cb96b1949da72bef933918ba5c84e06af8f0e"}, - {file = "lxml-5.3.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:874a216bf6afaf97c263b56371434e47e2c652d215788396f60477540298218f"}, - {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65ab5685d56914b9a2a34d67dd5488b83213d680b0c5d10b47f81da5a16b0b0e"}, - {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aac0bbd3e8dd2d9c45ceb82249e8bdd3ac99131a32b4d35c8af3cc9db1657179"}, - {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b369d3db3c22ed14c75ccd5af429086f166a19627e84a8fdade3f8f31426e52a"}, - {file = "lxml-5.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c24037349665434f375645fa9d1f5304800cec574d0310f618490c871fd902b3"}, - {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:62d172f358f33a26d6b41b28c170c63886742f5b6772a42b59b4f0fa10526cb1"}, - {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_ppc64le.whl", hash = "sha256:c1f794c02903c2824fccce5b20c339a1a14b114e83b306ff11b597c5f71a1c8d"}, - {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_s390x.whl", hash = "sha256:5d6a6972b93c426ace71e0be9a6f4b2cfae9b1baed2eed2006076a746692288c"}, - {file = "lxml-5.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:3879cc6ce938ff4eb4900d901ed63555c778731a96365e53fadb36437a131a99"}, - {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:74068c601baff6ff021c70f0935b0c7bc528baa8ea210c202e03757c68c5a4ff"}, - {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:ecd4ad8453ac17bc7ba3868371bffb46f628161ad0eefbd0a855d2c8c32dd81a"}, - {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:7e2f58095acc211eb9d8b5771bf04df9ff37d6b87618d1cbf85f92399c98dae8"}, - {file = "lxml-5.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e63601ad5cd8f860aa99d109889b5ac34de571c7ee902d6812d5d9ddcc77fa7d"}, - {file = "lxml-5.3.0-cp312-cp312-win32.whl", hash = "sha256:17e8d968d04a37c50ad9c456a286b525d78c4a1c15dd53aa46c1d8e06bf6fa30"}, - {file = "lxml-5.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:c1a69e58a6bb2de65902051d57fde951febad631a20a64572677a1052690482f"}, - {file = "lxml-5.3.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8c72e9563347c7395910de6a3100a4840a75a6f60e05af5e58566868d5eb2d6a"}, - {file = "lxml-5.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e92ce66cd919d18d14b3856906a61d3f6b6a8500e0794142338da644260595cd"}, - {file = "lxml-5.3.0-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d04f064bebdfef9240478f7a779e8c5dc32b8b7b0b2fc6a62e39b928d428e51"}, - {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c2fb570d7823c2bbaf8b419ba6e5662137f8166e364a8b2b91051a1fb40ab8b"}, - {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0c120f43553ec759f8de1fee2f4794452b0946773299d44c36bfe18e83caf002"}, - {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:562e7494778a69086f0312ec9689f6b6ac1c6b65670ed7d0267e49f57ffa08c4"}, - {file = "lxml-5.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:423b121f7e6fa514ba0c7918e56955a1d4470ed35faa03e3d9f0e3baa4c7e492"}, - {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:c00f323cc00576df6165cc9d21a4c21285fa6b9989c5c39830c3903dc4303ef3"}, - {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_ppc64le.whl", hash = "sha256:1fdc9fae8dd4c763e8a31e7630afef517eab9f5d5d31a278df087f307bf601f4"}, - {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_s390x.whl", hash = "sha256:658f2aa69d31e09699705949b5fc4719cbecbd4a97f9656a232e7d6c7be1a367"}, - {file = "lxml-5.3.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:1473427aff3d66a3fa2199004c3e601e6c4500ab86696edffdbc84954c72d832"}, - {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a87de7dd873bf9a792bf1e58b1c3887b9264036629a5bf2d2e6579fe8e73edff"}, - {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:0d7b36afa46c97875303a94e8f3ad932bf78bace9e18e603f2085b652422edcd"}, - {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:cf120cce539453ae086eacc0130a324e7026113510efa83ab42ef3fcfccac7fb"}, - {file = "lxml-5.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:df5c7333167b9674aa8ae1d4008fa4bc17a313cc490b2cca27838bbdcc6bb15b"}, - {file = "lxml-5.3.0-cp313-cp313-win32.whl", hash = "sha256:c802e1c2ed9f0c06a65bc4ed0189d000ada8049312cfeab6ca635e39c9608957"}, - {file = "lxml-5.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:406246b96d552e0503e17a1006fd27edac678b3fcc9f1be71a2f94b4ff61528d"}, - {file = "lxml-5.3.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:8f0de2d390af441fe8b2c12626d103540b5d850d585b18fcada58d972b74a74e"}, - {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1afe0a8c353746e610bd9031a630a95bcfb1a720684c3f2b36c4710a0a96528f"}, - {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56b9861a71575f5795bde89256e7467ece3d339c9b43141dbdd54544566b3b94"}, - {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_28_x86_64.whl", hash = "sha256:9fb81d2824dff4f2e297a276297e9031f46d2682cafc484f49de182aa5e5df99"}, - {file = "lxml-5.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:2c226a06ecb8cdef28845ae976da407917542c5e6e75dcac7cc33eb04aaeb237"}, - {file = "lxml-5.3.0-cp36-cp36m-musllinux_1_2_x86_64.whl", hash = "sha256:7d3d1ca42870cdb6d0d29939630dbe48fa511c203724820fc0fd507b2fb46577"}, - {file = "lxml-5.3.0-cp36-cp36m-win32.whl", hash = "sha256:094cb601ba9f55296774c2d57ad68730daa0b13dc260e1f941b4d13678239e70"}, - {file = "lxml-5.3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:eafa2c8658f4e560b098fe9fc54539f86528651f61849b22111a9b107d18910c"}, - {file = "lxml-5.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cb83f8a875b3d9b458cada4f880fa498646874ba4011dc974e071a0a84a1b033"}, - {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25f1b69d41656b05885aa185f5fdf822cb01a586d1b32739633679699f220391"}, - {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23e0553b8055600b3bf4a00b255ec5c92e1e4aebf8c2c09334f8368e8bd174d6"}, - {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ada35dd21dc6c039259596b358caab6b13f4db4d4a7f8665764d616daf9cc1d"}, - {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:81b4e48da4c69313192d8c8d4311e5d818b8be1afe68ee20f6385d0e96fc9512"}, - {file = "lxml-5.3.0-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:2bc9fd5ca4729af796f9f59cd8ff160fe06a474da40aca03fcc79655ddee1a8b"}, - {file = "lxml-5.3.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:07da23d7ee08577760f0a71d67a861019103e4812c87e2fab26b039054594cc5"}, - {file = "lxml-5.3.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:ea2e2f6f801696ad7de8aec061044d6c8c0dd4037608c7cab38a9a4d316bfb11"}, - {file = "lxml-5.3.0-cp37-cp37m-win32.whl", hash = "sha256:5c54afdcbb0182d06836cc3d1be921e540be3ebdf8b8a51ee3ef987537455f84"}, - {file = "lxml-5.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:f2901429da1e645ce548bf9171784c0f74f0718c3f6150ce166be39e4dd66c3e"}, - {file = "lxml-5.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c56a1d43b2f9ee4786e4658c7903f05da35b923fb53c11025712562d5cc02753"}, - {file = "lxml-5.3.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ee8c39582d2652dcd516d1b879451500f8db3fe3607ce45d7c5957ab2596040"}, - {file = "lxml-5.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fdf3a3059611f7585a78ee10399a15566356116a4288380921a4b598d807a22"}, - {file = "lxml-5.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:146173654d79eb1fc97498b4280c1d3e1e5d58c398fa530905c9ea50ea849b22"}, - {file = "lxml-5.3.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:0a7056921edbdd7560746f4221dca89bb7a3fe457d3d74267995253f46343f15"}, - {file = "lxml-5.3.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:9e4b47ac0f5e749cfc618efdf4726269441014ae1d5583e047b452a32e221920"}, - {file = "lxml-5.3.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:f914c03e6a31deb632e2daa881fe198461f4d06e57ac3d0e05bbcab8eae01945"}, - {file = "lxml-5.3.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:213261f168c5e1d9b7535a67e68b1f59f92398dd17a56d934550837143f79c42"}, - {file = "lxml-5.3.0-cp38-cp38-win32.whl", hash = "sha256:218c1b2e17a710e363855594230f44060e2025b05c80d1f0661258142b2add2e"}, - {file = "lxml-5.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:315f9542011b2c4e1d280e4a20ddcca1761993dda3afc7a73b01235f8641e903"}, - {file = "lxml-5.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1ffc23010330c2ab67fac02781df60998ca8fe759e8efde6f8b756a20599c5de"}, - {file = "lxml-5.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2b3778cb38212f52fac9fe913017deea2fdf4eb1a4f8e4cfc6b009a13a6d3fcc"}, - {file = "lxml-5.3.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b0c7a688944891086ba192e21c5229dea54382f4836a209ff8d0a660fac06be"}, - {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:747a3d3e98e24597981ca0be0fd922aebd471fa99d0043a3842d00cdcad7ad6a"}, - {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86a6b24b19eaebc448dc56b87c4865527855145d851f9fc3891673ff97950540"}, - {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b11a5d918a6216e521c715b02749240fb07ae5a1fefd4b7bf12f833bc8b4fe70"}, - {file = "lxml-5.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68b87753c784d6acb8a25b05cb526c3406913c9d988d51f80adecc2b0775d6aa"}, - {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:109fa6fede314cc50eed29e6e56c540075e63d922455346f11e4d7a036d2b8cf"}, - {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_ppc64le.whl", hash = "sha256:02ced472497b8362c8e902ade23e3300479f4f43e45f4105c85ef43b8db85229"}, - {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_s390x.whl", hash = "sha256:6b038cc86b285e4f9fea2ba5ee76e89f21ed1ea898e287dc277a25884f3a7dfe"}, - {file = "lxml-5.3.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:7437237c6a66b7ca341e868cda48be24b8701862757426852c9b3186de1da8a2"}, - {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7f41026c1d64043a36fda21d64c5026762d53a77043e73e94b71f0521939cc71"}, - {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:482c2f67761868f0108b1743098640fbb2a28a8e15bf3f47ada9fa59d9fe08c3"}, - {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:1483fd3358963cc5c1c9b122c80606a3a79ee0875bcac0204149fa09d6ff2727"}, - {file = "lxml-5.3.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2dec2d1130a9cda5b904696cec33b2cfb451304ba9081eeda7f90f724097300a"}, - {file = "lxml-5.3.0-cp39-cp39-win32.whl", hash = "sha256:a0eabd0a81625049c5df745209dc7fcef6e2aea7793e5f003ba363610aa0a3ff"}, - {file = "lxml-5.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:89e043f1d9d341c52bf2af6d02e6adde62e0a46e6755d5eb60dc6e4f0b8aeca2"}, - {file = "lxml-5.3.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7b1cd427cb0d5f7393c31b7496419da594fe600e6fdc4b105a54f82405e6626c"}, - {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51806cfe0279e06ed8500ce19479d757db42a30fd509940b1701be9c86a5ff9a"}, - {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee70d08fd60c9565ba8190f41a46a54096afa0eeb8f76bd66f2c25d3b1b83005"}, - {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:8dc2c0395bea8254d8daebc76dcf8eb3a95ec2a46fa6fae5eaccee366bfe02ce"}, - {file = "lxml-5.3.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:6ba0d3dcac281aad8a0e5b14c7ed6f9fa89c8612b47939fc94f80b16e2e9bc83"}, - {file = "lxml-5.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:6e91cf736959057f7aac7adfc83481e03615a8e8dd5758aa1d95ea69e8931dba"}, - {file = "lxml-5.3.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:94d6c3782907b5e40e21cadf94b13b0842ac421192f26b84c45f13f3c9d5dc27"}, - {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c300306673aa0f3ed5ed9372b21867690a17dba38c68c44b287437c362ce486b"}, - {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78d9b952e07aed35fe2e1a7ad26e929595412db48535921c5013edc8aa4a35ce"}, - {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:01220dca0d066d1349bd6a1726856a78f7929f3878f7e2ee83c296c69495309e"}, - {file = "lxml-5.3.0-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:2d9b8d9177afaef80c53c0a9e30fa252ff3036fb1c6494d427c066a4ce6a282f"}, - {file = "lxml-5.3.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:20094fc3f21ea0a8669dc4c61ed7fa8263bd37d97d93b90f28fc613371e7a875"}, - {file = "lxml-5.3.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ace2c2326a319a0bb8a8b0e5b570c764962e95818de9f259ce814ee666603f19"}, - {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:92e67a0be1639c251d21e35fe74df6bcc40cba445c2cda7c4a967656733249e2"}, - {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd5350b55f9fecddc51385463a4f67a5da829bc741e38cf689f38ec9023f54ab"}, - {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:4c1fefd7e3d00921c44dc9ca80a775af49698bbfd92ea84498e56acffd4c5469"}, - {file = "lxml-5.3.0-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:71a8dd38fbd2f2319136d4ae855a7078c69c9a38ae06e0c17c73fd70fc6caad8"}, - {file = "lxml-5.3.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:97acf1e1fd66ab53dacd2c35b319d7e548380c2e9e8c54525c6e76d21b1ae3b1"}, - {file = "lxml-5.3.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:68934b242c51eb02907c5b81d138cb977b2129a0a75a8f8b60b01cb8586c7b21"}, - {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b710bc2b8292966b23a6a0121f7a6c51d45d2347edcc75f016ac123b8054d3f2"}, - {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18feb4b93302091b1541221196a2155aa296c363fd233814fa11e181adebc52f"}, - {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:3eb44520c4724c2e1a57c0af33a379eee41792595023f367ba3952a2d96c2aab"}, - {file = "lxml-5.3.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:609251a0ca4770e5a8768ff902aa02bf636339c5a93f9349b48eb1f606f7f3e9"}, - {file = "lxml-5.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:516f491c834eb320d6c843156440fe7fc0d50b33e44387fcec5b02f0bc118a4c"}, - {file = "lxml-5.3.0.tar.gz", hash = "sha256:4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f"}, -] +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" [package.extras] cssselect = ["cssselect (>=0.7)"] -html-clean = ["lxml-html-clean"] html5 = ["html5lib"] -htmlsoup = ["BeautifulSoup4"] -source = ["Cython (>=3.0.11)"] +htmlsoup = ["beautifulsoup4"] +source = ["Cython (>=0.29.7)"] [[package]] name = "mako" -version = "1.3.5" -description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +version = "1.1.6" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "Mako-1.3.5-py3-none-any.whl", hash = "sha256:260f1dbc3a519453a9c856dedfe4beb4e50bd5a26d96386cb6c80856556bb91a"}, - {file = "Mako-1.3.5.tar.gz", hash = "sha256:48dbc20568c1d276a2698b36d968fa76161bf127194907ea6fc594fa81f943bc"}, -] +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] MarkupSafe = ">=0.9.2" [package.extras] -babel = ["Babel"] +babel = ["babel"] lingua = ["lingua"] -testing = ["pytest"] [[package]] name = "markdown" -version = "3.7" -description = "Python implementation of John Gruber's Markdown." +version = "3.3.6" +description = "Python implementation of Markdown." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "Markdown-3.7-py3-none-any.whl", hash = "sha256:7eb6df5690b81a1d7942992c97fad2938e956e79df20cbc6186e9c3a77b1c803"}, - {file = "markdown-3.7.tar.gz", hash = "sha256:2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2"}, -] +python-versions = ">=3.6" + +[package.dependencies] +importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} [package.extras] -docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.5)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] testing = ["coverage", "pyyaml"] [[package]] name = "markupsafe" -version = "2.1.5" +version = "2.0.1" description = "Safely add untrusted strings to HTML/XML markup." +category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, - {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, -] +python-versions = ">=3.6" + +[[package]] +name = "mccabe" +version = "0.6.1" +description = "McCabe checker, plugin for flake8" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "mysql-connector" +version = "2.2.9" +description = "MySQL driver written in Python" +category = "main" +optional = false +python-versions = "*" [[package]] name = "mysqlclient" -version = "2.2.4" +version = "2.1.0" description = "Python interface to MySQL" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "mysqlclient-2.2.4-cp310-cp310-win_amd64.whl", hash = "sha256:ac44777eab0a66c14cb0d38965572f762e193ec2e5c0723bcd11319cc5b693c5"}, - {file = "mysqlclient-2.2.4-cp311-cp311-win_amd64.whl", hash = "sha256:329e4eec086a2336fe3541f1ce095d87a6f169d1cc8ba7b04ac68bcb234c9711"}, - {file = "mysqlclient-2.2.4-cp312-cp312-win_amd64.whl", hash = "sha256:e1ebe3f41d152d7cb7c265349fdb7f1eca86ccb0ca24a90036cde48e00ceb2ab"}, - {file = "mysqlclient-2.2.4-cp38-cp38-win_amd64.whl", hash = "sha256:3c318755e06df599338dad7625f884b8a71fcf322a9939ef78c9b3db93e1de7a"}, - {file = "mysqlclient-2.2.4-cp39-cp39-win_amd64.whl", hash = "sha256:9d4c015480c4a6b2b1602eccd9846103fc70606244788d04aa14b31c4bd1f0e2"}, - {file = "mysqlclient-2.2.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d43987bb9626096a302ca6ddcdd81feaeca65ced1d5fe892a6a66b808326aa54"}, - {file = "mysqlclient-2.2.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:4e80dcad884dd6e14949ac6daf769123223a52a6805345608bf49cdaf7bc8b3a"}, - {file = "mysqlclient-2.2.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:9d3310295cb682232cadc28abd172f406c718b9ada41d2371259098ae37779d3"}, - {file = "mysqlclient-2.2.4.tar.gz", hash = "sha256:33bc9fb3464e7d7c10b1eaf7336c5ff8f2a3d3b88bab432116ad2490beb3bf41"}, -] - -[[package]] -name = "opentelemetry-api" -version = "1.26.0" -description = "OpenTelemetry Python API" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_api-1.26.0-py3-none-any.whl", hash = "sha256:7d7ea33adf2ceda2dd680b18b1677e4152000b37ca76e679da71ff103b943064"}, - {file = "opentelemetry_api-1.26.0.tar.gz", hash = "sha256:2bd639e4bed5b18486fef0b5a520aaffde5a18fc225e808a1ac4df363f43a1ce"}, -] - -[package.dependencies] -deprecated = ">=1.2.6" -importlib-metadata = ">=6.0,<=8.0.0" - -[[package]] -name = "opentelemetry-exporter-otlp-proto-common" -version = "1.26.0" -description = "OpenTelemetry Protobuf encoding" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_exporter_otlp_proto_common-1.26.0-py3-none-any.whl", hash = "sha256:ee4d8f8891a1b9c372abf8d109409e5b81947cf66423fd998e56880057afbc71"}, - {file = "opentelemetry_exporter_otlp_proto_common-1.26.0.tar.gz", hash = "sha256:bdbe50e2e22a1c71acaa0c8ba6efaadd58882e5a5978737a44a4c4b10d304c92"}, -] - -[package.dependencies] -opentelemetry-proto = "1.26.0" - -[[package]] -name = "opentelemetry-exporter-otlp-proto-http" -version = "1.26.0" -description = "OpenTelemetry Collector Protobuf over HTTP Exporter" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_exporter_otlp_proto_http-1.26.0-py3-none-any.whl", hash = "sha256:ee72a87c48ec977421b02f16c52ea8d884122470e0be573905237b540f4ee562"}, - {file = "opentelemetry_exporter_otlp_proto_http-1.26.0.tar.gz", hash = "sha256:5801ebbcf7b527377883e6cbbdda35ee712dc55114fff1e93dfee210be56c908"}, -] - -[package.dependencies] -deprecated = ">=1.2.6" -googleapis-common-protos = ">=1.52,<2.0" -opentelemetry-api = ">=1.15,<2.0" -opentelemetry-exporter-otlp-proto-common = "1.26.0" -opentelemetry-proto = "1.26.0" -opentelemetry-sdk = ">=1.26.0,<1.27.0" -requests = ">=2.7,<3.0" - -[[package]] -name = "opentelemetry-instrumentation" -version = "0.47b0" -description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_instrumentation-0.47b0-py3-none-any.whl", hash = "sha256:88974ee52b1db08fc298334b51c19d47e53099c33740e48c4f084bd1afd052d5"}, - {file = "opentelemetry_instrumentation-0.47b0.tar.gz", hash = "sha256:96f9885e450c35e3f16a4f33145f2ebf620aea910c9fd74a392bbc0f807a350f"}, -] - -[package.dependencies] -opentelemetry-api = ">=1.4,<2.0" -setuptools = ">=16.0" -wrapt = ">=1.0.0,<2.0.0" - -[[package]] -name = "opentelemetry-instrumentation-asgi" -version = "0.47b0" -description = "ASGI instrumentation for OpenTelemetry" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_instrumentation_asgi-0.47b0-py3-none-any.whl", hash = "sha256:b798dc4957b3edc9dfecb47a4c05809036a4b762234c5071212fda39ead80ade"}, - {file = "opentelemetry_instrumentation_asgi-0.47b0.tar.gz", hash = "sha256:e78b7822c1bca0511e5e9610ec484b8994a81670375e570c76f06f69af7c506a"}, -] - -[package.dependencies] -asgiref = ">=3.0,<4.0" -opentelemetry-api = ">=1.12,<2.0" -opentelemetry-instrumentation = "0.47b0" -opentelemetry-semantic-conventions = "0.47b0" -opentelemetry-util-http = "0.47b0" - -[package.extras] -instruments = ["asgiref (>=3.0,<4.0)"] - -[[package]] -name = "opentelemetry-instrumentation-fastapi" -version = "0.47b0" -description = "OpenTelemetry FastAPI Instrumentation" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_instrumentation_fastapi-0.47b0-py3-none-any.whl", hash = "sha256:5ac28dd401160b02e4f544a85a9e4f61a8cbe5b077ea0379d411615376a2bd21"}, - {file = "opentelemetry_instrumentation_fastapi-0.47b0.tar.gz", hash = "sha256:0c7c10b5d971e99a420678ffd16c5b1ea4f0db3b31b62faf305fbb03b4ebee36"}, -] - -[package.dependencies] -opentelemetry-api = ">=1.12,<2.0" -opentelemetry-instrumentation = "0.47b0" -opentelemetry-instrumentation-asgi = "0.47b0" -opentelemetry-semantic-conventions = "0.47b0" -opentelemetry-util-http = "0.47b0" - -[package.extras] -instruments = ["fastapi (>=0.58,<1.0)", "fastapi-slim (>=0.111.0,<0.112.0)"] - -[[package]] -name = "opentelemetry-instrumentation-redis" -version = "0.47b0" -description = "OpenTelemetry Redis instrumentation" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_instrumentation_redis-0.47b0-py3-none-any.whl", hash = "sha256:169de5154cc37ccf402dd43ac06a47f7f883abba7c0a8f99b2731164ec4f1132"}, - {file = "opentelemetry_instrumentation_redis-0.47b0.tar.gz", hash = "sha256:15886c725c7e3b6f706964bd72dbfcbefeeeaa1254e98f662516cfed453aaebe"}, -] - -[package.dependencies] -opentelemetry-api = ">=1.12,<2.0" -opentelemetry-instrumentation = "0.47b0" -opentelemetry-semantic-conventions = "0.47b0" -wrapt = ">=1.12.1" - -[package.extras] -instruments = ["redis (>=2.6)"] - -[[package]] -name = "opentelemetry-instrumentation-sqlalchemy" -version = "0.47b0" -description = "OpenTelemetry SQLAlchemy instrumentation" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_instrumentation_sqlalchemy-0.47b0-py3-none-any.whl", hash = "sha256:997b2c4a624ebcba45b9bda27882622d0ab3028d66a5fb50cdcf3581af04b3d1"}, - {file = "opentelemetry_instrumentation_sqlalchemy-0.47b0.tar.gz", hash = "sha256:bbeab06fc421ddae16bb69ca287abb81a131d3dff97de60b02c092887794103d"}, -] - -[package.dependencies] -opentelemetry-api = ">=1.12,<2.0" -opentelemetry-instrumentation = "0.47b0" -opentelemetry-semantic-conventions = "0.47b0" -packaging = ">=21.0" -wrapt = ">=1.11.2" - -[package.extras] -instruments = ["sqlalchemy"] - -[[package]] -name = "opentelemetry-proto" -version = "1.26.0" -description = "OpenTelemetry Python Proto" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_proto-1.26.0-py3-none-any.whl", hash = "sha256:6c4d7b4d4d9c88543bcf8c28ae3f8f0448a753dc291c18c5390444c90b76a725"}, - {file = "opentelemetry_proto-1.26.0.tar.gz", hash = "sha256:c5c18796c0cab3751fc3b98dee53855835e90c0422924b484432ac852d93dc1e"}, -] - -[package.dependencies] -protobuf = ">=3.19,<5.0" - -[[package]] -name = "opentelemetry-sdk" -version = "1.26.0" -description = "OpenTelemetry Python SDK" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_sdk-1.26.0-py3-none-any.whl", hash = "sha256:feb5056a84a88670c041ea0ded9921fca559efec03905dddeb3885525e0af897"}, - {file = "opentelemetry_sdk-1.26.0.tar.gz", hash = "sha256:c90d2868f8805619535c05562d699e2f4fb1f00dbd55a86dcefca4da6fa02f85"}, -] - -[package.dependencies] -opentelemetry-api = "1.26.0" -opentelemetry-semantic-conventions = "0.47b0" -typing-extensions = ">=3.7.4" - -[[package]] -name = "opentelemetry-semantic-conventions" -version = "0.47b0" -description = "OpenTelemetry Semantic Conventions" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_semantic_conventions-0.47b0-py3-none-any.whl", hash = "sha256:4ff9d595b85a59c1c1413f02bba320ce7ea6bf9e2ead2b0913c4395c7bbc1063"}, - {file = "opentelemetry_semantic_conventions-0.47b0.tar.gz", hash = "sha256:a8d57999bbe3495ffd4d510de26a97dadc1dace53e0275001b2c1b2f67992a7e"}, -] - -[package.dependencies] -deprecated = ">=1.2.6" -opentelemetry-api = "1.26.0" - -[[package]] -name = "opentelemetry-util-http" -version = "0.47b0" -description = "Web util for OpenTelemetry" -optional = false -python-versions = ">=3.8" -files = [ - {file = "opentelemetry_util_http-0.47b0-py3-none-any.whl", hash = "sha256:3d3215e09c4a723b12da6d0233a31395aeb2bb33a64d7b15a1500690ba250f19"}, - {file = "opentelemetry_util_http-0.47b0.tar.gz", hash = "sha256:352a07664c18eef827eb8ddcbd64c64a7284a39dd1655e2f16f577eb046ccb32"}, -] +python-versions = ">=3.5" [[package]] name = "orjson" -version = "3.10.7" +version = "3.6.6" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "orjson-3.10.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:74f4544f5a6405b90da8ea724d15ac9c36da4d72a738c64685003337401f5c12"}, - {file = "orjson-3.10.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34a566f22c28222b08875b18b0dfbf8a947e69df21a9ed5c51a6bf91cfb944ac"}, - {file = "orjson-3.10.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bf6ba8ebc8ef5792e2337fb0419f8009729335bb400ece005606336b7fd7bab7"}, - {file = "orjson-3.10.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ac7cf6222b29fbda9e3a472b41e6a5538b48f2c8f99261eecd60aafbdb60690c"}, - {file = "orjson-3.10.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de817e2f5fc75a9e7dd350c4b0f54617b280e26d1631811a43e7e968fa71e3e9"}, - {file = "orjson-3.10.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:348bdd16b32556cf8d7257b17cf2bdb7ab7976af4af41ebe79f9796c218f7e91"}, - {file = "orjson-3.10.7-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:479fd0844ddc3ca77e0fd99644c7fe2de8e8be1efcd57705b5c92e5186e8a250"}, - {file = "orjson-3.10.7-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:fdf5197a21dd660cf19dfd2a3ce79574588f8f5e2dbf21bda9ee2d2b46924d84"}, - {file = "orjson-3.10.7-cp310-none-win32.whl", hash = "sha256:d374d36726746c81a49f3ff8daa2898dccab6596864ebe43d50733275c629175"}, - {file = "orjson-3.10.7-cp310-none-win_amd64.whl", hash = "sha256:cb61938aec8b0ffb6eef484d480188a1777e67b05d58e41b435c74b9d84e0b9c"}, - {file = "orjson-3.10.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:7db8539039698ddfb9a524b4dd19508256107568cdad24f3682d5773e60504a2"}, - {file = "orjson-3.10.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:480f455222cb7a1dea35c57a67578848537d2602b46c464472c995297117fa09"}, - {file = "orjson-3.10.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8a9c9b168b3a19e37fe2778c0003359f07822c90fdff8f98d9d2a91b3144d8e0"}, - {file = "orjson-3.10.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8de062de550f63185e4c1c54151bdddfc5625e37daf0aa1e75d2a1293e3b7d9a"}, - {file = "orjson-3.10.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6b0dd04483499d1de9c8f6203f8975caf17a6000b9c0c54630cef02e44ee624e"}, - {file = "orjson-3.10.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b58d3795dafa334fc8fd46f7c5dc013e6ad06fd5b9a4cc98cb1456e7d3558bd6"}, - {file = "orjson-3.10.7-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:33cfb96c24034a878d83d1a9415799a73dc77480e6c40417e5dda0710d559ee6"}, - {file = "orjson-3.10.7-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:e724cebe1fadc2b23c6f7415bad5ee6239e00a69f30ee423f319c6af70e2a5c0"}, - {file = "orjson-3.10.7-cp311-none-win32.whl", hash = "sha256:82763b46053727a7168d29c772ed5c870fdae2f61aa8a25994c7984a19b1021f"}, - {file = "orjson-3.10.7-cp311-none-win_amd64.whl", hash = "sha256:eb8d384a24778abf29afb8e41d68fdd9a156cf6e5390c04cc07bbc24b89e98b5"}, - {file = "orjson-3.10.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:44a96f2d4c3af51bfac6bc4ef7b182aa33f2f054fd7f34cc0ee9a320d051d41f"}, - {file = "orjson-3.10.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76ac14cd57df0572453543f8f2575e2d01ae9e790c21f57627803f5e79b0d3c3"}, - {file = "orjson-3.10.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bdbb61dcc365dd9be94e8f7df91975edc9364d6a78c8f7adb69c1cdff318ec93"}, - {file = "orjson-3.10.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b48b3db6bb6e0a08fa8c83b47bc169623f801e5cc4f24442ab2b6617da3b5313"}, - {file = "orjson-3.10.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:23820a1563a1d386414fef15c249040042b8e5d07b40ab3fe3efbfbbcbcb8864"}, - {file = "orjson-3.10.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0c6a008e91d10a2564edbb6ee5069a9e66df3fbe11c9a005cb411f441fd2c09"}, - {file = "orjson-3.10.7-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d352ee8ac1926d6193f602cbe36b1643bbd1bbcb25e3c1a657a4390f3000c9a5"}, - {file = "orjson-3.10.7-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d2d9f990623f15c0ae7ac608103c33dfe1486d2ed974ac3f40b693bad1a22a7b"}, - {file = "orjson-3.10.7-cp312-none-win32.whl", hash = "sha256:7c4c17f8157bd520cdb7195f75ddbd31671997cbe10aee559c2d613592e7d7eb"}, - {file = "orjson-3.10.7-cp312-none-win_amd64.whl", hash = "sha256:1d9c0e733e02ada3ed6098a10a8ee0052dd55774de3d9110d29868d24b17faa1"}, - {file = "orjson-3.10.7-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:77d325ed866876c0fa6492598ec01fe30e803272a6e8b10e992288b009cbe149"}, - {file = "orjson-3.10.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ea2c232deedcb605e853ae1db2cc94f7390ac776743b699b50b071b02bea6fe"}, - {file = "orjson-3.10.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:3dcfbede6737fdbef3ce9c37af3fb6142e8e1ebc10336daa05872bfb1d87839c"}, - {file = "orjson-3.10.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:11748c135f281203f4ee695b7f80bb1358a82a63905f9f0b794769483ea854ad"}, - {file = "orjson-3.10.7-cp313-none-win32.whl", hash = "sha256:a7e19150d215c7a13f39eb787d84db274298d3f83d85463e61d277bbd7f401d2"}, - {file = "orjson-3.10.7-cp313-none-win_amd64.whl", hash = "sha256:eef44224729e9525d5261cc8d28d6b11cafc90e6bd0be2157bde69a52ec83024"}, - {file = "orjson-3.10.7-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:6ea2b2258eff652c82652d5e0f02bd5e0463a6a52abb78e49ac288827aaa1469"}, - {file = "orjson-3.10.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:430ee4d85841e1483d487e7b81401785a5dfd69db5de01314538f31f8fbf7ee1"}, - {file = "orjson-3.10.7-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4b6146e439af4c2472c56f8540d799a67a81226e11992008cb47e1267a9b3225"}, - {file = "orjson-3.10.7-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:084e537806b458911137f76097e53ce7bf5806dda33ddf6aaa66a028f8d43a23"}, - {file = "orjson-3.10.7-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4829cf2195838e3f93b70fd3b4292156fc5e097aac3739859ac0dcc722b27ac0"}, - {file = "orjson-3.10.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1193b2416cbad1a769f868b1749535d5da47626ac29445803dae7cc64b3f5c98"}, - {file = "orjson-3.10.7-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:4e6c3da13e5a57e4b3dca2de059f243ebec705857522f188f0180ae88badd354"}, - {file = "orjson-3.10.7-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c31008598424dfbe52ce8c5b47e0752dca918a4fdc4a2a32004efd9fab41d866"}, - {file = "orjson-3.10.7-cp38-none-win32.whl", hash = "sha256:7122a99831f9e7fe977dc45784d3b2edc821c172d545e6420c375e5a935f5a1c"}, - {file = "orjson-3.10.7-cp38-none-win_amd64.whl", hash = "sha256:a763bc0e58504cc803739e7df040685816145a6f3c8a589787084b54ebc9f16e"}, - {file = "orjson-3.10.7-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:e76be12658a6fa376fcd331b1ea4e58f5a06fd0220653450f0d415b8fd0fbe20"}, - {file = "orjson-3.10.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed350d6978d28b92939bfeb1a0570c523f6170efc3f0a0ef1f1df287cd4f4960"}, - {file = "orjson-3.10.7-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:144888c76f8520e39bfa121b31fd637e18d4cc2f115727865fdf9fa325b10412"}, - {file = "orjson-3.10.7-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:09b2d92fd95ad2402188cf51573acde57eb269eddabaa60f69ea0d733e789fe9"}, - {file = "orjson-3.10.7-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5b24a579123fa884f3a3caadaed7b75eb5715ee2b17ab5c66ac97d29b18fe57f"}, - {file = "orjson-3.10.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591bcfe7512353bd609875ab38050efe3d55e18934e2f18950c108334b4ff"}, - {file = "orjson-3.10.7-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:f4db56635b58cd1a200b0a23744ff44206ee6aa428185e2b6c4a65b3197abdcd"}, - {file = "orjson-3.10.7-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:0fa5886854673222618638c6df7718ea7fe2f3f2384c452c9ccedc70b4a510a5"}, - {file = "orjson-3.10.7-cp39-none-win32.whl", hash = "sha256:8272527d08450ab16eb405f47e0f4ef0e5ff5981c3d82afe0efd25dcbef2bcd2"}, - {file = "orjson-3.10.7-cp39-none-win_amd64.whl", hash = "sha256:974683d4618c0c7dbf4f69c95a979734bf183d0658611760017f6e70a145af58"}, - {file = "orjson-3.10.7.tar.gz", hash = "sha256:75ef0640403f945f3a1f9f6400686560dbfb0fb5b16589ad62cd477043c4eee3"}, -] +python-versions = ">=3.7" [[package]] name = "packaging" -version = "24.1" +version = "21.3" description = "Core utilities for Python packages" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, -] +python-versions = ">=3.6" + +[package.dependencies] +pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" [[package]] name = "paginate" version = "0.5.6" description = "Divides large result sets into pages for easier browsing" +category = "main" optional = false python-versions = "*" -files = [ - {file = "paginate-0.5.6.tar.gz", hash = "sha256:5e6007b6a9398177a7e1648d04fdd9f8c9766a1a945bceac82f1929e8c78af2d"}, -] [[package]] name = "parse" -version = "1.20.2" +version = "1.19.0" description = "parse() is the opposite of format()" +category = "main" optional = false python-versions = "*" -files = [ - {file = "parse-1.20.2-py2.py3-none-any.whl", hash = "sha256:967095588cb802add9177d0c0b6133b5ba33b1ea9007ca800e526f42a85af558"}, - {file = "parse-1.20.2.tar.gz", hash = "sha256:b41d604d16503c79d81af5165155c0b20f6c8d6c559efa66b4b695c3e5a0a0ce"}, -] [[package]] name = "pluggy" -version = "1.5.0" +version = "1.0.0" description = "plugin and hook calling mechanisms for python" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, - {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, -] +python-versions = ">=3.6" [package.extras] dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[[package]] +name = "poetry-dynamic-versioning" +version = "0.13.1" +description = "Plugin for Poetry to enable dynamic versioning based on VCS tags" +category = "main" +optional = false +python-versions = ">=3.5,<4.0" + +[package.dependencies] +dunamai = ">=1.5,<2.0" +jinja2 = {version = ">=2.11.1,<4", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +tomlkit = ">=0.4" + [[package]] name = "posix-ipc" -version = "1.1.1" +version = "1.0.5" description = "POSIX IPC primitives (semaphores, shared memory and message queues) for Python" +category = "main" optional = false python-versions = "*" -files = [ - {file = "posix_ipc-1.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0c2019e462c5e556568ec7947a0dd66abcd516a6f4939aed545daedc5c7b0b78"}, - {file = "posix_ipc-1.1.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:516259a7f1b1ba49a16ebe06ae23e9246162cb26e3eb825e6535c487e67478d2"}, - {file = "posix_ipc-1.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:edfd47a68b0022c14e511ca4d600ff1f2e44457695002a56accfa3535be046b1"}, - {file = "posix_ipc-1.1.1-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:3c21f6f459b399badc12dec9de73274d42aa8708e8a56146d79faca27e362480"}, - {file = "posix_ipc-1.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5b9a38467f11c040a2e15e5cc7236494dc4ba7dfb4151bffef493a1f88fbb2c1"}, - {file = "posix_ipc-1.1.1.tar.gz", hash = "sha256:e2456ba0cfb2ee5ba14121450e8d825b3c4a1461fca0761220aab66d4111cbb7"}, -] [[package]] name = "priority" version = "2.0.0" description = "A pure-Python implementation of the HTTP/2 priority tree" +category = "main" optional = false python-versions = ">=3.6.1" -files = [ - {file = "priority-2.0.0-py3-none-any.whl", hash = "sha256:6f8eefce5f3ad59baf2c080a664037bb4725cd0a790d53d59ab4059288faf6aa"}, - {file = "priority-2.0.0.tar.gz", hash = "sha256:c965d54f1b8d0d0b19479db3924c7c36cf672dbf2aec92d43fbdaf4492ba18c0"}, -] [[package]] name = "prometheus-client" -version = "0.20.0" +version = "0.13.1" description = "Python client for the Prometheus monitoring system." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "prometheus_client-0.20.0-py3-none-any.whl", hash = "sha256:cde524a85bce83ca359cc837f28b8c0db5cac7aa653a588fd7e84ba061c329e7"}, - {file = "prometheus_client-0.20.0.tar.gz", hash = "sha256:287629d00b147a32dcb2be0b9df905da599b2d82f80377083ec8463309a4bb89"}, -] +python-versions = ">=3.6" [package.extras] twisted = ["twisted"] [[package]] name = "prometheus-fastapi-instrumentator" -version = "7.0.0" -description = "Instrument your FastAPI with Prometheus metrics." +version = "5.7.1" +description = "Instrument your FastAPI with Prometheus metrics" +category = "main" optional = false -python-versions = ">=3.8.1,<4.0.0" -files = [ - {file = "prometheus_fastapi_instrumentator-7.0.0-py3-none-any.whl", hash = "sha256:96030c43c776ee938a3dae58485ec24caed7e05bfc60fe067161e0d5b5757052"}, - {file = "prometheus_fastapi_instrumentator-7.0.0.tar.gz", hash = "sha256:5ba67c9212719f244ad7942d75ded80693b26331ee5dfc1e7571e4794a9ccbed"}, -] +python-versions = ">=3.6.0,<4.0.0" [package.dependencies] +fastapi = ">=0.38.1,<1.0.0" prometheus-client = ">=0.8.0,<1.0.0" -starlette = ">=0.30.0,<1.0.0" [[package]] name = "protobuf" -version = "4.25.4" -description = "" +version = "3.19.4" +description = "Protocol Buffers" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "protobuf-4.25.4-cp310-abi3-win32.whl", hash = "sha256:db9fd45183e1a67722cafa5c1da3e85c6492a5383f127c86c4c4aa4845867dc4"}, - {file = "protobuf-4.25.4-cp310-abi3-win_amd64.whl", hash = "sha256:ba3d8504116a921af46499471c63a85260c1a5fc23333154a427a310e015d26d"}, - {file = "protobuf-4.25.4-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:eecd41bfc0e4b1bd3fa7909ed93dd14dd5567b98c941d6c1ad08fdcab3d6884b"}, - {file = "protobuf-4.25.4-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:4c8a70fdcb995dcf6c8966cfa3a29101916f7225e9afe3ced4395359955d3835"}, - {file = "protobuf-4.25.4-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:3319e073562e2515c6ddc643eb92ce20809f5d8f10fead3332f71c63be6a7040"}, - {file = "protobuf-4.25.4-cp38-cp38-win32.whl", hash = "sha256:7e372cbbda66a63ebca18f8ffaa6948455dfecc4e9c1029312f6c2edcd86c4e1"}, - {file = "protobuf-4.25.4-cp38-cp38-win_amd64.whl", hash = "sha256:051e97ce9fa6067a4546e75cb14f90cf0232dcb3e3d508c448b8d0e4265b61c1"}, - {file = "protobuf-4.25.4-cp39-cp39-win32.whl", hash = "sha256:90bf6fd378494eb698805bbbe7afe6c5d12c8e17fca817a646cd6a1818c696ca"}, - {file = "protobuf-4.25.4-cp39-cp39-win_amd64.whl", hash = "sha256:ac79a48d6b99dfed2729ccccee547b34a1d3d63289c71cef056653a846a2240f"}, - {file = "protobuf-4.25.4-py3-none-any.whl", hash = "sha256:bfbebc1c8e4793cfd58589acfb8a1026be0003e852b9da7db5a4285bde996978"}, - {file = "protobuf-4.25.4.tar.gz", hash = "sha256:0dc4a62cc4052a036ee2204d26fe4d835c62827c855c8a03f29fe6da146b380d"}, -] +python-versions = ">=3.5" + +[[package]] +name = "py" +version = "1.11.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "pyalpm" version = "0.10.6" description = "libalpm bindings for Python 3" +category = "main" optional = false python-versions = "*" -files = [ - {file = "pyalpm-0.10.6.tar.gz", hash = "sha256:99e6ec73b8c46bb12466013f228f831ee0d18e8ab664b91a01c2a3c40de07c7f"}, -] + +[[package]] +name = "pycodestyle" +version = "2.8.0" +description = "Python style guide checker" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "pycparser" -version = "2.22" +version = "2.21" description = "C parser in Python" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, - {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, -] +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pydantic" -version = "2.8.2" -description = "Data validation using Python type hints" +version = "1.9.0" +description = "Data validation and settings management using python 3.6 type hinting" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"}, - {file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"}, -] +python-versions = ">=3.6.1" [package.dependencies] -annotated-types = ">=0.4.0" -pydantic-core = "2.20.1" -typing-extensions = [ - {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, - {version = ">=4.6.1", markers = "python_version < \"3.13\""}, -] +typing-extensions = ">=3.7.4.3" [package.extras] -email = ["email-validator (>=2.0.0)"] +dotenv = ["python-dotenv (>=0.10.4)"] +email = ["email-validator (>=1.0.3)"] [[package]] -name = "pydantic-core" -version = "2.20.1" -description = "Core functionality for Pydantic validation and serialization" +name = "pyflakes" +version = "2.4.0" +description = "passive checker of Python programs" +category = "dev" optional = false -python-versions = ">=3.8" -files = [ - {file = "pydantic_core-2.20.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3acae97ffd19bf091c72df4d726d552c473f3576409b2a7ca36b2f535ffff4a3"}, - {file = "pydantic_core-2.20.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:41f4c96227a67a013e7de5ff8f20fb496ce573893b7f4f2707d065907bffdbd6"}, - {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f239eb799a2081495ea659d8d4a43a8f42cd1fe9ff2e7e436295c38a10c286a"}, - {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53e431da3fc53360db73eedf6f7124d1076e1b4ee4276b36fb25514544ceb4a3"}, - {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1f62b2413c3a0e846c3b838b2ecd6c7a19ec6793b2a522745b0869e37ab5bc1"}, - {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5d41e6daee2813ecceea8eda38062d69e280b39df793f5a942fa515b8ed67953"}, - {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d482efec8b7dc6bfaedc0f166b2ce349df0011f5d2f1f25537ced4cfc34fd98"}, - {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e93e1a4b4b33daed65d781a57a522ff153dcf748dee70b40c7258c5861e1768a"}, - {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e7c4ea22b6739b162c9ecaaa41d718dfad48a244909fe7ef4b54c0b530effc5a"}, - {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4f2790949cf385d985a31984907fecb3896999329103df4e4983a4a41e13e840"}, - {file = "pydantic_core-2.20.1-cp310-none-win32.whl", hash = "sha256:5e999ba8dd90e93d57410c5e67ebb67ffcaadcea0ad973240fdfd3a135506250"}, - {file = "pydantic_core-2.20.1-cp310-none-win_amd64.whl", hash = "sha256:512ecfbefef6dac7bc5eaaf46177b2de58cdf7acac8793fe033b24ece0b9566c"}, - {file = "pydantic_core-2.20.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d2a8fa9d6d6f891f3deec72f5cc668e6f66b188ab14bb1ab52422fe8e644f312"}, - {file = "pydantic_core-2.20.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:175873691124f3d0da55aeea1d90660a6ea7a3cfea137c38afa0a5ffabe37b88"}, - {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37eee5b638f0e0dcd18d21f59b679686bbd18917b87db0193ae36f9c23c355fc"}, - {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25e9185e2d06c16ee438ed39bf62935ec436474a6ac4f9358524220f1b236e43"}, - {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:150906b40ff188a3260cbee25380e7494ee85048584998c1e66df0c7a11c17a6"}, - {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ad4aeb3e9a97286573c03df758fc7627aecdd02f1da04516a86dc159bf70121"}, - {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3f3ed29cd9f978c604708511a1f9c2fdcb6c38b9aae36a51905b8811ee5cbf1"}, - {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b0dae11d8f5ded51699c74d9548dcc5938e0804cc8298ec0aa0da95c21fff57b"}, - {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:faa6b09ee09433b87992fb5a2859efd1c264ddc37280d2dd5db502126d0e7f27"}, - {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9dc1b507c12eb0481d071f3c1808f0529ad41dc415d0ca11f7ebfc666e66a18b"}, - {file = "pydantic_core-2.20.1-cp311-none-win32.whl", hash = "sha256:fa2fddcb7107e0d1808086ca306dcade7df60a13a6c347a7acf1ec139aa6789a"}, - {file = "pydantic_core-2.20.1-cp311-none-win_amd64.whl", hash = "sha256:40a783fb7ee353c50bd3853e626f15677ea527ae556429453685ae32280c19c2"}, - {file = "pydantic_core-2.20.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:595ba5be69b35777474fa07f80fc260ea71255656191adb22a8c53aba4479231"}, - {file = "pydantic_core-2.20.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a4f55095ad087474999ee28d3398bae183a66be4823f753cd7d67dd0153427c9"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9aa05d09ecf4c75157197f27cdc9cfaeb7c5f15021c6373932bf3e124af029f"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e97fdf088d4b31ff4ba35db26d9cc472ac7ef4a2ff2badeabf8d727b3377fc52"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc633a9fe1eb87e250b5c57d389cf28998e4292336926b0b6cdaee353f89a237"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d573faf8eb7e6b1cbbcb4f5b247c60ca8be39fe2c674495df0eb4318303137fe"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26dc97754b57d2fd00ac2b24dfa341abffc380b823211994c4efac7f13b9e90e"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:33499e85e739a4b60c9dac710c20a08dc73cb3240c9a0e22325e671b27b70d24"}, - {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bebb4d6715c814597f85297c332297c6ce81e29436125ca59d1159b07f423eb1"}, - {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:516d9227919612425c8ef1c9b869bbbee249bc91912c8aaffb66116c0b447ebd"}, - {file = "pydantic_core-2.20.1-cp312-none-win32.whl", hash = "sha256:469f29f9093c9d834432034d33f5fe45699e664f12a13bf38c04967ce233d688"}, - {file = "pydantic_core-2.20.1-cp312-none-win_amd64.whl", hash = "sha256:035ede2e16da7281041f0e626459bcae33ed998cca6a0a007a5ebb73414ac72d"}, - {file = "pydantic_core-2.20.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:0827505a5c87e8aa285dc31e9ec7f4a17c81a813d45f70b1d9164e03a813a686"}, - {file = "pydantic_core-2.20.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19c0fa39fa154e7e0b7f82f88ef85faa2a4c23cc65aae2f5aea625e3c13c735a"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa223cd1e36b642092c326d694d8bf59b71ddddc94cdb752bbbb1c5c91d833b"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c336a6d235522a62fef872c6295a42ecb0c4e1d0f1a3e500fe949415761b8a19"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7eb6a0587eded33aeefea9f916899d42b1799b7b14b8f8ff2753c0ac1741edac"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70c8daf4faca8da5a6d655f9af86faf6ec2e1768f4b8b9d0226c02f3d6209703"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9fa4c9bf273ca41f940bceb86922a7667cd5bf90e95dbb157cbb8441008482c"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:11b71d67b4725e7e2a9f6e9c0ac1239bbc0c48cce3dc59f98635efc57d6dac83"}, - {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:270755f15174fb983890c49881e93f8f1b80f0b5e3a3cc1394a255706cabd203"}, - {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c81131869240e3e568916ef4c307f8b99583efaa60a8112ef27a366eefba8ef0"}, - {file = "pydantic_core-2.20.1-cp313-none-win32.whl", hash = "sha256:b91ced227c41aa29c672814f50dbb05ec93536abf8f43cd14ec9521ea09afe4e"}, - {file = "pydantic_core-2.20.1-cp313-none-win_amd64.whl", hash = "sha256:65db0f2eefcaad1a3950f498aabb4875c8890438bc80b19362cf633b87a8ab20"}, - {file = "pydantic_core-2.20.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:4745f4ac52cc6686390c40eaa01d48b18997cb130833154801a442323cc78f91"}, - {file = "pydantic_core-2.20.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a8ad4c766d3f33ba8fd692f9aa297c9058970530a32c728a2c4bfd2616d3358b"}, - {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41e81317dd6a0127cabce83c0c9c3fbecceae981c8391e6f1dec88a77c8a569a"}, - {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:04024d270cf63f586ad41fff13fde4311c4fc13ea74676962c876d9577bcc78f"}, - {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eaad4ff2de1c3823fddf82f41121bdf453d922e9a238642b1dedb33c4e4f98ad"}, - {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:26ab812fa0c845df815e506be30337e2df27e88399b985d0bb4e3ecfe72df31c"}, - {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c5ebac750d9d5f2706654c638c041635c385596caf68f81342011ddfa1e5598"}, - {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2aafc5a503855ea5885559eae883978c9b6d8c8993d67766ee73d82e841300dd"}, - {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4868f6bd7c9d98904b748a2653031fc9c2f85b6237009d475b1008bfaeb0a5aa"}, - {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa2f457b4af386254372dfa78a2eda2563680d982422641a85f271c859df1987"}, - {file = "pydantic_core-2.20.1-cp38-none-win32.whl", hash = "sha256:225b67a1f6d602de0ce7f6c1c3ae89a4aa25d3de9be857999e9124f15dab486a"}, - {file = "pydantic_core-2.20.1-cp38-none-win_amd64.whl", hash = "sha256:6b507132dcfc0dea440cce23ee2182c0ce7aba7054576efc65634f080dbe9434"}, - {file = "pydantic_core-2.20.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:b03f7941783b4c4a26051846dea594628b38f6940a2fdc0df00b221aed39314c"}, - {file = "pydantic_core-2.20.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1eedfeb6089ed3fad42e81a67755846ad4dcc14d73698c120a82e4ccf0f1f9f6"}, - {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:635fee4e041ab9c479e31edda27fcf966ea9614fff1317e280d99eb3e5ab6fe2"}, - {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:77bf3ac639c1ff567ae3b47f8d4cc3dc20f9966a2a6dd2311dcc055d3d04fb8a"}, - {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ed1b0132f24beeec5a78b67d9388656d03e6a7c837394f99257e2d55b461611"}, - {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6514f963b023aeee506678a1cf821fe31159b925c4b76fe2afa94cc70b3222b"}, - {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10d4204d8ca33146e761c79f83cc861df20e7ae9f6487ca290a97702daf56006"}, - {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d036c7187b9422ae5b262badb87a20a49eb6c5238b2004e96d4da1231badef1"}, - {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9ebfef07dbe1d93efb94b4700f2d278494e9162565a54f124c404a5656d7ff09"}, - {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6b9d9bb600328a1ce523ab4f454859e9d439150abb0906c5a1983c146580ebab"}, - {file = "pydantic_core-2.20.1-cp39-none-win32.whl", hash = "sha256:784c1214cb6dd1e3b15dd8b91b9a53852aed16671cc3fbe4786f4f1db07089e2"}, - {file = "pydantic_core-2.20.1-cp39-none-win_amd64.whl", hash = "sha256:d2fe69c5434391727efa54b47a1e7986bb0186e72a41b203df8f5b0a19a4f669"}, - {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a45f84b09ac9c3d35dfcf6a27fd0634d30d183205230a0ebe8373a0e8cfa0906"}, - {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d02a72df14dfdbaf228424573a07af10637bd490f0901cee872c4f434a735b94"}, - {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2b27e6af28f07e2f195552b37d7d66b150adbaa39a6d327766ffd695799780f"}, - {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:084659fac3c83fd674596612aeff6041a18402f1e1bc19ca39e417d554468482"}, - {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:242b8feb3c493ab78be289c034a1f659e8826e2233786e36f2893a950a719bb6"}, - {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:38cf1c40a921d05c5edc61a785c0ddb4bed67827069f535d794ce6bcded919fc"}, - {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e0bbdd76ce9aa5d4209d65f2b27fc6e5ef1312ae6c5333c26db3f5ade53a1e99"}, - {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:254ec27fdb5b1ee60684f91683be95e5133c994cc54e86a0b0963afa25c8f8a6"}, - {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:407653af5617f0757261ae249d3fba09504d7a71ab36ac057c938572d1bc9331"}, - {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:c693e916709c2465b02ca0ad7b387c4f8423d1db7b4649c551f27a529181c5ad"}, - {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b5ff4911aea936a47d9376fd3ab17e970cc543d1b68921886e7f64bd28308d1"}, - {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:177f55a886d74f1808763976ac4efd29b7ed15c69f4d838bbd74d9d09cf6fa86"}, - {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:964faa8a861d2664f0c7ab0c181af0bea66098b1919439815ca8803ef136fc4e"}, - {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:4dd484681c15e6b9a977c785a345d3e378d72678fd5f1f3c0509608da24f2ac0"}, - {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f6d6cff3538391e8486a431569b77921adfcdef14eb18fbf19b7c0a5294d4e6a"}, - {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a6d511cc297ff0883bc3708b465ff82d7560193169a8b93260f74ecb0a5e08a7"}, - {file = "pydantic_core-2.20.1.tar.gz", hash = "sha256:26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4"}, -] - -[package.dependencies] -typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygit2" -version = "1.17.0" +version = "1.7.2" description = "Python bindings for libgit2." +category = "main" optional = false -python-versions = ">=3.10" -files = [ - {file = "pygit2-1.17.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cbe1a3354a3eff0f4e842abcff73b24455ba7205ac959f146d7cb8dcd63cfa45"}, - {file = "pygit2-1.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:578d78fc97d5c16b1ad44c1e2fda093628c3f29793b42be68b93a46ce7a662a0"}, - {file = "pygit2-1.17.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e59de6138787aa3a5365557fb1ad427d3e877868917e0910257fb11f71f3c736"}, - {file = "pygit2-1.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66431dba77977b9010fac580eaefcc7567ea0955b030d8e8472fdce0f1a7c5f0"}, - {file = "pygit2-1.17.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:877ce82239de45301fa9953d50b41c46a5300cf7b3993db86bde64e08521a506"}, - {file = "pygit2-1.17.0-cp310-cp310-win32.whl", hash = "sha256:8b7921016cbec166083206daca20d00f2358b18178122e1b0d1932b410296de1"}, - {file = "pygit2-1.17.0-cp310-cp310-win_amd64.whl", hash = "sha256:5724683b3d239cc1457b9800d9d7988a00cd0cb1797d5caa6f46d16f3f74f1ca"}, - {file = "pygit2-1.17.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:39e7087e2affdba2530d1fe1ec04c27fa85db405be84e1cd4759891045324a31"}, - {file = "pygit2-1.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0ef5c3634317295268ef84b99e8acae37cb2f8b17d966b318c79e5211bf78d3"}, - {file = "pygit2-1.17.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ad964b2eea81e0c99d05c6ec0ec8b5715d3d0c99b3b6e09abcdb57c57701592"}, - {file = "pygit2-1.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cce8db6aa40361270b14e1adb3a8e7d4606b9b53088e27321472c9a92f922648"}, - {file = "pygit2-1.17.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:136b1ea44107fb6a3a58e7b1322227e83101bff50a929816d8653a38e0ed0e07"}, - {file = "pygit2-1.17.0-cp311-cp311-win32.whl", hash = "sha256:5ffce0772167e5c436be57ee3ef0fb421c864657911aeb1a97618e1dd9f8b574"}, - {file = "pygit2-1.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:0809029cf804f343abdc9eaeaf9d915f9dbf320d79078c20138a3bf642583365"}, - {file = "pygit2-1.17.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:f7224d89a7dda7290e458393941e500c8682f375f41e6d80ee423958a5d4013d"}, - {file = "pygit2-1.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9ae1967b0c8a2438b3b0e4a63307b5c22c80024a2f09b28d14dfde0001fed8dc"}, - {file = "pygit2-1.17.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:507343fa142a82028c8448c2626317dc19885985aba8ea27d381777ac484eefb"}, - {file = "pygit2-1.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc04917a680591c6e801df912d7fb722c253b5ac68178ff37b5666dafd06999"}, - {file = "pygit2-1.17.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7bb1b623cbd16962c3a1ec7f8e1012fa224c9e9642758c65e8e656ecc7ff1574"}, - {file = "pygit2-1.17.0-cp312-cp312-win32.whl", hash = "sha256:3029331ddf56a6908547278ab4c354b2d6932eb6a53be81e0093adc98a0ae540"}, - {file = "pygit2-1.17.0-cp312-cp312-win_amd64.whl", hash = "sha256:1011236bab7317b82e6cbc3dff4be8467923b1dcf2ffe28bf2e64805dcb37749"}, - {file = "pygit2-1.17.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ce938e7a4fdfc816ffceb62babad65fb62e1a5ad261e880b9a072e8da144ccca"}, - {file = "pygit2-1.17.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:61ff2c8b0fc96fdf45a7a5239cc262b0293a5171f68d67eea239a42c3b2226cb"}, - {file = "pygit2-1.17.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8101aa723c292892ba46303b19487a9fb0de50d9e30f4c1c2a76e3383b6e4b6d"}, - {file = "pygit2-1.17.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36e3e9225e3f01bb6a2d4589c126900bbc571cd0876ca9c01372a6e3d3693c0e"}, - {file = "pygit2-1.17.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:614cfddbf048900da19b016787f153d44ea9fd7ef80f9e03a77024aa1555d5f4"}, - {file = "pygit2-1.17.0-cp313-cp313-win32.whl", hash = "sha256:1391762153af9715ed1d0586e3f207c518f03f5874e1f5b8e398697d006a0a82"}, - {file = "pygit2-1.17.0-cp313-cp313-win_amd64.whl", hash = "sha256:d677d6fb85c426c5f5f8409bdc5a2e391016c99f73b97779b284c4ad25aa75fa"}, - {file = "pygit2-1.17.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c491db4f71fd5d814023f2ad89ad7023c15738bcbe0807acc2313026600bf1b1"}, - {file = "pygit2-1.17.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89ff254387d23d107dd2b542907d248a3a988e3be8cda99bcc8af04f56e6e5cf"}, - {file = "pygit2-1.17.0.tar.gz", hash = "sha256:fa2bc050b2c2d3e73b54d6d541c792178561a344f07e409f532d5bb97ac7b894"}, -] +python-versions = ">=3.7" [package.dependencies] -cffi = ">=1.17.0" +cffi = ">=1.4.0" + +[[package]] +name = "pyparsing" +version = "3.0.7" +description = "Python parsing module" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pytest" -version = "8.3.2" +version = "6.2.5" description = "pytest: simple powerful testing with Python" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "pytest-8.3.2-py3-none-any.whl", hash = "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5"}, - {file = "pytest-8.3.2.tar.gz", hash = "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce"}, -] +python-versions = ">=3.6" [package.dependencies] +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} +attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.5,<2" -tomli = {version = ">=1", markers = "python_version < \"3.11\""} +pluggy = ">=0.12,<2.0" +py = ">=1.8.2" +toml = "*" [package.extras] -dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" -description = "Pytest support for asyncio" +version = "0.16.0" +description = "Pytest support for asyncio." +category = "dev" optional = false -python-versions = ">=3.8" -files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, -] +python-versions = ">= 3.6" [package.dependencies] -pytest = ">=7.0.0,<9" +pytest = ">=5.4.0" [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] -testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] +testing = ["coverage", "hypothesis (>=5.7.1)"] [[package]] name = "pytest-cov" -version = "5.0.0" +version = "3.0.0" description = "Pytest plugin for measuring coverage." +category = "dev" optional = false -python-versions = ">=3.8" -files = [ - {file = "pytest-cov-5.0.0.tar.gz", hash = "sha256:5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857"}, - {file = "pytest_cov-5.0.0-py3-none-any.whl", hash = "sha256:4f0764a1219df53214206bf1feea4633c3b558a2925c8b59f144f682861ce652"}, -] +python-versions = ">=3.6" [package.dependencies] coverage = {version = ">=5.2.1", extras = ["toml"]} pytest = ">=4.6" [package.extras] -testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"] +testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"] + +[[package]] +name = "pytest-forked" +version = "1.4.0" +description = "run tests in isolated forked subprocesses" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +py = "*" +pytest = ">=3.10" [[package]] name = "pytest-tap" -version = "3.4" +version = "3.3" description = "Test Anything Protocol (TAP) reporting plugin for pytest" +category = "dev" optional = false python-versions = "*" -files = [ - {file = "pytest-tap-3.4.tar.gz", hash = "sha256:a7c2a4a3e8b4bf18522e46d74208f8579a191dd972c59182104ad9a4967318fb"}, - {file = "pytest_tap-3.4-py3-none-any.whl", hash = "sha256:d97a2115c94415086f6faec395d243b3c18ea846ce1c1653a4b2588082be35d8"}, -] [package.dependencies] pytest = ">=3.0" @@ -1908,18 +840,16 @@ pytest = ">=3.0" [[package]] name = "pytest-xdist" -version = "3.6.1" -description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" +version = "2.5.0" +description = "pytest xdist plugin for distributed testing and loop-on-failing modes" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "pytest_xdist-3.6.1-py3-none-any.whl", hash = "sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7"}, - {file = "pytest_xdist-3.6.1.tar.gz", hash = "sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d"}, -] +python-versions = ">=3.6" [package.dependencies] -execnet = ">=2.1" -pytest = ">=7.0.0" +execnet = ">=1.1" +pytest = ">=6.2.0" +pytest-forked = "*" [package.extras] psutil = ["psutil (>=3.0)"] @@ -1928,542 +858,1053 @@ testing = ["filelock"] [[package]] name = "python-dateutil" -version = "2.9.0.post0" +version = "2.8.2" description = "Extensions to the standard Python datetime module" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -files = [ - {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, - {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, -] [package.dependencies] six = ">=1.5" [[package]] name = "python-multipart" -version = "0.0.19" +version = "0.0.5" description = "A streaming multipart parser for Python" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "python_multipart-0.0.19-py3-none-any.whl", hash = "sha256:f8d5b0b9c618575bf9df01c684ded1d94a338839bdd8223838afacfb4bb2082d"}, - {file = "python_multipart-0.0.19.tar.gz", hash = "sha256:905502ef39050557b7a6af411f454bc19526529ca46ae6831508438890ce12cc"}, -] +python-versions = "*" + +[package.dependencies] +six = ">=1.4.0" [[package]] name = "redis" -version = "5.0.8" -description = "Python client for Redis database and key-value store" +version = "3.5.3" +description = "Python client for Redis key-value store" +category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "redis-5.0.8-py3-none-any.whl", hash = "sha256:56134ee08ea909106090934adc36f65c9bcbbaecea5b21ba704ba6fb561f8eb4"}, - {file = "redis-5.0.8.tar.gz", hash = "sha256:0c5b10d387568dfe0698c6fad6615750c24170e548ca2deac10c649d463e9870"}, -] - -[package.dependencies] -async-timeout = {version = ">=4.0.3", markers = "python_full_version < \"3.11.3\""} +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] -hiredis = ["hiredis (>1.0.0)"] -ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)"] +hiredis = ["hiredis (>=0.1.3)"] [[package]] name = "requests" -version = "2.32.3" +version = "2.27.1" description = "Python HTTP for Humans." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, - {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, -] +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.dependencies] certifi = ">=2017.4.17" -charset-normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<3" +charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""} +idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""} +urllib3 = ">=1.21.1,<1.27" [package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] +socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] +use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] [[package]] -name = "setuptools" -version = "72.2.0" -description = "Easily download, build, install, upgrade, and uninstall Python packages" +name = "rfc3986" +version = "1.5.0" +description = "Validating URI References per RFC 3986" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "setuptools-72.2.0-py3-none-any.whl", hash = "sha256:f11dd94b7bae3a156a95ec151f24e4637fb4fa19c878e4d191bfb8b2d82728c4"}, - {file = "setuptools-72.2.0.tar.gz", hash = "sha256:80aacbf633704e9c8bfa1d99fa5dd4dc59573efcf9e4042c13d3bcef91ac2ef9"}, -] +python-versions = "*" + +[package.dependencies] +idna = {version = "*", optional = true, markers = "extra == \"idna2008\""} [package.extras] -core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.text (>=3.7)", "more-itertools (>=8.8)", "ordered-set (>=3.1.1)", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.11.*)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (<0.4)", "pytest-ruff (>=0.2.1)", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +idna2008 = ["idna"] [[package]] name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] [[package]] name = "sniffio" -version = "1.3.1" +version = "1.2.0" description = "Sniff out which async library your code is running under" +category = "main" optional = false -python-versions = ">=3.7" -files = [ - {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, - {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, -] +python-versions = ">=3.5" [[package]] name = "sortedcontainers" version = "2.4.0" description = "Sorted Containers -- Sorted List, Sorted Dict, Sorted Set" +category = "main" optional = false python-versions = "*" -files = [ - {file = "sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0"}, - {file = "sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88"}, -] [[package]] name = "sqlalchemy" -version = "1.4.53" +version = "1.4.31" description = "Database Abstraction Library" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" -files = [ - {file = "SQLAlchemy-1.4.53-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:b61ac5457d91b5629a3dea2b258deb4cdd35ac8f6fa2031d2b9b2fff5b3396da"}, - {file = "SQLAlchemy-1.4.53-cp310-cp310-manylinux1_x86_64.manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_5_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a96aa8d425047551676b0e178ddb0683421e78eda879ab55775128b2e612cae"}, - {file = "SQLAlchemy-1.4.53-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e10ac36f0b994235c13388b39598bf27219ec8bdea5be99bdac612b01cbe525"}, - {file = "SQLAlchemy-1.4.53-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:437592b341a3229dd0443c9c803b0bf0a466f8f539014fef6cdb9c06b7edb7f9"}, - {file = "SQLAlchemy-1.4.53-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:784272ceb5eb71421fea9568749bcbe8bd019261a0e2e710a7efa76057af2499"}, - {file = "SQLAlchemy-1.4.53-cp310-cp310-win32.whl", hash = "sha256:122d7b5722df1a24402c6748bbb04687ef981493bb559d0cc0beffe722e0e6ed"}, - {file = "SQLAlchemy-1.4.53-cp310-cp310-win_amd64.whl", hash = "sha256:4604d42b2abccba266d3f5bbe883684b5df93e74054024c70d3fbb5eea45e530"}, - {file = "SQLAlchemy-1.4.53-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:fb8e15dfa47f5de11ab073e12aadd6b502cfb7ac4bafd18bd18cfd1c7d13dbbc"}, - {file = "SQLAlchemy-1.4.53-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc8be4df55e8fde3006d9cb1f6b3df2ba26db613855dc4df2c0fcd5ec15cb3b7"}, - {file = "SQLAlchemy-1.4.53-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86b11640251f9a9789fd96cd6e5d176b1c230230c70ad40299bcbcc568451b4c"}, - {file = "SQLAlchemy-1.4.53-cp311-cp311-win32.whl", hash = "sha256:cd534c716f86bdf95b7b984a34ee278c91d1b1d7d183e7e5ff878600b1696046"}, - {file = "SQLAlchemy-1.4.53-cp311-cp311-win_amd64.whl", hash = "sha256:6dd06572872ca13ef5a90306a3e5af787498ddaa17fb00109b1243642646cd69"}, - {file = "SQLAlchemy-1.4.53-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:2774c24c405136c3ef472e2352bdca7330659d481fbf2283f996c0ef9eb90f22"}, - {file = "SQLAlchemy-1.4.53-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68a614765197b3d13a730d631a78c3bb9b3b72ba58ed7ab295d58d517464e315"}, - {file = "SQLAlchemy-1.4.53-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d13d4dfbc6e52363886b47cf02cf68c5d2a37c468626694dc210d7e97d4ad330"}, - {file = "SQLAlchemy-1.4.53-cp312-cp312-win32.whl", hash = "sha256:197065b91456574d70b6459bfa62bc0b52a4960a29ef923c375ec427274a3e05"}, - {file = "SQLAlchemy-1.4.53-cp312-cp312-win_amd64.whl", hash = "sha256:421306c4b936b0271a3ce2dc074928d5ece4a36f9c482daa5770f44ecfc3a883"}, - {file = "SQLAlchemy-1.4.53-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:13fc34b35d8ddb3fbe3f8fcfdf6c2546e676187f0fb20f5774da362ddaf8fa2d"}, - {file = "SQLAlchemy-1.4.53-cp36-cp36m-manylinux1_x86_64.manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_5_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:626be971ff89541cfd3e70b54be00b57a7f8557204decb6223ce0428fec058f3"}, - {file = "SQLAlchemy-1.4.53-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:991e42fdfec561ebc6a4fae7161a86d129d6069fa14210b96b8dd752afa7059c"}, - {file = "SQLAlchemy-1.4.53-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:95123f3a1e0e8020848fd32ba751db889a01a44e4e4fef7e58c87ddd0b2fca59"}, - {file = "SQLAlchemy-1.4.53-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c58e011e9e6373b3a091d83f20601fb335a3b4bace80bfcb914ac168aad3b70d"}, - {file = "SQLAlchemy-1.4.53-cp37-cp37m-macosx_11_0_x86_64.whl", hash = "sha256:670c7769bf5dcae9aff331247b5d82fe635c63731088a46ce68ba2ba519ef36e"}, - {file = "SQLAlchemy-1.4.53-cp37-cp37m-manylinux1_x86_64.manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_5_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07ba54f09033d387ae9df8d62cbe211ed7304e0bfbece1f8c55e21db9fae5c11"}, - {file = "SQLAlchemy-1.4.53-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a38834b4c183c33daf58544281395aad2e985f0b47cca1e88ea5ada88344e63"}, - {file = "SQLAlchemy-1.4.53-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:616492f5315128a847f293a7c552f3561ac7e996d2aa5dc46bef4fb0d3781f1d"}, - {file = "SQLAlchemy-1.4.53-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0cf8c0af9563892c6632f7343bc393dfce6eeef8e4d10c5fadba9c0390520bd"}, - {file = "SQLAlchemy-1.4.53-cp37-cp37m-win32.whl", hash = "sha256:c05fe05941424c2f3747a8952381b7725e24cba2ca00141380e54789d5b616b6"}, - {file = "SQLAlchemy-1.4.53-cp37-cp37m-win_amd64.whl", hash = "sha256:93e90aa3e3b2f8e8cbae4d5509f8e0cf82972378d323c740a8df1c1e9f484172"}, - {file = "SQLAlchemy-1.4.53-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:9d7368df54d3ed45a18955f6cec38ebe075290594ac0d5c87a8ddaff7e10de27"}, - {file = "SQLAlchemy-1.4.53-cp38-cp38-manylinux1_x86_64.manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_5_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89d8ac4158ef68eea8bb0f6dd0583127d9aa8720606964ba8eee20b254f9c83a"}, - {file = "SQLAlchemy-1.4.53-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16bb9fa4d00b4581b14d9f0e2224dc7745b854aa4687738279af0f48f7056c98"}, - {file = "SQLAlchemy-1.4.53-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4fe5168d0249c23f537950b6d75935ff2709365a113e29938a979aec36668ecf"}, - {file = "SQLAlchemy-1.4.53-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b8608d162d3bd29d807aab32c3fb6e2f8e225a43d1c54c917fed38513785380"}, - {file = "SQLAlchemy-1.4.53-cp38-cp38-win32.whl", hash = "sha256:a9d4d132198844bd6828047135ce7b887687c92925049a2468a605fc775c7a1a"}, - {file = "SQLAlchemy-1.4.53-cp38-cp38-win_amd64.whl", hash = "sha256:c15d1f1fcf1f9bec0499ae1d9132b950fcc7730f2d26d10484c8808b4e077816"}, - {file = "SQLAlchemy-1.4.53-cp39-cp39-macosx_12_0_x86_64.whl", hash = "sha256:edf094a20a386ff2ec73de65ef18014b250259cb860edc61741e240ca22d6981"}, - {file = "SQLAlchemy-1.4.53-cp39-cp39-manylinux1_x86_64.manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_5_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83a9c3514ff19d9d30d8a8d378b24cd1dfa5528d20891481cb5f196117db6a48"}, - {file = "SQLAlchemy-1.4.53-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eaaeedbceb4dfd688fff2faf25a9a87a391f548811494f7bff7fa701b639abc3"}, - {file = "SQLAlchemy-1.4.53-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d021699b9007deb7aa715629078830c99a5fec2753d9bdd5ff33290d363ef755"}, - {file = "SQLAlchemy-1.4.53-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0465b8a68f8f4de754c1966c45b187ac784ad97bc9747736f913130f0e1adea0"}, - {file = "SQLAlchemy-1.4.53-cp39-cp39-win32.whl", hash = "sha256:5f67b9e9dcac3241781e96575468d55a42332157dee04bdbf781df573dff5f85"}, - {file = "SQLAlchemy-1.4.53-cp39-cp39-win_amd64.whl", hash = "sha256:a8c2f2a0b2c4e3b86eb58c9b6bb98548205eea2fba9dae4edfd29dc6aebbe95a"}, - {file = "SQLAlchemy-1.4.53.tar.gz", hash = "sha256:5e6ab710c4c064755fd92d1a417bef360228a19bdf0eee32b03aa0f5f8e9fe0d"}, -] [package.dependencies] greenlet = {version = "!=0.4.17", markers = "python_version >= \"3\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"} [package.extras] -aiomysql = ["aiomysql (>=0.2.0)", "greenlet (!=0.4.17)"] -aiosqlite = ["aiosqlite", "greenlet (!=0.4.17)", "typing_extensions (!=3.10.0.1)"] +aiomysql = ["greenlet (!=0.4.17)", "aiomysql"] +aiosqlite = ["typing_extensions (!=3.10.0.1)", "greenlet (!=0.4.17)", "aiosqlite"] asyncio = ["greenlet (!=0.4.17)"] -asyncmy = ["asyncmy (>=0.2.3,!=0.2.4)", "greenlet (!=0.4.17)"] -mariadb-connector = ["mariadb (>=1.0.1,!=1.1.2)", "mariadb (>=1.0.1,!=1.1.2)"] +asyncmy = ["greenlet (!=0.4.17)", "asyncmy (>=0.2.3)"] +mariadb_connector = ["mariadb (>=1.0.1)"] mssql = ["pyodbc"] -mssql-pymssql = ["pymssql", "pymssql"] -mssql-pyodbc = ["pyodbc", "pyodbc"] -mypy = ["mypy (>=0.910)", "sqlalchemy2-stubs"] -mysql = ["mysqlclient (>=1.4.0)", "mysqlclient (>=1.4.0,<2)"] -mysql-connector = ["mysql-connector-python", "mysql-connector-python"] -oracle = ["cx_oracle (>=7)", "cx_oracle (>=7,<8)"] +mssql_pymssql = ["pymssql"] +mssql_pyodbc = ["pyodbc"] +mypy = ["sqlalchemy2-stubs", "mypy (>=0.910)"] +mysql = ["mysqlclient (>=1.4.0,<2)", "mysqlclient (>=1.4.0)"] +mysql_connector = ["mysql-connector-python"] +oracle = ["cx_oracle (>=7,<8)", "cx_oracle (>=7)"] postgresql = ["psycopg2 (>=2.7)"] -postgresql-asyncpg = ["asyncpg", "asyncpg", "greenlet (!=0.4.17)", "greenlet (!=0.4.17)"] -postgresql-pg8000 = ["pg8000 (>=1.16.6,!=1.29.0)", "pg8000 (>=1.16.6,!=1.29.0)"] -postgresql-psycopg2binary = ["psycopg2-binary"] -postgresql-psycopg2cffi = ["psycopg2cffi"] -pymysql = ["pymysql", "pymysql (<1)"] -sqlcipher = ["sqlcipher3_binary"] +postgresql_asyncpg = ["greenlet (!=0.4.17)", "asyncpg"] +postgresql_pg8000 = ["pg8000 (>=1.16.6)"] +postgresql_psycopg2binary = ["psycopg2-binary"] +postgresql_psycopg2cffi = ["psycopg2cffi"] +pymysql = ["pymysql (<1)", "pymysql"] +sqlcipher = ["sqlcipher3-binary"] [[package]] name = "srcinfo" -version = "0.1.2" +version = "0.0.8" description = "A small library to parse .SRCINFO files" +category = "main" optional = false -python-versions = ">=3.7,<4.0" -files = [ - {file = "srcinfo-0.1.2-py3-none-any.whl", hash = "sha256:f670a3473db3efa7392bd68add147650fb6c3e9b2ec54c1db252d80698c968da"}, - {file = "srcinfo-0.1.2.tar.gz", hash = "sha256:c8296c710015a6b25c1dc750a494841a8094a2cf4fdb33a375fbe9720ec976e6"}, -] +python-versions = "*" [package.dependencies] -parse = ">=1.19.0,<2.0.0" +parse = "*" [[package]] name = "starlette" -version = "0.38.2" +version = "0.17.1" description = "The little ASGI library that shines." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "starlette-0.38.2-py3-none-any.whl", hash = "sha256:4ec6a59df6bbafdab5f567754481657f7ed90dc9d69b0c9ff017907dd54faeff"}, - {file = "starlette-0.38.2.tar.gz", hash = "sha256:c7c0441065252160993a1a37cf2a73bb64d271b17303e0b0c1eb7191cfb12d75"}, -] +python-versions = ">=3.6" [package.dependencies] -anyio = ">=3.4.0,<5" +anyio = ">=3.0.0,<4" [package.extras] -full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7)", "pyyaml"] +full = ["itsdangerous", "jinja2", "python-multipart", "pyyaml", "requests"] [[package]] -name = "tap-py" +name = "tap.py" version = "3.1" description = "Test Anything Protocol (TAP) tools" +category = "dev" optional = false python-versions = "*" -files = [ - {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"}, - {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"}, -] [package.extras] -yaml = ["PyYAML (>=5.1)", "more-itertools"] +yaml = ["more-itertools", "PyYAML (>=5.1)"] [[package]] -name = "taskgroup" -version = "0.0.0a4" -description = "backport of asyncio.TaskGroup, asyncio.Runner and asyncio.timeout" +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "main" optional = false -python-versions = "*" -files = [ - {file = "taskgroup-0.0.0a4-py2.py3-none-any.whl", hash = "sha256:5c1bd0e4c06114e7a4128583ab75c987597d5378a33948a3b74c662b90f61277"}, - {file = "taskgroup-0.0.0a4.tar.gz", hash = "sha256:eb08902d221e27661950f2a0320ddf3f939f579279996f81fe30779bca3a159c"}, -] - -[package.dependencies] -exceptiongroup = "*" +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "tomli" -version = "2.0.1" +version = "2.0.0" description = "A lil' TOML parser" +category = "dev" optional = false python-versions = ">=3.7" -files = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] [[package]] name = "tomlkit" -version = "0.13.2" +version = "0.9.0" description = "Style preserving TOML library" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, - {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, -] +python-versions = ">=3.6,<4.0" [[package]] name = "typing-extensions" -version = "4.12.2" -description = "Backported and Experimental Type Hints for Python 3.8+" +version = "4.0.1" +description = "Backported and Experimental Type Hints for Python 3.6+" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, - {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, -] +python-versions = ">=3.6" [[package]] name = "urllib3" -version = "2.2.2" +version = "1.26.8" description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, - {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, -] +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" [package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -h2 = ["h2 (>=4,<5)"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] +brotli = ["brotlipy (>=0.6.0)"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "uvicorn" -version = "0.30.6" +version = "0.15.0" description = "The lightning-fast ASGI server." +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "uvicorn-0.30.6-py3-none-any.whl", hash = "sha256:65fd46fe3fda5bdc1b03b94eb634923ff18cd35b2f084813ea79d1f103f711b5"}, - {file = "uvicorn-0.30.6.tar.gz", hash = "sha256:4b15decdda1e72be08209e860a1e10e92439ad5b97cf44cc945fcbee66fc5788"}, -] +python-versions = "*" [package.dependencies] +asgiref = ">=3.4.0" click = ">=7.0" h11 = ">=0.8" -typing-extensions = {version = ">=4.0", markers = "python_version < \"3.11\""} [package.extras] -standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] - -[[package]] -name = "watchfiles" -version = "1.0.4" -description = "Simple, modern and high performance file watching and code reload in python." -optional = false -python-versions = ">=3.9" -files = [ - {file = "watchfiles-1.0.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:ba5bb3073d9db37c64520681dd2650f8bd40902d991e7b4cfaeece3e32561d08"}, - {file = "watchfiles-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9f25d0ba0fe2b6d2c921cf587b2bf4c451860086534f40c384329fb96e2044d1"}, - {file = "watchfiles-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:47eb32ef8c729dbc4f4273baece89398a4d4b5d21a1493efea77a17059f4df8a"}, - {file = "watchfiles-1.0.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:076f293100db3b0b634514aa0d294b941daa85fc777f9c698adb1009e5aca0b1"}, - {file = "watchfiles-1.0.4-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1eacd91daeb5158c598fe22d7ce66d60878b6294a86477a4715154990394c9b3"}, - {file = "watchfiles-1.0.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:13c2ce7b72026cfbca120d652f02c7750f33b4c9395d79c9790b27f014c8a5a2"}, - {file = "watchfiles-1.0.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:90192cdc15ab7254caa7765a98132a5a41471cf739513cc9bcf7d2ffcc0ec7b2"}, - {file = "watchfiles-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:278aaa395f405972e9f523bd786ed59dfb61e4b827856be46a42130605fd0899"}, - {file = "watchfiles-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:a462490e75e466edbb9fc4cd679b62187153b3ba804868452ef0577ec958f5ff"}, - {file = "watchfiles-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8d0d0630930f5cd5af929040e0778cf676a46775753e442a3f60511f2409f48f"}, - {file = "watchfiles-1.0.4-cp310-cp310-win32.whl", hash = "sha256:cc27a65069bcabac4552f34fd2dce923ce3fcde0721a16e4fb1b466d63ec831f"}, - {file = "watchfiles-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:8b1f135238e75d075359cf506b27bf3f4ca12029c47d3e769d8593a2024ce161"}, - {file = "watchfiles-1.0.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:2a9f93f8439639dc244c4d2902abe35b0279102bca7bbcf119af964f51d53c19"}, - {file = "watchfiles-1.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9eea33ad8c418847dd296e61eb683cae1c63329b6d854aefcd412e12d94ee235"}, - {file = "watchfiles-1.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:31f1a379c9dcbb3f09cf6be1b7e83b67c0e9faabed0471556d9438a4a4e14202"}, - {file = "watchfiles-1.0.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ab594e75644421ae0a2484554832ca5895f8cab5ab62de30a1a57db460ce06c6"}, - {file = "watchfiles-1.0.4-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fc2eb5d14a8e0d5df7b36288979176fbb39672d45184fc4b1c004d7c3ce29317"}, - {file = "watchfiles-1.0.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f68d8e9d5a321163ddacebe97091000955a1b74cd43724e346056030b0bacee"}, - {file = "watchfiles-1.0.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f9ce064e81fe79faa925ff03b9f4c1a98b0bbb4a1b8c1b015afa93030cb21a49"}, - {file = "watchfiles-1.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b77d5622ac5cc91d21ae9c2b284b5d5c51085a0bdb7b518dba263d0af006132c"}, - {file = "watchfiles-1.0.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1941b4e39de9b38b868a69b911df5e89dc43767feeda667b40ae032522b9b5f1"}, - {file = "watchfiles-1.0.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4f8c4998506241dedf59613082d1c18b836e26ef2a4caecad0ec41e2a15e4226"}, - {file = "watchfiles-1.0.4-cp311-cp311-win32.whl", hash = "sha256:4ebbeca9360c830766b9f0df3640b791be569d988f4be6c06d6fae41f187f105"}, - {file = "watchfiles-1.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:05d341c71f3d7098920f8551d4df47f7b57ac5b8dad56558064c3431bdfc0b74"}, - {file = "watchfiles-1.0.4-cp311-cp311-win_arm64.whl", hash = "sha256:32b026a6ab64245b584acf4931fe21842374da82372d5c039cba6bf99ef722f3"}, - {file = "watchfiles-1.0.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:229e6ec880eca20e0ba2f7e2249c85bae1999d330161f45c78d160832e026ee2"}, - {file = "watchfiles-1.0.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5717021b199e8353782dce03bd8a8f64438832b84e2885c4a645f9723bf656d9"}, - {file = "watchfiles-1.0.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0799ae68dfa95136dde7c472525700bd48777875a4abb2ee454e3ab18e9fc712"}, - {file = "watchfiles-1.0.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:43b168bba889886b62edb0397cab5b6490ffb656ee2fcb22dec8bfeb371a9e12"}, - {file = "watchfiles-1.0.4-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fb2c46e275fbb9f0c92e7654b231543c7bbfa1df07cdc4b99fa73bedfde5c844"}, - {file = "watchfiles-1.0.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:857f5fc3aa027ff5e57047da93f96e908a35fe602d24f5e5d8ce64bf1f2fc733"}, - {file = "watchfiles-1.0.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55ccfd27c497b228581e2838d4386301227fc0cb47f5a12923ec2fe4f97b95af"}, - {file = "watchfiles-1.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c11ea22304d17d4385067588123658e9f23159225a27b983f343fcffc3e796a"}, - {file = "watchfiles-1.0.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:74cb3ca19a740be4caa18f238298b9d472c850f7b2ed89f396c00a4c97e2d9ff"}, - {file = "watchfiles-1.0.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c7cce76c138a91e720d1df54014a047e680b652336e1b73b8e3ff3158e05061e"}, - {file = "watchfiles-1.0.4-cp312-cp312-win32.whl", hash = "sha256:b045c800d55bc7e2cadd47f45a97c7b29f70f08a7c2fa13241905010a5493f94"}, - {file = "watchfiles-1.0.4-cp312-cp312-win_amd64.whl", hash = "sha256:c2acfa49dd0ad0bf2a9c0bb9a985af02e89345a7189be1efc6baa085e0f72d7c"}, - {file = "watchfiles-1.0.4-cp312-cp312-win_arm64.whl", hash = "sha256:22bb55a7c9e564e763ea06c7acea24fc5d2ee5dfc5dafc5cfbedfe58505e9f90"}, - {file = "watchfiles-1.0.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:8012bd820c380c3d3db8435e8cf7592260257b378b649154a7948a663b5f84e9"}, - {file = "watchfiles-1.0.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:aa216f87594f951c17511efe5912808dfcc4befa464ab17c98d387830ce07b60"}, - {file = "watchfiles-1.0.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62c9953cf85529c05b24705639ffa390f78c26449e15ec34d5339e8108c7c407"}, - {file = "watchfiles-1.0.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7cf684aa9bba4cd95ecb62c822a56de54e3ae0598c1a7f2065d51e24637a3c5d"}, - {file = "watchfiles-1.0.4-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f44a39aee3cbb9b825285ff979ab887a25c5d336e5ec3574f1506a4671556a8d"}, - {file = "watchfiles-1.0.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a38320582736922be8c865d46520c043bff350956dfc9fbaee3b2df4e1740a4b"}, - {file = "watchfiles-1.0.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:39f4914548b818540ef21fd22447a63e7be6e24b43a70f7642d21f1e73371590"}, - {file = "watchfiles-1.0.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f12969a3765909cf5dc1e50b2436eb2c0e676a3c75773ab8cc3aa6175c16e902"}, - {file = "watchfiles-1.0.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:0986902677a1a5e6212d0c49b319aad9cc48da4bd967f86a11bde96ad9676ca1"}, - {file = "watchfiles-1.0.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:308ac265c56f936636e3b0e3f59e059a40003c655228c131e1ad439957592303"}, - {file = "watchfiles-1.0.4-cp313-cp313-win32.whl", hash = "sha256:aee397456a29b492c20fda2d8961e1ffb266223625346ace14e4b6d861ba9c80"}, - {file = "watchfiles-1.0.4-cp313-cp313-win_amd64.whl", hash = "sha256:d6097538b0ae5c1b88c3b55afa245a66793a8fec7ada6755322e465fb1a0e8cc"}, - {file = "watchfiles-1.0.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:d3452c1ec703aa1c61e15dfe9d482543e4145e7c45a6b8566978fbb044265a21"}, - {file = "watchfiles-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7b75fee5a16826cf5c46fe1c63116e4a156924d668c38b013e6276f2582230f0"}, - {file = "watchfiles-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e997802d78cdb02623b5941830ab06f8860038faf344f0d288d325cc9c5d2ff"}, - {file = "watchfiles-1.0.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e0611d244ce94d83f5b9aff441ad196c6e21b55f77f3c47608dcf651efe54c4a"}, - {file = "watchfiles-1.0.4-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9745a4210b59e218ce64c91deb599ae8775c8a9da4e95fb2ee6fe745fc87d01a"}, - {file = "watchfiles-1.0.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4810ea2ae622add560f4aa50c92fef975e475f7ac4900ce5ff5547b2434642d8"}, - {file = "watchfiles-1.0.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:740d103cd01458f22462dedeb5a3382b7f2c57d07ff033fbc9465919e5e1d0f3"}, - {file = "watchfiles-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdbd912a61543a36aef85e34f212e5d2486e7c53ebfdb70d1e0b060cc50dd0bf"}, - {file = "watchfiles-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0bc80d91ddaf95f70258cf78c471246846c1986bcc5fd33ccc4a1a67fcb40f9a"}, - {file = "watchfiles-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ab0311bb2ffcd9f74b6c9de2dda1612c13c84b996d032cd74799adb656af4e8b"}, - {file = "watchfiles-1.0.4-cp39-cp39-win32.whl", hash = "sha256:02a526ee5b5a09e8168314c905fc545c9bc46509896ed282aeb5a8ba9bd6ca27"}, - {file = "watchfiles-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:a5ae5706058b27c74bac987d615105da17724172d5aaacc6c362a40599b6de43"}, - {file = "watchfiles-1.0.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:cdcc92daeae268de1acf5b7befcd6cfffd9a047098199056c72e4623f531de18"}, - {file = "watchfiles-1.0.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d8d3d9203705b5797f0af7e7e5baa17c8588030aaadb7f6a86107b7247303817"}, - {file = "watchfiles-1.0.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bdef5a1be32d0b07dcea3318a0be95d42c98ece24177820226b56276e06b63b0"}, - {file = "watchfiles-1.0.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:342622287b5604ddf0ed2d085f3a589099c9ae8b7331df3ae9845571586c4f3d"}, - {file = "watchfiles-1.0.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9fe37a2de80aa785d340f2980276b17ef697ab8db6019b07ee4fd28a8359d2f3"}, - {file = "watchfiles-1.0.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:9d1ef56b56ed7e8f312c934436dea93bfa3e7368adfcf3df4c0da6d4de959a1e"}, - {file = "watchfiles-1.0.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95b42cac65beae3a362629950c444077d1b44f1790ea2772beaea95451c086bb"}, - {file = "watchfiles-1.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e0227b8ed9074c6172cf55d85b5670199c99ab11fd27d2c473aa30aec67ee42"}, - {file = "watchfiles-1.0.4.tar.gz", hash = "sha256:6ba473efd11062d73e4f00c2b730255f9c1bdd73cd5f9fe5b5da8dbd4a717205"}, -] - -[package.dependencies] -anyio = ">=3.0.0" +standard = ["websockets (>=9.1)", "httptools (>=0.2.0,<0.3.0)", "watchgod (>=0.6)", "python-dotenv (>=0.13)", "PyYAML (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "colorama (>=0.4)"] [[package]] name = "webencodings" version = "0.5.1" description = "Character encoding aliases for legacy web content" +category = "main" optional = false python-versions = "*" -files = [ - {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, - {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, -] [[package]] name = "werkzeug" -version = "3.0.3" +version = "2.0.2" description = "The comprehensive WSGI web application library." -optional = false -python-versions = ">=3.8" -files = [ - {file = "werkzeug-3.0.3-py3-none-any.whl", hash = "sha256:fc9645dc43e03e4d630d23143a04a7f947a9a3b5727cd535fdfe155a17cc48c8"}, - {file = "werkzeug-3.0.3.tar.gz", hash = "sha256:097e5bfda9f0aba8da6b8545146def481d06aa7d3266e7448e2cccf67dd8bd18"}, -] - -[package.dependencies] -MarkupSafe = ">=2.1.1" - -[package.extras] -watchdog = ["watchdog (>=2.3)"] - -[[package]] -name = "wrapt" -version = "1.16.0" -description = "Module for decorators, wrappers and monkey patching." +category = "main" optional = false python-versions = ">=3.6" -files = [ - {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"}, - {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"}, - {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440"}, - {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487"}, - {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf"}, - {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72"}, - {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0"}, - {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136"}, - {file = "wrapt-1.16.0-cp310-cp310-win32.whl", hash = "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d"}, - {file = "wrapt-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2"}, - {file = "wrapt-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09"}, - {file = "wrapt-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d"}, - {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389"}, - {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060"}, - {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1"}, - {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3"}, - {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956"}, - {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d"}, - {file = "wrapt-1.16.0-cp311-cp311-win32.whl", hash = "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362"}, - {file = "wrapt-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89"}, - {file = "wrapt-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b"}, - {file = "wrapt-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36"}, - {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73"}, - {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809"}, - {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b"}, - {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81"}, - {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9"}, - {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c"}, - {file = "wrapt-1.16.0-cp312-cp312-win32.whl", hash = "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc"}, - {file = "wrapt-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8"}, - {file = "wrapt-1.16.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8"}, - {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39"}, - {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c"}, - {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40"}, - {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc"}, - {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e"}, - {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465"}, - {file = "wrapt-1.16.0-cp36-cp36m-win32.whl", hash = "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e"}, - {file = "wrapt-1.16.0-cp36-cp36m-win_amd64.whl", hash = "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966"}, - {file = "wrapt-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593"}, - {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292"}, - {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5"}, - {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf"}, - {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228"}, - {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f"}, - {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c"}, - {file = "wrapt-1.16.0-cp37-cp37m-win32.whl", hash = "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c"}, - {file = "wrapt-1.16.0-cp37-cp37m-win_amd64.whl", hash = "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00"}, - {file = "wrapt-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0"}, - {file = "wrapt-1.16.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202"}, - {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0"}, - {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e"}, - {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f"}, - {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267"}, - {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca"}, - {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6"}, - {file = "wrapt-1.16.0-cp38-cp38-win32.whl", hash = "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b"}, - {file = "wrapt-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41"}, - {file = "wrapt-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2"}, - {file = "wrapt-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb"}, - {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8"}, - {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c"}, - {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a"}, - {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664"}, - {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f"}, - {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537"}, - {file = "wrapt-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3"}, - {file = "wrapt-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35"}, - {file = "wrapt-1.16.0-py3-none-any.whl", hash = "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1"}, - {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, -] + +[package.extras] +watchdog = ["watchdog"] [[package]] name = "wsproto" -version = "1.2.0" +version = "1.0.0" description = "WebSockets state-machine based protocol implementation" +category = "main" optional = false -python-versions = ">=3.7.0" -files = [ - {file = "wsproto-1.2.0-py3-none-any.whl", hash = "sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736"}, - {file = "wsproto-1.2.0.tar.gz", hash = "sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065"}, -] +python-versions = ">=3.6.1" [package.dependencies] h11 = ">=0.9.0,<1" [[package]] name = "zipp" -version = "3.20.0" +version = "3.7.0" description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" optional = false -python-versions = ">=3.8" -files = [ - {file = "zipp-3.20.0-py3-none-any.whl", hash = "sha256:58da6168be89f0be59beb194da1250516fdaa062ccebd30127ac65d30045e10d"}, - {file = "zipp-3.20.0.tar.gz", hash = "sha256:0145e43d89664cfe1a2e533adc75adafed82fe2da404b4bbb6b026c0157bdb31"}, -] +python-versions = ">=3.7" [package.extras] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [metadata] -lock-version = "2.0" -python-versions = ">=3.10,<3.14" -content-hash = "3f61efa57153b51d06808462a7cc3f2dc9a0d9132d1f35d47886a8af75243123" +lock-version = "1.1" +python-versions = ">=3.9,<3.11" +content-hash = "1f6a0dd3780d8857ba0d5123814f299a8178a80e79c2235805623f43b8e0381f" + +[metadata.files] +aiofiles = [ + {file = "aiofiles-0.7.0-py3-none-any.whl", hash = "sha256:c67a6823b5f23fcab0a2595a289cec7d8c863ffcb4322fb8cd6b90400aedfdbc"}, + {file = "aiofiles-0.7.0.tar.gz", hash = "sha256:a1c4fc9b2ff81568c83e21392a82f344ea9d23da906e4f6a52662764545e19d4"}, +] +alembic = [ + {file = "alembic-1.7.6-py3-none-any.whl", hash = "sha256:ad842f2c3ab5c5d4861232730779c05e33db4ba880a08b85eb505e87c01095bc"}, + {file = "alembic-1.7.6.tar.gz", hash = "sha256:6c0c05e9768a896d804387e20b299880fe01bc56484246b0dffe8075d6d3d847"}, +] +anyio = [ + {file = "anyio-3.5.0-py3-none-any.whl", hash = "sha256:b5fa16c5ff93fa1046f2eeb5bbff2dad4d3514d6cda61d02816dba34fa8c3c2e"}, + {file = "anyio-3.5.0.tar.gz", hash = "sha256:a0aeffe2fb1fdf374a8e4b471444f0f3ac4fb9f5a5b542b48824475e0042a5a6"}, +] +asgiref = [ + {file = "asgiref-3.5.0-py3-none-any.whl", hash = "sha256:88d59c13d634dcffe0510be048210188edd79aeccb6a6c9028cdad6f31d730a9"}, + {file = "asgiref-3.5.0.tar.gz", hash = "sha256:2f8abc20f7248433085eda803936d98992f1343ddb022065779f37c5da0181d0"}, +] +atomicwrites = [ + {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, + {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, +] +attrs = [ + {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, + {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, +] +authlib = [ + {file = "Authlib-0.15.5-py2.py3-none-any.whl", hash = "sha256:ecf4a7a9f2508c0bb07e93a752dd3c495cfaffc20e864ef0ffc95e3f40d2abaf"}, + {file = "Authlib-0.15.5.tar.gz", hash = "sha256:b83cf6360c8e92b0e9df0d1f32d675790bcc4e3c03977499b1eed24dcdef4252"}, +] +bcrypt = [ + {file = "bcrypt-3.2.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:c95d4cbebffafcdd28bd28bb4e25b31c50f6da605c81ffd9ad8a3d1b2ab7b1b6"}, + {file = "bcrypt-3.2.0-cp36-abi3-manylinux1_x86_64.whl", hash = "sha256:63d4e3ff96188e5898779b6057878fecf3f11cfe6ec3b313ea09955d587ec7a7"}, + {file = "bcrypt-3.2.0-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:cd1ea2ff3038509ea95f687256c46b79f5fc382ad0aa3664d200047546d511d1"}, + {file = "bcrypt-3.2.0-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:cdcdcb3972027f83fe24a48b1e90ea4b584d35f1cc279d76de6fc4b13376239d"}, + {file = "bcrypt-3.2.0-cp36-abi3-win32.whl", hash = "sha256:a67fb841b35c28a59cebed05fbd3e80eea26e6d75851f0574a9273c80f3e9b55"}, + {file = "bcrypt-3.2.0-cp36-abi3-win_amd64.whl", hash = "sha256:81fec756feff5b6818ea7ab031205e1d323d8943d237303baca2c5f9c7846f34"}, + {file = "bcrypt-3.2.0.tar.gz", hash = "sha256:5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29"}, +] +bleach = [ + {file = "bleach-4.1.0-py2.py3-none-any.whl", hash = "sha256:4d2651ab93271d1129ac9cbc679f524565cc8a1b791909c4a51eac4446a15994"}, + {file = "bleach-4.1.0.tar.gz", hash = "sha256:0900d8b37eba61a802ee40ac0061f8c2b5dee29c1927dd1d233e075ebf5a71da"}, +] +certifi = [ + {file = "certifi-2021.10.8-py2.py3-none-any.whl", hash = "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569"}, + {file = "certifi-2021.10.8.tar.gz", hash = "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872"}, +] +cffi = [ + {file = "cffi-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:c2502a1a03b6312837279c8c1bd3ebedf6c12c4228ddbad40912d671ccc8a962"}, + {file = "cffi-1.15.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:23cfe892bd5dd8941608f93348c0737e369e51c100d03718f108bf1add7bd6d0"}, + {file = "cffi-1.15.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:41d45de54cd277a7878919867c0f08b0cf817605e4eb94093e7516505d3c8d14"}, + {file = "cffi-1.15.0-cp27-cp27m-win32.whl", hash = "sha256:4a306fa632e8f0928956a41fa8e1d6243c71e7eb59ffbd165fc0b41e316b2474"}, + {file = "cffi-1.15.0-cp27-cp27m-win_amd64.whl", hash = "sha256:e7022a66d9b55e93e1a845d8c9eba2a1bebd4966cd8bfc25d9cd07d515b33fa6"}, + {file = "cffi-1.15.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:14cd121ea63ecdae71efa69c15c5543a4b5fbcd0bbe2aad864baca0063cecf27"}, + {file = "cffi-1.15.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d4d692a89c5cf08a8557fdeb329b82e7bf609aadfaed6c0d79f5a449a3c7c023"}, + {file = "cffi-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0104fb5ae2391d46a4cb082abdd5c69ea4eab79d8d44eaaf79f1b1fd806ee4c2"}, + {file = "cffi-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:91ec59c33514b7c7559a6acda53bbfe1b283949c34fe7440bcf917f96ac0723e"}, + {file = "cffi-1.15.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f5c7150ad32ba43a07c4479f40241756145a1f03b43480e058cfd862bf5041c7"}, + {file = "cffi-1.15.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:00c878c90cb53ccfaae6b8bc18ad05d2036553e6d9d1d9dbcf323bbe83854ca3"}, + {file = "cffi-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abb9a20a72ac4e0fdb50dae135ba5e77880518e742077ced47eb1499e29a443c"}, + {file = "cffi-1.15.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a5263e363c27b653a90078143adb3d076c1a748ec9ecc78ea2fb916f9b861962"}, + {file = "cffi-1.15.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f54a64f8b0c8ff0b64d18aa76675262e1700f3995182267998c31ae974fbc382"}, + {file = "cffi-1.15.0-cp310-cp310-win32.whl", hash = "sha256:c21c9e3896c23007803a875460fb786118f0cdd4434359577ea25eb556e34c55"}, + {file = "cffi-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:5e069f72d497312b24fcc02073d70cb989045d1c91cbd53979366077959933e0"}, + {file = "cffi-1.15.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:64d4ec9f448dfe041705426000cc13e34e6e5bb13736e9fd62e34a0b0c41566e"}, + {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2756c88cbb94231c7a147402476be2c4df2f6078099a6f4a480d239a8817ae39"}, + {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b96a311ac60a3f6be21d2572e46ce67f09abcf4d09344c49274eb9e0bf345fc"}, + {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75e4024375654472cc27e91cbe9eaa08567f7fbdf822638be2814ce059f58032"}, + {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:59888172256cac5629e60e72e86598027aca6bf01fa2465bdb676d37636573e8"}, + {file = "cffi-1.15.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:27c219baf94952ae9d50ec19651a687b826792055353d07648a5695413e0c605"}, + {file = "cffi-1.15.0-cp36-cp36m-win32.whl", hash = "sha256:4958391dbd6249d7ad855b9ca88fae690783a6be9e86df65865058ed81fc860e"}, + {file = "cffi-1.15.0-cp36-cp36m-win_amd64.whl", hash = "sha256:f6f824dc3bce0edab5f427efcfb1d63ee75b6fcb7282900ccaf925be84efb0fc"}, + {file = "cffi-1.15.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:06c48159c1abed75c2e721b1715c379fa3200c7784271b3c46df01383b593636"}, + {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c2051981a968d7de9dd2d7b87bcb9c939c74a34626a6e2f8181455dd49ed69e4"}, + {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:fd8a250edc26254fe5b33be00402e6d287f562b6a5b2152dec302fa15bb3e997"}, + {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:91d77d2a782be4274da750752bb1650a97bfd8f291022b379bb8e01c66b4e96b"}, + {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:45db3a33139e9c8f7c09234b5784a5e33d31fd6907800b316decad50af323ff2"}, + {file = "cffi-1.15.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:263cc3d821c4ab2213cbe8cd8b355a7f72a8324577dc865ef98487c1aeee2bc7"}, + {file = "cffi-1.15.0-cp37-cp37m-win32.whl", hash = "sha256:17771976e82e9f94976180f76468546834d22a7cc404b17c22df2a2c81db0c66"}, + {file = "cffi-1.15.0-cp37-cp37m-win_amd64.whl", hash = "sha256:3415c89f9204ee60cd09b235810be700e993e343a408693e80ce7f6a40108029"}, + {file = "cffi-1.15.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4238e6dab5d6a8ba812de994bbb0a79bddbdf80994e4ce802b6f6f3142fcc880"}, + {file = "cffi-1.15.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0808014eb713677ec1292301ea4c81ad277b6cdf2fdd90fd540af98c0b101d20"}, + {file = "cffi-1.15.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:57e9ac9ccc3101fac9d6014fba037473e4358ef4e89f8e181f8951a2c0162024"}, + {file = "cffi-1.15.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b6c2ea03845c9f501ed1313e78de148cd3f6cad741a75d43a29b43da27f2e1e"}, + {file = "cffi-1.15.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:10dffb601ccfb65262a27233ac273d552ddc4d8ae1bf93b21c94b8511bffe728"}, + {file = "cffi-1.15.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:786902fb9ba7433aae840e0ed609f45c7bcd4e225ebb9c753aa39725bb3e6ad6"}, + {file = "cffi-1.15.0-cp38-cp38-win32.whl", hash = "sha256:da5db4e883f1ce37f55c667e5c0de439df76ac4cb55964655906306918e7363c"}, + {file = "cffi-1.15.0-cp38-cp38-win_amd64.whl", hash = "sha256:181dee03b1170ff1969489acf1c26533710231c58f95534e3edac87fff06c443"}, + {file = "cffi-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:45e8636704eacc432a206ac7345a5d3d2c62d95a507ec70d62f23cd91770482a"}, + {file = "cffi-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:31fb708d9d7c3f49a60f04cf5b119aeefe5644daba1cd2a0fe389b674fd1de37"}, + {file = "cffi-1.15.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6dc2737a3674b3e344847c8686cf29e500584ccad76204efea14f451d4cc669a"}, + {file = "cffi-1.15.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:74fdfdbfdc48d3f47148976f49fab3251e550a8720bebc99bf1483f5bfb5db3e"}, + {file = "cffi-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffaa5c925128e29efbde7301d8ecaf35c8c60ffbcd6a1ffd3a552177c8e5e796"}, + {file = "cffi-1.15.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f7d084648d77af029acb79a0ff49a0ad7e9d09057a9bf46596dac9514dc07df"}, + {file = "cffi-1.15.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ef1f279350da2c586a69d32fc8733092fd32cc8ac95139a00377841f59a3f8d8"}, + {file = "cffi-1.15.0-cp39-cp39-win32.whl", hash = "sha256:2a23af14f408d53d5e6cd4e3d9a24ff9e05906ad574822a10563efcef137979a"}, + {file = "cffi-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:3773c4d81e6e818df2efbc7dd77325ca0dcb688116050fb2b3011218eda36139"}, + {file = "cffi-1.15.0.tar.gz", hash = "sha256:920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954"}, +] +charset-normalizer = [ + {file = "charset-normalizer-2.0.11.tar.gz", hash = "sha256:98398a9d69ee80548c762ba991a4728bfc3836768ed226b3945908d1a688371c"}, + {file = "charset_normalizer-2.0.11-py3-none-any.whl", hash = "sha256:2842d8f5e82a1f6aa437380934d5e1cd4fcf2003b06fed6940769c164a480a45"}, +] +click = [ + {file = "click-8.0.3-py3-none-any.whl", hash = "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3"}, + {file = "click-8.0.3.tar.gz", hash = "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b"}, +] +colorama = [ + {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, + {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, +] +coverage = [ + {file = "coverage-6.3.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eeffd96882d8c06d31b65dddcf51db7c612547babc1c4c5db6a011abe9798525"}, + {file = "coverage-6.3.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:621f6ea7260ea2ffdaec64fe5cb521669984f567b66f62f81445221d4754df4c"}, + {file = "coverage-6.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:84f2436d6742c01136dd940ee158bfc7cf5ced3da7e4c949662b8703b5cd8145"}, + {file = "coverage-6.3.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:de73fca6fb403dd72d4da517cfc49fcf791f74eee697d3219f6be29adf5af6ce"}, + {file = "coverage-6.3.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78fbb2be068a13a5d99dce9e1e7d168db880870f7bc73f876152130575bd6167"}, + {file = "coverage-6.3.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f5a4551dfd09c3bd12fca8144d47fe7745275adf3229b7223c2f9e29a975ebda"}, + {file = "coverage-6.3.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7bff3a98f63b47464480de1b5bdd80c8fade0ba2832c9381253c9b74c4153c27"}, + {file = "coverage-6.3.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a06c358f4aed05fa1099c39decc8022261bb07dfadc127c08cfbd1391b09689e"}, + {file = "coverage-6.3.1-cp310-cp310-win32.whl", hash = "sha256:9fff3ff052922cb99f9e52f63f985d4f7a54f6b94287463bc66b7cdf3eb41217"}, + {file = "coverage-6.3.1-cp310-cp310-win_amd64.whl", hash = "sha256:276b13cc085474e482566c477c25ed66a097b44c6e77132f3304ac0b039f83eb"}, + {file = "coverage-6.3.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:56c4a409381ddd7bbff134e9756077860d4e8a583d310a6f38a2315b9ce301d0"}, + {file = "coverage-6.3.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9eb494070aa060ceba6e4bbf44c1bc5fa97bfb883a0d9b0c9049415f9e944793"}, + {file = "coverage-6.3.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5e15d424b8153756b7c903bde6d4610be0c3daca3986173c18dd5c1a1625e4cd"}, + {file = "coverage-6.3.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61d47a897c1e91f33f177c21de897267b38fbb45f2cd8e22a710bcef1df09ac1"}, + {file = "coverage-6.3.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:25e73d4c81efa8ea3785274a2f7f3bfbbeccb6fcba2a0bdd3be9223371c37554"}, + {file = "coverage-6.3.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:fac0bcc5b7e8169bffa87f0dcc24435446d329cbc2b5486d155c2e0f3b493ae1"}, + {file = "coverage-6.3.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:72128176fea72012063200b7b395ed8a57849282b207321124d7ff14e26988e8"}, + {file = "coverage-6.3.1-cp37-cp37m-win32.whl", hash = "sha256:1bc6d709939ff262fd1432f03f080c5042dc6508b6e0d3d20e61dd045456a1a0"}, + {file = "coverage-6.3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:618eeba986cea7f621d8607ee378ecc8c2504b98b3fdc4952b30fe3578304687"}, + {file = "coverage-6.3.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d5ed164af5c9078596cfc40b078c3b337911190d3faeac830c3f1274f26b8320"}, + {file = "coverage-6.3.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:352c68e233409c31048a3725c446a9e48bbff36e39db92774d4f2380d630d8f8"}, + {file = "coverage-6.3.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:448d7bde7ceb6c69e08474c2ddbc5b4cd13c9e4aa4a717467f716b5fc938a734"}, + {file = "coverage-6.3.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9fde6b90889522c220dd56a670102ceef24955d994ff7af2cb786b4ba8fe11e4"}, + {file = "coverage-6.3.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e647a0be741edbb529a72644e999acb09f2ad60465f80757da183528941ff975"}, + {file = "coverage-6.3.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a5cdc3adb4f8bb8d8f5e64c2e9e282bc12980ef055ec6da59db562ee9bdfefa"}, + {file = "coverage-6.3.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:2dd70a167843b4b4b2630c0c56f1b586fe965b4f8ac5da05b6690344fd065c6b"}, + {file = "coverage-6.3.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:9ad0a117b8dc2061ce9461ea4c1b4799e55edceb236522c5b8f958ce9ed8fa9a"}, + {file = "coverage-6.3.1-cp38-cp38-win32.whl", hash = "sha256:e92c7a5f7d62edff50f60a045dc9542bf939758c95b2fcd686175dd10ce0ed10"}, + {file = "coverage-6.3.1-cp38-cp38-win_amd64.whl", hash = "sha256:482fb42eea6164894ff82abbcf33d526362de5d1a7ed25af7ecbdddd28fc124f"}, + {file = "coverage-6.3.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c5b81fb37db76ebea79aa963b76d96ff854e7662921ce742293463635a87a78d"}, + {file = "coverage-6.3.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a4f923b9ab265136e57cc14794a15b9dcea07a9c578609cd5dbbfff28a0d15e6"}, + {file = "coverage-6.3.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:56d296cbc8254a7dffdd7bcc2eb70be5a233aae7c01856d2d936f5ac4e8ac1f1"}, + {file = "coverage-6.3.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1245ab82e8554fa88c4b2ab1e098ae051faac5af829efdcf2ce6b34dccd5567c"}, + {file = "coverage-6.3.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f2b05757c92ad96b33dbf8e8ec8d4ccb9af6ae3c9e9bd141c7cc44d20c6bcba"}, + {file = "coverage-6.3.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9e3dd806f34de38d4c01416344e98eab2437ac450b3ae39c62a0ede2f8b5e4ed"}, + {file = "coverage-6.3.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d651fde74a4d3122e5562705824507e2f5b2d3d57557f1916c4b27635f8fbe3f"}, + {file = "coverage-6.3.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:704f89b87c4f4737da2860695a18c852b78ec7279b24eedacab10b29067d3a38"}, + {file = "coverage-6.3.1-cp39-cp39-win32.whl", hash = "sha256:2aed4761809640f02e44e16b8b32c1a5dee5e80ea30a0ff0912158bde9c501f2"}, + {file = "coverage-6.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:9976fb0a5709988778ac9bc44f3d50fccd989987876dfd7716dee28beed0a9fa"}, + {file = "coverage-6.3.1-pp36.pp37.pp38-none-any.whl", hash = "sha256:463e52616ea687fd323888e86bf25e864a3cc6335a043fad6bbb037dbf49bbe2"}, + {file = "coverage-6.3.1.tar.gz", hash = "sha256:6c3f6158b02ac403868eea390930ae64e9a9a2a5bbfafefbb920d29258d9f2f8"}, +] +cryptography = [ + {file = "cryptography-36.0.1-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:73bc2d3f2444bcfeac67dd130ff2ea598ea5f20b40e36d19821b4df8c9c5037b"}, + {file = "cryptography-36.0.1-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:2d87cdcb378d3cfed944dac30596da1968f88fb96d7fc34fdae30a99054b2e31"}, + {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:74d6c7e80609c0f4c2434b97b80c7f8fdfaa072ca4baab7e239a15d6d70ed73a"}, + {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:6c0c021f35b421ebf5976abf2daacc47e235f8b6082d3396a2fe3ccd537ab173"}, + {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d59a9d55027a8b88fd9fd2826c4392bd487d74bf628bb9d39beecc62a644c12"}, + {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a817b961b46894c5ca8a66b599c745b9a3d9f822725221f0e0fe49dc043a3a3"}, + {file = "cryptography-36.0.1-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:94ae132f0e40fe48f310bba63f477f14a43116f05ddb69d6fa31e93f05848ae2"}, + {file = "cryptography-36.0.1-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:7be0eec337359c155df191d6ae00a5e8bbb63933883f4f5dffc439dac5348c3f"}, + {file = "cryptography-36.0.1-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:e0344c14c9cb89e76eb6a060e67980c9e35b3f36691e15e1b7a9e58a0a6c6dc3"}, + {file = "cryptography-36.0.1-cp36-abi3-win32.whl", hash = "sha256:4caa4b893d8fad33cf1964d3e51842cd78ba87401ab1d2e44556826df849a8ca"}, + {file = "cryptography-36.0.1-cp36-abi3-win_amd64.whl", hash = "sha256:391432971a66cfaf94b21c24ab465a4cc3e8bf4a939c1ca5c3e3a6e0abebdbcf"}, + {file = "cryptography-36.0.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bb5829d027ff82aa872d76158919045a7c1e91fbf241aec32cb07956e9ebd3c9"}, + {file = "cryptography-36.0.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ebc15b1c22e55c4d5566e3ca4db8689470a0ca2babef8e3a9ee057a8b82ce4b1"}, + {file = "cryptography-36.0.1-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:596f3cd67e1b950bc372c33f1a28a0692080625592ea6392987dba7f09f17a94"}, + {file = "cryptography-36.0.1-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:30ee1eb3ebe1644d1c3f183d115a8c04e4e603ed6ce8e394ed39eea4a98469ac"}, + {file = "cryptography-36.0.1-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ec63da4e7e4a5f924b90af42eddf20b698a70e58d86a72d943857c4c6045b3ee"}, + {file = "cryptography-36.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ca238ceb7ba0bdf6ce88c1b74a87bffcee5afbfa1e41e173b1ceb095b39add46"}, + {file = "cryptography-36.0.1-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:ca28641954f767f9822c24e927ad894d45d5a1e501767599647259cbf030b903"}, + {file = "cryptography-36.0.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:39bdf8e70eee6b1c7b289ec6e5d84d49a6bfa11f8b8646b5b3dfe41219153316"}, + {file = "cryptography-36.0.1.tar.gz", hash = "sha256:53e5c1dc3d7a953de055d77bef2ff607ceef7a2aac0353b5d630ab67f7423638"}, +] +dnspython = [ + {file = "dnspython-2.2.0-py3-none-any.whl", hash = "sha256:081649da27ced5e75709a1ee542136eaba9842a0fe4c03da4fb0a3d3ed1f3c44"}, + {file = "dnspython-2.2.0.tar.gz", hash = "sha256:e79351e032d0b606b98d38a4b0e6e2275b31a5b85c873e587cc11b73aca026d6"}, +] +dunamai = [ + {file = "dunamai-1.8.0-py3-none-any.whl", hash = "sha256:846855e45d5969f6d11835d486bbf4d6ca175d4169a0ab11f619a5135cc86bdf"}, + {file = "dunamai-1.8.0.tar.gz", hash = "sha256:ff1f958af3575ec612e72c84bf96367469f418d31b9685f8311a5de2eb754a85"}, +] +email-validator = [ + {file = "email_validator-1.1.3-py2.py3-none-any.whl", hash = "sha256:5675c8ceb7106a37e40e2698a57c056756bf3f272cfa8682a4f87ebd95d8440b"}, + {file = "email_validator-1.1.3.tar.gz", hash = "sha256:aa237a65f6f4da067119b7df3f13e89c25c051327b2b5b66dc075f33d62480d7"}, +] +execnet = [ + {file = "execnet-1.9.0-py2.py3-none-any.whl", hash = "sha256:a295f7cc774947aac58dde7fdc85f4aa00c42adf5d8f5468fc630c1acf30a142"}, + {file = "execnet-1.9.0.tar.gz", hash = "sha256:8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5"}, +] +fakeredis = [ + {file = "fakeredis-1.7.0-py3-none-any.whl", hash = "sha256:6f1e04f64557ad3b6835bdc6e5a8d022cbace4bdc24a47ad58f6a72e0fbff760"}, + {file = "fakeredis-1.7.0.tar.gz", hash = "sha256:c9bd12e430336cbd3e189fae0e91eb99997b93e76dbfdd6ed67fa352dc684c71"}, +] +fastapi = [ + {file = "fastapi-0.71.0-py3-none-any.whl", hash = "sha256:a78eca6b084de9667f2d5f37e2ae297270e5a119cd01c2f04815795da92fc87f"}, + {file = "fastapi-0.71.0.tar.gz", hash = "sha256:2b5ac0ae89c80b40d1dd4b2ea0bb1f78d7c4affd3644d080bf050f084759fff2"}, +] +feedgen = [ + {file = "feedgen-0.9.0.tar.gz", hash = "sha256:8e811bdbbed6570034950db23a4388453628a70e689a6e8303ccec430f5a804a"}, +] +filelock = [ + {file = "filelock-3.4.2-py3-none-any.whl", hash = "sha256:cf0fc6a2f8d26bd900f19bf33915ca70ba4dd8c56903eeb14e1e7a2fd7590146"}, + {file = "filelock-3.4.2.tar.gz", hash = "sha256:38b4f4c989f9d06d44524df1b24bd19e167d851f19b50bf3e3559952dddc5b80"}, +] +flake8 = [ + {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, + {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, +] +greenlet = [ + {file = "greenlet-1.1.2-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:58df5c2a0e293bf665a51f8a100d3e9956febfbf1d9aaf8c0677cf70218910c6"}, + {file = "greenlet-1.1.2-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:aec52725173bd3a7b56fe91bc56eccb26fbdff1386ef123abb63c84c5b43b63a"}, + {file = "greenlet-1.1.2-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:833e1551925ed51e6b44c800e71e77dacd7e49181fdc9ac9a0bf3714d515785d"}, + {file = "greenlet-1.1.2-cp27-cp27m-win32.whl", hash = "sha256:aa5b467f15e78b82257319aebc78dd2915e4c1436c3c0d1ad6f53e47ba6e2713"}, + {file = "greenlet-1.1.2-cp27-cp27m-win_amd64.whl", hash = "sha256:40b951f601af999a8bf2ce8c71e8aaa4e8c6f78ff8afae7b808aae2dc50d4c40"}, + {file = "greenlet-1.1.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:95e69877983ea39b7303570fa6760f81a3eec23d0e3ab2021b7144b94d06202d"}, + {file = "greenlet-1.1.2-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:356b3576ad078c89a6107caa9c50cc14e98e3a6c4874a37c3e0273e4baf33de8"}, + {file = "greenlet-1.1.2-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:8639cadfda96737427330a094476d4c7a56ac03de7265622fcf4cfe57c8ae18d"}, + {file = "greenlet-1.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97e5306482182170ade15c4b0d8386ded995a07d7cc2ca8f27958d34d6736497"}, + {file = "greenlet-1.1.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e6a36bb9474218c7a5b27ae476035497a6990e21d04c279884eb10d9b290f1b1"}, + {file = "greenlet-1.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:abb7a75ed8b968f3061327c433a0fbd17b729947b400747c334a9c29a9af6c58"}, + {file = "greenlet-1.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:14d4f3cd4e8b524ae9b8aa567858beed70c392fdec26dbdb0a8a418392e71708"}, + {file = "greenlet-1.1.2-cp35-cp35m-macosx_10_14_x86_64.whl", hash = "sha256:17ff94e7a83aa8671a25bf5b59326ec26da379ace2ebc4411d690d80a7fbcf23"}, + {file = "greenlet-1.1.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9f3cba480d3deb69f6ee2c1825060177a22c7826431458c697df88e6aeb3caee"}, + {file = "greenlet-1.1.2-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:fa877ca7f6b48054f847b61d6fa7bed5cebb663ebc55e018fda12db09dcc664c"}, + {file = "greenlet-1.1.2-cp35-cp35m-win32.whl", hash = "sha256:7cbd7574ce8e138bda9df4efc6bf2ab8572c9aff640d8ecfece1b006b68da963"}, + {file = "greenlet-1.1.2-cp35-cp35m-win_amd64.whl", hash = "sha256:903bbd302a2378f984aef528f76d4c9b1748f318fe1294961c072bdc7f2ffa3e"}, + {file = "greenlet-1.1.2-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:049fe7579230e44daef03a259faa24511d10ebfa44f69411d99e6a184fe68073"}, + {file = "greenlet-1.1.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:dd0b1e9e891f69e7675ba5c92e28b90eaa045f6ab134ffe70b52e948aa175b3c"}, + {file = "greenlet-1.1.2-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:7418b6bfc7fe3331541b84bb2141c9baf1ec7132a7ecd9f375912eca810e714e"}, + {file = "greenlet-1.1.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9d29ca8a77117315101425ec7ec2a47a22ccf59f5593378fc4077ac5b754fce"}, + {file = "greenlet-1.1.2-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:21915eb821a6b3d9d8eefdaf57d6c345b970ad722f856cd71739493ce003ad08"}, + {file = "greenlet-1.1.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eff9d20417ff9dcb0d25e2defc2574d10b491bf2e693b4e491914738b7908168"}, + {file = "greenlet-1.1.2-cp36-cp36m-win32.whl", hash = "sha256:32ca72bbc673adbcfecb935bb3fb1b74e663d10a4b241aaa2f5a75fe1d1f90aa"}, + {file = "greenlet-1.1.2-cp36-cp36m-win_amd64.whl", hash = "sha256:f0214eb2a23b85528310dad848ad2ac58e735612929c8072f6093f3585fd342d"}, + {file = "greenlet-1.1.2-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:b92e29e58bef6d9cfd340c72b04d74c4b4e9f70c9fa7c78b674d1fec18896dc4"}, + {file = "greenlet-1.1.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:fdcec0b8399108577ec290f55551d926d9a1fa6cad45882093a7a07ac5ec147b"}, + {file = "greenlet-1.1.2-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:93f81b134a165cc17123626ab8da2e30c0455441d4ab5576eed73a64c025b25c"}, + {file = "greenlet-1.1.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e12bdc622676ce47ae9abbf455c189e442afdde8818d9da983085df6312e7a1"}, + {file = "greenlet-1.1.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8c790abda465726cfb8bb08bd4ca9a5d0a7bd77c7ac1ca1b839ad823b948ea28"}, + {file = "greenlet-1.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f276df9830dba7a333544bd41070e8175762a7ac20350786b322b714b0e654f5"}, + {file = "greenlet-1.1.2-cp37-cp37m-win32.whl", hash = "sha256:64e6175c2e53195278d7388c454e0b30997573f3f4bd63697f88d855f7a6a1fc"}, + {file = "greenlet-1.1.2-cp37-cp37m-win_amd64.whl", hash = "sha256:b11548073a2213d950c3f671aa88e6f83cda6e2fb97a8b6317b1b5b33d850e06"}, + {file = "greenlet-1.1.2-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:9633b3034d3d901f0a46b7939f8c4d64427dfba6bbc5a36b1a67364cf148a1b0"}, + {file = "greenlet-1.1.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:eb6ea6da4c787111adf40f697b4e58732ee0942b5d3bd8f435277643329ba627"}, + {file = "greenlet-1.1.2-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:f3acda1924472472ddd60c29e5b9db0cec629fbe3c5c5accb74d6d6d14773478"}, + {file = "greenlet-1.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e859fcb4cbe93504ea18008d1df98dee4f7766db66c435e4882ab35cf70cac43"}, + {file = "greenlet-1.1.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:00e44c8afdbe5467e4f7b5851be223be68adb4272f44696ee71fe46b7036a711"}, + {file = "greenlet-1.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec8c433b3ab0419100bd45b47c9c8551248a5aee30ca5e9d399a0b57ac04651b"}, + {file = "greenlet-1.1.2-cp38-cp38-win32.whl", hash = "sha256:288c6a76705dc54fba69fbcb59904ae4ad768b4c768839b8ca5fdadec6dd8cfd"}, + {file = "greenlet-1.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:8d2f1fb53a421b410751887eb4ff21386d119ef9cde3797bf5e7ed49fb51a3b3"}, + {file = "greenlet-1.1.2-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:166eac03e48784a6a6e0e5f041cfebb1ab400b394db188c48b3a84737f505b67"}, + {file = "greenlet-1.1.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:572e1787d1460da79590bf44304abbc0a2da944ea64ec549188fa84d89bba7ab"}, + {file = "greenlet-1.1.2-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:be5f425ff1f5f4b3c1e33ad64ab994eed12fc284a6ea71c5243fd564502ecbe5"}, + {file = "greenlet-1.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1692f7d6bc45e3200844be0dba153612103db241691088626a33ff1f24a0d88"}, + {file = "greenlet-1.1.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7227b47e73dedaa513cdebb98469705ef0d66eb5a1250144468e9c3097d6b59b"}, + {file = "greenlet-1.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ff61ff178250f9bb3cd89752df0f1dd0e27316a8bd1465351652b1b4a4cdfd3"}, + {file = "greenlet-1.1.2-cp39-cp39-win32.whl", hash = "sha256:f70a9e237bb792c7cc7e44c531fd48f5897961701cdaa06cf22fc14965c496cf"}, + {file = "greenlet-1.1.2-cp39-cp39-win_amd64.whl", hash = "sha256:013d61294b6cd8fe3242932c1c5e36e5d1db2c8afb58606c5a67efce62c1f5fd"}, + {file = "greenlet-1.1.2.tar.gz", hash = "sha256:e30f5ea4ae2346e62cedde8794a56858a67b878dd79f7df76a0767e356b1744a"}, +] +gunicorn = [ + {file = "gunicorn-20.1.0-py3-none-any.whl", hash = "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e"}, + {file = "gunicorn-20.1.0.tar.gz", hash = "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8"}, +] +h11 = [ + {file = "h11-0.12.0-py3-none-any.whl", hash = "sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6"}, + {file = "h11-0.12.0.tar.gz", hash = "sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042"}, +] +h2 = [ + {file = "h2-4.1.0-py3-none-any.whl", hash = "sha256:03a46bcf682256c95b5fd9e9a99c1323584c3eec6440d379b9903d709476bc6d"}, + {file = "h2-4.1.0.tar.gz", hash = "sha256:a83aca08fbe7aacb79fec788c9c0bac936343560ed9ec18b82a13a12c28d2abb"}, +] +hpack = [ + {file = "hpack-4.0.0-py3-none-any.whl", hash = "sha256:84a076fad3dc9a9f8063ccb8041ef100867b1878b25ef0ee63847a5d53818a6c"}, + {file = "hpack-4.0.0.tar.gz", hash = "sha256:fc41de0c63e687ebffde81187a948221294896f6bdc0ae2312708df339430095"}, +] +httpcore = [ + {file = "httpcore-0.13.7-py3-none-any.whl", hash = "sha256:369aa481b014cf046f7067fddd67d00560f2f00426e79569d99cb11245134af0"}, + {file = "httpcore-0.13.7.tar.gz", hash = "sha256:036f960468759e633574d7c121afba48af6419615d36ab8ede979f1ad6276fa3"}, +] +httpx = [ + {file = "httpx-0.20.0-py3-none-any.whl", hash = "sha256:33af5aad9bdc82ef1fc89219c1e36f5693bf9cd0ebe330884df563445682c0f8"}, + {file = "httpx-0.20.0.tar.gz", hash = "sha256:09606d630f070d07f9ff28104fbcea429ea0014c1e89ac90b4d8de8286c40e7b"}, +] +hypercorn = [ + {file = "Hypercorn-0.11.2-py3-none-any.whl", hash = "sha256:8007c10f81566920f8ae12c0e26e146f94ca70506da964b5a727ad610aa1d821"}, + {file = "Hypercorn-0.11.2.tar.gz", hash = "sha256:5ba1e719c521080abd698ff5781a2331e34ef50fc1c89a50960538115a896a9a"}, +] +hyperframe = [ + {file = "hyperframe-6.0.1-py3-none-any.whl", hash = "sha256:0ec6bafd80d8ad2195c4f03aacba3a8265e57bc4cff261e802bf39970ed02a15"}, + {file = "hyperframe-6.0.1.tar.gz", hash = "sha256:ae510046231dc8e9ecb1a6586f63d2347bf4c8905914aa84ba585ae85f28a914"}, +] +idna = [ + {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, + {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, +] +importlib-metadata = [ + {file = "importlib_metadata-4.10.1-py3-none-any.whl", hash = "sha256:899e2a40a8c4a1aec681feef45733de8a6c58f3f6a0dbed2eb6574b4387a77b6"}, + {file = "importlib_metadata-4.10.1.tar.gz", hash = "sha256:951f0d8a5b7260e9db5e41d429285b5f451e928479f19d80818878527d36e95e"}, +] +iniconfig = [ + {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, + {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, +] +isort = [ + {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, + {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, +] +itsdangerous = [ + {file = "itsdangerous-2.0.1-py3-none-any.whl", hash = "sha256:5174094b9637652bdb841a3029700391451bd092ba3db90600dea710ba28e97c"}, + {file = "itsdangerous-2.0.1.tar.gz", hash = "sha256:9e724d68fc22902a1435351f84c3fb8623f303fffcc566a4cb952df8c572cff0"}, +] +jinja2 = [ + {file = "Jinja2-3.0.3-py3-none-any.whl", hash = "sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8"}, + {file = "Jinja2-3.0.3.tar.gz", hash = "sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7"}, +] +lxml = [ + {file = "lxml-4.7.1-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:d546431636edb1d6a608b348dd58cc9841b81f4116745857b6cb9f8dadb2725f"}, + {file = "lxml-4.7.1-cp27-cp27m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6308062534323f0d3edb4e702a0e26a76ca9e0e23ff99be5d82750772df32a9e"}, + {file = "lxml-4.7.1-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:f76dbe44e31abf516114f6347a46fa4e7c2e8bceaa4b6f7ee3a0a03c8eba3c17"}, + {file = "lxml-4.7.1-cp27-cp27m-win32.whl", hash = "sha256:d5618d49de6ba63fe4510bdada62d06a8acfca0b4b5c904956c777d28382b419"}, + {file = "lxml-4.7.1-cp27-cp27m-win_amd64.whl", hash = "sha256:9393a05b126a7e187f3e38758255e0edf948a65b22c377414002d488221fdaa2"}, + {file = "lxml-4.7.1-cp27-cp27mu-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:50d3dba341f1e583265c1a808e897b4159208d814ab07530202b6036a4d86da5"}, + {file = "lxml-4.7.1-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:44f552e0da3c8ee3c28e2eb82b0b784200631687fc6a71277ea8ab0828780e7d"}, + {file = "lxml-4.7.1-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:e662c6266e3a275bdcb6bb049edc7cd77d0b0f7e119a53101d367c841afc66dc"}, + {file = "lxml-4.7.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:4c093c571bc3da9ebcd484e001ba18b8452903cd428c0bc926d9b0141bcb710e"}, + {file = "lxml-4.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3e26ad9bc48d610bf6cc76c506b9e5ad9360ed7a945d9be3b5b2c8535a0145e3"}, + {file = "lxml-4.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:a5f623aeaa24f71fce3177d7fee875371345eb9102b355b882243e33e04b7175"}, + {file = "lxml-4.7.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7b5e2acefd33c259c4a2e157119c4373c8773cf6793e225006a1649672ab47a6"}, + {file = "lxml-4.7.1-cp310-cp310-win32.whl", hash = "sha256:67fa5f028e8a01e1d7944a9fb616d1d0510d5d38b0c41708310bd1bc45ae89f6"}, + {file = "lxml-4.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:b1d381f58fcc3e63fcc0ea4f0a38335163883267f77e4c6e22d7a30877218a0e"}, + {file = "lxml-4.7.1-cp35-cp35m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:38d9759733aa04fb1697d717bfabbedb21398046bd07734be7cccc3d19ea8675"}, + {file = "lxml-4.7.1-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:dfd0d464f3d86a1460683cd742306d1138b4e99b79094f4e07e1ca85ee267fe7"}, + {file = "lxml-4.7.1-cp35-cp35m-win32.whl", hash = "sha256:534e946bce61fd162af02bad7bfd2daec1521b71d27238869c23a672146c34a5"}, + {file = "lxml-4.7.1-cp35-cp35m-win_amd64.whl", hash = "sha256:6ec829058785d028f467be70cd195cd0aaf1a763e4d09822584ede8c9eaa4b03"}, + {file = "lxml-4.7.1-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:ade74f5e3a0fd17df5782896ddca7ddb998845a5f7cd4b0be771e1ffc3b9aa5b"}, + {file = "lxml-4.7.1-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:41358bfd24425c1673f184d7c26c6ae91943fe51dfecc3603b5e08187b4bcc55"}, + {file = "lxml-4.7.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:6e56521538f19c4a6690f439fefed551f0b296bd785adc67c1777c348beb943d"}, + {file = "lxml-4.7.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5b0f782f0e03555c55e37d93d7a57454efe7495dab33ba0ccd2dbe25fc50f05d"}, + {file = "lxml-4.7.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:490712b91c65988012e866c411a40cc65b595929ececf75eeb4c79fcc3bc80a6"}, + {file = "lxml-4.7.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:34c22eb8c819d59cec4444d9eebe2e38b95d3dcdafe08965853f8799fd71161d"}, + {file = "lxml-4.7.1-cp36-cp36m-win32.whl", hash = "sha256:2a906c3890da6a63224d551c2967413b8790a6357a80bf6b257c9a7978c2c42d"}, + {file = "lxml-4.7.1-cp36-cp36m-win_amd64.whl", hash = "sha256:36b16fecb10246e599f178dd74f313cbdc9f41c56e77d52100d1361eed24f51a"}, + {file = "lxml-4.7.1-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:a5edc58d631170de90e50adc2cc0248083541affef82f8cd93bea458e4d96db8"}, + {file = "lxml-4.7.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:87c1b0496e8c87ec9db5383e30042357b4839b46c2d556abd49ec770ce2ad868"}, + {file = "lxml-4.7.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:0a5f0e4747f31cff87d1eb32a6000bde1e603107f632ef4666be0dc065889c7a"}, + {file = "lxml-4.7.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:bf6005708fc2e2c89a083f258b97709559a95f9a7a03e59f805dd23c93bc3986"}, + {file = "lxml-4.7.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fc15874816b9320581133ddc2096b644582ab870cf6a6ed63684433e7af4b0d3"}, + {file = "lxml-4.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:0b5e96e25e70917b28a5391c2ed3ffc6156513d3db0e1476c5253fcd50f7a944"}, + {file = "lxml-4.7.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ec9027d0beb785a35aa9951d14e06d48cfbf876d8ff67519403a2522b181943b"}, + {file = "lxml-4.7.1-cp37-cp37m-win32.whl", hash = "sha256:9fbc0dee7ff5f15c4428775e6fa3ed20003140560ffa22b88326669d53b3c0f4"}, + {file = "lxml-4.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:1104a8d47967a414a436007c52f533e933e5d52574cab407b1e49a4e9b5ddbd1"}, + {file = "lxml-4.7.1-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:fc9fb11b65e7bc49f7f75aaba1b700f7181d95d4e151cf2f24d51bfd14410b77"}, + {file = "lxml-4.7.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:317bd63870b4d875af3c1be1b19202de34c32623609ec803b81c99193a788c1e"}, + {file = "lxml-4.7.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:610807cea990fd545b1559466971649e69302c8a9472cefe1d6d48a1dee97440"}, + {file = "lxml-4.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:09b738360af8cb2da275998a8bf79517a71225b0de41ab47339c2beebfff025f"}, + {file = "lxml-4.7.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6a2ab9d089324d77bb81745b01f4aeffe4094306d939e92ba5e71e9a6b99b71e"}, + {file = "lxml-4.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:eed394099a7792834f0cb4a8f615319152b9d801444c1c9e1b1a2c36d2239f9e"}, + {file = "lxml-4.7.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:735e3b4ce9c0616e85f302f109bdc6e425ba1670a73f962c9f6b98a6d51b77c9"}, + {file = "lxml-4.7.1-cp38-cp38-win32.whl", hash = "sha256:772057fba283c095db8c8ecde4634717a35c47061d24f889468dc67190327bcd"}, + {file = "lxml-4.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:13dbb5c7e8f3b6a2cf6e10b0948cacb2f4c9eb05029fe31c60592d08ac63180d"}, + {file = "lxml-4.7.1-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:718d7208b9c2d86aaf0294d9381a6acb0158b5ff0f3515902751404e318e02c9"}, + {file = "lxml-4.7.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:5bee1b0cbfdb87686a7fb0e46f1d8bd34d52d6932c0723a86de1cc532b1aa489"}, + {file = "lxml-4.7.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:e410cf3a2272d0a85526d700782a2fa92c1e304fdcc519ba74ac80b8297adf36"}, + {file = "lxml-4.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:585ea241ee4961dc18a95e2f5581dbc26285fcf330e007459688096f76be8c42"}, + {file = "lxml-4.7.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a555e06566c6dc167fbcd0ad507ff05fd9328502aefc963cb0a0547cfe7f00db"}, + {file = "lxml-4.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:adaab25be351fff0d8a691c4f09153647804d09a87a4e4ea2c3f9fe9e8651851"}, + {file = "lxml-4.7.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:82d16a64236970cb93c8d63ad18c5b9f138a704331e4b916b2737ddfad14e0c4"}, + {file = "lxml-4.7.1-cp39-cp39-win32.whl", hash = "sha256:59e7da839a1238807226f7143c68a479dee09244d1b3cf8c134f2fce777d12d0"}, + {file = "lxml-4.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:a1bbc4efa99ed1310b5009ce7f3a1784698082ed2c1ef3895332f5df9b3b92c2"}, + {file = "lxml-4.7.1-pp37-pypy37_pp73-macosx_10_14_x86_64.whl", hash = "sha256:0607ff0988ad7e173e5ddf7bf55ee65534bd18a5461183c33e8e41a59e89edf4"}, + {file = "lxml-4.7.1-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:6c198bfc169419c09b85ab10cb0f572744e686f40d1e7f4ed09061284fc1303f"}, + {file = "lxml-4.7.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:a58d78653ae422df6837dd4ca0036610b8cb4962b5cfdbd337b7b24de9e5f98a"}, + {file = "lxml-4.7.1-pp38-pypy38_pp73-macosx_10_14_x86_64.whl", hash = "sha256:e18281a7d80d76b66a9f9e68a98cf7e1d153182772400d9a9ce855264d7d0ce7"}, + {file = "lxml-4.7.1-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:8e54945dd2eeb50925500957c7c579df3cd07c29db7810b83cf30495d79af267"}, + {file = "lxml-4.7.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:447d5009d6b5447b2f237395d0018901dcc673f7d9f82ba26c1b9f9c3b444b60"}, + {file = "lxml-4.7.1.tar.gz", hash = "sha256:a1613838aa6b89af4ba10a0f3a972836128801ed008078f8c1244e65958f1b24"}, +] +mako = [ + {file = "Mako-1.1.6-py2.py3-none-any.whl", hash = "sha256:afaf8e515d075b22fad7d7b8b30e4a1c90624ff2f3733a06ec125f5a5f043a57"}, + {file = "Mako-1.1.6.tar.gz", hash = "sha256:4e9e345a41924a954251b95b4b28e14a301145b544901332e658907a7464b6b2"}, +] +markdown = [ + {file = "Markdown-3.3.6-py3-none-any.whl", hash = "sha256:9923332318f843411e9932237530df53162e29dc7a4e2b91e35764583c46c9a3"}, + {file = "Markdown-3.3.6.tar.gz", hash = "sha256:76df8ae32294ec39dcf89340382882dfa12975f87f45c3ed1ecdb1e8cefc7006"}, +] +markupsafe = [ + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, + {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, +] +mccabe = [ + {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, + {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, +] +mysql-connector = [ + {file = "mysql-connector-2.2.9.tar.gz", hash = "sha256:1733e6ce52a049243de3264f1fbc22a852cb35458c4ad739ba88189285efdf32"}, +] +mysqlclient = [ + {file = "mysqlclient-2.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:02c8826e6add9b20f4cb12dcf016485f7b1d6e30356a1204d05431867a1b3947"}, + {file = "mysqlclient-2.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:b62d23c11c516cedb887377c8807628c1c65d57593b57853186a6ee18b0c6a5b"}, + {file = "mysqlclient-2.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:2c8410f54492a3d2488a6a53e2d85b7e016751a1e7d116e7aea9c763f59f5e8c"}, + {file = "mysqlclient-2.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:e6279263d5a9feca3e0edbc2b2a52c057375bf301d47da2089c075ff76331d14"}, + {file = "mysqlclient-2.1.0.tar.gz", hash = "sha256:973235686f1b720536d417bf0a0d39b4ab3d5086b2b6ad5e6752393428c02b12"}, +] +orjson = [ + {file = "orjson-3.6.6-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:e4a7cad6c63306318453980d302c7c0b74c0cc290dd1f433bbd7d31a5af90cf1"}, + {file = "orjson-3.6.6-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:e533941dca4a0530a876de32e54bf2fd3269cdec3751aebde7bfb5b5eba98e74"}, + {file = "orjson-3.6.6-cp310-cp310-manylinux_2_24_aarch64.whl", hash = "sha256:9adf63be386eaa34278967512b83ff8fc4bed036a246391ae236f68d23c47452"}, + {file = "orjson-3.6.6-cp310-cp310-manylinux_2_24_x86_64.whl", hash = "sha256:3b636753ae34d4619b11ea7d664a2f1e87e55e9738e5123e12bcce22acae9d13"}, + {file = "orjson-3.6.6-cp310-none-win_amd64.whl", hash = "sha256:78a10295ed048fd916c6584d6d27c232eae805a43e7c14be56e3745f784f0eb6"}, + {file = "orjson-3.6.6-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:82b4f9fb2af7799b52932a62eac484083f930d5519560d6f64b24d66a368d03f"}, + {file = "orjson-3.6.6-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:a0033d07309cc7d8b8c4bc5d42f0dd4422b53ceb91dee9f4086bb2afa70b7772"}, + {file = "orjson-3.6.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2b321f99473116ab7c7c028377372f7b4adba4029aaca19cd567e83898f55579"}, + {file = "orjson-3.6.6-cp37-cp37m-manylinux_2_24_aarch64.whl", hash = "sha256:b9c98ed94f1688cc11b5c61b8eea39d854a1a2f09f71d8a5af005461b14994ed"}, + {file = "orjson-3.6.6-cp37-cp37m-manylinux_2_24_x86_64.whl", hash = "sha256:00b333a41392bd07a8603c42670547dbedf9b291485d773f90c6470eff435608"}, + {file = "orjson-3.6.6-cp37-none-win_amd64.whl", hash = "sha256:8d4fd3bdee65a81f2b79c50937d4b3c054e1e6bfa3fc72ed018a97c0c7c3d521"}, + {file = "orjson-3.6.6-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:954c9f8547247cd7a8c91094ff39c9fe314b5eaeaec90b7bfb7384a4108f416f"}, + {file = "orjson-3.6.6-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:74e5aed657ed0b91ef05d44d6a26d3e3e12ce4d2d71f75df41a477b05878c4a9"}, + {file = "orjson-3.6.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4008a5130e6e9c33abaa95e939e0e755175da10745740aa6968461b2f16830e2"}, + {file = "orjson-3.6.6-cp38-cp38-manylinux_2_24_aarch64.whl", hash = "sha256:012761d5f3d186deb4f6238f15e9ea7c1aac6deebc8f5b741ba3b4fafe017460"}, + {file = "orjson-3.6.6-cp38-cp38-manylinux_2_24_x86_64.whl", hash = "sha256:b464546718a940b48d095a98df4c04808bfa6c8706fe751fc3f9390bc2f82643"}, + {file = "orjson-3.6.6-cp38-none-win_amd64.whl", hash = "sha256:f10a800f4e5a4aab52076d4628e9e4dab9370bdd9d8ea254ebfde846b653ab25"}, + {file = "orjson-3.6.6-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:8010d2610cfab721725ef14d578c7071e946bbdae63322d8f7b49061cf3fde8d"}, + {file = "orjson-3.6.6-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:8dca67a4855e1e0f9a2ea0386e8db892708522e1171dc0ddf456932288fbae63"}, + {file = "orjson-3.6.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af065d60523139b99bd35b839c7a2d8c5da55df8a8c4402d2eb6cdc07fa7a624"}, + {file = "orjson-3.6.6-cp39-cp39-manylinux_2_24_aarch64.whl", hash = "sha256:fa1f389cc9f766ae0cf7ba3533d5089836b01a5ccb3f8d904297f1fcf3d9dc34"}, + {file = "orjson-3.6.6-cp39-cp39-manylinux_2_24_x86_64.whl", hash = "sha256:ec1221ad78f94d27b162a1d35672b62ef86f27f0e4c2b65051edb480cc86b286"}, + {file = "orjson-3.6.6-cp39-none-win_amd64.whl", hash = "sha256:afed2af55eeda1de6b3f1cbc93431981b19d380fcc04f6ed86e74c1913070304"}, + {file = "orjson-3.6.6.tar.gz", hash = "sha256:55dd988400fa7fbe0e31407c683f5aaab013b5bd967167b8fe058186773c4d6c"}, +] +packaging = [ + {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, + {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, +] +paginate = [ + {file = "paginate-0.5.6.tar.gz", hash = "sha256:5e6007b6a9398177a7e1648d04fdd9f8c9766a1a945bceac82f1929e8c78af2d"}, +] +parse = [ + {file = "parse-1.19.0.tar.gz", hash = "sha256:9ff82852bcb65d139813e2a5197627a94966245c897796760a3a2a8eb66f020b"}, +] +pluggy = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] +poetry-dynamic-versioning = [ + {file = "poetry-dynamic-versioning-0.13.1.tar.gz", hash = "sha256:5c0e7b22560db76812057ef95dadad662ecc63eb270145787eabe73da7c222f9"}, + {file = "poetry_dynamic_versioning-0.13.1-py3-none-any.whl", hash = "sha256:6d79f76436c624653fc06eb9bb54fb4f39b1d54362bc366ad2496855711d3a78"}, +] +posix-ipc = [ + {file = "posix_ipc-1.0.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ccb36ba90efec56a1796f1566eee9561f355a4f45babbc4d18ac46fb2d0b246b"}, + {file = "posix_ipc-1.0.5-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:613bf1afe90e84c06255ec1a6f52c9b24062492de66e5f0dbe068adf67fc3454"}, + {file = "posix_ipc-1.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6095bb4faa2bba8b8d0e833b804e0aedc352d5ed921edeb715010cbcd361e038"}, + {file = "posix_ipc-1.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:621918abe7ec68591c5839b0771d163a9809bc232bf413b9a681bf986ab68d4d"}, + {file = "posix_ipc-1.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f71587ad3a50e82583987f62bfd4ac2343ab6a206d1032e3fc560e8d55fe0346"}, + {file = "posix_ipc-1.0.5.tar.gz", hash = "sha256:6cddb1ce2cf4aae383f2a0079c26c69bee257fe2720f372201ef047f8ceb8b97"}, +] +priority = [ + {file = "priority-2.0.0-py3-none-any.whl", hash = "sha256:6f8eefce5f3ad59baf2c080a664037bb4725cd0a790d53d59ab4059288faf6aa"}, + {file = "priority-2.0.0.tar.gz", hash = "sha256:c965d54f1b8d0d0b19479db3924c7c36cf672dbf2aec92d43fbdaf4492ba18c0"}, +] +prometheus-client = [ + {file = "prometheus_client-0.13.1-py3-none-any.whl", hash = "sha256:357a447fd2359b0a1d2e9b311a0c5778c330cfbe186d880ad5a6b39884652316"}, + {file = "prometheus_client-0.13.1.tar.gz", hash = "sha256:ada41b891b79fca5638bd5cfe149efa86512eaa55987893becd2c6d8d0a5dfc5"}, +] +prometheus-fastapi-instrumentator = [ + {file = "prometheus-fastapi-instrumentator-5.7.1.tar.gz", hash = "sha256:5371f1b494e2b00017a02898d854119b4929025d1a203670b07b3f42dd0b5526"}, + {file = "prometheus_fastapi_instrumentator-5.7.1-py3-none-any.whl", hash = "sha256:da40ea0df14b0e95d584769747fba777522a8df6a8c47cec2edf798f1fff49b5"}, +] +protobuf = [ + {file = "protobuf-3.19.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f51d5a9f137f7a2cec2d326a74b6e3fc79d635d69ffe1b036d39fc7d75430d37"}, + {file = "protobuf-3.19.4-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:09297b7972da685ce269ec52af761743714996b4381c085205914c41fcab59fb"}, + {file = "protobuf-3.19.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:072fbc78d705d3edc7ccac58a62c4c8e0cec856987da7df8aca86e647be4e35c"}, + {file = "protobuf-3.19.4-cp310-cp310-win32.whl", hash = "sha256:7bb03bc2873a2842e5ebb4801f5c7ff1bfbdf426f85d0172f7644fcda0671ae0"}, + {file = "protobuf-3.19.4-cp310-cp310-win_amd64.whl", hash = "sha256:f358aa33e03b7a84e0d91270a4d4d8f5df6921abe99a377828839e8ed0c04e07"}, + {file = "protobuf-3.19.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:1c91ef4110fdd2c590effb5dca8fdbdcb3bf563eece99287019c4204f53d81a4"}, + {file = "protobuf-3.19.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c438268eebb8cf039552897d78f402d734a404f1360592fef55297285f7f953f"}, + {file = "protobuf-3.19.4-cp36-cp36m-win32.whl", hash = "sha256:835a9c949dc193953c319603b2961c5c8f4327957fe23d914ca80d982665e8ee"}, + {file = "protobuf-3.19.4-cp36-cp36m-win_amd64.whl", hash = "sha256:4276cdec4447bd5015453e41bdc0c0c1234eda08420b7c9a18b8d647add51e4b"}, + {file = "protobuf-3.19.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6cbc312be5e71869d9d5ea25147cdf652a6781cf4d906497ca7690b7b9b5df13"}, + {file = "protobuf-3.19.4-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:54a1473077f3b616779ce31f477351a45b4fef8c9fd7892d6d87e287a38df368"}, + {file = "protobuf-3.19.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:435bb78b37fc386f9275a7035fe4fb1364484e38980d0dd91bc834a02c5ec909"}, + {file = "protobuf-3.19.4-cp37-cp37m-win32.whl", hash = "sha256:16f519de1313f1b7139ad70772e7db515b1420d208cb16c6d7858ea989fc64a9"}, + {file = "protobuf-3.19.4-cp37-cp37m-win_amd64.whl", hash = "sha256:cdc076c03381f5c1d9bb1abdcc5503d9ca8b53cf0a9d31a9f6754ec9e6c8af0f"}, + {file = "protobuf-3.19.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:69da7d39e39942bd52848438462674c463e23963a1fdaa84d88df7fbd7e749b2"}, + {file = "protobuf-3.19.4-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:48ed3877fa43e22bcacc852ca76d4775741f9709dd9575881a373bd3e85e54b2"}, + {file = "protobuf-3.19.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd95d1dfb9c4f4563e6093a9aa19d9c186bf98fa54da5252531cc0d3a07977e7"}, + {file = "protobuf-3.19.4-cp38-cp38-win32.whl", hash = "sha256:b38057450a0c566cbd04890a40edf916db890f2818e8682221611d78dc32ae26"}, + {file = "protobuf-3.19.4-cp38-cp38-win_amd64.whl", hash = "sha256:7ca7da9c339ca8890d66958f5462beabd611eca6c958691a8fe6eccbd1eb0c6e"}, + {file = "protobuf-3.19.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:36cecbabbda242915529b8ff364f2263cd4de7c46bbe361418b5ed859677ba58"}, + {file = "protobuf-3.19.4-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:c1068287025f8ea025103e37d62ffd63fec8e9e636246b89c341aeda8a67c934"}, + {file = "protobuf-3.19.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:96bd766831596d6014ca88d86dc8fe0fb2e428c0b02432fd9db3943202bf8c5e"}, + {file = "protobuf-3.19.4-cp39-cp39-win32.whl", hash = "sha256:84123274d982b9e248a143dadd1b9815049f4477dc783bf84efe6250eb4b836a"}, + {file = "protobuf-3.19.4-cp39-cp39-win_amd64.whl", hash = "sha256:3112b58aac3bac9c8be2b60a9daf6b558ca3f7681c130dcdd788ade7c9ffbdca"}, + {file = "protobuf-3.19.4-py2.py3-none-any.whl", hash = "sha256:8961c3a78ebfcd000920c9060a262f082f29838682b1f7201889300c1fbe0616"}, + {file = "protobuf-3.19.4.tar.gz", hash = "sha256:9df0c10adf3e83015ced42a9a7bd64e13d06c4cf45c340d2c63020ea04499d0a"}, +] +py = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] +pyalpm = [ + {file = "pyalpm-0.10.6.tar.gz", hash = "sha256:99e6ec73b8c46bb12466013f228f831ee0d18e8ab664b91a01c2a3c40de07c7f"}, +] +pycodestyle = [ + {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, + {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, +] +pycparser = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] +pydantic = [ + {file = "pydantic-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:cb23bcc093697cdea2708baae4f9ba0e972960a835af22560f6ae4e7e47d33f5"}, + {file = "pydantic-1.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1d5278bd9f0eee04a44c712982343103bba63507480bfd2fc2790fa70cd64cf4"}, + {file = "pydantic-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab624700dc145aa809e6f3ec93fb8e7d0f99d9023b713f6a953637429b437d37"}, + {file = "pydantic-1.9.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c8d7da6f1c1049eefb718d43d99ad73100c958a5367d30b9321b092771e96c25"}, + {file = "pydantic-1.9.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:3c3b035103bd4e2e4a28da9da7ef2fa47b00ee4a9cf4f1a735214c1bcd05e0f6"}, + {file = "pydantic-1.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:3011b975c973819883842c5ab925a4e4298dffccf7782c55ec3580ed17dc464c"}, + {file = "pydantic-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:086254884d10d3ba16da0588604ffdc5aab3f7f09557b998373e885c690dd398"}, + {file = "pydantic-1.9.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:0fe476769acaa7fcddd17cadd172b156b53546ec3614a4d880e5d29ea5fbce65"}, + {file = "pydantic-1.9.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8e9dcf1ac499679aceedac7e7ca6d8641f0193c591a2d090282aaf8e9445a46"}, + {file = "pydantic-1.9.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1e4c28f30e767fd07f2ddc6f74f41f034d1dd6bc526cd59e63a82fe8bb9ef4c"}, + {file = "pydantic-1.9.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:c86229333cabaaa8c51cf971496f10318c4734cf7b641f08af0a6fbf17ca3054"}, + {file = "pydantic-1.9.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:c0727bda6e38144d464daec31dff936a82917f431d9c39c39c60a26567eae3ed"}, + {file = "pydantic-1.9.0-cp36-cp36m-win_amd64.whl", hash = "sha256:dee5ef83a76ac31ab0c78c10bd7d5437bfdb6358c95b91f1ba7ff7b76f9996a1"}, + {file = "pydantic-1.9.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d9c9bdb3af48e242838f9f6e6127de9be7063aad17b32215ccc36a09c5cf1070"}, + {file = "pydantic-1.9.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ee7e3209db1e468341ef41fe263eb655f67f5c5a76c924044314e139a1103a2"}, + {file = "pydantic-1.9.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0b6037175234850ffd094ca77bf60fb54b08b5b22bc85865331dd3bda7a02fa1"}, + {file = "pydantic-1.9.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b2571db88c636d862b35090ccf92bf24004393f85c8870a37f42d9f23d13e032"}, + {file = "pydantic-1.9.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8b5ac0f1c83d31b324e57a273da59197c83d1bb18171e512908fe5dc7278a1d6"}, + {file = "pydantic-1.9.0-cp37-cp37m-win_amd64.whl", hash = "sha256:bbbc94d0c94dd80b3340fc4f04fd4d701f4b038ebad72c39693c794fd3bc2d9d"}, + {file = "pydantic-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e0896200b6a40197405af18828da49f067c2fa1f821491bc8f5bde241ef3f7d7"}, + {file = "pydantic-1.9.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bdfdadb5994b44bd5579cfa7c9b0e1b0e540c952d56f627eb227851cda9db77"}, + {file = "pydantic-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:574936363cd4b9eed8acdd6b80d0143162f2eb654d96cb3a8ee91d3e64bf4cf9"}, + {file = "pydantic-1.9.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c556695b699f648c58373b542534308922c46a1cda06ea47bc9ca45ef5b39ae6"}, + {file = "pydantic-1.9.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f947352c3434e8b937e3aa8f96f47bdfe6d92779e44bb3f41e4c213ba6a32145"}, + {file = "pydantic-1.9.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5e48ef4a8b8c066c4a31409d91d7ca372a774d0212da2787c0d32f8045b1e034"}, + {file = "pydantic-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:96f240bce182ca7fe045c76bcebfa0b0534a1bf402ed05914a6f1dadff91877f"}, + {file = "pydantic-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:815ddebb2792efd4bba5488bc8fde09c29e8ca3227d27cf1c6990fc830fd292b"}, + {file = "pydantic-1.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6c5b77947b9e85a54848343928b597b4f74fc364b70926b3c4441ff52620640c"}, + {file = "pydantic-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c68c3bc88dbda2a6805e9a142ce84782d3930f8fdd9655430d8576315ad97ce"}, + {file = "pydantic-1.9.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a79330f8571faf71bf93667d3ee054609816f10a259a109a0738dac983b23c3"}, + {file = "pydantic-1.9.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f5a64b64ddf4c99fe201ac2724daada8595ada0d102ab96d019c1555c2d6441d"}, + {file = "pydantic-1.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a733965f1a2b4090a5238d40d983dcd78f3ecea221c7af1497b845a9709c1721"}, + {file = "pydantic-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:2cc6a4cb8a118ffec2ca5fcb47afbacb4f16d0ab8b7350ddea5e8ef7bcc53a16"}, + {file = "pydantic-1.9.0-py3-none-any.whl", hash = "sha256:085ca1de245782e9b46cefcf99deecc67d418737a1fd3f6a4f511344b613a5b3"}, + {file = "pydantic-1.9.0.tar.gz", hash = "sha256:742645059757a56ecd886faf4ed2441b9c0cd406079c2b4bee51bcc3fbcd510a"}, +] +pyflakes = [ + {file = "pyflakes-2.4.0-py2.py3-none-any.whl", hash = "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e"}, + {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, +] +pygit2 = [ + {file = "pygit2-1.7.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a4a9a031bb0d2c5cf964da1f6d7a193416a97664655ec43ec349d3609bbde154"}, + {file = "pygit2-1.7.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:afcfb8ba97cfedcb8f890ff1e74c4d63755234cca1ca22c2a969e91b8059ae3e"}, + {file = "pygit2-1.7.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9f87498ce717302a7525dad1ee604badc85bdff7bd453473d601077ac58e7cae"}, + {file = "pygit2-1.7.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2355cf24719a35542a88075988c8e11cd155aa375a1f12d62b980986da992eb4"}, + {file = "pygit2-1.7.2-cp310-cp310-win32.whl", hash = "sha256:0d72bd05dd3cf514ea2e2df32a2d361f6f29da7d5f02cf0980ea149f49cdfb37"}, + {file = "pygit2-1.7.2-cp310-cp310-win_amd64.whl", hash = "sha256:1b7ff5b656db280ca5d31ecdb17709ed7eaf4e9f419b2fa66f7ff92d8234f621"}, + {file = "pygit2-1.7.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6aa018c101056c2a8e1fb6467c10281afa088b3b7bc7c17defb404f66039669a"}, + {file = "pygit2-1.7.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a27f8cab6dbef912ccdd690b97948dbf978cffc2ef96ee01b1a8944bfb713f0b"}, + {file = "pygit2-1.7.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c538a0234baa091a02342895d31e5b7c29d85ada44a0b9b4a5fdf78b5607cd48"}, + {file = "pygit2-1.7.2-cp37-cp37m-win32.whl", hash = "sha256:b15579b69381ba41199f5eb7fc85f153105d535c91b8da0321aaa14fec19f09c"}, + {file = "pygit2-1.7.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6c2ee00048862e193b2b88267f880632735f53db0f2c7f9ebebb21a43d22e58b"}, + {file = "pygit2-1.7.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:8c24f3413522c970ae46e79b645ac0978a5be98863a6c6619e8f710bb137e1cb"}, + {file = "pygit2-1.7.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d42a7cc4b53cc369b82266c7257fe1808ec0e30c34f1796a0b0fa12a0db9ebe"}, + {file = "pygit2-1.7.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b1694ad8b4702e9e83a79a97bf3f1b44674057ae9d40bc7eb92e4b4baf79d94"}, + {file = "pygit2-1.7.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8a382db82ad4ba3109e74c7b82d6c6c1e451200ee379bad8a17936027c65ea98"}, + {file = "pygit2-1.7.2-cp38-cp38-win32.whl", hash = "sha256:6c168efd7e3bdaeeccfa5ccbe2718107a1fe65cda959586f88a73228217a8783"}, + {file = "pygit2-1.7.2-cp38-cp38-win_amd64.whl", hash = "sha256:041e34f7efd96c7edbea2f478704756fc189082561611c88bc95cf2d085923b5"}, + {file = "pygit2-1.7.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ef34b881da55b6702087575ea48a90a08e1077a7f64faa909d9840e16f36c63b"}, + {file = "pygit2-1.7.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0e6368a96058cf619ad574de2b4575f58d363f3f6d4de8e172e1e5d10e1fad36"}, + {file = "pygit2-1.7.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0748b413966da9b3d3ca8a0a79c63f6581a89b883d2ba64355bbfdb250f2e066"}, + {file = "pygit2-1.7.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d34954c21f109f176d8104b253fc8ce2ca17efb43cfe228d6530c200f362b83"}, + {file = "pygit2-1.7.2-cp39-cp39-win32.whl", hash = "sha256:32979cb98ffd183ed0458c519e6615deeb6a8cc1252223396eee8f526f09989f"}, + {file = "pygit2-1.7.2-cp39-cp39-win_amd64.whl", hash = "sha256:56d55452dc3eca844d92503d755c8e11699b7ab3b845b81cf365f85d6385d7e0"}, + {file = "pygit2-1.7.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:409c76dea47c2c678295c42f55798da7a0a9adcc6394fe75c061864254bafeef"}, + {file = "pygit2-1.7.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be038fecd27a9a7046cd45b4a6e847955dab2d6e2352ff41ab3b55f700aa0f3d"}, + {file = "pygit2-1.7.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3e91afd629b90b528b756ca2a0fbd5bf8df2cdc08ccd5ab144fbfe69bfc587d"}, + {file = "pygit2-1.7.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:17b06a1ecc16b90fa652cf5cf9698dfb16a87501b76f7001e1d4934a38a49737"}, + {file = "pygit2-1.7.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fe7cdd56d0e5a89ed7754d1aedc6516349f16072225ccfc7b9349ab6448a052"}, + {file = "pygit2-1.7.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b2a766b5a988ab373a040d1769e0e1df4618a9f8f33464746b9b2a3c92576df4"}, + {file = "pygit2-1.7.2.tar.gz", hash = "sha256:70a4536a35452c31f823b59b6fdb665aa3778a43b73ccda3a4f79fa9962ad2bb"}, +] +pyparsing = [ + {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, + {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, +] +pytest = [ + {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, + {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, +] +pytest-asyncio = [ + {file = "pytest-asyncio-0.16.0.tar.gz", hash = "sha256:7496c5977ce88c34379df64a66459fe395cd05543f0a2f837016e7144391fcfb"}, + {file = "pytest_asyncio-0.16.0-py3-none-any.whl", hash = "sha256:5f2a21273c47b331ae6aa5b36087047b4899e40f03f18397c0e65fa5cca54e9b"}, +] +pytest-cov = [ + {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"}, + {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"}, +] +pytest-forked = [ + {file = "pytest-forked-1.4.0.tar.gz", hash = "sha256:8b67587c8f98cbbadfdd804539ed5455b6ed03802203485dd2f53c1422d7440e"}, + {file = "pytest_forked-1.4.0-py3-none-any.whl", hash = "sha256:bbbb6717efc886b9d64537b41fb1497cfaf3c9601276be8da2cccfea5a3c8ad8"}, +] +pytest-tap = [ + {file = "pytest-tap-3.3.tar.gz", hash = "sha256:5f0919a147cf0396b2f10d64d365a0bf8062e06543e93c675c9d37f5605e983c"}, + {file = "pytest_tap-3.3-py3-none-any.whl", hash = "sha256:4fbbc0e090c2e94f6199bee4e4f68ab3c5e176b37a72a589ad84e0f72a2fce55"}, +] +pytest-xdist = [ + {file = "pytest-xdist-2.5.0.tar.gz", hash = "sha256:4580deca3ff04ddb2ac53eba39d76cb5dd5edeac050cb6fbc768b0dd712b4edf"}, + {file = "pytest_xdist-2.5.0-py3-none-any.whl", hash = "sha256:6fe5c74fec98906deb8f2d2b616b5c782022744978e7bd4695d39c8f42d0ce65"}, +] +python-dateutil = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] +python-multipart = [ + {file = "python-multipart-0.0.5.tar.gz", hash = "sha256:f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43"}, +] +redis = [ + {file = "redis-3.5.3-py2.py3-none-any.whl", hash = "sha256:432b788c4530cfe16d8d943a09d40ca6c16149727e4afe8c2c9d5580c59d9f24"}, + {file = "redis-3.5.3.tar.gz", hash = "sha256:0e7e0cfca8660dea8b7d5cd8c4f6c5e29e11f31158c0b0ae91a397f00e5a05a2"}, +] +requests = [ + {file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"}, + {file = "requests-2.27.1.tar.gz", hash = "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"}, +] +rfc3986 = [ + {file = "rfc3986-1.5.0-py2.py3-none-any.whl", hash = "sha256:a86d6e1f5b1dc238b218b012df0aa79409667bb209e58da56d0b94704e712a97"}, + {file = "rfc3986-1.5.0.tar.gz", hash = "sha256:270aaf10d87d0d4e095063c65bf3ddbc6ee3d0b226328ce21e036f946e421835"}, +] +six = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] +sniffio = [ + {file = "sniffio-1.2.0-py3-none-any.whl", hash = "sha256:471b71698eac1c2112a40ce2752bb2f4a4814c22a54a3eed3676bc0f5ca9f663"}, + {file = "sniffio-1.2.0.tar.gz", hash = "sha256:c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de"}, +] +sortedcontainers = [ + {file = "sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0"}, + {file = "sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88"}, +] +sqlalchemy = [ + {file = "SQLAlchemy-1.4.31-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:c3abc34fed19fdeaead0ced8cf56dd121f08198008c033596aa6aae7cc58f59f"}, + {file = "SQLAlchemy-1.4.31-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:8d0949b11681380b4a50ac3cd075e4816afe9fa4a8c8ae006c1ca26f0fa40ad8"}, + {file = "SQLAlchemy-1.4.31-cp27-cp27m-win32.whl", hash = "sha256:f3b7ec97e68b68cb1f9ddb82eda17b418f19a034fa8380a0ac04e8fe01532875"}, + {file = "SQLAlchemy-1.4.31-cp27-cp27m-win_amd64.whl", hash = "sha256:81f2dd355b57770fdf292b54f3e0a9823ec27a543f947fa2eb4ec0df44f35f0d"}, + {file = "SQLAlchemy-1.4.31-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:4ad31cec8b49fd718470328ad9711f4dc703507d434fd45461096da0a7135ee0"}, + {file = "SQLAlchemy-1.4.31-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:05fa14f279d43df68964ad066f653193187909950aa0163320b728edfc400167"}, + {file = "SQLAlchemy-1.4.31-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dccff41478050e823271642837b904d5f9bda3f5cf7d371ce163f00a694118d6"}, + {file = "SQLAlchemy-1.4.31-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:57205844f246bab9b666a32f59b046add8995c665d9ecb2b7b837b087df90639"}, + {file = "SQLAlchemy-1.4.31-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea8210090a816d48a4291a47462bac750e3bc5c2442e6d64f7b8137a7c3f9ac5"}, + {file = "SQLAlchemy-1.4.31-cp310-cp310-win32.whl", hash = "sha256:2e216c13ecc7fcdcbb86bb3225425b3ed338e43a8810c7089ddb472676124b9b"}, + {file = "SQLAlchemy-1.4.31-cp310-cp310-win_amd64.whl", hash = "sha256:e3a86b59b6227ef72ffc10d4b23f0fe994bef64d4667eab4fb8cd43de4223bec"}, + {file = "SQLAlchemy-1.4.31-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:2fd4d3ca64c41dae31228b80556ab55b6489275fb204827f6560b65f95692cf3"}, + {file = "SQLAlchemy-1.4.31-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f22c040d196f841168b1456e77c30a18a3dc16b336ddbc5a24ce01ab4e95ae0"}, + {file = "SQLAlchemy-1.4.31-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c0c7171aa5a57e522a04a31b84798b6c926234cb559c0939840c3235cf068813"}, + {file = "SQLAlchemy-1.4.31-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d046a9aeba9bc53e88a41e58beb72b6205abb9a20f6c136161adf9128e589db5"}, + {file = "SQLAlchemy-1.4.31-cp36-cp36m-win32.whl", hash = "sha256:d86132922531f0dc5a4f424c7580a472a924dd737602638e704841c9cb24aea2"}, + {file = "SQLAlchemy-1.4.31-cp36-cp36m-win_amd64.whl", hash = "sha256:ca68c52e3cae491ace2bf39b35fef4ce26c192fd70b4cd90f040d419f70893b5"}, + {file = "SQLAlchemy-1.4.31-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:cf2cd387409b12d0a8b801610d6336ee7d24043b6dd965950eaec09b73e7262f"}, + {file = "SQLAlchemy-1.4.31-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb4b15fb1f0aafa65cbdc62d3c2078bea1ceecbfccc9a1f23a2113c9ac1191fa"}, + {file = "SQLAlchemy-1.4.31-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c317ddd7c586af350a6aef22b891e84b16bff1a27886ed5b30f15c1ed59caeaa"}, + {file = "SQLAlchemy-1.4.31-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c7ed6c69debaf6198fadb1c16ae1253a29a7670bbf0646f92582eb465a0b999"}, + {file = "SQLAlchemy-1.4.31-cp37-cp37m-win32.whl", hash = "sha256:6a01ec49ca54ce03bc14e10de55dfc64187a2194b3b0e5ac0fdbe9b24767e79e"}, + {file = "SQLAlchemy-1.4.31-cp37-cp37m-win_amd64.whl", hash = "sha256:330eb45395874cc7787214fdd4489e2afb931bc49e0a7a8f9cd56d6e9c5b1639"}, + {file = "SQLAlchemy-1.4.31-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:5e9c7b3567edbc2183607f7d9f3e7e89355b8f8984eec4d2cd1e1513c8f7b43f"}, + {file = "SQLAlchemy-1.4.31-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:de85c26a5a1c72e695ab0454e92f60213b4459b8d7c502e0be7a6369690eeb1a"}, + {file = "SQLAlchemy-1.4.31-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:975f5c0793892c634c4920057da0de3a48bbbbd0a5c86f5fcf2f2fedf41b76da"}, + {file = "SQLAlchemy-1.4.31-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5c20c8415173b119762b6110af64448adccd4d11f273fb9f718a9865b88a99c"}, + {file = "SQLAlchemy-1.4.31-cp38-cp38-win32.whl", hash = "sha256:b35dca159c1c9fa8a5f9005e42133eed82705bf8e243da371a5e5826440e65ca"}, + {file = "SQLAlchemy-1.4.31-cp38-cp38-win_amd64.whl", hash = "sha256:b7b20c88873675903d6438d8b33fba027997193e274b9367421e610d9da76c08"}, + {file = "SQLAlchemy-1.4.31-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:85e4c244e1de056d48dae466e9baf9437980c19fcde493e0db1a0a986e6d75b4"}, + {file = "SQLAlchemy-1.4.31-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e79e73d5ee24196d3057340e356e6254af4d10e1fc22d3207ea8342fc5ffb977"}, + {file = "SQLAlchemy-1.4.31-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:15a03261aa1e68f208e71ae3cd845b00063d242cbf8c87348a0c2c0fc6e1f2ac"}, + {file = "SQLAlchemy-1.4.31-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ddc5e5ccc0160e7ad190e5c61eb57560f38559e22586955f205e537cda26034"}, + {file = "SQLAlchemy-1.4.31-cp39-cp39-win32.whl", hash = "sha256:289465162b1fa1e7a982f8abe59d26a8331211cad4942e8031d2b7db1f75e649"}, + {file = "SQLAlchemy-1.4.31-cp39-cp39-win_amd64.whl", hash = "sha256:9e4fb2895b83993831ba2401b6404de953fdbfa9d7d4fa6a4756294a83bbc94f"}, + {file = "SQLAlchemy-1.4.31.tar.gz", hash = "sha256:582b59d1e5780a447aada22b461e50b404a9dc05768da1d87368ad8190468418"}, +] +srcinfo = [ + {file = "srcinfo-0.0.8-py3-none-any.whl", hash = "sha256:0922ee4302b927d7ddea74c47e539b226a0a7738dc89f95b66404a28d07f3f6b"}, + {file = "srcinfo-0.0.8.tar.gz", hash = "sha256:5ac610cf8b15d4b0a0374bd1f7ad301675c2938f0414addf3ef7d7e3fcaf5c65"}, +] +starlette = [ + {file = "starlette-0.17.1-py3-none-any.whl", hash = "sha256:26a18cbda5e6b651c964c12c88b36d9898481cd428ed6e063f5f29c418f73050"}, + {file = "starlette-0.17.1.tar.gz", hash = "sha256:57eab3cc975a28af62f6faec94d355a410634940f10b30d68d31cb5ec1b44ae8"}, +] +"tap.py" = [ + {file = "tap.py-3.1-py3-none-any.whl", hash = "sha256:928c852f3361707b796c93730cc5402c6378660b161114461066acf53d65bf5d"}, + {file = "tap.py-3.1.tar.gz", hash = "sha256:3c0cd45212ad5a25b35445964e2517efa000a118a1bfc3437dae828892eaf1e1"}, +] +toml = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] +tomli = [ + {file = "tomli-2.0.0-py3-none-any.whl", hash = "sha256:b5bde28da1fed24b9bd1d4d2b8cba62300bfb4ec9a6187a957e8ddb9434c5224"}, + {file = "tomli-2.0.0.tar.gz", hash = "sha256:c292c34f58502a1eb2bbb9f5bbc9a5ebc37bee10ffb8c2d6bbdfa8eb13cc14e1"}, +] +tomlkit = [ + {file = "tomlkit-0.9.0-py3-none-any.whl", hash = "sha256:c1b0fc73abd4f1e77c29ea4061ca0f2e11cbfb77342e17df3d3fdd496fc3f899"}, + {file = "tomlkit-0.9.0.tar.gz", hash = "sha256:5a83672c565f78f5fc8f1e44e5f2726446cc6b765113efd21d03e9331747d9ab"}, +] +typing-extensions = [ + {file = "typing_extensions-4.0.1-py3-none-any.whl", hash = "sha256:7f001e5ac290a0c0401508864c7ec868be4e701886d5b573a9528ed3973d9d3b"}, + {file = "typing_extensions-4.0.1.tar.gz", hash = "sha256:4ca091dea149f945ec56afb48dae714f21e8692ef22a395223bcd328961b6a0e"}, +] +urllib3 = [ + {file = "urllib3-1.26.8-py2.py3-none-any.whl", hash = "sha256:000ca7f471a233c2251c6c7023ee85305721bfdf18621ebff4fd17a8653427ed"}, + {file = "urllib3-1.26.8.tar.gz", hash = "sha256:0e7c33d9a63e7ddfcb86780aac87befc2fbddf46c58dbb487e0855f7ceec283c"}, +] +uvicorn = [ + {file = "uvicorn-0.15.0-py3-none-any.whl", hash = "sha256:17f898c64c71a2640514d4089da2689e5db1ce5d4086c2d53699bf99513421c1"}, + {file = "uvicorn-0.15.0.tar.gz", hash = "sha256:d9a3c0dd1ca86728d3e235182683b4cf94cd53a867c288eaeca80ee781b2caff"}, +] +webencodings = [ + {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, + {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, +] +werkzeug = [ + {file = "Werkzeug-2.0.2-py3-none-any.whl", hash = "sha256:63d3dc1cf60e7b7e35e97fa9861f7397283b75d765afcaefd993d6046899de8f"}, + {file = "Werkzeug-2.0.2.tar.gz", hash = "sha256:aa2bb6fc8dee8d6c504c0ac1e7f5f7dc5810a9903e793b6f715a9f015bdadb9a"}, +] +wsproto = [ + {file = "wsproto-1.0.0-py3-none-any.whl", hash = "sha256:d8345d1808dd599b5ffb352c25a367adb6157e664e140dbecba3f9bc007edb9f"}, + {file = "wsproto-1.0.0.tar.gz", hash = "sha256:868776f8456997ad0d9720f7322b746bbe9193751b5b290b7f924659377c8c38"}, +] +zipp = [ + {file = "zipp-3.7.0-py3-none-any.whl", hash = "sha256:b47250dd24f92b7dd6a0a8fc5244da14608f3ca90a5efcd37a3b1642fac9a375"}, + {file = "zipp-3.7.0.tar.gz", hash = "sha256:9f50f446828eb9d45b267433fd3e9da8d801f614129124863f9c51ebceafb87d"}, +] diff --git a/pyproject.toml b/pyproject.toml index d2e82441..b5da9913 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,3 @@ -[tool.black] -line-length = 88 - -[tool.isort] -profile = "black" -combine_as_imports = true - - # Poetry build configuration for the aurweb project. # # Dependencies: @@ -16,7 +8,7 @@ combine_as_imports = true # [tool.poetry] name = "aurweb" -version = "v6.2.16" +version = "v6.0.19" license = "GPL-2.0-only" description = "Source code for the Arch User Repository's website" homepage = "https://aur.archlinux.org" @@ -29,8 +21,7 @@ authors = [ "Kevin Morris " ] maintainers = [ - "Leonidas Spyropoulos ", - "Mario Oenning " + "Eli Schwartz " ] packages = [ { include = "aurweb" } @@ -52,67 +43,61 @@ build-backend = "poetry.masonry.api" "Request Mailing List" = "https://lists.archlinux.org/listinfo/aur-requests" [tool.poetry.dependencies] -python = ">=3.10,<3.14" +python = ">=3.9,<3.11" # poetry-dynamic-versioning is used to produce tool.poetry.version # based on git tags. +poetry-dynamic-versioning = "^0.13.1" # General -aiofiles = "^24.0.0" -asgiref = "^3.8.1" -bcrypt = "^4.1.2" -bleach = "^6.1.0" -email-validator = "^2.1.1" -fakeredis = "^2.21.3" -feedgen = "^1.0.0" -httpx = "^0.27.0" -itsdangerous = "^2.1.2" -lxml = "^5.2.1" -orjson = "^3.10.0" -pygit2 = "^1.17.0" -python-multipart = "0.0.19" -redis = "^5.0.3" -requests = "^2.31.0" +aiofiles = "^0.7.0" +asgiref = "^3.4.1" +bcrypt = "^3.2.0" +bleach = "^4.1.0" +email-validator = "1.1.3" +fakeredis = "^1.6.1" +feedgen = "^0.9.0" +httpx = "^0.20.0" +itsdangerous = "^2.0.1" +lxml = "^4.6.3" +orjson = "^3.6.4" +protobuf = "^3.19.0" +pygit2 = "^1.7.0" +python-multipart = "^0.0.5" +redis = "^3.5.3" +requests = "^2.26.0" paginate = "^0.5.6" # SQL -alembic = "^1.13.1" -mysqlclient = "^2.2.3" -Authlib = "^1.3.0" -Jinja2 = "^3.1.3" -Markdown = "^3.6" -Werkzeug = "^3.0.2" -SQLAlchemy = "^1.4.52" -greenlet = "3.1.1" # Explicitly add greenlet (dependency of SQLAlchemy) for python 3.13 support +alembic = "^1.7.4" +mysqlclient = "^2.0.3" +Authlib = "^0.15.5" +Jinja2 = "^3.0.2" +Markdown = "^3.3.6" +Werkzeug = "^2.0.2" +SQLAlchemy = "^1.4.26" # ASGI -uvicorn = "^0.30.0" -gunicorn = "^22.0.0" -Hypercorn = "^0.17.0" -pytest-xdist = "^3.5.0" -filelock = "^3.13.3" -posix-ipc = "^1.1.1" +uvicorn = "^0.15.0" +gunicorn = "^20.1.0" +Hypercorn = "^0.11.2" +mysql-connector = "^2.2.9" +prometheus-fastapi-instrumentator = "^5.7.1" +pytest-xdist = "^2.4.0" +filelock = "^3.3.2" +posix-ipc = "^1.0.5" pyalpm = "^0.10.6" -fastapi = "^0.112.0" -srcinfo = "^0.1.2" -tomlkit = "^0.13.0" - -# Tracing -prometheus-fastapi-instrumentator = "^7.0.0" -opentelemetry-api = "^1.26.0" -opentelemetry-sdk = "^1.26.0" -opentelemetry-exporter-otlp-proto-http = "^1.26.0" -opentelemetry-instrumentation-fastapi = "^0.47b0" -opentelemetry-instrumentation-redis = "^0.47b0" -opentelemetry-instrumentation-sqlalchemy = "^0.47b0" +fastapi = "^0.71.0" +srcinfo = "^0.0.8" [tool.poetry.dev-dependencies] -coverage = "^7.4.4" -pytest = "^8.1.1" -pytest-asyncio = "^0.23.0" -pytest-cov = "^5.0.0" -pytest-tap = "^3.4" -watchfiles = "^1.0.4" +flake8 = "^4.0.1" +isort = "^5.9.3" +coverage = "^6.0.2" +pytest = "^6.2.5" +pytest-asyncio = "^0.16.0" +pytest-cov = "^3.0.0" +pytest-tap = "^3.2" [tool.poetry.scripts] aurweb-git-auth = "aurweb.git.auth:main" @@ -124,8 +109,7 @@ aurweb-notify = "aurweb.scripts.notify:main" aurweb-pkgmaint = "aurweb.scripts.pkgmaint:main" aurweb-popupdate = "aurweb.scripts.popupdate:main" aurweb-rendercomment = "aurweb.scripts.rendercomment:main" -aurweb-votereminder = "aurweb.scripts.votereminder:main" +aurweb-tuvotereminder = "aurweb.scripts.tuvotereminder:main" aurweb-usermaint = "aurweb.scripts.usermaint:main" aurweb-config = "aurweb.scripts.config:main" aurweb-adduser = "aurweb.scripts.adduser:main" -aurweb-git-archive = "aurweb.scripts.git_archive:main" diff --git a/pytest.ini b/pytest.ini index 62d1922a..9f70a2bd 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,8 +1,13 @@ [pytest] +# Ignore the following DeprecationWarning(s): +# - asyncio.base_events +# - DeprecationWarning speaking about internal asyncio +# using the loop= argument being deprecated starting +# with python 3.8, before python 3.10. +# - Note: This is a bug in upstream filed at +# https://bugs.python.org/issue45097 filterwarnings = - # This is coming from https://github.com/pytest-dev/pytest-xdist/issues/825 and it's caused from pytest-cov - # Remove once fixed: https://github.com/pytest-dev/pytest-cov/issues/557 - ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning + ignore::DeprecationWarning:asyncio.base_events # Build in coverage and pytest-xdist multiproc testing. addopts = --cov=aurweb --cov-append --dist load --dist loadfile -n auto diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 6843bc00..00000000 --- a/renovate.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base", - "group:allNonMajor" - ], - "packageRules": [ - { - "groupName": "fastapi", - "matchPackageNames": ["fastapi"] - }, - { - "matchPackageNames": ["python"], - "enabled": false - } - ] -} diff --git a/schema/gendummydata.py b/schema/gendummydata.py index a5c30170..aedfda7e 100755 --- a/schema/gendummydata.py +++ b/schema/gendummydata.py @@ -15,29 +15,30 @@ import os import random import sys import time -from datetime import UTC, datetime + +from datetime import datetime import bcrypt LOG_LEVEL = logging.DEBUG # logging level. set to logging.INFO to reduce output SEED_FILE = "/usr/share/dict/words" -USER_ID = 5 # Users.ID of first bogus user -PKG_ID = 1 # Packages.ID of first package +USER_ID = 5 # Users.ID of first bogus user +PKG_ID = 1 # Packages.ID of first package # how many users to 'register' MAX_USERS = int(os.environ.get("MAX_USERS", 38000)) -MAX_DEVS = 0.1 # what percentage of MAX_USERS are Developers -MAX_PMS = 0.2 # what percentage of MAX_USERS are Package Maintainers +MAX_DEVS = .1 # what percentage of MAX_USERS are Developers +MAX_TUS = .2 # what percentage of MAX_USERS are Trusted Users # how many packages to load MAX_PKGS = int(os.environ.get("MAX_PKGS", 32000)) -PKG_DEPS = (1, 15) # min/max depends a package has -PKG_RELS = (1, 5) # min/max relations a package has -PKG_SRC = (1, 3) # min/max sources a package has -PKG_CMNTS = (1, 5) # min/max number of comments a package has +PKG_DEPS = (1, 15) # min/max depends a package has +PKG_RELS = (1, 5) # min/max relations a package has +PKG_SRC = (1, 3) # min/max sources a package has +PKG_CMNTS = (1, 5) # min/max number of comments a package has CATEGORIES_COUNT = 17 # the number of categories from aur-schema -VOTING = (0, 0.001) # percentage range for package voting -# number of open package maintainer proposals +VOTING = (0, .001) # percentage range for package voting +# number of open trusted user proposals OPEN_PROPOSALS = int(os.environ.get("OPEN_PROPOSALS", 15)) -# number of closed package maintainer proposals +# number of closed trusted user proposals CLOSE_PROPOSALS = int(os.environ.get("CLOSE_PROPOSALS", 50)) RANDOM_TLDS = ("edu", "com", "org", "net", "tw", "ru", "pl", "de", "es") RANDOM_URL = ("http://www.", "ftp://ftp.", "http://", "ftp://") @@ -112,10 +113,10 @@ if not len(contents) - MAX_USERS > MAX_PKGS: def normalize(unicode_data): - """We only accept ascii for usernames. Also use this to normalize + """ We only accept ascii for usernames. Also use this to normalize package names; our database utf8mb4 collations compare with Unicode - Equivalence.""" - return unicode_data.encode("ascii", "ignore").decode("ascii") + Equivalence. """ + return unicode_data.encode('ascii', 'ignore').decode('ascii') # select random usernames @@ -153,12 +154,12 @@ while len(seen_pkgs) < MAX_PKGS: # contents = None -# developer/PM IDs +# developer/tu IDs # developers = [] -packagemaintainers = [] +trustedusers = [] has_devs = 0 -has_pms = 0 +has_tus = 0 # Just let python throw the errors if any happen # @@ -170,7 +171,7 @@ out.write("BEGIN;\n") log.debug("Creating SQL statements for users.") for u in user_keys: account_type = 1 # default to normal user - if not has_devs or not has_pms: + if not has_devs or not has_tus: account_type = random.randrange(1, 4) if account_type == 3 and not has_devs: # this will be a dev account @@ -178,12 +179,12 @@ for u in user_keys: developers.append(seen_users[u]) if len(developers) >= MAX_DEVS * MAX_USERS: has_devs = 1 - elif account_type == 2 and not has_pms: - # this will be a package maintainer account + elif account_type == 2 and not has_tus: + # this will be a trusted user account # - packagemaintainers.append(seen_users[u]) - if len(packagemaintainers) >= MAX_PMS * MAX_USERS: - has_pms = 1 + trustedusers.append(seen_users[u]) + if len(trustedusers) >= MAX_TUS * MAX_USERS: + has_tus = 1 else: # a normal user account # @@ -195,20 +196,16 @@ for u in user_keys: # "{salt}{username}" to_hash = f"{salt}{u}" - h = hashlib.new("md5") + h = hashlib.new('md5') h.update(to_hash.encode()) - s = ( - "INSERT INTO Users (ID, AccountTypeID, Username, Email, Passwd, Salt)" - " VALUES (%d, %d, '%s', '%s@example.com', '%s', '%s');\n" - ) + s = ("INSERT INTO Users (ID, AccountTypeID, Username, Email, Passwd, Salt)" + " VALUES (%d, %d, '%s', '%s@example.com', '%s', '%s');\n") s = s % (seen_users[u], account_type, u, u, h.hexdigest(), salt) out.write(s) log.debug("Number of developers: %d" % len(developers)) -log.debug("Number of package maintainers: %d" % len(packagemaintainers)) -log.debug( - "Number of users: %d" % (MAX_USERS - len(developers) - len(packagemaintainers)) -) +log.debug("Number of trusted users: %d" % len(trustedusers)) +log.debug("Number of users: %d" % (MAX_USERS - len(developers) - len(trustedusers))) log.debug("Number of packages: %d" % MAX_PKGS) log.debug("Gathering text from fortune file...") @@ -226,25 +223,20 @@ for p in list(seen_pkgs.keys()): muid = developers[random.randrange(0, len(developers))] puid = developers[random.randrange(0, len(developers))] else: - muid = packagemaintainers[random.randrange(0, len(packagemaintainers))] - puid = packagemaintainers[random.randrange(0, len(packagemaintainers))] + muid = trustedusers[random.randrange(0, len(trustedusers))] + puid = trustedusers[random.randrange(0, len(trustedusers))] if count % 20 == 0: # every so often, there are orphans... muid = "NULL" uuid = genUID() # the submitter/user - s = ( - "INSERT INTO PackageBases (ID, Name, FlaggerComment, SubmittedTS, ModifiedTS, " - "SubmitterUID, MaintainerUID, PackagerUID) VALUES " - "(%d, '%s', '', %d, %d, %d, %s, %s);\n" - ) + s = ("INSERT INTO PackageBases (ID, Name, FlaggerComment, SubmittedTS, ModifiedTS, " + "SubmitterUID, MaintainerUID, PackagerUID) VALUES (%d, '%s', '', %d, %d, %d, %s, %s);\n") s = s % (seen_pkgs[p], p, NOW, NOW, uuid, muid, puid) out.write(s) - s = ( - "INSERT INTO Packages (ID, PackageBaseID, Name, Version) VALUES " - "(%d, %d, '%s', '%s');\n" - ) + s = ("INSERT INTO Packages (ID, PackageBaseID, Name, Version) VALUES " + "(%d, %d, '%s', '%s');\n") s = s % (seen_pkgs[p], seen_pkgs[p], p, genVersion()) out.write(s) @@ -255,30 +247,25 @@ for p in list(seen_pkgs.keys()): num_comments = random.randrange(PKG_CMNTS[0], PKG_CMNTS[1]) for i in range(0, num_comments): now = NOW + random.randrange(400, 86400 * 3) - s = ( - "INSERT INTO PackageComments (PackageBaseID, UsersID," - " Comments, RenderedComment, CommentTS) VALUES (%d, %d, '%s', '', %d);\n" - ) + s = ("INSERT INTO PackageComments (PackageBaseID, UsersID," + " Comments, RenderedComment, CommentTS) VALUES (%d, %d, '%s', '', %d);\n") s = s % (seen_pkgs[p], genUID(), genFortune(), now) out.write(s) # Cast votes -utcnow = int(datetime.now(UTC).timestamp()) +utcnow = int(datetime.utcnow().timestamp()) track_votes = {} log.debug("Casting votes for packages.") for u in user_keys: - num_votes = random.randrange( - int(len(seen_pkgs) * VOTING[0]), int(len(seen_pkgs) * VOTING[1]) - ) + num_votes = random.randrange(int(len(seen_pkgs) * VOTING[0]), + int(len(seen_pkgs) * VOTING[1])) pkgvote = {} for v in range(num_votes): pkg = random.randrange(1, len(seen_pkgs) + 1) if pkg not in pkgvote: - s = ( - "INSERT INTO PackageVotes (UsersID, PackageBaseID, VoteTS)" - " VALUES (%d, %d, %d);\n" - ) + s = ("INSERT INTO PackageVotes (UsersID, PackageBaseID, VoteTS)" + " VALUES (%d, %d, %d);\n") s = s % (seen_users[u], pkg, utcnow) pkgvote[pkg] = 1 if pkg not in track_votes: @@ -306,10 +293,7 @@ for p in seen_pkgs_keys: deptype = random.randrange(1, 5) if deptype == 4: dep += ": for " + random.choice(seen_pkgs_keys) - s = ( - "INSERT INTO PackageDepends(PackageID, DepTypeID, DepName) " - "VALUES (%d, %d, '%s');\n" - ) + s = "INSERT INTO PackageDepends(PackageID, DepTypeID, DepName) VALUES (%d, %d, '%s');\n" s = s % (seen_pkgs[p], deptype, dep) out.write(s) @@ -317,10 +301,7 @@ for p in seen_pkgs_keys: for i in range(0, num_deps): rel = random.choice(seen_pkgs_keys) reltype = random.randrange(1, 4) - s = ( - "INSERT INTO PackageRelations(PackageID, RelTypeID, RelName) " - "VALUES (%d, %d, '%s');\n" - ) + s = "INSERT INTO PackageRelations(PackageID, RelTypeID, RelName) VALUES (%d, %d, '%s');\n" s = s % (seen_pkgs[p], reltype, rel) out.write(s) @@ -329,19 +310,16 @@ for p in seen_pkgs_keys: src_file = user_keys[random.randrange(0, len(user_keys))] src = "%s%s.%s/%s/%s-%s.tar.gz" % ( RANDOM_URL[random.randrange(0, len(RANDOM_URL))], - p, - RANDOM_TLDS[random.randrange(0, len(RANDOM_TLDS))], + p, RANDOM_TLDS[random.randrange(0, len(RANDOM_TLDS))], RANDOM_LOCS[random.randrange(0, len(RANDOM_LOCS))], - src_file, - genVersion(), - ) + src_file, genVersion()) s = "INSERT INTO PackageSources(PackageID, Source) VALUES (%d, '%s');\n" s = s % (seen_pkgs[p], src) out.write(s) -# Create package maintainer proposals +# Create trusted user proposals # -log.debug("Creating SQL statements for package maintainer proposals.") +log.debug("Creating SQL statements for trusted user proposals.") count = 0 for t in range(0, OPEN_PROPOSALS + CLOSE_PROPOSALS): now = int(time.time()) @@ -355,11 +333,9 @@ for t in range(0, OPEN_PROPOSALS + CLOSE_PROPOSALS): user = "" else: user = user_keys[random.randrange(0, len(user_keys))] - suid = packagemaintainers[random.randrange(0, len(packagemaintainers))] - s = ( - "INSERT INTO VoteInfo (Agenda, User, Submitted, End," - " Quorum, SubmitterID) VALUES ('%s', '%s', %d, %d, 0.0, %d);\n" - ) + suid = trustedusers[random.randrange(0, len(trustedusers))] + s = ("INSERT INTO TU_VoteInfo (Agenda, User, Submitted, End," + " Quorum, SubmitterID) VALUES ('%s', '%s', %d, %d, 0.0, %d);\n") s = s % (genFortune(), user, start, end, suid) out.write(s) count += 1 diff --git a/setup.cfg b/setup.cfg index 41978dae..08be9186 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,9 @@ +[pycodestyle] +max-line-length = 127 +ignore = E741, W503 + [flake8] -max-line-length = 88 +max-line-length = 127 max-complexity = 10 # Ignore some unavoidable flake8 warnings; we know this is against @@ -13,4 +17,9 @@ max-complexity = 10 # With {W503,W504}, PEP8 does not want us to break lines before # or after a binary operator. We have many scripts that already # do this, so we're ignoring it here. -ignore = E203, E741, W503, W504 +ignore = E741, W503, W504 + +[isort] +line_length = 127 +lines_between_types = 1 + diff --git a/static/js/copy.js b/static/js/copy.js deleted file mode 100644 index 3b659270..00000000 --- a/static/js/copy.js +++ /dev/null @@ -1,9 +0,0 @@ -document.addEventListener('DOMContentLoaded', function() { - let elements = document.querySelectorAll('.copy'); - elements.forEach(function(el) { - el.addEventListener('click', function(e) { - e.preventDefault(); - navigator.clipboard.writeText(e.target.text); - }); - }); -}); diff --git a/static/js/typeahead-requests.js b/static/js/typeahead-requests.js deleted file mode 100644 index 9f636eab..00000000 --- a/static/js/typeahead-requests.js +++ /dev/null @@ -1,6 +0,0 @@ -document.addEventListener('DOMContentLoaded', function() { - const input = document.getElementById('id_filter_pkg_name'); - const form = document.getElementById('todolist_filter'); - const type = 'suggest-pkgbase'; - typeahead.init(type, input, form); -}); diff --git a/templates/account/delete.html b/templates/account/delete.html deleted file mode 100644 index 625d3c2d..00000000 --- a/templates/account/delete.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends "partials/layout.html" %} - -{% block pageContent %} -
-

{{ "Accounts" | tr }}

- - {% include "partials/error.html" %} - -

- {{ - "You can use this form to permanently delete the AUR account %s%s%s." - | tr | format("", name, "") | safe - }} -

- -

- {{ - "%sWARNING%s: This action cannot be undone." - | tr | format("", "") | safe - }} -

- - -
-
-

- - -

-

- -

-

- -

-
-
- -
-{% endblock %} diff --git a/templates/account/search.html b/templates/account/search.html index 325ef0ba..d28d4169 100644 --- a/templates/account/search.html +++ b/templates/account/search.html @@ -20,9 +20,9 @@

diff --git a/templates/account/show.html b/templates/account/show.html index a57efb77..a9bb3c30 100644 --- a/templates/account/show.html +++ b/templates/account/show.html @@ -25,11 +25,7 @@ {% trans %}Email Address{% endtrans %}: - {% if not user.HideEmail %} {{ user.Email }} - {% else %} - <{% trans %}hidden{% endtrans %}> - {% endif %} diff --git a/templates/addvote.html b/templates/addvote.html index cc12f42b..4d2b0292 100644 --- a/templates/addvote.html +++ b/templates/addvote.html @@ -19,26 +19,26 @@

- +

- -

- - - -

- {% if form_type == "UpdateAccount" %} @@ -251,7 +233,7 @@ -

@@ -260,7 +242,7 @@ {% trans %}Re-type password{% endtrans %}: -

@@ -282,13 +264,6 @@

-

- - {{ - "Specify multiple SSH Keys separated by new line, empty lines are ignored." | tr - }} - -

@@ -338,7 +313,7 @@ -

{% else %} diff --git a/templates/partials/archdev-navbar.html b/templates/partials/archdev-navbar.html index ea67b1ca..98bb1841 100644 --- a/templates/partials/archdev-navbar.html +++ b/templates/partials/archdev-navbar.html @@ -36,10 +36,10 @@ - {# Only CRED_PM_LIST_VOTES privileged users see Package Maintainer #} - {% if request.user.has_credential(creds.PM_LIST_VOTES) %} + {# Only CRED_TU_LIST_VOTES privileged users see Trusted User #} + {% if request.user.has_credential(creds.TU_LIST_VOTES) %}
  • - {% trans %}Package Maintainer{% endtrans %} + {% trans %}Trusted User{% endtrans %}
  • {% endif %} diff --git a/templates/partials/navbar.html b/templates/partials/navbar.html index 00ceab6b..199b2067 100644 --- a/templates/partials/navbar.html +++ b/templates/partials/navbar.html @@ -10,7 +10,7 @@
  • {% trans %}Packages{% endtrans %}
  • {% trans %}Forums{% endtrans %}
  • {% trans %}Wiki{% endtrans %}
  • -
  • {% trans %}GitLab{% endtrans %}
  • +
  • {% trans %}Bugs{% endtrans %}
  • {% trans %}Security{% endtrans %}
  • AUR
  • {% trans %}Download{% endtrans %}
  • diff --git a/templates/partials/packages/actions.html b/templates/partials/packages/actions.html index 016177c7..88420222 100644 --- a/templates/partials/packages/actions.html +++ b/templates/partials/packages/actions.html @@ -24,73 +24,69 @@ {{ "Search wiki" | tr }} - {% if request.user.is_authenticated() %} - {% if not out_of_date %} -
  • - - {{ "Flag package out-of-date" | tr }} - -
  • - {% else %} -
  • - - - {{ - "Flagged out-of-date (%s)" - | tr | format(date_strftime(pkgbase.OutOfDateTS, "%Y-%m-%d")) - }} - - -
  • - {% if request.user.has_credential(creds.PKGBASE_UNFLAG, approved=unflaggers) %} -
  • -
    - -
    -
  • - {% endif %} - {% endif %} + {% if not out_of_date %}
  • - {% if not voted %} -
    - -
    - {% else %} -
    - -
    - {% endif %} + + {{ "Flag package out-of-date" | tr }} + +
  • + {% else %} +
  • + + + {{ + "Flagged out-of-date (%s)" + | tr | format(date_strftime(pkgbase.OutOfDateTS, "%Y-%m-%d")) + }} + +
  • - {% if notified %} -
    - -
    - {% else %} -
    - -
    - {% endif %} +
    + +
  • {% endif %} +
  • + {% if not voted %} +
    + +
    + {% else %} +
    + +
    + {% endif %} +
  • +
  • + {% if notified %} +
    + +
    + {% else %} +
    + +
    + {% endif %} +
  • {% if request.user.has_credential(creds.PKGBASE_EDIT_COMAINTAINERS, approved=[pkgbase.Maintainer]) %}
  • @@ -99,27 +95,17 @@
  • {% endif %} {% if requests %} - {% if request.user.has_credential(creds.PKGREQ_LIST) %} -
  • - - {{ requests | tn("%d pending request", "%d pending requests") | format(requests) }} - -
  • - {% else %} -
  • - - {{ requests | tn("%d pending request", "%d pending requests") | format(requests) }} - -
  • - {% endif %} - {% endif %} - {% if request.user.is_authenticated() %}
  • - - {{ "Submit Request" | tr }} - + + {{ requests | tn("%d pending request", "%d pending requests") | format(requests) }} +
  • {% endif %} +
  • + + {{ "Submit Request" | tr }} + +
  • {% if request.user.has_credential(creds.PKGBASE_DELETE) %}
  • @@ -143,7 +129,7 @@ />
  • - {% elif request.user.has_credential(creds.PKGBASE_DISOWN, approved=[pkgbase.Maintainer] + comaintainers) %} + {% elif request.user.has_credential(creds.PKGBASE_DISOWN, approved=[pkgbase.Maintainer]) %}
  • {{ "Disown Package" | tr }} diff --git a/templates/partials/packages/comment.html b/templates/partials/packages/comment.html index 3573a914..e4818837 100644 --- a/templates/partials/packages/comment.html +++ b/templates/partials/packages/comment.html @@ -1,27 +1,22 @@ {% set header_cls = "comment-header" %} {% set article_cls = "article-content" %} -{% set comment_by = comment.User.Username %} -{% if not comment.User %} - {% set comment_by = "<deleted-account>" %} -{% endif %} {% if comment.Deleter %} {% set header_cls = "%s %s" | format(header_cls, "comment-deleted") %} {% set article_cls = "%s %s" | format(article_cls, "comment-deleted") %} {% endif %} {% if not comment.Deleter or request.user.has_credential(creds.COMMENT_VIEW_DELETED, approved=[comment.Deleter]) %} -{% if not (request.user.HideDeletedComments and comment.DelTS) %}

    {% set commented_at = comment.CommentTS | dt | as_timezone(timezone) %} - {% set view_account_info = 'View account information for %s' | tr | format(comment_by) %} + {% set view_account_info = 'View account information for %s' | tr | format(comment.User.Username) %} {{ "%s commented on %s" | tr | format( ('%s' | format( - comment_by, + comment.User.Username, view_account_info, - comment_by - )) if request.user.is_authenticated() and comment.User else - (comment_by), + comment.User.Username + )) if request.user.is_authenticated() else + (comment.User.Username), '%s' | format( comment.ID, datetime_display(comment.CommentTS) @@ -46,4 +41,3 @@ {% include "partials/comment_content.html" %} {% endif %} -{% endif %} diff --git a/templates/partials/packages/comment_form.html b/templates/partials/packages/comment_form.html index cecc496e..5368e784 100644 --- a/templates/partials/packages/comment_form.html +++ b/templates/partials/packages/comment_form.html @@ -21,27 +21,19 @@ Routes: | format('', "") | safe }} -
    - {{ "Maximum number of characters" | tr }}: {{ max_chars_comment }}.

    - {% if comment %} - - {% endif %} - {% if not request.user.notified(pkgbase) %} + {% if comment and not request.user.notified(pkgbase) %} diff --git a/templates/partials/packages/comments.html b/templates/partials/packages/comments.html index 55421bfa..6e6b9a47 100644 --- a/templates/partials/packages/comments.html +++ b/templates/partials/packages/comments.html @@ -33,24 +33,9 @@ {{ "Latest Comments" | tr }}

    - {% set page = ((O / PP) | int) %} - {% set pages = ((comments_total / PP) | ceil) %} - - {% if pages > 1 %} -

    - {{ page | pager_nav(comments_total, prefix) | safe }} -

    - {% endif %} {% for comment in comments.all() %} {% include "partials/packages/comment.html" %} {% endfor %} - {% endif %} diff --git a/templates/partials/packages/details.html b/templates/partials/packages/details.html index 5f242414..22d519b9 100644 --- a/templates/partials/packages/details.html +++ b/templates/partials/packages/details.html @@ -1,3 +1,4 @@ +{% set pkg = pkgbase.packages.first() %} @@ -17,25 +18,25 @@ - + - + {% endif %} - {% if pkgbase.keywords.count() or request.user.has_credential(creds.PKGBASE_SET_KEYWORDS, approved=[pkgbase.Maintainer] + comaintainers) %} + {% if pkgbase.keywords.count() or request.user.has_credential(creds.PKGBASE_SET_KEYWORDS, approved=[pkgbase.Maintainer]) %} - {% if request.user.has_credential(creds.PKGBASE_SET_KEYWORDS, approved=[pkgbase.Maintainer] + comaintainers) %} + {% if request.user.has_credential(creds.PKGBASE_SET_KEYWORDS, approved=[pkgbase.Maintainer]) %} {% endif %} - {% if show_package_details and groups and groups.count() %} - - - - - {% endif %} {% if show_package_details and conflicts and conflicts.count() %} @@ -113,7 +108,7 @@ @@ -155,7 +147,7 @@ - + @@ -168,3 +160,4 @@
    {{ "Git Clone URL" | tr }}:
    {{ "Description" | tr }}:{{ package.Description }}{{ pkg.Description }}
    {{ "Upstream URL" | tr }}: - {% if package.URL %} - {{ package.URL }} + {% if pkg.URL %} + {{ pkg.URL }} {% else %} {{ "None" | tr }} {% endif %}
    {{ "Keywords" | tr }}:
    {% for keyword in pkgbase.keywords.all() %} {{ keyword.Keyword }} @@ -68,12 +69,6 @@
    {{ licenses.all() | join(', ', attribute='License.Name') }}
    {{ "Groups" | tr }}:{{ groups.all() | join(', ', attribute='Group.Name') }}
    {{ "Conflicts" | tr }}:
    {{ "Maintainer" | tr }}: - {% if request.user.is_authenticated() and pkgbase.Maintainer %} + {% if pkgbase.Maintainer %} {{ pkgbase.Maintainer.Username }} @@ -123,9 +118,6 @@ {% endif %} {% else %} {{ pkgbase.Maintainer.Username | default("None" | tr) }} - {% if comaintainers %} - ({{ comaintainers|join(', ') }}) - {% endif %} {% endif %}
    {{ "Popularity" | tr }}:{{ popularity | number_format(6 if popularity <= 0.2 else 2) }}{{ pkgbase.Popularity | number_format(6 if pkgbase.Popularity <= 0.2 else 2) }}
    {{ "First Submitted" | tr }}:
    + diff --git a/templates/partials/packages/package_metadata.html b/templates/partials/packages/package_metadata.html index 2dd39c20..6f58c2be 100644 --- a/templates/partials/packages/package_metadata.html +++ b/templates/partials/packages/package_metadata.html @@ -1,5 +1,5 @@
    -

    {{ "Dependencies" | tr }} ({{ depends_count }})

    +

    {{ "Dependencies" | tr }} ({{ dependencies | length }})

    -

    {{ "Required by" | tr }} ({{ reqs_count }})

    +

    {{ "Required by" | tr }} ({{ required_by | length }})

    diff --git a/templates/partials/packages/search_actions.html b/templates/partials/packages/search_actions.html index c84ad93a..f28e27a9 100644 --- a/templates/partials/packages/search_actions.html +++ b/templates/partials/packages/search_actions.html @@ -4,7 +4,7 @@ - {% if request.user.is_package_maintainer() or request.user.is_developer() %} + {% if request.user.is_trusted_user() or request.user.is_developer() %} {% endif %} diff --git a/templates/partials/packages/search_results.html b/templates/partials/packages/search_results.html index a365a1d3..84c39079 100644 --- a/templates/partials/packages/search_results.html +++ b/templates/partials/packages/search_results.html @@ -68,16 +68,6 @@ {{ "Maintainer" | tr }} - - {% if SB == "l" %} - {% set order = reverse_order %} - {% else %} - {% set order = SO %} - {% endif %} - - {{ "Last Updated" | tr }} - - @@ -125,11 +115,6 @@ {{ "orphan" | tr }} {% endif %} - {% if flagged %} - {{ datetime_display(pkg.ModifiedTS) }} - {% else %} - {{ datetime_display(pkg.ModifiedTS) }} - {% endif %} {% endfor %} diff --git a/templates/partials/packages/statistics.html b/templates/partials/packages/statistics.html index 7ce5fba1..8a6546b9 100644 --- a/templates/partials/packages/statistics.html +++ b/templates/partials/packages/statistics.html @@ -42,9 +42,9 @@ - {{ "Package Maintainers" | tr }} + {{ "Trusted Users" | tr }} - {{ package_maintainer_count }} + {{ trusted_user_count }} diff --git a/templates/partials/support.html b/templates/partials/support.html deleted file mode 100644 index b175a040..00000000 --- a/templates/partials/support.html +++ /dev/null @@ -1,65 +0,0 @@ -

    {% trans %}Support{% endtrans %}

    -

    {% trans %}Package Requests{% endtrans %}

    -
    -

    - {{ "There are three types of requests that can be filed in the %sPackage Actions%s box on the package details page:" - | tr - | format("", "") - | safe - }} -

    -
      -
    • {% trans %}Orphan Request{% endtrans %}: {% trans %}Request a package to be disowned, e.g. when the maintainer is inactive and the package has been flagged out-of-date for a long time.{% endtrans %}
    • -
    • {% trans %}Deletion Request{% endtrans %}: {%trans %}Request a package to be removed from the Arch User Repository. Please do not use this if a package is broken and can be fixed easily. Instead, contact the maintainer and file orphan request if necessary.{% endtrans %}
    • -
    • {% trans %}Merge Request{% endtrans %}: {% trans %}Request a package to be merged into another one. Can be used when a package needs to be renamed or replaced by a split package.{% endtrans %}
    • -
    -

    -{{ "If you want to discuss a request, you can use the %saur-requests%s mailing list. However, please do not use that list to file requests." - | tr - | format('', "") - | safe - }} -

    -
    -

    {% trans %}Submitting Packages{% endtrans %}

    -
    -

    - {{ "Git over SSH is now used to submit packages to the AUR. See the %sSubmitting packages%s section of the Arch User Repository ArchWiki page for more details." - | tr - | format('', "") - | safe - }} -

    -{% if ssh_fingerprints %} -

    - {% trans %}The following SSH fingerprints are used for the AUR:{% endtrans %} -

    -

      - {% for keytype in ssh_fingerprints %} -
    • {{ keytype }}: {{ ssh_fingerprints[keytype] }} - {% endfor %} -
    -{% endif %} -
    -

    {% trans %}Discussion{% endtrans %}

    -
    -

    - {{ "General discussion regarding the Arch User Repository (AUR) and Package Maintainer structure takes place on %saur-general%s. For discussion relating to the development of the AUR web interface, use the %saur-dev%s mailing list." - | tr - | format('', "", - '', "") - | safe - }} -

    -

    -

    {% trans %}Bug Reporting{% endtrans %}

    -
    -

    - {{ "If you find a bug in the AUR web interface, please fill out a bug report on our %sbug tracker%s. Use the tracker to report bugs in the AUR web interface %sonly%s. To report packaging bugs contact the maintainer or leave a comment on the appropriate package page." - | tr - | format('', "", - "", "") - | safe - }} -

    -
    diff --git a/templates/partials/package-maintainer/last_votes.html b/templates/partials/tu/last_votes.html similarity index 92% rename from templates/partials/package-maintainer/last_votes.html rename to templates/partials/tu/last_votes.html index 4f30d9ff..30d620d4 100644 --- a/templates/partials/package-maintainer/last_votes.html +++ b/templates/partials/tu/last_votes.html @@ -24,7 +24,7 @@ - + {{ vote.LastVote }} diff --git a/templates/partials/package-maintainer/proposal/details.html b/templates/partials/tu/proposal/details.html similarity index 92% rename from templates/partials/package-maintainer/proposal/details.html rename to templates/partials/tu/proposal/details.html index 24b21262..f7a55148 100644 --- a/templates/partials/package-maintainer/proposal/details.html +++ b/templates/partials/tu/proposal/details.html @@ -21,11 +21,6 @@ -
    - {{ "Active" | tr }} {{ "Package Maintainers" | tr }} {{ "assigned" | tr }}: - {{ voteinfo.ActiveUsers }} -
    - {% set submitter = voteinfo.Submitter.Username %} {% set submitter_uri = "/account/%s" | format(submitter) %} {% set submitter = '%s' | format(submitter_uri, submitter) %} @@ -47,7 +42,7 @@ {% if not voteinfo.is_running() %}
    {{ "Result" | tr }}: - {% if not voteinfo.ActiveUsers %} + {% if not voteinfo.ActiveTUs %} {{ "unknown" | tr }} {% elif accepted %} @@ -102,7 +97,7 @@ {% endif %} - {% if voteinfo.ActiveUsers %} + {% if voteinfo.ActiveTUs %} {{ (participation * 100) | number_format(2) }}% {% else %} {{ "unknown" | tr }} diff --git a/templates/partials/package-maintainer/proposal/form.html b/templates/partials/tu/proposal/form.html similarity index 84% rename from templates/partials/package-maintainer/proposal/form.html rename to templates/partials/tu/proposal/form.html index e172b29d..d783a622 100644 --- a/templates/partials/package-maintainer/proposal/form.html +++ b/templates/partials/tu/proposal/form.html @@ -1,4 +1,4 @@ - +
    "; + +html_footer(AURWEB_VERSION); + +?> diff --git a/web/html/addvote.php b/web/html/addvote.php new file mode 100644 index 00000000..83b800b8 --- /dev/null +++ b/web/html/addvote.php @@ -0,0 +1,117 @@ +" . __("New proposal submitted.") . "

    \n"; + } else { +?> + + +

    + + +
    +

    + +
    +

    + + + +

    +

    + + +

    +

    +
    +
    + + + " /> +

    +
    +
    + tbody > tr > td { - padding-right: 2px; -} diff --git a/static/css/cgit.css b/web/html/css/cgit.css similarity index 100% rename from static/css/cgit.css rename to web/html/css/cgit.css diff --git a/web/html/home.php b/web/html/home.php new file mode 100644 index 00000000..5ea79ee9 --- /dev/null +++ b/web/html/home.php @@ -0,0 +1,215 @@ + + +
    +
    + +
    +

    +

    + 50, + 'SeB' => 'M', + 'K' => username_from_sid($_COOKIE["AURSID"]), + 'outdated' => 'on', + 'SB' => 'l', + 'SO' => 'a' + ); + pkg_search_page($params, false, $_COOKIE["AURSID"]); + ?> +

    + +
    +
    +

    +

    ">

    + 50, + 'SeB' => 'm', + 'K' => username_from_sid($_COOKIE["AURSID"]), + 'SB' => 'l', + 'SO' => 'd' + ); + pkg_search_page($params, false, $_COOKIE["AURSID"]); + ?> +
    +
    +

    +

    ">

    + 50, + 'SeB' => 'c', + 'K' => username_from_sid($_COOKIE["AURSID"]), + 'SB' => 'l', + 'SO' => 'd' + ); + pkg_search_page($params, false, $_COOKIE["AURSID"]); + ?> +
    + +
    +

    AUR

    +

    + ', + '', + '', + '' + ); + ?> + ', '', + '', + '' + ); + ?> + + +

    +

    + : + +

    +

    +
    +
    +

    +

    +
    +

    + ', + '' + ); + ?> +

    +
      +
    • :
    • +
    • :
    • +
    • :
    • +
    +

    + ', + '' + ); + ?> +

    +
    +

    +
    +

    + ', + '' + ); + ?> +

    + +

    + +

    +
      + $fingerprint): ?> +
    • :
    • + +
    + +
    +

    +
    +

    + ', + '', + '', + '' + ); + ?> +

    +
    +

    +
    +

    + ', + '', + '', + '' + ); + ?> +

    +
    +
    + +
    +
    +
    +
    +
    +
    + + + " maxlength="35" autocomplete="off"/> +
    +
    +
    +
    + +
    +
    + +
    + +
    + +
    + + +
    + + + '1'); + } + } + + include get_route('/' . $tokens[1]); +} elseif (!empty($tokens[1]) && '/' . $tokens[1] == get_pkgreq_route()) { + if (!empty($tokens[2])) { + /* TODO: Create a proper data structure to pass variables from + * the routing framework to the individual pages instead of + * initializing arbitrary variables here. */ + if (!empty($tokens[3]) && $tokens[3] == 'close') { + $pkgreq_id = $tokens[2]; + } else { + $pkgreq_id = null; + } + + if (!$pkgreq_id) { + header("HTTP/1.0 404 Not Found"); + include "./404.php"; + return; + } + } + + include get_route('/' . $tokens[1]); +} elseif (!empty($tokens[1]) && '/' . $tokens[1] == get_user_route()) { + if (!empty($tokens[2])) { + $_REQUEST['ID'] = uid_from_username($tokens[2]); + + if (!$_REQUEST['ID']) { + header("HTTP/1.0 404 Not Found"); + include "./404.php"; + return; + } + + if (!empty($tokens[3])) { + if ($tokens[3] == 'edit') { + $_REQUEST['Action'] = "DisplayAccount"; + } elseif ($tokens[3] == 'update') { + $_REQUEST['Action'] = "UpdateAccount"; + } elseif ($tokens[3] == 'delete') { + $_REQUEST['Action'] = "DeleteAccount"; + } elseif ($tokens[3] == 'comments') { + $_REQUEST['Action'] = "ListComments"; + } else { + header("HTTP/1.0 404 Not Found"); + include "./404.php"; + return; + } + } else { + $_REQUEST['Action'] = "AccountInfo"; + } + } + include get_route('/' . $tokens[1]); +} elseif (get_route($path) !== NULL) { + include get_route($path); +} else { + switch ($path) { + case "/css/archweb.css": + case "/css/aurweb.css": + case "/css/cgit.css": + case "/css/archnavbar/archnavbar.css": + header("Content-Type: text/css"); + readfile("./$path"); + break; + case "/images/ajax-loader.gif": + header("Content-Type: image/gif"); + readfile("./$path"); + break; + case "/css/archnavbar/archlogo.png": + case "/css/archnavbar/aurlogo.png": + case "/images/favicon.ico": + header("Content-Type: image/png"); + readfile("./$path"); + break; + case "/images/x.min.svg": + case "/images/action-undo.min.svg": + case "/images/pencil.min.svg": + case "/images/pin.min.svg": + case "/images/unpin.min.svg": + case "/images/rss.svg": + header("Content-Type: image/svg+xml"); + readfile("./$path"); + break; + case "/js/typeahead.js": + header("Content-Type: application/javascript"); + readfile("./$path"); + break; + case "/packages.gz": + case "/packages-meta-v1.json.gz": + case "/packages-meta-ext-v1.json.gz": + case "/pkgbase.gz": + case "/users.gz": + header("Content-Type: text/plain"); + header("Content-Encoding: gzip"); + readfile("./$path"); + break; + default: + header("HTTP/1.0 404 Not Found"); + include "./404.php"; + break; + } +} diff --git a/static/js/comment-edit.js b/web/html/js/comment-edit.js similarity index 100% rename from static/js/comment-edit.js rename to web/html/js/comment-edit.js diff --git a/web/html/js/copy.js b/web/html/js/copy.js new file mode 100644 index 00000000..f46299b3 --- /dev/null +++ b/web/html/js/copy.js @@ -0,0 +1,6 @@ +document.addEventListener('DOMContentLoaded', function() { + document.querySelector('.copy').addEventListener('click', function(e) { + e.preventDefault(); + navigator.clipboard.writeText(event.target.text); + }); +}); diff --git a/static/js/typeahead-home.js b/web/html/js/typeahead-home.js similarity index 100% rename from static/js/typeahead-home.js rename to web/html/js/typeahead-home.js diff --git a/static/js/typeahead-pkgbase-merge.js b/web/html/js/typeahead-pkgbase-merge.js similarity index 100% rename from static/js/typeahead-pkgbase-merge.js rename to web/html/js/typeahead-pkgbase-merge.js diff --git a/static/js/typeahead-pkgbase-request.js b/web/html/js/typeahead-pkgbase-request.js similarity index 100% rename from static/js/typeahead-pkgbase-request.js rename to web/html/js/typeahead-pkgbase-request.js diff --git a/static/js/typeahead.js b/web/html/js/typeahead.js similarity index 100% rename from static/js/typeahead.js rename to web/html/js/typeahead.js diff --git a/web/html/login.php b/web/html/login.php new file mode 100644 index 00000000..3f3d66cc --- /dev/null +++ b/web/html/login.php @@ -0,0 +1,68 @@ + +
    +

    AUR

    + +

    + ' . username_from_sid($_COOKIE["AURSID"]) . ''); ?> + [] +

    + +
    +
    + + +
    + +

    + + +

    +

    + + +

    +

    + + +

    +

    + " /> + [] + + [] + + + + +

    +
    +
    + +

    + ', ''); ?> +

    + +
    +query("SELECT SSOAccountID FROM Users WHERE ID = " . $dbh->quote($uid)) + ->fetchColumn(); + if ($sso_account_id) + $redirect_uri = '/sso/logout'; + } +} + +header("Location: $redirect_uri"); + diff --git a/web/html/modified-rss.php b/web/html/modified-rss.php new file mode 100644 index 00000000..4c5c47e0 --- /dev/null +++ b/web/html/modified-rss.php @@ -0,0 +1,62 @@ +cssStyleSheet = false; +$rss->xslStyleSheet = false; + +# Use UTF-8 (fixes FS#10706). +$rss->encoding = "UTF-8"; + +#All the general RSS setup +$rss->title = "AUR Latest Modified Packages"; +$rss->description = "The latest modified packages in the AUR"; +$rss->link = "${protocol}://{$host}"; +$rss->syndicationURL = "{$protocol}://{$host}" . get_uri('/rss/'); +$image = new FeedImage(); +$image->title = "AUR Latest Modified Packages"; +$image->url = "{$protocol}://{$host}/css/archnavbar/aurlogo.png"; +$image->link = $rss->link; +$image->description = "AUR Latest Modified Packages Feed"; +$rss->image = $image; + +#Get the latest packages and add items for them +$packages = latest_modified_pkgs(100); + +foreach ($packages as $indx => $row) { + $item = new FeedItem(); + $item->title = $row["Name"]; + $item->link = "{$protocol}://{$host}" . get_pkg_uri($row["Name"]); + $item->description = $row["Description"]; + $item->date = intval($row["ModifiedTS"]); + $item->source = "{$protocol}://{$host}"; + $item->author = username_from_id($row["MaintainerUID"]); + $item->guidIsPermaLink = true; + $item->guid = $row["Name"] . "-" . $row["ModifiedTS"]; + $rss->addItem($item); +} + +#save it so that useCached() can find it +$feedContent = $rss->createFeed(); +set_cache_value($feed_key, $feedContent, 600); +echo $feedContent; +?> diff --git a/web/html/packages.php b/web/html/packages.php new file mode 100644 index 00000000..d19d2ad1 --- /dev/null +++ b/web/html/packages.php @@ -0,0 +1,174 @@ + + + + +\n"; + } +} else { + if (!isset($_GET['K']) && !isset($_GET['SB'])) { + $_GET['SB'] = 'p'; + $_GET['SO'] = 'd'; + } + echo '
    '; + if (isset($_COOKIE["AURSID"])) { + pkg_search_page($_GET, true, $_COOKIE["AURSID"]); + } else { + pkg_search_page($_GET, true); + } + echo '
    '; +} + +html_footer(AURWEB_VERSION); + diff --git a/web/html/passreset.php b/web/html/passreset.php new file mode 100644 index 00000000..26b9bbbb --- /dev/null +++ b/web/html/passreset.php @@ -0,0 +1,100 @@ + + +
    +

    + + +

    + +

    + + +
    + +
    + + + + + + + + + + + + + +
    +
    + +
    + +

    ', + ''); ?>

    + +
    + +
    +

    +

    + +
    + +
    + + $i) { + $id = intval($id); + if ($id > 0) { + $ids[] = $id; + } + } +} + +/* Perform package base actions. */ +$via = isset($_POST['via']) ? $_POST['via'] : NULL; +$return_to = isset($_POST['return_to']) ? $_POST['return_to'] : NULL; +$ret = false; +$output = ""; +$fragment = ""; +if (check_token()) { + if (current_action("do_Flag")) { + list($ret, $output) = pkgbase_flag($ids, $_POST['comments']); + } elseif (current_action("do_UnFlag")) { + list($ret, $output) = pkgbase_unflag($ids); + } elseif (current_action("do_Adopt")) { + list($ret, $output) = pkgbase_adopt($ids, true, NULL); + } elseif (current_action("do_Disown")) { + if (isset($_POST['confirm'])) { + list($ret, $output) = pkgbase_adopt($ids, false, $via); + } else { + $output = __("The selected packages have not been disowned, check the confirmation checkbox."); + $ret = false; + } + } elseif (current_action("do_DisownComaintainer")) { + $uid = uid_from_sid($_COOKIE["AURSID"]); + list($ret, $output) = pkgbase_remove_comaintainer($base_id, $uid); + } elseif (current_action("do_Vote")) { + list($ret, $output) = pkgbase_vote($ids, true); + } elseif (current_action("do_UnVote")) { + list($ret, $output) = pkgbase_vote($ids, false); + } elseif (current_action("do_Delete")) { + if (isset($_POST['confirm'])) { + if (!isset($_POST['merge_Into']) || empty($_POST['merge_Into'])) { + list($ret, $output) = pkgbase_delete($ids, NULL, $via); + unset($_GET['ID']); + unset($base_id); + } + else { + $merge_base_id = pkgbase_from_name($_POST['merge_Into']); + if (!$merge_base_id) { + $output = __("Cannot find package to merge votes and comments into."); + $ret = false; + } elseif (in_array($merge_base_id, $ids)) { + $output = __("Cannot merge a package base with itself."); + $ret = false; + } else { + list($ret, $output) = pkgbase_delete($ids, $merge_base_id, $via); + unset($_GET['ID']); + unset($base_id); + } + } + } + else { + $output = __("The selected packages have not been deleted, check the confirmation checkbox."); + $ret = false; + } + } elseif (current_action("do_Notify")) { + list($ret, $output) = pkgbase_notify($ids); + } elseif (current_action("do_UnNotify")) { + list($ret, $output) = pkgbase_notify($ids, false); + } elseif (current_action("do_DeleteComment")) { + list($ret, $output) = pkgbase_delete_comment(); + } elseif (current_action("do_UndeleteComment")) { + list($ret, $output) = pkgbase_delete_comment(true); + if ($ret && isset($_POST["comment_id"])) { + $fragment = '#comment-' . intval($_POST["comment_id"]); + } + } elseif (current_action("do_PinComment")) { + list($ret, $output) = pkgbase_pin_comment(); + } elseif (current_action("do_UnpinComment")) { + list($ret, $output) = pkgbase_pin_comment(true); + } elseif (current_action("do_SetKeywords")) { + list($ret, $output) = pkgbase_set_keywords($base_id, preg_split("/[\s,;]+/", $_POST['keywords'], -1, PREG_SPLIT_NO_EMPTY)); + } elseif (current_action("do_FileRequest")) { + list($ret, $output) = pkgreq_file($ids, $_POST['type'], $_POST['merge_into'], $_POST['comments']); + } elseif (current_action("do_CloseRequest")) { + list($ret, $output) = pkgreq_close($_POST['reqid'], $_POST['reason'], $_POST['comments']); + } elseif (current_action("do_EditComaintainers")) { + list($ret, $output) = pkgbase_set_comaintainers($base_id, explode("\n", $_POST['users'])); + } elseif (current_action("do_AddComment")) { + $uid = uid_from_sid($_COOKIE["AURSID"]); + list($ret, $output) = pkgbase_add_comment($base_id, $uid, $_REQUEST['comment']); + if ($ret && isset($_REQUEST['enable_notifications'])) { + list($ret, $output) = pkgbase_notify(array($base_id)); + } + $fragment = '#news'; + } elseif (current_action("do_EditComment")) { + list($ret, $output) = pkgbase_edit_comment($_REQUEST['comment']); + if ($ret && isset($_POST["comment_id"])) { + $fragment = '#comment-' . intval($_POST["comment_id"]); + } + } + + if ($ret) { + if (current_action("do_CloseRequest") || + (current_action("do_Delete") && $via)) { + /* Redirect back to package request page on success. */ + header('Location: ' . get_pkgreq_route()); + exit(); + } elseif ((current_action("do_DeleteComment") || + current_action("do_UndeleteComment")) && $return_to) { + header('Location: ' . $return_to); + exit(); + } elseif (current_action("do_PinComment") && $return_to) { + header('Location: ' . $return_to); + exit(); + } elseif (isset($base_id)) { + /* Redirect back to package base page on success. */ + header('Location: ' . get_pkgbase_uri($pkgbase_name) . $fragment); + exit(); + } else { + /* Redirect back to package search page. */ + header('Location: ' . get_pkg_route()); + exit(); + } + } +} + +if (isset($base_id)) { + $pkgs = pkgbase_get_pkgnames($base_id); + if (!$output && count($pkgs) == 1) { + /* Not a split package. Redirect to the package page. */ + if (empty($_SERVER['QUERY_STRING'])) { + header('Location: ' . get_pkg_uri($pkgs[0]) . $fragment); + } else { + header('Location: ' . get_pkg_uri($pkgs[0]) . '?' . $_SERVER['QUERY_STRING'] . $fragment); + } + } + + $details = pkgbase_get_details($base_id); +} else { + $details = array(); +} +html_header($title, $details); +?> + + + +

    + +
    + + + + +
    +

    :

    +

    + ', htmlspecialchars($pkgbase_name), ''); ?> +

    +
      + +
    • + +
    +

    + + +

    +
    +
    + + + + + + +

    +

    " />

    +
    +
    +
    + + +
    +

    :

    +

    + ', htmlspecialchars($pkgbase_name), ''); ?> +

    +
      + +
    • + +
    +

    + + + + 0 && !has_credential(CRED_PKGBASE_DISOWN)): ?> + ', $comaintainers[0], ''); ?> + + + +

    +
    +
    + + + + + + +

    " />

    +
    +
    +
    + + $i) { + $id = intval($id); + if ($id > 0) { + $ids[] = $id; + } + } +} + +/* Perform package base actions. */ +$ret = false; +$output = ""; +if (check_token()) { + if (current_action("do_Flag")) { + list($ret, $output) = pkgbase_flag($ids, $_POST['comments']); + } + + if ($ret) { + header('Location: ' . get_pkgbase_uri($pkgbase_name)); + exit(); + } +} + +/* Get default comment. */ +$comment = ''; +if (isset($_POST['comments'])) { + $comment = $_POST['comments']; +} + +html_header(__("Flag Package Out-Of-Date")); + +if (has_credential(CRED_PKGBASE_FLAG)): ?> +
    +

    :

    +

    + ', htmlspecialchars($pkgbase_name), ''); ?> +

    +
      + +
    • + +
    + +

    + This seems to be a VCS package. Please do not + flag it out-of-date if the package version in the AUR does not + match the most recent commit. Flagging this package should only + be done if the sources moved or changes in the PKGBUILD are + required because of recent upstream changes. +

    + +

    + ', ''); ?> + +

    + + +
    + + +
    +
    + + + +

    + + +

    +

    " />

    +
    +
    +
    + + +
    +

    :

    +

    + ', htmlspecialchars($pkgbase_name), ''); ?> + +

    +
      + +
    • + +
    +

    + + + +

    +
    +
    + + + + + + + + +

    +

    +

    +

    " />

    +
    +
    +
    + + 0) ? $_GET['PP'] : 50; + $current = ceil($first / $per_page); + $pages = ceil($total / $per_page); + $templ_pages = array(); + + if ($current > 1) { + $templ_pages['« ' . __('First')] = 0; + $templ_pages['‹ ' . __('Previous')] = ($current - 2) * $per_page; + } + + if ($current - 5 > 1) + $templ_pages["..."] = false; + + for ($i = max($current - 5, 1); $i <= min($pages, $current + 5); $i++) { + $templ_pages[$i] = ($i - 1) * $per_page; + } + + if ($current + 5 < $pages) + $templ_pages["... "] = false; + + if ($current < $pages) { + $templ_pages[__('Next') . ' ›'] = $current * $per_page; + $templ_pages[__('Last') . ' »'] = ($pages - 1) * $per_page; + } + + $SID = $_COOKIE['AURSID']; + + html_header(__("Requests")); + echo '
    '; + $show_headers = true; + include('pkgreq_results.php'); + echo '
    '; +} + +html_footer(AURWEB_VERSION); + diff --git a/web/html/register.php b/web/html/register.php new file mode 100644 index 00000000..fee0a68f --- /dev/null +++ b/web/html/register.php @@ -0,0 +1,87 @@ +'; +echo '

    ' . __('Register') . '

    '; + +if (in_request("Action") == "NewAccount") { + list($success, $message) = process_account_form( + "new", + "NewAccount", + in_request("U"), + 1, + 0, + in_request("E"), + in_request("BE"), + in_request("H"), + '', + '', + in_request("R"), + in_request("L"), + in_request("TZ"), + in_request("HP"), + in_request("I"), + in_request("K"), + in_request("PK"), + 0, + in_request("CN"), + in_request("UN"), + in_request("ON"), + 0, + "", + '', + in_request("captcha_salt"), + in_request("captcha"), + ); + + print $message; + + if (!$success) { + display_account_form("NewAccount", + in_request("U"), + 1, + 0, + in_request("E"), + in_request("BE"), + in_request("H"), + '', + '', + in_request("R"), + in_request("L"), + in_request("TZ"), + in_request("HP"), + in_request("I"), + in_request("K"), + in_request("PK"), + 0, + in_request("CN"), + in_request("UN"), + in_request("ON"), + 0, + "", + '', + in_request("captcha_salt"), + in_request("captcha") + ); + } +} else { + print '

    ' . __("Use this form to create an account.") . '

    '; + display_account_form("NewAccount", "", "", "", "", "", "", "", "", "", $LANG); +} + +echo ''; + +html_footer(AURWEB_VERSION); + +?> diff --git a/web/html/rpc.php b/web/html/rpc.php new file mode 100644 index 00000000..64c95622 --- /dev/null +++ b/web/html/rpc.php @@ -0,0 +1,17 @@ +handle($_GET); +} +else { + echo file_get_contents('../../doc/rpc.html'); +} +?> diff --git a/web/html/rss.php b/web/html/rss.php new file mode 100644 index 00000000..1e6335cf --- /dev/null +++ b/web/html/rss.php @@ -0,0 +1,61 @@ +cssStyleSheet = false; +$rss->xslStyleSheet = false; + +# Use UTF-8 (fixes FS#10706). +$rss->encoding = "UTF-8"; + +#All the general RSS setup +$rss->title = "AUR Newest Packages"; +$rss->description = "The latest and greatest packages in the AUR"; +$rss->link = "${protocol}://{$host}"; +$rss->syndicationURL = "{$protocol}://{$host}" . get_uri('/rss/'); +$image = new FeedImage(); +$image->title = "AUR Newest Packages"; +$image->url = "{$protocol}://{$host}/css/archnavbar/aurlogo.png"; +$image->link = $rss->link; +$image->description = "AUR Newest Packages Feed"; +$rss->image = $image; + +#Get the latest packages and add items for them +$packages = latest_pkgs(100); + +foreach ($packages as $indx => $row) { + $item = new FeedItem(); + $item->title = $row["Name"]; + $item->link = "{$protocol}://{$host}" . get_pkg_uri($row["Name"]); + $item->description = $row["Description"]; + $item->date = intval($row["SubmittedTS"]); + $item->source = "{$protocol}://{$host}"; + $item->author = username_from_id($row["MaintainerUID"]); + $item->guid = $item->link; + $rss->addItem($item); +} + +#save it so that useCached() can find it +$feedContent = $rss->createFeed(); +set_cache_value($feed_key, $feedContent, 600); +echo $feedContent; +?> diff --git a/web/html/tos.php b/web/html/tos.php new file mode 100644 index 00000000..fc5d8765 --- /dev/null +++ b/web/html/tos.php @@ -0,0 +1,50 @@ + +
    +

    AUR

    + +
    +
    +

    + ' . username_from_sid($_COOKIE["AURSID"]) . ''); ?> +

    +

    + +

    +
      + +
    • "> ()
    • + +
    +

    + + ]" value="" /> + + +

    +

    + " /> +

    +
    +
    + +
    + time() ? 1 : 0; + + # List voters of a proposal. + $whovoted = voter_list($row['ID']); + + $canvote = 1; + $hasvoted = 0; + $errorvote = ""; + if ($isrunning == 0) { + $canvote = 0; + $errorvote = __("Voting is closed for this proposal."); + } else if (!has_credential(CRED_TU_VOTE)) { + $canvote = 0; + $errorvote = __("Only Trusted Users are allowed to vote."); + } else if ($row['User'] == username_from_sid($_COOKIE["AURSID"])) { + $canvote = 0; + $errorvote = __("You cannot vote in an proposal about you."); + } + if (tu_voted($row['ID'], uid_from_sid($_COOKIE["AURSID"]))) { + $canvote = 0; + $hasvoted = 1; + if ($isrunning) { + $errorvote = __("You've already voted for this proposal."); + } + } + + if ($canvote == 1) { + if (isset($_POST['doVote']) && check_token()) { + if (isset($_POST['voteYes'])) { + $myvote = "Yes"; + } else if (isset($_POST['voteNo'])) { + $myvote = "No"; + } else if (isset($_POST['voteAbstain'])) { + $myvote = "Abstain"; + } + + cast_proposal_vote($row['ID'], uid_from_sid($_COOKIE["AURSID"]), $myvote, $row[$myvote] + 1); + + # Can't vote anymore + # + $canvote = 0; + $errorvote = __("You've already voted for this proposal."); + + # Update if they voted + if (tu_voted($row['ID'], uid_from_sid($_COOKIE["AURSID"]))) { + $hasvoted = 1; + } + $row = vote_details($_GET['id']); + } + } + include("tu_details.php"); + } + } else { + print __("Vote ID not valid."); + } + + } else { + $limit = $pp; + if (isset($_GET['off'])) + $offset = $_GET['off']; + + if (isset($_GET['by'])) + $by = $_GET['by']; + else + $by = 'desc'; + + if (!empty($offset) && is_numeric($offset)) { + if ($offset >= 1) { + $off = $offset; + } else { + $off = 0; + } + } else { + $off = 0; + } + + $order = ($by == 'asc') ? 'ASC' : 'DESC'; + $lim = ($limit > 0) ? " LIMIT $limit OFFSET $off" : ""; + $by_next = ($by == 'desc') ? 'asc' : 'desc'; + + $result = current_proposal_list($order); + $type = __("Current Votes"); + $nextresult = 0; + include("tu_list.php"); + + $result = past_proposal_list($order, $lim); + $type = __("Past Votes"); + $nextresult = proposal_count(); + include("tu_list.php"); + + $result = last_votes_list(); + include("tu_last_votes_list.php"); + } +} +else { + header('Location: /'); +} + +html_footer(AURWEB_VERSION); + diff --git a/web/html/voters.php b/web/html/voters.php new file mode 100644 index 00000000..bacbcfc8 --- /dev/null +++ b/web/html/voters.php @@ -0,0 +1,34 @@ + + +
    +

    Votes for

    +
    +
      + $row): ?> +
    • + + 0): ?> + () + +
    • + +
    +
    +
    + +exec("SET NAMES 'utf8' COLLATE 'utf8_general_ci';"); + } else if ($backend == "sqlite") { + $dsn = $backend . + ":" . $name; + + self::$dbh = new PDO($dsn, null, null); + } else { + die("Error - " . $backend . " is not supported by aurweb"); + } + + } catch (PDOException $e) { + die('Error - Could not connect to AUR database'); + } + } + + return self::$dbh; + } +} diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php new file mode 100644 index 00000000..0d021f99 --- /dev/null +++ b/web/lib/acctfuncs.inc.php @@ -0,0 +1,1522 @@ +\n" + . "
  • " . __("It must be between %s and %s characters long", $length_min, $length_max) + . "
  • " + . "
  • " . __("Start and end with a letter or number") . "
  • " + . "
  • " . __("Can contain only one period, underscore or hyphen.") + . "
  • \n"; + } + + if (!$error && $P && !$C) { + $error = __("Please confirm your new password."); + } + if (!$error && $P && $P != $C) { + $error = __("Password fields do not match."); + } + if (!$error && $P != '' && !good_passwd($P)) { + $length_min = config_get_int('options', 'passwd_min_len'); + $error = __("Your password must be at least %s characters.", + $length_min); + } + + if (!$error && !valid_email($E)) { + $error = __("The email address is invalid."); + } + if (!$error && $BE && !valid_email($BE)) { + $error = __("The backup email address is invalid."); + } + + if (!$error && !empty($HP) && !valid_homepage($HP)) { + $error = __("The home page is invalid, please specify the full HTTP(s) URL."); + } + + if (!$error && $K != '' && !valid_pgp_fingerprint($K)) { + $error = __("The PGP key fingerprint is invalid."); + } + + if (!$error && !empty($PK)) { + $ssh_keys = array_filter(array_map('trim', explode("\n", $PK))); + $ssh_fingerprints = array(); + + foreach ($ssh_keys as &$ssh_key) { + if (!valid_ssh_pubkey($ssh_key)) { + $error = __("The SSH public key is invalid."); + break; + } + + $ssh_fingerprint = ssh_key_fingerprint($ssh_key); + if (!$ssh_fingerprint) { + $error = __("The SSH public key is invalid."); + break; + } + + $tokens = explode(" ", $ssh_key); + $ssh_key = $tokens[0] . " " . $tokens[1]; + + $ssh_fingerprints[] = $ssh_fingerprint; + } + + /* + * Destroy last reference to prevent accidentally overwriting + * an array element. + */ + unset($ssh_key); + } + + if (isset($_COOKIE['AURSID'])) { + $atype = account_from_sid($_COOKIE['AURSID']); + if (($atype == "User" && $T > 1) || ($atype == "Trusted User" && $T > 2)) { + $error = __("Cannot increase account permissions."); + } + } + + if (!$error && !array_key_exists($L, $SUPPORTED_LANGS)) { + $error = __("Language is not currently supported."); + } + if (!$error && !array_key_exists($TZ, generate_timezone_list())) { + $error = __("Timezone is not currently supported."); + } + if (!$error) { + /* + * Check whether the user name is available. + * TODO: Fix race condition. + */ + $q = "SELECT COUNT(*) AS CNT FROM Users "; + $q.= "WHERE Username = " . $dbh->quote($U); + if ($TYPE == "edit") { + $q.= " AND ID != ".intval($UID); + } + $result = $dbh->query($q); + $row = $result->fetch(PDO::FETCH_NUM); + + if ($row[0]) { + $error = __("The username, %s%s%s, is already in use.", + "", htmlspecialchars($U,ENT_QUOTES), ""); + } + } + if (!$error) { + /* + * Check whether the e-mail address is available. + * TODO: Fix race condition. + */ + $q = "SELECT COUNT(*) AS CNT FROM Users "; + $q.= "WHERE Email = " . $dbh->quote($E); + if ($TYPE == "edit") { + $q.= " AND ID != ".intval($UID); + } + $result = $dbh->query($q); + $row = $result->fetch(PDO::FETCH_NUM); + + if ($row[0]) { + $error = __("The address, %s%s%s, is already in use.", + "", htmlspecialchars($E,ENT_QUOTES), ""); + } + } + if (!$error && isset($ssh_keys) && count($ssh_keys) > 0) { + /* + * Check whether any of the SSH public keys is already in use. + * TODO: Fix race condition. + */ + $q = "SELECT Fingerprint FROM SSHPubKeys "; + $q.= "WHERE Fingerprint IN ("; + $q.= implode(',', array_map(array($dbh, 'quote'), $ssh_fingerprints)); + $q.= ")"; + if ($TYPE == "edit") { + $q.= " AND UserID != " . intval($UID); + } + $result = $dbh->query($q); + $row = $result->fetch(PDO::FETCH_NUM); + + if ($row) { + $error = __("The SSH public key, %s%s%s, is already in use.", + "", htmlspecialchars($row[0], ENT_QUOTES), ""); + } + } + + if (!$error && $TYPE == "new" && empty($captcha)) { + $error = __("The CAPTCHA is missing."); + } + + if (!$error && $TYPE == "new" && !in_array($captcha_salt, get_captcha_salts())) { + $error = __("This CAPTCHA has expired. Please try again."); + } + + if (!$error && $TYPE == "new" && $captcha != get_captcha_answer($captcha_salt)) { + $error = __("The entered CAPTCHA answer is invalid."); + } + + if ($error) { + $message = "
    • ".$error."
    \n"; + return array(false, $message); + } + + if ($TYPE == "new") { + /* Create an unprivileged user. */ + if (empty($P)) { + $send_resetkey = true; + $email = $E; + } else { + $send_resetkey = false; + $P = password_hash($P, PASSWORD_DEFAULT); + } + $U = $dbh->quote($U); + $E = $dbh->quote($E); + $BE = $dbh->quote($BE); + $P = $dbh->quote($P); + $R = $dbh->quote($R); + $L = $dbh->quote($L); + $TZ = $dbh->quote($TZ); + $HP = $dbh->quote($HP); + $I = $dbh->quote($I); + $K = $dbh->quote(str_replace(" ", "", $K)); + $q = "INSERT INTO Users (AccountTypeID, Suspended, "; + $q.= "InactivityTS, Username, Email, BackupEmail, Passwd , "; + $q.= "RealName, LangPreference, Timezone, Homepage, IRCNick, PGPKey) "; + $q.= "VALUES (1, 0, 0, $U, $E, $BE, $P, $R, $L, $TZ, "; + $q.= "$HP, $I, $K)"; + $result = $dbh->exec($q); + if (!$result) { + $message = __("Error trying to create account, %s%s%s.", + "", htmlspecialchars($U,ENT_QUOTES), ""); + return array(false, $message); + } + + $uid = $dbh->lastInsertId(); + if (isset($ssh_keys) && count($ssh_keys) > 0) { + account_set_ssh_keys($uid, $ssh_keys, $ssh_fingerprints); + } + + $message = __("The account, %s%s%s, has been successfully created.", + "", htmlspecialchars($U,ENT_QUOTES), ""); + $message .= "

    \n"; + + if ($send_resetkey) { + send_resetkey($email, true); + $message .= __("A password reset key has been sent to your e-mail address."); + $message .= "

    \n"; + } else { + $message .= __("Click on the Login link above to use your account."); + $message .= "

    \n"; + } + } else { + /* Modify an existing account. */ + $q = "SELECT InactivityTS FROM Users WHERE "; + $q.= "ID = " . intval($UID); + $result = $dbh->query($q); + $row = $result->fetch(PDO::FETCH_NUM); + if ($row[0] && $J) { + $inactivity_ts = $row[0]; + } elseif ($J) { + $inactivity_ts = time(); + } else { + $inactivity_ts = 0; + } + + $q = "UPDATE Users SET "; + $q.= "Username = " . $dbh->quote($U); + if ($T) { + $q.= ", AccountTypeID = ".intval($T); + } + if ($S) { + /* Ensure suspended users can't keep an active session */ + delete_user_sessions($UID); + $q.= ", Suspended = 1"; + } else { + $q.= ", Suspended = 0"; + } + $q.= ", Email = " . $dbh->quote($E); + $q.= ", BackupEmail = " . $dbh->quote($BE); + if ($H) { + $q.= ", HideEmail = 1"; + } else { + $q.= ", HideEmail = 0"; + } + if ($P) { + $hash = password_hash($P, PASSWORD_DEFAULT); + $q .= ", Passwd = " . $dbh->quote($hash); + } + $q.= ", RealName = " . $dbh->quote($R); + $q.= ", LangPreference = " . $dbh->quote($L); + $q.= ", Timezone = " . $dbh->quote($TZ); + $q.= ", Homepage = " . $dbh->quote($HP); + $q.= ", IRCNick = " . $dbh->quote($I); + $q.= ", PGPKey = " . $dbh->quote(str_replace(" ", "", $K)); + $q.= ", InactivityTS = " . $inactivity_ts; + $q.= ", CommentNotify = " . ($CN ? "1" : "0"); + $q.= ", UpdateNotify = " . ($UN ? "1" : "0"); + $q.= ", OwnershipNotify = " . ($ON ? "1" : "0"); + $q.= " WHERE ID = ".intval($UID); + $result = $dbh->exec($q); + + if (isset($ssh_keys) && count($ssh_keys) > 0) { + $ssh_key_result = account_set_ssh_keys($UID, $ssh_keys, $ssh_fingerprints); + } else { + $ssh_key_result = true; + } + + if (isset($_COOKIE["AURTZ"]) && ($_COOKIE["AURTZ"] != $TZ)) { + /* set new cookie for timezone */ + $timeout = intval(config_get("options", "persistent_cookie_timeout")); + $cookie_time = time() + $timeout; + setcookie("AURTZ", $TZ, $cookie_time, "/"); + } + + if (isset($_COOKIE["AURLANG"]) && ($_COOKIE["AURLANG"] != $L)) { + /* set new cookie for language */ + $timeout = intval(config_get("options", "persistent_cookie_timeout")); + $cookie_time = time() + $timeout; + setcookie("AURLANG", $L, $cookie_time, "/"); + } + + if ($result === false || $ssh_key_result === false) { + $message = __("No changes were made to the account, %s%s%s.", + "", htmlspecialchars($U,ENT_QUOTES), ""); + } else { + $message = __("The account, %s%s%s, has been successfully modified.", + "", htmlspecialchars($U,ENT_QUOTES), ""); + } + } + + return array(true, $message); +} + +/** + * Display the search results page + * + * @param string $O The offset for the results page + * @param string $SB The column to sort the results page by + * @param string $U The username search criteria + * @param string $T The account type search criteria + * @param string $S Whether the account is suspended search criteria + * @param string $E The e-mail address search criteria + * @param string $R The real name search criteria + * @param string $I The IRC nickname search criteria + * @param string $K The PGP key fingerprint search criteria + * + * @return void + */ +function search_results_page($O=0,$SB="",$U="",$T="", + $S="",$E="",$R="",$I="",$K="") { + + $HITS_PER_PAGE = 50; + if ($O) { + $OFFSET = intval($O); + } else { + $OFFSET = 0; + } + if ($OFFSET < 0) { + $OFFSET = 0; + } + $search_vars = array(); + + $dbh = DB::connect(); + + $q = "SELECT Users.*, AccountTypes.AccountType "; + $q.= "FROM Users, AccountTypes "; + $q.= "WHERE AccountTypes.ID = Users.AccountTypeID "; + if ($T == "u") { + $q.= "AND AccountTypes.ID = 1 "; + $search_vars[] = "T"; + } elseif ($T == "t") { + $q.= "AND AccountTypes.ID = 2 "; + $search_vars[] = "T"; + } elseif ($T == "d") { + $q.= "AND AccountTypes.ID = 3 "; + $search_vars[] = "T"; + } elseif ($T == "td") { + $q.= "AND AccountTypes.ID = 4 "; + $search_vars[] = "T"; + } + if ($S) { + $q.= "AND Users.Suspended = 1 "; + $search_vars[] = "S"; + } + if ($U) { + $U = "%" . addcslashes($U, '%_') . "%"; + $q.= "AND Username LIKE " . $dbh->quote($U) . " "; + $search_vars[] = "U"; + } + if ($E) { + $E = "%" . addcslashes($E, '%_') . "%"; + $q.= "AND Email LIKE " . $dbh->quote($E) . " "; + $search_vars[] = "E"; + } + if ($R) { + $R = "%" . addcslashes($R, '%_') . "%"; + $q.= "AND RealName LIKE " . $dbh->quote($R) . " "; + $search_vars[] = "R"; + } + if ($I) { + $I = "%" . addcslashes($I, '%_') . "%"; + $q.= "AND IRCNick LIKE " . $dbh->quote($I) . " "; + $search_vars[] = "I"; + } + if ($K) { + $K = "%" . addcslashes(str_replace(" ", "", $K), '%_') . "%"; + $q.= "AND PGPKey LIKE " . $dbh->quote($K) . " "; + $search_vars[] = "K"; + } + switch ($SB) { + case 't': + $q.= "ORDER BY AccountTypeID, Username "; + break; + case 'r': + $q.= "ORDER BY RealName, AccountTypeID "; + break; + case 'i': + $q.= "ORDER BY IRCNick, AccountTypeID "; + break; + default: + $q.= "ORDER BY Username, AccountTypeID "; + break; + } + $search_vars[] = "SB"; + $q.= "LIMIT " . $HITS_PER_PAGE . " OFFSET " . $OFFSET; + + $dbh = DB::connect(); + + $result = $dbh->query($q); + + $userinfo = array(); + if ($result) { + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $userinfo[] = $row; + } + } + + include("account_search_results.php"); + return; +} + +/** + * Attempt to login and generate a session + * + * @return array Session ID for user, error message if applicable + */ +function try_login() { + $login_error = ""; + $new_sid = ""; + $userID = null; + + if (!isset($_REQUEST['user']) && !isset($_REQUEST['passwd'])) { + return array('SID' => '', 'error' => null); + } + + if (is_ipbanned()) { + $login_error = __('The login form is currently disabled ' . + 'for your IP address, probably due ' . + 'to sustained spam attacks. Sorry for the ' . + 'inconvenience.'); + return array('SID' => '', 'error' => $login_error); + } + + $dbh = DB::connect(); + $userID = uid_from_loginname($_REQUEST['user']); + + if (user_suspended($userID)) { + $login_error = __('Account suspended'); + return array('SID' => '', 'error' => $login_error); + } + + switch (check_passwd($userID, $_REQUEST['passwd'])) { + case -1: + $login_error = __('Your password has been reset. ' . + 'If you just created a new account, please ' . + 'use the link from the confirmation email ' . + 'to set an initial password. Otherwise, ' . + 'please request a reset key on the %s' . + 'Password Reset%s page.', '', + ''); + return array('SID' => '', 'error' => $login_error); + case 0: + $login_error = __("Bad username or password."); + return array('SID' => '', 'error' => $login_error); + case 1: + break; + } + + $logged_in = 0; + $num_tries = 0; + + /* Generate a session ID and store it. */ + while (!$logged_in && $num_tries < 5) { + $new_sid = new_sid(); + $q = "INSERT INTO Sessions (UsersID, SessionID, LastUpdateTS)" + ." VALUES (" . $userID . ", '" . $new_sid . "', " . strval(time()) . ")"; + $result = $dbh->exec($q); + + /* Query will fail if $new_sid is not unique. */ + if ($result) { + $logged_in = 1; + break; + } + + $num_tries++; + } + + if (!$logged_in) { + $login_error = __('An error occurred trying to generate a user session.'); + return array('SID' => $new_sid, 'error' => $login_error); + } + + $q = "UPDATE Users SET LastLogin = " . strval(time()) . ", "; + $q.= "LastLoginIPAddress = " . $dbh->quote($_SERVER['REMOTE_ADDR']) . " "; + $q.= "WHERE ID = $userID"; + $dbh->exec($q); + + /* Set the SID cookie. */ + if (isset($_POST['remember_me']) && $_POST['remember_me'] == "on") { + /* Set cookies for 30 days. */ + $timeout = config_get_int('options', 'persistent_cookie_timeout'); + $cookie_time = time() + $timeout; + + /* Set session for 30 days. */ + $q = "UPDATE Sessions SET LastUpdateTS = $cookie_time "; + $q.= "WHERE SessionID = '$new_sid'"; + $dbh->exec($q); + } else { + $cookie_time = 0; + } + + setcookie("AURSID", $new_sid, $cookie_time, "/", null, !empty($_SERVER['HTTPS']), true); + + $referer = in_request('referer'); + if (strpos($referer, aur_location()) !== 0) { + $referer = '/'; + } + header("Location: " . get_uri($referer)); + $login_error = ""; + return array('SID' => $new_sid, 'error' => null); +} + +/** + * Determine if the user is using a banned IP address + * + * @return bool True if IP address is banned, otherwise false + */ +function is_ipbanned() { + $dbh = DB::connect(); + + $q = "SELECT * FROM Bans WHERE IPAddress = " . $dbh->quote($_SERVER['REMOTE_ADDR']); + $result = $dbh->query($q); + + return ($result->fetchColumn() ? true : false); +} + +/** + * Validate a username against a collection of rules + * + * The username must be longer or equal to the configured minimum length. It + * must be shorter or equal to the configured maximum length. It must start and + * end with either a letter or a number. It can contain one period, hypen, or + * underscore. Returns boolean of whether name is valid. + * + * @param string $user Username to validate + * + * @return bool True if username meets criteria, otherwise false + */ +function valid_username($user) { + $length_min = config_get_int('options', 'username_min_len'); + $length_max = config_get_int('options', 'username_max_len'); + + if (strlen($user) < $length_min || strlen($user) > $length_max) { + return false; + } else if (!preg_match("/^[a-z0-9]+[.\-_]?[a-z0-9]+$/Di", $user)) { + return false; + } + + return true; +} + +/** + * Determine if a user already has a proposal open about themselves + * + * @param string $user Username to checkout for open proposal + * + * @return bool True if there is an open proposal about the user, otherwise false + */ +function open_user_proposals($user) { + $dbh = DB::connect(); + $q = "SELECT * FROM TU_VoteInfo WHERE User = " . $dbh->quote($user) . " "; + $q.= "AND End > " . strval(time()); + $result = $dbh->query($q); + + return ($result->fetchColumn() ? true : false); +} + +/** + * Add a new Trusted User proposal to the database + * + * @param string $agenda The agenda of the vote + * @param string $user The use the vote is about + * @param int $votelength The length of time for the vote to last + * @param string $submitteruid The user ID of the individual who submitted the proposal + * + * @return void + */ +function add_tu_proposal($agenda, $user, $votelength, $quorum, $submitteruid) { + $dbh = DB::connect(); + + $q = "SELECT COUNT(*) FROM Users WHERE (AccountTypeID = 2 OR AccountTypeID = 4)"; + $result = $dbh->query($q); + $row = $result->fetch(PDO::FETCH_NUM); + $active_tus = $row[0]; + + $q = "INSERT INTO TU_VoteInfo (Agenda, User, Submitted, End, Quorum, "; + $q.= "SubmitterID, ActiveTUs) VALUES "; + $q.= "(" . $dbh->quote($agenda) . ", " . $dbh->quote($user) . ", "; + $q.= strval(time()) . ", " . strval(time()) . " + " . $dbh->quote($votelength); + $q.= ", " . $dbh->quote($quorum) . ", " . $submitteruid . ", "; + $q.= $active_tus . ")"; + $result = $dbh->exec($q); +} + +/** + * Add a reset key to the database for a specified user + * + * @param string $resetkey A password reset key to be stored in database + * @param string $uid The user ID to store the reset key for + * + * @return void + */ +function create_resetkey($resetkey, $uid) { + $dbh = DB::connect(); + $q = "UPDATE Users "; + $q.= "SET ResetKey = '" . $resetkey . "' "; + $q.= "WHERE ID = " . $uid; + $dbh->exec($q); +} + +/** + * Send a reset key to a specific e-mail address + * + * @param string $user User name or email address of the user + * @param bool $welcome Whether to use the welcome message + * + * @return void + */ +function send_resetkey($user, $welcome=false) { + $uid = uid_from_loginname($user); + if ($uid == null) { + return; + } + + /* We (ab)use new_sid() to get a random 32 characters long string. */ + $resetkey = new_sid(); + create_resetkey($resetkey, $uid); + + /* Send e-mail with confirmation link. */ + notify(array($welcome ? 'welcome' : 'send-resetkey', $uid)); +} + +/** + * Change a user's password in the database if reset key and e-mail are correct + * + * @param string $password The new password + * @param string $resetkey Code e-mailed to a user to reset a password + * @param string $user User name or email address of the user + * + * @return string|void Redirect page if successful, otherwise return error message + */ +function password_reset($password, $resetkey, $user) { + $hash = password_hash($password, PASSWORD_DEFAULT); + + $dbh = DB::connect(); + $q = "UPDATE Users SET "; + $q.= "Passwd = " . $dbh->quote($hash) . ", "; + $q.= "ResetKey = '' "; + $q.= "WHERE ResetKey != '' "; + $q.= "AND ResetKey = " . $dbh->quote($resetkey) . " "; + $q.= "AND (Email = " . $dbh->quote($user) . " OR "; + $q.= "UserName = " . $dbh->quote($user) . ")"; + $result = $dbh->exec($q); + + if (!$result) { + $error = __('Invalid e-mail and reset key combination.'); + return $error; + } else { + header('Location: ' . get_uri('/passreset/') . '?step=complete'); + exit(); + } +} + +/** + * Determine if the password is longer than the minimum length + * + * @param string $passwd The password to check + * + * @return bool True if longer than minimum length, otherwise false + */ +function good_passwd($passwd) { + $length_min = config_get_int('options', 'passwd_min_len'); + return (strlen($passwd) >= $length_min); +} + +/** + * Determine if the password is correct and salt it if it hasn't been already + * + * @param int $user_id The user ID to check the password against + * @param string $passwd The password the visitor sent + * + * @return int Positive if password is correct, negative if password is unset + */ +function check_passwd($user_id, $passwd) { + $dbh = DB::connect(); + + /* Get password hash and salt. */ + $q = "SELECT Passwd, Salt FROM Users WHERE ID = " . intval($user_id); + $result = $dbh->query($q); + if (!$result) { + return 0; + } + $row = $result->fetch(PDO::FETCH_ASSOC); + if (!$row) { + return 0; + } + $hash = $row['Passwd']; + $salt = $row['Salt']; + if (!$hash) { + return -1; + } + + /* Verify the password hash. */ + if (!password_verify($passwd, $hash)) { + /* Invalid password, fall back to MD5. */ + if (md5($salt . $passwd) != $hash) { + return 0; + } + } + + /* Password correct, migrate the hash if necessary. */ + if (password_needs_rehash($hash, PASSWORD_DEFAULT)) { + $hash = password_hash($passwd, PASSWORD_DEFAULT); + + $q = "UPDATE Users SET Passwd = " . $dbh->quote($hash) . " "; + $q.= "WHERE ID = " . intval($user_id); + $dbh->query($q); + } + + return 1; +} + +/** + * Determine if the PGP key fingerprint is valid (must be 40 hexadecimal digits) + * + * @param string $fingerprint PGP fingerprint to check if valid + * + * @return bool True if the fingerprint is 40 hexadecimal digits, otherwise false + */ +function valid_pgp_fingerprint($fingerprint) { + $fingerprint = str_replace(" ", "", $fingerprint); + return (strlen($fingerprint) == 40 && ctype_xdigit($fingerprint)); +} + +/** + * Determine if the SSH public key is valid + * + * @param string $pubkey SSH public key to check + * + * @return bool True if the SSH public key is valid, otherwise false + */ +function valid_ssh_pubkey($pubkey) { + $valid_prefixes = explode(' ', config_get('auth', 'valid-keytypes')); + + $has_valid_prefix = false; + foreach ($valid_prefixes as $prefix) { + if (strpos($pubkey, $prefix . " ") === 0) { + $has_valid_prefix = true; + break; + } + } + if (!$has_valid_prefix) { + return false; + } + + $tokens = explode(" ", $pubkey); + if (empty($tokens[1])) { + return false; + } + + return (base64_encode(base64_decode($tokens[1], true)) == $tokens[1]); +} + +/** + * Determine if the user account has been suspended + * + * @param string $id The ID of user to check if suspended + * + * @return bool True if the user is suspended, otherwise false + */ +function user_suspended($id) { + $dbh = DB::connect(); + if (!$id) { + return false; + } + $q = "SELECT Suspended FROM Users WHERE ID = " . $id; + $result = $dbh->query($q); + if ($result) { + $row = $result->fetch(PDO::FETCH_NUM); + if ($row[0]) { + return true; + } + } + return false; +} + +/** + * Delete a specified user account from the database + * + * @param int $id The user ID of the account to be deleted + * + * @return void + */ +function user_delete($id) { + $dbh = DB::connect(); + $id = intval($id); + + /* + * These are normally already taken care of by propagation constraints + * but it is better to be explicit here. + */ + $fields_delete = array( + array("Sessions", "UsersID"), + array("PackageVotes", "UsersID"), + array("PackageNotifications", "UserID") + ); + + $fields_set_null = array( + array("PackageBases", "SubmitterUID"), + array("PackageBases", "MaintainerUID"), + array("PackageBases", "PackagerUID"), + array("PackageComments", "UsersID"), + array("PackageComments", "DelUsersID"), + array("PackageRequests", "UsersID"), + array("TU_VoteInfo", "SubmitterID"), + array("TU_Votes", "UserID") + ); + + foreach($fields_delete as list($table, $field)) { + $q = "DELETE FROM " . $table . " "; + $q.= "WHERE " . $field . " = " . $id; + $dbh->query($q); + } + + foreach($fields_set_null as list($table, $field)) { + $q = "UPDATE " . $table . " SET " . $field . " = NULL "; + $q.= "WHERE " . $field . " = " . $id; + $dbh->query($q); + } + + $q = "DELETE FROM Users WHERE ID = " . $id; + $dbh->query($q); + return; +} + +/** + * Remove the session from the database on logout + * + * @param string $sid User's session ID + * + * @return void + */ +function delete_session_id($sid) { + $dbh = DB::connect(); + + $q = "DELETE FROM Sessions WHERE SessionID = " . $dbh->quote($sid); + $dbh->query($q); +} + +/** + * Remove all sessions belonging to a particular user + * + * @param int $uid ID of user to remove all sessions for + * + * @return void + */ +function delete_user_sessions($uid) { + $dbh = DB::connect(); + + $q = "DELETE FROM Sessions WHERE UsersID = " . intval($uid); + $dbh->exec($q); +} + +/** + * Remove sessions from the database that have exceed the timeout + * + * @return void + */ +function clear_expired_sessions() { + $dbh = DB::connect(); + + $timeout = config_get_int('options', 'login_timeout'); + $q = "DELETE FROM Sessions WHERE LastUpdateTS < (" . strval(time()) . " - " . $timeout . ")"; + $dbh->query($q); + + return; +} + +/** + * Get account details for a specific user + * + * @param string $uid The User ID of account to get information for + * @param string $username The username of the account to get for + * + * @return array Account details for the specified user + */ +function account_details($uid, $username) { + $dbh = DB::connect(); + $q = "SELECT Users.*, AccountTypes.AccountType "; + $q.= "FROM Users, AccountTypes "; + $q.= "WHERE AccountTypes.ID = Users.AccountTypeID "; + if (!empty($uid)) { + $q.= "AND Users.ID = ".intval($uid); + } else { + $q.= "AND Users.Username = " . $dbh->quote($username); + } + $result = $dbh->query($q); + + if ($result) { + $row = $result->fetch(PDO::FETCH_ASSOC); + } + + return $row; +} + +/** + * Determine if a user has already voted on a specific proposal + * + * @param string $voteid The ID of the Trusted User proposal + * @param string $uid The ID to check if the user already voted + * + * @return bool True if the user has already voted, otherwise false + */ +function tu_voted($voteid, $uid) { + $dbh = DB::connect(); + + $q = "SELECT COUNT(*) FROM TU_Votes "; + $q.= "WHERE VoteID = " . intval($voteid) . " AND UserID = " . intval($uid); + $result = $dbh->query($q); + if ($result->fetchColumn() > 0) { + return true; + } + else { + return false; + } +} + +/** + * Get all current Trusted User proposals from the database + * + * @param string $order Ascending or descending order for the proposal listing + * + * @return array The details for all current Trusted User proposals + */ +function current_proposal_list($order) { + $dbh = DB::connect(); + + $q = "SELECT * FROM TU_VoteInfo WHERE End > " . time() . " ORDER BY Submitted " . $order; + $result = $dbh->query($q); + + $details = array(); + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $details[] = $row; + } + + return $details; +} + +/** + * Get a subset of all past Trusted User proposals from the database + * + * @param string $order Ascending or descending order for the proposal listing + * @param string $lim The number of proposals to list with the offset + * + * @return array The details for the subset of past Trusted User proposals + */ +function past_proposal_list($order, $lim) { + $dbh = DB::connect(); + + $q = "SELECT * FROM TU_VoteInfo WHERE End < " . time() . " ORDER BY Submitted " . $order . $lim; + $result = $dbh->query($q); + + $details = array(); + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $details[] = $row; + } + + return $details; +} + +/** + * Get the vote ID of the last vote of all Trusted Users + * + * @return array The vote ID of the last vote of each Trusted User + */ +function last_votes_list() { + $dbh = DB::connect(); + + $q = "SELECT UserID, MAX(VoteID) AS LastVote FROM TU_Votes, "; + $q .= "TU_VoteInfo, Users WHERE TU_VoteInfo.ID = TU_Votes.VoteID AND "; + $q .= "TU_VoteInfo.End < " . strval(time()) . " AND "; + $q .= "Users.ID = TU_Votes.UserID AND (Users.AccountTypeID = 2 OR Users.AccountTypeID = 4) "; + $q .= "GROUP BY UserID ORDER BY LastVote DESC, UserName ASC"; + $result = $dbh->query($q); + + $details = array(); + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $details[] = $row; + } + + return $details; +} + +/** + * Determine the total number of Trusted User proposals + * + * @return string The total number of Trusted User proposals + */ +function proposal_count() { + $dbh = DB::connect(); + $q = "SELECT COUNT(*) FROM TU_VoteInfo"; + $result = $dbh->query($q); + $row = $result->fetch(PDO::FETCH_NUM); + + return $row[0]; +} + +/** + * Get all details related to a specific vote from the database + * + * @param string $voteid The ID of the Trusted User proposal + * + * @return array All stored details for a specific vote + */ +function vote_details($voteid) { + $dbh = DB::connect(); + + $q = "SELECT * FROM TU_VoteInfo "; + $q.= "WHERE ID = " . intval($voteid); + + $result = $dbh->query($q); + $row = $result->fetch(PDO::FETCH_ASSOC); + + return $row; +} + +/** + * Get an alphabetical list of users who voted for a proposal with HTML links + * + * @param string $voteid The ID of the Trusted User proposal + * + * @return array All users who voted for a specific proposal + */ +function voter_list($voteid) { + $dbh = DB::connect(); + + $whovoted = array(); + + $q = "SELECT tv.UserID,U.Username "; + $q.= "FROM TU_Votes tv, Users U "; + $q.= "WHERE tv.VoteID = " . intval($voteid); + $q.= " AND tv.UserID = U.ID "; + $q.= "ORDER BY Username"; + + $result = $dbh->query($q); + if ($result) { + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $whovoted[] = $row['Username']; + } + } + return $whovoted; +} + +/** + * Cast a vote for a specific user proposal + * + * @param string $voteid The ID of the proposal being voted on + * @param string $uid The user ID of the individual voting + * @param string $vote Vote position, either "Yes", "No", or "Abstain" + * @param int $newtotal The total number of votes after the user has voted + * + * @return void + */ +function cast_proposal_vote($voteid, $uid, $vote, $newtotal) { + $dbh = DB::connect(); + + $q = "UPDATE TU_VoteInfo SET " . $vote . " = (" . $newtotal . ") WHERE ID = " . $voteid; + $result = $dbh->exec($q); + + $q = "INSERT INTO TU_Votes (VoteID, UserID) VALUES (" . intval($voteid) . ", " . intval($uid) . ")"; + $result = $dbh->exec($q); +} + +/** + * Verify a user has the proper permissions to edit an account + * + * @param array $acctinfo User account information for edited account + * + * @return bool True if permission to edit the account, otherwise false + */ +function can_edit_account($acctinfo) { + if ($acctinfo['AccountType'] == 'Developer' || + $acctinfo['AccountType'] == 'Trusted User & Developer') { + return has_credential(CRED_ACCOUNT_EDIT_DEV); + } + + $uid = $acctinfo['ID']; + return has_credential(CRED_ACCOUNT_EDIT, array($uid)); +} + +/* + * Compute the fingerprint of an SSH key. + * + * @param string $ssh_key The SSH public key to retrieve the fingerprint for + * + * @return string The SSH key fingerprint + */ +function ssh_key_fingerprint($ssh_key) { + $tmpfile = tempnam(sys_get_temp_dir(), "aurweb"); + file_put_contents($tmpfile, $ssh_key); + + /* + * The -l option of ssh-keygen can be used to show the fingerprint of + * the specified public key file. Expected output format: + * + * 2048 SHA256:uBBTXmCNjI2CnLfkuz9sG8F+e9/T4C+qQQwLZWIODBY user@host (RSA) + * + * ... where 2048 is the key length, the second token is the actual + * fingerprint, followed by the key comment and the key type. + */ + + $cmd = "/usr/bin/ssh-keygen -l -f " . escapeshellarg($tmpfile); + exec($cmd, $out, $ret); + if ($ret !== 0 || count($out) !== 1) { + return false; + } + + unlink($tmpfile); + + $tokens = explode(' ', $out[0]); + if (count($tokens) < 4) { + return false; + } + + $tokens = explode(':', $tokens[1]); + if (count($tokens) != 2 || $tokens[0] != 'SHA256') { + return false; + } + + return $tokens[1]; +} + +/* + * Get the SSH public keys associated with an account. + * + * @param int $uid The user ID of the account to retrieve the keys for. + * + * @return array An array representing the keys + */ +function account_get_ssh_keys($uid) { + $dbh = DB::connect(); + $q = "SELECT PubKey FROM SSHPubKeys WHERE UserID = " . intval($uid); + $result = $dbh->query($q); + + if ($result) { + return $result->fetchAll(PDO::FETCH_COLUMN, 0); + } else { + return array(); + } +} + +/* + * Set the SSH public keys associated with an account. + * + * @param int $uid The user ID of the account to assign the keys to. + * @param array $ssh_keys The SSH public keys. + * @param array $ssh_fingerprints The corresponding SSH key fingerprints. + * + * @return bool Boolean flag indicating success or failure. + */ +function account_set_ssh_keys($uid, $ssh_keys, $ssh_fingerprints) { + $dbh = DB::connect(); + + $q = sprintf("DELETE FROM SSHPubKeys WHERE UserID = %d", $uid); + $dbh->exec($q); + + $ssh_fingerprint = reset($ssh_fingerprints); + foreach ($ssh_keys as $ssh_key) { + $q = sprintf( + "INSERT INTO SSHPubKeys (UserID, Fingerprint, PubKey) " . + "VALUES (%d, %s, %s)", $uid, + $dbh->quote($ssh_fingerprint), $dbh->quote($ssh_key) + ); + $dbh->exec($q); + $ssh_fingerprint = next($ssh_fingerprints); + } + + return true; +} + +/* + * Invoke the email notification script. + * + * @param string $params Command line parameters for the script. + * + * @return void + */ +function notify($params) { + $cmd = config_get('notifications', 'notify-cmd'); + foreach ($params as $param) { + $cmd .= ' ' . escapeshellarg($param); + } + + $descspec = array( + 0 => array('pipe', 'r'), + 1 => array('pipe', 'w'), + ); + + $p = proc_open($cmd, $descspec, $pipes); + + if (!is_resource($p)) { + return false; + } + + fclose($pipes[0]); + fclose($pipes[1]); + + return proc_close($p); +} + +/* + * Obtain a list of terms a given user has not yet accepted. + * + * @param int $uid The ID of the user to obtain terms for. + * + * @return array A list of terms the user has not yet accepted. + */ +function fetch_updated_terms($uid) { + $dbh = DB::connect(); + + $q = "SELECT ID, Terms.Revision, Description, URL "; + $q .= "FROM Terms LEFT JOIN AcceptedTerms "; + $q .= "ON AcceptedTerms.TermsID = Terms.ID "; + $q .= "AND AcceptedTerms.UsersID = " . intval($uid) . " "; + $q .= "WHERE AcceptedTerms.Revision IS NULL OR "; + $q .= "AcceptedTerms.Revision < Terms.Revision"; + + $result = $dbh->query($q); + + if ($result) { + return $result->fetchAll(); + } else { + return array(); + } +} + +/* + * Accept a list of given terms. + * + * @param int $uid The ID of the user to accept the terms. + * @param array $termrev An array mapping each term to the accepted revision. + * + * @return void + */ +function accept_terms($uid, $termrev) { + $dbh = DB::connect(); + + $q = "SELECT TermsID, Revision FROM AcceptedTerms "; + $q .= "WHERE UsersID = " . intval($uid); + + $result = $dbh->query($q); + + if (!$result) { + return; + } + + $termrev_update = array(); + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $id = $row['TermsID']; + if (!array_key_exists($id, $termrev)) { + continue; + } + if ($row['Revision'] < $termrev[$id]) { + $termrev_update[$id] = $termrev[$id]; + } + } + $termrev_add = array_diff_key($termrev, $termrev_update); + + foreach ($termrev_add as $id => $rev) { + $q = "INSERT INTO AcceptedTerms (TermsID, UsersID, Revision) "; + $q .= "VALUES (" . intval($id) . ", " . intval($uid) . ", "; + $q .= intval($rev) . ")"; + $dbh->exec($q); + } + + foreach ($termrev_update as $id => $rev) { + $q = "UPDATE AcceptedTerms "; + $q .= "SET Revision = " . intval($rev) . " "; + $q .= "WHERE TermsID = " . intval($id) . " AND "; + $q .= "UsersID = " . intval($uid); + $dbh->exec($q); + } +} + +function account_comments($uid, $limit, $offset=0) { + $dbh = DB::connect(); + $q = "SELECT PackageComments.ID, Comments, UsersID, "; + $q.= "PackageBaseId, CommentTS, DelTS, EditedTS, B.UserName AS EditUserName, "; + $q.= "PinnedTS, "; + $q.= "C.UserName as DelUserName, RenderedComment, "; + $q.= "PB.ID as PackageBaseID, PB.Name as PackageBaseName "; + $q.= "FROM PackageComments "; + $q.= "LEFT JOIN PackageBases PB ON PackageComments.PackageBaseID = PB.ID "; + $q.= "LEFT JOIN Users A ON PackageComments.UsersID = A.ID "; + $q.= "LEFT JOIN Users B ON PackageComments.EditedUsersID = B.ID "; + $q.= "LEFT JOIN Users C ON PackageComments.DelUsersID = C.ID "; + $q.= "WHERE A.ID = " . $dbh->quote($uid) . " "; + $q.= "ORDER BY CommentTS DESC"; + + if ($limit > 0) { + $q.=" LIMIT " . intval($limit); + } + + if ($offset > 0) { + $q.=" OFFSET " . intval($offset); + } + + $result = $dbh->query($q); + if (!$result) { + return null; + } + + return $result->fetchAll(); +} + +function account_comments_count($uid) { + $dbh = DB::connect(); + $q = "SELECT COUNT(*) "; + $q.= "FROM PackageComments "; + $q.= "LEFT JOIN Users A ON PackageComments.UsersID = A.ID "; + $q.= "WHERE A.ID = " . $dbh->quote($uid); + + $result = $dbh->query($q); + return $result->fetchColumn(); +} + +/* + * Compute the list of active CAPTCHA salts. The salt changes based on the + * number of registered users. This ensures that new users always use a + * different salt and protects against hardcoding the CAPTCHA response. + * + * The first CAPTCHA in the list is the most recent one and should be used for + * new CAPTCHA challenges. The other ones are slightly outdated but may still + * be valid for recent challenges that were created before the number of users + * increased. The current implementation ensures that we can still use our + * CAPTCHA salt, even if five new users registered since the CAPTCHA challenge + * was created. + * + * @return string The list of active salts, the first being the most recent + * one. + */ +function get_captcha_salts() { + $dbh = DB::connect(); + $q = "SELECT count(*) FROM Users"; + $result = $dbh->query($q); + $user_count = $result->fetchColumn(); + + $ret = array(); + for ($i = 0; $i <= 5; $i++) { + array_push($ret, 'aurweb-' . ($user_count - $i)); + } + return $ret; +} + +/* + * Return the CAPTCHA challenge for a given salt. + * + * @param string $salt The salt to be used for the CAPTCHA computation. + * + * @return string The challenge as a string. + */ +function get_captcha_challenge($salt) { + $token = substr(md5($salt), 0, 3); + return "LC_ALL=C pacman -V|sed -r 's#[0-9]+#" . $token . "#g'|md5sum|cut -c1-6"; +} + +/* + * Compute CAPTCHA answer for a given salt. + * + * @param string $salt The salt to be used for the CAPTCHA computation. + * + * @return string The correct answer as a string. + */ +function get_captcha_answer($salt) { + $token = substr(md5($salt), 0, 3); + $text = <<quote($_COOKIE["AURSID"]); + $result = $dbh->query($q); + $row = $result->fetch(PDO::FETCH_NUM); + + if (!$row) { + # Invalid SessionID - hacker alert! + # + $failed = 1; + } else { + $last_update = $row[0]; + if ($last_update + $timeout <= $row[1]) { + $failed = 2; + } + } + + if ($failed == 1) { + # clear out the hacker's cookie, and send them to a naughty page + # why do you have to be so harsh on these people!? + # + setcookie("AURSID", "", 1, "/", null, !empty($_SERVER['HTTPS']), true); + unset($_COOKIE['AURSID']); + } elseif ($failed == 2) { + # session id timeout was reached and they must login again. + # + delete_session_id($_COOKIE["AURSID"]); + + setcookie("AURSID", "", 1, "/", null, !empty($_SERVER['HTTPS']), true); + unset($_COOKIE['AURSID']); + } else { + # still logged in and haven't reached the timeout, go ahead + # and update the idle timestamp + + # Only update the timestamp if it is less than the + # current time plus $timeout. + # + # This keeps 'remembered' sessions from being + # overwritten. + if ($last_update < time() + $timeout) { + $q = "UPDATE Sessions SET LastUpdateTS = " . strval(time()) . " "; + $q.= "WHERE SessionID = " . $dbh->quote($_COOKIE["AURSID"]); + $dbh->exec($q); + } + } + } + return; +} + +/** + * Redirect user to the Terms of Service agreement if there are updated terms. + * + * @return void + */ +function check_tos() { + if (!isset($_COOKIE["AURSID"])) { + return; + } + + $path = $_SERVER['PATH_INFO']; + $route = get_route($path); + if (!$route || $route == "tos.php") { + return; + } + + if (count(fetch_updated_terms(uid_from_sid($_COOKIE["AURSID"]))) > 0) { + header('Location: ' . get_uri('/tos')); + exit(); + } +} + +/** + * Verify the supplied CSRF token matches expected token + * + * @return bool True if the CSRF token is the same as the cookie SID, otherwise false + */ +function check_token() { + if (isset($_POST['token']) && isset($_COOKIE['AURSID'])) { + return ($_POST['token'] == $_COOKIE['AURSID']); + } else { + return false; + } +} + +/** + * Verify a user supplied e-mail against RFC 3696 and DNS records + * + * @param string $addy E-mail address being validated in foo@example.com format + * + * @return bool True if e-mail passes validity checks, otherwise false + */ +function valid_email($addy) { + // check against RFC 3696 + if (filter_var($addy, FILTER_VALIDATE_EMAIL) === false) { + return false; + } + + // check dns for mx, a, aaaa records + list($local, $domain) = explode('@', $addy); + if (!(checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A') || checkdnsrr($domain, 'AAAA'))) { + return false; + } + + return true; +} + +/** + * Verify that a given URL is valid and uses the HTTP(s) protocol + * + * @param string $url URL of the home page to be validated + * + * @return bool True if URL passes validity checks, false otherwise + */ +function valid_homepage($url) { + if (filter_var($url, FILTER_VALIDATE_URL) === false) { + return false; + } + + $url_components = parse_url($url); + if (!in_array($url_components['scheme'], array('http', 'https'))) { + return false; + } + + return true; +} + +/** + * Generate a unique session ID + * + * @return string MD5 hash of the concatenated user IP, random number, and current time + */ +function new_sid() { + return md5($_SERVER['REMOTE_ADDR'] . uniqid(mt_rand(), true)); +} + +/** + * Determine the user's username in the database using a user ID + * + * @param string $id User's ID + * + * @return string Username if it exists, otherwise null + */ +function username_from_id($id) { + $id = intval($id); + + $dbh = DB::connect(); + $q = "SELECT Username FROM Users WHERE ID = " . $dbh->quote($id); + $result = $dbh->query($q); + if (!$result) { + return null; + } + + $row = $result->fetch(PDO::FETCH_NUM); + if ($row) { + return $row[0]; + } +} + +/** + * Determine the user's username in the database using a session ID + * + * @param string $sid User's session ID + * + * @return string Username of the visitor + */ +function username_from_sid($sid="") { + if (!$sid) { + return ""; + } + $dbh = DB::connect(); + $q = "SELECT Username "; + $q.= "FROM Users, Sessions "; + $q.= "WHERE Users.ID = Sessions.UsersID "; + $q.= "AND Sessions.SessionID = " . $dbh->quote($sid); + $result = $dbh->query($q); + if (!$result) { + return ""; + } + $row = $result->fetch(PDO::FETCH_NUM); + + if ($row) { + return $row[0]; + } +} + +/** + * Format a user name for inclusion in HTML data + * + * @param string $username The user name to format + * + * @return string The generated HTML code for the account link + */ +function html_format_username($username) { + $username_fmt = $username ? htmlspecialchars($username, ENT_QUOTES) : __("None"); + + if ($username && isset($_COOKIE["AURSID"])) { + $link = '' . $username_fmt . ''; + return $link; + } else { + return $username_fmt; + } +} + +/** + * Format the maintainer and co-maintainers for inclusion in HTML data + * + * @param string $maintainer The user name of the maintainer + * @param array $comaintainers The list of co-maintainer user names + * + * @return string The generated HTML code for the account links + */ +function html_format_maintainers($maintainer, $comaintainers) { + $code = html_format_username($maintainer); + + if (count($comaintainers) > 0) { + $code .= ' ('; + foreach ($comaintainers as $comaintainer) { + $code .= html_format_username($comaintainer); + if ($comaintainer !== end($comaintainers)) { + $code .= ', '; + } + } + $code .= ')'; + } + + return $code; +} + +/** + * Format a link in the package actions box + * + * @param string $uri The link target + * @param string $inner The HTML code to use for the link label + * + * @return string The generated HTML code for the action link + */ +function html_action_link($uri, $inner) { + if (isset($_COOKIE["AURSID"])) { + $code = ''; + } else { + $code = ''; + } + $code .= $inner . ''; + + return $code; +} + +/** + * Format a form in the package actions box + * + * @param string $uri The link target + * @param string $action The action name (passed as HTTP POST parameter) + * @param string $inner The HTML code to use for the link label + * + * @return string The generated HTML code for the action link + */ +function html_action_form($uri, $action, $inner) { + if (isset($_COOKIE["AURSID"])) { + $code = '
    '; + $code .= ''; + $code .= '
    '; + } else { + $code = ''; + $code .= $inner . ''; + } + + return $code; +} + +/** + * Determine the user's e-mail address in the database using a session ID + * + * @param string $sid User's session ID + * + * @return string User's e-mail address as given during registration + */ +function email_from_sid($sid="") { + if (!$sid) { + return ""; + } + $dbh = DB::connect(); + $q = "SELECT Email "; + $q.= "FROM Users, Sessions "; + $q.= "WHERE Users.ID = Sessions.UsersID "; + $q.= "AND Sessions.SessionID = " . $dbh->quote($sid); + $result = $dbh->query($q); + if (!$result) { + return ""; + } + $row = $result->fetch(PDO::FETCH_NUM); + + if ($row) { + return $row[0]; + } +} + +/** + * Determine the user's account type in the database using a session ID + * + * @param string $sid User's session ID + * + * @return string Account type of user ("User", "Trusted User", or "Developer") + */ +function account_from_sid($sid="") { + if (!$sid) { + return ""; + } + $dbh = DB::connect(); + $q = "SELECT AccountType "; + $q.= "FROM Users, AccountTypes, Sessions "; + $q.= "WHERE Users.ID = Sessions.UsersID "; + $q.= "AND AccountTypes.ID = Users.AccountTypeID "; + $q.= "AND Sessions.SessionID = " . $dbh->quote($sid); + $result = $dbh->query($q); + if (!$result) { + return ""; + } + $row = $result->fetch(PDO::FETCH_NUM); + + if ($row) { + return $row[0]; + } +} + +/** + * Determine the user's ID in the database using a session ID + * + * @param string $sid User's session ID + * + * @return string|int The user's name, 0 on query failure + */ +function uid_from_sid($sid="") { + if (!$sid) { + return ""; + } + $dbh = DB::connect(); + $q = "SELECT Users.ID "; + $q.= "FROM Users, Sessions "; + $q.= "WHERE Users.ID = Sessions.UsersID "; + $q.= "AND Sessions.SessionID = " . $dbh->quote($sid); + $result = $dbh->query($q); + if (!$result) { + return 0; + } + $row = $result->fetch(PDO::FETCH_NUM); + + if ($row) { + return $row[0]; + } +} + +/** + * Common AUR header displayed on all pages + * + * @global string $LANG Language selected by the visitor + * @global array $SUPPORTED_LANGS Languages that are supported by the AUR + * @param string $title Name of the AUR page to be displayed on browser + * + * @return void + */ +function html_header($title="", $details=array()) { + global $LANG; + global $SUPPORTED_LANGS; + + include('header.php'); + return; +} + +/** + * Common AUR footer displayed on all pages + * + * @param string $ver The AUR version + * + * @return void + */ +function html_footer($ver="") { + include('footer.php'); + return; +} + +/** + * Determine if a user has permission to submit a package + * + * @param string $name Name of the package to be submitted + * @param string $sid User's session ID + * + * @return int 0 if the user can't submit, 1 if the user can submit + */ +function can_submit_pkgbase($name="", $sid="") { + if (!$name || !$sid) {return 0;} + $dbh = DB::connect(); + $q = "SELECT MaintainerUID "; + $q.= "FROM PackageBases WHERE Name = " . $dbh->quote($name); + $result = $dbh->query($q); + $row = $result->fetch(PDO::FETCH_NUM); + + if (!$row[0]) { + return 1; + } + $my_uid = uid_from_sid($sid); + + if ($row[0] === NULL || $row[0] == $my_uid) { + return 1; + } + + return 0; +} + +/** + * Determine if a package can be overwritten by some package base + * + * @param string $name Name of the package to be submitted + * @param int $base_id The ID of the package base + * + * @return bool True if the package can be overwritten, false if not + */ +function can_submit_pkg($name, $base_id) { + $dbh = DB::connect(); + $q = "SELECT COUNT(*) FROM Packages WHERE "; + $q.= "Name = " . $dbh->quote($name) . " AND "; + $q.= "PackageBaseID <> " . intval($base_id); + $result = $dbh->query($q); + + if (!$result) return false; + return ($result->fetchColumn() == 0); +} + +/** + * Recursively delete a directory + * + * @param string $dirname Name of the directory to be removed + * + * @return void + */ +function rm_tree($dirname) { + if (empty($dirname) || !is_dir($dirname)) return; + + foreach (scandir($dirname) as $item) { + if ($item != '.' && $item != '..') { + $path = $dirname . '/' . $item; + if (is_file($path) || is_link($path)) { + unlink($path); + } + else { + rm_tree($path); + } + } + } + + rmdir($dirname); + + return; +} + + /** + * Determine the user's ID in the database using a username + * + * @param string $username The username of an account + * + * @return string Return user ID if exists for username, otherwise null + */ +function uid_from_username($username) { + $dbh = DB::connect(); + $q = "SELECT ID FROM Users WHERE Username = " . $dbh->quote($username); + $result = $dbh->query($q); + if (!$result) { + return null; + } + + $row = $result->fetch(PDO::FETCH_NUM); + if ($row) { + return $row[0]; + } +} + +/** + * Determine the user's ID in the database using a username or email address + * + * @param string $username The username or email address of an account + * + * @return string Return user ID if exists, otherwise null + */ +function uid_from_loginname($loginname) { + $uid = uid_from_username($loginname); + if (!$uid) { + $uid = uid_from_email($loginname); + } + return $uid; +} + +/** + * Determine the user's ID in the database using an e-mail address + * + * @param string $email An e-mail address in foo@example.com format + * + * @return string The user's ID + */ +function uid_from_email($email) { + $dbh = DB::connect(); + $q = "SELECT ID FROM Users WHERE Email = " . $dbh->quote($email); + $result = $dbh->query($q); + if (!$result) { + return null; + } + + $row = $result->fetch(PDO::FETCH_NUM); + if ($row) { + return $row[0]; + } +} + +/** + * Generate clean url with edited/added user values + * + * Makes a clean string of variables for use in URLs based on current $_GET and + * list of values to edit/add to that. Any empty variables are discarded. + * + * @example print "http://example.com/test.php?" . mkurl("foo=bar&bar=baz") + * + * @param string $append string of variables and values formatted as in URLs + * + * @return string clean string of variables to append to URL, urlencoded + */ +function mkurl($append) { + $get = $_GET; + $append = explode('&', $append); + $uservars = array(); + $out = ''; + + foreach ($append as $i) { + $ex = explode('=', $i); + $uservars[$ex[0]] = $ex[1]; + } + + foreach ($uservars as $k => $v) { $get[$k] = $v; } + + foreach ($get as $k => $v) { + if ($v !== '') { + $out .= '&' . urlencode($k) . '=' . urlencode($v); + } + } + + return substr($out, 5); +} + +/** + * Get a package comment + * + * @param int $comment_id The ID of the comment + * + * @return array The user ID and comment OR null, null in case of an error + */ +function comment_by_id($comment_id) { + $dbh = DB::connect(); + $q = "SELECT UsersID, Comments FROM PackageComments "; + $q.= "WHERE ID = " . intval($comment_id); + $result = $dbh->query($q); + if (!$result) { + return array(null, null); + } + + return $result->fetch(PDO::FETCH_NUM); +} + +/** + * Process submitted comments so any links can be followed + * + * @param string $comment Raw user submitted package comment + * + * @return string User comment with links printed in HTML + */ +function parse_comment($comment) { + $url_pattern = '/(\b(?:https?|ftp):\/\/[\w\/\#~:.?+=&%@!\-;,]+?' . + '(?=[.:?\-;,]*(?:[^\w\/\#~:.?+=&%@!\-;,]|$)))/iS'; + + $matches = preg_split($url_pattern, $comment, -1, + PREG_SPLIT_DELIM_CAPTURE); + + $html = ''; + for ($i = 0; $i < count($matches); $i++) { + if ($i % 2) { + # convert links + $html .= '' . htmlspecialchars($matches[$i]) . ''; + } + else { + # convert everything else + $html .= nl2br(htmlspecialchars($matches[$i])); + } + } + + return $html; +} + +/** + * Wrapper for beginning a database transaction + */ +function begin_atomic_commit() { + $dbh = DB::connect(); + $dbh->beginTransaction(); +} + +/** + * Wrapper for committing a database transaction + */ +function end_atomic_commit() { + $dbh = DB::connect(); + $dbh->commit(); +} + +/** + * Merge pkgbase and package options + * + * Merges entries of the first and the second array. If any key appears in both + * arrays and the corresponding value in the second array is either a non-array + * type or a non-empty array, the value from the second array replaces the + * value from the first array. If the value from the second array is an array + * containing a single empty string, the value in the resulting array becomes + * an empty array instead. If the value in the second array is empty, the + * resulting array contains the value from the first array. + * + * @param array $pkgbase_info Options from the pkgbase section + * @param array $section_info Options from the package section + * + * @return array Merged information from both sections + */ +function array_pkgbuild_merge($pkgbase_info, $section_info) { + $pi = $pkgbase_info; + foreach ($section_info as $opt_key => $opt_val) { + if (is_array($opt_val)) { + if ($opt_val == array('')) { + $pi[$opt_key] = array(); + } elseif (count($opt_val) > 0) { + $pi[$opt_key] = $opt_val; + } + } else { + $pi[$opt_key] = $opt_val; + } + } + return $pi; +} + +/** + * Bound an integer value between two values + * + * @param int $n Integer value to bound + * @param int $min Lower bound + * @param int $max Upper bound + * + * @return int Bounded integer value + */ +function bound($n, $min, $max) { + return min(max($n, $min), $max); +} + +/** + * Return the URL of the AUR root + * + * @return string The URL of the AUR root + */ +function aur_location() { + $location = config_get('options', 'aur_location'); + if (substr($location, -1) != '/') { + $location .= '/'; + } + return $location; +} + +/** + * Calculate pagination templates + * + * @return array The array of pagination templates, per page, and offset values + */ +function calculate_pagination($total_comment_count) { + /* Sanitize paging variables. */ + if (isset($_GET["O"])) { + $_GET["O"] = max(intval($_GET["O"]), 0); + } else { + $_GET["O"] = 0; + } + $offset = $_GET["O"]; + + if (isset($_GET["PP"])) { + $_GET["PP"] = bound(intval($_GET["PP"]), 1, 250); + } else { + $_GET["PP"] = 10; + } + $per_page = $_GET["PP"]; + + // Page offsets start at zero, so page 2 has offset 1, which means that we + // need to add 1 to the offset to get the current page. + $current_page = ceil($offset / $per_page) + 1; + $num_pages = ceil($total_comment_count / $per_page); + $pagination_templs = array(); + + if ($current_page > 1) { + $previous_page = $current_page - 1; + $previous_offset = ($previous_page - 1) * $per_page; + $pagination_templs['« ' . __('First')] = 0; + $pagination_templs['‹ ' . __('Previous')] = $previous_offset; + } + + if ($current_page - 5 > 1) { + $pagination_templs["..."] = false; + } + + for ($i = max($current_page - 5, 1); $i <= min($num_pages, $current_page + 5); $i++) { + $pagination_templs[$i] = ($i - 1) * $per_page; + } + + if ($current_page + 5 < $num_pages) + $pagination_templs["... "] = false; + + if ($current_page < $num_pages) { + $pagination_templs[__('Next') . ' ›'] = $current_page * $per_page; + $pagination_templs[__('Last') . ' »'] = ($num_pages - 1) * $per_page; + } + + return array($pagination_templs, $per_page, $offset); +} diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php new file mode 100644 index 00000000..e7bc7f97 --- /dev/null +++ b/web/lib/aurjson.class.php @@ -0,0 +1,711 @@ +version = intval($http_data['v']); + } + if ($this->version < 1 || $this->version > 6) { + return $this->json_error('Invalid version specified.'); + } + + if (!isset($http_data['type']) || !isset($http_data['arg'])) { + return $this->json_error('No request type/data specified.'); + } + if (!in_array($http_data['type'], self::$exposed_methods)) { + return $this->json_error('Incorrect request type specified.'); + } + + if (isset($http_data['search_by']) && !isset($http_data['by'])) { + $http_data['by'] = $http_data['search_by']; + } + if (isset($http_data['by']) && !in_array($http_data['by'], self::$exposed_fields)) { + return $this->json_error('Incorrect by field specified.'); + } + + $this->dbh = DB::connect(); + + if ($this->check_ratelimit($_SERVER['REMOTE_ADDR'])) { + header("HTTP/1.1 429 Too Many Requests"); + return $this->json_error('Rate limit reached'); + } + + $type = str_replace('-', '_', $http_data['type']); + if ($type == 'info' && $this->version >= 5) { + $type = 'multiinfo'; + } + $json = call_user_func(array(&$this, $type), $http_data); + + $etag = md5($json); + header("Etag: \"$etag\""); + /* + * Make sure to strip a few things off the + * if-none-match header. Stripping whitespace may not + * be required, but removing the quote on the incoming + * header is required to make the equality test. + */ + $if_none_match = isset($_SERVER['HTTP_IF_NONE_MATCH']) ? + trim($_SERVER['HTTP_IF_NONE_MATCH'], "\t\n\r\" ") : false; + if ($if_none_match && $if_none_match == $etag) { + header('HTTP/1.1 304 Not Modified'); + return; + } + + if (isset($http_data['callback'])) { + $callback = $http_data['callback']; + if (!preg_match('/^[a-zA-Z0-9()_.]{1,128}$/D', $callback)) { + return $this->json_error('Invalid callback name.'); + } + header('content-type: text/javascript'); + return '/**/' . $callback . '(' . $json . ')'; + } else { + header('content-type: application/json'); + return $json; + } + } + + /* + * Check if an IP needs to be rate limited. + * + * @param $ip IP of the current request + * + * @return true if IP needs to be rate limited, false otherwise. + */ + private function check_ratelimit($ip) { + $limit = config_get("ratelimit", "request_limit"); + if ($limit == 0) { + return false; + } + + $this->update_ratelimit($ip); + + $status = false; + $value = get_cache_value('ratelimit:' . $ip, $status); + if (!$status) { + $stmt = $this->dbh->prepare(" + SELECT Requests FROM ApiRateLimit + WHERE IP = :ip"); + $stmt->bindParam(":ip", $ip); + $result = $stmt->execute(); + + if (!$result) { + return false; + } + + $row = $stmt->fetch(PDO::FETCH_ASSOC); + $value = $row['Requests']; + } + + return $value > $limit; + } + + /* + * Update a rate limit for an IP by increasing it's requests value by one. + * + * @param $ip IP of the current request + * + * @return void + */ + private function update_ratelimit($ip) { + $window_length = config_get("ratelimit", "window_length"); + $db_backend = config_get("database", "backend"); + $time = time(); + $deletion_time = $time - $window_length; + + /* Try to use the cache. */ + $status = false; + $value = get_cache_value('ratelimit-ws:' . $ip, $status); + if (!$status || ($status && $value < $deletion_time)) { + if (set_cache_value('ratelimit-ws:' . $ip, $time, $window_length) && + set_cache_value('ratelimit:' . $ip, 1, $window_length)) { + return; + } + } else { + $value = get_cache_value('ratelimit:' . $ip, $status); + if ($status && set_cache_value('ratelimit:' . $ip, $value + 1, $window_length)) + return; + } + + /* Clean up old windows. */ + $stmt = $this->dbh->prepare(" + DELETE FROM ApiRateLimit + WHERE WindowStart < :time"); + $stmt->bindParam(":time", $deletion_time); + $stmt->execute(); + + if ($db_backend == "mysql") { + $stmt = $this->dbh->prepare(" + INSERT INTO ApiRateLimit + (IP, Requests, WindowStart) + VALUES (:ip, 1, :window_start) + ON DUPLICATE KEY UPDATE Requests=Requests+1"); + $stmt->bindParam(":ip", $ip); + $stmt->bindParam(":window_start", $time); + $stmt->execute(); + } elseif ($db_backend == "sqlite") { + $stmt = $this->dbh->prepare(" + INSERT OR IGNORE INTO ApiRateLimit + (IP, Requests, WindowStart) + VALUES (:ip, 0, :window_start);"); + $stmt->bindParam(":ip", $ip); + $stmt->bindParam(":window_start", $time); + $stmt->execute(); + + $stmt = $this->dbh->prepare(" + UPDATE ApiRateLimit + SET Requests = Requests + 1 + WHERE IP = :ip"); + $stmt->bindParam(":ip", $ip); + $stmt->execute(); + } else { + throw new RuntimeException("Unknown database backend"); + } + } + + /* + * Returns a JSON formatted error string. + * + * @param $msg The error string to return + * + * @return mixed A json formatted error response. + */ + private function json_error($msg) { + header('content-type: application/json'); + if ($this->version < 3) { + return $this->json_results('error', 0, $msg, NULL); + } elseif ($this->version >= 3) { + return $this->json_results('error', 0, array(), $msg); + } + } + + /* + * Returns a JSON formatted result data. + * + * @param $type The response method type. + * @param $count The number of results to return + * @param $data The result data to return + * @param $error An error message to include in the response + * + * @return mixed A json formatted result response. + */ + private function json_results($type, $count, $data, $error) { + $json_array = array( + 'version' => $this->version, + 'type' => $type, + 'resultcount' => $count, + 'results' => $data + ); + + if ($this->version != 5) { + $json_array['warning'] = 'The use of versions lower than 5 is ' + . 'now deprecated and will soon be unsupported. To ensure ' + . 'your API client supports the change without issue, it ' + . 'should use version 5 and adjust for any changes in the ' + . 'API interface. See https://aur.archlinux.org/rpc for ' + . 'documentation related to v5.'; + } + + if ($error) { + $json_array['error'] = $error; + } + + return json_encode($json_array); + } + + /* + * Get extended package details (for info and multiinfo queries). + * + * @param $pkgid The ID of the package to retrieve details for. + * @param $base_id The ID of the package base to retrieve details for. + * + * @return array An array containing package details. + */ + private function get_extended_fields($pkgid, $base_id) { + $query = "SELECT DependencyTypes.Name AS Type, " . + "PackageDepends.DepName AS Name, " . + "PackageDepends.DepCondition AS Cond " . + "FROM PackageDepends " . + "LEFT JOIN DependencyTypes " . + "ON DependencyTypes.ID = PackageDepends.DepTypeID " . + "WHERE PackageDepends.PackageID = " . $pkgid . " " . + "UNION SELECT RelationTypes.Name AS Type, " . + "PackageRelations.RelName AS Name, " . + "PackageRelations.RelCondition AS Cond " . + "FROM PackageRelations " . + "LEFT JOIN RelationTypes " . + "ON RelationTypes.ID = PackageRelations.RelTypeID " . + "WHERE PackageRelations.PackageID = " . $pkgid . " " . + "UNION SELECT 'groups' AS Type, `Groups`.`Name`, '' AS Cond " . + "FROM `Groups` INNER JOIN PackageGroups " . + "ON PackageGroups.PackageID = " . $pkgid . " " . + "AND PackageGroups.GroupID = `Groups`.ID " . + "UNION SELECT 'license' AS Type, Licenses.Name, '' AS Cond " . + "FROM Licenses INNER JOIN PackageLicenses " . + "ON PackageLicenses.PackageID = " . $pkgid . " " . + "AND PackageLicenses.LicenseID = Licenses.ID"; + $ttl = config_get_int('options', 'cache_pkginfo_ttl'); + $rows = db_cache_result($query, 'extended-fields:' . $pkgid, PDO::FETCH_ASSOC, $ttl); + + $type_map = array( + 'depends' => 'Depends', + 'makedepends' => 'MakeDepends', + 'checkdepends' => 'CheckDepends', + 'optdepends' => 'OptDepends', + 'conflicts' => 'Conflicts', + 'provides' => 'Provides', + 'replaces' => 'Replaces', + 'groups' => 'Groups', + 'license' => 'License', + ); + $data = array(); + foreach ($rows as $row) { + $type = $type_map[$row['Type']]; + $data[$type][] = $row['Name'] . $row['Cond']; + } + + if ($this->version >= 5) { + $query = "SELECT Keyword FROM PackageKeywords " . + "WHERE PackageBaseID = " . intval($base_id) . " " . + "ORDER BY Keyword ASC"; + $ttl = config_get_int('options', 'cache_pkginfo_ttl'); + $rows = db_cache_result($query, 'keywords:' . intval($base_id), PDO::FETCH_NUM, $ttl); + $data['Keywords'] = array_map(function ($x) { return $x[0]; }, $rows); + } + + return $data; + } + + /* + * Retrieve package information (used in info, multiinfo, search and + * depends requests). + * + * @param $type The request type. + * @param $where_condition An SQL WHERE-condition to filter packages. + * + * @return mixed Returns an array of package matches. + */ + private function process_query($type, $where_condition) { + $max_results = config_get_int('options', 'max_rpc_results'); + + if ($this->version == 1) { + $fields = implode(',', self::$fields_v1); + $query = "SELECT {$fields} " . + "FROM Packages LEFT JOIN PackageBases " . + "ON PackageBases.ID = Packages.PackageBaseID " . + "LEFT JOIN Users " . + "ON PackageBases.MaintainerUID = Users.ID " . + "LEFT JOIN PackageLicenses " . + "ON PackageLicenses.PackageID = Packages.ID " . + "LEFT JOIN Licenses " . + "ON Licenses.ID = PackageLicenses.LicenseID " . + "WHERE ${where_condition} " . + "AND PackageBases.PackagerUID IS NOT NULL " . + "LIMIT $max_results"; + } elseif ($this->version >= 2) { + if ($this->version == 2 || $this->version == 3) { + $fields = implode(',', self::$fields_v2); + } else if ($this->version >= 4 && $this->version <= 6) { + $fields = implode(',', self::$fields_v4); + } + $query = "SELECT {$fields} " . + "FROM Packages LEFT JOIN PackageBases " . + "ON PackageBases.ID = Packages.PackageBaseID " . + "LEFT JOIN Users " . + "ON PackageBases.MaintainerUID = Users.ID " . + "WHERE ${where_condition} " . + "AND PackageBases.PackagerUID IS NOT NULL " . + "LIMIT $max_results"; + } + $result = $this->dbh->query($query); + + if ($result) { + $resultcount = 0; + $search_data = array(); + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $resultcount++; + $row['URLPath'] = sprintf(config_get('options', 'snapshot_uri'), urlencode($row['PackageBase'])); + if ($this->version < 4) { + $row['CategoryID'] = 1; + } + + /* + * Unfortunately, mysql_fetch_assoc() returns + * all fields as strings. We need to coerce + * numeric values into integers to provide + * proper data types in the JSON response. + */ + foreach (self::$numeric_fields as $field) { + if (isset($row[$field])) { + $row[$field] = intval($row[$field]); + } + } + + foreach (self::$decimal_fields as $field) { + if (isset($row[$field])) { + $row[$field] = floatval($row[$field]); + } + } + + if ($this->version >= 2 && ($type == 'info' || $type == 'multiinfo')) { + $extfields = $this->get_extended_fields($row['ID'], $row['PackageBaseID']); + if ($extfields) { + $row = array_merge($row, $extfields); + } + } + + if ($this->version < 3) { + if ($type == 'info') { + $search_data = $row; + break; + } else { + array_push($search_data, $row); + } + } elseif ($this->version >= 3) { + array_push($search_data, $row); + } + } + + if ($resultcount === $max_results) { + return $this->json_error('Too many package results.'); + } + + return $this->json_results($type, $resultcount, $search_data, NULL); + } else { + return $this->json_results($type, 0, array(), NULL); + } + } + + /* + * Parse the args to the multiinfo function. We may have a string or an + * array, so do the appropriate thing. Within the elements, both * package + * IDs and package names are valid; sort them into the relevant arrays and + * escape/quote the names. + * + * @param array $args Query parameters. + * + * @return mixed An array containing 'ids' and 'names'. + */ + private function parse_multiinfo_args($args) { + if (!is_array($args)) { + $args = array($args); + } + + $id_args = array(); + $name_args = array(); + foreach ($args as $arg) { + if (!$arg) { + continue; + } + if ($this->version < 5 && is_numeric($arg)) { + $id_args[] = intval($arg); + } else { + $name_args[] = $this->dbh->quote($arg); + } + } + + return array('ids' => $id_args, 'names' => $name_args); + } + + /* + * Performs a fulltext mysql search of the package database. + * + * @param array $http_data Query parameters. + * + * @return mixed Returns an array of package matches. + */ + private function search($http_data) { + $keyword_string = $http_data['arg']; + + if (isset($http_data['by'])) { + $search_by = $http_data['by']; + } else { + $search_by = 'name-desc'; + } + + if ($search_by === 'name' || $search_by === 'name-desc') { + if (strlen($keyword_string) < 2) { + return $this->json_error('Query arg too small.'); + } + + if ($this->version >= 6 && $search_by === 'name-desc') { + $where_condition = construct_keyword_search($this->dbh, + $keyword_string, true, false); + } else { + $keyword_string = $this->dbh->quote( + "%" . addcslashes($keyword_string, '%_') . "%"); + + if ($search_by === 'name') { + $where_condition = "(Packages.Name LIKE $keyword_string)"; + } else if ($search_by === 'name-desc') { + $where_condition = "(Packages.Name LIKE $keyword_string "; + $where_condition .= "OR Description LIKE $keyword_string)"; + } + + } + } else if ($search_by === 'maintainer') { + if (empty($keyword_string)) { + $where_condition = "Users.ID is NULL"; + } else { + $keyword_string = $this->dbh->quote($keyword_string); + $where_condition = "Users.Username = $keyword_string "; + } + } else if (in_array($search_by, self::$exposed_depfields)) { + if (empty($keyword_string)) { + return $this->json_error('Query arg is empty.'); + } else { + $keyword_string = $this->dbh->quote($keyword_string); + $search_by = $this->dbh->quote($search_by); + $subquery = "SELECT PackageDepends.DepName FROM PackageDepends "; + $subquery .= "LEFT JOIN DependencyTypes "; + $subquery .= "ON PackageDepends.DepTypeID = DependencyTypes.ID "; + $subquery .= "WHERE PackageDepends.PackageID = Packages.ID "; + $subquery .= "AND DependencyTypes.Name = $search_by"; + $where_condition = "$keyword_string IN ($subquery)"; + } + } + + return $this->process_query('search', $where_condition); + } + + /* + * Returns the info on a specific package. + * + * @param array $http_data Query parameters. + * + * @return mixed Returns an array of value data containing the package data + */ + private function info($http_data) { + $pqdata = $http_data['arg']; + if ($this->version < 5 && is_numeric($pqdata)) { + $where_condition = "Packages.ID = $pqdata"; + } else { + $where_condition = "Packages.Name = " . $this->dbh->quote($pqdata); + } + + return $this->process_query('info', $where_condition); + } + + /* + * Returns the info on multiple packages. + * + * @param array $http_data Query parameters. + * + * @return mixed Returns an array of results containing the package data + */ + private function multiinfo($http_data) { + $pqdata = $http_data['arg']; + $args = $this->parse_multiinfo_args($pqdata); + $ids = $args['ids']; + $names = $args['names']; + + if (!$ids && !$names) { + return $this->json_error('Invalid query arguments.'); + } + + $where_condition = ""; + if ($ids) { + $ids_value = implode(',', $args['ids']); + $where_condition .= "Packages.ID IN ($ids_value) "; + } + if ($ids && $names) { + $where_condition .= "OR "; + } + if ($names) { + /* + * Individual names were quoted in + * parse_multiinfo_args(). + */ + $names_value = implode(',', $args['names']); + $where_condition .= "Packages.Name IN ($names_value) "; + } + + return $this->process_query('multiinfo', $where_condition); + } + + /* + * Returns all the packages for a specific maintainer. + * + * @param array $http_data Query parameters. + * + * @return mixed Returns an array of value data containing the package data + */ + private function msearch($http_data) { + $http_data['by'] = 'maintainer'; + return $this->search($http_data); + } + + /* + * Get all package names that start with $search. + * + * @param array $http_data Query parameters. + * + * @return string The JSON formatted response data. + */ + private function suggest($http_data) { + $search = $http_data['arg']; + $query = "SELECT Packages.Name FROM Packages "; + $query.= "LEFT JOIN PackageBases "; + $query.= "ON PackageBases.ID = Packages.PackageBaseID "; + $query.= "WHERE Packages.Name LIKE "; + $query.= $this->dbh->quote(addcslashes($search, '%_') . '%'); + $query.= " AND PackageBases.PackagerUID IS NOT NULL "; + $query.= "ORDER BY Name ASC LIMIT 20"; + + $result = $this->dbh->query($query); + $result_array = array(); + + if ($result) { + $result_array = $result->fetchAll(PDO::FETCH_COLUMN, 0); + } + + return json_encode($result_array); + } + + /* + * Get all package base names that start with $search. + * + * @param array $http_data Query parameters. + * + * @return string The JSON formatted response data. + */ + private function suggest_pkgbase($http_data) { + $search = $http_data['arg']; + $query = "SELECT Name FROM PackageBases WHERE Name LIKE "; + $query.= $this->dbh->quote(addcslashes($search, '%_') . '%'); + $query.= " AND PackageBases.PackagerUID IS NOT NULL "; + $query.= "ORDER BY Name ASC LIMIT 20"; + + $result = $this->dbh->query($query); + $result_array = array(); + + if ($result) { + $result_array = $result->fetchAll(PDO::FETCH_COLUMN, 0); + } + + return json_encode($result_array); + } + + /** + * Get the HTML markup of the comment form. + * + * @param array $http_data Query parameters. + * + * @return string The JSON formatted response data. + */ + private function get_comment_form($http_data) { + if (!isset($http_data['base_id']) || !isset($http_data['pkgbase_name'])) { + $output = array( + 'success' => 0, + 'error' => __('Package base ID or package base name missing.') + ); + return json_encode($output); + } + + $comment_id = intval($http_data['arg']); + $base_id = intval($http_data['base_id']); + $pkgbase_name = $http_data['pkgbase_name']; + + list($user_id, $comment) = comment_by_id($comment_id); + + if (!has_credential(CRED_COMMENT_EDIT, array($user_id))) { + $output = array( + 'success' => 0, + 'error' => __('You are not allowed to edit this comment.') + ); + return json_encode($output); + } elseif (is_null($comment)) { + $output = array( + 'success' => 0, + 'error' => __('Comment does not exist.') + ); + return json_encode($output); + } + + ob_start(); + include('pkg_comment_form.php'); + $html = ob_get_clean(); + $output = array( + 'success' => 1, + 'form' => $html + ); + + return json_encode($output); + } +} + diff --git a/web/lib/cachefuncs.inc.php b/web/lib/cachefuncs.inc.php new file mode 100644 index 00000000..b2b96c24 --- /dev/null +++ b/web/lib/cachefuncs.inc.php @@ -0,0 +1,99 @@ +addServer($mcserver[0], intval($mcserver[1])); + } +} + +# Set a value in the cache (currently APC) if cache is available for use. If +# not available, this becomes effectively a no-op (return value is +# false). Accepts an optional TTL (defaults to 600 seconds). +function set_cache_value($key, $value, $ttl=600) { + $status = false; + if (defined('EXTENSION_LOADED_APC')) { + $status = apc_store(CACHE_PREFIX.$key, $value, $ttl); + } + if (defined('EXTENSION_LOADED_MEMCACHE')) { + global $memcache; + $status = $memcache->set(CACHE_PREFIX.$key, $value, $ttl); + } + return $status; +} + +# Get a value from the cache (currently APC) if cache is available for use. If +# not available, this returns false (optionally sets passed in variable $status +# to false, much like apc_fetch() behaves). This allows for testing the fetch +# result appropriately even in the event that a 'false' value was the value in +# the cache. +function get_cache_value($key, &$status=false) { + if(defined('EXTENSION_LOADED_APC')) { + $ret = apc_fetch(CACHE_PREFIX.$key, $status); + if ($status) { + return $ret; + } + } + if (defined('EXTENSION_LOADED_MEMCACHE')) { + global $memcache; + $ret = $memcache->get(CACHE_PREFIX.$key); + if (!$ret) { + $status = false; + } + else { + $status = true; + } + return $ret; + } + return $status; +} + +# Run a simple db query, retrieving and/or caching the value if APC is +# available for use. Accepts an optional TTL value (defaults to 600 seconds). +function db_cache_value($dbq, $key, $ttl=600) { + $dbh = DB::connect(); + $status = false; + $value = get_cache_value($key, $status); + if (!$status) { + $result = $dbh->query($dbq); + if (!$result) { + return false; + } + $row = $result->fetch(PDO::FETCH_NUM); + $value = $row[0]; + set_cache_value($key, $value, $ttl); + } + return $value; +} + +# Run a simple db query, retrieving and/or caching the result set if APC is +# available for use. Accepts an optional TTL value (defaults to 600 seconds). +function db_cache_result($dbq, $key, $fetch_style=PDO::FETCH_NUM, $ttl=600) { + $dbh = DB::connect(); + $status = false; + $value = get_cache_value($key, $status); + if (!$status) { + $result = $dbh->query($dbq); + if (!$result) { + return false; + } + $value = $result->fetchAll($fetch_style); + set_cache_value($key, $value, $ttl); + } + return $value; +} + +?> diff --git a/web/lib/confparser.inc.php b/web/lib/confparser.inc.php new file mode 100644 index 00000000..fdd2b78e --- /dev/null +++ b/web/lib/confparser.inc.php @@ -0,0 +1,59 @@ +useCached(); // use cached version if age<1 hour +$rss->title = "PHP news"; +$rss->description = "daily news from the PHP scripting world"; + +//optional +$rss->descriptionTruncSize = 500; +$rss->descriptionHtmlSyndicated = true; + +$rss->link = "http://www.dailyphp.net/news"; +$rss->syndicationURL = "http://www.dailyphp.net/".$_SERVER["PHP_SELF"]; + +$image = new FeedImage(); +$image->title = "dailyphp.net logo"; +$image->url = "http://www.dailyphp.net/images/logo.gif"; +$image->link = "http://www.dailyphp.net"; +$image->description = "Feed provided by dailyphp.net. Click to visit."; + +//optional +$image->descriptionTruncSize = 500; +$image->descriptionHtmlSyndicated = true; + +$rss->image = $image; + +// get your news items from somewhere, e.g. your database: +mysql_select_db($dbHost, $dbUser, $dbPass); +$res = mysql_query("SELECT * FROM news ORDER BY newsdate DESC"); +while ($data = mysql_fetch_object($res)) { + $item = new FeedItem(); + $item->title = $data->title; + $item->link = $data->url; + $item->description = $data->short; + + //optional + item->descriptionTruncSize = 500; + item->descriptionHtmlSyndicated = true; + + $item->date = $data->newsdate; + $item->source = "http://www.dailyphp.net"; + $item->author = "John Doe"; + + $rss->addItem($item); +} + +// valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1 (deprecated), +// MBOX, OPML, ATOM, ATOM0.3, HTML, JS +echo $rss->saveFeed("RSS1.0", "news/feed.xml"); + + +*************************************************************************** +* A little setup * +**************************************************************************/ + +// your local timezone, set to "" to disable or for GMT +define("TIME_ZONE","+01:00"); + + + + +/** + * Version string. + **/ +define("FEEDCREATOR_VERSION", "FeedCreator 1.7.2"); + + + +/** + * A FeedItem is a part of a FeedCreator feed. + * + * @author Kai Blankenhorn + * @since 1.3 + */ +class FeedItem extends HtmlDescribable { + /** + * Mandatory attributes of an item. + */ + var $title, $description, $link; + + /** + * Optional attributes of an item. + */ + var $author, $authorEmail, $image, $category, $comments, $guid, $guidIsPermaLink, $source, $creator; + + /** + * Publishing date of an item. May be in one of the following formats: + * + * RFC 822: + * "Mon, 20 Jan 03 18:05:41 +0400" + * "20 Jan 03 18:05:41 +0000" + * + * ISO 8601: + * "2003-01-20T18:05:41+04:00" + * + * Unix: + * 1043082341 + */ + var $date; + + /** + * Any additional elements to include as an assiciated array. All $key => $value pairs + * will be included unencoded in the feed item in the form + * <$key>$value + * Again: No encoding will be used! This means you can invalidate or enhance the feed + * if $value contains markup. This may be abused to embed tags not implemented by + * the FeedCreator class used. + */ + var $additionalElements = Array(); + + // on hold + // var $source; +} + + + +/** + * An FeedImage may be added to a FeedCreator feed. + * @author Kai Blankenhorn + * @since 1.3 + */ +class FeedImage extends HtmlDescribable { + /** + * Mandatory attributes of an image. + */ + var $title, $url, $link; + + /** + * Optional attributes of an image. + */ + var $width, $height, $description; +} + + + +/** + * An HtmlDescribable is an item within a feed that can have a description that may + * include HTML markup. + */ +class HtmlDescribable { + /** + * Indicates whether the description field should be rendered in HTML. + */ + var $descriptionHtmlSyndicated; + + /** + * Indicates whether and to how many characters a description should be truncated. + */ + var $descriptionTruncSize; + + /** + * Returns a formatted description field, depending on descriptionHtmlSyndicated and + * $descriptionTruncSize properties + * @return string the formatted description + */ + function getDescription() { + $descriptionField = new FeedHtmlField($this->description); + $descriptionField->syndicateHtml = $this->descriptionHtmlSyndicated; + $descriptionField->truncSize = $this->descriptionTruncSize; + return $descriptionField->output(); + } + +} + + +/** + * An FeedHtmlField describes and generates + * a feed, item or image html field (probably a description). Output is + * generated based on $truncSize, $syndicateHtml properties. + * @author Pascal Van Hecke + * @version 1.6 + */ +class FeedHtmlField { + /** + * Mandatory attributes of a FeedHtmlField. + */ + var $rawFieldContent; + + /** + * Optional attributes of a FeedHtmlField. + * + */ + var $truncSize, $syndicateHtml; + + /** + * Creates a new instance of FeedHtmlField. + * @param $string: if given, sets the rawFieldContent property + */ + function FeedHtmlField($parFieldContent) { + if ($parFieldContent) { + $this->rawFieldContent = $parFieldContent; + } + } + + + /** + * Creates the right output, depending on $truncSize, $syndicateHtml properties. + * @return string the formatted field + */ + function output() { + // when field available and syndicated in html we assume + // - valid html in $rawFieldContent and we enclose in CDATA tags + // - no truncation (truncating risks producing invalid html) + if (!$this->rawFieldContent) { + $result = ""; + } elseif ($this->syndicateHtml) { + $result = "rawFieldContent."]]>"; + } else { + if ($this->truncSize and is_int($this->truncSize)) { + $result = FeedCreator::iTrunc(htmlspecialchars($this->rawFieldContent),$this->truncSize); + } else { + $result = htmlspecialchars($this->rawFieldContent); + } + } + return $result; + } + +} + + + +/** + * UniversalFeedCreator lets you choose during runtime which + * format to build. + * For general usage of a feed class, see the FeedCreator class + * below or the example above. + * + * @since 1.3 + * @author Kai Blankenhorn + */ +class UniversalFeedCreator extends FeedCreator { + var $_feed; + + function _setFormat($format) { + switch (strtoupper($format)) { + + case "2.0": + // fall through + case "RSS2.0": + $this->_feed = new RSSCreator20(); + break; + + case "1.0": + // fall through + case "RSS1.0": + $this->_feed = new RSSCreator10(); + break; + + case "0.91": + // fall through + case "RSS0.91": + $this->_feed = new RSSCreator091(); + break; + + case "PIE0.1": + $this->_feed = new PIECreator01(); + break; + + case "MBOX": + $this->_feed = new MBOXCreator(); + break; + + case "OPML": + $this->_feed = new OPMLCreator(); + break; + + case "ATOM": + // fall through: always the latest ATOM version + + case "ATOM0.3": + $this->_feed = new AtomCreator03(); + break; + + case "HTML": + $this->_feed = new HTMLCreator(); + break; + + case "JS": + // fall through + case "JAVASCRIPT": + $this->_feed = new JSCreator(); + break; + + default: + $this->_feed = new RSSCreator091(); + break; + } + + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + // prevent overwriting of properties "contentType", "encoding"; do not copy "_feed" itself + if (!in_array($key, array("_feed", "contentType", "encoding"))) { + $this->_feed->{$key} = $this->{$key}; + } + } + } + + /** + * Creates a syndication feed based on the items previously added. + * + * @see FeedCreator::addItem() + * @param string format format the feed should comply to. Valid values are: + * "PIE0.1", "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3", "HTML", "JS" + * @return string the contents of the feed. + */ + function createFeed($format = "RSS0.91") { + $this->_setFormat($format); + return $this->_feed->createFeed(); + } + + + + /** + * Saves this feed as a file on the local disk. After the file is saved, an HTTP redirect + * header may be sent to redirect the use to the newly created file. + * @since 1.4 + * + * @param string format format the feed should comply to. Valid values are: + * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM", "ATOM0.3", "HTML", "JS" + * @param string filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param boolean displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response. + */ + function saveFeed($format="RSS0.91", $filename="", $displayContents=true) { + $this->_setFormat($format); + $this->_feed->saveFeed($filename, $displayContents); + } + + + /** + * Turns on caching and checks if there is a recent version of this feed in the cache. + * If there is, an HTTP redirect header is sent. + * To effectively use caching, you should create the FeedCreator object and call this method + * before anything else, especially before you do the time consuming task to build the feed + * (web fetching, for example). + * + * @param string format format the feed should comply to. Valid values are: + * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3". + * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour) + */ + function useCached($format="RSS0.91", $filename="", $timeout=3600) { + $this->_setFormat($format); + $this->_feed->useCached($filename, $timeout); + } + +} + + +/** + * FeedCreator is the abstract base implementation for concrete + * implementations that implement a specific format of syndication. + * + * @abstract + * @author Kai Blankenhorn + * @since 1.4 + */ +class FeedCreator extends HtmlDescribable { + + /** + * Mandatory attributes of a feed. + */ + var $title, $description, $link; + + + /** + * Optional attributes of a feed. + */ + var $syndicationURL, $image, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays; + + /** + * The url of the external xsl stylesheet used to format the naked rss feed. + * Ignored in the output when empty. + */ + var $xslStyleSheet = ""; + + + /** + * @access private + */ + var $items = Array(); + + + /** + * This feed's MIME content type. + * @since 1.4 + * @access private + */ + var $contentType = "application/xml"; + + + /** + * This feed's character encoding. + * @since 1.6.1 + **/ + var $encoding = "ISO-8859-1"; + + + /** + * Any additional elements to include as an assiciated array. All $key => $value pairs + * will be included unencoded in the feed in the form + * <$key>$value + * Again: No encoding will be used! This means you can invalidate or enhance the feed + * if $value contains markup. This may be abused to embed tags not implemented by + * the FeedCreator class used. + */ + var $additionalElements = Array(); + + + /** + * Adds an FeedItem to the feed. + * + * @param object FeedItem $item The FeedItem to add to the feed. + * @access public + */ + function addItem($item) { + $this->items[] = $item; + } + + + /** + * Truncates a string to a certain length at the most sensible point. + * First, if there's a '.' character near the end of the string, the string is truncated after this character. + * If there is no '.', the string is truncated after the last ' ' character. + * If the string is truncated, " ..." is appended. + * If the string is already shorter than $length, it is returned unchanged. + * + * @static + * @param string string A string to be truncated. + * @param int length the maximum length the string should be truncated to + * @return string the truncated string + */ + function iTrunc($string, $length) { + if (strlen($string)<=$length) { + return $string; + } + + $pos = strrpos($string,"."); + if ($pos>=$length-4) { + $string = substr($string,0,$length-4); + $pos = strrpos($string,"."); + } + if ($pos>=$length*0.4) { + return substr($string,0,$pos+1)." ..."; + } + + $pos = strrpos($string," "); + if ($pos>=$length-4) { + $string = substr($string,0,$length-4); + $pos = strrpos($string," "); + } + if ($pos>=$length*0.4) { + return substr($string,0,$pos)." ..."; + } + + return substr($string,0,$length-4)." ..."; + + } + + + /** + * Creates a comment indicating the generator of this feed. + * The format of this comment seems to be recognized by + * Syndic8.com. + */ + function _createGeneratorComment() { + return "\n"; + } + + + /** + * Creates a string containing all additional elements specified in + * $additionalElements. + * @param elements array an associative array containing key => value pairs + * @param indentString string a string that will be inserted before every generated line + * @return string the XML tags corresponding to $additionalElements + */ + function _createAdditionalElements($elements, $indentString="") { + $ae = ""; + if (is_array($elements)) { + foreach($elements AS $key => $value) { + $ae.= $indentString."<$key>$value\n"; + } + } + return $ae; + } + + function _createStylesheetReferences() { + $xml = ""; + if ($this->cssStyleSheet) $xml .= "cssStyleSheet."\" type=\"text/css\"?>\n"; + if ($this->xslStyleSheet) $xml .= "xslStyleSheet."\" type=\"text/xsl\"?>\n"; + return $xml; + } + + + /** + * Builds the feed's text. + * @abstract + * @return string the feed's complete text + */ + function createFeed() { + } + + /** + * Generate a filename for the feed cache file. The result will be $_SERVER["PHP_SELF"] with the extension changed to .xml. + * For example: + * + * echo $_SERVER["PHP_SELF"]."\n"; + * echo FeedCreator::_generateFilename(); + * + * would produce: + * + * /rss/latestnews.php + * latestnews.xml + * + * @return string the feed cache filename + * @since 1.4 + * @access private + */ + function _generateFilename() { + $fileInfo = pathinfo($_SERVER["PHP_SELF"]); + return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".xml"; + } + + + /** + * @since 1.4 + * @access private + */ + function _redirect($filename) { + // attention, heavily-commented-out-area + + // maybe use this in addition to file time checking + //Header("Expires: ".date("r",time()+$this->_timeout)); + + /* no caching at all, doesn't seem to work as good: + Header("Cache-Control: no-cache"); + Header("Pragma: no-cache"); + */ + + // HTTP redirect, some feed readers' simple HTTP implementations don't follow it + //Header("Location: ".$filename); + + Header("Content-Type: ".$this->contentType."; charset=".$this->encoding."; filename=".basename($filename)); + Header("Content-Disposition: inline; filename=".basename($filename)); + readfile($filename, "r"); + die(); + } + + /** + * Turns on caching and checks if there is a recent version of this feed in the cache. + * If there is, an HTTP redirect header is sent. + * To effectively use caching, you should create the FeedCreator object and call this method + * before anything else, especially before you do the time consuming task to build the feed + * (web fetching, for example). + * @since 1.4 + * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour) + */ + function useCached($filename="", $timeout=3600) { + $this->_timeout = $timeout; + if ($filename=="") { + $filename = $this->_generateFilename(); + } + if (file_exists($filename) AND (time()-filemtime($filename) < $timeout)) { + $this->_redirect($filename); + } + } + + + /** + * Saves this feed as a file on the local disk. After the file is saved, a redirect + * header may be sent to redirect the user to the newly created file. + * @since 1.4 + * + * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param redirect boolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file. + */ + function saveFeed($filename="", $displayContents=true) { + if ($filename=="") { + $filename = $this->_generateFilename(); + } + $feedFile = fopen($filename, "w+"); + if ($feedFile) { + fputs($feedFile,$this->createFeed()); + fclose($feedFile); + if ($displayContents) { + $this->_redirect($filename); + } + } else { + echo "
    Error creating feed file, please check write permissions.
    "; + } + } + +} + + +/** + * FeedDate is an internal class that stores a date for a feed or feed item. + * Usually, you won't need to use this. + */ +class FeedDate { + var $unix; + + /** + * Creates a new instance of FeedDate representing a given date. + * Accepts RFC 822, ISO 8601 date formats as well as unix time stamps. + * @param mixed $dateString optional the date this FeedDate will represent. If not specified, the current date and time is used. + */ + function FeedDate($dateString="") { + if ($dateString=="") $dateString = date("r"); + + if (is_integer($dateString)) { + $this->unix = $dateString; + return; + } + if (preg_match("~(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s+)?(\\d{1,2})\\s+([a-zA-Z]{3})\\s+(\\d{4})\\s+(\\d{2}):(\\d{2}):(\\d{2})\\s+(.*)~",$dateString,$matches)) { + $months = Array("Jan"=>1,"Feb"=>2,"Mar"=>3,"Apr"=>4,"May"=>5,"Jun"=>6,"Jul"=>7,"Aug"=>8,"Sep"=>9,"Oct"=>10,"Nov"=>11,"Dec"=>12); + $this->unix = mktime($matches[4],$matches[5],$matches[6],$months[$matches[2]],$matches[1],$matches[3]); + if (substr($matches[7],0,1)=='+' OR substr($matches[7],0,1)=='-') { + $tzOffset = (substr($matches[7],0,3) * 60 + substr($matches[7],-2)) * 60; + } else { + if (strlen($matches[7])==1) { + $oneHour = 3600; + $ord = ord($matches[7]); + if ($ord < ord("M")) { + $tzOffset = (ord("A") - $ord - 1) * $oneHour; + } elseif ($ord >= ord("M") AND $matches[7]!="Z") { + $tzOffset = ($ord - ord("M")) * $oneHour; + } elseif ($matches[7]=="Z") { + $tzOffset = 0; + } + } + switch ($matches[7]) { + case "UT": + case "GMT": $tzOffset = 0; + } + } + $this->unix += $tzOffset; + return; + } + if (preg_match("~(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(.*)~",$dateString,$matches)) { + $this->unix = mktime($matches[4],$matches[5],$matches[6],$matches[2],$matches[3],$matches[1]); + if (substr($matches[7],0,1)=='+' OR substr($matches[7],0,1)=='-') { + $tzOffset = (substr($matches[7],0,3) * 60 + substr($matches[7],-2)) * 60; + } else { + if ($matches[7]=="Z") { + $tzOffset = 0; + } + } + $this->unix += $tzOffset; + return; + } + $this->unix = 0; + } + + /** + * Gets the date stored in this FeedDate as an RFC 822 date. + * + * @return a date in RFC 822 format + */ + function rfc822() { + //return gmdate("r",$this->unix); + $date = gmdate("D, d M Y H:i:s", $this->unix); + if (TIME_ZONE!="") $date .= " ".str_replace(":","",TIME_ZONE); + return $date; + } + + /** + * Gets the date stored in this FeedDate as an ISO 8601 date. + * + * @return a date in ISO 8601 format + */ + function iso8601() { + $date = gmdate("Y-m-d\TH:i:sO",$this->unix); + $date = substr($date,0,22) . ':' . substr($date,-2); + if (TIME_ZONE!="") $date = str_replace("+00:00",TIME_ZONE,$date); + return $date; + } + + /** + * Gets the date stored in this FeedDate as unix time stamp. + * + * @return a date as a unix time stamp + */ + function unix() { + return $this->unix; + } +} + + +/** + * RSSCreator10 is a FeedCreator that implements RDF Site Summary (RSS) 1.0. + * + * @see http://www.purl.org/rss/1.0/ + * @since 1.3 + * @author Kai Blankenhorn + */ +class RSSCreator10 extends FeedCreator { + + /** + * Builds the RSS feed's text. The feed will be compliant to RDF Site Summary (RSS) 1.0. + * The feed will contain all items previously added in the same order. + * @return string the feed's complete text + */ + function createFeed() { + $feed = "encoding."\"?>\n"; + $feed.= $this->_createGeneratorComment(); + if ($this->cssStyleSheet=="") { + $cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css"; + } + $feed.= $this->_createStylesheetReferences(); + $feed.= "\n"; + $feed.= " syndicationURL."\">\n"; + $feed.= " ".htmlspecialchars($this->title)."\n"; + $feed.= " ".htmlspecialchars($this->description)."\n"; + $feed.= " ".$this->link."\n"; + if ($this->image!=null) { + $feed.= " image->url."\" />\n"; + } + $now = new FeedDate(); + $feed.= " ".htmlspecialchars($now->iso8601())."\n"; + $feed.= " \n"; + $feed.= " \n"; + for ($i=0;$iitems);$i++) { + $feed.= " items[$i]->link)."\"/>\n"; + } + $feed.= " \n"; + $feed.= " \n"; + $feed.= " \n"; + if ($this->image!=null) { + $feed.= " image->url."\">\n"; + $feed.= " ".$this->image->title."\n"; + $feed.= " ".$this->image->link."\n"; + $feed.= " ".$this->image->url."\n"; + $feed.= " \n"; + } + $feed.= $this->_createAdditionalElements($this->additionalElements, " "); + + for ($i=0;$iitems);$i++) { + $feed.= " items[$i]->link)."\">\n"; + //$feed.= " Posting\n"; + $feed.= " text/html\n"; + if ($this->items[$i]->date!=null) { + $itemDate = new FeedDate($this->items[$i]->date); + $feed.= " ".htmlspecialchars($itemDate->iso8601())."\n"; + } + if ($this->items[$i]->source!="") { + $feed.= " ".htmlspecialchars($this->items[$i]->source)."\n"; + } + if ($this->items[$i]->author!="") { + $feed.= " ".htmlspecialchars($this->items[$i]->author)."\n"; + } + $feed.= " ".htmlspecialchars(strip_tags(strtr($this->items[$i]->title,"\n\r"," ")))."\n"; + $feed.= " ".htmlspecialchars($this->items[$i]->link)."\n"; + $feed.= " ".htmlspecialchars($this->items[$i]->description)."\n"; + $feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " "); + $feed.= " \n"; + } + $feed.= "\n"; + return $feed; + } +} + + + +/** + * RSSCreator091 is a FeedCreator that implements RSS 0.91 Spec, revision 3. + * + * @see http://my.netscape.com/publish/formats/rss-spec-0.91.html + * @since 1.3 + * @author Kai Blankenhorn + */ +class RSSCreator091 extends FeedCreator { + + /** + * Stores this RSS feed's version number. + * @access private + */ + var $RSSVersion; + + function RSSCreator091() { + $this->_setRSSVersion("0.91"); + $this->contentType = "application/rss+xml"; + } + + /** + * Sets this RSS feed's version number. + * @access private + */ + function _setRSSVersion($version) { + $this->RSSVersion = $version; + } + + /** + * Builds the RSS feed's text. The feed will be compliant to RDF Site Summary (RSS) 1.0. + * The feed will contain all items previously added in the same order. + * @return string the feed's complete text + */ + function createFeed() { + $feed = "encoding."\"?>\n"; + $feed.= $this->_createGeneratorComment(); + $feed.= $this->_createStylesheetReferences(); + $feed.= "RSSVersion."\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n"; + $feed.= " \n"; + $feed.= " ".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."\n"; + $this->descriptionTruncSize = 500; + $feed.= " ".$this->getDescription()."\n"; + $feed.= " ".$this->link."\n"; + $feed.= " syndicationURL."\" rel=\"self\" type=\"application/rss+xml\" />\n"; + $now = new FeedDate(); + $feed.= " ".htmlspecialchars($now->rfc822())."\n"; + $feed.= " ".FEEDCREATOR_VERSION."\n"; + + if ($this->image!=null) { + $feed.= " \n"; + $feed.= " ".$this->image->url."\n"; + $feed.= " ".FeedCreator::iTrunc(htmlspecialchars($this->image->title),100)."\n"; + $feed.= " ".$this->image->link."\n"; + if ($this->image->width!="") { + $feed.= " ".$this->image->width."\n"; + } + if ($this->image->height!="") { + $feed.= " ".$this->image->height."\n"; + } + if ($this->image->description!="") { + $feed.= " ".$this->image->getDescription()."\n"; + } + $feed.= " \n"; + } + if ($this->language!="") { + $feed.= " ".$this->language."\n"; + } + if ($this->copyright!="") { + $feed.= " ".FeedCreator::iTrunc(htmlspecialchars($this->copyright),100)."\n"; + } + if ($this->editor!="") { + $feed.= " ".FeedCreator::iTrunc(htmlspecialchars($this->editor),100)."\n"; + } + if ($this->webmaster!="") { + $feed.= " ".FeedCreator::iTrunc(htmlspecialchars($this->webmaster),100)."\n"; + } + if ($this->pubDate!="") { + $pubDate = new FeedDate($this->pubDate); + $feed.= " ".htmlspecialchars($pubDate->rfc822())."\n"; + } + if ($this->category!="") { + $feed.= " ".htmlspecialchars($this->category)."\n"; + } + if ($this->docs!="") { + $feed.= " ".FeedCreator::iTrunc(htmlspecialchars($this->docs),500)."\n"; + } + if ($this->ttl!="") { + $feed.= " ".htmlspecialchars($this->ttl)."\n"; + } + if ($this->rating!="") { + $feed.= " ".FeedCreator::iTrunc(htmlspecialchars($this->rating),500)."\n"; + } + if ($this->skipHours!="") { + $feed.= " ".htmlspecialchars($this->skipHours)."\n"; + } + if ($this->skipDays!="") { + $feed.= " ".htmlspecialchars($this->skipDays)."\n"; + } + $feed.= $this->_createAdditionalElements($this->additionalElements, " "); + + for ($i=0;$iitems);$i++) { + $feed.= " \n"; + $feed.= " ".FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100)."\n"; + $feed.= " ".htmlspecialchars($this->items[$i]->link)."\n"; + $feed.= " ".$this->items[$i]->getDescription()."\n"; + + if ($this->items[$i]->author!="") { + $feed.= " ".htmlspecialchars($this->items[$i]->author)."\n"; + } + /* + // on hold + if ($this->items[$i]->source!="") { + $feed.= " ".htmlspecialchars($this->items[$i]->source)."\n"; + } + */ + if ($this->items[$i]->category!="") { + $feed.= " ".htmlspecialchars($this->items[$i]->category)."\n"; + } + if ($this->items[$i]->comments!="") { + $feed.= " ".htmlspecialchars($this->items[$i]->comments)."\n"; + } + if ($this->items[$i]->date!="") { + $itemDate = new FeedDate($this->items[$i]->date); + $feed.= " ".htmlspecialchars($itemDate->rfc822())."\n"; + } + if ($this->items[$i]->guid!="") { + $feed.= " items[$i]->guidIsPermaLink == false) { + $feed.= " isPermaLink=\"false\""; + } + $feed.= ">".htmlspecialchars($this->items[$i]->guid)."\n"; + } + $feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " "); + $feed.= " \n"; + } + $feed.= " \n"; + $feed.= "\n"; + return $feed; + } +} + + + +/** + * RSSCreator20 is a FeedCreator that implements RDF Site Summary (RSS) 2.0. + * + * @see http://backend.userland.com/rss + * @since 1.3 + * @author Kai Blankenhorn + */ +class RSSCreator20 extends RSSCreator091 { + + function RSSCreator20() { + parent::_setRSSVersion("2.0"); + } + +} + + +/** + * PIECreator01 is a FeedCreator that implements the emerging PIE specification, + * as in http://intertwingly.net/wiki/pie/Syntax. + * + * @deprecated + * @since 1.3 + * @author Scott Reynen and Kai Blankenhorn + */ +class PIECreator01 extends FeedCreator { + + function PIECreator01() { + $this->encoding = "utf-8"; + } + + function createFeed() { + $feed = "encoding."\"?>\n"; + $feed.= $this->_createStylesheetReferences(); + $feed.= "\n"; + $feed.= " ".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."\n"; + $this->truncSize = 500; + $feed.= " ".$this->getDescription()."\n"; + $feed.= " ".$this->link."\n"; + for ($i=0;$iitems);$i++) { + $feed.= " \n"; + $feed.= " ".FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100)."\n"; + $feed.= " ".htmlspecialchars($this->items[$i]->link)."\n"; + $itemDate = new FeedDate($this->items[$i]->date); + $feed.= " ".htmlspecialchars($itemDate->iso8601())."\n"; + $feed.= " ".htmlspecialchars($itemDate->iso8601())."\n"; + $feed.= " ".htmlspecialchars($itemDate->iso8601())."\n"; + $feed.= " ".htmlspecialchars($this->items[$i]->guid)."\n"; + if ($this->items[$i]->author!="") { + $feed.= " \n"; + $feed.= " ".htmlspecialchars($this->items[$i]->author)."\n"; + if ($this->items[$i]->authorEmail!="") { + $feed.= " ".$this->items[$i]->authorEmail."\n"; + } + $feed.=" \n"; + } + $feed.= " \n"; + $feed.= "
    ".$this->items[$i]->getDescription()."
    \n"; + $feed.= "
    \n"; + $feed.= "
    \n"; + } + $feed.= "
    \n"; + return $feed; + } +} + + +/** + * AtomCreator03 is a FeedCreator that implements the atom specification, + * as in http://www.intertwingly.net/wiki/pie/FrontPage. + * Please note that just by using AtomCreator03 you won't automatically + * produce valid atom files. For example, you have to specify either an editor + * for the feed or an author for every single feed item. + * + * Some elements have not been implemented yet. These are (incomplete list): + * author URL, item author's email and URL, item contents, alternate links, + * other link content types than text/html. Some of them may be created with + * AtomCreator03::additionalElements. + * + * @see FeedCreator#additionalElements + * @since 1.6 + * @author Kai Blankenhorn , Scott Reynen + */ +class AtomCreator03 extends FeedCreator { + + function AtomCreator03() { + $this->contentType = "application/atom+xml"; + $this->encoding = "utf-8"; + } + + function createFeed() { + $feed = "encoding."\"?>\n"; + $feed.= $this->_createGeneratorComment(); + $feed.= $this->_createStylesheetReferences(); + $feed.= "language!="") { + $feed.= " xml:lang=\"".$this->language."\""; + } + $feed.= ">\n"; + $feed.= " ".htmlspecialchars($this->title)."\n"; + $feed.= " ".htmlspecialchars($this->description)."\n"; + $feed.= " link)."\"/>\n"; + $feed.= " ".htmlspecialchars($this->link)."\n"; + $now = new FeedDate(); + $feed.= " ".htmlspecialchars($now->iso8601())."\n"; + if ($this->editor!="") { + $feed.= " \n"; + $feed.= " ".$this->editor."\n"; + if ($this->editorEmail!="") { + $feed.= " ".$this->editorEmail."\n"; + } + $feed.= " \n"; + } + $feed.= " ".FEEDCREATOR_VERSION."\n"; + $feed.= $this->_createAdditionalElements($this->additionalElements, " "); + for ($i=0;$iitems);$i++) { + $feed.= " \n"; + $feed.= " ".htmlspecialchars(strip_tags($this->items[$i]->title))."\n"; + $feed.= " items[$i]->link)."\"/>\n"; + if ($this->items[$i]->date=="") { + $this->items[$i]->date = time(); + } + $itemDate = new FeedDate($this->items[$i]->date); + $feed.= " ".htmlspecialchars($itemDate->iso8601())."\n"; + $feed.= " ".htmlspecialchars($itemDate->iso8601())."\n"; + $feed.= " ".htmlspecialchars($itemDate->iso8601())."\n"; + $feed.= " ".htmlspecialchars($this->items[$i]->link)."\n"; + $feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " "); + if ($this->items[$i]->author!="") { + $feed.= " \n"; + $feed.= " ".htmlspecialchars($this->items[$i]->author)."\n"; + $feed.= " \n"; + } + if ($this->items[$i]->description!="") { + $feed.= " ".htmlspecialchars($this->items[$i]->description)."\n"; + } + $feed.= " \n"; + } + $feed.= "\n"; + return $feed; + } +} + + +/** + * MBOXCreator is a FeedCreator that implements the mbox format + * as described in http://www.qmail.org/man/man5/mbox.html + * + * @since 1.3 + * @author Kai Blankenhorn + */ +class MBOXCreator extends FeedCreator { + + function MBOXCreator() { + $this->contentType = "text/plain"; + $this->encoding = "ISO-8859-15"; + } + + function qp_enc($input = "", $line_max = 76) { + $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'); + $lines = preg_split("/(?:\r\n|\r|\n)/", $input); + $eol = "\r\n"; + $escape = "="; + $output = ""; + while( list(, $line) = each($lines) ) { + //$line = rtrim($line); // remove trailing white space -> no =20\r\n necessary + $linlen = strlen($line); + $newline = ""; + for($i = 0; $i < $linlen; $i++) { + $c = substr($line, $i, 1); + $dec = ord($c); + if ( ($dec == 32) && ($i == ($linlen - 1)) ) { // convert space at eol only + $c = "=20"; + } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required + $h2 = floor($dec/16); $h1 = floor($dec%16); + $c = $escape.$hex["$h2"].$hex["$h1"]; + } + if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted + $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay + $newline = ""; + } + $newline .= $c; + } // end of for + $output .= $newline.$eol; + } + return trim($output); + } + + + /** + * Builds the MBOX contents. + * @return string the feed's complete text + */ + function createFeed() { + for ($i=0;$iitems);$i++) { + if ($this->items[$i]->author!="") { + $from = $this->items[$i]->author; + } else { + $from = $this->title; + } + $itemDate = new FeedDate($this->items[$i]->date); + $feed.= "From ".strtr(MBOXCreator::qp_enc($from)," ","_")." ".date("D M d H:i:s Y",$itemDate->unix())."\n"; + $feed.= "Content-Type: text/plain;\n"; + $feed.= " charset=\"".$this->encoding."\"\n"; + $feed.= "Content-Transfer-Encoding: quoted-printable\n"; + $feed.= "Content-Type: text/plain\n"; + $feed.= "From: \"".MBOXCreator::qp_enc($from)."\"\n"; + $feed.= "Date: ".$itemDate->rfc822()."\n"; + $feed.= "Subject: ".MBOXCreator::qp_enc(FeedCreator::iTrunc($this->items[$i]->title,100))."\n"; + $feed.= "\n"; + $body = chunk_split(MBOXCreator::qp_enc($this->items[$i]->description)); + $feed.= preg_replace("~\nFrom ([^\n]*)(\n?)~","\n>From $1$2\n",$body); + $feed.= "\n"; + $feed.= "\n"; + } + return $feed; + } + + /** + * Generate a filename for the feed cache file. Overridden from FeedCreator to prevent XML data types. + * @return string the feed cache filename + * @since 1.4 + * @access private + */ + function _generateFilename() { + $fileInfo = pathinfo($_SERVER["PHP_SELF"]); + return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".mbox"; + } +} + + +/** + * OPMLCreator is a FeedCreator that implements OPML 1.0. + * + * @see http://opml.scripting.com/spec + * @author Dirk Clemens, Kai Blankenhorn + * @since 1.5 + */ +class OPMLCreator extends FeedCreator { + + function OPMLCreator() { + $this->encoding = "utf-8"; + } + + function createFeed() { + $feed = "encoding."\"?>\n"; + $feed.= $this->_createGeneratorComment(); + $feed.= $this->_createStylesheetReferences(); + $feed.= "\n"; + $feed.= " \n"; + $feed.= " ".htmlspecialchars($this->title)."\n"; + if ($this->pubDate!="") { + $date = new FeedDate($this->pubDate); + $feed.= " ".$date->rfc822()."\n"; + } + if ($this->lastBuildDate!="") { + $date = new FeedDate($this->lastBuildDate); + $feed.= " ".$date->rfc822()."\n"; + } + if ($this->editor!="") { + $feed.= " ".$this->editor."\n"; + } + if ($this->editorEmail!="") { + $feed.= " ".$this->editorEmail."\n"; + } + $feed.= " \n"; + $feed.= " \n"; + for ($i=0;$iitems);$i++) { + $feed.= " items[$i]->title,"\n\r"," "))); + $feed.= " title=\"".$title."\""; + $feed.= " text=\"".$title."\""; + //$feed.= " description=\"".htmlspecialchars($this->items[$i]->description)."\""; + $feed.= " url=\"".htmlspecialchars($this->items[$i]->link)."\""; + $feed.= "/>\n"; + } + $feed.= " \n"; + $feed.= "\n"; + return $feed; + } +} + + + +/** + * HTMLCreator is a FeedCreator that writes an HTML feed file to a specific + * location, overriding the createFeed method of the parent FeedCreator. + * The HTML produced can be included over http by scripting languages, or serve + * as the source for an IFrame. + * All output by this class is embedded in
    tags to enable formatting + * using CSS. + * + * @author Pascal Van Hecke + * @since 1.7 + */ +class HTMLCreator extends FeedCreator { + + var $contentType = "text/html"; + + /** + * Contains HTML to be output at the start of the feed's html representation. + */ + var $header; + + /** + * Contains HTML to be output at the end of the feed's html representation. + */ + var $footer ; + + /** + * Contains HTML to be output between entries. A separator is only used in + * case of multiple entries. + */ + var $separator; + + /** + * Used to prefix the stylenames to make sure they are unique + * and do not clash with stylenames on the users' page. + */ + var $stylePrefix; + + /** + * Determines whether the links open in a new window or not. + */ + var $openInNewWindow = true; + + var $imageAlign ="right"; + + /** + * In case of very simple output you may want to get rid of the style tags, + * hence this variable. There's no equivalent on item level, but of course you can + * add strings to it while iterating over the items ($this->stylelessOutput .= ...) + * and when it is non-empty, ONLY the styleless output is printed, the rest is ignored + * in the function createFeed(). + */ + var $stylelessOutput =""; + + /** + * Writes the HTML. + * @return string the scripts's complete text + */ + function createFeed() { + // if there is styleless output, use the content of this variable and ignore the rest + if ($this->stylelessOutput!="") { + return $this->stylelessOutput; + } + + //if no stylePrefix is set, generate it yourself depending on the script name + if ($this->stylePrefix=="") { + $this->stylePrefix = str_replace(".", "_", $this->_generateFilename())."_"; + } + + //set an openInNewWindow_token_to be inserted or not + if ($this->openInNewWindow) { + $targetInsert = " target='_blank'"; + } + + // use this array to put the lines in and implode later with "document.write" javascript + $feedArray = array(); + if ($this->image!=null) { + $imageStr = "". + "".
+							FeedCreator::iTrunc(htmlspecialchars($this->image->title),100).
+							"image->width) { + $imageStr .=" width='".$this->image->width. "' "; + } + if ($this->image->height) { + $imageStr .=" height='".$this->image->height."' "; + } + $imageStr .="/>"; + $feedArray[] = $imageStr; + } + + if ($this->title) { + $feedArray[] = ""; + } + if ($this->getDescription()) { + $feedArray[] = "
    ". + str_replace("]]>", "", str_replace("getDescription())). + "
    "; + } + + if ($this->header) { + $feedArray[] = "
    ".$this->header."
    "; + } + + for ($i=0;$iitems);$i++) { + if ($this->separator and $i > 0) { + $feedArray[] = "
    ".$this->separator."
    "; + } + + if ($this->items[$i]->title) { + if ($this->items[$i]->link) { + $feedArray[] = + ""; + } else { + $feedArray[] = + "
    ". + FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100). + "
    "; + } + } + if ($this->items[$i]->getDescription()) { + $feedArray[] = + "
    ". + str_replace("]]>", "", str_replace("items[$i]->getDescription())). + "
    "; + } + } + if ($this->footer) { + $feedArray[] = "
    ".$this->footer."
    "; + } + + $feed= "".join($feedArray, "\r\n"); + return $feed; + } + + /** + * Overrrides parent to produce .html extensions + * + * @return string the feed cache filename + * @since 1.4 + * @access private + */ + function _generateFilename() { + $fileInfo = pathinfo($_SERVER["PHP_SELF"]); + return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".html"; + } +} + + +/** + * JSCreator is a class that writes a js file to a specific + * location, overriding the createFeed method of the parent HTMLCreator. + * + * @author Pascal Van Hecke + */ +class JSCreator extends HTMLCreator { + var $contentType = "text/javascript"; + + /** + * writes the javascript + * @return string the scripts's complete text + */ + function createFeed() + { + $feed = parent::createFeed(); + $feedArray = explode("\n",$feed); + + $jsFeed = ""; + foreach ($feedArray as $value) { + $jsFeed .= "document.write('".trim(addslashes($value))."');\n"; + } + return $jsFeed; + } + + /** + * Overrrides parent to produce .js extensions + * + * @return string the feed cache filename + * @since 1.4 + * @access private + */ + function _generateFilename() { + $fileInfo = pathinfo($_SERVER["PHP_SELF"]); + return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".js"; + } + +} + + + +/*** TEST SCRIPT ********************************************************* + +//include("feedcreator.class.php"); + +$rss = new UniversalFeedCreator(); +$rss->useCached(); +$rss->title = "PHP news"; +$rss->description = "daily news from the PHP scripting world"; + +//optional +//$rss->descriptionTruncSize = 500; +//$rss->descriptionHtmlSyndicated = true; +//$rss->xslStyleSheet = "http://feedster.com/rss20.xsl"; + +$rss->link = "http://www.dailyphp.net/news"; +$rss->feedURL = "http://www.dailyphp.net/".$PHP_SELF; + +$image = new FeedImage(); +$image->title = "dailyphp.net logo"; +$image->url = "http://www.dailyphp.net/images/logo.gif"; +$image->link = "http://www.dailyphp.net"; +$image->description = "Feed provided by dailyphp.net. Click to visit."; + +//optional +$image->descriptionTruncSize = 500; +$image->descriptionHtmlSyndicated = true; + +$rss->image = $image; + +// get your news items from somewhere, e.g. your database: +//mysql_select_db($dbHost, $dbUser, $dbPass); +//$res = mysql_query("SELECT * FROM news ORDER BY newsdate DESC"); +//while ($data = mysql_fetch_object($res)) { + $item = new FeedItem(); + $item->title = "This is an the test title of an item"; + $item->link = "http://localhost/item/"; + $item->description = "description in
    HTML"; + + //optional + //item->descriptionTruncSize = 500; + $item->descriptionHtmlSyndicated = true; + + $item->date = time(); + $item->source = "http://www.dailyphp.net"; + $item->author = "John Doe"; + + $rss->addItem($item); +//} + +// valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1, MBOX, OPML, ATOM0.3, HTML, JS +echo $rss->saveFeed("RSS0.91", "feed.xml"); + + + +***************************************************************************/ + +?> diff --git a/web/lib/gettext.php b/web/lib/gettext.php new file mode 100644 index 00000000..098f0e5e --- /dev/null +++ b/web/lib/gettext.php @@ -0,0 +1,432 @@ +. + Copyright (c) 2005 Nico Kaiser + + This file is part of PHP-gettext. + + PHP-gettext is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + PHP-gettext is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with PHP-gettext; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + +/** + * Provides a simple gettext replacement that works independently from + * the system's gettext abilities. + * It can read MO files and use them for translating strings. + * The files are passed to gettext_reader as a Stream (see streams.php) + * + * This version has the ability to cache all strings and translations to + * speed up the string lookup. + * While the cache is enabled by default, it can be switched off with the + * second parameter in the constructor (e.g. whenusing very large MO files + * that you don't want to keep in memory) + */ +class gettext_reader { + //public: + var $error = 0; // public variable that holds error code (0 if no error) + + //private: + var $BYTEORDER = 0; // 0: low endian, 1: big endian + var $STREAM = NULL; + var $short_circuit = false; + var $enable_cache = false; + var $originals = NULL; // offset of original table + var $translations = NULL; // offset of translation table + var $pluralheader = NULL; // cache header field for plural forms + var $total = 0; // total string count + var $table_originals = NULL; // table for original strings (offsets) + var $table_translations = NULL; // table for translated strings (offsets) + var $cache_translations = NULL; // original -> translation mapping + + + /* Methods */ + + + /** + * Reads a 32bit Integer from the Stream + * + * @access private + * @return Integer from the Stream + */ + function readint() { + if ($this->BYTEORDER == 0) { + // low endian + $input=unpack('V', $this->STREAM->read(4)); + return array_shift($input); + } else { + // big endian + $input=unpack('N', $this->STREAM->read(4)); + return array_shift($input); + } + } + + function read($bytes) { + return $this->STREAM->read($bytes); + } + + /** + * Reads an array of Integers from the Stream + * + * @param int count How many elements should be read + * @return Array of Integers + */ + function readintarray($count) { + if ($this->BYTEORDER == 0) { + // low endian + return unpack('V'.$count, $this->STREAM->read(4 * $count)); + } else { + // big endian + return unpack('N'.$count, $this->STREAM->read(4 * $count)); + } + } + + /** + * Constructor + * + * @param object Reader the StreamReader object + * @param boolean enable_cache Enable or disable caching of strings (default on) + */ + function __construct($Reader, $enable_cache = true) { + // If there isn't a StreamReader, turn on short circuit mode. + if (! $Reader || isset($Reader->error) ) { + $this->short_circuit = true; + return; + } + + // Caching can be turned off + $this->enable_cache = $enable_cache; + + $MAGIC1 = "\x95\x04\x12\xde"; + $MAGIC2 = "\xde\x12\x04\x95"; + + $this->STREAM = $Reader; + $magic = $this->read(4); + if ($magic == $MAGIC1) { + $this->BYTEORDER = 1; + } elseif ($magic == $MAGIC2) { + $this->BYTEORDER = 0; + } else { + $this->error = 1; // not MO file + return false; + } + + // FIXME: Do we care about revision? We should. + $revision = $this->readint(); + + $this->total = $this->readint(); + $this->originals = $this->readint(); + $this->translations = $this->readint(); + } + + /** + * Loads the translation tables from the MO file into the cache + * If caching is enabled, also loads all strings into a cache + * to speed up translation lookups + * + * @access private + */ + function load_tables() { + if (is_array($this->cache_translations) && + is_array($this->table_originals) && + is_array($this->table_translations)) + return; + + /* get original and translations tables */ + if (!is_array($this->table_originals)) { + $this->STREAM->seekto($this->originals); + $this->table_originals = $this->readintarray($this->total * 2); + } + if (!is_array($this->table_translations)) { + $this->STREAM->seekto($this->translations); + $this->table_translations = $this->readintarray($this->total * 2); + } + + if ($this->enable_cache) { + $this->cache_translations = array (); + /* read all strings in the cache */ + for ($i = 0; $i < $this->total; $i++) { + $this->STREAM->seekto($this->table_originals[$i * 2 + 2]); + $original = $this->STREAM->read($this->table_originals[$i * 2 + 1]); + $this->STREAM->seekto($this->table_translations[$i * 2 + 2]); + $translation = $this->STREAM->read($this->table_translations[$i * 2 + 1]); + $this->cache_translations[$original] = $translation; + } + } + } + + /** + * Returns a string from the "originals" table + * + * @access private + * @param int num Offset number of original string + * @return string Requested string if found, otherwise '' + */ + function get_original_string($num) { + $length = $this->table_originals[$num * 2 + 1]; + $offset = $this->table_originals[$num * 2 + 2]; + if (! $length) + return ''; + $this->STREAM->seekto($offset); + $data = $this->STREAM->read($length); + return (string)$data; + } + + /** + * Returns a string from the "translations" table + * + * @access private + * @param int num Offset number of original string + * @return string Requested string if found, otherwise '' + */ + function get_translation_string($num) { + $length = $this->table_translations[$num * 2 + 1]; + $offset = $this->table_translations[$num * 2 + 2]; + if (! $length) + return ''; + $this->STREAM->seekto($offset); + $data = $this->STREAM->read($length); + return (string)$data; + } + + /** + * Binary search for string + * + * @access private + * @param string string + * @param int start (internally used in recursive function) + * @param int end (internally used in recursive function) + * @return int string number (offset in originals table) + */ + function find_string($string, $start = -1, $end = -1) { + if (($start == -1) or ($end == -1)) { + // find_string is called with only one parameter, set start end end + $start = 0; + $end = $this->total; + } + if (abs($start - $end) <= 1) { + // We're done, now we either found the string, or it doesn't exist + $txt = $this->get_original_string($start); + if ($string == $txt) + return $start; + else + return -1; + } else if ($start > $end) { + // start > end -> turn around and start over + return $this->find_string($string, $end, $start); + } else { + // Divide table in two parts + $half = (int)(($start + $end) / 2); + $cmp = strcmp($string, $this->get_original_string($half)); + if ($cmp == 0) + // string is exactly in the middle => return it + return $half; + else if ($cmp < 0) + // The string is in the upper half + return $this->find_string($string, $start, $half); + else + // The string is in the lower half + return $this->find_string($string, $half, $end); + } + } + + /** + * Translates a string + * + * @access public + * @param string string to be translated + * @return string translated string (or original, if not found) + */ + function translate($string) { + if ($this->short_circuit) + return $string; + $this->load_tables(); + + if ($this->enable_cache) { + // Caching enabled, get translated string from cache + if (array_key_exists($string, $this->cache_translations)) + return $this->cache_translations[$string]; + else + return $string; + } else { + // Caching not enabled, try to find string + $num = $this->find_string($string); + if ($num == -1) + return $string; + else + return $this->get_translation_string($num); + } + } + + /** + * Sanitize plural form expression for use in PHP eval call. + * + * @access private + * @return string sanitized plural form expression + */ + function sanitize_plural_expression($expr) { + // Get rid of disallowed characters. + $expr = preg_replace('@[^a-zA-Z0-9_:;\(\)\?\|\&=!<>+*/\%-]@', '', $expr); + + // Add parenthesis for tertiary '?' operator. + $expr .= ';'; + $res = ''; + $p = 0; + for ($i = 0; $i < strlen($expr); $i++) { + $ch = $expr[$i]; + switch ($ch) { + case '?': + $res .= ' ? ('; + $p++; + break; + case ':': + $res .= ') : ('; + break; + case ';': + $res .= str_repeat( ')', $p) . ';'; + $p = 0; + break; + default: + $res .= $ch; + } + } + return $res; + } + + /** + * Parse full PO header and extract only plural forms line. + * + * @access private + * @return string verbatim plural form header field + */ + function extract_plural_forms_header_from_po_header($header) { + if (preg_match("/(^|\n)plural-forms: ([^\n]*)\n/i", $header, $regs)) + $expr = $regs[2]; + else + $expr = "nplurals=2; plural=n == 1 ? 0 : 1;"; + return $expr; + } + + /** + * Get possible plural forms from MO header + * + * @access private + * @return string plural form header + */ + function get_plural_forms() { + // lets assume message number 0 is header + // this is true, right? + $this->load_tables(); + + // cache header field for plural forms + if (! is_string($this->pluralheader)) { + if ($this->enable_cache) { + $header = $this->cache_translations[""]; + } else { + $header = $this->get_translation_string(0); + } + $expr = $this->extract_plural_forms_header_from_po_header($header); + $this->pluralheader = $this->sanitize_plural_expression($expr); + } + return $this->pluralheader; + } + + /** + * Detects which plural form to take + * + * @access private + * @param n count + * @return int array index of the right plural form + */ + function select_string($n) { + $string = $this->get_plural_forms(); + $string = str_replace('nplurals',"\$total",$string); + $string = str_replace("n",$n,$string); + $string = str_replace('plural',"\$plural",$string); + + $total = 0; + $plural = 0; + + eval("$string"); + if ($plural >= $total) $plural = $total - 1; + return $plural; + } + + /** + * Plural version of gettext + * + * @access public + * @param string single + * @param string plural + * @param string number + * @return translated plural form + */ + function ngettext($single, $plural, $number) { + if ($this->short_circuit) { + if ($number != 1) + return $plural; + else + return $single; + } + + // find out the appropriate form + $select = $this->select_string($number); + + // this should contains all strings separated by NULLs + $key = $single . chr(0) . $plural; + + + if ($this->enable_cache) { + if (! array_key_exists($key, $this->cache_translations)) { + return ($number != 1) ? $plural : $single; + } else { + $result = $this->cache_translations[$key]; + $list = explode(chr(0), $result); + return $list[$select]; + } + } else { + $num = $this->find_string($key); + if ($num == -1) { + return ($number != 1) ? $plural : $single; + } else { + $result = $this->get_translation_string($num); + $list = explode(chr(0), $result); + return $list[$select]; + } + } + } + + function pgettext($context, $msgid) { + $key = $context . chr(4) . $msgid; + $ret = $this->translate($key); + if (strpos($ret, "\004") !== false) { + return $msgid; + } else { + return $ret; + } + } + + function npgettext($context, $singular, $plural, $number) { + $key = $context . chr(4) . $singular; + $ret = $this->ngettext($key, $plural, $number); + if (strpos($ret, "\004") !== false) { + return $singular; + } else { + return $ret; + } + + } +} + +?> diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php new file mode 100644 index 00000000..a053962e --- /dev/null +++ b/web/lib/pkgbasefuncs.inc.php @@ -0,0 +1,1253 @@ +query($q); + if (!$result) { + return null; + } + + return $result->fetchColumn(0); +} + +/** + * Get all package comment information for a specific package base + * + * @param int $base_id The package base ID to get comments for + * @param int $limit Maximum number of comments to return (0 means unlimited) + * @param bool $include_deleted True if deleted comments should be included + * @param bool $only_pinned True when only pinned comments are to be included + * + * @return array All package comment information for a specific package base + */ +function pkgbase_comments($base_id, $limit, $include_deleted, $only_pinned=false, $offset=0) { + $base_id = intval($base_id); + $limit = intval($limit); + if (!$base_id) { + return null; + } + + $dbh = DB::connect(); + $q = "SELECT PackageComments.ID, A.UserName AS UserName, UsersID, Comments, "; + $q.= "PackageBaseID, CommentTS, DelTS, EditedTS, B.UserName AS EditUserName, "; + $q.= "DelUsersID, C.UserName AS DelUserName, RenderedComment, "; + $q.= "PinnedTS FROM PackageComments "; + $q.= "LEFT JOIN Users A ON PackageComments.UsersID = A.ID "; + $q.= "LEFT JOIN Users B ON PackageComments.EditedUsersID = B.ID "; + $q.= "LEFT JOIN Users C ON PackageComments.DelUsersID = C.ID "; + $q.= "WHERE PackageBaseID = " . $base_id . " "; + + if (!$include_deleted) { + $q.= "AND DelTS IS NULL "; + } + if ($only_pinned) { + $q.= "AND NOT PinnedTS = 0 "; + } + $q.= "ORDER BY CommentTS DESC"; + if ($limit > 0) { + $q.=" LIMIT " . $limit; + } + if ($offset > 0) { + $q.=" OFFSET " . $offset; + } + $result = $dbh->query($q); + if (!$result) { + return null; + } + + return $result->fetchAll(); +} + +/* + * Invoke the comment rendering script. + * + * @param int $id ID of the comment to render + * + * @return void + */ +function render_comment($id) { + $cmd = config_get('options', 'render-comment-cmd'); + $cmd .= ' ' . intval($id); + + $descspec = array( + 0 => array('pipe', 'r'), + 1 => array('pipe', 'w'), + ); + + $p = proc_open($cmd, $descspec, $pipes); + + if (!is_resource($p)) { + return false; + } + + fclose($pipes[0]); + fclose($pipes[1]); + + return proc_close($p); +} + +/** + * Add a comment to a package page and send out appropriate notifications + * + * @param string $base_id The package base ID to add the comment on + * @param string $uid The user ID of the individual who left the comment + * @param string $comment The comment left on a package page + * + * @return void + */ +function pkgbase_add_comment($base_id, $uid, $comment) { + $dbh = DB::connect(); + + if (trim($comment) == '') { + return array(false, __('Comment cannot be empty.')); + } + + $q = "INSERT INTO PackageComments "; + $q.= "(PackageBaseID, UsersID, Comments, RenderedComment, CommentTS) "; + $q.= "VALUES (" . intval($base_id) . ", " . $uid . ", "; + $q.= $dbh->quote($comment) . ", '', " . strval(time()) . ")"; + $dbh->exec($q); + $comment_id = $dbh->lastInsertId(); + + render_comment($comment_id); + + notify(array('comment', $uid, $base_id, $comment_id)); + + return array(true, __('Comment has been added.')); +} + +/** + * Pin/unpin a package comment + * + * @param bool $unpin True if unpinning rather than pinning + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgbase_pin_comment($unpin=false) { + $uid = uid_from_sid($_COOKIE["AURSID"]); + + if (!$uid) { + return array(false, __("You must be logged in before you can edit package information.")); + } + + if (isset($_POST["comment_id"])) { + $comment_id = $_POST["comment_id"]; + } else { + return array(false, __("Missing comment ID.")); + } + + if (!$unpin) { + if (pkgbase_comments_count($_POST['package_base'], false, true) >= 5){ + return array(false, __("No more than 5 comments can be pinned.")); + } + } + + if (!can_pin_comment($comment_id)) { + if (!$unpin) { + return array(false, __("You are not allowed to pin this comment.")); + } else { + return array(false, __("You are not allowed to unpin this comment.")); + } + } + + $dbh = DB::connect(); + $q = "UPDATE PackageComments "; + if (!$unpin) { + $q.= "SET PinnedTS = " . strval(time()) . " "; + } else { + $q.= "SET PinnedTS = 0 "; + } + $q.= "WHERE ID = " . intval($comment_id); + $dbh->exec($q); + + if (!$unpin) { + return array(true, __("Comment has been pinned.")); + } else { + return array(true, __("Comment has been unpinned.")); + } +} + +/** + + * Get a list of all packages a logged-in user has voted for + * + * @param string $sid The session ID of the visitor + * + * @return array All packages the visitor has voted for + */ +function pkgbase_votes_from_sid($sid="") { + $pkgs = array(); + if (!$sid) {return $pkgs;} + $dbh = DB::connect(); + $q = "SELECT PackageBaseID "; + $q.= "FROM PackageVotes, Users, Sessions "; + $q.= "WHERE Users.ID = Sessions.UsersID "; + $q.= "AND Users.ID = PackageVotes.UsersID "; + $q.= "AND Sessions.SessionID = " . $dbh->quote($sid); + $result = $dbh->query($q); + if ($result) { + while ($row = $result->fetch(PDO::FETCH_NUM)) { + $pkgs[$row[0]] = 1; + } + } + return $pkgs; +} + +/** + * Get the package base details + * + * @param string $id The package base ID to get description for + * + * @return array The package base's details OR error message + **/ +function pkgbase_get_details($base_id) { + $dbh = DB::connect(); + + $q = "SELECT PackageBases.ID, PackageBases.Name, "; + $q.= "PackageBases.NumVotes, PackageBases.Popularity, "; + $q.= "PackageBases.OutOfDateTS, PackageBases.SubmittedTS, "; + $q.= "PackageBases.ModifiedTS, PackageBases.SubmitterUID, "; + $q.= "PackageBases.MaintainerUID, PackageBases.PackagerUID, "; + $q.= "PackageBases.FlaggerUID, "; + $q.= "(SELECT COUNT(*) FROM PackageRequests "; + $q.= " WHERE PackageRequests.PackageBaseID = PackageBases.ID "; + $q.= " AND PackageRequests.Status = 0) AS RequestCount "; + $q.= "FROM PackageBases "; + $q.= "WHERE PackageBases.ID = " . intval($base_id); + $result = $dbh->query($q); + + $row = array(); + + if (!$result) { + $row['error'] = __("Error retrieving package details."); + } + else { + $row = $result->fetch(PDO::FETCH_ASSOC); + if (empty($row)) { + $row['error'] = __("Package details could not be found."); + } + } + + return $row; +} + +/** + * Display the package base details page + * + * @param string $id The package base ID to get details page for + * @param array $row Package base details retrieved by pkgbase_get_details() + * @param string $SID The session ID of the visitor + * + * @return void + */ +function pkgbase_display_details($base_id, $row, $SID="") { + if (isset($row['error'])) { + print "

    " . $row['error'] . "

    \n"; + } + else { + $pkgbase_name = pkgbase_name_from_id($base_id); + + include('pkgbase_details.php'); + + if ($SID) { + $comment_section = "package"; + include('pkg_comment_box.php'); + } + + $include_deleted = has_credential(CRED_COMMENT_VIEW_DELETED); + + $limit_pinned = isset($_GET['pinned']) ? 0 : 5; + $pinned = pkgbase_comments($base_id, $limit_pinned, false, true); + if (!empty($pinned)) { + $comment_section = "package"; + include('pkg_comments.php'); + } + unset($pinned); + + + $total_comment_count = pkgbase_comments_count($base_id, $include_deleted); + list($pagination_templs, $per_page, $offset) = calculate_pagination($total_comment_count); + + $comments = pkgbase_comments($base_id, $per_page, $include_deleted, false, $offset); + if (!empty($comments)) { + $comment_section = "package"; + include('pkg_comments.php'); + } + } +} + +/** + * Convert a list of package IDs into a list of corresponding package bases. + * + * @param array|int $ids Array of package IDs to convert + * + * @return array|int List of package base IDs + */ +function pkgbase_from_pkgid($ids) { + $dbh = DB::connect(); + + if (is_array($ids)) { + $q = "SELECT PackageBaseID FROM Packages "; + $q.= "WHERE ID IN (" . implode(",", $ids) . ")"; + $result = $dbh->query($q); + return $result->fetchAll(PDO::FETCH_COLUMN, 0); + } else { + $q = "SELECT PackageBaseID FROM Packages "; + $q.= "WHERE ID = " . $ids; + $result = $dbh->query($q); + return $result->fetch(PDO::FETCH_COLUMN, 0); + } +} + +/** + * Retrieve ID of a package base by name + * + * @param string $name The package base name to retrieve the ID for + * + * @return int The ID of the package base + */ +function pkgbase_from_name($name) { + $dbh = DB::connect(); + $q = "SELECT ID FROM PackageBases WHERE Name = " . $dbh->quote($name); + $result = $dbh->query($q); + return $result->fetch(PDO::FETCH_COLUMN, 0); +} + +/** + * Retrieve the name of a package base given its ID + * + * @param int $base_id The ID of the package base to query + * + * @return string The name of the package base + */ +function pkgbase_name_from_id($base_id) { + $dbh = DB::connect(); + $q = "SELECT Name FROM PackageBases WHERE ID = " . intval($base_id); + $result = $dbh->query($q); + return $result->fetch(PDO::FETCH_COLUMN, 0); +} + +/** + * Get the names of all packages belonging to a package base + * + * @param int $base_id The ID of the package base + * + * @return array The names of all packages belonging to the package base + */ +function pkgbase_get_pkgnames($base_id) { + $dbh = DB::connect(); + $q = "SELECT Name FROM Packages WHERE PackageBaseID = " . intval($base_id); + $result = $dbh->query($q); + return $result->fetchAll(PDO::FETCH_COLUMN, 0); +} + +/** + * Determine whether a package base is (or contains a) VCS package + * + * @param int $base_id The ID of the package base + * + * @return bool True if the package base is/contains a VCS package + */ +function pkgbase_is_vcs($base_id) { + $suffixes = array("-cvs", "-svn", "-git", "-hg", "-bzr", "-darcs"); + $haystack = pkgbase_get_pkgnames($base_id); + array_push($haystack, pkgbase_name_from_id($base_id)); + foreach ($haystack as $pkgname) { + foreach ($suffixes as $suffix) { + if (substr_compare($pkgname, $suffix, -strlen($suffix)) === 0) { + return true; + } + } + } + return false; +} + +/** + * Delete all packages belonging to a package base + * + * @param int $base_id The ID of the package base + * + * @return void + */ +function pkgbase_delete_packages($base_id) { + $dbh = DB::connect(); + $q = "DELETE FROM Packages WHERE PackageBaseID = " . intval($base_id); + $dbh->exec($q); +} + +/** + * Retrieve the maintainer of a package base given its ID + * + * @param int $base_id The ID of the package base to query + * + * @return int The user ID of the current package maintainer + */ +function pkgbase_maintainer_uid($base_id) { + $dbh = DB::connect(); + $q = "SELECT MaintainerUID FROM PackageBases WHERE ID = " . intval($base_id); + $result = $dbh->query($q); + return $result->fetch(PDO::FETCH_COLUMN, 0); +} + +/** + * Retrieve the maintainers of an array of package bases given by their ID + * + * @param int $base_ids The array of IDs of the package bases to query + * + * @return int The user ID of the current package maintainer + */ +function pkgbase_maintainer_uids($base_ids) { + $dbh = DB::connect(); + $q = "SELECT MaintainerUID FROM PackageBases WHERE ID IN (" . implode(",", $base_ids) . ")"; + $result = $dbh->query($q); + return $result->fetchAll(PDO::FETCH_COLUMN, 0); +} + +/** + * Flag package(s) as out-of-date + * + * @param array $base_ids Array of package base IDs to flag/unflag + * @param string $comment The comment to add + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgbase_flag($base_ids, $comment) { + if (!has_credential(CRED_PKGBASE_FLAG)) { + return array(false, __("You must be logged in before you can flag packages.")); + } + + $base_ids = sanitize_ids($base_ids); + if (empty($base_ids)) { + return array(false, __("You did not select any packages to flag.")); + } + + if (strlen($comment) < 3) { + return array(false, __("The selected packages have not been flagged, please enter a comment.")); + } + + $uid = uid_from_sid($_COOKIE['AURSID']); + $dbh = DB::connect(); + + $q = "UPDATE PackageBases SET "; + $q.= "OutOfDateTS = " . strval(time()) . ", FlaggerUID = " . $uid . ", "; + $q.= "FlaggerComment = " . $dbh->quote($comment) . " "; + $q.= "WHERE ID IN (" . implode(",", $base_ids) . ") "; + $q.= "AND OutOfDateTS IS NULL"; + $dbh->exec($q); + + foreach ($base_ids as $base_id) { + notify(array('flag', $uid, $base_id)); + } + + return array(true, __("The selected packages have been flagged out-of-date.")); +} + +/** + * Unflag package(s) as out-of-date + * + * @param array $base_ids Array of package base IDs to flag/unflag + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgbase_unflag($base_ids) { + $uid = uid_from_sid($_COOKIE["AURSID"]); + if (!$uid) { + return array(false, __("You must be logged in before you can unflag packages.")); + } + + $base_ids = sanitize_ids($base_ids); + if (empty($base_ids)) { + return array(false, __("You did not select any packages to unflag.")); + } + + $dbh = DB::connect(); + + $q = "UPDATE PackageBases SET "; + $q.= "OutOfDateTS = NULL "; + $q.= "WHERE ID IN (" . implode(",", $base_ids) . ") "; + + $maintainers = array_merge(pkgbase_maintainer_uids($base_ids), pkgbase_get_comaintainer_uids($base_ids)); + if (!has_credential(CRED_PKGBASE_UNFLAG, $maintainers)) { + $q.= "AND (MaintainerUID = " . $uid . " OR FlaggerUID = " . $uid. ")"; + } + + $result = $dbh->exec($q); + + if ($result) { + return array(true, __("The selected packages have been unflagged.")); + } +} + +/** + * Get package flag OOD comment + * + * @param int $base_id + * + * @return array Tuple of pkgbase ID, reason for OOD, and user who flagged + */ +function pkgbase_get_flag_comment($base_id) { + $base_id = intval($base_id); + $dbh = DB::connect(); + + $q = "SELECT FlaggerComment,OutOfDateTS,Username FROM PackageBases "; + $q.= "LEFT JOIN Users ON FlaggerUID = Users.ID "; + $q.= "WHERE PackageBases.ID = " . $base_id . " "; + $q.= "AND PackageBases.OutOfDateTS IS NOT NULL"; + $result = $dbh->query($q); + + $row = array(); + + if (!$result) { + $row['error'] = __("Error retrieving package details."); + } + else { + $row = $result->fetch(PDO::FETCH_ASSOC); + if (empty($row)) { + $row['error'] = __("Package details could not be found."); + } + } + + return $row; +} + +/** + * Delete package bases + * + * @param array $base_ids Array of package base IDs to delete + * @param int $merge_base_id Package base to merge the deleted ones into + * @param int $via Package request to close upon deletion + * @param bool $grant Allow anyone to delete the package base + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgbase_delete ($base_ids, $merge_base_id, $via, $grant=false) { + if (!$grant && !has_credential(CRED_PKGBASE_DELETE)) { + return array(false, __("You do not have permission to delete packages.")); + } + + $base_ids = sanitize_ids($base_ids); + if (empty($base_ids)) { + return array(false, __("You did not select any packages to delete.")); + } + + $dbh = DB::connect(); + + if ($merge_base_id) { + $merge_base_name = pkgbase_name_from_id($merge_base_id); + } + + $uid = uid_from_sid($_COOKIE['AURSID']); + foreach ($base_ids as $base_id) { + if ($merge_base_id) { + notify(array('delete', $uid, $base_id, $merge_base_id)); + } else { + notify(array('delete', $uid, $base_id)); + } + } + + /* + * Close package request if the deletion was initiated through the + * request interface. NOTE: This needs to happen *before* the actual + * deletion. Otherwise, the former maintainer will not be included in + * the Cc list of the request notification email. + */ + if ($via) { + pkgreq_close(intval($via), 'accepted', ''); + } + + /* Scan through pending deletion requests and close them. */ + $username = username_from_sid($_COOKIE['AURSID']); + foreach ($base_ids as $base_id) { + $pkgreq_ids = array_merge(pkgreq_by_pkgbase($base_id)); + foreach ($pkgreq_ids as $pkgreq_id) { + pkgreq_close(intval($pkgreq_id), 'accepted', + 'The user ' . $username . + ' deleted the package.', true); + } + } + + if ($merge_base_id) { + /* Merge comments */ + $q = "UPDATE PackageComments "; + $q.= "SET PackageBaseID = " . intval($merge_base_id) . " "; + $q.= "WHERE PackageBaseID IN (" . implode(",", $base_ids) . ")"; + $dbh->exec($q); + + /* Merge notifications */ + $q = "SELECT DISTINCT UserID FROM PackageNotifications cn "; + $q.= "WHERE PackageBaseID IN (" . implode(",", $base_ids) . ") "; + $q.= "AND NOT EXISTS (SELECT * FROM PackageNotifications cn2 "; + $q.= "WHERE cn2.PackageBaseID = " . intval($merge_base_id) . " "; + $q.= "AND cn2.UserID = cn.UserID)"; + $result = $dbh->query($q); + + while ($notify_uid = $result->fetch(PDO::FETCH_COLUMN, 0)) { + $q = "INSERT INTO PackageNotifications (UserID, PackageBaseID) "; + $q.= "VALUES (" . intval($notify_uid) . ", " . intval($merge_base_id) . ")"; + $dbh->exec($q); + } + + /* Merge votes */ + foreach ($base_ids as $base_id) { + $q = "UPDATE PackageVotes "; + $q.= "SET PackageBaseID = " . intval($merge_base_id) . " "; + $q.= "WHERE PackageBaseID = " . $base_id . " "; + $q.= "AND UsersID NOT IN ("; + $q.= "SELECT * FROM (SELECT UsersID "; + $q.= "FROM PackageVotes "; + $q.= "WHERE PackageBaseID = " . intval($merge_base_id); + $q.= ") temp)"; + $dbh->exec($q); + } + + $q = "UPDATE PackageBases "; + $q.= "SET NumVotes = (SELECT COUNT(*) FROM PackageVotes "; + $q.= "WHERE PackageBaseID = " . intval($merge_base_id) . ") "; + $q.= "WHERE ID = " . intval($merge_base_id); + $dbh->exec($q); + } + + $q = "DELETE FROM Packages WHERE PackageBaseID IN (" . implode(",", $base_ids) . ")"; + $dbh->exec($q); + + $q = "DELETE FROM PackageBases WHERE ID IN (" . implode(",", $base_ids) . ")"; + $dbh->exec($q); + + return array(true, __("The selected packages have been deleted.")); +} + +/** + * Adopt or disown packages + * + * @param array $base_ids Array of package base IDs to adopt/disown + * @param bool $action Adopts if true, disowns if false. Adopts by default + * @param int $via Package request to close upon adoption + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgbase_adopt ($base_ids, $action=true, $via) { + $dbh = DB::connect(); + + $uid = uid_from_sid($_COOKIE["AURSID"]); + if (!$uid) { + if ($action) { + return array(false, __("You must be logged in before you can adopt packages.")); + } else { + return array(false, __("You must be logged in before you can disown packages.")); + } + } + + /* Verify package ownership. */ + $base_ids = sanitize_ids($base_ids); + + $q = "SELECT ID FROM PackageBases "; + $q.= "WHERE ID IN (" . implode(",", $base_ids) . ") "; + + if ($action && !has_credential(CRED_PKGBASE_ADOPT)) { + /* Regular users may only adopt orphan packages. */ + $q.= "AND MaintainerUID IS NULL"; + } + if (!$action && !has_credential(CRED_PKGBASE_DISOWN)) { + /* Regular users may only disown their own packages. */ + $q.= "AND MaintainerUID = " . $uid; + } + + $result = $dbh->query($q); + $base_ids = $result->fetchAll(PDO::FETCH_COLUMN, 0); + + /* Error out if the list of remaining packages is empty. */ + if (empty($base_ids)) { + if ($action) { + return array(false, __("You did not select any packages to adopt.")); + } else { + return array(false, __("You did not select any packages to disown.")); + } + } + + /* + * Close package request if the disownment was initiated through the + * request interface. NOTE: This needs to happen *before* the actual + * disown operation. Otherwise, the former maintainer will not be + * included in the Cc list of the request notification email. + */ + if ($via) { + pkgreq_close(intval($via), 'accepted', ''); + } + + /* Scan through pending orphan requests and close them. */ + if (!$action) { + $username = username_from_sid($_COOKIE['AURSID']); + foreach ($base_ids as $base_id) { + $pkgreq_ids = pkgreq_by_pkgbase($base_id, 'orphan'); + foreach ($pkgreq_ids as $pkgreq_id) { + pkgreq_close(intval($pkgreq_id), 'accepted', + 'The user ' . $username . + ' disowned the package.', true); + } + } + } + + /* Adopt or disown the package. */ + if ($action) { + $q = "UPDATE PackageBases "; + $q.= "SET MaintainerUID = $uid "; + $q.= "WHERE ID IN (" . implode(",", $base_ids) . ") "; + $dbh->exec($q); + + /* Add the new maintainer to the notification list. */ + pkgbase_notify($base_ids); + } else { + /* Update the co-maintainer list when disowning a package. */ + if (has_credential(CRED_PKGBASE_DISOWN)) { + foreach ($base_ids as $base_id) { + pkgbase_set_comaintainers($base_id, array()); + } + + $q = "UPDATE PackageBases "; + $q.= "SET MaintainerUID = NULL "; + $q.= "WHERE ID IN (" . implode(",", $base_ids) . ") "; + $dbh->exec($q); + } else { + foreach ($base_ids as $base_id) { + $comaintainers = pkgbase_get_comaintainers($base_id); + + if (count($comaintainers) > 0) { + $comaintainer_uid = uid_from_username($comaintainers[0]); + $comaintainers = array_diff($comaintainers, array($comaintainers[0])); + pkgbase_set_comaintainers($base_id, $comaintainers); + } else { + $comaintainer_uid = "NULL"; + } + + $q = "UPDATE PackageBases "; + $q.= "SET MaintainerUID = " . $comaintainer_uid . " "; + $q.= "WHERE ID = " . $base_id; + $dbh->exec($q); + } + } + } + + foreach ($base_ids as $base_id) { + notify(array($action ? 'adopt' : 'disown', $uid, $base_id)); + } + + if ($action) { + return array(true, __("The selected packages have been adopted.")); + } else { + return array(true, __("The selected packages have been disowned.")); + } +} + +/** + * Vote and un-vote for packages + * + * @param array $base_ids Array of package base IDs to vote/un-vote + * @param bool $action Votes if true, un-votes if false. Votes by default + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgbase_vote ($base_ids, $action=true) { + if (!has_credential(CRED_PKGBASE_VOTE)) { + if ($action) { + return array(false, __("You must be logged in before you can vote for packages.")); + } else { + return array(false, __("You must be logged in before you can un-vote for packages.")); + } + } + + $base_ids = sanitize_ids($base_ids); + if (empty($base_ids)) { + if ($action) { + return array(false, __("You did not select any packages to vote for.")); + } else { + return array(false, __("Your votes have been removed from the selected packages.")); + } + } + + $dbh = DB::connect(); + $my_votes = pkgbase_votes_from_sid($_COOKIE["AURSID"]); + $uid = uid_from_sid($_COOKIE["AURSID"]); + + $first = 1; + $vote_ids = ""; + $vote_clauses = ""; + foreach ($base_ids as $pid) { + if ($action) { + $check = !isset($my_votes[$pid]); + } else { + $check = isset($my_votes[$pid]); + } + + if ($check) { + if ($first) { + $first = 0; + $vote_ids = $pid; + if ($action) { + $vote_clauses = "($uid, $pid, " . strval(time()) . ")"; + } + } else { + $vote_ids .= ", $pid"; + if ($action) { + $vote_clauses .= ", ($uid, $pid, " . strval(time()) . ")"; + } + } + } + } + + if (!empty($vote_ids)) { + /* Only add votes for packages the user hasn't already voted for. */ + $op = $action ? "+" : "-"; + $q = "UPDATE PackageBases SET NumVotes = NumVotes $op 1 "; + $q.= "WHERE ID IN ($vote_ids)"; + + $dbh->exec($q); + + if ($action) { + $q = "INSERT INTO PackageVotes (UsersID, PackageBaseID, VoteTS) VALUES "; + $q.= $vote_clauses; + } else { + $q = "DELETE FROM PackageVotes WHERE UsersID = $uid "; + $q.= "AND PackageBaseID IN ($vote_ids)"; + } + + $dbh->exec($q); + } + + if ($action) { + return array(true, __("Your votes have been cast for the selected packages.")); + } else { + return array(true, __("Your votes have been removed from the selected packages.")); + } +} + +/** + * Get all usernames and IDs that voted for a specific package base + * + * @param string $pkgbase_name The package base to retrieve votes for + * + * @return array User IDs and usernames that voted for a specific package base + */ +function pkgbase_votes_from_name($pkgbase_name) { + $dbh = DB::connect(); + + $q = "SELECT UsersID, Username, Name, VoteTS FROM PackageVotes "; + $q.= "LEFT JOIN Users ON UsersID = Users.ID "; + $q.= "LEFT JOIN PackageBases "; + $q.= "ON PackageVotes.PackageBaseID = PackageBases.ID "; + $q.= "WHERE PackageBases.Name = ". $dbh->quote($pkgbase_name) . " "; + $q.= "ORDER BY Username"; + $result = $dbh->query($q); + + if (!$result) { + return; + } + + $votes = array(); + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $votes[] = $row; + } + + return $votes; +} + +/** + * Determine if a user has already voted for a specific package base + * + * @param string $uid The user ID to check for an existing vote + * @param string $base_id The package base ID to check for an existing vote + * + * @return bool True if the user has already voted, otherwise false + */ +function pkgbase_user_voted($uid, $base_id) { + $dbh = DB::connect(); + $q = "SELECT COUNT(*) FROM PackageVotes WHERE "; + $q.= "UsersID = ". $dbh->quote($uid) . " AND "; + $q.= "PackageBaseID = " . $dbh->quote($base_id); + $result = $dbh->query($q); + if (!$result) { + return null; + } + + return ($result->fetch(PDO::FETCH_COLUMN, 0) > 0); +} + +/** + * Determine if a user wants notifications for a specific package base + * + * @param string $uid User ID to check in the database + * @param string $base_id Package base ID to check notifications for + * + * @return bool True if the user wants notifications, otherwise false + */ +function pkgbase_user_notify($uid, $base_id) { + $dbh = DB::connect(); + + $q = "SELECT * FROM PackageNotifications WHERE UserID = " . $dbh->quote($uid); + $q.= " AND PackageBaseID = " . $dbh->quote($base_id); + $result = $dbh->query($q); + + if (!$result) { + return false; + } + + return ($result->fetch(PDO::FETCH_NUM) > 0); +} + +/** + * Toggle notification of packages + * + * @param array $base_ids Array of package base IDs to toggle + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgbase_notify ($base_ids, $action=true) { + if (!has_credential(CRED_PKGBASE_NOTIFY)) { + return; + } + + $base_ids = sanitize_ids($base_ids); + if (empty($base_ids)) { + return array(false, __("Couldn't add to notification list.")); + } + + $dbh = DB::connect(); + $uid = uid_from_sid($_COOKIE["AURSID"]); + + $output = ""; + + $first = true; + + /* + * There currently shouldn't be multiple requests here, but the format + * in which it's sent requires this. + */ + foreach ($base_ids as $bid) { + $q = "SELECT Name FROM PackageBases WHERE ID = $bid"; + $result = $dbh->query($q); + if ($result) { + $row = $result->fetch(PDO::FETCH_NUM); + $basename = $row[0]; + } + else { + $basename = ''; + } + + if ($first) + $first = false; + else + $output .= ", "; + + + if ($action) { + $q = "SELECT COUNT(*) FROM PackageNotifications WHERE "; + $q .= "UserID = $uid AND PackageBaseID = $bid"; + + /* Notification already added. Don't add again. */ + $result = $dbh->query($q); + if ($result->fetchColumn() == 0) { + $q = "INSERT INTO PackageNotifications (PackageBaseID, UserID) VALUES ($bid, $uid)"; + $dbh->exec($q); + } + + $output .= $basename; + } + else { + $q = "DELETE FROM PackageNotifications WHERE PackageBaseID = $bid "; + $q .= "AND UserID = $uid"; + $dbh->exec($q); + + $output .= $basename; + } + } + + if ($action) { + $output = __("You have been added to the comment notification list for %s.", $output); + } + else { + $output = __("You have been removed from the comment notification list for %s.", $output); + } + + return array(true, $output); +} + +/** + * Delete a package comment + * + * @param boolean $undelete True if undeleting rather than deleting + * @return array Tuple of success/failure indicator and error message + */ +function pkgbase_delete_comment($undelete=false) { + $uid = uid_from_sid($_COOKIE["AURSID"]); + if (!$uid) { + return array(false, __("You must be logged in before you can edit package information.")); + } + + if (isset($_POST["comment_id"])) { + $comment_id = $_POST["comment_id"]; + } else { + return array(false, __("Missing comment ID.")); + } + + $dbh = DB::connect(); + if ($undelete) { + if (!has_credential(CRED_COMMENT_UNDELETE)) { + return array(false, __("You are not allowed to undelete this comment.")); + } + + $q = "UPDATE PackageComments "; + $q.= "SET DelUsersID = NULL, "; + $q.= "DelTS = NULL "; + $q.= "WHERE ID = ".intval($comment_id); + $dbh->exec($q); + return array(true, __("Comment has been undeleted.")); + } else { + if (!can_delete_comment($comment_id)) { + return array(false, __("You are not allowed to delete this comment.")); + } + + $q = "UPDATE PackageComments "; + $q.= "SET DelUsersID = ".$uid.", "; + $q.= "DelTS = " . strval(time()) . " "; + $q.= "WHERE ID = ".intval($comment_id); + $dbh->exec($q); + return array(true, __("Comment has been deleted.")); + } +} + +/** + * Edit a package comment + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgbase_edit_comment($comment) { + $uid = uid_from_sid($_COOKIE["AURSID"]); + if (!$uid) { + return array(false, __("You must be logged in before you can edit package information.")); + } + + if (isset($_POST["comment_id"])) { + $comment_id = $_POST["comment_id"]; + } else { + return array(false, __("Missing comment ID.")); + } + + if (trim($comment) == '') { + return array(false, __('Comment cannot be empty.')); + } + + $dbh = DB::connect(); + if (can_edit_comment($comment_id)) { + $q = "UPDATE PackageComments "; + $q.= "SET EditedUsersID = ".$uid.", "; + $q.= "Comments = ".$dbh->quote($comment).", "; + $q.= "EditedTS = " . strval(time()) . " "; + $q.= "WHERE ID = ".intval($comment_id); + $dbh->exec($q); + + render_comment($comment_id); + + return array(true, __("Comment has been edited.")); + } else { + return array(false, __("You are not allowed to edit this comment.")); + } +} + +/** + * Get a list of package base keywords + * + * @param int $base_id The package base ID to retrieve the keywords for + * + * @return array An array of keywords + */ +function pkgbase_get_keywords($base_id) { + $dbh = DB::connect(); + $q = "SELECT Keyword FROM PackageKeywords "; + $q .= "WHERE PackageBaseID = " . intval($base_id) . " "; + $q .= "ORDER BY Keyword ASC"; + $result = $dbh->query($q); + + if ($result) { + return $result->fetchAll(PDO::FETCH_COLUMN, 0); + } else { + return array(); + } +} + +/** + * Update the list of keywords of a package base + * + * @param int $base_id The package base ID to update the keywords of + * @param array $users Array of keywords + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgbase_set_keywords($base_id, $keywords) { + $base_id = intval($base_id); + + $maintainers = array_merge(array(pkgbase_maintainer_uid($base_id)), pkgbase_get_comaintainer_uids(array($base_id))); + if (!has_credential(CRED_PKGBASE_SET_KEYWORDS, $maintainers)) { + return array(false, __("You are not allowed to edit the keywords of this package base.")); + } + + /* Remove empty and duplicate user names. */ + $keywords = array_unique(array_filter(array_map('trim', $keywords))); + + $dbh = DB::connect(); + + $q = sprintf("DELETE FROM PackageKeywords WHERE PackageBaseID = %d", $base_id); + $dbh->exec($q); + + $i = 0; + foreach ($keywords as $keyword) { + $q = sprintf("INSERT INTO PackageKeywords (PackageBaseID, Keyword) VALUES (%d, %s)", $base_id, $dbh->quote($keyword)); + $dbh->exec($q); + + $i++; + if ($i >= 20) { + break; + } + } + + return array(true, __("The package base keywords have been updated.")); +} + +/** + * Get a list of package base co-maintainers + * + * @param int $base_id The package base ID to retrieve the co-maintainers for + * + * @return array An array of co-maintainer user names + */ +function pkgbase_get_comaintainers($base_id) { + $dbh = DB::connect(); + $q = "SELECT UserName FROM PackageComaintainers "; + $q .= "INNER JOIN Users ON Users.ID = PackageComaintainers.UsersID "; + $q .= "WHERE PackageComaintainers.PackageBaseID = " . intval($base_id) . " "; + $q .= "ORDER BY Priority ASC"; + $result = $dbh->query($q); + + if ($result) { + return $result->fetchAll(PDO::FETCH_COLUMN, 0); + } else { + return array(); + } +} + +/** + * Get a list of package base co-maintainer IDs + * + * @param int $base_id The package base ID to retrieve the co-maintainers for + * + * @return array An array of co-maintainer user UDs + */ +function pkgbase_get_comaintainer_uids($base_ids) { + $dbh = DB::connect(); + $q = "SELECT UsersID FROM PackageComaintainers "; + $q .= "INNER JOIN Users ON Users.ID = PackageComaintainers.UsersID "; + $q .= "WHERE PackageComaintainers.PackageBaseID IN (" . implode(",", $base_ids) . ") "; + $q .= "ORDER BY Priority ASC"; + $result = $dbh->query($q); + + if ($result) { + return $result->fetchAll(PDO::FETCH_COLUMN, 0); + } else { + return array(); + } +} + +/** + * Update the list of co-maintainers of a package base + * + * @param int $base_id The package base ID to update the co-maintainers of + * @param array $users Array of co-maintainer user names + * @param boolean $override Override credential check if true + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgbase_set_comaintainers($base_id, $users, $override=false) { + $maintainer_uid = pkgbase_maintainer_uid($base_id); + if (!$override && !has_credential(CRED_PKGBASE_EDIT_COMAINTAINERS, array($maintainer_uid))) { + return array(false, __("You are not allowed to manage co-maintainers of this package base.")); + } + + /* Remove empty and duplicate user names. */ + $users = array_unique(array_filter(array_map('trim', $users))); + + $dbh = DB::connect(); + + $uids_new = array(); + foreach($users as $user) { + $q = "SELECT ID FROM Users "; + $q .= "WHERE UserName = " . $dbh->quote($user); + $result = $dbh->query($q); + $uid = $result->fetchColumn(0); + + if (!$uid) { + return array(false, __("Invalid user name: %s", $user)); + } elseif ($uid == $maintainer_uid) { + // silently ignore when maintainer == co-maintainer + continue; + } else { + $uids_new[] = $uid; + } + } + + $q = sprintf("SELECT UsersID FROM PackageComaintainers WHERE PackageBaseID = %d", $base_id); + $result = $dbh->query($q); + $uids_old = $result->fetchAll(PDO::FETCH_COLUMN, 0); + + $uids_add = array_diff($uids_new, $uids_old); + $uids_rem = array_diff($uids_old, $uids_new); + + $i = 1; + foreach ($uids_new as $uid) { + if (in_array($uid, $uids_add)) { + $q = sprintf("INSERT INTO PackageComaintainers (PackageBaseID, UsersID, Priority) VALUES (%d, %d, %d)", $base_id, $uid, $i); + notify(array('comaintainer-add', $uid, $base_id)); + } else { + $q = sprintf("UPDATE PackageComaintainers SET Priority = %d WHERE PackageBaseID = %d AND UsersID = %d", $i, $base_id, $uid); + } + + $dbh->exec($q); + $i++; + } + + foreach ($uids_rem as $uid) { + $q = sprintf("DELETE FROM PackageComaintainers WHERE PackageBaseID = %d AND UsersID = %d", $base_id, $uid); + $dbh->exec($q); + notify(array('comaintainer-remove', $uid, $base_id)); + } + + return array(true, __("The package base co-maintainers have been updated.")); +} + +function pkgbase_remove_comaintainer($base_id, $uid) { + $uname = username_from_id($uid); + $names = pkgbase_get_comaintainers($base_id); + $names = array_diff($names, array($uname)); + return pkgbase_set_comaintainers($base_id, $names, true); +} diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php new file mode 100644 index 00000000..140c7ec1 --- /dev/null +++ b/web/lib/pkgfuncs.inc.php @@ -0,0 +1,957 @@ +query($q); + + if (!$result) { + return false; + } + + $uid = $result->fetch(PDO::FETCH_COLUMN, 0); + + return has_credential(CRED_COMMENT_DELETE, array($uid)); +} + +/** + * Determine if the user can delete a specific package comment using an array + * + * Only the comment submitter, Trusted Users, and Developers can delete + * comments. This function is used for the frontend side of comment deletion. + * + * @param array $comment All database information relating a specific comment + * + * @return bool True if the user can delete the comment, otherwise false + */ +function can_delete_comment_array($comment) { + return has_credential(CRED_COMMENT_DELETE, array($comment['UsersID'])); +} + +/** + * Determine if the user can edit a specific package comment + * + * Only the comment submitter, Trusted Users, and Developers can edit + * comments. This function is used for the backend side of comment editing. + * + * @param string $comment_id The comment ID in the database + * + * @return bool True if the user can edit the comment, otherwise false + */ +function can_edit_comment($comment_id=0) { + $dbh = DB::connect(); + + $q = "SELECT UsersID FROM PackageComments "; + $q.= "WHERE ID = " . intval($comment_id); + $result = $dbh->query($q); + + if (!$result) { + return false; + } + + $uid = $result->fetch(PDO::FETCH_COLUMN, 0); + + return has_credential(CRED_COMMENT_EDIT, array($uid)); +} + +/** + * Determine if the user can edit a specific package comment using an array + * + * Only the comment submitter, Trusted Users, and Developers can edit + * comments. This function is used for the frontend side of comment editing. + * + * @param array $comment All database information relating a specific comment + * + * @return bool True if the user can edit the comment, otherwise false + */ +function can_edit_comment_array($comment) { + return has_credential(CRED_COMMENT_EDIT, array($comment['UsersID'])); +} + +/** + * Determine if the user can pin a specific package comment + * + * Only the Package Maintainer, Package Co-maintainers, Trusted Users, and + * Developers can pin comments. This function is used for the backend side of + * comment pinning. + * + * @param string $comment_id The comment ID in the database + * + * @return bool True if the user can pin the comment, otherwise false + */ +function can_pin_comment($comment_id=0) { + $dbh = DB::connect(); + + $q = "SELECT MaintainerUID FROM PackageBases AS pb "; + $q.= "LEFT JOIN PackageComments AS pc ON pb.ID = pc.PackageBaseID "; + $q.= "WHERE pc.ID = " . intval($comment_id) . " "; + $q.= "UNION "; + $q.= "SELECT pcm.UsersID FROM PackageComaintainers AS pcm "; + $q.= "LEFT JOIN PackageComments AS pc "; + $q.= "ON pcm.PackageBaseID = pc.PackageBaseID "; + $q.= "WHERE pc.ID = " . intval($comment_id); + $result = $dbh->query($q); + + if (!$result) { + return false; + } + + $uids = $result->fetchAll(PDO::FETCH_COLUMN, 0); + + return has_credential(CRED_COMMENT_PIN, $uids); +} + +/** + * Determine if the user can edit a specific package comment using an array + * + * Only the Package Maintainer, Package Co-maintainers, Trusted Users, and + * Developers can pin comments. This function is used for the frontend side of + * comment pinning. + * + * @param array $comment All database information relating a specific comment + * + * @return bool True if the user can edit the comment, otherwise false + */ +function can_pin_comment_array($comment) { + return can_pin_comment($comment['ID']); +} + +/** + * Check to see if the package name already exists in the database + * + * @param string $name The package name to check + * + * @return string|void Package name if it already exists + */ +function pkg_from_name($name="") { + if (!$name) {return NULL;} + $dbh = DB::connect(); + $q = "SELECT ID FROM Packages "; + $q.= "WHERE Name = " . $dbh->quote($name); + $result = $dbh->query($q); + if (!$result) { + return; + } + $row = $result->fetch(PDO::FETCH_NUM); + if ($row) { + return $row[0]; + } +} + +/** + * Get licenses for a specific package + * + * @param int $pkgid The package to get licenses for + * + * @return array All licenses for the package + */ +function pkg_licenses($pkgid) { + $pkgid = intval($pkgid); + if (!$pkgid) { + return array(); + } + $q = "SELECT l.Name FROM Licenses l "; + $q.= "INNER JOIN PackageLicenses pl ON pl.LicenseID = l.ID "; + $q.= "WHERE pl.PackageID = ". $pkgid; + $ttl = config_get_int('options', 'cache_pkginfo_ttl'); + $rows = db_cache_result($q, 'licenses:' . $pkgid, PDO::FETCH_NUM, $ttl); + return array_map(function ($x) { return $x[0]; }, $rows); +} + +/** + * Get package groups for a specific package + * + * @param int $pkgid The package to get groups for + * + * @return array All package groups for the package + */ +function pkg_groups($pkgid) { + $pkgid = intval($pkgid); + if (!$pkgid) { + return array(); + } + $q = "SELECT g.Name FROM `Groups` g "; + $q.= "INNER JOIN PackageGroups pg ON pg.GroupID = g.ID "; + $q.= "WHERE pg.PackageID = ". $pkgid; + $ttl = config_get_int('options', 'cache_pkginfo_ttl'); + $rows = db_cache_result($q, 'groups:' . $pkgid, PDO::FETCH_NUM, $ttl); + return array_map(function ($x) { return $x[0]; }, $rows); +} + +/** + * Get providers for a specific package + * + * @param string $name The name of the "package" to get providers for + * + * @return array The IDs and names of all providers of the package + */ +function pkg_providers($name) { + $dbh = DB::connect(); + $q = "SELECT p.ID, p.Name FROM Packages p "; + $q.= "WHERE p.Name = " . $dbh->quote($name) . " "; + $q.= "UNION "; + $q.= "SELECT p.ID, p.Name FROM Packages p "; + $q.= "LEFT JOIN PackageRelations pr ON pr.PackageID = p.ID "; + $q.= "LEFT JOIN RelationTypes rt ON rt.ID = pr.RelTypeID "; + $q.= "WHERE (rt.Name = 'provides' "; + $q.= "AND pr.RelName = " . $dbh->quote($name) . ")"; + $q.= "UNION "; + $q.= "SELECT 0, Name FROM OfficialProviders "; + $q.= "WHERE Provides = " . $dbh->quote($name); + $ttl = config_get_int('options', 'cache_pkginfo_ttl'); + return db_cache_result($q, 'providers:' . $name, PDO::FETCH_NUM, $ttl); +} + +/** + * Get package dependencies for a specific package + * + * @param int $pkgid The package to get dependencies for + * @param int $limit An upper bound for the number of packages to retrieve + * + * @return array All package dependencies for the package + */ +function pkg_dependencies($pkgid, $limit) { + $pkgid = intval($pkgid); + if (!$pkgid) { + return array(); + } + $q = "SELECT pd.DepName, dt.Name, pd.DepDesc, "; + $q.= "pd.DepCondition, pd.DepArch, p.ID "; + $q.= "FROM PackageDepends pd "; + $q.= "LEFT JOIN Packages p ON pd.DepName = p.Name "; + $q.= "LEFT JOIN DependencyTypes dt ON dt.ID = pd.DepTypeID "; + $q.= "WHERE pd.PackageID = ". $pkgid . " "; + $q.= "ORDER BY pd.DepName LIMIT " . intval($limit); + $ttl = config_get_int('options', 'cache_pkginfo_ttl'); + return db_cache_result($q, 'dependencies:' . $pkgid, PDO::FETCH_NUM, $ttl); +} + +/** + * Get package relations for a specific package + * + * @param int $pkgid The package to get relations for + * + * @return array All package relations for the package + */ +function pkg_relations($pkgid) { + $pkgid = intval($pkgid); + if (!$pkgid) { + return array(); + } + $q = "SELECT pr.RelName, rt.Name, pr.RelCondition, pr.RelArch, p.ID FROM PackageRelations pr "; + $q.= "LEFT JOIN Packages p ON pr.RelName = p.Name "; + $q.= "LEFT JOIN RelationTypes rt ON rt.ID = pr.RelTypeID "; + $q.= "WHERE pr.PackageID = ". $pkgid . " "; + $q.= "ORDER BY pr.RelName"; + $ttl = config_get_int('options', 'cache_pkginfo_ttl'); + return db_cache_result($q, 'relations:' . $pkgid, PDO::FETCH_NUM, $ttl); +} + +/** + * Get the HTML code to display a package dependency link annotation + * (dependency type, architecture, ...) + * + * @param string $type The name of the dependency type + * @param string $arch The package dependency architecture + * @param string $desc An optdepends description + * + * @return string The HTML code of the label to display + */ +function pkg_deplink_annotation($type, $arch, $desc=false) { + if ($type == 'depends' && !$arch) { + return ''; + } + + $link = ' ('; + + if ($type == 'makedepends') { + $link .= 'make'; + } elseif ($type == 'checkdepends') { + $link .= 'check'; + } elseif ($type == 'optdepends') { + $link .= 'optional'; + } + + if ($type != 'depends' && $arch) { + $link .= ', '; + } + + if ($arch) { + $link .= htmlspecialchars($arch); + } + + $link .= ')'; + if ($type == 'optdepends' && $desc) { + $link .= ' – ' . htmlspecialchars($desc) . ' '; + } + $link .= ''; + + return $link; +} + +/** + * Get the HTML code to display a package provider link + * + * @param string $name The name of the provider + * @param bool $official True if the package is in the official repositories + * + * @return string The HTML code of the link to display + */ +function pkg_provider_link($name, $official) { + $link = ''; + $link .= htmlspecialchars($name) . ''; + + return $link; +} + +/** + * Get the HTML code to display a package dependency link + * + * @param string $name The name of the dependency + * @param string $type The name of the dependency type + * @param string $desc The (optional) description of the dependency + * @param string $cond The package dependency condition string + * @param string $arch The package dependency architecture + * @param int $pkg_id The package of the package to display the dependency for + * + * @return string The HTML code of the label to display + */ +function pkg_depend_link($name, $type, $desc, $cond, $arch, $pkg_id) { + /* + * TODO: We currently perform one SQL query per nonexistent package + * dependency. It would be much better if we could annotate dependency + * data with providers so that we already know whether a dependency is + * a "provision name" or a package from the official repositories at + * this point. + */ + $providers = pkg_providers($name); + + if (count($providers) == 0) { + $link = ''; + $link .= htmlspecialchars($name); + $link .= ''; + $link .= htmlspecialchars($cond) . ' '; + $link .= pkg_deplink_annotation($type, $arch, $desc); + return $link; + } + + $link = htmlspecialchars($name); + foreach ($providers as $provider) { + if ($provider[1] == $name) { + $is_official = ($provider[0] == 0); + $name = $provider[1]; + $link = pkg_provider_link($name, $is_official); + break; + } + } + $link .= htmlspecialchars($cond) . ' '; + + foreach ($providers as $key => $provider) { + if ($provider[1] == $name) { + unset($providers[$key]); + } + } + + if (count($providers) > 0) { + $link .= '('; + foreach ($providers as $provider) { + $is_official = ($provider[0] == 0); + $name = $provider[1]; + $link .= pkg_provider_link($name, $is_official) . ', '; + } + $link = substr($link, 0, -2); + $link .= ')'; + } + + $link .= pkg_deplink_annotation($type, $arch, $desc); + + return $link; +} + +/** + * Get the HTML code to display a package requirement link + * + * @param string $name The name of the requirement + * @param string $depends The (literal) name of the dependency of $name + * @param string $type The name of the dependency type + * @param string $arch The package dependency architecture + * @param string $pkgname The name of dependant package + * + * @return string The HTML code of the link to display + */ +function pkg_requiredby_link($name, $depends, $type, $arch, $pkgname) { + $link = ''; + $link .= htmlspecialchars($name) . ''; + + if ($depends != $pkgname) { + $link .= ' ('; + $link .= __('requires %s', htmlspecialchars($depends)); + $link .= ')'; + } + + return $link . pkg_deplink_annotation($type, $arch); +} + +/** + * Get the HTML code to display a package relation + * + * @param string $name The name of the relation + * @param string $cond The package relation condition string + * @param string $arch The package relation architecture + * + * @return string The HTML code of the label to display + */ +function pkg_rel_html($name, $cond, $arch) { + $html = htmlspecialchars($name) . htmlspecialchars($cond); + + if ($arch) { + $html .= ' (' . htmlspecialchars($arch) . ')'; + } + + return $html; +} + +/** + * Get the HTML code to display a source link + * + * @param string $url The URL of the source + * @param string $arch The source architecture + * @param string $package The name of the package + * + * @return string The HTML code of the label to display + */ +function pkg_source_link($url, $arch, $package) { + $url = explode('::', $url); + $parsed_url = parse_url($url[0]); + + if (isset($parsed_url['scheme']) || isset($url[1])) { + $link = '' . htmlspecialchars($url[0]) . ''; + } else { + $file_url = sprintf(config_get('options', 'source_file_uri'), htmlspecialchars($url[0]), $package); + $link = '' . htmlspecialchars($url[0]) . ''; + } + + if ($arch) { + $link .= ' (' . htmlspecialchars($arch) . ')'; + } + + return $link; +} + +/** + * Determine packages that depend on a package + * + * @param string $name The package name for the dependency search + * @param array $provides A list of virtual provisions of the package + * @param int $limit An upper bound for the number of packages to retrieve + * + * @return array All packages that depend on the specified package name + */ +function pkg_required($name="", $provides, $limit) { + $deps = array(); + if ($name != "") { + $dbh = DB::connect(); + + $name_list = $dbh->quote($name); + foreach ($provides as $p) { + $name_list .= ',' . $dbh->quote($p[0]); + } + + $q = "SELECT p.Name, pd.DepName, dt.Name, pd.DepArch "; + $q.= "FROM PackageDepends pd "; + $q.= "LEFT JOIN Packages p ON p.ID = pd.PackageID "; + $q.= "LEFT JOIN DependencyTypes dt ON dt.ID = pd.DepTypeID "; + $q.= "WHERE pd.DepName IN (" . $name_list . ") "; + $q.= "ORDER BY p.Name LIMIT " . intval($limit); + /* Not invalidated by package updates. */ + return db_cache_result($q, 'required:' . $name, PDO::FETCH_NUM); + } + return $deps; +} + +/** + * Get all package sources for a specific package + * + * @param string $pkgid The package ID to get the sources for + * + * @return array All sources associated with a specific package + */ +function pkg_sources($pkgid) { + $pkgid = intval($pkgid); + if (!$pkgid) { + return array(); + } + $q = "SELECT Source, SourceArch FROM PackageSources "; + $q.= "WHERE PackageID = " . $pkgid; + $q.= " ORDER BY Source"; + $ttl = config_get_int('options', 'cache_pkginfo_ttl'); + return db_cache_result($q, 'required:' . $pkgid, PDO::FETCH_NUM, $ttl); +} + +/** + * Get the package details + * + * @param string $id The package ID to get description for + * + * @return array The package's details OR error message + **/ +function pkg_get_details($id=0) { + $dbh = DB::connect(); + + $q = "SELECT Packages.*, PackageBases.ID AS BaseID, "; + $q.= "PackageBases.Name AS BaseName, PackageBases.NumVotes, "; + $q.= "PackageBases.Popularity, PackageBases.OutOfDateTS, "; + $q.= "PackageBases.SubmittedTS, PackageBases.ModifiedTS, "; + $q.= "PackageBases.SubmitterUID, PackageBases.MaintainerUID, "; + $q.= "PackageBases.PackagerUID, PackageBases.FlaggerUID, "; + $q.= "(SELECT COUNT(*) FROM PackageRequests "; + $q.= " WHERE PackageRequests.PackageBaseID = Packages.PackageBaseID "; + $q.= " AND PackageRequests.Status = 0) AS RequestCount "; + $q.= "FROM Packages, PackageBases "; + $q.= "WHERE PackageBases.ID = Packages.PackageBaseID "; + $q.= "AND Packages.ID = " . intval($id); + $result = $dbh->query($q); + + $row = array(); + + if (!$result) { + $row['error'] = __("Error retrieving package details."); + } + else { + $row = $result->fetch(PDO::FETCH_ASSOC); + if (empty($row)) { + $row['error'] = __("Package details could not be found."); + } + } + + return $row; +} + +/** + * Display the package details page + * + * @param string $id The package ID to get details page for + * @param array $row Package details retrieved by pkg_get_details() + * @param string $SID The session ID of the visitor + * + * @return void + */ +function pkg_display_details($id=0, $row, $SID="") { + $dbh = DB::connect(); + + if (isset($row['error'])) { + print "

    " . $row['error'] . "

    \n"; + } + else { + $base_id = pkgbase_from_pkgid($id); + $pkgbase_name = pkgbase_name_from_id($base_id); + + include('pkg_details.php'); + + if ($SID) { + include('pkg_comment_box.php'); + } + + $include_deleted = has_credential(CRED_COMMENT_VIEW_DELETED); + + $limit_pinned = isset($_GET['pinned']) ? 0 : 5; + $pinned = pkgbase_comments($base_id, $limit_pinned, false, true); + if (!empty($pinned)) { + $comment_section = "package"; + include('pkg_comments.php'); + } + unset($pinned); + + + $total_comment_count = pkgbase_comments_count($base_id, $include_deleted); + list($pagination_templs, $per_page, $offset) = calculate_pagination($total_comment_count); + + $comments = pkgbase_comments($base_id, $per_page, $include_deleted, false, $offset); + if (!empty($comments)) { + $comment_section = "package"; + include('pkg_comments.php'); + } + } +} + +/** + * Output the body of the search results page + * + * @param array $params Search parameters + * @param bool $show_headers True if statistics should be included + * @param string $SID The session ID of the visitor + * + * @return int The total number of packages matching the query + */ +function pkg_search_page($params, $show_headers=true, $SID="") { + $dbh = DB::connect(); + + /* + * Get commonly used variables. + * TODO: Reduce the number of database queries! + */ + if ($SID) + $myuid = uid_from_sid($SID); + + /* Sanitize paging variables. */ + if (isset($params['O'])) { + $params['O'] = bound(intval($params['O']), 0, 2500); + } else { + $params['O'] = 0; + } + + if (isset($params["PP"])) { + $params["PP"] = bound(intval($params["PP"]), 50, 250); + } else { + $params["PP"] = 50; + } + + /* + * FIXME: Pull out DB-related code. All of it! This one's worth a + * choco-chip cookie, one of those nice big soft ones. + */ + + /* Build the package search query. */ + $q_select = "SELECT "; + if ($SID) { + $q_select .= "PackageNotifications.UserID AS Notify, + PackageVotes.UsersID AS Voted, "; + } + $q_select .= "Users.Username AS Maintainer, + Packages.Name, Packages.Version, Packages.Description, + PackageBases.NumVotes, PackageBases.Popularity, Packages.ID, + Packages.PackageBaseID, PackageBases.OutOfDateTS "; + + $q_from = "FROM Packages + LEFT JOIN PackageBases ON (PackageBases.ID = Packages.PackageBaseID) + LEFT JOIN Users ON (PackageBases.MaintainerUID = Users.ID) "; + if ($SID) { + /* This is not needed for the total row count query. */ + $q_from_extra = "LEFT JOIN PackageVotes + ON (PackageBases.ID = PackageVotes.PackageBaseID AND PackageVotes.UsersID = $myuid) + LEFT JOIN PackageNotifications + ON (PackageBases.ID = PackageNotifications.PackageBaseID AND PackageNotifications.UserID = $myuid) "; + } else { + $q_from_extra = ""; + } + + $q_where = 'WHERE PackageBases.PackagerUID IS NOT NULL '; + + if (isset($params['K'])) { + if (isset($params["SeB"]) && $params["SeB"] == "m") { + /* Search by maintainer. */ + $q_where .= "AND Users.Username = " . $dbh->quote($params['K']) . " "; + } + elseif (isset($params["SeB"]) && $params["SeB"] == "c") { + /* Search by co-maintainer. */ + $q_where .= "AND EXISTS (SELECT * FROM PackageComaintainers "; + $q_where .= "INNER JOIN Users ON Users.ID = PackageComaintainers.UsersID "; + $q_where .= "WHERE PackageComaintainers.PackageBaseID = PackageBases.ID "; + $q_where .= "AND Users.Username = " . $dbh->quote($params['K']) . ")"; + } + elseif (isset($params["SeB"]) && $params["SeB"] == "M") { + /* Search by maintainer and co-maintainer. */ + $q_where .= "AND (Users.Username = " . $dbh->quote($params['K']) . " "; + $q_where .= "OR EXISTS (SELECT * FROM PackageComaintainers "; + $q_where .= "INNER JOIN Users ON Users.ID = PackageComaintainers.UsersID "; + $q_where .= "WHERE PackageComaintainers.PackageBaseID = PackageBases.ID "; + $q_where .= "AND Users.Username = " . $dbh->quote($params['K']) . "))"; + } + elseif (isset($params["SeB"]) && $params["SeB"] == "s") { + /* Search by submitter. */ + $q_where .= "AND SubmitterUID = " . intval(uid_from_username($params['K'])) . " "; + } + elseif (isset($params["SeB"]) && $params["SeB"] == "n") { + /* Search by name. */ + $K = "%" . addcslashes($params['K'], '%_') . "%"; + $q_where .= "AND (Packages.Name LIKE " . $dbh->quote($K) . ") "; + } + elseif (isset($params["SeB"]) && $params["SeB"] == "b") { + /* Search by package base name. */ + $K = "%" . addcslashes($params['K'], '%_') . "%"; + $q_where .= "AND (PackageBases.Name LIKE " . $dbh->quote($K) . ") "; + } + elseif (isset($params["SeB"]) && $params["SeB"] == "k") { + /* Search by name. */ + $q_where .= construct_keyword_search($dbh, $params['K'], false, true); + } + elseif (isset($params["SeB"]) && $params["SeB"] == "N") { + /* Search by name (exact match). */ + $q_where .= "AND (Packages.Name = " . $dbh->quote($params['K']) . ") "; + } + elseif (isset($params["SeB"]) && $params["SeB"] == "B") { + /* Search by package base name (exact match). */ + $q_where .= "AND (PackageBases.Name = " . $dbh->quote($params['K']) . ") "; + } + else { + /* Keyword search (default). */ + $q_where .= construct_keyword_search($dbh, $params['K'], true, true); + } + } + + if (isset($params["do_Orphans"])) { + $q_where .= "AND MaintainerUID IS NULL "; + } + + if (isset($params['outdated'])) { + if ($params['outdated'] == 'on') { + $q_where .= "AND OutOfDateTS IS NOT NULL "; + } + elseif ($params['outdated'] == 'off') { + $q_where .= "AND OutOfDateTS IS NULL "; + } + } + + $order = (isset($params["SO"]) && $params["SO"] == 'd') ? 'DESC' : 'ASC'; + + $q_sort = "ORDER BY "; + $sort_by = isset($params["SB"]) ? $params["SB"] : ''; + switch ($sort_by) { + case 'v': + $q_sort .= "NumVotes " . $order . ", "; + break; + case 'p': + $q_sort .= "Popularity " . $order . ", "; + break; + case 'w': + if ($SID) { + $q_sort .= "Voted " . $order . ", "; + } + break; + case 'o': + if ($SID) { + $q_sort .= "Notify " . $order . ", "; + } + break; + case 'm': + $q_sort .= "Maintainer " . $order . ", "; + break; + case 'l': + $q_sort .= "ModifiedTS " . $order . ", "; + break; + case 'a': + /* For compatibility with old search links. */ + $q_sort .= "-ModifiedTS " . $order . ", "; + break; + default: + break; + } + $q_sort .= " Packages.Name " . $order . " "; + + $q_limit = "LIMIT ".$params["PP"]." OFFSET ".$params["O"]; + + $q = $q_select . $q_from . $q_from_extra . $q_where . $q_sort . $q_limit; + $q_total = "SELECT COUNT(*) " . $q_from . $q_where; + + $result = $dbh->query($q); + $result_t = $dbh->query($q_total); + if ($result_t) { + $row = $result_t->fetch(PDO::FETCH_NUM); + $total = min($row[0], 2500); + } else { + $total = 0; + } + + if ($result && $total > 0) { + if (isset($params["SO"]) && $params["SO"] == "d"){ + $SO_next = "a"; + } + else { + $SO_next = "d"; + } + } + + /* Calculate the results to use. */ + $first = $params['O'] + 1; + + /* Calculation of pagination links. */ + $per_page = ($params['PP'] > 0) ? $params['PP'] : 50; + $current = ceil($first / $per_page); + $pages = ceil($total / $per_page); + $templ_pages = array(); + + if ($current > 1) { + $templ_pages['« ' . __('First')] = 0; + $templ_pages['‹ ' . __('Previous')] = ($current - 2) * $per_page; + } + + if ($current - 5 > 1) + $templ_pages["..."] = false; + + for ($i = max($current - 5, 1); $i <= min($pages, $current + 5); $i++) { + $templ_pages[$i] = ($i - 1) * $per_page; + } + + if ($current + 5 < $pages) + $templ_pages["... "] = false; + + if ($current < $pages) { + $templ_pages[__('Next') . ' ›'] = $current * $per_page; + $templ_pages[__('Last') . ' »'] = ($pages - 1) * $per_page; + } + + $searchresults = array(); + if ($result) { + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $searchresults[] = $row; + } + } + + include('pkg_search_results.php'); + + return $total; +} + +/** + * Construct the WHERE part of the sophisticated keyword search + * + * @param handle $dbh Database handle + * @param string $keywords The search term + * @param bool $namedesc Search name and description fields + * @param bool $keyword Search packages with a matching PackageBases.Keyword + * + * @return string WHERE part of the SQL clause + */ +function construct_keyword_search($dbh, $keywords, $namedesc, $keyword=false) { + $count = 0; + $where_part = ""; + $q_keywords = ""; + $op = ""; + + foreach (str_getcsv($keywords, ' ') as $term) { + if ($term == "") { + continue; + } + if ($count > 0 && strtolower($term) == "and") { + $op = "AND "; + continue; + } + if ($count > 0 && strtolower($term) == "or") { + $op = "OR "; + continue; + } + if ($count > 0 && strtolower($term) == "not") { + $op .= "NOT "; + continue; + } + + $term = "%" . addcslashes($term, '%_') . "%"; + $q_keywords .= $op . " ("; + $q_keywords .= "Packages.Name LIKE " . $dbh->quote($term) . " "; + if ($namedesc) { + $q_keywords .= "OR Description LIKE " . $dbh->quote($term) . " "; + } + + if ($keyword) { + $q_keywords .= "OR EXISTS (SELECT * FROM PackageKeywords WHERE "; + $q_keywords .= "PackageKeywords.PackageBaseID = Packages.PackageBaseID AND "; + $q_keywords .= "PackageKeywords.Keyword LIKE " . $dbh->quote($term) . ")) "; + } else { + $q_keywords .= ") "; + } + + $count++; + if ($count >= 20) { + break; + } + $op = "AND "; + } + + if (!empty($q_keywords)) { + $where_part = "AND (" . $q_keywords . ") "; + } + + return $where_part; +} + +/** + * Determine if a POST string has been sent by a visitor + * + * @param string $action String to check has been sent via POST + * + * @return bool True if the POST string was used, otherwise false + */ +function current_action($action) { + return (isset($_POST['action']) && $_POST['action'] == $action) || + isset($_POST[$action]); +} + +/** + * Determine if sent IDs are valid integers + * + * @param array $ids IDs to validate + * + * @return array All sent IDs that are valid integers + */ +function sanitize_ids($ids) { + $new_ids = array(); + foreach ($ids as $id) { + $id = intval($id); + if ($id > 0) { + $new_ids[] = $id; + } + } + return $new_ids; +} + +/** + * Determine package information for latest package + * + * @param int $numpkgs Number of packages to get information on + * + * @return array $packages Package info for the specified number of recent packages + */ +function latest_pkgs($numpkgs, $orderBy='SubmittedTS') { + $dbh = DB::connect(); + + $q = "SELECT Packages.*, MaintainerUID, SubmittedTS, ModifiedTS "; + $q.= "FROM Packages LEFT JOIN PackageBases ON "; + $q.= "PackageBases.ID = Packages.PackageBaseID "; + $q.= "ORDER BY " . $orderBy . " DESC "; + $q.= "LIMIT " . intval($numpkgs); + $result = $dbh->query($q); + + $packages = array(); + if ($result) { + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $packages[] = $row; + } + } + + return $packages; +} + +/** + * Determine package information for latest modified packages + * + * @param int $numpkgs Number of packages to get information on + * + * @return array $packages Package info for the specified number of recently modified packages + */ +function latest_modified_pkgs($numpkgs) { + return latest_pkgs($numpkgs, 'ModifiedTS'); +} diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php new file mode 100644 index 00000000..7fce307c --- /dev/null +++ b/web/lib/pkgreqfuncs.inc.php @@ -0,0 +1,260 @@ +query($q)->fetchColumn(); +} + +/** + * Get a list of all package requests + * + * @param int $offset The index of the first request to return + * @param int $limit The maximum number of requests to return + * @param int $uid Only return packages affecting the given user + * @param int $from Do not return packages older than the given date + * + * @return array List of package requests with details + */ +function pkgreq_list($offset, $limit, $uid=false, $from=false) { + $dbh = DB::connect(); + + $q = "SELECT PackageRequests.ID, "; + $q.= "PackageRequests.PackageBaseID AS BaseID, "; + $q.= "PackageRequests.PackageBaseName AS Name, "; + $q.= "PackageRequests.MergeBaseName AS MergeInto, "; + $q.= "RequestTypes.Name AS Type, PackageRequests.Comments, "; + $q.= "Users.Username AS User, PackageRequests.RequestTS, "; + $q.= "PackageRequests.Status, PackageRequests.Status = 0 AS Open "; + $q.= "FROM PackageRequests INNER JOIN RequestTypes ON "; + $q.= "RequestTypes.ID = PackageRequests.ReqTypeID "; + $q.= "INNER JOIN Users ON Users.ID = PackageRequests.UsersID "; + + if ($uid || $from) { + $q.= "WHERE "; + if ($uid) { + $q.= "(PackageRequests.UsersID = " . intval($uid). " "; + $q.= "OR Users.ID = " . intval($uid) . ") AND "; + } + if ($from) { + $q.= "RequestTS >= " . intval($from). " "; + } + } + + $q.= "ORDER BY Open DESC, RequestTS DESC "; + $q.= "LIMIT " . $limit . " OFFSET " . $offset; + + return $dbh->query($q)->fetchAll(); +} + +/** + * Get a list of all open package requests belonging to a certain package base + * + * @param int $baseid The package base ID to retrieve requests for + * @param int $type The type of requests to obtain + * + * @return array List of package request IDs + */ +function pkgreq_by_pkgbase($baseid, $type=false) { + $dbh = DB::connect(); + + $q = "SELECT PackageRequests.ID "; + $q.= "FROM PackageRequests INNER JOIN RequestTypes ON "; + $q.= "RequestTypes.ID = PackageRequests.ReqTypeID "; + $q.= "WHERE PackageRequests.Status = 0 "; + $q.= "AND PackageRequests.PackageBaseID = " . intval($baseid); + + if ($type) { + $q .= " AND RequestTypes.Name = " . $dbh->quote($type); + } + + return $dbh->query($q)->fetchAll(PDO::FETCH_COLUMN, 0); +} + +/** + * Obtain the package base that belongs to a package request. + * + * @param int $id Package request ID to retrieve the package base for + * + * @return int The name of the corresponding package base + */ +function pkgreq_get_pkgbase_name($id) { + $dbh = DB::connect(); + + $q = "SELECT PackageBaseName FROM PackageRequests "; + $q.= "WHERE ID = " . intval($id); + $result = $dbh->query($q); + return $result->fetch(PDO::FETCH_COLUMN, 0); +} + +/** + * Obtain the email address of the creator of a package request + * + * @param int $id Package request ID to retrieve the creator for + * + * @return int The email address of the creator + */ +function pkgreq_get_creator_email($id) { + $dbh = DB::connect(); + + $q = "SELECT Email FROM Users INNER JOIN PackageRequests "; + $q.= "ON Users.ID = PackageRequests.UsersID "; + $q.= "WHERE PackageRequests.ID = " . intval($id); + $result = $dbh->query($q); + return $result->fetch(PDO::FETCH_COLUMN, 0); +} + +/** + * File a deletion/orphan request against a package base + * + * @param string $ids The package base IDs to file the request against + * @param string $type The type of the request + * @param string $merge_into The target of a merge operation + * @param string $comments The comments to be added to the request + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgreq_file($ids, $type, $merge_into, $comments) { + if (!has_credential(CRED_PKGREQ_FILE)) { + return array(false, __("You must be logged in to file package requests.")); + } + + /* Ignore merge target for non-merge requests. */ + if ($type !== 'merge') { + $merge_into = ''; + } + + if (!empty($merge_into) && !preg_match("/^[a-z0-9][a-z0-9\.+_-]*$/D", $merge_into)) { + return array(false, __("Invalid name: only lowercase letters are allowed.")); + } + + if (!empty($merge_into) && !pkgbase_from_name($merge_into)) { + return array(false, __("Cannot find package to merge votes and comments into.")); + } + + if (empty($comments)) { + return array(false, __("The comment field must not be empty.")); + } + + $dbh = DB::connect(); + $uid = uid_from_sid($_COOKIE["AURSID"]); + + /* TODO: Allow for filing multiple requests at once. */ + $base_id = intval($ids[0]); + $pkgbase_name = pkgbase_name_from_id($base_id); + + if ($merge_into == $pkgbase_name) { + return array(false, __("Cannot merge a package base with itself.")); + } + + $q = "SELECT ID FROM RequestTypes WHERE Name = " . $dbh->quote($type); + $result = $dbh->query($q); + if ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $type_id = $row['ID']; + } else { + return array(false, __("Invalid request type.")); + } + + $q = "INSERT INTO PackageRequests "; + $q.= "(ReqTypeID, PackageBaseID, PackageBaseName, MergeBaseName, "; + $q.= "UsersID, Comments, ClosureComment, RequestTS) VALUES (" . $type_id . ", "; + $q.= $base_id . ", " . $dbh->quote($pkgbase_name) . ", "; + $q.= $dbh->quote($merge_into) . ", " . $uid . ", "; + $q.= $dbh->quote($comments) . ", '', " . strval(time()) . ")"; + $dbh->exec($q); + $request_id = $dbh->lastInsertId(); + + /* Send e-mail notifications. */ + $params = array('request-open', $uid, $request_id, $type, $base_id); + if ($type === 'merge') { + $params[] = $merge_into; + } + notify($params); + + $auto_orphan_age = config_get('options', 'auto_orphan_age'); + $auto_delete_age = config_get('options', 'auto_delete_age'); + $details = pkgbase_get_details($base_id); + if ($type == 'orphan' && $details['OutOfDateTS'] > 0 && + time() - $details['OutOfDateTS'] >= $auto_orphan_age && + $auto_orphan_age > 0) { + /* + * Close package request. NOTE: This needs to happen *before* + * the actual disown operation. Otherwise, the former + * maintainer will not be included in the Cc list of the + * request notification email. + */ + $out_of_date_time = date("Y-m-d", intval($details["OutOfDateTS"])); + pkgreq_close($request_id, "accepted", + "The package base has been flagged out-of-date " . + "since " . $out_of_date_time . ".", true); + $q = "UPDATE PackageBases SET MaintainerUID = NULL "; + $q.= "WHERE ID = " . $base_id; + $dbh->exec($q); + } else if ($type == 'deletion' && $details['MaintainerUID'] == $uid && + $details['SubmittedTS'] > 0 && $auto_delete_age > 0 && + time() - $details['SubmittedTS'] <= $auto_delete_age) { + /* + * Close package request. NOTE: This needs to happen *before* + * the actual deletion operation. Otherwise, the former + * maintainer will not be included in the Cc list of the + * request notification email. + */ + pkgreq_close($request_id, "accepted", + "Deletion of a fresh package requested by its " . + "current maintainer.", true); + pkgbase_delete(array($base_id), NULL, NULL, true); + } + + return array(true, __("Added request successfully.")); +} + +/** + * Close a deletion/orphan request + * + * @param int $id The package request to close + * @param string $reason Whether the request was accepted or rejected + * @param string $comments Comments to be added to the notification email + * @param boolean $auto_close (optional) Whether the request is auto-closed + * + * @return array Tuple of success/failure indicator and error message + */ +function pkgreq_close($id, $reason, $comments, $auto_close=false) { + switch ($reason) { + case 'accepted': + $status = 2; + break; + case 'rejected': + $status = 3; + break; + default: + return array(false, __("Invalid reason.")); + } + + $dbh = DB::connect(); + $id = intval($id); + $uid = $auto_close ? 0 : uid_from_sid($_COOKIE["AURSID"]); + + if (!$auto_close && !has_credential(CRED_PKGREQ_CLOSE)) { + return array(false, __("Only TUs and developers can close requests.")); + } + + $q = "UPDATE PackageRequests SET Status = " . intval($status) . ", "; + $q.= "ClosedTS = " . strval(time()) . ", "; + $q.= "ClosedUID = " . ($uid == 0 ? "NULL" : intval($uid)) . ", "; + $q.= "ClosureComment = " . $dbh->quote($comments) . " "; + $q.= "WHERE ID = " . intval($id); + $dbh->exec($q); + + /* Send e-mail notifications. */ + notify(array('request-close', $uid, $id, $reason)); + + return array(true, __("Request closed successfully.")); +} diff --git a/web/lib/routing.inc.php b/web/lib/routing.inc.php new file mode 100644 index 00000000..73c667d2 --- /dev/null +++ b/web/lib/routing.inc.php @@ -0,0 +1,85 @@ + 'home.php', + '/index.php' => 'home.php', + '/packages' => 'packages.php', + '/pkgbase' => 'pkgbase.php', + '/requests' => 'pkgreq.php', + '/register' => 'register.php', + '/account' => 'account.php', + '/accounts' => 'account.php', + '/login' => 'login.php', + '/logout' => 'logout.php', + '/passreset' => 'passreset.php', + '/rpc' => 'rpc.php', + '/rss/modified' => 'modified-rss.php', + '/rss' => 'rss.php', + '/tos' => 'tos.php', + '/tu' => 'tu.php', + '/addvote' => 'addvote.php', +); + +$PKG_PATH = '/packages'; +$PKGBASE_PATH = '/pkgbase'; +$PKGREQ_PATH = '/requests'; +$USER_PATH = '/account'; + +function get_route($path) { + global $ROUTES; + + $path = rtrim($path, '/'); + if (isset($ROUTES[$path])) { + return $ROUTES[$path]; + } else { + return NULL; + } +} + +function get_uri($path, $absolute=false) { + if ($absolute) { + return rtrim(aur_location(), '/') . $path; + } else { + return $path; + } +} + +function get_pkg_route() { + global $PKG_PATH; + return $PKG_PATH; +} + +function get_pkgbase_route() { + global $PKGBASE_PATH; + return $PKGBASE_PATH; +} + +function get_pkgreq_route() { + global $PKGREQ_PATH; + return $PKGREQ_PATH; +} + +function get_pkg_uri($pkgname, $absolute=false) { + global $PKG_PATH; + $path = $PKG_PATH . '/' . urlencode($pkgname) . '/'; + return get_uri($path, $absolute); +} + +function get_pkgbase_uri($pkgbase_name, $absolute=false) { + global $PKGBASE_PATH; + $path = $PKGBASE_PATH . '/' . urlencode($pkgbase_name) . '/'; + return get_uri($path, $absolute); +} + +function get_user_route() { + global $USER_PATH; + return $USER_PATH; +} + +function get_user_uri($username, $absolute=false) { + global $USER_PATH; + $path = $USER_PATH . '/' . urlencode($username) . '/'; + return get_uri($path, $absolute); +} diff --git a/web/lib/stats.inc.php b/web/lib/stats.inc.php new file mode 100644 index 00000000..f5692f96 --- /dev/null +++ b/web/lib/stats.inc.php @@ -0,0 +1,108 @@ +query($q); + + $newest_packages = new ArrayObject(); + if ($result) { + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $newest_packages->append($row); + } + set_cache_value($key, $newest_packages); + } + } + include('stats/updates_table.php'); +} + +/** + * Display a user's statistics table + * + * @param string $userid The user ID of the person to get package statistics for + * + * @return void + */ +function user_table($userid) { + $base_q = "SELECT COUNT(*) FROM PackageBases "; + $base_q.= "WHERE MaintainerUID = " . $userid . " "; + $base_q.= "AND PackagerUID IS NOT NULL"; + + $user_pkg_count = db_cache_value($base_q, 'user_pkg_count:' . $userid); + + $q = "SELECT COUNT(*) FROM PackageBases "; + $q.= "WHERE OutOfDateTS IS NOT NULL "; + $q.= "AND MaintainerUID = " . $userid . " "; + $q.= "AND PackagerUID IS NOT NULL"; + + $flagged_outdated = db_cache_value($q, 'user_flagged_outdated:' . $userid); + + include('stats/user_table.php'); +} + +/** + * Display the general package statistics table + * + * @return void + */ +function general_stats_table() { + # AUR statistics + $q = "SELECT COUNT(*) FROM PackageBases WHERE PackagerUID IS NOT NULL"; + $pkg_count = db_cache_value($q, 'pkg_count'); + + $q = "SELECT COUNT(*) FROM PackageBases "; + $q.= "WHERE MaintainerUID IS NULL "; + $q.= "AND PackagerUID IS NOT NULL"; + $orphan_count = db_cache_value($q, 'orphan_count'); + + $q = "SELECT count(*) FROM Users"; + $user_count = db_cache_value($q, 'user_count'); + + $q = "SELECT count(*) FROM Users,AccountTypes WHERE Users.AccountTypeID = AccountTypes.ID AND (AccountTypes.AccountType = 'Trusted User' OR AccountTypes.AccountType = 'Trusted User & Developer')"; + $tu_count = db_cache_value($q, 'tu_count'); + + $targstamp = intval(strtotime("-7 days")); + $yearstamp = intval(strtotime("-1 year")); + + $q = "SELECT COUNT(*) FROM PackageBases "; + $q.= "WHERE SubmittedTS >= $targstamp "; + $q.= "AND PackagerUID IS NOT NULL"; + $add_count = db_cache_value($q, 'add_count'); + + /* + * A package whose last modification time differs less than an hour + * from the initial submission time is considered new. + */ + + $q = "SELECT COUNT(*) FROM PackageBases "; + $q.= "WHERE ModifiedTS >= $targstamp "; + $q.= "AND ModifiedTS - SubmittedTS >= 3600 "; + $q.= "AND PackagerUID IS NOT NULL"; + $update_count = db_cache_value($q, 'update_count'); + + $q = "SELECT COUNT(*) FROM PackageBases "; + $q.= "WHERE ModifiedTS >= $yearstamp "; + $q.= "AND ModifiedTS - SubmittedTS >= 3600 "; + $q.= "AND PackagerUID IS NOT NULL"; + $update_year_count = db_cache_value($q, 'update_year_count'); + + $q = "SELECT COUNT(*) FROM PackageBases "; + $q.= "WHERE ModifiedTS - SubmittedTS < 3600 "; + $q.= "AND PackagerUID IS NOT NULL"; + $never_update_count = db_cache_value($q, 'never_update_count'); + + include('stats/general_stats_table.php'); +} diff --git a/web/lib/streams.php b/web/lib/streams.php new file mode 100644 index 00000000..00cf6cc5 --- /dev/null +++ b/web/lib/streams.php @@ -0,0 +1,167 @@ +. + + This file is part of PHP-gettext. + + PHP-gettext is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + PHP-gettext is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with PHP-gettext; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + + + // Simple class to wrap file streams, string streams, etc. + // seek is essential, and it should be byte stream +class StreamReader { + // should return a string [FIXME: perhaps return array of bytes?] + function read($bytes) { + return false; + } + + // should return new position + function seekto($position) { + return false; + } + + // returns current position + function currentpos() { + return false; + } + + // returns length of entire stream (limit for seekto()s) + function length() { + return false; + } +}; + +class StringReader { + var $_pos; + var $_str; + + function __construct($str='') { + $this->_str = $str; + $this->_pos = 0; + } + + function read($bytes) { + $data = substr($this->_str, $this->_pos, $bytes); + $this->_pos += $bytes; + if (strlen($this->_str)<$this->_pos) + $this->_pos = strlen($this->_str); + + return $data; + } + + function seekto($pos) { + $this->_pos = $pos; + if (strlen($this->_str)<$this->_pos) + $this->_pos = strlen($this->_str); + return $this->_pos; + } + + function currentpos() { + return $this->_pos; + } + + function length() { + return strlen($this->_str); + } + +}; + + +class FileReader { + var $_pos; + var $_fd; + var $_length; + + function __construct($filename) { + if (file_exists($filename)) { + + $this->_length=filesize($filename); + $this->_pos = 0; + $this->_fd = fopen($filename,'rb'); + if (!$this->_fd) { + $this->error = 3; // Cannot read file, probably permissions + return false; + } + } else { + $this->error = 2; // File doesn't exist + return false; + } + } + + function read($bytes) { + if ($bytes) { + fseek($this->_fd, $this->_pos); + + // PHP 5.1.1 does not read more than 8192 bytes in one fread() + // the discussions at PHP Bugs suggest it's the intended behaviour + $data = ''; + while ($bytes > 0) { + $chunk = fread($this->_fd, $bytes); + $data .= $chunk; + $bytes -= strlen($chunk); + } + $this->_pos = ftell($this->_fd); + + return $data; + } else return ''; + } + + function seekto($pos) { + fseek($this->_fd, $pos); + $this->_pos = ftell($this->_fd); + return $this->_pos; + } + + function currentpos() { + return $this->_pos; + } + + function length() { + return $this->_length; + } + + function close() { + fclose($this->_fd); + } + +}; + +// Preloads entire file in memory first, then creates a StringReader +// over it (it assumes knowledge of StringReader internals) +class CachedFileReader extends StringReader { + function __construct($filename) { + if (file_exists($filename)) { + + $length=filesize($filename); + $fd = fopen($filename,'rb'); + + if (!$fd) { + $this->error = 3; // Cannot read file, probably permissions + return false; + } + $this->_str = fread($fd, $length); + fclose($fd); + + } else { + $this->error = 2; // File doesn't exist + return false; + } + } +}; + + +?> diff --git a/web/lib/timezone.inc.php b/web/lib/timezone.inc.php new file mode 100644 index 00000000..949f846d --- /dev/null +++ b/web/lib/timezone.inc.php @@ -0,0 +1,63 @@ + Displayed Description + */ +function generate_timezone_list() { + $php_timezones = DateTimeZone::listIdentifiers(DateTimeZone::ALL); + + $offsets = array(); + foreach ($php_timezones as $timezone) { + $tz = new DateTimeZone($timezone); + $offset = $tz->getOffset(new DateTime()); + $offsets[$timezone] = "(UTC" . ($offset < 0 ? "-" : "+") . gmdate("H:i", abs($offset)) . + ") " . $timezone; + } + + asort($offsets); + return $offsets; +} + +/** + * Set the timezone for the user. + * + * @return null + */ +function set_tz() { + $timezones = generate_timezone_list(); + $update_cookie = false; + + if (isset($_COOKIE["AURTZ"])) { + $timezone = $_COOKIE["AURTZ"]; + } elseif (isset($_COOKIE["AURSID"])) { + $dbh = DB::connect(); + $q = "SELECT Timezone FROM Users, Sessions "; + $q .= "WHERE Users.ID = Sessions.UsersID "; + $q .= "AND Sessions.SessionID = "; + $q .= $dbh->quote($_COOKIE["AURSID"]); + $result = $dbh->query($q); + + if ($result) { + $timezone = $result->fetchColumn(0); + if (!$timezone) { + unset($timezone); + } + } + + $update_cookie = true; + } + + if (!isset($timezone) || !array_key_exists($timezone, $timezones)) { + $timezone = config_get("options", "default_timezone"); + } + date_default_timezone_set($timezone); + + if ($update_cookie) { + $timeout = intval(config_get("options", "persistent_cookie_timeout")); + $cookie_time = time() + $timeout; + setcookie("AURTZ", $timezone, $cookie_time, "/"); + } +} diff --git a/web/lib/translator.inc.php b/web/lib/translator.inc.php new file mode 100644 index 00000000..cbed1274 --- /dev/null +++ b/web/lib/translator.inc.php @@ -0,0 +1,139 @@ +", ""); + +include_once("confparser.inc.php"); +include_once('DB.class.php'); +include_once('gettext.php'); +include_once('streams.php'); + +global $streamer, $l10n; + +# Languages we have translations for +$SUPPORTED_LANGS = array( + "ar" => "العربية", + "ast" => "Asturianu", + "ca" => "Català", + "cs" => "Český", + "da" => "Dansk", + "de" => "Deutsch", + "en" => "English", + "el" => "Ελληνικά", + "es" => "Español", + "es_419" => "Español (Latinoamérica)", + "fi" => "Suomi", + "fr" => "Français", + "he" => "עברית", + "hr" => "Hrvatski", + "hu" => "Magyar", + "it" => "Italiano", + "ja" => "日本語", + "nb" => "Norsk", + "nl" => "Nederlands", + "pl" => "Polski", + "pt_BR" => "Português (Brasil)", + "pt_PT" => "Português (Portugal)", + "ro" => "Română", + "ru" => "Русский", + "sk" => "Slovenčina", + "sr" => "Srpski", + "tr" => "Türkçe", + "uk" => "Українська", + "zh_CN" => "简体中文", + "zh_TW" => "正體中文" +); + +function __() { + global $LANG; + global $l10n; + + # Create the translation. + $args = func_get_args(); + + # First argument is always string to be translated + $tag = array_shift($args); + + # Translate using gettext_reader initialized before. + $translated = $l10n->translate($tag); + $translated = htmlspecialchars($translated, ENT_QUOTES); + + # Subsequent arguments are strings to be formatted + if (count($args) > 0) { + $translated = vsprintf($translated, $args); + } + + return $translated; +} + +function _n($msgid1, $msgid2, $n) { + global $l10n; + + $translated = sprintf($l10n->ngettext($msgid1, $msgid2, $n), $n); + return htmlspecialchars($translated, ENT_QUOTES); +} + +# set up the visitor's language +# +function set_lang() { + global $LANG; + global $SUPPORTED_LANGS; + global $streamer, $l10n; + + $update_cookie = 0; + if (isset($_POST['setlang'])) { + # visitor is requesting a language change + # + $LANG = $_POST['setlang']; + $update_cookie = 1; + + } elseif (isset($_COOKIE['AURLANG'])) { + # If a cookie is set, use that + # + $LANG = $_COOKIE['AURLANG']; + + } elseif (isset($_COOKIE["AURSID"])) { + # No language but a session; use default lang preference + # + $dbh = DB::connect(); + $q = "SELECT LangPreference FROM Users, Sessions "; + $q.= "WHERE Users.ID = Sessions.UsersID "; + $q.= "AND Sessions.SessionID = "; + $q.= $dbh->quote($_COOKIE["AURSID"]); + $result = $dbh->query($q); + + if ($result) { + $LANG = $result->fetchColumn(0); + if (!$LANG) { + unset($LANG); + } + } + $update_cookie = 1; + } + + # Set $LANG to default if nothing is valid. + if (!isset($LANG) || !array_key_exists($LANG, $SUPPORTED_LANGS)) { + $LANG = config_get('options', 'default_lang'); + } + + if ($update_cookie) { + $timeout = intval(config_get('options', 'persistent_cookie_timeout')); + $cookie_time = time() + $timeout; + setcookie("AURLANG", $LANG, $cookie_time, "/"); + } + + $localedir = config_get('options', 'localedir'); + $streamer = new FileReader($localedir . '/' . $LANG . + '/LC_MESSAGES/aurweb.mo'); + $l10n = new gettext_reader($streamer, true); + + return; +} diff --git a/web/lib/version.inc.php b/web/lib/version.inc.php new file mode 100644 index 00000000..27eef718 --- /dev/null +++ b/web/lib/version.inc.php @@ -0,0 +1,3 @@ + + ' . htmlspecialchars($username) . '') ?> +

    +

    + ', '') ?> +

    + +
    +
    + + + +
    +
    +

    + + +

    + +

    + +

    + +

    + " /> +

    +
    +
    diff --git a/web/template/account_details.php b/web/template/account_details.php new file mode 100644 index 00000000..84f8b9c5 --- /dev/null +++ b/web/template/account_details.php @@ -0,0 +1,93 @@ + + + + +
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + " . __("hidden") . ""; + else: + ?> + "> + +
    " rel="nofollow">
    + +
    format('Y-m-d') ?>
    + +
    Links:
      +
    • + +
    • + + +
    • + +
    +
    diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php new file mode 100644 index 00000000..4ce6b875 --- /dev/null +++ b/web/template/account_edit_form.php @@ -0,0 +1,222 @@ + +

    + ', '') ?> + ', '') ?> + ', '') ?> +

    + +
    + + + +
    + + + + + +
    +
    +

    + + () +

    +

    + +

    + +

    + + +

    + +

    + + + + + + +

    + + + +

    + + /> +

    + + +

    + + () +

    +

    + +

    + +

    + + /> +

    +

    + +

    + +

    + + +

    +

    + + + + " . __("Hide Email Address") . "") ?> + +

    + +

    + + +

    + +

    + + +

    + +

    + + +

    + +

    + + +

    + +

    + + +

    +

    + + +

    +
    + + +
    + +

    + + +

    + +

    + + +

    +
    + + +
    + +

    + + +

    +
    + +
    + : +

    + + /> +

    +

    + + /> +

    +

    + + /> +

    +
    + +
    + + +

    + + +

    + + +

    + + () + +

    + +
    + +
    +

    + + + " />   + + " />   + + " /> +

    +
    +
    diff --git a/web/template/account_search_results.php b/web/template/account_search_results.php new file mode 100644 index 00000000..0f7eb7a4 --- /dev/null +++ b/web/template/account_search_results.php @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + $row): ?> + + + + + + + + + + + +
    "> + + + + "> + +   + +
    + + + + + + +
    +
    +
    + + + $ind): + ?> + + + " /> +
    +
    +
    +
    +
    + + + $ind): + ?> + + + -->" /> +
    +
    +
    + +

    + +

    + + diff --git a/static/html/cgit/footer.html b/web/template/cgit/footer.html similarity index 70% rename from static/html/cgit/footer.html rename to web/template/cgit/footer.html index b3e79568..14c358f1 100644 --- a/static/html/cgit/footer.html +++ b/web/template/cgit/footer.html @@ -1,6 +1,6 @@ diff --git a/static/html/cgit/header.html b/web/template/cgit/header.html similarity index 90% rename from static/html/cgit/header.html rename to web/template/cgit/header.html index c5ef0f6b..2d418702 100644 --- a/static/html/cgit/header.html +++ b/web/template/cgit/header.html @@ -6,7 +6,7 @@
  • Packages
  • Forums
  • Wiki
  • -
  • GitLab
  • +
  • Bugs
  • Security
  • AUR
  • Download
  • diff --git a/web/template/comaintainers_form.php b/web/template/comaintainers_form.php new file mode 100644 index 00000000..79e2b52c --- /dev/null +++ b/web/template/comaintainers_form.php @@ -0,0 +1,20 @@ +
    +

    :

    +

    + ', htmlspecialchars($pkgbase_name), ''); ?> +

    +
    +
    + +

    + + +

    +

    + " /> +

    +
    +
    +
    + diff --git a/web/template/flag_comment.php b/web/template/flag_comment.php new file mode 100644 index 00000000..05eeacb2 --- /dev/null +++ b/web/template/flag_comment.php @@ -0,0 +1,27 @@ +
    +

    +

    + + ', html_format_username($message['Username']), '', + '', htmlspecialchars($pkgbase_name), '', + '', date('Y-m-d', $message['OutOfDateTS']), ''); ?> + + ', htmlspecialchars($pkgbase_name), ''); ?> + +

    + +

    +

    +

    +
    +

    + +

    +

    + " /> +
    +

    +
    + diff --git a/web/template/footer.php b/web/template/footer.php new file mode 100644 index 00000000..7f97aae0 --- /dev/null +++ b/web/template/footer.php @@ -0,0 +1,13 @@ + + + + + + + diff --git a/web/template/header.php b/web/template/header.php new file mode 100644 index 00000000..afe7a9b6 --- /dev/null +++ b/web/template/header.php @@ -0,0 +1,83 @@ +'; ?> + + + + AUR (<?= htmlspecialchars($LANG); ?>)<?php if ($title != "") { print " - " . htmlspecialchars($title); } ?> + + + + ' /> + ' /> + + + + + + + + +
    +
    +
    "> +
    +
    + + +
    +
    +
    +
    +
    +
      + +
    • +
    • + +
    • + + +
    • + +
    • +
    • +
    • + +
    • AUR
    • +
    • +
    • + +
    • + +
    • + + +
    +
    + + diff --git a/web/template/pkg_comment_box.php b/web/template/pkg_comment_box.php new file mode 100644 index 00000000..22f90d4a --- /dev/null +++ b/web/template/pkg_comment_box.php @@ -0,0 +1,4 @@ +
    +

    + +
    diff --git a/web/template/pkg_comment_form.php b/web/template/pkg_comment_form.php new file mode 100644 index 00000000..e8a516e3 --- /dev/null +++ b/web/template/pkg_comment_form.php @@ -0,0 +1,28 @@ +
    +
    +
    + " /> + + + + + +
    +

    + + ', "") ?> +

    +

    + +

    +

    + " /> + + + + + + +

    +
    +
    diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php new file mode 100644 index 00000000..ffa9e137 --- /dev/null +++ b/web/template/pkg_comments.php @@ -0,0 +1,239 @@ + + + + +
    + +
    + +
    +

    + + + + + + + + + + + + +

    + + 1): ?> +

    + $pagestart): ?> + + + + + + + + + + + + +

    + +
    + + $row): ?> + ' . $date_fmtd . ''; + if ($comment_section == "package") { + if ($row['UserName']) { + $user_fmtd = html_format_username($row['UserName']); + $heading = __('%s commented on %s', $user_fmtd, $date_link); + } else { + $heading = __('Anonymous comment on %s', $date_link); + } + } elseif ($comment_section == "account") { + $pkg_uri = '' . htmlspecialchars($row['PackageBaseName']) . ''; + $heading = __('Commented on package %s on %s', $pkg_uri, $date_link); + } + + $is_deleted = $row['DelTS']; + $is_edited = $row['EditedTS']; + $is_pinned = $row['PinnedTS']; + + if ($uid && $is_deleted) { + $date_fmtd = date('Y-m-d H:i', $row['DelTS']); + $heading .= ' ('; + if ($row['DelUserName']) { + $user_fmtd = html_format_username($row['DelUserName']); + $heading .= __('deleted on %s by %s', $date_fmtd, $user_fmtd); + } else { + $heading .= __('deleted on %s', $date_fmtd); + } + $heading .= ')'; + } elseif ($uid && $is_edited) { + $date_fmtd = date('Y-m-d H:i', $row['EditedTS']); + $heading .= ' ('; + if ($row['EditUserName']) { + $user_fmtd = html_format_username($row['EditUserName']); + $heading .= __('edited on %s by %s', $date_fmtd, $user_fmtd); + } else { + $heading .= __('edited on %s', $date_fmtd); + } + $heading .= ')'; + } + + $comment_classes = "comment-header"; + if ($is_deleted) { + $comment_classes .= " comment-deleted"; + } + ?> +

    + + +
    +
    + + + + " /> + +
    +
    + + + +
    +
    + + + + " /> + +
    +
    + + + + <?= __('Edit comment') ?> + + + = 5)): ?> +
    +
    + + + " /> + + " /> + +
    +
    + + + +
    +
    + + + + " /> + +
    +
    + +

    +
    +
    + + + +

    + +

    + +
    +
    + +
    + + diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php new file mode 100644 index 00000000..047de9a7 --- /dev/null +++ b/web/template/pkg_details.php @@ -0,0 +1,317 @@ + +
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0): +?> + + + + + + 0): ?> + + + + + + 0): ?> + + + + + + 0): ?> + + + + + + 0): ?> + + + + + + 0): ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + (, ) + +
    () + +
    + +
    +
    + + + + + "/> + +
    +
    +' . htmlspecialchars($kw) . "\n"; + } +endif; +?> +
    + + + + , + + + + + +
    + + + + , + + + + + +
    + + + + , + + + + + +
    + + + + , + + + + + +
    + + + + , + + + + + +
    = .2 ? 2 : 6) ?>
    + +
    +
    +

    + 0): ?> +
      + $darr): ?> +
    • + +
    + +
    +
    +

    + 0): ?> +
      + $darr): ?> +
    • + +
    + +
    +
    +

    +
    + 0): ?> +
    +
      + $src): ?> +
    • + +
    +
    + +
    +
    + + diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php new file mode 100644 index 00000000..3d0cde6c --- /dev/null +++ b/web/template/pkg_search_form.php @@ -0,0 +1,120 @@ + __('Name, Description'), + 'n' => __('Name Only'), + 'b' => __('Package Base'), + 'N' => __('Exact Name'), + 'B' => __('Exact Package Base'), + 'k' => __('Keywords'), + 'm' => __('Maintainer'), + 'c' => __('Co-maintainer'), + 'M' => __('Maintainer, Co-maintainer'), + 's' => __('Submitter') +); + +$outdated_flags = array( + '' => __('All'), + 'on' => __('Flagged'), + 'off' => __('Not Flagged') +); + +$sortby = array( + 'n' => __('Name'), + 'v' => __('Votes'), + 'p' => __('Popularity'), + 'w' => __('Voted'), + 'o' => __('Notify'), + 'm' => __('Maintainer'), + 'l' => __('Last modified') +); + +$orderby = array( + 'a' => __('Ascending'), + 'd' => __('Descending') +); + +$per_page = array(50, 100, 250); +?> + + diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php new file mode 100644 index 00000000..61335560 --- /dev/null +++ b/web/template/pkg_search_results.php @@ -0,0 +1,153 @@ +'; + if ($sb) { + echo '' . $title . ''; + } else { + echo $title; + } + if ($hint) { + echo '?'; + } + echo ''; + }; +} else { + $fmtth = function($title, $sb=false, $so=false, $hint=false) { + echo '' . $title . ''; + }; +} + +if (!$result): ?> +

    + +

    + + +
    +

    + + +

    + 1): ?> +

    + $pagestart): ?> + + + + + + + + +

    + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + $row): ?> + + + + + + class="flagged"> + + + + + + + + + + + + +
     
    ]" value="1" />"> + + + + + + + + + + + + + + + + + +
    + + +
    +

    + + +

    + 1): ?> +

    + $pagestart): ?> + + + + + + + + +

    + +
    + + +

    + + + + + + + + " /> +

    + + +
    + diff --git a/web/template/pkgbase_actions.php b/web/template/pkgbase_actions.php new file mode 100644 index 00000000..3d208328 --- /dev/null +++ b/web/template/pkgbase_actions.php @@ -0,0 +1,49 @@ + diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php new file mode 100644 index 00000000..35ad217a --- /dev/null +++ b/web/template/pkgbase_details.php @@ -0,0 +1,146 @@ + +
    +

    + + + + + + + + + 0): +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + (, ) + +
    () + +
    + +
    +
    + + + + + "/> + +
    +
    +' . htmlspecialchars($kw) . "\n"; + } +endif; +?> +
    = .2 ? 2 : 6) ?>
    + +
    +
    +

    + 0): ?> +
      + $pkg): +?> +
    • + +
    + +
    +
    +
    + + diff --git a/web/template/pkgreq_close_form.php b/web/template/pkgreq_close_form.php new file mode 100644 index 00000000..6077b325 --- /dev/null +++ b/web/template/pkgreq_close_form.php @@ -0,0 +1,32 @@ +
    +

    :

    +

    + ', htmlspecialchars($pkgbase_name), ''); ?> +

    +

    + : + +

    +
    +
    + + +

    + + +

    +

    + + +

    +

    + " /> +

    +
    +
    +
    + diff --git a/web/template/pkgreq_form.php b/web/template/pkgreq_form.php new file mode 100644 index 00000000..9d74093e --- /dev/null +++ b/web/template/pkgreq_form.php @@ -0,0 +1,81 @@ +
    +

    :

    +

    + ', htmlspecialchars($pkgbase_name), ''); ?> +

    +
      + +
    • + +
    +
    +
    + + + +

    + + +

    + + +

    + + +

    +

    + + +

    +

    + +

    +

    + +

    +

    + +

    +

    + " /> +

    +
    +
    +
    diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php new file mode 100644 index 00000000..1a565c3e --- /dev/null +++ b/web/template/pkgreq_results.php @@ -0,0 +1,129 @@ + +

    + + +
    +

    + + +

    + 1): ?> +

    + $pagestart): ?> + + + + + + + + +

    + +
    + + + + + + + + + + + + + + + + $row): ?> + $idle_time); + if (!$due) { + $time_left = $idle_time - (time() - intval($row['RequestTS'])); + if ($time_left > 48 * 3600) { + $time_left_fmt = _n("~%d day left", "~%d days left", round($time_left / (24 * 3600))); + } elseif ($time_left > 3600) { + $time_left_fmt = _n("~%d hour left", "~%d hours left", round($time_left / 3600)); + } else { + $time_left_fmt = __("<1 hour left"); + } + } + ?> + + + + + + + + + + + + + + class="flagged"> + + + + + + + + + + + + + + + + + +
    "> + + + () + + + + + + + + + + + + + () + +
    + + +
    + + +
    +

    + + +

    + 1): ?> +

    + $pagestart): ?> + + + + + + + + +

    + +
    + + diff --git a/web/template/search_accounts_form.php b/web/template/search_accounts_form.php new file mode 100644 index 00000000..f7824a94 --- /dev/null +++ b/web/template/search_accounts_form.php @@ -0,0 +1,52 @@ +
    +
    +
    + +
    +
    +

    + + +

    +

    + + +

    +

    + + +

    +

    + + +

    +

    + + +

    +

    + + +

    +

    + + +

    +

    + + " />   + " /> +

    +
    +
    diff --git a/web/template/stats/general_stats_table.php b/web/template/stats/general_stats_table.php new file mode 100644 index 00000000..9dcc3aaf --- /dev/null +++ b/web/template/stats/general_stats_table.php @@ -0,0 +1,36 @@ +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php new file mode 100644 index 00000000..23a86288 --- /dev/null +++ b/web/template/stats/updates_table.php @@ -0,0 +1,19 @@ +

    ()

    + +RSS Feed +RSS Feed + + + + getIterator() as $row): ?> + + + + + + +
    + " title=""> + + +
    diff --git a/web/template/stats/user_table.php b/web/template/stats/user_table.php new file mode 100644 index 00000000..e7b00834 --- /dev/null +++ b/web/template/stats/user_table.php @@ -0,0 +1,21 @@ + + +

    + + + + + + + + + + +
    + + +
    + +
    diff --git a/web/template/template.phps b/web/template/template.phps new file mode 100644 index 00000000..4f8117c8 --- /dev/null +++ b/web/template/template.phps @@ -0,0 +1,20 @@ +\n"; + + +html_footer(AURWEB_VERSION); + diff --git a/web/template/tu_details.php b/web/template/tu_details.php new file mode 100644 index 00000000..d739060d --- /dev/null +++ b/web/template/tu_details.php @@ -0,0 +1,123 @@ + 0) { + $participation = $total / $active_tus; +} else { + $participation = 0; +} + +if ($yes > $active_tus / 2) { + $vote_accepted = true; +} elseif ($participation > $quorum && $yes > $no) { + $vote_accepted = true; +} else { + $vote_accepted = false; +} +?> +
    +

    + + +

    + +

    + + +

    + : + + + + + N/A + + +
    + +
    + : + + +
    + : + + + + + + + + +

    + +

    + \n", htmlspecialchars($row['Agenda'])) ?> +

    + + + + + + + + + + + + + + + + + + + + + 0): ?> + + + + + +
    + + + + + + %
    +
    + + +
    +

    +
      + +
    • + +
    +
    + + +
    + + +
    +
    + " /> + " /> + " /> + + +
    +
    + + +
    diff --git a/web/template/tu_last_votes_list.php b/web/template/tu_last_votes_list.php new file mode 100644 index 00000000..6e852581 --- /dev/null +++ b/web/template/tu_last_votes_list.php @@ -0,0 +1,36 @@ +
    +

    + + + + + + + + + + + + $row): + if ($indx % 2): + $c = "even"; + else: + $c = "odd"; + endif; + $username = username_from_id($row["UserID"]); + ?> + + + + + + +
    + + + +
    +
    diff --git a/web/template/tu_list.php b/web/template/tu_list.php new file mode 100644 index 00000000..204c89ea --- /dev/null +++ b/web/template/tu_list.php @@ -0,0 +1,82 @@ +
    +

    + + +
      +
    • +
    + + + +

    + + + + + + + + + + + + + + + + + + $row): ?> + + + + + + + + + + + + + + +
    + + + + + + + + + + + +
    + +
    +

    + + 0 && $off != 0): + $back = (($off - $limit) <= 0) ? 0 : $off - $limit; ?> + ?off=&by='>‹ + + + + + +

    + +