]> git.ipfire.org Git - pakfire.git/commitdiff
FHS: Allow installing kernel source in /usr/src
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 Mar 2023 19:18:50 +0000 (19:18 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 Mar 2023 19:18:50 +0000 (19:18 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/fhs.c

index e819b8651dcde1d24a38494d171e28f5e99c1705..971e783fdc5be07d1bcefd2f35b0fcc644a5ad3d 100644 (file)
@@ -53,8 +53,11 @@ static const struct pakfire_fhs_check {
        { "/usr/share",           S_IFDIR, 0755, "root", "root", 0 },
        { "/usr/src",             S_IFDIR, 0755, "root", "root", 0 },
 
-       // Allow no further files in /usr & /usr/src
+       // Allow no further files in /usr
        { "/usr/*",                     0,    0,   NULL,   NULL, PAKFIRE_FHS_MUSTNOTEXIST },
+
+       // Allow no files in /usr/src except some kernel source
+       { "/usr/src/kernels/**",        0,    0, "root", "root", 0 },
        { "/usr/src/**",                0,    0,   NULL,   NULL, PAKFIRE_FHS_MUSTNOTEXIST },
 
        // There cannot be any subdirectories in /usr/bin & /usr/sbin