fix packaging

This commit is contained in:
Tomas Kopecek 2022-01-12 10:23:21 +01:00
parent 565f59459e
commit dfc5b01c9c
3 changed files with 18 additions and 10 deletions

View file

@ -1,11 +1,12 @@
PYVER_MAJOR := $(shell $(PYTHON) -c 'import sys; print(".".join(sys.version.split(".")[:1]))')
PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE)
CLIPLUGINDIR = $(PKGDIR)/koji_cli_plugins
HUBPLUGINDIR = /usr/lib/koji-hub-plugins
BUILDERPLUGINDIR = /usr/lib/koji-builder-plugins
CLIFILES = $(wildcard cli/*.py)
HUBFILES = $(wildcard hub/*.py)
BUILDERFILES = $(wildcard builder/*.py)
CLIFILES_ALL = $(wildcard cli/*.py)
HUBFILES_ALL = $(wildcard hub/*.py)
BUILDERFILES_ALL = $(wildcard builder/*.py)
CLICONFDIR = /etc/koji/plugins
HUBCONFDIR = /etc/koji-hub/plugins
BUILDERCONFDIR = /etc/kojid/plugins
@ -13,6 +14,16 @@ CLICONFFILES = $(wildcard cli/*.conf)
HUBCONFFILES = $(wildcard hub/*.conf)
BUILDERCONFFILES = $(wildcard builder/*.conf)
ifeq ($(PYVER_MAJOR),2)
HUBFILES=$(filter-out hub/kiwi.py,$(HUBFILES_ALL))
BUILDERFILES=$(filter-out builder/kiwi.py,$(BUILDERFILES_ALL))
CLIFILES=$(filter-out cli/kiwi.py,$(CLIFILES_ALL))
else
HUBFILES=$(HUBFILES_ALL)
BUILDERFILES=$(BUILDERFILES_ALL)
CLIFILES=$(CLIFILES_ALL)
endif
_default:
@echo "nothing to make. try make install"

View file

@ -303,7 +303,7 @@ class KiwiCreateImageTask(BaseBuildTask):
arch=arch,
task_id=self.id,
repo_id=repo_info['id'],
install_group='kiwi',
install_group='kiwi-build',
setup_dns=True,
bind_opts={'dirs': {'/dev': '/dev', }})
broot.workdir = self.workdir
@ -404,10 +404,7 @@ class KiwiCreateImageTask(BaseBuildTask):
if os.path.exists(root_log_path):
self.uploadFile(root_log_path, remoteName="image-root.log")
for ftype in ('disk_image', 'disk_format_image', 'installation_image'):
fdata = result_files.get(ftype)
if not fdata:
continue
for ftype, fdata in result_files.items():
# hack to use correct paths derived from results
filename = os.path.basename(fdata['filename'])
(name, ext) = os.path.splitext(filename)