| 1 |
$NetBSD: README,v 1.30 2024/03/19 00:59:00 nia Exp $ |
| 2 |
|
| 3 |
0 Introduction |
| 4 |
============== |
| 5 |
|
| 6 |
libnbcompat builds and installs a portable NetBSD-compatibility library |
| 7 |
that supplies routines missing on operating systems that are used by |
| 8 |
the family of pkgsrc bootstrap tools. Note that libnbcompat is very |
| 9 |
much a work-in-progress. Only the functions that are directly used |
| 10 |
by the bootstrap tools are implemented in the library. At the moment, |
| 11 |
this includes the following packages: |
| 12 |
|
| 13 |
archivers/pax |
| 14 |
pkgtools/mtree |
| 15 |
pkgtools/pkg_install |
| 16 |
textproc/nbsed |
| 17 |
|
| 18 |
A script, src2nbcompat, is also included in the sources that simplifies |
| 19 |
importing software from the NetBSD src module into pkgsrc. |
| 20 |
|
| 21 |
|
| 22 |
1 Updating this package |
| 23 |
======================= |
| 24 |
|
| 25 |
Please take care when updating this package. Do *not* simply commit |
| 26 |
changes to this package and ask for testers. This package is too |
| 27 |
fundamental to the proper bootstrapping of pkgsrc to let accidental |
| 28 |
breakage seep in. Proper methodology for updating this package is: |
| 29 |
|
| 30 |
(1) Post a tarball at a publicly accessible URL containing the |
| 31 |
pkgtools/libnbcompat directory. |
| 32 |
|
| 33 |
(2) Ask on the [email protected] mailing list for testers. |
| 34 |
|
| 35 |
(3) Fix any breakage on non-NetBSD operating systems before |
| 36 |
committing. |
| 37 |
|
| 38 |
|
| 39 |
2 Tested operating systems |
| 40 |
========================== |
| 41 |
|
| 42 |
*NOTE* |
| 43 |
*NOTE* This section should be kept up-to-date with the results for |
| 44 |
*NOTE* the most recent libnbcompat. |
| 45 |
*NOTE* |
| 46 |
|
| 47 |
libnbcompat-20240319 has been tested to build and install correctly |
| 48 |
on the following operating systems: |
| 49 |
|
| 50 |
NetBSD/amd64 10.0 <[email protected]> |
| 51 |
Darwin/powerpc 8.11.0 <[email protected]> |
| 52 |
|
| 53 |
libnbcompat-20231109 has been tested to build and install correctly |
| 54 |
on the following operating systems: |
| 55 |
|
| 56 |
NetBSD/amd64 10.0 RC1 <[email protected]> |
| 57 |
Darwin/powerpc 8.11.0 <[email protected]> |
| 58 |
|
| 59 |
libnbcompat-20230904 has been tested to build and install correctly |
| 60 |
on the following operating systems: |
| 61 |
|
| 62 |
Darwin-22.6.0-aarch64 <[email protected]> |
| 63 |
SunOS-5.11-i386 <[email protected]> |
| 64 |
SunOS-5.11-x86_64 <[email protected]> |
| 65 |
|
| 66 |
libnbcompat-20230609 has been tested to build and install correctly |
| 67 |
on the following operating systems: |
| 68 |
|
| 69 |
NetBSD/amd64 9.2 <[email protected]> |
| 70 |
|
| 71 |
libnbcompat-20200524 has been tested to build and install correctly |
| 72 |
on the following operating systems: |
| 73 |
|
| 74 |
NetBSD/amd64 9.0 <[email protected]> |
| 75 |
Alpine Linux 3.11.6 x86_64 <[email protected]> |
| 76 |
IRIX 6.5.22, mipspro 7.4.3 <[email protected]> |
| 77 |
|
| 78 |
libnbcompat-20190608 has been tested to build and install correctly |
| 79 |
on the following operating systems: |
| 80 |
|
| 81 |
NetBSD/amd64 8.99.49 <[email protected]> |
| 82 |
Darwin/powerpc 8.11.0 <[email protected]> |
| 83 |
FreeBSD/amd64 13-CURRENT <[email protected]> |
| 84 |
|
| 85 |
libnbcompat-20150419 has been tested to build and install correctly |
| 86 |
on the following operating systems: |
| 87 |
|
| 88 |
NetBSD/i386 5.2.3 <[email protected]> |
| 89 |
HP-UX/hppa 11.11 <[email protected]> |
| 90 |
|
| 91 |
libnbcompat-20140725 has been tested to build and install correctly |
| 92 |
on the following operating systems: |
| 93 |
|
| 94 |
Ubuntu GNU/Linux/amd64 12.04 <[email protected]> |
| 95 |
CentOS Linux/amd64 6.5 <[email protected]> |
| 96 |
CentOS Linux/amd64 6.6 <[email protected]> |
| 97 |
CentOS Linux/amd64 7.0 <[email protected]> |
| 98 |
OpenBSD/sparc64 5.5 <[email protected]> |
| 99 |
OpenBSD/sparc64 5.6 <[email protected]> |
| 100 |
FreeBSD/amd64 10.1 <[email protected]> |
| 101 |
|
| 102 |
libnbcompat-20130908 has been tested to build and install correctly |
| 103 |
on the following operating systems: |
| 104 |
|
| 105 |
Debian GNU/kFreeBSD/amd64 7.1 <[email protected]> |
| 106 |
Sun Solaris/amd64 10u8 <[email protected]> |
| 107 |
NetBSD/amd64 6.99.23 <[email protected]> |
| 108 |
FreeBSD/amd64 9.1 <[email protected]> |
| 109 |
OpenBSD/amd64 5.3 <[email protected]> |
| 110 |
DragonFly/amd64 3.4.1 <[email protected]> |
| 111 |
Debian GNU/Linux/amd64 7.1 <[email protected]> |
| 112 |
CentOS Linux/amd64 6.5 <[email protected]> |
| 113 |
OpenBSD/sparc64 5.5 <[email protected]> |
| 114 |
|
| 115 |
libnbcompat-20070721 has been tested to build and install correctly |
| 116 |
on the following operating systems: |
| 117 |
|
| 118 |
HPUX-11.11-hppa <[email protected]> |
| 119 |
Interix-3.5-i586 <[email protected]> |
| 120 |
|
| 121 |
libnbcompat-20070531 has been tested to build and install correctly |
| 122 |
on the following operating systems: |
| 123 |
|
| 124 |
SunOS-5.10-sparc <[email protected]> |
| 125 |
NetBSD-3.0-i386 <[email protected]> |
| 126 |
IRIX-6.5-mips <[email protected]> |
| 127 |
|
| 128 |
libnbcompat-20070507 has been tested to build and install correctly. |
| 129 |
|
| 130 |
libnbcompat-20041024 has been tested to build and install correctly |
| 131 |
on the following operating systems: |
| 132 |
|
| 133 |
FreeBSD-4.11/i386 <[email protected]> |
| 134 |
FreeBSD-6.1/amd64 <[email protected]> |
| 135 |
Darwin-8.3/powerpc <[email protected]> |
| 136 |
IRIX-5.3/mipseb <[email protected]> |
| 137 |
IRIX-6.5/mipseb <[email protected]> |
| 138 |
Linux/i386 <[email protected]> |
| 139 |
RHEL4 Linux 2.6/i386 <[email protected]> |
| 140 |
Tru64 UNIX 5.1B-2/alpha <[email protected]> |
| 141 |
|
| 142 |
libnbcompat-20040911 has been tested to build and install correctly |
| 143 |
on the following operating systems: |
| 144 |
|
| 145 |
FreeBSD-4.8/i386 <[email protected]> |
| 146 |
NetBSD-1.6.2/i386 <[email protected]> |
| 147 |
Solaris 9/sparc <[email protected]> |
| 148 |
|
| 149 |
3 Usage |
| 150 |
======= |
| 151 |
|
| 152 |
This library is intended to simplify porting NetBSD software. To that |
| 153 |
end, the changes to NetBSD sources to use libnbcompat are minor. The |
| 154 |
procedure is: |
| 155 |
|
| 156 |
(1) Add #include <nbcompat.h> at the top of the source files that |
| 157 |
include system headers, but below the inclusion of any |
| 158 |
"config.h". |
| 159 |
|
| 160 |
(2) Surround each system header file included in the source file |
| 161 |
with #if HAVE_<header_name>_H ... #endif. |
| 162 |
|
| 163 |
You may need to add additional headers present on other operating |
| 164 |
systems that define any system-supplied functions, e.g. <sys/vfs.h>. |
| 165 |
|
| 166 |
The src2nbcompat script included in the libncompat sources can be used |
| 167 |
to automate this process to some extent. It is intended to import |
| 168 |
sources from a NetBSD src checkout into pkgsrc. It will copy the |
| 169 |
sources from a directory and automatically insert the proper lines |
| 170 |
into the files. For example, to import the pkg_install sources into |
| 171 |
pkgsrc, run: |
| 172 |
|
| 173 |
src2nbcompat \ |
| 174 |
/usr/src/usr.sbin/pkg_install \ |
| 175 |
/usr/pkgsrc/pkgtools/pkg_install/files |
| 176 |
|
| 177 |
You will need to run a "cvs diff" on the imported files to check that |
| 178 |
any local changes are preserved across imports. |