Skip to content

Releases

Danaco Nurt 0.1.1

Choose a tag to compare

@DanacoGroup DanacoGroup released this 27 Nov 21:08
800a1ce

Changed

  • The preview of sql lists the effects of load_extension and of the pragmas
    temp_store_directory and data_store_directory as irreversible entries.

Added

  • create makes named pipes and device nodes on Linux and macOS: type: fifo mode: "0660" and type: device kind: char|block major: <int> minor: <int>
    (a device node needs privilege: elevated). On Windows both fail with
    E_OS_ONLY. Both are journaled as created files, and undo removes them.
    info and list report the types fifo and device; a device node has
    the fields major and minor.

  • Administration of the firewall, the network and the clock (group administration,
    language brief section 10): firewall.rules, firewall.allow,
    firewall.deny and firewall.remove on nftables, firewalld and ufw (Linux),
    pf (macOS) and the Windows Defender Firewall; network.route_add,
    network.route_remove and network.dns_set (systemd-resolved,
    /etc/resolv.conf, networksetup, the Windows interface DNS);
    clock.timezone_set, clock.ntp and clock.set. Each takes
    privilege: elevated and reports one state change of the target
    firewall:<rule>, route:<destination>, dns:<interface>, clock:timezone
    or clock:ntp with the value before and after; undo runs the inverse
    derived from those values (firewall.remove for firewall.allow, the
    previous zone, the previous servers, and so on). clock.set is irreversible.
    A change that the system already holds is reported as unchanged.

  • windows.cim calls methods: invoke: "<method>" with where (the selected
    instances) or without it (a static method of the class) and arguments
    (text, int and bool values). A method with a documented opposite
    (StartService and StopService, Enable and Disable, Pause and
    Resume) is undone by the opposite call; any other call is irreversible.

  • Administration commands for accounts, groups, mounts, the kernel, power and
    disks: accounts.create, accounts.modify, accounts.remove (keep_home),
    accounts.password (the value is a secret and goes to standard input),
    groups.create, groups.remove, groups.add_member,
    groups.remove_member, mount and unmount (persistent edits
    /etc/fstab through the journal), sysctl.set (persistent writes
    /etc/sysctl.d/90-nurt.conf), modules.load, modules.unload,
    power.restart, power.shutdown (at, delay, message),
    power.cancel, disks.partition and disks.format. Every command reads
    the state it changes, reports unchanged when nothing is to do, records the
    state before and after, and accepts privilege. undo runs the inverse
    command; a password, an immediate restart or shutdown, a cancelled schedule,
    a partition change and a format are irreversible, and the preview of a disk
    change lists the partitions, file systems, mount points and the size of the
    data that is lost.

  • Translation of bash into the constructs of the language (language brief,
    section 11): if, elif, else, case, [ ], [[ ]] and test become
    when; for, while and until become each, while and repeat until;
    functions become define and their calls calls; $1, $2, $@, shift
    and getopts of a script become params; A && B && C with changes becomes
    steps (in a single call, E_ONE_EFFECT carries the steps program as its
    first candidate, also for PowerShell); test ... || CMD becomes when not.
    The translation of the administration programs mkfifo, mknod, useradd,
    usermod, userdel, groupadd, groupdel, gpasswd, passwd, mount,
    umount, sysctl -w, modprobe, rmmod, ufw, firewall-cmd, nft,
    iptables, ip route, resolvectl dns, timedatectl, date -s,
    shutdown, reboot, poweroff, parted, mkfs.* and sqlite3 writes the
    native commands (rules B41 to B44). nurt migrate translates these
    structures, declares the params block first and remembers the functions of
    a script. Only eval, subshells, groups, the arithmetic for, select,
    interactive input and here-documents other than cat > file stay without a
    translation (docs/guides/bash-migration.md).

Changed

  • sql has no refusals. A statement that changes anything opens the database
    for writing and journals the file and its -wal, -shm and -journal files
    first; write is optional, and write: false keeps the call read-only.
    BEGIN, COMMIT and END merge with the transaction of the call,
    ROLLBACK ends it with E_ROLLED_BACK, ATTACH and DETACH are allowed
    with every attached file journaled before the first change, VACUUM INTO is
    journaled as a created file, VACUUM runs after the other statements,
    load_extension is allowed (its effects are reported as unknown and
    irreversible) and the pragmas temp_store_directory and
    data_store_directory are allowed (reported as effects on the whole Nurt
    process, which undo does not reset). The file of ATTACH and VACUUM INTO
    is resolved like every path argument (E_PATH_RELATIVE without base),
    file: URIs are read to their path, the call turns the defensive mode of
    SQLite off when it writes, a preview lists the files of ATTACH and
    VACUUM INTO, the other database files appear as changes of the report, and
    the kind of each statement is read from its own text.
  • Control constructs (language brief, sections 1 to 6 and 8): when with
    otherwise when and otherwise; the loops each, repeat until and
    while with break, continue, parallel, atomic: false, limit and
    the configuration keys loop.max_iterations and loop.max_time; steps
    for several changes in one call; functions with define and the key
    function.max_depth; script parameters with params, the command
    nurt run <file> name: value with --help, and the member params of the
    request. Each construct is one journal entry, all or nothing, previewed
    without a change and checked before any effect; the report lists its
    parts. A parameter of type bool written without a value is true.
  • Syntax tree version 1.1 (nurt-ast/1 and nurt-bound/1): the statements
    when, each, repeat, while, break, continue, steps, define
    and params and the pipeline head call. Documents of version 1.0 are read
    unchanged. The grammar is in spec/grammar.md.
  • Changes of the API of nurt-syntax: lex::Checkpoint is no longer Copy
    (it keeps the open blocks of the lexer); MutationTx gains the methods
    allow_incremental, savepoint, release_savepoint and
    rollback_to_savepoint, with defaults that keep the old behaviour; Request
    gains the member params; Report gains parts and parts_total.
  • MutationTx::allow_incremental: a transaction of the journal may preserve
    further targets after its first change, so that a construct is one entry.

Added

  • Privilege elevation: the call parameters privilege (account, elevated,
    auto) and as_user, written on a stage, given in the request or on the
    command line (--privilege, --as-user); the elevation backends self,
    sudo, doas and run0 (the backend broker is reported as
    not_installed until the service nurt-elevation); the configuration
    section [privilege]; elevated entries in the journal of the account, with
    the same numbering, whose copies the account can access, written by the
    elevated process with the rights of the account on Linux and macOS;
    undo N and redo N of an elevated entry through the same backend, while
    undo and redo without a number that would restore one end with
    E_PRIVILEGE and the next step undo N privilege: elevated; and undo of
    elevated changes and of changes to packages and services by inverse
    operations.

Changed

  • sudo, doas and run0 in bash lines are translated into privilege: elevated or as_user instead of being rejected; sudo -i and su end with
    E_AMBIGUOUS.
  • E_PRIVILEGE means that no elevation backend ran the operation or that the
    system denied the elevation; it carries backend and next_steps.

Security

  • The Git library gix and its sub-crates are updated to the 0.91 generation,
    which no longer depends on heapless 0.8 (nine advisories about unsound code,
    RUSTSEC-2026-0574 to RUSTSEC-2026-0582).
  • The unused netstat2 dependency and the AVIF encoder of the image crate
    (ravif, rav1e) are removed, which removes the unmaintained paste macro
    crate (RUSTSEC-2024-0436). Reading of AVIF files was never enabled.
  • OpenPGP signatures of commits and tags are made and checked by GnuPG instead
    of the pgp crate, which removes rsa 0.9 (RUSTSEC-2023-0071) and
    crypto-bigint 0.5 (RUSTSEC-2026-0387) from the dependency graph. The
    program named by gpg.openpgp.program or gpg.program (gpg by default)
    runs through the program service; git.signing.key_file is imported into a
    temporary GnuPG home directory. A missing or failing program refuses the
    signature with E_GIT_SIGN (problems program_unavailable and
    program_failed); verification without the program reports the status
    unsupported. SSH signatures are unchanged and still made in the process.
  • The text extraction of pdf-extract 0.12.1 is a crate of the workspace
    (crates/nurt-pdf-extract, MIT license) built on lopdf 0.47, which no
    longer needs the unmaintained ttf-parser crate (RUSTSEC-2026-0192).
  • The chrono feature is off for croner, lopdf, rmcp (updated to 3.12)
    and, through it, schemars. chrono stays in the dependency graph only
    through macos-unifiedlogs and russh-util (RUSTSEC-2026-0543), for which
    deny.toml records the reason.
  • The lock files of the fuzz targets are regenerated.

Added

  • The command next and the field continuation of every shortened response:
    a response that leaves lines, records or the end...
Read more