From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7057122428766388224 X-Received: by 2002:a05:6512:3d02:: with SMTP id d2mr4452840lfv.138.1644475584403; Wed, 09 Feb 2022 22:46:24 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:4e11:: with SMTP id e17ls2373477lfr.1.gmail; Wed, 09 Feb 2022 22:46:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzz73puAF+/unEJ1c0W3mjcNLYcmECS9ibLhDABYOL+JJFHlVgVq2xyCOe/+xd5OrJE+Igk X-Received: by 2002:a05:6512:3f1b:: with SMTP id y27mr4435649lfa.468.1644475583505; Wed, 09 Feb 2022 22:46:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644475583; cv=none; d=google.com; s=arc-20160816; b=cpp7LsDcV4a5QDylLheDRMsMDmTPcz5pt8IyZUkkhO7+jLVbLs57ZZVvfNWXV66j5o U7JAdbRmntGZpA3XyxhondepSzS3BzW1EwXkO+TmLeU4WUWaMTmn3qU73qcYIxVP0qK9 Knh7MO2xSjXAMDkur5RwkVMBl2YdrgOb0S4ir3266vW+IY3RUz+AD52rlfSltyrLTPJa e+vOPKcJKK+Fo/A1mnXouVubCyxsVANf02mUPyclJQm8LD+5YAai+nLVY7fKRrY5fnWK wJAXD6gvPKhEq8HqdLLBxvi+5jTjgYoOhDgyaZVfnzoyzmbYo9SYPHldBKJL+7yxkGDZ ZQtQ== 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:to:from; bh=tjS6qgWqy4h6z6gyh2XhLYf++eLyhWnRMwfL9wMNkrs=; b=R8+yzlQxUf6aVFrdT+z92RvhtBFPB3NgrBg/kY8VJnIvfheptwAfLUXVG/yUt07Q/n D4m9YzDxUWxutwmy6CXLDCvtczLvwf36ha7X0j8zLr3WXX3znXSNWhgwqISFkcLXM4q7 MLhIJXnpUoITClYNnZJ9T66rDYaVWo/a2kI5adc/5uuwnPm3GjVAZo7pfMRIK/yi90pO IlP1o/EeE6ejTs5XL7e4xMqPcO6G1t4P6e7A25IOxiwbXu+PY3HTWE/r5Fh1lJewDXMX UNGb+NwmMPufWK2Cyme3hQ9xGyg9QmYAgtuLYbohpHZtQ5ZeL28DvohzJlyrtsqkVwpQ NWcg== 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 c11si207747lfr.8.2022.02.09.22.46.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Feb 2022 22:46:23 -0800 (PST) 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 baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id 21A6kKr8028169 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 10 Feb 2022 07:46:22 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v6 06/12] sbuild: support of DEB_BUILD_PROFILES Date: Thu, 10 Feb 2022 07:46:14 +0100 Message-Id: <20220210064620.4392-7-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220210064620.4392-1-ubely@ilbers.de> References: <20220210064620.4392-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: m6enty8W/Jat In Isar packages may use their own profiles. For example, linux-custom.inc introduces 'nolibcdev' profile that should be passed to dpkg-buildpackage in both cross and native builds. By default, sbuild for cross-building uses passes "cross,nocheck" options to dpkg-buildpackage and ignores DEB_BUILD_PROFILES environment variable. This change makes sbuild use custom profiles even in cross-build mode. Signed-off-by: Uladzimir Bely --- meta/classes/dpkg.bbclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass index 848ffad1..5511de64 100644 --- a/meta/classes/dpkg.bbclass +++ b/meta/classes/dpkg.bbclass @@ -40,10 +40,18 @@ dpkg_runbuild() { export DEB_BUILD_PROFILES="${@ isar_deb_build_profiles(d)}" export PARALLEL_MAKE="${PARALLEL_MAKE}" + profiles=$(grep "DEB_BUILD_PROFILES" ${SBUILD_CONFIG} | tail -n1 | cut -d "'" -f 4) + if [ ${ISAR_CROSS_COMPILE} -eq 1 ]; then + profiles="${profiles} cross nocheck" + fi + if [ ! -z "$profiles" ]; then + profiles=$(echo --profiles="$profiles" | sed -e 's/ \+/,/g') + fi + export SBUILD_CONFIG="${SBUILD_CONFIG}" sbuild -A -n -c ${SBUILD_CHROOT} --extra-repository="${ISAR_APT_REPO}" \ - --host=${PACKAGE_ARCH} --build=${SBUILD_HOST_ARCH} \ + --host=${PACKAGE_ARCH} --build=${SBUILD_HOST_ARCH} ${profiles} \ --no-run-lintian --no-run-piuparts --no-run-autopkgtest \ --debbuildopts="--source-option=-I" \ --build-dir=${WORKDIR} ${WORKDIR}/${PPS} -- 2.20.1