You are not logged in.

#1 2012-07-04 06:41:03

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 144

Upgrading by compiling

Is there a tool for using ABS/makepkg to upgrade packages instead of using the binary packages provided by mirrors? Something like portmaster for FreeBSD?

Offline

#2 2012-07-04 11:26:17

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

Re: Upgrading by compiling

Offline

#3 2012-07-04 11:46:36

Psykorgasm
Member
Registered: 2011-11-24
Posts: 178

Re: Upgrading by compiling

You could use pbget + makepkg.

For example:

#!/bin/bash
 
cd ~/.abs 

{ echo ":: Searching for PKGBUILD updates..."
  pbget --upgradable --dir ~/.abs/upgrades; } &&
 
{ echo ":: Running makeworld..."
  makeworld -sicr ~/.abs upgrades/; } &&
 
{ echo ":: Removing source files..."
  rm -rf ~/.abs/upgrades/*; } &&
 
{ echo ":: Removing cache..."
  rm ~/.abs/*.pkg.tar.xz; } &&
 
{ echo ":: Removing makepkg log..."
  rm ~/.abs/makepkg.log; } &&
 
cat ~/.abs/build.log
 
# rm ~/.abs/build.log

I wouldn't really recommend it, I had a few breakages and causes to recompile a load of stuff, a couple of complete system recompiles. I don't use it any more, but it went fairly well for a few months.
Edit: The removing of packages is because it assumes you have your makepkg.conf set up correctly. It is also a fairly rough script but hopefully you get the idea and can modify it to suit.

Last edited by Psykorgasm (2012-07-04 11:53:10)

Offline

#4 2012-07-06 08:42:18

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: Upgrading by compiling

Doesn't Pacman have this? Pacman -Sbbyu? Or just one b for not compiling dependencies too...


"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."

Offline

#5 2012-07-06 08:56:11

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

Re: Upgrading by compiling

Reded wrote:

Doesn't Pacman have this? Pacman -Sbbyu? Or just one b for not compiling dependencies too...

pacman works with precompiled packages only, it never compiles anything.

Offline

#6 2012-07-06 18:13:34

sitquietly
Member
From: On the Wolf River
Registered: 2010-07-12
Posts: 220

Re: Upgrading by compiling

The basic tools for upgrading an Archlinux system from source are all available, especially the nice and easy accessibility of the build scripts themselves via abs, but I think it would be much too frustrating to try to do every daily upgrade from source code --  for months I did upgrade from source using pbget/makepkg.  Arch isn't made for that!  In the end I either had to switch back to Gentoo or develop better tools of my own;  I developed a set of my own "almost useable" scripts for managing a "built from source" Arch system.  My daily update now looks simple enough

update-package-database --abs --aur
pacman -Qq | versions --quiet --upgradable | freeze | order >updates
build --merge --save --log -f updates

but it is still a big job with complications like having to bootstrap some packages from Arch binaries when there are version updates like yesterday's update to glibc-2.16. If you don't know how to build a toolchain you will break your system and nothing works anymore.  Many times a package doesn't compile on your system because of the continuous, rolling changes that can make your "Archlinux" of today somehow different from the "Archlinux" that the developer had when the Arch binary was created.  You would have to have a very special reason to build Arch from source.  Stop thinking about it.

Last edited by sitquietly (2012-07-06 18:15:17)

Offline

#7 2012-07-06 19:37:45

Psykorgasm
Member
Registered: 2011-11-24
Posts: 178

Re: Upgrading by compiling

sitquietly wrote:

The basic tools for upgrading an Archlinux system from source are all available [...snip...]  Arch isn't made for that!

Indeed, while the basic tools are available valuable tools are not, a broken dependency rebuilder for example would have saved me many hours. Arch is definitely not meant for it unless you want to waste your time for some reason, that was my overall conclusion anyway.

Reded wrote:

Doesn't Pacman have this? Pacman -Sbbyu? Or just one b for not compiling dependencies too...

Nope, as karol pointed out - Also, I am pretty sure that is a feature of yaourt though, I think I used it like that for a few days but didn't want yaourt on my system so went about makepkg instead.

Offline

#8 2012-07-07 14:04:15

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: Upgrading by compiling

Psykorgasm wrote:

Nope, as karol pointed out - Also, I am pretty sure that is a feature of yaourt though, I think I used it like that for a few days but didn't want yaourt on my system so went about makepkg instead.

Sorry yes - I use yaourt, I had it in my head that pacman had all of the same features, just without the AUR part, my mistake wink

yaourt works with -Sbbyua, but I think pacbuilder is more aimed towards the whole source compiling thing!


"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."

Offline

#9 2012-07-11 19:45:24

solskogen
Member
From: Norway
Registered: 2005-03-06
Posts: 144

Re: Upgrading by compiling

sitquietly wrote:

Stop thinking about it.

I did :-) The only reason I was thinking of doing it was to benchmark if it has any impact, whatsoever, to add -march=corei7 to CFLAGS.

Offline

Board footer

Powered by FluxBB