Commit Graph

57 Commits

Author SHA1 Message Date
dependabot[bot]
cdab54b0dd build(deps): bump djangorestframework from 3.15.1 to 3.15.2
Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.15.1 to 3.15.2.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](https://github.com/encode/django-rest-framework/compare/3.15.1...3.15.2)

---
updated-dependencies:
- dependency-name: djangorestframework
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2024-07-16 17:36:54 -07:00
Tim Orling
85940d0490 requirements.txt: bump django-ipware; kombu
Bump requirements.txt after running:
pur -r requirements.txt

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2024-04-17 07:32:34 -07:00
dependabot[bot]
cf3c2c460c build(deps): bump sqlparse from 0.4.4 to 0.5.0
Bumps [sqlparse](https://github.com/andialbrecht/sqlparse) from 0.4.4 to 0.5.0.
- [Changelog](https://github.com/andialbrecht/sqlparse/blob/master/CHANGELOG)
- [Commits](https://github.com/andialbrecht/sqlparse/compare/0.4.4...0.5.0)

---
updated-dependencies:
- dependency-name: sqlparse
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2024-04-17 07:30:38 -07:00
Tim Orling
edbcafb03f requirements.txt: update all to latest
After running "pur -r requirements.txt"

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2024-04-09 16:49:47 -07:00
dependabot[bot]
468d2e5004 build(deps): bump pillow from 10.2.0 to 10.3.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.2.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2024-04-09 16:49:31 -07:00
Tim Orling
83378f2f9c global: deprecated pkg_resources parse_version
Since we are only using parse_version for comparison (typically checking
that we are greater than some minimum version for tool or package), one
would think we can use packaging.version.parse as if it was parse_version

Unfortunately, this requires conforming to PEP-440 version definitions,
which does not work for e.g. autotools (2.72d) nor older openssl (1.1.1p).
We rely in these (and to be sure other) cases on the LegacyVersion behavior.

https://packaging.python.org/en/latest/specifications/version-specifiers/#summary-of-differences-from-pkg-resources-parse-version

"This specification purposely restricts the syntax which constitutes a
valid version while pkg_resources.parse_version attempts to provide some
meaning from any arbitrary string."

In order to have the least impact to the overall code, we instead add
packaging_legacy to requirements.txt and use packaging_legacy.version.parse
as if it was parse_version.

https://pypi.org/project/packaging-legacy/
https://github.com/pypa/packaging/pull/407

Since pypi.org itself is depending on packaging_legacy (in fact, a pypi dev
developed the package), we can expect it to be supported for quite some time.

https://github.com/pypi/warehouse/pull/13500

[YOCTO #15348]

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2024-01-22 16:08:37 -08:00
Tim Orling
412bd6a14f requirements.txt: bump all to latest
Bump all the dependencies to latest, using
pur -r requirements.txt

We are now able to build the mysqlclient==2.2.1 package,
so the only constraint is Django>=4.2,<4.3 to keep us
pinned at the desired LTS version.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2024-01-12 14:16:22 -08:00
Tim Orling
bd5c0512ff requirements.txt: bump all to latest
Pin mysqlclient as greater than 2.1.1 changes behavior

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2024-01-03 13:33:37 -08:00
Tim Orling
7989e61fae requirements.txt: update dependencies
Use results of:
pipenv install
pipenv update
pip freeze > requirements-freeze.txt

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2023-10-05 20:51:39 -07:00
Tim Orling
eceb742205 requirements.txt: upgrade all to latest
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2023-10-05 20:49:35 -07:00
Tim Orling
e86a2c2610 Drop django-bootstrap-pagination: incompatible
Upstream django-bootstrap-pagination is no longer maintained and is
incompatible with Django 4.x.

https://github.com/staticdev/django-pagination-bootstrap was archived on June 26, 2023.

ugettext was removed in Django 4.0:
https://docs.djangoproject.com/en/4.2/releases/4.0/#features-removed-in-4-0

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2023-10-05 20:06:21 -07:00
Tim Orling
082f5aab79 requirements.txt: upgrade Django 3.2 -> 4.2
Update to 4.2 LTS release

https://docs.djangoproject.com/en/4.2/releases/4.2/
https://docs.djangoproject.com/en/4.1/releases/4.1/
https://docs.djangoproject.com/en/4.0/releases/4.0/

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2023-10-05 20:04:38 -07:00
Tim Orling
b4d9c92d5d requirements: bump django-simple-captcha to 0.5.20
https://raw.githubusercontent.com/mbi/django-simple-captcha/master/CHANGES

Version 0.5.20
--------------
* Still support Django 3.2 (#222, thanks @petrklus)

Version 0.5.19
--------------
* SECURITY ISSUE: reset the random seed after an image was generated (#221, thanks @ibuler)

Version 0.5.18
--------------
* Fix some typos in documentation (#210, thanks @stweil)
* Test against Django 4.2
* Stopped testing Django < 3.2
* BaseCaptchaTextInput should set autocomplete=off on the hashkey HiddenInput (#201, thanks @eerotal)
* Test against Django 4.2a
* Fix some deprecation warnings in Pillow 9.2+
* Removed old unused conditional imports
* Format code with pre-commit and black

Version 0.5.17
--------------
* English translation created from Spanish ones (#209, thanks @tpazderka)

Version 0.5.16
--------------
* Adds a migration missing from 0.5.15 (#208, thanks @atodorov)

Version 0.5.15
--------------
* Updated test matrix, drop tests against Python3.6, test against Python3.9
* Remove dependency on six
* Test against Django 4.0a1
* Test with Python 3.10 (Django 3.2 and Django 4.0)
* Remove warning for django 3.2 (#206, thanks @MiStErLu)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2023-10-05 19:28:35 -07:00
dependabot[bot]
d447eb7e45 build(deps): bump pillow from 9.3.0 to 10.0.1
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.3.0 to 10.0.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.3.0...10.0.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2023-10-05 17:57:38 -07:00
Tim Orling
a2e23f1e20 build(deps): bump gitpython from 3.1.32 to 3.1.37
This release contains another security fix that further improves validation
of symbolic references and thus properly fixes this CVE:
https://github.com/advisories/GHSA-cwvm-v4w8-q58c (CVE-2023-41040).

https://github.com/gitpython-developers/GitPython/blob/main/doc/source/changes.rst

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2023-09-29 08:06:53 -07:00
dependabot[bot]
a3a5a209a4 build(deps): bump gitpython from 3.1.30 to 3.1.32
Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.30 to 3.1.32.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](https://github.com/gitpython-developers/GitPython/compare/3.1.30...3.1.32)

---
updated-dependencies:
- dependency-name: gitpython
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2023-08-25 13:08:00 -07:00
dependabot[bot]
6b56e5c067 build(deps): bump pillow from 9.2.0 to 9.3.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.2.0 to 9.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.2.0...9.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2023-08-25 13:08:00 -07:00
Chee Yang Lee
7e6854335a requirements.txt: bump gitpython and pillow
bump gitpython and pillow to version with fixes for these CVEs

pillow: CVE-2022-22817 CVE-2022-24303 CVE-2022-45198

gitpython: CVE-2022-24439

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
2023-08-25 13:08:00 -07:00
Tim Orling
f074aece70 requirements.txt: bump all to latest
Run pip-upgrade and update all to latest

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-13 21:16:46 -08:00
Tim Orling
314d29deda requirements.txt: bump to Django 3.2 LTS
Upgrade to the latest Django 3.2.x LTS for
extended support up until April 2024.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-13 20:59:31 -08:00
Tim Orling
08d7f96e10 requirements.txt: update all to latest
Since we are on a "modern" version of Python in
Debian buster container (3.7) and a modern version
of Django (3.1.x) we should be able to run with
the latest of all dependencies.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-13 20:59:22 -08:00
Tim Orling
49b41802e4 requirements.txt: bump to Django 3.1
Another incremental upgrade towards 3.2 LTS

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-13 20:59:02 -08:00
Tim Orling
a027959343 Updates for Django 3.0
* Update requirements.txt versions
  - Mostly update to latest pre-Django 3.1 versions
* Fix deprecated axes.backends.AxesModelBackend
  - settings.py
  - docker/settings.py
* Fix template syntax 'staticfiles' -> 'static'
  - base.html
* Add migrations for layerbranch classicrecipe

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-13 20:58:52 -08:00
Tim Orling
094c89bc70 requirements.txt: bump to Django 3.0
Incremental upgrade towards 3.2 LTS version.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-13 20:58:40 -08:00
Paul Eggleton
848ca10920 requirements.txt: set proper version restriction for Django
Without a comma, pip3 will currently install Django 4.0 which does not
work.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.microsoft.com>
2021-10-20 10:02:46 +13:00
Amber Elliot
6c2f153784 requirements.txt: Updating Django requirement to the 2.2 LTS release.
Signed-off-by: Amber Elliot <amber.n.elliot@intel.com>
Signed-off-by: Paul Eggleton <bluelightning@bluelightning.org>
2020-06-30 05:37:09 +12:00
Paul Eggleton
8e3cbb7038 requirements.txt: bump Django version to fix CVE-2019-19844
Fixes a vulnerability in the password reset process due to
insufficiently stringent validation of unicode email addresses.

https://www.djangoproject.com/weblog/2019/dec/18/security-releases/
https://nvd.nist.gov/vuln/detail/CVE-2019-19844

(The existing version specification would have selected the fixed
version of Django already for new installs, but bumping the minimum
ensures that it will be installed for upgrades with
./dockersetup.py -u as well.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-12-20 10:29:11 +13:00
Paul Eggleton
50fc6780e0 requirements.txt: bump a couple more versions
Update pytz and beautifulsoup4.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-10-29 10:22:59 +13:00
Paul Eggleton
69578c31e4 requirements.txt: update to fix CVE-2019-16865
Update Pillow version to incorporate a fix for a denial-of-service
vulnerability (which should not affect this application however, as it
does not use Pillow to process external images):

  https://nvd.nist.gov/vuln/detail/CVE-2019-16865

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-10-29 10:22:50 +13:00
Paul Eggleton
003c816417 requirements.txt: update
* Bump a few versions where we can
* Drop anyjson - this used to be a dependency of kombu but not anymore,
  and nothing else needs it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-10-02 14:27:58 +13:00
Paul Eggleton
8a4dd12ae3 requirements.txt: update pillow
This is the only dependency we can update right now; the rest will cause
problems given that the layer index needs python 2 support still.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:04 +12:00
Paul Eggleton
190a97fda4 requirements.txt: update
Update to latest versions; as per last update we skip django-reversion
and django-axes. (Now however I've realised that django-axes > 4.5.4
probably isn't found within the container because in my development
setup, pip == pip3 whereas in the container pip is the Python 2 version.
For now let's stick with something that we can still use with the layer
index that still requires Python 2).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:04 +12:00
Paul Eggleton
f527692c7c Replace custom pagination with django-bootstrap-pagination
Simplify things a bit. We lose the digg-style pagination but the new
behaviour is good enough and improves maintainability.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:04 +12:00
Paul Eggleton
2ee1613363 requirements.txt: update versions
Update to the latest versions, with the exception of django-reversion
which I suspect will trigger some regressions; plus django-axes which
for some reason pip did not want to fetch 5.x versions of within the
container.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:04 +12:00
Amber Elliot
ecd584f609 requirements.txt: Require secure version of Django.
Change minimum required version of Django to 1.11.11.

Signed-off-by: Amber Elliot <amber.n.elliot@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-07-17 11:31:01 +12:00
Amber Elliot
0f3b3e42a6 Upgrade django-registration to version 3.0.
This involves changing how registration templates are referenced
and how the activation email is sent on user's email address change.

Signed-off-by: Amber Elliot <amber.n.elliot@intel.com>
2019-07-17 11:30:56 +12:00
Paul Eggleton
61dd9527ba requirements.txt: bump versions
Upgrade everything with the exception of django-registration 3.0 and
django-reversion 3.0.x which both require some work to migrate to.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-19 16:44:42 +13:00
Paul Eggleton
476348a598 requirements.txt: update GitPython dependencies
Upgrade GitPython and trim out old dependencies: gitdb and smmap are no
longer needed by current GitPython, gitdb2 and smmap2 have replaced
them.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-06 13:58:07 +13:00
Paul Eggleton
dff454815f Use django-axes to lockout after multiple failed logins
Repeated failed login attempts should trigger lockout to prevent
brute-forcing and user enumeration - django-axes does this using account
and IP-based lockout.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-06 13:58:03 +13:00
Paul Eggleton
631116a1c4 Replace nvd3 with Chart.js
nvd3 and its python/django wrappers appear to be no longer actively
maintained, and at least the wrappers were a bit clunky to use. Looking
around for a suitable replacement, Chart.js seems capable, has no
additional dependencies and is fairly simple to use. As a bonus we get
to drop a few Python dependencies from our list.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-06 10:33:39 +13:00
Paul Eggleton
49981aebf6 Add site-wide notice support
Add the ability to show a notice at the top of every page; this provides
the ability for admins to display a message to visitors in the case of
infrastructure or index data issues. Notices can have an expiry date and
can be disabled and re-enabled if needed. A subset of HTML can be used
for formatting the text, URLs will be made into clickable links, and
four "levels" are supported (info, success, warning and error).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-07-09 13:50:15 +02:00
Paul Eggleton
227b9c65af rrs_upstream_email: rework
* Use maintenance plans to get layerbranches
* Use from/to/subject and admin contact from maintenance plan
* Use an actual template to render the email (and drop tabulate
  dependency)
* Improve grammar in the email text
* Use a single line to represent the most recent commit

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Aníbal Limón
12d6909a70 requirements: Add tabular.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Paul Eggleton
97bb82225a requirements.txt: fix some conflicting requirements
pip (strangely only in the python 2 version when I test it here) reports
that some of the versions in requirements.txt were incompatible:

django-nvd3 0.9.7 has requirement python-nvd3==0.14.2, but you'll have
python-nvd3 0.15.0 which is incompatible.
django-registration 2.4.1 has requirement confusable-homoglyphs~=3.0,
but you'll have confusable-homoglyphs 2.0.2 which is incompatible.
python-nvd3 0.14.2 has requirement python-slugify==1.1.4, but you'll
have python-slugify 1.2.5 which is incompatible.

I'm not particularly keen on downgrading these but it seems like we
don't have much choice. Luckily looking over the changelogs it doesn't
seem like that will cause us any problems though.

Thanks to Yi Zhao <yi.zhao@windriver.com> for pointing this out.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:52:51 +12:00
Paul Eggleton
b4cfb049d9 requirements.txt: bump Django and other dependency versions
Since Django 1.8 is now out of support, and we've cleaned up the issues,
bump the Django requirement to 1.11 and update other dependencies at the
same time.

Fixes [YOCTO #12696] (requires preceding commits)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-01 10:10:21 +12:00
Paul Eggleton
611c96883c requirements.txt: use the most recent Django 1.8 version
Use <1.9 to always get the most recent 1.8 point release.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-03-26 08:29:27 +13:00
Paul Eggleton
1aeb5bbb57 requirements.txt: update some dependency versions
Use latest tested versions (though we pin djangorestframework at 3.6.4
since that is the last version that supports Django 1.8), and add new
resulting dependencies.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-02-20 16:45:54 +13:00
Paul Eggleton
64a34a98c0 requirements.txt: add missing dependencies
These are dependencies of items already listed in requirements.txt, so
nothing new.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-02-20 16:45:54 +13:00
Diana Thayer
2e671480c7 Asynchronous email notifications, task execution
This patch adds asynchronous task execution using a Celery backend
and RabbitMQ task queue, so that the layer submission process to
proceed even in the event that sending the notification email fails,
and establishing an asynchronous execution mechanism that we can use
in the future e.g. for triggering parse operations from the web UI.
This pertains to bug 11197:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=11197

It updates the README to reflect the installation and configuration
of a basic RabbitMQ setup, adds a 'tasks.py' file to contain task
definitions, updates the 'edit_layer_view' function to send
emails to administrators about new and updated layers asynchronously,
modifies the 'settings.py' to include a default configuration
for a RabbitMQ connection, and updates the Dockerfile to start a Celery
worker alongside the Gunicorn daemon.

Fixes [YOCTO #11197].

Signed-off-by: Diana Thayer <garbados@gmail.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-09-01 16:59:43 +12:00
Paul Eggleton
072c7d6656 requirements.txt: update to latest tested Django version
I neglected to update this at the time I updated the README recently.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-01-16 13:08:18 +13:00