rebasehelper doesn't like kernel.spec file
See original GitHub issueOn packitos-0.2.1.dev10+g074675c.d20190322, the rebasehelper module to parse the kernel.spec file doesn’t seem to parse it correctly:
$ packit srpm
ERROR
Unexpected exception occurred,
please fill an issue here:
https://github.com/packit-service/packit/issues
[labbott@labbott-redhat kernel-packit-experimental]$ packit -d srpm
16:44:17.864 packit_base.py DEBUG logging set to DEBUG
16:44:17.864 local_project.py DEBUG working_dir is set and git_repo is not: let’s discover…
16:44:17.865 local_project.py DEBUG it’s a git repo!
16:44:17.868 local_project.py DEBUG remote url of the repo is ssh://git@pagure.io/kernel-packit-experimental.git
16:44:17.868 local_project.py DEBUG namespace from url is
16:44:17.868 local_project.py DEBUG namespace from url is
16:44:17.868 local_project.py DEBUG namespace from url is
16:44:17.868 config.py DEBUG Local package config found: /home/labbott/kernel-packit-experimental/.packit.yaml
16:44:17.870 config.py DEBUG Package config:
{
“specfile_path”: “fedora/kernel.spec”,
“synced_files”: [
“Makefile”
],
“upstream_project_name”: “kernel”,
“downstream_package_name”: “kernel”
}
16:44:17.871 utils.py DEBUG cmd = [‘git’, ‘describe’, ‘–tags’, ‘–match’, ‘.’]
16:44:17.946 upstream.py DEBUG version = v4.20.14-115-g47bf7598cc03
16:44:17.946 upstream.py DEBUG sanitized version = v4.20.14.115.g47bf7598cc03
16:44:17.947 local_project.py DEBUG working_dir is set and git_repo is not: let’s discover…
16:44:17.947 local_project.py DEBUG it’s a git repo!
16:44:17.951 local_project.py DEBUG remote url of the repo is ssh://git@pagure.io/kernel-packit-experimental.git
16:44:17.951 local_project.py DEBUG namespace from url is
16:44:17.951 local_project.py DEBUG namespace from url is
16:44:17.951 local_project.py DEBUG namespace from url is
ERROR
Traceback (most recent call last):
File “/home/labbott/.local/lib/python3.7/site-packages/rebasehelper/specfile.py”, line 272, in _update_data
self.spc = RpmHelper.parse_spec(self.path, flags=rpm.RPMSPEC_ANYARCH)
File “/home/labbott/.local/lib/python3.7/site-packages/rebasehelper/helpers/rpm_helper.py”, line 178, in parse_spec
result = rpm.spec(tmp.name, flags) if flags is not None else rpm.spec(tmp.name)
ValueError: can’t parse specfile
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “/home/labbott/.local/lib/python3.7/site-packages/rebasehelper/specfile.py”, line 276, in _update_data self.spc = RpmHelper.parse_spec(self.path) File “/home/labbott/.local/lib/python3.7/site-packages/rebasehelper/helpers/rpm_helper.py”, line 178, in parse_spec result = rpm.spec(tmp.name, flags) if flags is not None else rpm.spec(tmp.name) ValueError: can’t parse specfile
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “/home/labbott/.local/lib/python3.7/site-packages/packit/cli/utils.py”, line 35, in covered_func func(config=config, *args, **kwargs) File “/home/labbott/.local/lib/python3.7/site-packages/packit/cli/srpm.py”, line 30, in srpm srpm_path = api.create_srpm(output_file=output) File “/home/labbott/.local/lib/python3.7/site-packages/packit/api.py”, line 284, in create_srpm spec_version = up.get_specfile_version() File “/home/labbott/.local/lib/python3.7/site-packages/packit/upstream.py”, line 288, in get_specfile_version version = self.specfile.get_full_version() File “/home/labbott/.local/lib/python3.7/site-packages/packit/upstream.py”, line 66, in specfile changelog_entry=None, File “/home/labbott/.local/lib/python3.7/site-packages/rebasehelper/specfile.py”, line 212, in init self._update_data() File “/home/labbott/.local/lib/python3.7/site-packages/rebasehelper/specfile.py”, line 278, in _update_data raise RebaseHelperError(“Problem with parsing SPEC file ‘%s’” % self.path) rebasehelper.exceptions.RebaseHelperError
diff --git a/fedora/kernel.spec b/fedora/kernel.spec
index 5495bd1611b8..dcc6d1ee1446 100644
--- a/fedora/kernel.spec
+++ b/fedora/kernel.spec
@@ -54,7 +54,7 @@ Summary: The Linux kernel
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
-%define stable_update 14
+%define stable_update 14.115.g47bf7598cc03
# Set rpm version accordingly
%if 0%{?stable_update}
%define stablerev %{stable_update}
@@ -368,8 +368,8 @@ Summary: The Linux kernel
Name: kernel%{?variant}
License: GPLv2 and Redistributable, no modification permitted
URL: https://www.kernel.org/
-Version: %{rpmversion}
-Release: %{pkg_release}
+Version: v4.20.14.115.g47bf7598cc03
+Release: 1%{?dist}
# DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
# SET %%nobuildarches (ABOVE) INSTEAD
ExclusiveArch: %{all_x86} x86_64 s390x %{arm} aarch64 ppc64le
@@ -676,14 +676,6 @@ Obsoletes: kernel-bootwrapper\
%define variant_summary The Linux kernel compiled for PAE capable machines
%kernel_variant_package %{pae}
%description %{pae}-core
-This package includes a version of the Linux kernel with support for up to
-64GB of high memory. It requires a CPU with Physical Address Extensions (PAE).
-The non-PAE kernel can only address up to 4GB of memory.
-Install the kernel-PAE package if your machine has more than 4GB of memory.
-%else
-%define variant_summary The Linux kernel compiled for Cortex-A15
-%kernel_variant_package %{pae}
-%description %{pae}-core
This package includes a version of the Linux kernel with support for
Cortex-A15 devices with LPAE and HW virtualisation support
%endif
@@ -1760,6 +1752,9 @@ fi
#
#
%changelog
+* Tue Mar 19 2019 Laura Abbott <labbott@redhat.com>
+- Development snapshot
+
* Tue Mar 05 2019 Justin M. Forbes <jforbes@fedoraproject.org> - 4.20.14-200
- Linux v4.20.14
From this diff and looking at rebasehelper, it doesn’t look like the parser likes the word ‘version’ and behaves strangely (see also deleting the block starting with “This package includes…”). I also don’t think the stable_update should have been updated either.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (8 by maintainers)
Top GitHub Comments
+1
But this is still a valid bug report 😃
Since this is 5 months old and there have been numerous updates to rebase-helper and packit, I’m going to close. Please reopen or report a new one if you run into more issues. Thanks for the report!