Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied during pikaur sys upgrade #867

Open
d3vc44r opened this issue Jan 31, 2025 · 6 comments
Open

Permission denied during pikaur sys upgrade #867

d3vc44r opened this issue Jan 31, 2025 · 6 comments

Comments

@d3vc44r
Copy link

d3vc44r commented Jan 31, 2025

Hi guys
I'm running pikaur with sudo because without it I'm receiving following python errors.

Traceback (most recent call last):
  File "/usr/bin/pikaur", line 41, in <module>
    main()
    ~~~~^^
  File "/usr/lib/python3.13/site-packages/pikaur/main.py", line 518, in main
    with wrapper():
         ~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pikaur/main.py", line 107, in __enter__
    logger.debug(
    ~~~~~~~~~~~~^
        "Setting {} to {}...", attr, DEFAULT_INPUT_ENCODING,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        lock=False,
        ^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.13/site-packages/pikaur/logging_extras.py", line 81, in debug
    msg = f"{color_line(self.module_name, self.color)}: {' ' * indent}{str_message}"
             ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pikaur/pikaprint.py", line 189, in color_line
    if not color_enabled() and not force:
           ~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pikaur/pikaprint.py", line 91, in color_enabled
    args = parse_args()
  File "/usr/lib/python3.13/site-packages/pikaur/args.py", line 821, in parse_args
    parsed_args, _help = _parse_args(args=args)
                         ~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pikaur/args.py", line 780, in _parse_args
    parser, help_msgs = get_parser_for_action(app=app_name, args=args)
                        ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pikaur/args.py", line 748, in get_parser_for_action
    ("store_true", get_pikaur_bool_opts(action=pikaur_action), True, None),
                   ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pikaur/args.py", line 150, in get_pikaur_bool_opts
    "k", "keepbuild", PikaurConfig().build.KeepBuildDir.get_bool(),
                      ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pikaur/config.py", line 705, in __getattr__
    return PikaurConfigSection(self.get_config()[attr])
                               ~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pikaur/config.py", line 698, in get_config
    cls.migrate_config()
    ~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pikaur/config.py", line 794, in migrate_config
    cls._handle_warning(option_schema, section_name, option_name)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pikaur/config.py", line 814, in _handle_warning
    current_value = cls._config[section_name][option_name]
                    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib/python3.13/configparser.py", line 1280, in __getitem__
    raise KeyError(key)
KeyError: 'DynamicUsers'

Does anyone have any idea to get rid of these permission denied errors? They´re occuring nearly every package

var/cache/private/pikaur/build/mingw-w64-tools/PKGBUILD: line 22: /var/cache/private/pikaur/build/mingw-w64-tools/src/mingw-w64-v12.0.0/mingw-w64-tools/gendef/configure: Permission denied

In ~/.config/pikaur.config following user and group is defined but it seems not to be used

[misc]
UserId = 947
GroupId = 947

I'm running out of ideas, so any tips on how I can help myself are very welcome.

@actionless
Copy link
Owner

@d3vc44r
Copy link
Author

d3vc44r commented Feb 1, 2025

Warnung: [build]DynamicUsers = root Dynamic Users feature will be disabled in the upcoming releases. Consider either calling Pikaur from your actual user account without sudo, or creating pikauruser and specifying its UserId in Pikaur config and set DynamicUsers tonever`

Pikaur v1.32
Pacman v7.0.0 - libalpm v15.0.0 - pyalpm v0.10.6
`

Warnung:
  [build]DynamicUsers = root
Dynamic Users feature will be disabled in the upcoming releases.
Consider either calling Pikaur from your actual user account without `sudo`, or creating `pikaur` user and specifying its UserId in Pikaur config
and set DynamicUsers to `never`


🛴 debug: main_0: Setting stdout to utf-8...
🛴 debug: main_0: already set - nothing to do
🛴 debug: main_0: Setting stderr to utf-8...
🛴 debug: main_0: already set - nothing to do
=> /usr/sbin/systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp true
🛴 debug: main_0: Pikaur operation found for args ['/usr/bin/pikaur', '-S', 'mingw-w64-tools', '--verbose', '--pikaur-debug']: cli_install_packages
🛴 debug: install_info_fetcher: 
Gonna fetch install info for:
    install_package_names=['mingw-w64-tools']
    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...
Lese Repository-Paketdatenbank...
Lese lokale Paketdatenbank...
🛴 debug: install_info_fetcher: Checking if '['mingw-w64-tools']' is installable:
=> pacman --color=always --sync mingw-w64-tools --print-format %r/%n
🛴 debug: install_info_fetcher: Check failed - gonna check it separately:
🛴 debug: install_info_fetcher: Checking if 'mingw-w64-tools' exists in the repo:
=> pacman --color=always --sync mingw-w64-tools --print-format %r/%n --nodeps --nodeps
🛴 debug: install_info_fetcher:   'mingw-w64-tools' is NOT found in the repo.
🛴 debug: install_info_fetcher: Check partially passed - gonna get install infos:
🛴 debug: install_info_fetcher: gonna get AUR pkgs install info for:
    aur_packages_versionmatchers=['mingw-w64-tools']
    self.aur_updates_install_info=[]
    aur_packages_names_to_versions={'mingw-w64-tools': <VersionMatcher mingw-w64-tools['cmp_default']None>}
🛴 debug: aur_module: find_aur_packages: mingw-w64-tools uncached
=> GET https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=mingw-w64-tools
🛴 debug: install_info_fetcher: found AUR pkgs:
    aur_pkg_list=[<AURPackageInfo "mingw-w64-tools" 12.0.0-1>]
not found AUR pkgs:
    not_found_aur_pkgs=[]
🛴 debug: install_info_fetcher: got AUR pkgs install info: [<AURInstallInfo "mingw-w64-tools" 9.0.0-1 -> 12.0.0-1>]
Löse AUR-Abhängigkeiten auf...
🛴 debug: aur_deps: find_aur_deps: package_names=['mingw-w64-tools']
=> pacman --color=always --deptest glibc
🛴 debug: aur_deps: find_missing_deps_for_aur_pkg: NOT not_found_local_pkgs
🛴 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=['glibc']
🛴 debug: install_info_fetcher:   :: mark_dependant :: explicit_aur_pkg_names=['mingw-w64-tools']
🛴 debug: install_info_fetcher:   :: mark_dependant ::  - mingw-w64-tools
🛴 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=([], [], [], [], [], [], [<AURInstallInfo "mingw-w64-tools" 9.0.0-1 -> 12.0.0-1>], [])

🛴 Zu installierendes AUR-Paket:
 mingw-w64-tools                       9.0.0-1              -> 12.0.0-1

🛴 debug: prompt: Gonna get input from user...
🛴 debug: FileLock: Acquiring /root/.cache/pikaur_prompt_676112.lock...
🛴 debug: FileLock: Acquired /root/.cache/pikaur_prompt_676112.lock
🛴 debug: prompt_nolock: Restoring TTY...
🛴 debug: prompt_nolock: Using standard input reader...
🛴 Mit der Installation fortfahren? [J/n] 
🛴 [P]aketdetails anzeigen, Pakete [m]anuell auswählen
🛴 [r] show if packages are required by already installed packages
>> J
🛴 debug: FileLock: Releasing /root/.cache/pikaur_prompt_676112.lock
🛴 debug: FileLock: Released /root/.cache/pikaur_prompt_676112.lock
🛴 debug: prompt: Got answer: 'j'
🛴 debug: install_cli: << GET_PACKAGE_BUILD
🛴 debug: install_cli: self.pkgbuilds_packagelists={}
🛴 debug: aur_module: find_aur_packages: mingw-w64-tools cached
🛴 debug: aur_module: find_aur_packages: mingw-w64-tools cached
🛴 debug: build: Build dir: /var/cache/pikaur/build/mingw-w64-tools
=> /usr/sbin/systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp git -C /var/cache/pikaur/aur_repos/mingw-w64-tools pull origin master
🛴 debug: aur_module: find_aur_packages: mingw-w64-tools cached
🛴 debug: build: Build dir: /var/cache/pikaur/build/mingw-w64-tools
🛴 debug: install_cli: cloned_pkgbuilds={'mingw-w64-tools': <PackageBuild "mingw-w64-tools" ['mingw-w64-tools']>}
🛴 debug: install_cli: self.package_builds_by_name={'mingw-w64-tools': <PackageBuild "mingw-w64-tools" ['mingw-w64-tools']>}
🛴 debug: install_cli: self.package_builds_by_provides={}
🛴 debug: install_cli: >> GET_PACKAGE_BUILD
Suche nach in Konflikt stehenden AUR-Paketen...
🛴 Warnung: Diff für Paket mingw-w64-tools wird nicht angezeigt (bereits angeschaut)
🛴 debug: prompt: Gonna get input from user...
🛴 debug: FileLock: Acquiring /root/.cache/pikaur_prompt_90642.lock...
🛴 debug: FileLock: Acquired /root/.cache/pikaur_prompt_90642.lock
🛴 debug: prompt_nolock: Restoring TTY...
🛴 debug: prompt_nolock: Using standard input reader...
Editiere PKGBUILD für Paket mingw-w64-tools? [j/N] n
🛴 debug: FileLock: Releasing /root/.cache/pikaur_prompt_90642.lock
🛴 debug: FileLock: Released /root/.cache/pikaur_prompt_90642.lock
🛴 debug: prompt: Got answer: 'n'

🛴 debug: install_cli: << BUILD PACKAGES
🛴 debug: install_cli:   Packages to be built: ['mingw-w64-tools']
🛴 debug: install_cli:   Gonna build PKGBUILDS: {'mingw-w64-tools': <PackageBuild "mingw-w64-tools" ['mingw-w64-tools']>}
🛴 debug: install_cli:   Gonna build pkgnames: ['mingw-w64-tools']
=> /usr/sbin/systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp mkdir -p /var/cache/private/pikaur/build/mingw-w64-tools
=> /usr/sbin/systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp cp -r /var/cache/private/pikaur/aur_repos/mingw-w64-tools/last_installed.txt /var/cache/private/pikaur/aur_repos/mingw-w64-tools/PKGBUILD /var/cache/private/pikaur/aur_repos/mingw-w64-tools/.gitignore /var/cache/private/pikaur/aur_repos/mingw-w64-tools/.SRCINFO /var/cache/private/pikaur/build/mingw-w64-tools
🛴 debug: FileLock: Acquiring /root/.cache/pikaur_build_deps.lock...
🛴 debug: FileLock: Acquired /root/.cache/pikaur_build_deps.lock
🛴 debug: build: << _FILTER_BUILT_DEPS
🛴 debug: build:   self.all_deps_to_install=[]
🛴 debug: build:   all_provided_pkgnames={'mingw-w64-tools': 'mingw-w64-tools'}
🛴 debug: build: >> _FILTER_BUILT_DEPS
🛴 debug: build: << _FILTER_BUILT_DEPS
🛴 debug: build:   self.all_deps_to_install=[]
🛴 debug: build:   all_provided_pkgnames={'mingw-w64-tools': 'mingw-w64-tools'}
🛴 debug: build: >> _FILTER_BUILT_DEPS
🛴 debug: pacman: Discarding local cache...
Lese lokale Paketdatenbank...
🛴 debug: FileLock: Releasing /root/.cache/pikaur_build_deps.lock
🛴 debug: FileLock: Released /root/.cache/pikaur_build_deps.lock
=> /usr/sbin/systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/private/pikaur/build/mingw-w64-tools makepkg --packagelist
🛴 debug: build: Package names: InteractiveSpawn returned 0:
STDOUT:
/var/cache/private/pikaur/build/mingw-w64-tools/mingw-w64-tools-12.0.0-1-x86_64.pkg.tar.zst
/var/cache/private/pikaur/build/mingw-w64-tools/mingw-w64-tools-debug-12.0.0-1-x86_64.pkg.tar.zst


STDERR:
Running as unit: run-p104413-i104713.service
Finished with result: success
Main processes terminated with: code=exited, status=0/SUCCESS
Service runtime: 769ms
CPU time consumed: 863ms
Memory peak: 7.2M (swap: 0B)

🛴 debug: build: PKGDEST: None
🛴 debug: build: Full path: /var/cache/private/pikaur/build/mingw-w64-tools/mingw-w64-tools-12.0.0-1-x86_64.pkg.tar.zst, base path: mingw-w64-tools-12.0.0-1-x86_64.pkg.tar.zst
🛴 debug: build: New package path: /var/cache/pikaur/pkg/mingw-w64-tools-12.0.0-1-x86_64.pkg.tar.zst
🛴 debug: build: Found debug packages: [PosixPath('/var/cache/private/pikaur/build/mingw-w64-tools/mingw-w64-tools-debug-12.0.0-1-x86_64.pkg.tar.zst')]

🛴 Starte den Buildvorgang:
=> /usr/sbin/systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/private/pikaur/build/mingw-w64-tools -E GNUPGHOME=/etc/pacman.d/gnupg/ makepkg --force
Running as unit: run-p105293-i105593.service
Press ^] three times within 1s to disconnect TTY.
==> Making package: mingw-w64-tools 12.0.0-1 (Sat Feb  1 15:35:25 2025)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading mingw-w64-v12.0.0.tar.bz2...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   418  100   418    0     0    700      0 --:--:-- --:--:-- --:--:--   701
100   434  100   434    0     0    481      0 --:--:-- --:--:-- --:--:--   481
100   673  100   673    0     0    555      0  0:00:01  0:00:01 --:--:--  2353
100   415  100   415    0     0    227      0  0:00:01  0:00:01 --:--:--   227
100  9.9M  100  9.9M    0     0   956k      0  0:00:10  0:00:10 --:--:-- 1284k
  -> Downloading mingw-w64-v12.0.0.tar.bz2.sig...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   426  100   426    0     0   1399      0 --:--:-- --:--:-- --:--:--  1396
100   442  100   442    0     0    723      0 --:--:-- --:--:-- --:--:--   723
100   685  100   685    0     0    746      0 --:--:-- --:--:-- --:--:--   746
100   427  100   427    0     0    370      0  0:00:01  0:00:01 --:--:--   370
100   148  100   148    0     0     80      0  0:00:01  0:00:01 --:--:--   227
==> Validating source files with sha256sums...
    mingw-w64-v12.0.0.tar.bz2 ... Passed
    mingw-w64-v12.0.0.tar.bz2.sig ... Skipped
==> Verifying source file signatures with gpg...
    mingw-w64-v12.0.0.tar.bz2 ... FAILED (unknown public key 93BDB53CD4EBC740)
==> ERROR: One or more PGP signatures could not be verified!
Finished with result: exit-code
Main processes terminated with: code=exited, status=1/FAILURE
Service runtime: 13.563s
CPU time consumed: 1.601s
Memory peak: 18.8M (swap: 0B)

Ausführung des Befehls '/usr/sbin/systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/private/pikaur/build/mingw-w64-tools -E GNUPGHOME=/etc/pacman.d/gnupg/ makepkg --force' ist fehlgeschlagen.
🛴 debug: prompt: Gonna get input from user...
🛴 debug: FileLock: Acquiring /root/.cache/pikaur_prompt_521572.lock...
🛴 debug: FileLock: Acquired /root/.cache/pikaur_prompt_521572.lock
🛴 debug: prompt_nolock: Restoring TTY...
🛴 debug: prompt_nolock: Using standard input reader...
🛴 Versuchen, wiederherzustellen?
[E] Build nochmal versuchen
[p] überspringe PGP-Signaturprüfung
[c] überspringe Checksummen-Prüfung
[f] skip 'check()' function of PKGBUILD
[n] skip 'prepare()' function of PKGBUILD
[i] ignoriere Architektur
[d] entferne Build-Verzeichnis und versuche erneut
[b] PKGBUILD bearbeiten
------------------------
[u] überspringe Build dieses Pakets
[a] Bauen aller Pakete abbrechen

@d3vc44r
Copy link
Author

d3vc44r commented Feb 1, 2025

Permissions are following:

sudo ls -al /var/cache/private/pikaur/build/mingw-w64-tools
insgesamt 10268
drwxr-xr-x  4 nobody nobody     4096  1. Feb 15:39 .
drwxr-xr-x 73 nobody nobody     4096  1. Feb 15:35 ..
-rw-r--r--  1 nobody nobody       33  1. Feb 15:35 .gitignore
-rw-r--r--  1 nobody nobody       41  1. Feb 15:35 last_installed.txt
-rw-r--r--  1 nobody nobody 10474283  1. Feb 15:35 mingw-w64-v12.0.0.tar.bz2
-rw-r--r--  1 nobody nobody      148  1. Feb 15:35 mingw-w64-v12.0.0.tar.bz2.sig
d--x--x--x  2 nobody nobody     4096  1. Feb 15:39 pkg
-rw-r--r--  1 nobody nobody     1566  1. Feb 15:35 PKGBUILD
drwxr-xr-x  4 nobody nobody     4096  1. Feb 15:39 src
-rw-r--r--  1 nobody nobody      665  1. Feb 15:35 .SRCINFO

@actionless
Copy link
Owner

Pikaur v1.32

first, try if you could still reproduce it in pikaur-git package

@actionless
Copy link
Owner

[build]DynamicUsers = root
Dynamic Users feature will be disabled in the upcoming releases.
Consider either calling Pikaur from your actual user account without sudo, or creating pikaur user and specifying its UserId in Pikaur config
and set DynamicUsers to never

second, complete advices in the error message

@d3vc44r
Copy link
Author

d3vc44r commented Feb 10, 2025

Ticket can be closed, it looks like profile is broken.
I don't know what exactly is causing it.
Profile, .bashrc looks identical

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants