NAME
Langertha::Holmgang::Sim::Linux::Logrotate - logrotate 3.21 (Debian 12) for the Linux simulator — reads the configuration, checks (-d), rotates (-f)
VERSION
version 0.001
SYNOPSIS
my ( $out, $ok ) = Langertha::Holmgang::Sim::Linux::Logrotate::run( $dev, [ '-d', '/etc/logrotate.d/app' ], $ctx );
DESCRIPTION
Models logrotate of a Debian 12 (3.21.0) on the state of a device (Langertha::Holmgang::Sim::Linux):
Configuration: global directives, blocks
pattern … { … },include(directory: files in name order, endings like.dpkg-oldare skipped), scriptspostrotate/prerotate/firstaction/lastactionup toendscript. Errors like logrotate: unknown directive, missing{, missing},rotatewithout a number, duplicate entry for the same file, configuration file writable by group/others.-d: dry run with logrotate's output, changes nothing.-f: rotates now (-vshows the same output while doing so): shift older generations and delete those beyondrotate,copytruncate(copy, original emptied, the service keeps writing to the original file) or rename (the service keeps writing to the renamed file until it reopens it) withcreate(new empty file with permissions),compressanddelaycompress, scripts run in the simulator (systemctl reload|restart …makes a service reopen its log files). Without-fevery file has already been rotated today (nothing to do).--version,--help.
Limits: the state file (/var/lib/logrotate/status) is not written; size, maxage, olddir, dateext and mail are read and shown, but not evaluated.
run
my ( $output, $ok ) = run( $device, \@args, $ctx );
logrotate [-d] [-f] [-v] [-s file] configuration….
SUPPORT
Issues
Please report bugs and feature requests at https://github.com/Getty/langertha-holmgang/issues.
IRC
Join #langertha on irc.perl.org or message Getty directly.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.