X-Loop: help-debbugs@HIDDEN
Subject: bug#47380: Atomic install of files
Resent-From: =?UTF-8?Q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD_?= =?UTF-8?Q?=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2?= <dilyan.palauzov@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-coreutils@HIDDEN
Resent-Date: Thu, 25 Mar 2021 10:11:01 +0000
Resent-Message-ID: <handler.47380.B.161666702232025 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 47380
X-GNU-PR-Package: coreutils
X-GNU-PR-Keywords:
To: 47380 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-coreutils@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.161666702232025
(code B ref -1); Thu, 25 Mar 2021 10:11:01 +0000
Received: (at submit) by debbugs.gnu.org; 25 Mar 2021 10:10:22 +0000
Received: from localhost ([127.0.0.1]:37194 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1lPMwX-0008KT-Ms
for submit <at> debbugs.gnu.org; Thu, 25 Mar 2021 06:10:21 -0400
Received: from lists.gnu.org ([209.51.188.17]:44902)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <dilyan.palauzov@HIDDEN>) id 1lPMwW-0008KM-Fn
for submit <at> debbugs.gnu.org; Thu, 25 Mar 2021 06:10:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42938)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <dilyan.palauzov@HIDDEN>)
id 1lPMwT-0000it-Jg
for bug-coreutils@HIDDEN; Thu, 25 Mar 2021 06:10:18 -0400
Received: from mail.aegee.org ([144.76.142.78]:47160)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <dilyan.palauzov@HIDDEN>)
id 1lPMwP-0000f4-3o
for bug-coreutils@HIDDEN; Thu, 25 Mar 2021 06:10:17 -0400
Authentication-Results: mail.aegee.org/12PA93uC2908071;
auth=pass (LOGIN) smtp.auth=didopalauzov@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aegee.org; s=k4096;
t=1616666949; i=dkim+MSA-tls@HIDDEN;
bh=1g2jlbpgXfU42pSmrTT1YxRtTg71liJS6pcywbT7Mf0=;
h=Subject:From:To:Date;
b=qcWjVL0Sl/2yuvOHweihr0Im6Hitqvq0ItJGtii8rVJVbZh5liddBfjdFieivH9rU
/CxVaqTPLFlN2DgpVZ2u6567LbDU5uUOSCivsAIPJb705cDNSpG/35Qz3zxXyk1Arc
STwE9FSqn0lbP6UztzjE4kiYOdpx58F+MCN6QBXbFTb1q/08kz65xl/tTiHRLm0Ah6
8k1NVOSmCmKs1GnYT3TUWO38zmaSStmVz8qrrY+7e5Pth99jxX0FNUUqeye+cSXdSv
kIoqFqsiSX1urFSXYQ/Wg9OQdw/TNOtPY6jE0FgAFsfeuNT7Cc3aJG/Q1oFKLncOUu
jM2KS9OArINDGUkr/6/6Fko7WO8yW2fAyM4EtO9i4c9niR485CrUr0b1XuyRmCqGK+
P9O6UIhwYZH90+q8P7tQzeN3XvjpmfjQg8E5R3LhZ4aVPnsbZjk65+CemKB9Dy9s9T
9pUoOgjNiTzdWrQRwwBKSH/GW4c//QekTbYSLa8XK4ILa0YPmVeIwUacf/biOrvklM
pj6GDimqD2tbXlidtapbCWxr3nmrkM1THKOvUV3S+q1PO5tI1clrCZlglngmjHpFe5
XM+BiVDrW2E4aTuIuwm+chYoQFqd3xy/7sj59SVeXH0KlraFgSBUjF7/TnfmrcivMn
rkX4k/9EyTuq8g/U+b93utpA=
Authentication-Results: mail.aegee.org/12PA93uC2908071; dkim=none
Received: from [192.168.0.199] (87.118.146.153.topnet.bg [87.118.146.153] (may
be forged)) (authenticated bits=0)
by mail.aegee.org (8.15.2/8.15.2) with ESMTPSA id 12PA93uC2908071
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO)
for <bug-coreutils@HIDDEN>; Thu, 25 Mar 2021 10:09:08 GMT
Message-ID: <33860614a8b0e453f5ad1ab7718d14cc30a4b139.camel@HIDDEN>
From: =?UTF-8?Q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD_?= =?UTF-8?Q?=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2?=
<dilyan.palauzov@HIDDEN>
Date: Thu, 25 Mar 2021 12:09:03 +0200
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.41.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: none client-ip=144.76.142.78;
envelope-from=dilyan.palauzov@HIDDEN; helo=mail.aegee.org
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, SPF_HELO_PASS=-0.001,
SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.3 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
Hello,
`make install` calls:
/usr/bin/install -c imap/.libs/httpd /usr/local/libexec/
and the syscalls behind are:
newfstatat(AT_FDCWD, "imap/.libs/httpd", {st_mode=S_IFREG|0755,
st_size=3362912, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/local/libexec/httpd", {st_mode=S_IFREG|0755,
st_size=3362912, ...}, AT_SYMLINK_NOFOLLOW) = 0
unlink("/usr/local/libexec/httpd") = 0
openat(AT_FDCWD, "imap/.libs/httpd", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=3362912, ...}) = 0
openat(AT_FDCWD, "/usr/local/libexec/httpd", O_WRONLY|O_CREAT|O_EXCL,
0600) = 4
fstat(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
ioctl(4, BTRFS_IOC_CLONE or FICLONE, 3) = -1 EOPNOTSUPP (Operation not
supported)
fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
mmap(NULL, 139264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7ff6aad05000
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\2\0>\0\1\0\0\0\260\343A\0\0\0\0\0"...,
131072) = 131072
write(4,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\2\0>\0\1\0\0\0\260\343A\0\0\0\0\0"...,
131072) = 131072
read(3,
"\377H\211\302H\213\205h\372\377\377\211\331H\211\306H\307\307\4\252\35
3\212\350t\0\6\0H\213E\340"..., 131072) = 131072
close(4) = 0
close(3) = 0
munmap(0x7ff6aad05000, 139264) = 0
lstat("/usr/local/libexec/httpd", {st_mode=S_IFREG|0600,
st_size=3362912, ...}) = 0
chmod("/usr/local/libexec/httpd", 0755) = 0
lstat("/usr/local/libexec/httpd", {st_mode=S_IFREG|0755,
st_size=3362912, ...}) = 0
That said, the installation is not atomic: the destination file is
opened, truncated, then bytes are written to it. During the
installation process, the initially executable file is not executable.
Cyrus IMAP is a server-software, which detect whenever its executable
files have changed, terminates the processes with the changed files and
starts the processes again, by re-executing the executables.
This does not work, if the file shall be started, while its content is
being copied: at this time the file is not executable and this is not
good.
• Please adjust `install` to first write the data to a temporary file
and at the end rename(2) the file to the destination, so that the
installation is atomic: the destination file is at all times
executable. (Or provide any means to achieve the atomic copy effect by
Automake)
Kind regards
Дилян
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: =?UTF-8?Q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD_?= =?UTF-8?Q?=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2?= <dilyan.palauzov@HIDDEN> Subject: bug#47380: Acknowledgement (Atomic install of files) Message-ID: <handler.47380.B.161666702232025.ack <at> debbugs.gnu.org> References: <33860614a8b0e453f5ad1ab7718d14cc30a4b139.camel@HIDDEN> X-Gnu-PR-Message: ack 47380 X-Gnu-PR-Package: coreutils Reply-To: 47380 <at> debbugs.gnu.org Date: Thu, 25 Mar 2021 10:11:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-coreutils@HIDDEN If you wish to submit further information on this problem, please send it to 47380 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 47380: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D47380 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 21 Feb 2022 09:54:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 21 04:54:09 2022 Received: from localhost ([127.0.0.1]:35089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1nM5OS-0004QH-Uo for submit <at> debbugs.gnu.org; Mon, 21 Feb 2022 04:54:09 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eggert@HIDDEN>) id 1nM5OQ-0004Pl-HA for control <at> debbugs.gnu.org; Mon, 21 Feb 2022 04:54:07 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 47F4C160103 for <control <at> debbugs.gnu.org>; Mon, 21 Feb 2022 01:54:00 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id EeoF-J7Yq3VB for <control <at> debbugs.gnu.org>; Mon, 21 Feb 2022 01:53:59 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 80CD2160106 for <control <at> debbugs.gnu.org>; Mon, 21 Feb 2022 01:53:59 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id G3xxhhAF1RK9 for <control <at> debbugs.gnu.org>; Mon, 21 Feb 2022 01:53:59 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 60C33160103 for <control <at> debbugs.gnu.org>; Mon, 21 Feb 2022 01:53:59 -0800 (PST) Message-ID: <302e53e9-8f10-b82c-6824-9ccec177df8d@HIDDEN> Date: Mon, 21 Feb 2022 01:53:59 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: control <at> debbugs.gnu.org From: Paul Eggert <eggert@HIDDEN> Organization: UCLA Computer Science Department Subject: coreutils bug reports Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) severity 47701 wishlist severity 53145 wishlist severity 50940 wishlist severity 49679 wishlist severity 49428 wishlist severity 47701 wishlist severity 47700 wishlist severity 47380 wishlist severity 47243 wishlist tags 47151 wontfix
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.