From owner-svn-src-head@freebsd.org Tue Sep 3 14:07:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E765EDD392; Tue, 3 Sep 2019 14:07:02 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46N8064F84z4QBN; Tue, 3 Sep 2019 14:07:02 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1452) id ADDB81AFD2; Tue, 3 Sep 2019 14:06:26 +0000 (UTC) X-Original-To: yuripv@localmail.freebsd.org Delivered-To: yuripv@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 6AA451A09C; Wed, 17 Apr 2019 22:05:48 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4415B95CF1; Wed, 17 Apr 2019 22:05:47 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 538) id 0CAA519FFB; Wed, 17 Apr 2019 22:05:47 +0000 (UTC) Delivered-To: src-committers@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id C35BF19FDE; Wed, 17 Apr 2019 22:05:44 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64FF795CA8; Wed, 17 Apr 2019 22:05:43 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x3HM5bPV002270; Wed, 17 Apr 2019 15:05:37 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x3HM5bur002269; Wed, 17 Apr 2019 15:05:37 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201904172205.x3HM5bur002269@gndrsh.dnsmgr.net> Subject: Re: svn commit: r346316 - in head: contrib/elftoolchain/strings sbin/savecore usr.bin/brandelf usr.bin/head usr.bin/wc In-Reply-To: <201904171941.x3HJfmee090931@slippy.cwsent.com> To: Cy Schubert CC: "O. Hartmann" , Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-Rspamd-Queue-Id: 4415B95CF1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Status: O X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 03 Sep 2019 14:07:20 -0000 X-Original-Date: Wed, 17 Apr 2019 15:05:37 -0700 (PDT) X-List-Received-Date: Tue, 03 Sep 2019 14:07:20 -0000 > In message <20190417195145.6824c0f9@thor.intern.walstatt.dynvpn.de>, > "O. Hartma > nn" writes: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA256 > > > > Am Wed, 17 Apr 2019 16:18:14 +0000 (UTC) > > Ed Maste schrieb: > > > > > Author: emaste > > > Date: Wed Apr 17 16:18:14 2019 > > > New Revision: 346316 > > > URL: https://svnweb.freebsd.org/changeset/base/346316 > > > > > > Log: > > > cap_fileargs: chase r346315, update fileargs_init in consumers > > > > > > Reported by: ci.freebsd.org (8 times so far) > > > MFC after: 3 weeks > > > MFC with: r346315 > > > Sponsored by: The FreeBSD Foundation > > > > > > Modified: > > > head/contrib/elftoolchain/strings/strings.c > > > head/sbin/savecore/savecore.c > > > head/usr.bin/brandelf/brandelf.c > > > head/usr.bin/head/head.c > > > head/usr.bin/wc/wc.c > > > > > > Modified: head/contrib/elftoolchain/strings/strings.c > > > =========================================================================== > > === > > > --- head/contrib/elftoolchain/strings/strings.c Wed Apr 17 16:02:57 201 > > 9 > > > (r346315) +++ head/contrib/elftoolchain/strings/strings.c Wed Apr 17 16:1 > > 8:14 > > > 2019 (r346316) @@ -195,7 +195,7 @@ main(int argc, char **argv) > > > argv += optind; > > > > > > cap_rights_init(&rights, CAP_READ, CAP_SEEK, CAP_FSTAT, CAP_FCNTL); > > > - fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights); > > > + fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); > > > if (fa == NULL) > > > err(1, "Unable to initialize casper fileargs"); > > > > > > > > > Modified: head/sbin/savecore/savecore.c > > > =========================================================================== > > === > > > --- head/sbin/savecore/savecore.c Wed Apr 17 16:02:57 2019 (r34631 > > 5) > > > +++ head/sbin/savecore/savecore.c Wed Apr 17 16:18:14 2019 (r34631 > > 6) > > > @@ -1030,7 +1030,7 @@ init_caps(int argc, char **argv) > > > */ > > > (void)cap_rights_init(&rights, CAP_PREAD, CAP_WRITE, CAP_IOCTL); > > > capfa = fileargs_init(argc, argv, checkfor || keep ? O_RDONLY : O_RDWR, > > > - 0, &rights); > > > + 0, &rights, FA_OPEN); > > > if (capfa == NULL) { > > > logmsg(LOG_ERR, "fileargs_init(): %m"); > > > exit(1); > > > > > > Modified: head/usr.bin/brandelf/brandelf.c > > > =========================================================================== > > === > > > --- head/usr.bin/brandelf/brandelf.c Wed Apr 17 16:02:57 2019 > > (r346315) > > > +++ head/usr.bin/brandelf/brandelf.c Wed Apr 17 16:18:14 2019 > > (r346316) > > > @@ -133,7 +133,7 @@ main(int argc, char **argv) > > > if (flags == O_RDWR) > > > cap_rights_set(&rights, CAP_WRITE); > > > > > > - fa = fileargs_init(argc, argv, flags, 0, &rights); > > > + fa = fileargs_init(argc, argv, flags, 0, &rights, FA_OPEN); > > > if (fa == NULL) > > > errx(1, "unable to init casper"); > > > > > > > > > Modified: head/usr.bin/head/head.c > > > =========================================================================== > > === > > > --- head/usr.bin/head/head.c Wed Apr 17 16:02:57 2019 (r34631 > > 5) > > > +++ head/usr.bin/head/head.c Wed Apr 17 16:18:14 2019 (r34631 > > 6) > > > @@ -115,7 +115,7 @@ main(int argc, char *argv[]) > > > argv += optind; > > > > > > fa = fileargs_init(argc, argv, O_RDONLY, 0, > > > - cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL)); > > > + cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL), FA_OPEN); > > > if (fa == NULL) > > > errx(1, "unable to init casper"); > > > > > > > > > Modified: head/usr.bin/wc/wc.c > > > =========================================================================== > > === > > > --- head/usr.bin/wc/wc.c Wed Apr 17 16:02:57 2019 (r346315) > > > +++ head/usr.bin/wc/wc.c Wed Apr 17 16:18:14 2019 (r346316) > > > @@ -133,7 +133,7 @@ main(int argc, char *argv[]) > > > (void)signal(SIGINFO, siginfo_handler); > > > > > > fa = fileargs_init(argc, argv, O_RDONLY, 0, > > > - cap_rights_init(&rights, CAP_READ, CAP_FSTAT)); > > > + cap_rights_init(&rights, CAP_READ, CAP_FSTAT), FA_OPEN); > > > if (fa == NULL) { > > > xo_warn("Unable to init casper"); > > > exit(1); > > > _______________________________________________ > > > svn-src-head@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > > > > This commit seems to break buildworld on my installations: > > > > [...] > > Building /usr/obj/usr/src/amd64.amd64/tmp/obj-tools/usr.bin/strings/strings.o > > - --- strings.o --- > > /usr/src/contrib/elftoolchain/strings/strings.c:198:55: error: use of undecla > > red identifier > > 'FA_OPEN' fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); > > ^ > > 1 error generated. > > *** [strings.o] Error code 1 > > Try this. We shouldn't use headers in /usr/include, only the ones in > src/. > > Index: tools/build/Makefile > =================================================================== > --- tools/build/Makefile (revision 346330) > +++ tools/build/Makefile (working copy) > @@ -59,9 +59,7 @@ > INCS+= libcasper.h > .endif > > -.if !exists(/usr/include/casper/cap_fileargs.h) > CASPERINC+= ${SRCTOP}/lib/libcasper/services/cap_fileargs/cap_fileargs. > h > -.endif > > .if empty(SRCS) > SRCS= dummy.c > > I found a number of bugs like this one in heimdal in base and in ntp > previously. > Cy Schubert This is in general a huge problem area dating back to when I fixed "make includes" to at least be some what correct. Rather than all these one off hacks of doing fooINC+= the make includes target should be fixed such that we boot strap a proper "includes" tree, preferable in /usr/obj/${SRCTOP} and use that in all places that need build tree (not host tree) include files. If you find yourself doing the above it means that something is missing from "make includes", as that file should of been populated into /usr/includes early in the build process. Doing the /usr/obj/${SRCTOP}/usr/include/ would fix all places that need hacks like above. Regards, Rod -- Rod Grimes rgrimes@freebsd.org