Bug 842175
Summary: | Building certain kernel modules fails with the error Illegal char '[' | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Akemi Yagi <toracat> | ||||||||
Component: | redhat-rpm-config | Assignee: | Minfei Huang <mhuang> | ||||||||
Status: | CLOSED UPSTREAM | QA Contact: | BaseOS QE Security Team <qe-baseos-security> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 6.3 | CC: | ajb, ccui, gedwards, jcm, lkardos, pasteur, phil, ruyang, salmy, toracat | ||||||||
Target Milestone: | rc | ||||||||||
Target Release: | 6.5 | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2015-03-10 13:26:56 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. Hi, Akemi, I can not reproduce your bug. Can you attach your srpm ? Then I can check it. thanks Weiping Pan Hi Weiping, You can get the srpm from ELRepo: http://elrepo.org/linux/elrepo/el6/SRPMS/aacraid-kmod-1.2.1-2.el6.elrepo.src.rpm This one produces the error: error: line 92: Illegal char '[' in: - Initial el6 build of the kmod package. (In reply to Akemi Yagi from comment #6) > Hi Weiping, > > You can get the srpm from ELRepo: > > http://elrepo.org/linux/elrepo/el6/SRPMS/aacraid-kmod-1.2.1-2.el6.elrepo.src. > rpm > > This one produces the error: > > error: line 92: Illegal char '[' in: - Initial el6 build of the kmod package. Hi, Akemi Yagi, Yes I can reproduce your bug now. The root cause is that rpmbuild think "[" and "]" are illegal character in the version. I will attach a simple spec, and if you add "[" or "]" in Version, it can not be built. Yes your patch for /usr/lib/rpm/redhat/find-provides.d/modalias.prov is good. But how about just chaning AAC_DRIVER_FULL_VERSION in your source file ? I will attach another patch, too. So there are two methods to fix this problem now. 1 replace "[" and "]" in AAC_DRIVER_FULL_VERSION in the source file 2 modify modalias.prov and replace "[" and "]" with maybe "_" Any ideas which one is better or do you have other methods ? thanks Weiping Pan Created attachment 789497 [details]
rpmbuild think "[" and "]" are illegal in version field
rpmbuild think "[" and "]" are illegal in version field.
Created attachment 789498 [details]
fix aacraid version
patch to fix aacraid version.
(In reply to Weiping Pan from comment #7) > So there are two methods to fix this problem now. > 1 replace "[" and "]" in AAC_DRIVER_FULL_VERSION in the source file > 2 modify modalias.prov and replace "[" and "]" with maybe "_" > > Any ideas which one is better or do you have other methods ? Hi Weiping, I think that your number 2 is a preferred solution. Modifying modalias.prov is a universal solution whereas patching the source is good only for that particular package. If/when other manufacturers choose to use "[" or "]", they'd have to be fixed too. Your solution 2 is "fix once and for all". Akemi (In reply to Akemi Yagi from comment #10) > (In reply to Weiping Pan from comment #7) > > > So there are two methods to fix this problem now. > > 1 replace "[" and "]" in AAC_DRIVER_FULL_VERSION in the source file > > 2 modify modalias.prov and replace "[" and "]" with maybe "_" > > > > Any ideas which one is better or do you have other methods ? > > Hi Weiping, > > I think that your number 2 is a preferred solution. Modifying modalias.prov > is a universal solution whereas patching the source is good only for that > particular package. If/when other manufacturers choose to use "[" or "]", > they'd have to be fixed too. Your solution 2 is "fix once and for all". > > Akemi Hi, Akemi, Ok, then let me implemet in the second method. thanks Weiping Pan Hi, Chun, Can you give QA ACK for this bug ? thanks Weiping Pan (In reply to Weiping Pan from comment #12) > Hi, Chun, > > Can you give QA ACK for this bug ? > > thanks > Weiping Pan Reassign to BaseOS QE for reviewing of redhat-rpm-config package. This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. Hi Weiping, I thought this bug fix was already in QA. If it is indeed necessary to file a request through the support channel, I can do it. Akemi Hi, Akemi, I am sorry that for RHEL6.5, redhat-rpm-config is not on ACL, then we can not modify this package, so this bug has not been fixed for RHEL6.5. And since it is RHEL6.5 snap5 now, it is very late to try to fix it, how about deferring it to RHEL6.6 ? If you do want this bug to be fixed in RHEL6.5 and have strong reason, I will ask my manager and PM evaluate your request. thanks Weiping Pan Because this is not an urgent matter, I suppose we can wait for RHEL6.6. Akemi Hi, PM, Please help me set rhel 6.6 flag if you want to fix this bug in rhel 6.6. thanks Weiping Pan This bug exists in RHEL 7.0 as well. Could you please apply the patch there? Thanks, Akemi Hi, Akemi, Can you cork a patch to modify the driver version in upstream ? In my opinion, it is odd to have such a version format, and it does not deserve the efforts to fix it in redhat-rpm-config package. thanks Weiping Pan Hi Weiping, According to the upstream driver page at: http://www.adaptec.com/en-us/speed/raid/aac/linux/aacraid_linux_rpms_v1_2_1-30300_tgz.htm their version is : Version: 1.2.1-30300 I don't see the '[' character upstream. So, I suspect it was introduced to RHEL at some point. Therefore, an appropriate fix seems to be either 1) to update the RH version to 1.2.1-30300 or 2) fix redhat-rpm-config. Akemi Hi, Akemi, In upstream, drivers/scsi/aacraid/linit.c 65 #ifdef AAC_DRIVER_BUILD 66 #define _str(x) #x 67 #define str(x) _str(x) 68 #define AAC_DRIVER_FULL_VERSION AAC_DRIVER_VERSION "[" str(AAC_DRIVER_BUILD) "]" AAC_DRIVER_BRANCH 69 #else 70 #define AAC_DRIVER_FULL_VERSION AAC_DRIVER_VERSION AAC_DRIVER_BRANCH 71 #endif Line 68 introduces the illegal character "[" and "]", and REHL version is the same as upstream version. So in my opinion, when you build this kmod, can you cork a patch like in comment 9, fix the version ? I think it does not deserve the efforts to fix it in redhat-rpm-config. thanks Weiping Pan Hi Weiping, Thank you for your note. Well, if patching redhat-rpm-config does not seem to justify the effort involved, we can give it up. But updating the driver to the current version might be worthwhile (and it fixes the current problem). Guess that is for another day ... Akemi Hi, Akemi, I recommend that you can cork a patch to fix the version problem in upstream, then next time when you request a driver sync, our developer will pick up this fix into RHEL. thanks Weiping Pan Assigned to ffesti by mistake, assigning back to wpan. |
Created attachment 599636 [details] Replace brackets in the value of modver in modalias.prov with acceptable char Description of problem: Attempt to build kmod-aacraid fails with the following error: Processing files: kmod-aacraid-1.1.7-4.el6.elrepo.x86_64 Finding Provides: /usr/lib/rpm/redhat/find-provides error: line 86: Illegal char '[' in: - Initial el6 build of the kmod package. The error does not occur if redhat-rom-config is downgraded to an earlier version (e.g. 9.0.3-34.el6). Version-Release number of selected component (if applicable): redhat-rpm-config-9.0.3-39.el6 How reproducible: Always Steps to Reproduce: 1. Build the aacraid kernel module using redhat-rpm-config-9.0.3-39.el6 2. 3. Actual results: Build fails. Expected results: Build succeeds without an error Additional info: This error occurs if the module version contains the "[" or "]" chararacter. In this case, $ modinfo aacraid | grep ^version version: 1.1-7[28000]-ms I compared redhat-rpm-config between -39 and -34 and found the source of the issue to be this change: RHEL6.3-fix-find-provides-modalias-permissions.patch + chmod +x $(DESTDIR)/usr/lib/rpm/redhat/find-provides.d/modalias.prov When the permission bits were changed back to 644, the error did not happen. A workaround is to replace the "[" and "]" in modver with some acceptable char. For example: modver=$(/sbin/modinfo -F version "$module"| head -n1 | tr "\[\]" "__" ) A patch file has been attached.