From owner-svn-src-all@freebsd.org Tue Oct 27 02:41:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FE75A1D2AA; Tue, 27 Oct 2015 02:41:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38548188C; Tue, 27 Oct 2015 02:41:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igpw7 with SMTP id w7so295328igp.1; Mon, 26 Oct 2015 19:41:22 -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=WnCUaqbPHpNsTBRhr0BO8BOHwpBPsWOHbKKaGl1WZL8=; b=Llzm4+T/GVsr3Y3DN1++2AUc+K3VOQI9S758Nz1yiwVcRXaW4bOI8Ynla6i5Kb550E y8U2hvwYYN7+6VWWTFPuNumJij/eNATXcgHO0sFim4NeMOcNoTg00qEwAplaZdY8IR5G IAMwrH3NFQQ3smMJexYizhSkTNMqgbX6d83mNppdIGi9HzHz7YlOt/4Zbz1CF/VYsmZY kI0ErdmiYvatoAx7y8zvEzKqAc4zfnFn9zFPxb/sNaGuteYQuZwXS8fY97yyanYuFkFC fCtmE/ny8GDOblze6a1o0wsIRXIq6PlckhaQVtoJrUZOOXIYfod04rSkUTss2LHTJmgU GM2g== MIME-Version: 1.0 X-Received: by 10.50.178.141 with SMTP id cy13mr21293572igc.61.1445913682546; Mon, 26 Oct 2015 19:41:22 -0700 (PDT) Received: by 10.36.46.66 with HTTP; Mon, 26 Oct 2015 19:41:22 -0700 (PDT) In-Reply-To: <562ED280.2030307@delphij.net> References: <201510132255.t9DMtHpe000697@repo.freebsd.org> <562EC8D6.6050609@FreeBSD.org> <562ED280.2030307@delphij.net> Date: Mon, 26 Oct 2015 21:41:22 -0500 Message-ID: Subject: Re: svn commit: r289269 - head/usr.sbin/tzsetup From: Adrian Chadd To: Xin LI Cc: Bryan Drewery , Xin LI , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 02:41:23 -0000 aw thanks I would really love to see a non-terrible way to do this stuff. :( -a On 26 October 2015 at 20:25, Xin Li wrote: > On 10/26/15 18:07, Adrian Chadd wrote: >> Hi, >> >> Please don't break non-root builds. I may get stabby. >> >> :) > > Will revert now. > >> -adrian >> >> >> On 26 October 2015 at 19:44, Bryan Drewery wrote: >>> On 10/13/2015 3:55 PM, Xin LI wrote: >>>> Author: delphij >>>> Date: Tue Oct 13 22:55:17 2015 >>>> New Revision: 289269 >>>> URL: https://svnweb.freebsd.org/changeset/base/289269 >>>> >>>> Log: >>>> Use chroot(2) instead of using prefixes for files. >>>> >>>> Previously, the code prefixes the chroot path to actual file paths to >>>> simulate the effect. This, however, will not work for tzset(3) which >>>> expects the current system have a working set of timezone data files, >>>> and that is not always the case. >>>> >>>> This changeset simplifies the handling of paths and use an actual >>>> chroot(2) call to implement the effect. >>>> >>>> PR: bin/197313 >>>> MFC after: 2 weeks >>>> >>>> Modified: >>>> head/usr.sbin/tzsetup/tzsetup.c >>>> >>>> Modified: head/usr.sbin/tzsetup/tzsetup.c >>>> ============================================================================== >>>> --- head/usr.sbin/tzsetup/tzsetup.c Tue Oct 13 21:34:54 2015 (r289268) >>>> +++ head/usr.sbin/tzsetup/tzsetup.c Tue Oct 13 22:55:17 2015 (r289269) >>>> @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); >>>> #include >>>> #include >>>> #include >>>> +#include >>>> #include >>>> #include >>>> >>>> @@ -944,23 +945,18 @@ main(int argc, char **argv) >>>> if (argc - optind > 1) >>>> usage(); >>>> >>>> - if (chrootenv == NULL) { >>> >>> I would think there would be a reason for not really using chroot(2) >>> here, such as preparing images as non-root. >>> >>> -- >>> Regards, >>> Bryan Drewery >>> >> > > > -- > Xin LI https://www.delphij.net/ > FreeBSD - The Power to Serve! Live free or die >