Patchwork [v2] libpam_1.1.1: remove directory preventing /var/run from being volatile

login
register
mail settings
Submitter Mats Kärrman
Date Dec. 7, 2011, 10:54 a.m.
Message ID <ED3E0BCACD909541BA94A34C4A164D4C401A508F@post.tritech.se>
Download mbox | patch
Permalink /patch/16375/
State New, archived
Headers show

Comments

Mats Kärrman - Dec. 7, 2011, 10:54 a.m.
New version with less differences to oe-core. Honestly I have not been able to test this version but I have reviewed it and think it is equivalent to the patch I had before. // Mats


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 here is roughly the same as the solution applied in the libpam
recipes of oe-core but v1.1.1 does not exist there and the corresponding fix
was already a part of the original recipes for later versions.

Signed-off-by: Mats Kärrman <mats.karrman@tritech.se>

------

Patch

diff --git a/recipes/pam/files/99_libpam b/recipes/pam/files/99_libpam
new file mode 100644
index 0000000..5ae0c8e
--- /dev/null
+++ b/recipes/pam/files/99_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..2b679a1 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://99_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}/99_libpam  ${D}${sysconfdir}/default/volatiles/
+}
+
 SRC_URI[md5sum] = "9b3d952b173d5b9836cbc7e8de108bee"
 SRC_URI[sha256sum] = "608d3eb9d7a5e1a7505fff62e6a583fdb6e52dc05bf54dc9661c5f395