[Bug 676308] Review Request: rubygem-net-scp - A pure Ruby implementation of the SCP client protocol
bugzilla at redhat.com
bugzilla at redhat.com
Thu Mar 17 20:03:49 UTC 2011
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=676308
--- Comment #7 from Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> 2011-03-17 16:03:48 EDT ---
(In reply to comment #6)
> (In reply to comment #4)
>
> I agree that we have to avoid pollution. But at the end, if the test pollutes
> the %buildroot of %_builddir, you still have to either do cleanup or exclude
> these files from installing/copying. So building into %buildroot cannot save
> you and it is invalid argument in this discussion.
- Well, perhaps you are just confused about %_builddir vs %buildroot
(I don't know what you mean here by "the %buildroot of %_builddir")
Usually
* %_builddir is ~/rpmbuild/BUILD
With normal %setup -q,
- rpmbuild firstly moves to ~/rpmbuild/BUILD (%_builddir)
- unpack tarball
- then move to ~/rpmbuild/BUILD/%name-%version
- And then, when %build, %install, %check begins, rpmbuild
will always move to ~/rpmbuild/BUILD/%name-%version first
* On the other hand, %buildroot is usually ~/
rpmbuild/BUILDROOT/%{name}-%{version}-%{release}-%{_arch}.
On install, files must be installed under %buildroot.
So what I am saying is that usually
- %install section should generally just do copy files under
~/rpmbuild/BUILD into ~/rpmbuild/BUILDROOT
- and do not touch files under ~/rpmbuild/BUILDROOT during %check
and touch only files under ~/rpmbuild/BUILD
And rpmbuild always do the scripts in the order of
%prep -> %build -> %install -> %check (not %prep -> %build -> %check
-> %install).
So even if testsuite may pollute files under %_builddir on %check,
files under %buildroot won't be polluted (again %install is done
before %check).
Also please check this:
https://fedoraproject.org/wiki/Packaging/Guidelines#Scriplets_are_only_allowed_to_write_in_certain_directories
(%_builddir and %buildroot are clearly distinguished and it is written
that %check should not write anything under %buildroot).
> It is always good to follow parallels. So I agree that we should probably
> follow the %prep, %build and %install as you described above, although in this
> particular case it will be more work. But we should be strict about it,
> therefore I would like to see this in Ruby packaging guidelines, instead of
> this paragraph: "The %prep and %build sections of the specfile should be
> empty."
- Note that when containing C extension modules, the paragraph is already
invalid (as written in ruby packaging guidelines).
Well, we may really have to revise current ruby packaging guideline
(even for arch-independent gem based srpm).
> But I can't agree that the test suite should be always executed in %_builddir,
> because as I already pointed above, it might happen that you will not catch all
> possible bugs and you have to care about pollution anyway.
- Well, I don't think we can catch all possible bugs anyway...
And for %buildroot pollution issue, please check my comments above.
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the package-review
mailing list