Fix install issues with wolfengine/provider tests
parent
429eea37f2
commit
85ec6fd27c
|
|
@ -17,24 +17,34 @@ SRC_URI = "file://wolfenginetest.c \
|
|||
file://wolfengineenv.sh \
|
||||
"
|
||||
|
||||
# wrynose+ bitbake forbids S = "${WORKDIR}"; use UNPACKDIR (where file:// unpacks)
|
||||
# and fall back to WORKDIR on older releases that don't define it.
|
||||
# file:// sources unpack into UNPACKDIR on newer releases (styhead+) and into
|
||||
# WORKDIR on Scarthgap and older (which don't define UNPACKDIR). Track that
|
||||
# location in our own INSTALL_TEST var rather than overriding S.
|
||||
#
|
||||
# Do NOT set S = "${WORKDIR}": base.bbclass appends ${S} and ${B} to
|
||||
# PSEUDO_IGNORE_PATHS, so an S that equals WORKDIR makes pseudo ignore the whole
|
||||
# work tree -- including ${WORKDIR}/package -- and do_package's chown-to-root
|
||||
# then fails with "Operation not permitted" (EPERM) on package/usr. Leaving S at
|
||||
# its default subdir keeps the package dir under pseudo's fakeroot.
|
||||
python () {
|
||||
if d.getVar('UNPACKDIR', False):
|
||||
d.setVar('S', '${UNPACKDIR}')
|
||||
d.setVar('INSTALL_TEST', '${UNPACKDIR}')
|
||||
else:
|
||||
d.setVar('S', '${WORKDIR}')
|
||||
d.setVar('INSTALL_TEST', '${WORKDIR}')
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
${CC} ${S}/wolfenginetest.c -o wolfenginetest \
|
||||
# Compile from the source dir with a relative filename so the absolute
|
||||
# TMPDIR path is not baked into the binary's debug info ([buildpaths] QA).
|
||||
cd ${INSTALL_TEST}
|
||||
${CC} wolfenginetest.c -o wolfenginetest \
|
||||
${CFLAGS} ${LDFLAGS} $(pkg-config --cflags --libs openssl) -ldl -lwolfssl -lwolfengine
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${S}/wolfenginetest ${D}${bindir}/wolfenginetest
|
||||
install -m 0755 ${S}/wolfengineenv.sh ${D}${bindir}/wolfengineenv
|
||||
install -m 0755 ${INSTALL_TEST}/wolfenginetest ${D}${bindir}/wolfenginetest
|
||||
install -m 0755 ${INSTALL_TEST}/wolfengineenv.sh ${D}${bindir}/wolfengineenv
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,26 +24,36 @@ SRC_URI = "file://wolfproviderenv.c \
|
|||
SRC_URI[provider_conf.sha256sum] = "3ad9e7cf5aefb9d36b9482232365094f42390f3ef03778fa84c3efb39d48e4c2"
|
||||
SRC_URI[provider_fips_conf.sha256sum] = "0b2174ab296aefa9a3f1fe40ccf0b988b25d09188ae5abad27fb60923754e98f"
|
||||
|
||||
# wrynose+ bitbake forbids S = "${WORKDIR}"; use UNPACKDIR (where file:// unpacks)
|
||||
# and fall back to WORKDIR on older releases that don't define it.
|
||||
# file:// sources unpack into UNPACKDIR on newer releases (styhead+) and into
|
||||
# WORKDIR on Scarthgap and older (which don't define UNPACKDIR). Track that
|
||||
# location in our own INSTALL_TEST var rather than overriding S.
|
||||
#
|
||||
# Do NOT set S = "${WORKDIR}": base.bbclass appends ${S} and ${B} to
|
||||
# PSEUDO_IGNORE_PATHS, so an S that equals WORKDIR makes pseudo ignore the whole
|
||||
# work tree -- including ${WORKDIR}/package -- and do_package's chown-to-root
|
||||
# then fails with "Operation not permitted" (EPERM) on package/usr. Leaving S at
|
||||
# its default subdir keeps the package dir under pseudo's fakeroot.
|
||||
python () {
|
||||
if d.getVar('UNPACKDIR', False):
|
||||
d.setVar('S', '${UNPACKDIR}')
|
||||
d.setVar('INSTALL_TEST', '${UNPACKDIR}')
|
||||
else:
|
||||
d.setVar('S', '${WORKDIR}')
|
||||
d.setVar('INSTALL_TEST', '${WORKDIR}')
|
||||
}
|
||||
|
||||
inherit pkgconfig
|
||||
|
||||
do_compile() {
|
||||
${CC} ${S}/wolfproviderenv.c -o wolfproviderverify \
|
||||
# Compile from the source dir with a relative filename so the absolute
|
||||
# TMPDIR path is not baked into the binary's debug info ([buildpaths] QA).
|
||||
cd ${INSTALL_TEST}
|
||||
${CC} wolfproviderenv.c -o wolfproviderverify \
|
||||
${CFLAGS} ${LDFLAGS} $(pkg-config --cflags --libs openssl) -ldl -lwolfssl -lwolfprov
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${S}/wolfproviderverify ${D}${bindir}/wolfproviderverify
|
||||
install -m 0755 ${S}/wolfproviderenv.sh ${D}${bindir}/wolfproviderenv
|
||||
install -m 0755 ${INSTALL_TEST}/wolfproviderverify ${D}${bindir}/wolfproviderverify
|
||||
install -m 0755 ${INSTALL_TEST}/wolfproviderenv.sh ${D}${bindir}/wolfproviderenv
|
||||
}
|
||||
|
||||
python __anonymous() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue