=net-dns/bind-9.4.3_p5 was last bind ebuild I installed on g/fbsd with ACCEPT_KEYWORDS="x86". Ebuilds for newer bind doesn't install because of DEPEND's on sys-libs/libcap and sys-process/psmisc. Reproducible: Always
Created attachment 272411 [details] bind-9.8.0.ebuild With this ebuild I installed =net-dns/bind-9.8.0 on g/fbsd-8.0 with USE="berkdb ipv6 ldap postgres resolvconf ssl threads urandom -dlz -doc -geoip% -gssapi% -idn -mysql -odbc -sdb-ldap% (-selinux) -xml%"
Created attachment 272413 [details, diff] difference from bind-9.8.0.ebuild in tree
Could you find why the package need sys-process/psmisc? Maybe killall or something are used? If so we can change the dependency like ||( sys-process/psmisc sys-freebsd/freebsd-ubin ) and it's much better to use userland_BSD.
(In reply to comment #3) > Could you find why the package need sys-process/psmisc? Maybe killall or > something are used? If so we can change the dependency like ||( > sys-process/psmisc sys-freebsd/freebsd-ubin ) I think because of procfs usage on Linux and so no dependency needed. > and it's much better to use userland_BSD. Now I think better to use kernel_Linux, because procfs is Linux feature, not GNU userland.
psmisc is because of fuser when using chroot.
(In reply to comment #5) > psmisc is because of fuser when using chroot. equery belongs /sbin/fuser * Searching for /sbin/fuser ... sys-process/fuser-bsd-1142334561 (/sbin/fuser) But i can't understand is procfs really needed for that. With CHROOT="/jail/dns" in /etc/conf.d/named `emerge --configure net-dns/bind` made an fstab record: none /jail/dns/proc proc defaults 0 0 which I commented out. `/etc/init.d/named restart` works on the second try, maybe because of this?
> psmisc is because of fuser when using chroot. Thanks. Then psmisc can be replaced with fuser-bsd. Still some patch to init script are requireed, but it works with USE=-threads. I'll check USE=threads case. > But i can't understand is procfs really needed for that. > With CHROOT="/jail/dns" in /etc/conf.d/named `emerge --configure net-dns/bind` > made an fstab record: Sorry, but I don't get what you wrote ... :S I think psmisc is nothing to do with procfs. I've check the code and cannot find a code to add such entry. Even I tryed "emerge --configure bind", but I didn't get such fstab entry.
(In reply to comment #7) > > Sorry, but I don't get what you wrote ... :S I think psmisc is nothing > to do with procfs. # eix -c psmisc [N] sys-process/psmisc (--): A set of tools that use the proc filesystem or, maybe this ebuild has wrong DESCRIPTION? > I've check the code and cannot find a code to add > such entry. Even I tryed "emerge --configure bind", but I didn't get > such fstab entry. My bad, I did `emerge --config bind` and this fstab record appeared with older bind ebuilds: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-dns/bind/bind-9.6.0_p1.ebuild?hideattic=0&view=markup (line 282)
Created attachment 281707 [details, diff] diff for bind-9.8.0_p4 I added sys-process/fuser-bsd to RDEPEND, and kernel_Linux for caps (don't know way better).
Thank you for your patch. Both USE=threads and USE=-threads working with this patch? ... and you can use $(use_enable kernel_linux linux-caps) to replace if use kernel_linux ... fi statements. Also it was my typo to use "kernel_Linux", actually it should be "kernel_linux" (it's confusing! we use "kernel_FreeBSD" and "kernel_Darwin" :S)
Created attachment 281715 [details, diff] diff for bind-9.8.0_p4 Changed USE="kernel_linux" and if use -> $(use_enable. It works on g/fbsd(-7.2) with USE="threads": named started and works. Now I started to emerge on linux.
(In reply to comment #10) > Thank you for your patch. Both USE=threads and USE=-threads working with this > patch? Just tested on linux.
(In reply to comment #10) > Thank you for your patch. Both USE=threads and USE=-threads working with this > patch? Yes. Just tested on g/fbsd-8.2.
Created attachment 281767 [details] build.log for USE="dlz berkdb" =net-dns/bind-9.8.0_p4 also fails to build with USE="dlz berkdb" :( as usual there is a problem with berkdb ).
Created attachment 294303 [details] bind-9.8.1_p1.ebuild.patch Ebuild patch to include db.h from proper path and to add optional dependency. Build and test passed both on Linux and FreeBSD (USE="berkdb dlz ipv6 ssl (-caps) (-gssapi)") bind team, Please take a look at the patch. I'd like to apply the patch if you don't see problems. Thanks,
(In reply to comment #15) > Created attachment 294303 [details] > bind-9.8.1_p1.ebuild.patch > > Ebuild patch to include db.h from proper path and to add optional > dependency. Build and test passed both on Linux and FreeBSD > (USE="berkdb dlz ipv6 ssl (-caps) (-gssapi)") > > bind team, > > Please take a look at the patch. I'd like to apply the patch if you > don't see problems. > > Thanks, The psmisc thingy is fine to me but for DB I'd like to see a patch for bind itself (which we also send to upstream then).
(In reply to comment #16) > The psmisc thingy is fine to me but for DB I'd like to see a patch for bind > itself (which we also send to upstream then). Writing a patch for bind-9.8.1-P1/contrib/dlz/config.dlz.in seems a bit difficult for me. The directory detection working as follow: 1. Check if --with-dlz-bdb[=PATH] is passed or not 2. bdbdirs set to PATH or default "/usr/local /usr/pkg /usr" 3. For each $bdbdirs, try to find if one of these exist - $dir/include/db.h - $dir/include/db42/db.h - $dir/include/db41/db.h - $dir/include/db/db.h 4. If it found db.h, the directory is set to be included Ports/Pkgsrc usually install database/db into /usr/local or /usr/pkg, so it detect database/db's db.h (not FreeBSD's own db.h) However, on Gentoo, we install sys-libs/db into /usr, so that the above code detect /usr/include/db.h which is FreeBSD's own db.h and doesn't have DB_ENV definition. I have no idea how can I rewrite this code to work on Gentoo/FreeBSD without big logic change. Adding --with-bdb-incdir option would be a possible solution, if we accept big change...
(In reply to comment #17) > (In reply to comment #16) > > The psmisc thingy is fine to me but for DB I'd like to see a patch for bind > > itself (which we also send to upstream then). > > Writing a patch for bind-9.8.1-P1/contrib/dlz/config.dlz.in seems > a bit difficult for me. The directory detection working as > follow: > > 1. Check if --with-dlz-bdb[=PATH] is passed or not > 2. bdbdirs set to PATH or default "/usr/local /usr/pkg /usr" > 3. For each $bdbdirs, try to find if one of these exist > - $dir/include/db.h > - $dir/include/db42/db.h > - $dir/include/db41/db.h > - $dir/include/db/db.h > 4. If it found db.h, the directory is set to be included > > Ports/Pkgsrc usually install database/db into /usr/local or > /usr/pkg, so it detect database/db's db.h (not FreeBSD's own > db.h) > > However, on Gentoo, we install sys-libs/db into /usr, so that the > above code detect /usr/include/db.h which is FreeBSD's own db.h > and doesn't have DB_ENV definition. > > I have no idea how can I rewrite this code to work on > Gentoo/FreeBSD without big logic change. Adding --with-bdb-incdir > option would be a possible solution, if we accept big change... Is Gentoo/FreeBSD different than FreeBSD or *BSD? So the BSD guys may have a patch already in their ports.
(In reply to comment #18) > Is Gentoo/FreeBSD different than FreeBSD or *BSD? > So the BSD guys may have a patch already in their ports. Yes, there's a different Gentoo/FreeBSD and FreeBSD. FreeBSD install additional packages into /usr/local and Gentoo/FreeBSD install the things into /usr. There's no patch in ports/pkgsrc, because bind code works well on them without any changes. The code detect /usr/local/include/db.h or /usr/pkg/include/db.h (berkdb package's file) before /usr/include/db.h (BSD base system's file) Only Gentoo/FreeBSD has this problem.
Hm, ok.. Feel free to apply your patch but please also add a reference to this bug. It sounds to me like our fbsd needs some fixes, I wonder if more packages are affected by this bug.
Applied. Thanks. Yes..but as long as FreeBSD db.h stay on /usr/include/db.h, it would be difficult to solve..