-
Notifications
You must be signed in to change notification settings - Fork 165
Add Ubuntu development dependencies #4728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,94 @@ all: docs packages ## Generate docs and packages | |
| tmp: | ||
| mkdir -p $(TMP)/.fmf | ||
|
|
||
| ## | ||
| ## Development | ||
| ## | ||
|
|
||
| # Distro-specific lists and targets: | ||
| # | ||
| # * _deps/$_OS_ID + $_DEPS_CORE_$_OS_ID - minimal dependencies for various development-focused targets | ||
| # * _build-deps/$_OS_ID - build dependencies to allow tmt packaging | ||
| # * _develop/$_OS_ID + $_DEPS_DEVELOP_$_OS_ID - development dependencies for local development | ||
|
|
||
| _DEPS_CORE_FEDORA := \ | ||
| hatch \ | ||
| uv \ | ||
| python3-devel \ | ||
| python3-hatch-vcs \ | ||
| rpm-build \ | ||
| clang \ | ||
| beakerlib | ||
|
|
||
| _DEPS_DEVELOP_FEDORA := \ | ||
| expect \ | ||
| gcc \ | ||
| git \ | ||
| python3-nitrate \ | ||
| libvirt-devel \ | ||
| krb5-devel \ | ||
| libpq-devel \ | ||
| python3-devel \ | ||
| jq \ | ||
| podman \ | ||
| buildah \ | ||
| /usr/bin/python3.9 \ | ||
| pre-commit | ||
|
|
||
| # Note: interestingly, `hatch` is not shipped by Ubuntu, but `hatch` plugins are. | ||
| # Manual `hatch` installation probably does not the packaged plugin, leaving it | ||
| # in for now until we get better coverage. | ||
| _DEPS_CORE_UBUNTU := \ | ||
| python3-dev \ | ||
| python3-hatch-vcs \ | ||
| clang | ||
|
|
||
| _DEPS_DEVELOP_UBUNTU := \ | ||
| expect \ | ||
| gcc \ | ||
| git \ | ||
| libvirt-dev \ | ||
| libkrb5-dev \ | ||
| libpq-dev \ | ||
| python3-dev \ | ||
| jq \ | ||
| podman \ | ||
| buildah \ | ||
|
happz marked this conversation as resolved.
|
||
| python3.9 \ | ||
| pre-commit | ||
|
Comment on lines
+34
to
+78
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can reshuffle so that cores are together with core and develop are together with develop?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had it that way, then I switched to per-distro grouping. I guess both have their pros and cons, I don't have a favorite.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, yeah. In one case we have all of the dependencies grouped together so it is easier for the maintainer to make sure something is not missed. In the other case it might be more useful for the passer-by checking the content |
||
|
|
||
| _OS_ID := $(shell sh -c '. /etc/os-release 2>/dev/null && echo $$ID') | ||
|
|
||
| # Fedora | ||
| _deps/fedora: | ||
| sudo dnf install -y $(_DEPS_CORE_FEDORA) | ||
|
|
||
| _build-deps/fedora: _deps tarball ver2spec | ||
| rpmbuild --define '_topdir $(TMP)' -br packaging/rpm/tmt.spec || sudo dnf builddep -y $(TMP)/SRPMS/tmt-*buildreqs.nosrc.rpm | ||
|
|
||
| _develop/fedora: _deps/fedora | ||
| sudo dnf install -y $(_DEPS_DEVELOP_FEDORA) | ||
|
|
||
| # Ubuntu | ||
| _deps/ubuntu: | ||
| sudo apt-get install -y $(_DEPS_CORE_UBUNTU) | ||
|
|
||
| @if [ "$$(which hatch)" = "" ]; then \ | ||
| echo ""; \ | ||
| echo "$(ccred)Hatch executable not detected. Ubuntu does not package hatch executable,$(ccend)"; \ | ||
| echo "$(ccred)install it manually, please: https://hatch.pypa.io/latest/install/$(ccend)"; \ | ||
| fi | ||
|
|
||
| # TODO: a placeholder, not packaging yet | ||
| _build-deps/ubuntu: _deps | ||
|
|
||
| _develop/ubuntu: _deps/ubuntu | ||
| sudo apt-get install -y $(_DEPS_DEVELOP_UBUNTU) | ||
|
|
||
| _deps: _deps/$(_OS_ID) | ||
| develop: _develop/$(_OS_ID) ## Install development requirements | ||
| build-deps: _build-deps/$(_OS_ID) ## Install build dependencies | ||
|
|
||
| ## | ||
| ## Run the tests | ||
| ## | ||
|
|
@@ -66,12 +154,6 @@ rpm: tarball ver2spec ## Build RPMs | |
| srpm: tarball ver2spec ## Build SRPM | ||
| rpmbuild --define '_topdir $(TMP)' -bs packaging/rpm/tmt.spec | ||
|
|
||
| _deps: # Minimal dependencies (common for 'deps' and 'develop' targets) | ||
| sudo dnf install -y hatch uv python3-devel python3-hatch-vcs rpm-build clang beakerlib | ||
|
|
||
| build-deps: _deps tarball ver2spec ## Install build dependencies | ||
| rpmbuild --define '_topdir $(TMP)' -br packaging/rpm/tmt.spec || sudo dnf builddep -y $(TMP)/SRPMS/tmt-*buildreqs.nosrc.rpm | ||
|
|
||
| packages: rpm srpm ## Build RPM and SRPM packages | ||
|
|
||
| version: ## Build tmt version for packaging purposes | ||
|
|
@@ -297,16 +379,15 @@ $(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/debian/1 | |
|
|
||
| $(TMT_TEST_IMAGE_TARGET_PREFIX)/$(TMT_TEST_CONTAINER_IMAGE_NAME_PREFIX)/fedora/latest/bootc\:latest: | ||
| $(call build-test-container-image,$@,fedora/latest/bootc/Containerfile) | ||
| ## | ||
| ## Development | ||
| ## | ||
| develop: _deps ## Install development requirements | ||
| sudo dnf install -y expect gcc git python3-nitrate {libvirt,krb5,libpq,python3}-devel jq podman buildah /usr/bin/python3.9 | ||
|
|
||
| # Git vim tags and cleanup | ||
| tags: | ||
| find tmt -name '*.py' | xargs ctags --python-kinds=-i | ||
|
|
||
| ## | ||
| ## Clean | ||
| ## | ||
|
|
||
| clean: ## Remove all temporary files, packaging artifacts and docs | ||
| rm -rf $(TMP) build dist tmt.1 | ||
| rm -rf .cache .mypy_cache .ruff_cache | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.