[oe] [PATCH] libpam_1.1.1: remove directory preventing /var/run from being volatile
Mats Kärrman
Mats.Karrman at tritech.se
Wed Dec 7 09:37:48 UTC 2011
The libpam make install creates a /var/run/sepermit folder that prevents
the later creation of a sym-link /var/run --> /var/volatile/run. This is
a problem because it causes additional wear to FLASH file systems.
The solution is ~equivalent to the solution applied in libpam recipes of
oe-core but v1.1.1 does not exist there and the corresponding fix was a
part of the original recipes for later versions.
Signed-off-by: Mats Kärrman <mats.karrman at tritech.se>
------
diff --git a/recipes/pam/files/05_libpam b/recipes/pam/files/05_libpam
new file mode 100644
index 0000000..5ae0c8e
--- /dev/null
+++ b/recipes/pam/files/05_libpam
@@ -0,0 +1,3 @@
+# Create sepermit folder in volatile fs
+d root root 0755 /var/run/sepermit none
+
diff --git a/recipes/pam/libpam_1.1.1.bb b/recipes/pam/libpam_1.1.1.bb
index 09bc554..ba35d0c 100644
--- a/recipes/pam/libpam_1.1.1.bb
+++ b/recipes/pam/libpam_1.1.1.bb
@@ -15,7 +15,7 @@ DEPENDS = "flex flex-native"
# PAM is not a lot of use without configuration files and the plugins
RRECOMMENDS_${PN} = "libpam-meta libpam-base-files"
-PR = "r2"
+PR = "r3"
# The project is actually called Linux-PAM but that gives
# a bad OE package name because of the upper case characters
@@ -26,6 +26,7 @@ S = "${WORKDIR}/${p}"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/pam/library/${p}.tar.bz2 \
file://pam-nodocs.patch \
file://define-HAVE_DBM.patch \
+ file://05_libpam \
"
UCLIBC_PATCHES = " file://Linux-PAM-1.1.0-uclibc.patch \
@@ -71,6 +72,17 @@ python populate_packages_prepend () {
packages.append(metapkg)
bb.data.setVar('PACKAGES', ' '.join(packages), d)
}
+
+do_install_append () {
+ # Remove erroneously created /var/run dir
+ rm -rf ${D}${localstatedir}/run
+
+ # Install volatiles specification to make sure dir is created in run-time
+ install -d ${D}${sysconfdir}/default
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/05_libpam ${D}${sysconfdir}/default/volatiles/
+}
+
SRC_URI[md5sum] = "9b3d952b173d5b9836cbc7e8de108bee"
SRC_URI[sha256sum] = "608d3eb9d7a5e1a7505fff62e6a583fdb6e52dc05bf54dc9661c5f395
More information about the Openembedded-devel
mailing list