Skip to content

Commit

Permalink
samba: Solve the dependency problem when installing Samba
Browse files Browse the repository at this point in the history
Error Message:
 Problem: conflicting requests
  - nothing provides samba-pidl needed by samba-client-4.14.5-r0.aarch64

Signed-off-by: Wang Mingyu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
wangmingyu84 authored and kraj committed Jun 24, 2021
1 parent ae6fc9e commit 31fb422
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions meta-networking/recipes-connectivity/samba/samba_4.14.5.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -130,6 +130,18 @@ 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 () {
oe_runmake -C ${S}/pidl
}

do_install_append() {
for section in 1 5 7; do
install -d ${D}${mandir}/man$section
Expand Down Expand Up @@ -195,6 +207,10 @@ 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

oe_runmake -C ${S}/pidl 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

}

Expand Down Expand Up @@ -301,7 +317,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 \
Expand Down

5 comments on commit 31fb422

@persianpros
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: samba-4.14.5-r0 do_package_qa: QA Issue: samba-pidl contains perllocal.pod (/usr/lib/perl5/5.34.0/x86_64-linux/perllocal.pod), should not be installed [perllocalpod]
ERROR: samba-4.14.5-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.

@kraj
Copy link
Contributor

@kraj kraj commented on 31fb422 Jun 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@persianpros rm -rf ${D}${libdir}/perl5/${PERLVERSION}/${BUILD_SYS}/perllocal.pod should have deleted it in do_install_append
so I wonder why this is not working for you.

@persianpros
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kraj

I fixed it like this:

find ${D}${libdir}/ -type f -name "perllocal.pod" | xargs rm -f

@kraj
Copy link
Contributor

@kraj kraj commented on 31fb422 Jun 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe thats a better fix. Can you send a patch?

@persianpros
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.