mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-16 07:19:57 +00:00
migrate to the latest devtools & archlinux git changes
This migration includes * removal of community repository as it is no more * fixed paths for devtools configurations * migration of archlinux packaging git url
This commit is contained in:
@ -70,7 +70,8 @@ def _parser() -> argparse.ArgumentParser:
|
||||
fromfile_prefix_chars="@", formatter_class=_formatter)
|
||||
parser.add_argument("-a", "--architecture", help="target architectures. For several subcommands it can be used "
|
||||
"multiple times", action="append")
|
||||
parser.add_argument("-c", "--configuration", help="configuration path", type=Path, default=Path("/etc/ahriman.ini"))
|
||||
parser.add_argument("-c", "--configuration", help="configuration path", type=Path,
|
||||
default=Path("/etc") / "ahriman.ini")
|
||||
parser.add_argument("--force", help="force run, remove file lock", action="store_true")
|
||||
parser.add_argument("-l", "--lock", help="lock file", type=Path,
|
||||
default=Path(tempfile.gettempdir()) / "ahriman.lock")
|
||||
@ -822,7 +823,7 @@ def _set_service_setup_parser(root: SubParserAction) -> argparse.ArgumentParser:
|
||||
parser.add_argument("--build-as-user", help="force makepkg user to the specific one")
|
||||
parser.add_argument("--build-command", help="build command prefix", default="ahriman")
|
||||
parser.add_argument("--from-configuration", help="path to default devtools pacman configuration",
|
||||
type=Path, default=Path("/usr/share/devtools/pacman-extra.conf"))
|
||||
type=Path, default=Path("/usr") / "share" / "devtools" / "pacman.conf.d" / "extra.conf")
|
||||
parser.add_argument("--makeflags-jobs", help="append MAKEFLAGS variable with parallelism set to number of cores",
|
||||
action=argparse.BooleanOptionalAction, default=True)
|
||||
parser.add_argument("--mirror", help="use the specified explicitly mirror instead of including mirrorlist")
|
||||
|
@ -40,9 +40,9 @@ class Setup(Handler):
|
||||
|
||||
ALLOW_AUTO_ARCHITECTURE_RUN = False
|
||||
|
||||
ARCHBUILD_COMMAND_PATH = Path("/usr/bin/archbuild")
|
||||
MIRRORLIST_PATH = Path("/etc/pacman.d/mirrorlist")
|
||||
SUDOERS_DIR_PATH = Path("/etc/sudoers.d")
|
||||
ARCHBUILD_COMMAND_PATH = Path("/usr") / "bin" / "archbuild"
|
||||
MIRRORLIST_PATH = Path("/etc") / "pacman.d" / "mirrorlist"
|
||||
SUDOERS_DIR_PATH = Path("/etc") / "sudoers.d"
|
||||
|
||||
@classmethod
|
||||
def run(cls, args: argparse.Namespace, architecture: str, configuration: Configuration, *,
|
||||
@ -178,7 +178,7 @@ class Setup(Handler):
|
||||
configuration.set_option(repository, "SigLevel", "Optional TrustAll") # we don't care
|
||||
configuration.set_option(repository, "Server", f"file://{paths.repository}")
|
||||
|
||||
target = source.parent / f"pacman-{prefix}-{architecture}.conf"
|
||||
target = source.parent / f"{prefix}-{architecture}.conf"
|
||||
with target.open("w") as devtools_configuration:
|
||||
configuration.write(devtools_configuration)
|
||||
|
||||
|
@ -34,13 +34,15 @@ class Official(Remote):
|
||||
|
||||
Attributes:
|
||||
DEFAULT_ARCHLINUX_URL(str): (class attribute) default archlinux url
|
||||
DEFAULT_ARCHLINUX_GIT_URL(str): (class attribute) default url for git packages
|
||||
DEFAULT_SEARCH_REPOSITORIES(list[str]): (class attribute) default list of repositories to search
|
||||
DEFAULT_RPC_URL(str): (class attribute) default archlinux repositories RPC url
|
||||
DEFAULT_TIMEOUT(int): (class attribute) HTTP request timeout in seconds
|
||||
"""
|
||||
|
||||
DEFAULT_ARCHLINUX_GIT_URL = "https://gitlab.archlinux.org"
|
||||
DEFAULT_ARCHLINUX_URL = "https://archlinux.org"
|
||||
DEFAULT_SEARCH_REPOSITORIES = ["Core", "Extra", "Multilib", "Community"]
|
||||
DEFAULT_SEARCH_REPOSITORIES = ["Core", "Extra", "Multilib"]
|
||||
DEFAULT_RPC_URL = "https://archlinux.org/packages/search/json"
|
||||
DEFAULT_TIMEOUT = 30
|
||||
|
||||
@ -56,9 +58,7 @@ class Official(Remote):
|
||||
Returns:
|
||||
str: git url for the specific base
|
||||
"""
|
||||
if repository.lower() in ("core", "extra", "testing", "kde-unstable"):
|
||||
return "https://github.com/archlinux/svntogit-packages.git" # hardcoded, ok
|
||||
return "https://github.com/archlinux/svntogit-community.git"
|
||||
return f"{Official.DEFAULT_ARCHLINUX_GIT_URL}/archlinux/packaging/packages/{package_base}.git"
|
||||
|
||||
@classmethod
|
||||
def remote_web_url(cls, package_base: str) -> str:
|
||||
|
@ -105,8 +105,8 @@ class RemoteSource:
|
||||
return cls(
|
||||
git_url=Official.remote_git_url(package_base, repository),
|
||||
web_url=Official.remote_web_url(package_base),
|
||||
path="trunk",
|
||||
branch=f"packages/{package_base}",
|
||||
path=".",
|
||||
branch="main",
|
||||
source=source,
|
||||
)
|
||||
return None
|
||||
|
Reference in New Issue
Block a user