Difference between revisions of "Autospec"

From Wiki :: openmamba
Jump to navigation Jump to search
(New page: == Pre-requirements == * autospec user should belong to the '''packager''' group. The default user created during openmamba installation does already belong to this group. == Installatio...)
 
Line 108: Line 108:
 
== Updating a RPM package ==
 
== Updating a RPM package ==
  
autospec permette l'aggiornamento semi-automatico di un pacchetto software, ricavando automaticamente per molti di questi il numero dell'ultima versione disponibile.
+
autospec lets you update a software package in a smart way, by scraping automatically for most packages the latest available release.
  
Digitare il seguente comando:
+
Enter the following commnand:
  
  autospec -u nome_pacchetto -a1:4
+
  autospec -u package_name -a1:4
  
Se non viene identificato il nuovo numero di versione, oppure è stata individuata una versione instabile, si può specificare manualmente la versione a cui aggiornare con il comando:
+
If the new release is not found automatically, or an unstable release was detected, you can explicitely specify the new release with the following command:
  
  autospec -u nome_pacchetto -a1,3,4 numero_nuova_versione
+
  autospec -u package_name -a1,3,4 new_release_number
  
== Compilazione e pacchettizzazione ==
+
== Compilling and packaging ==
  
Per effettuare la compilazione del componente software e creare i pacchetti RPM binari digitare il comando:
+
In order to compile the software component and to create binary RPM packages enter the following command:
  
  autospec -u nome_pacchetto -a5
+
  autospec -u package_name -a5
  
Questa operazione può richiedere un tempo variabile. In alcuni casi la pacchettizzazione consiste solo nella copia di files e può richiedere pochi secondi, in altri si tratta di compilare migliaia di righe di codice sorgente e questa operazione può richiedere un tempo variabile tra alcuni minuti ed alcune ore a seconda della dimensione del software.
+
This operation takes a variable time, from some seconds to hours according to the complexity and size of the software.
  
=== Raggruppamento dei file ===
+
=== File grouping ===
Il risultato normalmente ottenuto, se l'operazione è andata a buon fine, è di ottenere un output che contiene un elenco di file come nell'esempio seguente:
+
If everything goes fine you will get a list of installed files like in this example:
 
<pre>
 
<pre>
 
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/libz-root
 
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/libz-root
Line 152: Line 152:
 
   /usr/share/man/man3/zlib.3.gz
 
   /usr/share/man/man3/zlib.3.gz
 
</pre>
 
</pre>
I files elencati andranno inseriti nel pacchetto principale oppure in sottopacchetti del pacchetto principale. Nel caso di questo esempio, la libreria ''zlib'', il pacchetto principale si chiamerà ''libz'' e si aggiungerà un sottopacchetto denominato ''libz-devel''. Il sottopacchetto ''-devel'' contiene tutti i file che servono solo per lo sviluppo di altri software che utilizzano questa libreria come ''dipendenza''. Esempi di file sono:
+
These files should be included in the main package or in a subpackage.
* %{_includedir}/*.h, %{_includedir}/*.hpp: prototipi di librerie
+
In this example, the ''zlib'' library, the main package will be called ''libz'' and a subpackage called ''libz-devel'' should be added. The ''-devel'' subpackage should contain all the files that are only needed for development of other software components that use this library as a ''dependency''. Examples of this kind of files are:
* %{_libdir}/*.so: collegamento alla libreria utilizzato dal linker in fase di compilazione
+
* %{_includedir}/*.h, %{_includedir}/*.hpp: library headers
* %{_libdir}/*.la: file contenente informazioni per il linking della libreria
+
* %{_libdir}/*.so: link to the library used during compilation of dependent software
* %{_libdir}/*.a: libreria statica utilizzata per la creazione di applicazioni che non dipendono dinamicamente dalla libreria dinamica
+
* %{_libdir}/*.la: file containing information on linking to this library
* %{_libdir}/pkgconfig/*.pc: file contenente i flag da passare al compilatore/linker per l'utilizzo di questa libreria
+
* %{_libdir}/*.a: static library used for making applications that do not depend on dynamic (or shared) libraries
 +
* %{_libdir}/pkgconfig/*.pc: file containing the flags passed to the compiler and linker for using this library
  
Una volta aggiornato lo specfile, prima di rilanciare la compilazione, è possibile verificare che tutti i file siano stati inclusi correttamente negli elenchi ''%files'' con:
+
When you have updated the specfile, before relaunching the compilation, you can verify that all files have been correctly included in the ''%files'' lists with:
  
  rpmbuild -bl nome_pacchetto.spec
+
  rpmbuild -bl package_name.spec
  
Se questa operazione non restituisce errori o file non inclusi si può di nuovo lanciare la compilazione e questa volta al termine dell'operazione saranno prodotti i pacchetti attesi.
+
If this operation doesn't return with errors of doesn't list files that are not yet included in the lists, you can run the compilation again, and this time the final packages should be produced at the end.
  
=== Posizionamento dei pacchetti prodotti ===
+
=== Where the produced packages are ===
Se l'operazione è andata a buon fine nella directory
+
If the operation completed successfully, in the directory:
  
 
  /usr/src/RPM/RPMS/i586
 
  /usr/src/RPM/RPMS/i586
  
oppure
+
or
  
 
  /usr/SRC/RPM/RPMS/noarch
 
  /usr/SRC/RPM/RPMS/noarch
  
saranno disponibili i pacchetti installabili, mentre il pacchetto sorgente sarà in:
+
you will find the producted installable packages, while the source package will be in:
  
 
  /usr/SRC/RPM/SRPMS
 
  /usr/SRC/RPM/SRPMS
  
== Problemi di compilazione e/o pacchettizzazione ==
+
== Problems compiling and packaging ==
Questa è la fase più complessa di tutto il procedimento, si tratta di una situazione equivalente al ''centro della partita'' nel gioco degli scacchi, è il momento in cui occorre applicare doti quali l'ingegno, l'esperienza, l'intuito, l'estro ecc. per giungere al risultato desiderato!
+
This is the most complex part of the process, it is like the ''middle of the game'' in chess, when you have to put your genius, experience, intuition etc. to get to the desired result!
  
Normalmente la prima cosa da fare è cercare, tra i molti messaggi che compaiono a video, qual è stato l'errore che ha causato la terminazione del processo. Normalmente in presenza di molti errori è sufficiente iniziare a considerare soltanto il primo, perché i successivi potrebbero esserne una conseguenza.
+
Normally the first thing to do is looking, among the many appearing messages, which was the error that caused the process to fail.
 +
Commonly when you see many errors it is sufficient to start considering the first one, because the following could be a consequence of it.
  
Solitamente occorre effettuare modifiche nello ''specfile'' e/o applicare delle [[patch]] al codice sorgente.  
+
Usually you need to make changes to the ''specfile'' and/or apply some  [[patches]] to the source code.
  
In ogni caso ci sono diverse possibilità per agire ed arrivare ad un risultato funzionante, ed è buona norma scegliere il metodo che tenga in considazione il più possibile i seguenti aspetti:
+
In any case there are different ways to proceed and get to a working result, and it is a good rule to choose a way that takes into consideration the following things:
  
* il modo in cui il software viene sviluppato e mantenuto dai suoi sviluppatori. Poiché saranno disponibili nuove versioni che occorrerà aggiornare in openmamba è bene applicare modifiche che si può presumere che funzioneranno anche nelle versioni successive
+
* the way the software is developed and maintained by its own developer(s). Because new releases will be available is it a good idea to make changes that will supposedly work also when updating the package
* che ciò che è stato fatto sia chiaro ad altri manutentori del pacchetto
+
* what is done should be clear to other package mainatiners
* in nessun caso rimuovere da uno specfile qualcosa se non si è chiaro di cosa faccia e perchè lo faccia
+
* in any case you should remove from a specfile something that is unclear
* evitare di introdurre problemi di [[regressione]] delle funzionalità del componente software: dopo un aggiornamento la nuova versione del pacchetto deve mantenere almeno le stesse funzionalità della versione precedente
+
* avoid adding software functionality [[regression]] problems: after updating the package to the new release it must have at least the same functionality of the previous release
  
== Verifica dei build requirements ==
+
== Build requirements verification ==
Dopo che i pacchetti sono stati creati con successo, occorre verificare che siano stati specificati tutti i [[build requirements]] necessari.  
+
When package have been successfully created, you have to verify that all the needed [[build requirements]] have been specified.  
autospec permette di identicare automaticamente la maggior parte dei build requirements con il comando:
+
autospec can automatically detect most of these with the following command:
  
  autospec -u nome_pacchetto -a6
+
  autospec -u package_name -a6
  
ad esempio:
+
e.g.:
  
 
<pre>
 
<pre>
 
[silvan@openmamba SPECS]$ autospec -u mediawiki -a6
 
[silvan@openmamba SPECS]$ autospec -u mediawiki -a6
aggiornamento del pacchetto mediawiki alla versione [?]...
+
updating mediawiki package to version [?]...
[step 6] -- creazione della lista dei build requirement
+
[step 6] -- creation of a build requirement list
 
  * /usr/src/RPM/RPMS/noarch/mediawiki-1.10.2-3mamba.noarch.rpm
 
  * /usr/src/RPM/RPMS/noarch/mediawiki-1.10.2-3mamba.noarch.rpm
 
  * /usr/src/RPM/RPMS/noarch/mediawiki-theme-openmamba-1.10.2-3mamba.noarch.rpm
 
  * /usr/src/RPM/RPMS/noarch/mediawiki-theme-openmamba-1.10.2-3mamba.noarch.rpm
Line 218: Line 220:
 
</pre>
 
</pre>
  
Copiare o modificare il testo compreso tra '''##AUTOBUILDREQ-BEGIN''' e '''##AUTOBUILDREQ-END''' (comprese queste due righe) nello ''specfile'' ed aggiungere eventuali altri build requirements mancanti noti.
+
Copy or modify the text between '''##AUTOBUILDREQ-BEGIN''' and '''##AUTOBUILDREQ-END''' (including these two lines) in the ''specfile'' and add below other build requirements that you know are missing.
  
Non è necessario effettuare di nuovo il build ma basta ricreare il pacchetto sorgente con il comando:
+
Then it is not necessary to performa a new build, but just recreating the source package with the command:
  
  autospec -u nome_pacchetto -a5 --norpm
+
  autospec -u package_name -a5 --norpm
  
== Test di installazione ==
+
== Installation test ==
Una volta completato il processo di pacchettizzazione è opportuno effettuare un test di quanto realizzato effettuando l'installazione dei pacchetti RPM che sono stati creati. I pacchetti creati saranno disponibili nelle seguenti cartelle:
+
When packaging is completed, a test is necessary. You should do this by installing the created RPM packages. These will be in the following dirs:
  
 
{| border="1" class="wikitable"
 
{| border="1" class="wikitable"
|+ '''Percorsi di RPM'''
+
|+ '''RPM paths'''
 
|-
 
|-
! Percorso
+
! Path
! Contenuto
+
! Content
! Estensione
+
! Extention
 
|-
 
|-
 
|/usr/src/RPM/SRPMS
 
|/usr/src/RPM/SRPMS
|Sorgenti
+
|Sources
 
|.src.rpm
 
|.src.rpm
 
|-
 
|-
 
|/usr/src/RPM/RPMS/noarch
 
|/usr/src/RPM/RPMS/noarch
|Pacchetto installabile per tutte le architetture
+
|Package that can be installed in all architectues
 
|.noarch.rpm
 
|.noarch.rpm
 
|-
 
|-
 
|/usr/src/RPM/RPMS/i586
 
|/usr/src/RPM/RPMS/i586
|Pacchetto installabile per architetture i586 e compatibili
+
|Package installable on i586 and compatible architectures
 
|.i586.rpm
 
|.i586.rpm
 
|-
 
|-
 
|/usr/src/RPM/RPMS/SOURCES
 
|/usr/src/RPM/RPMS/SOURCES
|Archivi sorgenti, patch e altri file sorgenti
+
|Source archives, patches and other source files
|.tar.gz .tar.bz2 .zip e altre
+
|.tar.gz .tar.bz2 .zip and others
 
|-
 
|-
 
|/usr/src/RPM/RPMS/SPEC
 
|/usr/src/RPM/RPMS/SPEC
|Script di pacchettizzazione (specfiles)
+
|Packaging scripts (specfiles)
 
|.spec
 
|.spec
 
|}
 
|}
  
Per installare i pacchetti realizzati è possibile utilizzare il comando '''rpm''':
+
In order to install packages you can use the '''rpm''' command:
  
  sudo rpm -i nome_pacchetto1 nome_pacchetto2 ...
+
  sudo rpm -i package1_name package2_name ...
  
oppure '''autospec''' che effettuerà l'installazione di tutti i pacchetti disponibili:
+
or use '''autospec''' that can install all available packages with the following command:
  
  autospec -u nome_pacchetto -a11
+
  autospec -u package_name -a11
  
== Invio del pacchetto in un repository ==
+
== Sending packages to a repository ==
L'invio dei pacchetti prodotti richiede di avere l'autorizzazione per l'accesso ftp in upload.  
+
To be able to send packages to a repository you need authorization for FTP upload.
Normalmente questo avviene utilizzando il proprio [[Repository personali|repository personale]] che può essere richiesto [mailto:info@openmamba.org contattando] i manutentori della distribuzione.
+
This is normally done using your own repository [[Personal repositories|personal repository]]. You can reuest yours  [mailto:info@openmamba.org contacting] the distribution maintainers.
  
Il proprio repository dev'essere configurato aggiungendo le righe sottostanti al file '''~/.autospec'''. In questo esempio è riportata la configurazione per un ipotetico repository '''devel-john''' dell'utente '''john''' e supponendo che il primo vettore di configurazione libero sia il numero 2:
+
Your own repository has to be configured adding the following lines in the '''~/.autospec''' file. This example shows the configuration for a hypothetical repository called '''devel-john''', belonging to the '''john''' user and supposing that the first configuration vector is number 2:
  
 
<pre>
 
<pre>
# Repository personale
+
# Personal repository
  
 
ftpurl_ro_rpms[2]="http://www.openmamba.org/pub/openmamba/devel-john/RPMS.@arch@"
 
ftpurl_ro_rpms[2]="http://www.openmamba.org/pub/openmamba/devel-john/RPMS.@arch@"
Line 290: Line 292:
 
</pre>
 
</pre>
  
L'invio avviene con il seguente comando:
+
Package can be uploaded with the following command:
  
  autospec -u nome_pacchetto -a10 --server 2
+
  autospec -u package_name -a10 --server 2

Revision as of 16:24, 16 January 2010

Pre-requirements

  • autospec user should belong to the packager group. The default user created during openmamba installation does already belong to this group.

Installation

Install the package called autospec using synaptic or the following command:

sudo apt-get install autospec

Configuration

In your home create a file called

.autospec

with a content like this:

# [configuration file for `autospec']

DISTRO="openmamba"
VENDOR="openmamba"

packager_fullname="''enter your full name here''"
packager_email="''enter your email address here''"

ftp_alias[0]="devel"
ftpurl_ro_rpms[0]="http://www.openmamba.org/pub/openmamba/devel/RPMS.@arch@"
ftpurl_ro_srpms[0]="http://www.openmamba.org"
ftp_rw_server[0]="ftp://ftp.openmamba.org/"
ftp_rw_port[0]=
ftp_rw_passive_mode[0]=on
ftp_rw_user[0]=
ftp_rw_passwd[0]=""
ftp_rw_rpms_dir[0]="/RPMS.@arch@"
ftp_rw_srpms_dir[0]="/SRPMS.base"
ftp_rw_server[0]=""
ftp_rw_port[0]=
ftp_rw_passive_mode[0]=on
ftp_rw_user[0]=
ftp_rw_passwd[0]=""
ftp_rw_rpms_dir[0]="/RPMS.@arch@"
ftp_rw_srpms_dir[0]="/SRPMS.base"
arch_list[0]="i586"
arch_noarch_upload[0]="${arch_list[0]}"
ftpdir_rw_old[0]="/old"

ftp_alias[1]="devel-games"
ftpurl_ro_rpms[1]="http://www.openmamba.org/pub/openmamba/devel-games/RPMS.@arch@"
ftpurl_ro_srpms[1]="http://www.openmamba.org/pub/openmamba/devel-games/SRPMS.base"
ftp_rw_server[0]="ftp://ftp.openmamba.org/"
ftp_rw_port[0]=
ftp_rw_passive_mode[0]=on
ftp_rw_user[0]=
ftp_rw_passwd[0]=""
ftp_rw_rpms_dir[0]="/RPMS.@arch@"
ftp_rw_srpms_dir[0]="/SRPMS.base"
ftp_rw_server[0]=""
ftp_rw_port[0]=
ftp_rw_passive_mode[0]=on
ftp_rw_user[0]=
ftp_rw_passwd[0]=""
ftp_rw_rpms_dir[0]="/RPMS.@arch@"
ftp_rw_srpms_dir[0]="/SRPMS.base"
arch_list[1]="i586"
arch_noarch_upload[1]="${arch_list[1]}"
ftpdir_rw_old[1]="/old"

ftp_rw_server_num_default=0
format_description_width=0

This configuration gives read-only access to the devel[1] and devel-games [2] repositories.

Configuring a proxy in Autospec

In the .autospec file in your home add the line proxy="indirizzoproxy:porta" e.g.: proxy="10.12.111.10:3128"

and replace each repository configuration with the following lines (replace [0] with the number associated to each repository):

ftp_rw_server[0]="http://www.openmamba.org"
ftp_rw_rpms_dir[0]="/pub/openmamba/''enter repository name here''/RPMS.@arch@"
ftp_rw_srpms_dir[0]="/pub/openmamba/''enter repository name here''/SRPMS.base"
ftpurl_ro_rpms[0]="ftp://ftpaccounts.openmamba.org/pub/openmamba/''enter repository name here''/RPMS.@arch@"
ftpurl_ro_srpms[0]="ftp://ftpaccounts.openmamba.org/pub/openmamba/''enter repository name here''/SRPMS.base"

Creating a new RPM package

You need to start getting the following information:

  • source url archive: the full internet address of the source archive for the software you want to package
  • package name: the package name, usually the first part of the <source archive url>

type the following command:

autospec -s source_url_archive -o package_name.spec

If the package is ok a spec file will be created with the name:

/usr/src/RPM/SPEC/package_name.spec

before proceeding you need to edit this file and add some information:

  • Summary: a short description of the software component
  • Group: a group taken from the openmamba defined groups
  • URL: the internet address of the home page with descriptive information on this software
  • License: the license of this software

Updating a RPM package

autospec lets you update a software package in a smart way, by scraping automatically for most packages the latest available release.

Enter the following commnand:

autospec -u package_name -a1:4

If the new release is not found automatically, or an unstable release was detected, you can explicitely specify the new release with the following command:

autospec -u package_name -a1,3,4 new_release_number

Compilling and packaging

In order to compile the software component and to create binary RPM packages enter the following command:

autospec -u package_name -a5

This operation takes a variable time, from some seconds to hours according to the complexity and size of the software.

File grouping

If everything goes fine you will get a list of installed files like in this example:

Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/libz-root
error: Installed (but unpackaged) file(s) found:
   /lib/libz.so.1
   /lib/libz.so.1.2.3
   /usr/include/zconf.h
   /usr/include/zlib.h
   /usr/include/zutil.h
   /usr/lib/libz.a
   /usr/lib/libz.so
   /usr/share/man/man3/zlib.3.gz


RPM build errors:
    Installed (but unpackaged) file(s) found:
   /lib/libz.so.1
   /lib/libz.so.1.2.3
   /usr/include/zconf.h
   /usr/include/zlib.h
   /usr/include/zutil.h
   /usr/lib/libz.a
   /usr/lib/libz.so
   /usr/share/man/man3/zlib.3.gz

These files should be included in the main package or in a subpackage. In this example, the zlib library, the main package will be called libz and a subpackage called libz-devel should be added. The -devel subpackage should contain all the files that are only needed for development of other software components that use this library as a dependency. Examples of this kind of files are:

  •  %{_includedir}/*.h, %{_includedir}/*.hpp: library headers
  •  %{_libdir}/*.so: link to the library used during compilation of dependent software
  •  %{_libdir}/*.la: file containing information on linking to this library
  •  %{_libdir}/*.a: static library used for making applications that do not depend on dynamic (or shared) libraries
  •  %{_libdir}/pkgconfig/*.pc: file containing the flags passed to the compiler and linker for using this library

When you have updated the specfile, before relaunching the compilation, you can verify that all files have been correctly included in the %files lists with:

rpmbuild -bl package_name.spec

If this operation doesn't return with errors of doesn't list files that are not yet included in the lists, you can run the compilation again, and this time the final packages should be produced at the end.

Where the produced packages are

If the operation completed successfully, in the directory:

/usr/src/RPM/RPMS/i586

or

/usr/SRC/RPM/RPMS/noarch

you will find the producted installable packages, while the source package will be in:

/usr/SRC/RPM/SRPMS

Problems compiling and packaging

This is the most complex part of the process, it is like the middle of the game in chess, when you have to put your genius, experience, intuition etc. to get to the desired result!

Normally the first thing to do is looking, among the many appearing messages, which was the error that caused the process to fail. Commonly when you see many errors it is sufficient to start considering the first one, because the following could be a consequence of it.

Usually you need to make changes to the specfile and/or apply some patches to the source code.

In any case there are different ways to proceed and get to a working result, and it is a good rule to choose a way that takes into consideration the following things:

  • the way the software is developed and maintained by its own developer(s). Because new releases will be available is it a good idea to make changes that will supposedly work also when updating the package
  • what is done should be clear to other package mainatiners
  • in any case you should remove from a specfile something that is unclear
  • avoid adding software functionality regression problems: after updating the package to the new release it must have at least the same functionality of the previous release

Build requirements verification

When package have been successfully created, you have to verify that all the needed build requirements have been specified. autospec can automatically detect most of these with the following command:

autospec -u package_name -a6

e.g.:

[silvan@openmamba SPECS]$ autospec -u mediawiki -a6
updating mediawiki package to version [?]...
[step 6] -- creation of a build requirement list
 * /usr/src/RPM/RPMS/noarch/mediawiki-1.10.2-3mamba.noarch.rpm
 * /usr/src/RPM/RPMS/noarch/mediawiki-theme-openmamba-1.10.2-3mamba.noarch.rpm
## AUTOBUILDREQ-BEGIN
BuildRequires: apache-mod_php
BuildRequires: bash
BuildRequires: diffutils
BuildRequires: ImageMagick-devel
BuildRequires: mysql
BuildRequires: php-apc
BuildRequires: php-devel
BuildRequires: php-mysql
## AUTOBUILDREQ-END

Copy or modify the text between ##AUTOBUILDREQ-BEGIN and ##AUTOBUILDREQ-END (including these two lines) in the specfile and add below other build requirements that you know are missing.

Then it is not necessary to performa a new build, but just recreating the source package with the command:

autospec -u package_name -a5 --norpm

Installation test

When packaging is completed, a test is necessary. You should do this by installing the created RPM packages. These will be in the following dirs:

RPM paths
Path Content Extention
/usr/src/RPM/SRPMS Sources .src.rpm
/usr/src/RPM/RPMS/noarch Package that can be installed in all architectues .noarch.rpm
/usr/src/RPM/RPMS/i586 Package installable on i586 and compatible architectures .i586.rpm
/usr/src/RPM/RPMS/SOURCES Source archives, patches and other source files .tar.gz .tar.bz2 .zip and others
/usr/src/RPM/RPMS/SPEC Packaging scripts (specfiles) .spec

In order to install packages you can use the rpm command:

sudo rpm -i package1_name package2_name ...

or use autospec that can install all available packages with the following command:

autospec -u package_name -a11

Sending packages to a repository

To be able to send packages to a repository you need authorization for FTP upload. This is normally done using your own repository personal repository. You can reuest yours contacting the distribution maintainers.

Your own repository has to be configured adding the following lines in the ~/.autospec file. This example shows the configuration for a hypothetical repository called devel-john, belonging to the john user and supposing that the first configuration vector is number 2:

# Personal repository

ftpurl_ro_rpms[2]="http://www.openmamba.org/pub/openmamba/devel-john/RPMS.@arch@"
ftpurl_ro_srpms[2]="http://www.openmamba.org/pub/openmamba/devel-john/SRPMS.base"

ftp_rw_server[2]="ftp://ftpaccounts.openmamba.org"
ftp_rw_port[2]=
ftp_rw_passive_mode[2]=on
ftp_rw_user[2]=john
ftp_rw_passwd[2]="password"
ftp_rw_rpms_dir[2]="/RPMS.@arch@"
ftp_rw_srpms_dir[2]="/SRPMS.base"

arch_list[2]="i586"

arch_noarch_upload[2]="${arch_list[0]}"

ftpdir_rw_old[2]="/old"

Package can be uploaded with the following command:

autospec -u package_name -a10 --server 2