Subject: pkg/23900: suse_linux doesn't install on FreeBSD; fixes attached
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <dotz@irc.pl>
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
>Closed-Date:
>Last-Modified:
>Originator: Michal Pasternak
>Release: N/A
>Organization:
>Environment:
FreeBSD mainframe.w.lub.pl 4.9-STABLE FreeBSD 4.9-STABLE #0: Thu Dec 25 12:02:15 CET 2003 doc@mainframe.w.lub.pl:/usr/obj/usr/src/sys/MP-UX i386
>Description:
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.
>How-To-Repeat:
Obvious.
>Fix:
1) first it was obvious, that I need to update ONLY_FOR_PLATFORM:
http://doc.safenet.pl/suse_linux.freebsd/pkgsrc_emulators.diff
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 defs.FreeBSD.mk 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 ld-linux.so.2 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:
http://doc.safenet.pl/suse_linux.freebsd/pkgsrc_emulators_2.diff
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
FreeBSD.
*** 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
*** http://www.freebsd.org/cgi/query-pr.cgi?pr=60597
***
*** Please fetch:
*** http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/include/cpio.h?rev=1.2&content-type=text/plain
*** and install it in /usr/include of your system to compile rpm2pkg.
>Release-Note:
>Audit-Trail:
>Unformatted: