aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/acl.go
blob: f7eaf1cb89c0e86c02e3636a859ec3e8629f4756 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newAttr() pkg.Artifact {
	const (
		version  = "2.5.2"
		checksum = "YWEphrz6vg1sUMmHHVr1CRo53pFXRhq_pjN-AlG8UgwZK1y6m7zuDhxqJhD0SV0l"
	)
	return t.NewViaMake("attr", version, t.NewPatchedSource(
		"attr", version, pkg.NewHTTPGetTar(
			nil, "https://download.savannah.nongnu.org/releases/attr/"+
				"attr-"+version+".tar.gz",
			mustDecode(checksum),
			pkg.TarGzip,
		), true, [2]string{"libgen-basename", `From 8a80d895dfd779373363c3a4b62ecce5a549efb2 Mon Sep 17 00:00:00 2001
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
Date: Sat, 30 Mar 2024 10:17:10 +0100
Subject: tools/attr.c: Add missing libgen.h include for basename(3)

Fixes compilation issue with musl and modern C99 compilers.

See: https://bugs.gentoo.org/926294
---
 tools/attr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/attr.c b/tools/attr.c
index f12e4af..6a3c1e9 100644
--- a/tools/attr.c
+++ b/tools/attr.c
@@ -28,6 +28,7 @@
 #include <errno.h>
 #include <string.h>
 #include <locale.h>
+#include <libgen.h>
 
 #include <attr/attributes.h>
 
-- 
cgit v1.1`}, [2]string{"musl-errno", `diff --git a/test/attr.test b/test/attr.test
index 6ce2f9b..e9bde92 100644
--- a/test/attr.test
+++ b/test/attr.test
@@ -11,7 +11,7 @@ Try various valid and invalid names

        $ touch f
        $ setfattr -n user -v value f
-       > setfattr: f: Operation not supported
+       > setfattr: f: Not supported

        $ setfattr -n user. -v value f
        > setfattr: f: Invalid argument
`},
	), &MakeAttr{
		ScriptEarly: `
ln -s ../../system/bin/perl /usr/bin
`,
		Configure: [][2]string{
			{"enable-static"},
		},
	},
		t.Load(Perl),
	)
}
func init() { artifactsF[Attr] = Toolchain.newAttr }

func (t Toolchain) newACL() pkg.Artifact {
	const (
		version  = "2.3.2"
		checksum = "-fY5nwH4K8ZHBCRXrzLdguPkqjKI6WIiGu4dBtrZ1o0t6AIU73w8wwJz_UyjIS0P"
	)
	return t.NewViaMake("acl", version, pkg.NewHTTPGetTar(
		nil,
		"https://download.savannah.nongnu.org/releases/acl/"+
			"acl-"+version+".tar.gz",
		mustDecode(checksum),
		pkg.TarGzip,
	), &MakeAttr{
		Configure: [][2]string{
			{"enable-static"},
		},

		// makes assumptions about uid_map/gid_map
		SkipCheck: true,
	},
		t.Load(Attr),
	)
}
func init() { artifactsF[ACL] = Toolchain.newACL }