diff --git a/.gitignore b/.gitignore index 84ad670..941c432 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /fedora-review-0.3.0.tar.gz /fedora-review-0.3.1.tar.gz /fedora-review-0.4.0.tar.gz +/fedora-review-0.4.1.tar.gz diff --git a/0001-Fix-syntax-error.patch b/0001-Fix-syntax-error.patch deleted file mode 100644 index 9b6fe01..0000000 --- a/0001-Fix-syntax-error.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 847fb99ac78b4fd27b8adcc412ba49dc6cfd1cde Mon Sep 17 00:00:00 2001 -From: Ralph Bean -Date: Sun, 3 Feb 2013 14:31:21 -0500 -Subject: [PATCH 1/7] Fix syntax error. - -Signed-off-by: Alec Leamas ---- - src/fedora-create-review | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/fedora-create-review b/src/fedora-create-review -index c7ef834..ed8fba3 100755 ---- a/src/fedora-create-review -+++ b/src/fedora-create-review -@@ -277,7 +277,7 @@ class ReviewRequest(object): - bzurl = 'https://partner-bugzilla.redhat.com' - - self.username = args.username -- if not self.username -+ if not self.username: - try: - self.username = fedora_cert.read_user_cert() - except: --- -1.8.1 - diff --git a/0002-Handle-characters-i-package-name-BZ908830.patch b/0002-Handle-characters-i-package-name-BZ908830.patch deleted file mode 100644 index a029ba9..0000000 --- a/0002-Handle-characters-i-package-name-BZ908830.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 9a168f86b5f292c539d7fd143e06272ddae97d68 Mon Sep 17 00:00:00 2001 -From: Alec Leamas -Date: Fri, 8 Feb 2013 11:39:09 +0100 -Subject: [PATCH 2/7] Handle '+' characters i package name (BZ908830) - -Caused a crash when a package named *c++* was fed to a regex which -tried to interpret the '+' characters. No other regex reserved -chars [\^$.|?*() should realistically be in package names(?). There -may be other places affected by this, though. - -Conflicts: - plugins/generic.py ---- - plugins/generic.py | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/plugins/generic.py b/plugins/generic.py -index f2d8235..21ccbb0 100644 ---- a/plugins/generic.py -+++ b/plugins/generic.py -@@ -226,9 +226,14 @@ class CheckCleanBuildroot(GenericCheckBase): - - def run(self): - has_clean = False -- regex = 'rm\s+\-[rf][rf]\s+(%{buildroot}|$RPM_BUILD_ROOT)' -- regex = rpm.expandMacro(regex) -+ regex = r'rm\s+\-[rf][rf]\s+(@buildroot@|$RPM_BUILD_ROOT)' -+ buildroot = rpm.expandMacro('%{buildroot}') -+ # BZ 908830: handle '+' in package name. -+ buildroot = buildroot.replace('+', r'\+') -+ regex = regex.replace('@buildroot@', buildroot) - install_sec = self.spec.get_section('%install', raw=True) -+ self.log.debug('regex: ' + regex) -+ self.log.debug('install_sec: ' + install_sec) - has_clean = install_sec and re.search(regex, install_sec) - if self.flags['EPEL5']: - self.text = 'EPEL5: Package does run rm -rf %{buildroot}' \ --- -1.8.1 - diff --git a/0003-Fix-large-docs-to-separate-doc-package-test-BZ-90883.patch b/0003-Fix-large-docs-to-separate-doc-package-test-BZ-90883.patch deleted file mode 100644 index 833c92a..0000000 --- a/0003-Fix-large-docs-to-separate-doc-package-test-BZ-90883.patch +++ /dev/null @@ -1,40 +0,0 @@ -From bc24b84869cbc84eb2f1003fd1495fb467bf6fe0 Mon Sep 17 00:00:00 2001 -From: Alec Leamas -Date: Fri, 8 Feb 2013 12:20:18 +0100 -Subject: [PATCH 3/7] Fix "large docs to separate -doc package" test (BZ - 908830). - ---- - scripts/check-large-docs.sh | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/scripts/check-large-docs.sh b/scripts/check-large-docs.sh -index 2f598aa..1870284 100755 ---- a/scripts/check-large-docs.sh -+++ b/scripts/check-large-docs.sh -@@ -4,18 +4,19 @@ - # @url: http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation - # @text: Large documentation must go in a -doc subpackage. - -- - min=10000 - max=1000000 - docdir='./usr/share/doc' - - if unpack_rpms; then - size=$(for rpm in rpms-unpacked/*; do -- [[ $rpm = *doc ]] && continue -+ [[ $rpm = *-doc-* ]] && continue -+ [[ $rpm = *-javadoc-* ]] && continue - (cd $rpm; test -d $docdir && tar c $docdir) - done | wc -c) - count=$(for rpm in rpms-unpacked/*; do -- [[ $rpm = *doc ]] && continue -+ [[ $rpm = *-doc-* ]] && continue -+ [[ $rpm = *-javadoc-* ]] && continue - (cd $rpm; test -d $docdir && find $docdir -type f) - done | wc -l) - --- -1.8.1 - diff --git a/0004-Use-REVIEW_NO_MOCKGROUP_TEST-to-inhibit-test-of-mock.patch b/0004-Use-REVIEW_NO_MOCKGROUP_TEST-to-inhibit-test-of-mock.patch deleted file mode 100644 index a161b90..0000000 --- a/0004-Use-REVIEW_NO_MOCKGROUP_TEST-to-inhibit-test-of-mock.patch +++ /dev/null @@ -1,60 +0,0 @@ -From eac732ebd8977da7bb5c3e3fa95a1f7dc276f6b7 Mon Sep 17 00:00:00 2001 -From: Alec Leamas -Date: Fri, 8 Feb 2013 13:45:13 +0100 -Subject: [PATCH 4/7] Use REVIEW_NO_MOCKGROUP_TEST to inhibit test of mock - group (#78) - ---- - fedora-review.1 | 5 +++++ - src/FedoraReview/settings.py | 11 +++++++---- - 2 files changed, 12 insertions(+), 4 deletions(-) - -diff --git a/fedora-review.1 b/fedora-review.1 -index 45542f6..c575a52 100644 ---- a/fedora-review.1 -+++ b/fedora-review.1 -@@ -285,6 +285,11 @@ User supplied directory with shell-based plugins - loglevel used when not using -v/--verbose. A logging.* value like 'DEBUG', 'Info', or 'warning'. Setting - REVIEW_LOGLEVEL to 'debug' is the same as providing the -v/--verbose option. - .TP -+.B REVIEW_NO_MOCKGROUP_CHECK -+Normally, fedora-review checks that user is member of the mock group -+before proceeding since this is required to run mock in most setups. -+In cases this check is not useful it can be suppressed by this variable. -+.TP - .B XDG_DATA_HOME - fedora-review respects XDG_DATA_HOME which defaults to ~/.local/share. Eg g., - the personal data directory with plugins is by default ~/.local/share/fedora-review/plugins, -diff --git a/src/FedoraReview/settings.py b/src/FedoraReview/settings.py -index 86cc2bd..81d94a3 100644 ---- a/src/FedoraReview/settings.py -+++ b/src/FedoraReview/settings.py -@@ -16,9 +16,9 @@ - # - # (C) 2011 - Tim Lauridsen - --''' --Tools for helping Fedora package reviewers --''' -+''' Tools for helping Fedora package reviewers ''' -+ -+# pylint: disable=R0924 - - import argparse - import grp -@@ -44,8 +44,11 @@ def _check_mock_grp(): - mock_msg = \ - 'No mock group - mock not installed or mock not in effective' \ - 'groups. Try running "newgrp" or logging out from all your local '\ -- 'sessions and logging back in.' -+ 'sessions and logging back in. Or disable test using ' \ -+ 'REVIEW_NO_MOCKGROUP_CHECK, see manpage' - -+ if 'REVIEW_NO_MOCKGROUP_CHECK' in os.environ: -+ return - mock_gid = grp.getgrnam('mock')[2] - if not mock_gid in os.getgroups(): - raise ReviewError(mock_msg) --- -1.8.1 - diff --git a/0005-Make-sure-Mock.init-is-invoked-before-other-usage-91.patch b/0005-Make-sure-Mock.init-is-invoked-before-other-usage-91.patch deleted file mode 100644 index 67e5083..0000000 --- a/0005-Make-sure-Mock.init-is-invoked-before-other-usage-91.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5b56e3599691129e3137ad3a0cb187c8c6b8aafa Mon Sep 17 00:00:00 2001 -From: Alec Leamas -Date: Mon, 18 Feb 2013 18:51:06 +0100 -Subject: [PATCH 5/7] Make sure Mock.init() is invoked before other usage - (#912182) - ---- - src/FedoraReview/mock.py | 9 ++++++++- - src/FedoraReview/review_helper.py | 2 ++ - 2 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/src/FedoraReview/mock.py b/src/FedoraReview/mock.py -index 6c5b6ae..3a4ae11 100644 ---- a/src/FedoraReview/mock.py -+++ b/src/FedoraReview/mock.py -@@ -25,7 +25,7 @@ import os - import os.path - - from glob import glob --from subprocess import call, Popen, PIPE, STDOUT -+from subprocess import call, Popen, PIPE, STDOUT, CalledProcessError - - try: - from subprocess import check_output # pylint: disable=E0611 -@@ -336,6 +336,13 @@ class _Mock(HelpersMixin): - - def init(self): - """ Run a mock --init command. """ -+ try: -+ self.rpm_eval('%{_libdir}') -+ self.log.debug("Avoiding init of working mock root") -+ return -+ except CalledProcessError: -+ pass -+ self.log.info("Re-initializing mock build root") - cmd = ["mock"] - if hasattr(Settings, 'mock_config') and Settings.mock_config: - cmd.extend(['-r', Settings.mock_config]) -diff --git a/src/FedoraReview/review_helper.py b/src/FedoraReview/review_helper.py -index d3afe12..66e4dd1 100644 ---- a/src/FedoraReview/review_helper.py -+++ b/src/FedoraReview/review_helper.py -@@ -25,6 +25,7 @@ import os.path - import ansi - from bugzilla_bug import BugzillaBug - from checks import Checks, ChecksLister -+from mock import Mock - from name_bug import NameBug - from review_dirs import ReviewDirs - from review_error import ReviewError -@@ -73,6 +74,7 @@ class ReviewHelper(object): - if not ReviewDirs.is_inited: - wd = self.bug.get_dirname() - ReviewDirs.workdir_setup(wd) -+ Mock.init() - - if not self.bug.download_files(): - raise self.HelperError('Cannot download .spec and .srpm') --- -1.8.1 - diff --git a/0006-Ensure-we-run-correct-mock-binary.patch b/0006-Ensure-we-run-correct-mock-binary.patch deleted file mode 100644 index 029588a..0000000 --- a/0006-Ensure-we-run-correct-mock-binary.patch +++ /dev/null @@ -1,24 +0,0 @@ -From cda5e59118f1e41989683dc93809822b8cacce94 Mon Sep 17 00:00:00 2001 -From: Alec Leamas -Date: Mon, 18 Feb 2013 19:54:55 +0100 -Subject: [PATCH 7/7] Ensure we run correct mock binary - ---- - make_release | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/make_release b/make_release -index a7cfc81..079deb7 100755 ---- a/make_release -+++ b/make_release -@@ -39,6 +39,7 @@ git reset --quiet --hard $commit - badlinks=$( find . -type l ! -execdir test -e '{}' \; -print | nl ) - [ -n "$badlinks" ] && echo "Warning: unresolved symlinks: $badlinks" >&2 - -+export PATH=/bin:/usr/bin:/sbin:/usr/sbin - env PYTHONPATH=src ./update-version - - source src/FedoraReview/version --- -1.8.1 - diff --git a/fedora-review.spec b/fedora-review.spec index 7a9b1ad..9fa53ee 100644 --- a/fedora-review.spec +++ b/fedora-review.spec @@ -5,8 +5,8 @@ #global git_tag .fa1afe1 Name: fedora-review -Version: 0.4.0 -Release: 4%{?git_tag}%{?dist} +Version: 0.4.1 +Release: 1%{?git_tag}%{?dist} Summary: Review tool for fedora rpm packages License: GPLv2+ @@ -34,21 +34,6 @@ Requires: python-argparse # Let's be consistent with the name used on fedorahosted provides: FedoraReview = %{version}-%{release} -# Applied upstream - 5aee7f3 -Patch1: 0001-Fix-syntax-error.patch -# Applied upstream - caeb135 -Patch2: 0002-Handle-characters-i-package-name-BZ908830.patch -# Applied upstream - d7298ce -Patch3: 0003-Fix-large-docs-to-separate-doc-package-test-BZ-90883.patch -# Applied upstream - d7aab9e -Patch4: 0004-Use-REVIEW_NO_MOCKGROUP_TEST-to-inhibit-test-of-mock.patch -# Applied upstream - 1216801, #912182 -Patch5: 0005-Make-sure-Mock.init-is-invoked-before-other-usage-91.patch -# Applied upstream - b493e1c -Patch6: 0006-Ensure-we-run-correct-mock-binary.patch - - - %description This tool automates much of the dirty work when reviewing a package @@ -89,13 +74,6 @@ see http://php5.laurent-laville.org/compatinfo/. %prep %setup -q -%patch1 -p1 -b . -%patch2 -p1 -b . -%patch3 -p1 -b . -%patch4 -p1 -b . -%patch5 -p1 -b . -%patch6 -p1 -b . - %build %{__python} setup.py --quiet build @@ -146,6 +124,9 @@ python -m unittest discover -f %changelog +* Mon Apr 29 2013 Stanislav Ochotnicky - 0.4.1-1 +- Update to latest upstream version + * Tue Feb 19 2013 Stanislav Ochotnicky - 0.4.0-4 - Fix rhbz912182 - Reorganize patches a bit diff --git a/sources b/sources index 82e2c74..424f451 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e51839a726d53d41225fa61ed48a747a fedora-review-0.4.0.tar.gz +905d9e13a3050d34652689325250da91 fedora-review-0.4.1.tar.gz