Description of problem: After the move from %define to %global [1], pi_spec plugin [2] for generating %changelog items stopped working. The plugin has hard-coded only %define so it ignores %global definitions. I see there some ongoing work in master branch, thought I was not able to apply the f24 patches. Even though I would like to see in F23 especially these features, if possible. Version-Release number of selected component (if applicable): vim-common-7.4.827-1.fc23.x86_64 How reproducible: always Steps to Reproduce: 1. Open spec file for example [3] 2. Press <Leader>c or \c Actual results: The inserted changelog item is missing version information: * Tue Jan 12 2016 Jakub Jelen <jjelen> - Expected results: %define should behave the same way s %global, if it is part of the guidelines * Tue Jan 12 2016 Jakub Jelen <jjelen> 7.1p1-6 Additional info: [1] https://lists.fedoraproject.org/archives/list/devel%40lists.fedoraproject.org/thread/AS35NKZSAWRIKY77IUYOVNFAT6AJQVAU/ [2] http://vimdoc.sourceforge.net/htmldoc/pi_spec.html [3] http://pkgs.fedoraproject.org/cgit/rpms/openssh.git/tree/openssh.spec
Created attachment 1113908 [details] uggly local patch for f23 package
To be clear, the problem is that the plugin doesn't recognise things like: %global ver 1.0 Version: %{ver}
This is not fixed with the latest upstream spec.vim files. Igor, could you take a look please ?
(In reply to Karsten Hopp from comment #3) > This is not fixed with the latest upstream spec.vim files. Igor, could you > take a look please ? https://github.com/ignatenkobrain/vim-spec-plugin/commit/642a0e2d717601efd1e7d69e09fa8d9b62901990 I will send updated plugin to Bram over this week.
This problem still exists with https://raw.githubusercontent.com/ignatenkobrain/vim-spec-plugin/master/ftplugin/spec.vim as of today Error detected while processing function <SNR>20_SpecChangelog[49]..<SNR>20_GetRelVer: line 20: Traceback (most recent call last): File "<string>", line 16, in <module> vim.error: Vim(let):E15: Invalid expression: 7.2p2
the latest https://raw.githubusercontent.com/ignatenkobrain/vim-spec-plugin/master/ftplugin/spec.vim is broken even with normal definitions like the vim specfile uses itself: %define patchlevel 1835 %define baseversion 7.4 Version: %{baseversion}.%{patchlevel} Release: 2%{?dist} results in: * Tue May 24 2016 Karsten Hopp <karsten> - .-2
*** Bug 1332184 has been marked as a duplicate of this bug. ***
*** Bug 1318991 has been marked as a duplicate of this bug. ***
Sorry, I don't have time to work on it in near future. All Pull Requests are very welcomed.
I took a look a while back and as far as I can see, the plugin _should_ be using embedded python to call into rpm to parse the specfile and extract the version information. However, that doesn't seem to happen and I can't tell how it would ever actually function. If anyone has any hints, I can try poking at it. Alternately, just shelling out to rpmspec should be completely sufficient, assuming that's acceptable: rpmspec --define '%dist %nil' -q *spec --qf '%{VERSION}-%{RELEASE}\n'|head -1 My comprehension of vimscript is pretty horrible, though, so if anyone has any hints....
(In reply to Jason Tibbitts from comment #10) > I took a look a while back and as far as I can see, the plugin _should_ be > using embedded python to call into rpm to parse the specfile and extract the > version information. However, that doesn't seem to happen and I can't tell > how it would ever actually function. If anyone has any hints, I can try > poking at it. > > Alternately, just shelling out to rpmspec should be completely sufficient, > assuming that's acceptable: > > rpmspec --define '%dist %nil' -q *spec --qf '%{VERSION}-%{RELEASE}\n'|head -1 > > My comprehension of vimscript is pretty horrible, though, so if anyone has > any hints.... I think we should drop any manual parsing from plugin and add Requires: pythonX-rpm. It's only one reliable way.
I agree, except that there's already code in there to call into python, and I already have rpm-python and rpm-python3 (both misnamed) installed on my system. So that code just isn't getting called at all. Figuring out why would be a good first step, I think. Hopefully soon I'll learn enough vimscript to be able to dig deeper.
I'll try to have a look at it soon.
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
I am still seeing issues with Fedora 26 and OpenSSH spec file.
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Still present in f27
This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Setting FutureFeature because this hasn't been fixed in F29, and I hate the EOL bot.
Hi Igor, Tomas created the pull request for Vim which fixes the issue. Do you agree with the changes presented in pull request? We need your approval (as plugin maintainer) because the previous pull request was closed because it didn't have a maintainer approval.