Skip to content

Conversation

@sandreenko
Copy link

I am trying to add a build time dependency between CoreFX library and OpenLdap.
In order to do so, I need OpenLdap library to exist in the docker images that we use for build.

I am not familiar with this infrastructure so please review as if a monkey wrote this change.

cc @janvorli

link dotnet/runtime#50540

__AndroidPackages+=" liblzma"
__AndroidPackages+=" krb5"
__AndroidPackages+=" openssl"
# do I need ldap on android? how can I find android package name?
Copy link
Member

Choose a reason for hiding this comment

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

The package name is openldap. You can find it by downloading the file below (e.g. http://termux.net/dists/stable/main/binary-aarch64/Packages for arm64) and then search for ldap.

__IllumosPackages+=" mit-krb5-1.16.2nb4"
__IllumosPackages+=" openssl-1.1.1e"
__IllumosPackages+=" zlib-1.2.11"
__IllumosPackages+=" ldap-0.5.11"
Copy link
Member

Choose a reason for hiding this comment

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

@am11 can you please verify the Illumos package name?

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Member

@am11 am11 Apr 7, 2021

Choose a reason for hiding this comment

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

Thanks for the message @janvorli.

@sandreenko, we are currently using SmartOS' distro for the raw packages:
US: https://pkgsrc.joyent.co/packages/SmartOS/2020Q1/x86_64/All/
EU: https://pkgsrc.smartos.skylime.net/packages/SmartOS/2020Q1/x86_64/All/

the package which has libldap.so is http://pkgsrc.smartos.skylime.net/packages/SmartOS/2020Q1/x86_64/All/openldap-client-2.4.49.tgz. Assuming that's the lib we are interested in(?), I'd change it to:

Suggested change
__IllumosPackages+=" ldap-0.5.11"
__IllumosPackages+=" openldap-client-2.4.49"

btw, we can test it by running eng/common/cross/build-rootfs.sh --use-mirror illumos (or without mirror in US) from root of the repo on linux machine and then inspect/find stuff in ./.tools/rootfs/ directory.

# prereqs on Ubuntu 20.04
$ sudo apt install g++ make libgmp3-dev libmpfr-dev libmpc-dev

# run the script for illumos
$ eng/common/cross/build-rootfs.sh --use-mirror illumos
# succeeds

$ find .tools/ -name *ldap.so
.tools/rootfs/x64/lib/krb5/plugins/kdb/kldap.so
.tools/rootfs/x64/lib/libkdb_ldap.so
.tools/rootfs/x64/lib/libldap.so
.tools/rootfs/x64/usr/lib/amd64/libldap.so
.tools/rootfs/x64/usr/lib/amd64/libsldap.so
.tools/rootfs/x64/usr/lib/libldap.so
.tools/rootfs/x64/usr/lib/libsldap.so
.tools/rootfs/x64/usr/lib/security/amd64/pam_ldap.so
.tools/rootfs/x64/usr/lib/security/pam_ldap.so

Copy link
Author

Choose a reason for hiding this comment

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

Thanks @am11,

btw, we can test it by running eng/common/cross/build-rootfs.sh --use-mirror illumos (or without mirror in US) from root of the repo on linux machine and then inspect/find stuff in ./.tools/rootfs/ directory.

Could you please clarify if we need to run something after "find .tools/ -name *ldap.so" to find where ".tools/rootfs/x64/usr/lib/amd64/libldap.so" comes from?

@sandreenko
Copy link
Author

@janvorli could you please explain why we don't have ldap in Interop libraries for Android ? Is it inherited from Unix or not used there? I guess it is not used then how do we run System.DirectoryServices.Protocols there? I guess it is excluded somehow but can't find information about it.

The question is if we want to add this dependency for android or not, the same goes for FreeBSD I think.

@am11
Copy link
Member

am11 commented Apr 7, 2021

The question is if we want to add this dependency for android or not, the same goes for FreeBSD I think.

(I am not @janvorli but) IMO, we can add the dependencies as these are very early-stage setup scripts, and it doesn't hurt to add an extra package which may or may not be consumed by the build. If we need them later on those platforms, it would be easier to consume them OOTB from the docker image (rather than going through this process: update this script, wait for dotnet/dotnet-buildtools-prereqs-docker repo to create a new image, consume the image in dotnet/runtime).

@janvorli
Copy link
Member

janvorli commented Apr 7, 2021

Android with CoreCLR is currently in a mode where we've made things work in the past, but we never test it or do anything with it. Official Android support comes from the Mono in .NET. Looking at the history of the interop libraries for Android you've mentioned, I can see it was added for Mono purposes.

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@sandreenko sandreenko merged commit 44f0c7b into main Apr 7, 2021
@sandreenko sandreenko deleted the addLdapForBuildImages branch April 7, 2021 19:26
akoeplinger pushed a commit to akoeplinger/arcade that referenced this pull request Apr 12, 2021
* try to add ldap libraries.

* fixes

* Update eng/common/cross/build-rootfs.sh

Co-authored-by: Adeel Mujahid <[email protected]>

Co-authored-by: Adeel Mujahid <[email protected]>
sandreenko pushed a commit that referenced this pull request Apr 28, 2021
janvorli pushed a commit that referenced this pull request May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants