From: <kai.kang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 05/10] nss: move create blank certificates to pkg_postinst
Date: Sat, 29 Sep 2018 13:43:51 +0800 [thread overview]
Message-ID: <5266d8bc086fe75047d2cc84d25a4a83b28811b5.1538199671.git.kai.kang@windriver.com> (raw)
In-Reply-To: <cover.1538199671.git.kai.kang@windriver.com>
From: Kai Kang <kai.kang@windriver.com>
There is a multilib install file conflict of nss:
| file /etc/pki/nssdb/key4.db conflicts between attempted installs of
| lib32-nss-3.38-r0.corei7_32 and nss-3.38-r0.corei7_64
Move the creation of blank certificates to pkg_postinst. And check if
certificates exist already, don't re-create them.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
meta/recipes-support/nss/nss_3.38.bb | 32 +++++++++++++++++-----------
1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/meta/recipes-support/nss/nss_3.38.bb b/meta/recipes-support/nss/nss_3.38.bb
index 904b621a07..74145360b5 100644
--- a/meta/recipes-support/nss/nss_3.38.bb
+++ b/meta/recipes-support/nss/nss_3.38.bb
@@ -211,20 +211,20 @@ do_install_append() {
sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
}
-do_install_append_class-target() {
- # Create a blank certificate
- mkdir -p ${D}${sysconfdir}/pki/nssdb/
- touch ./empty_password
- certutil -N -d sql:${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
- chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
- rm ./empty_password
- # Remove build path prefix
- sed -i "s:${D}::g" ${D}${sysconfdir}/pki/nssdb/pkcs11.txt
-}
-
PACKAGE_WRITE_DEPS += "nss-native"
pkg_postinst_${PN} () {
if [ -n "$D" ]; then
+ if [ ! -d $D${sysconfdir}/pki/nssdb/ ]; then
+ # Create a blank certificate
+ mkdir -p $D${sysconfdir}/pki/nssdb/
+ touch $D/empty_password
+ certutil -N -d sql:$D${sysconfdir}/pki/nssdb/ -f $D/empty_password
+ chmod 644 $D${sysconfdir}/pki/nssdb/*.db
+ rm $D/empty_password
+ # Remove build path prefix
+ sed -i "s:$D::g" $D${sysconfdir}/pki/nssdb/pkcs11.txt
+ fi
+
for I in $D${libdir}/lib*.chk; do
DN=`dirname $I`
BN=`basename $I .chk`
@@ -235,6 +235,15 @@ pkg_postinst_${PN} () {
fi
done
else
+ if [ ! -d ${sysconfdir}/pki/nssdb ]; then
+ # Create a blank certificate
+ mkdir -p ${sysconfdir}/pki/nssdb
+ empty_password=`mktemp`
+ certutil -N -d sql:$D${sysconfdir}/pki/nssdb/ -f $empty_password
+ chmod 644 $D${sysconfdir}/pki/nssdb/*.db
+ rm $empty_password
+ fi
+
signlibs.sh
fi
}
@@ -244,7 +253,6 @@ FILES_${PN}-smime = "\
${bindir}/smime \
"
FILES_${PN} = "\
- ${sysconfdir} \
${bindir} \
${libdir}/lib*.chk \
${libdir}/lib*.so \
--
2.18.0
next prev parent reply other threads:[~2018-09-29 6:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-29 5:43 [PATCH v2 00/10] Fix multilib install conflicts kai.kang
2018-09-29 5:43 ` [PATCH 01/10] cups: fix multilib install file conflicts kai.kang
2018-09-29 5:43 ` [PATCH 02/10] bind: " kai.kang
2018-09-29 5:43 ` [PATCH 03/10] man-db: fix multilib install file conflict kai.kang
2018-09-29 12:44 ` Richard Purdie
2018-09-30 1:02 ` Kang Kai
2018-09-29 5:43 ` [PATCH 04/10] groff: fix multilib install file conflicts kai.kang
2018-09-29 5:43 ` kai.kang [this message]
2018-09-29 12:44 ` [PATCH 05/10] nss: move create blank certificates to pkg_postinst Richard Purdie
2018-10-02 15:29 ` Kang Kai
2018-10-02 15:53 ` richard.purdie
2018-10-02 16:33 ` Kang Kai
2018-10-11 7:55 ` Kang Kai
2018-09-29 5:43 ` [PATCH 06/10] libcheck: avoid multilib install file conflict kai.kang
2018-09-29 12:42 ` Richard Purdie
2018-09-30 1:03 ` Kang Kai
2018-09-29 5:43 ` [PATCH 07/10] opkg-utils/update-alternatives: not warn same priorities for multilib kai.kang
2018-09-29 12:40 ` Richard Purdie
2018-09-29 5:43 ` [PATCH 08/10] os-release: fix install file conflict " kai.kang
2018-09-29 12:37 ` Richard Purdie
2018-09-30 1:07 ` Kang Kai
2018-09-29 5:43 ` [PATCH 09/10] gobject-introspection: fix multilib install file conflicts kai.kang
2018-09-29 5:43 ` [PATCH 10/10] vala: update vapigen-wrapper kai.kang
2018-09-29 12:33 ` Richard Purdie
2018-09-30 1:26 ` Kang Kai
-- strict thread matches above, loose matches on Subject: below --
2018-09-29 5:01 [PATCH 00/10] Fix multilib install conflicts kai.kang
2018-09-29 5:01 ` [PATCH 05/10] nss: move create blank certificates to pkg_postinst kai.kang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5266d8bc086fe75047d2cc84d25a4a83b28811b5.1538199671.git.kai.kang@windriver.com \
--to=kai.kang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox