diff --git a/.cirrus.yml b/.cirrus.yml index 0b99935113..93103c7e38 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -22,15 +22,15 @@ env: UBUNTU_PROJECT: "ubuntu-os-cloud" # Images exist on GCP already - CENTOS_9_IMAGE_NAME: "centos-stream-9-v20221102" - CENTOS_8_IMAGE_NAME: "centos-stream-8-v20230306" - DEBIAN_IMAGE_NAME: "debian-11-bullseye-v20230306" + CENTOS_9_IMAGE_NAME: "centos-stream-9-v20230809" + CENTOS_8_IMAGE_NAME: "centos-stream-8-v20230809" + DEBIAN_IMAGE_NAME: "debian-11-bullseye-v20230809" FEDORA_IMAGE_NAME: "fedora-cloud-base-gcp-38-1-6-x86-64" FEDORA_PRIOR_IMAGE_NAME: "fedora-cloud-base-gcp-37-1-7-x86-64" - UBUNTU_IMAGE_NAME: "ubuntu-2204-jammy-v20230302" - UBUNTU_PRIOR_IMAGE_NAME: "ubuntu-2004-focal-v20230302" - UBUNTU_PRIOR2_IMAGE_NAME: "ubuntu-1804-bionic-v20230324" - UBUNTU_SNAP_IMAGE_NAME: "ubuntu-2204-jammy-v20230302" + UBUNTU_IMAGE_NAME: "ubuntu-2204-jammy-v20230727" + UBUNTU_PRIOR_IMAGE_NAME: "ubuntu-2004-focal-v20230724" + UBUNTU_PRIOR2_IMAGE_NAME: "ubuntu-1804-bionic-v20230605" + UBUNTU_SNAP_IMAGE_NAME: "ubuntu-2204-jammy-v20230727" # Curl-command prefix for downloading task artifacts, simply add the # the url-encoded task name, artifact name, and path as a suffix. diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml index e68908355c..d7d8935232 100644 --- a/.github/workflows/snap.yaml +++ b/.github/workflows/snap.yaml @@ -3,10 +3,13 @@ on: push: branches: - main + release: + types: + - published jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 concurrency: group: snap-build cancel-in-progress: true @@ -25,8 +28,16 @@ jobs: - run: | sudo sos help - uses: snapcore/action-publish@v1 + if: ${{ github.event_name == 'push' }} env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }} with: snap: ${{ steps.build-snap.outputs.snap }} release: "latest/edge" + - uses: snapcore/action-publish@v1 + if: ${{ github.event_name == 'release' }} + env: + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }} + with: + snap: ${{ steps.build-snap.outputs.snap }} + release: "latest/candidate" diff --git a/README.md b/README.md index 7b1ec811dd..70db0b6394 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[![Build Status](https://api.cirrus-ci.com/github/sosreport/sos.svg?branch=main)](https://cirrus-ci.com/github/sosreport/sos) [![Documentation Status](https://readthedocs.org/projects/sos/badge/?version=main)](https://sos.readthedocs.io/en/main/?badge=main) +[![Build Status](https://api.cirrus-ci.com/github/sosreport/sos.svg?branch=main)](https://cirrus-ci.com/github/sosreport/sos) [![Documentation Status](https://readthedocs.org/projects/sos/badge/?version=main)](https://sos.readthedocs.io/en/main/?badge=main) [![sosreport](https://snapcraft.io/sosreport/badge.svg)](https://snapcraft.io/sosreport) + # SoS @@ -147,6 +148,12 @@ Ubuntu (14.04 LTS and above) users install via apt: ``` # sudo apt install sosreport +``` + +### Snap Installation + +``` +# snap install sosreport --classic ``` [0]: https://github.com/sosreport/sos/wiki/Contribution-Guidelines diff --git a/docs/conf.py b/docs/conf.py index c501ececee..926dd91960 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -59,9 +59,9 @@ # built documents. # # The short X.Y version. -version = '4.5.5' +version = '4.5.6' # The full version, including alpha/beta/rc tags. -release = '4.5.5' +release = '4.5.6' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/man/en/sos-clean.1 b/man/en/sos-clean.1 index e8506eeb0a..c51f327629 100644 --- a/man/en/sos-clean.1 +++ b/man/en/sos-clean.1 @@ -135,7 +135,7 @@ on the system from a previous execution. .SH MAINTAINER .nf -Jake Hunsaker +Maintained on GitHub at https://github.com/sosreport/sos .fi .SH AUTHORS & CONTRIBUTORS See \fBAUTHORS\fR file in the package documentation. diff --git a/man/en/sos-collect.1 b/man/en/sos-collect.1 index 7f6bd450ec..7ef0571881 100644 --- a/man/en/sos-collect.1 +++ b/man/en/sos-collect.1 @@ -395,4 +395,8 @@ Sosreport option. Override the default compression type. .BR sos.conf (5) .SH MAINTAINER - Jake Hunsaker +.nf +Maintained on GitHub at https://github.com/sosreport/sos +.fi +.SH AUTHORS & CONTRIBUTORS +See \fBAUTHORS\fR file in the package documentation. diff --git a/man/en/sos-report.1 b/man/en/sos-report.1 index c4859b8fea..4aa60a37f5 100644 --- a/man/en/sos-report.1 +++ b/man/en/sos-report.1 @@ -494,7 +494,7 @@ Display usage message. .SH MAINTAINER .nf -Jake Hunsaker +Maintained on GitHub at https://github.com/sosreport/sos .fi .SH AUTHORS & CONTRIBUTORS See \fBAUTHORS\fR file in the package documentation. diff --git a/man/en/sos.1 b/man/en/sos.1 index 2d5a972145..b4396fdcb7 100644 --- a/man/en/sos.1 +++ b/man/en/sos.1 @@ -165,7 +165,7 @@ Display usage message. .BR sos.conf (5) .SH MAINTAINER .nf -Jake Hunsaker +Maintained on GitHub at https://github.com/sosreport/sos .fi .SH AUTHORS & CONTRIBUTORS See \fBAUTHORS\fR file in the package documentation. diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 94f427c2a1..dc3b43e2dc 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -26,6 +26,7 @@ parts: - python3 - snapcraft - gettext + - python3-venv stage-packages: - python3.10-minimal - libpython3.10-minimal diff --git a/sos.spec b/sos.spec index 9ad95535b6..8c84b6e2f3 100644 --- a/sos.spec +++ b/sos.spec @@ -1,6 +1,6 @@ Summary: A set of tools to gather troubleshooting information from a system Name: sos -Version: 4.5.5 +Version: 4.5.6 Release: 1%{?dist} Source0: https://github.com/sosreport/sos/archive/%{name}-%{version}.tar.gz License: GPL-2.0-or-later @@ -86,6 +86,9 @@ rm -rf %{buildroot}/usr/config/ %config(noreplace) %{_sysconfdir}/sos/sos.conf %changelog +* Thu Jul 20 2023 Jake Hunsaker = 4.5.6 +- New upstream release + * Fri Jun 23 2023 Jake Hunsaker = 4.5.5 - New upstream release diff --git a/sos/__init__.py b/sos/__init__.py index c5011365ec..148cc9e754 100644 --- a/sos/__init__.py +++ b/sos/__init__.py @@ -14,7 +14,7 @@ This module houses the i18n setup and message function. The default is to use gettext to internationalize messages. """ -__version__ = "4.5.5" +__version__ = "4.5.6" import os import sys diff --git a/sos/cleaner/__init__.py b/sos/cleaner/__init__.py index feeedf6680..fbcaa9c3c7 100644 --- a/sos/cleaner/__init__.py +++ b/sos/cleaner/__init__.py @@ -778,7 +778,7 @@ def obfuscate_file(self, filename, short_name=None, arc_name=None): % (short_name, err), caller=arc_name) tfile.seek(0) if subs: - shutil.copy(tfile.name, filename) + shutil.copyfile(tfile.name, filename) tfile.close() _ob_short_name = self.obfuscate_string(short_name.split('/')[-1]) diff --git a/sos/cleaner/archives/__init__.py b/sos/cleaner/archives/__init__.py index 70e168d8b9..a729862d57 100644 --- a/sos/cleaner/archives/__init__.py +++ b/sos/cleaner/archives/__init__.py @@ -25,6 +25,12 @@ def extract_archive(archive_path, tmpdir): archive = tarfile.open(archive_path) path = os.path.join(tmpdir, 'cleaner') + # set extract filter since python 3.12 (see PEP-706 for more) + # Because python 3.10 and 3.11 raises false alarms as exceptions + # (see #3330 for examples), we can't use data filter but must + # fully trust the archive (legacy behaviour) + archive.extraction_filter = getattr(tarfile, 'fully_trusted_filter', + (lambda member, path: member)) archive.extractall(path) archive.close() return os.path.join(path, archive.name.split('/')[-1].split('.tar')[0]) diff --git a/sos/cleaner/mappings/mac_map.py b/sos/cleaner/mappings/mac_map.py index 334a668144..4ccba25a40 100644 --- a/sos/cleaner/mappings/mac_map.py +++ b/sos/cleaner/mappings/mac_map.py @@ -75,5 +75,5 @@ def sanitize_item(self, item): if re.match('(([0-9a-fA-F]{4}:){3}([0-9a-fA-F]){4})', item): return self.mac6_quad_template % hextets # match 48-bit IPv4 MAC addresses - if re.match('([0-9a-fA-F]:?){12}', item): + if re.match('([0-9a-fA-F][:_]?){12}', item): return self.mac_template % hextets diff --git a/sos/cleaner/parsers/mac_parser.py b/sos/cleaner/parsers/mac_parser.py index 88b0ac2e98..4e790018e9 100644 --- a/sos/cleaner/parsers/mac_parser.py +++ b/sos/cleaner/parsers/mac_parser.py @@ -25,8 +25,8 @@ ) # aa:bb:cc:dd:ee:ff avoiding ipv6 substring matches IPV4_REG = ( - r'((?