LLNG-BU...R-FILES(1)
π LLNG-BU...R-FILES(1) β the perl manual, but make it cute
okay bestie, welcome to llng-build-manager-files, a User Contributed Perl Documentation page and honestly? she's a baddie. let's get into it π
β¨ NAME β¨
llng-build-manager-files β regenerate LemonLDAP::NG Manager with plugin extensions π§
πΈ SYNOPSIS πΈ
llng-build-manager-files [--plugins-dir=<path> ...] [options]
π¦ DESCRIPTION π¦
so basically, this script is the main character that lets LemonLDAP::NG plugins β¨extendβ¨ the Manager interface. and by extend i mean it adds new configuration attributes, new tree nodes (for the configuration tree, duh), and portal constants. it's giving glow-up π
the extensions can show up in either Perl (.pm) or JSON (.json) format, and they get loaded from whatever plugins directory you point at. periodt.
π OPTIONS π
--plugins-dir=pathβ the directory that's holding your plugin extension files (.pmor.json). you can pass this more than once to scan several directories, no cap. if you don't specify it, or a directory straight up doesn't exist, it gets skipped with a warning. it's fine, she's flexible π--struct-file=pathβ output path for thestruct.jsonfile.--conftree-file=pathβ output path for theconftree.jsfile.--manager-constants-file=pathβ output path for theReConstants.pmfile.--manager-attributes-file=pathβ output path for theAttributes.pmfile.--default-values-file=pathβ output path for theDefaultValues.pmfile.--conf-constants-file=pathβ output path for theConstants.pmfile.--reverse-tree-file=pathβ output path for thereverseTree.jsonfile.--portal-constants-file=pathβ output path for the portalConstants.pmfile.--handler-status-constants-file=pathβ output path for theStatusConstants.pmfile.--lang-dir=pathβ the directory holding your language JSON files (likeen.json,fr.json). translations coming from extensions get merged into these files π--verbose,-vβ show detailed progress info, for the girlies who need to see everything happening π--help,-hβ show the help message. she's helpful like that.
π EXTENSION FILE FORMAT π
π Perl Format (.pm)
package MyPlugin::Extension;
sub attributes {
return {
myPluginEnabled => {
type => 'bool',
default => 0,
documentation => 'Enable my plugin',
help => 'myplugin.html',
},
myPluginOption => {
type => 'text',
default => 'default_value',
},
};
}
sub tree {
return {
insert_into => 'generalParameters/plugins',
nodes => [
{
title => 'myPluginNode',
help => 'myplugin.html',
form => 'simpleInputContainer',
nodes => ['myPluginEnabled', 'myPluginOption'],
}
],
};
}
sub ctrees {
return {
# Extend oidcRPMetaDataNode with additional options
oidcRPMetaDataNode => {
insert_after => 'oidcRPMetaDataMacros',
nodes => [
{
title => 'myPluginOidcOptions',
form => 'simpleInputContainer',
nodes => ['myPluginOidcAttr'],
}
],
},
};
}
sub constants {
return {
PE_MYPLUGIN_ERROR => 200,
};
}
sub lang {
return {
myPluginEnabled => {
en => 'Enable my plugin',
fr => 'Activer mon plugin',
},
myPluginOption => {
en => 'My plugin option',
fr => 'Option de mon plugin',
},
};
}
1;
π§ JSON Format (.json)
{
"attributes": {
"myPluginEnabled": {
"type": "bool",
"default": 0,
"documentation": "Enable my plugin"
}
},
"tree": {
"insert_into": "generalParameters/plugins",
"nodes": [
{
"title": "myPluginNode",
"form": "simpleInputContainer",
"nodes": ["myPluginEnabled"]
}
]
},
"ctrees": {},
"constants": {
"PE_MYPLUGIN_ERROR": 200
},
"lang": {
"myPluginEnabled": {
"en": "Enable my plugin",
"fr": "Activer mon plugin"
}
}
}
π AUTH PLUGIN DECLARATION π
authentication plugins can declare themselves with the authPlugin key β that's at the top level of an extension file, right next to attributes, tree, etc. β instead of manually appending to every single select list. thank god, because doing it by hand is not the vibe π
"authPlugin": {
"k": "JsonFile",
"v": "JSON File (dev/test)",
"roles": ["authentication", "userDB"]
}
multiple plugins can be declared as an array, slay. the allowed roles are authentication, userDB, and passwordDB. the option gets appended to the following core selects, depending on which roles you declared:
authenticationrole:authentication,authChoiceModules(auth slot),combModulesuserDBrole:userDB,authChoiceModules(userDB slot),combModulespasswordDBrole:passwordDB,authChoiceModules(password slot)
appends get deduplicated on the k key, so re-running the rebuilder, or declaring the same plugin across multiple files, is totally safe. no double-dipping π
π³ TREE INSERTION π³
the tree and ctrees extensions support these insertion options:
insert_intoβ path to the target node, using/as the separator (for example,generalParameters/plugins).insert_afterβ insert new nodes after the node with this title.insert_beforeβ insert new nodes before the node with this title.
if you don't specify insert_after or insert_before, the nodes just get appended at the end. easy.
and if insert_after or insert_before points at a sibling that does not exist in the target tree? then the nodes also get appended at the end, and a warning gets printed on stderr pointing right at the offending extension file. lowkey messy but she tells you π₯
π¬ TRANSLATIONS π¬
extensions can hand over translations for their configuration keys using the lang function (Perl) or the lang key (JSON). translations are given as a hash where the keys are the translation identifiers and the values are hashes mapping language codes to translated text β¨
if a translation isn't provided for a specific language, the script will:
- use the English (
en) translation if it's available - fall back to the first available translation
this makes sure every language file gets an entry even if translations only exist for a subset of languages. inclusivity, we love to see it π«Ά
π PORTAL CONSTANTS π
plugin constants should use values >= 200 to avoid conflicts with the core constants. if a value below 200 is used, a warning gets issued. so like, respect the boundary bestie β οΈ
π« EXAMPLES π«
# Regenerate with plugins (uses default paths from installation)
llng-build-manager-files --plugins-dir=/etc/lemonldap-ng/manager-overrides.d
# Multiple plugin directories
llng-build-manager-files \
--plugins-dir=/etc/lemonldap-ng/manager-overrides.d \
--plugins-dir=/usr/share/lemonldap-ng/plugins.d
# Verbose mode
llng-build-manager-files --plugins-dir=/etc/lemonldap-ng/manager-overrides.d -v
# Override specific output paths (useful for testing)
llng-build-manager-files \
--plugins-dir=/etc/lemonldap-ng/manager-overrides.d \
--struct-file=/custom/path/struct.json
π SEE ALSO π
Lemonldap::NG::Manager::Build- <https://lemonldap-ng.org/>
π«Ά AUTHORS π«Ά
LemonLDAP::NG team <http://lemonldap-ng.org/team>
π LICENSE π
This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
and that's the whole page, bestie!! π this was perl v5.42.3, dated 2026-09-24, from the User Contributed Perl Documentation section, and honestly she ate. go forth and regenerate those manager files, you absolute icon πβ¨
π¦ where this page comes from
- fedora 43: lemonldap-ng-manager 2.23.4-1.fc43 Β· GPL-2.0-or-later AND MIT AND GPL-3.0-or-later AND OFL-1.1-RFN
- fedora 44: lemonldap-ng-manager 2.23.4-1.fc44 Β· GPL-2.0-or-later AND MIT AND GPL-3.0-or-later AND OFL-1.1-RFN
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms