From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7120559452426600448 X-Received: by 2002:a67:e89a:0:b0:357:610e:42af with SMTP id x26-20020a67e89a000000b00357610e42afmr5938682vsn.79.1657892673932; Fri, 15 Jul 2022 06:44:33 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a67:c499:0:b0:357:1c85:9452 with SMTP id d25-20020a67c499000000b003571c859452ls127206vsk.1.-pod-prod-gmail; Fri, 15 Jul 2022 06:44:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uZTCq//ga9vM44bRMdo6LA/8kWn5q6M/XhTUHNT0Qm0X5w5UhTblCZRLZlv/aXoy9VLbH+ X-Received: by 2002:a67:e108:0:b0:357:27ed:ce52 with SMTP id d8-20020a67e108000000b0035727edce52mr5906685vsl.27.1657892673247; Fri, 15 Jul 2022 06:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657892673; cv=none; d=google.com; s=arc-20160816; b=ZFzZXIrxQTibFMaHepKN8rhO2HKYB9dhxIejZAnD6/caP4qiRbZ5AtLtmQCsYpJPom B3+d/8LkETGmuKjIRwdIAX/vd5zjOJAuK3wii3X7UmibQyDFzflPTGq4aCbhpco/KfHo scvPeIOPD53Tya/9ctJatsTkVCCD3GH/3K4CKrklV0vSAj2HkdTf5DXd+V0ajpX7s7CW ll4cMGYb9RBUEzmKNivMAw5TuNX2feQLkrLNjCTiVlKrtUteTSxao9LZMJXKR7g2LvqY WAOcoLfpa+8I3gYmoH7QxDZBDbezN7p/XT93F3FpUHKqCiKMcB5/zG6C/rLh8YmGwxbd QNeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=P0av4svdGKG60fxDwpTBOyL947zCQgmlBcuWlPKTnlg=; b=tNZWiGtashMz5wRbGiaHK/t9g4o9QtMuvvPKSLLEjdVTFJwu7QMkhEswEdyFVEz07y u9WlnG05rztP4we6/lhLS8fX9fRfTUr+KoJxY0BEPyOdCALVGXDi26DUdXKxZEoX+O1f drkufg4f55OiixOk4OJ5lfHHvIelm53v/ykFu8DcD6fqOh/pi8WboQchOmzEIMj7tcb1 nBOJwdfZT7RRLIeYz1EwkO5YQTGGeGU16gofLKjQ6LsVTrKynY/4b21ox+RguT3RHDpn 2iswItc+QolGm7bEprKIV1+u385zyIRyEWWAJc7JAbL3L/LVDxY/CwyFOOeiFSamJIGD Xekg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id k10-20020a67e3ca000000b003573ed04961si144187vsm.2.2022.07.15.06.44.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jul 2022 06:44:33 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from home.localnet (44-208-124-178-static.mgts.by [178.124.208.44] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 26FDiUHY028899 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Jul 2022 15:44:30 +0200 From: Uladzimir Bely To: "isar-users@googlegroups.com" , "Moessbauer, Felix" Cc: "jan.kiszka@siemens.com" Subject: Re: [PATCH] sbuild: Fix low hit ratio for ccache on linux kernel rebuild Date: Fri, 15 Jul 2022 16:44:29 +0300 Message-ID: <25512947.1r3eYUQgxm@home> In-Reply-To: References: <20220715112716.2460-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: Dc6jC6rrHjwi In the email from Friday, 15 July 2022 16:27:27 +03 user Moessbauer, Felix wrote: > > -----Original Message----- > > From: isar-users@googlegroups.com On > > Behalf Of Uladzimir Bely > > Sent: Friday, July 15, 2022 1:27 PM > > To: isar-users@googlegroups.com > > Subject: [PATCH] sbuild: Fix low hit ratio for ccache on linux kernel > > rebuild > > > > For some targets defconfig for linux recipe includes option > > CONFIG_DEBUG_INFO that embeds absolute path to the source files into > > compiled binaries. > > > > While sbuild uses unique directory to place sources for each build by > > default, it happens that ccache hits ration is to small on rebuild. > > > > This patch makes sbuild use the same build directory for sequential > > builds. While several packages can be built in parallel (e.g. same > > package for different architectures), WORKDIR is used to generate hash > > part for the build directory of sbuild. > > > > Signed-off-by: Uladzimir Bely > > --- > > > > meta/classes/dpkg.bbclass | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass index > > b726ea9d..016e46c4 100644 > > --- a/meta/classes/dpkg.bbclass > > +++ b/meta/classes/dpkg.bbclass > > @@ -82,6 +82,8 @@ dpkg_runbuild() { > > > > sh -c "cd ${WORKDIR}; dpkg-source -q -b ${PPS}" > > DSC_FILE=$(find ${WORKDIR} -name "${DEB_SOURCE_NAME}*.dsc" -print) > > > > + build_path_hash=$(echo "${WORKDIR}" | md5sum | cut -b1-6) > > + > > > > sbuild -A -n -c ${SBUILD_CHROOT} > > --extra-repository="${ISAR_APT_REPO}" \ > > > > --host=${PACKAGE_ARCH} --build=${SBUILD_HOST_ARCH} ${profiles} \ > > --no-run-lintian --no-run-piuparts --no-run-autopkgtest > > --resolve- > > > > alternatives \ @@ -91,6 +93,7 @@ dpkg_runbuild() { > > > > --finished-build-commands="cp -n --no-preserve=owner > > ${deb_dir}/*.deb -t > > > > ${ext_deb_dir}/ || :" \ > > > > --finished-build-commands="cp /var/log/dpkg.log > > > > ${ext_root}/dpkg_partial.log" \ > > > > --debbuildopts="--source-option=-I" \ > > > > + --build-path="/build/${PN}-${build_path_hash}" \ > > This is just a workaround that hides the problem. > Debian takes a lot of care to improve the reproducibility of their packages. > IIRC then reproducibility issues will be treated as bugs from bookworm on. > Could we please do the same and fix the corresponding recipes (like the > kernel recipe)? > It can be moved to the kernel recipe, but you left me a bit confused. Why changing of build directory from some random (from build to build) path to some fixed one (the same hash on every rebuild) makes the build less reproducible? > Please also have a look at the reproducibility section of dpkg-buildflags. > The only reason the kernel is affected from this is, that the kbuild only > uses KCFLAGS, not CFLAGS. At least the flags about reproducibility should > be added to all kernel builds done via ISAR. > > In short: I'm strictly against this workaround. > Having things that are not reproducible should hurt and not become accepted. > > Felix > > > --build-dir=${WORKDIR} --dist="isar" ${DSC_FILE} > > > > sbuild_dpkg_log_export "${WORKDIR}/rootfs/dpkg_partial.log" > > > > -- > > 2.20.1 > > > > -- > > You received this message because you are subscribed to the Google Groups > > "isar-users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to isar-users+unsubscribe@googlegroups.com. > > To view this discussion on the web visit > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.g > > oogle.com%2Fd%2Fmsgid%2Fisar-users%2F20220715112716.2460-1- > > ubely%2540ilbers.de&data=05%7C01%7Cfelix.moessbauer%40siemens.co > > m%7C2fbec95c6a0a48bcfa1608da6654fc4b%7C38ae3bcd95794fd4addab42e14 > > 95d55a%7C1%7C0%7C637934812445713510%7CUnknown%7CTWFpbGZsb3d8e > > yJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7 > > C3000%7C%7C%7C&sdata=H%2FfsTUORIfNFM7jh8CYiCNkuf7T66oxH31mh > > 1v2Leo0%3D&reserved=0. -- Uladzimir Bely