From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <t.lamprecht@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 7F0AD8BBA8
 for <pbs-devel@lists.proxmox.com>; Fri, 26 Aug 2022 13:41:08 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 6F1852F478
 for <pbs-devel@lists.proxmox.com>; Fri, 26 Aug 2022 13:41:08 +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
 for <pbs-devel@lists.proxmox.com>; Fri, 26 Aug 2022 13:41:07 +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 005C243F48
 for <pbs-devel@lists.proxmox.com>; Fri, 26 Aug 2022 13:41:01 +0200 (CEST)
Message-ID: <80d91d02-36b9-4420-6bf5-73e4031d030d@proxmox.com>
Date: Fri, 26 Aug 2022 13:40:59 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101
 Thunderbird/104.0
Content-Language: en-GB
To: Proxmox Backup Server development discussion <pbs-devel@lists.proxmox.com>,
 =?UTF-8?Q?Fabian_Gr=c3=bcnbichler?= <f.gruenbichler@proxmox.com>
References: <20220822092404.323172-1-f.gruenbichler@proxmox.com>
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
In-Reply-To: <20220822092404.323172-1-f.gruenbichler@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
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%
 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
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: [pbs-devel] applied: [PATCH proxmox] build: use weak and namespaced
 features
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Fri, 26 Aug 2022 11:41:08 -0000

Am 22/08/2022 um 11:24 schrieb Fabian Gr=C3=BCnbichler:
> to reduce the creep of optional dependencies being exposed as features.=

>=20
> this requires cargo 0.63 (and debcargo built against at least that
> version), but greatly reduces the number of binary packages and provide=
s
> generated, while still allowing sensible selection of optional
> dependencies via the explicit feature meant for pulling them in.
>=20
> diff stat for running `make  deb` after this change:
>  proxmox-http/debian/control         | 226 ++++------------------------=
--------
>  proxmox-router/debian/control       |  74 +-----------
>  proxmox-schema/debian/control       |  53 ++-------
>  proxmox-subscription/debian/control |  17 +--
>  proxmox-sys/debian/control          |  51 +++-----
>  proxmox-tfa/debian/control          | 110 ++----------------
>  6 files changed, 72 insertions(+), 459 deletions(-)
>=20
> the 'dep:' prefix marks something on the RHS inside the features sectio=
n
> as dependency, it's only allowed if the string after it is an optional
> dependency an no explicit feature of the same name exists. if all
> pointers to the optional dependency in the features section are marked
> as such, the optional dependency itself will not be exposed as a featur=
e
> (either on the cargo or debian/control level).
>=20
> the '?' suffix marks dependencies as "weak", which only enables the
> optional dependency + its feature(s) if the optional dependency itself
> is also enabled. it has no effect on d/control since such a relationshi=
p
> is not encodable in Debian package relations, but it does affect cargo
> dependency resolution and allows skipping the build of unneeded optiona=
l
> dependencies in some cases.
>=20
> with no packages/crates depending on the no longer exposed automaticall=
y
> generated features/packages, so these are safe to remove even though
> it's technically a breaking change.
>=20
> Signed-off-by: Fabian Gr=C3=BCnbichler <f.gruenbichler@proxmox.com>
> ---
> sent as patch to wait for cargo 0.63 regressions before applying
>=20
>  proxmox-http/Cargo.toml         | 26 ++++++++++++++------------
>  proxmox-router/Cargo.toml       |  2 +-
>  proxmox-schema/Cargo.toml       |  4 ++--
>  proxmox-subscription/Cargo.toml |  2 +-
>  proxmox-sys/Cargo.toml          |  4 ++--
>  proxmox-tfa/Cargo.toml          |  6 +++---
>  6 files changed, 23 insertions(+), 21 deletions(-)
>=20
>

applied, thanks!