mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-15 07:54:17 +01:00
build: do not use rsync to synchronise file anymore.
This commit is contained in:
parent
5eb120cdbb
commit
9e04743156
1
debian/control
vendored
1
debian/control
vendored
@ -6,7 +6,6 @@ Build-Depends: debhelper (>= 13.4),
|
|||||||
debhelper-compat (= 13),
|
debhelper-compat (= 13),
|
||||||
golang-any,
|
golang-any,
|
||||||
config-package-dev,
|
config-package-dev,
|
||||||
rsync,
|
|
||||||
Homepage: https://github.com/roddhjav/apparmor.d
|
Homepage: https://github.com/roddhjav/apparmor.d
|
||||||
Vcs-Browser: https://github.com/roddhjav/apparmor.d
|
Vcs-Browser: https://github.com/roddhjav/apparmor.d
|
||||||
Vcs-Git: https://github.com/roddhjav/apparmor.d.git
|
Vcs-Git: https://github.com/roddhjav/apparmor.d.git
|
||||||
|
@ -16,7 +16,6 @@ Source0: %{name}-%{version}.tar.gz
|
|||||||
Requires: apparmor-profiles
|
Requires: apparmor-profiles
|
||||||
BuildRequires: distribution-release
|
BuildRequires: distribution-release
|
||||||
BuildRequires: golang-packaging
|
BuildRequires: golang-packaging
|
||||||
BuildRequires: rsync
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
AppArmor.d is a set of over 1500 AppArmor profiles whose aim is to confine most Linux based applications and processes.
|
AppArmor.d is a set of over 1500 AppArmor profiles whose aim is to confine most Linux based applications and processes.
|
||||||
|
@ -24,7 +24,6 @@ Please note that Wayland has a better support than Xorg.
|
|||||||
**Build dependencies**
|
**Build dependencies**
|
||||||
|
|
||||||
* Go >= 1.18
|
* Go >= 1.18
|
||||||
* Rsync
|
|
||||||
|
|
||||||
## :material-arch: Archlinux
|
## :material-arch: Archlinux
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ package prebuild
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -28,15 +27,14 @@ type PrepareFunc func() error
|
|||||||
|
|
||||||
// Initialize a new clean apparmor.d build directory
|
// Initialize a new clean apparmor.d build directory
|
||||||
func Synchronise() error {
|
func Synchronise() error {
|
||||||
dirs := paths.PathList{RootApparmord, Root.Join("root")}
|
dirs := paths.PathList{RootApparmord, Root.Join("root"), Root.Join("systemd")}
|
||||||
for _, dir := range dirs {
|
for _, dir := range dirs {
|
||||||
if err := dir.RemoveAll(); err != nil {
|
if err := dir.RemoveAll(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, path := range []string{"./apparmor.d", "./root"} {
|
for _, name := range []string{"apparmor.d", "root"} {
|
||||||
cmd := exec.Command("rsync", "-a", path, Root.String())
|
if err := copyTo(paths.New(name), Root.Join(name)); err != nil {
|
||||||
if err := cmd.Run(); err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ func getSupportedDistribution() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func copyTo(src *paths.Path, dst *paths.Path) error {
|
func copyTo(src *paths.Path, dst *paths.Path) error {
|
||||||
files, err := src.ReadDirRecursiveFiltered(nil, paths.FilterOutDirectories())
|
files, err := src.ReadDirRecursiveFiltered(nil, paths.FilterOutDirectories(), paths.FilterOutNames("README.md"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user