diff --git a/debian/control b/debian/control index 47f4f479..46452332 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,6 @@ Build-Depends: debhelper (>= 13.4), debhelper-compat (= 13), golang-any, config-package-dev, - rsync, Homepage: https://github.com/roddhjav/apparmor.d Vcs-Browser: https://github.com/roddhjav/apparmor.d Vcs-Git: https://github.com/roddhjav/apparmor.d.git diff --git a/dists/apparmor.d.spec b/dists/apparmor.d.spec index 7fcbf4a7..9c1b7267 100644 --- a/dists/apparmor.d.spec +++ b/dists/apparmor.d.spec @@ -16,7 +16,6 @@ Source0: %{name}-%{version}.tar.gz Requires: apparmor-profiles BuildRequires: distribution-release BuildRequires: golang-packaging -BuildRequires: rsync %description AppArmor.d is a set of over 1500 AppArmor profiles whose aim is to confine most Linux based applications and processes. diff --git a/docs/install.md b/docs/install.md index 0bec02c2..da2ea17c 100644 --- a/docs/install.md +++ b/docs/install.md @@ -24,7 +24,6 @@ Please note that Wayland has a better support than Xorg. **Build dependencies** * Go >= 1.18 -* Rsync ## :material-arch: Archlinux diff --git a/pkg/prebuild/prepare.go b/pkg/prebuild/prepare.go index 23f86235..207cf8e6 100644 --- a/pkg/prebuild/prepare.go +++ b/pkg/prebuild/prepare.go @@ -7,7 +7,6 @@ package prebuild import ( "fmt" "os" - "os/exec" "path/filepath" "strings" @@ -28,15 +27,14 @@ type PrepareFunc func() error // Initialize a new clean apparmor.d build directory func Synchronise() error { - dirs := paths.PathList{RootApparmord, Root.Join("root")} + dirs := paths.PathList{RootApparmord, Root.Join("root"), Root.Join("systemd")} for _, dir := range dirs { if err := dir.RemoveAll(); err != nil { return err } } - for _, path := range []string{"./apparmor.d", "./root"} { - cmd := exec.Command("rsync", "-a", path, Root.String()) - if err := cmd.Run(); err != nil { + for _, name := range []string{"apparmor.d", "root"} { + if err := copyTo(paths.New(name), Root.Join(name)); err != nil { return err } } diff --git a/pkg/prebuild/tools.go b/pkg/prebuild/tools.go index f0df64ba..54b34ef4 100644 --- a/pkg/prebuild/tools.go +++ b/pkg/prebuild/tools.go @@ -61,7 +61,7 @@ func getSupportedDistribution() string { } 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 { return err }