From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 9468A9171E for ; Thu, 15 Feb 2024 10:41:46 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 75A8E10365 for ; Thu, 15 Feb 2024 10:41:46 +0100 (CET) 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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 15 Feb 2024 10:41:45 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 6D8734836B for ; Thu, 15 Feb 2024 10:41:45 +0100 (CET) From: Friedrich Weber To: pve-devel@lists.proxmox.com Date: Thu, 15 Feb 2024 10:40:56 +0100 Message-Id: <20240215094056.66233-4-f.weber@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240215094056.66233-1-f.weber@proxmox.com> References: <20240215094056.66233-1-f.weber@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.085 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 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 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [conf.in] Subject: [pve-devel] [PATCH ceph master 3/3] buildsys: add check for changed ceph-osd sysctl settings X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Feb 2024 09:41:46 -0000 If the ceph-osd sysctl settings template (30-ceph-osd.conf.in) shipped by upstream changes, our ceph-osd postinst patch will need to be adapted to apply the new settings on package upgrade. To make sure we do not forget, store the current checksum of that file in our Makefile and fail the build early if the checksums do not match. Signed-off-by: Friedrich Weber --- Notes: - failing the build might be a bit drastic, but a simple warning seems too easy to overlook - strictly speaking we'll miss updates of `sysctl_pid_max` [1], but to catch this, we'd need to check the generated 30-ceph-osd.conf (without .in) after it is generated during the build process, and failing then sounds may be too annoying :) [1] https://github.com/ceph/ceph/blob/main/etc/sysctl/90-ceph-osd.conf.in Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 9c23cadc5..e99b3b356 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,11 @@ DEBS=$(MAIN_DEB) $(DEBS_REST) DSC=ceph_${PKGVER}.dsc +# ceph-osd postinst will need to be adjusted if the upstream 90-ceph-osd.conf.in +# changes to make sure new settings are applied on package upgrade +SYSCTL_CONF=etc/sysctl/90-ceph-osd.conf.in +SYSCTL_CONF_CHECKSUM=0e3b515c4a81a5b118dbc9e08baec0dbd2a460b781b655e1e84807ccfb5827b4 + all: ${DEBS} ${DBG_DEBS} @echo ${DEBS} @echo ${DBG_DEBS} @@ -90,6 +95,8 @@ ${BUILDSRC}: ${SRCDIR} patches deb: ${DEBS} ${DBG_DEBS} ${DEBS_REST} ${DBG_DEBS}: $(MAIN_DEB) $(MAIN_DEB): ${BUILDSRC} + @echo "${SYSCTL_CONF_CHECKSUM} ${BUILDSRC}/${SYSCTL_CONF}" | sha256sum -c || \ + (echo "sysctl settings file changed, adjust ceph-osd postinst and Makefile!"; exit 1) cd ${BUILDSRC}; dpkg-buildpackage -b -uc -us lintian ${DEBS} @echo ${DEBS} -- 2.39.2