Package Details: lldap 0.5.0-2

Git Clone URL: https://aur.archlinux.org/lldap.git (read-only, click to copy)
Package Base: lldap
Description: Light LDAP implementation
Upstream URL: https://github.com/lldap/lldap
Licenses: GPL3
Submitter: grawlinson
Maintainer: grawlinson
Last Packager: grawlinson
Votes: 1
Popularity: 0.48
First Submitted: 2023-04-22 09:49 (UTC)
Last Updated: 2023-10-29 01:52 (UTC)

Latest Comments

Zepman commented on 2024-02-12 11:57 (UTC) (edited on 2024-02-12 12:17 (UTC) by Zepman)

This package fails to build. Tested on a stock Arch Linux system with base-devel installed, without the use of an AUR helper.

$ makepkg -sr --noconfirm
==> Making package: lldap 0.5.0-2 (Mon Feb 12 11:44:42 2024)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (10) c-ares-1.26.0-1  libngtcp2-1.2.0-1  libuv-1.48.0-1  lld-16.0.6-1  llvm-libs-16.0.6-1  nodejs-21.6.1-1  rust-1:1.76.0-1  rust-wasm-1:1.76.0-1  wasm-bindgen-0.2.91-2  wasm-pack-0.12.1-1

Total Download Size:   161.99 MiB
Total Installed Size:  669.56 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
(...)
==> Retrieving sources...
(...)
==> Validating source files with b2sums...
(...)
==> Extracting sources...
(...)
==> Starting prepare()...
(...)
==> Starting pkgver()...
==> Starting build()...
(...)
   Compiling lldap v0.5.0 (/home/user/src/lldap/src/lldap/server)
warning: unused import: `GroupColumn`
  --> server/src/domain/types.rs:11:24
   |
11 | pub use super::model::{GroupColumn, UserColumn};
   |                        ^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: `lldap` (bin "lldap") generated 1 warning (run `cargo fix --bin "lldap"` to apply 1 suggestion)
error: could not compile `lldap` (bin "lldap"); 1 warning emitted

Caused by:
  process didn't exit successfully: `rustc --crate-name lldap --edition=2021 server/src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C metadata=9ade2ef812284928 -C extra-filename=-9ade2ef812284928 --out-dir /home/user/src/lldap/src/lldap/target/release/deps -L dependency=/home/user/src/lldap/src/lldap/target/release/deps --extern actix=/home/user/src/lldap/src/lldap/target/release/deps/libactix-6d5d588e1ab4c855.rlib --extern actix_files=/home/user/src/lldap/src/lldap/target/release/deps/libactix_files-6461e342a28380f6.rlib --extern actix_http=/home/user/src/lldap/src/lldap/target/release/deps/libactix_http-9b5007d3a171de49.rlib --extern actix_rt=/home/user/src/lldap/src/lldap/target/release/deps/libactix_rt-09e4cf0bb33c583b.rlib --extern actix_server=/home/user/src/lldap/src/lldap/target/release/deps/libactix_server-83aff64a422a0a38.rlib --extern actix_service=/home/user/src/lldap/src/lldap/target/release/deps/libactix_service-0ed2a284f675f243.rlib --extern actix_tls=/home/user/src/lldap/src/lldap/target/release/deps/libactix_tls-bca98767ce782632.rlib --extern actix_web=/home/user/src/lldap/src/lldap/target/release/deps/libactix_web-64d336829c79aa09.rlib --extern actix_web_httpauth=/home/user/src/lldap/src/lldap/target/release/deps/libactix_web_httpauth-05c57ed1bf156a53.rlib --extern anyhow=/home/user/src/lldap/src/lldap/target/release/deps/libanyhow-d90fdbe770abb5a3.rlib --extern async_trait=/home/user/src/lldap/src/lldap/target/release/deps/libasync_trait-9f068691320514dc.so --extern base64=/home/user/src/lldap/src/lldap/target/release/deps/libbase64-a6257400465a6136.rlib --extern bincode=/home/user/src/lldap/src/lldap/target/release/deps/libbincode-d863a98a6f730d8e.rlib --extern chrono=/home/user/src/lldap/src/lldap/target/release/deps/libchrono-99b35d7927e9ef48.rlib --extern clap=/home/user/src/lldap/src/lldap/target/release/deps/libclap-391abc70ae1c7f1c.rlib --extern cron=/home/user/src/lldap/src/lldap/target/release/deps/libcron-cb639a1663c2c76d.rlib --extern derive_builder=/home/user/src/lldap/src/lldap/target/release/deps/libderive_builder-f0674cd396bf59ed.rlib --extern figment=/home/user/src/lldap/src/lldap/target/release/deps/libfigment-c1d11440cbe20e55.rlib --extern figment_file_provider_adapter=/home/user/src/lldap/src/lldap/target/release/deps/libfigment_file_provider_adapter-a7668cc88df2cccb.rlib --extern futures=/home/user/src/lldap/src/lldap/target/release/deps/libfutures-b0e5006765485cb4.rlib --extern futures_util=/home/user/src/lldap/src/lldap/target/release/deps/libfutures_util-94ede94effe3703e.rlib --extern hmac=/home/user/src/lldap/src/lldap/target/release/deps/libhmac-831ec00f49ed6f12.rlib --extern http=/home/user/src/lldap/src/lldap/target/release/deps/libhttp-af1c71051774b485.rlib --extern image=/home/user/src/lldap/src/lldap/target/release/deps/libimage-891dfec21d08970f.rlib --extern itertools=/home/user/src/lldap/src/lldap/target/release/deps/libitertools-d4f3f3a1205f0457.rlib --extern juniper=/home/user/src/lldap/src/lldap/target/release/deps/libjuniper-d80e86e7762999e7.rlib --extern jwt=/home/user/src/lldap/src/lldap/target/release/deps/libjwt-2f1b5a0385a610b0.rlib --extern lber=/home/user/src/lldap/src/lldap/target/release/deps/liblber-a563df3aebc2af86.rlib --extern ldap3_proto=/home/user/src/lldap/src/lldap/target/release/deps/libldap3_proto-1493f970c7c1fc14.rlib --extern lettre=/home/user/src/lldap/src/lldap/target/release/deps/liblettre-fde7661bcd60dcf6.rlib --extern lldap_auth=/home/user/src/lldap/src/lldap/target/release/deps/liblldap_auth-81ee0ed54cd95347.rlib --extern log=/home/user/src/lldap/src/lldap/target/release/deps/liblog-da6f79cbdfa6cfc7.rlib --extern opaque_ke=/home/user/src/lldap/src/lldap/target/release/deps/libopaque_ke-e887c11cf1af875d.rlib --extern orion=/home/user/src/lldap/src/lldap/target/release/deps/liborion-e955c3b6814226e6.rlib --extern rand=/home/user/src/lldap/src/lldap/target/release/deps/librand-39ac82ced24a5b09.rlib --extern rand_chacha=/home/user/src/lldap/src/lldap/target/release/deps/librand_chacha-fb5fb99357a5e44f.rlib --extern reqwest=/home/user/src/lldap/src/lldap/target/release/deps/libreqwest-8d1b9b8f6f61ec24.rlib --extern rustls=/home/user/src/lldap/src/lldap/target/release/deps/librustls-bdc607886ee1198b.rlib --extern rustls_pemfile=/home/user/src/lldap/src/lldap/target/release/deps/librustls_pemfile-7658a10d9886e881.rlib --extern sea_orm=/home/user/src/lldap/src/lldap/target/release/deps/libsea_orm-c0b764a6208fb4e2.rlib --extern secstr=/home/user/src/lldap/src/lldap/target/release/deps/libsecstr-e169ad709f1c3c79.rlib --extern serde=/home/user/src/lldap/src/lldap/target/release/deps/libserde-277d2f85f30cbd26.rlib --extern serde_bytes=/home/user/src/lldap/src/lldap/target/release/deps/libserde_bytes-b81f5e7bfe98fcb1.rlib --extern serde_json=/home/user/src/lldap/src/lldap/target/release/deps/libserde_json-b53476e5f4cd725a.rlib --extern sha2=/home/user/src/lldap/src/lldap/target/release/deps/libsha2-b45734e3c14cc1cf.rlib --extern strum=/home/user/src/lldap/src/lldap/target/release/deps/libstrum-91c0e437e86eac30.rlib --extern thiserror=/home/user/src/lldap/src/lldap/target/release/deps/libthiserror-1105fec3c9a196f9.rlib --extern time=/home/user/src/lldap/src/lldap/target/release/deps/libtime-cae3e7639673aec9.rlib --extern tokio=/home/user/src/lldap/src/lldap/target/release/deps/libtokio-93a9aad4a1b747a3.rlib --extern tokio_rustls=/home/user/src/lldap/src/lldap/target/release/deps/libtokio_rustls-e85d0362b7b9a067.rlib --extern tokio_stream=/home/user/src/lldap/src/lldap/target/release/deps/libtokio_stream-2555b27c513fed8b.rlib --extern tokio_util=/home/user/src/lldap/src/lldap/target/release/deps/libtokio_util-cf37423040d103b7.rlib --extern tracing=/home/user/src/lldap/src/lldap/target/release/deps/libtracing-0724b85c07392475.rlib --extern tracing_actix_web=/home/user/src/lldap/src/lldap/target/release/deps/libtracing_actix_web-b1c84a1e2e576296.rlib --extern tracing_attributes=/home/user/src/lldap/src/lldap/target/release/deps/libtracing_attributes-fbf7276f991319d1.so --extern tracing_forest=/home/user/src/lldap/src/lldap/target/release/deps/libtracing_forest-8f808879b7b781f0.rlib --extern tracing_log=/home/user/src/lldap/src/lldap/target/release/deps/libtracing_log-34682097e0c5977e.rlib --extern tracing_subscriber=/home/user/src/lldap/src/lldap/target/release/deps/libtracing_subscriber-1cb09e3208afe2ff.rlib --extern url=/home/user/src/lldap/src/lldap/target/release/deps/liburl-d5a6b2f3c3c535ba.rlib --extern urlencoding=/home/user/src/lldap/src/lldap/target/release/deps/liburlencoding-7dca194015bb793a.rlib --extern uuid=/home/user/src/lldap/src/lldap/target/release/deps/libuuid-a621d22b7af3e36d.rlib --extern webpki_roots=/home/user/src/lldap/src/lldap/target/release/deps/libwebpki_roots-ec1f2080bf72e283.rlib -C debuginfo=2 --remap-path-prefix=/home/user/src/lldap/src=/usr/src/debug/lldap -L native=/home/user/src/lldap/src/lldap/target/release/build/zstd-sys-68221c8535db1868/out -L native=/home/user/src/lldap/src/lldap/target/release/build/ring-3d809698113728f4/out -L native=/home/user/src/lldap/src/lldap/target/release/build/libsqlite3-sys-f53f740b186dceb2/out` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...

Workaround:

--- a/PKGBUILD  2024-02-12 12:17:28.819710234 +0000
+++ b/PKGBUILD  2024-02-12 12:17:15.343043985 +0000
@@ -49,7 +49,7 @@
   cd "$pkgname"

   # server
-  cargo build \
+  RUSTFLAGS=-Awarnings cargo build \
     --frozen \
     --release \
     --all-features \

Zepman commented on 2023-11-09 11:46 (UTC)

LLDAP supports unix domain sockets outgoing connections to MariaDB/PostgreSQL. However, the systemd service file prevents use of this functionality due to too strict permissions.

Please change:

RestrictAddressFamilies=AF_INET AF_INET6

To:

RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX

grawlinson commented on 2023-10-29 01:32 (UTC)

Thanks for pointing that out. I'll push an update soon. :)

Zepman commented on 2023-10-22 10:27 (UTC)

This package seems incomplete since lldap_migration_tool and lldap_set_password are not included. Would you like to add these tools to PKGBUILD?

Required change to PKGBUILD:

--- a/PKGBUILD  2023-10-09 10:30:13.000000000 +0200
+++ b/PKGBUILD  2023-10-22 12:27:12.711929275 +0200
@@ -49,7 +49,7 @@
   cd "$pkgname"

   # server
-  cargo build --frozen --release --all-features
+  cargo build --frozen --release --all-features -p lldap -p lldap_migration_tool -p lldap_set_password

   # frontend
   ./app/build.sh

grawlinson commented on 2023-10-09 08:02 (UTC)

There's nothing stopping you from creating a lldap-bin package. :)

Zepman commented on 2023-10-05 14:12 (UTC) (edited on 2023-10-05 14:27 (UTC) by Zepman)

Marked as out-of-date. Tested 0.5.0 by upping the version number and commit identifier.

Commit: 6f04530700cbe00e979c84483a8310b1339e9d6e

  • Applying Cargo.lock.patch fails, but does not seem to be necessary (anymore?) for building when removed.
  • config-template.patch must be recreated for 0.5.0, but it is hardly any effort:
--- a/lldap_config.docker_template.toml 2023-10-05 13:28:13.191357255 +0000
+++ b/lldap_config.docker_template.toml 2023-10-05 13:29:51.918199806 +0000
@@ -85,7 +85,7 @@
 ##  - "mysql://mysql-user:password@mysql-server/my-database"
 ##
 ## This can be overridden with the LLDAP_DATABASE_URL env variable.
-database_url = "sqlite:///data/users.db?mode=rwc"
+database_url = "sqlite:///var/lib/lldap/data/users.db?mode=rwc"

 ## Private key file.
 ## Contains the secret private key used to store the passwords safely.
@@ -96,7 +96,7 @@
 ## Alternatively, you can use key_seed to override this instead of relying on
 ## a file.
 ## Env variable: LLDAP_KEY_FILE
-key_file = "/data/private_key"
+key_file = "/var/lib/lldap/data/private_key"

 ## Seed to generate the server private key, see key_file above.
 ## This can be any random string, the recommendation is that it's at least 12

Would an lldap-bin package make sense? There are binary releases for amd64, aarch64 and armhf. It saves quite a bit of MBs in download and storage, many CPU cycles, and a lot of time. This would be appropriate for a lightweight LDAP implementation when resources are limited.