Compare commits

...
30 Commits
Author SHA1 Message Date
sisungo e18ea3f7e2 feat: add package wpa_supplicant
Signed-off-by: sisungo <[email protected]>
2026-06-26 11:17:02 +08:00
sisungo 248c0bbc66 Merge pull request 'feat: add unix functions to coreutils' (#38) from sisungo/semios-packages:coreutils-unix into master
Reviewed-on: semios/semios-packages#38
2026-06-25 21:52:24 +08:00
sisungo f7242af3a9 feat: add unix functions to coreutils
Signed-off-by: sisungo <[email protected]>
2026-06-25 05:57:11 +08:00
sisungo a3dbac2b67 Merge pull request 'feat: add dependencies and provisions' (#37) from sisungo/semios-packages:deps into master
Reviewed-on: semios/semios-packages#37
2026-06-23 15:29:18 +08:00
sisungo 383433a365 feat: add dependencies and provisions
Signed-off-by: sisungo <[email protected]>
2026-06-23 15:27:46 +08:00
sisungo 844b40daaa Merge pull request 'fix: architecture environments overrides inherited' (#36) from sisungo/semios-packages:arches into master
Reviewed-on: semios/semios-packages#36
2026-06-22 19:14:50 +08:00
sisungo e568b3f8ee fix: architecture environments overrides inherited
Signed-off-by: sisungo <[email protected]>
2026-06-22 18:32:41 +08:00
sisungo a1ae78330c Merge pull request 'feat: refactor ./x script' (#35) from sisungo/semios-packages:master into master
Reviewed-on: semios/semios-packages#35
2026-06-22 17:41:40 +08:00
sisungo 9ca10cb556 feat: refactor ./x script
Signed-off-by: sisungo <[email protected]>
2026-06-22 17:38:23 +08:00
sisungo 95a92ddae2 Merge pull request 'feat: add package llvm-project' (#25) from sisungo/semios-packages:llvm-project into master
Reviewed-on: semios/semios-packages#25
2026-06-21 20:36:38 +08:00
sisungo e6dd47ca7f feat: add package llvm-project
Signed-off-by: sisungo <[email protected]>
2026-06-21 20:35:56 +08:00
sisungo 2d9586117e Merge pull request 'feat: add package icu4c' (#33) from sisungo/semios-packages:icu4c into master
Reviewed-on: semios/semios-packages#33
2026-06-18 18:59:24 +08:00
sisungo 4df9ac681f Merge pull request 'feat (lib): fix cpp auto-pack symlink error' (#34) from sisungo/semios-packages:cpp_fixup into master
Reviewed-on: semios/semios-packages#34
2026-06-18 18:59:11 +08:00
sisungo a47f241569 Merge pull request 'feat: add package airup' (#32) from sisungo/semios-packages:airup into master
Reviewed-on: semios/semios-packages#32
2026-06-18 18:58:32 +08:00
sisungo df21a97eb1 Merge pull request 'feat (lib): add artifacts_dir to rust' (#31) from sisungo/semios-packages:rust-artifacts into master
Reviewed-on: semios/semios-packages#31
2026-06-18 18:55:08 +08:00
sisungo adea3cc896 feat: add package airup
Signed-off-by: sisungo <[email protected]>
2026-06-18 01:25:39 +08:00
sisungo 8fe867991c feat (lib): fix cpp auto-pack symlink error
Signed-off-by: sisungo <[email protected]>
2026-06-18 01:20:14 +08:00
sisungo 5a36fc628c feat: add package icu4c
Signed-off-by: sisungo <[email protected]>
2026-06-18 01:19:16 +08:00
sisungo 18f624e3c9 feat (lib): add artifacts_dir to rust
Signed-off-by: sisungo <[email protected]>
2026-06-17 20:27:37 +08:00
sisungo 0cc9a5c843 Merge pull request 'feat: add package nghttp2' (#30) from sisungo/semios-packages:nghttp2 into master
Reviewed-on: semios/semios-packages#30
2026-06-13 22:58:44 +08:00
sisungo 187e56dfef feat: add package nghttp2
Signed-off-by: sisungo <[email protected]>
2026-06-13 18:16:40 +08:00
sisungo a24cf0b528 Merge pull request 'fix: coreutils links are invalid' (#29) from sisungo/semios-packages:coreutils-links into master
Reviewed-on: semios/semios-packages#29
2026-06-13 12:46:29 +08:00
sisungo 73b1fcd745 fix: coreutils links are invalid
Signed-off-by: sisungo <[email protected]>
2026-06-13 12:45:37 +08:00
sisungo 878a501804 Merge pull request 'feat: add links to coreutils' (#28) from sisungo/semios-packages:coreutils-links into master
Reviewed-on: semios/semios-packages#28
2026-06-13 12:22:36 +08:00
sisungo eee111823d feat: add links to coreutils
Signed-off-by: sisungo <[email protected]>
2026-06-13 12:21:58 +08:00
sisungo 2dfaea6426 Merge pull request 'fix: autostrip caught wrong binaries' (#27) from sisungo/semios-packages:master into master
Reviewed-on: semios/semios-packages#27
2026-06-13 12:14:31 +08:00
sisungo d61c4ab118 fix: autostrip caught wrong binaries
Signed-off-by: sisungo <[email protected]>
2026-06-13 12:13:59 +08:00
sisungo a3690e710c Merge pull request 'feat: add package kmod' (#24) from sisungo/semios-packages:kmod into master
Reviewed-on: semios/semios-packages#24
2026-06-13 12:03:04 +08:00
sisungo a1f00f3b4f Merge pull request 'feat (lib): add autolink and autostrip' (#26) from sisungo/semios-packages:master into master
Reviewed-on: semios/semios-packages#26
2026-06-13 12:02:48 +08:00
sisungo d4a8040a9c feat (lib): add autolink and autostrip
Signed-off-by: sisungo <[email protected]>
2026-06-13 12:01:43 +08:00
32 changed files with 1476 additions and 31 deletions
+8 -2
View File
@@ -1,14 +1,20 @@
from typing import Callable, TypeAlias
from . import autopatch, autostrip
from lib import pkgcomposer
from . import autolink, autopatch, autostrip
PreBuild: TypeAlias = Callable[[], None]
PostBuild: TypeAlias = Callable[[], None]
PostPack: TypeAlias = Callable[[pkgcomposer.PkgComposer], None]
pre_build: dict[str, PreBuild] = {
"autopatch": autopatch.autopatch,
}
post_build: dict[str, PostBuild] = {
post_build: dict[str, PostBuild] = {}
post_pack: dict[str, PostPack] = {
"autolink": autolink.autolink,
"autostrip": autostrip.autostrip,
}
+31
View File
@@ -0,0 +1,31 @@
import os
from lib import arch, common, make, pkgcomposer
def autolink(composer: pkgcomposer.PkgComposer):
os.chdir(composer.workdir + "/bundle/")
try:
for i in common.treedir("bin"):
if i.is_file():
make.link(f"bin/{i.name}", "/bin/" + i.name)
except Exception:
pass
try:
for i in common.treedir("lib"):
if i.is_file():
make.link(f"lib/{i.name}", "/lib/" + arch.get_target() + "/" + i.name)
except Exception:
pass
try:
for i in common.treedir("include"):
if i.is_file():
make.link(
f"include/{i.name}",
"/lib/" + arch.get_target() + "/include/" + i.name,
)
except Exception:
pass
+22 -2
View File
@@ -1,2 +1,22 @@
def autostrip():
pass
import os
import subprocess
from lib import common
strip = os.environ.get("STRIP", "strip")
def _is_elf(filepath):
with open(filepath, "rb") as f:
return f.read(4) == b"\x7fELF"
def autostrip(composer):
for ent in common.treedir(composer.workdir):
if not ent.is_file(follow_symlinks=False):
continue
if not (os.access(ent.path, os.X_OK) or ".so" in ent.name):
continue
if not _is_elf(ent.path):
continue
subprocess.run([strip, ent.path], check=True)
+15 -3
View File
@@ -3,7 +3,18 @@ import os
from . import packie
all: dict[str, dict[str, str]] = {
"aarch64-semios-linux": {},
"aarch64-semios-linux": {
"CC": "clang -target aarch64-semios-linux-musl",
"CXX": "clang++ -target aarch64-semios-linux-musl",
},
"x86_64-semios-linux": {
"CC": "clang -target x86_64-semios-linux-musl",
"CXX": "clang++ -target x86_64-semios-linux-musl",
},
"riscv64-semios-linux": {
"CC": "clang -target riscv64-semios-linux-musl",
"CXX": "clang++ -target riscv64-semios-linux-musl",
},
}
_target: str = packie.host_arch()
@@ -15,5 +26,6 @@ def get_target():
def set_target(arch: str):
global _target
_target = arch
for key, val in all[_target]:
os.environ[key] = val
for key in all[_target].keys():
if not os.environ.get(key):
os.environ[key] = all[_target][key]
+6 -1
View File
@@ -83,7 +83,10 @@ def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter)
pc.makedirs(os.path.dirname(f"{dstdir}/{ent.name}"))
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
elif ent.is_symlink() and not os.path.isabs(os.readlink(ent.path)):
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
try:
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
except Exception:
pass
def _is_dev_file(ent) -> bool:
@@ -94,6 +97,8 @@ def _is_dev_file(ent) -> bool:
or ent.name.endswith(".pc")
or ent.name.endswith(".h")
or ent.name.endswith(".cmake")
or ent.name.endswith(".inc")
or ("Makefile" in ent.name)
)
+37 -1
View File
@@ -1,5 +1,7 @@
import typing
from lib import arch
from . import pkgcomposer, sources
_key_global = "@global"
@@ -7,10 +9,17 @@ _key_version = "version"
_key_description = "description"
_key_on_pack = "on_pack"
_key_arch_any = "arch_any"
_key_links = "links"
_key_dependencies = "dependencies"
_key_provides = "provides"
_current_pkgname: str = _key_global
_pkginfo: dict[str, dict[str, typing.Any]] = {
_key_global: {},
_key_global: {
_key_links: [],
_key_dependencies: [],
_key_provides: [],
},
}
_supported_arch: typing.Callable[[str], bool] = lambda x: True
_on_build: typing.Callable[[], None] | None = None
@@ -22,6 +31,9 @@ def package(s: str):
global _current_pkgname
_current_pkgname = s
_pkginfo[s] = _pkginfo[_key_global].copy()
_pkginfo[s][_key_links] = _pkginfo[s][_key_links].copy()
_pkginfo[s][_key_dependencies] = _pkginfo[s][_key_dependencies].copy()
_pkginfo[s][_key_provides] = _pkginfo[s][_key_provides].copy()
def version(s: str):
@@ -36,6 +48,30 @@ def arch_any():
_pkginfo[_current_pkgname][_key_arch_any] = True
def provide(s: str):
_pkginfo[_current_pkgname][_key_provides] += [
s.replace("@same-arch", f"@{arch.get_target()}")
]
def dep(s: str):
_pkginfo[_current_pkgname][_key_dependencies] += [
s.replace("(same)", "(same-version) @same-arch")
.replace("(same-version)", f"(={_pkginfo[_current_pkgname][_key_version]})")
.replace("@same-arch", f"@{arch.get_target()}")
]
def link(src: str, dst: str, default: bool = True):
_pkginfo[_current_pkgname][_key_links] += [
{
"from": src,
"to": dst,
"default": default,
}
]
def supported_arch(s: list[str] | typing.Callable[[str], bool]):
global _supported_arch
if isinstance(s, list):
+6 -3
View File
@@ -22,6 +22,10 @@ def build(rem: list[str] = []):
subprocess.run(cmdline)
def artifacts_dir():
return f"target/{_rust_triple(arch.get_target())}/release"
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
pc.makedir(dstdir)
with os.scandir(srcdir) as entries:
@@ -49,11 +53,10 @@ def _autopack_filter_bin(ent) -> bool:
def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):
target_dir = f"target/{_rust_triple(arch.get_target())}/release"
if "lib" in profiles:
_do_auto_pack(pc, target_dir, "lib", _autopack_filter_lib)
_do_auto_pack(pc, artifacts_dir(), "lib", _autopack_filter_lib)
if "bin" in profiles:
_do_auto_pack(pc, target_dir, "bin", _autopack_filter_bin)
_do_auto_pack(pc, artifacts_dir(), "bin", _autopack_filter_bin)
def use_auto_pack(profiles: list[str]):
+9
View File
@@ -0,0 +1,9 @@
{
"os_name": "\u001b[36;4mSemiOS\u001b[0m",
"config_dir": "/var/config/airup",
"service_dir": "/share/airup/services",
"milestone_dir": "/share/airup/milestones",
"runtime_dir": "/run/airup",
"env_vars": {},
"early_cmds": []
}
+30
View File
@@ -0,0 +1,30 @@
import os
import shutil
from lib import rust
from lib.make import *
version("0.10.9")
source_url("https://github.com/sisungo/airup/archive/refs/tags/v0.10.9.tar.gz")
def build():
shutil.copy2("../../build_manifest.json", "build_manifest.json")
rust.build()
on_build(build)
def pack_airup(composer):
os.chdir(rust.artifacts_dir())
composer.makedir("bin")
composer.makedir("libexec")
composer.addfile("airup", "bin/airup")
composer.addfile("airupd", "bin/airupd")
composer.addfile("airup-fallback-logger", "libexec/airup-fallback-logger")
package("airup")
on_pack(pack_airup)
dep("semi-libc @same-arch")
+10
View File
@@ -29,12 +29,22 @@ def pack_libssl(composer):
package("aws-lc-libcrypto")
on_pack(pack_libcrypto)
dep("semi-libc @same-arch")
provide("libcrypto@same-arch")
package("aws-lc-libssl")
on_pack(pack_libssl)
dep("aws-lc-libcrypto (same)")
provide("libssl@same-arch")
package("aws-lc-tools")
cpp.use_auto_pack(["bin"])
dep("aws-lc-libcrypto (same)")
dep("aws-lc-libssl (same)")
package("aws-lc-dev")
cpp.use_auto_pack(["dev"])
dep("aws-lc-libcrypto (same)")
dep("aws-lc-libssl (same)")
provide("libcrypto-dev@same-arch")
provide("libssl-dev@same-arch")
+5
View File
@@ -21,9 +21,14 @@ on_build(build)
package("libbzip2")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("bzip2")
cpp.use_auto_pack(["bin"])
dep("libbzip2 (same)")
dep("sh")
dep("coreutils")
package("libbzip2-dev")
cpp.use_auto_pack(["dev"])
dep("libbzip2 (same)")
+114 -1
View File
@@ -3,14 +3,127 @@ from lib.make import *
version("0.9.0")
source_url("https://github.com/uutils/coreutils/archive/refs/tags/0.9.0.tar.gz")
block_hook("autolink")
def build():
rust.build()
rust.build(["--features", "unix"])
on_build(build)
functions = [
"[",
"arch",
"b2sum",
"base32",
"base64",
"basename",
"basenc",
"cat",
"chgrp",
"chmod",
"chown",
"chroot",
"cksum",
"comm",
"cp",
"csplit",
"cut",
"date",
"dd",
"df",
"dir",
"dircolors",
"dirname",
"du",
"echo",
"env",
"expand",
"expr",
"factor",
"false",
"fmt",
"fold",
"groups",
"head",
"hostid",
"hostname",
"id",
"install",
"join",
"kill",
"link",
"ln",
"logname",
"ls",
"md5sum",
"mkdir",
"mkfifo",
"mknod",
"mktemp",
"more",
"mv",
"nice",
"nl",
"nohup",
"nproc",
"numfmt",
"od",
"paste",
"pathchk",
"pinky",
"pr",
"printenv",
"printf",
"ptx",
"pwd",
"readlink",
"realpath",
"rm",
"rmdir",
"seq",
"sha1sum",
"sha224sum",
"sha256sum",
"sha384sum",
"sha512sum",
"shred",
"shuf",
"sleep",
"sort",
"split",
"stat",
"stdbuf",
"stty",
"sum",
"sync",
"tac",
"tail",
"tee",
"test",
"timeout",
"touch",
"tr",
"true",
"truncate",
"tsort",
"tty",
"uname",
"unexpand",
"uniq",
"unlink",
"uptime",
"users",
"vdir",
"wc",
"who",
"whoami",
"yes",
]
package("coreutils")
for func in functions:
link(f"bin/coreutils", f"/bin/{func}")
rust.use_auto_pack(["bin"])
dep("semi-libc @same-arch")
+5
View File
@@ -4,6 +4,8 @@ from lib.make import *
version("0.5.0")
source_url("https://github.com/uutils/diffutils/archive/refs/tags/v0.5.0.tar.gz")
block_hook("autolink")
def build():
rust.build()
@@ -13,3 +15,6 @@ on_build(build)
package("diffutils")
rust.use_auto_pack(["bin"])
link("bin/diffutils", "/bin/cmp")
link("bin/diffutils", "/bin/diff")
dep("semi-libc @same-arch")
+3
View File
@@ -20,9 +20,12 @@ on_build(build)
package("libexpat")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("libexpat-tools")
cpp.use_auto_pack(["bin"])
dep("libexpat (same)")
package("libexpat-dev")
cpp.use_auto_pack(["dev"])
dep("libexpat (same)")
+1
View File
@@ -14,3 +14,4 @@ on_build(build)
package("findutils")
rust.use_auto_pack(["bin"])
dep("semi-libc @same-arch")
+1
View File
@@ -15,3 +15,4 @@ on_build(build)
package("gnu-make")
cpp.use_auto_pack(["bin"])
dep("semi-libc @same-arch")
+31
View File
@@ -0,0 +1,31 @@
import os
from lib import cpp
from lib.make import *
version("78.3")
source_url(
"https://github.com/unicode-org/icu/releases/download/release-78.3/icu4c-78.3-sources.tgz"
)
def build():
os.chdir("source")
cpp.configure(["--enable-plugins", "--prefix=/"])
cpp.make()
cpp.make_install()
on_build(build)
package("libicu4c")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("icu4c")
cpp.use_auto_pack(["bin"])
dep("libicu4c (same)")
package("libicu4c-dev")
cpp.use_auto_pack(["dev"])
dep("libicu4c (same)")
+3
View File
@@ -18,9 +18,12 @@ on_build(build)
package("libkmod")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("kmod")
cpp.use_auto_pack(["bin"])
dep("libkmod (same)")
package("libkmod-dev")
cpp.use_auto_pack(["dev"])
dep("libkmod (same)")
+9
View File
@@ -17,9 +17,18 @@ on_build(build)
package("libarchive")
cpp.use_auto_pack(["lib"])
dep("libcrypto@same-arch")
dep("libzstd @same-arch")
dep("libz @same-arch")
dep("liblzma @same-arch")
dep("semi-libc @same-arch")
dep("libzstd @same-arch")
package("libarchive-tools")
cpp.use_auto_pack(["bin"])
dep("libarchive (same)")
provide("bsdtar")
package("libarchive-dev")
cpp.use_auto_pack(["dev"])
dep("libarchive (same)")
+366
View File
@@ -0,0 +1,366 @@
import os
import subprocess
import lib.cpp as cpp
from lib import arch
from lib.make import *
version("22.1.7")
source_url(
"https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.7/llvm-project-22.1.7.src.tar.xz"
)
def llvm_host_triple():
return arch.get_target().replace("-semios-linux", "-semios-linux-musl")
def build():
subprocess.run(
[
"cmake",
"-G",
"Ninja",
"-S",
"llvm",
"-B",
"build",
"-DCMAKE_BUILD_TYPE=Release",
f"-DLLVM_DEFAULT_TARGET_TRIPLE={llvm_host_triple()}",
f"-DLLVM_HOST_TRIPLE={llvm_host_triple()}",
"-DLLVM_ENABLE_PROJECTS=clang;lldb;lld;bolt",
"-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind;compiler-rt",
"-DLLVM_ENABLE_EH=ON",
"-DLLVM_ENABLE_RTTI=ON",
"-DCMAKE_INSTALL_PREFIX=/",
"-DLLVM_ENABLE_ASSERTIONS=OFF",
"-DLLVM_BUILD_LLVM_DYLIB=ON",
"-DLLVM_ENABLE_LIBCXX=ON",
"-DLLVM_ENABLE_LIBEDIT=ON",
"-DLLVM_LINK_LLVM_DYLIB=ON",
"-DLIBCXX_HAS_MUSL_LIBC=ON",
"-DCOMPILER_RT_BUILD_GWP_ASAN=OFF",
],
check=True,
)
subprocess.run(["cmake", "--build", "build"], check=True)
os.environ["DESTDIR"] = os.getcwd() + "/cpp_install"
subprocess.run(["cmake", "--install", "build"], check=True)
os.chdir("cpp_install")
on_build(build)
def pack_runtime_lib(composer, files):
composer.makedir("lib")
for file in files:
composer.addfile(f"lib/{llvm_host_triple()}/{file}", f"lib/{file}")
def pack_runtime_dev(composer, files: list[str]):
for file in files:
if file.startswith("lib/"):
composer.makedirs("lib")
composer.addfile(file.replace("lib/", f"lib/{llvm_host_triple()}/"), file)
elif file.startswith("include/"):
realpath = file.replace("include/", "usr/include/")
composer.makedirs(os.path.dirname(file))
if os.path.isfile(realpath):
composer.addfile(realpath, file)
elif os.path.isdir(realpath):
composer.add_dir(realpath, file)
package("libunwind")
on_pack(
lambda composer: pack_runtime_lib(
composer, ["libunwind.so.1.0", "libunwind.so.1", "libunwind.so"]
)
)
package("libunwind-dev")
on_pack(
lambda composer: pack_runtime_dev(
composer,
[
"lib/libunwind.a",
"include/mach-o/compact_unwind_encoding.h",
"include/__libunwind_config.h",
"include/libunwind.h",
"include/libunwind.modulemap",
"include/unwind.h",
"include/unwind_arm_ehabi.h",
"include/unwind_itanium.h",
],
)
)
package("libcxxabi")
on_pack(
lambda composer: pack_runtime_lib(
composer, ["libc++abi.so", "libc++abi.so.1", "libc++abi.so.1.0"]
)
)
package("libcxxabi-dev")
on_pack(lambda composer: pack_runtime_dev(composer, ["lib/libc++abi.a"]))
package("libcxx")
on_pack(
lambda composer: pack_runtime_lib(
composer, ["libc++.so", "libc++.so.1", "libc++.so.1.0"]
)
)
package("libcxx-dev")
on_pack(
lambda composer: pack_runtime_dev(
composer,
[
"lib/libc++.a",
"lib/libc++experimental.a",
"lib/libc++.modules.json",
f"include/{llvm_host_triple()}/c++/v1",
"include/c++/v1",
],
)
)
def pack_libllvm(composer):
LIBRARIES = [
"libLLVM.so.22.1",
"libLLVM.so",
"libLLVM-22.so",
"libLTO.so",
"libLTO.so.22.1",
"libRemarks.so",
"libRemarks.so.22.1",
]
composer.makedir("lib")
for lib in LIBRARIES:
composer.addfile(f"lib/{lib}", f"lib/{lib}")
package("libllvm")
on_pack(pack_libllvm)
def pack_llvm(composer):
BINARIES = [
"bugpoint",
"dsymutil",
"llc",
"lli",
"llvm-addr2line",
"llvm-ar",
"llvm-as",
"llvm-bcanalyzer",
"llvm-bitcode-strip",
"llvm-bolt",
"llvm-bolt-binary-analysis",
"llvm-bolt-heatmap",
"llvm-boltdiff",
"llvm-c-test",
"llvm-cas",
"llvm-cat",
"llvm-cfi-verify",
"llvm-cgdata",
"llvm-config",
"llvm-cov",
"llvm-ctxprof-util",
"llvm-cvtres",
"llvm-cxxdump",
"llvm-cxxfilt",
"llvm-cxxmap",
"llvm-debuginfo-analyzer",
"llvm-debuginfod",
"llvm-debuginfod-find",
"llvm-diff",
"llvm-dis",
"llvm-dlltool",
"llvm-dwarfdump",
"llvm-dwarfutil",
"llvm-dwp",
"llvm-exegesis",
"llvm-extract",
"llvm-gsymutil",
"llvm-ifs",
"llvm-install-name-tool",
"llvm-ir2vec",
"llvm-jitlink",
"llvm-lib",
"llvm-libtool-darwin",
"llvm-link",
"llvm-lipo",
"llvm-lto",
"llvm-lto2",
"llvm-mc",
"llvm-mca",
"llvm-ml",
"llvm-ml64",
"llvm-modextract",
"llvm-nm",
"llvm-objcopy",
"llvm-objdump",
"llvm-offload-binary",
"llvm-offload-wrapper",
"llvm-opt-report",
"llvm-otool",
"llvm-pdbutil",
"llvm-profdata",
"llvm-profgen",
"llvm-ranlib",
"llvm-rc",
"llvm-readelf",
"llvm-readobj",
"llvm-readtapi",
"llvm-reduce",
"llvm-remarkutil",
"llvm-rtdyld",
"llvm-sim",
"llvm-size",
"llvm-split",
"llvm-stress",
"llvm-strings",
"llvm-strip",
"llvm-symbolizer",
"llvm-tblgen",
"llvm-tli-checker",
"llvm-undname",
"llvm-windres",
"llvm-xray",
"merge-fdata",
"opt",
"perf2bolt",
"reduce-chunk-list",
"sancov",
"sanstats",
"verify-uselistorder",
]
composer.makedir("bin")
for bin in BINARIES:
composer.addfile(f"usr/bin/{bin}", f"bin/{bin}")
package("llvm")
on_pack(pack_llvm)
def pack_lld(composer):
BINARIES = ["lld", "lld-link", "ld.lld", "ld64.lld", "wasm-ld"]
composer.makedir("bin")
for bin in BINARIES:
composer.addfile(f"usr/bin/{bin}", f"bin/{bin}")
package("lld")
on_pack(pack_lld)
def pack_liblldb(composer):
LIBRARIES = [
"liblldb.so",
"liblldb.so.22.1",
"liblldb.so.22.1.7",
"liblldbIntelFeatures.so",
"liblldbIntelFeatures.so.22.1",
]
composer.makedir("lib")
for lib in LIBRARIES:
composer.addfile(f"lib/{lib}", f"lib/{lib}")
package("liblldb")
on_pack(pack_liblldb)
def pack_lldb(composer):
BINARIES = [
"lldb",
"lldb-argdumper",
"lldb-dap",
"lldb-instr",
"lldb-mcp",
"lldb-server",
"yaml2macho-core",
]
composer.makedir("bin")
for bin in BINARIES:
composer.addfile(f"bin/{bin}", f"bin/{bin}")
package("lldb")
on_pack(pack_lldb)
def pack_libclang(composer):
LIBRARIES = [
"libclang.so",
"libclang-cpp.so",
"libclang-cpp.so.22.1",
"libclang.so.22.1",
"libclang.so.22.1.7",
]
composer.makedir("lib")
for lib in LIBRARIES:
composer.addfile(f"lib/{lib}", f"lib/{lib}")
package("libclang")
on_pack(pack_libclang)
def pack_clang(composer):
BINARIES = [
"clang",
"clang++",
"clang-22",
"clang-check",
"clang-cl",
"clang-cpp",
"clang-extdef-mapping",
"clang-format",
"clang-installapi",
"clang-linker-wrapper",
"clang-nvlink-wrapper",
"clang-offload-bundler",
"clang-offload-packager",
"clang-refactor",
"clang-repl",
"clang-scan-deps",
"clang-sycl-linker",
"clang-tblgen",
"diagtool",
"git-clang-format",
"hmaptool",
"intercept-build",
"amdgpu-arch",
"c-index-test",
"analyze-build",
"nvptx-arch",
"offload-arch",
"scan-build",
"scan-build-py",
"scan-view",
]
LIBEXEC = [
"analyze-c++",
"analyze-cc",
"c++-analyzer",
"ccc-analyzer",
"intercept-c++",
"intercept-cc",
]
composer.makedir("bin")
for bin in BINARIES:
composer.addfile(f"usr/bin/{bin}", f"bin/{bin}")
composer.makedir("libexec")
for libexec in LIBEXEC:
composer.addfile(f"usr/libexec/{libexec}", f"libexec/{libexec}")
package("clang")
on_pack(pack_clang)
+2
View File
@@ -20,3 +20,5 @@ def pack_mksh(composer):
package("mksh")
on_pack(pack_mksh)
dep("semi-libc @same-arch")
provide("sh")
+27
View File
@@ -0,0 +1,27 @@
import os
from lib import cpp
from lib.make import *
version("1.69.0")
source_url(
"https://github.com/nghttp2/nghttp2/releases/download/v1.69.0/nghttp2-1.69.0.tar.gz"
)
def build():
cpp.cmake()
cpp.ninja()
cpp.ninja_install()
os.chdir("usr")
on_build(build)
package("libnghttp2")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("libnghttp2-dev")
cpp.use_auto_pack(["dev"])
dep("libnghttp2 (same)")
+2 -1
View File
@@ -1,6 +1,5 @@
import os
import lib.cpp as cpp
from lib.make import *
version("1.13.2")
@@ -21,3 +20,5 @@ def pack_ninja(composer):
package("ninja")
on_pack(pack_ninja)
dep("semi-libc @same-arch")
dep("libcxx @same-arch")
+3
View File
@@ -23,9 +23,12 @@ on_build(build)
package("libpkgconf")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("pkgconf")
cpp.use_auto_pack(["bin"])
dep("libpkgconf (same)")
package("libpkgconf-dev")
cpp.use_auto_pack(["dev"])
dep("libpkgconf (same)")
+7
View File
@@ -1,3 +1,4 @@
import lib.arch as arch
from lib.cpp import *
from lib.make import *
@@ -14,8 +15,14 @@ def build():
on_build(build)
def musl_target():
return arch.get_target().split("-")[0]
package("semi-libc")
use_auto_pack(["lib"])
link("lib/libc.so", f"/lib/ld-musl-{musl_target()}.so.1")
package("semi-libc-dev")
use_auto_pack(["dev"])
dep("semi-libc (same)")
+3
View File
@@ -22,9 +22,12 @@ on_build(build)
package("libsqlite")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("sqlite")
cpp.use_auto_pack(["bin"])
dep("libsqlite (same)")
package("libsqlite-dev")
cpp.use_auto_pack(["dev"])
dep("libsqlite (same)")
+612
View File
@@ -0,0 +1,612 @@
# SemiOS WPA Supplicant Config
# Uncomment following two lines and fix the paths if you have installed OpenSSL
# or GnuTLS in non-default location
#CFLAGS += -I/usr/local/openssl/include
#LIBS += -L/usr/local/openssl/lib
# Some Red Hat versions seem to include kerberos header files from OpenSSL, but
# the kerberos files are not in the default include path. Following line can be
# used to fix build issues on such systems (krb5.h not found).
#CFLAGS += -I/usr/include/kerberos
# Disable deprecated Linux WEXT interface support
#CONFIG_DRIVER_WEXT=y
# Driver interface for Linux drivers using the nl80211 kernel interface
CONFIG_DRIVER_NL80211=y
# QCA vendor extensions to nl80211
#CONFIG_DRIVER_NL80211_QCA=y
# driver_nl80211.c requires libnl. If you are compiling it yourself
# you may need to point hostapd to your version of libnl.
#
#CFLAGS += -I$<path to libnl include files>
#LIBS += -L$<path to libnl library files>
# Use libnl v2.0 (or 3.0) libraries.
#CONFIG_LIBNL20=y
# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored)
CONFIG_LIBNL32=y
# Driver interface for wired Ethernet drivers
CONFIG_DRIVER_WIRED=y
# Driver interface for MACsec capable Qualcomm Atheros drivers
#CONFIG_DRIVER_MACSEC_QCA=y
# Driver interface for Linux MACsec drivers
CONFIG_DRIVER_MACSEC_LINUX=y
# Driver interface for the Broadcom RoboSwitch family
#CONFIG_DRIVER_ROBOSWITCH=y
# Driver interface for no driver (e.g., WPS ER only)
#CONFIG_DRIVER_NONE=y
# Enable IEEE 802.1X Supplicant (automatically included if any EAP method or
# MACsec is included)
CONFIG_IEEE8021X_EAPOL=y
# EAP-MD5
CONFIG_EAP_MD5=y
# EAP-MSCHAPv2
CONFIG_EAP_MSCHAPV2=y
# EAP-TLS
CONFIG_EAP_TLS=y
# Enable EAP-TLSv1.3 support by default (currently disabled unless explicitly
# enabled in network configuration)
#CONFIG_EAP_TLSV1_3=y
# EAL-PEAP
CONFIG_EAP_PEAP=y
# EAP-TTLS
CONFIG_EAP_TTLS=y
# EAP-FAST
CONFIG_EAP_FAST=y
# EAP-TEAP
# Note: The current EAP-TEAP implementation is experimental and should not be
# enabled for production use. The IETF RFC 7170 that defines EAP-TEAP has number
# of conflicting statements and missing details and the implementation has
# vendor specific workarounds for those and as such, may not interoperate with
# any other implementation. This should not be used for anything else than
# experimentation and interoperability testing until those issues has been
# resolved.
#CONFIG_EAP_TEAP=y
# EAP-GTC
CONFIG_EAP_GTC=y
# EAP-OTP
CONFIG_EAP_OTP=y
# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used)
#CONFIG_EAP_SIM=y
# Enable SIM simulator (Milenage) for EAP-SIM
#CONFIG_SIM_SIMULATOR=y
# EAP-PSK (experimental; this is _not_ needed for WPA-PSK)
#CONFIG_EAP_PSK=y
# EAP-pwd (secure authentication using only a password)
CONFIG_EAP_PWD=y
# EAP-PAX
CONFIG_EAP_PAX=y
# LEAP
CONFIG_EAP_LEAP=y
# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used)
#CONFIG_EAP_AKA=y
# EAP-AKA' (enable CONFIG_PCSC, if EAP-AKA' is used).
# This requires CONFIG_EAP_AKA to be enabled, too.
#CONFIG_EAP_AKA_PRIME=y
# Enable USIM simulator (Milenage) for EAP-AKA
#CONFIG_USIM_SIMULATOR=y
# EAP-SAKE
CONFIG_EAP_SAKE=y
# EAP-GPSK
CONFIG_EAP_GPSK=y
# Include support for optional SHA256 cipher suite in EAP-GPSK
CONFIG_EAP_GPSK_SHA256=y
# EAP-TNC and related Trusted Network Connect support (experimental)
CONFIG_EAP_TNC=y
# Wi-Fi Protected Setup (WPS)
CONFIG_WPS=y
# Enable WPS external registrar functionality
#CONFIG_WPS_ER=y
# Disable credentials for an open network by default when acting as a WPS
# registrar.
#CONFIG_WPS_REG_DISABLE_OPEN=y
# Enable WPS support with NFC config method
#CONFIG_WPS_NFC=y
# EAP-IKEv2
CONFIG_EAP_IKEV2=y
# EAP-EKE
#CONFIG_EAP_EKE=y
# MACsec
CONFIG_MACSEC=y
# PKCS#12 (PFX) support (used to read private key and certificate file from
# a file that usually has extension .p12 or .pfx)
CONFIG_PKCS12=y
# Smartcard support (i.e., private key on a smartcard), e.g., with openssl
# engine.
CONFIG_SMARTCARD=y
# PC/SC interface for smartcards (USIM, GSM SIM)
# Enable this if EAP-SIM or EAP-AKA is included
#CONFIG_PCSC=y
# Support HT overrides (disable HT/HT40, mask MCS rates, etc.)
#CONFIG_HT_OVERRIDES=y
# Support VHT overrides (disable VHT, mask MCS rates, etc.)
#CONFIG_VHT_OVERRIDES=y
# Support HE overrides
#CONFIG_HE_OVERRIDES=y
# Development testing
#CONFIG_EAPOL_TEST=y
# Support IPv6
CONFIG_IPV6=y
# Select control interface backend for external programs, e.g, wpa_cli:
# unix = UNIX domain sockets (default for Linux/*BSD)
# udp = UDP sockets using localhost (127.0.0.1)
# udp6 = UDP IPv6 sockets using localhost (::1)
# named_pipe = Windows Named Pipe (default for Windows)
# udp-remote = UDP sockets with remote access (only for tests systems/purpose)
# udp6-remote = UDP IPv6 sockets with remote access (only for tests purpose)
# y = use default (backwards compatibility)
# If this option is commented out, control interface is not included in the
# build.
CONFIG_CTRL_IFACE=unix
# Include support for GNU Readline and History Libraries in wpa_cli.
# When building a wpa_cli binary for distribution, please note that these
# libraries are licensed under GPL and as such, BSD license may not apply for
# the resulting binary.
#CONFIG_READLINE=y
# Include internal line edit mode in wpa_cli. This can be used as a replacement
# for GNU Readline to provide limited command line editing and history support.
CONFIG_WPA_CLI_EDIT=y
# Remove debugging code that is printing out debug message to stdout.
# This can be used to reduce the size of the wpa_supplicant considerably
# if debugging code is not needed. The size reduction can be around 35%
# (e.g., 90 kB).
#CONFIG_NO_STDOUT_DEBUG=y
# Remove WPA support, e.g., for wired-only IEEE 802.1X supplicant, to save
# 35-50 kB in code size.
#CONFIG_NO_WPA=y
# Remove IEEE 802.11i/WPA-Personal ASCII passphrase support
# This option can be used to reduce code size by removing support for
# converting ASCII passphrases into PSK. If this functionality is removed, the
# PSK can only be configured as the 64-octet hexstring (e.g., from
# wpa_passphrase). This saves about 0.5 kB in code size.
#CONFIG_NO_WPA_PASSPHRASE=y
# Simultaneous Authentication of Equals (SAE), WPA3-Personal
CONFIG_SAE=y
# SAE Public Key, WPA3-Personal
CONFIG_SAE_PK=y
# Disable scan result processing (ap_scan=1) to save code size by about 1 kB.
# This can be used if ap_scan=1 mode is never enabled.
#CONFIG_NO_SCAN_PROCESSING=y
# Select configuration backend:
# file = text file (e.g., wpa_supplicant.conf; note: the configuration file
# path is given on command line, not here; this option is just used to
# select the backend that allows configuration files to be used)
# winreg = Windows registry (see win_example.reg for an example)
CONFIG_BACKEND=file
# Remove configuration write functionality (i.e., to allow the configuration
# file to be updated based on runtime configuration changes). The runtime
# configuration can still be changed, the changes are just not going to be
# persistent over restarts. This option can be used to reduce code size by
# about 3.5 kB.
#CONFIG_NO_CONFIG_WRITE=y
# Remove support for configuration blobs to reduce code size by about 1.5 kB.
#CONFIG_NO_CONFIG_BLOBS=y
# Select program entry point implementation:
# main = UNIX/POSIX like main() function (default)
# main_winsvc = Windows service (read parameters from registry)
# main_none = Very basic example (development use only)
CONFIG_MAIN=main
# Select wrapper for operating system and C library specific functions
# unix = UNIX/POSIX like systems (default)
# win32 = Windows systems
# none = Empty template
CONFIG_OS=unix
# Select event loop implementation
# eloop = select() loop (default)
# eloop_win = Windows events and WaitForMultipleObject() loop
CONFIG_ELOOP=eloop
# Should we use poll instead of select? Select is used by default.
#CONFIG_ELOOP_POLL=y
# Should we use epoll instead of select? Select is used by default.
CONFIG_ELOOP_EPOLL=y
# Select layer 2 packet implementation
# linux = Linux packet socket (default)
# pcap = libpcap/libdnet/WinPcap
# freebsd = FreeBSD libpcap
# winpcap = WinPcap with receive thread
# ndis = Windows NDISUIO (note: requires CONFIG_USE_NDISUIO=y)
# none = Empty template
CONFIG_L2_PACKET=linux
# Disable Linux packet socket workaround applicable for station interface
# in a bridge for EAPOL frames. This should be uncommented only if the kernel
# is known to not have the regression issue in packet socket behavior with
# bridge interfaces (commit 'bridge: respect RFC2863 operational state')').
#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
# Support Operating Channel Validation
#CONFIG_OCV=y
# Select TLS implementation
# openssl = OpenSSL (default)
# gnutls = GnuTLS
# internal = Internal TLSv1 implementation (experimental)
# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental)
# none = Empty template
CONFIG_TLS=openssl
# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1)
# can be enabled to get a stronger construction of messages when block ciphers
# are used. It should be noted that some existing TLS v1.0 -based
# implementation may not be compatible with TLS v1.1 message (ClientHello is
# sent prior to negotiating which version will be used)
#CONFIG_TLSV11=y
# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2)
# can be enabled to enable use of stronger crypto algorithms. It should be
# noted that some existing TLS v1.0 -based implementation may not be compatible
# with TLS v1.2 message (ClientHello is sent prior to negotiating which version
# will be used)
#CONFIG_TLSV12=y
# Select which ciphers to use by default with OpenSSL if the user does not
# specify them.
#CONFIG_TLS_DEFAULT_CIPHERS="DEFAULT:!EXP:!LOW"
# Add support for new DBus control interface
# (fi.w1.wpa_supplicant1)
CONFIG_CTRL_IFACE_DBUS_NEW=y
# Add introspection support for new DBus control interface
CONFIG_CTRL_IFACE_DBUS_INTRO=y
# Add support for loading EAP methods dynamically as shared libraries.
# When this option is enabled, each EAP method can be either included
# statically (CONFIG_EAP_<method>=y) or dynamically (CONFIG_EAP_<method>=dyn).
# Dynamic EAP methods are build as shared objects (eap_*.so) and they need to
# be loaded in the beginning of the wpa_supplicant configuration file
# (see load_dynamic_eap parameter in the example file) before being used in
# the network blocks.
#
# Note that some shared parts of EAP methods are included in the main program
# and in order to be able to use dynamic EAP methods using these parts, the
# main program must have been build with the EAP method enabled (=y or =dyn).
# This means that EAP-TLS/PEAP/TTLS/FAST cannot be added as dynamic libraries
# unless at least one of them was included in the main build to force inclusion
# of the shared code. Similarly, at least one of EAP-SIM/AKA must be included
# in the main build to be able to load these methods dynamically.
#
# Please also note that using dynamic libraries will increase the total binary
# size. Thus, it may not be the best option for targets that have limited
# amount of memory/flash.
#CONFIG_DYNAMIC_EAP_METHODS=y
# Dynamic library loading
# Add the ability to configure libraries to load at compile time.
# If set, these disable dynamic configuration.
#CONFIG_PKCS11_ENGINE_PATH - pkcs11_engine library location.
#CONFIG_PKCS11_MODULE_PATH - pkcs11_module library location.
#CONFIG_OPENSC_ENGINE_PATH - opensc_engine library location.
#
# Prevent library loading at runtime
#CONFIG_NO_PKCS11_ENGINE_PATH=y # prevents loading pkcs11_engine library.
#CONFIG_NO_PKCS11_MODULE_PATH=y # prevents loading pkcs11_module library.
# CONFIG_NO_OPENSC_ENGINE_PATH=y # prevents loading opensc_engine library.
# Prevents loading EAP libraries at runtime
#CONFIG_NO_LOAD_DYNAMIC_EAP=y
# IEEE Std 802.11r-2008 (Fast BSS Transition) for station mode
CONFIG_IEEE80211R=y
# Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt)
CONFIG_DEBUG_FILE=y
# Send debug messages to syslog instead of stdout
CONFIG_DEBUG_SYSLOG=y
# Set syslog facility for debug messages
#CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
# Add support for sending all debug messages (regardless of debug verbosity)
# to the Linux kernel tracing facility. This helps debug the entire stack by
# making it easy to record everything happening from the driver up into the
# same file, e.g., using trace-cmd.
#CONFIG_DEBUG_LINUX_TRACING=y
# Add support for writing debug log to Android logcat instead of standard
# output
#CONFIG_ANDROID_LOG=y
# Enable privilege separation (see README 'Privilege separation' for details)
#CONFIG_PRIVSEP=y
# Enable mitigation against certain attacks against TKIP by delaying Michael
# MIC error reports by a random amount of time between 0 and 60 seconds
#CONFIG_DELAYED_MIC_ERROR_REPORT=y
# Enable tracing code for developer debugging
# This tracks use of memory allocations and other registrations and reports
# incorrect use with a backtrace of call (or allocation) location.
#CONFIG_WPA_TRACE=y
# For BSD, uncomment these.
#LIBS += -lexecinfo
#LIBS_p += -lexecinfo
#LIBS_c += -lexecinfo
# Use libbfd to get more details for developer debugging
# This enables use of libbfd to get more detailed symbols for the backtraces
# generated by CONFIG_WPA_TRACE=y.
#CONFIG_WPA_TRACE_BFD=y
# For BSD, uncomment these.
#LIBS += -lbfd -liberty -lz
#LIBS_p += -lbfd -liberty -lz
#LIBS_c += -lbfd -liberty -lz
# wpa_supplicant depends on strong random number generation being available
# from the operating system. os_get_random() function is used to fetch random
# data when needed, e.g., for key generation. On Linux and BSD systems, this
# works by reading /dev/urandom. It should be noted that the OS entropy pool
# needs to be properly initialized before wpa_supplicant is started. This is
# important especially on embedded devices that do not have a hardware random
# number generator and may by default start up with minimal entropy available
# for random number generation.
#
# As a safety net, wpa_supplicant is by default trying to internally collect
# additional entropy for generating random data to mix in with the data fetched
# from the OS. This by itself is not considered to be very strong, but it may
# help in cases where the system pool is not initialized properly. However, it
# is very strongly recommended that the system pool is initialized with enough
# entropy either by using hardware assisted random number generator or by
# storing state over device reboots.
#
# wpa_supplicant can be configured to maintain its own entropy store over
# restarts to enhance random number generation. This is not perfect, but it is
# much more secure than using the same sequence of random numbers after every
# reboot. This can be enabled with -e<entropy file> command line option. The
# specified file needs to be readable and writable by wpa_supplicant.
#
# If the os_get_random() is known to provide strong random data (e.g., on
# Linux/BSD, the board in question is known to have reliable source of random
# data from /dev/urandom), the internal wpa_supplicant random pool can be
# disabled. This will save some in binary size and CPU use. However, this
# should only be considered for builds that are known to be used on devices
# that meet the requirements described above.
#CONFIG_NO_RANDOM_POOL=y
# Should we attempt to use the getrandom(2) call that provides more reliable
# yet secure randomness source than /dev/random on Linux 3.17 and newer.
# Requires glibc 2.25 to build, falls back to /dev/random if unavailable.
#CONFIG_GETRANDOM=y
# IEEE 802.11ac (Very High Throughput) support (mainly for AP mode)
CONFIG_IEEE80211AC=y
# IEEE 802.11ax HE support (mainly for AP mode)
CONFIG_IEEE80211AX=y
# IEEE 802.11be EHT support (mainly for AP mode)
# CONFIG_IEEE80211AX is mandatory for setting CONFIG_IEEE80211BE.
# Note: This is experimental and work in progress. The definitions are still
# subject to change and this should not be expected to interoperate with the
# final IEEE 802.11be version.
#CONFIG_IEEE80211BE=y
# Wireless Network Management (IEEE Std 802.11v-2011)
# Note: This is experimental and not complete implementation.
#CONFIG_WNM=y
# Interworking (IEEE 802.11u)
# This can be used to enable functionality to improve interworking with
# external networks (GAS/ANQP to learn more about the networks and network
# selection based on available credentials).
CONFIG_INTERWORKING=y
# Hotspot 2.0
CONFIG_HS20=y
# Enable interface matching in wpa_supplicant
CONFIG_MATCH_IFACE=y
# Disable roaming in wpa_supplicant
#CONFIG_NO_ROAMING=y
# AP mode operations with wpa_supplicant
# This can be used for controlling AP mode operations with wpa_supplicant. It
# should be noted that this is mainly aimed at simple cases like
# WPA2-Personal while more complex configurations like WPA2-Enterprise with an
# external RADIUS server can be supported with hostapd.
CONFIG_AP=y
# P2P (Wi-Fi Direct)
# This can be used to enable P2P support in wpa_supplicant. See README-P2P for
# more information on P2P operations.
CONFIG_P2P=y
# Enable TDLS support
CONFIG_TDLS=y
# Wi-Fi Display
# This can be used to enable Wi-Fi Display extensions for P2P using an external
# program to control the additional information exchanges in the messages.
CONFIG_WIFI_DISPLAY=y
# Autoscan
# This can be used to enable automatic scan support in wpa_supplicant.
# See wpa_supplicant.conf for more information on autoscan usage.
#
# Enabling directly a module will enable autoscan support.
# For exponential module:
CONFIG_AUTOSCAN_EXPONENTIAL=y
# For periodic module:
CONFIG_AUTOSCAN_PERIODIC=y
# Password (and passphrase, etc.) backend for external storage
# These optional mechanisms can be used to add support for storing passwords
# and other secrets in external (to wpa_supplicant) location. This allows, for
# example, operating system specific key storage to be used
#
# External password backend for testing purposes (developer use)
#CONFIG_EXT_PASSWORD_TEST=y
# File-based backend to read passwords from an external file.
#CONFIG_EXT_PASSWORD_FILE=y
# Enable Fast Session Transfer (FST)
CONFIG_FST=y
# Enable CLI commands for FST testing
#CONFIG_FST_TEST=y
# Automatic Channel Selection
# This will allow wpa_supplicant to pick the channel automatically when channel
# is set to "0".
#
# TODO: Extend parser to be able to parse "channel=acs_survey" as an alternative
# to "channel=0". This would enable us to eventually add other ACS algorithms in
# similar way.
#
# Automatic selection is currently only done through initialization, later on
# we hope to do background checks to keep us moving to more ideal channels as
# time goes by. ACS is currently only supported through the nl80211 driver and
# your driver must have survey dump capability that is filled by the driver
# during scanning.
#
# TODO: In analogy to hostapd be able to customize the ACS survey algorithm with
# a newly to create wpa_supplicant.conf variable acs_num_scans.
#
# Supported ACS drivers:
# * ath9k
# * ath5k
# * ath10k
#
# For more details refer to:
# http://wireless.kernel.org/en/users/Documentation/acs
CONFIG_ACS=y
# Support Multi Band Operation
CONFIG_MBO=y
# Fast Initial Link Setup (FILS) (IEEE 802.11ai)
CONFIG_FILS=y
# FILS shared key authentication with PFS
CONFIG_FILS_SK_PFS=y
# Support RSN on IBSS networks
# This is needed to be able to use mode=1 network profile with proto=RSN and
# key_mgmt=WPA-PSK (i.e., full key management instead of WPA-None).
CONFIG_IBSS_RSN=y
# External PMKSA cache control
# This can be used to enable control interface commands that allow the current
# PMKSA cache entries to be fetched and new entries to be added.
#CONFIG_PMKSA_CACHE_EXTERNAL=y
# Mesh Networking (IEEE 802.11s)
CONFIG_MESH=y
# Background scanning modules
# These can be used to request wpa_supplicant to perform background scanning
# operations for roaming within an ESS (same SSID). See the bgscan parameter in
# the wpa_supplicant.conf file for more details.
# Periodic background scans based on signal strength
CONFIG_BGSCAN_SIMPLE=y
# Learn channels used by the network and try to avoid bgscans on other
# channels (experimental)
#CONFIG_BGSCAN_LEARN=y
# Opportunistic Wireless Encryption (OWE)
# Experimental implementation of draft-harkins-owe-07.txt
#CONFIG_OWE=y
# Device Provisioning Protocol (DPP) (also known as Wi-Fi Easy Connect)
CONFIG_DPP=y
# DPP version 2 support
CONFIG_DPP2=y
# DPP version 3 support (experimental and still changing; do not enable for
# production use)
#CONFIG_DPP3=y
# Disable deprecated WEP
#CONFIG_WEP=y
# Remove all TKIP functionality
# TKIP is an old cryptographic data confidentiality algorithm that is not
# considered secure. It should not be used anymore for anything else than a
# backwards compatibility option as a group cipher when connecting to APs that
# use WPA+WPA2 mixed mode. For now, the default wpa_supplicant build includes
# support for this by default, but that functionality is subject to be removed
# in the future.
#CONFIG_NO_TKIP=y
# Pre-Association Security Negotiation (PASN)
# Experimental implementation based on IEEE P802.11z/D2.6 and the protocol
# design is still subject to change. As such, this should not yet be enabled in
# production use.
#CONFIG_PASN=y
# Disable support for Radio Measurement (IEEE 802.11k) and supported operating
# class indication. Removing these is not recommended since they can help the
# AP manage the network and STA steering.
#CONFIG_NO_RRM=y
# Disable support for Robust AV streaming for consumer and enterprise Wi-Fi
# applications; IEEE Std 802.11-2020, 4.3.24; SCS, MSCS, QoS Management
#CONFIG_NO_ROBUST_AV=y
# Disable support for WMM admission control
#CONFIG_NO_WMM_AC=y
# Wi-Fi Aware unsynchronized service discovery (NAN USD)
#CONFIG_NAN_USD=y
+29
View File
@@ -0,0 +1,29 @@
import os
import shutil
from lib import cpp
from lib.arch import get_target
from lib.make import *
version("2.11")
source_url("https://w1.fi/releases/wpa_supplicant-2.11.tar.gz")
def build():
os.chdir("wpa_supplicant")
if "linux" in get_target():
shutil.copy2("../../../config.linux", ".config")
cpp.make()
cpp.make_install()
os.chdir("../cpp_install/usr/local")
on_build(build)
package("wpa_supplicant")
dep("semi-libc @same-arch")
dep("libnl @same-arch")
dep("libssl @same-arch")
dep("libcrypto @same-arch")
dep("libdbus @same-arch")
cpp.use_auto_pack(["bin"])
+3
View File
@@ -17,9 +17,12 @@ on_build(build)
package("liblzma")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("xz")
cpp.use_auto_pack(["bin"])
dep("liblzma (same)")
package("liblzma-dev")
cpp.use_auto_pack(["dev"])
dep("liblzma (same)")
+5
View File
@@ -18,9 +18,14 @@ on_build(build)
package("libz-ng")
cpp.use_auto_pack(["lib"])
provide("libz")
dep("semi-libc @same-arch")
package("zlib-ng-tools")
cpp.use_auto_pack(["bin"])
dep("libz-ng (same)")
package("libz-ng-dev")
cpp.use_auto_pack(["dev"])
dep("libz-ng (same)")
provide("libz-dev")
+3
View File
@@ -19,9 +19,12 @@ on_build(build)
package("libzstd")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
package("zstd")
cpp.use_auto_pack(["bin"])
dep("libzstd (same)")
package("libzstd-dev")
cpp.use_auto_pack(["dev"])
dep("libzstd (same)")
+68 -17
View File
@@ -3,6 +3,7 @@ import importlib
import os
import shutil
import sys
import typing
import hooks
import lib.arch
@@ -19,8 +20,13 @@ argparser = argparse.ArgumentParser(
argparser.add_argument(
"--target", type=str, help="Target architecture to build the package for"
)
argparser.add_argument("--build", type=str, help="Package to build")
argparser.add_argument("--clean", type=str, help="Package to clean")
subparsers = argparser.add_subparsers(dest="subcommand")
parser_build = subparsers.add_parser("build")
parser_build.add_argument("BUILD_PKGNAME")
parser_clean = subparsers.add_parser("clean")
parser_clean.add_argument("CLEAN_PKGNAME")
parser_list = subparsers.add_parser("list")
parser_list.add_argument("ITEM", choices=("all", "built", "new"))
args = argparser.parse_args()
if args.target:
@@ -29,6 +35,18 @@ else:
lib.arch.set_target(lib.arch.get_target())
def run_hooks(map, arg: typing.Any = None):
current_dir = os.getcwd()
for n in map.keys():
if n in lib.make._blocked_hooks:
continue
if arg:
map[n](arg)
else:
map[n]()
os.chdir(current_dir)
def run_build_package(package: str):
try:
os.chdir(f"packages/{package}")
@@ -47,11 +65,7 @@ def run_build_package(package: str):
exit(1)
# Run `pre_build` hooks
for n in hooks.pre_build.keys():
if n in lib.make._blocked_hooks:
continue
hooks.pre_build[n]()
os.chdir(package_dir)
run_hooks(hooks.pre_build)
# Build the package
if lib.make._on_build:
@@ -61,15 +75,12 @@ def run_build_package(package: str):
print("on_build(): Not defined")
# Run `post_build` hooks
post_build_dir = os.getcwd()
for n in hooks.post_build.keys():
if n in lib.make._blocked_hooks:
continue
hooks.post_build[n]()
os.chdir(post_build_dir)
run_hooks(hooks.post_build)
# Pack packages
for pkgname in lib.make._pkginfo.keys():
lib.make._current_pkgname = pkgname
if pkgname == lib.make._key_global:
continue
@@ -89,14 +100,24 @@ def run_build_package(package: str):
pkginfo[lib.make._key_on_pack](composer)
# Run post_pack hooks
run_hooks(hooks.post_pack, composer)
manifest = {
"name": pkgname,
"version": pkgver,
"arch": pkgarch,
"links": pkginfo[lib.make._key_links],
"dependencies": pkginfo[lib.make._key_dependencies],
"provides": pkginfo[lib.make._key_provides],
}
composer.write_manifest(manifest)
composer.compose()
# Build success
with open(f"{package_dir}/target/build-ok.tag", "wt+") as file:
file.write("OK")
def run_clean_package(package: str):
try:
@@ -105,7 +126,37 @@ def run_clean_package(package: str):
pass
if args.build:
run_build_package(args.build)
if args.clean:
run_clean_package(args.clean)
def run_list(item):
if item == "all":
for i in os.listdir("packages"):
if i.startswith("."):
continue
print(i)
elif item == "built":
for i in os.listdir("packages"):
if i.startswith("."):
continue
if os.path.exists(f"packages/{i}/target/build-ok.tag"):
print(i)
elif item == "new":
for i in os.listdir("packages"):
if i.startswith("."):
continue
try:
pkgbuild_mtime = os.path.getmtime(f"packages/{i}/pkgbuild.py")
target_mtime = os.path.getmtime(f"packages/{i}/target/build-ok.tag")
if target_mtime < pkgbuild_mtime:
print(i)
except Exception:
print(i)
if args.subcommand == "build":
run_build_package(args.BUILD_PKGNAME)
elif args.subcommand == "clean":
run_clean_package(args.CLEAN_PKGNAME)
elif args.subcommand == "list":
run_list(args.ITEM)
else:
print("error: no action specified", file=sys.stderr)
exit(1)