You are not logged in.
Pages: 1
On Wednesday, I decided to order myself a new laptop (HORRAY!). Unfortunately, UPS won't be delivering it until Monday
Seeing as how I am the most impatient person ever, I need to keep myself busy until it arrives. And since gcc 4.3.0 added a -march=core2, I decided that I would recompile all the packages that I am currently using on my old computer using this. I adapted a script I found on the form to build the packages with makepkg and store all of the .pkg.tar.gz files in a directory for easy installation when my laptop comes in. I thought I would share this with you guys and see what you think.
Here are some of the responses I will get and my answers
POST1 - Why don't you just use gentoo
RESPONSE - gentoo is a mess; they are like 2 weeks past the date for their next release and haven't given any status update. Also, packages like gnome stay in unstable for like 5 months.
POST2 - You will only benefit like 1% in speed
RESPONSE - Even if I get a 1% speed increase, that is a 1% speed increase for free. Also, its not entirely about -march=core2, its also about rebuilding everything with gcc 4.3
Anyway, here's the script. I ran it overnight and it built 3/4 of the packages on my system before I ran out of hard drive room
thats why I added the rm -rf src
#!/bin/bash
# Make some directories
homedir=/home/rhollencamp/rebuild
mkdir -p $homedir
mkdir -p $homedir/binary
mkdir -p $homedir/packages
# Decide what we need to build
while [ $# -gt 0 ]
do
case $1
in
# specify a list of packages to make
-s)
pkglist=`cat "$2"`
shift 2
;;
-p)
pkglist=`pacman -Q | cut -d' ' -f1 | paste -s`
shift 1
;;
*)
echo "The arguments to use are"
echo "-s filename : build the packages listed in filename"
echo "-p : build all packages installed on system"
echo "-a : build all packages that get updated when abs is ran - will require you to input root password - TODO"
shift 1
;;
esac
done
echo "Locating selected packages in ABS trees"
# Locate each package in abs tree
for pkg in $pkglist; do
search=`find /var/abs/ -type d -name $pkg`
# If we found a PKGBUILD, add it to the list to be build
pkgbuild="$search/PKGBUILD"
if [ -f "$pkgbuild" ] ; then
makelist="$makelist $pkg"
# Otherwise add it to the list that won't be rebuild
else
norebuildlist="$norebuildlist $pkg"
fi
done
# Write list of packages not found in ABS tree
echo "$norebuildlist" > $homedir/notbuildinglist
# Write list of packages that were found and will be built
echo "$makelist" > $homedir/buildinglist
echo "Building packages"
# Build all of the packages
for pkg in $makelist; do
echo "Making: $pkg"
# make a directory to build things in; you can't build right in the abs tree
mkdir -p $homedir/packages/$pkg
cp `find /var/abs/ -type d -name $pkg`/* $homedir/packages/$pkg
cd $homedir/packages/$pkg
# make the package, ignoring ARCH field because a lot of packages are missing it
makepkg -A > /dev/null 2> /dev/null
# delete the src directory to save space
rm -rf src
# put the package name in the results file
echo "$pkg" >> $homedir/results
# now copy the .pkg.tar.gz to the binary folder; if the file doesn't exist (was unable to build)
# then put the error in the results file so you know what packages didn't build
cp *.pkg.tar.gz $homedir/binary/ 2>> $homedir/results
doneOffline
I'm pretty new to CFLAGS...what exactly is core2 for...all duo core processors, or specific ones?
Last edited by ph0tios (2008-03-30 16:03:33)
Offline
Have you had a look at makeworld --help ?
Makeworld seems to be a very similar script that you may be interested in.
Offline
I found this wiki article http://wiki.archlinux.org/index.php/Install_Arch_i586 which seems to be exactly what I'm doing. What exactly is the purpose of the variable CARCH? can I make a CARCH="core2" and then the packages come out foo-bar-1-1.0-core2.pkg.tar.gz?
Offline
grr
CARCH enables specific optimizations for your processor architecure (core2, athlon64, ...)
no it wouldn't work like that
core2 is a part of i686 or x_86_64
CARCH does no such thing. It simply sets the architecture to whatever arbitrary name you choose, as wizzard noted. To enable specific optimizations and such you need to modify CFLAGS and CXXFLAGS.
For more details, check out man makepkg.conf .
The suggestion box only accepts patches.
Offline
oops, sorry my bad i was thinking of -march
Offline
the majority of packages are definitely not ready for gcc 4.3
more than 1/4 of the packages failed to build with compile errors, so I'll just save it for the future when the packages get updated
Offline
Pages: 1