On Wed, 2010-01-20 at 07:23 -0800, Martin Bligh wrote:
> > Okay, that makes sense.  The current version of my Fedora
> > autotest[-client] packages relocates everything to '/usr/share/autotest'
> > to comply with vendor packaging guidelines in the FHS.  From what I can
> > tell from a current SVN checkout, there isn't a whole lot that hard
> > codes '/usr/local/autotest' [1].  For files that do, we apply several
> > small patches during package prep [2] [3] [4].
> 
> OK, anything that specifically references /usr/local/autotest is a bug.
> It's mean to do everything relative off $AUTODIR or job.autodir.
> 
> > The next question during Fedora package review was whether it was a hard
> > requirement that autotest have everything installed under the same
> > directory.  Typically for software packaged in Fedora, content is
> > installed on the system in expected system locations (like I mentioned
> > previously ... /sbin, /etc, /usr/lib/pythonX.Y etc...).
> >
> > I'm curious what would break if I started shuffling content around to
> > system-wide directories.  Things that stand out for me ...
> >
> >      * The entire process of secure rsync'ing content between the
> >        server and client systems (SSHHost)
> >      * Anything that does 'import common' would likely need adjustment
> >        (either by patch or by setting PYTHONPATH)? -- thanks to Gregory
> >        Smith for pointing this out
> >      * What else?  I'm looking through the wiki doc (inc
> >        http://autotest.kernel.org/wiki/DirectoryStructure), and I'm
> >        sure I'm missing something?
> 
> It tends to figure out where binaries are by taking the location of the
> currently executing file (eg __file__) and joining on
> ../client/bin/foo or whatever.
> That's what's *meant* to make it moveable.
> 
> Now I can envisage you prefacing that with
> 
> if(os.path.exists('/usr/bin/autotest-foo')):
>      path = '/usr/bin/autotest-foo'
> else:
>      ....
> 
> in some cases. It's slightly ugly, and will be somewhat fragile and hard to
> maintain, but it is possible I guess.
> 
> >> If possible, I'd strongly encourage you to keep it all under one directory
> >> as a package, maintenance will be a lot easier
> >
> > No doubt, it *definitely* would be easier. :)  Part of my goal for this
> > is to come away with a better understanding of the effort/changes needed
> > to package autotest to comply with Fedora packaging standards.  From
> > there, I'll need to make a determination on how best to proceed with
> > Fedora packaging based on the complexity and maintenance of local
> > patches.
> 
> If there's a dir (such as '/usr/share') or whatever, where it's feasible to 
> put
> stuff as one pacakge, that'd be good. It shouldn't matter to autotest where
> it lives.

I think that might do nicely all python libs.  For executables (e.g.
anything not '*.py'), I might move them into /usr/sbin and leave a
symlink around in autotest root (so that rsync pulls them in when
pushing code to the clients).

Ideally, for Fedora packaging, any files under /usr/... should have
permissions set to 644.  Additionally, dynamic content should reside
elsewhere on disk.  So I might play games with symlinks for things like
the PID files, logs/ and results/.

Thanks,
James

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to