From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id EIcjNksP1GTKgwAASxT56A (envelope-from ) for ; Thu, 10 Aug 2023 00:12:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MCIyNUsP1GQbzQAAG6o9tA (envelope-from ) for ; Thu, 10 Aug 2023 00:12:27 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C233A5BB26 for ; Thu, 10 Aug 2023 00:12:27 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691619147; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=UomsLnXsOQwUQ5p7A420HsBZJ4FI7ffGEAej7A2+VXs=; b=C6shGLw/0Jszl97iad6xKKNMBVgkM2vCJbfZOdtRZHBPxlMfFL+V0Jnu+Y1cZRkx/kdR8b brawOvwcYwUgbPFm05JJ25hc33OTmLqYPXS6/CmD0gCNA9NKY2T4UyLmif2eAh/c7/g7RI MjV4f3M5fk0+E1hshHNAlVbmqZ9OAARXtpMupxkJS0RrwFV9OC5DW0/yYLfFRWPuMJKSBs o7vEdiqkWtLfOXk0Tox90CUwQup/hsAuNavkTwNhVS01IHJkNUxQnrPRapCRLxgBpN6iAW dlS5GDAM7zsGCuHr59dfa59N+17BVw6vE65YWB48VXquorjgbKk1b7p5WsOlxg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691619147; a=rsa-sha256; cv=none; b=A9MfE2j01oCB6jG4HHGmtsq53o3Z5j41b5rjYYF8tkxDViR3aX7Kx2OY92zRkaIG+zG7M+ IHboHrKa8eQWzLildDANGPaFSeXJiRP8PE4fyR5VniGlG9BfiWawwa+krsUhkde3hfX+XU kHg1UMkbe4/B40jiR+kO0SQwScD0TnM4wOgc72b2VO2mSw0DE2L/GnqStim/l74RK5DBUa 6YLlS486s1E4i+kde3/gjRILwoVqZSrMvJIaSn4ph1uTwZSohB/ipy9UY40IPV+Uhrm2ga HyIyg2FzFA73sUO+amd2iG8PERM355CsgLBvV0HFd6Y00P4kABbX8qMX/GIjHA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTrPS-0001mJ-VL; Wed, 09 Aug 2023 18:12:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTrPQ-0001m3-NE for help-guix@gnu.org; Wed, 09 Aug 2023 18:12:04 -0400 Received: from mout.kundenserver.de ([212.227.17.10]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTrPO-0002S7-Ko for help-guix@gnu.org; Wed, 09 Aug 2023 18:12:04 -0400 Received: from hermia.goebel-consult.de ([87.176.147.29]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mj831-1ppaVn3Dxl-00fD3b for ; Thu, 10 Aug 2023 00:11:58 +0200 Received: from [127.0.0.1] (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id E6F6866EBB for ; Thu, 10 Aug 2023 00:11:55 +0200 (CEST) Message-ID: <7310402d-a58e-e64e-97fb-48bdcef77b9b@crazy-compilers.com> Date: Thu, 10 Aug 2023 00:11:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: de-DE, en-US From: Hartmut Goebel Subject: Putting a file into system image ~user/ but not on reconfigure Organization: crazy-compilers.com To: help-guix X-Provags-ID: V03:K1:oXZzjTd9I46EMgPFTLImLEXg3eYtNzZwWnp/xQaWcCreZNPfJ6b a//OEJrzQ69fe5AELpEUWLir+P8beGr6yWtDjceXO9KD6gkIzMCHLMjk+fgCpaAsY2gIh3j rQRS3mDSOSLGB44rfbBtbSY5kO61C7xW+2phmg/nBjXYjSwmtIwi3dvRg529Zpx53oM+iX9 n0r73mA2HqHm6kp/QO3kg== UI-OutboundReport: notjunk:1;M01:P0:B0C5Ei+2MTA=;P5rtBgLZHSg0I1++Pf6QXLmjX3Y rif5zB5TJi8u5wLgatnGh0OqddIVrkeqtEW70AI+WCd4GVIHIjJ5Pgiq8obhrTnqmnkH6bPk3 cO++nswyq4NucoBDRWovLD7FbcaUYwF2aVF6QgH8jB604GMh2VkCSgVvrRAkX5zsKWn8aiEMA sqzTUy84Y6gSIddseV4HV/UEMtuvah2goq20C8FKmEDqGMi8MR4HtGP1dlLnF/+GmQjNxVVPg b6hrdbGGeMDAlEoS8hYSFlWlNVtOBa28Im6y1xu1b2qroV3AP0h2jBLLbf/q8EnoU6VkJ5jUm 6OTwd4jhbDhWjYa9iwhSdnQjW/qRPOIrDuInqSgUG7Qv52AFWL1LuYG/yhux4XV7jFH3X+w/D wm3MVY3X+rxcodxWlPGLxDNgz9ycOTseW8JW3xgD3Zwuc4pqNq+JxCGtNWDmntxp6Z396W6aB FI7JrryVE7aknoxd46VnAWgnGvgBvhrkHF8Ak9tsUnPT8W4Rxemf9OGPvGhM9qgo0zY0yvAyz TPuAW1sdGp9T3FklrcMsfks0nHdKLmuZ2w7IyVdFj9Ylf5wkGN0aHFjEF8xG0YQX2jj1PaI5d 9pKli38ENDnQAbMiuhzW14vZ2banwTx4mkV/CcsgxkX8Bp/P4jVqFBXVdGMpoX2MXiLLt+W1B OfRCoI0ysYbr1/H9lWu70BBfWVRApCovEhTZfSUolMMmkRvhCR+izkCxxQdZMMPMA0gfdEa1p 0K/grG4dB1gk9uZKowbNMpHMYqtBxbuP4LmCf565mT+ejb4f7u2ksc4WP0pduXYc8+Gm2D1zA e8Pm6RfnAjk2uAe2AylXnvpieeym9KSqq1eC+ncqf40wytVSjnQ7rQ8EqZENuUE6nK0KZqw1G KO3jtR83Mjgbqmg== Received-SPF: pass client-ip=212.227.17.10; envelope-from=h.goebel@crazy-compilers.com; helo=mout.kundenserver.de X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: C233A5BB26 X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: -2.13 X-Migadu-Spam-Score: -2.13 X-TUID: SXgEx0ehKrNN Hi, sorry for the hard to understand subject. I need to put a file into a system image (into ~user) which will not be recreated or touched when running "system reconfigure" later, even if not existent. So this is some kind of "one-time service", removing itself on first boot. Any ideas how to do this? (One could imagine some self-destructing script creating the file. Anyhow AFAIK this script would be recreated on next "system reconfigure". Als leaving some "script was run" marker is a bad option, as removing the marker would recreate the file, which is to be avoided.) Background: I aim to create Vagrant boxes (machine templates) based on guix system images. This works quite well so far, using image format qcow2, putting the image and some simple files at the right place and the vagrant-libvirt plugin for running the machine. Using a symlink I can even avoid copying the boxes disk image out of the store — vagrant will create a copy when creating a machine anyway. Now for vagrant being able to log into the machine when starting it (and eventually "provision" the machine = execute some commands) boxes are expected to include an "insecure ssh key" in ~vagrant/.ssh/authorized_keys. Vagrant will replace this key by another one when creating a machine. So this behavior is reasonable secure. One possible solution I found (not yet tested and tools not yet in guix) is to use one of the guestfstools ([1]https://libguestfs.org/) to copy the file into the image. Anyhow this would require copying the box out of the store to get a writable file. -- Regards Hartmut Goebel | Hartmut Goebel | [2]h.goebel@crazy-compilers.com | | [3]www.crazy-compilers.com | compilers which you thought are impossible | References 1. https://libguestfs.org/ 2. mailto:h.goebel@crazy-compilers.com 3. http://www.crazy-compilers.com/