From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <f.gruenbichler@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id D8D6875B46
 for <pve-devel@lists.proxmox.com>; Thu, 22 Apr 2021 15:27:20 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id CC56E1C59F
 for <pve-devel@lists.proxmox.com>; Thu, 22 Apr 2021 15:27:20 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id C36EB1C594
 for <pve-devel@lists.proxmox.com>; Thu, 22 Apr 2021 15:27:19 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 8A7B84200F
 for <pve-devel@lists.proxmox.com>; Thu, 22 Apr 2021 15:27:13 +0200 (CEST)
Date: Thu, 22 Apr 2021 15:27:04 +0200
From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <20210422111801.4193-1-s.ivanov@proxmox.com>
 <20210422111801.4193-2-s.ivanov@proxmox.com>
In-Reply-To: <20210422111801.4193-2-s.ivanov@proxmox.com>
MIME-Version: 1.0
User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid)
Message-Id: <1619097687.yzh3fxrp30.astroid@nora.none>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.057 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [proxmox.com]
Subject: Re: [pve-devel] [PATCH pve-kernel-meta 1/7] proxmox-boot-tool:
 rename from pve-efiboot-tool
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>
X-List-Received-Date: Thu, 22 Apr 2021 13:27:20 -0000

On April 22, 2021 1:17 pm, Stoiko Ivanov wrote:
> We will be using the mechanics also for ZFS systems booting with BIOS
> legacy boot, and the tool is used also in PMG and PBS.
>=20
> A symlink is kept in place for compatibility reasons
>=20
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
>  Makefile                                                      | 2 +-
>  bin/Makefile                                                  | 2 +-
>  bin/{pve-efiboot-tool =3D> proxmox-boot-tool}                   | 2 +-
>  debian/pve-kernel-helper.install                              | 4 ++--
>  debian/pve-kernel-helper.links                                | 1 +
>  {efiboot =3D> proxmox-boot}/Makefile                            | 4 ++--
>  {efiboot =3D> proxmox-boot}/functions                           | 0
>  efiboot/pve-auto-removal =3D> proxmox-boot/proxmox-auto-removal | 0
>  efiboot/pve-efiboot-sync =3D> proxmox-boot/proxmox-boot-sync    | 2 +-
>  efiboot/zz-pve-efiboot =3D> proxmox-boot/zz-proxmox-boot        | 0
>  10 files changed, 9 insertions(+), 8 deletions(-)
>  rename bin/{pve-efiboot-tool =3D> proxmox-boot-tool} (99%)
>  create mode 100644 debian/pve-kernel-helper.links
>  rename {efiboot =3D> proxmox-boot}/Makefile (87%)
>  rename {efiboot =3D> proxmox-boot}/functions (100%)
>  rename efiboot/pve-auto-removal =3D> proxmox-boot/proxmox-auto-removal (=
100%)
>  rename efiboot/pve-efiboot-sync =3D> proxmox-boot/proxmox-boot-sync (84%=
)
>  rename efiboot/zz-pve-efiboot =3D> proxmox-boot/zz-proxmox-boot (100%)

these three files are installed as five conffiles, so they need special=20
care when being renamed/moved, see `man dpkg-maintscript-helper`.=20
alternatively we could also just unconditionally remove them on=20
upgrades I guess.

otherwise the old ones will stay around on upgrades, and also be=20
called..

>=20
> diff --git a/Makefile b/Makefile
> index 0b62b3e..90d5989 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -13,7 +13,7 @@ BUILD_DIR=3Dbuild
> =20
>  DEBS=3D${KERNEL_DEB} ${HEADERS_DEB} ${HELPER_DEB}
> =20
> -SUBDIRS =3D efiboot bin
> +SUBDIRS =3D proxmox-boot bin
> =20
>  .PHONY: all
>  all: ${SUBDIRS}
> diff --git a/bin/Makefile b/bin/Makefile
> index 058c86f..b78fa42 100644
> --- a/bin/Makefile
> +++ b/bin/Makefile
> @@ -5,7 +5,7 @@ all:
> =20
>  install:
>  	install -d ${SBINDIR}
> -	install -m 0755 pve-efiboot-tool ${SBINDIR}/
> +	install -m 0755 proxmox-boot-tool ${SBINDIR}/
> =20
>  .PHONY: clean distclean
>  distclean:
> diff --git a/bin/pve-efiboot-tool b/bin/proxmox-boot-tool
> similarity index 99%
> rename from bin/pve-efiboot-tool
> rename to bin/proxmox-boot-tool
> index f57a752..2d625a6 100755
> --- a/bin/pve-efiboot-tool
> +++ b/bin/proxmox-boot-tool
> @@ -199,7 +199,7 @@ clean() {
> =20
>  refresh() {
>  	hook=3D$1
> -	hookscripts=3D'pve-auto-removal zz-pve-efiboot'
> +	hookscripts=3D'proxmox-auto-removal zz-proxmox-boot'
> =20
>  	if [ -n "$hook" ]; then
>  	    if echo "$hookscripts" | grep -sqE "(^|[[:space:]]+)$hook([[:space:=
]]+|$)"; then
> diff --git a/debian/pve-kernel-helper.install b/debian/pve-kernel-helper.=
install
> index 6f7f713..aae9494 100644
> --- a/debian/pve-kernel-helper.install
> +++ b/debian/pve-kernel-helper.install
> @@ -1,5 +1,5 @@
>  etc/kernel/postinst.d/*
>  etc/kernel/postrm.d/*
> -etc/initramfs/post-update.d/pve-efiboot-sync
> -usr/sbin/pve-efiboot-tool
> +etc/initramfs/post-update.d/proxmox-boot-sync
> +usr/sbin/proxmox-boot-tool
>  usr/share/pve-kernel-helper/scripts/functions
> diff --git a/debian/pve-kernel-helper.links b/debian/pve-kernel-helper.li=
nks
> new file mode 100644
> index 0000000..70bf372
> --- /dev/null
> +++ b/debian/pve-kernel-helper.links
> @@ -0,0 +1 @@
> +/usr/sbin/proxmox-boot-tool /usr/sbin/pve-efiboot-tool
> diff --git a/efiboot/Makefile b/proxmox-boot/Makefile
> similarity index 87%
> rename from efiboot/Makefile
> rename to proxmox-boot/Makefile
> index fc9e333..3a36cb7 100644
> --- a/efiboot/Makefile
> +++ b/proxmox-boot/Makefile
> @@ -1,5 +1,5 @@
> -KERNEL_HOOKSCRIPTS =3D pve-auto-removal zz-pve-efiboot
> -INITRAMFS_HOOKSCRIPTS =3D pve-efiboot-sync
> +KERNEL_HOOKSCRIPTS =3D proxmox-auto-removal zz-proxmox-boot
> +INITRAMFS_HOOKSCRIPTS =3D proxmox-boot-sync
>  SHARE_FILES =3D functions
> =20
>  POSTINSTHOOKDIR =3D ${DESTDIR}/etc/kernel/postinst.d
> diff --git a/efiboot/functions b/proxmox-boot/functions
> similarity index 100%
> rename from efiboot/functions
> rename to proxmox-boot/functions
> diff --git a/efiboot/pve-auto-removal b/proxmox-boot/proxmox-auto-removal
> similarity index 100%
> rename from efiboot/pve-auto-removal
> rename to proxmox-boot/proxmox-auto-removal
> diff --git a/efiboot/pve-efiboot-sync b/proxmox-boot/proxmox-boot-sync
> similarity index 84%
> rename from efiboot/pve-efiboot-sync
> rename to proxmox-boot/proxmox-boot-sync
> index c3ccf8e..5bdd72e 100644
> --- a/efiboot/pve-efiboot-sync
> +++ b/proxmox-boot/proxmox-boot-sync
> @@ -7,5 +7,5 @@ set -e
>  # this variable will be set to 1 and we do nothing, since our pve-kernel
>  # hooks will update the ESPs all at once anyway.
>  if [ -z "$INITRAMFS_TOOLS_KERNEL_HOOK" ]; then
> -	/usr/sbin/pve-efiboot-tool refresh --hook 'zz-pve-efiboot'
> +	/usr/sbin/proxmox-boot-tool refresh --hook 'zz-proxmox-boot'
>  fi
> diff --git a/efiboot/zz-pve-efiboot b/proxmox-boot/zz-proxmox-boot
> similarity index 100%
> rename from efiboot/zz-pve-efiboot
> rename to proxmox-boot/zz-proxmox-boot
> --=20
> 2.20.1
>=20
>=20
>=20
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>=20
>=20
>=20
=