[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 10:12:39 UTC 2011
> From: openembedded-devel-bounces at lists.openembedded.org [openembedded-devel-bounces at lists.openembedded.org] on behalf of Paul Menzel [paulepanter at users.sourceforge.net]
> Sent: Wednesday, December 07, 2011 10:58 AM
> To: openembedded-devel at lists.openembedded.org
> Subject: Re: [oe] [PATCH] libpam_1.1.1: remove directory preventing /var/run from being volatile
>
> Dear Mats,
>
>
> thank you for sending the patch for OE-classic master.
>
> Am Mittwoch, den 07.12.2011, 09:37 +0000 schrieb Mats Kärrman:
> > 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
>
> Does the ~ have any meaning or is it just a typo?
~ = roughly, more-or-less, approximately (like 05 != 99...)
>
> > 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
> > +
>
> In OE-core the file name is `99_pam` [1]. Why did the leading number
> needed to be changed? Should that be also `05` in OE-core?
Number sets the order that files are parsed to create volatile directories. I fixed and tested my build without looking at oe-core and thought that 05 was a good number as there were only a 00 file to begin with. Only later I decided to contribute back and then I found that the problem was already solved in oe-core but I didn't bother to change my fix to match oe-core because I didn't think it matter, sorry...
>
> > 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
>
>
> Thanks,
>
> Paul
>
>
> [1] http://git.openembedded.org/openembedded-core/commit/meta/recipes-extended/pam/libpam/99_pam?id=698cef8322e5a5f18e50ce62f6c9d1f1f846677a
>
I'll send a new patch shortly.
// Mats
More information about the Openembedded-devel
mailing list