8 Commits

Author SHA1 Message Date
498f565866 Merge upstream changes
All checks were successful
Github-Actions / build (push) Successful in 47s
Docker Image CI / build (push) Successful in 4m38s
2024-08-08 09:29:45 -05:00
60ef0b9766 fix mangled hardcoded protocol 2024-08-08 09:28:36 -05:00
Jelle van der Waa
59ef2de085 packages: handle a package with 0 dependencies
Some checks failed
Github-Actions / build (push) Failing after 10s
2024-08-08 11:31:40 +02:00
dependabot[bot]
b3f923d5f4 build(deps): bump django from 5.0.7 to 5.0.8
Bumps [django](https://github.com/django/django) from 5.0.7 to 5.0.8.
- [Commits](https://github.com/django/django/compare/5.0.7...5.0.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 11:21:31 +02:00
e83a93055a update actions
All checks were successful
Github-Actions / build (push) Successful in 52s
Docker Image CI / build (push) Successful in 3m54s
2024-08-02 00:05:48 -05:00
98bdc48716 force https in opensearch xml
All checks were successful
Github-Actions / build (push) Successful in 56s
Docker Image CI / build (push) Successful in 4m27s
2024-08-01 22:54:28 -05:00
Jelle van der Waa
31333d3516 devel: logout is a POST only action since Django 5.0
We can no longer logout with a GET and as folks probably don't want to
depend on JavaScript for logging out, add a form and style the input as
an anchor to make POST'ing work.

Closes: #511
2024-07-29 21:02:29 +02:00
Jelle van der Waa
f8995eb72e releng: cache the torrent urls 2024-07-29 21:02:14 +02:00
8 changed files with 41 additions and 11 deletions

View File

@@ -37,15 +37,15 @@ jobs:
- name: Set up docker
run: curl -fsSL https://get.docker.com | sh
- name: Set up QEMU
uses: https://github.com/docker/setup-qemu-action@v2
uses: https://github.com/docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: https://github.com/docker/setup-buildx-action@v2
uses: https://github.com/docker/setup-buildx-action@v3
with:
install: true
- name: Log in to the Container registry
uses: https://github.com/docker/login-action@v2
uses: https://github.com/docker/login-action@v3
if: startsWith(gitea.ref, 'refs/tags/v')
with:
registry: ${{ env.REGISTRY }}
@@ -53,7 +53,7 @@ jobs:
password: ${{ secrets.PAT }}
- name: Log in to the Docker Hub
uses: https://github.com/docker/login-action@v2
uses: https://github.com/docker/login-action@v3
if: startsWith(gitea.ref, 'refs/tags/v')
with:
registry: ${{ env.DH_REGISTRY }}
@@ -94,7 +94,7 @@ jobs:
- name: Build and push release Docker image
if: startsWith(gitea.ref, 'refs/tags/v')
uses: https://github.com/docker/build-push-action@v4
uses: https://github.com/docker/build-push-action@v5
with:
file: Dockerfile
target: deploy
@@ -106,7 +106,7 @@ jobs:
- name: Build develop Docker image
if: "!startsWith(gitea.ref, 'refs/tags/v')"
uses: https://github.com/docker/build-push-action@v4
uses: https://github.com/docker/build-push-action@v5
with:
file: Dockerfile
target: deploy

View File

@@ -10,6 +10,7 @@ version: '2'
# docker compose run --rm packages_web python manage.py generate_keyring pgp.surfnet.nl ./config/keyring
# docker compose run --rm packages_web python manage.py pgp_import ./config/keyring
## go to /admin/devel/developerkey/ and set the owner (and parent) for the ownerless key
## go to /admin/sites/site/1/change/ and set the domain
services:

View File

@@ -21,7 +21,7 @@ from ..utils import get_wrong_permissions, multilib_differences
@require_safe
@cache_control(public=True, max_age=86400)
def opensearch(request):
domain = "%s://%s" % (request.scheme, request.META.get('HTTP_HOST'))
domain = "%s://%s" % ('https', request.META.get('HTTP_HOST'))
return render(request, 'packages/opensearch.xml',
{'domain': domain},

View File

@@ -1,5 +1,6 @@
from django.conf.urls import include
from django.urls import path, re_path
from django.views.decorators.cache import cache_page
from releng import views
@@ -8,8 +9,8 @@ from .views import ReleaseDetailView, ReleaseListView
releases_patterns = [
path('', ReleaseListView.as_view(), name='releng-release-list'),
path('json/', views.releases_json, name='releng-release-list-json'),
re_path(r'^(?P<version>[-.\w]+)/$', ReleaseDetailView.as_view(), name='releng-release-detail'),
re_path(r'^(?P<version>[-.\w]+)/torrent/$', views.release_torrent, name='releng-release-torrent'),
re_path(r'^(?P<version>[-.\w]+)/$', cache_page(311)(ReleaseDetailView.as_view()), name='releng-release-detail'),
re_path(r'^(?P<version>[-.\w]+)/torrent/$', cache_page(311)(views.release_torrent), name='releng-release-torrent'),
]
netboot_patterns = [

View File

@@ -1,5 +1,5 @@
-e git+https://github.com/fredj/cssmin.git@master#egg=cssmin
Django==5.0.7
Django==5.0.8
IPy==1.1
Markdown==3.3.7
bencode.py==4.0.0

View File

@@ -1197,3 +1197,24 @@ ul.signoff-list {
.pgp-key-ids {
display: inline-block;
}
.logout-form {
display: inline-block;
/* style input as a normal anchor */
input {
background: none!important;
border: none;
padding: 0!important;
/*optional*/
font-family: arial, sans-serif;
font-size: 0.9em;
/*input has OS specific font-family*/
color: #07b;
}
input:hover {
text-decoration: underline;
cursor: pointer;
}
}

View File

@@ -59,7 +59,11 @@
{% if user|in_groups:'Developers:Package Maintainers:Support Staff' %}
<li><a href="/devel/tier0mirror/" title="Your Tier 0 Mirror information">Tier0 mirror</a></li>
{% endif %}
<li><a href="/logout/" title="Logout of the developer interface">Logout</a></li>
<li>
<form class="logout-form" method="post" action="/logout/">{% csrf_token %}
<input type="submit" title="Logout of the developer interface" value="Logout"/>
</form>
</li>
</ul>
{% endif %}
</div>

View File

@@ -85,6 +85,9 @@ function collapseDependsList(list) {
// enough items, or the link already exists.
const limit = 20;
const elem = document.querySelector(list);
if (!elem)
return;
const linkid = elem.getAttribute('id') + 'link';
const items = Array.from(elem.querySelectorAll('li')).slice(limit);