Re: Darwin problems with cpio in rpm.

2004-01-02 Thread Bill Campbell
On Fri, Sep 12, 2003, Ralf S. Engelschall wrote:
On Thu, Sep 11, 2003, Bill Campbell wrote:

 I'm attempting to build OpenPKG release 1.3 on OS X/Darwin, and it builds
 with one minor hack in gzip to keep it from trying to use the assembler.
 Unfortunately once it's built, rpm fails when attempting to rebuild or
 install SRPMS with the error:

  error: unpacking of archive failed: cpio: Bad/unreadable  header

 If I run ``rpm2cpio $srpm | cpio -itv'' it reads the archive successfully.
 I've looked at the cpio code in /tmp/openpkg-1.3.0/rpm-4.0.2/lib, but don't
 see anything that just jumps out at me.  I thought it might be an endian
 problem, but it doesn't appear that's the problem (I pulled the ENDIAN
 tests out of the verify.c routine, into a small test program which worked
 fine).

 I've been running a non OpenPKG version of rpm-4.0.2 on OS X with no
 problems using these patches (which don't seem to do anything to cpio
 related code except possibly the LIBMISC additions in a couple of
 Makefile.in files).

 http://www-jlc.kek.jp/~fujiik/macosx/10.2.X/SOURCES/rpm-4.0.2-macosx.patch

 Does anybody have any suggestions or solutions to this before I go digging?

I strongly suggest you to retry with the OpenPKG-CURRENT openpkg
package and its RPM 4.2.1. There were lots of fixes in this area inside
RPM. And if we finally should integrate MacOS support into OpenPKG. we
definetely need patches against OpenPKG-CURRENT anyway...

I've finally gotten back to this project, and have the basic OpenPKG
current working here on an OS X 10.3 ``Panther'' machine.  It required a
very minor tweak to the bootstrap openpkg.spec file to suppress assembler
in gzip, and some jiggery in installing the built bootstrap.

For some reason which I haven't figured out, the boostrap install shell
script didn't finish the installation properly, leaving some files out
(%{l_prefix}/bin/rpmbuild for one), and all permissions were wrong.  The
rpm binary failed on commands such as ``rpm -qa'' saying that ``-qa''
wasn't a file.  Doing a forced reinstall of the binary RPM package
generated by the bootstrap using ``rpm --force -U ...'' successfully
installed the packages with the correct permissions and things worked after
that.

I have built a number of packages with this, but many require some
tweaking, largely due to incompatibilities between the OS X versions of
automake, autoconf, and libtool (no surprise there :-).

One thing that caused problems was building the coreutils with_legacy=yes
so that there would be gnu-compatible version of programs such as ``cp''
since I anticipated similar problems to those I've found on FreeBSD with
RPM spec files that use options that aren't in the vendor's version of the
programs.  This caused the config.guess programs to fail since they were
often getting the gnuish version of uname instead of the system's.  I added
a section to the coreutils.spec file to remove uname and hostname (which I
have found caused problems with SuSE 8.0 where the -s option changes the
hostname).

At this point, I'm still fumbling around a bit to figure out how to best
fix the darwinisms, and haven't been able to build some basic packages such
as the fileutils (it fails in the find/fstype.c file).  I'm currently
loading the gnu-darwin base package so I can take a look at their versions
of these to see how they've worked around these problems.  Presumably,
their OS X patches can be worked into the OpenPKG packages.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Mechanical Engineers build weapons.  Civil Engineers build targets.''
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   [EMAIL PROTECTED]


Re: Darwin problems with cpio in rpm.

2003-09-13 Thread Bill Campbell
On Fri, Sep 12, 2003, Ralf S. Engelschall wrote:
On Thu, Sep 11, 2003, Bill Campbell wrote:

 I'm attempting to build OpenPKG release 1.3 on OS X/Darwin, and it builds
 with one minor hack in gzip to keep it from trying to use the assembler.
 Unfortunately once it's built, rpm fails when attempting to rebuild or
 install SRPMS with the error:
...
 Does anybody have any suggestions or solutions to this before I go digging?

I strongly suggest you to retry with the OpenPKG-CURRENT openpkg
package and its RPM 4.2.1. There were lots of fixes in this area inside
RPM. And if we finally should integrate MacOS support into OpenPKG. we
definetely need patches against OpenPKG-CURRENT anyway...

I did try building against the current yesterday, and the compile
failed in several places with a variety of syntax errors which I
haven't had time to investigate.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

It is practically impossible to teach good programming style to
students that have had prior exposure to BASIC: as potential
programmers they are mentally mutilated beyond hope of
regeneration.
-- Dijkstra
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   [EMAIL PROTECTED]


Re: Darwin problems with cpio in rpm.

2003-09-12 Thread Ralf S. Engelschall
On Thu, Sep 11, 2003, Bill Campbell wrote:

 I'm attempting to build OpenPKG release 1.3 on OS X/Darwin, and it builds
 with one minor hack in gzip to keep it from trying to use the assembler.
 Unfortunately once it's built, rpm fails when attempting to rebuild or
 install SRPMS with the error:

   error: unpacking of archive failed: cpio: Bad/unreadable  header

 If I run ``rpm2cpio $srpm | cpio -itv'' it reads the archive successfully.
 I've looked at the cpio code in /tmp/openpkg-1.3.0/rpm-4.0.2/lib, but don't
 see anything that just jumps out at me.  I thought it might be an endian
 problem, but it doesn't appear that's the problem (I pulled the ENDIAN
 tests out of the verify.c routine, into a small test program which worked
 fine).

 I've been running a non OpenPKG version of rpm-4.0.2 on OS X with no
 problems using these patches (which don't seem to do anything to cpio
 related code except possibly the LIBMISC additions in a couple of
 Makefile.in files).

 http://www-jlc.kek.jp/~fujiik/macosx/10.2.X/SOURCES/rpm-4.0.2-macosx.patch

 Does anybody have any suggestions or solutions to this before I go digging?

I strongly suggest you to retry with the OpenPKG-CURRENT openpkg
package and its RPM 4.2.1. There were lots of fixes in this area inside
RPM. And if we finally should integrate MacOS support into OpenPKG. we
definetely need patches against OpenPKG-CURRENT anyway...

   Ralf S. Engelschall
   [EMAIL PROTECTED]
   www.engelschall.com

__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   [EMAIL PROTECTED]