Patchwork [meta-oe] samba: fix install for older samba versions

login
register
mail settings
Submitter Andreas Oberritter
Date March 7, 2013, 1:14 p.m.
Message ID <1362662097-13544-1-git-send-email-obi@opendreambox.org>
Download mbox | patch
Permalink /patch/45639/
State Superseded
Headers show

Comments

Andreas Oberritter - March 7, 2013, 1:14 p.m.
* Samba 3.0 doesn't build libbss_*.so
* base_sbindir may contain mount.cifs

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta-oe/recipes-connectivity/samba/samba.inc |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Martin Jansa - March 7, 2013, 1:48 p.m.
On Thu, Mar 07, 2013 at 02:14:56PM +0100, Andreas Oberritter wrote:
> * Samba 3.0 doesn't build libbss_*.so

libnss_*.so

> * base_sbindir may contain mount.cifs
> 
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> ---
>  meta-oe/recipes-connectivity/samba/samba.inc |    8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/meta-oe/recipes-connectivity/samba/samba.inc b/meta-oe/recipes-connectivity/samba/samba.inc
> index 3ee43ad..a151b16 100644
> --- a/meta-oe/recipes-connectivity/samba/samba.inc
> +++ b/meta-oe/recipes-connectivity/samba/samba.inc
> @@ -87,10 +87,12 @@ do_install_append() {
>  	install -d ${D}/var/spool/samba
>  
>  	# Install other stuff not installed by "make install"
> -	install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_winbind.so ${D}${libdir}/libnss_winbind.so.2
> -	install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_wins.so ${D}${libdir}/libnss_wins.so.2
> +	if [ -d ${WORKDIR}/${PN}-${PV}/nsswitch ]; then
> +		install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_winbind.so ${D}${libdir}/libnss_winbind.so.2
> +		install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_wins.so ${D}${libdir}/libnss_wins.so.2
> +	fi

It looks weird, but ${S}/../nsswitch won't be much better I guess.

> -	rmdir ${D}${base_sbindir}
> +	rmdir ${D}${base_sbindir} || true

Maybe use
              --ignore-fail-on-non-empty

instead of || true.

>  	sed -i -e '1s,#!.*perl,#!${USRBINPATH}/env perl,' ${D}${bindir}/findsmb
>  }
>  
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Andreas Oberritter - March 7, 2013, 2:32 p.m.
On 07.03.2013 14:48, Martin Jansa wrote:
> On Thu, Mar 07, 2013 at 02:14:56PM +0100, Andreas Oberritter wrote:
>> * Samba 3.0 doesn't build libbss_*.so
> 
> libnss_*.so
> 
>> * base_sbindir may contain mount.cifs
>>
>> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
>> ---
>>  meta-oe/recipes-connectivity/samba/samba.inc |    8 +++++---
>>  1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta-oe/recipes-connectivity/samba/samba.inc b/meta-oe/recipes-connectivity/samba/samba.inc
>> index 3ee43ad..a151b16 100644
>> --- a/meta-oe/recipes-connectivity/samba/samba.inc
>> +++ b/meta-oe/recipes-connectivity/samba/samba.inc
>> @@ -87,10 +87,12 @@ do_install_append() {
>>  	install -d ${D}/var/spool/samba
>>  
>>  	# Install other stuff not installed by "make install"
>> -	install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_winbind.so ${D}${libdir}/libnss_winbind.so.2
>> -	install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_wins.so ${D}${libdir}/libnss_wins.so.2
>> +	if [ -d ${WORKDIR}/${PN}-${PV}/nsswitch ]; then
>> +		install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_winbind.so ${D}${libdir}/libnss_winbind.so.2
>> +		install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_wins.so ${D}${libdir}/libnss_wins.so.2
>> +	fi
> 
> It looks weird, but ${S}/../nsswitch won't be much better I guess.

Yes, that's what I thought, so I chose to keep it unchanged.

>> -	rmdir ${D}${base_sbindir}
>> +	rmdir ${D}${base_sbindir} || true
> 
> Maybe use
>               --ignore-fail-on-non-empty
> 
> instead of || true.

Thanks, I will send v2 shortly.

Regards,
Andreas

Patch

diff --git a/meta-oe/recipes-connectivity/samba/samba.inc b/meta-oe/recipes-connectivity/samba/samba.inc
index 3ee43ad..a151b16 100644
--- a/meta-oe/recipes-connectivity/samba/samba.inc
+++ b/meta-oe/recipes-connectivity/samba/samba.inc
@@ -87,10 +87,12 @@  do_install_append() {
 	install -d ${D}/var/spool/samba
 
 	# Install other stuff not installed by "make install"
-	install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_winbind.so ${D}${libdir}/libnss_winbind.so.2
-	install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_wins.so ${D}${libdir}/libnss_wins.so.2
+	if [ -d ${WORKDIR}/${PN}-${PV}/nsswitch ]; then
+		install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_winbind.so ${D}${libdir}/libnss_winbind.so.2
+		install -m 0644 ${WORKDIR}/${PN}-${PV}/nsswitch/libnss_wins.so ${D}${libdir}/libnss_wins.so.2
+	fi
 
-	rmdir ${D}${base_sbindir}
+	rmdir ${D}${base_sbindir} || true
 	sed -i -e '1s,#!.*perl,#!${USRBINPATH}/env perl,' ${D}${bindir}/findsmb
 }