[meta-oe] samba: Solve the dependency problem when installing Samba

Submitted by wangmy on June 22, 2021, 2:33 a.m. | Patch ID: 179914

Details

Message ID 1624329198-77666-1-git-send-email-wangmy@fujitsu.com
State Master Next
Commit 2a7bc625541f5d52b46fda991354e60f1b1bb91f
Headers show

Commit Message

wangmy June 22, 2021, 2:33 a.m.
Error Message:
 Problem: conflicting requests
  - nothing provides samba-pidl needed by samba-client-4.14.5-r0.aarch64

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
---
 .../samba/samba_4.14.5.bb                     | 24 +++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta-networking/recipes-connectivity/samba/samba_4.14.5.bb b/meta-networking/recipes-connectivity/samba/samba_4.14.5.bb
index efaf4f2a15..e0a4f0a8c7 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.14.5.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.14.5.bb
@@ -39,7 +39,7 @@  SRC_URI[sha256sum] = "bb6ef5d2f16b85288d823578abc453d9a80514c42e5a2ea2c4e3c60dc4
 
 UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.14(\.\d+)+).tar.gz"
 
-inherit systemd waf-samba cpan-base perlnative update-rc.d
+inherit systemd waf-samba cpan-base perlnative update-rc.d perl-version
 
 # CVE-2011-2411 is valnerble only on HP NonStop Servers.
 CVE_CHECK_WHITELIST += "CVE-2011-2411" 
@@ -130,6 +130,19 @@  EXTRA_OECONF += "--enable-fhs \
 
 LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
 
+do_configure_append () {
+    cd ${S}/pidl/
+    perl Makefile.PL PREFIX=${prefix}
+    sed -e 's,VENDORPREFIX)/lib/perl,VENDORPREFIX)/${baselib}/perl,g' \
+        -e 's,PERLPREFIX)/lib/perl,PERLPREFIX)/${baselib}/perl,g' -i Makefile
+
+}
+
+do_compile_append () {
+    cd ${S}/pidl/
+    make
+}
+
 do_install_append() {
     for section in 1 5 7; do
         install -d ${D}${mandir}/man$section
@@ -195,6 +208,11 @@  do_install_append() {
     if [ -f "${D}${bindir}/samba-tool" ]; then
         sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${bindir}/samba-tool
     fi
+
+    cd ${S}/pidl/
+    make DESTDIR=${D} install_vendor
+    rm -rf ${D}${libdir}/perl5/${PERLVERSION}/${BUILD_SYS}/perllocal.pod
+    rm -rf ${D}${libdir}/perl5/vendor_perl/${PERLVERSION}/${BUILD_SYS}/auto/Parse/Pidl/.packlist
     
 }
 
@@ -301,7 +319,9 @@  FILES_smbclient = "${bindir}/cifsdd \
                    ${libdir}/samba/smbspool_krb5_wrapper"
 
 RDEPENDS_${PN}-pidl_append = " perl"
-FILES_${PN}-pidl = "${bindir}/pidl ${datadir}/perl5/Parse"
+FILES_${PN}-pidl = "${bindir}/pidl \
+                    ${libdir}/perl5 \
+                   "
 
 RDEPENDS_${PN}-client = "\
     smbclient \

Comments

Khem Raj June 22, 2021, 3:05 a.m.
On 6/21/21 7:33 PM, wangmy wrote:
> Error Message:
>   Problem: conflicting requests
>    - nothing provides samba-pidl needed by samba-client-4.14.5-r0.aarch64
> 
> Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
> ---
>   .../samba/samba_4.14.5.bb                     | 24 +++++++++++++++++--
>   1 file changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-networking/recipes-connectivity/samba/samba_4.14.5.bb b/meta-networking/recipes-connectivity/samba/samba_4.14.5.bb
> index efaf4f2a15..e0a4f0a8c7 100644
> --- a/meta-networking/recipes-connectivity/samba/samba_4.14.5.bb
> +++ b/meta-networking/recipes-connectivity/samba/samba_4.14.5.bb
> @@ -39,7 +39,7 @@ SRC_URI[sha256sum] = "bb6ef5d2f16b85288d823578abc453d9a80514c42e5a2ea2c4e3c60dc4
>   
>   UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.14(\.\d+)+).tar.gz"
>   
> -inherit systemd waf-samba cpan-base perlnative update-rc.d
> +inherit systemd waf-samba cpan-base perlnative update-rc.d perl-version
>   
>   # CVE-2011-2411 is valnerble only on HP NonStop Servers.
>   CVE_CHECK_WHITELIST += "CVE-2011-2411"
> @@ -130,6 +130,19 @@ EXTRA_OECONF += "--enable-fhs \
>   
>   LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
>   
> +do_configure_append () {
> +    cd ${S}/pidl/
> +    perl Makefile.PL PREFIX=${prefix}
> +    sed -e 's,VENDORPREFIX)/lib/perl,VENDORPREFIX)/${baselib}/perl,g' \
> +        -e 's,PERLPREFIX)/lib/perl,PERLPREFIX)/${baselib}/perl,g' -i Makefile
> +
> +}
> +
> +do_compile_append () {
> +    cd ${S}/pidl/
> +    make

can we call oe_runame -C ${S}/pidl perhaps not build it in source tree.

> +}
> +
>   do_install_append() {
>       for section in 1 5 7; do
>           install -d ${D}${mandir}/man$section
> @@ -195,6 +208,11 @@ do_install_append() {
>       if [ -f "${D}${bindir}/samba-tool" ]; then
>           sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${bindir}/samba-tool
>       fi
> +
> +    cd ${S}/pidl/
> +    make DESTDIR=${D} install_vendor

same here call oe_runmake and perhaps no need to cd if above step works.

> +    rm -rf ${D}${libdir}/perl5/${PERLVERSION}/${BUILD_SYS}/perllocal.pod
> +    rm -rf ${D}${libdir}/perl5/vendor_perl/${PERLVERSION}/${BUILD_SYS}/auto/Parse/Pidl/.packlist
>       
>   }
>   
> @@ -301,7 +319,9 @@ FILES_smbclient = "${bindir}/cifsdd \
>                      ${libdir}/samba/smbspool_krb5_wrapper"
>   
>   RDEPENDS_${PN}-pidl_append = " perl"
> -FILES_${PN}-pidl = "${bindir}/pidl ${datadir}/perl5/Parse"
> +FILES_${PN}-pidl = "${bindir}/pidl \
> +                    ${libdir}/perl5 \
> +                   "
>   
>   RDEPENDS_${PN}-client = "\
>       smbclient \
> 
> 
> 
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#91976): https://lists.openembedded.org/g/openembedded-devel/message/91976
Mute This Topic: https://lists.openembedded.org/mt/83705392/3617530
Group Owner: openembedded-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-