2024-12-02 19:18:31 +00:00
|
|
|
From cc5e2bc37900f27f11630253a0b08d31d9e88086 Mon Sep 17 00:00:00 2001
|
|
|
|
From: ferrreo <harderthanfire@gmail.com>
|
|
|
|
Date: Mon, 2 Dec 2024 19:16:48 +0000
|
2024-12-02 21:11:42 +01:00
|
|
|
Subject: [PATCH 1/2] Update build.zig
|
2024-12-02 19:18:31 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
build.zig | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/build.zig b/build.zig
|
|
|
|
index f0e9074..cf25dd2 100644
|
|
|
|
--- a/build.zig
|
|
|
|
+++ b/build.zig
|
|
|
|
@@ -297,7 +297,7 @@ fn install_ly(allocator: std.mem.Allocator, install_config: bool) !void {
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
- const pam_path = try std.fs.path.join(allocator, &[_][]const u8{ dest_directory, config_directory, "/pam.d" });
|
|
|
|
+ const pam_path = try std.fs.path.join(allocator, &[_][]const u8{ config_directory, "/pam.d" });
|
|
|
|
if (!std.mem.eql(u8, dest_directory, "")) {
|
|
|
|
std.fs.cwd().makePath(pam_path) catch {
|
|
|
|
std.debug.print("warn: {s} already exists as a directory.\n", .{pam_path});
|
|
|
|
|
2024-12-02 21:11:42 +01:00
|
|
|
From 8cafc17d4ca822ba4bd42ed8bb201680e0f352b7 Mon Sep 17 00:00:00 2001
|
|
|
|
From: ferrreo <harderthanfire@gmail.com>
|
|
|
|
Date: Mon, 2 Dec 2024 20:11:05 +0000
|
|
|
|
Subject: [PATCH 2/2] patch config and usr dir
|
|
|
|
|
|
|
|
---
|
|
|
|
build.zig | 10 +++++-----
|
|
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/build.zig b/build.zig
|
|
|
|
index cf25dd2..88dd60b 100644
|
|
|
|
--- a/build.zig
|
|
|
|
+++ b/build.zig
|
|
|
|
@@ -146,8 +146,8 @@ pub fn ServiceInstaller(comptime init_system: InitSystem) type {
|
|
|
|
defer patch_map.deinit();
|
|
|
|
|
|
|
|
try patch_map.put("$DEFAULT_TTY", default_tty_str);
|
|
|
|
- try patch_map.put("$CONFIG_DIRECTORY", config_directory);
|
|
|
|
- try patch_map.put("$PREFIX_DIRECTORY", prefix_directory);
|
|
|
|
+ try patch_map.put("$CONFIG_DIRECTORY", "/etc");
|
|
|
|
+ try patch_map.put("$PREFIX_DIRECTORY", "/usr");
|
|
|
|
try patch_map.put("$EXECUTABLE_NAME", executable_name);
|
|
|
|
|
|
|
|
switch (init_system) {
|
|
|
|
@@ -256,8 +256,8 @@ fn install_ly(allocator: std.mem.Allocator, install_config: bool) !void {
|
|
|
|
defer patch_map.deinit();
|
|
|
|
|
|
|
|
try patch_map.put("$DEFAULT_TTY", default_tty_str);
|
|
|
|
- try patch_map.put("$CONFIG_DIRECTORY", config_directory);
|
|
|
|
- try patch_map.put("$PREFIX_DIRECTORY", prefix_directory);
|
|
|
|
+ try patch_map.put("$CONFIG_DIRECTORY", "/etc");
|
|
|
|
+ try patch_map.put("$PREFIX_DIRECTORY", "/usr");
|
|
|
|
|
|
|
|
const patched_config = try patchFile(allocator, "res/config.ini", patch_map);
|
|
|
|
try installText(patched_config, config_dir, ly_config_directory, "config.ini", .{});
|
|
|
|
@@ -267,7 +267,7 @@ fn install_ly(allocator: std.mem.Allocator, install_config: bool) !void {
|
|
|
|
var patch_map = PatchMap.init(allocator);
|
|
|
|
defer patch_map.deinit();
|
|
|
|
|
|
|
|
- try patch_map.put("$CONFIG_DIRECTORY", config_directory);
|
|
|
|
+ try patch_map.put("$CONFIG_DIRECTORY", "/etc");
|
|
|
|
|
|
|
|
const patched_setup = try patchFile(allocator, "res/setup.sh", patch_map);
|
|
|
|
try installText(patched_setup, config_dir, ly_config_directory, "setup.sh", .{ .mode = 0o755 });
|
|
|
|
|
2024-12-02 19:18:31 +00:00
|
|
|
|