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

[Error] PKGBUILD is not writeable #651

Closed
ratijas opened this issue Oct 12, 2020 · 7 comments · Fixed by #655
Closed

[Error] PKGBUILD is not writeable #651

ratijas opened this issue Oct 12, 2020 · 7 comments · Fixed by #655

Comments

@ratijas
Copy link
Contributor

ratijas commented Oct 12, 2020

Summary

Installing AUR *-git package produces warning from makepkg: "PKGBUILD is not writeable -- pkgver will not be updated". Thus, version won't get replaced with the latest revision, and the package will be "downgraded".

Description

First time noticed the warning while reinstalling package plasma5-applets-kde-githubissues-git^AUR:

WARNING: /var/cache/aura/vcs/plasma5-applets-kde-githubissues-git/plasma5-applets-kde-githubissues-git/PKGBUILD is not writeable -- pkgver will not be updated

I was working under root, naturally. I checked on that PKGBUILD file permissions, and turned out it was owned by root: -rw-r--r-- 1 root root. AFAIK, makepkg would drop priveledges while building packages, so that might have caused problems.

Expected behavior

Download & build packages without root priveledges, so that PKGBUILD is writable, and pkgver can be updated.

Actual behavior

  1. ==> WARNING: /var/cache/aura/vcs/plasma5-applets-kde-githubissues-git/plasma5-applets-kde-githubissues-git/PKGBUILD is not writeable -- pkgver will not be updated
  2. warning: downgrading package plasma5-applets-kde-githubissues-git (r143.c799c56-1 => r46.f7a5f56-2)
Full output
$ aura -Ax plasma5-applets-kde-githubissues-git
aura >>= Determining dependencies...
aura >>= AUR Packages:
plasma5-applets-kde-githubissues-git
aura >>= Continue? [Y/n] 
aura >>= Building plasma5-applets-kde-githubissues-git...
==> Making package: plasma5-applets-kde-githubissues-git r46.f7a5f56-2 (Mon Oct 12 23:25:15 2020)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating plasma-applet-githubissues git repo...
Fetching origin
==> Validating source files with md5sums...
    plasma-applet-githubissues ... Skipped
==> Extracting sources...
  -> Creating working copy of plasma-applet-githubissues git repo...
Reset branch 'makepkg'
==> Starting pkgver()...
==> WARNING: /var/cache/aura/vcs/plasma5-applets-kde-githubissues-git/plasma5-applets-kde-githubissues-git/PKGBUILD is not writeable -- pkgver will not be updated
==> Removing existing $pkgdir/ directory...
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "plasma5-applets-kde-githubissues-git"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: plasma5-applets-kde-githubissues-git r46.f7a5f56-2 (Mon Oct 12 23:25:17 2020)
loading packages...
warning: downgrading package plasma5-applets-kde-githubissues-git (r143.c799c56-1 => r46.f7a5f56-2)
resolving dependencies...
looking for conflicting packages...

Packages (1) plasma5-applets-kde-githubissues-git-r46.f7a5f56-2

Total Installed Size: 0.10 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n]

Alternatives

pacaur builds latest git version just fine. PKGBUILD's permissions are the same, owner is the regular user: -rw-r--r-- 1 ratijas users.

Related

#634

Version

$ aura -Qi aura
Name            : aura-bin
Version         : 3.1.9-1
Build Date      : Tue Sep 29 16:46:45 2020
@fosskers
Copy link
Owner

Thanks for reporting this. It seems that how we're approaching the management of git packages is flawed.

@fosskers
Copy link
Owner

I agree with your assessment here, the cloning/pulling should be done as the nonroot user. I'm double-checking the internals now.

@fosskers
Copy link
Owner

fosskers commented Oct 23, 2020

Some strange permissions floating around:

> pwd
/var/cache/aura/vcs/aura-git/aura-git
> la
total 5.8M
drwxr-xr-x 6 colin root  4.0K Aug 12 14:19 ./
drwxr-xr-x 3 colin root  4.0K Jun 10 10:39 ../
drwxr-xr-x 7 colin colin 4.0K Aug 12 14:18 aura-git/
-rw-r--r-- 1 colin colin 2.2M Aug 12 14:19 aura-git-3.1.5.r0.ga3aa9a1-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 colin colin 3.6M Jun 10 10:40 aura-git-v3.1.2.r0.g2b23198-1-x86_64.pkg.tar.xz
drwxr-xr-x 8 colin root  4.0K Aug 12 14:18 .git/
drwxr-xr-x 3 colin colin 4.0K Aug 12 14:19 pkg/
-rw-r--r-- 1 root  root  1.4K Aug 12 14:18 PKGBUILD
drwxr-xr-x 3 colin colin 4.0K Jun 10 10:39 src/
-rw-r--r-- 1 root  root   428 Aug 12 14:18 .SRCINFO
colin@yumi /v/c/a/v/a/aura-git (master)> 

Notice that the PKGBUILD and .SRCINFO have been taken over by root.

@fosskers
Copy link
Owner

fosskers commented Oct 23, 2020

Although in another package, we don't see that same issue:

> pwd
/var/cache/aura/vcs/readline-athame-git/readline-athame-git
> la
total 3.2M
drwxr-xr-x 7 colin root  4.0K Aug 12 14:01 ./
drwxr-xr-x 3 colin root  4.0K May 26 10:58 ../
drwxr-xr-x 7 colin colin 4.0K May 26 11:04 athame/
drwxr-xr-x 8 colin root  4.0K Aug 12 14:08 .git/
-rw-r--r-- 1 colin root   714 May 26 10:58 inputrc
drwxr-xr-x 3 colin colin 4.0K May 26 11:05 pkg/
-rw-r--r-- 1 colin root  2.3K Aug 12 14:01 PKGBUILD
-rw-r--r-- 1 colin colin 2.9M May 26 10:58 readline-8.0.tar.gz
-rw-r--r-- 1 colin colin   95 May 26 10:58 readline-8.0.tar.gz.sig
-rw-r--r-- 1 colin colin 324K May 26 11:05 readline-athame-git-8.0.0-1-x86_64.pkg.tar.xz
drwxr-xr-x 5 colin colin 4.0K May 26 11:04 src/
-rw-r--r-- 1 colin root   937 May 26 10:58 .SRCINFO
drwxr-xr-x 7 colin colin 4.0K May 26 11:04 vimbed/

@ratijas
Copy link
Contributor Author

ratijas commented Oct 23, 2020

That's certainly interesting. And then there's even a mix of user:group in there.

-rw-r--r-- 1 colin root 937 May 26 10:58 .SRCINFO

@fosskers
Copy link
Owner

@fosskers fosskers linked a pull request Oct 23, 2020 that will close this issue
@fosskers
Copy link
Owner

I believe I have it solved.

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

Successfully merging a pull request may close this issue.

2 participants