From 9b855ce0af154b76e82ed1877c125fa99ef60f3a Mon Sep 17 00:00:00 2001 From: Yue Tao Date: Fri, 17 Dec 2021 11:12:54 +0800 Subject: [PATCH] ostree: use tarballs to replace the meta-lat and ostree in manifest Use the dl_files to download meta-lat 20211214 version tarball, and ostree 2019.1-1 tarball. No longer need the meta-lat and ostree repositories in manifest. Test Plan: Pass: successfully build ostree-upgrade-mgr, ostree, mttyexec, initramfs-ostree, watchdog Pass: successfully install test Pass: successfully boot test Story: 2008846 Task: 44194 Signed-off-by: Yue Tao Change-Id: Iff7d32c8764068318ccf854551addf1aa880334e --- base/watchdog/debian/dl_hook | 19 ++++++++------- base/watchdog/debian/meta_data.yaml | 6 +++++ ostree/initramfs-ostree/debian/dl_hook | 18 ++++++++++----- ostree/initramfs-ostree/debian/meta_data.yaml | 5 ++++ ostree/mttyexec/debian/dl_hook | 16 +++++++++---- ostree/mttyexec/debian/meta_data.yaml | 5 ++++ ostree/ostree-upgrade-mgr/debian/dl_hook | 16 +++++++++---- .../ostree-upgrade-mgr/debian/meta_data.yaml | 5 ++++ ostree/ostree/debian/dl_hook | 23 +++++++++++++------ ostree/ostree/debian/meta_data.yaml | 9 ++++++++ 10 files changed, 91 insertions(+), 31 deletions(-) diff --git a/base/watchdog/debian/dl_hook b/base/watchdog/debian/dl_hook index 97309ce07..54ae956a4 100755 --- a/base/watchdog/debian/dl_hook +++ b/base/watchdog/debian/dl_hook @@ -2,20 +2,23 @@ LOCAL_DIR=$1 PKGNAME=watchdog -BASE_DIR=${STX_GIT_SRC_DIR} -PKG_DIR=${BASE_DIR}/meta-lat/data/debian/${PKGNAME} +META_LAT_TARBALL=meta-lat.tar.gz +META_LAT=meta-lat + +mkdir -p ${META_LAT} +tar xzvf ${META_LAT_TARBALL} --strip-components 1 -C ${META_LAT} + +BASE_DIR=$(realpath ${META_LAT}) +PKG_DIR=${BASE_DIR}/data/debian/${PKGNAME} META_DIR=${PKG_DIR}/metadata_patches SRC_DIR=${PKG_DIR}/sources -BASE_URL=https://snapshot.debian.org/archive/debian/20200424T151944Z/pool/main/w/${PKGNAME} + MAJOR_VER="5.16" REVISION="1" VER=${MAJOR_VER}-${REVISION} DSC_FILE=${PKGNAME}_${VER}.dsc -dget -x ${BASE_URL}/${DSC_FILE} -if [ $? != 0 ]; then - echo "Fail to download ${BASE_URL}/${DSC_FILE}" - exit -1 -fi + +dpkg-source -x ${DSC_FILE} cd ${LOCAL_DIR} for patch in $(ls ${META_DIR}/*.patch); do patch -p1 < $patch || exit 1 diff --git a/base/watchdog/debian/meta_data.yaml b/base/watchdog/debian/meta_data.yaml index d530e4fea..1ce043b38 100644 --- a/base/watchdog/debian/meta_data.yaml +++ b/base/watchdog/debian/meta_data.yaml @@ -1,6 +1,12 @@ --- debver: 5.16-1 dl_hook: dl_hook +archive: https://snapshot.debian.org/archive/debian/20200424T151944Z/pool/main/w/watchdog +dl_files: + meta-lat.tar.gz: + topdir: null + url: https://github.com/Wind-River/meta-lat/archive/refs/tags/20211214.tar.gz + md5sum: 38103be48cc97171c0a0a3ecd6713ffe revision: dist: $STX_DIST PKG_GITREVCOUNT: true diff --git a/ostree/initramfs-ostree/debian/dl_hook b/ostree/initramfs-ostree/debian/dl_hook index 2490b5454..b70d6b1b4 100755 --- a/ostree/initramfs-ostree/debian/dl_hook +++ b/ostree/initramfs-ostree/debian/dl_hook @@ -1,9 +1,15 @@ #!/bin/bash -set -x + LOCAL_DIR=$1 PKGNAME=initramfs-ostree -BASE_DIR=$STX_GIT_SRC_DIR/meta-lat/data/debian -SRC_DIR=$BASE_DIR/$PKGNAME/sources -DEB_DIR=$BASE_DIR/$PKGNAME/metadata/debian -cp -Lr $SRC_DIR $LOCAL_DIR -cp -Lr $DEB_DIR $LOCAL_DIR +META_LAT_TARBALL=meta-lat.tar.gz +META_LAT=meta-lat + +mkdir -p ${META_LAT} +tar xzvf ${META_LAT_TARBALL} --strip-components 1 -C ${META_LAT} + +BASE_DIR=$(realpath ${META_LAT}) +SRC_DIR=${BASE_DIR}/data/debian/${PKGNAME}/sources +DEB_DIR=${BASE_DIR}/data/debian/${PKGNAME}/metadata/debian +cp -Lr ${SRC_DIR} ${LOCAL_DIR} +cp -Lr ${DEB_DIR} ${LOCAL_DIR} diff --git a/ostree/initramfs-ostree/debian/meta_data.yaml b/ostree/initramfs-ostree/debian/meta_data.yaml index fdd626633..e7350ed93 100644 --- a/ostree/initramfs-ostree/debian/meta_data.yaml +++ b/ostree/initramfs-ostree/debian/meta_data.yaml @@ -1,6 +1,11 @@ --- debver: 1.0 dl_hook: dl_hook +dl_files: + meta-lat.tar.gz: + topdir: null + url: https://github.com/Wind-River/meta-lat/archive/refs/tags/20211214.tar.gz + md5sum: 38103be48cc97171c0a0a3ecd6713ffe revision: dist: $STX_DIST PKG_GITREVCOUNT: true diff --git a/ostree/mttyexec/debian/dl_hook b/ostree/mttyexec/debian/dl_hook index 8bc3f5018..ec9bfb79c 100755 --- a/ostree/mttyexec/debian/dl_hook +++ b/ostree/mttyexec/debian/dl_hook @@ -2,8 +2,14 @@ LOCAL_DIR=$1 PKGNAME=mttyexec -BASE_DIR=$STX_GIT_SRC_DIR/meta-lat/data/debian -SRC_DIR=$BASE_DIR/$PKGNAME/sources -DEB_DIR=$BASE_DIR/$PKGNAME/metadata/debian -cp -Lr $SRC_DIR $LOCAL_DIR -cp -Lr $DEB_DIR $LOCAL_DIR +META_LAT_TARBALL=meta-lat.tar.gz +META_LAT=meta-lat + +mkdir -p ${META_LAT} +tar xzvf ${META_LAT_TARBALL} --strip-components 1 -C ${META_LAT} + +BASE_DIR=$(realpath ${META_LAT}) +SRC_DIR=${BASE_DIR}/data/debian/${PKGNAME}/sources +DEB_DIR=${BASE_DIR}/data/debian/${PKGNAME}/metadata/debian +cp -Lr ${SRC_DIR} ${LOCAL_DIR} +cp -Lr ${DEB_DIR} ${LOCAL_DIR} diff --git a/ostree/mttyexec/debian/meta_data.yaml b/ostree/mttyexec/debian/meta_data.yaml index 0582662de..811594ff0 100644 --- a/ostree/mttyexec/debian/meta_data.yaml +++ b/ostree/mttyexec/debian/meta_data.yaml @@ -1,6 +1,11 @@ --- debver: 0.1 dl_hook: dl_hook +dl_files: + meta-lat.tar.gz: + topdir: null + url: https://github.com/Wind-River/meta-lat/archive/refs/tags/20211214.tar.gz + md5sum: 38103be48cc97171c0a0a3ecd6713ffe revision: dist: $STX_DIST PKG_GITREVCOUNT: true diff --git a/ostree/ostree-upgrade-mgr/debian/dl_hook b/ostree/ostree-upgrade-mgr/debian/dl_hook index 67ad52866..71fa280cd 100755 --- a/ostree/ostree-upgrade-mgr/debian/dl_hook +++ b/ostree/ostree-upgrade-mgr/debian/dl_hook @@ -2,8 +2,14 @@ LOCAL_DIR=$1 PKGNAME=ostree-upgrade-mgr -BASE_DIR=$STX_GIT_SRC_DIR/meta-lat/data/debian -SRC_DIR=$BASE_DIR/$PKGNAME/sources -DEB_DIR=$BASE_DIR/$PKGNAME/metadata/debian -cp -Lr $SRC_DIR $LOCAL_DIR -cp -Lr $DEB_DIR $LOCAL_DIR +META_LAT_TARBALL=meta-lat.tar.gz +META_LAT=meta-lat + +mkdir -p ${META_LAT} +tar xzvf ${META_LAT_TARBALL} --strip-components 1 -C ${META_LAT} + +BASE_DIR=$(realpath ${META_LAT}) +SRC_DIR=${BASE_DIR}/data/debian/${PKGNAME}/sources +DEB_DIR=${BASE_DIR}/data/debian/${PKGNAME}/metadata/debian +cp -Lr ${SRC_DIR} ${LOCAL_DIR} +cp -Lr ${DEB_DIR} ${LOCAL_DIR} diff --git a/ostree/ostree-upgrade-mgr/debian/meta_data.yaml b/ostree/ostree-upgrade-mgr/debian/meta_data.yaml index fdd626633..e7350ed93 100644 --- a/ostree/ostree-upgrade-mgr/debian/meta_data.yaml +++ b/ostree/ostree-upgrade-mgr/debian/meta_data.yaml @@ -1,6 +1,11 @@ --- debver: 1.0 dl_hook: dl_hook +dl_files: + meta-lat.tar.gz: + topdir: null + url: https://github.com/Wind-River/meta-lat/archive/refs/tags/20211214.tar.gz + md5sum: 38103be48cc97171c0a0a3ecd6713ffe revision: dist: $STX_DIST PKG_GITREVCOUNT: true diff --git a/ostree/ostree/debian/dl_hook b/ostree/ostree/debian/dl_hook index d8fdfc64f..f244d23b3 100755 --- a/ostree/ostree/debian/dl_hook +++ b/ostree/ostree/debian/dl_hook @@ -1,13 +1,22 @@ #!/bin/bash -LOCAL_DIR=$1 PKGNAME=ostree -BASE_DIR=$STX_GIT_SRC_DIR/ -SRC_DIR=$BASE_DIR/$PKGNAME -META_DIR=$BASE_DIR/meta-lat/data/debian/$PKGNAME/metadata_patches -PATCHES_DIR=$BASE_DIR/meta-lat/data/debian/$PKGNAME/source_patches -cp -Lr $SRC_DIR $LOCAL_DIR -cd $LOCAL_DIR +META_LAT_TARBALL=meta-lat.tar.gz +META_LAT=meta-lat +OSTREE_TARBALL=ostree.tar.gz +OSTREE=$1 + +mkdir -p ${META_LAT} +tar xzvf ${META_LAT_TARBALL} --strip-components 1 -C ${META_LAT} +mkdir -p ${OSTREE} +tar xzvf ${OSTREE_TARBALL} --strip-components 1 -C ${OSTREE} + +BASE_DIR=$(realpath ${META_LAT}) +SRC_DIR=$(realpath ${OSTREE}) +META_DIR=${BASE_DIR}/data/debian/${PKGNAME}/metadata_patches +PATCHES_DIR=${BASE_DIR}/data/debian/${PKGNAME}/source_patches + +cd ${SRC_DIR} for patch in `ls ${META_DIR}/*.patch`; do patch -p1 < $patch || exit 1 done diff --git a/ostree/ostree/debian/meta_data.yaml b/ostree/ostree/debian/meta_data.yaml index 1e5e9efbb..0fc4d6690 100644 --- a/ostree/ostree/debian/meta_data.yaml +++ b/ostree/ostree/debian/meta_data.yaml @@ -1,3 +1,12 @@ --- debver: 2019.1-1 +dl_files: + meta-lat.tar.gz: + topdir: null + url: https://github.com/Wind-River/meta-lat/archive/refs/tags/20211214.tar.gz + md5sum: 38103be48cc97171c0a0a3ecd6713ffe + ostree.tar.gz: + topdir: null + url: https://salsa.debian.org/debian/ostree/-/archive/debian/2019.1-1/ostree-debian-2019.1-1.tar.gz + md5sum: 31b095f28ceb6278964f69198d3e8a03 dl_hook: dl_hook