You are not logged in.

#1 2018-08-17 20:07:48

funkaddict
Member
Registered: 2018-08-13
Posts: 117

[SOLVED] How to correctly build, patch and install a package from AUR

Hey there,

indeed it's a beginner question. But still there are some things I want to make sure before I proceed. I am not sure if I am correct how to install spacefm, which has to be patched as there is a compatibility issue with new glibc.

So my procedure would be as follows:

As I read, it makes sense to have a folder where all packages from the AUR should be located. It makes sense to have that folder within my home directory.

So in

/home/user/packages/

I did

$ git clone https://aur.archlinux.org/spacefm.git
Cloning into 'spacefm'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 18 (delta 6), reused 7 (delta 0)
Unpacking objects: 100% (18/18), done.

Which downloaded the files to

 /home/user/packages/spacefm

Usually I'd do a

 makepkg -sic 

here now. But that would mean to build, resolve dependencies and install the package including dependencies. But I think I have first to build it, then fix it and then install it? So how would I proceed instead?

Last edited by funkaddict (2018-08-17 21:13:03)

Offline

#2 2018-08-17 20:13:03

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED] How to correctly build, patch and install a package from AUR

In this case the issue should already have been fixed https://aur.archlinux.org/cgit/aur.git/ … 2b6c25b55f
In the more general case Patching_packages#Applying_patches

Offline

#3 2018-08-17 20:47:37

funkaddict
Member
Registered: 2018-08-13
Posts: 117

Re: [SOLVED] How to correctly build, patch and install a package from AUR

loqs wrote:

In this case the issue should already have been fixed https://aur.archlinux.org/cgit/aur.git/ … 2b6c25b55f
In the more general case Patching_packages#Applying_patches

Oh, wow I didn't noticed these. Thank you!

Still I got two questions:

1. After cloning the files via git and making and installing via

 makepkg -sic 

The package stays located in the folder where I build it? That means that I have to keep that folder and its files, correct?

2. How does updating a package from the AUR works? Is it just the same as installing a new package, meaning cloning the new version from AUR, building and installing it? Do I have to uninstall the old package before? I am asking because in the pacman manual it reads that I can upgrade packages via

pacman -U

but I think that doesn't apply for packages from the AUR.

Offline

#4 2018-08-17 21:01:58

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED] How to correctly build, patch and install a package from AUR

cd packagename
git fetch
makepkg -sic

The source and PKGBUILD and built package stay in the folder you cloned it to,  the built package is installed but is not copied /var/cache/pacman/pkg.
You could delete the folder then clone again and install it a new as an alternative.  You do not need to uninstall the old AUR package,  makepkg internally calls `pacman -U` if -i is specified.

Offline

#5 2018-08-17 21:12:43

funkaddict
Member
Registered: 2018-08-13
Posts: 117

Re: [SOLVED] How to correctly build, patch and install a package from AUR

loqs wrote:
cd packagename
git fetch
makepkg -sic

The source and PKGBUILD and built package stay in the folder you cloned it to,  the built package is installed but is not copied /var/cache/pacman/pkg.
You could delete the folder then clone again and install it a new as an alternative.  You do not need to uninstall the old AUR package,  makepkg internally calls `pacman -U` if -i is specified.

Ok, that's very intersting. Thanks alot. I am having a look around if working with yaourt make sense for me or not. Anyway my Arch-learning curve is steeper than expected thanks to you guys in this forum.

Offline

#6 2018-08-17 21:21:37

Morganamilo
Package Maintainer (PM)
Registered: 2017-12-05
Posts: 77

Re: [SOLVED] How to correctly build, patch and install a package from AUR

loqs wrote:
cd packagename
git fetch
makepkg -sic

Surely you mean:

git pull

or

git fetch && git merge

Offline

#7 2018-08-17 21:33:41

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: [SOLVED] How to correctly build, patch and install a package from AUR

yes I meant  `git pull`

Offline

Board footer

Powered by FluxBB