Closed duelle closed 1 year ago
Have the same problem, but it occurs only when using gnome-terminal
Can confirm the same issue. I ran pikaur -Syu
last night and it was OK, so I was thinking maybe one of the updates is causing the issue. The only Python packages that were updated were python-numpy
, python-platformdirs
, and python-trove-classifiers
, no idea if they could have something to do with this.
% pikaur -Vq
Pikaur v1.15.3
Pacman v6.0.2 - libalpm v13.0.2 - pyalpm v0.10.6
% pikaur -Syu
:: Synchronising package databases...
core is up to date
extra is up to date
multilib is up to date
:: Starting full AUR upgrade...
Reading repository package databases...
Reading local package database...
Reading AUR packages info...
:: Starting full system upgrade...
warning: ignoring package replacement (otf-cascadia-code-nerd-2.3.3-3 => ttf-cascadia-code-nerd-3.0.2-1)
there is nothing to do
%
Thanks, and do let me know if there's anything else I can do to help troubleshoot this.
Have the same problem, but it occurs only when using
gnome-terminal
The terminal I use is "urxvt"
Also happens with "foot" terminal.
λ pikaur -Syu --verbose --pikaur-debug
:: debug: main: Setting stdout to utf-8...
:: debug: main: already set - nothing to do
:: debug: main: Setting stderr to utf-8...
:: debug: main: already set - nothing to do
:: debug: main: Pikaur operation found for args ['/usr/bin/pikaur', '-Syu', '--verbose', '--pikaur-debug']: cli_install_packages
:: debug: news: init
:: debug: news: fetch_latest
=> GET https://www.archlinux.org/feeds/news/
=> sudo pacman --color=always --sync --refresh
:: Synchronizing package databases...
cachyos-v3 is up to date
cachyos is up to date
cachyos-core-v3 is up to date
cachyos-extra-v3 is up to date
core is up to date
extra is up to date
multilib is up to date
:: debug: pacman: Discarding repo cache...
:: Starting full AUR upgrade...
:: debug: install_info_fetcher:
Gonna fetch install info for:
install_package_names=[]
not_found_repo_pkgs_names=[]
pkgbuilds_packagelists={}
manually_excluded_packages_names=[]
Reading repository package databases...
Reading local package database...
:: debug: install_info_fetcher: Gonna get repo pkgs install info...
=> pacman --color=always --sync --sysupgrade --print-format %r/%n
:: 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=[]
Reading AUR packages info...
=> GET https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=amdgpu-clocks-git&arg[]=brother-mfc-l2700dn&arg[]=brscan4&arg[]=btrfs-du&arg[]=ccrtp&arg[]=certmonger&arg[]=clang-libs-minimal-git&arg[]=clang-minimal-git&arg[]=cmst&arg[]=hsa-runtime-git&arg[]=jmtpfs&arg[]=jstest-gtk-git&arg[]=lib32-llvm-libs-minimal-git&arg[]=lib32-llvm-minimal-git&arg[]=lib32-mesa-minimal-git&arg[]=libclc-minimal-git&arg[]=libstrangle&arg[]=libzrtpcpp&arg[]=linux516-tkg-cfs&arg[]=linux516-tkg-cfs-headers&arg[]=linux517-tkg-cfs&arg[]=linux517-tkg-cfs-headers&arg[]=linux518-tkg-cfs&arg[]=linux518-tkg-cfs-headers&arg[]=linux519-tkg-cfs&arg[]=linux519-tkg-cfs-headers&arg[]=linux60-tkg-cfs&arg[]=linux60-tkg-cfs-headers&arg[]=linux61-tkg-bore&arg[]=linux61-tkg-bore-headers&arg[]=linux61-tkg-cfs&arg[]=linux61-tkg-cfs-headers&arg[]=linux62-tkg-bore&arg[]=linux62-tkg-bore-headers&arg[]=llvm-libs-minimal-git&arg[]=llvm-minimal-git&arg[]=mesa-minimal-git&arg[]=mkinitcpio-numlock&arg[]=nemo-compare&arg[]=nfs4-acl-tools&arg[]=nordic-theme&arg[]=nordzy-cursors&arg[]=obs-cli&arg[]=obs-pipewire-audio-capture-bin&arg[]=oddjob&arg[]=openrazer-daemon&arg[]=openrazer-driver-dkms&arg[]=openrazer-meta&arg[]=openrgb&arg[]=phoronix-test-suite&arg[]=pikaur&arg[]=polychromatic&arg[]=powerline-console-fonts-git&arg[]=protontricks&arg[]=python-openrazer&arg[]=qt5-styleplugins&arg[]=rasdaemon&arg[]=renderdoc-bin&arg[]=rusticl-mesa-minimal-git&arg[]=sc-controller&arg[]=snapborg&arg[]=spirv-headers-git&arg[]=spirv-llvm-translator-minimal-git&arg[]=spirv-tools-git&arg[]=stressapptest&arg[]=systemd-numlockontty&arg[]=teams&arg[]=teamviewer&arg[]=ttf-ms-win11&arg[]=twinkle&arg[]=ucommon&arg[]=update-grub&arg[]=urlview&arg[]=vkbasalt&arg[]=vmware-keymaps&arg[]=vmware-workstation&arg[]=wl-mirror&arg[]=wol-systemd&arg[]=xdg-desktop-portal-wlr-git&arg[]=y-cruncher&arg[]=yp-tools&arg[]=yt-dlp-drop-in&arg[]=zenpower3-dkms
:: debug: install_info_fetcher: got AUR pkgs install info: []
=> pacman --color=always --query --upgrades --quiet
=> pacman --color=always --sync groff --print-format %r/%n
:: Ignoring package update clang-libs-minimal-git (17.0.0_r466710.7cea22c0be95-1 => devel) (ignored in Pacman config)
:: Ignoring package update clang-minimal-git (17.0.0_r466710.7cea22c0be95-1 => devel) (ignored in Pacman config)
:: Ignoring package update lib32-llvm-libs-minimal-git (17.0.0_r466713.5b666cf11e7a-1 => devel) (ignored in Pacman config)
:: Ignoring package update lib32-llvm-minimal-git (17.0.0_r466713.5b666cf11e7a-1 => devel) (ignored in Pacman config)
:: Ignoring package update lib32-mesa-minimal-git (23.2.0_devel.174082.ad980dc699e-1 => devel) (ignored in Pacman config)
:: Ignoring package update libclc-minimal-git (17.0.0_r466710.7cea22c0be95-1 => devel) (ignored in Pacman config)
:: Ignoring package update llvm-libs-minimal-git (17.0.0_r466710.7cea22c0be95-1 => devel) (ignored in Pacman config)
:: Ignoring package update llvm-minimal-git (17.0.0_r466710.7cea22c0be95-1 => devel) (ignored in Pacman config)
:: Ignoring package update mesa-minimal-git (23.2.0_devel.174082.ad980dc699e-1 => devel) (ignored in Pacman config)
:: Ignoring package update rusticl-mesa-minimal-git (23.2.0_devel.174082.ad980dc699e-1 => devel) (ignored in Pacman config)
:: Ignoring package update spirv-headers-git (1:1.3.250.0.r20.gd0006a3-1 => devel) (ignored in Pacman config)
:: Ignoring package update spirv-llvm-translator-minimal-git (1:r1812.2cea844-1 => devel) (ignored in Pacman config)
:: Ignoring package update spirv-tools-git (1:r3720.870fd1e-1 => devel) (ignored in Pacman config)
:: debug: install_cli: self.install_info.all_install_info_containers=([], [], [], [<RepoInstallInfo "groff" 1.23.0-1.1 -> 1.23.0-2.1>], [], [], [], [])
:: debug: news: print
:: debug: news: loading date from /home/username/.cache/pikaur/last_seen_news.dat
:: debug: news: data: Sun, 18 Jun 2023 09:14:37 +0000, parsed: 2023-06-18 09:14:37+00:00
:: debug: news: Arch News Date: 2023-06-18 09:14:37+00:00, Last-seen date: 2023-06-18 09:14:37+00:00
:: Third-party repository package will be installed:
cachyos-core-v3/groff 1.23.0-1.1 -> 1.23.0-2.1 2.45 MiB
Total Download Size: 2.45 MiB
Total Installed Size: 10.04 MiB
:: debug: prompt: Gonna get input from user...
:: debug: FileLock: Acquiring /tmp/pikaur_prompt_54678.lock...
:: debug: FileLock: Acquired /tmp/pikaur_prompt_54678.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
>>
:: debug: prompt_nolock: Reverting to prev TTY state...
:: debug: FileLock: Releasing /tmp/pikaur_prompt_54678.lock
:: debug: FileLock: Released /tmp/pikaur_prompt_54678.lock
:: debug: prompt: No answer provided - using "Y".
pikspect => sudo pacman --color=always --sync --verbose --sysupgrade
:: debug: pikspect: Opening virtual terminal...
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Hook Dirs : /usr/share/libalpm/hooks/ /etc/pacman.d/hooks/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
GPG Dir : /etc/pacman.d/gnupg/
Targets : None
:: Starting full system upgrade...
warning: grub: local (2:2.06.r591.g6425c12cd-1.1) is newer than cachyos-v3 (2:2.06.r499.ge67a551a4-1)
warning: llvm-libs: local (15.0.7-3.1) is newer than extra (15.0.7-3)
warning: tree: local (2.1.1-1) is newer than cachyos-extra-v3 (2.1.0-1.1)
resolving dependencies...
looking for conflicting packages...
Packages (1) groff-1.23.0-2.1
Total Installed Size: 10,04 MiB
Net Upgrade Size: 0,00 MiB
:: Proceed with installation? [Y/n]
And terminal is stuck after asking a second time to "Proceed with installation".
I got the same using kitty, I press Enter to confirm, then Enter again to reinstall failed package, then it works. https://github.com/actionless/pikaur/issues/728
Same is happening to me on Konsole.
This might sound a bit off-topic, but has anyone noticed that colours have stopped working in the pager "most" as well?
Just thought I'd ask in case there's something deeper wrong with Arch's environment now (and this issue is not pikaur actually doing something wrong).
Cheers.
Found out what's up with pikaur anyway, it's to do with the new version of sudo.
Downgrading from 1.9.14.p1-1 back to 1.9.13.p3-1 and there's no display issue.
Thanks for reporting!
You can check with pikaur-git
AUR package if it works for you now.
Found out what's up with pikaur anyway, it's to do with the new version of sudo.
now it should work normally with default sudo
config, without unsafe modifications
1.16-1 seems to be broken.
It runs sudo unnecessarily now and you can't hit enter on the sudo prompt.
1.16-1 seems to be broken.
It runs sudo unnecessarily now and you can't hit enter on the sudo prompt.
Latest pikaur runs fine here with current sudo -without the fix.
~►pikaur -Syu gnome-tweaks 0.127s
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
home_metakcahura_kernel_Arch_Extra_standard is up to date
rumpowered is up to date
chaotic-aur is up to date
:: Starting full AUR upgrade...
Reading repository package databases...
Reading local package database...
Reading AUR packages info...
:: Repository package will be installed:
gnome-tweaks 42beta+r14+g2d9d76c-3 -> 42beta+r14+g2d9d76c-3 0.27 MiB
Total Download Size: 0.27 MiB
Total Installed Size: 1.18 MiB
:: Proceed with installation? [Y/n]
:: [v]iew package details [m]anually select packages
>> y
warning: gnome-tweaks-42beta+r14+g2d9d76c-3 is up to date -- reinstalling
:: Starting full system upgrade...
warning: mcomix-git: local (2.2.1.r12.g906b417-1) is newer than chaotic-aur (r1681.6bb3069-1)
warning: python-httpcore: local (0.17.3-1) is newer than extra (0.17.2-1)
resolving dependencies...
looking for conflicting packages...
warning: insufficient columns available for table display
Packages (1) gnome-tweaks-42beta+r14+g2d9d76c-3
Total Download Size: 0.27 MiB
Total Installed Size: 1.18 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
gnome-tweaks-42b... 278.2 KiB 740 KiB/s 00:00 [--------------] 100%
(1/1) checking keys in keyring [--------------] 100%
(1/1) checking package integrity [--------------] 100%
(1/1) loading package files [--------------] 100%
(1/1) checking for file conflicts [--------------] 100%
(1/1) checking available disk space [--------------] 100%
:: Processing package changes...
(1/1) reinstalling gnome-tweaks [--------------] 100%
:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) Compiling GSettings XML schema files...
(3/5) Updating icon theme caches...
(4/5) Checking which packages need to be rebuilt
(5/5) Updating the desktop file MIME type cache...
Hmm, not for me.. Latest sudo and pikaur without the pty workaround:
% pikaur -Syu
[sudo] password for pezz:
:: Synchronizing package databases...
core is up to date
extra is up to date
:: Starting full AUR upgrade...
Reading repository package databases...
Reading local package database...
Reading AUR packages info...
[sudo] password for pezz:
sudo: a password is required
Command 'sudo pacman --color=always --sync --sysupgrade' failed to execute.
Do you want to retry? [Y/n]
Canceled by user (SIGINT)
It prompts correctly for sudo on the first go, but then prompts again and the input isn't handled properly, have to ^C to get out of it.
@cg00001 I'm guessing you have a config that allows your user or group to sudo without a password?
I do not see the issue if I configure sudo to allow me with NOPASSWD.
With the latest version (1.16) the output is not distorted anymore, but the sudo prompt seems to block.
:: Repository packages will be installed:
fakeroot 1.32-1 -> 1.32.1-1 0.07 MiB
scribus 1.5.8-19 -> 1.5.8-20 50.16 MiB
Total Download Size: 50.23 MiB
Total Installed Size: 131.81 MiB
:: Proceed with installation? [Y/n]
:: [v]iew package details [m]anually select packages
>>
[sudo] password for duelle:
Then it seems to be blocked. Return does not have any effect. Need to Ctrl+C to get out of it.
thanks for more info - i'll check it further today
As a quick, hacky workaround until this is fixed, you can temporarily set NOPASSWD for your user or group and do updates.
thanks for more info - i'll check it further today
Thank you so much for your efforts!
Tested latest git master, this lets you enter at the prompt now, but if I've already sudo'ed recently I still get prompted for a password the second time.
Is this pikaur or sudo causing this?
Edit: this has to be pikaur, I can repeatedly run sudo commands after an initial password entry.
% pikaur -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
:: Starting full AUR upgrade...
Reading repository package databases...
Reading local package database...
Reading AUR packages info...
[sudo] password for pezz: <--- Why the second prompt? It's already run pacman with sudo
:: Starting full system upgrade...
there is nothing to do
yeah, it seems to be a side-effect of new pty-based design of pikspect module - each pacman command is running inside its own virtual terminal - so it's basically behaving like if you'd be running pacman commands in separate terminals - this require designing new SudoLoop, which would be acting as sudo-ed process which would be spawing all next processes from itself without sudo-ing
Many thanks for re-opening this, yet again, in order to solve this.
Love your work, pikaur is the best AUR helper out there.
@cg00001 I'm guessing you have a config that allows your user or group to sudo without a password?
I do not see the issue if I configure sudo to allow me with NOPASSWD.
Yes.
i myself have nopasswd for pacman executable configured - so i didn't noticed the problem at first place
NOPASSWD just on pacman is an ok workaround for this actually.
But the old behaviour is more desirable (sudo with password if you need to, then everything else follows).
@actionless
use_pty
If set, and sudo is running in a terminal, the command will be run in a new
pseudo-terminal. If the sudo process is not attached to a terminal, use_pty has
no effect. A malicious program run under sudo may be capable of injecting
commands into the user's terminal or running a background process that retains
access to the user's terminal device even after the main program has finished
executing. By running the command in a separate pseudo-terminal, this attack is
no longer possible. This flag is on by default for sudo 1.9.14 and above.If set,
and sudo is running in a terminal, the command will be run in a new
pseudo-terminal. If the sudo process is not attached to a terminal, use_pty has
no effect. A malicious program run under sudo may be capable of injecting
commands into the user's terminal or running a background process that retains
access to the user's terminal device even after the main program has finished
executing. By running the command in a separate pseudo-terminal, this attack is
no longer possible. This flag is on by default for sudo 1.9.14 and above.
With the latest version (1.16) the output is not distorted anymore, but the sudo prompt seems to block.
:: Repository packages will be installed: fakeroot 1.32-1 -> 1.32.1-1 0.07 MiB scribus 1.5.8-19 -> 1.5.8-20 50.16 MiB Total Download Size: 50.23 MiB Total Installed Size: 131.81 MiB :: Proceed with installation? [Y/n] :: [v]iew package details [m]anually select packages >> [sudo] password for duelle:
Then it seems to be blocked. Return does not have any effect. Need to Ctrl+C to get out of it.
Re-installing pikaur from scratch solved the problem for me.
also, instead of implementing new sort of sudo loop
i've got alternative idea - to use mechanism similar to existing DynamicUsers - but instead of using dynamic users - just use the current user, ie the algo will be as follow:
1) when pikaur invoked - record user id
2) re-exec pikaur with sudo
3) run commands needed to be run as user (ie makepkg
) - as user id recorded in pt.1
the good thing about going with this solution - that it would require the minimal amount of code (and potential new bugs) - since it will be mostly re-using existing code for systemd DynamicUsers support
also, for network requests, i think might be useful to spawn a thread running with os.setuid to that original user id as well
not like urgent but would be nice to have
pass user-id and config-path as arguments when sudo-ing pikaur, as a bonus that would make those cli flags available to use manually as well, for example to have specific user dedicated to only run pikaur
(and to add user-id option to config as well)
please do some testing before i'll do the release
warning - if you had pacman
set for nopasswd in sudo config - that would stop working in pikaur, as now it's elevating privilege as pikaur
, not as pacman
warning - if you had pacman set for nopasswd in sudo config - that would stop working in pikaur, as now it's elevating privilege as pikaur, not as pacman
now i also [optionally] returned that behavior with the new config option: https://github.com/actionless/pikaur#privilegeescalationtarget-default-pikaur
Tested latest master here, and everything is working as it did before.
Using latest sudo, no changes to my pikaur config and no !pty workaround.
One thing to keep an eye on which was mentioned in the Arch bug, is that sudo made a fix as well, so not sure how this will affect pikaur once the new version comes out, will have to wait and see.
https://github.com/sudo-project/sudo/issues/258#issuecomment-1636403330
Thanks again @actionless
Found an additional issue now, something to do with running as root.
Unable to build because of how directories are being created (this is using latest master):
% pikaur -S oolite
Reading repository package databases...
Reading local package database...
Resolving AUR dependencies...
:: New dependencies will be installed from repository:
core/gcc-objc (for oolite) -> 13.1.1-1 23.11 MiB
extra/gnustep-base (for oolite) -> 1.29.0-2 2.13 MiB
extra/gnustep-make (for oolite) -> 2.9.1-1 0.17 MiB
extra/libmikmod (for sdl_mixer) -> 3.3.11.1-6 0.20 MiB
extra/sdl_image (for oolite) -> 1.2.12-8 0.03 MiB
extra/sdl_mixer (for oolite) -> 1.2.12-12 0.07 MiB
:: AUR package will be installed:
oolite -> 1.90-4
:: New dependency will be installed from AUR:
espeak (for oolite) -> 1:1.48.04-4
Total Download Size: 25.71 MiB
Total Installed Size: 87.34 MiB
:: Proceed with installation? [Y/n]
:: [v]iew package details [m]anually select packages
>>
Can't clone 'espeak' in '/home/pezz/.local/share/pikaur/aur_repos/espeak' from AUR:
fatal: destination path '/home/pezz/.local/share/pikaur/aur_repos/espeak' already exists and is not an empty directory.
:: Try recovering?
[T] try again
[c] git checkout -- '*'
[r] remove dir and clone again
[p] git stash && ... && git stash pop
[s] skip this package
[a] abort
>
Canceled by user (SIGINT)
% ll /home/pezz/.local/share/pikaur/aur_repos
total 16
drwx------ 4 pezz pezz 4096 Jul 16 12:55 .
drwx------ 3 pezz pezz 4096 Jul 16 12:54 ..
drwx------ 2 root root 4096 Jul 16 12:55 espeak
drwx------ 2 root root 4096 Jul 16 12:55 oolite
thanks @pezz , i'll look into it now
please check if it works for you
(you'll have to remove or chown those directories which got created with wrong permissions)
Using 1.17 as released on the AUR and things are looking good.
1.17 works provided that sudo has been upgraded to the latest version.
Description:
When running
pikaur -Syu
the output after "Starting full AUR upgrade..." is shifted heavily, probably due to wrong insertion of spaces or tabs, making it very hard to read/understand what is happening: Screenshot.When choosing the "m" option, the package list is cleanly shown and it is possible to install the packages. Sometimes (although not always reproducable) the final confirmation question before installing seems to block the progress and hangs without further output.
Attached log:
Seems to work as intended:
If there is any further information you may require, please let me know.
Thanks a lot for your support!