Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 310015 Details for
Bug 444778
FEAT: HwCert catalog will retire and stop accepting rhr2 results
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch Improve
rhr2.patch (text/plain), 8.37 KB, created by
XINSUN
on 2008-06-23 08:03:02 UTC
(
hide
)
Description:
Patch Improve
Filename:
MIME Type:
Creator:
XINSUN
Created:
2008-06-23 08:03:02 UTC
Size:
8.37 KB
patch
obsolete
>Index: attachment.cgi >=================================================================== >RCS file: /cvs/qa/hwcert/attachment.cgi,v >retrieving revision 1.12 >diff -u -r1.12 attachment.cgi >--- attachment.cgi 1 May 2008 14:36:43 -0000 1.12 >+++ attachment.cgi 18 Jun 2008 22:08:05 -0000 >@@ -957,9 +957,12 @@ > my $comment = "Created an attachment (id=$attachid) $filename\n"; > $comment .= ("\n" . $::FORM{'comment'} . "\n") if $::FORM{'comment'}; > >- # Support hwcert results package parsing >- if ( $contenttype =~ /redhat-package-manager|x-rpm|octet-stream|x-pn-realaudio/) { >- $comment .= processResultsRpm($::FORM{'bugid'}, $filename, $attachid, $data); >+ my $attachasresult= $::FORM{'attachasresult'}; >+ >+ # Support hwcert results package parsing when mimetype is right and checkbox "attachasresult" is checked. >+ if ( $contenttype =~ /redhat-package-manager|x-rpm|octet-stream|x-pn-realaudio/ && $attachasresult eq "true") >+ { >+ $comment.= processResultsRpm($::FORM{'bugid'}, $filename, $attachid, $attachasresult, $data ); > } > > use Text::Wrap; >Index: hwcert.pl >=================================================================== >RCS file: /cvs/qa/hwcert/hwcert.pl,v >retrieving revision 1.52 >diff -u -r1.52 hwcert.pl >--- hwcert.pl 16 May 2008 16:34:27 -0000 1.52 >+++ hwcert.pl 18 Jun 2008 22:08:05 -0000 >@@ -1006,6 +1006,7 @@ > my $bug_id = shift @_; > my $filename = shift @_; > my $attachid = shift @_; >+ my $attachasresult =shift @_; > my ($data) = @_; > > # Process a results rpm inserting test results into the cert database >@@ -1020,13 +1021,28 @@ > return; > } > >- # Just attach the file if it's not a results package. >- if (RpmProvides($rpmlocation) !~ /hts|rhr2/ ){ >- UnlinkPath($rpmlocation); >- return; >- } >- > my $comment; >+ >+ my $rpm_type = RpmProvides($rpmlocation); >+ if ($attachasresult eq "true") { >+ if ($rpm_type =~/hts/) { >+ #continue. >+ } elsif ($rpm_type =~/rhr2/) { >+ $comment .= "\nNOTICE: rhr2 has been deprecated.\n"; >+ if (UserInGroup('hwcert_edit')) { >+ $comment .= "\nAttach as results override: rhr2 package parsed as results.\n"; >+ } else { >+ UnlinkPath($rpmlocation); >+ return $comment; >+ } >+ } else { >+ UnlinkPath($rpmlocation); >+ return; >+ } >+ } else { >+ UnlinkPath($rpmlocation); >+ return; >+ } > > # Verify we haven't already seen this package > SendSQL2("SELECT filename FROM cert_rpms WHERE md5sum = " . SqlQuote($md5sum)); >Index: post.cgi >=================================================================== >RCS file: /cvs/qa/hwcert/post.cgi,v >retrieving revision 1.56 >diff -u -r1.56 post.cgi >--- post.cgi 16 May 2008 16:51:26 -0000 1.56 >+++ post.cgi 18 Jun 2008 22:08:05 -0000 >@@ -155,6 +155,20 @@ > # Move file to final resting place > $rpmlocation = CreateRpm($md5sum, $filename, $data); > >+ # Judge the rpm result package's type. >+ my @cmdargs = qq(/bin/rpm -qp $rpmlocation --qf "%{PROVIDES}"); >+ my $rpm_type = `@cmdargs`; >+ >+ if ($rpm_type !~ /hts/) { >+ UnlinkPath($rpmlocation); >+ if ($rpm_type =~ /rhr2/) { >+ #Stop accepting rhr2 result packages. >+ ThrowUserError("obsolete_rhr2_package",{ filename => $filename,rpmprovides=>$rpm_type }); >+ } else { >+ ThrowUserError("hts_package_required"); >+ } >+ } >+ > # Check to make sure log files do not exceed maximum size limit > my $result = CheckMaxFileSize($rpmlocation); > if ($result) { >Index: template/en/default/bug/upload_packages.html.tmpl >=================================================================== >RCS file: /cvs/qa/hwcert/template/en/default/bug/upload_packages.html.tmpl,v >retrieving revision 1.2 >diff -u -r1.2 upload_packages.html.tmpl >--- template/en/default/bug/upload_packages.html.tmpl 15 Feb 2008 22:27:38 -0000 1.2 >+++ template/en/default/bug/upload_packages.html.tmpl 18 Jun 2008 22:08:05 -0000 >@@ -1,4 +1,32 @@ > [% IF canedit && !isduplicate && bug.bug_status!='CLOSED' %] >+ <script> >+ function verify_filename() { >+ var filename= document.getElementById("data").value; >+ var rpm_pattern = /.+\.rpm$/; >+ var rhr2_pattern = /rhr2/; >+ var hts_pattern = /hts/; >+ if (rpm_pattern.test(filename)) { >+ if (rhr2_pattern.test(filename)) { >+ document.getElementById("attachasresult").checked=false; >+ document.getElementById("attachasresult_warning").innerHTML= >+ "Filename matches /rhr/ : rhr2 has been deprecated."; >+ document.getElementById("attachasresult_warning").style.display = "block"; >+ } else if (hts_pattern.test(filename)) { >+ document.getElementById("attachasresult").checked=true; >+ document.getElementById("attachasresult_warning").style.display = "none"; >+ } else if (!rhr2_pattern.test(filename) && !hts_pattern.test(filename)) { >+ document.getElementById("attachasresult").checked=false; >+ document.getElementById("attachasresult_warning").style.display = "none"; >+ } >+ } else { >+ document.getElementById("attachasresult").checked=false; >+ document.getElementById("attachasresult_warning").style.display = "none"; >+ } >+ document.getElementById("attachasresult_prompt").innerHTML= >+ "<b><font color='gray'>System-set</b></font>"; >+ document.getElementById("attachasresult_prompt").style.display = "inline"; >+ } >+ </script> > <hr/> > > <h3>Upload Results Package or Specification Document</h3> >@@ -13,7 +41,7 @@ > <input type="hidden" name="action" value="insert"> > <input type="hidden" name="contenttypemethod" value="autodetect"> > <em>Enter the path to the results package or spec file on your computer.</em><br/> >- <input type="file" name="data" size="50"> >+ <input type="file" name="data" id="data" size="50" onchange="verify_filename()" > > </td> > </tr> > <tr> >@@ -30,6 +58,14 @@ > <textarea wrap="soft" name="comment" rows="6" cols="80"></textarea> > </td> > </tr> >+ <tr> >+ <th>Attach as result:</th> >+ <td> >+ <input type="checkbox" name="attachasresult" id="attachasresult" value="true" checked onclick="document.getElementById('attachasresult_prompt').innerHTML='<b><font color=\'blue\'>User-set</b></font>';document.getElementById('attachasresult_prompt').style.display = 'inline';"> >+ <div id = "attachasresult_prompt" style = "display:inline"><b><font color='gray'>System-set</b></font></div> >+ <div id = "attachasresult_warning" style = "display:none"></div> >+ </td> >+ </tr> > </table> > <p> > <input type="submit" name="Attach" value="Attach File"> >Index: template/en/default/global/user-error.html.tmpl >=================================================================== >RCS file: /cvs/qa/hwcert/template/en/default/global/user-error.html.tmpl,v >retrieving revision 1.13 >diff -u -r1.13 user-error.html.tmpl >--- template/en/default/global/user-error.html.tmpl 29 Feb 2008 12:17:12 -0000 1.13 >+++ template/en/default/global/user-error.html.tmpl 18 Jun 2008 22:08:05 -0000 >@@ -445,6 +445,10 @@ > Sorry, you aren't a member of the 'editkeywords' group, and so > you aren't allowed to add, modify or delete keywords. > >+ [% ELSIF error == "hts_package_required" %] >+ [% title = "HTS Package Required" %] >+ Test results not found: Data can only be parsed from hts test result packages. >+ > [% ELSIF error == "hwcert_group_access_denied" %] > [% title = "Access Denied" %] > Only member of hwcert_edit group can do "[% action FILTER html %]". >@@ -647,6 +651,10 @@ > Either no products have been defined to enter [% terms.bugs %] against or you have not > been given access to any. > >+ [% ELSIF error == "obsolete_rhr2_package" %] >+ [% title = "Obsolete RHR2 Package" %] >+ [% filename FILTER html %] appears to provide [% rpmprovides FILTER html %] which has been deprecated. Starting June 19, 2008; rhr2 results are no longer accepted for certification. Retesting using hts will be required. Please contact <a href=http://www.redhat.com/support>Red Hat Support</a> if you have any questions. >+ > [% ELSIF error == "old_password_incorrect" %] > [% title = "Incorrect Old Password" %] > You did not enter your old password correctly.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 444778
:
305340
|
305742
|
307030
|
307171
| 310015