From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id DB2FE1FF161
	for <inbox@lore.proxmox.com>; Wed, 18 Dec 2024 08:29:01 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 986F4FC7D;
	Wed, 18 Dec 2024 08:29:11 +0100 (CET)
Message-ID: <7b180c9a-eca6-44ae-97ac-fff8770e4a02@proxmox.com>
Date: Wed, 18 Dec 2024 08:29:08 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Christoph Heiss <c.heiss@proxmox.com>
References: <20241211092436.69088-1-d.kral@proxmox.com>
 <D6AHH8D940P7.3M53T2TUAZGMN@proxmox.com>
Content-Language: en-US
From: Daniel Kral <d.kral@proxmox.com>
In-Reply-To: <D6AHH8D940P7.3M53T2TUAZGMN@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.004 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pve-devel] [PATCH installer v2] auto: allow a binary
 executable as the first boot executable
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

On 12/13/24 11:00, Christoph Heiss wrote:
> The "Automated Installation" page needs to be updated though, to
> reflect:
> 
> a) that either shell-scripts or compiled binaries can be used and
> b) that the compiled binaries must be (obviously) x86_64 and best case
>     statically linked, as there otherwise no guarantees that it will run
>     on the target system and might just fail blindly.

Thanks for taking a second look at this! I've added the following to the 
"Automated Installation" page:

```diff
@@ -233,7 +233,7 @@

  === First Boot Hook Section ===

-Optional. It can be used to configure a script to run on the first boot 
of the new system after a successful installation.
+Optional. It can be used to configure a shell script or a compiled 
binary to run on the first boot of the new system after a successful 
installation.

  If configured, this installs an additional package named 
<code>proxmox-first-boot</code>. After booting the new system for the 
first time, this package can safely be removed using <code>apt purge 
proxmox-first-boot</code>.

@@ -250,6 +250,8 @@

  {{Note| The maximum executable file size is 1 MiB, for both 
integrating it into the ISO and fetching it from a URL.}}

+{{Note| Compiled binaries must target x86_64 Linux and should be 
statically linked, as there are no guarantees for libraries installed on 
the first boot.}}
+
  === Answer File Validation ===

  The <code>proxmox-auto-install-assistant</code> tool can also be used 
to validate the syntax of an answer file and display the identifying 
information that will be sent to the HTTP(s) server when fetching the 
answer file.
```

On 12/13/24 11:00, Christoph Heiss wrote:
> FWIW, just thinking out loud here: Maybe the fetching of the first-boot
> hook should be moved into `proxmox-fetch-answer` altogether. In a sense
> that `proxmox-fetch-answer` would fetch all the needed things in
> advance, such that the auto-installer, post-hook etc. doesn't have to do
> that anymore.
> But that's really not pressing of any kind, rather a long-term thing.

Sounds like a good idea! If you've got other things to do, I can take a 
look at this before the next release for sure.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel