diff options
Diffstat (limited to 'app-misc/chkcrontab')
-rw-r--r-- | app-misc/chkcrontab/Manifest | 1 | ||||
-rw-r--r-- | app-misc/chkcrontab/chkcrontab-1.7-r2.ebuild (renamed from app-misc/chkcrontab/chkcrontab-1.6.ebuild) | 12 | ||||
-rw-r--r-- | app-misc/chkcrontab/chkcrontab-1.7-r3.ebuild (renamed from app-misc/chkcrontab/chkcrontab-1.7.ebuild) | 21 | ||||
-rw-r--r-- | app-misc/chkcrontab/files/chkcrontab-man.patch | 12 | ||||
-rw-r--r-- | app-misc/chkcrontab/files/chkcrontab-py312.patch | 23 | ||||
-rw-r--r-- | app-misc/chkcrontab/metadata.xml | 6 |
6 files changed, 58 insertions, 17 deletions
diff --git a/app-misc/chkcrontab/Manifest b/app-misc/chkcrontab/Manifest index f872621c9fa8..2718437a15d8 100644 --- a/app-misc/chkcrontab/Manifest +++ b/app-misc/chkcrontab/Manifest @@ -1,2 +1 @@ -DIST chkcrontab-1.6.tar.gz 24701 BLAKE2B a4a47e0e41a17a535662b22deb57dd49b461694f4842a59a1a9debe8523f4216f4834c64d01c62e24e13ee4d45e526f361650b402968a164b2802e0a13d63a63 SHA512 249061ecf7c8dc2d2275dcda3048fd00fc2ca85d39dabb2de61a3ab415243bbd1a61222be8c0ddfa66eb36577bb2efb27ba4a0c2a013559dee126c95cc73bd1b DIST chkcrontab-1.7.tar.gz 25088 BLAKE2B 5e3cffcbcd064cfe8e9898dc74c215b14bdd69a4c110a91b73777cb024dd6dfe8d10ce862e82752baad65a8daf88dc45bee06f8e736393e0f973ee2f79f7bd96 SHA512 5236b1996a8d4f5d3861bf3d8a1bafafa271237965721ea4ff61e6712ee4546b9d0484483a0dac25f9d920904f899f2930b46df16d656083b422d95a1d6de0c0 diff --git a/app-misc/chkcrontab/chkcrontab-1.6.ebuild b/app-misc/chkcrontab/chkcrontab-1.7-r2.ebuild index 1d14ba22d192..6de9a0bd56b9 100644 --- a/app-misc/chkcrontab/chkcrontab-1.6.ebuild +++ b/app-misc/chkcrontab/chkcrontab-1.7-r2.ebuild @@ -1,9 +1,10 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 -PYTHON_COMPAT=( python{2_7,3_5} ) +PYTHON_COMPAT=( python3_{9..11} ) +DISTUTILS_USE_SETUPTOOLS=no inherit distutils-r1 @@ -15,10 +16,9 @@ LICENSE="Apache-2.0" SLOT="0" KEYWORDS="amd64 x86" IUSE="test" +RESTRICT="!test? ( test )" -python_test() { - esetup.py test -} +distutils_enable_tests setup.py python_install_all() { doman doc/${PN}.1 diff --git a/app-misc/chkcrontab/chkcrontab-1.7.ebuild b/app-misc/chkcrontab/chkcrontab-1.7-r3.ebuild index 44293532ef89..aeadc5891674 100644 --- a/app-misc/chkcrontab/chkcrontab-1.7.ebuild +++ b/app-misc/chkcrontab/chkcrontab-1.7-r3.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 - -PYTHON_COMPAT=( python{2_7,3_5,3_6} ) +EAPI=8 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) inherit distutils-r1 DESCRIPTION="A tool to detect crontab errors" @@ -14,10 +14,17 @@ SRC_URI="https://github.com/lyda/chkcrontab/archive/v${PV}.tar.gz -> ${P}.tar.gz LICENSE="Apache-2.0" SLOT="0" KEYWORDS="amd64 x86" -IUSE="test" -python_test() { - esetup.py test || die +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}/${PN}-man.patch" + "${FILESDIR}/${PN}-py312.patch" +) + +python_prepare_all() { + distutils-r1_python_prepare_all + sed -i 's/assertEquals/assertEqual/g' tests/test_check.py || die } python_install_all() { diff --git a/app-misc/chkcrontab/files/chkcrontab-man.patch b/app-misc/chkcrontab/files/chkcrontab-man.patch new file mode 100644 index 000000000000..83e4a41e1b48 --- /dev/null +++ b/app-misc/chkcrontab/files/chkcrontab-man.patch @@ -0,0 +1,12 @@ +diff --git a/setup.py b/setup.py +index df72a6a..b2082c6 100755 +--- a/setup.py ++++ b/setup.py +@@ -143,6 +143,7 @@ class InstallCmd(install): + + def run(self): + install.run(self) ++ return + manpages = ['doc/chkcrontab.1'] + if self.manprefix: + for manpage in manpages: diff --git a/app-misc/chkcrontab/files/chkcrontab-py312.patch b/app-misc/chkcrontab/files/chkcrontab-py312.patch new file mode 100644 index 000000000000..b384549b3489 --- /dev/null +++ b/app-misc/chkcrontab/files/chkcrontab-py312.patch @@ -0,0 +1,23 @@ +# https://github.com/gregorg/chkcrontab/pull/1 +diff --git a/chkcrontab_lib.py b/chkcrontab_lib.py +index 57a7c1f..6334a77 100755 +--- a/chkcrontab_lib.py ++++ b/chkcrontab_lib.py +@@ -822,12 +822,12 @@ def ParseLine(self, line, options ): + Returns: + A CronLine* class (must have a ValidateAndLog method). + """ +- chkcrontab_cmd = re.compile('##*\s*chkcrontab:\s*(.*)=(.*)') +- assignment_line_re = re.compile('[a-zA-Z_][a-zA-Z0-9_]*\s*=(.*)') +- at_line_re = re.compile('@(\S+)\s+(\S+)\s+(.*)') +- cron_time_field_re = '[\*0-9a-zA-Z,/-]+' ++ chkcrontab_cmd = re.compile(r'##*\s*chkcrontab:\s*(.*)=(.*)') ++ assignment_line_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*\s*=(.*)') ++ at_line_re = re.compile(r'@(\S+)\s+(\S+)\s+(.*)') ++ cron_time_field_re = r'[\*0-9a-zA-Z,/-]+' + time_field_job_line_re = re.compile( +- '^\s*(%s)\s+(%s)\s+(%s)\s+(%s)\s+(%s)\s+(\S+)\s+(.*)' % ++ r'^\s*(%s)\s+(%s)\s+(%s)\s+(%s)\s+(%s)\s+(\S+)\s+(.*)' % + (cron_time_field_re, cron_time_field_re, cron_time_field_re, + cron_time_field_re, cron_time_field_re)) + diff --git a/app-misc/chkcrontab/metadata.xml b/app-misc/chkcrontab/metadata.xml index d69c349ca9a7..776edfae5474 100644 --- a/app-misc/chkcrontab/metadata.xml +++ b/app-misc/chkcrontab/metadata.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> + <maintainer type="person" proxied="yes"> <email>hydrapolic@gmail.com</email> <name>Tomáš Mózes</name> </maintainer> - <maintainer type="project"> + <maintainer type="project" proxied="proxy"> <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> </maintainer> |