LLNG-BU...R-FILES(1)

πŸ“¦
version 2.23.4 Β· 4 versions
, in fedora 43, fedora 44

πŸ’… 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 (.pm or .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 the struct.json file.
  • --conftree-file=path β€” output path for the conftree.js file.
  • --manager-constants-file=path β€” output path for the ReConstants.pm file.
  • --manager-attributes-file=path β€” output path for the Attributes.pm file.
  • --default-values-file=path β€” output path for the DefaultValues.pm file.
  • --conf-constants-file=path β€” output path for the Constants.pm file.
  • --reverse-tree-file=path β€” output path for the reverseTree.json file.
  • --portal-constants-file=path β€” output path for the portal Constants.pm file.
  • --handler-status-constants-file=path β€” output path for the StatusConstants.pm file.
  • --lang-dir=path β€” the directory holding your language JSON files (like en.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:

  • authentication role: authentication, authChoiceModules (auth slot), combModules
  • userDB role: userDB, authChoiceModules (userDB slot), combModules
  • passwordDB role: 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:

  1. use the English (en) translation if it's available
  2. 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 πŸ”—


🫢 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