From b3b32327e371d87a4ef36727b840c0e844b6f148 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 18 Jun 2019 10:52:33 -0400 Subject: ob-buildopk: Use touch -t --- (limited to 'src') diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh index cea74ab..dc630d1 100644 --- a/src/ob-buildopk.sh +++ b/src/ob-buildopk.sh @@ -42,7 +42,7 @@ build_opk() find_not_link='! -type l' touch_noderef='' fi find "${binary}.control" "${binary}.data" ${find_not_link} | xargs \ - ${TOUCH} ${touch_noderef} -d "${date}" + ${TOUCH} ${touch_noderef} -t "${date}" # This utility runs with (fake) privileges, so we can chown what we're # about to tar. @@ -52,13 +52,13 @@ build_opk() ${TAR} -cf '../control.tar' --no-recursion -T -) (cd -- "${binary}.data" && find '.' | LC_ALL=C sort | \ ${TAR} -cf '../data.tar' --no-recursion -T -) - ${TOUCH} -d "${date}" 'control.tar' 'data.tar' + ${TOUCH} -t "${date}" 'control.tar' 'data.tar' ${GZIP} 'control.tar' 'data.tar' ${TAR} -cf "../../${binary}_${version}_${arch}_${plat}.tar" \ 'debian-binary' 'control.tar.gz' 'data.tar.gz' rm -Rf 'control.tar.gz' 'data.tar.gz' - ${TOUCH} -d "${date}" "../../${binary}_${version}_${arch}_${plat}.tar" + ${TOUCH} -t "${date}" "../../${binary}_${version}_${arch}_${plat}.tar" ${GZIP} "../../${binary}_${version}_${arch}_${plat}.tar" mv "../../${binary}_${version}_${arch}_${plat}.tar.gz" \ "../../${binary}_${version}_${arch}_${plat}.opk" @@ -80,10 +80,10 @@ main() fi ob_init_package '..' || return 1 - date="$(ob_iso8601_gmtime "${SOURCE_DATE_EPOCH}")" + date="$(ob_touch_t_gmtime "${SOURCE_DATE_EPOCH}")" printf '2.0\n' >'debian-binary' - ${TOUCH} -d "${date}" 'debian-binary' + ${TOUCH} -t "${date}" 'debian-binary' if [ x"${OB_DO_SOURCE:+set}" = x'set' ]; then build_opk "src-${OPK_SOURCE}" "${OPK_SOURCE_VERSION}" \ 'src' 'all' "${date}" -- cgit v0.9.1