fix(build): debian specificities build.

This commit is contained in:
Alexandre Pujol 2023-04-24 00:01:35 +01:00
parent 63751ea66f
commit b9b3d0fab1
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
4 changed files with 12 additions and 6 deletions

View File

@ -2,8 +2,6 @@
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io> # Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
/etc/gtk-{3,4}.0/settings.ini r, /etc/gtk-{3,4}.0/settings.ini r,
owner @{user_config_dirs}/gtk-{3,4}.0/ rw, owner @{user_config_dirs}/gtk-{3,4}.0/ rw,

View File

@ -3,8 +3,6 @@
# Copyright (C) 2021-2022 Alexandre Pujol <alexandre@pujol.io> # Copyright (C) 2021-2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
owner @{user_config_dirs}/trashrc rw, owner @{user_config_dirs}/trashrc rw,
owner @{user_config_dirs}/trashrc.lock rwk, owner @{user_config_dirs}/trashrc.lock rwk,
owner @{user_config_dirs}/#[0-9]*[0-9] rwk, owner @{user_config_dirs}/#[0-9]*[0-9] rwk,

View File

@ -13,7 +13,7 @@ import (
) )
var ( var (
regABI = regexp.MustCompile(`abi.*,\n`) regABI = regexp.MustCompile(`abi <abi/[0-9.]*>,\n\n`)
regAttachments = regexp.MustCompile(`(profile .* @{exec_path})`) regAttachments = regexp.MustCompile(`(profile .* @{exec_path})`)
regFlag = regexp.MustCompile(`flags=\(([^)]+)\)`) regFlag = regexp.MustCompile(`flags=\(([^)]+)\)`)
regProfileHeader = regexp.MustCompile(` {`) regProfileHeader = regexp.MustCompile(` {`)

View File

@ -146,7 +146,17 @@ func Configure() error {
} }
} }
} }
files, _ := RootApparmord.Join("abstractions").ReadDir(paths.FilterOutDirectories())
for _, file := range files {
if !file.Exist() {
continue
}
content, _ := file.ReadFile()
profile := BuildABI(string(content))
if err := file.WriteFile([]byte(profile)); err != nil {
return err
}
}
default: default:
return fmt.Errorf("%s is not a supported distribution", Distribution) return fmt.Errorf("%s is not a supported distribution", Distribution)