Bug#910252: ITP: libnbcompat -- NetBSD compatibility library
On Sat, Oct 06 2018, Guillem Jover wrote: > I see the packages have already gone through NEW, so I've taken a > look. And I've almost got mtree-netbsd building using just libmd and > libbsd. I'll be releasing new upstream versions fixing or adding the > missing stuff: > > - libmd had bogus compat macros for SHA512, and missing ones for > SHA384. Hah - I was wondering about SHA512_File. Looked odd to me, but I figured something else must have that interface. > - libbsd is missing the pwcache modules from the BSDs, which I'll > be adding. > - libbsd is missing a that implicitly includes > , I'll be adding that. > > Then I've got some minimal patches for mtree-netbsd, which fix or improve > things there, that I'll be sending your way once I've finished with the > above. At which point I think it would be nice to drop libnbcompat > completely? That would be great, especially if the mtree patches really are minimal. > I really think libnbcompat should be completely unnecessary. :) And if > there'd be new features required my mtree-netbsd in the future I'm > always happy to consider new additions to these libraries if they make > sense! Sounds great. Appreciate it! - John > > Thanks, > Guillem
Bug#910252: ITP: libnbcompat -- NetBSD compatibility library
Hi! On Thu, 2018-10-04 at 08:28:57 -0500, John Goerzen wrote: > On Thu, Oct 04 2018, Guillem Jover wrote: > > Hmm, what does this library provide that is required by mtree-netbsd not > > available in glibc, libbsd and libmd? Perhaps even freebsd-glue? > > > > I've skimmed over the functionality and it seems most of it is already > > covered by those. If there's still stuff needed I'm always happy to add > > it to libbsd or libmd as required! > You are correct that the functionality is generally available. The > problem is that the interfaces are different. nbconfig.h, for instance, > defines a number of HAVE_* macros that are used while building mtree. > nbconfig.h includes a number of system header files (stdio.h, etc.) that > cause *numerous* build errors if missing. There are also functions for > things like hashing files that take different numbers of parameters, > etc. I see the packages have already gone through NEW, so I've taken a look. And I've almost got mtree-netbsd building using just libmd and libbsd. I'll be releasing new upstream versions fixing or adding the missing stuff: - libmd had bogus compat macros for SHA512, and missing ones for SHA384. - libbsd is missing the pwcache modules from the BSDs, which I'll be adding. - libbsd is missing a that implicitly includes , I'll be adding that. Then I've got some minimal patches for mtree-netbsd, which fix or improve things there, that I'll be sending your way once I've finished with the above. At which point I think it would be nice to drop libnbcompat completely? The point of creating libmd and libbsd and switching projects to use those, was to have such BSD compatibility library in a single place which can be fixed centrallly, and to reduce embedded code copies. So adding yet similar library would make the situation confusing and might distract from such unifiying efforts. :) > I also considered, for a bit, whether to even make libnbcompat be a > separate package. I concluded yes, because: > > 1) It has its own standalone configure, > > 2) It must be configured and built before mtree can be configured, > > 3) Even on NetBSD, mtree requires libnbcompat to build (the #include > is not wrapped inside any conditional macro) > > Because of #1 and #2, just including it in mtree itself would cause the > build system to somewhat violate the usual principles of how to build. I really think libnbcompat should be completely unnecessary. :) And if there'd be new features required my mtree-netbsd in the future I'm always happy to consider new additions to these libraries if they make sense! Thanks, Guillem
Bug#910252: ITP: libnbcompat -- NetBSD compatibility library
On Thu, Oct 04 2018, Guillem Jover wrote: > Hmm, what does this library provide that is required by mtree-netbsd not > available in glibc, libbsd and libmd? Perhaps even freebsd-glue? > > I've skimmed over the functionality and it seems most of it is already > covered by those. If there's still stuff needed I'm always happy to add > it to libbsd or libmd as required! Hi Guillem and Andrej, Thanks for your interest in this! You are correct that the functionality is generally available. The problem is that the interfaces are different. nbconfig.h, for instance, defines a number of HAVE_* macros that are used while building mtree. nbconfig.h includes a number of system header files (stdio.h, etc.) that cause *numerous* build errors if missing. There are also functions for things like hashing files that take different numbers of parameters, etc. I also considered, for a bit, whether to even make libnbcompat be a separate package. I concluded yes, because: 1) It has its own standalone configure, 2) It must be configured and built before mtree can be configured, 3) Even on NetBSD, mtree requires libnbcompat to build (the #include is not wrapped inside any conditional macro) Because of #1 and #2, just including it in mtree itself would cause the build system to somewhat violate the usual principles of how to build. It may also be of interest that FreeBSD recently imported NetBSD's mtree into their contrib tree, and switched their default mtree to NetBSD's. They still have the FreeBSD mtree (named fmtree, dovetailing nicely with freebsd-buildutils). I examined it for packaging instead of the one from the NetBSD tree. They don't use nbcompat, and ripped all of the things from nbcompat.h out (adding many #includes to their .c files, making FreeBSD-specific assumptions, etc.) They pulled out autoconf entirely. Basically, theirs is less portable, won't trivially track the NetBSD source, and will likely require more work to maintain over the long term. -- John
Bug#910252: ITP: libnbcompat -- NetBSD compatibility library
Hi, On Thu, 4 Oct 2018 at 03:57, John Goerzen wrote: > * Package name: libnbcompat > Version : 20180822 > Upstream Author : Joerg Sonnenberger and the NetBSD > PRoject > * URL : > http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/pkgtools/libnbcompat/README.html > * License : BSD > Programming Lang: C > Description : NetBSD compatibility library > > libnbcompat is designed to let non-NetBSD operating systems execute code > that is part of the NetBSD pkgsrc repository. It is, in particular, > required for building the NetBSD mtree, which has some distinct advantages > over the FreeBSD mtree already in the Debian repos and is being adopted > by FreeBSD. I’m curious what parts of libnbcompat does it use? Is it possible that you can link it against libbsd already in Debian? -- Cheers, Andrej
Bug#910252: ITP: libnbcompat -- NetBSD compatibility library
Hi! On Wed, 2018-10-03 at 20:57:30 -0500, John Goerzen wrote: > Package: wnpp > Severity: wishlist > Owner: John Goerzen > * Package name: libnbcompat > Version : 20180822 > Upstream Author : Joerg Sonnenberger and the NetBSD > PRoject > * URL : > http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/pkgtools/libnbcompat/README.html > * License : BSD > Programming Lang: C > Description : NetBSD compatibility library > > libnbcompat is designed to let non-NetBSD operating systems execute code > that is part of the NetBSD pkgsrc repository. It is, in particular, > required for building the NetBSD mtree, which has some distinct advantages > over the FreeBSD mtree already in the Debian repos and is being adopted > by FreeBSD. Hmm, what does this library provide that is required by mtree-netbsd not available in glibc, libbsd and libmd? Perhaps even freebsd-glue? I've skimmed over the functionality and it seems most of it is already covered by those. If there's still stuff needed I'm always happy to add it to libbsd or libmd as required! Thanks, Guillem
Bug#910252: ITP: libnbcompat -- NetBSD compatibility library
Package: wnpp Severity: wishlist Owner: John Goerzen * Package name: libnbcompat Version : 20180822 Upstream Author : Joerg Sonnenberger and the NetBSD PRoject * URL : http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/pkgtools/libnbcompat/README.html * License : BSD Programming Lang: C Description : NetBSD compatibility library libnbcompat is designed to let non-NetBSD operating systems execute code that is part of the NetBSD pkgsrc repository. It is, in particular, required for building the NetBSD mtree, which has some distinct advantages over the FreeBSD mtree already in the Debian repos and is being adopted by FreeBSD.