summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/pam
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2021-04-20 16:22:15 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-23 10:12:08 +0100
commit46edbab0b304c05bf20b3154c0433196ffbf9d8b (patch)
treea12f7bfe81ada86dc9b2de09c463739c171f1497 /meta/recipes-extended/pam
parentd601dfdb74972c6f188a3eb9b4fbbc6e9f32a607 (diff)
downloadpoky-46edbab0b304c05bf20b3154c0433196ffbf9d8b.tar.gz
libpam: make volatile files created successfully
(From OE-Core rev: f0de19e31122abd225bd75c6202839094194a36d) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/pam')
-rw-r--r--meta/recipes-extended/pam/libpam/pam-volatiles.conf1
-rw-r--r--meta/recipes-extended/pam/libpam_1.5.1.bb21
2 files changed, 20 insertions, 2 deletions
diff --git a/meta/recipes-extended/pam/libpam/pam-volatiles.conf b/meta/recipes-extended/pam/libpam/pam-volatiles.conf
new file mode 100644
index 0000000000..d8b8259a93
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam-volatiles.conf
@@ -0,0 +1 @@
d /var/run/sepermit 0755 root root - -
diff --git a/meta/recipes-extended/pam/libpam_1.5.1.bb b/meta/recipes-extended/pam/libpam_1.5.1.bb
index f225487688..4363e16b9b 100644
--- a/meta/recipes-extended/pam/libpam_1.5.1.bb
+++ b/meta/recipes-extended/pam/libpam_1.5.1.bb
@@ -24,6 +24,7 @@ SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux
24 file://0001-modules-pam_namespace-Makefile.am-correctly-install-.patch \ 24 file://0001-modules-pam_namespace-Makefile.am-correctly-install-.patch \
25 file://0001-Makefile.am-support-usrmage.patch \ 25 file://0001-Makefile.am-support-usrmage.patch \
26 file://run-ptest \ 26 file://run-ptest \
27 file://pam-volatiles.conf \
27 " 28 "
28 29
29SRC_URI[sha256sum] = "201d40730b1135b1b3cdea09f2c28ac634d73181ccd0172ceddee3649c5792fc" 30SRC_URI[sha256sum] = "201d40730b1135b1b3cdea09f2c28ac634d73181ccd0172ceddee3649c5792fc"
@@ -125,8 +126,18 @@ do_install() {
125 126
126 # don't install /var/run when populating rootfs. Do it through volatile 127 # don't install /var/run when populating rootfs. Do it through volatile
127 rm -rf ${D}${localstatedir} 128 rm -rf ${D}${localstatedir}
128 install -d ${D}${sysconfdir}/default/volatiles 129
129 install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles 130 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then
131 rm -rf ${D}${sysconfdir}/init.d/
132 rm -rf ${D}${sysconfdir}/rc*
133 install -d ${D}${sysconfdir}/tmpfiles.d
134 install -m 0644 ${WORKDIR}/pam-volatiles.conf \
135 ${D}${sysconfdir}/tmpfiles.d/pam.conf
136 else
137 install -d ${D}${sysconfdir}/default/volatiles
138 install -m 0644 ${WORKDIR}/99_pam \
139 ${D}${sysconfdir}/default/volatiles/
140 fi
130 141
131 install -d ${D}${sysconfdir}/pam.d/ 142 install -d ${D}${sysconfdir}/pam.d/
132 install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ 143 install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
@@ -146,6 +157,12 @@ do_install_ptest() {
146 fi 157 fi
147} 158}
148 159
160pkg_postinst_${PN}() {
161 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
162 /etc/init.d/populate-volatile.sh update
163 fi
164}
165
149inherit features_check 166inherit features_check
150REQUIRED_DISTRO_FEATURES = "pam" 167REQUIRED_DISTRO_FEATURES = "pam"
151 168