From nobody Fri Aug 09 15:10:52 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WgS672r7Jz5SCbN; Fri, 09 Aug 2024 15:10:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WgS672P7Vz4lf7; Fri, 9 Aug 2024 15:10:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723216255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E1DnS4Ey2SGef2vZ7mAaXHwJmjwfuDORyUQpsuaqDRM=; b=RZW9SaRSrWusgUiUC4K1iUd4TCNJtS0WtgMZ7h5O6Q1qqVdgxJm1PxV8CZ7FqIJk0WqHpX oCrzT3l8UV/DLYG6IugzlsS1MtPD1e9RjFPmkfeRiUoycKoZSIbgqg2R4gNXuMYAGTWChH cbXmGl5ovcKbCNEAooSTDolTU08OiOEc4jeAunXRK2dJIULJAYtsTbzPYBwH2FMPeTt1+4 cIXp79ye+o1IsJ/baiyhCJkRw6VeJbDt3j5HLX3UMNyBz4Gqx0RnmGBhMiA3hZ8lozgSYO 1QWiz+WSM3Etd8u3O7WBt9reZy+YmuAqzEREDM4HsQfcBssMik0eCNOXeKyIeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723216255; a=rsa-sha256; cv=none; b=maHdk2Gk0nwV3PfyHDw+xrfcHVFrivwfP+h63JLA1P4Zya3XOEjxnGAP57hLzjnPjHGVGn AgMljLVViYZy7VfuXG/oN7NLklRC/11BiD7SIXiAQH9Au8QWGS/vjZ1xzx942/zvqZ9xnu hpavBZ1nq47gDcc6R2bpM4+lUMQoe94PacCPI6bb3lpRnZ7Xgnm82+cMBzG7gX0eU3ggYL rtbAdaO1noxgxuUanEzu/Rt+GtJYBoLS8xpZkP/b4C3U5C0TXaLzxu7htiM7hRdYFE8E7G /V1HVxcaihVdApmrzd7P4Ez55keB7yq9IG6z7sHtlA+6+rRHsJdrby8m3n9SWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723216255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E1DnS4Ey2SGef2vZ7mAaXHwJmjwfuDORyUQpsuaqDRM=; b=LRVBDG/g9/ADWU5Lp+hZ5IrLmL1pfZWhXh9DqrA6PZR2eXU+HL5VU5uAr5LO5JDO5Hcd3t xKrZozse6RTTTjKnjJC+HNbBk8i3aUq0NF+7x5RiZSWWjspt7nVGQ+foUVlVpZl51m9pn3 N7cc6AJMZ5tCfLKNEz6bQL1uBv8tA998PwcDyxaNQAxfIywNU4rKVL+oukU2Tex1Rlko0E 7AciYFS2dCFA4tNaNQWdE7Mz4oaKltbXt58JreSm4nGR/pXJBCFswACYJpNGpURdJKQHJQ Eebm2i0x+LvrUUk7bH+aB15ISnScEcD5qM3PsZxwlZosnN9QZfPnCRlNqEGlTQ== Received: from [IPV6:2601:5c0:4200:b830:6c9f:1ef9:c118:3e3c] (unknown [IPv6:2601:5c0:4200:b830:6c9f:1ef9:c118:3e3c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WgS670QrpzVQt; Fri, 9 Aug 2024 15:10:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <5779dd3b-7134-4e72-bc8d-efa64cebddf0@FreeBSD.org> Date: Fri, 9 Aug 2024 11:10:52 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: fc43a1b6842a - stable/14 - tzsetup: symlink /etc/localtime instead of copying Content-Language: en-US To: "Sean C. Farley" , Ed Maste Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org References: <202408011538.471FcJDS026885@gitrepo.freebsd.org> <784ce21d-a604-bb91-c52e-29c78e2bb6e4@FreeBSD.org> From: John Baldwin In-Reply-To: <784ce21d-a604-bb91-c52e-29c78e2bb6e4@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/8/24 00:35, Sean C. Farley wrote: > On Thu, 1 Aug 2024, Ed Maste wrote: > >> The branch stable/14 has been updated by emaste: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=fc43a1b6842afa806dfd7ba48de5bece63d04456 >> >> commit fc43a1b6842afa806dfd7ba48de5bece63d04456 >> Author: Ed Maste >> AuthorDate: 2022-10-14 16:44:35 +0000 >> Commit: Ed Maste >> CommitDate: 2024-08-01 15:11:45 +0000 >> >> tzsetup: symlink /etc/localtime instead of copying >> >> Using a symlink means that new timezone data (installed by an errata >> update, say) will be usable without having to be copied again. >> >> Reviewed by: bapt, kevans, philip >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D37005 >> >> (cherry picked from commit 5e16809c953f4cd19fadb1767469dec319de0353) > > I ran across an issue with this when using "etcupdate -D" to update a > jail from the host. "tzsetup -r -C /tmp/chroot", as called by > etcupdate, prepends the path of the chroot to the link which breaks > things inside the jail. > > For example, if you run the following: > mkdir -p /tmp/chroot/etc > mkdir -p /tmp/chroot/usr/share > mkdir -p /tmp/chroot/var/db > ln -s /usr/share/misc /tmp/chroot/usr/share/misc > ln -s /usr/share/zoneinfo /tmp/chroot/usr/share/zoneinfo > cp /var/db/zoneinfo /tmp/chroot/var/db/. > tzsetup -C /tmp/chroot -r > > The result will be the following: > /tmp/chroot/etc/localtime@ -> /tmp/chroot//usr/share/zoneinfo/America/Indiana/Indianapolis Hmm, we also intentionally moved away from symlinks to copying many years ago. We added /var/db/zoneinfo so that tzsetup -r would know which file to copy into /etc after we moved away from the symlink I thought? It looks like tzsetup switched to copying by default longer ago than I remembered though in 1996 (commit c78cc02b89f6f5e562e5cf93d54faaa1bd79dfef), though that replaced an older change that switched from copying to symbolic links (2d71a1f121460406695c914b4f35e2e365010855). Presumably though -r shouldn't do anything if /etc/localtime is a symlink? I thought the only reason it was added was due to using copies: commit ada5f18a1b161e4fd99966444f85ca51d5a3fd8a Author: Edwin Groothuis Date: Tue Oct 20 06:54:31 2009 +0000 Instead of having to know which timezone was picked last time, you now can run "tzsetup -r" which will reinstall the last choice. This data is recorded in /var/db/zoneinfo. MFC after: 1 week Notes: svn path=/head/; revision=198267 -- John Baldwin