11 files changed, 26 insertions(+), 2 deletions(-)
M .gitignore
M Containerfile
M build.gradle
M src/main/jni/ceph
D src/main/jniLibs/arm64-v8a/libboost_iostreams.so
D src/main/jniLibs/arm64-v8a/libboost_thread.so
D src/main/jniLibs/arm64-v8a/libc++_shared.so
D src/main/jniLibs/arm64-v8a/libceph-common.so
D src/main/jniLibs/arm64-v8a/libcephfs.so
D src/main/jniLibs/arm64-v8a/libcephfs_jni.so
D src/main/jniLibs/arm64-v8a/libcrypto_1_1.so
M .gitignore => .gitignore +1 -0
@@ 82,3 82,4 @@ lint/tmp/
# lint/reports/
*.args
+.cxx
M Containerfile => Containerfile +3 -1
@@ 1,12 1,14 @@
FROM archlinux
RUN printf '[aurbuild]\nServer = https://aurbuild.xdavidwu.link\n' >> /etc/pacman.conf
-RUN curl 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xf73f137d4573defaa097dbf09544cff6b08a3fd3' | pacman-key -a - && pacman-key --init && pacman-key --lsign-key f73f137d4573defaa097dbf09544cff6b08a3fd3 && pacman -Syu --noconfirm && pacman -S --noconfirm jdk17-openjdk android-sdk-cmdline-tools-latest android-platform-33 android-sdk-build-tools-33 && mkdir /build
+RUN curl 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xf73f137d4573defaa097dbf09544cff6b08a3fd3' | pacman-key -a - && pacman-key --init && pacman-key --lsign-key f73f137d4573defaa097dbf09544cff6b08a3fd3 && pacman -Syu --noconfirm && pacman -S --noconfirm jdk17-openjdk android-sdk-cmdline-tools-latest android-platform-33 android-sdk-build-tools-33 android-ndk android-aarch64-boost android-aarch64-openssl cmake ninja python-yaml && mkdir /build
WORKDIR /build
# XXX: use /etc/profile.d/*.sh instead?
ENV ANDROID_HOME=/opt/android-sdk
ENV ANDROID_SDK_ROOT=/opt/android-sdk
+ENV ANDROID_NDK=/opt/android-ndk
+ENV ANDROID_NDK_HOME=/opt/android-ndk
LABEL org.opencontainers.image.source=https://github.com/xdavidwu/saf-cephfs
M build.gradle => build.gradle +21 -0
@@ 12,10 12,21 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-33'
buildToolsVersion '33'
+ ndkPath '/opt/android-ndk'
defaultConfig {
minSdkVersion 24
targetSdkVersion 33
+ externalNativeBuild {
+ cmake {
+ arguments '-DWITH_MANPAGE=OFF', '-DWITH_RDMA=OFF', '-DWITH_KVS=OFF', '-DWITH_FUSE=OFF', '-DWITH_BLUESTORE=OFF', '-DWITH_XFS=OFF', '-DWITH_RBD=OFF', '-DWITH_OPENLDAP=OFF', '-DWITH_RADOSGW=OFF', '-DWITH_LZ4=OFF', '-DWITH_KRBD=OFF', '-DWITH_LTTNG=OFF', '-DWITH_MGR=OFF', '-DWITH_BABELTRACE=OFF', '-DWITH_CEPHFS=OFF', '-DWITH_LIBRADOSSTRIPER=OFF', '-DWITH_TESTS=OFF', '-DWITH_REENTRANT_STRSIGNAL=ON', '-DWITH_SYSTEMD=OFF', '-DWITH_MGR_DASHBOARD_FRONTEND=OFF', '-DWITH_RADOSGW_KAFKA_ENDPOINT=OFF', '-DWITH_RADOSGW_AMQP_ENDPOINT=OFF', '-DWITH_RADOSGW_BEAST_OPENSSL=OFF', '-DDEBUG_GATHER=OFF', '-DWITH_CEPHFS_JAVA=ON', '-DOPENSSL_INCLUDE_DIR:FILEPATH=/opt/android-libs/aarch64/include/', '-DOPENSSL_CRYPTO_LIBRARY=/opt/android-libs/aarch64/lib/libcrypto.so', '-DWITH_SYSTEM_BOOST=ON', '-DBoost_INCLUDE_DIR=/opt/android-libs/aarch64/include/', '-DBoost_LIBRARY_DIR=/opt/android-libs/aarch64/lib/', '-DWITH_LIBCEPHSQLITE=OFF'
+ targets 'cephfs_jni'
+ }
+ }
+ ndk {
+ // TODO: perhaps x86_64, but android-x86 isn't really active these days
+ abiFilters 'arm64-v8a'
+ }
}
buildTypes {
@@ 25,6 36,16 @@ android {
}
}
+ externalNativeBuild {
+ cmake {
+ path 'src/main/jni/ceph/CMakeLists.txt'
+ // agp weirdness: specify version to use system cmake
+ // https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/dsl/Cmake#version()
+ // TODO: use cmake from android-sdk?
+ version '3.27.1'
+ }
+ }
+
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
M src/main/jni/ceph => src/main/jni/ceph +1 -1
@@ 1,1 1,1 @@
-Subproject commit a973f5d6d06e3b3ee9d20db0e047c1b49c3465bd
+Subproject commit 5864d641d21fec9c97034c59e2663db4bd733da6
D src/main/jniLibs/arm64-v8a/libboost_iostreams.so => src/main/jniLibs/arm64-v8a/libboost_iostreams.so +0 -0
D src/main/jniLibs/arm64-v8a/libboost_thread.so => src/main/jniLibs/arm64-v8a/libboost_thread.so +0 -0
D src/main/jniLibs/arm64-v8a/libc++_shared.so => src/main/jniLibs/arm64-v8a/libc++_shared.so +0 -0
D src/main/jniLibs/arm64-v8a/libceph-common.so => src/main/jniLibs/arm64-v8a/libceph-common.so +0 -0
D src/main/jniLibs/arm64-v8a/libcephfs.so => src/main/jniLibs/arm64-v8a/libcephfs.so +0 -0
D src/main/jniLibs/arm64-v8a/libcephfs_jni.so => src/main/jniLibs/arm64-v8a/libcephfs_jni.so +0 -0
D src/main/jniLibs/arm64-v8a/libcrypto_1_1.so => src/main/jniLibs/arm64-v8a/libcrypto_1_1.so +0 -0