From nobody Wed Jun 21 02:47:25 2023 X-Original-To: bugs@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 4Qm7Fn3zXWz4gTNr for ; Wed, 21 Jun 2023 02:47:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qm7Fn2F7cz3HnX for ; Wed, 21 Jun 2023 02:47:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687315645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BWf5hYns2LfFXvM2tTPz+PP/f+ZKNGGFvgybLJhSvz0=; b=ewcthJOEUMbhF5txRBy0ogbnh4VnqxOB9FcjN1YVP79njXBBFK2UgaG5gNmBWxpAt6nCJH 0bxmoT3w7qvuUMqJXZYrijpDp5LAHKpZ9pdyRh60t0sppsLEZiLwWm30cFpW+WlTYyMYa+ t887Xdm3sGwPIZslpsoexdvm+JxXSavCxVYiAeDsyrQYLEubgymr8UQJDKfe7YUfi6cpPY Ra1hie+gRzzsQ2QXDRxM0NceYRt+Ajy+biCvQDOZSwcIT6jtv8iLl+s7qfq2ih3/5yH2vl TSxOMbORfNeGCVK2ffhMhaBdi9OU7e12Y9P0UV7eocyw0RqzCQCXZEiE34g9eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687315645; a=rsa-sha256; cv=none; b=s6yd5ZmRf/4jaMkNTzP8FoDnrLbgJ3fpYVbZ0GX6ycA0/UZ4wPv+yNCmICaqxscu5yJAk/ 6h6m3x7QNIj5AdT3QcAagMUwSu/M/CKZtEKc+49w3o8XMF51WH+sMHKF4q2JqjlENFV2VH Nc2gDWQG5a6Jhn0CI5fd+NMxZz7F5Gii4Xuql4NN5bgNf16MdJyZAGXsIJ4gen6tDKomqo L7uLtYM5+Eo/sz7apQijD5xhW36I6kJnk3UAh5iFubhg2GeCLil+ZHSPFaL1WVEKjSF+6d 9eM8lUSSWNSs7xFLisEG7bI2Ylk+VdIeVLYzHHhKa04e1y4WQXERV013wXifaQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qm7Fn1KwlzPtv for ; Wed, 21 Jun 2023 02:47:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 35L2lP1N033239 for ; Wed, 21 Jun 2023 02:47:25 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 35L2lPVT033238 for bugs@FreeBSD.org; Wed, 21 Jun 2023 02:47:25 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272120] touch(1) -r modifies file's birthtime Date: Wed, 21 Jun 2023 02:47:25 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: danfe@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272120 Bug ID: 272120 Summary: touch(1) -r modifies file's birthtime Product: Base System Version: 13.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: danfe@FreeBSD.org touch(1) goes beyond what would one expect and what is documented in the manpage: -m Change the modification time of the file. The access time of the file is not changed unless the -a flag is also specified. -r Use the access and modifications times from the specified file instead of the current time of day. I'm seeing this on both UFS and ZFS: $ cp -ai /some/real/file somefile $ stat -x somefile | tail -4 Access: Sun Aug 11 22:06:44 2019 Modify: Sun Aug 11 22:06:48 2019 <-- created, written, closed Change: Wed Jun 21 10:30:56 2023 Birth: Sun Aug 11 22:06:48 2019 <-- it's an old file $ echo blah >> somefile $ stat -x somefile | tail -4 Access: Sun Aug 11 22:06:44 2019 Modify: Wed Jun 21 10:31:21 2023 <-- we've just modified it Change: Wed Jun 21 10:31:21 2023 Birth: Sun Aug 11 22:06:48 2019 <-- remains the same (correct) $ touch -m -r /.rnd somefile <-- /.rnd is from 2014 $ stat -x somefile | tail -4 Access: Sun Aug 11 22:06:44 2019 Modify: Mon Jan 13 17:19:43 2014 <-- this is fine (expected) Change: Wed Jun 21 10:31:42 2023 Birth: Mon Jan 13 17:19:43 2014 <-- WTF?! --=20 You are receiving this mail because: You are the assignee for the bug.=