You are not logged in.

#1 2008-02-12 16:26:13

satimis
Member
Registered: 2007-03-03
Posts: 186

About building ABS

Hi folks,


Archlinux 86_64 2007-08-2


I'm now building ABS according to;
http://wiki.archlinux.org/index.php/ABS


Coming to edit /etc/makepkg.conf to specify environment variables and CFLAGS


$ cat /etc/makepkg.conf

#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3'
          'http::/usr/bin/wget -c -t 3 --waitretry=3'
          'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate'
          'rsync::/usr/bin/rsync -z'
          'scp::/usr/bin/scp -C')

# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/curl

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-unknown-linux-gnu"

#-- Exclusive: will only run on -march=x86-64 
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(fakeroot !distcc color !ccache !xdelta)
#  A negated environment option will do the opposite of the comments below.
#
#-- fakeroot: Allow building packages as a non-root user
#-- distcc:   Use the Distributed C/C++/ObjC compiler
#-- color:    Colorize output messages
#-- ccache:   Use ccache to cache compilation
#-- xdelta:   Generate delta patch from previous to current package
#
BUILDENV=(fakeroot !distcc color !ccache !xdelta)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(strip !docs libtool emptydirs)
#  A negated option will do the opposite of the comments below.
#
#-- strip:     Strip symbols from binaries/libraries
#-- docs:      Save doc and info directories
#-- libtool:   Leave libtool (.la) files in packages
#-- emptydirs: Leave empty directories in packages
#
OPTIONS=(strip !docs libtool emptydirs)

#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
#-- Info and doc directories to remove (if option set correctly above)
DOC_DIRS=(usr/{,share/}{info,doc,gtk-doc} opt/gnome/{,share/}{info,doc,gtk-doc})

#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source root: specify location where PKGBUILDs are located for '--builddeps'
#SRCROOT=/home/pkgbuilds
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"

#########################################################################
# BUILDSCRIPT/EXTENSION DEFAULTS
#########################################################################
#
# WARNING: Do NOT modify these variables unless you know what you are
#          doing.
#
BUILDSCRIPT='PKGBUILD'
PKGEXT='.pkg.tar.gz'
SRCEXT='.src.tar.gz'
DB_COMPRESSION='gz'
DB_CHECKSUMS=(md5)

# vim: set ft=sh ts=2 sw=2 et:

What shall I uncomment and add on above file?


Regarding "The ABS tree" mine looks different to the document:-

$ ls -al /var/abs/

total 36
drwxr-xr-x  8 root root 4096 2008-02-13 07:56 .
drwxr-xr-x 15 root root 4096 2008-02-13 07:45 ..
drwxr-xr-x  6 root root 4096 2008-02-13 07:54 .sup
-rw-r--r--  1 root root  419 2008-01-10 12:51 README
drwxr-xr-x 20 root root 4096 2008-02-13 07:56 community
drwxr-xr-x  6 root root 4096 2008-02-13 07:50 core
drwxr-xr-x 22 root root 4096 2008-02-13 07:54 extra
drwxr-xr-x  5 root root 4096 2008-02-13 07:56 testing
drwxr-xr-x 10 root root 4096 2008-02-13 07:54 unstable

$ ls -al /var/abs/core/

total 32
drwxr-xr-x  6 root root 4096 2008-02-13 07:50 .
drwxr-xr-x  8 root root 4096 2008-02-13 07:56 ..
-rw-r--r--  1 root root  735 2007-09-17 02:25 PKGBUILD.proto
drwxr-xr-x 97 root root 4096 2008-02-13 07:50 base
drwxr-xr-x 19 root root 4096 2008-02-13 07:50 devel
-rw-r--r--  1 root root  670 2007-09-17 02:25 install.proto
drwxr-xr-x 12 root root 4096 2008-02-13 07:50 lib
drwxr-xr-x 50 root root 4096 2008-02-13 07:50 support

$ ls -al /var/abs/core/devel/

total 76
drwxr-xr-x 19 root root 4096 2008-02-13 07:50 .
drwxr-xr-x  6 root root 4096 2008-02-13 07:50 ..
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 abs
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 autoconf
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 automake
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 bin86
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 binutils
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 bison
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 csup
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 ed
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 fakeroot
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 flex
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 gcc
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 libtool
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 m4
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 make
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 patch
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 pkgconfig
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 texinfo

$ ls -al /var/abs/extra/

total 96
drwxr-xr-x  22 root root  4096 2008-02-13 07:54 .
drwxr-xr-x   8 root root  4096 2008-02-13 07:56 ..
drwxr-xr-x  52 root root  4096 2008-02-13 07:51 daemons
drwxr-xr-x 106 root root  4096 2008-02-13 07:51 devel
drwxr-xr-x  38 root root  4096 2008-02-13 07:51 editors
drwxr-xr-x  14 root root  4096 2008-02-13 07:51 emulators
drwxr-xr-x 107 root root  4096 2008-02-13 07:51 games
drwxr-xr-x 141 root root  4096 2008-02-13 07:51 gnome
drwxr-xr-x 132 root root  4096 2008-02-13 07:51 i18n
drwxr-xr-x  31 root root  4096 2008-02-13 07:51 kde
drwxr-xr-x 395 root root 12288 2008-02-13 07:51 lib
drwxr-xr-x  14 root root  4096 2008-02-13 07:52 modules
drwxr-xr-x 224 root root  4096 2008-02-13 07:52 multimedia
drwxr-xr-x  56 root root  4096 2008-02-13 07:52 multimedia-plugins
drwxr-xr-x 186 root root  4096 2008-02-13 07:52 network
drwxr-xr-x  90 root root  4096 2008-02-13 07:53 office
drwxr-xr-x  39 root root  4096 2008-02-13 07:53 science
drwxr-xr-x 192 root root  4096 2008-02-13 07:53 system
drwxr-xr-x 186 root root  4096 2008-02-13 07:54 x11
drwxr-xr-x  65 root root  4096 2008-02-13 07:54 x11-drivers
drwxr-xr-x  48 root root  4096 2008-02-13 07:54 x11-libs
drwxr-xr-x  60 root root  4096 2008-02-13 07:54 xfce4

$ ls -al /var/abs/extra/daemons/

total 208
drwxr-xr-x 52 root root 4096 2008-02-13 07:51 .
drwxr-xr-x 22 root root 4096 2008-02-13 07:54 ..
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 acpid
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 apache
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 apmd
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 autofs
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 bftpd
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 bind
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 capi4hylafax
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 courier-authlib
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 courier-imap
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 courier-mta
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 cpudyn
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 cpufreqd
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 cups
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 cyrus-sasl
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 dbus
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 dhcdbd
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 dhcp
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 esd
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 exim
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 fam
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 fssos-nsvs
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 hylafax
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 ifplugd
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 imap
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 jack-audio-connection-kit
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 knockd
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 lighttpd
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 mpd
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 mysql
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 networkmanager
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 ntp
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 openldap
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 openslp
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 postfix
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 postgresql
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 proftpd
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 proxsmtp
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 rbldnsd
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 samba
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 smtpprox
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 sonypid
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 sysklogd
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 thttpd
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 tpop3d
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 usermin
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 vsftpd
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 webmin
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 xsp
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 ypbind-mt
drwxr-xr-x  2 root root 4096 2008-02-13 07:51 ypserv

ls -al /var/abs/extra/daemons/acpid/

total 28
drwxr-xr-x  2 root root 4096 2008-02-13 07:50 .
drwxr-xr-x 52 root root 4096 2008-02-13 07:51 ..
-rw-r--r--  1 root root 1145 2007-07-03 03:46 PKGBUILD
-rw-r--r--  1 root root  575 2004-03-13 02:45 acpid
-rw-r--r--  1 root root  670 2006-03-26 00:31 acpid-1.0.4-gcc4.patch
-rw-r--r--  1 root root   84 2004-11-04 03:33 anything
-rw-r--r--  1 root root 1385 2004-11-04 03:33 handler.sh

Did I make any mistake here?  TIA


B.R.
satimis

Offline

#2 2008-02-12 16:29:57

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: About building ABS

Looks fine to me - the wiki article might be out of date with respect to the tree structure, since we moved from the [current] repo to the [core] repo

-edit-

Updated the wiki page to be more accurate.

Last edited by Cerebral (2008-02-12 16:39:10)

Offline

#3 2008-02-12 16:43:43

satimis
Member
Registered: 2007-03-03
Posts: 186

Re: About building ABS

Cerebral wrote:

Looks fine to me - the wiki article might be out of date with respect to the tree structure, since we moved from the [current] repo to the [core] repo

-edit-

Updated the wiki page to be more accurate.

Thanks for your advice.


Shall I edit /etc/makepkg.conf ?  If YES, please advise how?  TIA


satimis

Offline

#4 2008-02-12 17:52:54

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,329

Re: About building ABS

Your makepkg.conf looks fine to me, unless you want to fiddle around with the optimization flags (not really recommended, some software might not compile/might crash if you set it too aggressively, you can read about it if you want on gentoo wiki).

What I usually set is SRCDEST and PKGDEST variables, which makes it easy to keep the compiled packages and sources at a specific place.

Offline

#5 2008-02-13 02:01:49

satimis
Member
Registered: 2007-03-03
Posts: 186

Re: About building ABS

bender02 wrote:

Your makepkg.conf looks fine to me, unless you want to fiddle around with the optimization flags (not really recommended, some software might not compile/might crash if you set it too aggressively, you can read about it if you want on gentoo wiki).

Thanks for your advice and Gentoo link.  Gentoo is also a nice Linux OS well documented similar to Arch with nice documents .  I ran it about 3 years before turning to to FreeBSD then OpenBSD.


I'm not going to play around on Arch. Nor I'm experienced on Arch.  This is only my 2nd round on it.  I'm prepared to make is as the Host OS of VMWare/Xen and to run LAMP server on it.


What I usually set is SRCDEST and PKGDEST variables, which makes it easy to keep the compiled packages and sources at a specific place.

#SRCDEST=/home/sources
and
#PKGDEST=/home/packages

have been comment out on /etc/makepkg.conf

Shall I just uncomment them?  Any edition to be made afterwards?  TIA


satimis

Last edited by satimis (2008-02-13 02:06:09)

Offline

#6 2008-02-13 02:25:25

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,329

Re: About building ABS

satimis wrote:

Shall I just uncomment them?  Any edition to be made afterwards?

That depends where do you want to keep built packages and sources. I have SRCDEST unset, so that when I run "makepkg" in a directory with a PKGBUILD, the sources are downloaded into that directory. But, I want to keep built packages at one place (something like the pacman cache (which is usually at /var/cache/pacman/pkg)). I keep it in /var/abs/local/packages, but that's completely up to your directory layout, it can be anything (reasonable). The only thing is that that directory should be writable by the user which builds the package (which should *not* be root).

Offline

#7 2008-02-15 09:18:35

satimis
Member
Registered: 2007-03-03
Posts: 186

Re: About building ABS

bender02 wrote:
satimis wrote:

Shall I just uncomment them?  Any edition to be made afterwards?

That depends where do you want to keep built packages and sources. I have SRCDEST unset, so that when I run "makepkg" in a directory with a PKGBUILD, the sources are downloaded into that directory. But, I want to keep built packages at one place (something like the pacman cache (which is usually at /var/cache/pacman/pkg)). I keep it in /var/abs/local/packages, but that's completely up to your directory layout, it can be anything (reasonable). The only thing is that that directory should be writable by the user which builds the package (which should *not* be root).

Thanks for your advice.


On /etc/makepkg.conf

uncomment;

SRCDEST=/home/sources

uncomment and change;

#PKGDEST=/home/packages

as;

PKGDEST=/var/cache/pacman/pkg

Create a Build Directory

$ mkdir -p /home/satimis/abs/local
$ ls -l /home/satimis/ | grep abs

drwxr-xr-x 3 satimis satimis  4096 2008-02-16 00:58 abs

$ ls -l /home/satimis/abs/

total 4
drwxr-xr-x 2 satimis satimis 4096 2008-02-16 00:58 local

$ ls /var/abs/

README  community  core  extra  testing  unstable

$ ls /var/abs/core/

PKGBUILD.proto  base  devel  install.proto  lib  support

Whether finish here in respect of "ABS - The Arch Build System"


B.R.
satimis

Offline

Board footer

Powered by FluxBB