You are not logged in.

#1 2020-05-02 18:16:38

vPzZ
Member
Registered: 2020-05-02
Posts: 3

Aur package installing error

I installed the arch and I need to sync my google drive files for my files. I have no experience with Arch but I am determined I want to use it for a long time. I always get the same error after the "makepkg -si" command while trying to install the aur package for Sync. It gives this error for all packages. I would be glad if you could help me on what to do

[turta@vPzZ ~]$ git clone https://aur.archlinux.org/drivesync.git
Cloning into 'drivesync'...
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 22 (delta 1), reused 22 (delta 1), pack-reused 0
Unpacking objects: 100% (22/22), 5.91 KiB | 864.00 KiB/s, done.
[turta@vPzZ ~]$ ls
apps  Desktop  Downloads  drivesync  yay
[turta@vPzZ ~]$ cd drivesync/
[turta@vPzZ drivesync]$ ls
drivesync  PKGBUILD
[turta@vPzZ drivesync]$ makepkg -si
==> Making package: drivesync 1.4.0-2 (Sat 02 May 2020 09:09:25 PM +03)
==> Checking runtime dependencies...
==> Installing missing dependencies...
[sudo] password for turta:
turta is not in the sudoers file.  This incident will be reported.
==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> ruby>=2.5
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.

Offline

#2 2020-05-02 18:22:31

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 340
Website

Re: Aur package installing error

This part of the output is a factor

==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> ruby>=2.5

thats an old version of ruby,try edit the pkgbuild to use current ruby version.

Disregard my  post, i notice ruby2.5 is indeed in AUR,sorry for noise

Last edited by cirrus (2020-05-02 18:34:48)

Offline

#3 2020-05-02 18:28:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Aur package installing error

Welcome to the forums.  Thank you for clearly posting the relevant output.  But a couple logistical forum points: 1) please do not use bold for all content.  Just use normal text.  You can use bold for emphasis or highlighting, but using it for everything makes it look like shouting.  2) please edit your post to change out the "quote" tags with "code" tags.

On the issue at hand, the error seems self-explanatory.  It looks like you have not configured sudo.  I beleive makepkg will fallback to 'su' if 'sudo' is not available (e.g., not installed) but it seems if it is installed, your user must be allowed to use it, or installing the dependencies fails as you have observed.

If you plan to use sudo (you most likely should), then configure it according to the wiki.  If for some reason you'd like to avoid using sudo, then remove the sudo package so makepkg will fallback on su.

EDIT: cirrus, the version is fine.  Ruby in the repos satisfies the listed requirement.  Changing the PKGBUILD will not help the present error.

Last edited by Trilby (2020-05-02 18:30:37)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2020-05-02 18:42:43

vPzZ
Member
Registered: 2020-05-02
Posts: 3

Re: Aur package installing error

Thank you for the reminders Trilby.

I updated Ruby and tried again, but this time there is a different error

[turta@vPzZ drivesync]$ makepkg -si
==> Making package: drivesync 1.4.0-2 (Sat 02 May 2020 09:29:45 PM +03)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading 1.4.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   128  100   128    0     0     50      0  0:00:02  0:00:02 --:--:--    50
100 12878    0 12878    0     0   2267      0 --:--:--  0:00:05 --:--:--  5843
  -> Found drivesync
==> Validating source files with sha512sums...
    1.4.0.tar.gz ... Passed
    drivesync ... Passed
==> Extracting sources...
  -> Extracting 1.4.0.tar.gz with bsdtar
==> Starting build()...
WARNING:  You don't have /home/turta/.gem/ruby/2.7.0/bin in your PATH,
          gem executables will not run.
Successfully installed bundler-1.17.1
1 gem installed
/home/turta/apps/drivesync/PKGBUILD: line 22: bundle: command not found
==> ERROR: A failure occurred in build().
    Aborting...

Line22 :

bundle install --no-cache --deployment

Offline

#5 2020-05-02 18:46:04

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 340
Website

Re: Aur package installing error

Thank you Trilby, i edited my post requesting OP ignore my ranting. :mad

Offline

#6 2020-05-02 18:50:43

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 340
Website

Re: Aur package installing error

bundler fails to run as you have not set path add the rubygem/bin to  your path as pacman advised.

Last edited by cirrus (2020-05-02 18:55:15)

Offline

#7 2020-05-02 19:01:52

vPzZ
Member
Registered: 2020-05-02
Posts: 3

Re: Aur package installing error

cirrus wrote:

bundler fails to run as you have not set path add the rubygem/bin to  your path as pacman advised.

How can I do that ?

Offline

#8 2020-05-02 19:16:43

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 340
Website

Re: Aur package installing error

How can I do that ?

in my ~/.profile i have

path=("/home/cirrus/.gem/ruby/2.7.0/bin:$path[@]") 

depending on DE "export PATH=$PATH:/home/$USER/.gem/ruby/2.7.0/bin" may need to be put in your shellsrc IE: ~/.bashrc or ~/.zshrc

a reboot may be required for ~/.profile to be read

that will make it permanant,for a quick way do 'export PATH="/home/$USER/.gem/ruby/2.7.0/bin:$PATH ' in terminal emulator then retry makepkg -si on same terminal emulator

Last edited by cirrus (2020-05-02 19:34:43)

Offline

#9 2020-05-02 19:30:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Aur package installing error

NO NO NO.

A PKGBUILD should not touch the home directory.  If the PKGBUILD requires that, burn it!

The only problem here seems to be a missing dependency on ruby-bundler.  After installing that, I was able to build the package just fine without any nonsense of manipulating path and doing anything in my user's home directory.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2020-05-02 19:39:13

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 340
Website

Re: Aur package installing error

Trilby i stand corrected .. again i thought drivesync pkg was a rubygem and rubygems are generally placed in ~/.gem/ruby/x.x.x/bin and assumed he would need the path to run the executable.i best go for a sleep smile

Offline

#11 2020-05-02 19:39:28

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,860
Website

Re: Aur package installing error

Mod note: Moving to AUR Issues


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#12 2020-05-02 19:52:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Aur package installing error

cirrus wrote:

I thought drivesync pkg was a rubygem and rubygems are generally placed in ~/.gem/ruby/x.x.x/bin

I don't know anything about ruby or gems, but by analogy to python, you can either install in your home directory (using pip or gem as a regular user) or you can install systemwide using a PKGBUILD.  You must pick one (almost always the latter is preferrable).  But what you should never do is use a package or PKGBUILD to attempt to put anything (or even access anything from the PKGBUILD) in the home directory.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#13 2020-05-02 19:54:30

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: Aur package installing error

Trilby as you point out it is incorrect in principal but the implementation also seems wrong as it does not split the output of gempath

    IFS=':' read -ra GEMPATH <<< "$(gem environment gempath)"
    for i in "${GEMPATH[@]}"; do
        PATH="$i/bin:$PATH"
    done

Offline

#14 2020-05-02 20:05:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Aur package installing error

Doesn't it?  That whole block of code seems promblematic, but it does successfully split the output into each element of path due to the IFS.

It looks like that was intended to find the binary 'bundle' either in the user's home directory gems or in the system-wide location.  But if this package requires 'bundle' it should require the package that provides 'bundle'.

Last edited by Trilby (2020-05-02 20:06:00)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#15 2020-05-02 20:11:46

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: Aur package installing error

That was a change I made to see if I could make the implementation work the original was:

    PATH="$(gem environment gempath):$PATH"

Offline

#16 2020-05-02 20:13:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Aur package installing error

Oh, yeah.  That's crap then smile

Actually, no, it seems fine:

$ gem environment gempath
/home/jmcclure/.gem/ruby/2.7.0:/usr/lib/ruby/gems/2.7.0

I don't know what it's intended to do ... I just looked at it in context, and I'd be much more worried about that 'gem install' command.

Last edited by Trilby (2020-05-02 20:17:05)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#17 2020-05-02 21:05:54

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: Aur package installing error

Ah in a clean chroot

gem environment gempath
build/.gem/ruby/2.7.0:/usr/lib/ruby/gems/2.7.0

While bundle as installed by gem install is build/.gem/ruby/2.7.0/bin/bundle so I split the path and appended /bin.
Without modifying the path the global bundle provided by ruby-bundle locates the correct bundle installed by gem somehow.
Remaining issue looks to be the file drivesync

#!/usr/bin/bash

GEM_PATH='/usr/share/drivesync/vendor/bundle/ruby/2.6.0/' ruby /usr/share/drivesync/drivesync.rb

ruby now is 2.7.0.
Edit:
This seems to work for build

build() {
    cd "$pkgname-$pkgver"
    sed -i 's|1.16.2|2.1.4|' Gemfile.lock
    bundle config set --local no-cache 'true'
    bundle config set --local deployment 'true'
    bundle install
}

Edit2:
Perhaps change package() to based on https://git.archlinux.org/svntogit/comm … ges/wpscan
Edit3:
The following is build tested only and based on the above PKGBUILD

# Maintainer: Daniel Popov (dan93bars@gmail.com)

pkgname=drivesync
pkgver=1.4.0
pkgrel=2
pkgdesc='Google Drive synchronization for Linux'
arch=('any')
url='https://github.com/MStadlmeier/drivesync'
license=('MIT')
depends=('ruby')
makedepends=('ruby-bundler')
source=("https://github.com/MStadlmeier/$pkgname/archive/$pkgver.tar.gz")
sha512sums=('9f08348ffeaf783832b817cda3616d9206492474767a2ffc772d6d7405af926c64f2e20c7e332d39d35156afa09d6388371469ba8c62b57642a92775a5de9a16')

prepare() {
  cd "$pkgname-$pkgver"
  sed -i 's|1.16.2|2.1.4|' Gemfile.lock
  bundle config set --local no-cache 'true'
  bundle config set --local deployment 'true'
  bundle config set --local path vendor/bundle
}

build() {
  cd "$pkgname-$pkgver"
  bundle install -j"$(nproc)"
}

package() {
  cd ${pkgname}-${pkgver}

  install -d "$pkgdir/opt/$pkgname"
  cp -ra --no-preserve=owner . "$pkgdir/opt/$pkgname"

  install -d "$pkgdir/usr/bin"
  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
BUNDLE_GEMFILE=/opt/$pkgname/Gemfile bundle exec ruby /opt/$pkgname/bin/$pkgname "\$@"
EOF
  chmod 755 "$pkgdir/usr/bin/$pkgname"

  install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
  install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
  find "$pkgdir" \( -name gem_make.out -or -name mkmf.log \) -delete
  rm -r "$pkgdir"/opt/$pkgname/vendor/bundle/ruby/*/cache
}

Last edited by loqs (2020-05-03 00:10:21)

Offline

Board footer

Powered by FluxBB