From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7075595997826514944 X-Received: by 2002:a25:aba1:0:b0:64d:80b1:e7a0 with SMTP id v30-20020a25aba1000000b0064d80b1e7a0mr21704478ybi.151.1653316599518; Mon, 23 May 2022 07:36:39 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a25:6b0b:0:b0:64d:c893:8eda with SMTP id g11-20020a256b0b000000b0064dc8938edals8560463ybc.8.gmail; Mon, 23 May 2022 07:36:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBW54XCfuApQ8wsLNSFeE5AsOXlPh8YQ0AMEeXUu/nB673sUOCy0fx6S14IsT6Xt0s3/Yy X-Received: by 2002:a05:6902:2c4:b0:64f:7de9:ab3e with SMTP id w4-20020a05690202c400b0064f7de9ab3emr11907887ybh.240.1653316599111; Mon, 23 May 2022 07:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653316599; cv=none; d=google.com; s=arc-20160816; b=nMWT/vOwgXRyvEAVoWoboS7KrRhvJXbRQ4tJq/8l1V/8R4FBmvSaAvZ/s6YoG9NDQV hyA5bSTb+TjZ8c/HKLm2EXE4vIhu19p5I83HELhR7Ezjp0Xc2ON4BFK2+ltw5coBYAdU gCQH1vtH7lgfZ6jk5rbZXkYIZIrJjBPVUvhJJAjVirCTx5czionQZdCtKg9uORdlYDw3 +xheMcOQUvkHm/yB+PDke1p0gLPJUDp+WQ1CWRbp9RNgJnLmUmoEWMRYxCIsLxd4bt0d /6ECXZ1EOSnOv0Im1Kez8PbcYIvuSwZd7K17BWYB10wCe9FY0eYCdZFj6BikkzIoyep8 yJQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=WH5Nr/UYMFsrYFL6FTyW4EZrvxUeyVhwroYFAyTyIe4=; b=pjrVclJQgs0R94D+55R2naeb1AWFzRLbA1ptHIR6ASs7cWFpWmj2b9mSz/sdQLNkc9 WWaHErjDKsJ95C5QK3UqBYzXARM1Ah2MTz3HdhAbEhgzZL8uiE7CDkrR0nLqyM8B7XAE xz3DalQsaWmwVWr8CfWhmhDq/t4HBuxjeFE/Pwm6UzWCk5qFt5+4zEQ9y7j+jsl1JYdx UUwOth3k1r8si5oPPPJpSFlXOyVcyNO5a0EoIqiaqjBktWH494MoUnCy83auOHpB7IK3 CIP8P4Bp7/TC6p7AeHW4tyUn/I3x46j7BSmfGD4RLsT39qISli+I1eH/ME817NbxO1Ex CtZg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id o5-20020a056902110500b0064a47ee8045si735950ybu.3.2022.05.23.07.36.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 May 2022 07:36:39 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@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 amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from localhost.localdomain (mm-40-50-214-37.mgts.dynamic.pppoe.byfly.by [37.214.50.40] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id 24NEaO3X024879 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 May 2022 16:36:37 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Uladzimir Bely Subject: [PATCH v11 11/21] dpkg-base: Switch apt_fetch and apt_unpack to use schroot Date: Mon, 23 May 2022 17:36:07 +0300 Message-Id: <20220523143617.24759-12-amikan@ilbers.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220523143617.24759-1-amikan@ilbers.de> References: <20220523143617.24759-1-amikan@ilbers.de> 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: T9MYF6bhWwL5 From: Uladzimir Bely This moves downloading and unpacking deb-src to schroot environment. Signed-off-by: Uladzimir Bely --- meta/classes/dpkg-base.bbclass | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass index 7005aa5..87dc3f7 100644 --- a/meta/classes/dpkg-base.bbclass +++ b/meta/classes/dpkg-base.bbclass @@ -104,19 +104,12 @@ python() { } do_apt_fetch() { - dpkg_do_mounts - E="${@ isar_export_proxies(d)}" - sudo -E chroot ${BUILDCHROOT_DIR} /usr/bin/apt-get update \ - -o Dir::Etc::SourceList="sources.list.d/isar-apt.list" \ - -o Dir::Etc::SourceParts="-" \ - -o APT::Get::List-Cleanup="0" - + schroot_create_configs for uri in "${SRC_APT}"; do - sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \ + schroot -d / -c ${SBUILD_CHROOT} -- \ sh -c 'mkdir -p /downloads/deb-src/"$1"/"$2" && cd /downloads/deb-src/"$1"/"$2" && apt-get -y --download-only --only-source source "$2"' my_script "${DISTRO}" "${uri}" done - - dpkg_undo_mounts + schroot_delete_configs } addtask apt_fetch @@ -125,13 +118,14 @@ do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock" # Add dependency from the correct buildchroot: host or target do_apt_fetch[depends] += "${BUILDCHROOT_DEP}" +# Add dependency from the correct schroot: host or target +do_apt_fetch[depends] += "${SCHROOT_DEP}" + do_apt_unpack() { rm -rf ${S} - dpkg_do_mounts - E="${@ isar_export_proxies(d)}" - + schroot_create_configs for uri in "${SRC_APT}"; do - sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \ + schroot -d / -c ${SBUILD_CHROOT} -- \ sh -c ' \ set -e dscfile="$(apt-get -y -qq --print-uris --only-source source "${2}" | cut -d " " -f2 | grep -E "*.dsc")" @@ -140,8 +134,7 @@ do_apt_unpack() { dpkg-source -x "${dscfile}" "${PPS}"' \ my_script "${DISTRO}" "${uri}" done - - dpkg_undo_mounts + schroot_delete_configs } addtask apt_unpack after do_apt_fetch -- 2.17.1