Skip to content

Commit d010363

Browse files
Merge remote-tracking branch 'upstream/main' into docker
2 parents ff14217 + a5056ff commit d010363

10 files changed

Lines changed: 72 additions & 34 deletions

File tree

.github/workflows/create-release-and-upload-assets.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ jobs:
1919
version: ${{ steps.set-vars.outputs.version }}
2020
rpm_version: ${{ steps.set-vars.outputs.rpm_version }}
2121
is_prerelease: ${{ steps.set-vars.outputs.is_prerelease }}
22+
target_branch: ${{ steps.set-vars.outputs.target_branch }}
2223
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
2327
- id: set-vars
2428
run: |
2529
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
@@ -35,10 +39,20 @@ jobs:
3539
else
3640
IS_PRERELEASE=false
3741
fi
42+
# Detect target branch: if tag version matches VERSION.txt, use main
43+
# otherwise use stable-X.Y branch for backport releases
44+
MAJOR_MINOR=$(echo "$VERSION" | grep -oP '^\d+\.\d+')
45+
CURRENT=$(cat VERSION.txt | grep -oP '^\d+\.\d+')
46+
if [[ "$MAJOR_MINOR" == "$CURRENT" ]]; then
47+
TARGET_BRANCH="main"
48+
else
49+
TARGET_BRANCH="stable-${MAJOR_MINOR}"
50+
fi
3851
echo "version=${VERSION}" >> $GITHUB_OUTPUT
3952
echo "rpm_version=${RPM_VERSION}" >> $GITHUB_OUTPUT
4053
echo "is_prerelease=${IS_PRERELEASE}" >> $GITHUB_OUTPUT
41-
echo "Version: $VERSION, RPM Version: $RPM_VERSION, Pre-release: $IS_PRERELEASE"
54+
echo "target_branch=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
55+
echo "Version: $VERSION, RPM Version: $RPM_VERSION, Pre-release: $IS_PRERELEASE, Target: $TARGET_BRANCH"
4256
4357
create-release:
4458
needs: setup
@@ -69,7 +83,7 @@ jobs:
6983
- uses: actions/checkout@v4
7084
with:
7185
fetch-depth: 0
72-
ref: main
86+
ref: ${{ needs.setup.outputs.target_branch }}
7387
- name: git fetch --all
7488
run: |
7589
git fetch --all
@@ -91,7 +105,7 @@ jobs:
91105
echo "${{ needs.setup.outputs.version }}" > VERSION.txt
92106
git add VERSION.txt
93107
git diff --quiet && git diff --staged --quiet || git commit -m "${COMMIT_MSG}"
94-
git push origin main
108+
git push origin ${{ needs.setup.outputs.target_branch }}
95109
- name: Update debian changelog
96110
env:
97111
EMAIL: furlongm@gmail.com
@@ -101,7 +115,7 @@ jobs:
101115
skip-checks: true
102116
run: |
103117
gbp dch --new-version=${{ needs.setup.outputs.version }}-1 --release --distribution=stable --spawn-editor=never --commit --commit-msg="${COMMIT_MSG}"
104-
git push origin main
118+
git push origin ${{ needs.setup.outputs.target_branch }}
105119
106120
build-and-upload-deb-assets:
107121
needs: [setup, create-release, update-version-and-changelog]
@@ -123,8 +137,8 @@ jobs:
123137
- uses: actions/checkout@v4
124138
with:
125139
fetch-depth: 0
126-
# For stable releases, use main (has updated changelog); for pre-releases, use the tag
127-
ref: ${{ needs.setup.outputs.is_prerelease == 'false' && 'main' || github.ref }}
140+
# For stable releases, use target branch (has updated changelog); for pre-releases, use the tag
141+
ref: ${{ needs.setup.outputs.is_prerelease == 'false' && needs.setup.outputs.target_branch || github.ref }}
128142
- name: git fetch --all
129143
run: |
130144
git config --global --add safe.directory /__w/patchman/patchman
@@ -151,7 +165,7 @@ jobs:
151165
EMAIL: furlongm@gmail.com
152166
VERSION: ${{ needs.setup.outputs.version }}
153167
run: |
154-
# VERSION.txt and changelog already updated on main by update-version-and-changelog job
168+
# VERSION.txt and changelog already updated on target branch by update-version-and-changelog job
155169
# Recreate tag to include those commits
156170
git tag --delete v${VERSION}
157171
git tag v${VERSION}
@@ -181,7 +195,7 @@ jobs:
181195
- uses: actions/checkout@v4
182196
with:
183197
fetch-depth: 0
184-
ref: ${{ needs.setup.outputs.is_prerelease == 'false' && 'main' || github.ref }}
198+
ref: ${{ needs.setup.outputs.is_prerelease == 'false' && needs.setup.outputs.target_branch || github.ref }}
185199
- name: git fetch --all
186200
run: |
187201
git config --global --add safe.directory /__w/patchman/patchman

INSTALL.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ mysql or postgresql instead, see the database configuration section.
77
## Supported Server Installation Options
88
- [Ubuntu 24.04](#ubuntu-2404-noble)
99
- [Debian 13](#debian-13-trixie)
10-
- [Rocky 10](#rocky-10)
10+
- [Rocky/Alma/RHEL](#rockyalmarhel)
1111
- [virtualenv + pip](#virtualenv--pip)
1212
- [Source](#source)
1313

1414

1515
### Ubuntu 24.04 (noble)
1616

1717
```shell
18-
curl -sS https://repo.openbytes.ie/openbytes.gpg > /usr/share/keyrings/openbytes.gpg
18+
curl -sS https://repo.openbytes.ie/openbytes-1.gpg > /usr/share/keyrings/openbytes.gpg
1919
echo "deb [signed-by=/usr/share/keyrings/openbytes.gpg] https://repo.openbytes.ie/patchman/ubuntu noble-backports main" > /etc/apt/sources.list.d/patchman.list
2020
apt update
2121
apt -y install python3-patchman patchman-client
@@ -25,26 +25,26 @@ patchman-manage createsuperuser
2525
### Debian 13 (trixie)
2626

2727
```shell
28-
curl -sS https://repo.openbytes.ie/openbytes.gpg > /usr/share/keyrings/openbytes.gpg
28+
curl -sS https://repo.openbytes.ie/openbytes-1.gpg > /usr/share/keyrings/openbytes.gpg
2929
echo "deb [signed-by=/usr/share/keyrings/openbytes.gpg] https://repo.openbytes.ie/patchman/debian trixie main" > /etc/apt/sources.list.d/patchman.list
3030
apt update
3131
apt -y install python3-patchman patchman-client
3232
patchman-manage createsuperuser
3333
```
3434

35-
### Rocky 10
35+
### Rocky/Alma/RHEL
3636

3737
Server installation is currently broken due to missing upstream packages: https://github.com/furlongm/patchman/issues/669
3838
Client installation should work as expected.
3939

40-
This also applies to Alma, RHEL, etc.
4140

4241
```shell
43-
curl -sS https://repo.openbytes.ie/openbytes-2.gpg > /etc/pki/rpm-gpg/RPM-GPG-KEY-openbytes
42+
# curl -sS https://repo.openbytes.ie/openbytes.gpg > /etc/pki/rpm-gpg/RPM-GPG-KEY-openbytes # rocky/alma/rhel 8/9
43+
curl -sS https://repo.openbytes.ie/openbytes-1.gpg > /etc/pki/rpm-gpg/RPM-GPG-KEY-openbytes # rocky/alma/rhel 10
4444
cat <<EOF >> /etc/yum.repos.d/openbytes.repo
4545
[openbytes]
4646
name=openbytes
47-
baseurl=https://repo.openbytes.ie/patchman/el10
47+
baseurl=https://repo.openbytes.ie/patchman/el\$releasever
4848
enabled=1
4949
gpgcheck=1
5050
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-openbytes
@@ -53,15 +53,15 @@ dnf -y install epel-release
5353
dnf makecache
5454
dnf -y install patchman-client
5555
#dnf -y install patchman
56-
systemctl restart httpd
57-
patchman-manage createsuperuser
56+
#systemctl restart httpd
57+
#patchman-manage createsuperuser
5858
```
5959

6060
### virtualenv + pip
6161

6262
```shell
6363
apt -y install python3-venv # (debian/ubuntu)
64-
dnf -y install python3-virtualenv # (rocky/alma/redhat)
64+
dnf -y install python3-virtualenv # (rocky/alma/rhel)
6565
mkdir /srv/patchman
6666
cd /srv/patchman
6767
python3 -m venv .venv
@@ -165,7 +165,7 @@ protocol=2
165165
Or use the `-p 2` command line option:
166166

167167
```shell
168-
$ patchman-client -s http://patchman.example.org -p 2
168+
$ patchman-client -s http://patchman.example.com -p 2
169169
```
170170

171171

@@ -393,14 +393,14 @@ patchman-client
393393
Install Celery for realtime processing of reports from clients and for periodic
394394
maintenance tasks. The celery configuation file is in `/etc/patchman/celery.conf`
395395

396-
#### Ubuntu / Debian
396+
#### Debian/Ubuntu
397397

398398
```shell
399399
apt -y install python3-celery redis python3-redis python-celery-common
400400
/usr/bin/celery --broker redis://127.0.0.1:6379/0 --app patchman worker --loglevel info --beat --scheduler django_celery_beat.schedulers:DatabaseScheduler --task-events --pool threads
401401
```
402402

403-
#### Rocky / Alma / RHEL
403+
#### Rocky/Alma/RHEL
404404

405405
Currently waiting on https://bugzilla.redhat.com/show_bug.cgi?id=2032543
406406

@@ -434,8 +434,9 @@ Install Redis:
434434

435435
```shell
436436
apt -y install redis python3-redis # (debian/ubuntu)
437-
dnf -y install redis python3-redis # (rocky/alma/redhat)
438-
systemctl restart redis/redis-server
437+
dnf -y install redis python3-redis # (rocky/alma/rhel)
438+
systemctl restart redis-server # (debian/ubuntu)
439+
systemctl restart redis # (rocky/alma/rhel)
439440
```
440441

441442
and add the following to `/etc/patchman/local_settings.py`
@@ -450,13 +451,13 @@ CACHES = {
450451
}
451452
```
452453

453-
#### Memcacached
454+
#### Memcached
454455

455456
Install Memcached
456457

457458
```shell
458459
apt -y install memcached python3-pymemcache # (debian/ubuntu)
459-
dnf -y install memcached python3-pymemcache # (rocky/alma/redhat)
460+
dnf -y install memcached python3-pymemcache # (rocky/alma/rhel)
460461
systemctl restart memcached
461462
```
462463

@@ -522,7 +523,7 @@ api_key=abc123...
522523
Or use the `-k` command line option:
523524

524525
```shell
525-
$ patchman-client -s http://patchman.example.org -p 2 -k abc123...
526+
$ patchman-client -s http://patchman.example.com -p 2 -k abc123...
526527
```
527528

528529

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.20
1+
4.0.21

debian/changelog

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
patchman (4.0.21-1) stable; urgency=medium
2+
3+
[ dependabot[bot] ]
4+
* Bump gitpython from 3.1.47 to 3.1.49
5+
6+
[ Marcus Furlong ]
7+
* use gpg file with both keys on all distros
8+
* handle backported stable releases
9+
10+
[ dependabot[bot] ]
11+
* Bump gitpython from 3.1.49 to 3.1.50
12+
* update installation docs
13+
* fix tz and local_settings getting overwritten
14+
15+
[ Gedminas, Marius ]
16+
* Use underscore names in setup.cfg
17+
* Use SPDX license expression in setup.py
18+
19+
[ Marcus Furlong ]
20+
* auto-commit to update version skip-checks: true
21+
22+
-- Marcus Furlong <furlongm@gmail.com> Fri, 29 May 2026 05:33:43 +0000
23+
124
patchman (4.0.20-1) stable; urgency=medium
225

326
* django 5.2 compatibility updates

debian/python3-patchman.conffiles

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/etc/patchman/local_settings.py

patchman/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
# Internationalization
6767
LANGUAGE_CODE = 'en-us'
68-
TIME_ZONE = 'America/NewYork'
68+
TIME_ZONE = 'UTC'
6969
USE_I18N = True
7070
USE_TZ = True
7171

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ django-filter==25.1
1313
humanize==4.12.1
1414
version-utils==0.3.2
1515
python-magic==0.4.27
16-
gitpython==3.1.47
16+
gitpython==3.1.50
1717
tenacity==8.2.3
1818
celery==5.4.0
1919
redis==6.4.0

scripts/rpm-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ for i in `cat INSTALLED_FILES`; do
1919
done
2020

2121
cat DIRS > INSTALLED_FILES
22-
sed -e '/\/etc\//s|^|%config(noreplace) |' FILES >>INSTALLED_FILES
22+
sed -e '/\/etc\//s|^|%config |' FILES >>INSTALLED_FILES

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[bdist_rpm]
22
doc_files = README.md AUTHORS COPYING INSTALL.md
3-
install-script = scripts/rpm-install.sh
4-
post-install = scripts/rpm-post-install.sh
3+
install_script = scripts/rpm-install.sh
4+
post_install = scripts/rpm-post-install.sh
55
requires = /usr/bin/python3
66
python3-django >= 4.2.20
77
python3-django-taggit

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
author='Marcus Furlong',
6868
author_email='furlongm@gmail.com',
6969
description='Django based patch status monitoring tool for linux systems',
70-
license='GPLv3',
70+
license='GPL-3.0-only',
7171
keywords='django patch status monitoring linux spacewalk patchman',
7272
packages=find_packages(),
7373
install_requires=install_requires,
@@ -84,6 +84,5 @@
8484
'Environment :: Web Environment',
8585
'Framework :: Django',
8686
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
87-
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
8887
],
8988
)

0 commit comments

Comments
 (0)