File tree 4 files changed +298
-60
lines changed
4 files changed +298
-60
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,35 @@ pub fn build(b: *std.Build) void {
247
247
},
248
248
});
249
249
250
+ runtime .addIncludePath (b .dependency ("shadow" , .{}).path ("libsubid" ));
251
+ runtime .addIncludePath (b .dependency ("shadow" , .{}).path ("lib" ));
252
+ runtime .addIncludePath (b .dependency ("shadow" , .{}).path ("" ));
253
+
254
+ runtime .addCSourceFiles (.{
255
+ .root = b .dependency ("shadow" , .{}).path ("" ),
256
+ .files = &[_ ][]const u8 {
257
+ "libsubid/api.c" ,
258
+ "lib/shadowlog.c" ,
259
+ "lib/subordinateio.c" ,
260
+ "lib/commonio.c" ,
261
+ "lib/write_full.c" ,
262
+ "lib/nss.c" ,
263
+ "lib/get_pid.c" ,
264
+ "lib/memzero.c" ,
265
+ "lib/alloc.c" ,
266
+ "lib/atoi/str2i.c" ,
267
+ "lib/atoi/a2i.c" ,
268
+ "lib/atoi/strtou_noneg.c" ,
269
+ "lib/atoi/strtoi.c" ,
270
+ "lib/string/sprintf.c" ,
271
+ },
272
+ .flags = &[_ ][]const u8 {
273
+ "-DENABLE_SUBIDS" ,
274
+ // duplicate symbol with crun
275
+ "-Dxasprintf=shadow_xasprintf" ,
276
+ },
277
+ });
278
+
250
279
const aarch64_target = b .resolveTargetQuery (.{
251
280
.cpu_arch = .aarch64 ,
252
281
.abi = .musl ,
Original file line number Diff line number Diff line change 19
19
.url = "https://github.com/Hejsil/zig-clap/archive/60cd46aacff4960104703da9ba683077b1e3c76c.tar.gz" ,
20
20
.hash = "12205eb22c644df2469045083efe9c92189d56494ebe8901b36ef1218c3717e6eb78" ,
21
21
},
22
+ .shadow = .{
23
+ .url = "https://github.com/shadow-maint/shadow/releases/download/4.15.3/shadow-4.15.3.tar.gz" ,
24
+ .hash = "12202972bc830245199eb4c5b10f853f1be094eb8c86d431299a69b1c01fa5781a7e" ,
25
+ },
22
26
},
23
27
.paths = .{
24
28
// This makes *all* files, recursively, included in this package. It is generally
Original file line number Diff line number Diff line change @@ -178,13 +178,12 @@ pub fn main() !void {
178
178
"0" ,
179
179
};
180
180
181
- // in rootfull, do not force uid/gid to 0,0
182
- if (res .args .rootfull != 0 ) {
183
- mksquashfs_args [mksquashfs_args .len - 4 ] = null ;
184
- }
185
-
186
181
mksquashfs_main (
187
- mksquashfs_args .len ,
182
+ // in rootfull, do not force uid/gid to 0,0
183
+ if (res .args .rootfull != 0 )
184
+ mksquashfs_args .len - 4
185
+ else
186
+ mksquashfs_args .len ,
188
187
& mksquashfs_args ,
189
188
);
190
189
You can’t perform that action at this time.
0 commit comments