Bug 857090 - beaker-wizard: [RFE] add RhtsRequires into options/skeleton
beaker-wizard: [RFE] add RhtsRequires into options/skeleton
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: command line (Show other bugs)
0.9
Unspecified Unspecified
medium Severity medium (vote)
: 21.2
: ---
Assigned To: matt jia
QE
: FutureFeature, NeedsTestCase, Patch
Depends On: 857332
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-13 10:37 EDT by Lukas Zachar
Modified: 2015-11-22 22:53 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-22 22:53:34 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
support for rhtsrequires="..." in <skeleton> (5.56 KB, patch)
2014-07-31 08:53 EDT, Martin Žember
mzember: review-
Details | Diff
support for rhtsrequires="library(perl/lib1) ..." in <skeleton> (5.56 KB, patch)
2014-08-05 13:17 EDT, Martin Žember
no flags Details | Diff
support for rhtsrequires="library(perl/lib1) ..." in <skeleton>, the correct patch (6.27 KB, patch)
2014-08-06 11:15 EDT, Martin Žember
no flags Details | Diff

  None (edit)
Description Lukas Zachar 2012-09-13 10:37:44 EDT
Description of problem:

I made test with code which I'd like to share in subset of tests. 
To avoid mistakes I'd like make a skeleton which will uses the shared code, but there is no way (AFAIK) how to customize the created Makefile to include the dependency. 

One of the options seemed to use alias for added '-q test-package' option, which will create the "Require: test-package", however in the documentation is stated that preferred way is to use "RhtsRequires:     test(/path/to/library/task)".

The -q options fails with "test(TESTNAME) is not a valid required package", which might be the correct behaviour. (or I am wrong and it test(TESTNAME) can be used in Require: too?)

Please be so kind and add option to specify Rhtsrequires from command line.
If there was an option how to customize it via skeletons it would be great.


Version-Release number of selected component (if applicable):
rhts-devel-4.50-1.el6eng
Comment 1 Petr Šplíchal 2012-09-14 03:08:45 EDT
(In reply to comment #0)
> Description of problem:
> 
> The -q options fails with "test(TESTNAME) is not a valid required package",
> which might be the correct behaviour. (or I am wrong and it test(TESTNAME)
> can be used in Require: too?)

Unfortunately no. Hard requires (RhtsRequires) are added to the
test rpm and that is installed only before task execution. Soft
requires (Requires) are placed into kickstart but at that time
task repositories are not available yet.

> Please be so kind and add option to specify Rhtsrequires from
> command line.  If there was an option how to customize it via
> skeletons it would be great.

Hm, interesting idea. We could probably add the requires to the
skeleton tag like this:

        <skeleton name="skel1" requires="x y z" rhtsrequires="a">
            This is skeleton 1 example.
        </skeleton>

Would that work for you? However, I believe RhtsRequires should be
obsoleted as this is still referring to the old test system. I've
filed bug 857332 to track this. Will continue with the
implementation once the new name is available.
Comment 2 Lukas Zachar 2012-09-14 05:17:59 EDT
Hi Petr,
Thanks for the explanation. 

The proposed solution with skeleton attributes will be more then satisfying.
Is/will be possible to add other Makefile metadata as confidential, destructive, 
run for packages, required packages into the skeleton too?
Comment 3 David Kutálek 2013-04-07 06:40:22 EDT
Solution in comment 1 seems fine.

One more idea I had is beaker-wizard to scan skeleton content for rlImport commands and use them to fill RhtsRequires. That would be nice 1-place solution, but probably too costy for our use case.
Comment 5 Martin Žember 2014-07-31 08:53:10 EDT
Created attachment 922910 [details]
support for rhtsrequires="..." in <skeleton>

Lukas,
please have a look at the patch and tell me whether it works as expected.

It supports rhtsrequires="..." in <skeleton>. Support for requires="..." can be added in a similar manner.

> > Please be so kind and add option to specify Rhtsrequires from
> > command line.  If there was an option how to customize it via
> > skeletons it would be great.
> 
> Hm, interesting idea. We could probably add the requires to the
> skeleton tag like this:
> 
>         <skeleton name="skel1" requires="x y z" rhtsrequires="a">
>             This is skeleton 1 example.
>         </skeleton>
Comment 6 Lukas Zachar 2014-08-04 04:11:25 EDT
Hm, something is broken:

My skeleton contains:
        <skeleton name="test" rhtsrequires="library(perl/lib1) library(scl/lib2)">
            PACKAGES="<package/>"
        </skeleton>
    </skeletons>

But when running I get:

RhtsRequires: libraries which test depends on
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[library(perl/lib1) is not a valid rhtsrequired package, what about None?]

The check has to be fixed as well, probably.

Also the "libraries which test depends on" is not 100% correct. It can be anything, difference to Requires is only that it is installed by yum instead of kickstart.
Comment 7 Martin Žember 2014-08-05 13:17:45 EDT
Created attachment 924261 [details]
support for rhtsrequires="library(perl/lib1) ..." in <skeleton>

Thanks, Lukas. How about this one? Valid characters now include ()/. And the text has been modified.
Comment 8 Martin Žember 2014-08-06 11:15:06 EDT
Created attachment 924520 [details]
support for rhtsrequires="library(perl/lib1) ..." in <skeleton>, the correct patch

I uploaded some patch from an incorrect directory previously
Comment 9 Lukas Zachar 2014-08-06 11:31:24 EDT
Thank you Martin. 
From my PoV patch from comment 8 fixes this bug.
Comment 10 Martin Žember 2014-11-21 11:42:50 EST
Patch submitted to Gerrit.
http://gerrit.beaker-project.org/#/c/3499/
Comment 11 Martin Žember 2015-06-29 23:03:43 EDT
I won't be able to proceed. There is a functional/unit test to be written for it. Feel free to follow if you would like to.
Comment 12 matt jia 2015-10-27 20:04:04 EDT
Hi Martin,

I have added the test cases in your patch and feel free to leave comments.

  http://gerrit.beaker-project.org/#/c/4460/
Comment 13 Dan Callaghan 2015-11-12 22:10:46 EST
This bug fix is included in beaker-client-22.0-0.git.89.5c48126 which is available for download here:

https://beaker-project.org/nightlies/develop/
Comment 15 matt jia 2015-11-22 22:53:34 EST
Beaker 21.2 has been released.

Note You need to log in before you can comment on or make changes to this bug.