From unknown Sun Jul 27 05:19:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47361: mv: extended attributes discarded when moving to a different volume on macOS Resent-From: Daniel Smedegaard Buus Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 24 Mar 2021 12:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47361 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 47361@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161659032417346 (code B ref -1); Wed, 24 Mar 2021 12:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Mar 2021 12:52:04 +0000 Received: from localhost ([127.0.0.1]:34222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lP2zF-0004UI-Vy for submit@debbugs.gnu.org; Wed, 24 Mar 2021 08:52:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:46168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lP1SQ-0008Rs-97 for submit@debbugs.gnu.org; Wed, 24 Mar 2021 07:13:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP1SO-0000Sx-Cv for bug-coreutils@gnu.org; Wed, 24 Mar 2021 07:13:49 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:34639) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP1SL-0000kg-Q3 for bug-coreutils@gnu.org; Wed, 24 Mar 2021 07:13:48 -0400 Received: by mail-ed1-x536.google.com with SMTP id y6so27181633eds.1 for ; Wed, 24 Mar 2021 04:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=0dgEZdrlA0tyx/yhTQ92oQ/zp71FjD0WVa4gJWJagGQ=; b=I3Rt2zNCD7ff9Ksi5cnk3ImwAiZVyLyVuVjGvWzcVlYNuBDwNlXYGnBzhmMi0eirrP 62iSl4b6YPYqsRFHDx0YnqIldCLh7ytavm4jk2rVWJmogrl3QmwraG93bXV2ssNBhXC9 Wqnx4HocXhwC72GPkwDt5oMTx0+upRmiEM+O+1MIdyVNZAh4+uOTH1eUXsaNIYbs1lrU mCcXt2yzxaqWZVRXy2of9vNejyCFK5OSF1xiDtYmvnYYyc2cQanm98R47okPggouDKHv EVBIwPJK/eIS13AzFQzIleVH5FLPUMunZP6FeXY47S51ttPZ1OWIZHfQiXd5tqd2iIc9 BfEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0dgEZdrlA0tyx/yhTQ92oQ/zp71FjD0WVa4gJWJagGQ=; b=QT3a4swo7tRGgbJs8B03ba1KJCNi9sQS2o7en+9pngC5pzR1BMnCiUKmhTmmKUujB+ ZDq1utHP8i2VqFgakZYORpAXoKUaBNgsL2hBBAdlyJugKq0Cpg/Jau9okIMWCPLrdd/r bnYZyJkehZTEYFH6AEjEEcSe6ciR2xgHTRYzpPBqt89pzlxJPVK939xGSveQa9+isQo9 WCDUTca9AGhrEV0jyxuI15MGQvj206quNgSFUme+yl9ZQ6UcHJysYj/D0m317SLwJ9yo q2NOjpBZQiA/IAphpIxu4ax0VJ/aNwLH/q3Vb1KDnmmGlSuKIjEm47do3I/hFsRDHhS+ elRg== X-Gm-Message-State: AOAM5337sE3oGOUpD05FGgJtel/aDv3OXGrh6wQyg+aUKguIlxDtGWac Gem4bCX9AGq1vEjqyeX6ChRtoioURxMwmKr2w6IDy2TkH3M= X-Google-Smtp-Source: ABdhPJzvJGHzxEPqVNhV03olYPPBxiaMCqLa5SpLY/PYSqEeT3M2kDpaLYoL9f66Bd0OKNzWMr7qSAfbVKoMJFmzNEA= X-Received: by 2002:a50:e607:: with SMTP id y7mr2916216edm.18.1616584423262; Wed, 24 Mar 2021 04:13:43 -0700 (PDT) MIME-Version: 1.0 From: Daniel Smedegaard Buus Date: Wed, 24 Mar 2021 12:13:06 +0100 Message-ID: Content-Type: multipart/alternative; boundary="0000000000004c4eb405be466429" Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=danielbuus@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Wed, 24 Mar 2021 08:51:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --0000000000004c4eb405be466429 Content-Type: text/plain; charset="UTF-8" Hello :) I've been using Homebrewed coreutils on my Mac for a while, and recently switched to MacPorts. With both of these package manager, the version of `mv` that is built will discard extended attributes when moving an item from one volume to another, though moving within the same volume the attributes are retained (I assume because here moving is done by simply editing an inode). The `mv` version that is bundled with OS X does not have this shortcoming. My testing with Ubuntu also shows that this is not an issue there. I reported the bug to MacPorts, but was told that this is likely an upstream problem, so I should take it here :) Here's to hoping that's true :D To reproduce (here with MacPorts, coreutils 8.32. Volumes are JHFS+): daniel@titanic > xattr -w test fisso LICENSE daniel@titanic > xattr -p test LICENSE fisso daniel@titanic > which mv mv: aliased to /bin/mv daniel@titanic > mv LICENSE /Volumes/Scratch daniel@titanic > xattr -p test /Volumes/Scratch/LICENSE fisso daniel@titanic > /opt/local/libexec/gnubin//mv /Volumes/Scratch/LICENSE . daniel@titanic > xattr -p test LICENSE xattr: LICENSE: No such xattr: test Cheers, Daniel --0000000000004c4eb405be466429 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello :)

I've been using= Homebrewed coreutils on my Mac for a while, and recently switched to MacPo= rts. With both of these package manager, the version of `mv` that is built = will discard extended attributes when moving an item from one volume to ano= ther, though moving within the same volume the attributes are retained (I a= ssume because here moving is done by simply editing an inode). The `mv` ver= sion that is bundled with OS X does not have this shortcoming. My testing w= ith Ubuntu also shows that this is not an issue there.

=
I reported the bug to MacPorts, but was told that this is likely an up= stream problem, so I should take it here :) Here's to hoping that's= true :D

To reproduce (here with MacPorts, coreuti= ls 8.32. Volumes are JHFS+):

daniel@titanic &=
gt; xattr -w test fisso LICENSE
daniel@titanic > xattr -p test LICENSE
fisso
daniel@titanic > which mv
mv: aliased to /bin/mv
daniel@titanic > mv LICENSE /Volumes/Scratch
daniel@titanic > xattr -p test /Volumes/Scratch/LICENSE
fisso
daniel@titanic > /opt/local/libexec/gnubin//mv /Volumes/Scratch/LICENSE =
.
daniel@titanic > xattr -p test LICENSE
xattr: LICENSE: No such xattr: test

Cheers,<= /div>
Daniel
--0000000000004c4eb405be466429--