diff options
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | 0001-Use-different-Python-package-for-ZStandard.patch | 88 | ||||
-rw-r--r-- | PKGBUILD | 21 |
4 files changed, 112 insertions, 17 deletions
@@ -1,14 +1,11 @@ pkgbase = rpmlint pkgdesc = A tool for checking common errors in rpm packages pkgver = 2.2.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/rpm-software-management/rpmlint arch = any license = GPL2 checkdepends = python-pytest - checkdepends = python-pytest-cov - checkdepends = python-pytest-flake8 - checkdepends = python-pytest-xdist makedepends = python-setuptools depends = binutils depends = bzip2 @@ -19,7 +16,7 @@ pkgbase = rpmlint depends = python-pybeam depends = python-pyxdg depends = python-toml - depends = python-zstd + depends = python-zstandard depends = rpm-tools depends = xz depends = zstd @@ -29,6 +26,8 @@ pkgbase = rpmlint optdepends = desktop-file-utils: for checking desktop entries optdepends = python-pyenchant: for spell checking source = rpmlint-2.2.0.tar.gz::https://github.com/rpm-software-management/rpmlint/archive/refs/tags/2.2.0.tar.gz - sha512sums = 5e16747231e3f815b405db194e5d1768d19a2b378db674f57b1ebcba17d0f3320626e4c2b648e79cc180621444439c2c84fd176cd1e0fd7b6585d50492a7f272 + source = 0001-Use-different-Python-package-for-ZStandard.patch + sha256sums = 53d61cb3c31663c8e86703548bec38f21a49cf0e5a4bdb26f7f6bc3cee899178 + sha256sums = 8775c5f66987a8f6a99fdb24cc769a5ca253acdb1f03c96134763ac7eda02f3b pkgname = rpmlint diff --git a/.gitignore b/.gitignore index 80c5ab63c6b2..f92e6962f771 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -*.pkg.tar.zst -*.tar.gz -pkg/ -src/ +* +!.gitignore +!PKGBUILD +!.SRCINFO +!0001-Use-different-Python-package-for-ZStandard.patch diff --git a/0001-Use-different-Python-package-for-ZStandard.patch b/0001-Use-different-Python-package-for-ZStandard.patch new file mode 100644 index 000000000000..6fd55d52b1ae --- /dev/null +++ b/0001-Use-different-Python-package-for-ZStandard.patch @@ -0,0 +1,88 @@ +From 463bef3f91e2051da2f7d861bc2325338ee623a3 Mon Sep 17 00:00:00 2001 +From: Carl Smedstad <carl.smedstad@protonmail.com> +Date: Mon, 3 Jan 2022 20:54:02 +0100 +Subject: [PATCH] Use different Python package for ZStandard + +The Python package zstd does not have an open() function so I suspect the +intention was to use the zstandard package all along. The zstandard package +also seems more actively maintained. +--- + .github/workflows/main.yml | 4 ++-- + .packit/rpmlint.spec | 4 ++-- + rpmlint/pkg.py | 2 +- + setup.py | 2 +- + 4 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml +index d049a903..a99fea41 100644 +--- a/.github/workflows/main.yml ++++ b/.github/workflows/main.yml +@@ -49,7 +49,7 @@ jobs: + python3-flake8-import-order + python3-flake8-quotes + python3-pyxdg +- python3-zstd ++ python3-zstandard + python3-toml + python3-pip + rpm-build +@@ -86,7 +86,7 @@ jobs: + python3-flake8-import-order + python3-pyxdg + python3-toml +- python3-zstd ++ python3-zstandard + python3-pip + rpm-build + git +diff --git a/.packit/rpmlint.spec b/.packit/rpmlint.spec +index 66f89ed1..51ea2f7a 100644 +--- a/.packit/rpmlint.spec ++++ b/.packit/rpmlint.spec +@@ -28,7 +28,7 @@ BuildRequires: python3-pytest-xdist + BuildRequires: python3-pyxdg + BuildRequires: python3-rpm + BuildRequires: python3-toml +-BuildRequires: python3-zstd ++BuildRequires: python3-zstandard + %else + BuildRequires: python3dist(setuptools) + # For tests +@@ -42,7 +42,7 @@ BuildRequires: python3dist(pytest-xdist) + BuildRequires: python3dist(pyxdg) + BuildRequires: python3dist(rpm) + BuildRequires: python3dist(toml) +-BuildRequires: python3dist(zstd) ++BuildRequires: python3dist(zstandard) + %endif + + # Rest of the test dependencies +diff --git a/rpmlint/pkg.py b/rpmlint/pkg.py +index 6532a59f..24e2ad94 100644 +--- a/rpmlint/pkg.py ++++ b/rpmlint/pkg.py +@@ -22,7 +22,7 @@ except ImportError: + import rpm + from rpmlint.helpers import byte_to_string, ENGLISH_ENVIROMENT, print_warning + from rpmlint.pkgfile import PkgFile +-import zstd ++import zstandard as zstd + + + DepInfo = namedtuple('DepInfo', ('name', 'flags', 'version')) +diff --git a/setup.py b/setup.py +index 5a0e5260..6d2fd64d 100755 +--- a/setup.py ++++ b/setup.py +@@ -45,7 +45,7 @@ setup( + 'pyxdg', + 'rpm', + 'toml', +- 'zstd', ++ 'zstandard', + 'importlib-metadata;python_version<"3.8"', + ], + tests_require=[ +-- +2.35.3 + @@ -4,7 +4,7 @@ pkgname=rpmlint pkgver=2.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="A tool for checking common errors in rpm packages" arch=('any') url="https://github.com/rpm-software-management/$pkgname" @@ -19,7 +19,7 @@ depends=( 'python-pybeam' 'python-pyxdg' 'python-toml' - 'python-zstd' + 'python-zstandard' 'rpm-tools' 'xz' 'zstd' @@ -27,9 +27,6 @@ depends=( makedepends=('python-setuptools') checkdepends=( 'python-pytest' - 'python-pytest-cov' - 'python-pytest-flake8' - 'python-pytest-xdist' ) optdepends=( 'appstream-glib: for AppData file validation' @@ -40,8 +37,18 @@ optdepends=( ) source=( "$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz" + "0001-Use-different-Python-package-for-ZStandard.patch" ) -sha512sums=('5e16747231e3f815b405db194e5d1768d19a2b378db674f57b1ebcba17d0f3320626e4c2b648e79cc180621444439c2c84fd176cd1e0fd7b6585d50492a7f272') +sha256sums=( + '53d61cb3c31663c8e86703548bec38f21a49cf0e5a4bdb26f7f6bc3cee899178' + '8775c5f66987a8f6a99fdb24cc769a5ca253acdb1f03c96134763ac7eda02f3b' +) + +prepare() { + cd "$pkgname-$pkgver" + + patch --forward --strip=1 --input="${srcdir}/0001-Use-different-Python-package-for-ZStandard.patch" +} build() { cd "$pkgname-$pkgver" @@ -52,7 +59,7 @@ build() { check() { cd "$pkgname-$pkgver" - python -m pytest + python -m pytest -c /dev/null } package() { |