repkg: Add check/expect rules
As discussed in #39 (closed), it would be nice to have a way to verify the SHA256 sum of a file at any point (e.g. for "stricter" patch
operations). This concept could be generalised to have any kind of checks (dependencies, URL, packager, groups...).
I propose adding a bunch of check operations, e.g.:
-
expect-depend {package}
: Verify that{package}
is a dependency. -
expect-nodepend {package}
: Verify that{package}
is not a dependency. -
expect-{,no}optdepend
: … -
expect-{,no}conflict
-
expect-{,no}replace
-
expect-{,no}provide
-
expect-{,no}backup {path}
-
expect-{,no}group {group}
-
expect-arch {arch}
-
expect-url {url}
-
expect-sha256 {path} {sha256sum}
: expect{path}
to have the SHA256 sum{sha256}
. -
expect-mode {path} {mode}
: expect{path}
to have the permissions{mode}
. -
expect-uid {path} {uid}
: expect{path}
to be owned by UID{uid}
. -
expect-gid {path} {gid}
: expect{path}
to be owned by GID{gid}
.