Skip to content
Merged

fixes #756

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/create-release-and-upload-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set-vars.outputs.version }}
rpm_version: ${{ steps.set-vars.outputs.rpm_version }}
is_prerelease: ${{ steps.set-vars.outputs.is_prerelease }}
steps:
- id: set-vars
Expand All @@ -26,15 +27,18 @@ jobs:
else
VERSION="${GITHUB_REF#refs/tags/v}"
fi
# RPM doesn't allow hyphens in version, convert to dots
RPM_VERSION="${VERSION//-/.}"
# Pre-release if version contains -, e.g. 4.0.9-rc1, 4.0.9-dev1
if [[ "$VERSION" == *-* ]]; then
IS_PRERELEASE=true
else
IS_PRERELEASE=false
fi
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "rpm_version=${RPM_VERSION}" >> $GITHUB_OUTPUT
echo "is_prerelease=${IS_PRERELEASE}" >> $GITHUB_OUTPUT
echo "Version: $VERSION, Pre-release: $IS_PRERELEASE"
echo "Version: $VERSION, RPM Version: $RPM_VERSION, Pre-release: $IS_PRERELEASE"

create-release:
needs: setup
Expand Down Expand Up @@ -182,7 +186,7 @@ jobs:
git fetch --all
- name: Build rpm packages
env:
VERSION: ${{ needs.setup.outputs.version }}
VERSION: ${{ needs.setup.outputs.rpm_version }}
run: |
echo "${VERSION}" > VERSION.txt
python3 setup.py bdist_rpm --python=/usr/bin/python3
Expand All @@ -192,8 +196,8 @@ jobs:
with:
tag_name: v${{ needs.setup.outputs.version }}
files: |
dist/patchman-${{ needs.setup.outputs.version }}-1.noarch.rpm
dist/noarch/patchman-client-${{ needs.setup.outputs.version }}-1.noarch.rpm
dist/patchman-${{ needs.setup.outputs.rpm_version }}-1.noarch.rpm
dist/noarch/patchman-client-${{ needs.setup.outputs.rpm_version }}-1.noarch.rpm
body: ""
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
21 changes: 21 additions & 0 deletions arch/migrations/0002_alter_machinearchitecture_options_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 4.2.28 on 2026-02-11 04:55

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('arch', '0001_initial'),
]

operations = [
migrations.AlterModelOptions(
name='machinearchitecture',
options={'ordering': ['name'], 'verbose_name': 'Machine Architecture'},
),
migrations.AlterModelOptions(
name='packagearchitecture',
options={'ordering': ['name'], 'verbose_name': 'Package Architecture'},
),
]
1 change: 0 additions & 1 deletion debian/python3-patchman.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ if [ "$1" = "configure" ] ; then
mkdir -p /var/lib/patchman/db
patchman-manage collectstatic --noinput

patchman-manage makemigrations
patchman-manage migrate --run-syncdb --fake-initial
sqlite3 /var/lib/patchman/db/patchman.db 'PRAGMA journal_mode=WAL;'

Expand Down
17 changes: 17 additions & 0 deletions domains/migrations/0002_alter_domain_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.28 on 2026-02-11 04:55

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('domains', '0001_initial'),
]

operations = [
migrations.AlterModelOptions(
name='domain',
options={'ordering': ['name']},
),
]
17 changes: 17 additions & 0 deletions hosts/migrations/0010_alter_hostrepo_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.28 on 2026-02-11 04:55

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('hosts', '0009_host_errata'),
]

operations = [
migrations.AlterModelOptions(
name='hostrepo',
options={'ordering': ['host', 'repo']},
),
]
17 changes: 17 additions & 0 deletions packages/migrations/0006_alter_packageupdate_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.28 on 2026-02-11 04:55

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('packages', '0005_alter_package_packagetype'),
]

operations = [
migrations.AlterModelOptions(
name='packageupdate',
options={'ordering': ['oldpackage', 'newpackage']},
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.2.28 on 2026-02-11 04:55

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('repos', '0006_mirror_errata_checksum_mirror_modules_checksum'),
]

operations = [
migrations.AlterModelOptions(
name='mirror',
options={'ordering': ['url'], 'verbose_name_plural': 'Mirrors'},
),
migrations.AlterModelOptions(
name='mirrorpackage',
options={'ordering': ['mirror', 'package']},
),
migrations.AlterModelOptions(
name='repository',
options={'ordering': ['name'], 'verbose_name_plural': 'Repositories'},
),
]
1 change: 0 additions & 1 deletion scripts/rpm-post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ chown apache /etc/patchman/local_settings.py
mkdir -p /var/lib/patchman/db
patchman-manage collectstatic --noinput

patchman-manage makemigrations
patchman-manage migrate --run-syncdb --fake-initial
sqlite3 /var/lib/patchman/db/patchman.db 'PRAGMA journal_mode=WAL;'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 4.2.28 on 2026-02-11 04:55

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('security', '0007_remove_cve_title'),
]

operations = [
migrations.AlterModelOptions(
name='cwe',
options={'ordering': ['cwe_id']},
),
migrations.AlterModelOptions(
name='reference',
options={'ordering': ['ref_type', 'url']},
),
]
2 changes: 1 addition & 1 deletion util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def fetch_content(response, text='', ljust=35):


@retry(
retry=retry_if_exception_type(HTTPError | Timeout | ConnectionResetError),
retry=retry_if_exception_type((HTTPError, Timeout, ConnectionResetError)),
stop=stop_after_attempt(4),
wait=wait_exponential(multiplier=1, min=1, max=10),
reraise=False,
Expand Down