From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 12:26:52 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F48D106564A; Sun, 26 Aug 2012 12:26:52 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id D9BF68FC0A; Sun, 26 Aug 2012 12:26:51 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 3D586358C54; Sun, 26 Aug 2012 14:26:50 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 195382847B; Sun, 26 Aug 2012 14:26:50 +0200 (CEST) Date: Sun, 26 Aug 2012 14:26:50 +0200 From: Jilles Tjoelker To: CyberLeo Kitsana Message-ID: <20120826122649.GA8995@stack.nl> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50396113.3080607@cyberleo.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: ports@FreeBSD.org, Steve Wills , Baptiste Daroussin , Doug Barton , current@FreeBSD.org Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 12:26:52 -0000 On Sat, Aug 25, 2012 at 06:34:43PM -0500, CyberLeo Kitsana wrote: > On 08/24/2012 07:01 PM, Baptiste Daroussin wrote: > > Can anyone give me he details on the security related problem? > Off the top of my head, it seems to represent a break in the chain of > trust: how does the bootstrapper verify that the tarball it just > downloaded to bootstrap pkg is genuine, and not, for example, a > trojan? The source in usr.sbin/pkg/pkg.c[1] doesn't seem to suggest it > cares. Indeed it does not care, and the current security features are insufficient (unless the bootstrapper can use the signed sqlite db to verify the pkg package). I think the fix is to modify 'pkg repo' so it detects the pkg package and creates a separate signature for it which can be verified by the bootstrapper, without needing sqlite. The public key for this signature will have to be distributed with base (like the public keys for freebsd-update and portsnap). -- Jilles Tjoelker From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 12:58:50 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7429E106566B; Sun, 26 Aug 2012 12:58:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 399198FC0A; Sun, 26 Aug 2012 12:58:50 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7QCwoOX005341; Sun, 26 Aug 2012 12:58:50 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7QCwn2B005340; Sun, 26 Aug 2012 12:58:49 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Sun, 26 Aug 2012 14:58:47 +0200 From: Baptiste Daroussin To: Jilles Tjoelker Message-ID: <20120826125846.GD37534@ithaqua.etoilebsd.net> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jL2BoiuKMElzg3CS" Content-Disposition: inline In-Reply-To: <20120826122649.GA8995@stack.nl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: CyberLeo Kitsana , ports@FreeBSD.org, Doug Barton , current@FreeBSD.org, Steve Wills Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 12:58:50 -0000 --jL2BoiuKMElzg3CS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 26, 2012 at 02:26:50PM +0200, Jilles Tjoelker wrote: > On Sat, Aug 25, 2012 at 06:34:43PM -0500, CyberLeo Kitsana wrote: > > On 08/24/2012 07:01 PM, Baptiste Daroussin wrote: > > > Can anyone give me he details on the security related problem? >=20 > > Off the top of my head, it seems to represent a break in the chain of > > trust: how does the bootstrapper verify that the tarball it just > > downloaded to bootstrap pkg is genuine, and not, for example, a > > trojan? The source in usr.sbin/pkg/pkg.c[1] doesn't seem to suggest it > > cares. >=20 > Indeed it does not care, and the current security features are > insufficient (unless the bootstrapper can use the signed sqlite db to > verify the pkg package). >=20 > I think the fix is to modify 'pkg repo' so it detects the pkg package > and creates a separate signature for it which can be verified by the > bootstrapper, without needing sqlite. >=20 > The public key for this signature will have to be distributed with base > (like the public keys for freebsd-update and portsnap). >=20 The is the longer plan but this with also true with pkg_add -r, and the pkg bootstrap may it be pkg-bootstrap or /usr/sbin/pkg. We have been discussing= with Security officers and we are waiting for the plan being written and setup by them, so we can improved security in both pkgng and the bootstrap. This sho= uld have happen in BSDCan, but lack of time from everyone, didn't made it happe= n, we are now aiming at Cambridge DevSummit for that. Given that such a security issue is already in with the current pkg_* tools= , it was accepting that we can still go that way until the policy is written, gi= ven that the final goal is to have the pkgng package checked against a signatur= e. regards, Bapt --jL2BoiuKMElzg3CS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlA6HYYACgkQ8kTtMUmk6EzvzQCgltM9CLmaMutowIChrWpW5VAV lPoAoLD8owvCwwd5+uYNfA8q6X1ygxbZ =dloA -----END PGP SIGNATURE----- --jL2BoiuKMElzg3CS-- From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 16:52:13 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7534106564A; Sun, 26 Aug 2012 16:52:13 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 492BC8FC16; Sun, 26 Aug 2012 16:52:12 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 11E257300B; Sun, 26 Aug 2012 19:11:26 +0200 (CEST) Date: Sun, 26 Aug 2012 19:11:26 +0200 From: Luigi Rizzo To: Alan Cox Message-ID: <20120826171126.GA40672@onelab2.iet.unipi.it> References: <20120822120105.GA63763@onelab2.iet.unipi.it> <20120823163145.GA3999@onelab2.iet.unipi.it> <50366398.2070700@rice.edu> <20120823174504.GB4820@onelab2.iet.unipi.it> <50371485.1020409@rice.edu> <20120824145708.GA16557@onelab2.iet.unipi.it> <5037A803.6030100@rice.edu> <20120824165428.GA17495@onelab2.iet.unipi.it> <5037B226.3000103@rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5037B226.3000103@rice.edu> User-Agent: Mutt/1.4.2.3i Cc: alc@freebsd.org, current@freebsd.org Subject: Re: less aggressive contigmalloc ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 16:52:13 -0000 On Fri, Aug 24, 2012 at 11:56:06AM -0500, Alan Cox wrote: > On 08/24/2012 11:54, Luigi Rizzo wrote: > >On Fri, Aug 24, 2012 at 11:12:51AM -0500, Alan Cox wrote: > >>On 08/24/2012 09:57, Luigi Rizzo wrote: > >>>On Fri, Aug 24, 2012 at 12:43:33AM -0500, Alan Cox wrote: > >>>>On 08/23/2012 12:45, Luigi Rizzo wrote: > >>>>>On Thu, Aug 23, 2012 at 12:08:40PM -0500, Alan Cox wrote: > >>>>>... > >>>>>>>yes i do see that. > >>>>>>> > >>>>>>>Maybe less aggressive with M_NOWAIT but still kills processes. > >>>>>>Are you compiling world with MALLOC_PRODUCTION? The latest version of > >>>>>whatever the default is. But: > >>>>> > >>>>>>jemalloc uses significantly more memory when debugging options are > >>>>>>enabled. This first came up in a thread titled "10-CURRENT and swap > >>>>>>usage" back in June. > >>>>>> > >>>>>>Even at its most aggressive, M_WAITOK, contigmalloc() does not > >>>>>>directly > >>>>>>kill processes. If process death coincides with the use of > >>>>>>contigmalloc(), then it is simply the result of earlier, successful > >>>>>>contigmalloc() calls, or for that matter any other physical memory > >>>>>>allocation calls, having depleted the pool of free pages to the point > >>>>>>that the page daemon runs and invokes vm_pageout_oom(). > >>>>>does it mean that those previous allocations relied on memory > >>>>>overbooking ? > >>>>Yes. > >>>> > >>>>>Is there a way to avoid that, then ? > >>>>I believe that malloc()'s default minimum allocation size is 4MB. You > >>>>could reduce that. > >>>> > >>>>Alternatively, you can enable MALLOC_PRODUCTION. > >>>i tried this, and as others mentioned it makes life > >>>better and reduces the problem but contigmalloc still triggers > >>>random process kills. > >>I would be curious to see a stack backtrace when vm_pageout_oom() is > >>called. > >you mean a backtrace of the process(es) that get killed ? > > No, a backtrace showing who called vm_pageout_oom(). Simply add a > kdb_backtrace() call at the start of vm_pageout_oom(). There are two > possibilities. I want to know which it is. this is dmesg when I add kdb_backtrace() at the start of vm_pageout_oom() The '... netmap_finalize_obj_allocator... are from my calls to contigmalloc, each one doing one-page allocations. I get 7-8 'KDB: stack backtrace' blocks, then allocations restart successfully, then more failures... The reference to fork_exit() does not seem right, because i am in a block where i call contigmalloc, so the caller of vm_pageout_grow_cache() should be kmem_alloc_contig(). 630.004926 netmap_finalize_obj_allocator [593] cluster at 8910 ok 630.005563 netmap_finalize_obj_allocator [593] cluster at 8912 ok 630.006077 netmap_finalize_obj_allocator [593] cluster at 8914 ok KDB: stack backtrace: X_db_sym_numargs() at X_db_sym_numargs+0x1aa vm_pageout_oom() at vm_pageout_oom+0x19 vm_pageout_grow_cache() at vm_pageout_grow_cache+0xd01 fork_exit() at fork_exit+0x11c fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffff8005f12cb0, rbp = 0 --- KDB: stack backtrace: X_db_sym_numargs() at X_db_sym_numargs+0x1aa vm_pageout_oom() at vm_pageout_oom+0x19 vm_pageout_grow_cache() at vm_pageout_grow_cache+0xd01 fork_exit() at fork_exit+0x11c fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffff8005f12cb0, rbp = 0 --- ... Some of the processes must be 'getty' because i also find this line in dmesg: <118>Aug 26 16:47:11 init: getty repeating too quickly on port /dev/ttyv7, sleep ing 30 secs cheers luigi From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 18:34:09 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 26D17106566B; Sun, 26 Aug 2012 18:34:09 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id CA49914DBB5; Sun, 26 Aug 2012 18:34:08 +0000 (UTC) Message-ID: <503A6C20.7090605@FreeBSD.org> Date: Sun, 26 Aug 2012 11:34:08 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Julien Laffaye References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <785B5BAD-E015-4624-B3A1-D05E1BD97E51@freebsd.org> <5AC662AA-4874-4BC2-9862-65518B79B840@freebsd.org> <5036EE2E.4040606@FreeBSD.org> <5037F8BB.9020501@FreeBSD.org> <50389FC0.50102@freebsd.org> In-Reply-To: <50389FC0.50102@freebsd.org> X-Enigmail-Version: 1.4.3 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org, Eitan Adler , Baptiste Daroussin , current@freebsd.org, Steve Wills Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 18:34:09 -0000 On 08/25/2012 02:49, Julien Laffaye wrote: > True. But when you create jails without the installer, you have to > install pkgng by hand. Just like all the other ports you have to install in a jail. -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909) From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 18:37:03 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FC571065673; Sun, 26 Aug 2012 18:37:03 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EDBAA8FC08; Sun, 26 Aug 2012 18:37:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7QIb2BN047085; Sun, 26 Aug 2012 18:37:02 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7QIb2PM047084; Sun, 26 Aug 2012 18:37:02 GMT (envelope-from bapt@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@freebsd.org using -f Date: Sun, 26 Aug 2012 20:37:00 +0200 From: Baptiste Daroussin To: Doug Barton Message-ID: <20120826183700.GA42842@ithaqua.etoilebsd.net> References: <785B5BAD-E015-4624-B3A1-D05E1BD97E51@freebsd.org> <5AC662AA-4874-4BC2-9862-65518B79B840@freebsd.org> <5036EE2E.4040606@FreeBSD.org> <5037F8BB.9020501@FreeBSD.org> <50389FC0.50102@freebsd.org> <503A6C20.7090605@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline In-Reply-To: <503A6C20.7090605@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: ports@freebsd.org, Eitan Adler , current@freebsd.org, Steve Wills , Julien Laffaye Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 18:37:03 -0000 --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 26, 2012 at 11:34:08AM -0700, Doug Barton wrote: > On 08/25/2012 02:49, Julien Laffaye wrote: > > True. But when you create jails without the installer, you have to > > install pkgng by hand.=20 >=20 > Just like all the other ports you have to install in a jail. >=20 >=20 > --=20 >=20 > I am only one, but I am one. I cannot do everything, but I can do > something. And I will not let what I cannot do interfere with what > I can do. > -- Edward Everett Hale, (1822 - 1909) We are speaking about binary only packages, not ports. regards, Bapt --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlA6bMwACgkQ8kTtMUmk6EyXcwCbBJAoxCdggUcGTbh4oWoC3ef5 /y4An02qXfExhKXpMxo6YD1wo0phjAWu =5qEq -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe-- From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 18:39:01 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 1890B106566C; Sun, 26 Aug 2012 18:39:01 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id D349A14E3B4; Sun, 26 Aug 2012 18:39:00 +0000 (UTC) Message-ID: <503A6D44.70708@FreeBSD.org> Date: Sun, 26 Aug 2012 11:39:00 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Baptiste Daroussin References: <785B5BAD-E015-4624-B3A1-D05E1BD97E51@freebsd.org> <5AC662AA-4874-4BC2-9862-65518B79B840@freebsd.org> <5036EE2E.4040606@FreeBSD.org> <5037F8BB.9020501@FreeBSD.org> <50389FC0.50102@freebsd.org> <503A6C20.7090605@FreeBSD.org> <20120826183700.GA42842@ithaqua.etoilebsd.net> In-Reply-To: <20120826183700.GA42842@ithaqua.etoilebsd.net> X-Enigmail-Version: 1.4.3 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org, Eitan Adler , current@freebsd.org, Steve Wills , Julien Laffaye Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 18:39:01 -0000 On 08/26/2012 11:37, Baptiste Daroussin wrote: > On Sun, Aug 26, 2012 at 11:34:08AM -0700, Doug Barton wrote: >> On 08/25/2012 02:49, Julien Laffaye wrote: >>> True. But when you create jails without the installer, you have >>> to install pkgng by hand. >> >> Just like all the other ports you have to install in a jail. > > We are speaking about binary only packages, not ports. Um, duh. I have a bad habit of using the terms interchangeably, sorry if I caused confusion. Doesn't change my actual point though. -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909) From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 18:39:07 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 8D43B1065673; Sun, 26 Aug 2012 18:39:07 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 5D80C14FFEC; Sun, 26 Aug 2012 18:39:07 +0000 (UTC) Message-ID: <503A6D4B.9070606@FreeBSD.org> Date: Sun, 26 Aug 2012 11:39:07 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Baptiste Daroussin References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> In-Reply-To: <20120826125846.GD37534@ithaqua.etoilebsd.net> X-Enigmail-Version: 1.4.3 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: CyberLeo Kitsana , ports@FreeBSD.org, current@FreeBSD.org, Jilles Tjoelker , Steve Wills Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 18:39:07 -0000 On 08/26/2012 05:58, Baptiste Daroussin wrote: > The is the longer plan but this with also true with pkg_add -r, and the pkg > bootstrap may it be pkg-bootstrap or /usr/sbin/pkg. We have been discussing with > Security officers and we are waiting for the plan being written and setup by > them, so we can improved security in both pkgng and the bootstrap. This should > have happen in BSDCan, but lack of time from everyone, didn't made it happen, we > are now aiming at Cambridge DevSummit for that. It would be nice if this were in place before 10-current shifted to pkg by default in order to limit the number of times that we have to start testing over from scratch. > Given that such a security issue is already in with the current pkg_* tools, it > was accepting that we can still go that way until the policy is written, given > that the final goal is to have the pkgng package checked against a signature. This isn't the security issue I was talking about by having sbin/pkg pass every command line to local/sbin/pkg. You keep saying that you have no objections to changing the name. I am asking you to do that. I don't care if it is pkg-bootstrap or something else you like better. But please change the name to not be pkg, and limit the functionality of the tool to bootstrapping the pkg package. Doug -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909) From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 18:58:14 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E41E51065670; Sun, 26 Aug 2012 18:58:14 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A85A18FC12; Sun, 26 Aug 2012 18:58:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7QIwErI049363; Sun, 26 Aug 2012 18:58:14 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7QIwDCJ049362; Sun, 26 Aug 2012 18:58:13 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Sun, 26 Aug 2012 20:58:11 +0200 From: Baptiste Daroussin To: Doug Barton Message-ID: <20120826185810.GB42842@ithaqua.etoilebsd.net> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> <503A6D4B.9070606@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="b5gNqxB1S1yM7hjW" Content-Disposition: inline In-Reply-To: <503A6D4B.9070606@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: CyberLeo Kitsana , ports@FreeBSD.org, current@FreeBSD.org, Jilles Tjoelker , Steve Wills Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 18:58:15 -0000 --b5gNqxB1S1yM7hjW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 26, 2012 at 11:39:07AM -0700, Doug Barton wrote: > On 08/26/2012 05:58, Baptiste Daroussin wrote: >=20 > > The is the longer plan but this with also true with pkg_add -r, and the= pkg > > bootstrap may it be pkg-bootstrap or /usr/sbin/pkg. We have been discus= sing with > > Security officers and we are waiting for the plan being written and set= up by > > them, so we can improved security in both pkgng and the bootstrap. This= should > > have happen in BSDCan, but lack of time from everyone, didn't made it h= appen, we > > are now aiming at Cambridge DevSummit for that. >=20 > It would be nice if this were in place before 10-current shifted to pkg > by default in order to limit the number of times that we have to start > testing over from scratch. >=20 > > Given that such a security issue is already in with the current pkg_* t= ools, it > > was accepting that we can still go that way until the policy is written= , given > > that the final goal is to have the pkgng package checked against a sign= ature. >=20 > This isn't the security issue I was talking about by having sbin/pkg > pass every command line to local/sbin/pkg. >=20 > You keep saying that you have no objections to changing the name. I am > asking you to do that. I don't care if it is pkg-bootstrap or something > else you like better. But please change the name to not be pkg, and > limit the functionality of the tool to bootstrapping the pkg package. >=20 I received more feedback about keep pkg and changing it to pkg-bootstrap, so what should I do, changing it because you are asking for = it? regards, Bapt --b5gNqxB1S1yM7hjW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlA6ccIACgkQ8kTtMUmk6Ey+JgCeOBqntL58TvOm3ouTgKL9Rv2v B6oAn3jxzQQsbf4gha+0JLI6+eXZbfvM =9OiR -----END PGP SIGNATURE----- --b5gNqxB1S1yM7hjW-- From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 19:08:49 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 8F65A106564A; Sun, 26 Aug 2012 19:08:49 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 65B1F14D839; Sun, 26 Aug 2012 19:08:48 +0000 (UTC) Message-ID: <503A7440.5050703@FreeBSD.org> Date: Sun, 26 Aug 2012 12:08:48 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Baptiste Daroussin References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> <503A6D4B.9070606@FreeBSD.org> <20120826185810.GB42842@ithaqua.etoilebsd.net> In-Reply-To: <20120826185810.GB42842@ithaqua.etoilebsd.net> X-Enigmail-Version: 1.4.3 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: CyberLeo Kitsana , ports@FreeBSD.org, current@FreeBSD.org, Jilles Tjoelker , Steve Wills Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 19:08:49 -0000 On 08/26/2012 11:58, Baptiste Daroussin wrote: > On Sun, Aug 26, 2012 at 11:39:07AM -0700, Doug Barton wrote: >> On 08/26/2012 05:58, Baptiste Daroussin wrote: >> >>> The is the longer plan but this with also true with pkg_add -r, and the pkg >>> bootstrap may it be pkg-bootstrap or /usr/sbin/pkg. We have been discussing with >>> Security officers and we are waiting for the plan being written and setup by >>> them, so we can improved security in both pkgng and the bootstrap. This should >>> have happen in BSDCan, but lack of time from everyone, didn't made it happen, we >>> are now aiming at Cambridge DevSummit for that. >> >> It would be nice if this were in place before 10-current shifted to pkg >> by default in order to limit the number of times that we have to start >> testing over from scratch. >> >>> Given that such a security issue is already in with the current pkg_* tools, it >>> was accepting that we can still go that way until the policy is written, given >>> that the final goal is to have the pkgng package checked against a signature. >> >> This isn't the security issue I was talking about by having sbin/pkg >> pass every command line to local/sbin/pkg. >> >> You keep saying that you have no objections to changing the name. I am >> asking you to do that. I don't care if it is pkg-bootstrap or something >> else you like better. But please change the name to not be pkg, and >> limit the functionality of the tool to bootstrapping the pkg package. >> > > I received more feedback about keep pkg As far as I could tell the people who responded that way don't seem to be aware that every command to /usr/local/sbin/pkg is going to pass through /usr/sbin/pkg. On its face, that is a bad idea for many reasons, not the least of which is that it adds complexity where that complexity does not need to be. The larger problem with that approach is that gives an attacker 2 places to compromise the package installation process instead of just 1. This becomes even more important if the pkg bootstrap tool is the place that the public key for the digital signature is located. > and changing it to > pkg-bootstrap, so what should I do, changing it because you are asking for it? A) You said you had no objections to changing it B) I'm not the only one asking Doug -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909) From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 19:08:50 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 60D571065670; Sun, 26 Aug 2012 19:08:50 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2828FC08; Sun, 26 Aug 2012 19:08:36 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id q7QJ8ZCA068657; Sun, 26 Aug 2012 13:08:35 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q7QJ8WjL029341; Sun, 26 Aug 2012 13:08:32 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Baptiste Daroussin In-Reply-To: <20120826185810.GB42842@ithaqua.etoilebsd.net> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> <503A6D4B.9070606@FreeBSD.org> <20120826185810.GB42842@ithaqua.etoilebsd.net> Content-Type: text/plain; charset="us-ascii" Date: Sun, 26 Aug 2012 13:08:32 -0600 Message-ID: <1346008112.1140.76.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org, Doug Barton , current@freebsd.org, Tjoelker , Steve Wills , CyberLeo Kitsana , Jilles Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 19:08:50 -0000 On Sun, 2012-08-26 at 20:58 +0200, Baptiste Daroussin wrote: > On Sun, Aug 26, 2012 at 11:39:07AM -0700, Doug Barton wrote: > > On 08/26/2012 05:58, Baptiste Daroussin wrote: > > This isn't the security issue I was talking about by having sbin/pkg > > pass every command line to local/sbin/pkg. > > > > You keep saying that you have no objections to changing the name. I am > > asking you to do that. I don't care if it is pkg-bootstrap or something > > else you like better. But please change the name to not be pkg, and > > limit the functionality of the tool to bootstrapping the pkg package. > > > > I received more feedback about keep pkg and changing it to > pkg-bootstrap, so what should I do, changing it because you are asking for it? Would this get better if the bootstrap tool were named pkg and were installed on a fresh system at /usr/local/sbin, so that it in effect replaces itself with the real thing, and has no need to leave a forwarding stub in /usr/sbin ? Maybe it could rename itself to /usr/local/sbin/pkg-bootstrap as part of replacing itself, so that you could re-bootstrap your way out of a problem later. Hmmm, might have to be careful that future updates don't replace the real thing with a newer bootstrap program. -- Ian From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 19:27:42 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 6A7AB106564A; Sun, 26 Aug 2012 19:27:42 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id E4F8114F094; Sun, 26 Aug 2012 19:27:41 +0000 (UTC) Message-ID: <503A78AD.6010402@FreeBSD.org> Date: Sun, 26 Aug 2012 12:27:41 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Ian Lepore References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> <503A6D4B.9070606@FreeBSD.org> <20120826185810.GB42842@ithaqua.etoilebsd.net> <1346008112.1140.76.camel@revolution.hippie.lan> In-Reply-To: <1346008112.1140.76.camel@revolution.hippie.lan> X-Enigmail-Version: 1.4.3 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org, Baptiste Daroussin , current@freebsd.org, Jilles Tjoelker , Steve Wills , CyberLeo Kitsana Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 19:27:42 -0000 On 08/26/2012 12:08, Ian Lepore wrote: > Would this get better if the bootstrap tool were named pkg and were > installed on a fresh system at /usr/local/sbin, so that it in effect > replaces itself with the real thing, and has no need to leave a > forwarding stub in /usr/sbin ? > > Maybe it could rename itself to /usr/local/sbin/pkg-bootstrap as part of > replacing itself, so that you could re-bootstrap your way out of a > problem later. That's certainly creative thinking, but I'm still queasy about 2 commands with the same name that do 2 different things. And having it rename itself adds to the confusion down the road. Having a simple pkg bootstrapping tool in the base is a good idea. But the functionality needs to be extremely limited so that we don't increase the security exposure; and so that we don't end up in a situation where a bug fix for something in the base limits our ability to innovate with pkg in the ports tree. Doug -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909) From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 20:31:29 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E41D61065670 for ; Sun, 26 Aug 2012 20:31:29 +0000 (UTC) (envelope-from namor@hemio.de) Received: from narnia.blumen-schwarz.de (narnia.blumen-schwarz.de [80.190.195.21]) by mx1.freebsd.org (Postfix) with ESMTP id 99AA08FC0C for ; Sun, 26 Aug 2012 20:31:29 +0000 (UTC) Received: from brln-4d0c294b.pool.mediaways.net ([77.12.41.75] helo=grinsebacke.dyndns.org) by narnia.blumen-schwarz.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1T5j2i-0001fE-2d for freebsd-current@freebsd.org; Sun, 26 Aug 2012 22:02:57 +0200 Date: Sun, 26 Aug 2012 22:02:46 +0200 From: namor To: freebsd-current@freebsd.org Message-ID: <20120826200246.GC3535@grinsebacke.dyndns.org> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <5036AE8B.9030807@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5036AE8B.9030807@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam_score: -1.0 X-Spam_score_int: -9 X-Spam_bar: - X-Spam_report: ------------- Start der SpamAssassin Auswertung --------------- Bei Fragen dazu bitte das Forum life.d.cvmx verwenden! Details der Inhaltsanalyse: (-1.0 Punkte, 5.0 benoetigt) -1.0 ALL_TRUSTED Nachricht wurde nur über vertrauenswürdige Rechner weitergeleitet ---------------- Ende der SpamAssassin Auswertung ----------------- Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 20:31:30 -0000 On Thu, Aug 23, 2012 at 03:28:27PM -0700, Doug Barton wrote: > On 8/23/2012 3:19 PM, Steve Wills wrote: > > Hi, > > > > It seems to me that renaming the pkg binary in /usr/sbin/pkg to /usr/sbin/pkg-bootstrap would make sense. From a user standpoint, it is confusing that running the command gets different results the second time it is run vs. the first time. I can imagine a user saying "I ran pkg, but it didn't do what they said it would. Now I run it again, and it does do what it is supposed to." Also, it would enable setting up a pkg-bootstrap man page separate from the pkg man page, without confusion about which one you're looking at. > > > > So, opinions? There may still be time to fix it for 9.1 if we can decide quickly. > > Yes please. > > Every time in the past that we have talked about moving the pkg_* tools > to the ports the corresponding change for the base was to have a > pkg_bootstrap tool that was a use once and forget kind of thing. I was > quite surprised when sbin/pkg was added, but since people tell me I > already comment on too much, I decided to wait and see what others thought. If I understand correctly, the main concern of the "pkg"-name fraction is to not confuse newbies. All you write is "pkg install foo" and pkg will bootstrap itself if not installed. You don't have to call "pkg-bootstrap" first (how would you know about it anyways? read pkg(8)?) - How about his: stick with /usr/sbin/pkg-boostrap - cat > /usr/sbin/pkg << EOF #!/bin/sh echo "To use pkg you have to bootstrap the pkgng installation first, please call /usr/sbin/pkg-bootstrap" EOF - pkg-debootstrap replaces/removes /usr/sbin/pkg messenger (above) after successful installation Alternatively, just call pkg-bootstrap (but this might leave the issue of one command doing two different things..) Regards From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 20:37:56 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 2A5141065687 for ; Sun, 26 Aug 2012 20:37:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 5443A14E804; Sun, 26 Aug 2012 20:37:54 +0000 (UTC) Message-ID: <503A8921.6010609@FreeBSD.org> Date: Sun, 26 Aug 2012 13:37:53 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: namor References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <5036AE8B.9030807@FreeBSD.org> <20120826200246.GC3535@grinsebacke.dyndns.org> In-Reply-To: <20120826200246.GC3535@grinsebacke.dyndns.org> X-Enigmail-Version: 1.4.3 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 20:37:56 -0000 On 08/26/2012 13:02, namor wrote: > On Thu, Aug 23, 2012 at 03:28:27PM -0700, Doug Barton wrote: >> On 8/23/2012 3:19 PM, Steve Wills wrote: >>> Hi, >>> >>> It seems to me that renaming the pkg binary in /usr/sbin/pkg to /usr/sbin/pkg-bootstrap would make sense. From a user standpoint, it is confusing that running the command gets different results the second time it is run vs. the first time. I can imagine a user saying "I ran pkg, but it didn't do what they said it would. Now I run it again, and it does do what it is supposed to." Also, it would enable setting up a pkg-bootstrap man page separate from the pkg man page, without confusion about which one you're looking at. >>> >>> So, opinions? There may still be time to fix it for 9.1 if we can decide quickly. >> >> Yes please. >> >> Every time in the past that we have talked about moving the pkg_* tools >> to the ports the corresponding change for the base was to have a >> pkg_bootstrap tool that was a use once and forget kind of thing. I was >> quite surprised when sbin/pkg was added, but since people tell me I >> already comment on too much, I decided to wait and see what others thought. > > If I understand correctly, the main concern of the "pkg"-name fraction > is to not confuse newbies. All you write is "pkg install foo" and pkg > will bootstrap itself if not installed. You don't have to call > "pkg-bootstrap" first (how would you know about it anyways? read pkg(8)?) > > - How about his: stick with /usr/sbin/pkg-boostrap > - cat > /usr/sbin/pkg << EOF > #!/bin/sh > echo "To use pkg you have to bootstrap the pkgng installation first, > please call /usr/sbin/pkg-bootstrap" > EOF > > - pkg-debootstrap replaces/removes /usr/sbin/pkg messenger (above) after > successful installation Again, creative thinking, so you get points for that. :) The problem is that we don't really support the idea of things in the base magically deleting themselves. As I have said in previous messages, the bootstrapping problem is being overblown by several orders of magnitude. For newly installed systems where pkg is the default, /usr/local/bin/pkg will be installed. So there is no bootstrapping problem. For already-installed systems who wish to switch to pkg, they can install from /usr/ports, or use the pkg bootstrap tool in the base. Given that they will be intentionally making this change, and there will be instructions written up on how to do this which include the bootstrapping step, once again this is a non-issue. The whole idea of having every call to /usr/local/sbin/pkg pass through /usr/sbin/pkg in order to help a tiny minority of users with a one-time bootstrapping issue is just plain ludicrous. Doug -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909) From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 20:39:14 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3608D1065679; Sun, 26 Aug 2012 20:39:14 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id C1D518FC1F; Sun, 26 Aug 2012 20:39:13 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q7QKZ3EY039568; Sun, 26 Aug 2012 14:35:03 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q7QKZ3FW039565; Sun, 26 Aug 2012 14:35:03 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sun, 26 Aug 2012 14:35:03 -0600 (MDT) From: Warren Block To: Ian Lepore In-Reply-To: <1346008112.1140.76.camel@revolution.hippie.lan> Message-ID: References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> <503A6D4B.9070606@FreeBSD.org> <20120826185810.GB42842@ithaqua.etoilebsd.net> <1346008112.1140.76.camel@revolution.hippie.lan> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Sun, 26 Aug 2012 14:35:04 -0600 (MDT) Cc: CyberLeo Kitsana , Baptiste Daroussin , Doug Barton , current@freebsd.org, Tjoelker , Steve Wills , ports@freebsd.org, Jilles@freebsd.org Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 20:39:14 -0000 On Sun, 26 Aug 2012, Ian Lepore wrote: > On Sun, 2012-08-26 at 20:58 +0200, Baptiste Daroussin wrote: >> On Sun, Aug 26, 2012 at 11:39:07AM -0700, Doug Barton wrote: >>> On 08/26/2012 05:58, Baptiste Daroussin wrote: >>> This isn't the security issue I was talking about by having sbin/pkg >>> pass every command line to local/sbin/pkg. >>> >>> You keep saying that you have no objections to changing the name. I am >>> asking you to do that. I don't care if it is pkg-bootstrap or something >>> else you like better. But please change the name to not be pkg, and >>> limit the functionality of the tool to bootstrapping the pkg package. >>> >> >> I received more feedback about keep pkg and changing it to >> pkg-bootstrap, so what should I do, changing it because you are asking for it? > > Would this get better if the bootstrap tool were named pkg and were > installed on a fresh system at /usr/local/sbin, so that it in effect > replaces itself with the real thing, and has no need to leave a > forwarding stub in /usr/sbin ? > > Maybe it could rename itself to /usr/local/sbin/pkg-bootstrap as part of > replacing itself, so that you could re-bootstrap your way out of a > problem later. Ew. But on a similar note, an idea I just had in IRC is to have pkgng overwrite the base /usr/bin/pkg with a link to /usr/local/bin/pkg. That effectively removes that binary. We do have precedent for ports overwriting base with sendmail and openssl. > Hmmm, might have to be careful that future updates don't replace the > real thing with a newer bootstrap program. Yes. A link could be detected by installworld and not overwritten... although that's a hack. From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 20:50:34 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 97DA81065679; Sun, 26 Aug 2012 20:50:34 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 0334A14DE92; Sun, 26 Aug 2012 20:50:31 +0000 (UTC) Message-ID: <503A8C17.8050006@FreeBSD.org> Date: Sun, 26 Aug 2012 13:50:31 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Warren Block References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> <503A6D4B.9070606@FreeBSD.org> <20120826185810.GB42842@ithaqua.etoilebsd.net> <1346008112.1140.76.camel@revolution.hippie.lan> In-Reply-To: X-Enigmail-Version: 1.4.3 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Ian Lepore , Baptiste Daroussin , current@freebsd.org, Tjoelker , Steve Wills , CyberLeo Kitsana , ports@freebsd.org, Jilles@freebsd.org Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 20:50:34 -0000 On 08/26/2012 13:35, Warren Block wrote: > On Sun, 26 Aug 2012, Ian Lepore wrote: > >> On Sun, 2012-08-26 at 20:58 +0200, Baptiste Daroussin wrote: >>> On Sun, Aug 26, 2012 at 11:39:07AM -0700, Doug Barton wrote: >>>> On 08/26/2012 05:58, Baptiste Daroussin wrote: >>>> This isn't the security issue I was talking about by having sbin/pkg >>>> pass every command line to local/sbin/pkg. >>>> >>>> You keep saying that you have no objections to changing the name. I am >>>> asking you to do that. I don't care if it is pkg-bootstrap or something >>>> else you like better. But please change the name to not be pkg, and >>>> limit the functionality of the tool to bootstrapping the pkg package. >>>> >>> >>> I received more feedback about keep pkg and changing it to >>> pkg-bootstrap, so what should I do, changing it because you are >>> asking for it? >> >> Would this get better if the bootstrap tool were named pkg and were >> installed on a fresh system at /usr/local/sbin, so that it in effect >> replaces itself with the real thing, and has no need to leave a >> forwarding stub in /usr/sbin ? >> >> Maybe it could rename itself to /usr/local/sbin/pkg-bootstrap as part of >> replacing itself, so that you could re-bootstrap your way out of a >> problem later. > > Ew. But on a similar note, an idea I just had in IRC is to have pkgng > overwrite the base /usr/bin/pkg with a link to /usr/local/bin/pkg. > That effectively removes that binary. We do have precedent for ports > overwriting base with sendmail and openssl. ... and bind, but that's a whole different category of problems. >> Hmmm, might have to be careful that future updates don't replace the >> real thing with a newer bootstrap program. > > Yes. A link could be detected by installworld and not overwritten... > although that's a hack. Like you said above, Ew. :) There really is no need to be so clever here. The bootstrapping issue is going to be a minor annoyance that affects a small percentage of our users. Doug -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909) From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 00:52:12 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 933E5106566C; Mon, 27 Aug 2012 00:52:12 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id 055128FC17; Mon, 27 Aug 2012 00:52:11 +0000 (UTC) Received: from aspire.rulingia.com (12.58.233.220.static.exetel.com.au [220.233.58.12]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q7R0px80041322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Aug 2012 10:52:03 +1000 (EST) (envelope-from peter@rulingia.com) Received: from aspire.rulingia.com (localhost [127.0.0.1]) by aspire.rulingia.com (8.14.5/8.14.5) with ESMTP id q7R0ppC0082729 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 27 Aug 2012 10:51:51 +1000 (EST) (envelope-from peter@aspire.rulingia.com) Received: (from peter@localhost) by aspire.rulingia.com (8.14.5/8.14.5/Submit) id q7R0poGo082728; Mon, 27 Aug 2012 10:51:50 +1000 (EST) (envelope-from peter) Date: Mon, 27 Aug 2012 10:51:49 +1000 From: Peter Jeremy To: Doug Barton Message-ID: <20120827005149.GD27130@aspire.rulingia.com> References: <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> <503A6D4B.9070606@FreeBSD.org> <20120826185810.GB42842@ithaqua.etoilebsd.net> <1346008112.1140.76.camel@revolution.hippie.lan> <503A78AD.6010402@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="76DTJ5CE0DCVQemd" Content-Disposition: inline In-Reply-To: <503A78AD.6010402@FreeBSD.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: ports@freebsd.org, current@freebsd.org Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 00:52:12 -0000 --76DTJ5CE0DCVQemd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Aug-26 12:27:41 -0700, Doug Barton wrote: >On 08/26/2012 12:08, Ian Lepore wrote: >> Maybe it could rename itself to /usr/local/sbin/pkg-bootstrap as part of >> replacing itself, so that you could re-bootstrap your way out of a >> problem later. > >That's certainly creative thinking, but I'm still queasy about 2 >commands with the same name that do 2 different things. And having it >rename itself adds to the confusion down the road. I also like the idea of a pkg-bootstrap command. Possibly a symlink =66rom pkg to pkg-bootstrap, that gets removed as part of the bootstrap process, would help - but it should just tell you how to run pkg-bootstrap. I don't like the idea of pkg{-bootstrap} autonomously installing something I didn't ask for. And I don't like the idea that all pkg commands get bounced through a /usr/sbin/pkg once it has been bootstrapped. >Having a simple pkg bootstrapping tool in the base is a good idea. But >the functionality needs to be extremely limited so that we don't >increase the security exposure; and so that we don't end up in a >situation where a bug fix for something in the base limits our ability >to innovate with pkg in the ports tree. Agreed. BTW, one thing that needs to be considered is how to recover =66rom the embedded public key needing to be invalidated (eg due to the private key being exposed). --=20 Peter Jeremy --76DTJ5CE0DCVQemd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlA6xKUACgkQ/opHv/APuIe+GwCgvjqFVCjtsNd0pcR4XGZWRKWI qwIAnjIQpXEkuEl4Tekh3767ChPyTybQ =tcjQ -----END PGP SIGNATURE----- --76DTJ5CE0DCVQemd-- From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 23:13:34 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F259106566C; Sun, 26 Aug 2012 23:13:34 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 251FE8FC18; Sun, 26 Aug 2012 23:13:33 +0000 (UTC) Received: by dadr6 with SMTP id r6so2081848dad.13 for ; Sun, 26 Aug 2012 16:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=HIijimaAtagmFG1PHUB9FSWmbdClAsIJrQzIrFGv/5k=; b=QMHVMxr3V1oAtRgWudvsy9RCzJXkzeRgfS1qeJrLohhrCPALP++ZyZAb9m3FdQ/2eh Qh9sgz7GYDQT9Ogn2K+skQreIVICWwlZ283To/9IxOMTKtPe1vCAAx9TQWpU6wutuo5y 4+YdSnFY2MLt57xFd5t2wJBVz2bkfSUzA8LHtBl6tvowHVBkZh+bsJyFI/sQw0cFuTLN BaksovgKs+ZW9sbnZpHxE9nHMXll3ye0UZxrAoCMqliR243t8QbS59ipEDtAeJalKhlM GYNP/RXMnUBEsw9ntjDZfsDYZEyGgpHq+auKIAsdP945WRkVHkAN+MoMrc5jMHtkfgRB WYCA== Received: by 10.68.212.98 with SMTP id nj2mr29617875pbc.138.1346022813658; Sun, 26 Aug 2012 16:13:33 -0700 (PDT) Received: from c-24-19-191-56.hsd1.wa.comcast.net (c-24-19-191-56.hsd1.wa.comcast.net. [24.19.191.56]) by mx.google.com with ESMTPS id pw4sm8451731pbb.42.2012.08.26.16.13.32 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 26 Aug 2012 16:13:32 -0700 (PDT) Date: Sun, 26 Aug 2012 16:09:34 -0700 (PDT) From: Garrett Cooper To: Doug Barton In-Reply-To: <503A8C17.8050006@FreeBSD.org> Message-ID: References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> <503A6D4B.9070606@FreeBSD.org> <20120826185810.GB42842@ithaqua.etoilebsd.net> <1346008112.1140.76.camel@revolution.hippie.lan> <503A8C17.8050006@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Mon, 27 Aug 2012 01:03:51 +0000 Cc: Warren Block , Ian Lepore , Baptiste Daroussin , current@freebsd.org, Tjoelker , Steve Wills , CyberLeo Kitsana , Jilles@freebsd.org, ports@freebsd.org Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2012 23:13:34 -0000 On Sun, 26 Aug 2012, Doug Barton wrote: ... > There really is no need to be so clever here. The bootstrapping issue is > going to be a minor annoyance that affects a small percentage of our users. I think Doug's correct in this case about it being a "one-time problem" as installing via bsdinstall, etc should take care of this (I disagree with the "small percentage of our users" part though). There's still a chicken and egg problem with installing packaging via bsdinstall, etc though, as ports requires pkg* in order to function; I really hope that some of the naysayers have considered this "minor" issue as this would be a stop-gap to removing pkg(8) from base. Rather than providing a solution for that problem because that's a bigger architectural issue (and not my job to solve), I offer this patch I quickly hacked up instead as my 2 cents for the discussion on how to make users aware that pkg_install is dying/dead, as this is one case that needs to be better handled. Thanks, -Garrett PS It's really sad that no one really has been updating UPDATING in either ports or src, as I think this would help alleviate the need for unnecessary obfuscation. Index: UPDATING =================================================================== --- UPDATING (revision 239716) +++ UPDATING (working copy) @@ -24,6 +24,10 @@ disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +2014XXXX: + pkg_install has been replaced with pkgng; please see webpage + XXX/install port YYY for more details. + 20120727: The sparc64 ZFS loader has been changed to no longer try to auto- detect ZFS providers based on diskN aliases but now requires these Index: usr.sbin/pkg_install/version/main.c =================================================================== --- usr.sbin/pkg_install/version/main.c (revision 239290) +++ usr.sbin/pkg_install/version/main.c (working copy) @@ -123,6 +123,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + return pkg_perform(argv); } Index: usr.sbin/pkg_install/add/main.c =================================================================== --- usr.sbin/pkg_install/add/main.c (revision 239290) +++ usr.sbin/pkg_install/add/main.c (working copy) @@ -215,6 +215,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + if (AddMode != SLAVE) { pkgs = (char **)malloc((argc+1) * sizeof(char *)); for (ch = 0; ch <= argc; pkgs[ch++] = NULL) ; Index: usr.sbin/pkg_install/info/main.c =================================================================== --- usr.sbin/pkg_install/info/main.c (revision 239290) +++ usr.sbin/pkg_install/info/main.c (working copy) @@ -238,6 +238,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + if (Flags & SHOW_PTREV) { if (!Quiet) printf("Package tools revision: "); Index: usr.sbin/pkg_install/delete/main.c =================================================================== --- usr.sbin/pkg_install/delete/main.c (revision 239290) +++ usr.sbin/pkg_install/delete/main.c (working copy) @@ -128,6 +128,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + /* Get all the remaining package names, if any */ while (*argv) { /* Don't try to apply heuristics if arguments are regexs */ Index: usr.sbin/pkg_install/create/main.c =================================================================== --- usr.sbin/pkg_install/create/main.c (revision 239290) +++ usr.sbin/pkg_install/create/main.c (working copy) @@ -229,6 +229,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + /* Get all the remaining package names, if any */ while (*argv) *pkgs++ = *argv++; Index: usr.sbin/pkg_install/lib/lib.h =================================================================== --- usr.sbin/pkg_install/lib/lib.h (revision 239290) +++ usr.sbin/pkg_install/lib/lib.h (working copy) @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -239,4 +240,33 @@ extern int AutoAnswer; extern int Verbose; +#define EOL_VERSION 11000000 + +#define PKG_INSTALL_DEPRECATION_MSG \ + "pkg_install has been deprecated in favor of pkgng; please see UPDATING for more details" + +#if __FreeBSD_version > EOL_VERSION + +#define PKG_PORTS_MSG() \ +do { \ + if (Quiet) { \ + exit(1); \ + } else { \ + warnx(PKG_INSTALL_DEPECATION_MSG); \ + } \ +} while (0) + +#else + +#define PKG_PORTS_MSG() \ +do { \ + if (Quiet) { \ + exit(1); \ + } else { \ + errx(1, PKG_INSTALL_DEPRECATION_MSG); \ + } \ +} while (0) + +#endif /* __FreeBSD_version > EOL_VERSION */ + #endif /* _INST_LIB_LIB_H_ */ Index: usr.sbin/pkg_install/updating/main.c =================================================================== --- usr.sbin/pkg_install/updating/main.c (revision 239290) +++ usr.sbin/pkg_install/updating/main.c (working copy) @@ -104,6 +104,8 @@ argc -= optind; argv += optind; + PKG_PORTS_MSG(); + /* Check if passed date has a correct format. */ if (dflag == 1) { linelength = strlen(date); From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 02:19:59 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC7E0106564A for ; Mon, 27 Aug 2012 02:19:59 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id ABE2C8FC08 for ; Mon, 27 Aug 2012 02:19:59 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:b893:d73f:3750:2064]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 02D274AC2D for ; Mon, 27 Aug 2012 06:19:57 +0400 (MSK) Date: Mon, 27 Aug 2012 06:19:57 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <135297243.20120827061957@serebryakov.spb.ru> To: freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: How to understand what `swi5' kernel thread does? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 02:20:00 -0000 Hello, Freebsd-current. It is shown at top -SH output as `intr{swi5: +}' and I could not find way to understand, what is it... -- // Black Lion AKA Lev Serebryakov From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 07:14:50 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 310F8106564A for ; Mon, 27 Aug 2012 07:14:50 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id E97A68FC1A for ; Mon, 27 Aug 2012 07:14:48 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 1ADCC7300A; Mon, 27 Aug 2012 09:34:03 +0200 (CEST) Date: Mon, 27 Aug 2012 09:34:03 +0200 From: Luigi Rizzo To: current@freebsd.org Message-ID: <20120827073403.GA49223@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 07:14:50 -0000 Hi, in netmap, i am using a single name (/dev/netmap) to create multiple independent file descriptors bound to different devices/queues, and eventually I would like to mmap() each file descriptor to a different kernel memory region. This requires to track calls to open/ioctl/poll/mmap/close. The difficulty i have is with mmap() and close(), because FreeBSD seems to handle these calls per-cdev rather than per-file-descriptor (for instance, no 'struct file' argument is available in mmap(), and the d_close method is only called on the last close() on the device). I definitely remember having a similar problem ~15 years ago when I was doing audio drivers. I do not remember a workaround at the time, though now the situation might be slightly different because /dev/audio does some kind of multiplexing, and probably even /dev/ptmx does something similar. So I would appreciate suggestions on how can I track per-file-descriptor calls to mmap and close (or at least achieve my goal to track which individual file descriptors are used for mmap, and when the descriptor is closed so the region is unmapped). >From what I can tell: + open(), ioctl() and poll() are easy because the 'struct file *' argument is available through one of the 'struct thread' fields, td->td_fpop; + mmap() is slightly trickier: if i use the d_mmap method (which is what I have now, used by the device pager), the kernel does a first pass on the mmap() syscall where td->td_fpop is available, but the mapping is not installed and only access rights are checked. Subsequently i get some anonymous calls where the only argument i have is a 'struct cdev *' and the td->td_fpop is explicitly set to NULL. I am not sure if i can use a workaround for this by writing my own d_mmap_single callback that also installs the mappings so that i never fault on those pages. + close(), here i have no clue. sys/fs/devfs/devfs_vnops.c::devfs_close() seems to intercept all but the last call, and i do not see any way to intercept it. thanks luigi From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 07:42:30 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0878106566C; Mon, 27 Aug 2012 07:42:30 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by mx1.freebsd.org (Postfix) with ESMTP id 7B7FB8FC12; Mon, 27 Aug 2012 07:42:30 +0000 (UTC) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id E30314C02AD; Mon, 27 Aug 2012 02:42:29 -0500 (CDT) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id E16834C02A5; Mon, 27 Aug 2012 02:42:29 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from mh11.mail.rice.edu ([127.0.0.1]) by mh11.mail.rice.edu (mh11.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id CRI5M8imhf6D; Mon, 27 Aug 2012 02:42:29 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 75F024C0268; Mon, 27 Aug 2012 02:42:29 -0500 (CDT) Message-ID: <503B24E4.6090701@rice.edu> Date: Mon, 27 Aug 2012 02:42:28 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111113 Thunderbird/8.0 MIME-Version: 1.0 To: Luigi Rizzo References: <20120822120105.GA63763@onelab2.iet.unipi.it> <20120823163145.GA3999@onelab2.iet.unipi.it> <50366398.2070700@rice.edu> <20120823174504.GB4820@onelab2.iet.unipi.it> <50371485.1020409@rice.edu> <20120824145708.GA16557@onelab2.iet.unipi.it> <5037A803.6030100@rice.edu> <20120824165428.GA17495@onelab2.iet.unipi.it> <5037B226.3000103@rice.edu> <20120826171126.GA40672@onelab2.iet.unipi.it> In-Reply-To: <20120826171126.GA40672@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: alc@freebsd.org, current@freebsd.org Subject: Re: less aggressive contigmalloc ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 07:42:30 -0000 On 08/26/2012 12:11, Luigi Rizzo wrote: > On Fri, Aug 24, 2012 at 11:56:06AM -0500, Alan Cox wrote: >> On 08/24/2012 11:54, Luigi Rizzo wrote: >>> On Fri, Aug 24, 2012 at 11:12:51AM -0500, Alan Cox wrote: >>>> On 08/24/2012 09:57, Luigi Rizzo wrote: >>>>> On Fri, Aug 24, 2012 at 12:43:33AM -0500, Alan Cox wrote: >>>>>> On 08/23/2012 12:45, Luigi Rizzo wrote: >>>>>>> On Thu, Aug 23, 2012 at 12:08:40PM -0500, Alan Cox wrote: >>>>>>> ... >>>>>>>>> yes i do see that. >>>>>>>>> >>>>>>>>> Maybe less aggressive with M_NOWAIT but still kills processes. >>>>>>>> Are you compiling world with MALLOC_PRODUCTION? The latest version of >>>>>>> whatever the default is. But: >>>>>>> >>>>>>>> jemalloc uses significantly more memory when debugging options are >>>>>>>> enabled. This first came up in a thread titled "10-CURRENT and swap >>>>>>>> usage" back in June. >>>>>>>> >>>>>>>> Even at its most aggressive, M_WAITOK, contigmalloc() does not >>>>>>>> directly >>>>>>>> kill processes. If process death coincides with the use of >>>>>>>> contigmalloc(), then it is simply the result of earlier, successful >>>>>>>> contigmalloc() calls, or for that matter any other physical memory >>>>>>>> allocation calls, having depleted the pool of free pages to the point >>>>>>>> that the page daemon runs and invokes vm_pageout_oom(). >>>>>>> does it mean that those previous allocations relied on memory >>>>>>> overbooking ? >>>>>> Yes. >>>>>> >>>>>>> Is there a way to avoid that, then ? >>>>>> I believe that malloc()'s default minimum allocation size is 4MB. You >>>>>> could reduce that. >>>>>> >>>>>> Alternatively, you can enable MALLOC_PRODUCTION. >>>>> i tried this, and as others mentioned it makes life >>>>> better and reduces the problem but contigmalloc still triggers >>>>> random process kills. >>>> I would be curious to see a stack backtrace when vm_pageout_oom() is >>>> called. >>> you mean a backtrace of the process(es) that get killed ? >> No, a backtrace showing who called vm_pageout_oom(). Simply add a >> kdb_backtrace() call at the start of vm_pageout_oom(). There are two >> possibilities. I want to know which it is. > this is dmesg when I add kdb_backtrace() at the start of vm_pageout_oom() > The '... netmap_finalize_obj_allocator... are from my calls to > contigmalloc, each one doing one-page allocations. These calls are made with M_WAITOK? > I get 7-8 'KDB: stack backtrace' blocks, then allocations > restart successfully, then more failures... > The reference to fork_exit() does not seem right, because i am > in a block where i call contigmalloc, so the caller of > vm_pageout_grow_cache() should be kmem_alloc_contig(). Try this instead. At the start of vm_pageout_oom(), print the value of its parameter "shortage". That will uniquely identify the caller. > 630.004926 netmap_finalize_obj_allocator [593] cluster at 8910 ok > 630.005563 netmap_finalize_obj_allocator [593] cluster at 8912 ok > 630.006077 netmap_finalize_obj_allocator [593] cluster at 8914 ok > KDB: stack backtrace: > X_db_sym_numargs() at X_db_sym_numargs+0x1aa > vm_pageout_oom() at vm_pageout_oom+0x19 > vm_pageout_grow_cache() at vm_pageout_grow_cache+0xd01 > fork_exit() at fork_exit+0x11c > fork_trampoline() at fork_trampoline+0xe > --- trap 0, rip = 0, rsp = 0xffffff8005f12cb0, rbp = 0 --- > KDB: stack backtrace: > X_db_sym_numargs() at X_db_sym_numargs+0x1aa > vm_pageout_oom() at vm_pageout_oom+0x19 > vm_pageout_grow_cache() at vm_pageout_grow_cache+0xd01 > fork_exit() at fork_exit+0x11c > fork_trampoline() at fork_trampoline+0xe > --- trap 0, rip = 0, rsp = 0xffffff8005f12cb0, rbp = 0 --- > ... > > Some of the processes must be 'getty' because i also find > this line in dmesg: > > <118>Aug 26 16:47:11 init: getty repeating too quickly on port /dev/ttyv7, sleep > ing 30 secs > > cheers > luigi > From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 07:55:59 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E3611065670 for ; Mon, 27 Aug 2012 07:55:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id CCD7E8FC14 for ; Mon, 27 Aug 2012 07:55:58 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA06510; Mon, 27 Aug 2012 10:55:49 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1T5uAm-000G5S-Uu; Mon, 27 Aug 2012 10:55:49 +0300 Message-ID: <503B2803.1010104@FreeBSD.org> Date: Mon, 27 Aug 2012 10:55:47 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Luigi Rizzo References: <20120827073403.GA49223@onelab2.iet.unipi.it> In-Reply-To: <20120827073403.GA49223@onelab2.iet.unipi.it> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: current@FreeBSD.org Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 07:55:59 -0000 on 27/08/2012 10:34 Luigi Rizzo said the following: > This requires to track calls to open/ioctl/poll/mmap/close. > The difficulty i have is with mmap() and close(), because FreeBSD > seems to handle these calls per-cdev rather than per-file-descriptor > (for instance, no 'struct file' argument is available in mmap(), and > the d_close method is only called on the last close() on the device). devfs_set_cdevpriv(9), etc -- Andriy Gapon From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 09:24:39 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17B3B106564A; Mon, 27 Aug 2012 09:24:39 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id CAEA68FC12; Mon, 27 Aug 2012 09:24:38 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 055C16EF2; Mon, 27 Aug 2012 11:24:38 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id C32EE8FDE; Mon, 27 Aug 2012 11:24:37 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: John Baldwin References: <502831B7.1080309@freebsd.org> <86zk5y55rg.fsf@ds4.des.no> <201208141346.12782.jhb@freebsd.org> <86a9xklj3j.fsf@ds4.des.no> Date: Mon, 27 Aug 2012 11:24:37 +0200 In-Reply-To: <86a9xklj3j.fsf@ds4.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rg?= =?utf-8?Q?rav=22's?= message of "Fri, 24 Aug 2012 11:44:48 +0200") Message-ID: <864nnoznze.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: alc@freebsd.org, freebsd-current@freebsd.org, Colin Percival Subject: Re: Time to bump default VM_SWZONE_SIZE_MAX? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 09:24:39 -0000 Dag-Erling Sm=C3=B8rgrav writes: > (or we could increase the limit to 72351744 bytes, which is the precise > amount required to support 16 GB) Correction, 36175872 - there are actually 32 pages per entry, not 16. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 11:20:34 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5BDDD106567D; Mon, 27 Aug 2012 11:20:34 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 14AAF8FC1C; Mon, 27 Aug 2012 11:20:33 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A9C8C7300A; Mon, 27 Aug 2012 13:39:42 +0200 (CEST) Date: Mon, 27 Aug 2012 13:39:42 +0200 From: Luigi Rizzo To: Alan Cox Message-ID: <20120827113942.GA51298@onelab2.iet.unipi.it> References: <20120823163145.GA3999@onelab2.iet.unipi.it> <50366398.2070700@rice.edu> <20120823174504.GB4820@onelab2.iet.unipi.it> <50371485.1020409@rice.edu> <20120824145708.GA16557@onelab2.iet.unipi.it> <5037A803.6030100@rice.edu> <20120824165428.GA17495@onelab2.iet.unipi.it> <5037B226.3000103@rice.edu> <20120826171126.GA40672@onelab2.iet.unipi.it> <503B24E4.6090701@rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <503B24E4.6090701@rice.edu> User-Agent: Mutt/1.4.2.3i Cc: alc@freebsd.org, current@freebsd.org Subject: Re: less aggressive contigmalloc ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 11:20:34 -0000 On Mon, Aug 27, 2012 at 02:42:28AM -0500, Alan Cox wrote: ... > >this is dmesg when I add kdb_backtrace() at the start of vm_pageout_oom() > >The '... netmap_finalize_obj_allocator... are from my calls to > >contigmalloc, each one doing one-page allocations. > > These calls are made with M_WAITOK? no they are with M_NOWAIT: ... clust = contigmalloc(p->_clustsize, M_NETMAP, M_NOWAIT | M_ZERO, 0, -1UL, PAGE_SIZE, 0); ... p->_clustsize is 4096 in this particular set of calls. > >I get 7-8 'KDB: stack backtrace' blocks, then allocations > >restart successfully, then more failures... > >The reference to fork_exit() does not seem right, because i am > >in a block where i call contigmalloc, so the caller of > >vm_pageout_grow_cache() should be kmem_alloc_contig(). > > Try this instead. At the start of vm_pageout_oom(), print the value of > its parameter "shortage". That will uniquely identify the caller. it says "shortage is 1" which means that the call is from vm_pageout(). cheers luigi From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 11:47:44 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BD79106567B for ; Mon, 27 Aug 2012 11:47:44 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id B62608FC22 for ; Mon, 27 Aug 2012 11:47:43 +0000 (UTC) Received: by lbbgg13 with SMTP id gg13so2853719lbb.13 for ; Mon, 27 Aug 2012 04:47:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=KIP231q8GIwtIYnfUYcqv+S8BRh1d+WaUN9BBrTmAQw=; b=HjReElYMxNJnl7srAg+xfQLG7xwoyBun59wuXXRlZuuBJzEhZpyIu8XOUyJiq0tZ4T GBdLyidhJ5u6zQblVoy1bB4Cl8P2MP3+evH4lGoCSUK2dxd23YQqfNUMNZQ3ZmXI72bp QMNDOCk6CsyetsdrZmW/PnbFl2bJlJBxxVyuOp6M2pLLvmpSgQT0lcxS5Vv41hMEVC/n Szf9k2CRCLNfMxlEWhdyfPlkJxeyg7uuXUZaj8epgl0YYrFFzMeBKbn7vRpxqoUUz+Vh Hia1zHIL7Zn2j0T03UG9JbDAuIKgTheMuLkmKr/pbO+FTNq3vPD4nu4y98snsiQQUuI8 dqWA== MIME-Version: 1.0 Received: by 10.112.86.200 with SMTP id r8mr6436437lbz.87.1346068062087; Mon, 27 Aug 2012 04:47:42 -0700 (PDT) Received: by 10.112.2.36 with HTTP; Mon, 27 Aug 2012 04:47:41 -0700 (PDT) In-Reply-To: <20120826185810.GB42842@ithaqua.etoilebsd.net> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> <503A6D4B.9070606@FreeBSD.org> <20120826185810.GB42842@ithaqua.etoilebsd.net> Date: Mon, 27 Aug 2012 13:47:41 +0200 Message-ID: From: Olivier Smedts To: Baptiste Daroussin Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkIFWsdNjmbuzNC1oItJ4xaFum1y9yIkyGzw/SNcoNpyWT2otL0NOzV+fZn3/EkdeXT+87o Cc: ports@freebsd.org, Doug Barton , current@freebsd.org, Jilles Tjoelker , Steve Wills , CyberLeo Kitsana Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 11:47:44 -0000 2012/8/26 Baptiste Daroussin : > I received more feedback about keep pkg and changing it to > pkg-bootstrap, so what should I do, changing it because you are asking for it? So, just a "me too" for renaming pkg, for consistency. I don't mind the new name... -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas." From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 12:46:50 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11427106564A; Mon, 27 Aug 2012 12:46:50 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9DFD38FC28; Mon, 27 Aug 2012 12:46:49 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:b893:d73f:3750:2064]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 5B2504AC2D; Mon, 27 Aug 2012 16:46:48 +0400 (MSK) Date: Mon, 27 Aug 2012 16:46:46 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <198519466.20120827164646@serebryakov.spb.ru> To: Lev Serebryakov In-Reply-To: <135297243.20120827061957@serebryakov.spb.ru> References: <135297243.20120827061957@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: What is "Fast task queue"? (Was: How to understand what `swi5' kernel thread does?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 12:46:50 -0000 Hello, Lev. You wrote 27 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2012 =D0=B3., 6:19:= 57: I've found (with help of debug printing added to kernel), that "swi5" has only one handler "Fast task queue" (name is too long to be seen in `top' output, may be, rename it to "fast tqueue"?) What "fast tasks" are performed via this queue? Under network load it is main consumer of CPU. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 15:28:11 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F36F106566C for ; Mon, 27 Aug 2012 15:28:11 +0000 (UTC) (envelope-from decke@bluelife.at) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id F21E18FC12 for ; Mon, 27 Aug 2012 15:28:10 +0000 (UTC) Received: by wibhr14 with SMTP id hr14so2627635wib.13 for ; Mon, 27 Aug 2012 08:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bluelife.at; s=google; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=mU7j+cTJCF8KAlHXyr90kE7+cDzzQrGoXwIYOrFMdM0=; b=Kkt9UwG2XE5RNx5ni2XsV95HF5wYBiiKYqkT/wNxSXyoWStxwA9LhULvuG2/je9nGS XiimjQaXcc1I9EUDuZuEETrMl3BZ2DLwFYNsd3Xqh3ypRewSvKzz6H+LpCEka90IoTxi mZ2ukvHj9t6zZtjPCZaVz4che4NwGTBHqkV6g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=mU7j+cTJCF8KAlHXyr90kE7+cDzzQrGoXwIYOrFMdM0=; b=pegO94bMkHtaCcmkH3R+VL9XhVIPkMsuzmKHMauo/adurjSUSdBgaMQrdtQdNA1VVm fOoXCWC0WHER3kQtGcMXdqwRc4xarn/V02bljkgd2O70q79T2rmKZAY6hC4z+cATLsf4 8kLl4QDP3D+UcGg+XvDcmCQy6kkfPcSFkK0FQq01s1eT5GqpywM1PtKvIdfqEb8Dytvf aXaTfcj82axwfPYDi5FoBeLjOueADzh+Tl+WTI9TGebxBIjqPu1iJoP3aDOwAimduIcy LY1X7qmEFLM1wukgIZbFOKwRw9rs+z2zO1kEskb/3vugQZVJTbVlKKGiesh35dAdEb8z 7p9g== MIME-Version: 1.0 Received: by 10.216.131.13 with SMTP id l13mr7110096wei.195.1346081289723; Mon, 27 Aug 2012 08:28:09 -0700 (PDT) Sender: decke@bluelife.at Received: by 10.180.90.15 with HTTP; Mon, 27 Aug 2012 08:28:09 -0700 (PDT) X-Originating-IP: [80.123.233.199] In-Reply-To: <20120820123142.GY33100@deviant.kiev.zoral.com.ua> References: <20120812132047.GA33526@psconsult.nl> <20120820123142.GY33100@deviant.kiev.zoral.com.ua> Date: Mon, 27 Aug 2012 17:28:09 +0200 X-Google-Sender-Auth: FsWFEWHRw9YRTDP7aEKdg-DC0-A Message-ID: From: =?ISO-8859-1?Q?Bernhard_Fr=F6hlich?= To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkiZ2o5f26za3QuiNAnnT9HSkdJLTO9t+Z9REzmG54kqopCO7KkfLbWwrUPb7srRuL3cDXG Cc: Garrett Cooper , Current FreeBSD , Paul Schenkeveld Subject: Re: make package fails in chroot: tar: getvfsbyname failed: No such file or directory X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 15:28:11 -0000 On Mon, Aug 20, 2012 at 2:31 PM, Konstantin Belousov wrote: > On Mon, Aug 20, 2012 at 01:42:31PM +0200, Bernhard Fr?hlich wrote: >> On Sun, Aug 19, 2012 at 10:01 PM, Tim Kientzle wrote: >> > >> > On Aug 19, 2012, at 12:17 PM, Garrett Cooper wrote: >> > >> >> On Sun, Aug 19, 2012 at 9:45 AM, Tim Kientzle wrote: >> >>> >> >>> On Aug 12, 2012, at 6:20 AM, Paul Schenkeveld wrote: >> >>> >> >>>> Hi, >> >>>> >> >>>> I have a wrapper script that builds packages in a chroot environment >> >>>> which happily runs on release 6 thru 9 and earlier 10 but fails with: >> >>>> >> >>>> tar: getvfsbyname failed: No such file or directory >> >>>> >> >>>> on a recent -CURRENT. >> >>> >> >>> libarchive does do an initial getvfsbyname() when you ask it >> >>> to traverse a directory tree so that it can accurately handle later >> >>> requests about mountpoints and filesystem types. This code >> >>> is admittedly a little intricate. >> >> >> >> The problem most likely is the fact that all mountpoints are >> >> exposed via chroot, thus, if it's checking to see if a mountpoint >> >> exists, it may exist outside of the chroot. >> >> >> > >> > I reviewed the code to refresh my memory. Some >> > of what I said before was not quite right. >> > >> > Libarchive's directory traversal tracks information about >> > the filesystem type so that clients such as bsdtar can >> > efficiently skip synthetic filesystems (/dev or /proc) or >> > network filesystems (NFS or SMB mounts). >> > >> > The net effect is something like this: >> > >> > For each file: >> > stat() or lstat() or fstat() the file >> > look up dev number in an internal cache >> > if the dev number is new: >> > fstatfs() the open fd to get the FS name >> > getvfsbyname() to identify the FS type >> > >> > Unless there's a logic error in libarchive itself, this >> > would suggest that somehow fstatfs() is returning >> > a filesystem type that getvfsbyname() can't >> > identify. >> > >> > Paul: >> > What filesystem are you using? >> > >> > What does "mount" show? >> > >> > Does it work outside the chroot? >> >> I also see the same on the redports.org build machines. >> It builds within a jail there which is completely on a tmpfs. >> Interestinly everything is fine with a 10-CURRENT/amd64 >> jail but it breaks in a 10-CURRENT/i386 jail. Both are >> running on the same 10-CURRENT/amd64 which is >> around 2 months old. >> >> https://redports.org/buildarchive/20120814130205-56327/ > > Try this. I've seen that it was committed to head in the meantime so I gave that a try. The problem still persists. https://redports.org/~decke/20120827152217-19891-54992/expat-2.0.1_2.log -- Bernhard Froehlich http://www.bluelife.at/ From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 18:12:20 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0BDFA1065797; Mon, 27 Aug 2012 18:12:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 960438FC0A; Mon, 27 Aug 2012 18:12:19 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q7RICRen008841; Mon, 27 Aug 2012 21:12:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q7RICENO059007; Mon, 27 Aug 2012 21:12:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q7RICERa059006; Mon, 27 Aug 2012 21:12:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 27 Aug 2012 21:12:14 +0300 From: Konstantin Belousov To: Bernhard Fr?hlich Message-ID: <20120827181214.GD33100@deviant.kiev.zoral.com.ua> References: <20120812132047.GA33526@psconsult.nl> <20120820123142.GY33100@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jWQLpvAamslfamA3" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Garrett Cooper , Current FreeBSD , Paul Schenkeveld Subject: Re: make package fails in chroot: tar: getvfsbyname failed: No such file or directory X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 18:12:20 -0000 --jWQLpvAamslfamA3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 27, 2012 at 05:28:09PM +0200, Bernhard Fr?hlich wrote: > On Mon, Aug 20, 2012 at 2:31 PM, Konstantin Belousov > wrote: > > On Mon, Aug 20, 2012 at 01:42:31PM +0200, Bernhard Fr?hlich wrote: > >> On Sun, Aug 19, 2012 at 10:01 PM, Tim Kientzle wrot= e: > >> > > >> > On Aug 19, 2012, at 12:17 PM, Garrett Cooper wrote: > >> > > >> >> On Sun, Aug 19, 2012 at 9:45 AM, Tim Kientzle wr= ote: > >> >>> > >> >>> On Aug 12, 2012, at 6:20 AM, Paul Schenkeveld wrote: > >> >>> > >> >>>> Hi, > >> >>>> > >> >>>> I have a wrapper script that builds packages in a chroot environm= ent > >> >>>> which happily runs on release 6 thru 9 and earlier 10 but fails w= ith: > >> >>>> > >> >>>> tar: getvfsbyname failed: No such file or directory > >> >>>> > >> >>>> on a recent -CURRENT. > >> >>> > >> >>> libarchive does do an initial getvfsbyname() when you ask it > >> >>> to traverse a directory tree so that it can accurately handle later > >> >>> requests about mountpoints and filesystem types. This code > >> >>> is admittedly a little intricate. > >> >> > >> >> The problem most likely is the fact that all mountpoints are > >> >> exposed via chroot, thus, if it's checking to see if a mountpoint > >> >> exists, it may exist outside of the chroot. > >> >> > >> > > >> > I reviewed the code to refresh my memory. Some > >> > of what I said before was not quite right. > >> > > >> > Libarchive's directory traversal tracks information about > >> > the filesystem type so that clients such as bsdtar can > >> > efficiently skip synthetic filesystems (/dev or /proc) or > >> > network filesystems (NFS or SMB mounts). > >> > > >> > The net effect is something like this: > >> > > >> > For each file: > >> > stat() or lstat() or fstat() the file > >> > look up dev number in an internal cache > >> > if the dev number is new: > >> > fstatfs() the open fd to get the FS name > >> > getvfsbyname() to identify the FS type > >> > > >> > Unless there's a logic error in libarchive itself, this > >> > would suggest that somehow fstatfs() is returning > >> > a filesystem type that getvfsbyname() can't > >> > identify. > >> > > >> > Paul: > >> > What filesystem are you using? > >> > > >> > What does "mount" show? > >> > > >> > Does it work outside the chroot? > >> > >> I also see the same on the redports.org build machines. > >> It builds within a jail there which is completely on a tmpfs. > >> Interestinly everything is fine with a 10-CURRENT/amd64 > >> jail but it breaks in a 10-CURRENT/i386 jail. Both are > >> running on the same 10-CURRENT/amd64 which is > >> around 2 months old. > >> > >> https://redports.org/buildarchive/20120814130205-56327/ > > > > Try this. >=20 > I've seen that it was committed to head in the meantime so > I gave that a try. The problem still persists. >=20 > https://redports.org/~decke/20120827152217-19891-54992/expat-2.0.1_2.log Are you sure that you tested the right kernel ? You may use the following test program to verify. Compile it on 32bit system. Run it like this: =2E/getvfsbyname devfs ufs nfs On patched kernel, I get sandy% ./getvfsbyname devfs ufs nfs = ~ name devfs typenum 113 ref 2 flags 0x480000 name ufs typenum 53 ref 1 flags 0x0 name nfs typenum 58 ref 4 flags 0x20000 On unpatched machine, the result is ooma32% ./getvfsbyname devfs ufs nfs ~/build/bsd/DEV/stuff/te= sts getvfsbyname: getvfsbyname("devfs"): No such file or directory getvfsbyname: getvfsbyname("ufs"): No such file or directory getvfsbyname: getvfsbyname("nfs"): No such file or directory --jWQLpvAamslfamA3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlA7uH4ACgkQC3+MBN1Mb4jswwCg2zA2MWxJdUNHas7hGTK7e6HO 0NYAoNlWkA+iEF8Vf7OjugemJLw9oU/A =BL2n -----END PGP SIGNATURE----- --jWQLpvAamslfamA3-- From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 18:40:36 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8D101065670; Mon, 27 Aug 2012 18:40:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8E31C8FC1C; Mon, 27 Aug 2012 18:40:36 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 96CD4B963; Mon, 27 Aug 2012 14:40:34 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 27 Aug 2012 12:24:20 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120826200246.GC3535@grinsebacke.dyndns.org> <503A8921.6010609@FreeBSD.org> In-Reply-To: <503A8921.6010609@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208271224.20329.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 27 Aug 2012 14:40:34 -0400 (EDT) Cc: namor , Doug Barton Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 18:40:36 -0000 On Sunday, August 26, 2012 4:37:53 pm Doug Barton wrote: > The problem is that we don't really support the idea of things in the > base magically deleting themselves. > > As I have said in previous messages, the bootstrapping problem is being > overblown by several orders of magnitude. For newly installed systems > where pkg is the default, /usr/local/bin/pkg will be installed. So there > is no bootstrapping problem. > > For already-installed systems who wish to switch to pkg, they can > install from /usr/ports, or use the pkg bootstrap tool in the base. > Given that they will be intentionally making this change, and there will > be instructions written up on how to do this which include the > bootstrapping step, once again this is a non-issue. > > The whole idea of having every call to /usr/local/sbin/pkg pass through > /usr/sbin/pkg in order to help a tiny minority of users with a one-time > bootstrapping issue is just plain ludicrous. I agree. Even if we keep /usr/sbin/pkg, we will presumably want to remove it from the base in a year or so via 'make delete-old', etc. Given that, I'm not sure we need it there in the first place. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 18:40:38 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BAC1106564A; Mon, 27 Aug 2012 18:40:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id F3AC88FC1E; Mon, 27 Aug 2012 18:40:37 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3AD44B99A; Mon, 27 Aug 2012 14:40:37 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org, lev@freebsd.org Date: Mon, 27 Aug 2012 12:26:03 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <135297243.20120827061957@serebryakov.spb.ru> <198519466.20120827164646@serebryakov.spb.ru> In-Reply-To: <198519466.20120827164646@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201208271226.03496.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 27 Aug 2012 14:40:37 -0400 (EDT) Cc: Subject: Re: What is "Fast task queue"? (Was: How to understand what `swi5' kernel thread does?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 18:40:38 -0000 On Monday, August 27, 2012 8:46:46 am Lev Serebryakov wrote: > Hello, Lev. > You wrote 27 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2012 =D0=B3., 6:1= 9:57: >=20 > I've found (with help of debug printing added to kernel), that "swi5" > has only one handler "Fast task queue" (name is too long to be seen in > `top' output, may be, rename it to "fast tqueue"?) >=20 > What "fast tasks" are performed via this queue? Under network load it > is main consumer of CPU. Certain NIC drivers perform much of their interrupt handling in that thread. =2D-=20 John Baldwin From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 18:40:39 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D7A9106566B; Mon, 27 Aug 2012 18:40:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 708A48FC22; Mon, 27 Aug 2012 18:40:39 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id ACEF9B9A5; Mon, 27 Aug 2012 14:40:38 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 27 Aug 2012 12:27:54 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <20120827073403.GA49223@onelab2.iet.unipi.it> <503B2803.1010104@FreeBSD.org> In-Reply-To: <503B2803.1010104@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208271227.54785.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 27 Aug 2012 14:40:38 -0400 (EDT) Cc: Luigi Rizzo , current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 18:40:39 -0000 On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > on 27/08/2012 10:34 Luigi Rizzo said the following: > > This requires to track calls to open/ioctl/poll/mmap/close. > > The difficulty i have is with mmap() and close(), because FreeBSD > > seems to handle these calls per-cdev rather than per-file-descriptor > > (for instance, no 'struct file' argument is available in mmap(), and > > the d_close method is only called on the last close() on the device). > > devfs_set_cdevpriv(9), etc mmap() is still problematic, but if you have the freedom to create your own VM objects, then d_mmap_single() can let you handle that fairly easily. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 18:40:39 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D7A9106566B; Mon, 27 Aug 2012 18:40:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 708A48FC22; Mon, 27 Aug 2012 18:40:39 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id ACEF9B9A5; Mon, 27 Aug 2012 14:40:38 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 27 Aug 2012 12:27:54 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <20120827073403.GA49223@onelab2.iet.unipi.it> <503B2803.1010104@FreeBSD.org> In-Reply-To: <503B2803.1010104@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208271227.54785.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 27 Aug 2012 14:40:38 -0400 (EDT) Cc: Luigi Rizzo , current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 18:40:39 -0000 On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > on 27/08/2012 10:34 Luigi Rizzo said the following: > > This requires to track calls to open/ioctl/poll/mmap/close. > > The difficulty i have is with mmap() and close(), because FreeBSD > > seems to handle these calls per-cdev rather than per-file-descriptor > > (for instance, no 'struct file' argument is available in mmap(), and > > the d_close method is only called on the last close() on the device). > > devfs_set_cdevpriv(9), etc mmap() is still problematic, but if you have the freedom to create your own VM objects, then d_mmap_single() can let you handle that fairly easily. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 19:08:39 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8EF31065676 for ; Mon, 27 Aug 2012 19:08:38 +0000 (UTC) (envelope-from ianf@clue.co.za) Received: from zcs04.jnb1.cloudseed.co.za (zcs04.jnb1.cloudseed.co.za [41.154.0.161]) by mx1.freebsd.org (Postfix) with ESMTP id 243F18FC24 for ; Mon, 27 Aug 2012 19:08:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zcs04.jnb1.cloudseed.co.za (Postfix) with ESMTP id 5217C2A82A77 for ; Mon, 27 Aug 2012 21:08:36 +0200 (SAST) X-Virus-Scanned: amavisd-new at zcs04.jnb1.cloudseed.co.za Received: from zcs04.jnb1.cloudseed.co.za ([127.0.0.1]) by localhost (zcs04.jnb1.cloudseed.co.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6vI+V4RXxeW3 for ; Mon, 27 Aug 2012 21:08:32 +0200 (SAST) Received: from clue.co.za (unknown [41.154.88.19]) by zcs04.jnb1.cloudseed.co.za (Postfix) with ESMTPSA id 51DFB2A82A60 for ; Mon, 27 Aug 2012 21:08:32 +0200 (SAST) Received: from localhost ([127.0.0.1] helo=clue.co.za) by clue.co.za with esmtp (Exim 4.76 (FreeBSD)) (envelope-from ) id 1T64fn-0000Vd-34 for current@freebsd.org; Mon, 27 Aug 2012 21:08:31 +0200 To: current@freebsd.org From: "Ian FREISLICH" X-Attribution: BOFH Date: Mon, 27 Aug 2012 21:08:31 +0200 Message-Id: Cc: Subject: Panic on use of "deleted" route. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 19:08:39 -0000 Hi I was wondering if anyone else is seeing this... I get a panic shortly after ppp(8) exits. I haven't been able to get a crashdump from a recent -CURRENT system, so in that absence, I'll include output from an older system. Interestingly, the route partially persists past the destruction of the interface. And the panic is triggered apparently by the use of the route. I've also been unable to delete routes added on the system. We're running a kernel compiled with options RADIX_MPATH. [root@pbx ~]# pppctl -p pass 3000 quit all Connection closed [root@pbx ~]# ifconfig tun0 ifconfig: interface tun0 does not exist [root@pbx ~]# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default tun0 US 0 4 Here's the crash from another system: KDB: stack backtrace: #0 0xffffffff8051ed16 at kdb_backtrace+0x66 #1 0xffffffff804e828e at panic+0x1ce #2 0xffffffff806dcff0 at trap_fatal+0x290 #3 0xffffffff806dd327 at trap_pfault+0x1e7 #4 0xffffffff806dd92e at trap+0x3be #5 0xffffffff806c792f at calltrap+0x8 #6 0xffffffff805a975c at rn_walktree+0x7c #7 0xffffffff805b085e at sysctl_rtsock+0x2ee #8 0xffffffff804f1bd8 at sysctl_root+0x128 #9 0xffffffff804f1eb5 at userland_sysctl+0x145 #10 0xffffffff804f23ea at sys___sysctl+0xaa #11 0xffffffff806dc910 at amd64_syscall+0x530 #12 0xffffffff806c7c17 at Xfast_syscall+0xf7 Uptime: 2d12h15m1s #0 doadump (textdump=Variable "textdump" is not available. ) at pcpu.h:229 229 pcpu.h: No such file or directory. in pcpu.h (kgdb) #0 doadump (textdump=Variable "textdump" is not available. ) at pcpu.h:229 #1 0xffffffff804e7d74 in kern_reboot (howto=260) at /usr/src.pflock/sys/kern/kern_shutdown.c:449 #2 0xffffffff804e8267 in panic (fmt=0x1
) at /usr/src.pflock/sys/kern/kern_shutdown.c:637 #3 0xffffffff806dcff0 in trap_fatal (frame=0xc, eva=Variable "eva" is not available. ) at /usr/src.pflock/sys/amd64/amd64/trap.c:853 #4 0xffffffff806dd327 in trap_pfault (frame=0xffffff82355bf6b0, usermode=0) at /usr/src.pflock/sys/amd64/amd64/trap.c:770 #5 0xffffffff806dd92e in trap (frame=0xffffff82355bf6b0) at /usr/src.pflock/sys/amd64/amd64/trap.c:458 #6 0xffffffff806c792f in calltrap () at /usr/src.pflock/sys/amd64/amd64/exception.S:228 #7 0xffffffff805ae525 in sysctl_dumpentry (rn=0xfffffe0007398e10, vw=Variable "vw" is not available. ) at /usr/src.pflock/sys/net/rtsock.c:1527 #8 0xffffffff805a975c in rn_walktree (h=Variable "h" is not available. ) at /usr/src.pflock/sys/net/radix.c:1112 #9 0xffffffff805b085e in sysctl_rtsock (oidp=Variable "oidp" is not available. ) at /usr/src.pflock/sys/net/rtsock.c:1888 #10 0xffffffff804f1bd8 in sysctl_root (oidp=Variable "oidp" is not available. ) at /usr/src.pflock/sys/kern/kern_sysctl.c:1513 #11 0xffffffff804f1eb5 in userland_sysctl (td=Variable "td" is not available. ) at /usr/src.pflock/sys/kern/kern_sysctl.c:1623 #12 0xffffffff804f23ea in sys___sysctl (td=0xfffffe0007189000, uap=0xffffff82355bfb70) at /usr/src.pflock/sys/kern/kern_sysctl.c:1549 #13 0xffffffff806dc910 in amd64_syscall (td=0xfffffe0007189000, traced=0) at subr_syscall.c:135 #14 0xffffffff806c7c17 in Xfast_syscall () at /usr/src.pflock/sys/amd64/amd64/exception.S:387 #15 0x0000000801debc6c in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) -- Ian Freislich From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 20:47:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E681C1065670; Mon, 27 Aug 2012 20:47:16 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7DAAC8FC0C; Mon, 27 Aug 2012 20:47:16 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:b893:d73f:3750:2064]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 3A6764AC2D; Tue, 28 Aug 2012 00:47:15 +0400 (MSK) Date: Tue, 28 Aug 2012 00:47:13 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <1758728845.20120828004713@serebryakov.spb.ru> To: John Baldwin In-Reply-To: <201208271226.03496.jhb@freebsd.org> References: <135297243.20120827061957@serebryakov.spb.ru> <198519466.20120827164646@serebryakov.spb.ru> <201208271226.03496.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: What is "Fast task queue"? (Was: How to understand what `swi5' kernel thread does?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 20:47:17 -0000 Hello, John. You wrote 27 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2012 =D0=B3., 20:26= :03: >> What "fast tasks" are performed via this queue? Under network load it >> is main consumer of CPU. JB> Certain NIC drivers perform much of their interrupt handling in that th= read. Yep, I've found, that my if_vr uses it. One more question: does ipfw rules works in same thread? I have ``net.isr.dispatch=3D"direct"'' set. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 05:46:13 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7240C106566C for ; Tue, 28 Aug 2012 05:46:13 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.246.90]) by mx1.freebsd.org (Postfix) with ESMTP id 3D0698FC16 for ; Tue, 28 Aug 2012 05:46:12 +0000 (UTC) Received: from parancell.ongs.co.jp (dullmdaler.ongs.co.jp [202.216.246.94]) by natial.ongs.co.jp (Postfix) with ESMTPSA id 3D8DE125422 for ; Tue, 28 Aug 2012 14:46:06 +0900 (JST) Date: Tue, 28 Aug 2012 14:46:01 +0900 From: Daichi GOTO To: freebsd-current@freebsd.org Message-Id: <20120828144601.1f2dd21e518d4cf0114f6bef@freebsd.org> Organization: FreeBSD Project X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Mellanox Technologies : ConnectX-3 VPI X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 05:46:13 -0000 I am wondering if FreeBSD 10-CURRNET could use Mellanox Technologies's ConnectX-3 VPI infiniband devices. Is there anyone who are using ConnectX-3 VPI with FreeBSD? -- Daichi GOTO (daichi) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 09:53:34 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EFB9106566C for ; Tue, 28 Aug 2012 09:53:34 +0000 (UTC) (envelope-from afridi_ahmad29@yahoo.com) Received: from nm9-vm1.bullet.mail.ne1.yahoo.com (nm9-vm1.bullet.mail.ne1.yahoo.com [98.138.90.47]) by mx1.freebsd.org (Postfix) with SMTP id E68738FC0A for ; Tue, 28 Aug 2012 09:53:33 +0000 (UTC) Received: from [98.138.90.52] by nm9.bullet.mail.ne1.yahoo.com with NNFMP; 28 Aug 2012 09:50:17 -0000 Received: from [98.138.88.234] by tm5.bullet.mail.ne1.yahoo.com with NNFMP; 28 Aug 2012 09:50:17 -0000 Received: from [127.0.0.1] by omp1034.mail.ne1.yahoo.com with NNFMP; 28 Aug 2012 09:50:17 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 402857.86983.bm@omp1034.mail.ne1.yahoo.com Received: (qmail 8566 invoked by uid 60001); 28 Aug 2012 09:50:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1346147417; bh=vKbxAgEZ9v6fL/kKOaldapHRDJSczki+5Q6A3QrSyts=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=w60mhSaUkY9dzKEiuDFprSI31RnZJ3lMwSxuWi2rhUDcDPhOYAl9M3VIAIrjytgrt/CydfWlvFWLv40eYVZcebGBuVHWgrvYiGzCRct4ats6HKlsGDvMDPMmDDl4T9e2k2jU6J0DIrT6DDkUUNiz5fDVg8ujpXcyyyogOpAJMyk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=pHOhxwB9xgSrVJktUYjZK+dtJyG4qmJRGrcl6Nq5izHT9AEcr/TCUpjOhyoYHvZRwbGntCKlkk3bD9wVm8i82CtakgJBS4n2fgc7SPS2KsFyGpmEfjCtG3FgPxbvJ000E/QyycxjuH9XqAYotjnVnZhl4JhTNTIfZYI5pV5wVzc=; X-YMail-OSG: yDULazsVM1kubxCbJLNw8Svq3BRGd1DxbDxcFDdhp60De07 oOPZY3j1vd4X4WvYLpXjo4QTnElgJs1MrvEMxkddshvcseEZYQLJgFpggQg4 dh.xQsXhMzHRPprDzgaDg.50PYLaNIy8K8dAkBCkBFksgB0_zykwAYUwX7m5 zhgz4bjAOuEV__AXevdi9lkzcbXFCqI5GDUOVr9oPHEvVnOmU6ZjrT2T2zKz EEmRSvc_HXZCGTRNt2SQiuTZ4YQkDI.PTLFS670CNCVSXVLqmEtCDkKMvQb6 EA8khPUwwblajoTzxs1n_4ed0FZw0B6RtThWQ76iHSYsX9uRQjH4ZaBzGh1L zqf_e_Ncp6db1nijKUQ_e2vu2huteez4zwp5mLrg6SU2BR1HNvD.ZbOuQ3Rs .4b7Hj1sL1TA2Rzd5NDQj8MqdPgcs8996ceRyPdfdhj0AB6QH9uu_1B552qD N4le6za6u2TZljUVmjCPIbXHaXNM- Received: from [213.67.247.76] by web125404.mail.ne1.yahoo.com via HTTP; Tue, 28 Aug 2012 02:50:16 PDT X-Mailer: YahooMailWebService/0.8.121.416 Message-ID: <1346147416.2709.YahooMailNeo@web125404.mail.ne1.yahoo.com> Date: Tue, 28 Aug 2012 02:50:16 -0700 (PDT) From: Khan To: "freebsd-current@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: netmap/pkt-gen error X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Khan List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 09:53:34 -0000 hi all, i am running FreeBSD 9.0R with netmap already in it. i compiled the pkt-gen.c with gcc in tools/tools/netmap. after i do ./pkt-gen -i eth0 -f tx -n 500111222 -l 60 -w 5 i get an error: -Unable to open /dev/netmap -Unable to register bge0 (renamed to eth0). i am using the default bge0 (Broadcom BCM570x PCI Gigbit Ethernet card). and its configured and active. checked via ifconfig when i go to dev: cd /dev, i find no netmap directory. any idea on the errors/ help. /BR Ahmed Masters student at Mid Sweden Universit From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 10:36:17 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71BFF106566C for ; Tue, 28 Aug 2012 10:36:17 +0000 (UTC) (envelope-from lists@c0mplx.org) Received: from home.opsec.eu (home.opsec.eu [IPv6:2001:14f8:200::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2AF778FC15 for ; Tue, 28 Aug 2012 10:36:17 +0000 (UTC) Received: from pi by home.opsec.eu with local (Exim 4.77 (FreeBSD)) (envelope-from ) id 1T6J9Y-0008ab-QK; Tue, 28 Aug 2012 12:36:12 +0200 Date: Tue, 28 Aug 2012 12:36:12 +0200 From: Kurt Jaeger To: Khan Message-ID: <20120828103612.GB3324@home.opsec.eu> References: <1346147416.2709.YahooMailNeo@web125404.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1346147416.2709.YahooMailNeo@web125404.mail.ne1.yahoo.com> Cc: freebsd-current@freebsd.org Subject: Re: netmap/pkt-gen error X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 10:36:17 -0000 Hi! > i am running FreeBSD 9.0R with netmap already in it. > i compiled the pkt-gen.c with gcc in tools/tools/netmap. > after i do ./pkt-gen -i eth0 -f tx -n 500111222 -l 60 -w 5 > > i get an error: > -Unable to open /dev/netmap > -Unable to register bge0 (renamed to eth0). [...] > any idea on the errors/ help. man netmap (on 9.1-RC1 or 8.3) says: SUPPORTED INTERFACES netmap supports the following interfaces: em(4), ixgbe(4), re(4), so it seems the interface card bge is not supported by netmap and you should probably try 9.1-RC1 instead of 9.0. On 9.0 I did not find the netmap man page. -- pi@opsec.eu +49 171 3101372 8 years to go ! From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 11:45:44 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0723106566C; Tue, 28 Aug 2012 11:45:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A59A78FC18; Tue, 28 Aug 2012 11:45:44 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 08266B93B; Tue, 28 Aug 2012 07:45:44 -0400 (EDT) From: John Baldwin To: lev@freebsd.org Date: Tue, 28 Aug 2012 07:44:23 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <135297243.20120827061957@serebryakov.spb.ru> <201208271226.03496.jhb@freebsd.org> <1758728845.20120828004713@serebryakov.spb.ru> In-Reply-To: <1758728845.20120828004713@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201208280744.23419.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 28 Aug 2012 07:45:44 -0400 (EDT) Cc: freebsd-current@freebsd.org Subject: Re: What is "Fast task queue"? (Was: How to understand what `swi5' kernel thread does?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 11:45:44 -0000 On Monday, August 27, 2012 4:47:13 pm Lev Serebryakov wrote: > Hello, John. > You wrote 27 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2012 =D0=B3., 20:= 26:03: >=20 > >> What "fast tasks" are performed via this queue? Under network load it > >> is main consumer of CPU. > JB> Certain NIC drivers perform much of their interrupt handling in that= =20 thread. > Yep, I've found, that my if_vr uses it. One more question: does ipfw > rules works in same thread? I have ``net.isr.dispatch=3D"direct"'' set. Yes, with the default setting of direct dispatch, all of the receive side of the network stack runs in the driver's interrupt handler. In the case of vr(4) that would be in this thread. =2D-=20 John Baldwin From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 13:56:14 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBEE6106564A for ; Tue, 28 Aug 2012 13:56:14 +0000 (UTC) (envelope-from afridi_ahmad29@yahoo.com) Received: from nm16-vm0.bullet.mail.ne1.yahoo.com (nm16-vm0.bullet.mail.ne1.yahoo.com [98.138.91.49]) by mx1.freebsd.org (Postfix) with SMTP id 692A28FC0C for ; Tue, 28 Aug 2012 13:56:14 +0000 (UTC) Received: from [98.138.90.50] by nm16.bullet.mail.ne1.yahoo.com with NNFMP; 28 Aug 2012 13:56:08 -0000 Received: from [98.138.89.161] by tm3.bullet.mail.ne1.yahoo.com with NNFMP; 28 Aug 2012 13:56:08 -0000 Received: from [127.0.0.1] by omp1017.mail.ne1.yahoo.com with NNFMP; 28 Aug 2012 13:56:08 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 191966.94250.bm@omp1017.mail.ne1.yahoo.com Received: (qmail 23860 invoked by uid 60001); 28 Aug 2012 13:56:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1346162168; bh=eKYOhNQZeHRVUQONyFZfqBertl0URtaH8/1Eo0HG6Lg=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=RD30yjai+r6wKlBQeV88ehzY62UQNr6wIVKuXLCN7PU6PcfzCW+5KYW+3tAcozxLEf+PsG6NKcfwVAxxKgDthlWvs8Vf1YH/+VbE8Q/eLBTGZBWxWm1aop+LoJFRYd6lVO4z5RZv6Tg6FVKfcKocOGkQS4/xQIqnzTYSNxFr3Ug= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=OSpLRTcSsgIrMzOlNmX/kHmhFh6oZEmdTw7JkXPFCLC2HmXBbRV06Vgj73Rjd544o+5xCroxo93Qj5f0o0cVmVYS+tZsFeDsAWkBsQS4NWKLt6FuWirlL9MMYt6iVqj9YqQaL6wgsj61w5qqCyu2OceQN7skTKSz7pd2xrplbuI=; X-YMail-OSG: fjD8GegVM1m8V5r1mPVwP7gh63ktgTbBfUn4tbQrC7mAtIK hNdqu.sU2EeB5dSEMj07rYpWbqZs3jhYFwyWGpKk1BUBBe7AImcQjcAnLeoY Zv1cizKVTYiAwSyVScygZ1MDT_B1zPZhK0lhAIy8NHzxB6Kl2JdXyyxUKifi Pnnw5mwYaqSBiq0h3oUMKAYwrZrb7DImIa3.unhk0ol7KcrJ1ZFWTqfTD1sK sYlyJhXEsvNWXcwj8n1kvJtF.R9XYHh_QyHI5KgAk5iSoUZiJ3gttLNpP4pa o0MnvNNDddJiyqA0ReSaovguGBNV0l6mAWYmX0N80YmOIn4S7skxtSvWwDgz JgWCJ_yiYDUs4yj7RGtPfMlraD4f_tFMEZI5upmtkzjZ5XFXlBVEL1S4o1rS bniv.d3u8BaLtvfUUaS93ilrNvp8lEBlM1DEjAeUaU9KbNXTix6KN.JqIXj8 cVW3aih_qptEAbK9TIYT7BoJScu5Sq9z1eGAoexspLNuO2GaRkg-- Received: from [213.67.247.76] by web125403.mail.ne1.yahoo.com via HTTP; Tue, 28 Aug 2012 06:56:07 PDT X-Mailer: YahooMailWebService/0.8.121.416 References: <1346147416.2709.YahooMailNeo@web125404.mail.ne1.yahoo.com> <20120828103612.GB3324@home.opsec.eu> Message-ID: <1346162167.22640.YahooMailNeo@web125403.mail.ne1.yahoo.com> Date: Tue, 28 Aug 2012 06:56:07 -0700 (PDT) From: Khan To: Kurt Jaeger In-Reply-To: <20120828103612.GB3324@home.opsec.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "freebsd-current@freebsd.org" Subject: Re: netmap/pkt-gen error X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Khan List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 13:56:14 -0000 hi again,=0Ai tired with v9.1RC1 but i still get the same error.=0A=0Adoes = Netmap support Broadcom interfaces??=0Athe supported interfaces on man page= of netmap=0Aare em, ixgbe,re (only intel cards)..=0A=0AIs there some work = going on regarding other nic's.=0A=0AHow can i still use pkt-gen to send/re= ceive pkts.?=0Aany idea on how to run on virtualbox machine that=0Amight ha= ve an em driver??=0A=0A/BR=0AAhmed=0AMasters Student @=0AMid Sweden Univers= ity=0A=0A=0A________________________________=0A From: Kurt Jaeger =0ATo: Khan =0ACc: freebsd-current@free= bsd.org =0ASent: Tuesday, August 28, 2012 12:36 PM=0ASubject: Re: netmap/pk= t-gen error=0A =0AHi!=0A=0A> i am running FreeBSD 9.0R with netmap already = in it.=0A> i compiled the pkt-gen.c with gcc in tools/tools/netmap.=0A> aft= er i do ./pkt-gen -i eth0 -f tx -n 500111222 -l 60 -w 5=0A> =0A> i get an e= rror:=0A> -Unable to open /dev/netmap=0A> -Unable to register bge0 (renamed= to eth0).=0A[...]=0A> any idea on the errors/ help.=0A=0Aman netmap (on 9.= 1-RC1 or 8.3) says:=0A=0ASUPPORTED INTERFACES=0A=A0 =A0 netmap supports th= e following interfaces: em(4), ixgbe(4), re(4),=0A=0Aso it seems the interf= ace card bge is not supported by netmap and=0Ayou should probably try 9.1-R= C1 instead of 9.0.=0A=0AOn 9.0 I did not find the netmap man page.=0A=0A-- = =0Api@opsec.eu=A0 =A0 =A0 =A0 =A0 =A0 +49 171 3101372=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 8 years to go ! From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 14:06:04 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 532D21065674 for ; Tue, 28 Aug 2012 14:06:04 +0000 (UTC) (envelope-from lists@c0mplx.org) Received: from home.opsec.eu (home.opsec.eu [IPv6:2001:14f8:200::1]) by mx1.freebsd.org (Postfix) with ESMTP id 0A65F8FC1D for ; Tue, 28 Aug 2012 14:06:04 +0000 (UTC) Received: from pi by home.opsec.eu with local (Exim 4.77 (FreeBSD)) (envelope-from ) id 1T6MQe-000CEq-Pt; Tue, 28 Aug 2012 16:06:04 +0200 Date: Tue, 28 Aug 2012 16:06:04 +0200 From: Kurt Jaeger To: Khan , freebsd-current@freebsd.org Message-ID: <20120828140604.GC3324@home.opsec.eu> References: <1346147416.2709.YahooMailNeo@web125404.mail.ne1.yahoo.com> <20120828103612.GB3324@home.opsec.eu> <1346162167.22640.YahooMailNeo@web125403.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1346162167.22640.YahooMailNeo@web125403.mail.ne1.yahoo.com> Cc: Subject: Re: netmap/pkt-gen error X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 14:06:04 -0000 Hi! > hi again, > i tired with v9.1RC1 but i still get the same error. > > does Netmap support Broadcom interfaces?? > the supported interfaces on man page of netmap > are em, ixgbe,re (only intel cards).. Then bge is probably not supported. > Is there some work going on regarding other nic's. > > How can i still use pkt-gen to send/receive pkts.? > any idea on how to run on virtualbox machine that > might have an em driver?? You can use virtualbox to set up a freebsd guest on a freebsd virtualbox host 8-) and then use netmap and em0. But you probably have to compile a kernel with device netmap for this to work ? -- pi@opsec.eu +49 171 3101372 8 years to go ! From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 14:23:26 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7642A1065677 for ; Tue, 28 Aug 2012 14:23:26 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 2DC948FC2B for ; Tue, 28 Aug 2012 14:23:24 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A31017300A; Tue, 28 Aug 2012 16:42:34 +0200 (CEST) Date: Tue, 28 Aug 2012 16:42:34 +0200 From: Luigi Rizzo To: Khan Message-ID: <20120828144234.GB65648@onelab2.iet.unipi.it> References: <1346147416.2709.YahooMailNeo@web125404.mail.ne1.yahoo.com> <20120828103612.GB3324@home.opsec.eu> <1346162167.22640.YahooMailNeo@web125403.mail.ne1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1346162167.22640.YahooMailNeo@web125403.mail.ne1.yahoo.com> User-Agent: Mutt/1.4.2.3i Cc: Kurt Jaeger , "freebsd-current@freebsd.org" Subject: Re: netmap/pkt-gen error X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 14:23:26 -0000 On Tue, Aug 28, 2012 at 06:56:07AM -0700, Khan wrote: > hi again, > i tired with v9.1RC1 but i still get the same error. > > does Netmap support Broadcom interfaces?? > the supported interfaces on man page of netmap > are em, ixgbe,re (only intel cards).. correct, netmap at the moment only supports em, ixgbe, igb, and re (most of them are intel, but re is RealTek). On linux the forcedeth (nvidia) is also supported. > Is there some work going on regarding other nic's. i think the best option is if you add support for that yourself. It is relatively easy, but you need a bit of familiarity with the specific hardware (this is the reason i did all the above drivers -- all the intels have very similar programming model, and i am familiar with the realtek), and of course some motivation. > How can i still use pkt-gen to send/receive pkts.? > any idea on how to run on virtualbox machine that > might have an em driver?? it does work, both on qemu and virtualbox. Chances are that you'll be limited by the backend driver (the one on the host OS). cheers luigi > /BR > Ahmed > Masters Student @ > Mid Sweden University > > > ________________________________ > From: Kurt Jaeger > To: Khan > Cc: freebsd-current@freebsd.org > Sent: Tuesday, August 28, 2012 12:36 PM > Subject: Re: netmap/pkt-gen error > > Hi! > > > i am running FreeBSD 9.0R with netmap already in it. > > i compiled the pkt-gen.c with gcc in tools/tools/netmap. > > after i do ./pkt-gen -i eth0 -f tx -n 500111222 -l 60 -w 5 > > > > i get an error: > > -Unable to open /dev/netmap > > -Unable to register bge0 (renamed to eth0). > [...] > > any idea on the errors/ help. > > man netmap (on 9.1-RC1 or 8.3) says: > > SUPPORTED INTERFACES > ? ? netmap supports the following interfaces: em(4), ixgbe(4), re(4), > > so it seems the interface card bge is not supported by netmap and > you should probably try 9.1-RC1 instead of 9.0. > > On 9.0 I did not find the netmap man page. > > -- > pi@opsec.eu? ? ? ? ? ? +49 171 3101372? ? ? ? ? ? ? ? ? ? ? ? 8 years to go ! > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 14:58:11 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50DB8106564A for ; Tue, 28 Aug 2012 14:58:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 250C68FC14 for ; Tue, 28 Aug 2012 14:58:11 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 86771B91C for ; Tue, 28 Aug 2012 10:58:10 -0400 (EDT) From: John Baldwin To: current@freebsd.org Date: Tue, 28 Aug 2012 10:58:09 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201208281058.10029.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 28 Aug 2012 10:58:10 -0400 (EDT) Cc: Subject: [PATCH] Add a "-h" flag to mv X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 14:58:11 -0000 I have a use case at work where I need to be able to update a symlink that points to a directory atomically (so that it points to a new directory). To give a conrete example, suppose I have two directories 'foo' and 'bar', and a symlink 'a' that I wish to atomically flip from 'foo' to 'bar'. Using 'ln -shf bar a' is not atomic as it uses separate unlink() and symlink() system calls, so there is a race where another thread may encounter ENOENT while traversing 'a'. The approach we used was to create a new symbolic link 'a.new' (e.g. via 'ln -s bar a.new') and then use rename() to rename 'a.new' on top of 'a'. Normally to do an atomic rename from userland one would use 'mv', but 'mv a.new a' doesn't do that. Instead, it moves 'a.new' into the directory referenced by the 'a' symlink. At work we have resorted to invoking python's os.rename() in a one-liner to handle this. While rehashing this discussion today it occurred to me that a -h flag to mv would allow it to work in this case (and is very similar to how ln treats its -h flag). To that end, I have a patch to add a new -h flag to mv that allows one to atomically update a symlink that points to a directory. I could not find any other mv commands that have adopted a -h (or a different flag that accomplishes the same task). Given that it functions identically to the -h flag for ln, -h seemed the "logical" choice. Any objections? Index: mv.1 =================================================================== --- mv.1 (revision 239731) +++ mv.1 (working copy) @@ -32,7 +32,7 @@ .\" @(#)mv.1 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd May 12, 2007 +.Dd August 28, 2012 .Dt MV 1 .Os .Sh NAME @@ -41,7 +41,7 @@ .Sh SYNOPSIS .Nm .Op Fl f | i | n -.Op Fl v +.Op Fl hv .Ar source target .Nm .Op Fl f | i | n @@ -81,6 +81,21 @@ or .Fl n options.) +.It Fl h +If the +.Ar target +operand is a symbolic link to a directory, +do not follow it. +This causes the +.Nm +utility to rename the file +.Ar source +to the destination path +.Ar target +rather than moving +.Ar source +into the directory referenced by +.Ar target . .It Fl i Cause .Nm @@ -142,7 +157,8 @@ .Ex -std .Sh COMPATIBILITY The -.Fl n +.Fl h , +.Fl n , and .Fl v options are non-standard and their use in scripts is not recommended. Index: mv.c =================================================================== --- mv.c (revision 239731) +++ mv.c (working copy) @@ -68,7 +68,7 @@ /* Exit code for a failed exec. */ #define EXEC_FAILED 127 -static int fflg, iflg, nflg, vflg; +static int fflg, hflg, iflg, nflg, vflg; static int copy(const char *, const char *); static int do_move(const char *, const char *); @@ -87,8 +87,11 @@ int ch; char path[PATH_MAX]; - while ((ch = getopt(argc, argv, "finv")) != -1) + while ((ch = getopt(argc, argv, "fhinv")) != -1) switch (ch) { + case 'h': + hflg = 1; + break; case 'i': iflg = 1; fflg = nflg = 0; @@ -123,6 +126,17 @@ exit(do_move(argv[0], argv[1])); } + /* + * If -h was specified, treat the target as a symlink instead of + * directory. + */ + if (hflg) { + if (argc > 2) + usage(); + if (lstat(argv[1], &sb) == 0 && S_ISLNK(sb.st_mode)) + exit(do_move(argv[0], argv[1])); + } + /* It's a directory, move each file into it. */ if (strlen(argv[argc - 1]) > sizeof(path) - 1) errx(1, "%s: destination pathname too long", *argv); @@ -483,7 +497,7 @@ { (void)fprintf(stderr, "%s\n%s\n", - "usage: mv [-f | -i | -n] [-v] source target", + "usage: mv [-f | -i | -n] [-hv] source target", " mv [-f | -i | -n] [-v] source ... directory"); exit(EX_USAGE); } -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 15:31:10 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1FB71065676; Tue, 28 Aug 2012 15:31:10 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 906FC8FC14; Tue, 28 Aug 2012 15:31:09 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A4EA27300A; Tue, 28 Aug 2012 17:50:25 +0200 (CEST) Date: Tue, 28 Aug 2012 17:50:25 +0200 From: Luigi Rizzo To: John Baldwin Message-ID: <20120828155025.GA66068@onelab2.iet.unipi.it> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <503B2803.1010104@FreeBSD.org> <201208271227.54785.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201208271227.54785.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org, current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 15:31:10 -0000 On Mon, Aug 27, 2012 at 12:27:54PM -0400, John Baldwin wrote: > On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > > on 27/08/2012 10:34 Luigi Rizzo said the following: > > > This requires to track calls to open/ioctl/poll/mmap/close. > > > The difficulty i have is with mmap() and close(), because FreeBSD > > > seems to handle these calls per-cdev rather than per-file-descriptor > > > (for instance, no 'struct file' argument is available in mmap(), and > > > the d_close method is only called on the last close() on the device). > > > > devfs_set_cdevpriv(9), etc > > mmap() is still problematic, but if you have the freedom to create your > own VM objects, then d_mmap_single() can let you handle that fairly > easily. Would dev_clone(9) be a better way to do what i need ? This way the struct cdev would be unique per file descriptor, could be used as a key on the page fault callbacks (i still do not have callbacks on dev_pager_ctor/dtor though). cheers luigi From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 15:31:10 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1FB71065676; Tue, 28 Aug 2012 15:31:10 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 906FC8FC14; Tue, 28 Aug 2012 15:31:09 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A4EA27300A; Tue, 28 Aug 2012 17:50:25 +0200 (CEST) Date: Tue, 28 Aug 2012 17:50:25 +0200 From: Luigi Rizzo To: John Baldwin Message-ID: <20120828155025.GA66068@onelab2.iet.unipi.it> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <503B2803.1010104@FreeBSD.org> <201208271227.54785.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201208271227.54785.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org, current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 15:31:10 -0000 On Mon, Aug 27, 2012 at 12:27:54PM -0400, John Baldwin wrote: > On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > > on 27/08/2012 10:34 Luigi Rizzo said the following: > > > This requires to track calls to open/ioctl/poll/mmap/close. > > > The difficulty i have is with mmap() and close(), because FreeBSD > > > seems to handle these calls per-cdev rather than per-file-descriptor > > > (for instance, no 'struct file' argument is available in mmap(), and > > > the d_close method is only called on the last close() on the device). > > > > devfs_set_cdevpriv(9), etc > > mmap() is still problematic, but if you have the freedom to create your > own VM objects, then d_mmap_single() can let you handle that fairly > easily. Would dev_clone(9) be a better way to do what i need ? This way the struct cdev would be unique per file descriptor, could be used as a key on the page fault callbacks (i still do not have callbacks on dev_pager_ctor/dtor though). cheers luigi From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 16:36:57 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 136F8106566B for ; Tue, 28 Aug 2012 16:36:57 +0000 (UTC) (envelope-from eirnym@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id CDBA48FC1B for ; Tue, 28 Aug 2012 16:36:56 +0000 (UTC) Received: by ialo14 with SMTP id o14so14107926ial.13 for ; Tue, 28 Aug 2012 09:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=Z6xlXRG0Z1NMAayD3CvbSur/cvlNQ+dXzUritl9MwAI=; b=SxsBVEukI7rE03EPn8XJ8IKX8dL8SdtDiU15XGdHeB9W+mrMqEdi+JsiGPe/ZCnzfd c9diN76FJ8FTZnVti0RBjZGRJUDyTSRQR+wCNK8B0BSjnJ7+BvEfBMNVB4EpzDZz+ZGE a4sJFFlKacY0yxKXyQZxaQ/6lt4RZsX9zFv8miQbuSHo8UgWy03bAsw98i1ee5bQRGa6 V6dz9CDm0il/hb59otcfrtcHnh6S8IP8gTIPGZRDQi1uhpsXQjHutPoSexrIR9bgy7k6 OJPFjy4DZg6C17ApY9lumlgsiUZRHPsH8AU0e2M9b+fOsxdjNZXsuzjuxSmBZ+I3pg+n kKGw== Received: by 10.50.195.132 with SMTP id ie4mr14570117igc.59.1346171809837; Tue, 28 Aug 2012 09:36:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.46.41 with HTTP; Tue, 28 Aug 2012 09:31:10 -0700 (PDT) From: Eir Nym Date: Tue, 28 Aug 2012 20:31:10 +0400 Message-ID: To: FreeBSD Mail Lists Content-Type: text/plain; charset=UTF-8 Subject: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 16:36:57 -0000 I can't build FreeBSD (GENERIC & custom kernel) with clang. Build finishes for i386 and fails for amd64 for same kernels I have bsd box with following clang version: > FreeBSD clang version 3.0 (branches/release_30 142614) 20111021 > Target: x86_64-unknown-freebsd10.0 > Thread model: posix I try to compile it with /dev/null as make.conf and following src.conf: > WITHOUT_AMD="YES" > WITHOUT_ASSERT_DEBUG="YES" > WITHOUT_ATM="YES" > WITH_BIND_LARGE_FILE="YES" > WITH_BIND_SIGCHASE="YES" > WITH_BSD_GREP="YES" > WITHOUT_CTM="YES" > WITH_CLANG="YES" > WITH_CLANG_EXTRAS="YES" > WITH_CLANG_IS_CC="YES" > WITH_CTF="YES" > WITHOUT_DYNAMICROOT="YES" > WITHOUT_FLOPPY="YES" > WITH_ICONV="YES" > WITHOUT_IPFILTER="YES" > WITHOUT_IPFW="YES" > WITHOUT_IPX="YES" > WITHOUT_IPX_SUPPORT="YES" > WITHOUT_NCP="YES" > WITHOUT_NIS="YES" > WITHOUT_NLS_CATALOGS="YES" > WITHOUT_TCSH="YES" > WITHOUT_RCMDS="YES" but I constantly get warnings (not long ago they was errors) in kernel like this: /usr/head/src/sys/netgraph/ng_parse.c:1263:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (index < 0 || eptr - (s + *off) != len) { ~~~~~ ^ ~ 1 warning generated. Also I get not initialized warnings and so on. I don't want build it with gcc. -- Eir Nym From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 16:40:49 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0602A106568C; Tue, 28 Aug 2012 16:40:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id CB68A8FC1F; Tue, 28 Aug 2012 16:40:48 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 26A4BB9A4; Tue, 28 Aug 2012 12:40:48 -0400 (EDT) From: John Baldwin To: Luigi Rizzo Date: Tue, 28 Aug 2012 12:40:29 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> In-Reply-To: <20120828155025.GA66068@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208281240.29612.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 28 Aug 2012 12:40:48 -0400 (EDT) Cc: freebsd-current@freebsd.org, current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 16:40:49 -0000 On Tuesday, August 28, 2012 11:50:25 am Luigi Rizzo wrote: > On Mon, Aug 27, 2012 at 12:27:54PM -0400, John Baldwin wrote: > > On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > > > on 27/08/2012 10:34 Luigi Rizzo said the following: > > > > This requires to track calls to open/ioctl/poll/mmap/close. > > > > The difficulty i have is with mmap() and close(), because FreeBSD > > > > seems to handle these calls per-cdev rather than per-file-descriptor > > > > (for instance, no 'struct file' argument is available in mmap(), and > > > > the d_close method is only called on the last close() on the device). > > > > > > devfs_set_cdevpriv(9), etc > > > > mmap() is still problematic, but if you have the freedom to create your > > own VM objects, then d_mmap_single() can let you handle that fairly > > easily. > > Would dev_clone(9) be a better way to do what i need ? > > This way the struct cdev would be unique per file descriptor, > could be used as a key on the page fault callbacks > (i still do not have callbacks on dev_pager_ctor/dtor though). dev_clone() is rather gross and a lot harder to use than devfs_set_cdevpriv(). If you are fine with the inherent problems of the device pager (you can't ever make mappings go away), you can just assign each client a unique offset into your shared object's memory space. However, if you are exporting shared memory buffers, then a better model might be to let your clients use shm_open(SHM_ANON) to create buffers, then pass them into your driver via an ioctl() and use shm_map() to map them into the kernel. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 16:40:49 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0602A106568C; Tue, 28 Aug 2012 16:40:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id CB68A8FC1F; Tue, 28 Aug 2012 16:40:48 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 26A4BB9A4; Tue, 28 Aug 2012 12:40:48 -0400 (EDT) From: John Baldwin To: Luigi Rizzo Date: Tue, 28 Aug 2012 12:40:29 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> In-Reply-To: <20120828155025.GA66068@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208281240.29612.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 28 Aug 2012 12:40:48 -0400 (EDT) Cc: freebsd-current@freebsd.org, current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 16:40:49 -0000 On Tuesday, August 28, 2012 11:50:25 am Luigi Rizzo wrote: > On Mon, Aug 27, 2012 at 12:27:54PM -0400, John Baldwin wrote: > > On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > > > on 27/08/2012 10:34 Luigi Rizzo said the following: > > > > This requires to track calls to open/ioctl/poll/mmap/close. > > > > The difficulty i have is with mmap() and close(), because FreeBSD > > > > seems to handle these calls per-cdev rather than per-file-descriptor > > > > (for instance, no 'struct file' argument is available in mmap(), and > > > > the d_close method is only called on the last close() on the device). > > > > > > devfs_set_cdevpriv(9), etc > > > > mmap() is still problematic, but if you have the freedom to create your > > own VM objects, then d_mmap_single() can let you handle that fairly > > easily. > > Would dev_clone(9) be a better way to do what i need ? > > This way the struct cdev would be unique per file descriptor, > could be used as a key on the page fault callbacks > (i still do not have callbacks on dev_pager_ctor/dtor though). dev_clone() is rather gross and a lot harder to use than devfs_set_cdevpriv(). If you are fine with the inherent problems of the device pager (you can't ever make mappings go away), you can just assign each client a unique offset into your shared object's memory space. However, if you are exporting shared memory buffers, then a better model might be to let your clients use shm_open(SHM_ANON) to create buffers, then pass them into your driver via an ioctl() and use shm_map() to map them into the kernel. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 17:26:27 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15026106564A; Tue, 28 Aug 2012 17:26:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 9FFD38FC1D; Tue, 28 Aug 2012 17:26:26 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q7SHQIl2033178; Tue, 28 Aug 2012 20:26:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q7SHQ66U066624; Tue, 28 Aug 2012 20:26:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q7SHQ6xk066623; Tue, 28 Aug 2012 20:26:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 28 Aug 2012 20:26:06 +0300 From: Konstantin Belousov To: John Baldwin Message-ID: <20120828172606.GR33100@deviant.kiev.zoral.com.ua> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LVYvhoM65K2KO2My" Content-Disposition: inline In-Reply-To: <201208281240.29612.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org, Luigi Rizzo , current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 17:26:27 -0000 --LVYvhoM65K2KO2My Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 28, 2012 at 12:40:29PM -0400, John Baldwin wrote: > On Tuesday, August 28, 2012 11:50:25 am Luigi Rizzo wrote: > > On Mon, Aug 27, 2012 at 12:27:54PM -0400, John Baldwin wrote: > > > On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > > > > on 27/08/2012 10:34 Luigi Rizzo said the following: > > > > > This requires to track calls to open/ioctl/poll/mmap/close. > > > > > The difficulty i have is with mmap() and close(), because FreeBSD > > > > > seems to handle these calls per-cdev rather than per-file-descrip= tor > > > > > (for instance, no 'struct file' argument is available in mmap(), = and > > > > > the d_close method is only called on the last close() on the devi= ce). > > > >=20 > > > > devfs_set_cdevpriv(9), etc > > >=20 > > > mmap() is still problematic, but if you have the freedom to create yo= ur > > > own VM objects, then d_mmap_single() can let you handle that fairly > > > easily. > >=20 > > Would dev_clone(9) be a better way to do what i need ? > >=20 > > This way the struct cdev would be unique per file descriptor, > > could be used as a key on the page fault callbacks > > (i still do not have callbacks on dev_pager_ctor/dtor though). >=20 > dev_clone() is rather gross and a lot harder to use than > devfs_set_cdevpriv(). If you are fine with the inherent problems > of the device pager (you can't ever make mappings go away), you can > just assign each client a unique offset into your shared object's > memory space. However, if you are exporting shared memory buffers, > then a better model might be to let your clients use > shm_open(SHM_ANON) to create buffers, then pass them into your driver > via an ioctl() and use shm_map() to map them into the kernel. Well, there is a new OBJT_MGTDEVICE pager, which together with d_mmap_single() allows to have even per-mapping data. i915kms uses it. You do not need cdevpriv for the per-mapping data. Also, MGTDEVICE does track the mappings of the pages, so you can clean up on device destruction. Normal callbacks of the device pager allows to execute ctr/dtr methods at the time of mapping creation and tear down. --LVYvhoM65K2KO2My Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlA8/y4ACgkQC3+MBN1Mb4j+IQCcC4kuXuh0BiqrbWZ3AwiqZ04z JXMAoPHNNYuNMS9AfW2Q7D+UdaTQk5vP =WWkn -----END PGP SIGNATURE----- --LVYvhoM65K2KO2My-- From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 17:26:27 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15026106564A; Tue, 28 Aug 2012 17:26:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 9FFD38FC1D; Tue, 28 Aug 2012 17:26:26 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q7SHQIl2033178; Tue, 28 Aug 2012 20:26:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q7SHQ66U066624; Tue, 28 Aug 2012 20:26:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q7SHQ6xk066623; Tue, 28 Aug 2012 20:26:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 28 Aug 2012 20:26:06 +0300 From: Konstantin Belousov To: John Baldwin Message-ID: <20120828172606.GR33100@deviant.kiev.zoral.com.ua> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LVYvhoM65K2KO2My" Content-Disposition: inline In-Reply-To: <201208281240.29612.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org, Luigi Rizzo , current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 17:26:27 -0000 --LVYvhoM65K2KO2My Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 28, 2012 at 12:40:29PM -0400, John Baldwin wrote: > On Tuesday, August 28, 2012 11:50:25 am Luigi Rizzo wrote: > > On Mon, Aug 27, 2012 at 12:27:54PM -0400, John Baldwin wrote: > > > On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > > > > on 27/08/2012 10:34 Luigi Rizzo said the following: > > > > > This requires to track calls to open/ioctl/poll/mmap/close. > > > > > The difficulty i have is with mmap() and close(), because FreeBSD > > > > > seems to handle these calls per-cdev rather than per-file-descrip= tor > > > > > (for instance, no 'struct file' argument is available in mmap(), = and > > > > > the d_close method is only called on the last close() on the devi= ce). > > > >=20 > > > > devfs_set_cdevpriv(9), etc > > >=20 > > > mmap() is still problematic, but if you have the freedom to create yo= ur > > > own VM objects, then d_mmap_single() can let you handle that fairly > > > easily. > >=20 > > Would dev_clone(9) be a better way to do what i need ? > >=20 > > This way the struct cdev would be unique per file descriptor, > > could be used as a key on the page fault callbacks > > (i still do not have callbacks on dev_pager_ctor/dtor though). >=20 > dev_clone() is rather gross and a lot harder to use than > devfs_set_cdevpriv(). If you are fine with the inherent problems > of the device pager (you can't ever make mappings go away), you can > just assign each client a unique offset into your shared object's > memory space. However, if you are exporting shared memory buffers, > then a better model might be to let your clients use > shm_open(SHM_ANON) to create buffers, then pass them into your driver > via an ioctl() and use shm_map() to map them into the kernel. Well, there is a new OBJT_MGTDEVICE pager, which together with d_mmap_single() allows to have even per-mapping data. i915kms uses it. You do not need cdevpriv for the per-mapping data. Also, MGTDEVICE does track the mappings of the pages, so you can clean up on device destruction. Normal callbacks of the device pager allows to execute ctr/dtr methods at the time of mapping creation and tear down. --LVYvhoM65K2KO2My Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlA8/y4ACgkQC3+MBN1Mb4j+IQCcC4kuXuh0BiqrbWZ3AwiqZ04z JXMAoPHNNYuNMS9AfW2Q7D+UdaTQk5vP =WWkn -----END PGP SIGNATURE----- --LVYvhoM65K2KO2My-- From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 18:10:57 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6B44106566B; Tue, 28 Aug 2012 18:10:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 756168FC17; Tue, 28 Aug 2012 18:10:57 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B81D1B978; Tue, 28 Aug 2012 14:10:56 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Date: Tue, 28 Aug 2012 13:38:13 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> In-Reply-To: <20120828172606.GR33100@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201208281338.13612.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 28 Aug 2012 14:10:56 -0400 (EDT) Cc: freebsd-current@freebsd.org, Luigi Rizzo , current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 18:10:57 -0000 On Tuesday, August 28, 2012 1:26:06 pm Konstantin Belousov wrote: > On Tue, Aug 28, 2012 at 12:40:29PM -0400, John Baldwin wrote: > > On Tuesday, August 28, 2012 11:50:25 am Luigi Rizzo wrote: > > > On Mon, Aug 27, 2012 at 12:27:54PM -0400, John Baldwin wrote: > > > > On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > > > > > on 27/08/2012 10:34 Luigi Rizzo said the following: > > > > > > This requires to track calls to open/ioctl/poll/mmap/close. > > > > > > The difficulty i have is with mmap() and close(), because FreeBSD > > > > > > seems to handle these calls per-cdev rather than per-file-descriptor > > > > > > (for instance, no 'struct file' argument is available in mmap(), and > > > > > > the d_close method is only called on the last close() on the device). > > > > > > > > > > devfs_set_cdevpriv(9), etc > > > > > > > > mmap() is still problematic, but if you have the freedom to create your > > > > own VM objects, then d_mmap_single() can let you handle that fairly > > > > easily. > > > > > > Would dev_clone(9) be a better way to do what i need ? > > > > > > This way the struct cdev would be unique per file descriptor, > > > could be used as a key on the page fault callbacks > > > (i still do not have callbacks on dev_pager_ctor/dtor though). > > > > dev_clone() is rather gross and a lot harder to use than > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > of the device pager (you can't ever make mappings go away), you can > > just assign each client a unique offset into your shared object's > > memory space. However, if you are exporting shared memory buffers, > > then a better model might be to let your clients use > > shm_open(SHM_ANON) to create buffers, then pass them into your driver > > via an ioctl() and use shm_map() to map them into the kernel. > > Well, there is a new OBJT_MGTDEVICE pager, which together with > d_mmap_single() allows to have even per-mapping data. i915kms uses it. > You do not need cdevpriv for the per-mapping data. > > Also, MGTDEVICE does track the mappings of the pages, so you can clean > up on device destruction. > > Normal callbacks of the device pager allows to execute ctr/dtr methods > at the time of mapping creation and tear down. These pages create PV entries so you can invalidate mappings when you invalidate a backing object, yes? That is part of the problem with the standard device pager (no way to invalidate existing mappings of an object). -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 18:10:57 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6B44106566B; Tue, 28 Aug 2012 18:10:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 756168FC17; Tue, 28 Aug 2012 18:10:57 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B81D1B978; Tue, 28 Aug 2012 14:10:56 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Date: Tue, 28 Aug 2012 13:38:13 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> In-Reply-To: <20120828172606.GR33100@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201208281338.13612.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 28 Aug 2012 14:10:56 -0400 (EDT) Cc: freebsd-current@freebsd.org, Luigi Rizzo , current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 18:10:57 -0000 On Tuesday, August 28, 2012 1:26:06 pm Konstantin Belousov wrote: > On Tue, Aug 28, 2012 at 12:40:29PM -0400, John Baldwin wrote: > > On Tuesday, August 28, 2012 11:50:25 am Luigi Rizzo wrote: > > > On Mon, Aug 27, 2012 at 12:27:54PM -0400, John Baldwin wrote: > > > > On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > > > > > on 27/08/2012 10:34 Luigi Rizzo said the following: > > > > > > This requires to track calls to open/ioctl/poll/mmap/close. > > > > > > The difficulty i have is with mmap() and close(), because FreeBSD > > > > > > seems to handle these calls per-cdev rather than per-file-descriptor > > > > > > (for instance, no 'struct file' argument is available in mmap(), and > > > > > > the d_close method is only called on the last close() on the device). > > > > > > > > > > devfs_set_cdevpriv(9), etc > > > > > > > > mmap() is still problematic, but if you have the freedom to create your > > > > own VM objects, then d_mmap_single() can let you handle that fairly > > > > easily. > > > > > > Would dev_clone(9) be a better way to do what i need ? > > > > > > This way the struct cdev would be unique per file descriptor, > > > could be used as a key on the page fault callbacks > > > (i still do not have callbacks on dev_pager_ctor/dtor though). > > > > dev_clone() is rather gross and a lot harder to use than > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > of the device pager (you can't ever make mappings go away), you can > > just assign each client a unique offset into your shared object's > > memory space. However, if you are exporting shared memory buffers, > > then a better model might be to let your clients use > > shm_open(SHM_ANON) to create buffers, then pass them into your driver > > via an ioctl() and use shm_map() to map them into the kernel. > > Well, there is a new OBJT_MGTDEVICE pager, which together with > d_mmap_single() allows to have even per-mapping data. i915kms uses it. > You do not need cdevpriv for the per-mapping data. > > Also, MGTDEVICE does track the mappings of the pages, so you can clean > up on device destruction. > > Normal callbacks of the device pager allows to execute ctr/dtr methods > at the time of mapping creation and tear down. These pages create PV entries so you can invalidate mappings when you invalidate a backing object, yes? That is part of the problem with the standard device pager (no way to invalidate existing mappings of an object). -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 18:23:10 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D6601065670; Tue, 28 Aug 2012 18:23:10 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 193028FC08; Tue, 28 Aug 2012 18:23:09 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 2621B7300B; Tue, 28 Aug 2012 20:42:26 +0200 (CEST) Date: Tue, 28 Aug 2012 20:42:26 +0200 From: Luigi Rizzo To: Konstantin Belousov Message-ID: <20120828184226.GB68683@onelab2.iet.unipi.it> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120828172606.GR33100@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i Cc: Andriy Gapon , freebsd-current@freebsd.org, current@freebsd.org Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 18:23:10 -0000 On Tue, Aug 28, 2012 at 08:26:06PM +0300, Konstantin Belousov wrote: ... > > dev_clone() is rather gross and a lot harder to use than > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > of the device pager (you can't ever make mappings go away), you can > > just assign each client a unique offset into your shared object's > > memory space. However, if you are exporting shared memory buffers, > > then a better model might be to let your clients use > > shm_open(SHM_ANON) to create buffers, then pass them into your driver > > via an ioctl() and use shm_map() to map them into the kernel. > > Well, there is a new OBJT_MGTDEVICE pager, which together with > d_mmap_single() allows to have even per-mapping data. i915kms uses it. > You do not need cdevpriv for the per-mapping data. > > Also, MGTDEVICE does track the mappings of the pages, so you can clean > up on device destruction. interesting, thanks for the pointer, i'll look it up in i915kms. Does this exist also in stable/9 ? It would be a shame otherwise... > Normal callbacks of the device pager allows to execute ctr/dtr methods > at the time of mapping creation and tear down. what would be a good way to install my own ctr/dtr methods ? I only found out a rather crude one, and it only works for the destructor: static struct cdev_pager_ops saved_cdev_pager_ops; static struct cdev_pager_ops netmap_cdev_pager_ops; static void netmap_dev_pager_dtor(void *handle) { saved_cdev_pager_ops.cdev_pg_dtor(handle); // my code here D("ready to release memory for %p", handle); } static int netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *foff, vm_size_t objsize, vm_object_t *objp, int prot) { vm_object_t obj; /* XXX check size etc. */ obj = vm_pager_allocate(OBJT_DEVICE, cdev, objsize, prot, *foff, curthread->td_ucred); if (obj == NULL) return EINVAL; if (saved_cdev_pager_ops.cdev_pg_fault == NULL) { D("initialize cdev_pager_ops"); saved_cdev_pager_ops = *(obj->un_pager.devp.ops); netmap_cdev_pager_ops = *(obj->un_pager.devp.ops); netmap_cdev_pager_ops.cdev_pg_dtor = netmap_dev_pager_dtor; }; obj->un_pager.devp.ops = &netmap_cdev_pager_ops; *objp = obj; /* XXX perhaps do something more here, such as install * mappings for the pages so we have no faults later. */ return 0; } static struct cdevsw netmap_cdevsw = { .d_version = D_VERSION, .d_name = "netmap", .d_open = netmap_open, .d_mmap = netmap_mmap, .d_mmap_single = netmap_mmap_single, .d_ioctl = netmap_ioctl, .d_poll = netmap_poll, .d_close = netmap_close, }; cheers luigi From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 18:23:10 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D6601065670; Tue, 28 Aug 2012 18:23:10 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 193028FC08; Tue, 28 Aug 2012 18:23:09 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 2621B7300B; Tue, 28 Aug 2012 20:42:26 +0200 (CEST) Date: Tue, 28 Aug 2012 20:42:26 +0200 From: Luigi Rizzo To: Konstantin Belousov Message-ID: <20120828184226.GB68683@onelab2.iet.unipi.it> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120828172606.GR33100@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i Cc: Andriy Gapon , freebsd-current@freebsd.org, current@freebsd.org Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 18:23:10 -0000 On Tue, Aug 28, 2012 at 08:26:06PM +0300, Konstantin Belousov wrote: ... > > dev_clone() is rather gross and a lot harder to use than > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > of the device pager (you can't ever make mappings go away), you can > > just assign each client a unique offset into your shared object's > > memory space. However, if you are exporting shared memory buffers, > > then a better model might be to let your clients use > > shm_open(SHM_ANON) to create buffers, then pass them into your driver > > via an ioctl() and use shm_map() to map them into the kernel. > > Well, there is a new OBJT_MGTDEVICE pager, which together with > d_mmap_single() allows to have even per-mapping data. i915kms uses it. > You do not need cdevpriv for the per-mapping data. > > Also, MGTDEVICE does track the mappings of the pages, so you can clean > up on device destruction. interesting, thanks for the pointer, i'll look it up in i915kms. Does this exist also in stable/9 ? It would be a shame otherwise... > Normal callbacks of the device pager allows to execute ctr/dtr methods > at the time of mapping creation and tear down. what would be a good way to install my own ctr/dtr methods ? I only found out a rather crude one, and it only works for the destructor: static struct cdev_pager_ops saved_cdev_pager_ops; static struct cdev_pager_ops netmap_cdev_pager_ops; static void netmap_dev_pager_dtor(void *handle) { saved_cdev_pager_ops.cdev_pg_dtor(handle); // my code here D("ready to release memory for %p", handle); } static int netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *foff, vm_size_t objsize, vm_object_t *objp, int prot) { vm_object_t obj; /* XXX check size etc. */ obj = vm_pager_allocate(OBJT_DEVICE, cdev, objsize, prot, *foff, curthread->td_ucred); if (obj == NULL) return EINVAL; if (saved_cdev_pager_ops.cdev_pg_fault == NULL) { D("initialize cdev_pager_ops"); saved_cdev_pager_ops = *(obj->un_pager.devp.ops); netmap_cdev_pager_ops = *(obj->un_pager.devp.ops); netmap_cdev_pager_ops.cdev_pg_dtor = netmap_dev_pager_dtor; }; obj->un_pager.devp.ops = &netmap_cdev_pager_ops; *objp = obj; /* XXX perhaps do something more here, such as install * mappings for the pages so we have no faults later. */ return 0; } static struct cdevsw netmap_cdevsw = { .d_version = D_VERSION, .d_name = "netmap", .d_open = netmap_open, .d_mmap = netmap_mmap, .d_mmap_single = netmap_mmap_single, .d_ioctl = netmap_ioctl, .d_poll = netmap_poll, .d_close = netmap_close, }; cheers luigi From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 18:49:53 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CE5F106566C for ; Tue, 28 Aug 2012 18:49:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5907D8FC18 for ; Tue, 28 Aug 2012 18:49:53 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 72AE95C59; Tue, 28 Aug 2012 20:49:51 +0200 (CEST) Message-ID: <503D12CB.4000208@FreeBSD.org> Date: Tue, 28 Aug 2012 20:49:47 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120815 Thunderbird/15.0 MIME-Version: 1.0 To: Eir Nym References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 18:49:53 -0000 On 2012-08-28 18:31, Eir Nym wrote: > I can't build FreeBSD (GENERIC & custom kernel) with clang. Build > finishes for i386 and fails for amd64 for same kernels What is the error you were getting on amd64? > I have bsd box with following clang version: >> FreeBSD clang version 3.0 (branches/release_30 142614) 20111021 >> Target: x86_64-unknown-freebsd10.0 >> Thread model: posix This is rather old, we went through clang 3.1 some time ago, and recently updated it to 3.2. > I try to compile it with /dev/null as make.conf and following src.conf: ... > but I constantly get warnings (not long ago they was errors) in kernel > like this: > /usr/head/src/sys/netgraph/ng_parse.c:1263:14: warning: comparison of > unsigned expression < 0 is always false [-Wtautological-compare] > if (index < 0 || eptr - (s + *off) != len) { > ~~~~~ ^ ~ > 1 warning generated. > > Also I get not initialized warnings and so on. You can safely ignore those. They are just an incentive for the maintainers to fix them eventually. Those tautological comparison warnings specifically are quite harmless: the compiler will optimize the unused code away anyhow. From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 19:35:46 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F263106566B; Tue, 28 Aug 2012 19:35:45 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by mx1.freebsd.org (Postfix) with ESMTP id 284838FC0A; Tue, 28 Aug 2012 19:35:44 +0000 (UTC) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 3F39D4C0644; Tue, 28 Aug 2012 14:35:44 -0500 (CDT) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 3DCFB4C061D; Tue, 28 Aug 2012 14:35:44 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from mh11.mail.rice.edu ([127.0.0.1]) by mh11.mail.rice.edu (mh11.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id IQrFtmgzzFQW; Tue, 28 Aug 2012 14:35:44 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id D22494C0580; Tue, 28 Aug 2012 14:35:43 -0500 (CDT) Message-ID: <503D1D8E.3020601@rice.edu> Date: Tue, 28 Aug 2012 14:35:42 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111113 Thunderbird/8.0 MIME-Version: 1.0 To: Luigi Rizzo References: <20120823163145.GA3999@onelab2.iet.unipi.it> <50366398.2070700@rice.edu> <20120823174504.GB4820@onelab2.iet.unipi.it> <50371485.1020409@rice.edu> <20120824145708.GA16557@onelab2.iet.unipi.it> <5037A803.6030100@rice.edu> <20120824165428.GA17495@onelab2.iet.unipi.it> <5037B226.3000103@rice.edu> <20120826171126.GA40672@onelab2.iet.unipi.it> <503B24E4.6090701@rice.edu> <20120827113942.GA51298@onelab2.iet.unipi.it> In-Reply-To: <20120827113942.GA51298@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: alc@freebsd.org, current@freebsd.org Subject: Re: less aggressive contigmalloc ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 19:35:46 -0000 On 08/27/2012 06:39, Luigi Rizzo wrote: > On Mon, Aug 27, 2012 at 02:42:28AM -0500, Alan Cox wrote: > ... >>> this is dmesg when I add kdb_backtrace() at the start of vm_pageout_oom() >>> The '... netmap_finalize_obj_allocator... are from my calls to >>> contigmalloc, each one doing one-page allocations. >> These calls are made with M_WAITOK? > no they are with M_NOWAIT: > > ... > clust = contigmalloc(p->_clustsize, M_NETMAP, M_NOWAIT | M_ZERO, > 0, -1UL, PAGE_SIZE, 0); > ... > > p->_clustsize is 4096 in this particular set of calls. If M_NOWAIT is passed to contigmalloc(), then there is no call path by which contigmalloc() or any function that it calls would call vm_pageout_oom(). contigmalloc() may, however, wake the page daemon if the free page queues become sufficiently depleted. >>> I get 7-8 'KDB: stack backtrace' blocks, then allocations >>> restart successfully, then more failures... >>> The reference to fork_exit() does not seem right, because i am >>> in a block where i call contigmalloc, so the caller of >>> vm_pageout_grow_cache() should be kmem_alloc_contig(). >> Try this instead. At the start of vm_pageout_oom(), print the value of >> its parameter "shortage". That will uniquely identify the caller. > it says "shortage is 1" which means that the call is from vm_pageout(). Yes. I'm afraid that you're simply running short of memory. There's nothing particular to contigmalloc() happening here. Anything that allocated and wired the same amount of physical memory would have the same effect. However, if you're confident that the machine really has sufficient memory to support what you're trying to run, then you could tinker with the page daemon's targets for free pages. Alan From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 19:51:32 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 041B1106566B; Tue, 28 Aug 2012 19:51:32 +0000 (UTC) (envelope-from eirnym@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id B20C18FC1A; Tue, 28 Aug 2012 19:51:31 +0000 (UTC) Received: by ialo14 with SMTP id o14so14629745ial.13 for ; Tue, 28 Aug 2012 12:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=oN8QvmnMpeChRvmP5vUngWS0R6wfZ+8/M5tRO5UBJ+k=; b=mGGnlzQwwZFlDSgY7DTbBATPJScglHKql3f2ILlYyp93nYsVwalnDwoWdvgbBXVokc z9eBuykvtEffJBktPiZX0O6tOWyNkGPEWYqsdmyYrPXlVbsbFaS3zgLscf5a94P2Lbyp vAkDcKu7iHn64FhAAx3k1DXKU5R+ff7k1+4xd9AW8o68sYZLE1qqsabUzOQmdBolphDw yeLFTaUJbRPdbVJvHFVDsrVq8Hh22dkzsk7BAh7vBR1DKhC/R77uNoisYX78h0WXNs7F 93rd3/aegQYJf2L/2BwlEM9uLW3lWoeg1M4s33T+Q8WEyQ5WHLNJiJTohP0cHbefqqZ4 jrAw== Received: by 10.50.187.233 with SMTP id fv9mr15192098igc.59.1346183491254; Tue, 28 Aug 2012 12:51:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.46.41 with HTTP; Tue, 28 Aug 2012 12:51:10 -0700 (PDT) In-Reply-To: <503D12CB.4000208@FreeBSD.org> References: <503D12CB.4000208@FreeBSD.org> From: Eir Nym Date: Tue, 28 Aug 2012 23:51:10 +0400 Message-ID: To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 19:51:32 -0000 -- Eir Nym On 28 August 2012 22:49, Dimitry Andric wrote: > On 2012-08-28 18:31, Eir Nym wrote: >> >> I can't build FreeBSD (GENERIC & custom kernel) with clang. Build >> finishes for i386 and fails for amd64 for same kernels > > > What is the error you were getting on amd64? > > i386 never failed, amd64 =E2=80=94 always > >> I have bsd box with following clang version: >>> >>> FreeBSD clang version 3.0 (branches/release_30 142614) 20111021 >>> Target: x86_64-unknown-freebsd10.0 >>> Thread model: posix > > > This is rather old, we went through clang 3.1 some time ago, and > recently updated it to 3.2. > > I use to be sure I use latest clang make kernel-toolchain buildkernel ${other_args} > >> I try to compile it with /dev/null as make.conf and following src.conf: > > ... > >> but I constantly get warnings (not long ago they was errors) in kernel >> like this: >> /usr/head/src/sys/netgraph/ng_parse.c:1263:14: warning: comparison of >> unsigned expression < 0 is always false [-Wtautological-compare] >> if (index < 0 || eptr - (s + *off) !=3D len) { >> ~~~~~ ^ ~ >> 1 warning generated. >> >> Also I get not initialized warnings and so on. > > > You can safely ignore those. They are just an incentive for the > maintainers to fix them eventually. Those tautological comparison > warnings specifically are quite harmless: the compiler will optimize the > unused code away anyhow. I know about ignorance, but compiler fails at them. From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 20:13:55 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53E11106564A for ; Tue, 28 Aug 2012 20:13:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id C57348FC19 for ; Tue, 28 Aug 2012 20:13:54 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q7SKDqVM075768; Wed, 29 Aug 2012 00:13:52 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q7SKDqcu075767; Wed, 29 Aug 2012 00:13:52 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 29 Aug 2012 00:13:51 +0400 From: Gleb Smirnoff To: Ian FREISLICH Message-ID: <20120828201351.GH20560@FreeBSD.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: current@FreeBSD.org Subject: Re: Panic on use of "deleted" route. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 20:13:55 -0000 Ian, On Mon, Aug 27, 2012 at 09:08:31PM +0200, Ian FREISLICH wrote: I> I get a panic shortly after ppp(8) exits. I haven't been able to I> get a crashdump from a recent -CURRENT system, so in that absence, I> I'll include output from an older system. Interestingly, the route I> partially persists past the destruction of the interface. And the I> panic is triggered apparently by the use of the route. I've also I> been unable to delete routes added on the system. We're running a I> kernel compiled with options RADIX_MPATH. Please confirm that this is specific to RADIX_MPATH. I mean that it can't reproduces w/o RADIX_MPATH. I> [root@pbx ~]# pppctl -p pass 3000 quit all I> Connection closed I> [root@pbx ~]# ifconfig tun0 I> ifconfig: interface tun0 does not exist I> [root@pbx ~]# netstat -rn I> Routing tables I> I> Internet: I> Destination Gateway Flags Refs Use Netif Expire I> default tun0 US 0 4 A full reproduce recipe, including ppp configuration would be useful, too. So that anyone can reproduce the panic on a test box. -- Totus tuus, Glebius. From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 20:21:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11DD61065688; Tue, 28 Aug 2012 20:21:16 +0000 (UTC) (envelope-from eirnym@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id BAD3F8FC12; Tue, 28 Aug 2012 20:21:15 +0000 (UTC) Received: by ialo14 with SMTP id o14so14705480ial.13 for ; Tue, 28 Aug 2012 13:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=lNARPO+QxEi5VvGE8kWypJ4PdG/nHde9Ksc97Nuhu+4=; b=tWg6NuPDPRuc/jq7eeRFK4BZ4TpPzHJP6K2NPTOQ8JH8AbUcfk60xoS0bgjrhvk9IW wOGepaRvwtev5q2brrvyj3ii1WS9+mLVV0QscQ9m6/1EeSl1jKvd/GODtJlxOemLUpEz dxSbCaGcLmNeDCk9IqGkeo6BqKQswCg5JIe9PKoMvtzxarWNHmnq5IKDoMF/TsVhAdiH JKr5tg8KNy36S6ZTQ+v42GPnvDZtEWo/u5+nIW4Zls0QjKtTrWNw5DgqZih2ngrcLNh9 zA72JWTt0t0AbV5/XI4aCgqNyJruJ0S5Oz51odz6QfX14sc5se++LPRwVwVUg8Zqhmjx DF+w== Received: by 10.50.195.132 with SMTP id ie4mr15247157igc.59.1346185274901; Tue, 28 Aug 2012 13:21:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.46.41 with HTTP; Tue, 28 Aug 2012 13:20:54 -0700 (PDT) In-Reply-To: References: <503D12CB.4000208@FreeBSD.org> From: Eir Nym Date: Wed, 29 Aug 2012 00:20:54 +0400 Message-ID: To: Dimitry Andric Content-Type: multipart/mixed; boundary=14dae9340a7f1cc4fe04c8592f81 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 20:21:16 -0000 --14dae9340a7f1cc4fe04c8592f81 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable -- Eir Nym On 28 August 2012 23:51, Eir Nym wrote: > -- Eir Nym > > > On 28 August 2012 22:49, Dimitry Andric wrote: >> On 2012-08-28 18:31, Eir Nym wrote: >>> >>> I can't build FreeBSD (GENERIC & custom kernel) with clang. Build >>> finishes for i386 and fails for amd64 for same kernels >> >> >> What is the error you were getting on amd64? >> >> > i386 never failed, amd64 =E2=80=94 always >> >>> I have bsd box with following clang version: >>>> >>>> FreeBSD clang version 3.0 (branches/release_30 142614) 20111021 >>>> Target: x86_64-unknown-freebsd10.0 >>>> Thread model: posix >> >> >> This is rather old, we went through clang 3.1 some time ago, and >> recently updated it to 3.2. >> >> > > I use to be sure I use latest clang > make kernel-toolchain buildkernel ${other_args} > >> >>> I try to compile it with /dev/null as make.conf and following src.conf: >> >> ... >> >>> but I constantly get warnings (not long ago they was errors) in kernel >>> like this: >>> /usr/head/src/sys/netgraph/ng_parse.c:1263:14: warning: comparison of >>> unsigned expression < 0 is always false [-Wtautological-compare] >>> if (index < 0 || eptr - (s + *off) !=3D len) { >>> ~~~~~ ^ ~ >>> 1 warning generated. >>> >>> Also I get not initialized warnings and so on. >> >> >> You can safely ignore those. They are just an incentive for the >> maintainers to fix them eventually. Those tautological comparison >> warnings specifically are quite harmless: the compiler will optimize the >> unused code away anyhow. > > I know about ignorance, but compiler fails at them. my simple make world script is in attachment --14dae9340a7f1cc4fe04c8592f81-- From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 20:28:40 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF8D7106564A for ; Tue, 28 Aug 2012 20:28:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 689E58FC18 for ; Tue, 28 Aug 2012 20:28:40 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 5225B5C59; Tue, 28 Aug 2012 22:28:39 +0200 (CEST) Message-ID: <503D29F4.1030804@FreeBSD.org> Date: Tue, 28 Aug 2012 22:28:36 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120815 Thunderbird/15.0 MIME-Version: 1.0 To: Eir Nym References: <503D12CB.4000208@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 20:28:40 -0000 On 2012-08-28 21:51, Eir Nym wrote: > On 28 August 2012 22:49, Dimitry Andric wrote: >> On 2012-08-28 18:31, Eir Nym wrote: >> What is the error you were getting on amd64? > i386 never failed, amd64 =E2=80=94 always Please post the *exact* error message, otherwise I will not be able to help you. From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 21:05:43 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0ED1E1065670; Tue, 28 Aug 2012 21:05:43 +0000 (UTC) (envelope-from eirnym@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id BAB488FC21; Tue, 28 Aug 2012 21:05:42 +0000 (UTC) Received: by ialo14 with SMTP id o14so14822876ial.13 for ; Tue, 28 Aug 2012 14:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=x2a0nXXvCQ19h70X5FNnvMrDW6/6WDde6wrdcFnv5cw=; b=VMk5r7ZHd0nTT9iYz/KDJvxaIRGIWf0QhzgXls7iq3sBQEdigT9sRB0fNI0hUJhokE ktZ8OpQlipChqOCrz7Q3Lp44swPjJHhsa/f/RMRqMZu8zrT8iAL9LGKkkS53ebzw53AZ M9dFYYDR5UuBanqPwDQDWifF9jDRMkk2T8XFKWWfdyYs0CeEqOesumeB14TMVvb2A5TE 80QD9JmnSu0s7bR45oLTdgNBknSEZ5k+rCYm5PXGaEooOh7UL+EX47oFxqdZk8BAV1F1 t94fitfyBKSYWCHa+C0/6HxBP2+BTg/KyvffwlZ+7terSkgJkRpREETQ48oZWbdeTQPw jW4w== Received: by 10.50.46.133 with SMTP id v5mr14528833igm.63.1346187941836; Tue, 28 Aug 2012 14:05:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.46.41 with HTTP; Tue, 28 Aug 2012 14:05:21 -0700 (PDT) In-Reply-To: <503D29F4.1030804@FreeBSD.org> References: <503D12CB.4000208@FreeBSD.org> <503D29F4.1030804@FreeBSD.org> From: Eir Nym Date: Wed, 29 Aug 2012 01:05:21 +0400 Message-ID: To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 21:05:43 -0000 -- Eir Nym On 29 August 2012 00:28, Dimitry Andric wrote: > On 2012-08-28 21:51, Eir Nym wrote: >> >> On 28 August 2012 22:49, Dimitry Andric wrote: >>> >>> On 2012-08-28 18:31, Eir Nym wrote: >>> What is the error you were getting on amd64? >> >> i386 never failed, amd64 =E2=80=94 always > > > Please post the *exact* error message, otherwise I will not be able to > help you. > This one for example: cc -c -O2 -pipe -fno-strict-aliasing -std=3Dc99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -I. -I/usr/head/src/sys -I/usr/head/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-aes -mno-avx -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c -I/usr/head/src/sys/gnu/fs/xfs/FreeBSD -I/usr/head/src/sys/gnu/fs/xfs/FreeBSD/support -I/usr/head/src/sys/gnu/fs/xfs /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: error: variable 'fbno' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 && !args= ->isfl && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1492:11: note: uninitialized use occurs here *fbnop =3D fbno; ^~~~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:7: note: remove the 'if' if its condition is always true else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 && !args= ->isfl && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: error: variable 'fbno' is used uninitialized whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized] else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 && !args= ->isfl && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1492:11: note: uninitialized use occurs here *fbnop =3D fbno; ^~~~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: note: remove the '&&' if its condition is always true else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 && !args= ->isfl && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: error: variable 'fbno' is used uninitialized whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized] else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 && !args= ->isfl && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1492:11: note: uninitialized use occurs here *fbnop =3D fbno; ^~~~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: note: remove the '&&' if its condition is always true else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 && !args= ->isfl && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: error: variable 'fbno' is used uninitialized whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized] else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 && !args= ->isfl && ^~~~~~~~~~~~~~~~~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1492:11: note: uninitialized use occurs here *fbnop =3D fbno; ^~~~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: note: remove the '&&' if its condition is always true else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 && !args= ->isfl && ^~~~~~~~~~~~~~~~~~~~ /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1430:20: note: initialize the variable 'fbno' to silence this warning xfs_agblock_t fbno; ^ =3D 0 4 errors generated. *** [xfs_alloc.o] Error code 1 From owner-freebsd-current@FreeBSD.ORG Tue Aug 28 21:19:27 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 59ED6106564A for ; Tue, 28 Aug 2012 21:19:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 12B4B8FC0C for ; Tue, 28 Aug 2012 21:19:27 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 5482A5C59; Tue, 28 Aug 2012 23:19:26 +0200 (CEST) Message-ID: <503D35DA.9060704@FreeBSD.org> Date: Tue, 28 Aug 2012 23:19:22 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120815 Thunderbird/15.0 MIME-Version: 1.0 To: Eir Nym References: <503D12CB.4000208@FreeBSD.org> <503D29F4.1030804@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 21:19:27 -0000 On 2012-08-28 23:05, Eir Nym wrote: ... > This one for example: > cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall > -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs > -fdiagnostics-show-option -Wno-error-tautological-compare > -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -I. > -I/usr/head/src/sys -I/usr/head/src/sys/contrib/altq -D_KERNEL > -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h > -fno-omit-frame-pointer -mno-aes -mno-avx -mcmodel=kernel > -mno-red-zone -mno-mmx -mno-sse -msoft-float > -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector > -Werror /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c > -I/usr/head/src/sys/gnu/fs/xfs/FreeBSD > -I/usr/head/src/sys/gnu/fs/xfs/FreeBSD/support > -I/usr/head/src/sys/gnu/fs/xfs > /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: error: variable > 'fbno' is used uninitialized whenever 'if' condition is false > [-Werror,-Wsometimes-uninitialized] > else if (args->minlen == 1 && args->alignment == 1 && !args->isfl && > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Weird, how are you building the xfs module? It has WERROR= in its Makefile, so the '-Werror' option above should not be there. This is because the XFS code was imported more than 6 years ago, and is very unlikely to ever be fixed. :) From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 04:07:43 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9191106566C; Wed, 29 Aug 2012 04:07:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 6BBF18FC0A; Wed, 29 Aug 2012 04:07:42 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q7T47n9i083753; Wed, 29 Aug 2012 07:07:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q7T47bHA070259; Wed, 29 Aug 2012 07:07:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q7T47bTm070258; Wed, 29 Aug 2012 07:07:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 29 Aug 2012 07:07:37 +0300 From: Konstantin Belousov To: John Baldwin Message-ID: <20120829040737.GS33100@deviant.kiev.zoral.com.ua> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> <201208281338.13612.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GM/p8XWaonmYtdwv" Content-Disposition: inline In-Reply-To: <201208281338.13612.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org, Luigi Rizzo , current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 04:07:44 -0000 --GM/p8XWaonmYtdwv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 28, 2012 at 01:38:13PM -0400, John Baldwin wrote: > On Tuesday, August 28, 2012 1:26:06 pm Konstantin Belousov wrote: > > On Tue, Aug 28, 2012 at 12:40:29PM -0400, John Baldwin wrote: > > > On Tuesday, August 28, 2012 11:50:25 am Luigi Rizzo wrote: > > > > On Mon, Aug 27, 2012 at 12:27:54PM -0400, John Baldwin wrote: > > > > > On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > > > > > > on 27/08/2012 10:34 Luigi Rizzo said the following: > > > > > > > This requires to track calls to open/ioctl/poll/mmap/close. > > > > > > > The difficulty i have is with mmap() and close(), because Fre= eBSD > > > > > > > seems to handle these calls per-cdev rather than per-file-des= criptor > > > > > > > (for instance, no 'struct file' argument is available in mmap= (), and > > > > > > > the d_close method is only called on the last close() on the = device). > > > > > >=20 > > > > > > devfs_set_cdevpriv(9), etc > > > > >=20 > > > > > mmap() is still problematic, but if you have the freedom to creat= e your > > > > > own VM objects, then d_mmap_single() can let you handle that fair= ly > > > > > easily. > > > >=20 > > > > Would dev_clone(9) be a better way to do what i need ? > > > >=20 > > > > This way the struct cdev would be unique per file descriptor, > > > > could be used as a key on the page fault callbacks > > > > (i still do not have callbacks on dev_pager_ctor/dtor though). > > >=20 > > > dev_clone() is rather gross and a lot harder to use than > > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > > of the device pager (you can't ever make mappings go away), you can > > > just assign each client a unique offset into your shared object's > > > memory space. However, if you are exporting shared memory buffers, > > > then a better model might be to let your clients use > > > shm_open(SHM_ANON) to create buffers, then pass them into your driver > > > via an ioctl() and use shm_map() to map them into the kernel. > >=20 > > Well, there is a new OBJT_MGTDEVICE pager, which together with > > d_mmap_single() allows to have even per-mapping data. i915kms uses it. > > You do not need cdevpriv for the per-mapping data. > >=20 > > Also, MGTDEVICE does track the mappings of the pages, so you can clean > > up on device destruction. > >=20 > > Normal callbacks of the device pager allows to execute ctr/dtr methods > > at the time of mapping creation and tear down. >=20 > These pages create PV entries so you can invalidate mappings when you > invalidate a backing object, yes? That is part of the problem with the > standard device pager (no way to invalidate existing mappings of an > object). Right. Ability to invalidate the mappings of the device pages was the main motivation for the new pager. I forgot to mention that pmap shall properly handle fictitious managed pages for the pager to work. It was fixed in the x86 pmaps, but I did not even touched others. --GM/p8XWaonmYtdwv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlA9lYgACgkQC3+MBN1Mb4inbgCgqRZ45YW9D70Ge0zNc9iv0qnE /dkAn0ILiXuNPMsfgspVVNt9Q9syLHOP =B186 -----END PGP SIGNATURE----- --GM/p8XWaonmYtdwv-- From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 04:07:43 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9191106566C; Wed, 29 Aug 2012 04:07:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 6BBF18FC0A; Wed, 29 Aug 2012 04:07:42 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q7T47n9i083753; Wed, 29 Aug 2012 07:07:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q7T47bHA070259; Wed, 29 Aug 2012 07:07:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q7T47bTm070258; Wed, 29 Aug 2012 07:07:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 29 Aug 2012 07:07:37 +0300 From: Konstantin Belousov To: John Baldwin Message-ID: <20120829040737.GS33100@deviant.kiev.zoral.com.ua> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> <201208281338.13612.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GM/p8XWaonmYtdwv" Content-Disposition: inline In-Reply-To: <201208281338.13612.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org, Luigi Rizzo , current@freebsd.org, Andriy Gapon Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 04:07:44 -0000 --GM/p8XWaonmYtdwv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 28, 2012 at 01:38:13PM -0400, John Baldwin wrote: > On Tuesday, August 28, 2012 1:26:06 pm Konstantin Belousov wrote: > > On Tue, Aug 28, 2012 at 12:40:29PM -0400, John Baldwin wrote: > > > On Tuesday, August 28, 2012 11:50:25 am Luigi Rizzo wrote: > > > > On Mon, Aug 27, 2012 at 12:27:54PM -0400, John Baldwin wrote: > > > > > On Monday, August 27, 2012 3:55:47 am Andriy Gapon wrote: > > > > > > on 27/08/2012 10:34 Luigi Rizzo said the following: > > > > > > > This requires to track calls to open/ioctl/poll/mmap/close. > > > > > > > The difficulty i have is with mmap() and close(), because Fre= eBSD > > > > > > > seems to handle these calls per-cdev rather than per-file-des= criptor > > > > > > > (for instance, no 'struct file' argument is available in mmap= (), and > > > > > > > the d_close method is only called on the last close() on the = device). > > > > > >=20 > > > > > > devfs_set_cdevpriv(9), etc > > > > >=20 > > > > > mmap() is still problematic, but if you have the freedom to creat= e your > > > > > own VM objects, then d_mmap_single() can let you handle that fair= ly > > > > > easily. > > > >=20 > > > > Would dev_clone(9) be a better way to do what i need ? > > > >=20 > > > > This way the struct cdev would be unique per file descriptor, > > > > could be used as a key on the page fault callbacks > > > > (i still do not have callbacks on dev_pager_ctor/dtor though). > > >=20 > > > dev_clone() is rather gross and a lot harder to use than > > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > > of the device pager (you can't ever make mappings go away), you can > > > just assign each client a unique offset into your shared object's > > > memory space. However, if you are exporting shared memory buffers, > > > then a better model might be to let your clients use > > > shm_open(SHM_ANON) to create buffers, then pass them into your driver > > > via an ioctl() and use shm_map() to map them into the kernel. > >=20 > > Well, there is a new OBJT_MGTDEVICE pager, which together with > > d_mmap_single() allows to have even per-mapping data. i915kms uses it. > > You do not need cdevpriv for the per-mapping data. > >=20 > > Also, MGTDEVICE does track the mappings of the pages, so you can clean > > up on device destruction. > >=20 > > Normal callbacks of the device pager allows to execute ctr/dtr methods > > at the time of mapping creation and tear down. >=20 > These pages create PV entries so you can invalidate mappings when you > invalidate a backing object, yes? That is part of the problem with the > standard device pager (no way to invalidate existing mappings of an > object). Right. Ability to invalidate the mappings of the device pages was the main motivation for the new pager. I forgot to mention that pmap shall properly handle fictitious managed pages for the pager to work. It was fixed in the x86 pmaps, but I did not even touched others. --GM/p8XWaonmYtdwv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlA9lYgACgkQC3+MBN1Mb4inbgCgqRZ45YW9D70Ge0zNc9iv0qnE /dkAn0ILiXuNPMsfgspVVNt9Q9syLHOP =B186 -----END PGP SIGNATURE----- --GM/p8XWaonmYtdwv-- From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 04:12:45 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D20A10656B7; Wed, 29 Aug 2012 04:12:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id BEB138FC15; Wed, 29 Aug 2012 04:12:44 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q7T4CqFS084106; Wed, 29 Aug 2012 07:12:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q7T4Ce6W070292; Wed, 29 Aug 2012 07:12:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q7T4CeRQ070291; Wed, 29 Aug 2012 07:12:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 29 Aug 2012 07:12:40 +0300 From: Konstantin Belousov To: Luigi Rizzo Message-ID: <20120829041240.GT33100@deviant.kiev.zoral.com.ua> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> <20120828184226.GB68683@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AFXWwd8AV04RZu1u" Content-Disposition: inline In-Reply-To: <20120828184226.GB68683@onelab2.iet.unipi.it> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Andriy Gapon , freebsd-current@freebsd.org, current@freebsd.org Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 04:12:45 -0000 --AFXWwd8AV04RZu1u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 28, 2012 at 08:42:26PM +0200, Luigi Rizzo wrote: > On Tue, Aug 28, 2012 at 08:26:06PM +0300, Konstantin Belousov wrote: > ... > > > dev_clone() is rather gross and a lot harder to use than > > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > > of the device pager (you can't ever make mappings go away), you can > > > just assign each client a unique offset into your shared object's > > > memory space. However, if you are exporting shared memory buffers, > > > then a better model might be to let your clients use > > > shm_open(SHM_ANON) to create buffers, then pass them into your driver > > > via an ioctl() and use shm_map() to map them into the kernel. > >=20 > > Well, there is a new OBJT_MGTDEVICE pager, which together with > > d_mmap_single() allows to have even per-mapping data. i915kms uses it. > > You do not need cdevpriv for the per-mapping data. > >=20 > > Also, MGTDEVICE does track the mappings of the pages, so you can clean > > up on device destruction. >=20 > interesting, thanks for the pointer, i'll look it up in i915kms. > Does this exist also in stable/9 ? > It would be a shame otherwise... Yes, it was merged. >=20 > > Normal callbacks of the device pager allows to execute ctr/dtr methods > > at the time of mapping creation and tear down. >=20 > what would be a good way to install my own ctr/dtr methods ? > I only found out a rather crude one, and it only works for > the destructor: See below. >=20 > static struct cdev_pager_ops saved_cdev_pager_ops; > static struct cdev_pager_ops netmap_cdev_pager_ops; >=20 > static void > netmap_dev_pager_dtor(void *handle) > { > saved_cdev_pager_ops.cdev_pg_dtor(handle); > // my code here > D("ready to release memory for %p", handle); > } >=20 >=20 > static int > netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *foff, > vm_size_t objsize, vm_object_t *objp, int prot) > { > vm_object_t obj; > =20 > /* XXX check size etc. */ > obj =3D vm_pager_allocate(OBJT_DEVICE, cdev, objsize, prot, *foff, > curthread->td_ucred); Use cdev_pager_allocate(). > if (obj =3D=3D NULL) > return EINVAL; > if (saved_cdev_pager_ops.cdev_pg_fault =3D=3D NULL) { I do not understand what are you trying to accomplish with the check and reinitialization, but I assume that cdev_pager_allocate() would take care of it. > D("initialize cdev_pager_ops"); > saved_cdev_pager_ops =3D *(obj->un_pager.devp.ops); > netmap_cdev_pager_ops =3D *(obj->un_pager.devp.ops); > netmap_cdev_pager_ops.cdev_pg_dtor =3D netmap_dev_pager_d= tor; > }; > obj->un_pager.devp.ops =3D &netmap_cdev_pager_ops; > *objp =3D obj; > /* XXX perhaps do something more here, such as install > * mappings for the pages so we have no faults later. > */ > return 0; > } >=20 > static struct cdevsw netmap_cdevsw =3D { > .d_version =3D D_VERSION, > .d_name =3D "netmap", > .d_open =3D netmap_open, > .d_mmap =3D netmap_mmap, > .d_mmap_single =3D netmap_mmap_single, > .d_ioctl =3D netmap_ioctl, > .d_poll =3D netmap_poll, > .d_close =3D netmap_close, > }; >=20 > cheers > luigi --AFXWwd8AV04RZu1u Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlA9lrgACgkQC3+MBN1Mb4jP6ACcCMmlQWybZzcQ0E46r0W8QO0i C+cAnR+5HSBZ7TIswEPM7MATirJuZQfP =iv01 -----END PGP SIGNATURE----- --AFXWwd8AV04RZu1u-- From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 04:12:45 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D20A10656B7; Wed, 29 Aug 2012 04:12:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id BEB138FC15; Wed, 29 Aug 2012 04:12:44 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q7T4CqFS084106; Wed, 29 Aug 2012 07:12:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q7T4Ce6W070292; Wed, 29 Aug 2012 07:12:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q7T4CeRQ070291; Wed, 29 Aug 2012 07:12:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 29 Aug 2012 07:12:40 +0300 From: Konstantin Belousov To: Luigi Rizzo Message-ID: <20120829041240.GT33100@deviant.kiev.zoral.com.ua> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> <20120828184226.GB68683@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AFXWwd8AV04RZu1u" Content-Disposition: inline In-Reply-To: <20120828184226.GB68683@onelab2.iet.unipi.it> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Andriy Gapon , freebsd-current@freebsd.org, current@freebsd.org Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 04:12:45 -0000 --AFXWwd8AV04RZu1u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 28, 2012 at 08:42:26PM +0200, Luigi Rizzo wrote: > On Tue, Aug 28, 2012 at 08:26:06PM +0300, Konstantin Belousov wrote: > ... > > > dev_clone() is rather gross and a lot harder to use than > > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > > of the device pager (you can't ever make mappings go away), you can > > > just assign each client a unique offset into your shared object's > > > memory space. However, if you are exporting shared memory buffers, > > > then a better model might be to let your clients use > > > shm_open(SHM_ANON) to create buffers, then pass them into your driver > > > via an ioctl() and use shm_map() to map them into the kernel. > >=20 > > Well, there is a new OBJT_MGTDEVICE pager, which together with > > d_mmap_single() allows to have even per-mapping data. i915kms uses it. > > You do not need cdevpriv for the per-mapping data. > >=20 > > Also, MGTDEVICE does track the mappings of the pages, so you can clean > > up on device destruction. >=20 > interesting, thanks for the pointer, i'll look it up in i915kms. > Does this exist also in stable/9 ? > It would be a shame otherwise... Yes, it was merged. >=20 > > Normal callbacks of the device pager allows to execute ctr/dtr methods > > at the time of mapping creation and tear down. >=20 > what would be a good way to install my own ctr/dtr methods ? > I only found out a rather crude one, and it only works for > the destructor: See below. >=20 > static struct cdev_pager_ops saved_cdev_pager_ops; > static struct cdev_pager_ops netmap_cdev_pager_ops; >=20 > static void > netmap_dev_pager_dtor(void *handle) > { > saved_cdev_pager_ops.cdev_pg_dtor(handle); > // my code here > D("ready to release memory for %p", handle); > } >=20 >=20 > static int > netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *foff, > vm_size_t objsize, vm_object_t *objp, int prot) > { > vm_object_t obj; > =20 > /* XXX check size etc. */ > obj =3D vm_pager_allocate(OBJT_DEVICE, cdev, objsize, prot, *foff, > curthread->td_ucred); Use cdev_pager_allocate(). > if (obj =3D=3D NULL) > return EINVAL; > if (saved_cdev_pager_ops.cdev_pg_fault =3D=3D NULL) { I do not understand what are you trying to accomplish with the check and reinitialization, but I assume that cdev_pager_allocate() would take care of it. > D("initialize cdev_pager_ops"); > saved_cdev_pager_ops =3D *(obj->un_pager.devp.ops); > netmap_cdev_pager_ops =3D *(obj->un_pager.devp.ops); > netmap_cdev_pager_ops.cdev_pg_dtor =3D netmap_dev_pager_d= tor; > }; > obj->un_pager.devp.ops =3D &netmap_cdev_pager_ops; > *objp =3D obj; > /* XXX perhaps do something more here, such as install > * mappings for the pages so we have no faults later. > */ > return 0; > } >=20 > static struct cdevsw netmap_cdevsw =3D { > .d_version =3D D_VERSION, > .d_name =3D "netmap", > .d_open =3D netmap_open, > .d_mmap =3D netmap_mmap, > .d_mmap_single =3D netmap_mmap_single, > .d_ioctl =3D netmap_ioctl, > .d_poll =3D netmap_poll, > .d_close =3D netmap_close, > }; >=20 > cheers > luigi --AFXWwd8AV04RZu1u Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlA9lrgACgkQC3+MBN1Mb4jP6ACcCMmlQWybZzcQ0E46r0W8QO0i C+cAnR+5HSBZ7TIswEPM7MATirJuZQfP =iv01 -----END PGP SIGNATURE----- --AFXWwd8AV04RZu1u-- From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 04:36:11 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D23D106566C; Wed, 29 Aug 2012 04:36:11 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id B09728FC14; Wed, 29 Aug 2012 04:36:09 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 888A97300A; Wed, 29 Aug 2012 06:55:26 +0200 (CEST) Date: Wed, 29 Aug 2012 06:55:26 +0200 From: Luigi Rizzo To: Konstantin Belousov Message-ID: <20120829045526.GA75216@onelab2.iet.unipi.it> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> <20120828184226.GB68683@onelab2.iet.unipi.it> <20120829041240.GT33100@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120829041240.GT33100@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i Cc: Andriy Gapon , freebsd-current@freebsd.org, current@freebsd.org Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 04:36:11 -0000 On Wed, Aug 29, 2012 at 07:12:40AM +0300, Konstantin Belousov wrote: > On Tue, Aug 28, 2012 at 08:42:26PM +0200, Luigi Rizzo wrote: > > On Tue, Aug 28, 2012 at 08:26:06PM +0300, Konstantin Belousov wrote: > > ... > > > > dev_clone() is rather gross and a lot harder to use than > > > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > > > of the device pager (you can't ever make mappings go away), you can > > > > just assign each client a unique offset into your shared object's > > > > memory space. However, if you are exporting shared memory buffers, > > > > then a better model might be to let your clients use > > > > shm_open(SHM_ANON) to create buffers, then pass them into your driver > > > > via an ioctl() and use shm_map() to map them into the kernel. > > > > > > Well, there is a new OBJT_MGTDEVICE pager, which together with > > > d_mmap_single() allows to have even per-mapping data. i915kms uses it. > > > You do not need cdevpriv for the per-mapping data. > > > > > > Also, MGTDEVICE does track the mappings of the pages, so you can clean > > > up on device destruction. > > > > interesting, thanks for the pointer, i'll look it up in i915kms. > > Does this exist also in stable/9 ? > > It would be a shame otherwise... > Yes, it was merged. > > > > > > Normal callbacks of the device pager allows to execute ctr/dtr methods > > > at the time of mapping creation and tear down. > > > > what would be a good way to install my own ctr/dtr methods ? > > I only found out a rather crude one, and it only works for > > the destructor: > See below. > > > > > static struct cdev_pager_ops saved_cdev_pager_ops; > > static struct cdev_pager_ops netmap_cdev_pager_ops; > > > > static void > > netmap_dev_pager_dtor(void *handle) > > { > > saved_cdev_pager_ops.cdev_pg_dtor(handle); > > // my code here > > D("ready to release memory for %p", handle); > > } > > > > > > static int > > netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *foff, > > vm_size_t objsize, vm_object_t *objp, int prot) > > { > > vm_object_t obj; > > > > /* XXX check size etc. */ > > obj = vm_pager_allocate(OBJT_DEVICE, cdev, objsize, prot, *foff, > > curthread->td_ucred); > Use cdev_pager_allocate(). > > > if (obj == NULL) > > return EINVAL; > > if (saved_cdev_pager_ops.cdev_pg_fault == NULL) { > I do not understand what are you trying to accomplish with the > check and reinitialization, but I assume that cdev_pager_allocate() > would take care of it. First and foremost, I am trying to do things without requiring kernel modifications. I am trying to reuse the constructor and destructor of the standard device pager, and around those add my own calls. Those methods are declared static in sys/vm/device_pager.c so i cannot invoke directly cdev_pager_allocate(). I could indeed rewrite the body of those three methods (ctor, dtor, fault) in my own code. I will look at this today. Perhaps I could even try to install all mappings at mmap() time so I never need to fault. Thanks again for the suggestions cheers luigi > > D("initialize cdev_pager_ops"); > > saved_cdev_pager_ops = *(obj->un_pager.devp.ops); > > netmap_cdev_pager_ops = *(obj->un_pager.devp.ops); > > netmap_cdev_pager_ops.cdev_pg_dtor = netmap_dev_pager_dtor; > > }; > > obj->un_pager.devp.ops = &netmap_cdev_pager_ops; > > *objp = obj; > > /* XXX perhaps do something more here, such as install > > * mappings for the pages so we have no faults later. > > */ > > return 0; > > } > > > > static struct cdevsw netmap_cdevsw = { > > .d_version = D_VERSION, > > .d_name = "netmap", > > .d_open = netmap_open, > > .d_mmap = netmap_mmap, > > .d_mmap_single = netmap_mmap_single, > > .d_ioctl = netmap_ioctl, > > .d_poll = netmap_poll, > > .d_close = netmap_close, > > }; > > > > cheers > > luigi From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 04:36:11 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D23D106566C; Wed, 29 Aug 2012 04:36:11 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id B09728FC14; Wed, 29 Aug 2012 04:36:09 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 888A97300A; Wed, 29 Aug 2012 06:55:26 +0200 (CEST) Date: Wed, 29 Aug 2012 06:55:26 +0200 From: Luigi Rizzo To: Konstantin Belousov Message-ID: <20120829045526.GA75216@onelab2.iet.unipi.it> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> <20120828184226.GB68683@onelab2.iet.unipi.it> <20120829041240.GT33100@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120829041240.GT33100@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i Cc: Andriy Gapon , freebsd-current@freebsd.org, current@freebsd.org Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 04:36:11 -0000 On Wed, Aug 29, 2012 at 07:12:40AM +0300, Konstantin Belousov wrote: > On Tue, Aug 28, 2012 at 08:42:26PM +0200, Luigi Rizzo wrote: > > On Tue, Aug 28, 2012 at 08:26:06PM +0300, Konstantin Belousov wrote: > > ... > > > > dev_clone() is rather gross and a lot harder to use than > > > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > > > of the device pager (you can't ever make mappings go away), you can > > > > just assign each client a unique offset into your shared object's > > > > memory space. However, if you are exporting shared memory buffers, > > > > then a better model might be to let your clients use > > > > shm_open(SHM_ANON) to create buffers, then pass them into your driver > > > > via an ioctl() and use shm_map() to map them into the kernel. > > > > > > Well, there is a new OBJT_MGTDEVICE pager, which together with > > > d_mmap_single() allows to have even per-mapping data. i915kms uses it. > > > You do not need cdevpriv for the per-mapping data. > > > > > > Also, MGTDEVICE does track the mappings of the pages, so you can clean > > > up on device destruction. > > > > interesting, thanks for the pointer, i'll look it up in i915kms. > > Does this exist also in stable/9 ? > > It would be a shame otherwise... > Yes, it was merged. > > > > > > Normal callbacks of the device pager allows to execute ctr/dtr methods > > > at the time of mapping creation and tear down. > > > > what would be a good way to install my own ctr/dtr methods ? > > I only found out a rather crude one, and it only works for > > the destructor: > See below. > > > > > static struct cdev_pager_ops saved_cdev_pager_ops; > > static struct cdev_pager_ops netmap_cdev_pager_ops; > > > > static void > > netmap_dev_pager_dtor(void *handle) > > { > > saved_cdev_pager_ops.cdev_pg_dtor(handle); > > // my code here > > D("ready to release memory for %p", handle); > > } > > > > > > static int > > netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *foff, > > vm_size_t objsize, vm_object_t *objp, int prot) > > { > > vm_object_t obj; > > > > /* XXX check size etc. */ > > obj = vm_pager_allocate(OBJT_DEVICE, cdev, objsize, prot, *foff, > > curthread->td_ucred); > Use cdev_pager_allocate(). > > > if (obj == NULL) > > return EINVAL; > > if (saved_cdev_pager_ops.cdev_pg_fault == NULL) { > I do not understand what are you trying to accomplish with the > check and reinitialization, but I assume that cdev_pager_allocate() > would take care of it. First and foremost, I am trying to do things without requiring kernel modifications. I am trying to reuse the constructor and destructor of the standard device pager, and around those add my own calls. Those methods are declared static in sys/vm/device_pager.c so i cannot invoke directly cdev_pager_allocate(). I could indeed rewrite the body of those three methods (ctor, dtor, fault) in my own code. I will look at this today. Perhaps I could even try to install all mappings at mmap() time so I never need to fault. Thanks again for the suggestions cheers luigi > > D("initialize cdev_pager_ops"); > > saved_cdev_pager_ops = *(obj->un_pager.devp.ops); > > netmap_cdev_pager_ops = *(obj->un_pager.devp.ops); > > netmap_cdev_pager_ops.cdev_pg_dtor = netmap_dev_pager_dtor; > > }; > > obj->un_pager.devp.ops = &netmap_cdev_pager_ops; > > *objp = obj; > > /* XXX perhaps do something more here, such as install > > * mappings for the pages so we have no faults later. > > */ > > return 0; > > } > > > > static struct cdevsw netmap_cdevsw = { > > .d_version = D_VERSION, > > .d_name = "netmap", > > .d_open = netmap_open, > > .d_mmap = netmap_mmap, > > .d_mmap_single = netmap_mmap_single, > > .d_ioctl = netmap_ioctl, > > .d_poll = netmap_poll, > > .d_close = netmap_close, > > }; > > > > cheers > > luigi From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 07:17:15 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40349106564A for ; Wed, 29 Aug 2012 07:17:15 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id AAA198FC08 for ; Wed, 29 Aug 2012 07:17:14 +0000 (UTC) Received: by bkcje9 with SMTP id je9so146687bkc.13 for ; Wed, 29 Aug 2012 00:17:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :x-gm-message-state; bh=+CgCMbmjqrI33BYBJZxBYXUh/jsk1YkE5wjkyRkbqAE=; b=AxM4fW05lIX8UPm1LEFYWIg4DmXQNsw+1zhJff1g/rfYyqXse3ki//1Yztxoun460i b2vLHVcmiD4o8a+KrG9YXdZpyplW+Skff2a9bOiwqrba5rU+XJjOymbyxrqQWOIoHrlw ElHLV0u6ynos30OJYJ6jOqygp+vlh1PVNtL34NekPAdsENw5XFFvAYcW27wHbWi1228m BUNrmgtCT++ky6hzDtKVOf5RDvLpOJAxCmNzAenbvk2L186bbb1Xi7zPXp+b0crRzMMB 2/1lwSvI5jBu2MnbWv5xA4+Pf0kxEHrgH90i+xwQBy9MB6Q3u4NfgggI6OeV9kIRpPd3 eTiA== Received: by 10.204.156.87 with SMTP id v23mr280655bkw.0.1346224633133; Wed, 29 Aug 2012 00:17:13 -0700 (PDT) Received: from zont-osx.local (ppp95-165-143-86.pppoe.spdop.ru. [95.165.143.86]) by mx.google.com with ESMTPS id n17sm14140013bks.6.2012.08.29.00.17.11 (version=SSLv3 cipher=OTHER); Wed, 29 Aug 2012 00:17:12 -0700 (PDT) Sender: Andrey Zonov Message-ID: <503DC1F5.1070207@FreeBSD.org> Date: Wed, 29 Aug 2012 11:17:09 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: lev@freebsd.org References: <135297243.20120827061957@serebryakov.spb.ru> <201208271226.03496.jhb@freebsd.org> <1758728845.20120828004713@serebryakov.spb.ru> <201208280744.23419.jhb@freebsd.org> In-Reply-To: <201208280744.23419.jhb@freebsd.org> X-Enigmail-Version: 1.4.3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1E23293266A64FE0BE234018" X-Gm-Message-State: ALoCoQmLFch6yLjkV77M/NIjV469I+xoAqM8+Jy+LcTbvmurTMtT6DcS9/O5W4Ykbnp+jLxk6L5Z Cc: freebsd-current@freebsd.org Subject: Re: What is "Fast task queue"? (Was: How to understand what `swi5' kernel thread does?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 07:17:15 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1E23293266A64FE0BE234018 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 8/28/12 3:44 PM, John Baldwin wrote: > On Monday, August 27, 2012 4:47:13 pm Lev Serebryakov wrote: >> Hello, John. >> You wrote 27 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2012 =D0=B3., = 20:26:03: >> >>>> What "fast tasks" are performed via this queue? Under network load = it >>>> is main consumer of CPU. >> JB> Certain NIC drivers perform much of their interrupt handling in th= at=20 > thread. >> Yep, I've found, that my if_vr uses it. One more question: does ipf= w >> rules works in same thread? I have ``net.isr.dispatch=3D"direct"'' se= t. >=20 > Yes, with the default setting of direct dispatch, all of the receive > side of the network stack runs in the driver's interrupt handler. In > the case of vr(4) that would be in this thread. >=20 Lev, If you have more than one CPU, you can try this patch [1]. It adds flowid in mbufs and makes possible to use multiple netisr threads. Apply the patch and put in your loader.conf the following: net.isr.maxthreads=3D$ncpu (2, 4 or whatever you want) net.isr.dispatch=3Ddeferred PS: original patch was written by melifaro. [1] http://people.freebsd.org/~zont/netisr.patch --=20 Andrey Zonov --------------enig1E23293266A64FE0BE234018 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJQPcH5AAoJEBWLemxX/CvTcdoH+QFHz7eOQCBkSiaRXJrH38ey giyG+VuW9V5/O8Q4u05hyUbq/af67O1NELiGviXu4mjo+yO7egDBp34LfMIKNtW6 onzMYsS2IYML2518q3TlMfRZu3raQT+/kXJStosAfU3sJUSAS/FO2wIF77Uimeut 48jfh3tTB66VfMu2k9gCMGIVEKL4TnTbfMKG5VkHS/I1EBJcdwYlPSGB3C6ef3qG Yx5AO2KM+ow6MH1k88cT5kpJM4qNUUv83C2FPnWlUAWEVCWednn9lAy9optMqtWj vlY/fBLBcPk7/oFkkhlusuhx+l+d+SmZ5GX0vosipzLcHR/u7s0unDOZ3T4L1Wg= =0g6c -----END PGP SIGNATURE----- --------------enig1E23293266A64FE0BE234018-- From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 07:41:20 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3AB8C106566B; Wed, 29 Aug 2012 07:41:20 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8D7C28FC0A; Wed, 29 Aug 2012 07:41:19 +0000 (UTC) Received: by bkcje9 with SMTP id je9so159940bkc.13 for ; Wed, 29 Aug 2012 00:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; bh=GJJRMt3rlQdfAo90jVMb4JOLa5t/rfY/vCCcQ85zmPU=; b=l16ZAlc+YHvMMNGsOKwN8oynFurRIWBA3bsq6eab7aTrWa1FzUcHb63254Sq3ZM0v0 mDQCJq6RvPCm5emuTeL2P6JF9kO33mz/9WdOfgjxm6DlY+xL6RE+07iabq27NHxIIE8o ViNQuvKEFbHnl8+RAffsk/ScXQd/IvSmTM2kUIm4PJWs8Gt1+ywHrO7M5jX/lUfti98I 33OjSFPeqv5835pVsRxpxm4VSXM1bWWi0pzGVxf3HjtZ9C3Qsz4wkpu6GSG73YDIDxZ2 8bGX6emo5+9mbWVOdpG8ncUosxEhZldxchpmOf9JSaeVRZ2hm5PQ9pQBF4UP8MMA6KkP a1AA== Received: by 10.204.151.81 with SMTP id b17mr292267bkw.95.1346226078420; Wed, 29 Aug 2012 00:41:18 -0700 (PDT) Received: from ernst.jennejohn.org (p578E2FC5.dip.t-dialin.net. [87.142.47.197]) by mx.google.com with ESMTPS id t23sm14203650bks.4.2012.08.29.00.41.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 29 Aug 2012 00:41:17 -0700 (PDT) Date: Wed, 29 Aug 2012 09:41:15 +0200 From: Gary Jennejohn To: John Baldwin Message-ID: <20120829094115.3a40d35f@ernst.jennejohn.org> In-Reply-To: <201208281058.10029.jhb@freebsd.org> References: <201208281058.10029.jhb@freebsd.org> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: [PATCH] Add a "-h" flag to mv X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 07:41:20 -0000 On Tue, 28 Aug 2012 10:58:09 -0400 John Baldwin wrote: > I have a use case at work where I need to be able to update a symlink that > points to a directory atomically (so that it points to a new directory). To > give a conrete example, suppose I have two directories 'foo' and 'bar', and a > symlink 'a' that I wish to atomically flip from 'foo' to 'bar'. > > Using 'ln -shf bar a' is not atomic as it uses separate unlink() and symlink() > system calls, so there is a race where another thread may encounter ENOENT > while traversing 'a'. > > The approach we used was to create a new symbolic link 'a.new' (e.g. via > 'ln -s bar a.new') and then use rename() to rename 'a.new' on top of 'a'. > Normally to do an atomic rename from userland one would use 'mv', but > 'mv a.new a' doesn't do that. Instead, it moves 'a.new' into the directory > referenced by the 'a' symlink. At work we have resorted to invoking python's > os.rename() in a one-liner to handle this. > > While rehashing this discussion today it occurred to me that a -h flag to > mv would allow it to work in this case (and is very similar to how ln treats > its -h flag). To that end, I have a patch to add a new -h flag to mv that > allows one to atomically update a symlink that points to a directory. I > could not find any other mv commands that have adopted a -h (or a different > flag that accomplishes the same task). Given that it functions identically > to the -h flag for ln, -h seemed the "logical" choice. Any objections? > [snip patch] Nope, seems like a reasonable extension to me (gj@). -- Gary Jennejohn From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 07:41:56 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F8831065674; Wed, 29 Aug 2012 07:41:56 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 29D0E8FC0C; Wed, 29 Aug 2012 07:41:55 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:b893:d73f:3750:2064]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 713944AC31; Wed, 29 Aug 2012 11:41:47 +0400 (MSK) Date: Wed, 29 Aug 2012 11:41:44 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <795076009.20120829114144@serebryakov.spb.ru> To: Andrey Zonov In-Reply-To: <503DC1F5.1070207@FreeBSD.org> References: <135297243.20120827061957@serebryakov.spb.ru> <201208271226.03496.jhb@freebsd.org> <1758728845.20120828004713@serebryakov.spb.ru> <201208280744.23419.jhb@freebsd.org> <503DC1F5.1070207@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: What is "Fast task queue"? (Was: How to understand what `swi5' kernel thread does?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 07:41:56 -0000 Hello, Andrey. You wrote 29 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2012 =D0=B3., 11:17= :09: AZ> If you have more than one CPU, you can try this patch [1]. It adds I have only one cput (Geode LX 500 Mhz) without any HT or other "virtual" CPUs at all. One core, one thread :) --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 08:41:25 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A057106564A; Wed, 29 Aug 2012 08:41:25 +0000 (UTC) (envelope-from eirnym@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id B36968FC15; Wed, 29 Aug 2012 08:41:24 +0000 (UTC) Received: by ialo14 with SMTP id o14so806086ial.13 for ; Wed, 29 Aug 2012 01:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=Py+ILvNnoDz914k7edfGL2IiK22n1vMZR9XuhD89TDM=; b=Qbk3CgJ97GXx89/sAVWTdLxhyvlxJ4lqVzEZalpEmxrCIKmh440ZpOJLYp81HFuOgF CUpe4pT111uDqvLLj08nFc9bi86tQJM+EupuThYQw5l0QX/qJBZvTyxEg56jajWzxfjq 4bOyn+XJCGoU4iXDcFFtU4suSDU1F33oUqbtOeJzDFF4ILInkoi6UlE6qEk70Nzhvsv3 d53UU71f/MXvyLtLfPO6iulEImnbxqUOfubAC6W/k66g3Sfw1fZ0a6j/nxXM8H5R4BJX oqHY1p3R7N8tJjvWweAn3rRtUweCdBTi1wzKhNJQLX/92zbXrFJmxUjybIQaG1aJ8Ajc vIhQ== Received: by 10.42.74.8 with SMTP id u8mr669468icj.16.1346229683134; Wed, 29 Aug 2012 01:41:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.46.41 with HTTP; Wed, 29 Aug 2012 01:41:02 -0700 (PDT) In-Reply-To: <503D35DA.9060704@FreeBSD.org> References: <503D12CB.4000208@FreeBSD.org> <503D29F4.1030804@FreeBSD.org> <503D35DA.9060704@FreeBSD.org> From: Eir Nym Date: Wed, 29 Aug 2012 12:41:02 +0400 Message-ID: To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 08:41:25 -0000 -- Eir Nym On 29 August 2012 01:19, Dimitry Andric wrote: > On 2012-08-28 23:05, Eir Nym wrote: > ... > >> This one for example: >> cc -c -O2 -pipe -fno-strict-aliasing -std=3Dc99 -Wall >> -Wredundant-decls -Wnested-externs -Wstrict-prototypes >> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef >> -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs >> -fdiagnostics-show-option -Wno-error-tautological-compare >> -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -I. >> -I/usr/head/src/sys -I/usr/head/src/sys/contrib/altq -D_KERNEL >> -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h >> -fno-omit-frame-pointer -mno-aes -mno-avx -mcmodel=3Dkernel >> -mno-red-zone -mno-mmx -mno-sse -msoft-float >> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector >> -Werror /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c >> -I/usr/head/src/sys/gnu/fs/xfs/FreeBSD >> -I/usr/head/src/sys/gnu/fs/xfs/FreeBSD/support >> -I/usr/head/src/sys/gnu/fs/xfs >> /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: error: variable >> 'fbno' is used uninitialized whenever 'if' condition is false >> [-Werror,-Wsometimes-uninitialized] >> else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 && != args->isfl >> && >> >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > Weird, how are you building the xfs module? It has WERROR=3D in its > Makefile, so the '-Werror' option above should not be there. This is > because the XFS code was imported more than 6 years ago, and is very > unlikely to ever be fixed. :) head SVN revision 239793, http://eroese.org/_/_/pub/bsd/GENERIC_PF.amd64 =E2=80=94 kernel config From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 08:43:19 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA8A31065679; Wed, 29 Aug 2012 08:43:19 +0000 (UTC) (envelope-from eirnym@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7D5888FC16; Wed, 29 Aug 2012 08:43:19 +0000 (UTC) Received: by ialo14 with SMTP id o14so809309ial.13 for ; Wed, 29 Aug 2012 01:43:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=e3ku7XqqTm9PXdZ9sfQGHnxbMgmLByhPVmG1gIrD6is=; b=q/pE1egqouJZOAyzX6UoN1I2M/QQ7KwnmoJjyZYPn0brhXIkc1iYHaDWfQLw6Rv8kp gqi1BK+ATb787K/pulpN+W6rlW+MUXQh3a2qAa5vgElQpx9wDNFYc9+RvJHEqTLtWgau 3Wj5pu/DWeRWEdGPGzd4hi61G6d6LV6sMystr8yFz0PBLU0HW2cLM3vGjRGkRYPB1/dB /91Pqdp3XYUXmGNAXawVIv9uAEETN/XPc6wuhioBwKh94mm2JeDXPJxF3cjo144jhrMC xoJnvmOFbO8SdqPyjcFQZSvoTquyEfu/2+D1Bkgbv135OWfA1HigsoBoVHgrZ5ZGWG8P 331A== Received: by 10.42.84.69 with SMTP id k5mr703513icl.5.1346229798824; Wed, 29 Aug 2012 01:43:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.46.41 with HTTP; Wed, 29 Aug 2012 01:42:58 -0700 (PDT) In-Reply-To: References: <503D12CB.4000208@FreeBSD.org> <503D29F4.1030804@FreeBSD.org> <503D35DA.9060704@FreeBSD.org> From: Eir Nym Date: Wed, 29 Aug 2012 12:42:58 +0400 Message-ID: To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 08:43:19 -0000 -- Eir Nym On 29 August 2012 12:41, Eir Nym wrote: > -- Eir Nym > > > On 29 August 2012 01:19, Dimitry Andric wrote: >> On 2012-08-28 23:05, Eir Nym wrote: >> ... >> >>> This one for example: >>> cc -c -O2 -pipe -fno-strict-aliasing -std=3Dc99 -Wall >>> -Wredundant-decls -Wnested-externs -Wstrict-prototypes >>> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef >>> -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs >>> -fdiagnostics-show-option -Wno-error-tautological-compare >>> -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -I. >>> -I/usr/head/src/sys -I/usr/head/src/sys/contrib/altq -D_KERNEL >>> -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h >>> -fno-omit-frame-pointer -mno-aes -mno-avx -mcmodel=3Dkernel >>> -mno-red-zone -mno-mmx -mno-sse -msoft-float >>> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector >>> -Werror /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c >>> -I/usr/head/src/sys/gnu/fs/xfs/FreeBSD >>> -I/usr/head/src/sys/gnu/fs/xfs/FreeBSD/support >>> -I/usr/head/src/sys/gnu/fs/xfs >>> /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: error: variable >>> 'fbno' is used uninitialized whenever 'if' condition is false >>> [-Werror,-Wsometimes-uninitialized] >>> else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 && = !args->isfl >>> && >>> >>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> >> Weird, how are you building the xfs module? It has WERROR=3D in its >> Makefile, so the '-Werror' option above should not be there. This is >> because the XFS code was imported more than 6 years ago, and is very >> unlikely to ever be fixed. :) > > head SVN revision 239793, > http://eroese.org/_/_/pub/bsd/GENERIC_PF.amd64 =E2=80=94 kernel config http://eroese.org/_/_/pub/bsd/kernel.amd64.GENERIC_PF =E2=80=94 full logs f= or it. From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 10:02:48 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E421F1065674; Wed, 29 Aug 2012 10:02:48 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 7DC528FC1B; Wed, 29 Aug 2012 10:02:48 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id D2B611DD413; Wed, 29 Aug 2012 12:02:47 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id AC4ED2847B; Wed, 29 Aug 2012 12:02:47 +0200 (CEST) Date: Wed, 29 Aug 2012 12:02:47 +0200 From: Jilles Tjoelker To: John Baldwin Message-ID: <20120829100247.GA66677@stack.nl> References: <201208281058.10029.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201208281058.10029.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: current@freebsd.org Subject: Re: [PATCH] Add a "-h" flag to mv X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 10:02:49 -0000 On Tue, Aug 28, 2012 at 10:58:09AM -0400, John Baldwin wrote: > I have a use case at work where I need to be able to update a symlink > that points to a directory atomically (so that it points to a new > directory). To give a conrete example, suppose I have two directories > 'foo' and 'bar', and a symlink 'a' that I wish to atomically flip from > 'foo' to 'bar'. > Using 'ln -shf bar a' is not atomic as it uses separate unlink() and > symlink() system calls, so there is a race where another thread may > encounter ENOENT while traversing 'a'. > The approach we used was to create a new symbolic link 'a.new' (e.g. > via 'ln -s bar a.new') and then use rename() to rename 'a.new' on top > of 'a'. Normally to do an atomic rename from userland one would use > 'mv', but 'mv a.new a' doesn't do that. Instead, it moves 'a.new' > into the directory referenced by the 'a' symlink. At work we have > resorted to invoking python's os.rename() in a one-liner to handle > this. > While rehashing this discussion today it occurred to me that a -h flag to > mv would allow it to work in this case (and is very similar to how ln treats > its -h flag). To that end, I have a patch to add a new -h flag to mv that > allows one to atomically update a symlink that points to a directory. I > could not find any other mv commands that have adopted a -h (or a different > flag that accomplishes the same task). Given that it functions identically > to the -h flag for ln, -h seemed the "logical" choice. Any objections? GNU coreutils mv (and also cp/install/ln) appears to use -T/--no-target-directory for a similar purpose: -T prevents the target being treated as a directory (whether it is a symlink or not). -- Jilles Tjoelker From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 10:23:37 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E1B0106566B; Wed, 29 Aug 2012 10:23:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 12C378FC17; Wed, 29 Aug 2012 10:23:36 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q7TANfVH021407; Wed, 29 Aug 2012 13:23:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q7TANTJx072061; Wed, 29 Aug 2012 13:23:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q7TANT89072060; Wed, 29 Aug 2012 13:23:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 29 Aug 2012 13:23:29 +0300 From: Konstantin Belousov To: Luigi Rizzo Message-ID: <20120829102329.GZ33100@deviant.kiev.zoral.com.ua> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> <20120828184226.GB68683@onelab2.iet.unipi.it> <20120829041240.GT33100@deviant.kiev.zoral.com.ua> <20120829045526.GA75216@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="g2oeex4xcrwBLAZl" Content-Disposition: inline In-Reply-To: <20120829045526.GA75216@onelab2.iet.unipi.it> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Andriy Gapon , freebsd-current@freebsd.org, current@freebsd.org Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 10:23:37 -0000 --g2oeex4xcrwBLAZl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 29, 2012 at 06:55:26AM +0200, Luigi Rizzo wrote: > On Wed, Aug 29, 2012 at 07:12:40AM +0300, Konstantin Belousov wrote: > > On Tue, Aug 28, 2012 at 08:42:26PM +0200, Luigi Rizzo wrote: > > > On Tue, Aug 28, 2012 at 08:26:06PM +0300, Konstantin Belousov wrote: > > > ... > > > > > dev_clone() is rather gross and a lot harder to use than > > > > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > > > > of the device pager (you can't ever make mappings go away), you c= an > > > > > just assign each client a unique offset into your shared object's > > > > > memory space. However, if you are exporting shared memory buffer= s, > > > > > then a better model might be to let your clients use > > > > > shm_open(SHM_ANON) to create buffers, then pass them into your dr= iver > > > > > via an ioctl() and use shm_map() to map them into the kernel. > > > >=20 > > > > Well, there is a new OBJT_MGTDEVICE pager, which together with > > > > d_mmap_single() allows to have even per-mapping data. i915kms uses = it. > > > > You do not need cdevpriv for the per-mapping data. > > > >=20 > > > > Also, MGTDEVICE does track the mappings of the pages, so you can cl= ean > > > > up on device destruction. > > >=20 > > > interesting, thanks for the pointer, i'll look it up in i915kms. > > > Does this exist also in stable/9 ? > > > It would be a shame otherwise... > > Yes, it was merged. > >=20 > > >=20 > > > > Normal callbacks of the device pager allows to execute ctr/dtr meth= ods > > > > at the time of mapping creation and tear down. > > >=20 > > > what would be a good way to install my own ctr/dtr methods ? > > > I only found out a rather crude one, and it only works for > > > the destructor: > > See below. > >=20 > > >=20 > > > static struct cdev_pager_ops saved_cdev_pager_ops; > > > static struct cdev_pager_ops netmap_cdev_pager_ops; > > >=20 > > > static void > > > netmap_dev_pager_dtor(void *handle) > > > { > > > saved_cdev_pager_ops.cdev_pg_dtor(handle); > > > // my code here > > > D("ready to release memory for %p", handle); > > > } > > >=20 > > >=20 > > > static int > > > netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *foff, > > > vm_size_t objsize, vm_object_t *objp, int prot) > > > { > > > vm_object_t obj; > > > =20 > > > /* XXX check size etc. */ > > > obj =3D vm_pager_allocate(OBJT_DEVICE, cdev, objsize, prot, *= foff, > > > curthread->td_ucred); > > Use cdev_pager_allocate(). > >=20 > > > if (obj =3D=3D NULL) > > > return EINVAL; > > > if (saved_cdev_pager_ops.cdev_pg_fault =3D=3D NULL) { > > I do not understand what are you trying to accomplish with the > > check and reinitialization, but I assume that cdev_pager_allocate() > > would take care of it. >=20 > First and foremost, I am trying to do things without > requiring kernel modifications. This is strange. >=20 > I am trying to reuse the constructor and destructor of the standard > device pager, and around those add my own calls. Those methods are > declared static in sys/vm/device_pager.c so i cannot invoke directly > cdev_pager_allocate(). I fail to see how can you use old_dev_pager_{ctor,dtor} without also using the d_mmap. Note that use of d_mmap _does not_ mean that access to the mapped area never faults. I suggest you to go fully 'mgmt device pager' route. >=20 > I could indeed rewrite the body of those three methods > (ctor, dtor, fault) in my own code. I will look at this today. > Perhaps I could even try to install all mappings at mmap() time so > I never need to fault. >=20 > Thanks again for the suggestions >=20 > cheers > luigi >=20 >=20 > > > D("initialize cdev_pager_ops"); > > > saved_cdev_pager_ops =3D *(obj->un_pager.devp.ops); > > > netmap_cdev_pager_ops =3D *(obj->un_pager.devp.ops); > > > netmap_cdev_pager_ops.cdev_pg_dtor =3D netmap_dev_pag= er_dtor; > > > }; > > > obj->un_pager.devp.ops =3D &netmap_cdev_pager_ops; > > > *objp =3D obj; > > > /* XXX perhaps do something more here, such as install > > > * mappings for the pages so we have no faults later. > > > */ > > > return 0; > > > } > > >=20 > > > static struct cdevsw netmap_cdevsw =3D { > > > .d_version =3D D_VERSION, > > > .d_name =3D "netmap", > > > .d_open =3D netmap_open, > > > .d_mmap =3D netmap_mmap, > > > .d_mmap_single =3D netmap_mmap_single, > > > .d_ioctl =3D netmap_ioctl, > > > .d_poll =3D netmap_poll, > > > .d_close =3D netmap_close, > > > }; > > >=20 > > > cheers > > > luigi >=20 --g2oeex4xcrwBLAZl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlA97aEACgkQC3+MBN1Mb4hQcwCfcChxtRndLaHjsGA559tJlu8X 2UEAn2GPyuv1FIRYLuNFYOmZXHPZ+7tI =aNyB -----END PGP SIGNATURE----- --g2oeex4xcrwBLAZl-- From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 10:23:37 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E1B0106566B; Wed, 29 Aug 2012 10:23:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 12C378FC17; Wed, 29 Aug 2012 10:23:36 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q7TANfVH021407; Wed, 29 Aug 2012 13:23:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q7TANTJx072061; Wed, 29 Aug 2012 13:23:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q7TANT89072060; Wed, 29 Aug 2012 13:23:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 29 Aug 2012 13:23:29 +0300 From: Konstantin Belousov To: Luigi Rizzo Message-ID: <20120829102329.GZ33100@deviant.kiev.zoral.com.ua> References: <20120827073403.GA49223@onelab2.iet.unipi.it> <201208271227.54785.jhb@freebsd.org> <20120828155025.GA66068@onelab2.iet.unipi.it> <201208281240.29612.jhb@freebsd.org> <20120828172606.GR33100@deviant.kiev.zoral.com.ua> <20120828184226.GB68683@onelab2.iet.unipi.it> <20120829041240.GT33100@deviant.kiev.zoral.com.ua> <20120829045526.GA75216@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="g2oeex4xcrwBLAZl" Content-Disposition: inline In-Reply-To: <20120829045526.GA75216@onelab2.iet.unipi.it> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Andriy Gapon , freebsd-current@freebsd.org, current@freebsd.org Subject: Re: per file descriptor device callbacks ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 10:23:37 -0000 --g2oeex4xcrwBLAZl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 29, 2012 at 06:55:26AM +0200, Luigi Rizzo wrote: > On Wed, Aug 29, 2012 at 07:12:40AM +0300, Konstantin Belousov wrote: > > On Tue, Aug 28, 2012 at 08:42:26PM +0200, Luigi Rizzo wrote: > > > On Tue, Aug 28, 2012 at 08:26:06PM +0300, Konstantin Belousov wrote: > > > ... > > > > > dev_clone() is rather gross and a lot harder to use than > > > > > devfs_set_cdevpriv(). If you are fine with the inherent problems > > > > > of the device pager (you can't ever make mappings go away), you c= an > > > > > just assign each client a unique offset into your shared object's > > > > > memory space. However, if you are exporting shared memory buffer= s, > > > > > then a better model might be to let your clients use > > > > > shm_open(SHM_ANON) to create buffers, then pass them into your dr= iver > > > > > via an ioctl() and use shm_map() to map them into the kernel. > > > >=20 > > > > Well, there is a new OBJT_MGTDEVICE pager, which together with > > > > d_mmap_single() allows to have even per-mapping data. i915kms uses = it. > > > > You do not need cdevpriv for the per-mapping data. > > > >=20 > > > > Also, MGTDEVICE does track the mappings of the pages, so you can cl= ean > > > > up on device destruction. > > >=20 > > > interesting, thanks for the pointer, i'll look it up in i915kms. > > > Does this exist also in stable/9 ? > > > It would be a shame otherwise... > > Yes, it was merged. > >=20 > > >=20 > > > > Normal callbacks of the device pager allows to execute ctr/dtr meth= ods > > > > at the time of mapping creation and tear down. > > >=20 > > > what would be a good way to install my own ctr/dtr methods ? > > > I only found out a rather crude one, and it only works for > > > the destructor: > > See below. > >=20 > > >=20 > > > static struct cdev_pager_ops saved_cdev_pager_ops; > > > static struct cdev_pager_ops netmap_cdev_pager_ops; > > >=20 > > > static void > > > netmap_dev_pager_dtor(void *handle) > > > { > > > saved_cdev_pager_ops.cdev_pg_dtor(handle); > > > // my code here > > > D("ready to release memory for %p", handle); > > > } > > >=20 > > >=20 > > > static int > > > netmap_mmap_single(struct cdev *cdev, vm_ooffset_t *foff, > > > vm_size_t objsize, vm_object_t *objp, int prot) > > > { > > > vm_object_t obj; > > > =20 > > > /* XXX check size etc. */ > > > obj =3D vm_pager_allocate(OBJT_DEVICE, cdev, objsize, prot, *= foff, > > > curthread->td_ucred); > > Use cdev_pager_allocate(). > >=20 > > > if (obj =3D=3D NULL) > > > return EINVAL; > > > if (saved_cdev_pager_ops.cdev_pg_fault =3D=3D NULL) { > > I do not understand what are you trying to accomplish with the > > check and reinitialization, but I assume that cdev_pager_allocate() > > would take care of it. >=20 > First and foremost, I am trying to do things without > requiring kernel modifications. This is strange. >=20 > I am trying to reuse the constructor and destructor of the standard > device pager, and around those add my own calls. Those methods are > declared static in sys/vm/device_pager.c so i cannot invoke directly > cdev_pager_allocate(). I fail to see how can you use old_dev_pager_{ctor,dtor} without also using the d_mmap. Note that use of d_mmap _does not_ mean that access to the mapped area never faults. I suggest you to go fully 'mgmt device pager' route. >=20 > I could indeed rewrite the body of those three methods > (ctor, dtor, fault) in my own code. I will look at this today. > Perhaps I could even try to install all mappings at mmap() time so > I never need to fault. >=20 > Thanks again for the suggestions >=20 > cheers > luigi >=20 >=20 > > > D("initialize cdev_pager_ops"); > > > saved_cdev_pager_ops =3D *(obj->un_pager.devp.ops); > > > netmap_cdev_pager_ops =3D *(obj->un_pager.devp.ops); > > > netmap_cdev_pager_ops.cdev_pg_dtor =3D netmap_dev_pag= er_dtor; > > > }; > > > obj->un_pager.devp.ops =3D &netmap_cdev_pager_ops; > > > *objp =3D obj; > > > /* XXX perhaps do something more here, such as install > > > * mappings for the pages so we have no faults later. > > > */ > > > return 0; > > > } > > >=20 > > > static struct cdevsw netmap_cdevsw =3D { > > > .d_version =3D D_VERSION, > > > .d_name =3D "netmap", > > > .d_open =3D netmap_open, > > > .d_mmap =3D netmap_mmap, > > > .d_mmap_single =3D netmap_mmap_single, > > > .d_ioctl =3D netmap_ioctl, > > > .d_poll =3D netmap_poll, > > > .d_close =3D netmap_close, > > > }; > > >=20 > > > cheers > > > luigi >=20 --g2oeex4xcrwBLAZl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlA97aEACgkQC3+MBN1Mb4hQcwCfcChxtRndLaHjsGA559tJlu8X 2UEAn2GPyuv1FIRYLuNFYOmZXHPZ+7tI =aNyB -----END PGP SIGNATURE----- --g2oeex4xcrwBLAZl-- From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 12:25:47 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1B0C1065674 for ; Wed, 29 Aug 2012 12:25:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6DD8A8FC1A for ; Wed, 29 Aug 2012 12:25:47 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A8A9EB946; Wed, 29 Aug 2012 08:25:46 -0400 (EDT) From: John Baldwin To: Jilles Tjoelker Date: Wed, 29 Aug 2012 08:09:20 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201208281058.10029.jhb@freebsd.org> <20120829100247.GA66677@stack.nl> In-Reply-To: <20120829100247.GA66677@stack.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208290809.20455.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 29 Aug 2012 08:25:46 -0400 (EDT) Cc: current@freebsd.org Subject: Re: [PATCH] Add a "-h" flag to mv X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 12:25:47 -0000 On Wednesday, August 29, 2012 6:02:47 am Jilles Tjoelker wrote: > On Tue, Aug 28, 2012 at 10:58:09AM -0400, John Baldwin wrote: > > I have a use case at work where I need to be able to update a symlink > > that points to a directory atomically (so that it points to a new > > directory). To give a conrete example, suppose I have two directories > > 'foo' and 'bar', and a symlink 'a' that I wish to atomically flip from > > 'foo' to 'bar'. > > > Using 'ln -shf bar a' is not atomic as it uses separate unlink() and > > symlink() system calls, so there is a race where another thread may > > encounter ENOENT while traversing 'a'. > > > The approach we used was to create a new symbolic link 'a.new' (e.g. > > via 'ln -s bar a.new') and then use rename() to rename 'a.new' on top > > of 'a'. Normally to do an atomic rename from userland one would use > > 'mv', but 'mv a.new a' doesn't do that. Instead, it moves 'a.new' > > into the directory referenced by the 'a' symlink. At work we have > > resorted to invoking python's os.rename() in a one-liner to handle > > this. > > > While rehashing this discussion today it occurred to me that a -h flag to > > mv would allow it to work in this case (and is very similar to how ln treats > > its -h flag). To that end, I have a patch to add a new -h flag to mv that > > allows one to atomically update a symlink that points to a directory. I > > could not find any other mv commands that have adopted a -h (or a different > > flag that accomplishes the same task). Given that it functions identically > > to the -h flag for ln, -h seemed the "logical" choice. Any objections? > > GNU coreutils mv (and also cp/install/ln) appears to use > -T/--no-target-directory for a similar purpose: -T prevents the target > being treated as a directory (whether it is a symlink or not). Hmm, I could find no documentation for this online via Google searches or the Linux manpages we have on www.FreeBSD.org. Bah, Google just makes searching for these sorts of things painful it seems (you have to put explicit quotes around "--no-target-directory" for it to actually be used). Also, it seems I just chose all the wrong Linux manpage sets to look at. It seems that Linux's -T flag is similar to -h for ln as well. I don't think we can deprecate -h for ln, but perhaps we could add -T as a compat flag to ln and mv? I'd be inclined to still add -h to mv so that it mirrors ln. Hmm, it seems RedHat's ln uses -n for this (OpenBSD, NetBSD, and Darwin all include a -n as an alias to -h for ln to support compat with other operating systems). OSF/1 (and Tru64) and SunOS use -n to mean "complain if the file already exists" similar to 'mv -n'. Also, looking at the Suse manpage on www.FreeBSD.org, it seems their ln (which does have -T) has both -n and -T with different descriptions, but to achieve the same purpose: http://www.freebsd.org/cgi/man.cgi?query=ln&apropos=0&sektion=0&manpath=SuSE+Linux%2Fi386+11.3&arch=default&format=html -n, --no-dereference treat destination that is a symlink to a directory as if it were a normal file -T, --no-target-directory treat LINK_NAME as a normal file (To me it seems LINK_NAME and destination are the same thing.) My inclination would be to add -h to mv, but perhaps add -T as an alias for -h to both ln and mv, and -n as an alias for -h to ln (if we want aliases to match coreutils). -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 19:32:14 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0E14106566B; Wed, 29 Aug 2012 19:32:14 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 6940D8FC17; Wed, 29 Aug 2012 19:32:14 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 98B663592E1; Wed, 29 Aug 2012 21:32:13 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 753332847B; Wed, 29 Aug 2012 21:32:13 +0200 (CEST) Date: Wed, 29 Aug 2012 21:32:13 +0200 From: Jilles Tjoelker To: John Baldwin Message-ID: <20120829193213.GA70385@stack.nl> References: <201208281058.10029.jhb@freebsd.org> <20120829100247.GA66677@stack.nl> <201208290809.20455.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201208290809.20455.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: current@freebsd.org Subject: Re: [PATCH] Add a "-h" flag to mv X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 19:32:14 -0000 On Wed, Aug 29, 2012 at 08:09:20AM -0400, John Baldwin wrote: > On Wednesday, August 29, 2012 6:02:47 am Jilles Tjoelker wrote: > > GNU coreutils mv (and also cp/install/ln) appears to use > > -T/--no-target-directory for a similar purpose: -T prevents the target > > being treated as a directory (whether it is a symlink or not). > Hmm, I could find no documentation for this online via Google searches or > the Linux manpages we have on www.FreeBSD.org. Bah, Google just makes > searching for these sorts of things painful it seems (you have to put > explicit quotes around "--no-target-directory" for it to actually be used). > Also, it seems I just chose all the wrong Linux manpage sets to look at. > It seems that Linux's -T flag is similar to -h for ln as well. I don't think > we can deprecate -h for ln, but perhaps we could add -T as a compat flag to > ln and mv? I'd be inclined to still add -h to mv so that it mirrors ln. > Hmm, it seems RedHat's ln uses -n for this (OpenBSD, NetBSD, and Darwin > all include a -n as an alias to -h for ln to support compat with other > operating systems). OSF/1 (and Tru64) and SunOS use -n to mean "complain > if the file already exists" similar to 'mv -n'. Also, looking at the > Suse manpage on www.FreeBSD.org, it seems their ln (which does have -T) > has both -n and -T with different descriptions, but to achieve the same > purpose: > http://www.freebsd.org/cgi/man.cgi?query=ln&apropos=0&sektion=0&manpath=SuSE+Linux%2Fi386+11.3&arch=default&format=html > -n, --no-dereference > treat destination that is a symlink to a directory as if it were > a normal file > -T, --no-target-directory > treat LINK_NAME as a normal file > (To me it seems LINK_NAME and destination are the same thing.) > My inclination would be to add -h to mv, but perhaps add -T as an alias > for -h to both ln and mv, and -n as an alias for -h to ln (if we want > aliases to match coreutils). Coreutils ln -n is the same as our ln -h, and we already have compatibility for it. The coreutils -T option is different, though. It forces the ln source_file target_file synopsis instead of the ln source_file ... target_dir synopsis, without checking the type of the final operand. If there are not exactly two operands, a syntax error occurs. If the final operand is a directory and cannot be overwritten, an error occurs. -- Jilles Tjoelker From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 21:12:34 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68A5010656D0 for ; Wed, 29 Aug 2012 21:12:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3DCF98FC1F for ; Wed, 29 Aug 2012 21:12:34 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 933E5B98F; Wed, 29 Aug 2012 17:12:33 -0400 (EDT) From: John Baldwin To: Jilles Tjoelker Date: Wed, 29 Aug 2012 16:46:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201208281058.10029.jhb@freebsd.org> <201208290809.20455.jhb@freebsd.org> <20120829193213.GA70385@stack.nl> In-Reply-To: <20120829193213.GA70385@stack.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208291646.37573.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 29 Aug 2012 17:12:33 -0400 (EDT) Cc: current@freebsd.org Subject: Re: [PATCH] Add a "-h" flag to mv X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 21:12:34 -0000 On Wednesday, August 29, 2012 3:32:13 pm Jilles Tjoelker wrote: > On Wed, Aug 29, 2012 at 08:09:20AM -0400, John Baldwin wrote: > > On Wednesday, August 29, 2012 6:02:47 am Jilles Tjoelker wrote: > > > GNU coreutils mv (and also cp/install/ln) appears to use > > > -T/--no-target-directory for a similar purpose: -T prevents the target > > > being treated as a directory (whether it is a symlink or not). > > > Hmm, I could find no documentation for this online via Google searches or > > the Linux manpages we have on www.FreeBSD.org. Bah, Google just makes > > searching for these sorts of things painful it seems (you have to put > > explicit quotes around "--no-target-directory" for it to actually be used). > > Also, it seems I just chose all the wrong Linux manpage sets to look at. > > > It seems that Linux's -T flag is similar to -h for ln as well. I don't think > > we can deprecate -h for ln, but perhaps we could add -T as a compat flag to > > ln and mv? I'd be inclined to still add -h to mv so that it mirrors ln. > > > Hmm, it seems RedHat's ln uses -n for this (OpenBSD, NetBSD, and Darwin > > all include a -n as an alias to -h for ln to support compat with other > > operating systems). OSF/1 (and Tru64) and SunOS use -n to mean "complain > > if the file already exists" similar to 'mv -n'. Also, looking at the > > Suse manpage on www.FreeBSD.org, it seems their ln (which does have -T) > > has both -n and -T with different descriptions, but to achieve the same > > purpose: > > > http://www.freebsd.org/cgi/man.cgi?query=ln&apropos=0&sektion=0&manpath=SuSE+Linux%2Fi386+11.3&arch=default&format=html > > > -n, --no-dereference > > treat destination that is a symlink to a directory as if it were > > a normal file > > > -T, --no-target-directory > > treat LINK_NAME as a normal file > > > (To me it seems LINK_NAME and destination are the same thing.) > > > My inclination would be to add -h to mv, but perhaps add -T as an alias > > for -h to both ln and mv, and -n as an alias for -h to ln (if we want > > aliases to match coreutils). > > Coreutils ln -n is the same as our ln -h, and we already have > compatibility for it. Bah, not sure how I missed the -n previously. > The coreutils -T option is different, though. It forces the ln > source_file target_file synopsis instead of the ln source_file ... > target_dir synopsis, without checking the type of the final operand. If > there are not exactly two operands, a syntax error occurs. If the final > operand is a directory and cannot be overwritten, an error occurs. Ah, this is not quite what my mv -h patch does. It does not error if the destination is a directory. It is much closer to ln -h and exactly matches the language for ln -n I quoted above. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Wed Aug 29 21:28:57 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B34DF1065673 for ; Wed, 29 Aug 2012 21:28:57 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm7-vm0.bullet.mail.sp2.yahoo.com (nm7-vm0.bullet.mail.sp2.yahoo.com [98.139.91.192]) by mx1.freebsd.org (Postfix) with SMTP id 6DC448FC12 for ; Wed, 29 Aug 2012 21:28:57 +0000 (UTC) Received: from [98.139.91.68] by nm7.bullet.mail.sp2.yahoo.com with NNFMP; 29 Aug 2012 21:27:07 -0000 Received: from [98.139.91.29] by tm8.bullet.mail.sp2.yahoo.com with NNFMP; 29 Aug 2012 21:27:07 -0000 Received: from [127.0.0.1] by omp1029.mail.sp2.yahoo.com with NNFMP; 29 Aug 2012 21:27:07 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 340428.80756.bm@omp1029.mail.sp2.yahoo.com Received: (qmail 10554 invoked by uid 60001); 29 Aug 2012 21:27:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1346275626; bh=8VZrSdFKfETbV7Ad6P1YHwxpgTWQ8YC9Q5LqM3KucVA=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=iIG+zAe+/mZn26ggFyrcYiSN3BNVPUjz/fqSQynjg7dYpK5+FllCu+V+M5ACn6CbDoRTdvQtYP2BX9z6TDvWgiLrexdfr3GGBCpK5zRiYjkfm3ujhiAVewTBQBzKSK9SqVcZ3ADiqHdlxGqUqfPF8dUqN5elXKN4iRFPrR4WrjE= X-YMail-OSG: 0UJzgTIVM1mpfg4vgsB_grXy0cqyR9C2cFOT8yl1B87pKdw iIGCD3lLTw45gi_sUQ25WYB3rxiaHIBEjaimJh8DWs6a1YnsO39bulKQyXpc uY8cboUU4IEddSQaGRftdTWUUfogoO75oFbWpqdhFhkwev21AzbLkHiS1Khr DhSD278gYA8U_8ppmUQMAMCa0gt3GZwDIJbklDZIknevD7bSEDqU5ssdU.eb H90CUerDf5DEdB_vDdw9T7xVdhyRCo2ZaVCmS7Lj1HPqKIbbHecC5D8WPcbB QyqOmP8cMxpf8qhG8_A9vIS3Dyww4RR2m4w6nDES3XSrdjIEF9Im6yfPS82z .n.m_41V9SHBhEk.mfxsv5h6xoJmBtXsUXEowGpRqX45ct1rSWIiSoYlH9Zp aZDj2R0IyDUdZPyL.XmwUW_gNqbfRYdA2S7fRRtasY8KWIxi_ZUjb_KHfHdp bEMp7GRU0IgWiPvb.8x._1d7gAi48huMHLou1TXwEWyQ3trhUYKTmDpBlVO_ frM711of_yfSGPeRexSUl6viz6eos4paee_sfZ_l2_wbiq8EIreXWvqHI6mv Th7hWaLnydKpHHmVjmhxybwct5Uf_loWVKIhUtsLUelH4MB1WS7u_yToqvRw OTtsAFZvnE5zIauqI_JM6xiRUJ08- Received: from [200.118.157.7] by web113519.mail.gq1.yahoo.com via HTTP; Wed, 29 Aug 2012 14:27:06 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailWebService/0.8.121.416 Message-ID: <1346275626.93815.YahooMailNeo@web113519.mail.gq1.yahoo.com> Date: Wed, 29 Aug 2012 14:27:06 -0700 (PDT) From: Pedro Giffuni To: Free BSD Current MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [RFT] Some updates to libc/rpc X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Pedro Giffuni List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 21:28:57 -0000 Hello;=0A=0AThe Bull NFS4 for linux project took our RPC support from libc= =0Aand did some=A0enhancements on it for a while. The libraries have=0Abeen= diverging extensively and many of the changes are linux=0Aspecific.=A0The= =A0complete=A0log of their changes is here:=0A=0Ahttp://git.infradead.org/u= sers/steved/libtirpc.git/log=0A=0A=0AI don't think it would be a good=A0ide= a to consider them upstream=0Avendors,=A0but I thought it=A0would be good t= o attempt to keep partially=0Ain sync.=A0I only took=A0a rather small subse= t of their changes and got=0Ato this patch:=0Ahttp://people.freebsd.org/~pf= g/patches/patch-rpc=0A=0A=0AFor those interested in the changelog, it's her= e:=0Ahttp://people.freebsd.org/~pfg/patches/libtirpc-log=0A=0A=0AThis is li= bc and rather critical stuff so I have no hurry and would=0Alike extensive= =A0testing before considering it for head.=0A=0APlease give it a try.=0A=0A= Pedro. From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 02:11:42 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33E01106564A for ; Thu, 30 Aug 2012 02:11:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0CAAF8FC14 for ; Thu, 30 Aug 2012 02:11:42 +0000 (UTC) Received: from John-Baldwins-MacBook-Air.local (c-68-39-198-164.hsd1.de.comcast.net [68.39.198.164]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 63F3DB945 for ; Wed, 29 Aug 2012 22:11:41 -0400 (EDT) Message-ID: <503ECBE2.3020609@FreeBSD.org> Date: Wed, 29 Aug 2012 22:11:46 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: current@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 29 Aug 2012 22:11:41 -0400 (EDT) Cc: Subject: [PATCH] Add locking to adv(4) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 02:11:42 -0000 Continuing with the theme of locking older storage drivers, I have patches to add locking to adv(4) and mark it MPSAFE. The patches are from HEAD but should apply to 8 or 9. If you test it on 8 or 9 please enable INVARIANTS for at least the initial testing. Thanks. http://www.FreeBSD.org/~jhb/patches/adv_locking.patch -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 02:57:52 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E2AB106564A for ; Thu, 30 Aug 2012 02:57:52 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm11-vm3.bullet.mail.ne1.yahoo.com (nm11-vm3.bullet.mail.ne1.yahoo.com [98.138.91.141]) by mx1.freebsd.org (Postfix) with SMTP id B4AE68FC1A for ; Thu, 30 Aug 2012 02:57:51 +0000 (UTC) Received: from [98.138.90.54] by nm11.bullet.mail.ne1.yahoo.com with NNFMP; 30 Aug 2012 02:57:45 -0000 Received: from [98.138.84.45] by tm7.bullet.mail.ne1.yahoo.com with NNFMP; 30 Aug 2012 02:57:45 -0000 Received: from [127.0.0.1] by smtp113.mail.ne1.yahoo.com with NNFMP; 30 Aug 2012 02:57:45 -0000 X-Yahoo-Newman-Id: 855384.51386.bm@smtp113.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: f6d9LFIVM1nJVc64Z2U7KVulFprBCECknAYNvGXVAcnonxD 6gAqC.BACnDrXUeQkPZr9U9PdyxXYw7nYlt9.5WhLZQ6yl6K7aqXd34wZDFX 87hsQuf_9Nc8yqpeY8prfQ5aUeXAfVaPdxkFKOwZDT4JOM_K1eN3b0_i.r9Y TsVKJSKZTquJM2Z.rVJAuh4xNkcpzirbJYgattCWd5Y.YRRLDAgQjaCJTEY. 4EOYxU853QlZ_N.qo2NBmkyn_1o1MO8OLzrOEMB6Ey6dweS9kepq6mG_cog1 p394vilUae8t6WutQydgOeZ4r1sAdx3ERx3pNiT0mXxFAKgC42Gs.ieqBTXi yfgVofA6M6CorIJ1luS_ORgxXRaoHZihVq5DHpXAKP7li7FU2w_SLPwKBG9k D8_pDLW5XaOvZplf6CY9thcyjjN6yk_R_bnbUDSkGQ_jtUXEOj5n6HQ4ZhDY SkryTerrrCXc2SZv49poL8LyGLWJpneqxKD7K7XLE6_tT9FBMZkB5EmYt7VV 1Yz4ZRLXUYWTda1TwI6T6zqr4Rf6v7OiAPV8GyqV3YtZ9OeL5p8o1GEXHR2m HCdfAQ1s1t8hm1KkfLuCQC1zjanbnz7rTaIi315O3L19okPHWXQ-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Received: from [192.168.10.102] (pfg@200.118.157.7 with plain) by smtp113.mail.ne1.yahoo.com with SMTP; 29 Aug 2012 19:57:45 -0700 PDT Message-ID: <503ED6A1.1060902@FreeBSD.org> Date: Wed, 29 Aug 2012 21:57:37 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120618 Thunderbird/13.0 MIME-Version: 1.0 To: freebsd-current@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: [CFT] Some updates to libc/rpc (second try) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 02:57:52 -0000 (Second try with a more benign mailer) Hello; A while back the Bull NFS4 for linux project took our RPC support from libcand did some enhancements on it. The libraries have been diverging extensively and many of the changes are linux specific. The complete log of their changes is here: http://git.infradead.org/users/steved/libtirpc.git/log I don't think it would be a good idea to consider them upstream vendors, but I thought it would be good to attempt to keep partially in sync. I only took a rather small subset of their changes and got to this patch: http://people.freebsd.org/~pfg/patches/patch-rpc For those interested in the changelog, it's here: http://people.freebsd.org/~pfg/patches/libtirpc-log This is rather critical stuff (libc) so I have no hurry and would like extensive testing before considering it for head. Please give it a try and report any issue. Pedro. From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 03:22:50 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CBD7106566B for ; Thu, 30 Aug 2012 03:22:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 050148FC15 for ; Thu, 30 Aug 2012 03:22:50 +0000 (UTC) Received: from John-Baldwins-MacBook-Air.local (c-68-39-198-164.hsd1.de.comcast.net [68.39.198.164]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 67843B945 for ; Wed, 29 Aug 2012 23:22:49 -0400 (EDT) Message-ID: <503EDC8F.7050907@FreeBSD.org> Date: Wed, 29 Aug 2012 23:22:55 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: current@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 29 Aug 2012 23:22:49 -0400 (EDT) Cc: Subject: [PATCH] Locking for adw(4) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 03:22:50 -0000 Continuing with the theme of locking older storage drivers, I have patches to add locking to adw(4) and mark it MPSAFE. The patches are from HEAD but should apply to 8 or 9. If you test it on 8 or 9 please enable INVARIANTS for at least the initial testing. Thanks. http://www.FreeBSD.org/~jhb/patches/adw_locking.patch -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 07:05:58 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9DD94106564A for ; Thu, 30 Aug 2012 07:05:58 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 556D48FC08 for ; Thu, 30 Aug 2012 07:05:58 +0000 (UTC) Received: by vbmv11 with SMTP id v11so1966022vbm.13 for ; Thu, 30 Aug 2012 00:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=+AHUxhIBdrkv00inbXdp9BHUiOedHNjeTqxjpCUEQD4=; b=0fsUVNTmISA+iRgzmD1Iv/cGEXSKJFrPksrfB6mBBMoSE5QmP/t1kgmABat7RV+jRN ptMKT0bkBg8c8h0S3N7rxzXa1s7j/hUeE2iitWZuWI/ZtFH4tvkuaqVZNUz93WAflllq jiWJ+3Hh92m1PEjvFOcji9A/xEZg7YDR95c/Ksj+m92ufittCzq/TiXThD4lQj3EArbG o+FjnkIGU3IwF5wQwUwKu6QxEvUcwqP0yyEglIJONruYIILNODWZEeSWNGf06JA7YuD3 IZho7Ty47g3Qk/yCcvIw637gw0/aN1+v/yNLNz8qCEkw43bi7RVCKbkfKbkHcmCShLTC ZcYQ== MIME-Version: 1.0 Received: by 10.52.36.76 with SMTP id o12mr2060619vdj.40.1346310357453; Thu, 30 Aug 2012 00:05:57 -0700 (PDT) Sender: r.c.ladan@gmail.com Received: by 10.220.145.13 with HTTP; Thu, 30 Aug 2012 00:05:56 -0700 (PDT) Date: Thu, 30 Aug 2012 09:05:56 +0200 X-Google-Sender-Auth: lfClw5dPDPIsH1-v3hdTlQifmP8 Message-ID: From: =?ISO-8859-1?Q?Ren=E9_Ladan?= To: FreeBSD current Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: UFS journal error on 10.0-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 07:05:58 -0000 Hi, after a power dip (don't ask how!) my 10.0-amd64 laptop running r239793 decided to check its file systems. On /usr it fixed some errors but I am stuck with: # fsck -y /usr ** /dev/ada0s1f USE JOURNAL? yes ** SU+J Recovering /dev/ada0s1f ** Reading 33554432 byte journal from inode 5 RECOVER? yes ** Building recovery table. ** Resolving unreferenced inode list. ** Processing journal entries fsck_ufs: Directory 43643675 name not found # So fsck never fully completes, leaving /usr unmountable. I could try to do a file system check without the journal. Ren=E9 From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 09:21:16 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35D3B106564A; Thu, 30 Aug 2012 09:21:16 +0000 (UTC) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.kpi.ua (comsys.kpi.ua [77.47.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id DB80D8FC14; Thu, 30 Aug 2012 09:21:15 +0000 (UTC) Received: from pm513-1.comsys.kpi.ua ([10.18.52.101] helo=pm513-1.comsys.ntu-kpi.kiev.ua) by comsys.kpi.ua with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1T70w6-0008L1-NU; Thu, 30 Aug 2012 12:21:14 +0300 Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001) id CE0251CC0B; Thu, 30 Aug 2012 12:21:13 +0300 (EEST) Date: Thu, 30 Aug 2012 12:21:13 +0300 From: Andrey Simonenko To: Pedro Giffuni Message-ID: <20120830092113.GA27015@pm513-1.comsys.ntu-kpi.kiev.ua> References: <503ED6A1.1060902@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <503ED6A1.1060902@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Authenticated-User: simon@comsys.ntu-kpi.kiev.ua X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Exim-Version: 4.63 (build at 28-Apr-2011 07:11:12) X-Date: 2012-08-30 12:21:14 X-Connected-IP: 10.18.52.101:30900 X-Message-Linecount: 33 X-Body-Linecount: 18 X-Message-Size: 1173 X-Body-Size: 547 Cc: freebsd-current@FreeBSD.org Subject: Re: [CFT] Some updates to libc/rpc (second try) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 09:21:16 -0000 On Wed, Aug 29, 2012 at 09:57:37PM -0500, Pedro Giffuni wrote: > > This is rather critical stuff (libc) so I have no hurry and would > like extensive testing before considering it for head. > > Please give it a try and report any issue. > Looks like that their getnetconfig.c and getnetpath.c have similar mistakes as these files have in FreeBSD. Detailed description of mistakes in these files and correct implementation: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/165710 Related PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=79683 From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 09:37:20 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C2EF106564A; Thu, 30 Aug 2012 09:37:20 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id CC81B8FC17; Thu, 30 Aug 2012 09:37:18 +0000 (UTC) Received: by obbun3 with SMTP id un3so3728926obb.13 for ; Thu, 30 Aug 2012 02:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ppFlmhdj2Ipcwem5AByimRWVaF0iBNh6bQP3LmKxV4Y=; b=RUDMoz50bdrb6mO492GK6KvLGFChpTxMlMjc2S7d+HBVaBeVIeuGbf+MleZw9Tp1Ds TuqEglclOUzq7lgpqpMdnRld27jEyErcfz2dfXTm6T47cB+8lrlBfz6oU66iIFPIJkl7 vt7wpdiT22Cg7Z5T4HEmqSXe4M2d4r/ne4fh2NPwjJqY6sziSe/qod8vp2Jyfj6nplDX zpY1uVev4d4cF696t/WDFgYX73l7EOtaLmMpphc1gCW0FluH/l+8dZ2hfD/qK4t1w1Z8 DbG+OZtmRbHkL5KrRhZRimg+GnXMLy/ccT35za+ta25NwQ35edjivqyAHBrCSrSnDiRV mowQ== MIME-Version: 1.0 Received: by 10.60.29.164 with SMTP id l4mr3713397oeh.4.1346319437794; Thu, 30 Aug 2012 02:37:17 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Thu, 30 Aug 2012 02:37:17 -0700 (PDT) In-Reply-To: <20120830092113.GA27015@pm513-1.comsys.ntu-kpi.kiev.ua> References: <503ED6A1.1060902@FreeBSD.org> <20120830092113.GA27015@pm513-1.comsys.ntu-kpi.kiev.ua> Date: Thu, 30 Aug 2012 02:37:17 -0700 Message-ID: From: Garrett Cooper To: Andrey Simonenko Content-Type: text/plain; charset=ISO-8859-1 Cc: Pedro Giffuni , freebsd-current@freebsd.org Subject: Re: [CFT] Some updates to libc/rpc (second try) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 09:37:20 -0000 On Thu, Aug 30, 2012 at 2:21 AM, Andrey Simonenko wrote: > On Wed, Aug 29, 2012 at 09:57:37PM -0500, Pedro Giffuni wrote: >> >> This is rather critical stuff (libc) so I have no hurry and would >> like extensive testing before considering it for head. >> >> Please give it a try and report any issue. >> > > Looks like that their getnetconfig.c and getnetpath.c have similar > mistakes as these files have in FreeBSD. > > Detailed description of mistakes in these files and correct implementation: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/165710 A developer at $work (Isilon) developed a slightly simpler patch than that based on our custom 7.x sources recently to deal with concurrency issues in netconfig. I'll talk with a couple people to see whether or not the solution can be contributed back [after some polishing -- maybe -- and further testing]. > Related PR: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=79683 Thanks! -Garrett From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 12:31:34 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58B69106564A for ; Thu, 30 Aug 2012 12:31:34 +0000 (UTC) (envelope-from jakub_lach@mailplus.pl) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) by mx1.freebsd.org (Postfix) with ESMTP id 2B8EF8FC08 for ; Thu, 30 Aug 2012 12:31:33 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1T73uB-0008Gx-GN for freebsd-current@freebsd.org; Thu, 30 Aug 2012 05:31:27 -0700 Date: Thu, 30 Aug 2012 05:31:27 -0700 (PDT) From: Jakub Lach To: freebsd-current@freebsd.org Message-ID: <1346329887307-5739274.post@n5.nabble.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: UFS journal error on 10.0-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 12:31:34 -0000 If I were you, I would try regular fsck, as here (9-STABLE) using journal has left me with fs inconsistencies. -- View this message in context: http://freebsd.1045724.n5.nabble.com/UFS-journal-error-on-10-0-CURRENT-tp5739231p5739274.html Sent from the freebsd-current mailing list archive at Nabble.com. From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 12:42:53 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEC14106566C for ; Thu, 30 Aug 2012 12:42:53 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8CAF88FC1B for ; Thu, 30 Aug 2012 12:42:53 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so3131274pbb.13 for ; Thu, 30 Aug 2012 05:42:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=vkyMlhfIKK3V3q+sLdu4iEM8snQcVjVOtZje7CGE4as=; b=R5uhuxQni2mT0ANPjI+BbsM6xhN1woo01ngz+2jRHoAvw+Ygrft8FRlVnzCHRhVumF 509FH0WCo4VnjjEA3Dffbjy+7HbSfYbMKRsF6AtkCwsqYUOAS44WrOvrJQi5jP60SwI/ XToEnWHNXfq0Pv2YKgPWaTbs3by2lDUPEZt0I0gzMTnA+lsx/Xbjk7RJf/o5A/p56zHQ V95bmMHk1c9NuLnK2W7pee4J8VA/3bMnuZpRchSFMPqJE6aSI2r5kcuoa/n5zpPAPJ3u t9gSfC9jeWtWFkrZeRl4be+HVoI0XI7kO5ACNsowyFe6k9jWoxn/PA6bWkBe0BhkUnKA gCSQ== MIME-Version: 1.0 Received: by 10.66.88.198 with SMTP id bi6mr9870693pab.23.1346330572792; Thu, 30 Aug 2012 05:42:52 -0700 (PDT) Sender: r.c.ladan@gmail.com Received: by 10.66.191.10 with HTTP; Thu, 30 Aug 2012 05:42:52 -0700 (PDT) In-Reply-To: <1346329887307-5739274.post@n5.nabble.com> References: <1346329887307-5739274.post@n5.nabble.com> Date: Thu, 30 Aug 2012 14:42:52 +0200 X-Google-Sender-Auth: -sITyV7zRZMaAYWa5vpEfqERbSE Message-ID: From: =?ISO-8859-1?Q?Ren=E9_Ladan?= To: FreeBSD current Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: UFS journal error on 10.0-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 12:42:53 -0000 2012/8/30 Jakub Lach : > If I were you, I would try regular fsck, as here > (9-STABLE) using journal has left me with fs > inconsistencies. > I could do that, but I wonder why fsck_ufs is not able to figure that out by itself. Ren=E9 From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 14:07:50 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AB0EE106564A for ; Thu, 30 Aug 2012 14:07:50 +0000 (UTC) (envelope-from decke@bluelife.at) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 27CC98FC08 for ; Thu, 30 Aug 2012 14:07:49 +0000 (UTC) Received: by wicr5 with SMTP id r5so265650wic.13 for ; Thu, 30 Aug 2012 07:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bluelife.at; s=google; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=GOe4R81lCnvzgi0oi2RGnbFhBUMohdaSbRNrtIjDcBA=; b=eCMuF49RcPSrZyoh6Q3u8mE0QhtJzVUKJ92NTPh51jHO1aa5oFzvtQRgn3XeG/J3Xu TAt9YOJKzbdgdsviQAoqIYNWyw4c4tKSPwMXP0OAgN+zXg/Mou5P8RCVzfpGkQAoUFGT 2OtSQSBES777UelbQYKet2cKgvnAYTC6/9pII= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=GOe4R81lCnvzgi0oi2RGnbFhBUMohdaSbRNrtIjDcBA=; b=USGWkhL7kpevgLOuggTcyp3QHN4q6pckP/PdWNolsNX0YNghdlCFC2aOj1sNzzHDeU PXQSe8YAXGok6jsDjyOITYn63laDdtGIIaZQHHrG2gFD2cpURzB27RoFcXXEXSX/e8uD tkpOxVSwQSOQMwnGrh7rlkTVdFbd7+MjeomjMrpziDwMLu9Pdnb3bk0WfXB3Y2KzNQrM eLD+i3z9TF3eax8E4/F/+AtC7UYMrIUMAWkfiQdQZaA/a0zTdNVxgpkk9+oHmhmW4QLS A5iUDQgC37Zb/h9p/1oDNRShXR+oldt+RnYdZy39ttrzllsM+4HUMzmmtSzl+Ot8dmQ5 4dSg== MIME-Version: 1.0 Received: by 10.216.52.213 with SMTP id e63mr2761615wec.205.1346335668811; Thu, 30 Aug 2012 07:07:48 -0700 (PDT) Sender: decke@bluelife.at Received: by 10.180.90.15 with HTTP; Thu, 30 Aug 2012 07:07:48 -0700 (PDT) X-Originating-IP: [80.123.233.199] In-Reply-To: <20120820123142.GY33100@deviant.kiev.zoral.com.ua> References: <20120812132047.GA33526@psconsult.nl> <20120820123142.GY33100@deviant.kiev.zoral.com.ua> Date: Thu, 30 Aug 2012 16:07:48 +0200 X-Google-Sender-Auth: M_PSs5DM284PlvUxwd7XwvJxuvg Message-ID: From: =?ISO-8859-1?Q?Bernhard_Fr=F6hlich?= To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnl5kV+icRU2JmsMLyyiSHtTo7ZlYJs+djcQvyD2B2ktIevFoLyKW59fK2dISsCj58mxnnO Cc: Garrett Cooper , Current FreeBSD , Paul Schenkeveld Subject: Re: make package fails in chroot: tar: getvfsbyname failed: No such file or directory X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 14:07:50 -0000 On Mon, Aug 20, 2012 at 2:31 PM, Konstantin Belousov wrote: > On Mon, Aug 20, 2012 at 01:42:31PM +0200, Bernhard Fr?hlich wrote: >> On Sun, Aug 19, 2012 at 10:01 PM, Tim Kientzle wrote: >> > >> > On Aug 19, 2012, at 12:17 PM, Garrett Cooper wrote: >> > >> >> On Sun, Aug 19, 2012 at 9:45 AM, Tim Kientzle wrote: >> >>> >> >>> On Aug 12, 2012, at 6:20 AM, Paul Schenkeveld wrote: >> >>> >> >>>> Hi, >> >>>> >> >>>> I have a wrapper script that builds packages in a chroot environment >> >>>> which happily runs on release 6 thru 9 and earlier 10 but fails with: >> >>>> >> >>>> tar: getvfsbyname failed: No such file or directory >> >>>> >> >>>> on a recent -CURRENT. >> >>> >> >>> libarchive does do an initial getvfsbyname() when you ask it >> >>> to traverse a directory tree so that it can accurately handle later >> >>> requests about mountpoints and filesystem types. This code >> >>> is admittedly a little intricate. >> >> >> >> The problem most likely is the fact that all mountpoints are >> >> exposed via chroot, thus, if it's checking to see if a mountpoint >> >> exists, it may exist outside of the chroot. >> >> >> > >> > I reviewed the code to refresh my memory. Some >> > of what I said before was not quite right. >> > >> > Libarchive's directory traversal tracks information about >> > the filesystem type so that clients such as bsdtar can >> > efficiently skip synthetic filesystems (/dev or /proc) or >> > network filesystems (NFS or SMB mounts). >> > >> > The net effect is something like this: >> > >> > For each file: >> > stat() or lstat() or fstat() the file >> > look up dev number in an internal cache >> > if the dev number is new: >> > fstatfs() the open fd to get the FS name >> > getvfsbyname() to identify the FS type >> > >> > Unless there's a logic error in libarchive itself, this >> > would suggest that somehow fstatfs() is returning >> > a filesystem type that getvfsbyname() can't >> > identify. >> > >> > Paul: >> > What filesystem are you using? >> > >> > What does "mount" show? >> > >> > Does it work outside the chroot? >> >> I also see the same on the redports.org build machines. >> It builds within a jail there which is completely on a tmpfs. >> Interestinly everything is fine with a 10-CURRENT/amd64 >> jail but it breaks in a 10-CURRENT/i386 jail. Both are >> running on the same 10-CURRENT/amd64 which is >> around 2 months old. >> >> https://redports.org/buildarchive/20120814130205-56327/ > > Try this. Is it possible that this requires the host system to be quite new? The commit in HEAD seems to doesn't help in my case. Host is 9-stable from Jun 27 and jail is 10-current from a few days ago. -- Bernhard Froehlich http://www.bluelife.at/ From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 14:19:42 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D018106564A; Thu, 30 Aug 2012 14:19:42 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4C22B8FC17; Thu, 30 Aug 2012 14:19:42 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7UEJgSv083573; Thu, 30 Aug 2012 14:19:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7UEJgN0083571; Thu, 30 Aug 2012 14:19:42 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Thu, 30 Aug 2012 16:19:39 +0200 From: Baptiste Daroussin To: ports-announce@FreeBSD.org, ports@FreeBSD.org, current@FreeBSD.org Message-ID: <20120830141939.GJ64447@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="q5r20fdKX+PFtYHw" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: pkg (aka pkgng) 1.0 released X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 14:19:42 -0000 --q5r20fdKX+PFtYHw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, Since Julien Laffaye and I started pkgng lots of things has happened and here we are now. After 2 years of development (first commit "Tue Sep 7 2010"), more than 2000 commits, 43 different contibutors. The pkgng team is proud to release pkg-1.0! Before going further I would like to thanks any one that has been involved in pkgng providing code: Alberto Villa, Andrej Zverev, Andrey Zonov, Arthur Gautier, Ashish SHUKLA, Beat Gaetzi, Brad Davis, Bryan Drewery, Chris Rees, Craig Rodrigues, Daniel Shahaf, David Forsythe, David Naylor, Eitan Adler, Florent Thoumie, Frederic Culot, Garrett Cooper, Glen Barber, Jonathan Anderson, Koop Mast, Lars Engels, Joffrey Lassignardie, Marco Steinbach, Marin Atanasov Nikolov, Matthew Seaman, Maxim Ignatenko, Michael Brune, Philippe Pepiot, Pietro Cerutti, Rolf Grossmann, Roman Naumann, Sofian Brabez, Sunpoet Po-Chuan Hsieh, Toni Ylenius, Will Andrews, Yuri Pankov There are also some people I would like to thanks in particular: - Will Andrews, who has been the first to join the project after the first presentation at BSDCan 2010. - Jilles Tjoelker, who has been continuously reviewing commit, spotted mistake, provided advices. - Matthew Seaman and Bryan Drewery who have become two of the most active developers in a very short time and have improved pkgng a lot! - Marin Atanasov Nikolov, who has been working heavily on multirepository support, providing continuous integration environement, and many more. - All the portmgr from prior my election as member of that team, they invited us to BSDCan to present our early version of pkgng (which was a really early version :D), they trusted in pkgng and motivated us a lot! Thanks to all the testers/reviewers, early adopters. So, 1/ Why pkg? ------------ Our current pkg_install tools are showing their age, are hard to maintain, and they lack features: - missing metadata - no upgrade support - no repository support - no fine dependency tracking - no modern binary package management - and many others Having old tools makes it hard to improve the ports infrastructure, as a result lots of hacks have found their way into the different Mk/bsd.*.mk files to work around pkg_install limitations plus there are lots of hacks in the packages metadata itself such as @comment which are not comments, and so forth. 2/ What it is? -------------- It is a tool that is designed to replace pkg_install and provide modern features and advanced package management for FreeBSD. The ports tree is already able to transparently switch to pkgng by default by adding WITH_PKGNG=yes to your make.conf It provides a pkg2ng tool to help converting from an old installation to a new one. Test repositories are available on http://pkgbeta.freebsd.org/ (I try to update them as fast as I can) It will live forever in the ports tree (with a binary bootstrap in 9 and 10) Third party tools ----------------- Tools supporting natively pkgng - ports-mgmt/portupgrade-devel (soon the main portupgrade will support) - ports-mgmt/pkg_cutleaves - ports-mgmt/poudriere - ports-mgmt/poudriere-devel - ports-mgmt/portdowngrade - ports-mgmt/tinderbox-devel (support can be improved) - ports-mgmt/portbuilder - sysutils/bsdstats Tools supporting pkgng via a patch (I hope it will be reviewed/integrated soon) - ports-mgmt/portmaster (https://github.com/pkgng/pkgng/blob/master/ports/patch-portmaster-pkgng) Tools being worked on (or I heard people are interested) : - salt support (in version 0.10) http://docs.saltstack.org/en/latest/ref/states/all/salt.states.pkgng.html and http://docs.saltstack.org/en/latest/ref/modules/all/salt.modules.pkgng.html - cfengine support (http://unix-heaven.org/cfengine3-freebsd-pkgng) - puppet support: (https://github.com/xaque208/puppet-pkgng) - ruby bindings: (https://github.com/baloo/libpkg-ruby/) - PackageKit Howto: - Continuous integration and package building: http://unix-heaven.org/continuous-package-building-with-poudriere-and-jenkins - Maintaining your own pkgng repository with tinderbox: http://www.glenbarber.us/2012/06/11/Maintaining-Your-Own-pkgng-Repository.html Links ----- - http://wiki.freebsd.org/PkgPrimer - http://wiki.freebsd.org/pkgng - https://github.com/pkgng/pkgng/blob/master/FAQ.md Please report bugs in the github issue tracker: - http://github.com/pkgng/pkgng Please note the http://pkgbeta.freebsd.org is updated on best effort, there is still a lot of work needed, to be able to automatically and update on regular basis the package sets. regards, Bapt --q5r20fdKX+PFtYHw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlA/dnsACgkQ8kTtMUmk6EwKHgCgq4ysUClD5/g/0lxaAtwpjo4S UT0AnA+ft8lk8jnP4TQW9BmaFoxILAC4 =Bgl/ -----END PGP SIGNATURE----- --q5r20fdKX+PFtYHw-- From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 14:34:44 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2145106564A; Thu, 30 Aug 2012 14:34:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 4FAEF8FC1A; Thu, 30 Aug 2012 14:34:43 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q7UEYct5082684; Thu, 30 Aug 2012 17:34:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q7UEYQV9083231; Thu, 30 Aug 2012 17:34:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q7UEYQxl083230; Thu, 30 Aug 2012 17:34:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 30 Aug 2012 17:34:26 +0300 From: Konstantin Belousov To: Bernhard Fr?hlich Message-ID: <20120830143426.GM33100@deviant.kiev.zoral.com.ua> References: <20120812132047.GA33526@psconsult.nl> <20120820123142.GY33100@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jcnm62QQeDGsz6av" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Garrett Cooper , Current FreeBSD , Paul Schenkeveld Subject: Re: make package fails in chroot: tar: getvfsbyname failed: No such file or directory X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 14:34:44 -0000 --jcnm62QQeDGsz6av Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 30, 2012 at 04:07:48PM +0200, Bernhard Fr?hlich wrote: > On Mon, Aug 20, 2012 at 2:31 PM, Konstantin Belousov > wrote: > > On Mon, Aug 20, 2012 at 01:42:31PM +0200, Bernhard Fr?hlich wrote: > >> On Sun, Aug 19, 2012 at 10:01 PM, Tim Kientzle wrot= e: > >> > > >> > On Aug 19, 2012, at 12:17 PM, Garrett Cooper wrote: > >> > > >> >> On Sun, Aug 19, 2012 at 9:45 AM, Tim Kientzle wr= ote: > >> >>> > >> >>> On Aug 12, 2012, at 6:20 AM, Paul Schenkeveld wrote: > >> >>> > >> >>>> Hi, > >> >>>> > >> >>>> I have a wrapper script that builds packages in a chroot environm= ent > >> >>>> which happily runs on release 6 thru 9 and earlier 10 but fails w= ith: > >> >>>> > >> >>>> tar: getvfsbyname failed: No such file or directory > >> >>>> > >> >>>> on a recent -CURRENT. > >> >>> > >> >>> libarchive does do an initial getvfsbyname() when you ask it > >> >>> to traverse a directory tree so that it can accurately handle later > >> >>> requests about mountpoints and filesystem types. This code > >> >>> is admittedly a little intricate. > >> >> > >> >> The problem most likely is the fact that all mountpoints are > >> >> exposed via chroot, thus, if it's checking to see if a mountpoint > >> >> exists, it may exist outside of the chroot. > >> >> > >> > > >> > I reviewed the code to refresh my memory. Some > >> > of what I said before was not quite right. > >> > > >> > Libarchive's directory traversal tracks information about > >> > the filesystem type so that clients such as bsdtar can > >> > efficiently skip synthetic filesystems (/dev or /proc) or > >> > network filesystems (NFS or SMB mounts). > >> > > >> > The net effect is something like this: > >> > > >> > For each file: > >> > stat() or lstat() or fstat() the file > >> > look up dev number in an internal cache > >> > if the dev number is new: > >> > fstatfs() the open fd to get the FS name > >> > getvfsbyname() to identify the FS type > >> > > >> > Unless there's a logic error in libarchive itself, this > >> > would suggest that somehow fstatfs() is returning > >> > a filesystem type that getvfsbyname() can't > >> > identify. > >> > > >> > Paul: > >> > What filesystem are you using? > >> > > >> > What does "mount" show? > >> > > >> > Does it work outside the chroot? > >> > >> I also see the same on the redports.org build machines. > >> It builds within a jail there which is completely on a tmpfs. > >> Interestinly everything is fine with a 10-CURRENT/amd64 > >> jail but it breaks in a 10-CURRENT/i386 jail. Both are > >> running on the same 10-CURRENT/amd64 which is > >> around 2 months old. > >> > >> https://redports.org/buildarchive/20120814130205-56327/ > > > > Try this. >=20 > Is it possible that this requires the host system to be quite > new? The commit in HEAD seems to doesn't help in my > case. Host is 9-stable from Jun 27 and jail is 10-current from > a few days ago. Doh, the fix was in kernel, and I merged the change back to stable only on August 27. Running HEAD world on stable is not supported anyway. --jcnm62QQeDGsz6av Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlA/efIACgkQC3+MBN1Mb4i6eACfdla65NS59LrBc3wn3gBmdFBc lEMAoNSogOWKO3dRURrwVOVqDp4rZmGu =PsAq -----END PGP SIGNATURE----- --jcnm62QQeDGsz6av-- From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 14:39:37 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 213671065676; Thu, 30 Aug 2012 14:39:37 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay006.isp.belgacom.be (mailrelay006.isp.belgacom.be [195.238.6.172]) by mx1.freebsd.org (Postfix) with ESMTP id 47DD48FC21; Thu, 30 Aug 2012 14:39:36 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjEFAK96P1BbsRDj/2dsb2JhbABFt0yDMoEIgiABAQVWIgEQCw4KCRYPCQMCAQIBJx4GDQEHAQGIDbw8iwiGWQOOYIEglWuCZQ Received: from 227.16-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.16.227]) by relay.skynet.be with ESMTP; 30 Aug 2012 16:39:28 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q7UEdRJU065360; Thu, 30 Aug 2012 16:39:28 +0200 (CEST) (envelope-from tijl@coosemans.org) Message-ID: <503F7B15.6050607@coosemans.org> Date: Thu, 30 Aug 2012 16:39:17 +0200 From: Tijl Coosemans User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120804 Thunderbird/14.0 MIME-Version: 1.0 To: John Baldwin References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120826200246.GC3535@grinsebacke.dyndns.org> <503A8921.6010609@FreeBSD.org> <201208271224.20329.jhb@freebsd.org> In-Reply-To: <201208271224.20329.jhb@freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig955F759C31B3875E62113914" Cc: freebsd-current@freebsd.org, Doug Barton Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 14:39:37 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig955F759C31B3875E62113914 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 27-08-2012 18:24, John Baldwin wrote: > On Sunday, August 26, 2012 4:37:53 pm Doug Barton wrote: >> The problem is that we don't really support the idea of things in the >> base magically deleting themselves. >> >> As I have said in previous messages, the bootstrapping problem is bein= g >> overblown by several orders of magnitude. For newly installed systems >> where pkg is the default, /usr/local/bin/pkg will be installed. So the= re >> is no bootstrapping problem. >> >> For already-installed systems who wish to switch to pkg, they can >> install from /usr/ports, or use the pkg bootstrap tool in the base. >> Given that they will be intentionally making this change, and there wi= ll >> be instructions written up on how to do this which include the >> bootstrapping step, once again this is a non-issue. >> >> The whole idea of having every call to /usr/local/sbin/pkg pass throug= h >> /usr/sbin/pkg in order to help a tiny minority of users with a one-tim= e >> bootstrapping issue is just plain ludicrous. >=20 > I agree. Even if we keep /usr/sbin/pkg, we will presumably want to rem= ove > it from the base in a year or so via 'make delete-old', etc. Given tha= t, > I'm not sure we need it there in the first place. What if you pkg_delete \* or rm -rf /usr/local? Do you have to "reboot" pkg then? --------------enig955F759C31B3875E62113914 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iF4EAREIAAYFAlA/ex4ACgkQfoCS2CCgtivxHgD/SzCo2swJ4pxWJ9S4TpJAiQ7j 3WbB5f8OF5lTKgnGq58A/1B+VSNEYD4LnzOL09zay7yuAoUkgp3VRvlR8aQwNXNR =NWBN -----END PGP SIGNATURE----- --------------enig955F759C31B3875E62113914-- From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 15:43:49 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B1C3106566B; Thu, 30 Aug 2012 15:43:49 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (secure.freebsdsolutions.net [69.55.234.48]) by mx1.freebsd.org (Postfix) with ESMTP id 0BA008FC14; Thu, 30 Aug 2012 15:43:48 +0000 (UTC) Received: from [10.10.1.32] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by ns1.jnielsen.net (8.14.4/8.14.4) with ESMTP id q7UFhjOi036017 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 30 Aug 2012 11:43:46 -0400 (EDT) (envelope-from lists@jnielsen.net) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: John Nielsen In-Reply-To: <20120830141939.GJ64447@ithaqua.etoilebsd.net> Date: Thu, 30 Aug 2012 09:43:47 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20120830141939.GJ64447@ithaqua.etoilebsd.net> To: ports@freebsd.org, current@freebsd.org X-Mailer: Apple Mail (2.1486) X-DCC-sonic.net-Metrics: ns1.jnielsen.net 1117; Body=2 Fuz1=2 Fuz2=2 X-Virus-Scanned: clamav-milter 0.97.5 at ns1.jnielsen.net X-Virus-Status: Clean Cc: Subject: Re: pkg (aka pkgng) 1.0 released X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 15:43:49 -0000 Thanks to everyone involved. I've been lightly testing pkg for a little while, but I still mainly use = ports. This announcement prompted me to switch from portupgrade to = portupgrade-devel (20120827 version) to see how it works with PKGNG. I = encountered a couple issues: Portupgrade doesn't remove the pkgdb.db.lock reliably. Portupgrade doesn't handle stale lock files (just waits indefinitely for = a nonexistent process to finish). A big problem when combined with the = above. Running "portupgrade pkg" failed. It stalled trying to unregister the = package installation after the old pkg was removed. I didn't dig too = deeply but it seems like a dependency chicken-and-egg problem. I was able to reinstall using /usr/sbin/pkg, and I also tested "make && = make deinstall && make reinstall" of ports-mgmt/pkg successfully, so it = may just be a portupgrade issue. JN On Aug 30, 2012, at 8:19 AM, Baptiste Daroussin = wrote: > After 2 years of development (first commit "Tue Sep 7 2010"), more = than 2000 > commits, 43 different contibutors. The pkgng team is proud to release = pkg-1.0! >=20 > [...] >=20 > Tools supporting natively pkgng > - ports-mgmt/portupgrade-devel (soon the main portupgrade will = support) > [...] From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 15:56:43 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF7C8106564A; Thu, 30 Aug 2012 15:56:43 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (secure.freebsdsolutions.net [69.55.234.48]) by mx1.freebsd.org (Postfix) with ESMTP id 769E98FC14; Thu, 30 Aug 2012 15:56:43 +0000 (UTC) Received: from [10.10.1.32] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by ns1.jnielsen.net (8.14.4/8.14.4) with ESMTP id q7UFuam5047425 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 30 Aug 2012 11:56:36 -0400 (EDT) (envelope-from lists@jnielsen.net) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: John Nielsen In-Reply-To: Date: Thu, 30 Aug 2012 09:56:39 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <2DA948A5-540A-411F-9D11-120A27AF1EBB@jnielsen.net> References: <20120830141939.GJ64447@ithaqua.etoilebsd.net> To: ports@freebsd.org, current@freebsd.org X-Mailer: Apple Mail (2.1486) X-DCC-sonic.net-Metrics: ns1.jnielsen.net 1117; Body=2 Fuz1=2 Fuz2=2 X-Virus-Scanned: clamav-milter 0.97.5 at ns1.jnielsen.net X-Virus-Status: Clean Cc: Subject: Re: pkg (aka pkgng) 1.0 released X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 15:56:43 -0000 On Aug 30, 2012, at 9:43 AM, John Nielsen wrote: > Thanks to everyone involved. >=20 > I've been lightly testing pkg for a little while, but I still mainly = use ports. This announcement prompted me to switch from portupgrade to = portupgrade-devel (20120827 version) to see how it works with PKGNG. I = encountered a couple issues: >=20 > Portupgrade doesn't remove the pkgdb.db.lock reliably. > Portupgrade doesn't handle stale lock files (just waits indefinitely = for a nonexistent process to finish). A big problem when combined with = the above. > Running "portupgrade pkg" failed. It stalled trying to unregister the = package installation after the old pkg was removed. I didn't dig too = deeply but it seems like a dependency chicken-and-egg problem. I tried this again so I could provide some more details. This is what = shows in the terminal when it stalls: ---> Backing up the old version ---> Uninstalling the old version USING PKGNG ---> Deinstalling 'pkg-1.0' ---> Preserving /usr/local/lib/libpkg.so.0 as = /usr/local/lib/compat/pkg/libpkg.so.0 The following packages will be deinstalled: pkg-1.0 The deinstallation will free 7 MB Deleting pkg-1.0... done [Updating the pkgdb in /var/db/pkg ...=20 Running ps in another terminal shows "pkg query %n-%v". Since the actual = pkg is now gone, I suspect this is really /usr/sbin/pkg. I further = suspect that it's waiting for y/n input (whether to install the binary = pkg) on its nonexistent stdin somewhere. I killed it (pkg) and = portupgrade seemed to finish normally. > I was able to reinstall using /usr/sbin/pkg, and I also tested "make = && make deinstall && make reinstall" of ports-mgmt/pkg successfully, so = it may just be a portupgrade issue. >=20 > JN >=20 > On Aug 30, 2012, at 8:19 AM, Baptiste Daroussin = wrote: >=20 >> After 2 years of development (first commit "Tue Sep 7 2010"), more = than 2000 >> commits, 43 different contibutors. The pkgng team is proud to = release pkg-1.0! >>=20 >> [...] >>=20 >> Tools supporting natively pkgng >> - ports-mgmt/portupgrade-devel (soon the main portupgrade will = support) >> [...] >=20 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org" >=20 From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 16:06:40 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3978E106566B for ; Thu, 30 Aug 2012 16:06:40 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 462768FC14 for ; Thu, 30 Aug 2012 16:06:38 +0000 (UTC) Received: by lbbgg13 with SMTP id gg13so748097lbb.13 for ; Thu, 30 Aug 2012 09:06:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=IBnEWLX22HsDTb1DgmGbskP7B8CsiSTB0Y/bGEG9bXA=; b=JpFQvKcJbiPD0rYg9EpPsMLllE0AsrHImmb2pX2QnQ149Evqt43T8hnr6q+kKW+itF dNtQALDOvEB1xFZPoa/i18NhBD7z9j8j/UHdTFWNtjryujzilnJroTXVFHg6xaSWP+wD +vJow+LQZpmV+IIuNKd1BL2RxRCuamolCDEGNPCDFN4M0bQWcHb3OxoH6m12awqcqs4W 48N62Sya9Fh4LVBPEmdBanWxhyTswMKD/aaDejNR4nROKRSqgPGUhylDx9RfmAw0FsK0 c64grjhic3DjWAWtfJ8CJCR/2+Txv9nWAyhCwe4+hrjoUxKtCXhNf7OAKynze+meDCyY 47ww== MIME-Version: 1.0 Received: by 10.112.86.166 with SMTP id q6mr1573561lbz.6.1346342797656; Thu, 30 Aug 2012 09:06:37 -0700 (PDT) Received: by 10.112.2.36 with HTTP; Thu, 30 Aug 2012 09:06:37 -0700 (PDT) In-Reply-To: <2DA948A5-540A-411F-9D11-120A27AF1EBB@jnielsen.net> References: <20120830141939.GJ64447@ithaqua.etoilebsd.net> <2DA948A5-540A-411F-9D11-120A27AF1EBB@jnielsen.net> Date: Thu, 30 Aug 2012 18:06:37 +0200 Message-ID: From: Olivier Smedts To: John Nielsen Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmito0kKAIeHcU3Q9UsF3sqtldic9OBRoI9qDo/PYlEoul/bfY+4ILKMmO6+GtdBIwai7B6 Cc: ports@freebsd.org, current@freebsd.org Subject: Re: pkg (aka pkgng) 1.0 released X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 16:06:40 -0000 2012/8/30 John Nielsen : > Running ps in another terminal shows "pkg query %n-%v". Since the actual = pkg is now gone, I suspect this is really /usr/sbin/pkg. I further suspect = that it's waiting for y/n input (whether to install the binary pkg) on its = nonexistent stdin somewhere. I killed it (pkg) and portupgrade seemed to fi= nish normally. This is the first example where renaming pkg to pkg-bootstrap would have been useful. --=20 Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas." From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 16:16:01 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2F0C106564A for ; Thu, 30 Aug 2012 16:16:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 543A38FC0A for ; Thu, 30 Aug 2012 16:16:00 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id C62AE5C37; Thu, 30 Aug 2012 18:15:59 +0200 (CEST) Message-ID: <503F91C0.3090208@FreeBSD.org> Date: Thu, 30 Aug 2012 18:16:00 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120815 Thunderbird/15.0 MIME-Version: 1.0 To: Eir Nym References: <503D12CB.4000208@FreeBSD.org> <503D29F4.1030804@FreeBSD.org> <503D35DA.9060704@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 16:16:01 -0000 On 2012-08-29 10:41, Eir Nym wrote: =2E.. >>> /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: error: variable >>> 'fbno' is used uninitialized whenever 'if' condition is false >>> [-Werror,-Wsometimes-uninitialized] >>> else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 = && !args->isfl >>> && >>> >>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> >> Weird, how are you building the xfs module? It has WERROR=3D in its >> Makefile, so the '-Werror' option above should not be there. This is >> because the XFS code was imported more than 6 years ago, and is very >> unlikely to ever be fixed. :) > > head SVN revision 239793, > http://eroese.org/_/_/pub/bsd/GENERIC_PF.amd64 =E2=80=94 kernel config Aha, I finally had some time to look at this again, and it seems that when xfs is statically linked into your kernel, the disabling of -Werror does not take place. [Note that linking GPL-contaminated code into your kernel proper is, shall we say, "ideologically impure" ;-) But that is not the issue here.] It seems the WERROR=3D in the xfs module Makefile was right there from th= e start, but it was never removed. I have compiled it using gcc, and there are actually no warnings from gcc at all. With clang, there are several warnings, so I have added a few workaround -Wno-xxx flags for them. Currently I'm running a make universe to see if this doesn't cause any trouble, and if it completes successfully, I will commit the changes. Then I'll mail a note here so you can update your tree and try it out. From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 16:43:58 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D7AE106566B; Thu, 30 Aug 2012 16:43:58 +0000 (UTC) (envelope-from eirnym@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 072018FC0C; Thu, 30 Aug 2012 16:43:57 +0000 (UTC) Received: by obbun3 with SMTP id un3so4880815obb.13 for ; Thu, 30 Aug 2012 09:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=4nSaZ+2+L1FR23TKMRVb8R/qUT72NkEo7yNAwt/eJ7E=; b=z58uhhC0qn/Qg9aE3R4TACNUKesZ5GkwPUtnUJuDFXLmeJFcA9Z0Vru6XxBqJ4Zrtu ZCelShUxKbTN9ZuEgAFHY4ChbCpQmTW6ANZQpzr5NyD0St7jqJA0uDAQSkn7ptYnCLg3 s5Vqbd3Y+xn4QezEhUObg7V5xQFUxkAMNIptJU8MK8gTjgb5y4ER3J5g0E5p0Qf+C5jZ kOynMNOZ2JYDuxLPQ1T7z3A6VjfPLBSaxzzozDBV0tTy7GhxP1BidLYrQSSOIuKGUf/u hzVoKBCLhS8Wre+dw+RDbkBqajj8nLM29cc/6RERX397WM37koAN4U7zS6gONxT8PUvU v+qw== Received: by 10.182.50.98 with SMTP id b2mr5323990obo.28.1346345036305; Thu, 30 Aug 2012 09:43:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.94.205 with HTTP; Thu, 30 Aug 2012 09:43:34 -0700 (PDT) In-Reply-To: <503F91C0.3090208@FreeBSD.org> References: <503D12CB.4000208@FreeBSD.org> <503D29F4.1030804@FreeBSD.org> <503D35DA.9060704@FreeBSD.org> <503F91C0.3090208@FreeBSD.org> From: Eir Nym Date: Thu, 30 Aug 2012 20:43:34 +0400 Message-ID: To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 16:43:58 -0000 -- Eir Nym On 30 August 2012 20:16, Dimitry Andric wrote: > On 2012-08-29 10:41, Eir Nym wrote: > ... > >>>> /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: error: variable >>>> 'fbno' is used uninitialized whenever 'if' condition is false >>>> [-Werror,-Wsometimes-uninitialized] >>>> else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 &= & >>>> !args->isfl >>>> && >>>> >>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> >>> >>> >>> Weird, how are you building the xfs module? It has WERROR=3D in its >>> Makefile, so the '-Werror' option above should not be there. This is >>> because the XFS code was imported more than 6 years ago, and is very >>> unlikely to ever be fixed. :) >> >> >> head SVN revision 239793, >> http://eroese.org/_/_/pub/bsd/GENERIC_PF.amd64 =E2=80=94 kernel config > > > Aha, I finally had some time to look at this again, and it seems that > when xfs is statically linked into your kernel, the disabling of -Werror > does not take place. [Note that linking GPL-contaminated code into your > kernel proper is, shall we say, "ideologically impure" ;-) But that is > not the issue here.] > I don't like ideological contradictions in any way, but I should review real using modules in the kernel. > It seems the WERROR=3D in the xfs module Makefile was right there from th= e > start, but it was never removed. I have compiled it using gcc, and > there are actually no warnings from gcc at all. With clang, there are > several warnings, so I have added a few workaround -Wno-xxx flags for > them. > My kernel & world builds correctly with gcc too, but I want to almost stop using it. > Currently I'm running a make universe to see if this doesn't cause any > trouble, and if it completes successfully, I will commit the changes. > > Then I'll mail a note here so you can update your tree and try it out. > Oh! Thank you for your efforts! From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 15:47:01 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54773106566C for ; Thu, 30 Aug 2012 15:47:01 +0000 (UTC) (envelope-from zeising@daemonic.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) by mx1.freebsd.org (Postfix) with ESMTP id A3C608FC12 for ; Thu, 30 Aug 2012 15:47:00 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 3F85F4000B for ; Thu, 30 Aug 2012 17:46:59 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 3236740023; Thu, 30 Aug 2012 17:46:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (mx.daemonic.se [IPv6:2001:470:dca9:0:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 82FF74000B for ; Thu, 30 Aug 2012 17:46:58 +0200 (CEST) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 3X77Nx6JQwz8gtM for ; Thu, 30 Aug 2012 17:46:57 +0200 (CEST) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([10.1.0.3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [10.1.0.6]) (amavisd-new, port 10025) with ESMTPS id N8VLecXbj1cl for ; Thu, 30 Aug 2012 17:46:55 +0200 (CEST) Received: from mail.daemonic.se (mail.daemonic.se [10.1.0.4]) by mx.daemonic.se (Postfix) with ESMTPS id 3X77Nv347Nz8gtL for ; Thu, 30 Aug 2012 17:46:55 +0200 (CEST) Received: from tifa.daemonic.se (dhcp-128-232-140-88.eduroam.csx.cam.ac.uk [128.232.140.88]) by mail.daemonic.se (Postfix) with ESMTPSA id 3X77Nv2CCRz9Ctj for ; Thu, 30 Aug 2012 17:46:55 +0200 (CEST) Received: from tifa.daemonic.se (localhost [127.0.0.1]) by tifa.daemonic.se (Postfix) with ESMTP id CFB96228F2 for ; Thu, 30 Aug 2012 16:46:53 +0100 (BST) Message-ID: <503F8AED.9050508@daemonic.se> Date: Thu, 30 Aug 2012 16:46:53 +0100 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: current@freebsd.org Content-Type: multipart/mixed; boundary="------------090307030006060708090008" X-Virus-Scanned: ClamAV using ClamSMTP X-Mailman-Approved-At: Thu, 30 Aug 2012 17:00:03 +0000 Cc: Subject: [PATCH] make it possible for yp_mkdb to send YPPROC_CLEAR to arbitrary host X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 15:47:01 -0000 This is a multi-part message in MIME format. --------------090307030006060708090008 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I have a patch that makes it possible to send an YPPROC_CLEAR to any host, not just localhost. YPPROC_CLEAR is basically used to flush NIS connections, so that clients pick up changes done in the NIS maps right away. Currently yp_mkdb can send this to localhost, but if the NIS-server is in a jail, there is no localhost. This way YPPROC_CLEAR can be sent to the NIS server in jails as well. The patch is attached and also in bin/169911 [1] Regards -- Niclas Zeising [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/169911 --------------090307030006060708090008 Content-Type: text/x-patch; name="usr.sbin.yp_mkdb.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="usr.sbin.yp_mkdb.c.diff" Index: head/usr.sbin/yp_mkdb/yp_mkdb.c =================================================================== --- head/usr.sbin/yp_mkdb/yp_mkdb.c (revision 238532) +++ head/usr.sbin/yp_mkdb/yp_mkdb.c (working copy) @@ -57,11 +57,12 @@ static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n%s\n", - "usage: yp_mkdb -c", + fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", + "usage: yp_mkdb [-c | -C hostname]", " yp_mkdb -u dbname", - " yp_mkdb [-c] [-b] [-s] [-f] [-i inputfile] [-o outputfile]", - " [-d domainname ] [-m mastername] inputfile dbname"); + " yp_mkdb [-c | -C hostname] [-b] [-s] [-f] [-i inputfile]", + " [-o outputfile] [-d domainname ] [-m mastername]", + " inputfile dbname"); exit(1); } @@ -105,6 +106,7 @@ char *infile = NULL; char *map = NULL; char *domain = NULL; + char *clearhost = "localhost"; char *infilename = NULL; char *outfilename = NULL; char *mastername = NULL; @@ -117,7 +119,7 @@ FILE *ifp; char hname[MAXHOSTNAMELEN + 2]; - while ((ch = getopt(argc, argv, "uhcbsfd:i:o:m:")) != -1) { + while ((ch = getopt(argc, argv, "uhcC:bsfd:i:o:m:")) != -1) { switch (ch) { case 'f': filter_plusminus++; @@ -128,6 +130,10 @@ case 'c': clear++; break; + case 'C': + clear++; + clearhost = optarg; + break; case 'b': interdom++; break; @@ -156,6 +162,9 @@ argc -= optind; argv += optind; + if (clear > 1) + usage(); + if (un) { map = argv[0]; if (map == NULL) @@ -332,7 +341,7 @@ char in = 0; char *out = NULL; int stat; - if ((stat = callrpc("localhost", YPPROG,YPVERS, YPPROC_CLEAR, + if ((stat = callrpc(clearhost, YPPROG,YPVERS, YPPROC_CLEAR, (xdrproc_t)xdr_void, &in, (xdrproc_t)xdr_void, out)) != RPC_SUCCESS) { warnx("failed to send 'clear' to local ypserv: %s", Index: head/usr.sbin/yp_mkdb/yp_mkdb.8 =================================================================== --- head/usr.sbin/yp_mkdb/yp_mkdb.8 (revision 238532) +++ head/usr.sbin/yp_mkdb/yp_mkdb.8 (working copy) @@ -42,7 +42,7 @@ .Nm .Fl u Ar dbname .Nm -.Op Fl c +.Op Fl c | Fl C Ar hostname .Op Fl b .Op Fl s .Op Fl f @@ -111,6 +111,12 @@ .Nm will send the signal only after the new database has been successfully created. +.It Fl C +As +.Fl c +but send the YPPROC_CLEAR to the specified +.Ar hostname +instead. .It Fl b Cause .Nm --------------090307030006060708090008-- From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 17:02:59 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0B83106566C; Thu, 30 Aug 2012 17:02:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A2AF48FC16; Thu, 30 Aug 2012 17:02:59 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C612FB91C; Thu, 30 Aug 2012 13:02:58 -0400 (EDT) From: John Baldwin To: Tijl Coosemans Date: Thu, 30 Aug 2012 12:55:42 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <201208271224.20329.jhb@freebsd.org> <503F7B15.6050607@coosemans.org> In-Reply-To: <503F7B15.6050607@coosemans.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201208301255.42473.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 30 Aug 2012 13:02:58 -0400 (EDT) Cc: freebsd-current@freebsd.org, Doug Barton Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 17:02:59 -0000 On Thursday, August 30, 2012 10:39:17 am Tijl Coosemans wrote: > On 27-08-2012 18:24, John Baldwin wrote: > > On Sunday, August 26, 2012 4:37:53 pm Doug Barton wrote: > >> The problem is that we don't really support the idea of things in the > >> base magically deleting themselves. > >> > >> As I have said in previous messages, the bootstrapping problem is being > >> overblown by several orders of magnitude. For newly installed systems > >> where pkg is the default, /usr/local/bin/pkg will be installed. So there > >> is no bootstrapping problem. > >> > >> For already-installed systems who wish to switch to pkg, they can > >> install from /usr/ports, or use the pkg bootstrap tool in the base. > >> Given that they will be intentionally making this change, and there will > >> be instructions written up on how to do this which include the > >> bootstrapping step, once again this is a non-issue. > >> > >> The whole idea of having every call to /usr/local/sbin/pkg pass through > >> /usr/sbin/pkg in order to help a tiny minority of users with a one-time > >> bootstrapping issue is just plain ludicrous. > > > > I agree. Even if we keep /usr/sbin/pkg, we will presumably want to remove > > it from the base in a year or so via 'make delete-old', etc. Given that, > > I'm not sure we need it there in the first place. > > What if you pkg_delete \* or rm -rf /usr/local? Do you have to "reboot" > pkg then? Yes, if we've decided it (pkgng) should not be part of the base. This doesn't strike me as that weird. It seems similar to how one has to bootstrap, say, MacPorts. I think having pkgng self-contained is a feature, and that having /usr/sbin/pkg is of limited usefulness and is open to being stale. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 17:10:27 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4306B106566B; Thu, 30 Aug 2012 17:10:27 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6D9518FC0C; Thu, 30 Aug 2012 17:10:25 +0000 (UTC) Received: by bkcje9 with SMTP id je9so1125929bkc.13 for ; Thu, 30 Aug 2012 10:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=znc46HAxkzUMR527pBsJsZvETfh7TjEumCLrmCvqZHE=; b=lDXJ+aFUyc4ceIkHOZT/Rqry+nYl/EAuLKtbepdP//JV7SJxahFEmkdh9dmrrWuCp0 20KZE41TY7SdWJaTKOSP58t34EbGlHQCU0wemrUgf08VcPDNj0FgPTu3c2nDNmR4ONXD +UiCeGM6/0+ARDVjrhoMYyq+Z/3dE1x9MC22viGCem/ylm3XU8K8lDTAZm0c1t7Jf5xr im1ZF/Rvedew3SkDLyq8FjLHhFC7uEg3PL1NmaqzugSI7LvmcnaM1uAraYABeIfVzD0I 1kyqrXaTG/8MszOu5I/gQz1HZYt4X5vxFrENgmQ9jFqjH3DpiwRKYHD1KJQc2MugxzcC Odew== MIME-Version: 1.0 Received: by 10.204.8.84 with SMTP id g20mr3128648bkg.126.1346346624858; Thu, 30 Aug 2012 10:10:24 -0700 (PDT) Received: by 10.204.10.141 with HTTP; Thu, 30 Aug 2012 10:10:24 -0700 (PDT) Received: by 10.204.10.141 with HTTP; Thu, 30 Aug 2012 10:10:24 -0700 (PDT) In-Reply-To: <201208301255.42473.jhb@freebsd.org> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <201208271224.20329.jhb@freebsd.org> <503F7B15.6050607@coosemans.org> <201208301255.42473.jhb@freebsd.org> Date: Thu, 30 Aug 2012 18:10:24 +0100 Message-ID: From: Chris Rees To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Tijl Coosemans , freebsd-current@freebsd.org, Doug Barton Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 17:10:27 -0000 On 30 Aug 2012 18:03, "John Baldwin" wrote: > > On Thursday, August 30, 2012 10:39:17 am Tijl Coosemans wrote: > > On 27-08-2012 18:24, John Baldwin wrote: > > > On Sunday, August 26, 2012 4:37:53 pm Doug Barton wrote: > > >> The problem is that we don't really support the idea of things in the > > >> base magically deleting themselves. > > >> > > >> As I have said in previous messages, the bootstrapping problem is being > > >> overblown by several orders of magnitude. For newly installed systems > > >> where pkg is the default, /usr/local/bin/pkg will be installed. So there > > >> is no bootstrapping problem. > > >> > > >> For already-installed systems who wish to switch to pkg, they can > > >> install from /usr/ports, or use the pkg bootstrap tool in the base. > > >> Given that they will be intentionally making this change, and there will > > >> be instructions written up on how to do this which include the > > >> bootstrapping step, once again this is a non-issue. > > >> > > >> The whole idea of having every call to /usr/local/sbin/pkg pass through > > >> /usr/sbin/pkg in order to help a tiny minority of users with a one-time > > >> bootstrapping issue is just plain ludicrous. > > > > > > I agree. Even if we keep /usr/sbin/pkg, we will presumably want to remove > > > it from the base in a year or so via 'make delete-old', etc. Given that, > > > I'm not sure we need it there in the first place. > > > > What if you pkg_delete \* or rm -rf /usr/local? Do you have to "reboot" > > pkg then? > > Yes, if we've decided it (pkgng) should not be part of the base. This > doesn't strike me as that weird. It seems similar to how one has to > bootstrap, say, MacPorts. Difference is, MacPorts isn't the official Mac distribution centre. Leaving out pkg-bootstrap (or whatever) is marginalising ports as a non-integral part of the OS. How useful is base on its own, really? Chris From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 17:34:18 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F12621065673; Thu, 30 Aug 2012 17:34:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id AC1C68FC12; Thu, 30 Aug 2012 17:34:17 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D14C9B91C; Thu, 30 Aug 2012 13:34:16 -0400 (EDT) From: John Baldwin To: Chris Rees Date: Thu, 30 Aug 2012 13:32:57 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <201208301255.42473.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201208301332.58112.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 30 Aug 2012 13:34:16 -0400 (EDT) Cc: Tijl Coosemans , freebsd-current@freebsd.org, Doug Barton Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 17:34:18 -0000 On Thursday, August 30, 2012 1:10:24 pm Chris Rees wrote: > On 30 Aug 2012 18:03, "John Baldwin" wrote: > > > > On Thursday, August 30, 2012 10:39:17 am Tijl Coosemans wrote: > > > On 27-08-2012 18:24, John Baldwin wrote: > > > > On Sunday, August 26, 2012 4:37:53 pm Doug Barton wrote: > > > >> The problem is that we don't really support the idea of things in the > > > >> base magically deleting themselves. > > > >> > > > >> As I have said in previous messages, the bootstrapping problem is being > > > >> overblown by several orders of magnitude. For newly installed systems > > > >> where pkg is the default, /usr/local/bin/pkg will be installed. So there > > > >> is no bootstrapping problem. > > > >> > > > >> For already-installed systems who wish to switch to pkg, they can > > > >> install from /usr/ports, or use the pkg bootstrap tool in the base. > > > >> Given that they will be intentionally making this change, and there will > > > >> be instructions written up on how to do this which include the > > > >> bootstrapping step, once again this is a non-issue. > > > >> > > > >> The whole idea of having every call to /usr/local/sbin/pkg pass through > > > >> /usr/sbin/pkg in order to help a tiny minority of users with a one-time > > > >> bootstrapping issue is just plain ludicrous. > > > > > > > > I agree. Even if we keep /usr/sbin/pkg, we will presumably want to remove > > > > it from the base in a year or so via 'make delete-old', etc. Given that, > > > > I'm not sure we need it there in the first place. > > > > > > What if you pkg_delete \* or rm -rf /usr/local? Do you have to "reboot" > > > pkg then? > > > > Yes, if we've decided it (pkgng) should not be part of the base. This > > doesn't strike me as that weird. It seems similar to how one has to > > bootstrap, say, MacPorts. > > Difference is, MacPorts isn't the official Mac distribution centre. > > Leaving out pkg-bootstrap (or whatever) is marginalising ports as a > non-integral part of the OS. *sigh* I sadly expected an emotional red herring reply such as this. This has nothing to do with "marginalising ports". Prior to this it has been a key argument and point that pkg* should _not_ be tied to the base system as that limits flexibility in the pkg tools. I completely agree with that argument and having /usr/sbin/pkg doesn't appear to be consistent with that. For example, we've already shipped a binary in 9.1 release that has a hardcoded URL of "http://pkgbeta.FreeBSD.org". So now you are stuck keeping that URL around for the next N years, albeit pointing to the production (not-beta) repository. You can't safely reuse pkgbeta.FreeBSD.org for anything until 9.1 is EOL'd. And you'd have to change that before 9.2 and 10.0 if you want to avoid being in the same boat for even longer. That is directly contrary to the goal of having pkg* not being tied to the base. A much more flexible and scalable approach would be for each pkg repository to include a binary/script whatever that you can make available at a URL (which is easily changeable in documentation on our website) that when you run self-extracts and bootstraps pkgng. (The pkg-static stuff is already basically this AFAICT.) If you wish to support existing users of, say, 8.2 or 8.3 release then you need something like this anyway. Also, as a downstream consumer who plans to use a custom pkgng repository on top of a modified FreeBSD distribution, this approach is less failure prone (i.e. if someone runs 'pkg' and it tries to download something from some hardcoded URL that's completely wrong). -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 17:45:53 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1A3C106566C for ; Thu, 30 Aug 2012 17:45:52 +0000 (UTC) (envelope-from coco@executive-computing.de) Received: from mail.moehre.org (mail.moehre.org [195.96.35.7]) by mx1.freebsd.org (Postfix) with ESMTP id A61FE8FC0A for ; Thu, 30 Aug 2012 17:45:52 +0000 (UTC) Received: from mail.moehre.org (unknown [195.96.35.7]) by mail.moehre.org (Postfix) with ESMTP id E88818B143B; Thu, 30 Aug 2012 19:45:44 +0200 (CEST) X-Spam-Flag: NO X-Spam-Score: -100.964 X-Spam-Level: X-Spam-Status: No, score=-100.964 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1, AWL=0.036, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mail.moehre.org ([195.96.35.7]) by mail.moehre.org (mail.moehre.org [195.96.35.7]) (amavisd-new, port 10024) with ESMTP id h8SFmMq5Q-AA; Thu, 30 Aug 2012 19:45:43 +0200 (CEST) Received: from s560x.c0c0.intra (p54B09CAF.dip.t-dialin.net [84.176.156.175]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: coco@executive-computing.de) by mail.moehre.org (Postfix) with ESMTPSA id 22FE98B1420; Thu, 30 Aug 2012 19:45:43 +0200 (CEST) Date: Thu, 30 Aug 2012 19:45:40 +0200 (CEST) From: Marco Steinbach X-X-Sender: coco@s560x.c0c0.intra To: Jakub Lach In-Reply-To: <1346329887307-5739274.post@n5.nabble.com> Message-ID: References: <1346329887307-5739274.post@n5.nabble.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org Subject: Re: UFS journal error on 10.0-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 17:45:53 -0000 On Thu, 30 Aug 2012, Jakub Lach wrote: > If I were you, I would try regular fsck, as here > (9-STABLE) using journal has left me with fs > inconsistencies. Could you elaborate on the inconsistencies you encountered ? MfG CoCo From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 17:58:06 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 682EA106566B; Thu, 30 Aug 2012 17:58:06 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (secure.freebsdsolutions.net [69.55.234.48]) by mx1.freebsd.org (Postfix) with ESMTP id 450F68FC15; Thu, 30 Aug 2012 17:58:05 +0000 (UTC) Received: from [10.10.1.32] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by ns1.jnielsen.net (8.14.4/8.14.4) with ESMTP id q7UHvweD046683 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 30 Aug 2012 13:57:59 -0400 (EDT) (envelope-from lists@jnielsen.net) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: John Nielsen In-Reply-To: Date: Thu, 30 Aug 2012 11:58:05 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20120830141939.GJ64447@ithaqua.etoilebsd.net> <2DA948A5-540A-411F-9D11-120A27AF1EBB@jnielsen.net> To: "ports@freebsd.org" , "current@freebsd.org" X-Mailer: Apple Mail (2.1486) X-DCC-sonic.net-Metrics: ns1.jnielsen.net 1117; Body=2 Fuz1=2 Fuz2=2 X-Virus-Scanned: clamav-milter 0.97.5 at ns1.jnielsen.net X-Virus-Status: Clean Cc: Subject: Re: pkg (aka pkgng) 1.0 released X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 17:58:06 -0000 On Aug 30, 2012, at 10:06 AM, Olivier Smedts wrote: > 2012/8/30 John Nielsen : >> Running ps in another terminal shows "pkg query %n-%v". Since the = actual pkg is now gone, I suspect this is really /usr/sbin/pkg. I = further suspect that it's waiting for y/n input (whether to install the = binary pkg) on its nonexistent stdin somewhere. I killed it (pkg) and = portupgrade seemed to finish normally. >=20 > This is the first example where renaming pkg to pkg-bootstrap would > have been useful. I think this is a bug in portupgrade, but removing /usr/sbin/pkg does = have the side effect of allowing portupgrade to continue (with an empty = pkgdb briefly): Deleting pkg-1.0... done [Updating the pkgdb in /var/db/pkg ... pkg: not found - 0 packages found (-163 +0) nothing to do] ---> Installing the new version via the port ... =3D=3D=3D> Registering installation for pkg-1.0 Installing pkg-1.0... done =3D=3D=3D> Cleaning for pkg-1.0 [Updating the pkgdb in /var/db/pkg ... - 163 packages = found (-0 +163) = ..........................................................................= ..........................100.............................................= .................. done] JN From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 20:38:00 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97C7E1065675 for ; Thu, 30 Aug 2012 20:38:00 +0000 (UTC) (envelope-from jakub_lach@mailplus.pl) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) by mx1.freebsd.org (Postfix) with ESMTP id 753188FC0A for ; Thu, 30 Aug 2012 20:37:59 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1T7BV0-0006eP-Qr for freebsd-current@freebsd.org; Thu, 30 Aug 2012 13:37:58 -0700 Date: Thu, 30 Aug 2012 13:37:58 -0700 (PDT) From: Jakub Lach To: freebsd-current@freebsd.org Message-ID: <1346359078818-5739408.post@n5.nabble.com> In-Reply-To: References: <1346329887307-5739274.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: UFS journal error on 10.0-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 20:38:00 -0000 Yes, if I would answer 'yes' to using journal, there would be unexpected free inodes (?) or something like that in syslog and inconsistencies if full fsck would be performed. Basically if I have answered 'yes' to using journal, fs would always be marked 'clean' regardless of state. -- View this message in context: http://freebsd.1045724.n5.nabble.com/UFS-journal-error-on-10-0-CURRENT-tp5739231p5739408.html Sent from the freebsd-current mailing list archive at Nabble.com. From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 21:19:48 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5BB1106566C; Thu, 30 Aug 2012 21:19:48 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (secure.freebsdsolutions.net [69.55.234.48]) by mx1.freebsd.org (Postfix) with ESMTP id A46B38FC15; Thu, 30 Aug 2012 21:19:48 +0000 (UTC) Received: from [10.10.1.32] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by ns1.jnielsen.net (8.14.4/8.14.4) with ESMTP id q7ULJjpo006536 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 30 Aug 2012 17:19:45 -0400 (EDT) (envelope-from lists@jnielsen.net) From: John Nielsen Content-Type: multipart/mixed; boundary="Apple-Mail=_730A9CF5-445A-45DA-ADDA-BCD1351C8486" Message-Id: Date: Thu, 30 Aug 2012 15:19:59 -0600 To: "ports@freebsd.org" , "current@freebsd.org" Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) X-Mailer: Apple Mail (2.1486) X-DCC-sonic.net-Metrics: ns1.jnielsen.net 1117; Body=2 Fuz1=2 Fuz2=2 X-Virus-Scanned: clamav-milter 0.97.5 at ns1.jnielsen.net X-Virus-Status: Clean Cc: Subject: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 21:19:49 -0000 --Apple-Mail=_730A9CF5-445A-45DA-ADDA-BCD1351C8486 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I today noticed the "pkg autoremove" command for the first time, which = does much the same thing as pkg_cutleaves but relies on the "automatic" = flag in the pkgng database rather than user input to determine which = "leaf" ports can be removed. Unfortunately, the pkg2ng utility has no = way of knowing which old-style packages it converts were installed = automatically as dependencies, so they are all marked as non-automatic = (i.e. user-requested). In my case, this was not true for the majority of = installed ports. Since I really like this functionality, I decided to = update my local package database to match my preferences. Having succeeded, I decided a tool to make doing so easy could well = benefit others (as well as my future self). (Plus I wanted an excuse to = play with dialog(1) and "pkg query" a bit.) So here's the result. I'm = not too attached to the name. It shouldn't eat your package database or = steal your lunch money, but I'm not responsible if it does. Other than = that, feedback is welcome. JN --Apple-Mail=_730A9CF5-445A-45DA-ADDA-BCD1351C8486 Content-Disposition: attachment; filename=set_pkg_auto.sh.txt Content-Type: text/plain; name="set_pkg_auto.sh.txt" Content-Transfer-Encoding: quoted-printable #!/bin/sh # Copyright (c) 2012 John Nielsen # This script presents a checklist of all PKGNG packages registered on # the system, showing for each whether or not it is marked as = "automatic" # (i.e. not explicitly requested by the user). Any changes are recorded # in the PKGNG database. I wrote it to make "pkg autoremove" useful # following a pkg2ng migration, but other uses are conceivable. # The PKGNG database file to use DB=3D/var/db/pkg/local.sqlite # Terminal geometry sz=3D`stty size` rows=3D`echo ${sz} | cut -d ' ' -f 1` cols=3D`echo ${sz} | cut -d ' ' -f 2` drows=3D$(( ${rows} - 3 )) dcols=3D$(( ${cols} - 6 )) # Dialog results are stored here tmpfile=3D`mktemp -t set_pkg_auto` # We always want the same style checklist export DIALOGOPTS=3D"--extra-button --extra-label \"Select All\" = --cancel-label \"Deselect All\" --help-button --help-label Exit = --separator ," # Exit with an error message die() { rm -f ${tmpfile} echo "${1}" exit 1 } # Don't leave tmpfile behind even if we are killed/interrupted trap "die \"Interrupt received.\"" 2 15 # Run dialog to present the checklist and save the results in tmpfile run_dialog() { dialog --checklist "Select packages to consider for = auto-removal" ${drows} ${dcols} ${drows} $* 2>${tmpfile} return $? } # Show the current status from the package database in the checklist select_current() { run_dialog `pkg query '%n %o %a' | sed -e 's/1$/on/g' -e = 's/0$/off/g'` return $? } # Select all packages in the checklist select_all() { run_dialog `pkg query '%n %o' | sed -e 's/$/ on/g'` return $? } # De-select all packages in the checklist select_none() { run_dialog `pkg query '%n %o' | sed -e 's/$/ off/g'` return $? } # Update the package database to match selections in the specified file do_update() { autopkgs=3D`sed -e "s/^,//g" -e "s/\"/'/g" ${1}` sqlite3 ${DB} "update packages set automatic=3D1 where name in = (${autopkgs});" \ || die "SQlite error." sqlite3 ${DB} "update packages set automatic=3D0 where name not = in (${autopkgs});" \ || die "SQlite error." } # Run select_current for the first checklist pkgset=3Dcurrent # Show the checklist until "OK" or "Exit" is selected while : ; do select_${pkgset} case $? in 0) # OK, continue with updates break; ;; 3) # Extra (Select all), show the checklist again pkgset=3Dall ;; 1) # Cancel (Deselect all), show the checklist again pkgset=3Dnone ;; *) # 4-Help (Exit) or ESC or error, exit. die "No changes made." ;; esac done # If we got this far then tmpfile has a list of 'automatic' packages do_update ${tmpfile} # Clean up rm -f ${tmpfile} echo "Updated successfully." --Apple-Mail=_730A9CF5-445A-45DA-ADDA-BCD1351C8486 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_730A9CF5-445A-45DA-ADDA-BCD1351C8486-- From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 21:28:36 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A9EA106566B; Thu, 30 Aug 2012 21:28:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0A73D8FC0C; Thu, 30 Aug 2012 21:28:36 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7ULSZqJ063210; Thu, 30 Aug 2012 21:28:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7ULSZOI063209; Thu, 30 Aug 2012 21:28:35 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Thu, 30 Aug 2012 23:28:33 +0200 From: Baptiste Daroussin To: John Nielsen Message-ID: <20120830212833.GN64447@ithaqua.etoilebsd.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="N/GrjenRD+RJfyz+" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "ports@freebsd.org" , "current@freebsd.org" Subject: Re: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 21:28:36 -0000 --N/GrjenRD+RJfyz+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thank you, Would you mind adding create a patch against the git tree of pkgng so that = we can include your script into the scripts subdirectory, so that we provide y= our script along with the next pkg 1.0.1 as a contributed script? regards, Bapt On Thu, Aug 30, 2012 at 03:19:59PM -0600, John Nielsen wrote: > I today noticed the "pkg autoremove" command for the first time, which do= es much the same thing as pkg_cutleaves but relies on the "automatic" flag = in the pkgng database rather than user input to determine which "leaf" port= s can be removed. Unfortunately, the pkg2ng utility has no way of knowing w= hich old-style packages it converts were installed automatically as depende= ncies, so they are all marked as non-automatic (i.e. user-requested). In my= case, this was not true for the majority of installed ports. Since I reall= y like this functionality, I decided to update my local package database to= match my preferences. >=20 > Having succeeded, I decided a tool to make doing so easy could well benef= it others (as well as my future self). (Plus I wanted an excuse to play wit= h dialog(1) and "pkg query" a bit.) So here's the result. I'm not too attac= hed to the name. It shouldn't eat your package database or steal your lunch= money, but I'm not responsible if it does. Other than that, feedback is we= lcome. >=20 >=20 > JN > #!/bin/sh >=20 > # Copyright (c) 2012 John Nielsen >=20 > # This script presents a checklist of all PKGNG packages registered on > # the system, showing for each whether or not it is marked as "automatic" > # (i.e. not explicitly requested by the user). Any changes are recorded > # in the PKGNG database. I wrote it to make "pkg autoremove" useful > # following a pkg2ng migration, but other uses are conceivable. >=20 > # The PKGNG database file to use > DB=3D/var/db/pkg/local.sqlite >=20 > # Terminal geometry > sz=3D`stty size` > rows=3D`echo ${sz} | cut -d ' ' -f 1` > cols=3D`echo ${sz} | cut -d ' ' -f 2` > drows=3D$(( ${rows} - 3 )) > dcols=3D$(( ${cols} - 6 )) >=20 > # Dialog results are stored here > tmpfile=3D`mktemp -t set_pkg_auto` >=20 > # We always want the same style checklist > export DIALOGOPTS=3D"--extra-button --extra-label \"Select All\" --cancel= -label \"Deselect All\" --help-button --help-label Exit --separator ," >=20 > # Exit with an error message > die() { > rm -f ${tmpfile} > echo "${1}" > exit 1 > } >=20 > # Don't leave tmpfile behind even if we are killed/interrupted > trap "die \"Interrupt received.\"" 2 15 >=20 > # Run dialog to present the checklist and save the results in tmpfile > run_dialog() { > dialog --checklist "Select packages to consider for auto-removal" ${drow= s} ${dcols} ${drows} $* 2>${tmpfile} > return $? > } >=20 > # Show the current status from the package database in the checklist > select_current() { > run_dialog `pkg query '%n %o %a' | sed -e 's/1$/on/g' -e 's/0$/off/g'` > return $? > } >=20 > # Select all packages in the checklist > select_all() { > run_dialog `pkg query '%n %o' | sed -e 's/$/ on/g'` > return $? > } >=20 > # De-select all packages in the checklist > select_none() { > run_dialog `pkg query '%n %o' | sed -e 's/$/ off/g'` > return $? > } >=20 > # Update the package database to match selections in the specified file > do_update() { > autopkgs=3D`sed -e "s/^,//g" -e "s/\"/'/g" ${1}` > sqlite3 ${DB} "update packages set automatic=3D1 where name in (${autopk= gs});" \ > || die "SQlite error." > sqlite3 ${DB} "update packages set automatic=3D0 where name not in (${au= topkgs});" \ > || die "SQlite error." > } >=20 > # Run select_current for the first checklist > pkgset=3Dcurrent >=20 > # Show the checklist until "OK" or "Exit" is selected > while : ; do > select_${pkgset} > case $? in > 0) # OK, continue with updates > break; > ;; > 3) # Extra (Select all), show the checklist again > pkgset=3Dall > ;; > 1) # Cancel (Deselect all), show the checklist again > pkgset=3Dnone > ;; > *) # 4-Help (Exit) or ESC or error, exit. > die "No changes made." > ;; > esac > done >=20 > # If we got this far then tmpfile has a list of 'automatic' packages > do_update ${tmpfile} >=20 > # Clean up > rm -f ${tmpfile} > echo "Updated successfully." >=20 >=20 > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" --N/GrjenRD+RJfyz+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlA/2wEACgkQ8kTtMUmk6ExDPwCfUmDtmvex/QO/hW82E+bIIqc0 nN4An0gA9W9fRW7yq0B33WU+OPEAj3oH =a0Ur -----END PGP SIGNATURE----- --N/GrjenRD+RJfyz+-- From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 21:29:19 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A75D10657A8; Thu, 30 Aug 2012 21:29:19 +0000 (UTC) (envelope-from jlaffaye.freebsd@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id E52348FC15; Thu, 30 Aug 2012 21:29:18 +0000 (UTC) Received: by eaak11 with SMTP id k11so737374eaa.13 for ; Thu, 30 Aug 2012 14:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=qBJXDugzokHAVJR4mFJeyec/m1a4F9B30H6K1T+RNCA=; b=rK2Mu678tcoY0na4wjRhUP3iYLlFB8Ik2BjNZGgFy4KecWWd7spAxozYlA1bCqL5PN xO8f19EgrQy8s3qsQrfPLxfAsn8Mi3mNJ9Ucb4Zrt0nW2UGqTRKlZaoCTfaJknyb1aho 5z2qGyc/gNeDopfU1CGcPzFbu2e9v1icUGeXC/Gh+T7euw7HS9WzHUK3mT3Qr1vYVkQC 54cjCEXPJS2iOadn2bZgLDd0/HUSXHDGkt3yWk4Mb0R4bVjOZ9kbFbPoV6IY8Vi5gDCs ufdLaysWoK//Fw3B3gAU58TPzGxiYWoauRlkYLVWE25KxuLfo2Xw1xt4BKczP0sNqn1i 8Dpg== Received: by 10.14.178.1 with SMTP id e1mr8157114eem.37.1346362157568; Thu, 30 Aug 2012 14:29:17 -0700 (PDT) Received: from ?IPv6:2001:41d0:fc00:100:506:5772:66c4:e456? ([2001:41d0:fc00:100:506:5772:66c4:e456]) by mx.google.com with ESMTPS id h2sm8116400eeo.3.2012.08.30.14.29.16 (version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 14:29:16 -0700 (PDT) Sender: Julien Laffaye Message-ID: <503FDB2A.4000609@freebsd.org> Date: Thu, 30 Aug 2012 23:29:14 +0200 From: Julien Laffaye User-Agent: Thunderbird/7.0.1 MIME-Version: 1.0 To: John Nielsen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "ports@freebsd.org" , "current@freebsd.org" Subject: Re: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 21:29:19 -0000 On 8/30/2012 11:19 PM, John Nielsen wrote: > I today noticed the "pkg autoremove" command for the first time, which does much the same thing as pkg_cutleaves but relies on the "automatic" flag in the pkgng database rather than user input to determine which "leaf" ports can be removed. Unfortunately, the pkg2ng utility has no way of knowing which old-style packages it converts were installed automatically as dependencies, so they are all marked as non-automatic (i.e. user-requested). In my case, this was not true for the majority of installed ports. Since I really like this functionality, I decided to update my local package database to match my preferences. > > Having succeeded, I decided a tool to make doing so easy could well benefit others (as well as my future self). (Plus I wanted an excuse to play with dialog(1) and "pkg query" a bit.) So here's the result. I'm not too attached to the name. It shouldn't eat your package database or steal your lunch money, but I'm not responsible if it does. Other than that, feedback is welcome. > > > JN > You want to use `pkg set -A` :) We make zero promises concerning the SQL schema in pkgng so it can change at every time and break your script. From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 21:32:47 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB6C7106564A; Thu, 30 Aug 2012 21:32:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B36168FC14; Thu, 30 Aug 2012 21:32:47 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7ULWltM064961; Thu, 30 Aug 2012 21:32:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7ULWlml064960; Thu, 30 Aug 2012 21:32:47 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Thu, 30 Aug 2012 23:32:44 +0200 From: Baptiste Daroussin To: Julien Laffaye Message-ID: <20120830213244.GO64447@ithaqua.etoilebsd.net> References: <503FDB2A.4000609@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Vy1A5eXR7jld12ZH" Content-Disposition: inline In-Reply-To: <503FDB2A.4000609@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "ports@freebsd.org" , John Nielsen , "current@freebsd.org" Subject: Re: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 21:32:48 -0000 --Vy1A5eXR7jld12ZH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 30, 2012 at 11:29:14PM +0200, Julien Laffaye wrote: > On 8/30/2012 11:19 PM, John Nielsen wrote: > > I today noticed the "pkg autoremove" command for the first time, which = does much the same thing as pkg_cutleaves but relies on the "automatic" fla= g in the pkgng database rather than user input to determine which "leaf" po= rts can be removed. Unfortunately, the pkg2ng utility has no way of knowing= which old-style packages it converts were installed automatically as depen= dencies, so they are all marked as non-automatic (i.e. user-requested). In = my case, this was not true for the majority of installed ports. Since I rea= lly like this functionality, I decided to update my local package database = to match my preferences. > > > > Having succeeded, I decided a tool to make doing so easy could well ben= efit others (as well as my future self). (Plus I wanted an excuse to play w= ith dialog(1) and "pkg query" a bit.) So here's the result. I'm not too att= ached to the name. It shouldn't eat your package database or steal your lun= ch money, but I'm not responsible if it does. Other than that, feedback is = welcome. > > > > > > JN > > > You want to use `pkg set -A` :) > We make zero promises concerning the SQL schema in pkgng so it can=20 > change at every time and break your script. > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" Oh right I missed the sql part :D --Vy1A5eXR7jld12ZH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlA/2/wACgkQ8kTtMUmk6ExtVQCgmq6NjM3lkQ/kWhwbPgG0pxNs JUAAn2uvATrkgSuL0S+8nomyslcqozEi =KlUz -----END PGP SIGNATURE----- --Vy1A5eXR7jld12ZH-- From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 21:44:16 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A3441065674; Thu, 30 Aug 2012 21:44:16 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (secure.freebsdsolutions.net [69.55.234.48]) by mx1.freebsd.org (Postfix) with ESMTP id EC07F8FC08; Thu, 30 Aug 2012 21:44:15 +0000 (UTC) Received: from [10.10.1.32] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by ns1.jnielsen.net (8.14.4/8.14.4) with ESMTP id q7ULi8rD026294 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 30 Aug 2012 17:44:09 -0400 (EDT) (envelope-from lists@jnielsen.net) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: John Nielsen In-Reply-To: <503FDB2A.4000609@freebsd.org> Date: Thu, 30 Aug 2012 15:44:23 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <503FDB2A.4000609@freebsd.org> To: Julien Laffaye X-Mailer: Apple Mail (2.1486) X-DCC-sonic.net-Metrics: ns1.jnielsen.net 1117; Body=3 Fuz1=3 Fuz2=3 X-Virus-Scanned: clamav-milter 0.97.5 at ns1.jnielsen.net X-Virus-Status: Clean Cc: "ports@freebsd.org" , "current@freebsd.org" Subject: Re: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 21:44:16 -0000 On Aug 30, 2012, at 3:29 PM, Julien Laffaye = wrote: > On 8/30/2012 11:19 PM, John Nielsen wrote: >> I today noticed the "pkg autoremove" command for the first time, = which does much the same thing as pkg_cutleaves but relies on the = "automatic" flag in the pkgng database rather than user input to = determine which "leaf" ports can be removed. Unfortunately, the pkg2ng = utility has no way of knowing which old-style packages it converts were = installed automatically as dependencies, so they are all marked as = non-automatic (i.e. user-requested). In my case, this was not true for = the majority of installed ports. Since I really like this functionality, = I decided to update my local package database to match my preferences. >>=20 >> Having succeeded, I decided a tool to make doing so easy could well = benefit others (as well as my future self). (Plus I wanted an excuse to = play with dialog(1) and "pkg query" a bit.) So here's the result. I'm = not too attached to the name. It shouldn't eat your package database or = steal your lunch money, but I'm not responsible if it does. Other than = that, feedback is welcome. >>=20 > You want to use `pkg set -A` :) > We make zero promises concerning the SQL schema in pkgng so it can = change at every time and break your script. Thanks. I looked for something like that but not hard enough obviously. = I'll change it. After dialog(1) exits the script has a list of packages to mark as = automatic. Is there a non-SQL way to efficiently get the inverse? I.e. = the set { all_packages - new_automatic_package_list } ? JN From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 22:33:02 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 373E41065670; Thu, 30 Aug 2012 22:33:02 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (secure.freebsdsolutions.net [69.55.234.48]) by mx1.freebsd.org (Postfix) with ESMTP id 125DC8FC1B; Thu, 30 Aug 2012 22:33:01 +0000 (UTC) Received: from [10.10.1.32] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by ns1.jnielsen.net (8.14.4/8.14.4) with ESMTP id q7UMWwgO063546 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 30 Aug 2012 18:32:58 -0400 (EDT) (envelope-from lists@jnielsen.net) Content-Type: multipart/mixed; boundary="Apple-Mail=_FDEE990F-D701-45B0-9123-3D66BB606832" Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: John Nielsen In-Reply-To: <20120830212833.GN64447@ithaqua.etoilebsd.net> Date: Thu, 30 Aug 2012 16:33:09 -0600 Message-Id: References: <20120830212833.GN64447@ithaqua.etoilebsd.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.1486) X-DCC-sonic.net-Metrics: ns1.jnielsen.net 1117; Body=3 Fuz1=3 Fuz2=3 X-Virus-Scanned: clamav-milter 0.97.5 at ns1.jnielsen.net X-Virus-Status: Clean Cc: "ports@freebsd.org" , "current@freebsd.org" Subject: Re: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 22:33:02 -0000 --Apple-Mail=_FDEE990F-D701-45B0-9123-3D66BB606832 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Aug 30, 2012, at 3:28 PM, Baptiste Daroussin = wrote: > On Thu, Aug 30, 2012 at 03:19:59PM -0600, John Nielsen wrote: >> I today noticed the "pkg autoremove" command for the first time, = which does much the same thing as pkg_cutleaves but relies on the = "automatic" flag in the pkgng database rather than user input to = determine which "leaf" ports can be removed. Unfortunately, the pkg2ng = utility has no way of knowing which old-style packages it converts were = installed automatically as dependencies, so they are all marked as = non-automatic (i.e. user-requested). In my case, this was not true for = the majority of installed ports. Since I really like this functionality, = I decided to update my local package database to match my preferences. >>=20 >> Having succeeded, I decided a tool to make doing so easy could well = benefit others (as well as my future self). (Plus I wanted an excuse to = play with dialog(1) and "pkg query" a bit.) So here's the result. I'm = not too attached to the name. It shouldn't eat your package database or = steal your lunch money, but I'm not responsible if it does. Other than = that, feedback is welcome. >=20 > Would you mind adding create a patch against the git tree of pkgng so = that we > can include your script into the scripts subdirectory, so that we = provide your > script along with the next pkg 1.0.1 as a contributed script? No problem. Attached is the output of "git diff origin" after dropping = my script in to my local tree. Let me know if you need something else. Changes between this and the version I originally posted: Added 2-clause license and disclaimer Replaced SQL with 'pkg set' commands. Since I didn't come up = with a fast way to list the packages not in the 'automatic' list, I = first set all packages to 0 (not automatic), then set the ones in the = list to 1. This is likely slower than the SQL variant was, but it's not = bad and not something likely to be run frequently. JN --Apple-Mail=_FDEE990F-D701-45B0-9123-3D66BB606832 Content-Disposition: attachment; filename=set_pkg_auto.sh.diff Content-Type: application/octet-stream; name="set_pkg_auto.sh.diff" Content-Transfer-Encoding: 7bit diff --git a/scripts/set_pkg_auto.sh b/scripts/set_pkg_auto.sh new file mode 100755 index 0000000..6342e7a --- /dev/null +++ b/scripts/set_pkg_auto.sh @@ -0,0 +1,116 @@ +#!/bin/sh + +# Copyright (c) 2012 John Nielsen +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer +# in this position and unchanged. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This script presents a checklist of all PKGNG packages registered on +# the system, showing for each whether or not it is marked as "automatic" +# (i.e. not explicitly requested by the user). Any changes are recorded +# via 'pkg set ...'. I wrote it to make "pkg autoremove" useful following +# a pkg2ng migration, but other uses are conceivable. + +# Terminal geometry +sz=`stty size` +rows=`echo ${sz} | cut -d ' ' -f 1` +cols=`echo ${sz} | cut -d ' ' -f 2` +drows=$(( ${rows} - 3 )) +dcols=$(( ${cols} - 6 )) + +# Dialog results are stored here +tmpfile=`mktemp -t set_pkg_auto` + +# We always want the same style checklist +export DIALOGOPTS="--extra-button --extra-label \"Select All\" --cancel-label \"Deselect All\" --help-button --help-label Exit" + +# Exit with an error message +die() { + rm -f ${tmpfile} + echo "${1}" + exit 1 +} + +# Don't leave tmpfile behind even if we are killed/interrupted +trap "die \"Interrupt received.\"" 2 15 + +# Run dialog to present the checklist and save the results in tmpfile +run_dialog() { + dialog --checklist "Select packages to consider for auto-removal" ${drows} ${dcols} ${drows} $* 2>${tmpfile} + return $? +} + +# Show the current status from the package database in the checklist +select_current() { + run_dialog `pkg query '%n %o %a' | sed -e 's/1$/on/g' -e 's/0$/off/g'` + return $? +} + +# Select all packages in the checklist +select_all() { + run_dialog `pkg query '%n %o' | sed -e 's/$/ on/g'` + return $? +} + +# De-select all packages in the checklist +select_none() { + run_dialog `pkg query '%n %o' | sed -e 's/$/ off/g'` + return $? +} + +# Update the package database to match selections in the specified file +do_update() { + autopkgs=`sed -e 's/"//g' ${1}` + # First unset all + pkg set -ay -A 0 + # Then set selected + pkg set -y -A 1 ${autopkgs} +} + +# Run select_current for the first checklist +pkgset=current + +# Show the checklist until "OK" or "Exit" is selected +while : ; do + select_${pkgset} + case $? in + 0) # OK, continue with updates + break; + ;; + 3) # Extra (Select all), show the checklist again + pkgset=all + ;; + 1) # Cancel (Deselect all), show the checklist again + pkgset=none + ;; + *) # 4-Help (Exit) or ESC or error, exit. + die "No changes made." + ;; + esac +done + +# If we got this far then tmpfile has a list of 'automatic' packages +do_update ${tmpfile} + +# Clean up +rm -f ${tmpfile} +echo "Updated successfully." --Apple-Mail=_FDEE990F-D701-45B0-9123-3D66BB606832 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_FDEE990F-D701-45B0-9123-3D66BB606832-- From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 22:40:09 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28177106564A; Thu, 30 Aug 2012 22:40:09 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 074858FC0A; Thu, 30 Aug 2012 22:40:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7UMe8NU072396; Thu, 30 Aug 2012 22:40:08 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7UMe8Ji072395; Thu, 30 Aug 2012 22:40:08 GMT (envelope-from bapt@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@freebsd.org using -f Date: Fri, 31 Aug 2012 00:40:06 +0200 From: Baptiste Daroussin To: John Nielsen Message-ID: <20120830224006.GP64447@ithaqua.etoilebsd.net> References: <20120830212833.GN64447@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="U+NfgObvpQT1Q9Yq" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "ports@freebsd.org" , "current@freebsd.org" Subject: Re: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 22:40:09 -0000 --U+NfgObvpQT1Q9Yq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 30, 2012 at 04:33:09PM -0600, John Nielsen wrote: > On Aug 30, 2012, at 3:28 PM, Baptiste Daroussin wrote: >=20 > > On Thu, Aug 30, 2012 at 03:19:59PM -0600, John Nielsen wrote: > >> I today noticed the "pkg autoremove" command for the first time, which= does much the same thing as pkg_cutleaves but relies on the "automatic" fl= ag in the pkgng database rather than user input to determine which "leaf" p= orts can be removed. Unfortunately, the pkg2ng utility has no way of knowin= g which old-style packages it converts were installed automatically as depe= ndencies, so they are all marked as non-automatic (i.e. user-requested). In= my case, this was not true for the majority of installed ports. Since I re= ally like this functionality, I decided to update my local package database= to match my preferences. > >>=20 > >> Having succeeded, I decided a tool to make doing so easy could well be= nefit others (as well as my future self). (Plus I wanted an excuse to play = with dialog(1) and "pkg query" a bit.) So here's the result. I'm not too at= tached to the name. It shouldn't eat your package database or steal your lu= nch money, but I'm not responsible if it does. Other than that, feedback is= welcome. > >=20 > > Would you mind adding create a patch against the git tree of pkgng so t= hat we > > can include your script into the scripts subdirectory, so that we provi= de your > > script along with the next pkg 1.0.1 as a contributed script? >=20 > No problem. Attached is the output of "git diff origin" after dropping my= script in to my local tree. Let me know if you need something else. >=20 > Changes between this and the version I originally posted: > Added 2-clause license and disclaimer > Replaced SQL with 'pkg set' commands. Since I didn't come up with a fast= way to list the packages not in the 'automatic' list, I first set all pack= ages to 0 (not automatic), then set the ones in the list to 1. This is like= ly slower than the SQL variant was, but it's not bad and not something like= ly to be run frequently. >=20 > JN Thanks you should be enough, can you provide a git format-patch patch so th= at you get your name in the logs :D regards, Bapt --U+NfgObvpQT1Q9Yq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlA/68YACgkQ8kTtMUmk6EyWuwCffRhghFv3v96W743y4YKAiy2k JPoAnjKhvEVYLNDF7fzQAfTux93F1Om/ =bgox -----END PGP SIGNATURE----- --U+NfgObvpQT1Q9Yq-- From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 22:55:14 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0BBA1065686; Thu, 30 Aug 2012 22:55:13 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (secure.freebsdsolutions.net [69.55.234.48]) by mx1.freebsd.org (Postfix) with ESMTP id C08798FC1E; Thu, 30 Aug 2012 22:55:12 +0000 (UTC) Received: from [10.10.1.32] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by ns1.jnielsen.net (8.14.4/8.14.4) with ESMTP id q7UMt9M4081436 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 30 Aug 2012 18:55:10 -0400 (EDT) (envelope-from lists@jnielsen.net) Content-Type: multipart/mixed; boundary="Apple-Mail=_1224E63D-75A8-4607-B659-58DD6F4A6814" Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: John Nielsen In-Reply-To: <20120830224006.GP64447@ithaqua.etoilebsd.net> Date: Thu, 30 Aug 2012 16:55:21 -0600 Message-Id: <93748C09-084C-4B3D-9BDE-B69EFEF14EEA@jnielsen.net> References: <20120830212833.GN64447@ithaqua.etoilebsd.net> <20120830224006.GP64447@ithaqua.etoilebsd.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.1486) X-DCC-sonic.net-Metrics: ns1.jnielsen.net 1117; Body=3 Fuz1=3 Fuz2=3 X-Virus-Scanned: clamav-milter 0.97.5 at ns1.jnielsen.net X-Virus-Status: Clean Cc: "ports@freebsd.org" , "current@freebsd.org" Subject: Re: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 22:55:14 -0000 --Apple-Mail=_1224E63D-75A8-4607-B659-58DD6F4A6814 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Aug 30, 2012, at 4:40 PM, Baptiste Daroussin = wrote: > Thanks you should be enough, can you provide a git format-patch patch = so that > you get your name in the logs :D Here you go. --Apple-Mail=_1224E63D-75A8-4607-B659-58DD6F4A6814 Content-Disposition: attachment; filename=0001-Add-script-to-interactively-set-un-set-automatic-sta.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Add-script-to-interactively-set-un-set-automatic-sta.patch" Content-Transfer-Encoding: quoted-printable =46rom=20d8ac55e449a899431e0e99bce81337247d577ff2=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20John=20Nielsen=20=0ADate:=20= Thu,=2030=20Aug=202012=2016:50:55=20-0600=0ASubject:=20[PATCH]=20Add=20= script=20to=20interactively=20set/un-set=20'automatic'=20status=20of=0A=20= installed=20packages.=0A=0A---=0A=20scripts/set_pkg_auto.sh=20|=20116=20= ++++++++++++++++++++++++++++++++++++++++++++++++=0A=201=20file=20= changed,=20116=20insertions(+)=0A=20create=20mode=20100755=20= scripts/set_pkg_auto.sh=0A=0Adiff=20--git=20a/scripts/set_pkg_auto.sh=20= b/scripts/set_pkg_auto.sh=0Anew=20file=20mode=20100755=0Aindex=20= 0000000..6342e7a=0A---=20/dev/null=0A+++=20b/scripts/set_pkg_auto.sh=0A= @@=20-0,0=20+1,116=20@@=0A+#!/bin/sh=0A+=0A+#=20Copyright=20(c)=202012=20= John=20Nielsen=20=0A+#=20All=20rights=20reserved.=0A= +#=0A+#=20Redistribution=20and=20use=20in=20source=20and=20binary=20= forms,=20with=20or=20without=0A+#=20modification,=20are=20permitted=20= provided=20that=20the=20following=20conditions=0A+#=20are=20met:=0A+#=20= 1.=20Redistributions=20of=20source=20code=20must=20retain=20the=20above=20= copyright=0A+#=20=20=20=20notice,=20this=20list=20of=20conditions=20and=20= the=20following=20disclaimer=0A+#=20=20=20=20in=20this=20position=20and=20= unchanged.=0A+#=202.=20Redistributions=20in=20binary=20form=20must=20= reproduce=20the=20above=20copyright=0A+#=20=20=20=20notice,=20this=20= list=20of=20conditions=20and=20the=20following=20disclaimer=20in=20the=0A= +#=20=20=20=20documentation=20and/or=20other=20materials=20provided=20= with=20the=20distribution.=0A+#=0A+#=20THIS=20SOFTWARE=20IS=20PROVIDED=20= BY=20THE=20AUTHOR(S)=20``AS=20IS''=20AND=20ANY=20EXPRESS=20OR=0A+#=20= IMPLIED=20WARRANTIES,=20INCLUDING,=20BUT=20NOT=20LIMITED=20TO,=20THE=20= IMPLIED=20WARRANTIES=0A+#=20OF=20MERCHANTABILITY=20AND=20FITNESS=20FOR=20= A=20PARTICULAR=20PURPOSE=20ARE=20DISCLAIMED.=0A+#=20IN=20NO=20EVENT=20= SHALL=20THE=20AUTHOR(S)=20BE=20LIABLE=20FOR=20ANY=20DIRECT,=20INDIRECT,=0A= +#=20INCIDENTAL,=20SPECIAL,=20EXEMPLARY,=20OR=20CONSEQUENTIAL=20DAMAGES=20= (INCLUDING,=20BUT=0A+#=20NOT=20LIMITED=20TO,=20PROCUREMENT=20OF=20= SUBSTITUTE=20GOODS=20OR=20SERVICES;=20LOSS=20OF=20USE,=0A+#=20DATA,=20OR=20= PROFITS;=20OR=20BUSINESS=20INTERRUPTION)=20HOWEVER=20CAUSED=20AND=20ON=20= ANY=0A+#=20THEORY=20OF=20LIABILITY,=20WHETHER=20IN=20CONTRACT,=20STRICT=20= LIABILITY,=20OR=20TORT=0A+#=20(INCLUDING=20NEGLIGENCE=20OR=20OTHERWISE)=20= ARISING=20IN=20ANY=20WAY=20OUT=20OF=20THE=20USE=20OF=0A+#=20THIS=20= SOFTWARE,=20EVEN=20IF=20ADVISED=20OF=20THE=20POSSIBILITY=20OF=20SUCH=20= DAMAGE.=0A+=0A+#=20This=20script=20presents=20a=20checklist=20of=20all=20= PKGNG=20packages=20registered=20on=0A+#=20the=20system,=20showing=20for=20= each=20whether=20or=20not=20it=20is=20marked=20as=20"automatic"=0A+#=20= (i.e.=20not=20explicitly=20requested=20by=20the=20user).=20Any=20changes=20= are=20recorded=0A+#=20via=20'pkg=20set=20...'.=20I=20wrote=20it=20to=20= make=20"pkg=20autoremove"=20useful=20following=0A+#=20a=20pkg2ng=20= migration,=20but=20other=20uses=20are=20conceivable.=0A+=0A+#=20Terminal=20= geometry=0A+sz=3D`stty=20size`=0A+rows=3D`echo=20${sz}=20|=20cut=20-d=20= '=20'=20-f=201`=0A+cols=3D`echo=20${sz}=20|=20cut=20-d=20'=20'=20-f=202`=0A= +drows=3D$((=20${rows}=20-=203=20))=0A+dcols=3D$((=20${cols}=20-=206=20= ))=0A+=0A+#=20Dialog=20results=20are=20stored=20here=0A+tmpfile=3D`mktemp=20= -t=20set_pkg_auto`=0A+=0A+#=20We=20always=20want=20the=20same=20style=20= checklist=0A+export=20DIALOGOPTS=3D"--extra-button=20--extra-label=20= \"Select=20All\"=20--cancel-label=20\"Deselect=20All\"=20--help-button=20= --help-label=20Exit"=0A+=0A+#=20Exit=20with=20an=20error=20message=0A= +die()=20{=0A+=09rm=20-f=20${tmpfile}=0A+=09echo=20"${1}"=0A+=09exit=201=0A= +}=0A+=0A+#=20Don't=20leave=20tmpfile=20behind=20even=20if=20we=20are=20= killed/interrupted=0A+trap=20"die=20\"Interrupt=20received.\""=202=2015=0A= +=0A+#=20Run=20dialog=20to=20present=20the=20checklist=20and=20save=20= the=20results=20in=20tmpfile=0A+run_dialog()=20{=0A+=09dialog=20= --checklist=20"Select=20packages=20to=20consider=20for=20auto-removal"=20= ${drows}=20${dcols}=20${drows}=20$*=202>${tmpfile}=0A+=09return=20$?=0A= +}=0A+=0A+#=20Show=20the=20current=20status=20from=20the=20package=20= database=20in=20the=20checklist=0A+select_current()=20{=0A+=09run_dialog=20= `pkg=20query=20'%n=20%o=20%a'=20|=20sed=20-e=20's/1$/on/g'=20-e=20= 's/0$/off/g'`=0A+=09return=20$?=0A+}=0A+=0A+#=20Select=20all=20packages=20= in=20the=20checklist=0A+select_all()=20{=0A+=09run_dialog=20`pkg=20query=20= '%n=20%o'=20|=20sed=20-e=20's/$/=20on/g'`=0A+=09return=20$?=0A+}=0A+=0A= +#=20De-select=20all=20packages=20in=20the=20checklist=0A+select_none()=20= {=0A+=09run_dialog=20`pkg=20query=20'%n=20%o'=20|=20sed=20-e=20's/$/=20= off/g'`=0A+=09return=20$?=0A+}=0A+=0A+#=20Update=20the=20package=20= database=20to=20match=20selections=20in=20the=20specified=20file=0A= +do_update()=20{=0A+=09autopkgs=3D`sed=20-e=20's/"//g'=20${1}`=0A+=09#=20= First=20unset=20all=0A+=09pkg=20set=20-ay=20-A=200=0A+=09#=20Then=20set=20= selected=0A+=09pkg=20set=20-y=20-A=201=20${autopkgs}=0A+}=0A+=0A+#=20Run=20= select_current=20for=20the=20first=20checklist=0A+pkgset=3Dcurrent=0A+=0A= +#=20Show=20the=20checklist=20until=20"OK"=20or=20"Exit"=20is=20selected=0A= +while=20:=20;=20do=0A+=09select_${pkgset}=0A+=09case=20$?=20in=0A+=09=09= 0)=20#=20OK,=20continue=20with=20updates=0A+=09=09=09break;=0A+=09=09=09= ;;=0A+=09=093)=20#=20Extra=20(Select=20all),=20show=20the=20checklist=20= again=0A+=09=09=09pkgset=3Dall=0A+=09=09=09;;=0A+=09=091)=20#=20Cancel=20= (Deselect=20all),=20show=20the=20checklist=20again=0A+=09=09=09= pkgset=3Dnone=0A+=09=09=09;;=0A+=09=09*)=20#=204-Help=20(Exit)=20or=20= ESC=20or=20error,=20exit.=0A+=09=09=09die=20"No=20changes=20made."=0A+=09= =09=09;;=0A+=09esac=0A+done=0A+=0A+#=20If=20we=20got=20this=20far=20then=20= tmpfile=20has=20a=20list=20of=20'automatic'=20packages=0A+do_update=20= ${tmpfile}=0A+=0A+#=20Clean=20up=0A+rm=20-f=20${tmpfile}=0A+echo=20= "Updated=20successfully."=0A--=20=0A1.7.11.3=0A=0A= --Apple-Mail=_1224E63D-75A8-4607-B659-58DD6F4A6814 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_1224E63D-75A8-4607-B659-58DD6F4A6814-- From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 23:02:08 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id CF849106566B; Thu, 30 Aug 2012 23:02:08 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 82D2814DA3F; Thu, 30 Aug 2012 23:02:07 +0000 (UTC) Message-ID: <503FF0EE.2020605@FreeBSD.org> Date: Thu, 30 Aug 2012 13:02:06 -1000 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: John Baldwin References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <201208301255.42473.jhb@freebsd.org> <201208301332.58112.jhb@freebsd.org> In-Reply-To: <201208301332.58112.jhb@freebsd.org> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Tijl Coosemans , freebsd-ports , Chris Rees , freebsd-current@freebsd.org Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 23:02:09 -0000 On 08/30/2012 07:32 AM, John Baldwin wrote: > On Thursday, August 30, 2012 1:10:24 pm Chris Rees wrote: >> On 30 Aug 2012 18:03, "John Baldwin" wrote: >>> >>> On Thursday, August 30, 2012 10:39:17 am Tijl Coosemans wrote: >>>> On 27-08-2012 18:24, John Baldwin wrote: >>>>> On Sunday, August 26, 2012 4:37:53 pm Doug Barton wrote: >>>>>> The problem is that we don't really support the idea of things in the >>>>>> base magically deleting themselves. >>>>>> >>>>>> As I have said in previous messages, the bootstrapping problem is being >>>>>> overblown by several orders of magnitude. For newly installed systems >>>>>> where pkg is the default, /usr/local/bin/pkg will be installed. So there >>>>>> is no bootstrapping problem. >>>>>> >>>>>> For already-installed systems who wish to switch to pkg, they can >>>>>> install from /usr/ports, or use the pkg bootstrap tool in the base. >>>>>> Given that they will be intentionally making this change, and there will >>>>>> be instructions written up on how to do this which include the >>>>>> bootstrapping step, once again this is a non-issue. >>>>>> >>>>>> The whole idea of having every call to /usr/local/sbin/pkg pass through >>>>>> /usr/sbin/pkg in order to help a tiny minority of users with a one-time >>>>>> bootstrapping issue is just plain ludicrous. >>>>> >>>>> I agree. Even if we keep /usr/sbin/pkg, we will presumably want to remove >>>>> it from the base in a year or so via 'make delete-old', etc. Given that, >>>>> I'm not sure we need it there in the first place. >>>> >>>> What if you pkg_delete \* or rm -rf /usr/local? Do you have to "reboot" >>>> pkg then? >>> >>> Yes, if we've decided it (pkgng) should not be part of the base. This >>> doesn't strike me as that weird. It seems similar to how one has to >>> bootstrap, say, MacPorts. >> >> Difference is, MacPorts isn't the official Mac distribution centre. >> >> Leaving out pkg-bootstrap (or whatever) is marginalising ports as a >> non-integral part of the OS. > > *sigh* I sadly expected an emotional red herring reply such as this. > > This has nothing to do with "marginalising ports". Prior to this it has been > a key argument and point that pkg* should _not_ be tied to the base system as > that limits flexibility in the pkg tools. I completely agree with that > argument and having /usr/sbin/pkg doesn't appear to be consistent with that. > > For example, we've already shipped a binary in 9.1 release that has a > hardcoded URL of "http://pkgbeta.FreeBSD.org". So now you are stuck keeping > that URL around for the next N years, albeit pointing to the production > (not-beta) repository. You can't safely reuse pkgbeta.FreeBSD.org for anything > until 9.1 is EOL'd. And you'd have to change that before 9.2 and 10.0 if you > want to avoid being in the same boat for even longer. That is directly contrary > to the goal of having pkg* not being tied to the base. A much more flexible > and scalable approach would be for each pkg repository to include a binary/script > whatever that you can make available at a URL (which is easily changeable in > documentation on our website) that when you run self-extracts and bootstraps > pkgng. (The pkg-static stuff is already basically this AFAICT.) > > If you wish to support existing users of, say, 8.2 or 8.3 release then you need > something like this anyway. Also, as a downstream consumer who plans to use > a custom pkgng repository on top of a modified FreeBSD distribution, this approach > is less failure prone (i.e. if someone runs 'pkg' and it tries to download something > from some hardcoded URL that's completely wrong). I agree with John on all counts here. Further, the idea of a self-installing package, at least for the pkg stuff itself, addresses the issue that someone else brought up about how to handle installation of pkg by the installer for a new system. For example it's pretty common in the Linux world to have a package which is wrapped in a shell script which unpacks the tarball, verifies it with a digital signature, then installs the bits from the tarball where they need to go. Since pkg brings a lot of the pieces of this to the party already, it wouldn't be hard to add the rest. ... and please feel free to insert your favorite version of my "We have to get away from the idea that something is only good/cool/really part of FreeBSD if it's in the base" rant here. :) Doug From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 05:56:56 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 406EC106566B; Fri, 31 Aug 2012 05:56:56 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 98C7F8FC08; Fri, 31 Aug 2012 05:56:55 +0000 (UTC) Received: from seedling.local (host86-182-42-128.range86-182.btcentralplus.com [86.182.42.128]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q7V5unMG076634 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 31 Aug 2012 06:56:51 +0100 (BST) (envelope-from matthew@FreeBSD.org) X-DKIM: OpenDKIM Filter v2.5.2 smtp.infracaninophile.co.uk q7V5unMG076634 Authentication-Results: smtp.infracaninophile.co.uk/q7V5unMG076634; dkim=none (no signature); dkim-adsp=none X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host host86-182-42-128.range86-182.btcentralplus.com [86.182.42.128] claimed to be seedling.local Message-ID: <50405219.8090804@FreeBSD.org> Date: Fri, 31 Aug 2012 06:56:41 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: John Nielsen References: <503FDB2A.4000609@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.4.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig88112785C4A1A92E001C5360" X-Virus-Scanned: clamav-milter 0.97.5 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_RP_RNBL, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC, SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: "ports@freebsd.org" , "current@freebsd.org" , Julien Laffaye Subject: Re: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 05:56:56 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig88112785C4A1A92E001C5360 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 30/08/2012 22:44, John Nielsen wrote: > After dialog(1) exits the script has a list of packages to mark as > automatic. Is there a non-SQL way to efficiently get the inverse? > I.e. the set { all_packages - new_automatic_package_list } ? Use pkg query - it is really quite powerful. This shows all non-autoremove packages as name-version: pkg query -e '%a =3D=3D 0' '%n-%v' and this shows the port origin for all autoremove packages: pkg query -e '%a =3D=3D 1' '%o' Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --------------enig88112785C4A1A92E001C5360 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBAUiAACgkQ8Mjk52CukIwptwCaAjv2e/019kElWA371luGgykg EHoAnjNkATmu883Y1fF6jfwlbgecMbO4 =Pigw -----END PGP SIGNATURE----- --------------enig88112785C4A1A92E001C5360-- From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 07:27:52 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9DDA3106564A; Fri, 31 Aug 2012 07:27:52 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id ED9968FC1D; Fri, 31 Aug 2012 07:27:51 +0000 (UTC) Received: by bkcje9 with SMTP id je9so1378467bkc.13 for ; Fri, 31 Aug 2012 00:27:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=j8OeSalUvyfdM6KMwUBCYeCV0poY6u3bC0vsmRs75Dk=; b=fm13VavEMLgjXMfIUe9B+l0v1Gf/RNaL9luDcmTjPkUCDi3Hf7yPgE4A2wbBGyZlcn h8LwDovyO0CkUHA26bFBvw9zgU+WFja8luVUznrYmVU0UJWL1NyhRCKNkIImlTFvdkcE OhMafZwhi8TSUnPR6am7/iI7girTBlu51COVwk7BO3oIdTtdi9xa+1rLOerK8RHnRYIG X5e7lIT2tvr+XmSVLtYVJ6Tgc5urFnhYBNgBQLtwhlVd13dZPf2Qz7Mfn6mDYPOfh9MJ 8twhwoUdEbk0bZHklxUtZpgWMMyCg7ofn/J6jrLMjmi9Fasut/Y0G7Oyg+13jniuMwhZ 7Hwg== Received: by 10.204.129.23 with SMTP id m23mr3778379bks.28.1346398070628; Fri, 31 Aug 2012 00:27:50 -0700 (PDT) Received: from [192.168.1.80] (BC06D641.dsl.pool.telekom.hu. [188.6.214.65]) by mx.google.com with ESMTPS id 14sm2716794bkw.15.2012.08.31.00.27.49 (version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 00:27:49 -0700 (PDT) Message-ID: <504068F2.6010300@gmail.com> Date: Fri, 31 Aug 2012 09:34:10 +0200 From: deeptech71@gmail.com User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120802 Firefox/14.0.1 SeaMonkey/2.11 MIME-Version: 1.0 To: freebsd-current@FreeBSD.org, jhb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: sys/dev/amr build error with Clang X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 07:27:52 -0000 Hey, Baldie: /usr/src/sys/modules/amr/../../dev/amr/amr.c:970:1: error: function 'amr_periodic' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] amr_periodic(void *data) ^ 1 error generated. *** [amr.o] Error code 1 Stop in /usr/src/sys/modules/amr. From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 07:42:00 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4958106566C for ; Fri, 31 Aug 2012 07:42:00 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7437D8FC08 for ; Fri, 31 Aug 2012 07:41:59 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so4450333pbb.13 for ; Fri, 31 Aug 2012 00:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=1TqU3c2ymSW5iVv9kpbngMI/QbsQrFuzmAj12qt4p6o=; b=TTWC7G4Rd6FqvFIykOMxXz3rpZQ1Ofne2sp06OXtKqKxX1Sby4UlNTPQeancuQdqd1 LyGMsli4/+LDoFqPHkGNJbCSxF1dow0Oq+4dmefDxCai6qMq7wETd12UC8A9Tt75wBKc NuoOWpyG8MiAjtS8AFo/T8DrawEzHCNrBFRAKD8nZQ0MMclX6M1GQxuMkb9dIypqEet6 INA7hq3Cyd9QQQj5ltK4fg9ONf12lHbP5IsLmkbm9zPR0vkqBh5s7t6zDUc3Npiuf/gM gRUu/U9RMjTrP3x2Rv5nI0v4QUSVs2bZ/vTHNlt3GFJ1G/anXfbarPDHwY3CNKbx8z33 mnMA== MIME-Version: 1.0 Received: by 10.66.85.70 with SMTP id f6mr14059270paz.7.1346398919264; Fri, 31 Aug 2012 00:41:59 -0700 (PDT) Sender: r.c.ladan@gmail.com Received: by 10.66.191.10 with HTTP; Fri, 31 Aug 2012 00:41:59 -0700 (PDT) In-Reply-To: <1346359078818-5739408.post@n5.nabble.com> References: <1346329887307-5739274.post@n5.nabble.com> <1346359078818-5739408.post@n5.nabble.com> Date: Fri, 31 Aug 2012 09:41:59 +0200 X-Google-Sender-Auth: iFIzL58o1gpLEeo5Mj7CpOO2vq8 Message-ID: From: =?ISO-8859-1?Q?Ren=E9_Ladan?= To: FreeBSD current Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: UFS journal error on 10.0-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 07:42:00 -0000 2012/8/30 Jakub Lach : > Yes, if I would answer 'yes' to using journal, there would be unexpected > free inodes (?) or something like that in syslog and inconsistencies if f= ull > fsck > would be performed. > That's normally the case, yes, but not here. > Basically if I have answered 'yes' to using journal, fs would always be > marked > 'clean' regardless of state. > I solved it this way, thanks to a tip from Doug White: 1. tunefs -j disable /dev/ada0s1f 2. fsck -y /usr 3 mount /usr ; rm /usr/.sujournal ; umount /usr 4 tunefs -j enable /dev/ada0s1f 5 Step 3 is required because tunefs gets confused when you enable a journal and an (old) journal is already present. Either I should add this somewhere to the Handbook/an article, or fsck(_ufs) should be made more intelligent... Regards, Ren=E9 From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 08:05:45 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0653A1065674 for ; Fri, 31 Aug 2012 08:05:45 +0000 (UTC) (envelope-from bsam@passap.ru) Received: from forward2h.mail.yandex.net (forward2h.mail.yandex.net [IPv6:2a02:6b8:0:f05::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7AD368FC16 for ; Fri, 31 Aug 2012 08:05:44 +0000 (UTC) Received: from smtp4h.mail.yandex.net (smtp4h.mail.yandex.net [84.201.186.21]) by forward2h.mail.yandex.net (Yandex) with ESMTP id 954AF7013EA for ; Fri, 31 Aug 2012 12:05:43 +0400 (MSK) Received: from smtp4h.mail.yandex.net (localhost [127.0.0.1]) by smtp4h.mail.yandex.net (Yandex) with ESMTP id 7180F2C00BF for ; Fri, 31 Aug 2012 12:05:43 +0400 (MSK) Received: from 87.249.28.58.tel.ru (87.249.28.58.tel.ru [87.249.28.58]) by smtp4h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 5gXOtXAo-5hXa4MIi; Fri, 31 Aug 2012 12:05:43 +0400 Message-ID: <50407056.3000606@passap.ru> Date: Fri, 31 Aug 2012 12:05:42 +0400 From: =?UTF-8?B?0JHQvtGA0LjRgSDQodCw0LzQvtGA0L7QtNC+0LI=?= User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: rpcbind does not honor -h flag X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 08:05:45 -0000 Hi All, I've it at 9.1-PRERELEASE and I've got a chance to test at CURRENT. It's the same (mind a line with "udp4 *:768" at sockstat info): ----- % sockstat -4l | grep rpcbind % grep rpcbind /etc/rc.conf.local rpcbind_flags="-h 192.168.119.6" rpcbind_enable="YES" % sudo /etc/rc.d/rpcbind start Starting rpcbind. % sockstat -4l | grep rpcbind root rpcbind 4265 9 udp4 127.0.0.1:111 *:* root rpcbind 4265 10 udp4 192.168.119.6:111 *:* root rpcbind 4265 11 udp4 *:768 *:* root rpcbind 4265 12 tcp4 127.0.0.1:111 *:* root rpcbind 4265 13 tcp4 192.168.119.6:111 *:* % uname -a FreeBSD bsam.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #31 r239793: Wed Aug 29 03:00:30 SAMT 2012 bsam@bsam.wart.ru:/usr/obj/usr/src/sys/BBX i386 ----- -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 08:14:41 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1D106106566C; Fri, 31 Aug 2012 08:14:41 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id BF4A98FC08; Fri, 31 Aug 2012 08:14:40 +0000 (UTC) Received: by obbun3 with SMTP id un3so6529348obb.13 for ; Fri, 31 Aug 2012 01:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=vcomT1PH0iJSeRS+f/VpvVWwjkO0ZETCnamjnIoAf1I=; b=FZVfXnByPnP+OLdU0V9E3oyesGfpp3ZvPkBsbjaHt7pJsv9PfwsyVwSv0uozjVNkjx j5RnZfFR6dqKql/eORDmRjWPXZ9xTsWifqd5P/6zA5Xs9tMmz1EOu206UyAO4HiX6vil x4ZcJG+IfL1jr03LLA2+o9Dil+yxaHiL7Qv/U0RDbC0cIYN4234j0VvRX9jcRMQixQ5w 8vp6ZSzpifFNgjhoVuAsacoG/pg/kRKhb9SGU48sjK1bB30mMEUfWWBeirciiVRhVKQq U0+iz9jvoRSJDwQs60PPJNQviGyOluyoUha5hqRDmOHcTru1lKZNlugTjbdu8QJZCb/C Hv0w== MIME-Version: 1.0 Received: by 10.182.111.39 with SMTP id if7mr6858430obb.56.1346400880205; Fri, 31 Aug 2012 01:14:40 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Fri, 31 Aug 2012 01:14:40 -0700 (PDT) In-Reply-To: <50407056.3000606@passap.ru> References: <50407056.3000606@passap.ru> Date: Fri, 31 Aug 2012 01:14:40 -0700 Message-ID: From: Garrett Cooper To: =?KOI8-R?B?4s/SydMg88HNz9LPxM/X?= Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, "freebsd-rc@FreeBSD.org" Subject: Re: rpcbind does not honor -h flag X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 08:14:41 -0000 On Fri, Aug 31, 2012 at 1:05 AM, =E2=CF=D2=C9=D3 =F3=C1=CD=CF=D2=CF=C4=CF= =D7 wrote: > Hi All, > > I've it at 9.1-PRERELEASE and I've got a chance to test at CURRENT. > It's the same (mind a line with "udp4 *:768" at sockstat info): > ----- > % sockstat -4l | grep rpcbind > > % grep rpcbind /etc/rc.conf.local > rpcbind_flags=3D"-h 192.168.119.6" > rpcbind_enable=3D"YES" > > % sudo /etc/rc.d/rpcbind start > Starting rpcbind. > > % sockstat -4l | grep rpcbind > root rpcbind 4265 9 udp4 127.0.0.1:111 *:* > root rpcbind 4265 10 udp4 192.168.119.6:111 *:* > root rpcbind 4265 11 udp4 *:768 *:* > root rpcbind 4265 12 tcp4 127.0.0.1:111 *:* > root rpcbind 4265 13 tcp4 192.168.119.6:111 *:* > > % uname -a > FreeBSD bsam.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #31 r239793: Wed A= ug > 29 03:00:30 SAMT 2012 bsam@bsam.wart.ru:/usr/obj/usr/src/sys/BBX i38= 6 This is a generic rc(5) bug: $ sudo env rpcbind_flags=3D"-6" /etc/rc.d/rpcbind restart Stopping rpcbind. Waiting for PIDS: 509. Starting rpcbind. $ ps auxww | grep rpcbind root 776 0.6 0.0 14056 1844 ?? Ss 1:07AM 0:00.02 /usr/sbin/rpcbind gcooper 778 0.0 0.0 16196 1660 1 S+ 1:07AM 0:00.00 grep rp= cbind $ sudo env rpcbind_flags=3D"-6" /etc/rc.d/rpcbind restart rc_flags =3D rc_flags =3D Stopping rpcbind. Waiting for PIDS: 801. rc_flags =3D Starting rpcbind. $ sudo env sshd_flags=3D"blahblahblah" /etc/rc.d/sshd restart rc_flags =3D rc_flags =3D Stopping sshd. Waiting for PIDS: 613. rc_flags =3D Starting sshd. $ ps auxww | grep sshd root 861 0.0 0.0 28728 3668 ?? Is 1:11AM 0:00.00 /usr/sbin/sshd root 84730 0.0 0.0 47812 4040 ?? Is Wed09AM 0:00.15 sshd: gcooper [priv] (sshd) gcooper 84732 0.0 0.0 47812 4028 ?? I Wed09AM 0:02.73 sshd: gcooper@pts/0 (sshd) root 88236 0.0 0.0 47812 4040 ?? Is 8:43AM 0:00.16 sshd: gcooper [priv] (sshd) gcooper 88238 0.0 0.0 47812 4028 ?? S 8:43AM 0:02.29 sshd: gcooper@pts/1 (sshd) root 88262 0.0 0.0 47812 4040 ?? Is 8:46AM 0:00.10 sshd: gcooper [priv] (sshd) gcooper 88264 0.0 0.0 47812 4028 ?? S 8:46AM 0:00.80 sshd: gcooper@pts/2 (sshd) gcooper 863 0.0 0.0 16196 1668 1 S+ 1:11AM 0:00.01 grep ss= hd $ uname -a FreeBSD bayonetta.local 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #13 r239292M: Wed Aug 15 02:42:48 PDT 2012 gcooper@bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA amd64 Please file a PR against rc ASAP. Thanks, -Garrett From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 08:22:20 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7450A1065670; Fri, 31 Aug 2012 08:22:20 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 208DA8FC0C; Fri, 31 Aug 2012 08:22:19 +0000 (UTC) Received: by obbun3 with SMTP id un3so6540794obb.13 for ; Fri, 31 Aug 2012 01:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=wCROLM4TPC3VKezzBRrtO4Rk6D/VfDU6qIXtMqw9c5s=; b=nVFn7vdr4WQUMsxeod0AA/Rw2KvBLFnkoL7svEKj+VM+pmpx/Z0o2vO0sh+QmMHKic 9DC3kDGFmWxYPfxCZoINwZjM23ErRzkIGI/2+zMCk5h+8eEV87bhL/P5C65AOd3Vvryc pYSM3hqJrE8SgjOz0+o4zjQhyTxIPtd4MMga/VQ2XtU817EwEyk/79hTLKvWQDc6UXcy fPe3Ficb9V62O2v/srcVKw9qiPejLuMWCjlusySf/3jwKaaxO/U5scAX7lvTBxvFak22 FbiBRhGYmWRgtTYSp2htOMhRsRJLi8r06s0TbI5j2ZLFnfIawQlDRw8cvDwPVI3RY/Xx As8A== MIME-Version: 1.0 Received: by 10.182.222.39 with SMTP id qj7mr7009472obc.16.1346401339478; Fri, 31 Aug 2012 01:22:19 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Fri, 31 Aug 2012 01:22:19 -0700 (PDT) In-Reply-To: References: <50407056.3000606@passap.ru> Date: Fri, 31 Aug 2012 01:22:19 -0700 Message-ID: From: Garrett Cooper To: =?KOI8-R?B?4s/SydMg88HNz9LPxM/X?= Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, "freebsd-rc@FreeBSD.org" Subject: Re: rpcbind does not honor -h flag X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 08:22:20 -0000 On Fri, Aug 31, 2012 at 1:14 AM, Garrett Cooper wrote: > On Fri, Aug 31, 2012 at 1:05 AM, =E2=CF=D2=C9=D3 =F3=C1=CD=CF=D2=CF=C4=CF= =D7 wrote: >> Hi All, >> >> I've it at 9.1-PRERELEASE and I've got a chance to test at CURRENT. >> It's the same (mind a line with "udp4 *:768" at sockstat info): >> ----- >> % sockstat -4l | grep rpcbind >> >> % grep rpcbind /etc/rc.conf.local >> rpcbind_flags=3D"-h 192.168.119.6" >> rpcbind_enable=3D"YES" >> >> % sudo /etc/rc.d/rpcbind start >> Starting rpcbind. >> >> % sockstat -4l | grep rpcbind >> root rpcbind 4265 9 udp4 127.0.0.1:111 *:* >> root rpcbind 4265 10 udp4 192.168.119.6:111 *:* >> root rpcbind 4265 11 udp4 *:768 *:* >> root rpcbind 4265 12 tcp4 127.0.0.1:111 *:* >> root rpcbind 4265 13 tcp4 192.168.119.6:111 *:* >> >> % uname -a >> FreeBSD bsam.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #31 r239793: Wed = Aug >> 29 03:00:30 SAMT 2012 bsam@bsam.wart.ru:/usr/obj/usr/src/sys/BBX i3= 86 > > This is a generic rc(5) bug: ... > Please file a PR against rc ASAP. Grr... that's right. /etc/defaults/rc.conf overwrites anything set in the environment. Please ignore the previous email. And FWIW, rpcbind doesn't in fact bind to specific addresses like you claim= : $ sockstat -4 | grep rpcbind root rpcbind 1060 9 udp4 127.0.0.1:111 *:* root rpcbind 1060 10 udp4 192.168.20.2:111 *:* root rpcbind 1060 11 udp4 *:974 *:* root rpcbind 1060 12 tcp4 127.0.0.1:111 *:* root rpcbind 1060 13 tcp4 192.168.20.2:111 *:* Thanks, -Garrett From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 08:43:01 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F571106564A; Fri, 31 Aug 2012 08:43:01 +0000 (UTC) (envelope-from bsam@passap.ru) Received: from forward2h.mail.yandex.net (forward2h.mail.yandex.net [IPv6:2a02:6b8:0:f05::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0A81A8FC0A; Fri, 31 Aug 2012 08:43:01 +0000 (UTC) Received: from smtp4h.mail.yandex.net (smtp4h.mail.yandex.net [84.201.186.21]) by forward2h.mail.yandex.net (Yandex) with ESMTP id DA7DE702397; Fri, 31 Aug 2012 12:42:59 +0400 (MSK) Received: from smtp4h.mail.yandex.net (localhost [127.0.0.1]) by smtp4h.mail.yandex.net (Yandex) with ESMTP id 6E5922C0066; Fri, 31 Aug 2012 12:42:59 +0400 (MSK) Received: from 87.249.28.58.tel.ru (87.249.28.58.tel.ru [87.249.28.58]) by smtp4h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id gwXmZW9Z-gxXOYPOX; Fri, 31 Aug 2012 12:42:59 +0400 Message-ID: <50407912.60809@passap.ru> Date: Fri, 31 Aug 2012 12:42:58 +0400 From: =?UTF-8?B?0JHQvtGA0LjRgSDQodCw0LzQvtGA0L7QtNC+0LI=?= User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Maxim Konovalov References: <50407056.3000606@passap.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Garrett Cooper , freebsd-current@freebsd.org, "freebsd-rc@FreeBSD.org" Subject: Re: rpcbind does not honor -h flag X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 08:43:01 -0000 31.08.2012 12:34, Maxim Konovalov пишет: >>> Please file a PR against rc ASAP. >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/117711 I see. Thanks. -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 08:43:49 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D150D1065674; Fri, 31 Aug 2012 08:43:49 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8949C8FC19; Fri, 31 Aug 2012 08:43:49 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id B883E5C37; Fri, 31 Aug 2012 10:43:47 +0200 (CEST) Message-ID: <50407947.50907@andric.com> Date: Fri, 31 Aug 2012 10:43:51 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120828 Thunderbird/16.0 MIME-Version: 1.0 To: deeptech71@gmail.com References: <504068F2.6010300@gmail.com> In-Reply-To: <504068F2.6010300@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org Subject: Re: sys/dev/amr build error with Clang X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 08:43:49 -0000 On 2012-08-31 09:34, deeptech71@gmail.com wrote: > /usr/src/sys/modules/amr/../../dev/amr/amr.c:970:1: error: function > 'amr_periodic' is not needed and will not be emitted > [-Werror,-Wunneeded-internal-declaration] The one call to get the callout to amr_periodic() started seems to have been commented out in r239912: http://svnweb.freebsd.org/base/head/sys/dev/amr/amr.c?r1=239912&r2=239911&pathrev=239912 If the function isn't necessary anymore, it could just be deleted, or #ifdef'd out. From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 09:06:48 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52A9C106566C; Fri, 31 Aug 2012 09:06:48 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id A81CB8FC08; Fri, 31 Aug 2012 09:06:47 +0000 (UTC) Received: by bkcje9 with SMTP id je9so1425046bkc.13 for ; Fri, 31 Aug 2012 02:06:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=kcpNM9ym+PNQP3mlZ60GUGgecsH7rc/qY/ic/c24ufk=; b=q1956WUiZkOgBKXhE7gj61yGHvc1D+29pZQNSatB7nBApfEelckoxSG7yWCUAGAb7C FR3m2Cmfm2UwIWzj4KQISGTIHwcPjI5ylk2fu0PMVovwkLstBXw4rarvQsG5wWuLj84R jKOhkCdZUKzBLi6vADn4lL7F1ecbE5ePAFXfazpd/FjsdiDPhYK8y8JuC6wikuR01zZN fn07tq2+bcdfaYYvkAEBm1nqTUHgFHYwkuYHaWT+nfR/dMEj8YNenfnskMsyHjr/bGJB +P+V3rTJ6irJk9WLtGsW21ru4nXL7Xy0+OXMDX0CObBW/NNS2nvwC9n1rZym5VCGrTso 0WDw== Received: by 10.205.129.17 with SMTP id hg17mr3852265bkc.88.1346404000667; Fri, 31 Aug 2012 02:06:40 -0700 (PDT) Received: from [192.168.1.80] (BC06D641.dsl.pool.telekom.hu. [188.6.214.65]) by mx.google.com with ESMTPS id 14sm2909100bkw.15.2012.08.31.02.06.39 (version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 02:06:39 -0700 (PDT) Message-ID: <5040801D.9090305@gmail.com> Date: Fri, 31 Aug 2012 11:13:01 +0200 From: deeptech71@gmail.com User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120802 Firefox/14.0.1 SeaMonkey/2.11 MIME-Version: 1.0 To: Dimitry Andric References: <504068F2.6010300@gmail.com> <50407947.50907@andric.com> In-Reply-To: <50407947.50907@andric.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org Subject: Re: sys/dev/amr build error with Clang X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 09:06:48 -0000 Dimitry Andric wrote: > The one call to get the callout to amr_periodic() started seems to have > been commented out in r239912: > > http://svnweb.freebsd.org/base/head/sys/dev/amr/amr.c?r1=239912&r2=239911&pathrev=239912 > > If the function isn't necessary anymore, it could just be deleted, or > #ifdef'd out. I don't use "amr", so I personally don't care whether the use of the function was accidentally commented out or whether the function was accidentally left unused. But on a side-note, to a programmer not familiar with the driver, that case seems like a case of "the use was accidentally commented out". From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 09:45:00 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFE0C106566C for ; Fri, 31 Aug 2012 09:45:00 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 9ABDC8FC0C for ; Fri, 31 Aug 2012 09:45:00 +0000 (UTC) Received: from [127.0.0.1] (Scott4long@pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.5/8.14.5) with ESMTP id q7V9iq9e073022; Fri, 31 Aug 2012 03:44:52 -0600 (MDT) (envelope-from scottl@samsco.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: Scott Long In-Reply-To: <50407947.50907@andric.com> Date: Fri, 31 Aug 2012 03:44:52 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <414BFBFF-5F7C-45A5-8E0A-FC85FD39E29E@samsco.org> References: <504068F2.6010300@gmail.com> <50407947.50907@andric.com> To: Dimitry Andric X-Mailer: Apple Mail (2.1486) X-Spam-Status: No, score=-50.0 required=3.8 tests=ALL_TRUSTED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on pooker.samsco.org Cc: deeptech71@gmail.com, freebsd-current@freebsd.org Subject: Re: sys/dev/amr build error with Clang X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 09:45:00 -0000 On Aug 31, 2012, at 2:43 AM, Dimitry Andric wrote: > On 2012-08-31 09:34, deeptech71@gmail.com wrote: >> /usr/src/sys/modules/amr/../../dev/amr/amr.c:970:1: error: function >> 'amr_periodic' is not needed and will not be emitted >> [-Werror,-Wunneeded-internal-declaration] >=20 > The one call to get the callout to amr_periodic() started seems to = have > been commented out in r239912: >=20 > = http://svnweb.freebsd.org/base/head/sys/dev/amr/amr.c?r1=3D239912&r2=3D239= 911&pathrev=3D239912 >=20 > If the function isn't necessary anymore, it could just be deleted, or > #ifdef'd out. Fixed in r239939. Thanks for the report. Scott From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 09:47:05 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2930E1065674 for ; Fri, 31 Aug 2012 09:47:05 +0000 (UTC) (envelope-from decke@bluelife.at) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 827F68FC18 for ; Fri, 31 Aug 2012 09:47:04 +0000 (UTC) Received: by weyx56 with SMTP id x56so2007843wey.13 for ; Fri, 31 Aug 2012 02:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bluelife.at; s=google; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Rz4nnMl8n/RjiAfo5x+4RnAK+RiMMvwPSLuf5MiNEIE=; b=gezXsNP/wcUEw59Ixa6++7FT1j1QPZABp3AAXQI3ojdeZMbNEv55layXbwxhJ4RTJU oNgdXOa8WaSB8Yjjb9yu1LwSgbtHX+qIh3aiiW1jxGBX0hcJqLKI2ya7VoSaCsei+Q9B lfvdYsTNpmC3F818cFS893H92f/E0MT4Vz+3s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=Rz4nnMl8n/RjiAfo5x+4RnAK+RiMMvwPSLuf5MiNEIE=; b=E+HGvdxdexeaP9WvvHMx7KWd6eMaty7i7QBST2ikY8uQSeWNsLaDl/WpaQpoMh1pKn rHhQeoO0ZS59c2FT4ACmCkiSRdRSxHyRuvjKyh5wTzt4m4BuDHaKwPmiHEDVUlJrlRmz 4g+Ex8C7u1bMIAogNRRDqqOaMEInxvA/Kny+T1ikxW+VFCIsbh0biHlRSctRJKGOM4Pj JuCYGd2C3jAyPLp7kH6XFdmV7vPL8VPR/Ppne/1HIRIqKVjdYrzpixJMiFg/lw9V+aEH 21yLggn/8F1/2tJltb0FM3dZANkJq5XWBAHfcvh/UXg3COehNExV29SH3IBARbBkBiq8 zi9g== MIME-Version: 1.0 Received: by 10.180.14.8 with SMTP id l8mr3456451wic.6.1346406423470; Fri, 31 Aug 2012 02:47:03 -0700 (PDT) Sender: decke@bluelife.at Received: by 10.180.90.15 with HTTP; Fri, 31 Aug 2012 02:47:03 -0700 (PDT) X-Originating-IP: [80.123.233.199] In-Reply-To: <20120830143426.GM33100@deviant.kiev.zoral.com.ua> References: <20120812132047.GA33526@psconsult.nl> <20120820123142.GY33100@deviant.kiev.zoral.com.ua> <20120830143426.GM33100@deviant.kiev.zoral.com.ua> Date: Fri, 31 Aug 2012 11:47:03 +0200 X-Google-Sender-Auth: JA2sghleFxrhennmbmU9jtf2C0A Message-ID: From: =?ISO-8859-1?Q?Bernhard_Fr=F6hlich?= To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkgwauJO4wsIhGH35gDeBJnhkTu3zN4cXUStAOkywRJkmAk28BOjytXoTtDkjAK0TsoP/j4 Cc: Garrett Cooper , Current FreeBSD , Paul Schenkeveld Subject: Re: make package fails in chroot: tar: getvfsbyname failed: No such file or directory X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 09:47:05 -0000 On Thu, Aug 30, 2012 at 4:34 PM, Konstantin Belousov wrote: > On Thu, Aug 30, 2012 at 04:07:48PM +0200, Bernhard Fr?hlich wrote: >> On Mon, Aug 20, 2012 at 2:31 PM, Konstantin Belousov >> wrote: >> > On Mon, Aug 20, 2012 at 01:42:31PM +0200, Bernhard Fr?hlich wrote: >> >> On Sun, Aug 19, 2012 at 10:01 PM, Tim Kientzle wrote: >> >> > >> >> > On Aug 19, 2012, at 12:17 PM, Garrett Cooper wrote: >> >> > >> >> >> On Sun, Aug 19, 2012 at 9:45 AM, Tim Kientzle wrote: >> >> >>> >> >> >>> On Aug 12, 2012, at 6:20 AM, Paul Schenkeveld wrote: >> >> >>> >> >> >>>> Hi, >> >> >>>> >> >> >>>> I have a wrapper script that builds packages in a chroot environment >> >> >>>> which happily runs on release 6 thru 9 and earlier 10 but fails with: >> >> >>>> >> >> >>>> tar: getvfsbyname failed: No such file or directory >> >> >>>> >> >> >>>> on a recent -CURRENT. >> >> >>> >> >> >>> libarchive does do an initial getvfsbyname() when you ask it >> >> >>> to traverse a directory tree so that it can accurately handle later >> >> >>> requests about mountpoints and filesystem types. This code >> >> >>> is admittedly a little intricate. >> >> >> >> >> >> The problem most likely is the fact that all mountpoints are >> >> >> exposed via chroot, thus, if it's checking to see if a mountpoint >> >> >> exists, it may exist outside of the chroot. >> >> >> >> >> > >> >> > I reviewed the code to refresh my memory. Some >> >> > of what I said before was not quite right. >> >> > >> >> > Libarchive's directory traversal tracks information about >> >> > the filesystem type so that clients such as bsdtar can >> >> > efficiently skip synthetic filesystems (/dev or /proc) or >> >> > network filesystems (NFS or SMB mounts). >> >> > >> >> > The net effect is something like this: >> >> > >> >> > For each file: >> >> > stat() or lstat() or fstat() the file >> >> > look up dev number in an internal cache >> >> > if the dev number is new: >> >> > fstatfs() the open fd to get the FS name >> >> > getvfsbyname() to identify the FS type >> >> > >> >> > Unless there's a logic error in libarchive itself, this >> >> > would suggest that somehow fstatfs() is returning >> >> > a filesystem type that getvfsbyname() can't >> >> > identify. >> >> > >> >> > Paul: >> >> > What filesystem are you using? >> >> > >> >> > What does "mount" show? >> >> > >> >> > Does it work outside the chroot? >> >> >> >> I also see the same on the redports.org build machines. >> >> It builds within a jail there which is completely on a tmpfs. >> >> Interestinly everything is fine with a 10-CURRENT/amd64 >> >> jail but it breaks in a 10-CURRENT/i386 jail. Both are >> >> running on the same 10-CURRENT/amd64 which is >> >> around 2 months old. >> >> >> >> https://redports.org/buildarchive/20120814130205-56327/ >> > >> > Try this. >> >> Is it possible that this requires the host system to be quite >> new? The commit in HEAD seems to doesn't help in my >> case. Host is 9-stable from Jun 27 and jail is 10-current from >> a few days ago. > Doh, the fix was in kernel, and I merged the change back to stable only > on August 27. > > Running HEAD world on stable is not supported anyway. I've updated the host to a recent 9-stable and it works like a charm now. Thanks for fixing it! -- Bernhard Froehlich http://www.bluelife.at/ From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 09:59:13 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A08CF1065686; Fri, 31 Aug 2012 09:59:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7ECB78FC15; Fri, 31 Aug 2012 09:59:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7V9xDXu069828; Fri, 31 Aug 2012 09:59:13 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7V9xCCE069827; Fri, 31 Aug 2012 09:59:12 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Fri, 31 Aug 2012 11:59:10 +0200 From: Baptiste Daroussin To: Doug Barton Message-ID: <20120831095910.GQ64447@ithaqua.etoilebsd.net> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <201208301255.42473.jhb@freebsd.org> <201208301332.58112.jhb@freebsd.org> <503FF0EE.2020605@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vIXBmblrD40XNCy4" Content-Disposition: inline In-Reply-To: <503FF0EE.2020605@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@FreeBSD.org, Chris Rees , Tijl Coosemans , freebsd-ports , John Baldwin Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 09:59:13 -0000 --vIXBmblrD40XNCy4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 30, 2012 at 01:02:06PM -1000, Doug Barton wrote: > On 08/30/2012 07:32 AM, John Baldwin wrote: > > On Thursday, August 30, 2012 1:10:24 pm Chris Rees wrote: > >> On 30 Aug 2012 18:03, "John Baldwin" wrote: > >>> >=20 > I agree with John on all counts here. Further, the idea of a > self-installing package, at least for the pkg stuff itself, addresses > the issue that someone else brought up about how to handle installation > of pkg by the installer for a new system. I like the idea of also providing a self-installing package, and it seems r= eally easy to do, so I'll try to see what I can do in this area I'll wrote a PoC = in 5 minutes which looks pretty good, this could also be a very simple and easy = way to integrate into bsdinstaller. I'll do work in that direction. Still it doesn't solve the problem of boostrapping pkgng in a fresh new box, because the user may not know where to download the pkg-setup.sh. regards, Bapt --vIXBmblrD40XNCy4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBAiu4ACgkQ8kTtMUmk6EyS+wCghpoSNAxJBpjn3DBwQwVStuA1 B4AAoIt+DrucQYpOkGT11xv37IPLxgkC =7tdd -----END PGP SIGNATURE----- --vIXBmblrD40XNCy4-- From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 08:20:59 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3207106564A; Fri, 31 Aug 2012 08:20:59 +0000 (UTC) (envelope-from bsam@passap.ru) Received: from forward1h.mail.yandex.net (forward1h.mail.yandex.net [IPv6:2a02:6b8:0:f05::10]) by mx1.freebsd.org (Postfix) with ESMTP id 5FB4C8FC0C; Fri, 31 Aug 2012 08:20:59 +0000 (UTC) Received: from smtp1h.mail.yandex.net (smtp1h.mail.yandex.net [84.201.187.144]) by forward1h.mail.yandex.net (Yandex) with ESMTP id 4096B9E1D9F; Fri, 31 Aug 2012 12:20:53 +0400 (MSK) Received: from smtp1h.mail.yandex.net (localhost [127.0.0.1]) by smtp1h.mail.yandex.net (Yandex) with ESMTP id B23E41340023; Fri, 31 Aug 2012 12:20:53 +0400 (MSK) Received: from 87.249.28.58.tel.ru (87.249.28.58.tel.ru [87.249.28.58]) by smtp1h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id KqR8Y8IA-KrRO0H1a; Fri, 31 Aug 2012 12:20:53 +0400 Message-ID: <504073E4.1080007@passap.ru> Date: Fri, 31 Aug 2012 12:20:52 +0400 From: =?KOI8-R?Q?=E2=CF=D2=C9=D3_=F3=C1=CD=CF=D2=CF=C4=CF=D7?= User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Garrett Cooper References: <50407056.3000606@passap.ru> In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 31 Aug 2012 10:54:36 +0000 Cc: freebsd-current@freebsd.org, "freebsd-rc@FreeBSD.org" Subject: Re: rpcbind does not honor -h flag X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 08:21:00 -0000 31.08.2012 12:14, Garrett Cooper ÐÉÛÅÔ: > Please file a PR against rc ASAP. Can someone file a PR on the matter? (ENOTIME for me) Thanks! -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 08:34:26 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1519106564A; Fri, 31 Aug 2012 08:34:26 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from mp2.macomnet.net (ipv6.irc.int.ru [IPv6:2a02:28:1:2::1b:2]) by mx1.freebsd.org (Postfix) with ESMTP id 4751E8FC0A; Fri, 31 Aug 2012 08:34:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.14.5/8.14.5) with ESMTP id q7V8YOb7023170; Fri, 31 Aug 2012 12:34:24 +0400 (MSK) (envelope-from maxim.konovalov@gmail.com) Date: Fri, 31 Aug 2012 12:34:24 +0400 (MSK) From: Maxim Konovalov To: Garrett Cooper In-Reply-To: Message-ID: References: <50407056.3000606@passap.ru> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Fri, 31 Aug 2012 10:54:45 +0000 Cc: "freebsd-rc@FreeBSD.org" , freebsd-current@freebsd.org, =?KOI8-R?B?4s/SydMg88HNz9LPxM/X?= Subject: Re: rpcbind does not honor -h flag X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 08:34:27 -0000 > > Please file a PR against rc ASAP. > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/117711 -- Maxim Konovalov From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 11:06:55 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07F081065674; Fri, 31 Aug 2012 11:06:55 +0000 (UTC) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.kpi.ua (comsys.kpi.ua [77.47.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7276C8FC1A; Fri, 31 Aug 2012 11:06:54 +0000 (UTC) Received: from pm513-1.comsys.kpi.ua ([10.18.52.101] helo=pm513-1.comsys.ntu-kpi.kiev.ua) by comsys.kpi.ua with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1T7P3t-00068z-95; Fri, 31 Aug 2012 14:06:53 +0300 Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001) id AAFCE1CC23; Fri, 31 Aug 2012 14:06:53 +0300 (EEST) Date: Fri, 31 Aug 2012 14:06:53 +0300 From: Andrey Simonenko To: Garrett Cooper Message-ID: <20120831110653.GA21089@pm513-1.comsys.ntu-kpi.kiev.ua> References: <503ED6A1.1060902@FreeBSD.org> <20120830092113.GA27015@pm513-1.comsys.ntu-kpi.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Authenticated-User: simon@comsys.ntu-kpi.kiev.ua X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Exim-Version: 4.63 (build at 28-Apr-2011 07:11:12) X-Date: 2012-08-31 14:06:53 X-Connected-IP: 10.18.52.101:21198 X-Message-Linecount: 108 X-Body-Linecount: 91 X-Message-Size: 4634 X-Body-Size: 3806 Cc: Pedro Giffuni , freebsd-current@freebsd.org Subject: Re: [CFT] Some updates to libc/rpc (second try) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 11:06:55 -0000 On Thu, Aug 30, 2012 at 02:37:17AM -0700, Garrett Cooper wrote: > > Detailed description of mistakes in these files and correct implementation: > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/165710 > > A developer at $work (Isilon) developed a slightly simpler patch than > that based on our custom 7.x sources recently to deal with concurrency > issues in netconfig. I'll talk with a couple people to see whether or > not the solution can be contributed back [after some polishing -- > maybe -- and further testing]. Can you post changes and corrected bugs in getnetconfig.c and getnetpath.c in your (your $work) implementation. This is the list of changes and corrected bugs in my implementation: 1. __nc_error() does not check return value from malloc() and can pass NULL pointer to thr_setspecific(). 2. setnetconfig() has a race condition with reference counter when several threads call this function and only one thread successfully opened database file, while other threads failed in this function. If that one thread called endnetconfig(), then it can keep cached data in memory, but all threads will not have opened handles. 3. getnetconfig() should return entries from /etc/netconfig file in the same order as they are specified according to netconfig(5). If several threads call getnetconfig() using different handlers, then entries for each handler will be returned in random order. 4. getnetconfig() has a race condition that can cause NULL pointer dereference when several threads call this function using one handler. 5. getnetconfig() allows to continue to get entries if database file has invalid format, because it does not remember previous state. 6. endnetconfig() has a race condition with reference count and can keep cached data, while all handlers are closed. 7. getnetconfigent() uses getnetconfig() and has the same mistakes, also this function duplicates code from getnetconfig(). 8. getnetconfig() and getnetconfigent() use too much memory for entry data, each entry require ~1 kbytes of memory, while usually only 50 bytes is needed. 9. parse_ncp() incorrectly parses flags in netconfig entry and allows wrong combinations of flags, it does not allow spaces before entry, does not check number of elements in each netconfig entry, does not allow empty lines. 10. nc_sperror() is not optimal. 11. dup_ncp() is not optimal, allocates more memory than was used in the original structure, call strcpy() several times instead of calling memcpy() one time. 12. setnetpath() is not optimal, e.g. it calls setnetconfig() and then calls endnetconfig(). 13. getnetpath() uses getnetconfig() and getnetconfigent() and has the same mistakes. 14. getnetpath() has race conditions when several threads call this function using one handler, as a result there are memory leaks and not synchronized access with modifications to data if the NETPATH environment variable is set. 15. _get_next_token() is too complex, incorrectly understand \-sequences. 16. All functions do not specify error code in all possible cases, so nc_sperror() and nc_perror() functions are useless. Difference between netconfig.c vs getnetconfig.c and getnetpath.c: 1. __nc_error() was corrected, but its implementation is the same, this is a standard implementation for thread-specific data handling. nc_perror() was taken from getnetconfig.c, it cannot be written in other way. 2. Some errors messages were taken from getnetconfig.c. 3. New nc_parse() (old parse_ncp()) was corrected and optimized a bit, it just parses white space separated fields in a string. 4. Some variables and macro variables names were taken from getnetconfig.c. 5. All other functions and data structures were rewritten. Additionally I corrected libc/include/reentrant.h, getnetconfig.3, and getnetpath.3. From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 12:15:10 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B67E1065670 for ; Fri, 31 Aug 2012 12:15:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id BC13A8FC0C for ; Fri, 31 Aug 2012 12:15:07 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B6FBDB91A; Fri, 31 Aug 2012 08:15:06 -0400 (EDT) From: John Baldwin To: deeptech71@gmail.com Date: Fri, 31 Aug 2012 07:57:16 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <504068F2.6010300@gmail.com> <50407947.50907@andric.com> <5040801D.9090305@gmail.com> In-Reply-To: <5040801D.9090305@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208310757.16906.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 31 Aug 2012 08:15:06 -0400 (EDT) Cc: Dimitry Andric , freebsd-current@freebsd.org Subject: Re: sys/dev/amr build error with Clang X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 12:15:10 -0000 On Friday, August 31, 2012 5:13:01 am deeptech71@gmail.com wrote: > Dimitry Andric wrote: > > The one call to get the callout to amr_periodic() started seems to have > > been commented out in r239912: > > > > http://svnweb.freebsd.org/base/head/sys/dev/amr/amr.c?r1=239912&r2=239911&pathrev=239912 > > > > If the function isn't necessary anymore, it could just be deleted, or > > #ifdef'd out. > > I don't use "amr", so I personally don't care whether the use of the function was accidentally commented out or whether the function was accidentally left unused. But on a side-note, to a programmer not familiar with the driver, that case seems like a case of "the use was accidentally commented out". No, read the diff more closely. The call to timeout() to start the timer was already commented out before. That goes back to r65245 (12 years ago). Similar drivers don't use a periodic timer, so it can probably just be removed. The reason for the new Clang warning is that the old timeout(9) API passes the function pointer to untimeout(), whereas callout_stop() just accepts a pointer to the callout structure. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 12:15:10 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7AEF5106566B; Fri, 31 Aug 2012 12:15:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1C25E8FC12; Fri, 31 Aug 2012 12:15:08 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 79A22B91E; Fri, 31 Aug 2012 08:15:07 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Fri, 31 Aug 2012 08:10:50 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> In-Reply-To: <20120831095910.GQ64447@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201208310810.50725.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 31 Aug 2012 08:15:07 -0400 (EDT) Cc: Baptiste Daroussin , Doug Barton , freebsd-ports , Chris Rees , Tijl Coosemans Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 12:15:10 -0000 On Friday, August 31, 2012 5:59:10 am Baptiste Daroussin wrote: > On Thu, Aug 30, 2012 at 01:02:06PM -1000, Doug Barton wrote: > > On 08/30/2012 07:32 AM, John Baldwin wrote: > > > On Thursday, August 30, 2012 1:10:24 pm Chris Rees wrote: > > >> On 30 Aug 2012 18:03, "John Baldwin" wrote: > > >>> > > > > I agree with John on all counts here. Further, the idea of a > > self-installing package, at least for the pkg stuff itself, addresses > > the issue that someone else brought up about how to handle installation > > of pkg by the installer for a new system. > > I like the idea of also providing a self-installing package, and it seems really > easy to do, so I'll try to see what I can do in this area I'll wrote a PoC in 5 > minutes which looks pretty good, this could also be a very simple and easy way > to integrate into bsdinstaller. > > I'll do work in that direction. > > Still it doesn't solve the problem of boostrapping pkgng in a fresh new box, > because the user may not know where to download the pkg-setup.sh. I do think that is something bsdinstall should be able to handle, and I would certainly want bsdinstall to include a dialog that says "do you want to install the package manager?" -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 12:15:10 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B90B51065675; Fri, 31 Aug 2012 12:15:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7379A8FC14; Fri, 31 Aug 2012 12:15:09 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C43BCB91C; Fri, 31 Aug 2012 08:15:08 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Fri, 31 Aug 2012 08:12:09 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <503ED6A1.1060902@FreeBSD.org> <20120831110653.GA21089@pm513-1.comsys.ntu-kpi.kiev.ua> In-Reply-To: <20120831110653.GA21089@pm513-1.comsys.ntu-kpi.kiev.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208310812.09902.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 31 Aug 2012 08:15:08 -0400 (EDT) Cc: Garrett Cooper , Andrey Simonenko , Pedro Giffuni Subject: Re: [CFT] Some updates to libc/rpc (second try) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 12:15:10 -0000 On Friday, August 31, 2012 7:06:53 am Andrey Simonenko wrote: > On Thu, Aug 30, 2012 at 02:37:17AM -0700, Garrett Cooper wrote: > > > Detailed description of mistakes in these files and correct implementation: > > > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/165710 > > > > A developer at $work (Isilon) developed a slightly simpler patch than > > that based on our custom 7.x sources recently to deal with concurrency > > issues in netconfig. I'll talk with a couple people to see whether or > > not the solution can be contributed back [after some polishing -- > > maybe -- and further testing]. > > Can you post changes and corrected bugs in getnetconfig.c and getnetpath.c > in your (your $work) implementation. There is a thread on threads@ with patches to make the API thread-safe that I believe came from Isilon. It was posted in the last week or so, so it should be easy to find in the archives. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 12:22:14 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 635281065676; Fri, 31 Aug 2012 12:22:14 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 27FE78FC12; Fri, 31 Aug 2012 12:22:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7VCMEIS009833; Fri, 31 Aug 2012 12:22:14 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7VCMD1Q009832; Fri, 31 Aug 2012 12:22:13 GMT (envelope-from bapt@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@freebsd.org using -f Date: Fri, 31 Aug 2012 14:22:11 +0200 From: Baptiste Daroussin To: John Baldwin Message-ID: <20120831122211.GS64447@ithaqua.etoilebsd.net> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> <201208310810.50725.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1IOPqZ3f1xe/JZlz" Content-Disposition: inline In-Reply-To: <201208310810.50725.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Tijl Coosemans , freebsd-current@freebsd.org, Chris Rees , freebsd-ports , Doug Barton Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 12:22:14 -0000 --1IOPqZ3f1xe/JZlz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 31, 2012 at 08:10:50AM -0400, John Baldwin wrote: > On Friday, August 31, 2012 5:59:10 am Baptiste Daroussin wrote: > > On Thu, Aug 30, 2012 at 01:02:06PM -1000, Doug Barton wrote: > > > On 08/30/2012 07:32 AM, John Baldwin wrote: > > > > On Thursday, August 30, 2012 1:10:24 pm Chris Rees wrote: > > > >> On 30 Aug 2012 18:03, "John Baldwin" wrote: > > > >>> > > >=20 > > > I agree with John on all counts here. Further, the idea of a > > > self-installing package, at least for the pkg stuff itself, addresses > > > the issue that someone else brought up about how to handle installati= on > > > of pkg by the installer for a new system. > >=20 > > I like the idea of also providing a self-installing package, and it see= ms really > > easy to do, so I'll try to see what I can do in this area I'll wrote a = PoC in 5 > > minutes which looks pretty good, this could also be a very simple and e= asy way > > to integrate into bsdinstaller. > >=20 > > I'll do work in that direction. > >=20 > > Still it doesn't solve the problem of boostrapping pkgng in a fresh new= box, > > because the user may not know where to download the pkg-setup.sh. >=20 > I do think that is something bsdinstall should be able to handle, and I w= ould > certainly want bsdinstall to include a dialog that says "do you want to i= nstall > the package manager?" >=20 > --=20 > John Baldwin > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" Of course this is being worked on by dteske@ on his bsdconfig scripts, so y= es in anycase the bsdinstaller will end up with a boostrap dialog to install pkgn= g. regards, Bapt --1IOPqZ3f1xe/JZlz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBArHMACgkQ8kTtMUmk6EzU+ACgnRWHypxz+r4NE+5u+6vIp+us rmMAn2Gp5rKZHLUjzJemE5FW5auiDJVw =m7rI -----END PGP SIGNATURE----- --1IOPqZ3f1xe/JZlz-- From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 13:37:36 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D9D1106564A; Fri, 31 Aug 2012 13:37:36 +0000 (UTC) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.kpi.ua (comsys.kpi.ua [77.47.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id A715E8FC15; Fri, 31 Aug 2012 13:37:35 +0000 (UTC) Received: from pm513-1.comsys.kpi.ua ([10.18.52.101] helo=pm513-1.comsys.ntu-kpi.kiev.ua) by comsys.kpi.ua with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1T7RPi-0005AQ-7K; Fri, 31 Aug 2012 16:37:34 +0300 Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001) id 8A2C21CC23; Fri, 31 Aug 2012 16:37:34 +0300 (EEST) Date: Fri, 31 Aug 2012 16:37:34 +0300 From: Andrey Simonenko To: John Baldwin Message-ID: <20120831133734.GA45044@pm513-1.comsys.ntu-kpi.kiev.ua> References: <503ED6A1.1060902@FreeBSD.org> <20120831110653.GA21089@pm513-1.comsys.ntu-kpi.kiev.ua> <201208310812.09902.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201208310812.09902.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Authenticated-User: simon@comsys.ntu-kpi.kiev.ua X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Exim-Version: 4.63 (build at 28-Apr-2011 07:11:12) X-Date: 2012-08-31 16:37:34 X-Connected-IP: 10.18.52.101:21219 X-Message-Linecount: 69 X-Body-Linecount: 50 X-Message-Size: 3234 X-Body-Size: 2367 Cc: Garrett Cooper , freebsd-current@freebsd.org, Pedro Giffuni Subject: Re: [CFT] Some updates to libc/rpc (second try) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 13:37:36 -0000 On Fri, Aug 31, 2012 at 08:12:09AM -0400, John Baldwin wrote: > On Friday, August 31, 2012 7:06:53 am Andrey Simonenko wrote: > > On Thu, Aug 30, 2012 at 02:37:17AM -0700, Garrett Cooper wrote: > > > > Detailed description of mistakes in these files and correct > implementation: > > > > > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/165710 > > > > > > A developer at $work (Isilon) developed a slightly simpler patch than > > > that based on our custom 7.x sources recently to deal with concurrency > > > issues in netconfig. I'll talk with a couple people to see whether or > > > not the solution can be contributed back [after some polishing -- > > > maybe -- and further testing]. > > > > Can you post changes and corrected bugs in getnetconfig.c and getnetpath.c > > in your (your $work) implementation. > > There is a thread on threads@ with patches to make the API thread-safe > that I believe came from Isilon. It was posted in the last week or so, > so it should be easy to find in the archives. > Thank you for this information. I checked the logic of their changes. Making all data per-thread is wrong from my point of view. 1. Several threads can call getnetconfig() using the same handler obtained by setnetconfig(). If each thread has own FILE pointer, then some getnetconfig() will crash a program since fgets() will be called for NULL FILE pointer. 2. One thread can get handler by setnetconfig() and pass this handler to another thread and getnetconfig() will crash a program. This is the similar mistake, but getnetconfig() is not called in parallel. 3. Each thread has to open netconfig(5) database, parse its content every time for each getnetconfig() call since data is not cached. This is slow. There is one per-thread value, it is error code of the last failed function, this value cannot be kept in handler, since nc_perror() and nc_sperror() do not have handler argument. Since printing error is expected in the same thread when getnetconfig() failed (for example), I think this is Ok. If error is print in another thread, then we simply will not see correct error message, but program will not be crashed. I just commented only per-thread idea of data in getnetconfig.c, I do not compare my implementation, since their patch does not correct any other mistake described and corrected in my PR. From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 13:41:47 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E452B1065741; Fri, 31 Aug 2012 13:41:47 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id B02A28FC16; Fri, 31 Aug 2012 13:41:46 +0000 (UTC) Received: by bkcje9 with SMTP id je9so1574801bkc.13 for ; Fri, 31 Aug 2012 06:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=STjgYrlL4Ig7osd77HqfVTCiLelNF3+D50pU7PHinso=; b=wjuwFT+3bhSmJCHO3a+WUqoEK8VP8M+xyuzVNd8Aez/T4G2ghtXR/J59XkxcMaF/sc Lx+wucFTx7r4icKycWjyfy1NOHlehH5TzhIh8Y8fgTWw9K++M+of/QXwC9Du30GZmdZH S/XOApc5CAmJlN3VwjXORsqBo9FGtubO7QxH/FE+jvo5U8TW2s0ET0lfjpL8eYMquOzV 6Mfykqsbg7sbc3OYjDKlQFF36kPL8+y94EOXxeOZ+Y882AswXdIx4fRjQ9PD1g6Mj/k7 5BDKnLmcvXSQKES9Zwd+f4ba6koJOssJJH0dxrhf3CwzYv7+3sEYh4slGdxYf0MzIgZG UvSA== Received: by 10.205.118.138 with SMTP id fq10mr4342659bkc.58.1346420505298; Fri, 31 Aug 2012 06:41:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.10.141 with HTTP; Fri, 31 Aug 2012 06:41:13 -0700 (PDT) In-Reply-To: <201208310810.50725.jhb@freebsd.org> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> <201208310810.50725.jhb@freebsd.org> From: Chris Rees Date: Fri, 31 Aug 2012 14:41:13 +0100 Message-ID: To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: Baptiste Daroussin , Doug Barton , Tijl Coosemans , freebsd-ports , freebsd-current Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 13:41:48 -0000 On 31 Aug 2012 13:15, "John Baldwin" wrote: > > On Friday, August 31, 2012 5:59:10 am Baptiste Daroussin wrote: > > On Thu, Aug 30, 2012 at 01:02:06PM -1000, Doug Barton wrote: > > > On 08/30/2012 07:32 AM, John Baldwin wrote: > > > > On Thursday, August 30, 2012 1:10:24 pm Chris Rees wrote: > > > >> On 30 Aug 2012 18:03, "John Baldwin" wrote: > > > >>> > > > > > > I agree with John on all counts here. Further, the idea of a > > > self-installing package, at least for the pkg stuff itself, addresses > > > the issue that someone else brought up about how to handle installation > > > of pkg by the installer for a new system. > > > > I like the idea of also providing a self-installing package, and it seems really > > easy to do, so I'll try to see what I can do in this area I'll wrote a PoC in 5 > > minutes which looks pretty good, this could also be a very simple and easy way > > to integrate into bsdinstaller. > > > > I'll do work in that direction. > > > > Still it doesn't solve the problem of boostrapping pkgng in a fresh new box, > > because the user may not know where to download the pkg-setup.sh. > > I do think that is something bsdinstall should be able to handle, and I would > certainly want bsdinstall to include a dialog that says "do you want to install > the package manager?" Putting aside my previous emotional red herring, this is a great idea; I don't see how it's different from a base binary, but OK. I don't see the need to be prompted-- it's not like the base system doesn't have other larger amounts of software that is useless to many. Can't it just go in? Chris From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 14:46:19 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE5EC106566B; Fri, 31 Aug 2012 14:46:18 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (secure.freebsdsolutions.net [69.55.234.48]) by mx1.freebsd.org (Postfix) with ESMTP id C9CB98FC1F; Fri, 31 Aug 2012 14:46:18 +0000 (UTC) Received: from [10.10.1.32] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by ns1.jnielsen.net (8.14.4/8.14.4) with ESMTP id q7VEkHO4034834 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 31 Aug 2012 10:46:17 -0400 (EDT) (envelope-from lists@jnielsen.net) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: John Nielsen In-Reply-To: <50405219.8090804@FreeBSD.org> Date: Fri, 31 Aug 2012 08:46:19 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <95FAC698-F7DA-4E49-BB20-EBB023ACF1F2@jnielsen.net> References: <503FDB2A.4000609@freebsd.org> <50405219.8090804@FreeBSD.org> To: Matthew Seaman X-Mailer: Apple Mail (2.1486) X-DCC-sonic.net-Metrics: ns1.jnielsen.net 1117; Body=4 Fuz1=4 Fuz2=4 X-Virus-Scanned: clamav-milter 0.97.5 at ns1.jnielsen.net X-Virus-Status: Clean Cc: "ports@freebsd.org" , "current@freebsd.org" , Julien Laffaye Subject: Re: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 14:46:19 -0000 On Aug 30, 2012, at 11:56 PM, Matthew Seaman = wrote: > On 30/08/2012 22:44, John Nielsen wrote: >> After dialog(1) exits the script has a list of packages to mark as >> automatic. Is there a non-SQL way to efficiently get the inverse? >> I.e. the set { all_packages - new_automatic_package_list } ? >=20 > Use pkg query - it is really quite powerful. This shows all > non-autoremove packages as name-version: >=20 > pkg query -e '%a =3D=3D 0' '%n-%v' >=20 > and this shows the port origin for all autoremove packages: >=20 > pkg query -e '%a =3D=3D 1' '%o' Thanks. I know about pkg query (and in fact my script uses something = very much like that to get the initial list of automatic packages). What = I was trying to do was get a list of packages installed but not in = another list. The other list represents _future_ automatic packages but = not necessarily what is in the database now. In any case, I worked around it but first unsetting all packages and = then setting the user-selected list back to automatic. JN From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 15:11:39 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 42BCC1065675; Fri, 31 Aug 2012 15:11:39 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9F7A98FC17; Fri, 31 Aug 2012 15:11:38 +0000 (UTC) Received: by eaak11 with SMTP id k11so995287eaa.13 for ; Fri, 31 Aug 2012 08:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=nIuQFCy7/VxRI7C+KvVTevA1DsUFVYVohFVD5dF3X3A=; b=FV24kH4zTKIp2KJDqakbxF1EWfZ1z54M/pBhpB7aAB8f6nsy9QT0d4pfjhn2nzjpov EmuGZXYo4yFMCKPFrjR5SyXbvZFJKKmNMXE99qTPoLnhsbqmbYcJm6dQK9FBjei0Jn84 XsMZg5DarWXhWDH/fkXHHXXiSVSOXpA7XV0zEZwuQKgK606JerurPdW+5fb06Sa1sFiQ 9y9uywn754GXdC8iX+VUiE79W1fx3ly4iyxnWKlgsyiTBdmA+J6nh1Y7BUerbYpxvi/J FYvsUqmaEdVh7XeLn08HBy7uq0tqVD35rhB1Q++zGLdyXWwYo2lTWvnYyifoic7DP3PV SagA== MIME-Version: 1.0 Received: by 10.14.213.137 with SMTP id a9mr11602309eep.38.1346425897355; Fri, 31 Aug 2012 08:11:37 -0700 (PDT) Received: by 10.14.47.1 with HTTP; Fri, 31 Aug 2012 08:11:37 -0700 (PDT) In-Reply-To: <50407912.60809@passap.ru> References: <50407056.3000606@passap.ru> <50407912.60809@passap.ru> Date: Fri, 31 Aug 2012 10:11:37 -0500 Message-ID: From: Scot Hetzel To: =?KOI8-R?B?4s/SydMg88HNz9LPxM/X?= Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Cc: Garrett Cooper , Maxim Konovalov , "freebsd-rc@FreeBSD.org" , freebsd-current@freebsd.org Subject: Re: rpcbind does not honor -h flag X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 15:11:39 -0000 On Fri, Aug 31, 2012 at 3:42 AM, =E2=CF=D2=C9=D3 =F3=C1=CD=CF=D2=CF=C4=CF= =D7 wrote: > 31.08.2012 12:34, Maxim Konovalov =D0=C9=DB=C5=D4: > >>>> Please file a PR against rc ASAP. >>> >>> >> http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/117711 > > > I see. Thanks. > Looks like Matteo Riondato had created a patch for the problem in 2008: http://people.freebsd.org/~matteo/diff/117711rpcbind.diff but he never received any feedback from Carlos Eduardo Monti to see if the patch fixed the problem. I don't know if the patch will apply to the current FreeBSD rpcbind code, give it a try and submit a follow up to the PR. Scot From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 15:27:17 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B2C9C106564A; Fri, 31 Aug 2012 15:27:17 +0000 (UTC) (envelope-from vmagerya@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8128FC15; Fri, 31 Aug 2012 15:27:17 +0000 (UTC) Received: by vcbgb22 with SMTP id gb22so4418491vcb.13 for ; Fri, 31 Aug 2012 08:27:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5nWSRKzYhrMQ2ICZBWSbx8+9NGZRrDGsdpJVCH59xQs=; b=zWGnY2VyEZsqUTUjZYZP2zKcPu45CjmLnZQgPO5lpxJZyMkbvGGBtKinrDrjI6bPs4 hbMS9vWE7pxkHnlJwSl6i3uIcI9GEbN5WeozX5ledwOTHfaiwfm5pJIrg+zfZvu/UBLO YOIEig0P4waRkLQurNKEPgELaLN0To6SIgl8zrvSJE6KllzU/n+YB8bPHHRbfrk7EpQ6 K5K1CMlntjXSiyKTYx9dG6nxlqYgWK7FetA6BpHDHNNFXY7CAgxgkOjjX+ZzmwYFS1NP 70RwKSTuqpAYsvMO0q4GrF5g+MIUErH0oY68TINVkGvMGFZBrDjjZbmnWd9Ai3OkhH1R /dSQ== MIME-Version: 1.0 Received: by 10.52.26.104 with SMTP id k8mr4957619vdg.79.1346426830231; Fri, 31 Aug 2012 08:27:10 -0700 (PDT) Received: by 10.58.29.226 with HTTP; Fri, 31 Aug 2012 08:27:09 -0700 (PDT) In-Reply-To: References: Date: Fri, 31 Aug 2012 18:27:09 +0300 Message-ID: From: Vitaly Magerya To: Marin Atanasov Nikolov Content-Type: text/plain; charset=UTF-8 Cc: current@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Plugins support in pkgng X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 15:27:17 -0000 Marin Atanasov Nikolov wrote: > This is just to share with you that soon after the official 1.0 > release of pkgng we now have basic plugins support in pkgng's > development branch. > [...] > It's not perfect or covering everything, but it will give you a quick > start though :) How about the ability to add new commands to "pkg"? For example something like "pkg cutleaves" via plugins would be cool. From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 15:37:04 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED974106566B; Fri, 31 Aug 2012 15:37:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from onyx.glenbarber.us (onyx.glenbarber.us [IPv6:2607:fc50:1000:c200::face]) by mx1.freebsd.org (Postfix) with ESMTP id C41538FC15; Fri, 31 Aug 2012 15:37:03 +0000 (UTC) Received: from glenbarber.us (unknown [IPv6:2001:470:8:1205:2:2:0:100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: gjb) by onyx.glenbarber.us (Postfix) with ESMTPSA id A8F7923F645; Fri, 31 Aug 2012 11:37:02 -0400 (EDT) Date: Fri, 31 Aug 2012 11:36:59 -0400 From: Glen Barber To: Vitaly Magerya Message-ID: <20120831153659.GD1523@glenbarber.us> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="so9zsI5B81VjUb/o" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Marin Atanasov Nikolov , current@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Plugins support in pkgng X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 15:37:04 -0000 --so9zsI5B81VjUb/o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 31, 2012 at 06:27:09PM +0300, Vitaly Magerya wrote: > Marin Atanasov Nikolov wrote: > > This is just to share with you that soon after the official 1.0 > > release of pkgng we now have basic plugins support in pkgng's > > development branch. > > [...] > > It's not perfect or covering everything, but it will give you a quick > > start though :) >=20 > How about the ability to add new commands to "pkg"? > For example something like "pkg cutleaves" via plugins would be cool. I think 'pkg autoremove' already does this. Glen --so9zsI5B81VjUb/o Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJQQNobAAoJEFJPDDeguUajwkMH/2JMql/oIFaNsXG/vWrnAIDu /6xIeAM1AhABH9Mrx2370ewIlYFcIX0rdrC7JjbawCVLI7U3CCf/iKpnAiX8PYEL XOMi/6jOc76kc0AOfS+VC2EPszvGcYH1hMD27XMcCSRyMYYjZ+toxB9LYL8mrw2y RCPX5/GbX5wzFHL7OdfXcUCZ49LpbZ7hj7n2pSnbFpuPHItHWhuYWO6ltfjc0QHc fs6NJzRKQFKUPBGNTFOj617chwVEoM8/CKLrvUzCYvKctrGj3XIK94Jh8NqkwoRH ieSQDiD5ZwRHdIsH1c8UVSdhFUnq3qBdJqsbpM+/13wiGfATTrSkibAl3z3hw/I= =moEI -----END PGP SIGNATURE----- --so9zsI5B81VjUb/o-- From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 15:44:39 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BB3C1065676 for ; Fri, 31 Aug 2012 15:44:39 +0000 (UTC) (envelope-from jakub_lach@mailplus.pl) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) by mx1.freebsd.org (Postfix) with ESMTP id EE7C58FC1E for ; Fri, 31 Aug 2012 15:44:38 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1T7TOZ-0005Lb-Nc for freebsd-current@freebsd.org; Fri, 31 Aug 2012 08:44:31 -0700 Date: Fri, 31 Aug 2012 08:44:31 -0700 (PDT) From: Jakub Lach To: freebsd-current@freebsd.org Message-ID: <1346427871725-5739669.post@n5.nabble.com> In-Reply-To: References: <1346329887307-5739274.post@n5.nabble.com> <1346359078818-5739408.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: UFS journal error on 10.0-CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 15:44:39 -0000 > That's normally the case, yes, but not here. Are you saying that if using journal, inconsistencies in 'clean' fs are expected? Basically I'm saying that apparently here journal does nothing after enabling it. Usually after really hard power dip, I need to manually fsck as all symptoms of unclean fs are apparent. Maybe disabling; fsck; removing journal file; and reenabling it could fix it too? Yes, I'm afraid of it... -- View this message in context: http://freebsd.1045724.n5.nabble.com/UFS-journal-error-on-10-0-CURRENT-tp5739231p5739669.html Sent from the freebsd-current mailing list archive at Nabble.com. From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 15:49:10 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CACE5106566C; Fri, 31 Aug 2012 15:49:10 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay004.isp.belgacom.be (mailrelay004.isp.belgacom.be [195.238.6.170]) by mx1.freebsd.org (Postfix) with ESMTP id 7DFE68FC14; Fri, 31 Aug 2012 15:49:09 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABXcQFBbsRDj/2dsb2JhbABFuxiBCIIgAQEFViIBEAsOCgkWDwkDAgECASceBg0BBwEBF4V2ggC8IIsJhwEDjmGBIJVxgmWBXw Received: from 227.16-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.16.227]) by relay.skynet.be with ESMTP; 31 Aug 2012 17:47:58 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q7VFlv6G003321; Fri, 31 Aug 2012 17:47:57 +0200 (CEST) (envelope-from tijl@coosemans.org) Message-ID: <5040DCA6.5090108@coosemans.org> Date: Fri, 31 Aug 2012 17:47:50 +0200 From: Tijl Coosemans User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120804 Thunderbird/14.0 MIME-Version: 1.0 To: Baptiste Daroussin References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> <201208310810.50725.jhb@freebsd.org> <20120831122211.GS64447@ithaqua.etoilebsd.net> In-Reply-To: <20120831122211.GS64447@ithaqua.etoilebsd.net> X-Enigmail-Version: 1.4.2 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigFEFFF7B4BDF62E5864DF01A6" Cc: Chris Rees , freebsd-current@freebsd.org, freebsd-ports , Doug Barton Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 15:49:11 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFEFFF7B4BDF62E5864DF01A6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 31-08-2012 14:22, Baptiste Daroussin wrote: > On Fri, Aug 31, 2012 at 08:10:50AM -0400, John Baldwin wrote: >> On Friday, August 31, 2012 5:59:10 am Baptiste Daroussin wrote: >>> On Thu, Aug 30, 2012 at 01:02:06PM -1000, Doug Barton wrote: >>>> I agree with John on all counts here. Further, the idea of a >>>> self-installing package, at least for the pkg stuff itself, addresse= s >>>> the issue that someone else brought up about how to handle installat= ion >>>> of pkg by the installer for a new system. >>> >>> I like the idea of also providing a self-installing package, and it s= eems really >>> easy to do, so I'll try to see what I can do in this area I'll wrote = a PoC in 5 >>> minutes which looks pretty good, this could also be a very simple and= easy way >>> to integrate into bsdinstaller. >>> >>> I'll do work in that direction. >>> >>> Still it doesn't solve the problem of boostrapping pkgng in a fresh n= ew box, >>> because the user may not know where to download the pkg-setup.sh. >> >> I do think that is something bsdinstall should be able to handle, and = I would >> certainly want bsdinstall to include a dialog that says "do you want t= o install >> the package manager?" >=20 > Of course this is being worked on by dteske@ on his bsdconfig scripts, = so yes in > anycase the bsdinstaller will end up with a boostrap dialog to install = pkgng. =2E..using a mechanism that will be supported for the lifetime of the rel= ease. My concern is that the problem with the pkg tools was never that they wer= e tied to FreeBSD releases. If that were true then you cannot accept the bootstrap solution above because it has exactly the same "problems". The problem in my opinion was simply that the source code lived in src wh= ere ports developers didn't have good access to it. And the solution for that= is to turn pkg development into a third party project and import that into b= ase from time to time. There can also be a port for it so people can use more= recent versions if they want to. That's the situation for several third party tools in base. Given that the ports tree is currently supporting both the old and new pk= g tools I don't think it would be a problem for them to support older versi= ons of pkgng when the time comes, especially since the database used by pkgng= is much more flexible and you can execute any sql query on it. I also suspect that with pkgng's deployment features the temptation to package and deploy base with it are going to be bigger. And if that happe= ns you want to ship a version of pkg on the release media and be able to do package management from the fixit shell. It would also be nice if the installation could fetch the latest security fixes for the release and install the latest packages so you don't have to install a browser with known vulnerabilities, etc. --------------enigFEFFF7B4BDF62E5864DF01A6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iF4EAREIAAYFAlBA3K0ACgkQfoCS2CCgtiv4BQD+ImNOhiGe/G2hGyobhwlOVGc0 6HxdWfAj4qwYTdMP6O8A/Ryeq6mXopUjAe481l3joSmW+dAMWP/TE8V5kap15SSx =0qe4 -----END PGP SIGNATURE----- --------------enigFEFFF7B4BDF62E5864DF01A6-- From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 15:54:02 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0E6B1065676; Fri, 31 Aug 2012 15:54:02 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3B7F88FC18; Fri, 31 Aug 2012 15:54:01 +0000 (UTC) Received: by obbun3 with SMTP id un3so7596522obb.13 for ; Fri, 31 Aug 2012 08:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=SmtYzR09uHJYBFYmKadFx6lNUsarx/y8tizwZ+BhO8o=; b=V5O5826eviEkDwqIDLkdxPpQc3UWCsskNU+LgT/mryigBD3bud24OSGwy05AIDZpcE hOydgPdIwaJINjXpRYjcrcZPOaYQd0acumk35ROsnoI4awouymzX/SRpJz05JSSswdgU Qt4OUlWDI2rlaxsJtHgG1yibxmkdPBtwmQ6rNPkZU3udNGinV8BNvJhc+YReF0vqCjc3 RT1TeJN+FRcU3IfhsC6e2ZQlqeugpkVFZFzpZ3t23PEeP9YTX0qhC2lUiZtHdRrlP/lj u9W9j60NxuUEQiu00H1L5CxIBHKY/t3My/DZW1P1MYRYKCIJ3Sf5XYJvOVTiaB3cY9tu tabg== MIME-Version: 1.0 Received: by 10.182.218.37 with SMTP id pd5mr8401785obc.24.1346428441600; Fri, 31 Aug 2012 08:54:01 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Fri, 31 Aug 2012 08:54:01 -0700 (PDT) In-Reply-To: <5040DCA6.5090108@coosemans.org> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> <201208310810.50725.jhb@freebsd.org> <20120831122211.GS64447@ithaqua.etoilebsd.net> <5040DCA6.5090108@coosemans.org> Date: Fri, 31 Aug 2012 08:54:01 -0700 Message-ID: From: Garrett Cooper To: Tijl Coosemans Content-Type: text/plain; charset=ISO-8859-1 Cc: Baptiste Daroussin , freebsd-current@freebsd.org, freebsd-ports , Chris Rees , Doug Barton Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 15:54:02 -0000 On Fri, Aug 31, 2012 at 8:47 AM, Tijl Coosemans wrote: > On 31-08-2012 14:22, Baptiste Daroussin wrote: >> On Fri, Aug 31, 2012 at 08:10:50AM -0400, John Baldwin wrote: >>> On Friday, August 31, 2012 5:59:10 am Baptiste Daroussin wrote: >>>> On Thu, Aug 30, 2012 at 01:02:06PM -1000, Doug Barton wrote: >>>>> I agree with John on all counts here. Further, the idea of a >>>>> self-installing package, at least for the pkg stuff itself, addresses >>>>> the issue that someone else brought up about how to handle installation >>>>> of pkg by the installer for a new system. >>>> >>>> I like the idea of also providing a self-installing package, and it seems really >>>> easy to do, so I'll try to see what I can do in this area I'll wrote a PoC in 5 >>>> minutes which looks pretty good, this could also be a very simple and easy way >>>> to integrate into bsdinstaller. >>>> >>>> I'll do work in that direction. >>>> >>>> Still it doesn't solve the problem of boostrapping pkgng in a fresh new box, >>>> because the user may not know where to download the pkg-setup.sh. >>> >>> I do think that is something bsdinstall should be able to handle, and I would >>> certainly want bsdinstall to include a dialog that says "do you want to install >>> the package manager?" >> >> Of course this is being worked on by dteske@ on his bsdconfig scripts, so yes in >> anycase the bsdinstaller will end up with a boostrap dialog to install pkgng. > > ...using a mechanism that will be supported for the lifetime of the release. > > My concern is that the problem with the pkg tools was never that they were > tied to FreeBSD releases. If that were true then you cannot accept the > bootstrap solution above because it has exactly the same "problems". > > The problem in my opinion was simply that the source code lived in src where > ports developers didn't have good access to it. And the solution for that is > to turn pkg development into a third party project and import that into base > from time to time. There can also be a port for it so people can use more > recent versions if they want to. That's the situation for several third > party tools in base. > > Given that the ports tree is currently supporting both the old and new pkg > tools I don't think it would be a problem for them to support older versions > of pkgng when the time comes, especially since the database used by pkgng is > much more flexible and you can execute any sql query on it. > > I also suspect that with pkgng's deployment features the temptation to > package and deploy base with it are going to be bigger. And if that happens > you want to ship a version of pkg on the release media and be able to do > package management from the fixit shell. It would also be nice if the > installation could fetch the latest security fixes for the release and > install the latest packages so you don't have to install a browser with > known vulnerabilities, etc. That seems easy to solve with symlinks and/or putting the tarball in the release directory, so that way bsdconfig downloads the copy that lives out in the release directory instead of the latest version in ports. Once development stabilizes a bit more, it might be wise to maintain multiple `release branches` of pkgng so it's possible to maintain the level of compatibility that FreeBSD users typically expect. Thanks, -Garrett From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 15:56:25 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C863D1065676; Fri, 31 Aug 2012 15:56:25 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4016E8FC29; Fri, 31 Aug 2012 15:56:25 +0000 (UTC) Received: by obbun3 with SMTP id un3so7603674obb.13 for ; Fri, 31 Aug 2012 08:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=RxDDctJCjyMaD55Mf0o+zKcqj6a3OOP3qa7T0qZXvpk=; b=hxCHdFAaFacrigc/t4JUGT05kFZl/M8IJd0kFfMa6qhrPtfR+4sbXVxF892VO5mVkp fm/oxSsTubKqilxexuShf9rjOFYyZnYmqgS/Bl7lWZBwdeMEQpSIIebbggxOyAY0ygkw 64/Q9L/le0YzapgomXPhIgMojsDLsXMmQDyVyENjHEDCp+QGdqvzeG93o3tG6RewNO21 gUFcI8YACcnp649pCcsHFIpH0Jh+8ywNXm0xpZ9V2g5mP/ZK4LCxShrZ37gSyQZ4HCHQ HP7aOhM5IgZedmKm67yyyquyzqw4ipj7tkxfyIUvMiKOs/MtUoUgWdjY3pWXyY7WPWrK uqYw== MIME-Version: 1.0 Received: by 10.60.13.232 with SMTP id k8mr8222252oec.81.1346428584702; Fri, 31 Aug 2012 08:56:24 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Fri, 31 Aug 2012 08:56:24 -0700 (PDT) In-Reply-To: <20120831095910.GQ64447@ithaqua.etoilebsd.net> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <201208301255.42473.jhb@freebsd.org> <201208301332.58112.jhb@freebsd.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> Date: Fri, 31 Aug 2012 08:56:24 -0700 Message-ID: From: Garrett Cooper To: Baptiste Daroussin Content-Type: text/plain; charset=ISO-8859-1 Cc: Doug Barton , freebsd-current@freebsd.org, Tijl Coosemans , freebsd-ports , Chris Rees Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 15:56:25 -0000 On Fri, Aug 31, 2012 at 2:59 AM, Baptiste Daroussin wrote: > On Thu, Aug 30, 2012 at 01:02:06PM -1000, Doug Barton wrote: >> On 08/30/2012 07:32 AM, John Baldwin wrote: >> > On Thursday, August 30, 2012 1:10:24 pm Chris Rees wrote: >> >> On 30 Aug 2012 18:03, "John Baldwin" wrote: >> >>> >> >> I agree with John on all counts here. Further, the idea of a >> self-installing package, at least for the pkg stuff itself, addresses >> the issue that someone else brought up about how to handle installation >> of pkg by the installer for a new system. ... > Still it doesn't solve the problem of boostrapping pkgng in a fresh new box, > because the user may not know where to download the pkg-setup.sh. A bit self-referential, but why not do something similar to what I proposed on http://docs.freebsd.org/cgi/getmsg.cgi?fetch=120111+0+current/freebsd-ports ? Thanks, -Garrett From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 16:02:55 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48DC51065674; Fri, 31 Aug 2012 16:02:55 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9DF938FC1B; Fri, 31 Aug 2012 16:02:54 +0000 (UTC) Received: by bkcje9 with SMTP id je9so1661697bkc.13 for ; Fri, 31 Aug 2012 09:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=+0co0ku58fwElUaZ7pKa2aEClJzr8uAAh2EDw8R44O4=; b=xFnz/4L77hJ/v2fslcvwfu+0/Qnb4juxOaZSzpeN03t5VNkHVendIjg8xHcGbFOjr7 45zFzDmwHaNoWCKPkuFrnY6cPWh8U/PfNaHCHPtpY7zrBIWTOQmYQmiFLc9+65z4ZqzU J0c5z/yjrmTibd5Acxdsmtc0XE82m0AxSJkjgayFZhrUsyyv15xQjEpEnbI7FCFFGleU fhsDC/clWpWPIemX5YlUHrdfPh9nW3J/xCxoOglP/nM+zXWUwys5w0T32eEH3lam7nJG pztmS8/NpOP4glKGo0jwtIBa/JfyaXMD04FJdsROVgVJ4xHUQ81K3jO/5T4VDniqTrD/ 2KdA== Received: by 10.205.118.138 with SMTP id fq10mr4636726bkc.58.1346428973391; Fri, 31 Aug 2012 09:02:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.10.141 with HTTP; Fri, 31 Aug 2012 09:02:23 -0700 (PDT) In-Reply-To: <5040DCA6.5090108@coosemans.org> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> <201208310810.50725.jhb@freebsd.org> <20120831122211.GS64447@ithaqua.etoilebsd.net> <5040DCA6.5090108@coosemans.org> From: Chris Rees Date: Fri, 31 Aug 2012 17:02:23 +0100 Message-ID: To: Tijl Coosemans , freebsd-current , FreeBSD Mailing List Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 16:02:55 -0000 On 31 August 2012 16:47, Tijl Coosemans wrote: > On 31-08-2012 14:22, Baptiste Daroussin wrote: >> On Fri, Aug 31, 2012 at 08:10:50AM -0400, John Baldwin wrote: >>> On Friday, August 31, 2012 5:59:10 am Baptiste Daroussin wrote: >>>> On Thu, Aug 30, 2012 at 01:02:06PM -1000, Doug Barton wrote: >>>>> I agree with John on all counts here. Further, the idea of a >>>>> self-installing package, at least for the pkg stuff itself, addresses >>>>> the issue that someone else brought up about how to handle installation >>>>> of pkg by the installer for a new system. >>>> >>>> I like the idea of also providing a self-installing package, and it seems really >>>> easy to do, so I'll try to see what I can do in this area I'll wrote a PoC in 5 >>>> minutes which looks pretty good, this could also be a very simple and easy way >>>> to integrate into bsdinstaller. >>>> >>>> I'll do work in that direction. >>>> >>>> Still it doesn't solve the problem of boostrapping pkgng in a fresh new box, >>>> because the user may not know where to download the pkg-setup.sh. >>> >>> I do think that is something bsdinstall should be able to handle, and I would >>> certainly want bsdinstall to include a dialog that says "do you want to install >>> the package manager?" >> >> Of course this is being worked on by dteske@ on his bsdconfig scripts, so yes in >> anycase the bsdinstaller will end up with a boostrap dialog to install pkgng. > > ...using a mechanism that will be supported for the lifetime of the release. > > My concern is that the problem with the pkg tools was never that they were > tied to FreeBSD releases. If that were true then you cannot accept the > bootstrap solution above because it has exactly the same "problems". > > The problem in my opinion was simply that the source code lived in src where > ports developers didn't have good access to it. And the solution for that is > to turn pkg development into a third party project and import that into base > from time to time. There can also be a port for it so people can use more > recent versions if they want to. That's the situation for several third > party tools in base. > > Given that the ports tree is currently supporting both the old and new pkg > tools I don't think it would be a problem for them to support older versions > of pkgng when the time comes, especially since the database used by pkgng is > much more flexible and you can execute any sql query on it. Absolutely not. This is close to the top reason pkg has been moved to ports-- it should not be in base, because then we're stuck with supporting that version for a very long time. Chris From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 16:03:20 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F178106564A; Fri, 31 Aug 2012 16:03:20 +0000 (UTC) (envelope-from vmagerya@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1B52C8FC1A; Fri, 31 Aug 2012 16:03:19 +0000 (UTC) Received: by vbmv11 with SMTP id v11so4418439vbm.13 for ; Fri, 31 Aug 2012 09:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gmLX+MIEI/rly+3KhRJqsTP3d9/akf1yWHoQn+17EZg=; b=Cbyjdqi5DSRz7JO1bJDwIeV8VbzkM3645fGWeg9jVAG8mlvJyN6FJZ4wkHJI1adaWJ KQmaPwjhY0Y+ihbrSai3pcwrIr/XSCJdYjWbs1hxuCzPP5Lbt4ouEggUJ70vOOk7uUeM 7SLFw60Exrs5gZ/ItUIScV54h2XLKZm1yQeQBBeLuOkeXPcDIyVUVX0z+hFfl3ZVuzGY MzclMeJPWipWNaS6IOhvZXuJPJ2bS5WZUhudCrxjhf4mO/bz+mg/+l+TXJQ7+Bu/gtMQ +cNN+bQhlkNylQPwO55pQ/ROetxgLblxYwGkHCjdAOuKFkxU0dnWSshZwNaNzLJeeJwS mI4w== MIME-Version: 1.0 Received: by 10.220.119.204 with SMTP id a12mr6182886vcr.66.1346428993485; Fri, 31 Aug 2012 09:03:13 -0700 (PDT) Received: by 10.58.29.226 with HTTP; Fri, 31 Aug 2012 09:03:13 -0700 (PDT) In-Reply-To: <20120831153659.GD1523@glenbarber.us> References: <20120831153659.GD1523@glenbarber.us> Date: Fri, 31 Aug 2012 19:03:13 +0300 Message-ID: From: Vitaly Magerya To: Glen Barber Content-Type: text/plain; charset=UTF-8 Cc: Marin Atanasov Nikolov , current@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Plugins support in pkgng X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 16:03:20 -0000 Glen Barber wrote: >> How about the ability to add new commands to "pkg"? >> For example something like "pkg cutleaves" via plugins would be cool. > > I think 'pkg autoremove' already does this. Does autoremove show you all the leaves and ask which ones you want removed? I honestly don't know (and can't test at the moment); I assumed it only removed the ones with "auto" flag on. In any case, what I actually want is a pkg_cleanup alternative (i.e. cutleaves with a dialog(1)-like interface). There are other utilities that could benefit from being a plugin too. For example "suggest" plugin could use hooks on the build server to construct a database of "binary name->package" mapping, and add "pkg suggest" command on the client to query that database (e.g. "pkg suggest ogg123" would suggest you to install "audio/vorbis-tools", which is an idea that has been floating around). From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 16:15:17 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0E49106564A for ; Fri, 31 Aug 2012 16:15:17 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 711558FC0C for ; Fri, 31 Aug 2012 16:15:17 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sweb; b=OeO3/P fQMSkVc8Zwv3GY/XmdNgm9f3DAOiNy7zUZTInElqMOTCwlp3AjWI1BPD0XHRl3Va MmWf8frBWoc9+HKVaZnwhjbGKPWXgYiV3dyU4hv41i3oYmTL9gi9QeQhk9PgskCq nENd/JLInvuwUihigCu4hBEmYnmGCw5BrTi5I= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sweb; bh=2s44avIdRxsY 6r+z0X3O/oMrK4F+tKbYaxHahW+i/io=; b=RonYvtLAhzOqA+QqelT/xnjJ327I Ni/jSOZMj6B10nmfixDzJ2uspRUkoNwWqZK/2g9h5WZYj7WZriCrvv5Nl0sESeoj JkeWtr1Mnh0/DI0t07gDYqpwlEJ4fF/Bv/9nM0cHVkiVggNZEvAyOzO9nBHGZp9w U+6JhA/5DIIaSPU= Received: (qmail 81086 invoked from network); 31 Aug 2012 11:15:08 -0500 Received: from unknown (HELO ?192.168.0.74?) (bryan@shatow.net@74.94.87.209) by sweb.xzibition.com with ESMTPA; 31 Aug 2012 11:15:08 -0500 Message-ID: <5040E31D.8060301@shatow.net> Date: Fri, 31 Aug 2012 11:15:25 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: Vitaly Magerya References: <20120831153659.GD1523@glenbarber.us> In-Reply-To: X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Glen Barber , Marin Atanasov Nikolov , current@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Plugins support in pkgng X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 16:15:17 -0000 On 8/31/2012 11:03 AM, Vitaly Magerya wrote: > Glen Barber wrote: >>> How about the ability to add new commands to "pkg"? >>> For example something like "pkg cutleaves" via plugins would be cool. >> >> I think 'pkg autoremove' already does this. > > Does autoremove show you all the leaves and ask which ones you want > removed? I honestly don't know (and can't test at the moment); I > assumed it only removed the ones with "auto" flag on. In any case, > what I actually want is a pkg_cleanup alternative (i.e. cutleaves with > a dialog(1)-like interface). No, because it already knows which you installed and which were pulled in as dependencies. There's a recent thread on ports@ regarding pkg2ng and marking your imported packages as automatic or not. See "Script to set/unset "automatic" status in PKGNG database" > > There are other utilities that could benefit from being a plugin too. > For example "suggest" plugin could use hooks on the build server to > construct a database of "binary name->package" mapping, and add "pkg > suggest" command on the client to query that database (e.g. "pkg > suggest ogg123" would suggest you to install "audio/vorbis-tools", > which is an idea that has been floating around). Bryan From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 17:55:03 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87840106564A; Fri, 31 Aug 2012 17:55:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 518818FC0A; Fri, 31 Aug 2012 17:55:03 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AE804B93A; Fri, 31 Aug 2012 13:55:02 -0400 (EDT) From: John Baldwin To: Chris Rees Date: Fri, 31 Aug 2012 10:21:50 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <201208310810.50725.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208311021.50490.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 31 Aug 2012 13:55:02 -0400 (EDT) Cc: Baptiste Daroussin , Doug Barton , Tijl Coosemans , freebsd-ports , freebsd-current Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 17:55:03 -0000 On Friday, August 31, 2012 9:41:13 am Chris Rees wrote: > On 31 Aug 2012 13:15, "John Baldwin" wrote: > > > > On Friday, August 31, 2012 5:59:10 am Baptiste Daroussin wrote: > > > On Thu, Aug 30, 2012 at 01:02:06PM -1000, Doug Barton wrote: > > > > On 08/30/2012 07:32 AM, John Baldwin wrote: > > > > > On Thursday, August 30, 2012 1:10:24 pm Chris Rees wrote: > > > > >> On 30 Aug 2012 18:03, "John Baldwin" wrote: > > > > >>> > > > > > > > > I agree with John on all counts here. Further, the idea of a > > > > self-installing package, at least for the pkg stuff itself, addresses > > > > the issue that someone else brought up about how to handle installation > > > > of pkg by the installer for a new system. > > > > > > I like the idea of also providing a self-installing package, and it seems really > > > easy to do, so I'll try to see what I can do in this area I'll wrote a PoC in 5 > > > minutes which looks pretty good, this could also be a very simple and easy way > > > to integrate into bsdinstaller. > > > > > > I'll do work in that direction. > > > > > > Still it doesn't solve the problem of boostrapping pkgng in a fresh new box, > > > because the user may not know where to download the pkg-setup.sh. > > > > I do think that is something bsdinstall should be able to handle, and I would > > certainly want bsdinstall to include a dialog that says "do you want to install > > the package manager?" > > Putting aside my previous emotional red herring, this is a great idea; > I don't see how it's different from a base binary, but OK. > > I don't see the need to be prompted-- it's not like the base system > doesn't have other larger amounts of software that is useless to many. > Can't it just go in? We could also do that. I had imagined something similar to sysinstall's "Do you want to browse the packages collection and install packages" dialog and that choosing yes to that in bsdinstall/bsdconfig would bootstrap pkgng when you say yes to that. However, I'm not opposed to just installing pkgng by default. -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 18:11:14 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B5BE10656D7 for ; Fri, 31 Aug 2012 18:11:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 468448FC1F for ; Fri, 31 Aug 2012 18:11:14 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AA292B941 for ; Fri, 31 Aug 2012 14:11:13 -0400 (EDT) From: John Baldwin To: current@freebsd.org Date: Fri, 31 Aug 2012 14:11:09 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201208311411.09596.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 31 Aug 2012 14:11:13 -0400 (EDT) Cc: Subject: [PATCH] Add locking to aha(4) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 18:11:14 -0000 I have patches to add locking to aha(4) and mark it MPSAFE. The patches are from HEAD but should apply to 8 or 9. If you test it on 8 or 9 please enable INVARIANTS for at least the initial testing. Thanks. http://www.FreeBSD.org/~jhb/patches/aha_locking.patch -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 22:21:55 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08EAA106566B; Fri, 31 Aug 2012 22:21:55 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id A05848FC19; Fri, 31 Aug 2012 22:21:54 +0000 (UTC) Received: by obbun3 with SMTP id un3so8436948obb.13 for ; Fri, 31 Aug 2012 15:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=AnaRzjaaPY/rFgU3Z6mSOsl7ZIm+bhntzXNAB1JQdKs=; b=A/g4/0uhwmtiuofjKozJQ1mSha3JLevUZOMKwLvYcXTZT0uafBfDzEVIo7NqnYKEfl zhmK1QuRY4C3P77ezXhqLS8NbZege21YwuIqq14uRoEasfXyNkFyhhLmjcXCuS3y8P88 NtCEKgiiC+D0fV0D9uAUyXEVWqDWJo80I8J/jt1rtiauHjjgp7Didl4tdr01vkYonKH3 2jov7YPXAa3546BSzeY5dOb8Occ41pZNR+Xs4KlpR7xwMeteJBy2cMPOp35i833fy1J+ u37e0yvsOT65M9ab4PDKqttcmwO3eidKee+oF64mxHYNL6M4C1saiDqG9s5pUhRNQA0Q eq4A== MIME-Version: 1.0 Received: by 10.60.11.136 with SMTP id q8mr8982330oeb.132.1346451713969; Fri, 31 Aug 2012 15:21:53 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.182.208.70 with HTTP; Fri, 31 Aug 2012 15:21:53 -0700 (PDT) In-Reply-To: References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <20120824081543.GB2998@ithaqua.etoilebsd.net> <50380269.6020003@FreeBSD.org> <20120825000148.GF37867@ithaqua.etoilebsd.net> <50396113.3080607@cyberleo.net> <20120826122649.GA8995@stack.nl> <20120826125846.GD37534@ithaqua.etoilebsd.net> <503A6D4B.9070606@FreeBSD.org> <20120826185810.GB42842@ithaqua.etoilebsd.net> <1346008112.1140.76.camel@revolution.hippie.lan> <503A8C17.8050006@FreeBSD.org> Date: Fri, 31 Aug 2012 15:21:53 -0700 X-Google-Sender-Auth: EyC9w91KmeD6OFOGZxt0HkVSLyo Message-ID: From: Craig Rodrigues To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: ports@freebsd.org, current@freebsd.org Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 22:21:55 -0000 Hi, I think the details of the patch would need to be worked out a bit, but I think you are on the right track. I think it would be nice to: (1) Have deprecation warnings in the legacy pkg_* tools. If someone types "pkg_add", maybe warn them that it is deprecated, and they should read UPDATING and type "pkg help add". (2) If $PKG_DBDIR/local.sqlite exists (usually /var/db/pkgs/local.sqlite), and someone types a legacy pkg_* command, then error out and warn them to use the new "pkg " equivalent. When I was playing with pkgng, I ran into some confusion when I typed the old commands after I had migrated my package database to the new system, so I have seen how this can be confusing for first-time users. Any *sensible* anti-foot shooting measures and useful diagnostics/warnings that we can put into the tools would help a lot. -- Craig Rodrigues rodrigc@crodrigues.org On Sun, Aug 26, 2012 at 4:09 PM, Garrett Cooper wrote: > > Rather than providing a solution for that problem because that's a > bigger architectural issue (and not my job to solve), I offer this patch I > quickly hacked up instead as my 2 cents for the discussion on how to make > users aware that pkg_install is dying/dead, as this is one case that needs > to be better handled. > Thanks, > -Garrett > > From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 23:13:00 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 627AB106566B for ; Fri, 31 Aug 2012 23:13:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 175BA8FC1F for ; Fri, 31 Aug 2012 23:13:00 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 9FF305C37; Sat, 1 Sep 2012 01:12:52 +0200 (CEST) Message-ID: <504144F5.6070400@FreeBSD.org> Date: Sat, 01 Sep 2012 01:12:53 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120828 Thunderbird/16.0 MIME-Version: 1.0 To: Eir Nym References: <503D12CB.4000208@FreeBSD.org> <503D29F4.1030804@FreeBSD.org> <503D35DA.9060704@FreeBSD.org> <503F91C0.3090208@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 23:13:00 -0000 On 2012-08-30 18:43, Eir Nym wrote: > On 30 August 2012 20:16, Dimitry Andric wrote: ... >> It seems the WERROR= in the xfs module Makefile was right there from the >> start, but it was never removed. I have compiled it using gcc, and >> there are actually no warnings from gcc at all. With clang, there are >> several warnings, so I have added a few workaround -Wno-xxx flags for >> them. I committed the fixes in r239959. I tried building your GENERIC_PF kernel configuration, and it worked just fine now. From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 03:02:51 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF6FA106566B for ; Sat, 1 Sep 2012 03:02:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 985848FC21 for ; Sat, 1 Sep 2012 03:02:51 +0000 (UTC) Received: from John-Baldwins-MacBook-Air.local (c-68-39-198-164.hsd1.de.comcast.net [68.39.198.164]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EE6B5B941 for ; Fri, 31 Aug 2012 23:02:50 -0400 (EDT) Message-ID: <50417ADC.3030408@FreeBSD.org> Date: Fri, 31 Aug 2012 23:02:52 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: current@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 31 Aug 2012 23:02:51 -0400 (EDT) Cc: Subject: [PATCH] Add locking to ahb(4) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 03:02:51 -0000 I have patches to add locking to ahb(4) and mark it MPSAFE. The patches are from HEAD but should apply to 8 or 9. If you test it on 8 or 9 please enable INVARIANTS for at least the initial testing. Thanks. http://www.FreeBSD.org/~jhb/patches/ahb_locking.patch -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 03:15:43 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6321106566C for ; Sat, 1 Sep 2012 03:15:43 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4CA968FC15 for ; Sat, 1 Sep 2012 03:15:42 +0000 (UTC) Received: by vcbgb22 with SMTP id gb22so5128221vcb.13 for ; Fri, 31 Aug 2012 20:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=WuVtwpHSBw0jfuVarAGf3PylHh+yN/HsMz3ih7siOCo=; b=IE/ONGD5HZ3FJu9zdLkCVcWJsa/QNwufpm5+kRY7vYAuV8Rrn19CT6k+rUZLIFP48x CGb8r4FrSnb/50QPMs/6/mTk1IIE0yAeg2jOyS7zAbkEDLzXetWdPG3n/I+2+O/88Obv OPmSrafJiM64vbu+3XpGydkIq/TbPiWKTZI38= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=WuVtwpHSBw0jfuVarAGf3PylHh+yN/HsMz3ih7siOCo=; b=fpONBD7VJGrnttQpxj8SmXhsuhuXiMi5/WqoxPaWzG1gqRh1YZxGXu2Oj8jAbIgdZ9 UXFqpjZZTkg++8peIlwoPPR82v9tBREF835p/SpUtd56V0MBgpe395IffRAIDYAEGGpx DIMVO+oJWBtY8E4/QtzzoC4pdNyIbsop8PBNCcp1bBYCGta3i12EWcgpKPwKE7Yq6z+u /CwSkeY93JwJWSyBeBxwZGjG/yOgkKfKTRB/Id1Rm//t7ys1q8vaittwftY/HF9vjMJ3 ma60+DZLAtP/MyuSn9Bn5BCqxblSuePitdu6ILFaqXBlm6pG3IDqHRz5R4mk+EmbsQ7k sB1g== Received: by 10.220.150.16 with SMTP id w16mr7001920vcv.65.1346469342478; Fri, 31 Aug 2012 20:15:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.190.227 with HTTP; Fri, 31 Aug 2012 20:15:11 -0700 (PDT) In-Reply-To: <5040E31D.8060301@shatow.net> References: <20120831153659.GD1523@glenbarber.us> <5040E31D.8060301@shatow.net> From: Eitan Adler Date: Fri, 31 Aug 2012 23:15:11 -0400 Message-ID: To: Bryan Drewery Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQl4S4aKvW96C66ybHA/wDPvhRKeh4xnxDAqsv8ymQU6A7ASLaFerO1XV1Vpi1D2IQyOwRz8 Cc: Glen Barber , Marin Atanasov Nikolov , Vitaly Magerya , freebsd-ports@freebsd.org, current@freebsd.org Subject: Re: Plugins support in pkgng X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 03:15:43 -0000 On 31 August 2012 09:15, Bryan Drewery wrote: > No, because it already knows which you installed and which were pulled > in as dependencies. There's a recent thread on ports@ regarding pkg2ng > and marking your imported packages as automatic or not. There is a usecase for looking at all the leaf ports one by one and deciding if you want to keep them, recursively, regardless of the automatic flag. Even if this isn't provided by default, it would be nice for plugins to be able to do this. :) -- Eitan Adler From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 03:17:48 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0EF611065673 for ; Sat, 1 Sep 2012 03:17:48 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 640E98FC1C for ; Sat, 1 Sep 2012 03:17:47 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sweb; b=VqeAOs UgHBMyT6K6oUfT471M7/DNLHW6dzEjG/uaVCAasevNa/0K4ZclBiWLPK6Qx55pq+ snQVgfC6lQmxoCTTZJbk6Z/j7DWgFYOccyLyFhf2SyW1Q13g2M4yOOL8T4XkV0CN M4XXpJ0fIMBMVgLIne+e51+l3Cwc8wz4vCaGA= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sweb; bh=QyoeDNgXwtlo tgH9ERO8rVpbp4xNZVEKYKVJdKpu1+Q=; b=s9/G+hCxPtYnO3AkxD+SywOUWjOv 8g1KcJxvMeR6IdbsXdqHfeFDX1dsrRXsCDw8ROENsruvtB0Ct2DjGiD7gUNWtgi5 b8TSIaYMI2S9IwvWb+piw+o0uNS7/cpk9JxAg+Gi5i9zDY2a6kNGdV5OaAbqUfY0 +eESQzo5tEG9o74= Received: (qmail 99938 invoked from network); 31 Aug 2012 22:17:43 -0500 Received: from unknown (HELO ?10.10.0.115?) (bryan@shatow.net@10.10.0.115) by sweb.xzibition.com with ESMTPA; 31 Aug 2012 22:17:43 -0500 Message-ID: <50417E48.6010704@shatow.net> Date: Fri, 31 Aug 2012 22:17:28 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 References: <20120831153659.GD1523@glenbarber.us> <5040E31D.8060301@shatow.net> In-Reply-To: X-Enigmail-Version: 1.4.4 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: current@freebsd.org, Glen Barber , Eitan Adler , freebsd-ports@freebsd.org, Marin Atanasov Nikolov , Vitaly Magerya Subject: Re: Plugins support in pkgng X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 03:17:48 -0000 On 8/31/2012 10:15 PM, Eitan Adler wrote: > On 31 August 2012 09:15, Bryan Drewery wrote: > >> No, because it already knows which you installed and which were pulled >> in as dependencies. There's a recent thread on ports@ regarding pkg2ng >> and marking your imported packages as automatic or not. > > There is a usecase for looking at all the leaf ports one by one and > deciding if you want to keep them, recursively, regardless of the > automatic flag. > > Even if this isn't provided by default, it would be nice for plugins > to be able to do this. :) > > Apparently pkg_cutleaves supports pkgng now anyhow. Bryan From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 12:17:05 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6666D1065670 for ; Sat, 1 Sep 2012 12:17:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3E4E48FC0A for ; Sat, 1 Sep 2012 12:17:05 +0000 (UTC) Received: from John-Baldwins-MacBook-Air.local (c-68-39-198-164.hsd1.de.comcast.net [68.39.198.164]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7FE51B91A for ; Sat, 1 Sep 2012 08:17:04 -0400 (EDT) Message-ID: <5041FCC1.7040905@FreeBSD.org> Date: Sat, 01 Sep 2012 08:17:05 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: current@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 01 Sep 2012 08:17:04 -0400 (EDT) Cc: Subject: [PATCH] Locking for aic(4) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 12:17:05 -0000 Still working on patches for drivers from the last century. The latest installment is a patch for aic(4). It should apply to 8 and 9 as well as HEAD. Please ensure INVARIANTS is enabled during testing. http://www.FreeBSD.org/~jhb/patches/aic_locking.patch -- John Baldwin From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 13:02:28 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3339106564A; Sat, 1 Sep 2012 13:02:28 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from forward7.mail.yandex.net (forward7.mail.yandex.net [IPv6:2a02:6b8:0:202::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2A9408FC12; Sat, 1 Sep 2012 13:02:28 +0000 (UTC) Received: from smtp8.mail.yandex.net (smtp8.mail.yandex.net [77.88.61.54]) by forward7.mail.yandex.net (Yandex) with ESMTP id BDB051C108C; Sat, 1 Sep 2012 17:02:26 +0400 (MSK) Received: from smtp8.mail.yandex.net (localhost [127.0.0.1]) by smtp8.mail.yandex.net (Yandex) with ESMTP id 8A4DE1B60212; Sat, 1 Sep 2012 17:02:26 +0400 (MSK) Received: from unknown (unknown [77.93.52.20]) by smtp8.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 2PLaiCxR-2QL0MhKd; Sat, 1 Sep 2012 17:02:26 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1346504546; bh=3FL7IbYbVbjJXXqhKdjc7QhBJax4TOPWgJy3/QJyw48=; h=Date:From:X-Mailer:Reply-To:Organization:X-Priority:Message-ID:To: CC:Subject:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; b=E59hgwMblJ5ZSPOvDSR5odFX3fyHi53oL6hr/lyHIzWvTfANo3Yr2+IDQ/AkGU3+K U2nRVvFzxTVJym47K5+RbdptWJJBJJhTiOhk8Nyqz98IfeGw+y9kxyBE2McNQfx9RK 7hQ++DNOT1tOj7IzOoKUsrS8dpHAbUM5kpkcRwFU= Date: Sat, 1 Sep 2012 16:02:21 +0300 From: Eugen Konkov X-Mailer: The Bat! (v4.0.24) Professional Organization: ISP FreeLine X-Priority: 3 (Normal) Message-ID: <565201629.20120901160221@yandex.ru> To: Gleb Smirnoff In-Reply-To: <20120831200035.GO90597@FreeBSD.org> References: <201208311426.q7VEQgw3037660@red.freebsd.org> <20120831200035.GO90597@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Cc: freebsd-gnats-submit@FreeBSD.org, freebsd-current@freebsd.org Subject: Re[2]: misc/171209: ping: sendto: Invalid argument X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eugen Konkov List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 13:02:28 -0000 Hi, Gleb. GS> Can you please provide your full host configuration: rc.conf, firewall GS> rules if there are any? How to repeat: ifconfig rl0 add 192.168.0.2/24 route add default 192.168.1.1 192.168.1.1 is not on my LAN 192.168.0.0/24 FreeBSD must log right error messages so people can understood that it is mean. --- kernel: arpresolve: can't allocate llinfo for 10.11.19.52 +++ kernel: 10.11.19.52 is not on your LAN ---ping: sendto: Invalid argument +++ping: sendto: gateway to host is not on LAN ---traceroute: sendto: Invalid argument +++traceroute: sendto: gateway to host is not on LAN -- ó Õ×ÁÖÅÎÉÅÍ, Eugen mailto:kes-kes@yandex.ru From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 14:42:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B508A106566B; Sat, 1 Sep 2012 14:42:16 +0000 (UTC) (envelope-from lists@c0mplx.org) Received: from home.opsec.eu (home.opsec.eu [IPv6:2001:14f8:200::1]) by mx1.freebsd.org (Postfix) with ESMTP id 60F0B8FC0C; Sat, 1 Sep 2012 14:42:16 +0000 (UTC) Received: from pi by home.opsec.eu with local (Exim 4.77 (FreeBSD)) (envelope-from ) id 1T7otp-00075y-Ma; Sat, 01 Sep 2012 16:42:13 +0200 Date: Sat, 1 Sep 2012 16:42:13 +0200 From: Kurt Jaeger To: Scot Hetzel Message-ID: <20120901144213.GF3324@home.opsec.eu> References: <50407056.3000606@passap.ru> <50407912.60809@passap.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: "freebsd-rc@FreeBSD.org" , Garrett Cooper , Maxim Konovalov , freebsd-current@freebsd.org, matteo@freebsd.org, bsam@passap.ru Subject: Re: rpcbind does not honor -h flag X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 14:42:16 -0000 Hi! > >>>> Please file a PR against rc ASAP. > >> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/117711 > Looks like Matteo Riondato had created a patch for the problem in 2008: > > http://people.freebsd.org/~matteo/diff/117711rpcbind.diff > > but he never received any feedback from Carlos Eduardo Monti to see if > the patch fixed the problem. > I don't know if the patch will apply to the current FreeBSD rpcbind > code, give it a try and submit a follow up to the PR. In the current form the patch fails in rpcbind.c on 9.1-RC1. There are two problems with the current rpcbind.c. 1) It seems to be that even if some -h is given, the rpcbind code uses some SUN-RPC trickery around the /etc/netconfig file to open sockets for localhost in v4 and v6. Is it required to bind to localhost according to the RPC spec ? 2) And it opens some dynamic ports for other uses -- anybody has an idea why this is necessary ? Is there an requirement for this in the spec ? Below is an example of both issues. root rpcbind 2134 4 udp6 *:* *:* root rpcbind 2134 5 stream /var/run/rpcbind.sock root rpcbind 2134 6 udp6 *:111 *:* root rpcbind 2134 7 udp6 *:924 *:* root rpcbind 2134 8 tcp6 *:111 *:* root rpcbind 2134 9 udp4 *:111 *:* root rpcbind 2134 10 udp4 *:645 *:* root rpcbind 2134 11 tcp4 *:111 *:* Here's rpcbind started with -h : root rpcbind 2195 4 udp6 *:* *:* root rpcbind 2195 5 stream /var/run/rpcbind.sock root rpcbind 2195 6 udp6 ::1:111 *:* root rpcbind 2195 7 udp6 *:1013 *:* root rpcbind 2195 8 tcp6 ::1:111 *:* root rpcbind 2195 9 udp4 127.0.0.1:111 *:* root rpcbind 2195 10 udp4 :111 *:* root rpcbind 2195 11 udp4 *:634 *:* root rpcbind 2195 12 tcp4 127.0.0.1:111 *:* root rpcbind 2195 13 tcp4 :111 *:* One can see two dynamic udp ports opened (one v4, one v6). I might be naive, but from what I understand, it should not open that many sockets, but only like this: root rpcbind 2195 10 udp4 :111 *:* root rpcbind 2195 13 tcp4 :111 *:* If this naive 'spec' is correct, would a patch to do just this and nothing more be OK ? -- pi@opsec.eu +49 171 3101372 8 years to go ! From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 17:44:05 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7DF65106564A; Sat, 1 Sep 2012 17:44:05 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay010.isp.belgacom.be (mailrelay010.isp.belgacom.be [195.238.6.177]) by mx1.freebsd.org (Postfix) with ESMTP id 372A38FC0A; Sat, 1 Sep 2012 17:44:03 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EAGJIQlBbsRDj/2dsb2JhbABFux6BCIIgAQEFViIBEAsOCgkWDwkDAgECASceBg0BBwEBiA26PosNhyMDjmKBIJVxgmU Received: from 227.16-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.16.227]) by relay.skynet.be with ESMTP; 01 Sep 2012 19:43:56 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q81HhuB4013973; Sat, 1 Sep 2012 19:43:56 +0200 (CEST) (envelope-from tijl@freebsd.org) Message-ID: <50424956.4090804@freebsd.org> Date: Sat, 01 Sep 2012 19:43:50 +0200 From: Tijl Coosemans User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120804 Thunderbird/14.0 MIME-Version: 1.0 To: Baptiste Daroussin References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> <201208310810.50725.jhb@freebsd.org> <20120831122211.GS64447@ithaqua.etoilebsd.net> In-Reply-To: <20120831122211.GS64447@ithaqua.etoilebsd.net> X-Enigmail-Version: 1.4.2 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigD9236123771117E0EDDE850C" Cc: freebsd-ports , freebsd-current@freebsd.org, Chris Rees , Doug Barton Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 17:44:05 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD9236123771117E0EDDE850C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 31-08-2012 14:22, Baptiste Daroussin wrote: > On Fri, Aug 31, 2012 at 08:10:50AM -0400, John Baldwin wrote: >> On Friday, August 31, 2012 5:59:10 am Baptiste Daroussin wrote: >>> On Thu, Aug 30, 2012 at 01:02:06PM -1000, Doug Barton wrote: >>>> I agree with John on all counts here. Further, the idea of a >>>> self-installing package, at least for the pkg stuff itself, addresse= s >>>> the issue that someone else brought up about how to handle installat= ion >>>> of pkg by the installer for a new system. >>> >>> I like the idea of also providing a self-installing package, and it s= eems really >>> easy to do, so I'll try to see what I can do in this area I'll wrote = a PoC in 5 >>> minutes which looks pretty good, this could also be a very simple and= easy way >>> to integrate into bsdinstaller. >>> >>> I'll do work in that direction. >>> >>> Still it doesn't solve the problem of boostrapping pkgng in a fresh n= ew box, >>> because the user may not know where to download the pkg-setup.sh. >> >> I do think that is something bsdinstall should be able to handle, and = I would >> certainly want bsdinstall to include a dialog that says "do you want t= o install >> the package manager?" >=20 > Of course this is being worked on by dteske@ on his bsdconfig scripts, = so yes in > anycase the bsdinstaller will end up with a boostrap dialog to install = pkgng. Something else I thought of, you can't assume there's a working internet connection during installation. And also, even if there is a connection, = can you guarantee that the downloaded pkg supports the packages on the dvd fo= r the lifetime of the release? I really think you should just do vendor imports of pkg in base and inclu= de pkg on the dvd. There's no bootstrap problem then and the dvd is nicely self-contained. It also shouldn't be a problem to keep the official pkg r= epo for that release compatible with it. Just keep using the same version of = pkg to create the repo. You've been able to develop and introduce pkgng without breaking older releases which shows having pkg tools tied to releases was never a proble= m. All that was needed was to move pkg development outside base. You should = be able to do pkg 2.0 development in the same way. And when that new version= is ready you import betas and release candidates in head and use current users as testers, just like is done with clang. In this scenario the ports tree needs to keep support for older releases,= but that's a consequence of the fact that there's only one ports tree for= all releases. Somewhere in between the ports and the various releases the= re has to be some form encapsulation, not just for pkg, but for all the tool= s used by the ports tree. Given how the ports tree currently encapsulates both the old and new pkg tools I don't see how supporting multiple versio= ns of pkgng would be a problem because presumably the difference between pkg= ng versions is going to be much smaller than the difference between the old and new tools. --------------enigD9236123771117E0EDDE850C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iF4EAREIAAYFAlBCSVsACgkQfoCS2CCgtiv2JQD/cJdmaQFrkmL9RxlOdr7gvEyI WHu0CmlazhqPktt0Nu8A/0sBSQOh0TRLj5HMRoiOrerome7zqhXFSoOxCaGT2OXY =8TJr -----END PGP SIGNATURE----- --------------enigD9236123771117E0EDDE850C-- From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 17:56:52 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 136751065676; Sat, 1 Sep 2012 17:56:52 +0000 (UTC) (envelope-from jlaffaye.freebsd@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id C9E738FC1A; Sat, 1 Sep 2012 17:56:50 +0000 (UTC) Received: by eeke52 with SMTP id e52so1632468eek.13 for ; Sat, 01 Sep 2012 10:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=4zLm8n+Z1/L6gNqFKUljQdrC0hSYc9Ia7WFCHxOD6dk=; b=SPE0eRJisokBaCEnCNX7JSkRi/Ynd/FWOWNXvqoOchA5Ee3P2paeae4ueotOGRDs4r FVMdlDjl19QWWkC90+P1d20OZTjux6X9EGxaUOooFQYDtnKHqAYsrjaUEvYEyeEnaZoR 8TSiAquvTnRXs37qVUpuZpZReAg5SHpGgWTO7agesx8aOcJ2Ff4tQmg6Vaxp+oJ1UPkd LM5Micafdvxent6zYCkOoGy+3DhBxf77U0NTXFVOtr+w/brKZnbChU13q4EUw06rzLSq 0rHWhB50jpbndtYDxrKbDR4xitV7np2MfEipgAoHEjCETFcK6PD7ZD/Jx3k3MLP8mEKB zf1w== Received: by 10.14.172.129 with SMTP id t1mr15359167eel.34.1346522204332; Sat, 01 Sep 2012 10:56:44 -0700 (PDT) Received: from ?IPv6:2001:41d0:fc00:100:1480:18ea:2c8b:9dc3? ([2001:41d0:fc00:100:1480:18ea:2c8b:9dc3]) by mx.google.com with ESMTPS id h2sm22525814eeo.3.2012.09.01.10.56.42 (version=SSLv3 cipher=OTHER); Sat, 01 Sep 2012 10:56:43 -0700 (PDT) Sender: Julien Laffaye Message-ID: <50424C58.2030304@freebsd.org> Date: Sat, 01 Sep 2012 19:56:40 +0200 From: Julien Laffaye User-Agent: Thunderbird/7.0.1 MIME-Version: 1.0 To: Tijl Coosemans References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> <201208310810.50725.jhb@freebsd.org> <20120831122211.GS64447@ithaqua.etoilebsd.net> <50424956.4090804@freebsd.org> In-Reply-To: <50424956.4090804@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Baptiste Daroussin , Doug Barton , freebsd-current@freebsd.org, freebsd-ports , Chris Rees Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 17:56:52 -0000 On 9/1/2012 7:43 PM, Tijl Coosemans wrote: > On 31-08-2012 14:22, Baptiste Daroussin wrote: >> On Fri, Aug 31, 2012 at 08:10:50AM -0400, John Baldwin wrote: >>> On Friday, August 31, 2012 5:59:10 am Baptiste Daroussin wrote: >>>> On Thu, Aug 30, 2012 at 01:02:06PM -1000, Doug Barton wrote: >>>>> I agree with John on all counts here. Further, the idea of a >>>>> self-installing package, at least for the pkg stuff itself, addresses >>>>> the issue that someone else brought up about how to handle installation >>>>> of pkg by the installer for a new system. >>>> I like the idea of also providing a self-installing package, and it seems really >>>> easy to do, so I'll try to see what I can do in this area I'll wrote a PoC in 5 >>>> minutes which looks pretty good, this could also be a very simple and easy way >>>> to integrate into bsdinstaller. >>>> >>>> I'll do work in that direction. >>>> >>>> Still it doesn't solve the problem of boostrapping pkgng in a fresh new box, >>>> because the user may not know where to download the pkg-setup.sh. >>> I do think that is something bsdinstall should be able to handle, and I would >>> certainly want bsdinstall to include a dialog that says "do you want to install >>> the package manager?" >> Of course this is being worked on by dteske@ on his bsdconfig scripts, so yes in >> anycase the bsdinstaller will end up with a boostrap dialog to install pkgng. > Something else I thought of, you can't assume there's a working internet > connection during installation. And also, even if there is a connection, can > you guarantee that the downloaded pkg supports the packages on the dvd for > the lifetime of the release? The packages set included on the dvd will probably be EOLed before the lifetime of the release. > I really think you should just do vendor imports of pkg in base and include > pkg on the dvd. There's no bootstrap problem then and the dvd is nicely > self-contained. It also shouldn't be a problem to keep the official pkg repo > for that release compatible with it. Just keep using the same version of pkg > to create the repo. > > You've been able to develop and introduce pkgng without breaking older > releases which shows having pkg tools tied to releases was never a problem. > All that was needed was to move pkg development outside base. You should be > able to do pkg 2.0 development in the same way. And when that new version > is ready you import betas and release candidates in head and use current > users as testers, just like is done with clang. > > In this scenario the ports tree needs to keep support for older releases, > but that's a consequence of the fact that there's only one ports tree for > all releases. Somewhere in between the ports and the various releases there > has to be some form encapsulation, not just for pkg, but for all the tools > used by the ports tree. Given how the ports tree currently encapsulates > both the old and new pkg tools I don't see how supporting multiple versions > of pkgng would be a problem because presumably the difference between pkgng > versions is going to be much smaller than the difference between the old > and new tools. > From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 19:40:30 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC0501065686 for ; Sat, 1 Sep 2012 19:40:30 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 47B5A8FC17 for ; Sat, 1 Sep 2012 19:40:30 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q81JeGQD003608 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sat, 1 Sep 2012 20:40:22 +0100 (BST) (envelope-from matthew@FreeBSD.org) X-DKIM: OpenDKIM Filter v2.5.2 smtp.infracaninophile.co.uk q81JeGQD003608 Authentication-Results: smtp.infracaninophile.co.uk/q81JeGQD003608; dkim=none (no signature); dkim-adsp=none Message-ID: <50426493.7050302@FreeBSD.org> Date: Sat, 01 Sep 2012 20:40:03 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: freebsd-current@FreeBSD.org References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> <201208310810.50725.jhb@freebsd.org> <20120831122211.GS64447@ithaqua.etoilebsd.net> <50424956.4090804@freebsd.org> In-Reply-To: <50424956.4090804@freebsd.org> X-Enigmail-Version: 1.4.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF94BB08128365E45D0028175" X-Virus-Scanned: clamav-milter 0.97.5 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 19:40:30 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF94BB08128365E45D0028175 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 01/09/2012 18:43, Tijl Coosemans wrote: > In this scenario the ports tree needs to keep support for older release= s, > but that's a consequence of the fact that there's only one ports tree f= or > all releases. Somewhere in between the ports and the various releases t= here > has to be some form encapsulation, not just for pkg, but for all the to= ols > used by the ports tree. Given how the ports tree currently encapsulates= > both the old and new pkg tools I don't see how supporting multiple vers= ions > of pkgng would be a problem because presumably the difference between p= kgng > versions is going to be much smaller than the difference between the ol= d > and new tools. New functionality already in the process of development will entail making non-backwards compatible changes to the DB schema. If we're tied to supporting a version of pkgng bundled with a release, that's going to make rolling out such changes much harder. On the other hand, if pkgng is in ports, then we can release a new version and simultaneously publish new package sets (incorporating the update to pkgng) from the repositories which will have been built using the updated DB schema. The ports tree doesn't track the versioning of the base system, and it makes perfect sense to me that tools for dealing with the ports should follow changes to ports rather than changes to the base. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --------------enigF94BB08128365E45D0028175 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBCZJ8ACgkQ8Mjk52CukIwLkACghy+PUdZEDRxAZrghAlNw5J72 BZ4AniyDwLwzVf/QB5/EDTybEDPmzpP3 =LNKT -----END PGP SIGNATURE----- --------------enigF94BB08128365E45D0028175-- From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 19:40:39 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68397106564A; Sat, 1 Sep 2012 19:40:39 +0000 (UTC) (envelope-from eirnym@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4608FC17; Sat, 1 Sep 2012 19:40:38 +0000 (UTC) Received: by iebc12 with SMTP id c12so3191362ieb.13 for ; Sat, 01 Sep 2012 12:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=KExWPJNQ90LuL2kE4sgoU+kHBRHBUXwF/JgHGojxkxE=; b=05qNnNxJu5SjTawT4NcmC5Tdof1ZDfpDVqNR7T442JoCC8Ya7u8NBGLHJUy46dAwsv 8oWEVjcppxVLA2dqqAYdlWM+OEFn4C0Ja4PtIlW97Hl27TKx6OpjdbiSMZ/oi6x6Rjru i1cC0+TsZSwE2NxvJ9OwbbskxpV41jx+UmSZdNnddTM+LI3AkMK54I6cZaSRER3bD/2K 5HSG+11n/vMvz6MCee1iuCg+jVODyIdKViLVHideQ2p6p+MJnFwMhdqXi1Fu9bfzR8bU MLMbQv+cUp3LfYpwJWAh9Xuq/7HonkOQx0Icprfw5ZwniqxDzDpnJSXvDcw3mZPPWtek 68Gg== Received: by 10.50.36.195 with SMTP id s3mr6675691igj.63.1346528432215; Sat, 01 Sep 2012 12:40:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.46.41 with HTTP; Sat, 1 Sep 2012 12:40:12 -0700 (PDT) In-Reply-To: <504144F5.6070400@FreeBSD.org> References: <503D12CB.4000208@FreeBSD.org> <503D29F4.1030804@FreeBSD.org> <503D35DA.9060704@FreeBSD.org> <503F91C0.3090208@FreeBSD.org> <504144F5.6070400@FreeBSD.org> From: Eir Nym Date: Sat, 1 Sep 2012 23:40:12 +0400 Message-ID: To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 19:40:39 -0000 -- Eir Nym On 1 September 2012 03:12, Dimitry Andric wrote: > On 2012-08-30 18:43, Eir Nym wrote: >> >> On 30 August 2012 20:16, Dimitry Andric wrote: > > ... > >>> It seems the WERROR= in the xfs module Makefile was right there from the >>> start, but it was never removed. I have compiled it using gcc, and >>> there are actually no warnings from gcc at all. With clang, there are >>> several warnings, so I have added a few workaround -Wno-xxx flags for >>> them. > > > I committed the fixes in r239959. I tried building your GENERIC_PF > kernel configuration, and it worked just fine now. Thank you! I'll review my configurations and rebuild my box. From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 19:59:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5C75F106564A; Sat, 1 Sep 2012 19:59:16 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 065138FC14; Sat, 1 Sep 2012 19:59:15 +0000 (UTC) Received: by obbun3 with SMTP id un3so9665354obb.13 for ; Sat, 01 Sep 2012 12:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TR7UUSO1UAGNc+uo6CRuT4l/meK0P9hd6AZeX5Qqwvg=; b=BXDQUFHLx6iwVyW9hd0xnvLd3XhE28vuC0EdcB5HPLzsMP9N4GMQkwhH53yzdhUvSo XrrEff4v1Box+a/nqxXYqPm9eR1edIiyUWlWodCuMQN5oErClzSZDCiDradP8iIZ1Zm0 IlxW1Ab4uaJQBMotHqUtECw3IXevVYHXR4w14TmdRCv7KGbGT3/f9JlxiLFvt+AERVwu Y9jd4GNmDEgB5fPUffkoq7ZICaEfPRLeEu+IaT1yMtbsYwItRF7eBvcB2zAhvSzdKXnB Ok6AWR5lDoRyfYwpUbEe6ntBtP8FjCakgjTi2RDbmIAfyaacnx9gJ6A+w+EK3TidC1Pc 3VOw== MIME-Version: 1.0 Received: by 10.182.31.102 with SMTP id z6mr10927434obh.66.1346529554905; Sat, 01 Sep 2012 12:59:14 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Sat, 1 Sep 2012 12:59:14 -0700 (PDT) In-Reply-To: <50426493.7050302@FreeBSD.org> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> <201208310810.50725.jhb@freebsd.org> <20120831122211.GS64447@ithaqua.etoilebsd.net> <50424956.4090804@freebsd.org> <50426493.7050302@FreeBSD.org> Date: Sat, 1 Sep 2012 12:59:14 -0700 Message-ID: From: Garrett Cooper To: Matthew Seaman Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 19:59:16 -0000 On Sat, Sep 1, 2012 at 12:40 PM, Matthew Seaman wrote: > On 01/09/2012 18:43, Tijl Coosemans wrote: >> In this scenario the ports tree needs to keep support for older releases, >> but that's a consequence of the fact that there's only one ports tree for >> all releases. Somewhere in between the ports and the various releases there >> has to be some form encapsulation, not just for pkg, but for all the tools >> used by the ports tree. Given how the ports tree currently encapsulates >> both the old and new pkg tools I don't see how supporting multiple versions >> of pkgng would be a problem because presumably the difference between pkgng >> versions is going to be much smaller than the difference between the old >> and new tools. > > New functionality already in the process of development will entail > making non-backwards compatible changes to the DB schema. If we're tied > to supporting a version of pkgng bundled with a release, that's going to > make rolling out such changes much harder. On the other hand, if pkgng > is in ports, then we can release a new version and simultaneously > publish new package sets (incorporating the update to pkgng) from the > repositories which will have been built using the updated DB schema. > > The ports tree doesn't track the versioning of the base system, and it > makes perfect sense to me that tools for dealing with the ports should > follow changes to ports rather than changes to the base. Again, this is part of the reason why I suggested multiple release trains. Although it's more painful for bapt@, et all, it's ultimately what would need to be done in order for pkgng to be packaged with a release or set of releases. I would be happy to assist with this -- it's the least I could do. Thanks, -Garrett From owner-freebsd-current@FreeBSD.ORG Sat Sep 1 22:34:11 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90F1F106564A; Sat, 1 Sep 2012 22:34:11 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) by mx1.freebsd.org (Postfix) with ESMTP id 22A978FC0A; Sat, 1 Sep 2012 22:34:11 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 738C512020A; Sun, 2 Sep 2012 00:34:07 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 148872847B; Sun, 2 Sep 2012 00:34:07 +0200 (CEST) Date: Sun, 2 Sep 2012 00:34:06 +0200 From: Jilles Tjoelker To: Matthew Seaman Message-ID: <20120901223406.GB35783@stack.nl> References: <97612B57-1255-4BB3-A6D3-FC74324C6D67@FreeBSD.org> <503FF0EE.2020605@FreeBSD.org> <20120831095910.GQ64447@ithaqua.etoilebsd.net> <201208310810.50725.jhb@freebsd.org> <20120831122211.GS64447@ithaqua.etoilebsd.net> <50424956.4090804@freebsd.org> <50426493.7050302@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50426493.7050302@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@FreeBSD.org Subject: Re: pkgng suggestion: renaming /usr/sbin/pkg to /usr/sbin/pkg-bootstrap X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2012 22:34:11 -0000 On Sat, Sep 01, 2012 at 08:40:03PM +0100, Matthew Seaman wrote: > On 01/09/2012 18:43, Tijl Coosemans wrote: > > In this scenario the ports tree needs to keep support for older releases, > > but that's a consequence of the fact that there's only one ports tree for > > all releases. Somewhere in between the ports and the various releases there > > has to be some form encapsulation, not just for pkg, but for all the tools > > used by the ports tree. Given how the ports tree currently encapsulates > > both the old and new pkg tools I don't see how supporting multiple versions > > of pkgng would be a problem because presumably the difference between pkgng > > versions is going to be much smaller than the difference between the old > > and new tools. > New functionality already in the process of development will entail > making non-backwards compatible changes to the DB schema. If we're tied > to supporting a version of pkgng bundled with a release, that's going to > make rolling out such changes much harder. On the other hand, if pkgng > is in ports, then we can release a new version and simultaneously > publish new package sets (incorporating the update to pkgng) from the > repositories which will have been built using the updated DB schema. One restriction is that the old pkg should be able to detect the new pkg package in the repository. If not, users of an old version will have to install the new pkg manually. This restriction is much weaker than requiring an upgrade using the old pkg, mainly because pkg does not depend on anything else. All other packages can use features and bugfixes in the new pkg and need not carry around workarounds for years. If the base system is also managed by pkg, which is currently not the case, the assumption that the pkg package does not depend on anything may no longer hold. It might depend on a new libc in the new base system, for example. > The ports tree doesn't track the versioning of the base system, and it > makes perfect sense to me that tools for dealing with the ports should > follow changes to ports rather than changes to the base. Yes. -- Jilles Tjoelker