From 86378ab4fd1bdc79c75e8fee57de73d2e2af4234 Mon Sep 17 00:00:00 2001 From: Yue Tao Date: Thu, 23 Sep 2021 08:30:57 +0800 Subject: [PATCH] Add debian package for watchdog Apply the debian stuff from meta-lat (open sources of LAT: git://github.com/Wind-River/meta-lat), in which LAT has a local patch for watchdog: data/debian/watchdog/metadata_patches/0001-customize-watchdog-for-ostree.patch It passed build-pkgs -p watchdog, build-image, and install, boot test. The 0001-customize-watchdog-for-ostree.patch addes a script used by ostree management, which should be verfied by ostree function test. Depends-On: https://review.opendev.org/c/starlingx/tools/+/817170 Story: 2009221 Task: 43405 Signed-off-by: Yue Tao Change-Id: I454759d652eead3586dcee75504b25fd055f85cc --- base/watchdog/debian/dl_hook | 23 +++++++++++++++++++++++ base/watchdog/debian/meta_data.yaml | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100755 base/watchdog/debian/dl_hook create mode 100644 base/watchdog/debian/meta_data.yaml diff --git a/base/watchdog/debian/dl_hook b/base/watchdog/debian/dl_hook new file mode 100755 index 000000000..97309ce07 --- /dev/null +++ b/base/watchdog/debian/dl_hook @@ -0,0 +1,23 @@ +#!/bin/bash + +LOCAL_DIR=$1 +PKGNAME=watchdog +BASE_DIR=${STX_GIT_SRC_DIR} +PKG_DIR=${BASE_DIR}/meta-lat/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 +cd ${LOCAL_DIR} +for patch in $(ls ${META_DIR}/*.patch); do + patch -p1 < $patch || exit 1 +done +cp ${SRC_DIR}/* . diff --git a/base/watchdog/debian/meta_data.yaml b/base/watchdog/debian/meta_data.yaml new file mode 100644 index 000000000..d530e4fea --- /dev/null +++ b/base/watchdog/debian/meta_data.yaml @@ -0,0 +1,6 @@ +--- +debver: 5.16-1 +dl_hook: dl_hook +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true