Received: from gw1-wb.hafenthal.de (gw1-wb.hafenthal.de [212.185.86.82]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id D78322223A0 for <~alpine/users@lists.alpinelinux.org>; Fri, 5 Sep 2025 18:05:20 +0000 (UTC) Received: from MAILRELAY-RZ.hafenthal.de (localhost.localdomain [127.0.0.1]) by MAILRELAY-RZ.hafenthal.de (Postfix) with ESMTPS id 17802A80233 for <~alpine/users@lists.alpinelinux.org>; Fri, 05 Sep 2025 18:05:20 +0000 (UTC) Received: from GROUPWARE-S18.hafenthal.de (GROUPWARE-S18.hafenthal.de [10.18.8.20]) by gw1-wb.hafenthal.de (Postfix) with ESMTPS id E406AA80050 for <~alpine/users@lists.alpinelinux.org>; Fri, 05 Sep 2025 18:05:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by GROUPWARE-S18.hafenthal.de (Postfix) with ESMTP id 3C684204F0 for <~alpine/users@lists.alpinelinux.org>; Fri, 5 Sep 2025 20:05:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hafenthal.de; h= content-transfer-encoding:in-reply-to:from:references:to:subject :mime-version:date:message-id; s=dkim1; t=1757095518; x= 1758909919; bh=/xVJANP/OL5NPJepqoLU1jUjOU6Hh+tsFhX379VtQjM=; b=b vd8ZG568zZuGQOQQm1F2MgLumRlFpKbPCKZe+/VSpsSn0TvgLkOIE9coCJKpX4y5 WIH8dYWTmoe/3TCy9+yFvYf6i7UfaVWSjNYlgBK9rTfHXqPRrfHqWMSm+QqvWbwy U8/UuPI4r7spDqCgvVbk0oEmX38cb7EAeS0N89iOgM= X-Virus-Scanned: Debian amavisd-new at GROUPWARE-S18.hafenthal.de Received: from GROUPWARE-S18.hafenthal.de ([127.0.0.1]) by localhost (groupware-s18.hafenthal.de [127.0.0.1]) (amavisd-new, port 10041) with ESMTP id lHWTSpl4yHpN for <~alpine/users@lists.alpinelinux.org>; Fri, 5 Sep 2025 20:05:18 +0200 (CEST) Received: from [10.18.16.35] (DTR15.hafenthal.de [10.18.16.35]) by GROUPWARE-S18.hafenthal.de (Postfix) with ESMTPSA id 8D5DE20158 for <~alpine/users@lists.alpinelinux.org>; Fri, 5 Sep 2025 20:05:18 +0200 (CEST) Message-ID: <9ac76b85-761d-401f-ac7c-e32bd30bd5b3@hafenthal.de> Date: Fri, 5 Sep 2025 20:05:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: lbu overlays kept in the /tmp directory Content-Language: en-US, de-DE To: ~alpine/users@lists.alpinelinux.org References: From: Stefan Hartmann SH Organization: =?UTF-8?Q?Ingenieurb=C3=BCro_Hartmann_-_ib=2Ehafenthal=2Ede?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 05/09/2025 16:34, Jerome Marc wrote: > Hello, > > I run 3.22.1 on a RPI and I use a dedicated partition for lbu and apk cache. > I noticed that every time I run 'lbu ci' the overlay file is created in > a temporary folder but it's not removed automatically. > I don't see any evidence of error : files are copied into the partition > and there is no error message in the log files > > Is that a normal behaviour ? > > Thank you Recently I noticed the same behaviour. I am running many Alpine systems with persistent disk and use lbu pkg to create a staged backup, so there are a lot of annoying lbu-* dirs in /tmp on long running systems. Eventually also a security impact in some bad circumstances. I made a workaround for me but havent got time now to commit the changes at the appropriate place. It could be as follow: #1 in the shell script or better in the sourced libalpine.sh clean_tmpdir() { if [ -n "$1" ] && [ "$( dirname "$1" )" = '/tmp' ] && basename "$1" | grep -Eq "^$PROGRAM-.+"; then rm -r "$1" || eecho "failed to clean tmpdir" fi } #2 in cmd_package(), cmd_status(), cmd_diff() ... clean_tmpdir "${tmpdir}" or clean_tmpdir "${tmp}" Also I have a second improvement with RUN_LBU_PRE_POST_PACKAGE="true" # dont run pre-post-backup on cmd_status, cmd_diff -- Stefan Hartmann - ib.hafenthal.de