You are not logged in.

#1 2017-07-12 11:04:19

derrianHCN
Member
Registered: 2017-07-12
Posts: 3

[solved]install downloaded packages w/out PKGBUILD file included

Hello there this is derrick. I'm new to the forum. Nice to meet you all.

I've been trying to find the solution for this issue for a few nights now. I did search the forum, the web and of course the wiki. The wiki entry on AUR was really detailed and I learnt a lot nonetheless I'm still bothered by this problem:

I started off learning how to use pacman and after that been done I moved onto trying out AUR packages. Following the instructions on wiki I installed a few packages successfully, using the git clone and then makepkg -si. Notably all the files I downloaded and tried here all had a pkgbuild file coming along.

Then I git clone'd/downloaded another few packages like gdm3setup, upower and gnome-power-manager. They were either from github or the official site. But after I decompressed (if they were .tar.gz) and tried to installed them, I realized there were no pkgbuild files that came with the download. I was confused because there also were no trace of downloading their respective pkgbuild files from either github or the official site. Of course makepkg -si did not work hence I couldn't install them.

I tried to figure it out but I am really baffled here. This might seem dull - am I missing something here? Did I overlook the pkgbuild files that were available somewhere on github? Or Did I need to manually create them? I am aware that packages from AUR have pkgbuild files available. But I couldn't find the ones for mine. Yaourt worked though. But I'd like to get to the bottom of this because I move on to automatic installs.

Any help or suggestion would be appreciated. Thank you very much.

Derrick

Last edited by derrianHCN (2017-07-12 11:21:06)

Offline

#2 2017-07-12 11:09:58

phw
Member
Registered: 2013-05-27
Posts: 318

Re: [solved]install downloaded packages w/out PKGBUILD file included

This sounds like you did clone from upstream, and not the package files. The AUR contains just the files needed to package a software, that means at least a PKGBUILD file and sometimes a few supporting files (such as post install script, patches etc.). The PKGBUILD telss makepkg how to download and build the package using the original sources.

So e.g. for gdm3setup you have to clone the AUR repository https://aur.archlinux.org/gdm3setup.git . Cloning the upstream URL http://github.com/Nano77/gdm3setup will just give you the original source files of the software, but not the PKGBUILD.

Offline

#3 2017-07-12 11:13:20

phw
Member
Registered: 2013-05-27
Posts: 318

Re: [solved]install downloaded packages w/out PKGBUILD file included

And for upower and gnome-power-manager: Both are in the official repositories, so you can install them with pacman. No need for a PKGBUILD. If you are curious you can still see the PKGBUILD that was used to create the package by clicking on "Source Files" in the nox on the top right under "Package Actions" on the package page, e.g. https://www.archlinux.org/packages/extr … r-manager/

Offline

#4 2017-07-12 11:15:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,420

Re: [solved]install downloaded packages w/out PKGBUILD file included

The PKGBUILD  files in the AUR come from the AUR packager, this person doesn't necessarily have any affiliation with the project for which he provides the PKGBUILD for. If you go to the official site of a project it's very unlikely that they include a distribution specific file (the PKGBUILD that contains the instructions with which the official source is built into a pacman installable package). If any given software does not have an AUR package available chances that there exist a PKGBUILD file are also pretty slim, in which case you indeed would have to create your own. But as phw points out, all of the packages you mentioned so far are either in the official repositories or in the AUR, so you shouldn't reinvent the wheel.

Offline

#5 2017-07-12 11:16:48

derrianHCN
Member
Registered: 2017-07-12
Posts: 3

Re: [solved]install downloaded packages w/out PKGBUILD file included

phw wrote:

And for upower and gnome-power-manager: Both are in the official repositories, so you can install them with pacman. No need for a PKGBUILD. If you are curious you can still see the PKGBUILD that was used to create the package by clicking on "Source Files" in the nox on the top right under "Package Actions" on the package page, e.g. https://www.archlinux.org/packages/extr … r-manager/

Thanks for the information! So when I git clone something that doesn't come with a PKGBUILD, it means I got the wrong file(s), and I need to look somewhere else, either into the official repo, or the AUR, whence I will definitely find a PKGBUILD?

Thanks again for the kind input!

Offline

#6 2017-07-12 11:18:18

derrianHCN
Member
Registered: 2017-07-12
Posts: 3

Re: [solved]install downloaded packages w/out PKGBUILD file included

V1del wrote:

The PKGBUILD  files in the AUR come from the AUR packager, this person doesn't necessarily have any affiliation with the project for which he provides the PKGBUILD for. If you go to the official site of a project it's very unlikely that they include a distribution specific file (the PKGBUILD that contains the instructions with which the official source is built into a pacman installable package). If any given software does not have an AUR package available chances that there exist a PKGBUILD file are also pretty slim, in which case you indeed would have to create your own. But as phw points out, all of the packages you mentioned so far are either in the official repositories or in the AUR, so you shouldn't reinvent the wheel.

That makes a lot of sense. Thank you very much!

Offline

#7 2017-07-12 11:22:55

phw
Member
Registered: 2013-05-27
Posts: 318

Re: [solved]install downloaded packages w/out PKGBUILD file included

derrianHCN wrote:

Thanks for the information! So when I git clone something that doesn't come with a PKGBUILD, it means I got the wrong file(s), and I need to look somewhere else, either into the official repo, or the AUR, whence I will definitely find a PKGBUILD?

Thanks again for the kind input!

If you git clone something from a random source, e.g. github, it nearly never will include a PKGBUILD, see V1del answer.

Usually if you want to install on Arch look in this order:

1. See if it is in the official repositories. If it is, install it with pacman. There are no PKGBUILDs and manual downloading of packages involved in this case.

2. If it is not packaged in the official repositories, see if it is in the AUR. To install, clone the AUR Git Clone URL, not anything else. Those always contain a PKGBUILD you can use with makepkg

3. If it is also not in the AUR, you will have to install it from original sources. My suggestion is to create your own PKGBUILD in those cases (and best upload it to the AUR for others to use)

Offline

#8 2017-07-12 11:29:55

ua4000
Member
Registered: 2015-10-14
Posts: 402

Re: [solved]install downloaded packages w/out PKGBUILD file included

try in this order

1. use only official repository
2. if not found: choose another similar software from official repository, see here https://wiki.archlinux.org/index.php/Li … plications and the many sub categories
3. use AUR repository
4. download source code, create your own PKGBUILD

Offline

#9 2017-07-12 11:53:20

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

Re: [solved]install downloaded packages w/out PKGBUILD file included

To add an analogy, PKGBUILDs are often called recipes.  If you want an apple pie, you have a few options:

1) You can go to the groccer/bakery and buy a pre-made apple pie.  This would be using pacman to install pre-made packages from the repos.

2) If there are no apple pies in the local stores (or if they just don't suit your tastes), you can get a recipe out of a cookbook.  That recipe will just give you the instructions, it does not actually provide the ingredients: you need to go buy those separately.  But the recipe does list exactly what ingredients are needed, so this is trivial, you go to the groccery and buy exactly what it says you need.  Then you mix them up as instructed, and bake as instructed.  PKGBUILDS are the recipes, the AUR is our community-maintained cookbook.  There are no actual ingredients stored in the cookbook (no source files in the AUR) just instructions on what ingredients are needed.  Now this is also where makepkg is really cool: it's like your own live-in chef and personal shopper.  You get a recipe from the AUR, and you could manually download the sources and follow the PKGBUILD instructions step by step to build the software - but because we have makepkg, we instead just give the recipe to our live-in chef / personal shopper and say "go buy all these ingredients and make the pie as instructed in this recipe".  Makepkg does all that for you with one command (but following the analogy a bit too far, the -i flag turns it into a greedy chef who even eats the pie for you after it's baked!)

3) If there are no pies in the local stores and you can't even find a recipe for apple pie, then you're going to have to just go to the store, start finding all the ingredients, and figure out how to put them together on your own.  However, makepkg is still pretty cool here - instead of lots of trial and error with many different permutaitons messing up your kitchen and many trips to the store, you can just tinker with the recipe.  Try writing a recipe, give it to your personal chef and tell him to get to work.  Test out the results - if you're not happy, tweak the recipe and tell him to do it all again (with the -c flag he'll even clean your kitchen between each attempt!)

4) Take Carl Sagan's advice, and first invent the universe.

Note that in the situation you describe, you seem to have gone to the store, and purchased all the ingredients you thought you might need for an apple pie.  But when you got home you realized they didn't come with a recipe.  Of course they didn't - it's just a bag of apples, flour, sugar, butter ... no recipe will be found there.  You need to go look in your cookbook.


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

Offline

Board footer

Powered by FluxBB