Bug 530275
| Summary: | Review Request: rubygem-erubis - A fast and extensible eRuby implementation | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Matthew Kent <mkent> |
| Component: | Package Review | Assignee: | Mamoru TASAKA <mtasaka> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | CC: | fedora-package-review, jstribny, mastahnke, mtasaka, notting |
| Target Milestone: | --- | Flags: | mtasaka:
fedora-review+
gwync: fedora-cvs+ |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 2.6.5-2.fc12 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-11-04 12:21:00 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 529799 | ||
| Bug Blocks: | |||
|
Description
Matthew Kent
2009-10-22 05:52:58 UTC
I will post some comments on this later, however first of all would you check if test_syntax2 test passes with the following rpms? http://koji.fedoraproject.org/scratch/mtasaka/task_1771739/ Rather please try: http://koji.fedoraproject.org/scratch/mtasaka/task_1773253/ (In reply to comment #2) > Rather please try: > http://koji.fedoraproject.org/scratch/mtasaka/task_1773253/ Yes the test passes with this version: 147 tests, 222 assertions, 0 failures, 0 errors Well, finaly I reached the reason why test_syntax2 fails, which is
actually how ruby (especially parse.c) is rebuilt.
The failing test program is:
$ ruby -e 'require "rubygems" ; require "erubis" ; require "erubis/main" ; Erubis::Main.new.execute(["-z", "tmp.test_syntax2"])'
where the file "tmp.test_syntax2" is as below:
------------------------------------------------------------
$ cat tmp.test_syntax2
<ul>
<% for item in list %>
<li><%= item[:name]] %></li>
<% end %>
</ul>
------------------------------------------------------------
The result expected by rubygem-erubis's test is:
------------------------------------------------------------
tmp.test_syntax2:3: syntax error, unexpected ']', expecting ')'
_buf << ' <li>'; _buf << ( item[:name]] ).to_s; _buf << '</li>
^
-:4: syntax error, unexpected kEND, expecting ')'
'; end
^
-:7: syntax error, unexpected $end, expecting ')'
------------------------------------------------------------
however Fedora's ruby returns:
------------------------------------------------------------
tmp.test_syntax2:3: syntax error
_buf << ' <li>'; _buf << ( item[:name]] ).to_s; _buf << '</li>
^
-:4: syntax error
'; end
^
-:7: syntax error
------------------------------------------------------------
This is because when regenerating parse.c (which is in ruby source code),
on Fedora "$ byacc parse.y" is used while the original source uses
"$ bison -y parse.y". This causes the following difference:
------------------------------------------------------------
$ rm -f parse.c ; make parse.c YACC="byacc "
byacc parse.y
sed '/^#/s|y\.tab\.c|parse.c|' y.tab.c > parse.c
rm -f y.tab.c
$ grep "syntax error" parse.c
yyerror("syntax error");
$
$
$ rm -f parse.c ; make parse.c YACC="bison -y "
bison -y parse.y
sed '/^#/s|y\.tab\.c|parse.c|' y.tab.c > parse.c
rm -f y.tab.c
$ grep "syntax error" parse.c
If YYTABLE_NINF, syntax error. */
yyerror (YY_("syntax error: cannot back up")); \
copied. As a special case, return 0 if an ordinary "syntax error"
YY_("syntax error, unexpected %s");
YY_("syntax error, unexpected %s, expecting %s");
YY_("syntax error, unexpected %s, expecting %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
static char const yyunexpected[] = "syntax error, unexpected %s";
/* Number of syntax errors so far. */
yyerror (YY_("syntax error"));
yyerror (YY_("syntax error"));
| yyerrlab1 -- common code for both syntax error and YYERROR. |
------------------------------------------------------------
So the error messages actually change.
What I don't know currently is that whether it is strictly expected
on usual or not that ruby returns error messages in this format.
Do you know some reason that rubygem-erubis strictly expectes this
format?
Note that adding "BR: bison" to current ruby.spec will fix this issue. (In reply to comment #4) Thanks for looking into this. Interesting issue. > So the error messages actually change. > > What I don't know currently is that whether it is strictly expected > on usual or not that ruby returns error messages in this format. > Do you know some reason that rubygem-erubis strictly expectes this > format? Not sure honestly. Easy cut and paste solution to verify the syntax check is working I guess? Well,
* About %check:
- I decided to add the fix for test_syntax2 on ruby.
Now for F-13/12/11 the fixed ruby rpms are added into buildroot
tree (i.e. koji scratch build should success now)
( and for F-12 the fixed ruby will be pushed on the next
rawhide push ). So you can remove test_syntax2 hack.
- The following may be smarter:
------------------------------------------------------------
export GEM_PATH=$(pwd)/%{gemdir}
export PATH=$(pwd)/%{gemdir}/bin:$PATH
pushd .%{geminstdir}/test
find data/users-guide -type f -name \*.rb | \
xargs sed -i -e '/require.*erubis/i\require "rubygems"'
mv data/users-guide/Example.ejava data/users-guide/example.ejava
ruby -rrubygems test.rb
------------------------------------------------------------
By the way the line "mv data/...." should be moved to %build
section because for this file the filename is definitely
wrong and it is better that the installed file should also
be renamed.
Spec URL: http://magoazul.com/wip/SPECS/rubygem-erubis.spec SRPM URL: http://magoazul.com/wip/SRPMS/rubygem-erubis-2.6.5-2.fc12.src.rpm * Thu Oct 29 2009 Matthew Kent <mkent> - 2.6.5-2 - Move file rename to build stage (#530275). - Simplify %%check stage (#530275). - Remove disable of test_syntax2, fixed by new ruby build (#530275). -----------------------------------------------------------
This package (rubygem-erubis) is APPROVED by mtasaka
-----------------------------------------------------------
For F-12, first please request rel-eng team to make
rubygem-abstract-1.0.0-2.fc12 tagged as f12-final (at:
https://fedorahosted.org/rel-eng/ if unsure add me to CC list)
because F-11 rubygem-abstract-1.0.0-2.fc11 is now included in
F-12 build tree.
[tasaka1@localhost ~]$ koji latest-pkg dist-f12-build rubygem-abstract
Build Tag Built by
---------------------------------------- -------------------- ----------------
rubygem-abstract-1.0.0-2.fc11 dist-f11-updates mkent
[tasaka1@localhost ~]$ koji latest-pkg dist-f12-updates-candidate rubygem-abstract
Build Tag Built by
---------------------------------------- -------------------- ----------------
rubygem-abstract-1.0.0-2.fc12 dist-f12-updates-candidate mkent
(In reply to comment #9) > ----------------------------------------------------------- > This package (rubygem-erubis) is APPROVED by mtasaka > ----------------------------------------------------------- Thank you for the review. > > For F-12, first please request rel-eng team to make > rubygem-abstract-1.0.0-2.fc12 tagged as f12-final (at: > https://fedorahosted.org/rel-eng/ if unsure add me to CC list) > because F-11 rubygem-abstract-1.0.0-2.fc11 is now included in > F-12 build tree. > > [tasaka1@localhost ~]$ koji latest-pkg dist-f12-build rubygem-abstract > Build Tag Built by > ---------------------------------------- -------------------- > ---------------- > rubygem-abstract-1.0.0-2.fc11 dist-f11-updates mkent > [tasaka1@localhost ~]$ koji latest-pkg dist-f12-updates-candidate > rubygem-abstract > Build Tag Built by > ---------------------------------------- -------------------- > ---------------- > rubygem-abstract-1.0.0-2.fc12 dist-f12-updates-candidate mkent Sorry, still learning the release process. Reading https://www.redhat.com/archives/fedora-devel-announce/2009-October/msg00007.html makes no mention of new packages in the criteria. Nor does reading the open rel-eng tickets. Should I wait on rubygem-abstract/rubygem-erubis until f12 updates are reopened? New Package CVS Request ======================= Package Name: rubygem-erubis Short Description: A fast and extensible eRuby implementation Owners: mkent Branches: F-11 F-12 InitialCC: (In reply to comment #10) > Sorry, still learning the release process. Reading > https://www.redhat.com/archives/fedora-devel-announce/2009-October/msg00007.html > makes no mention of new packages in the criteria. Nor does reading the open > rel-eng tickets. > > Should I wait on rubygem-abstract/rubygem-erubis until f12 updates are > reopened? I guess for now rel-eng team also accepts new package request. Please contact rel-eng team. cvs done. rubygem-erubis-2.6.5-2.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/rubygem-erubis-2.6.5-2.fc11 rubygem-erubis-2.6.5-2.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report. ruby-1.8.6.383-4.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report. rubygem-erubis-2.6.5-2.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/rubygem-erubis-2.6.5-2.fc12 rubygem-erubis-2.6.5-2.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. Package Change Request ====================== Package Name: rubygem-erubis New Branches: el5 el6 Owners: stahnma mkent is aware of change. Git done (by process-git-requests). Package Change Request ====================== Package Name: rubygem-erubis New Branches: epel7 Owners: jstribny humaton Git done (by process-git-requests). |