Reference¶
Makefile Targets¶
Miscellaneous Targets¶
Target |
Level |
Description |
---|---|---|
|
repo/root |
Update Pakste to latest version |
|
package & repo/root |
Display available targets and their descriptions |
|
package & repo/root |
Remove all build artifacts and directories |
|
package & repo/root |
Check NVD public vulnerabilities |
|
repo/root |
Output the Github Action Matrix (json) |
Variable |
Default |
Description |
---|---|---|
|
|
When set to |
Package Building Targets¶
Target |
Level |
Description |
---|---|---|
|
package |
Create or update the MANIFEST file with source archive checksums |
|
package |
Build DEB package locally (requires build dependencies) |
|
package |
Build RPM package locally (requires build dependencies) |
|
package & repo/root |
Build DEB package in a clean chroot environment |
|
package & repo/root |
Build RPM package in a clean chroot environment |
|
package |
Debug, try to build DEB package and spawn a shell if error |
|
package |
Debug, try to build RPM package and spawn a shell if error |
Variable |
Default |
Description |
---|---|---|
|
none |
Target distribution codename (e.g., bullseye, el9) |
|
host architecture |
Target Architecture (e.g., arm64, riscv64, amd64) |
Repository Targets¶
Target |
Level |
Description |
---|---|---|
|
repo/root |
Build .deb repository for a specific distribution & architecture |
|
repo/root |
Build .rpm repository for a specific distribution & architecture |
|
repo/root |
Build all .rpm repositories for all targets (see RPM_ALL_TARGETS in Makefile.config) |
|
repo/root |
Build all .deb repositories for all targets (see DEB_ALL_TARGETS in Makefile.config) |
|
repo/root |
Build all .deb and .rpm repositories for all targets (default target) |
Variable |
Default |
Description |
---|---|---|
|
none |
Target distribution codename (e.g., bullseye, el9) |
|
host architecture |
Target Architecture (e.g., arm64, riscv64, amd64) |
|
none |
Set to |
Package Initialization Tool¶
Initialize a new package:
./common/init_pkg.sh -n <PKG_NAME>
Makefile Helper Variables¶
The following Makefile
variables can be leverage for source recovery & preparation:
Variable |
Description |
---|---|
|
Helper command for source recovery. Wrapper for wget_sum.sh with manifest and cache paths option already set. |
|
Helper command for git-based source recovery. Wrapper for git_sum.sh with manifest and cache paths option already set. |
|
Base directory where source files must be put. Works in conjuction with |
|
Helper to generate the source archive from the content in |
Source Recovery Helpers Arguments¶
The source recovery helpers ($(WGS)
and $(GS)
) expose the following arguments to users:
Argument |
Required |
Description |
---|---|---|
|
Yes |
URL of the source to download |
|
Yes |
Path to output file |
|
Yes |
Path to output file (alternative to -o, only create archive in <cache directory>) |
|
No |
Git tag to check out (for |
|
No |
Git revision (commit hash) to check out (for |
|
No |
Initialize and update Git submodules (for |
Examples¶
Basic HTTP Recovery:
$(SOURCE_ARCHIVE): $(CACHE) Makefile MANIFEST | $(SOURCE_DIR)
@$(WGS) -u $(URL_SRC) -o $(BUILD_DIR)/$(NAME)-$(VERSION).tar.gz
Basic Git Recovery:
$(SOURCE_ARCHIVE): $(CACHE) Makefile MANIFEST | $(SOURCE_DIR)
@$(GS) -u $(URL_GIT) -t "v$(VERSION)" -o $(BUILD_DIR)/$(NAME)-$(VERSION).tar.gz
Recovery + Clean-up (upstream debian/ dir removal):
$(SOURCE_ARCHIVE): $(CACHE) Makefile MANIFEST | $(SOURCE_DIR)
@$(WGS) -u $(URL_SRC) -O $(NAME)-$(VERSION).tar.gz
@tar -vxf $(CACHE_DIR)/$(NAME)-$(VERSION).tar.gz -C $(SOURCE_DIR) --strip-components=1
@rm -rf -- $(SOURCE_DIR)/debian
@$(SOURCE_TAR_CMD)
Pakste Common Commands¶
In a package directory:
# Build a DEB package in a chroot for Debian Trixie & arm64
make deb_chroot DIST=trixie ARCH=arm64
# Build an RPM package in a chroot for RHEL 9
make rpm_chroot DIST=el9
At the root of the repository:
# Build a complete DEB repository with parallel jobs
make deb_repo -j4 DIST=bullseye
# Build a complete RPM repository, continuing on errors
make rpm_repo DIST=el9 ERROR=skip
# Build every deb targets
make deb_all_repos -j4
# Build every rpm targets
make rpm_all_repos -j4
# Build everything
make -j4
# Clean but keep downloaded sources
make clean KEEP_CACHE=true
Internal Scripts¶
Version comparator utility:
# help
./common/buildenv/compare_version.sh -h
# example
./common/buildenv/compare_version.sh -v 1.0 -o '>' -V 0.9
Distribution metadata recovery utility:
# help
./common/buildenv/get_dist.sh -h
# example
./common/buildenv/get_dist.sh ubu22.04
Git Source Recovery & Manifest tool:
# help
./common/buildenv/git_sum.sh -h
# example
./common/buildenv/git_sum.sh -m ./MANIFEST \
-C "./cache/" \
-u https://github.com/Spotifyd/spotifyd/ \
-t v0.4.0 \
-o ./spotifyd_0.4.0.orig.tar.gz \
-c # update Manifest
Wget based source recovery & manifest generation utility:
# help
./common/buildenv/wget_sum.sh -h
# example
./common/buildenv/wget_sum.sh -m ./MANIFEST \
-C "./cache/" \
-u https://github.com/Spotifyd/spotifyd/archive/refs/tags/v0.4.1.tar.gz \
-o ./spotifyd_0.4.1.orig.tar.gz \
-c # update manifest
Tool to check a given distribution against an ignore expression:
# help
./common/buildenv/skip_flag.sh -h
# example:
./common/buildenv/skip_flag.sh -i '=:el:6 <:deb:8' -d deb -v 7