• 0 Posts
  • 10 Comments
Joined 2 years ago
cake
Cake day: August 8th, 2023

help-circle
  • They could still use whatever config format they wanted - this would just be for providing their config schema. It also doesn’t need to be YAML, that’s just the easiest one for me to type on my phone. In fact, I think most schema validation programs rely on JSON as it is.

    I also don’t think programs should be required to provide it. Many core programs and kernel modules would likely take years if they ever were able to add it just to avoid the risk of mistakes causing any major issues, especially if they haven’t needed an update in years. There are also many config files that use their own nonstandardized schema. A possibility is that they could be allowed to provide a CLI tool which could update the config or they could just ignore it entirely.

    But creating a common schema for… well, the config schema would make it easier for systems to provide a frontend interface for updating your configs.


  • Seriously - Linux needs a standardized config schema spec. Something that programs should provide which an application can read and provide a frontend interface for the users to adjust config files.

    Could be something like:

    schema_version: 1.0
    application:
      name: Poo Analyzer
      icon_path: /etc/pooanalyzer/images/icon.png
      description: Analyzes photos of poo
    schema:
      - config_file:
          path: /etc/pooanalyzer/conf/poo.conf
          conf_type: ini
        configs:
          - field: poo_directory
            type: dir_path
            name: Poo Image Directory
            description: Directory of Poo Images
            icon_path: /etc/pooanalyzer/images/poo.png
          - field: poo_type
            type: list
            name: Poo Types
            description: Types of Poo to Analyze 
            values:
              - dog
              - cat
              - human
              - brown bear
            icon_path: /etc/pooanalyzer/images/animal.png
              ...
    

    Any distro could then create any frontend they’d like to manage this - the user could even install their own.


  • Yeah something like that should be doable but it would require that programs provide a schema and the OS to have a way for the programs to “announce” themselves so it can be aware of the configuration files and the schema.

    I’m sure some project could create a GUI that could cover the most common applications, though.

    It’s always fun trying to set up a program, learning the config syntax, running it, having it fail, and then spending an hour debugging before you realize it never even read your config changes because you were supposed to use one of the other half dozen conf files it has spread all across your drive. Is it under /etc/, /usr/local/etc/, /opt/, or your home directory?



  • There are existing standards. The issue is that there are too many different standards and some programs will choose to make their conf files half standardized, half unique.

    There’s INI, YAML, JSON, XML, TOML, etc.

    Honestly, the Linux team needs to just choose one of these formats, declare it the gold standard, and slowly migrate the config files for most core components over to it. By declaring a standard, you’ll eventually get the developers of most major third-party tools and components to eventually migrate.