## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Main Django, i.e. whether this is the main Django version in the distribution # that owns /usr/bin/django-admin and other unique paths # based on Python packaging, see e.g. python3.14 %if 0%{?fedora} >= 44 %bcond main_django 1 %else %bcond main_django 0 %endif %if 0%{?python3_version_nodots} >= 314 # some tests currently fail %bcond all_tests 0 %else %bcond all_tests 1 %endif %if %{defined fedora} && 0%{?fedora} == 44 %bcond old_setuptools 1 %else %bcond old_setuptools 0 %endif Version: 6.1.1 %global major_ver %(echo %{version} | cut -d. -f1) Name: python-django%{major_ver} Release: %autorelease Summary: A high-level Python Web framework # Django: BSD-3-Clause # Bundled Python code: PSF-2.0 # Font Awesome font: OFL-1.1 # Font Awesome icons: MIT # jquery, select2, xregexp: MIT # gis/gdal: BSD-3-Clause # gis/geos: BSD-3-Clause License: BSD-3-Clause AND PSF-2.0 AND MIT AND OFL-1.1 URL: https://www.djangoproject.com/ Source: %{pypi_source django} Source: %{name}.rpmlintrc # conditional patches: >= 1000 # revert setuptools requirement back to 77.0.1 for F44 compatibility Patch1001: 0001-Revert-Bumped-minimum-setuptools-version-to-83.patch # This allows to build the package without tests, e.g. when bootstrapping new Python version %bcond tests 1 BuildArch: noarch %global _description %{expand: Django is a high-level Python Web framework that encourages rapid development and a clean, pragmatic design. It focuses on automating as much as possible and adhering to the DRY (Don't Repeat Yourself) principle.} %description %_description %if %{with main_django} %global pkgname python3-django %else %global pkgname python3-django%{major_ver} %endif %package -n %{pkgname}-bash-completion Summary: Bash completion files for Django BuildRequires: bash-completion Requires: bash-completion # Make sure this replaces any other Django bash-completion package Provides: python-django-bash-completion-impl Conflicts: python-django-bash-completion-impl %description -n %{pkgname}-bash-completion This package contains the Bash completion files form Django high-level Python Web framework. %package -n %{pkgname}-doc Summary: Documentation for Django # Font Awesome: CC-BY-4.0, OFL-1.1, MIT License: BSD-3-Clause AND CC-BY-4.0 AND OFL-1.1 AND MIT Suggests: %{pkgname} = %{version}-%{release} BuildRequires: make # Make sure this replaces any other Django doc package Provides: python-django-doc-impl Conflicts: python-django-doc-impl %description -n %{pkgname}-doc This package contains the documentation for the Django high-level Python Web framework. %package -n %{pkgname} Summary: A high-level Python Web framework Recommends: (%{pkgname}-bash-completion = %{version}-%{release} if bash-completion) BuildRequires: python3-devel BuildRequires: python3-asgiref # see django/contrib/admin/static/admin/js/vendor/ Provides: bundled(jquery) = 3.7.1 Provides: bundled(select2) = 4.0.13 Provides: bundled(xregexp) = 5.1.1 # Make sure this replaces any other Django package Provides: python-django-impl Conflicts: python-django-impl %description -n %{pkgname} %_description %prep %autosetup -N -n django-%{version} %autopatch -p1 -M 999 %if %{without all_tests} #autopatch -p1 1000 %endif %if %{with old_setuptools} %autopatch -p1 1001 %endif # hard-code python3 in django-admin pushd django for file in conf/project_template/manage.py-tpl ; do sed -i "s/\/env python/\/python3/" $file ; done popd # Use non optimised psycopg for tests # Not available in Fedora sed -i 's/psycopg\[binary\]>=3\.1\./psycopg>=3.1./' tests/requirements/postgres.txt # Remove unnecessary test BRs sed -i '/^pywatchman\b/d' tests/requirements/py3.txt sed -i '/^selenium\b/d' tests/requirements/py3.txt sed -i '/^tzdata$/d' tests/requirements/py3.txt # Remove deps on code checkers/linters sed -i '/^black\b/d' tests/requirements/py3.txt sed -i '/^black\b/d' docs/requirements.txt sed -i '/^blacken-docs\b/d' docs/requirements.txt %generate_buildrequires %pyproject_buildrequires -r %{?with_tests:tests/requirements/{py3,postgres,mysql,oracle}.txt} docs/requirements.txt %build %pyproject_wheel %install %pyproject_install %pyproject_save_files django # build documentation (cd docs && mkdir djangohtml && mkdir -p _build/{doctrees,html} && make html) mkdir -p %{buildroot}%{_docdir}/python3-django-doc cp -ar docs/_build/html/* %{buildroot}%{_docdir}/python3-django-doc/ # install man pages (for the main executable only) mkdir -p %{buildroot}%{_mandir}/man1/ cp -p docs/man/* %{buildroot}%{_mandir}/man1/ # install bash completion script mkdir -p %{buildroot}%{bash_completions_dir} install -m 0644 -p extras/django_bash_completion \ %{buildroot}%{bash_completions_dir}/django-admin for file in manage.py ; do ln -s django-admin.py %{buildroot}%{bash_completions_dir}/$file done # remove .po files find %{buildroot} -name "*.po" | xargs rm -f sed -i '/.po$/d' %{pyproject_files} %check # many contrib modules assume a configured app, "Requested setting INSTALLED_APPS..." # the rest needs optional dependencies %{pyproject_check_import \ -e 'django.contrib.*' \ -e 'django.core.serializers.pyyaml' \ -e 'django.db.backends.mysql*' \ -e 'django.db.backends.oracle*' \ -e 'django.db.backends.postgresql*'} %if %{with tests} cd %{_builddir}/django-%{version} export PYTHONPATH=$(pwd) cd tests %{python3} runtests.py --settings=test_sqlite --verbosity=2 %endif %files -n %{pkgname}-bash-completion %{bash_completions_dir}/* %files -n %{pkgname}-doc %doc %{_docdir}/python3-django-doc/* %license LICENSE %license %{_docdir}/python3-django-doc/_static/fontawesome/LICENSE.txt %files -n %{pkgname} -f %{pyproject_files} %doc AUTHORS README.rst %license %{python3_sitelib}/django/contrib/admin/static/admin/css/vendor/select2/LICENSE-SELECT2.md %license %{python3_sitelib}/django/contrib/admin/static/admin/js/vendor/jquery/LICENSE.txt %license %{python3_sitelib}/django/contrib/admin/static/admin/js/vendor/select2/LICENSE.md %license %{python3_sitelib}/django/contrib/admin/static/admin/js/vendor/xregexp/LICENSE.txt %license %{python3_sitelib}/django/contrib/gis/gdal/LICENSE %license %{python3_sitelib}/django/contrib/gis/geos/LICENSE %{_bindir}/django-admin %{_mandir}/man1/django-admin.1* %changelog ## START: Generated by rpmautospec * Tue Sep 08 2026 Michel Lind - 6.1.1-2 - Conditionally revert unneeded setuptools bump when building for F44 - update declared versions of bundled JS files * Tue Sep 08 2026 Michel Lind - 6.1.1-1 - Update to version 6.1.1; Resolves RHBZ#2484355 - CVE fixes from 6.0.8 - Fixes CVE-2026-15307 [high]: Server-side file-write and request forgery via spatial lookups - Fixes CVE-2026-15830 [moderate]: Potential denial-of-service vulnerability via nested geometry collections - Fixes CVE-2026-15920 [moderate]: Potential cross-site scripting via URLField values in the admin - CVE fixes from 6.0.7 [low] - Fixes CVE-2026-48588: Potential exposure of private data via cached Set- Cookie response - Fixes CVE-2026-53877: Heap buffer over-read in GDALRaster - Fixes CVE-2026-53878: Header injection possibility since DomainNameValidator accepted newlines in input - CVE fixes from 6.0.6 [low] - Fixes CVE-2026-6873: Signed cookie salt namespace collision - Fixes CVE-2026-7666: Potential unencrypted email transmission via STARTTLS in the SMTP backend - Fixes CVE-2026-8404: Potential exposure of private data via case- sensitive Cache-Control directives - Fixes CVE-2026-35193: Potential exposure of private data via missing Vary: Authorization - Fixes CVE-2026-48587: Potential exposure of private data via whitespace padding in Vary header * Thu Jul 16 2026 Fedora Release Engineering - 6.0.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild * Fri Jun 05 2026 Python Maint - 6.0.5-3 - Rebuilt for Python 3.15 * Thu Jun 04 2026 Python Maint - 6.0.5-2 - Bootstrap for Python 3.15 * Tue May 12 2026 Michel Lind - 6.0.5-1 - Update to version 6.0.5; Resolves RHBZ#2444118 - Fixes CVE-2026-5766: Potential denial-of-service vulnerability in ASGI requests via file upload limit bypass - Fixes CVE-2026-35192: Session fixation via public cached pages and SESSION_SAVE_EVERY_REQUEST - Fixes CVE-2026-6907: Potential exposure of private data due to incorrect handling of Vary: * in UpdateCacheMiddleware - Fixes CVE-2026-3902: ASGI header spoofing via underscore/hyphen conflation - Fixes CVE-2026-4277: Privilege abuse in GenericInlineModelAdmin - Fixes CVE-2026-4292: Privilege abuse in ModelAdmin.list_editable - Fixes CVE-2026-33033: Potential denial-of-service vulnerability in MultiPartParser via base64-encoded file upload - Fixes CVE-2026-33034: Potential denial-of-service vulnerability in ASGI requests via memory upload limit bypass - Fixes CVE-2026-25674: Potential incorrect permissions on newly created file system objects * Thu Feb 19 2026 Michel Lind - 6.0.2-1 - Initial package; Resolves: RHBZ#2440421 ## END: Generated by rpmautospec