feat: upgrade seatd to v0.9.3+1
Signed-off-by: sisungo <[email protected]>
This commit is contained in:
1 parent
9a4c9b6701
commit
cd31e20e70
6 files changed
+57
-11
No files matched your search
@@ -8,6 +8,7 @@
|
|||||||
"wheel": 0,
|
"wheel": 0,
|
||||||
"_sshd": 22,
|
"_sshd": 22,
|
||||||
"_lp": 631,
|
"_lp": 631,
|
||||||
"users": 79
|
"users": 79,
|
||||||
|
"seat": 600
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,6 +70,9 @@ def package(s: str):
|
|||||||
_pkginfo[s][_key_links] = _pkginfo[s][_key_links].copy()
|
_pkginfo[s][_key_links] = _pkginfo[s][_key_links].copy()
|
||||||
_pkginfo[s][_key_dependencies] = _pkginfo[s][_key_dependencies].copy()
|
_pkginfo[s][_key_dependencies] = _pkginfo[s][_key_dependencies].copy()
|
||||||
_pkginfo[s][_key_provides] = _pkginfo[s][_key_provides].copy()
|
_pkginfo[s][_key_provides] = _pkginfo[s][_key_provides].copy()
|
||||||
|
_pkginfo[s][_key_configure] = _pkginfo[s][_key_configure].copy()
|
||||||
|
_pkginfo[s][_key_recommendations] = _pkginfo[s][_key_recommendations].copy()
|
||||||
|
_pkginfo[s][_key_maintainers] = _pkginfo[s][_key_maintainers].copy()
|
||||||
|
|
||||||
|
|
||||||
def version(s: str):
|
def version(s: str):
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ def get_origin_url(s):
|
|||||||
return f"https://{url.hostname}{url.path}/archive/{url.fragment}.tar.gz"
|
return f"https://{url.hostname}{url.path}/archive/{url.fragment}.tar.gz"
|
||||||
elif url.scheme == "gitlab":
|
elif url.scheme == "gitlab":
|
||||||
return f"https://{url.hostname}/{url.path}/-/archive/{url.fragment}/{url.path.split('/')[1]}-{url.fragment}.tar.gz"
|
return f"https://{url.hostname}/{url.path}/-/archive/{url.fragment}/{url.path.split('/')[1]}-{url.fragment}.tar.gz"
|
||||||
|
elif url.scheme == "srht":
|
||||||
|
return f"https://{url.hostname}/{url.path}/archive/{url.fragment}.tar.gz"
|
||||||
elif url.scheme == "pypi":
|
elif url.scheme == "pypi":
|
||||||
pkgname = url.hostname
|
pkgname = url.hostname
|
||||||
return f"https://files.pythonhosted.org/packages/source/{pkgname[0]}/{pkgname}/{pkgname}-{url.fragment}.tar.gz"
|
return f"https://files.pythonhosted.org/packages/source/{pkgname[0]}/{pkgname}/{pkgname}-{url.fragment}.tar.gz"
|
||||||
@@ -139,6 +141,10 @@ def get_repo_filename(s):
|
|||||||
gitlab_name = url.path.replace('/', '-')
|
gitlab_name = url.path.replace('/', '-')
|
||||||
gitlab_host = url.hostname.split('.')[-2]
|
gitlab_host = url.hostname.split('.')[-2]
|
||||||
return f"{gitlab_host}{gitlab_name}-{url.fragment}.tar.zst"
|
return f"{gitlab_host}{gitlab_name}-{url.fragment}.tar.zst"
|
||||||
|
elif url.scheme == "srht":
|
||||||
|
srht_name = url.path.replace('~', '').replace('/', '-')
|
||||||
|
srht_host = url.hostname.split('.')[-2]
|
||||||
|
return f"{srht_host}{srht_name}-{url.fragment}.tar.zst"
|
||||||
elif url.scheme == "pypi":
|
elif url.scheme == "pypi":
|
||||||
return f"pypi-{url.hostname}-{url.fragment}.tar.zst"
|
return f"pypi-{url.hostname}-{url.fragment}.tar.zst"
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ "${ACTION}" = "remove" ] && exit 0
|
||||||
|
|
||||||
|
mkdir -p /var/lib/cups
|
||||||
|
|
||||||
|
create_group() {
|
||||||
|
account create-group \
|
||||||
|
--fullname "Seat Users" \
|
||||||
|
--description "A group for users that are enable to login via a seat." \
|
||||||
|
--host-gid 600 \
|
||||||
|
seat
|
||||||
|
}
|
||||||
|
|
||||||
|
account info seat > /dev/null 2>&1 || create_group
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[service]
|
||||||
|
display-name = "Seat Daemon"
|
||||||
|
description = "Service that allocates physical seats for normal users."
|
||||||
|
|
||||||
|
[exec]
|
||||||
|
pre-start = "mkdir -p /run/system"
|
||||||
|
start = "seatd -g seat"
|
||||||
+24
-10
@@ -1,17 +1,18 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from lib.make import *
|
from lib.make import *
|
||||||
from lib import cpp
|
from lib import cpp, arch
|
||||||
|
|
||||||
|
|
||||||
version("0.9.3")
|
version("0.9.3+1")
|
||||||
description("A minimal seat management daemon, and a universal seat management library.")
|
description("A minimal seat management daemon, and a universal seat management library.")
|
||||||
maintainer("sisungo <[email protected]>")
|
maintainer("sisungo <[email protected]>")
|
||||||
source_url("https://git.sr.ht/~kennylevinsen/seatd/archive/0.9.3.tar.gz")
|
source_managed("srht://git.sr.ht/~kennylevinsen/seatd#0.9.3")
|
||||||
|
|
||||||
builddep("shortcut/c")
|
builddep("shortcut/c")
|
||||||
builddep("shortcut/meson")
|
builddep("shortcut/meson")
|
||||||
builddep("linux-dev @target")
|
if "linux" in arch.get_target():
|
||||||
|
builddep("linux-dev @target")
|
||||||
|
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
@@ -20,7 +21,7 @@ def build():
|
|||||||
f"--libdir={get_prefix('libseat')}/lib",
|
f"--libdir={get_prefix('libseat')}/lib",
|
||||||
f"--includedir={get_prefix('libseat-dev')}/include",
|
f"--includedir={get_prefix('libseat-dev')}/include",
|
||||||
f"--bindir={get_prefix('seatd')}/bin",
|
f"--bindir={get_prefix('seatd')}/bin",
|
||||||
"-Ddefaultpath=/run/seatd.sock",
|
"-Ddefaultpath=/run/system/seatd.sock",
|
||||||
])
|
])
|
||||||
cpp.meson_compile()
|
cpp.meson_compile()
|
||||||
cpp.meson_install()
|
cpp.meson_install()
|
||||||
@@ -28,15 +29,28 @@ def build():
|
|||||||
on_build(build)
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
airs = os.getcwd() + "/files/seatd.airs"
|
||||||
|
|
||||||
|
def pack_daemon(composer):
|
||||||
|
composer.add("bin")
|
||||||
|
composer.makedirs("share/services")
|
||||||
|
composer.add(airs, "share/services/seatd.airs")
|
||||||
|
|
||||||
package("libseat")
|
package("libseat")
|
||||||
dep("semi-libc @same-arch")
|
dep("semi-libc @same-arch")
|
||||||
cpp.use_auto_pack(["lib"])
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("libseat-dev")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
dep("libseat (same)")
|
||||||
|
if "linux" in arch.get_target():
|
||||||
|
dep("linux-dev @same-arch")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
|
|
||||||
package("seatd")
|
package("seatd")
|
||||||
dep("semi-libc @same-arch")
|
dep("semi-libc @same-arch")
|
||||||
cpp.use_auto_pack(["bin"])
|
|
||||||
|
|
||||||
package("libseat-dev")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
dep("libseat (same)")
|
dep("libseat (same)")
|
||||||
cpp.use_auto_pack(["dev"])
|
# Our `.airs` file uses coreutils commands
|
||||||
|
dep("coreutils @same-arch")
|
||||||
|
configure_script("configure/create-group")
|
||||||
|
on_pack(pack_daemon)
|
||||||
Reference in new issue
Block a user