You are not logged in.

#1 2016-01-14 19:27:19

esa
Member
Registered: 2011-12-29
Posts: 143
Website

[solved] Installing another AUR package as dep from AUR package?

Heyas

I was wondering if one can install another AUR package as dependency?
In the like of the "# Bld info" section: (scroll down)

# Maintainer: Simon Arjuna Erat (sea), erat.simon@gmail.com
# Contributor: Simon Arjuna Erat (sea), erat.simon@gmail.com

#
#	Variables
#
	# Prj info
	_hkgname=vhs-master
	pkgname=vhs
	pkgdesc="Video Handler Script (VHS) aka ffmpeg-tui"
	license=('GPL3')
	groups=()
	
	# Pkg info
	arch=('any')
	pkgver=2.7.6
	pkgrel=0
	
	# Src info -- As the master branch is used for releases, this is considered 'stable'.
	url="https://github.com/sri-arjuna/vhs"
	source=(https://github.com/sri-arjuna/vhs/archive/master.zip)
md5sums=('17563c056fb4176f72a03c5e17ce5db0')
	
	# Bld info
	provides=('vhs')
	depends=( 'ffmpeg' )
	# Is there a way to install 'ffmpeg-full' and 'tui' from AUR?
#
#	Functions
#
	package() {
		cd ${srcdir}/${_hkgname}
		./configure --prefix=/usr --chroot=$pkgdir
		./make-install
	}

The reason why i ask is this, this package (vhs) requires TUI for its interface, with just using the ./configure;make;make install, this depency is installed without issues.
But when within PKGBUILD, it seems to call the items (package()) in a special way, so that the deps of vhs cant be installed due to missing rights, eventhough the package itself gets properly installed to /usr/bin.
And as you know, when calling makepkg as root, it will fail.

So i wonder if there's a trick i'm missing?

MOD EDIT: remove [closed] tag from topic -- thread has not been administratively closed.

Last edited by esa (2016-01-15 04:30:26)


Author of: TUI (Text User Interface for scripts), VHS (Video Handler Script, using ffmpeg) and YASSI (Yet Another Simple Script Installer)

Offline

#2 2016-01-14 20:24:31

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: [solved] Installing another AUR package as dep from AUR package?

May I ask why you don't simply add the package as a dependency to the `depends` array?


pkgshackscfgblag

Offline

#3 2016-01-14 20:44:24

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved] Installing another AUR package as dep from AUR package?

Why are there leading spaces before all of your lines? Please try to follow convention by starting with an existing PKGBUILD. Please quote path variables (srcdir,pkgdir) and any others that may possibly contain spaces.

As for your question, you simply add tui and whatever else to the depends array. The PKGBUILD is only for package meta-information: name, version, how to build it, how to install it, what it needs to work (dependencies).

Makepkg is only for building packages. It can resolve dependencies in the sync databases but that is not it's real job. It is up to the package manager to deal with dependency resolution.

Build and install everything manually to familiarize yourself with the process and make sure that you understand what you are doing. After that you can use an AUR helper to automate the process (bauerbill, aura, yaourt, ...).


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2016-01-14 22:46:27

esa
Member
Registered: 2011-12-29
Posts: 143
Website

Re: [solved] Installing another AUR package as dep from AUR package?

Because:

0 ~/prjs/vhs-aur $ grep dep PKGBUILD 
	depends=( 'tui' 'ffmpeg-full' )
0 ~/prjs/vhs-aur $ LC_ALL=C makepkg
==> Making package: vhs 2.7.6-0 (Thu Jan 14 23:44:46 CET 2016)
==> Checking runtime dependencies...
==> Missing dependencies:
  -> ffmpeg-full
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.

So adding it to the dep list, causes the pkg to not be able to build it.
Hence my question.

Last edited by esa (2016-01-14 22:55:28)


Author of: TUI (Text User Interface for scripts), VHS (Video Handler Script, using ffmpeg) and YASSI (Yet Another Simple Script Installer)

Offline

#5 2016-01-14 22:56:36

esa
Member
Registered: 2011-12-29
Posts: 143
Website

Re: [solved] Installing another AUR package as dep from AUR package?

This was confusing as tui was not listed as a missing dep (since it was installed), so i uninstalled tui and vhs alltogether.
After uninstalling tui, it shows clearly that both are missing / not working...

0 ~/prjs/vhs-aur $ rm -fr pkg/ src/ master.zip  vhs-2.7.6-0-any.pkg.tar.xz 
0 ~/prjs/vhs-aur $ grep dep PKGBUILD;LC_ALL=C makepkg -i
	depends=( 'tui' 'ffmpeg-full' )
==> Making package: vhs 2.7.6-0 (Thu Jan 14 23:52:50 CET 2016)
==> Checking runtime dependencies...
==> Missing dependencies:
  -> tui
  -> ffmpeg-full
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.

But both deps are on AUR:

Last edited by esa (2016-01-14 23:04:18)


Author of: TUI (Text User Interface for scripts), VHS (Video Handler Script, using ffmpeg) and YASSI (Yet Another Simple Script Installer)

Offline

#6 2016-01-14 23:11:08

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: [solved] Installing another AUR package as dep from AUR package?

That's because makepkg does not install dependencies on its own.
Usually you can pass `-s` to have pacman installing them, but in this case it will fail, since the packages in question are in the AUR. The solution is to install them manually yourself¹.

____
¹ ... or use AUR helpers, but like Xyne, I advise against its use until you've fully understood how makepkg and PKGBUILDs and the AUR work.

Last edited by ayekat (2016-01-14 23:11:24)


pkgshackscfgblag

Offline

#7 2016-01-14 23:29:29

esa
Member
Registered: 2011-12-29
Posts: 143
Website

Re: [solved] Installing another AUR package as dep from AUR package?

So basicly, the depends array can only contain packages from the regular repo?
In which case, the answer could have been given in the first answer being "no"?

It doesnt matter wether i pass -i or not, it doesnt build the package!

I just passed -i so i dont have to do another step (installing manually or rerun using -i then).

Do you see my using any aur helper?
What is what i'm doing now? Is it NOT doing it manually?

According to the wiki, i thought that makepkg was 'manually', please correct me if i'm wrong on this.

Last edited by esa (2016-01-14 23:30:47)


Author of: TUI (Text User Interface for scripts), VHS (Video Handler Script, using ffmpeg) and YASSI (Yet Another Simple Script Installer)

Offline

#8 2016-01-14 23:30:24

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved] Installing another AUR package as dep from AUR package?

Install tui and ffmpeg-full first, then build the package.

Also check makepkg's help and man page. There are options to automate installation of repo dependencies (but not AUR).

You've been warned about help vampirism before. All of this information is readily available on the wiki, the forum and elsewhere online. Please read up on makepkg, PKGBUILDs, ABS, AUR, pacman, etc.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#9 2016-01-15 00:13:28

esa
Member
Registered: 2011-12-29
Posts: 143
Website

Re: [solved] Installing another AUR package as dep from AUR package?

Currently (since xmas) under the influence of painkillers (backspine)

Sorry that i'm confused that the "depends", needs to be installed in order to build the package.
I'm comming from rpm, which dont need to have packages installed required to install/run the package, but the dependcies are required when one wants to install them.

/closed

1 ~/prjs/vhs-aur $ grep dep PKGBUILD;LC_ALL=C makepkg -cd
	depends=( 'tui' 'ffmpeg-full' )
==> Making package: vhs 2.7.6-0 (Fri Jan 15 00:45:42 CET 2016)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
  -> Downloading master.zip...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   119    0   119    0     0    133      0 --:--:-- --:--:-- --:--:--   133
100  700k    0  700k    0     0   150k      0 --:--:--  0:00:04 --:--:--  258k
==> Validating source files with md5sums...
    master.zip ... Passed
==> Extracting sources...
  -> Extracting master.zip with bsdtar
==> Entering fakeroot environment...
==> Starting package()...
Cloning into 'tui-master'...
remote: Counting objects: 5841, done.
remote: Total 5841 (delta 0), reused 0 (delta 0), pack-reused 5841
Receiving objects: 100% (5841/5841), 4.50 MiB | 821.00 KiB/s, done.
Resolving deltas: 100% (4405/4405), done.
Checking connectivity... done.
+ cd tui-master
+ ./make-install-all
mkdir: cannot create directory '': No such file or directory
cp: cannot create regular file '/etc/tui.conf': Permission denied
cp: cannot create regular file '/usr/bin/tui': Permission denied
cp: cannot create regular file '/usr/bin/tui-asroot': Permission denied
cp: cannot create regular file '/usr/bin/tui-bgjob': Permission denied
cp: cannot create regular file '/usr/bin/tui-bgjob-mgr': Permission denied
cp: cannot create regular file '/usr/bin/tui-bol-dir': Permission denied
cp: cannot create regular file '/usr/bin/tui-bol-gui': Permission denied
cp: cannot create regular file '/usr/bin/tui-bol-root': Permission denied
cp: cannot create regular file '/usr/bin/tui-browser': Permission denied
cp: cannot create symbolic link '/usr/bin/tui-cat': Permission denied
cp: cannot create regular file '/usr/bin/tui-conf-editor': Permission denied
cp: cannot create regular file '/usr/bin/tui-conf-get': Permission denied
cp: cannot create regular file '/usr/bin/tui-conf-set': Permission denied
cp: cannot create regular file '/usr/bin/tui-cp': Permission denied
cp: cannot create regular file '/usr/bin/tui-dd': Permission denied
cp: cannot create regular file '/usr/bin/tui-download': Permission denied
cp: cannot create regular file '/usr/bin/tui-echo': Permission denied
cp: cannot create regular file '/usr/bin/tui-edit': Permission denied
cp: cannot create regular file '/usr/bin/tui-filemgr': Permission denied
cp: cannot create regular file '/usr/bin/tui-ftp': Permission denied
cp: cannot create regular file '/usr/bin/tui-header': Permission denied
cp: cannot create regular file '/usr/bin/tui-install': Permission denied
cp: cannot create regular file '/usr/bin/tui-list': Permission denied
cp: cannot create regular file '/usr/bin/tui-log': Permission denied
cp: cannot create regular file '/usr/bin/tui-mv': Permission denied
cp: cannot create regular file '/usr/bin/tui-new-browser': Permission denied
cp: cannot create regular file '/usr/bin/tui-new-manpage': Permission denied
cp: cannot create regular file '/usr/bin/tui-new-script': Permission denied
cp: cannot create regular file '/usr/bin/tui-press': Permission denied
cp: cannot create regular file '/usr/bin/tui-print': Permission denied
cp: cannot create symbolic link '/usr/bin/tui-printf': Permission denied
cp: cannot create regular file '/usr/bin/tui-printfile': Permission denied
cp: cannot create regular file '/usr/bin/tui-progress': Permission denied
cp: cannot create regular file '/usr/bin/tui-read': Permission denied
cp: cannot create regular file '/usr/bin/tui-rnd': Permission denied
cp: cannot create regular file '/usr/bin/tui-select': Permission denied
cp: cannot create regular file '/usr/bin/tui-status': Permission denied
cp: cannot create regular file '/usr/bin/tui-str-bol-conv': Permission denied
cp: cannot create regular file '/usr/bin/tui-str-extension': Permission denied
cp: cannot create regular file '/usr/bin/tui-str-genfilename': Permission denied
cp: cannot create regular file '/usr/bin/tui-str-hash': Permission denied
cp: cannot create regular file '/usr/bin/tui-str-usb': Permission denied
cp: cannot create regular file '/usr/bin/tui-tar': Permission denied
cp: cannot create regular file '/usr/bin/tui-terminal': Permission denied
cp: cannot create regular file '/usr/bin/tui-title': Permission denied
cp: cannot create regular file '/usr/bin/tui-typewriter': Permission denied
cp: cannot create regular file '/usr/bin/tui-wait': Permission denied
cp: cannot create regular file '/usr/bin/tui-web': Permission denied
cp: cannot create regular file '/usr/bin/tui-yesno': Permission denied
cp: cannot create regular file '/usr/bin/tuirc': Permission denied
cp: cannot create directory '/etc/conf.tui': Permission denied
cp: cannot create regular file '/etc/tuirc': Permission denied
cp: cannot create directory '/usr/share/tui/conf.home': Permission denied
cp: cannot create directory '/usr/share/tui/lists': Permission denied
cp: cannot create directory '/usr/share/tui/samples': Permission denied
mkdir: cannot create directory '//usr/share/doc/tui': Permission denied
cp: target '/usr/share/doc/tui' is not a directory
cp: cannot create regular file '/usr/share/doc/tui': Permission denied
cp: cannot create regular file '/etc/bash_completion.d/tui': Permission denied
mkdir: cannot create directory '/etc/tui': Permission denied
mv: cannot stat '/etc/conf.tui/*': No such file or directory
==> Tidying install...
  -> Purging unwanted files...
  -> Removing libtool files...
  -> Removing static library files...
==> WARNING: Package contains reference to $pkgdir
  -> Compressing man and info pages...
  -> Stripping unneeded symbols from binaries and libraries...
==> Creating package "vhs"...
  -> Generating .PKGINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: vhs 2.7.6-0 (Fri Jan 15 00:46:00 CET 2016)
==> Installing package vhs with pacman -U...
loading packages...
resolving dependencies...
warning: cannot resolve "tui", a dependency of "vhs"
warning: cannot resolve "ffmpeg-full", a dependency of "vhs"
:: The following package cannot be upgraded due to unresolvable dependencies:
      vhs

:: Do you want to skip the above package for this upgrade? [y/N] ^C
Interrupt signal received


==> ERROR: Aborted by user! Exiting...

130 ~/prjs/vhs-aur $ 

So i figured i'd need a workaround, or am doing something wrong.. hence this thread.
I assume, you could solve this in 10 secs, but leading me to the wiki which doesnt cover something like the above is much easier.

Last edited by esa (2016-01-15 01:07:33)


Author of: TUI (Text User Interface for scripts), VHS (Video Handler Script, using ffmpeg) and YASSI (Yet Another Simple Script Installer)

Offline

#10 2016-01-15 00:25:16

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved] Installing another AUR package as dep from AUR package?

Please don't use [Closed] it denotes a locked thread.

Having said that, I have reviewed this and I am still not sure what your issue is. As Xyne explained in post #3, makepkg just builds the package in the PKGBUILD, managing the depends is eiter pacman's job (if they are in the repos and you pass the -s switch) or the job of the person installing the AUR package. Your PKGBUILD just notes that fact, it isn't your job to try and automate the build of a second (non-split) package from within the PKBUILD.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2016-01-15 00:37:03

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved] Installing another AUR package as dep from AUR package?

  • Yeah, I can solve this in 10 seconds but I'm trying to show you how you can solve it in 10 seconds and why what you're doing is wrong.

  • I mentioned vampirsm because you have been warned about it in the past. You do not seem to be carefully reading what is posted. The fact that your last post includes the "nodeps" flag for makepkg makes it clear that you have no idea what you're doing. Pain meds do not excuse that. Wait until they wear off and try again.

  • Using your own arbitrary indentation system that defies all current conventions does not improve readability for anyone but yourself. If everyone did that it would be a nightmare. You are not a special snowflake and neither is your PKGBUILD.

  • You do not build and install dependencies within the PKGBUILD. That's not what it's supposed to do. Again, use the "depends" array.

  • For each dependency that doesn't exist, create a separate PKGBUILD to build and install that package first. If that package has deps that don't exist, create them. Repeat until you reach the bottom of the tree then work your way back up. Yes, this is tedious if there are many dependencies in the AUR. The only way around that is with an AUR helper.

  • Makepkg, however, can resolve dependencies in the repos with the "-s" flag, usually used along with "-r" to clean up build deps afterwards while keeping runtime deps. Again, read the makepkg help. It's short and clear.

  • Until all of this is clear, your contributions will do more damage than good. Seriously, trying to install dependencies directly through the PKGBUILD functions can break systems by overwriting existing file and it will leave clutter that is not tracked by Pacman. Such a PKGBUILD will be deleted on sight if it is uploaded to the AUR. This is probably the main reason that makepkg is not allowed to run as root

$ sudo makepkg
==> ERROR: Running makepkg as root is not allowed as it can cause permanent,
catastrophic damage to your system.

My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#12 2016-01-15 00:40:04

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: [solved] Installing another AUR package as dep from AUR package?

esa wrote:

I'm comming from rpm, which dont need to have packages installed required to install/run the package, but the dependcies are required when one wants to install them.

Ignoring the surrounding emotional outburst, this is a valid point, though: makepkg should not require runtime dependencies for building a package; pacman is perfectly capable of handling that job during the installation. I got a PatchesWelcome™ response on #archlinux, so right now I'm trying to get a "rundepends" array baked into makepkg.


pkgshackscfgblag

Offline

#13 2016-01-15 00:53:00

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [solved] Installing another AUR package as dep from AUR package?

ayekat wrote:

Ignoring the surrounding emotional outburst, this is a valid point, though: makepkg should not require runtime dependencies for building a package; pacman is perfectly capable of handling that job during the installation. I got a PatchesWelcome™ response on #archlinux, so right now I'm trying to get a "rundepends" array baked into makepkg.

All packages in the depends array are assumed to be both runtime and buildtime dependencies to avoid duplication, e.g if foo needs bar and baz to run, and baz and kux to build, the arrays will be

depends=(bar baz)
makedepends=(kux)

At some point I complained about that too but that's how it is. It's particularly bad for apps with huge, separate data packages if you just want to build them without installing them. There are ways to work around that but they're unorthodox and prone to errors.

But hey, I also think package metadata in Bash files that you have to source is a horrible idea and I've ranted against that too. There is a lot that could be better, but we work with what we've got.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#14 2016-01-15 01:08:58

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: [solved] Installing another AUR package as dep from AUR package?

Xyne wrote:

All packages in the depends array are assumed to be both runtime and buildtime dependencies to avoid duplication, e.g if foo needs bar and baz to run, and baz and kux to build, the arrays will be

depends=(bar baz)
makedepends=(kux)

Yes, what I'm currently trying to do is to change that to

rundepends=(bar)
depends=(baz)
makedepends=(kux)

This would still allow to specify the packages without duplication, but the changes made to makepkg would be rather small (and it's also backwards-compatible). Packages in the `rundepends` array would still be listed in the `depend` array in the .PKGINFO, but not be used for installing the dependencies before building the package.

But hey, I also think package metadata in Bash files that you have to source is a horrible idea and I've ranted against that too.

On that matter I've lost my hope, so I don't start ranting about that.

EDIT I fear I'm being impolite, so I'll stop posting.

Last edited by ayekat (2016-01-15 01:11:45)


pkgshackscfgblag

Offline

#15 2016-01-15 01:19:45

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: [solved] Installing another AUR package as dep from AUR package?

ayekat wrote:
Xyne wrote:

All packages in the depends array are assumed to be both runtime and buildtime dependencies to avoid duplication, e.g if foo needs bar and baz to run, and baz and kux to build, the arrays will be

depends=(bar baz)
makedepends=(kux)

Yes, what I'm currently trying to do is to change that to

rundepends=(bar)
depends=(baz)
makedepends=(kux)

This would still allow to specify the packages without duplication, but the changes made to makepkg would be rather small (and it's also backwards-compatible). Packages in the `rundepends` array would still be listed in the `depend` array in the .PKGINFO, but not be used for installing the dependencies before building the package.

I have said patches welcome.  It is not something I need so is at the bottom of my priority list, but I do review anything sent to the pacman list...

But hey, I also think package metadata in Bash files that you have to source is a horrible idea and I've ranted against that too.

On that matter I've lost my hope, so I don't start ranting about that.

EDIT I fear I'm being impolite, so I'll stop posting.

All the info displayed in the AUR is not from sourcing the file...   makepkg-5.0 will have a --printsrcinfo that will give you a file that is easy to parse (and is included in source tarballs).

Offline

#16 2016-01-15 04:30:12

esa
Member
Registered: 2011-12-29
Posts: 143
Website

Re: [solved] Installing another AUR package as dep from AUR package?

Removed the emotional outburst now for forum 'sanity' and as those 'targeted' have read it.

@ jasonwryan : Didnt want to put 'solved' as my issue isnt, and i didnt had the feeling to get any further help as i was accused of beeing a vampire. Next time 'ill put [vampire], if that is any better?
@ ayekat : ty

Ok, so then i'm trying to describe my package situation.

The 'configure' VHS uses provides a toggle to install TUI if it is not installed on the machine.

That toggle seems to be the cause of the issue, as you see in the code block of #9
Allthough it installs TUI only during 'make install' of VHS, it fails to install it (nothing to be compiled!)
KIS was mind, for the lazy end user, and (OT: because TUI hasnt made it to GNU yet due to lacking feedback of users, and therefor) is not available in the default (or third party) repos of ANY distro/flavor.

------

I didnt want to update the PKGBUILD until i understood/solved the issue.
I had added tui as dep once, and when checking if the upstream was really 'proper' as i wanted to refer to it, figured tui wasnt listed in deps.

As i just uploaded the 'proper' (without idention, and just added tui as dep again) PKGBUILD for VHS, and then installed using yaourt, it started to pull in TUI's PKGBUILD.

You know, i'm used to local testing, so i didnt expect a different behaviour. (and didnt understand YOU because of missing experience/wrong interpretation)

But now i understand (partialy only, to be honest) why you said can be done with aur-helpers, but me should not use them.

-----

I would consider this as /solved by now.
Sorry for the trouble and thank you for your patience and understanding.

EDIT:
@ Ayekat, i'd say it is still on topic, (edit2) specialy as otherwise Allen wouldnt say he'd welcome patches on the subject wink

Last edited by esa (2016-01-15 04:35:34)


Author of: TUI (Text User Interface for scripts), VHS (Video Handler Script, using ffmpeg) and YASSI (Yet Another Simple Script Installer)

Offline

#17 2016-01-15 18:26:26

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [solved] Installing another AUR package as dep from AUR package?

Chances are if you are building an AUR package, you want to install it anyway...

If it bothers you that much, you could always move the depends to the package() function, so it won't be included as a makedepends.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB