mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 21:55:43 -05:00
Get rid of /app hardcodes
Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
This commit is contained in:
parent
0e21f9060d
commit
482c5f8111
6 changed files with 7 additions and 7 deletions
1
blergh
1
blergh
|
@ -1 +0,0 @@
|
||||||
123
|
|
|
@ -14,7 +14,7 @@ def create_chroot(
|
||||||
chroot_name,
|
chroot_name,
|
||||||
arch='aarch64',
|
arch='aarch64',
|
||||||
packages=['base'],
|
packages=['base'],
|
||||||
pacman_conf='/app/local/etc/pacman.conf',
|
pacman_conf=os.path.join(config.runtime['script_source_dir'], 'local/etc/pacman.conf'),
|
||||||
extra_repos: dict[str, RepoInfo] = {},
|
extra_repos: dict[str, RepoInfo] = {},
|
||||||
chroot_base_path: str = None,
|
chroot_base_path: str = None,
|
||||||
):
|
):
|
||||||
|
|
|
@ -47,6 +47,7 @@ CONFIG_RUNTIME_DEFAULTS = {
|
||||||
'config_file': None,
|
'config_file': None,
|
||||||
'arch': None,
|
'arch': None,
|
||||||
'no_wrap': False,
|
'no_wrap': False,
|
||||||
|
'script_source_dir': os.path.dirname(os.path.realpath(__file__))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
2
image.py
2
image.py
|
@ -168,7 +168,7 @@ def cmd_build():
|
||||||
create_chroot(
|
create_chroot(
|
||||||
chroot_name,
|
chroot_name,
|
||||||
packages=packages,
|
packages=packages,
|
||||||
pacman_conf='/app/local/etc/pacman.conf',
|
pacman_conf=os.path.join(config.runtime['script_source_dir'], 'local/etc/pacman.conf'),
|
||||||
extra_repos=extra_repos,
|
extra_repos=extra_repos,
|
||||||
)
|
)
|
||||||
create_chroot_user(chroot_name, user=profile['username'], password=profile['password'])
|
create_chroot_user(chroot_name, user=profile['username'], password=profile['password'])
|
||||||
|
|
|
@ -17,12 +17,12 @@ makepkg_env = os.environ.copy() | {
|
||||||
'MAKEFLAGS': f"-j{multiprocessing.cpu_count() if config.file['build']['threads'] < 1 else config.file['build']['threads']}",
|
'MAKEFLAGS': f"-j{multiprocessing.cpu_count() if config.file['build']['threads'] < 1 else config.file['build']['threads']}",
|
||||||
}
|
}
|
||||||
|
|
||||||
makepkg_cross_env = makepkg_env | {'PACMAN': '/app/local/bin/pacman_aarch64'}
|
makepkg_cross_env = makepkg_env | {'PACMAN': os.path.join(config.runtime['script_source_dir'], '/local/bin/pacman_aarch64')}
|
||||||
|
|
||||||
makepkg_cmd = [
|
makepkg_cmd = [
|
||||||
'makepkg',
|
'makepkg',
|
||||||
'--config',
|
'--config',
|
||||||
'/app/local/etc/makepkg.conf',
|
os.path.join(config.runtime['script_source_dir'], 'local/etc/makepkg.conf'),
|
||||||
'--noconfirm',
|
'--noconfirm',
|
||||||
'--ignorearch',
|
'--ignorearch',
|
||||||
'--needed',
|
'--needed',
|
||||||
|
@ -301,7 +301,7 @@ def setup_build_chroot(arch='aarch64', extra_packages=[]) -> str:
|
||||||
chroot_path = create_chroot(
|
chroot_path = create_chroot(
|
||||||
chroot_name,
|
chroot_name,
|
||||||
packages=['base-devel', 'git'] + extra_packages,
|
packages=['base-devel', 'git'] + extra_packages,
|
||||||
pacman_conf='/app/local/etc/pacman.conf',
|
pacman_conf=os.path.join(config.runtime['script_source_dir'], 'local/etc/pacman.conf'),
|
||||||
extra_repos=get_kupfer_local(arch).repos,
|
extra_repos=get_kupfer_local(arch).repos,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ def wrap_docker():
|
||||||
results.append(arg)
|
results.append(arg)
|
||||||
return results
|
return results
|
||||||
|
|
||||||
script_path = os.path.dirname(os.path.realpath(__file__))
|
script_path = config.runtime['script_source_dir']
|
||||||
with open(os.path.join(script_path, 'version.txt')) as version_file:
|
with open(os.path.join(script_path, 'version.txt')) as version_file:
|
||||||
version = version_file.read().replace('\n', '')
|
version = version_file.read().replace('\n', '')
|
||||||
tag = f'registry.gitlab.com/kupfer/kupferbootstrap:{version}'
|
tag = f'registry.gitlab.com/kupfer/kupferbootstrap:{version}'
|
||||||
|
|
Loading…
Add table
Reference in a new issue