vn971 / rua

Build tool for Arch Linux providing control, review and jailed build options
GNU General Public License v3.0
424 stars 42 forks source link

`rua install` doesn't install #142

Closed nic-hartley closed 3 years ago

nic-hartley commented 3 years ago

TL;DR: Why is it called install if it doesn't install anything, ever, even to satisfy dependencies for other packages?

Quotes like these, and the command being called install, make me assume that rua install [whatever] will install it.

rua install pinta # install or upgrade a package

  1. Install them. If any more packages are left, go two steps up.

But phrases like these make me not so sure:

RUA is a build tool for ArchLinux, AUR

install: Download a package by name and build it in jail

And, of course, actually running the command, it doesn't install jack:

$ rua install pcre-static
# output elided, but the build succeeds
$ pacman -Qi pcre-static
error: package 'pcre-static' was not found
$ rua install qemu-user-static
# output elided, but after merging and okaying everything and a _very long_ build...
# ...including building both pcre-static and glib2-static...
==> Making package: qemu-user-static 5.1.0-1 (Thu 19 Nov 2020 10:48:59 AM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Missing dependencies:
  -> glib2-static
  -> pcre-static
==> ERROR: Could not resolve all dependencies.
Build failed with exit code 8 in /home/me/.cache/rua/build/qemu-user-static
$ pacman -Qi glib2-static pcre-static qemu-user-static
error: package 'glib2-static' was not found
error: package 'pcre-static' was not found
error: package 'qemu-user-static' was not found

I'm sure this is reproducible with smaller, quicker-to-build packages, but I'll leave that up to others to find or make.

So I have two questions.

  1. Is RUA supposed to install anything? I assume so, because it claims to be able to handle dependencies, and there's literally no way to do that without installing said dependencies. And it would make sense that rua install, uhh, installs the packages.
  2. If it is, how the hell do I get it to install anything? There's no documented options. Running with sudo fails, as I expected for something calling makepkg.

I can, of course, manually pull out dependencies, rua install them, then pacman -U, but handling that automatically is why I installed an AUR manager in the first place, so I flatly refuse to do it manually. If that's the "solution" I'll just go back to my home-rolled "AUR manager" (one mildly complex sh function) that at least didn't force me to sit through twenty minutes of building before telling me it didn't bother to install dependencies.

vn971 commented 3 years ago

Hi, rua install definitely should and does install things. It also does go over dependencies. Can you paste the full "elited output"?

vn971 commented 3 years ago

I'll reply on the rest later, now on phone.

nic-hartley commented 3 years ago

Hi, rua install definitely should and does install things. It also does go over dependencies. Can you paste the full "elited output"?

Not really. I had to omit it because it's more output than my terminal can display, and Firefox crashed when I tried to paste it in. But the output for rua cuts out at the ==> Finished making: line, without the ==> Installing package section that makepkg -si has.

The build output, besides the missing section and the RUA stuff at the beginning, is equivalent. Some stuff is reordered because of parallel builds, but that shouldn't affect whether RUA runs pacman -U at the end of the build.

vn971 commented 3 years ago

I think I need to know at least part of the log in order to understand why you're experiencing the issue. Can you paste the first/last lines before/after the package-specific build log? For example, first and last 10 lines of rua install pcre-static

nic-hartley commented 3 years ago
WARNING: your AUR repo is up-to-date.
If you continue, the build directory will be removed and the build will be re-run.
If you don't want that, consider resolving the situation manually,
for example:    rua builddir '/home/nxh/.cache/rua/build/pcre-static'

Reviewing "/home/nxh/.config/rua/pkg/pcre-static". 
[S]=run shellcheck on PKGBUILD, [D]=(identical to upstream, empty diff), [T]=run shell to edit/inspect, [O]=ok, use package. o
==> Making package: pcre-static 8.44-4 (Thu 19 Nov 2020 04:22:12 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading pcre-8.44.tar.bz2...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1540k  100 1540k    0     0   235k      0  0:00:06  0:00:06 --:--:--  342k
==> Validating source files with sha256sums...
    pcre-8.44.tar.bz2 ... Passed
==> Extracting sources...
  -> Extracting pcre-8.44.tar.bz2 with bsdtar
==> Starting build()...

...

==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "pcre-static"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: pcre-static 8.44-4 (Thu 19 Nov 2020 04:24:27 PM EST)
vn971 commented 3 years ago

Interesting, for me it ends up like this:

==> Leaving fakeroot environment.
==> Finished making: pcre-static 8.44-4 (2020-11-19T22:43:49 CET)
Package pcre-static-8.44-4-x86_64.pkg.tar.zst has no SUID files.
[E]=list executable files, [L]=list all files, [T]=run shell to inspect, [O]=ok, proceed. o

Packages need to be installed:

    pacman -U '/home/vasya/.local/share/rua/checked_tars/pcre-static/pcre-static-8.44-4-x86_64.pkg.tar.zst'

Enter S to `sudo` install it, or install manually and press M when done. ^C

Can you please share directory contents of ls -aFl ~/.cache/rua/build/pcre-static ? It seems that a package was built, but RUA doesn't see it. It is possibly due to unusual/unhandled package extension.

nic-hartley commented 3 years ago

Sure thing.

$ ls -aFl ~/.cache/rua/build/pcre-static
total 2084
drwxr-xr-x 4 nxh nxh    4096 Nov 19 16:24 ./
drwxr-xr-x 7 nxh nxh    4096 Nov 19 16:24 ../
-rw-r--r-- 1 nxh nxh 1577611 Nov 19 16:24 pcre-8.44.tar.bz2
-rw-r--r-- 1 nxh nxh  526248 Nov 19 16:24
pcre-static-8.44-4-x86_64.pkg.tar.zst
drwxr-xr-x 3 nxh nxh    4096 Nov 19 16:24 pkg/
-rw-r--r-- 1 nxh nxh    1159 Nov 19 16:24 PKGBUILD
drwxr-xr-x 3 nxh nxh    4096 Nov 19 16:24 src/
-rw-r--r-- 1 nxh nxh     500 Nov 19 16:24 .SRCINFO

Looks like it's the same filename.

vn971 commented 3 years ago

Interesting, that file should definitely have been picked up. I've mangled with upgrading the libraries today and include/update the logging code. Meanwhile, which version of rua are you using? Can you run rua --version ? Not seeing the .zst archives could theoretically be something related to really old versions of RUA, or some other reason that I'll look into then.

nic-hartley commented 3 years ago
$ rua --version
rua 0.17.15

I installed it through the AUR, not cargo install. I would hope that's not an incredibly old version but I can try cargo installing it too, to check.

vn971 commented 3 years ago

@nic-hartley that's all good, the only one newer is 0.17.16 that I just released few hours ago. I'll think a bit more about the issue.

nic-hartley commented 3 years ago

So for unrelated reasons, I had to reinstall my OS (TL;DR: I meant to just dual-boot Ubuntu, and I nuked my system in the process, oopsies). And now... rua works? Same distro, Manjaro, both times. Absolutely no idea what happened. Hooray? I'll leave the issue open in case you want to keep looking but the issue is inexplicably no longer affecting me, so

vn971 commented 3 years ago

Not sure what was going on, but we can't re-test the behavior anyway anymore, so I'll close until/unless anybody else will report the same behavior.