Add NOW env variable in autopkgtest

It was found out that autopkgtests didn't pass the NOW env variable
which is generally provided by the launchpad-buildd build and thus
the autpkgtests fail.
LP: #2124984
This commit is contained in:
Utkarsh Gupta 2024-03-15 14:18:57 +05:30 committed by Michael Hudson-Doyle
parent e67bbf9424
commit e860bd172f
No known key found for this signature in database
GPG Key ID: 11DF4294CCA39893
2 changed files with 9 additions and 0 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
livecd-rootfs (2.765.57) UNRELEASED; urgency=medium
* Cherry-pick fix for autopkgtests from ubuntu/master: (LP: #2124984)
- Add NOW env variable in autopkgtest.
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 23 Oct 2025 12:36:22 +1300
livecd-rootfs (2.765.56) jammy; urgency=medium
* Backporting generation of /etc/cloud/build.info. (LP: #2124984)

View File

@ -64,12 +64,14 @@ live_build_rootfs() {
SUBPROJECT=$SUBPROJECT \
SUITE=$SUITE \
ARCH=$ARCH \
NOW=$(date '+%Y%m%d') \
lb config
mkdir chroot
# this part needs root rights, but right now the whole script ran as root by autopkgtest
env PROJECT=$PROJECT \
SUBPROJECT=$SUBPROJECT \
ARCH=$ARCH \
NOW=$(date '+%Y%m%d') \
lb build
echo "Build results for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD"
du -sh *