build: remove some old makefile command now handled in the Justfile.

This commit is contained in:
Alexandre Pujol 2025-04-05 23:50:47 +02:00
parent f86eb8c27c
commit f12f684eb1
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
4 changed files with 6 additions and 45 deletions

View file

@ -73,11 +73,6 @@ dev:
@sudo install -Dm644 ${BUILD}/apparmor.d/${name} /etc/apparmor.d/${name} @sudo install -Dm644 ${BUILD}/apparmor.d/${name} /etc/apparmor.d/${name}
@sudo systemctl restart apparmor || sudo journalctl -xeu apparmor.service @sudo systemctl restart apparmor || sudo journalctl -xeu apparmor.service
.PHONY: package
dist ?= archlinux
package:
@bash dists/docker.sh ${dist}
.PHONY: pkg .PHONY: pkg
pkg: pkg:
@makepkg --syncdeps --install --cleanbuild --force --noconfirm @makepkg --syncdeps --install --cleanbuild --force --noconfirm
@ -92,43 +87,6 @@ rpm:
@bash dists/build.sh rpm @bash dists/build.sh rpm
@sudo rpm -ivh --force ${PKGDEST}/${PKGNAME}-*.rpm @sudo rpm -ivh --force ${PKGDEST}/${PKGNAME}-*.rpm
.PHONY: tests
tests:
@go test ./cmd/... -v -cover -coverprofile=coverage.out
@go test ./pkg/... -v -cover -coverprofile=coverage.out
@go tool cover -func=coverage.out
.PHONY: lint
lint:
@golangci-lint run
@make --directory=tests lint
@shellcheck --shell=bash \
PKGBUILD dists/build.sh dists/docker.sh tests/check.sh \
tests/packer/init.sh tests/packer/src/aa-update tests/packer/clean.sh \
debian/${PKGNAME}.postinst debian/${PKGNAME}.postrm
.PHONY: check .PHONY: check
check: check:
@bash tests/check.sh @bash tests/check.sh
.PHONY: integration
integration:
@bats --recursive --timing --print-output-on-failure tests/integration/
.PHONY: manual
manual:
@pandoc -t man -s -o root/usr/share/man/man8/aa-log.8 root/usr/share/man/man8/aa-log.md
.PHONY: docs
docs:
@ENABLED_GIT_REVISION_DATE=false MKDOCS_OFFLINE=true mkdocs build --strict
.PHONY: serve
serve:
@ENABLED_GIT_REVISION_DATE=false MKDOCS_OFFLINE=false mkdocs serve
.PHONY: clean
clean:
@rm -rf \
debian/.debhelper debian/debhelper* debian/*.debhelper debian/${PKGNAME} \
.pkg/${PKGNAME}* ${BUILD} coverage.out

View file

@ -3,7 +3,10 @@
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io> # Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
# Usage: make package dist=<distribution> version=<version> # Usage:
# just package ubuntu24
# just package archlinux
# just package opensuse
set -eu -o pipefail set -eu -o pipefail

View file

@ -19,7 +19,7 @@ Misconfigured AppArmor profiles is one of the most effective ways to break someo
- Ensure modern profile naming - Ensure modern profile naming
- Ensure `vim:syntax=apparmor` - Ensure `vim:syntax=apparmor`
- [x] **[Integration Tests:](integration.md)** `make integration` - [x] **[Integration Tests:](integration.md)** `just integration <dist> <flavor>`
- Run simple CLI commands to ensure no logs are raised. - Run simple CLI commands to ensure no logs are raised.
- Uses the [bats](https://github.com/bats-core/bats-core) test system. - Uses the [bats](https://github.com/bats-core/bats-core) test system.
- Run in the Github Action as well as in all local [test VM](vm.md). - Run in the Github Action as well as in all local [test VM](vm.md).

View file

@ -92,7 +92,7 @@ Instead, install an individual profile or the development package, the following
For any system with docker installed you can simply build the package with: For any system with docker installed you can simply build the package with:
```sh ```sh
make package dist=<distribution> just package <distribution>
``` ```
Then you can install the package with `dpkg`, `pacman` or `rpm`. Then you can install the package with `dpkg`, `pacman` or `rpm`.