pikaur
pikaur copied to clipboard
Add support for run0 as privilege escalation tool
As systemd 256 is available in Arch for a few weeks, which ships with the new escalation tool run0, I would love to see run0 available in pikaur as an alternative to sudo or doas. Are there any plans to implement it?
i would love to see
a) https://github.com/actionless/pikaur/pulls b) https://www.paypal.me/actionless
Replacing the default setting of privilegeescalationtool from sudo to run0 does work. My pikaur.conf: `[sync] alwaysshowpkgorigin = no develpkgsexpiration = -1 upgradesorting = versiondiff showdownloadsize = no ignoreoutofdateaurupgrades = no
[build] keepbuilddir = no keepdevbuilddir = yes keepbuilddeps = no gpgdir = skipfailedbuild = no dynamicusers = never ignorearch = no
[review] noedit = no donteditbydefault = no nodiff = no gitdiffargs = --ignore-space-change,--ignore-all-space diffpager = auto hidedifffiles = .SRCINFO
[colors] version = 10 versiondiffold = 11 versiondiffnew = 9
[ui] requireenterconfirm = yes printcommands = no aursearchsorting = hottest displaylastupdated = no groupbyrepository = yes reversesearchsorting = no warnaboutpackageupdates = warnaboutnondefaultprivilegeescalationtool = yes
[misc] cachepath = /home/dylan/.cache datapath = /home/dylan/.local/share pacmanpath = pacman privilegeescalationtool = run0 privilegeescalationtarget = pikaur userid = 0 preserveenv = PKGDEST,VISUAL,EDITOR,http_proxy,https_proxy,ftp_proxy,HTTP_PROXY,HTTPS_PROXY,FTP_PROXY,ALL_PROXY groupid = 0
[network] aururl = https://aur.archlinux.org newsurl = https://archlinux.org/feeds/news/ socks5proxy = aurhttpproxy = aurhttpsproxy =
Example invocation:dylan@dylanarchold ~> pikaur -S screengrab --pikaur-debug
π debug: main_1000_1000: Setting stdout to utf-8...
π debug: main_1000_1000: already set - nothing to do
π debug: main_1000_1000: Setting stderr to utf-8...
π debug: main_1000_1000: already set - nothing to do
π debug: main_1000_1000: Pikaur operation found for args ['/usr/bin/pikaur', '-S', 'screengrab', '--pikaur-debug']: cli_install_packages
=> run0 -- /usr/bin/pikaur -S screengrab --pikaur-debug --pikaur-config=/home/dylan/.config/pikaur.conf --user-id=1000 --group-id=1000 --home-dir=/home/dylan --xdg-cache-home=/home/dylan/.cache --xdg-data-home=/home/dylan/.local/share
π debug: main_0_0: Setting stdout to utf-8...
π debug: main_0_0: already set - nothing to do
π debug: main_0_0: Setting stderr to utf-8...
π debug: main_0_0: already set - nothing to do
π debug: main_0_0: Pikaur operation found for args ['/usr/bin/pikaur', '-S', 'screengrab', '--pikaur-debug', '--pikaur-config=/home/dylan/.config/pikaur.conf', '--user-id=1000', '--group-id=1000', '--home-dir=/home/dylan', '--xdg-cache-home=/home/dylan/.cache', '--xdg-data-home=/home/dylan/.local/share']: cli_install_packages
π debug: install_info_fetcher:
Gonna fetch install info for:
install_package_names=['screengrab']
not_found_repo_pkgs_names=[]
pkgbuilds_packagelists={}
manually_excluded_packages_names=[]
skip_checkdeps_for_pkgnames=[]
π debug: install_info_fetcher: Gonna get repo pkgs install info... Reading repository package databases... Reading local package database... π debug: install_info_fetcher: Checking if '['screengrab']' is installable: => pacman --color=always --sync screengrab --print-format %r/%n π debug: install_info_fetcher: Check passed - gonna get install infos: π debug: install_info_fetcher: gonna get AUR pkgs install info for: aur_packages_versionmatchers=[] self.aur_updates_install_info=[] aur_packages_names_to_versions={} π debug: install_info_fetcher: found AUR pkgs: aur_pkg_list=[] not found AUR pkgs: not_found_aur_pkgs=[] π debug: install_info_fetcher: got AUR pkgs install info: [] π debug: aur_deps: find_aur_deps: package_names=[] π debug: aur_deps: find_aur_deps: result_aur_deps={} π debug: install_info_fetcher: get_aur_deps_info: self.aur_deps_relations={} π debug: install_info_fetcher: get_aur_deps_info: aur_pkgs={} π debug: install_info_fetcher: get_aur_deps_info: [done] π debug: install_info_fetcher: get_repo_deps_info: [done] π debug: install_info_fetcher: :: marking dependant pkgs... π debug: install_info_fetcher: :: mark_dependant :: get_repo_provided... π debug: install_info_fetcher: :: mark_dependant :: get local pkgs... π debug: install_info_fetcher: :: mark_dependant :: all_requested_pkg_names=['screengrab', 'qt6-base', 'kwindowsystem', 'libqtxdg', 'libx11', 'libxcb', 'libQt6Xdg.so=4-64', 'layer-shell-qt'] π debug: install_info_fetcher: :: mark_dependant :: explicit_aur_pkg_names=[] π debug: install_info_fetcher: :: mark_dependant :: - screengrab π debug: install_info_fetcher: :: mark_dependant :: providing_for=[] π debug: install_info_fetcher: == marked dependant pkgs. π debug: install_cli: self.install_info.all_install_info_containers=([<RepoInstallInfo "screengrab" 3.0.0-1 -> 3.0.0-1>], [], [], [], [], [], [], [])
π Repository package will be installed: screengrab 3.0.0-1 -> 3.0.0-1
π debug: prompt: Gonna get input from user... π debug: FileLock: Acquiring /tmp/pikaur_prompt_376344.lock... π debug: FileLock: Acquired /tmp/pikaur_prompt_376344.lock π debug: prompt_nolock: Restoring TTY... π debug: prompt_nolock: Using standard input reader... π Proceed with installation? [Y/n] π [v]iew package details [m]anually select packages π [r] show if packages are required by already installed packages
n π debug: FileLock: Releasing /tmp/pikaur_prompt_376344.lock π debug: FileLock: Released /tmp/pikaur_prompt_376344.lock π debug: prompt: Got answer: 'n' π debug: main_0_0: Restoring stdout... π debug: main_0_0: nothing to do π debug: main_0_0: Restoring stderr... π debug: main_0_0: nothing to do π debug: main_1000_1000: Restoring stdout... π debug: main_1000_1000: nothing to do π debug: main_1000_1000: Restoring stderr... π debug: main_1000_1000: nothing to do`
Also works with sudo-rs.
if the tool retain compatible (or partially compatible) CLI API with original sudo - it indeed should just work πΊπ