paru icon indicating copy to clipboard operation
paru copied to clipboard

[BUG] `doas: invalid option -- 'v'`

Open ThisNekoGuy opened this issue 3 years ago • 5 comments

Affected Version

paru v1.9.2.r0.gdbf5d8a - libalpm v13.0.1

Description

Have you checked previous issues?

  • [x] Yes

How I came upon this is rather mystifying, but basically what I had done was write a bash script that's mean to grab an unofficial PKGBUILD I made from the internet (which I guarantee works and has no issues) and then build it with paru (if paru is detected to be installed); however, the script seems perfectly fine when I go over it but this odd issue keeps happening where, whenever it calls paru, doas decides to interject into the process with an error message instead of prompting for the usual password like it's supposed to. The only way I can imagine this being possible is that somehow paru is passing this "v" option to opendoas when it isn't supposed to (and never does otherwise).

What's ironic about this is that the issue is occurring when the whole point of the script I made is to install V in an automated way (because the AUR pages for it are out of date), and V is a rust-like and go-like language... :joy:

Note, that I have chroot builds enabled, and I don't know if this has anything to do with the issue.

For reference, to reproduce yourself, here's the mentioned script I made: unofficial-v-updater.zip

Also strange, after this occurs, the script attempts to remove any *.tar.* files when it's evidently not supposed to do this in the event of a build failure in the script. :/

Output

neko-san@ARCH /m/extraStorage> ./unofficial-v-updater.sh
Updating PKGBUILD and ".SRCINFO"...
Cleaning old source(s) in current directory...
Updating the PKGBUILD version...
Grabing the latest release source for SHA256sum verification...
PKGBUILD update complete.
doas: invalid option -- 'v'
usage: doas [-Lns] [-C config] [-u user] command [args]
:: Resolving dependencies...
doas: invalid option -- 'v'
usage: doas [-Lns] [-C config] [-u user] command [args]
[sudo] password for neko-san: ^C
sudo: a password is required
Sorry, an error occured...
rm: cannot remove './*.tar.*': No such file or directory
neko-san@ARCH /m/extraStorage [1]> 

/etc/paru.conf

#
# $PARU_CONF
# /etc/paru.conf
# ~/.config/paru/paru.conf
#
# See the paru.conf(5) manpage for options

#
# GENERAL OPTIONS
#
[options]
PgpFetch
Devel
Provides
DevelSuffixes = -git -cvs -svn -bzr -darcs -always
BottomUp
RemoveMake
SudoLoop = true
#UseAsk
#CombinedUpgrade
CleanAfter
UpgradeMenu
NewsOnUpgrade
#AurOnly

LocalRepo
Chroot = /mnt/extraStorage/AUR/ParuChroot/
#Sign
#SignDb

#
# Binary OPTIONS
#
[bin]
Sudo = doas
FileManager = dolphin
#MFlags = --skippgpcheck

/etc/pacman.conf

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#CacheDir     = /mnt/extraStorage/AUR/ParuChroot/repo/aur/cache/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup = modified

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
Color
#TotalDownload
#NoProgressBar
CheckSpace
#VerbosePkgLists
ParallelDownloads = 5

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

[core-x86-64-v3]
Include = /etc/pacman.d/alhp-mirrorlist

[extra-x86-64-v3]
Include = /etc/pacman.d/alhp-mirrorlist

[community-x86-64-v3]
Include = /etc/pacman.d/alhp-mirrorlist

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist

[multilib]
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

[aur]
SigLevel = PackageOptional DatabaseOptional
Server = file:///mnt/extraStorage/AUR/ParuChroot/repo/aur/

ThisNekoGuy avatar Jan 03 '22 10:01 ThisNekoGuy

Note, that I have chroot builds enabled, and I don't know if this has anything to do with the issue.

I didn't enable the chroot builds, but the issue still occurs.

Have you found a way to fix the issue by any chance?

NChechulin avatar Jan 11 '22 10:01 NChechulin

sudo -v is used to refresh for sudoloop. Use SudoLoop = true to pass true instead.

Morganamilo avatar Jan 11 '22 15:01 Morganamilo

@Morganamilo This is already set; I included it in the original post

ThisNekoGuy avatar Jan 11 '22 17:01 ThisNekoGuy

Ha hmm. You don't happen to have doas symlinked to sudo do you?

Morganamilo avatar Jan 11 '22 17:01 Morganamilo

Nope; unfortunately, a lot of programs require sudo and don't permit an alternative so I don't do that

ThisNekoGuy avatar Jan 11 '22 18:01 ThisNekoGuy

Is this still an issue? If so paru's logging is a lot better than in January. Try PARU_DEBUG=1 and pasting the output of the bug.

Morganamilo avatar Nov 21 '22 17:11 Morganamilo