Subject: pkg/23900: suse_linux doesn't install on FreeBSD; fixes attached
To: None <>
From: None <>
List: netbsd-bugs
Date: 12/27/2003 11:45:44
>Number:         23900
>Category:       pkg
>Synopsis:       suse_linux doesn't install on FreeBSD; fixes attached
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 27 11:46:00 UTC 2003
>Originator:     Michal Pasternak
>Release:        N/A
FreeBSD 4.9-STABLE FreeBSD 4.9-STABLE #0: Thu Dec 25 12:02:15 CET 2003  i386


FreeBSD comes with linux-emulation layer since version... well, I don't 
quite remember, but it was some time ago. It should be possible to run
suse_linux binaries on it. Current pkgsrc doesn't allow this.


1) first it was obvious, that I need to update ONLY_FOR_PLATFORM:

2) then it came out, that FreeBSD:

    - use different sysctl for kernel version (suse_linux/Makefile.application)

    - must perform "brandelf -t Linux" on ldconfig binary
      in do-build: section of suse_base/Makefile (I've added a declaration
      for BRANDELF in also to avoid hardcoding paths)

    - needs some changes in INSTALL file of emulators/suse_base . I have 
      added information on adding linux compat layer support to kernel;
      about /emul and /compat symlinks: I think, that /emul symlink 
      should exist (this is compatible with pkgsrc, maybe some packages
      depend on it) -- and /compat/linux symlink is needed for FreeBSD
      emulation layer to work (won't find without it)

      So basically we add both symlinks on FreeBSD (and warn, if 
      /compat/linux exists, but points to some other place; just the 
      same way, as with /emul/linux on NetBSD)

    Patches are at:

I haven't tested suse64_*, but as it gets more and more outdated each 
day, I think, that there is hardly anyone interested in running it on

*** WARNING FreeBSD users: as FreeBSD-4-STABLE lacks cpio.h, 
*** (FreeBSD-CURRENT is told to has it), 
*** pkgtools/rpm2pkg will not compile. This is not pkgsrc project fault.
*** I have submitted a FreeBSD PR about it, available at 
*** Please fetch:
*** and install it in /usr/include of your system to compile rpm2pkg.