Porting atf - violating the layout of the ports-filesystems

Ivan "Rambius" Ivanov rambiusparkisanius at gmail.com
Mon Jul 12 09:42:34 PDT 2010


Hello,

On Fri, Jul 9, 2010 at 10:45 PM, Ivan "Rambius" Ivanov
<rambiusparkisanius at gmail.com> wrote:
> Hello,
>
> Thank you for your response.
>
> On Tue, Jul 6, 2010 at 3:46 PM, Rainer Müller <raimue at macports.org> wrote:
>> On 2010-07-04 03:32 , Ivan "Rambius" Ivanov wrote:
>>> --->  Staging atf into destroot
>>> Warning: violation by /opt/local/tests
>>> Warning: atf violates the layout of the ports-filesystems!
>>> Warning: Please fix or indicate this misbehavior (if it is intended),
>>> it will be an error in future releases!
>>>
>>> How would you advise me to fix this warning? Should I change ATF's
>>> portfile or should I patch its original build system?
>>
>> In my opinion, the build system should not install ${prefix}/tests. It
>> seems like this location is a valid part of the netbsd tree [1], but not
>> for MacPorts.
>
> These atf tests definitely should not be installed in /opt/local/tests
> - macports is right to issue a warning. However, I was able to execute
> these tests and they passed. I would keep them in /opt/local/share/atf
> as examples of working atf tests.
>
>> Looking at the source tarball, Makefile.am defines this variable:
>> testsdir = $(exec_prefix)/tests
>>
>> There are multiple possible solutions. As I don't know atf, I can't
>> decide the best solution:
>>
>>  * Omit the files from the distribution
>>
>>    post-destroot {
>>       delete ${destroot}${prefix}/tests
>>    }
>>
>>  * Move the files to another location
>>
>>    destroot.args testsdir=${prefix}/share/${name}/tests
>
> I like the second solution more and I added destroot.args in atf's
> Portfile. Thank you very much for your advice. I also submitted a
> ticket for adding ATF to macports and I attached the initial Portfile
> (see below).

I contacted ATF's author to inform him that I had include ATF into
MacPorts. He raised concerns about moving the tests into
${prefix}/share/${name}/tests.

His main objection was that the tests tree was supposed to be shared
across all packages and more than one package can install ATF-based
tests. The user can just go into prefix/tests/ (imagine you'd have
prefix/tests/atf/, prefix/tests/bind/, prefix/tests/gtk2/, etc.) and
run all tests at once for all packages. After he explained it to me, I
am more inclined to move the tests back to $prefix/tests and set
destroot.violate_mtree to yes.

I CC'ed the author of ATF - Julio and he will provide more details.

Regards
Rambius

-- 
Tangra Mega Rock: http://www.radiotangra.com


More information about the macports-users mailing list