From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 47F00158041 for ; Tue, 20 Feb 2024 04:39:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5B1322BC024; Tue, 20 Feb 2024 04:39:15 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 09FAD2BC014 for ; Tue, 20 Feb 2024 04:39:15 +0000 (UTC) References: <20240219220832.25919-1-robbat2@gentoo.org> User-agent: mu4e 1.10.8; emacs 30.0.50 From: Sam James To: gentoo-dev@lists.gentoo.org Cc: "Robin H. Johnson" Subject: Re: [gentoo-dev] [PATCH] check-reqs.eclass: more disk checks Date: Tue, 20 Feb 2024 04:38:31 +0000 Organization: Gentoo In-reply-to: <20240219220832.25919-1-robbat2@gentoo.org> Message-ID: <87msrvlpg2.fsf@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Archives-Salt: fbe7e4da-dc63-4b74-943f-01036d29de69 X-Archives-Hash: cdd5fd9844d3539f35658bdc0722f5d8 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable "Robin H. Johnson" writes: > Allow checking more disk space, for users with many split volumes and > ever-larger packages. > > gentoo-kernel-bin: > / >=3D350MB/version (in /lib/modules) > /boot >=3D40MB/version > > rust-bin: > /opt >=3D450MB/version > LGTM, but give a bit of time for other comments. > Signed-off-by: Robin H. Johnson > --- > eclass/check-reqs.eclass | 44 +++++++++++++++++++++++++++++++++++++++- > 1 file changed, 43 insertions(+), 1 deletion(-) > > diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass > index fac2f4553d74..7b65f44e8c41 100644 > --- a/eclass/check-reqs.eclass > +++ b/eclass/check-reqs.eclass > @@ -24,12 +24,21 @@ > # # need this much temporary build space > # CHECKREQS_DISK_BUILD=3D"2G" > # > +# # install will need this much space in / > +# CHECKREQS_DISK_ROOT=3D"1G" > +# > +# # install will need this much space in /boot > +# CHECKREQS_DISK_BOOT=3D"128M" > +# > # # install will need this much space in /usr > # CHECKREQS_DISK_USR=3D"1G" > # > # # install will need this much space in /var > # CHECKREQS_DISK_VAR=3D"1024M" > # > +# # install will need this much space in /opt > +# CHECKREQS_DISK_OPT=3D"1G" > +# > # @CODE > # > # If you don't specify a value for, say, CHECKREQS_MEMORY, then the test= is not > @@ -56,6 +65,16 @@ _CHECK_REQS_ECLASS=3D1 > # @DESCRIPTION: > # How much diskspace is needed to build the package? Eg.: CHECKREQS_DISK= _BUILD=3D2T >=20=20 > +# @ECLASS_VARIABLE: CHECKREQS_DISK_ROOT > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# How much space in / is needed to install the package? Eg.: CHECKREQS_D= ISK_ROOT=3D1G > + > +# @ECLASS_VARIABLE: CHECKREQS_DISK_BOOT > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# How much space in /boot is needed to install the package? Eg.: CHECKRE= QS_DISK_BOOT=3D128M > + > # @ECLASS_VARIABLE: CHECKREQS_DISK_USR > # @DEFAULT_UNSET > # @DESCRIPTION: > @@ -66,6 +85,11 @@ _CHECK_REQS_ECLASS=3D1 > # @DESCRIPTION: > # How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3D3000M >=20=20 > +# @ECLASS_VARIABLE: CHECKREQS_DISK_OPT > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# How much space is needed in /opt? Eg.: CHECKREQS_DISK_OPT=3D1G > + > # @ECLASS_VARIABLE: CHECKREQS_DONOTHING > # @USER_VARIABLE > # @DEFAULT_UNSET > @@ -121,8 +145,11 @@ _check-reqs_prepare() { >=20=20 > if [[ -z ${CHECKREQS_MEMORY} && > -z ${CHECKREQS_DISK_BUILD} && > + -z ${CHECKREQS_DISK_ROOT} && > + -z ${CHECKREQS_DISK_BOOT} && > -z ${CHECKREQS_DISK_USR} && > - -z ${CHECKREQS_DISK_VAR} ]]; then > + -z ${CHECKREQS_DISK_VAR} && > + -z ${CHECKREQS_DISK_OPT} ]]; then > eerror "Set some check-reqs eclass variables if you want to use it." > eerror "If you are user and see this message file a bug against the pa= ckage." > die "${FUNCNAME}: check-reqs eclass called but not actually used!" > @@ -161,6 +188,16 @@ _check-reqs_run() { > fi >=20=20 > if [[ ${MERGE_TYPE} !=3D buildonly ]]; then > + [[ -n ${CHECKREQS_DISK_ROOT} ]] && \ > + _check-reqs_disk \ > + "${EROOT%/}/" \ > + "${CHECKREQS_DISK_ROOT}" > + > + [[ -n ${CHECKREQS_DISK_BOOT} ]] && \ > + _check-reqs_disk \ > + "${EROOT%/}/boot" \ > + "${CHECKREQS_DISK_BOOT}" > + > [[ -n ${CHECKREQS_DISK_USR} ]] && \ > _check-reqs_disk \ > "${EROOT%/}/usr" \ > @@ -170,6 +207,11 @@ _check-reqs_run() { > _check-reqs_disk \ > "${EROOT%/}/var" \ > "${CHECKREQS_DISK_VAR}" > + > + [[ -n ${CHECKREQS_DISK_OPT} ]] && \ > + _check-reqs_disk \ > + "${EROOT%/}/opt" \ > + "${CHECKREQS_DISK_OPT}" > fi > } --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOUEARYKAI0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCZdQs7V8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MA8cc2FtQGdlbnRv by5vcmcACgkQc4QJ9SDfkZAlbgEAic0TUyImiexKuXfKypOcfcRYJDfVmLKu+csv 67lZXagBANyqmdw0lZfqkbgCzweEoTpEt1Ebhb2f1BKKUPw14qAB =CqJn -----END PGP SIGNATURE----- --=-=-=--