dhcp-relay: fix rebuilds

dhcp-relay needs a fresh tarball of bind unpacked in ${S}, but this is
done by fetching the tarball to ${WORKDIR}, then in do_configure moving
it to ${S} and unpacking it.

If dhcp-relay is re-configured, the tarball no longer exists in ${WORKDIR}
so this fails.  Copy instead of moving so rebuilds work.

Also don't rename the downloaded file to just bind.tar.gz as that can
cause probems if the version changes.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Ross Burton 2021-12-13 12:46:14 +00:00 committed by Khem Raj
parent 77ab8b6445
commit a74f3a6c21

View File

@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=004a4db50a1e20972e924a8618747
DEPENDS = "openssl libcap zlib"
SRC_URI = "https://ftp.isc.org/isc/dhcp/4.4.2-P1/dhcp-4.4.2-P1.tar.gz \
https://ftp.isc.org/isc/bind9/9.11.32/bind-9.11.32.tar.gz;name=bind;downloadfilename=bind.tar.gz;unpack=0 \
https://ftp.isc.org/isc/bind9/9.11.32/bind-9.11.32.tar.gz;name=bind;unpack=0 \
file://default-relay \
file://init-relay \
file://dhcrelay.service \
@ -47,11 +47,11 @@ EXTRA_OECONF = "--enable-paranoia \
# Enable shared libs per dhcp README
do_configure:prepend () {
cp configure.ac+lt configure.ac
rm ${S}/bind/bind.tar.gz
mv ${WORKDIR}/bind.tar.gz ${S}/bind/
cp ${WORKDIR}/bind-9.11.32.tar.gz ${S}/bind/bind.tar.gz
}
do_compile:prepend() {
# Need to unpack this now instead of earlier as do_configure will delete the configure script
rm -rf ${S}/bind/bind-9.11.32/
tar xf ${S}/bind/bind.tar.gz -C ${S}/bind
install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/bind/bind-9.11.32/