Re: [Rpm-maint] ACL and File Capability Support in RPM

2008-11-03 Thread Andrew G. Morgan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Panu,

The following change looks a little problematic:

http://rpm.org/gitweb?p=rpm.git;a=blobdiff;f=lib/verify.c;h=69fcd162a02fbb43ade1b6635e2f651ff43a9e8e;hp=4658ce99367b6820772554ca90887bf2a3ab026e;hb=db1f9af5e2a4443e64ce10112a9553204bab7f4e;hpb=97ab15cc9eadc1aab563b87a0c92d559cd9e9a41

Specifically, cap_size() refers only to the cap_copy_ext() size of the
capability set and not the sizeof(*cap_t), so the memory comparison:

   memcmp(cap, fcap, cap_size(cap)

is not reliably comparing the capability sets - at best this comparison
is fragile.

Cheers

Andrew

Panu Matilainen wrote:
 On Mon, 27 Oct 2008, Panu Matilainen wrote:
 I added the initial bits to rpm.org HEAD yesterday, essentially
 Andreas' patch except using libcap instead of looking at file xattr
 info. I intend to implement + add the rest fairly soon.
 
 ...and the rest is committed to rpm.org HEAD now. Might be missing some
 corner cases and odd bits but the basics work:
 - spec filelist now accepts %caps(capabilities) and stores in headers
 - install/upgrade set capabilities on filesystem
 - verification is updated to match with the above
 
 - Panu -
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJCdm0+bHCR3gb8jsRAj1tAJ9xgGdiE9DsJQGRejejU9qrCFb/rgCdGP1Y
TECIvIFcVOPJhb4grLcmwpc=
=ql9P
-END PGP SIGNATURE-
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] ACL and File Capability Support in RPM

2008-11-03 Thread Andrew G. Morgan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



Panu Matilainen wrote:
 On Thu, 30 Oct 2008, Andrew G. Morgan wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Panu,

 The following change looks a little problematic:

 http://rpm.org/gitweb?p=rpm.git;a=blobdiff;f=lib/verify.c;h=69fcd162a02fbb43ade1b6635e2f651ff43a9e8e;hp=4658ce99367b6820772554ca90887bf2a3ab026e;hb=db1f9af5e2a4443e64ce10112a9553204bab7f4e;hpb=97ab15cc9eadc1aab563b87a0c92d559cd9e9a41


 Specifically, cap_size() refers only to the cap_copy_ext() size of the
 capability set and not the sizeof(*cap_t), so the memory comparison:

   memcmp(cap, fcap, cap_size(cap)

 is not reliably comparing the capability sets - at best this comparison
 is fragile.
 
 Oops... thanks for pointing this out.
 
 So assuming I can't rely on cap_compare() always being there (it being
 Linux-specific extension and even then only in very recent libcap),
 would the following be a reasonable fallback: If cap_size() of both sets
 are equal, grab external presentation of both and memcmp() them?

Yes, that would work - if their size is different they don't match ;-)

Cheers

Andrew
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJCgAG+bHCR3gb8jsRAgmlAKCd1UQ/Xs+9thRfRGp9OohyB0OIxgCg1XzO
SHp9mfC5yiI2YptShOg8u7Y=
=8FGc
-END PGP SIGNATURE-
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] unexpected file conflict behavior

2008-11-03 Thread steven chen
 Hi,

Good day.
Recently I had a weird situation where I can install two rpms together (in
one line) without any errors but once I install them one after the other, I
got a file conflict errors. When looking closedly, the files that complain
about conflicting are actually owned by both packages.
Can anyone please shed some lights on me why installing them together will
work? (I actually expect to see file conflict error there too).
Thanks in advance.

# rpm -ivh libstdc++-devel-3.4.4-2.ppc.rpm

Preparing... ### [100%]

1:libstdc++-devel ### [100%]

# rpm -ivh libstdc++-devel-3.4.4-2.ppc64.rpm

Preparing... ### [100%]

file /usr/include/c++/3.4.3/ppc64-redhat-linux/bits/stdc++.h.gch/O0g from
install of libstdc++-devel-3.4.4-2 conflicts with file from package
libstdc++-devel-3.4.4-2

file /usr/include/c++/3.4.3/ppc64-redhat-linux/bits/stdc++.h.gch/O2g from
install of libstdc++-devel-3.4.4-2 conflicts with file from package
libstdc++-devel-3.4.4-2

# rpm -qa | grep libstdc++-devel | xargs rpm -e --allmatches --nodeps

# rpm -ivh libstdc++-devel-3.4.4-2.ppc64.rpm libstdc++-devel-3.4.4-2.ppc.rpm

Preparing... ### [100%]

1:libstdc++-devel ### [ 50%]

2:libstdc++-devel ### [100%]

# rpm -qf /usr/include/c++/3.4.3/ppc64-redhat-linux/bits/stdc++.h.gch/O0g

libstdc++-devel-3.4.4-2

libstdc++-devel-3.4.4-2

# rpm --version

RPM version 4.3.3

Regards,

---

Steven
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] unexpected file conflict behavior

2008-11-03 Thread Florian Festi
steven chen wrote:
  Hi,
 
 Good day.
 Recently I had a weird situation where I can install two rpms together (in
 one line) without any errors but once I install them one after the other, I
 got a file conflict errors. When looking closedly, the files that complain
 about conflicting are actually owned by both packages.
 Can anyone please shed some lights on me why installing them together will
 work? (I actually expect to see file conflict error there too).
 Thanks in advance.

To fix that file conflict the files in the both packages need to be exactly 
the same (md5, owner, group, ...). As this is sometimes difficult to achieve 
for a multilib situation (as this) this test was lowered in the dark ages so 
that at least most installations will somehow work. This is of course 
nonsense and has already be changed back in rpm upstream (=4.6). So not 
issuing an file conflict is an (already fixed) bug in rpm.

While some of these multilib file conflicts are packaging bugs it is also 
possible that this conflict just tells you to install only one architecture 
of this devel package.

Florian
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint