You are not logged in.

#1 2016-06-13 22:30:17

dakota
Member
Registered: 2016-05-20
Posts: 280

[SOLVED] Recommended method to maintain packages installed from AUR?

I have only a few packages installed from the AUR and they rarely update.

I have installed these packages using the procedure outlined in the Arch User Repository page.

Installing packages from the AUR is a relatively simple process. Essentially:
    1. Acquire the tarball which contains the PKGBUILD and possibly other required files, like systemd units and patches (but often not the actual code).
    2. Extract the tarball (preferably in a directory set aside just for builds from the AUR) with tar -xvf pkgname.tar.gz.
    3. Verify that the PKGBUILD and accompanying files are not malicious or untrustworthy.
    4. Run makepkg -sri in the directory where the files are saved. This will download the code, resolve the dependencies with pacman, 
       compile it, package it, install the package, and finally remove the build-time dependencies, which are no longer needed.

... although I think I used makepkg -s instead of -sri. wink

I gather the recommended approach is to maintain these packages manually... (at least until I become comfortable with the process)?

However, I am having trouble finding the correct procedure* to use. Could someone please point me in the correct direction?

* For example

  • Would I use the exact same procedure I used to create the original package?

  • If there is a problem, would I be able to 'downgrade' to a previous version?

  • And, if so, would pacman manage the location of the previous versions, or would I manually do this?

  • Do I need to remove old packages with pacman before installing an upgraded package?

Cheers,
dakota

Last edited by dakota (2016-06-14 00:46:41)


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

#2 2016-06-13 23:31:32

mis
Member
Registered: 2016-03-16
Posts: 234

Re: [SOLVED] Recommended method to maintain packages installed from AUR?

dakota wrote:

I gather the recommended approach is to maintain these packages manually... (at least until I become comfortable with the process)?

dakota wrote:

[*]Would I use the exact same procedure I used to create the original package?[/*]

It's not a bad idea, and when you are comfortable doing it manually you could switch to an AUR helper

dakota wrote:

[*]If there is a problem, would I be able to 'downgrade' to a previous version?[/*]

Only if you have saved the old package somewhere. If not there is the option to recreate it with bacman before you install the new one.

dakota wrote:

[*]And, if so, would pacman manage the location of the previous versions, or would I manually do this?[/*]

You have to do it manually.

dakota wrote:

[*]Do I need to remove old packages with pacman before installing an upgraded package?[/*]

No

Last edited by mis (2016-06-13 23:43:31)

Offline

#3 2016-06-14 00:07:27

dakota
Member
Registered: 2016-05-20
Posts: 280

Re: [SOLVED] Recommended method to maintain packages installed from AUR?

Thank you very much!

I suspected those were the answers, but I didn't actually see them written down anywhere... wink

mis wrote:
dakota wrote:

Do I need to remove old packages with pacman before installing an upgraded package?

No

How does pacman do this?

  • Does each package in the official repositories and in the AUR have a unique pkgname?

  • And, if so, is it the responsibility of the person who creates the package to make sure the name is truly unique?

  • Does pacman get the package name by looking in the .SRCINFO file in directory from where the makepkg command was issued?

Cheers,


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

#4 2016-06-14 00:31:14

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [SOLVED] Recommended method to maintain packages installed from AUR?

Does each package in the official repositories and in the AUR have a unique pkgname?

Yes, they should be unique and it would be a bug if they are not unique.

And, if so, is it the responsibility of the person who creates the package to make sure the name is truly unique?

Yes.

Does pacman get the package name by looking in the .SRCINFO file in directory from where the makepkg command was issued?

The package name can be found in the PKGBUILD file.

Offline

#5 2016-06-14 00:46:06

dakota
Member
Registered: 2016-05-20
Posts: 280

Re: [SOLVED] Recommended method to maintain packages installed from AUR?

Thank you very much!


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

#6 2016-06-14 00:57:29

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

Re: [SOLVED] Recommended method to maintain packages installed from AUR?

I think mis covered it pretty well, but steps 1 and 2 need not even apply anymore.  Now the process is simply 1. git clone the aur repo for the package, and 2. cd into it and run makepkg.

If you've done that, then keep the build directory around.  To upgrade then just cd into it, git pull, and run makepkg again.


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

Offline

#7 2016-06-25 06:22:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Recommended method to maintain packages installed from AUR?

Set PKGDEST in /etc/makepkg.conf to save the created package there. There also is SRCPKGDEST for the sources.
TAKEOUTTHETRASH has not been implemented yet.

Offline

Board footer

Powered by FluxBB