Compare commits

...

4 commits

Author SHA1 Message Date
AnErrupTion
1d071223ab
README: Remove runtime shutdown dependency
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-08-23 15:35:38 +02:00
dragsbruh
db7f8ac5d3 [Docs] Fix instructions to disable agetty-tty2 for runit in readme (#1043)
## What are the changes about?

updated instructions in readme.md for runit to properly disable `agetty-tty2` and unlink services

## What existing issue(s) does this resolve?

on void linux, when `runit-void` package is upgraded it re-adds the symlinks for agetty, including `agetty-tty2`, if its not properly disabled (`down` file in svdir)

https://github.com/void-linux/void-packages/blob/master/srcpkgs/runit-void/INSTALL

so everytime that package is updated, both `agetty-tty2` and `ly` start making `ly` unusable until you manually unlink it

## Pre-requisites

- [x] I have tested & confirmed the changes work locally
- [x] I have read and fully adhere to the rules set in the contributing guidelines found in `CONTRIBUTING.md`

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1043
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-08-21 19:10:29 +02:00
AnErrupTion
a22805d44b
Auth: Handle symlinks for session log
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-31 23:52:19 +02:00
AnErrupTion
b6fba46b08
GPA: Add more tracking in Debug
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-07-28 01:38:48 +02:00
3 changed files with 17 additions and 7 deletions

View file

@ -27,8 +27,6 @@ Join us on Matrix over at [#ly-dm:matrix.org](https://matrix.to/#/#ly-dm:matrix.
- xorg-xauth
- shutdown
- brightnessctl
### Debian
@ -180,9 +178,10 @@ On non-systemd systems, you can change the TTY Ly will run on by editing the cor
```
# zig build installexe -Dinit_system=runit
# rm /var/service/lightdm
# unlink /var/service/lightdm
# ln -s /etc/sv/ly /var/service/
# rm /var/service/agetty-tty2
# touch /etc/sv/agetty-tty2/down
# unlink /var/service/agetty-tty2
```
### s6

View file

@ -574,7 +574,15 @@ fn executeCmd(global_log_file: *LogFile, allocator: std.mem.Allocator, io: std.I
fn redirectStandardStreams(global_log_file: *LogFile, io: std.Io, session_log: []const u8, create: bool) !std.Io.File {
create_session_log_dir: {
const session_log_dir = std.Io.Dir.path.dirname(session_log) orelse break :create_session_log_dir;
std.Io.Dir.cwd().createDirPath(io, session_log_dir) catch |err| {
var buffer = std.mem.zeroes([std.Io.Dir.max_path_bytes]u8);
const len = std.Io.Dir.cwd().realPathFile(io, session_log_dir, &buffer) catch |err| {
try global_log_file.err(io, "auth/sys", "failed to resolve path for session log file directory: {s}", .{@errorName(err)});
return err;
};
const resolved_path = buffer[0..len];
std.Io.Dir.cwd().createDirPath(io, resolved_path) catch |err| {
try global_log_file.err(io, "auth/sys", "failed to create session log file directory: {s}", .{@errorName(err)});
return err;
};

View file

@ -149,8 +149,11 @@ pub fn main(init: std.process.Init) !void {
}
}
var gpa = std.heap.DebugAllocator(.{}).init;
defer _ = gpa.deinit();
var gpa: std.heap.DebugAllocator(.{
.never_unmap = builtin.mode == .Debug,
.retain_metadata = builtin.mode == .Debug,
}) = .init;
defer if (gpa.deinit() == .leak) std.log.err("attention please, memory has been leaked!", .{});
state.allocator = gpa.allocator();