0_21-0_20070703_00_14'.
Sprout from master 2008-02-20 20:49:54 UTC Marcin Banasiak <marcin.banasiak@gmail.com> '- upstream patch for #92'
Cherrypick from unlabeled-1.1.2 2008-02-15 03:05:43 UTC Elan Ruusamäe <glen@pld-linux.org> '- config xml was modified initially on purpose, now touch generated config code too':
poldek-dirdeps.patch -> 1.1.2.4
Cherrypick from unlabeled-1.277.2.3.2.18.2 2008-02-20 21:00:21 UTC Elan Ruusamäe <glen@pld-linux.org> '- added -reversed-prompt.patch (fixes #92)':
poldek.spec -> 1.277.2.3.2.18.2.5
Cherrypick from unlabeled-1.35.2 2007-11-14 19:21:56 UTC Elan Ruusamäe <glen@pld-linux.org> '- signed=yes for repos that are signed':
poldek.conf -> 1.35.2.22
Cherrypick from unlabeled-1.5.2 2007-11-22 17:41:55 UTC Elan Ruusamäe <glen@pld-linux.org> '- duplicate signed lines':
poldek-multilib.conf -> 1.5.2.9
Delete:
poldek-as_needed-fix.patch
poldek-su-sigsev.patch
poldek-uninstall-depfix.patch
+++ /dev/null
-diff -Nur poldek-0.20/vfile/Makefile.am poldek-0.20.as_needed-fix/vfile/Makefile.am
---- poldek-0.20/vfile/Makefile.am 2005-05-15 17:16:13.000000000 +0200
-+++ poldek-0.20.as_needed-fix/vfile/Makefile.am 2006-08-02 01:46:42.000000000 +0200
-@@ -22,7 +22,7 @@
- vfffmod.c $(VFCURL_SRCS_) \
- vopen3.c vopen3.h vfile_intern.h
-
--libvfile_la_LIBADD = vfff/libvfff.la
-+libvfile_la_LIBADD = vfff/libvfff.la -lutil
-
- pkgincludedir = $(includedir)/vfile
- pkginclude_HEADERS = vfile.h p_open.h vopen3.h
--- /dev/null
+--- poldek-0.21-cvs20070703.00/conf/poldek.conf~ 2008-02-14 16:12:15.604671074 +0200
++++ poldek-0.21-cvs20070703.00/conf/poldek.conf 2008-02-14 16:13:12.373118918 +0200
+@@ -160,6 +160,9 @@
+ # Subtle dependency processing options, they should not be changed
+ # unless you know what you are doing
+
++# RPM 4.4.6 introduces auto dependencies based on package directories. Option controls this feature.
++auto directory dependencies = no
++
+ # Automatically install packages required by installed ones.
+ #follow = yes
+
+--- poldek-0.21-cvs20070703.00/conf_sections.c~ 2007-06-30 10:42:33.000000000 +0300
++++ poldek-0.21-cvs20070703.00/conf_sections.c 2008-02-15 05:00:16.039094830 +0200
+@@ -205,7 +205,7 @@
+
+ { "auto directory dependencies",
+ CONF_TYPE_BOOLEAN3,
+- "auto",
++ "no",
+ POLDEK_OP_AUTODIRDEP, { 0 } },
+
+ { "follow",
-# Alternative multilib PLD 3.0 (Th)
-_arch = %ARCH%
-_prefix = ftp://ftp.th.pld-linux.org/dists/th
+# $Id$
+# PLD Linux Distribution <http://www.pld-linux.org/>.
+#
+# Alternative multilib sources for PLD Linux 2.0 (Ac)
+
+_pld_arch = %ARCH%
+_pld_main_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
+
## Some mirrors
## You can use them if you have better connection there
# CI TASK:
-#_prefix = ftp://ftp.task.pld-linux.org/dists/th
+#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/ac
+_pld_prefix = %{_pld_main_prefix}
-_type = pndir
+_ac_idxtype = pndir
+
+[source]
+type = %{_ac_idxtype}
+name = ac-%{_pld_arch}
+path = %{_pld_prefix}/PLD/%{_pld_arch}/PLD/RPMS/
+ignore = kernel*
+signed = yes
+auto = no
+autoup = yes
+pri = 2
+
+[source]
+type = %{_ac_idxtype}
+name = ac-updates-%{_pld_arch}
+path = %{_pld_prefix}/updates/%{_pld_arch}/
+ignore = kernel*
+signed = yes
+auto = no
+autoup = yes
+pri = 2
[source]
-type = %{_type}
-name = th-%{_arch}
-path = %{_prefix}/PLD/%{_arch}/RPMS/
+type = %{_ac_idxtype}
+name = ac-supported-%{_pld_arch}
+path = %{_pld_prefix}/supported/%{_pld_arch}/
+ignore = kernel*
+signed = yes
auto = no
autoup = no
-#[source]
-#type = %{_type}
-#name = th-updates-security-%{_arch}
-#path = %{_prefix}/updates-security/%{_arch}/RPMS/
-#auto = no
-#autoup = no
-#
-#[source]
-#type = %{_type}
-#name = th-updates-general-%{_arch}
-#path = %{_prefix}/updates-general/%{_arch}/RPMS/
-#auto = no
-#autoup = no
-
-#[source]
-#type = %{_type}
-#name = th-supported-%{_arch}
-#path = %{_prefix}/supported/%{_arch}/
-#auto = no
-#autoup = no
-
-#[source]
-#type = %{_type}
-#name = th-ready-%{_arch}
-#path = %{_prefix}/ready/%{_arch}/RPMS/
-#auto = no
-#autoup = no
+[source]
+type = %{_ac_idxtype}
+name = ac-ready-%{_pld_arch}
+path = %{_pld_main_prefix}/ready/%{_pld_arch}/
+#signed = yes
+auto = no
+autoup = no
[source]
-type = %{_type}
-name = th-test-%{_arch}
-path = %{_prefix}/test/%{_arch}/RPMS/
+type = %{_ac_idxtype}
+name = ac-test-%{_pld_arch}
+path = %{_pld_main_prefix}/test/%{_pld_arch}/
auto = no
autoup = no
+
+# alias ac-updates-ARCH as ac-ARCH-updates
+[source]
+type = group
+name = ac-%{_pld_arch}-updates
+sources = ac-updates-%{_pld_arch}
+
+# alias ac-ready-ARCH as ac-ARCH-ready
+[source]
+type = group
+name = ac-%{_pld_arch}-ready
+sources = ac-ready-%{_pld_arch}
+++ /dev/null
-Index: conf.c
-===================================================================
-RCS file: /cvsroot/poldek/poldek/conf.c,v
-retrieving revision 1.84
-diff -u -r1.84 conf.c
---- conf.c 27 Jun 2007 21:47:43 -0000 1.84
-+++ conf.c 28 Jun 2007 15:47:04 -0000
-@@ -944,6 +944,9 @@
- addparam_flags |= ADD_PARAM_FOREIGN;
- }
-
-+ if (flags & POLDEK_LDCONF_NOVALIDATE)
-+ validate = 0;
-+
- if (flags & POLDEK_LDCONF_UPDATE)
- update = 1;
-
-Index: conf.h
-===================================================================
-RCS file: /cvsroot/poldek/poldek/conf.h,v
-retrieving revision 1.18
-diff -u -r1.18 conf.h
---- conf.h 27 Jun 2007 00:44:47 -0000 1.18
-+++ conf.h 28 Jun 2007 15:47:04 -0000
-@@ -6,10 +6,11 @@
- #include <trurl/narray.h>
- #include <trurl/nhash.h>
-
--#define POLDEK_LDCONF_FOREIGN (1 << 0) /* not a poldek file */
--#define POLDEK_LDCONF_UPDATE (1 << 1) /* resync with remote config */
--#define POLDEK_LDCONF_NOINCLUDE (1 << 2) /* ignore %include directives */
--#define POLDEK_LDCONF_GLOBALONLY (1 << 9) /* for early cachedir setup */
-+#define POLDEK_LDCONF_FOREIGN (1 << 0) /* not a poldek config file */
-+#define POLDEK_LDCONF_NOVALIDATE (1 << 1) /* do not validate config variables */
-+#define POLDEK_LDCONF_UPDATE (1 << 2) /* resync with remote config */
-+#define POLDEK_LDCONF_NOINCLUDE (1 << 3) /* ignore %include directives */
-+#define POLDEK_LDCONF_GLOBALONLY (1 << 4) /* for early cachedir setup */
-
- /* default localization is used if path is NULL */
- tn_hash *poldek_conf_load(const char *path, unsigned flags);
-Index: cli/main.c
-===================================================================
-RCS file: /cvsroot/poldek/poldek/cli/main.c,v
-retrieving revision 1.56
-diff -u -r1.56 main.c
---- cli/main.c 27 Jun 2007 00:44:47 -0000 1.56
-+++ cli/main.c 28 Jun 2007 15:47:05 -0000
-@@ -587,7 +587,8 @@
- } else if (noautosu == 0 && getuid() == 0) { /* check config's runas */
- tn_hash *cnf;
-
-- cnf = poldek_conf_load_default(POLDEK_LDCONF_NOINCLUDE | POLDEK_LDCONF_FOREIGN);
-+ cnf = poldek_conf_load_default(POLDEK_LDCONF_GLOBALONLY |
-+ POLDEK_LDCONF_NOVALIDATE);
- if (cnf) {
- tn_hash *global;
- const char *u;
-Index: tests/sh/04-conf
-===================================================================
-RCS file: /cvsroot/poldek/poldek/tests/sh/04-conf,v
-retrieving revision 1.2
-diff -u -r1.2 04-conf
---- tests/sh/04-conf 27 Jun 2007 21:47:42 -0000 1.2
-+++ tests/sh/04-conf 28 Jun 2007 15:47:05 -0000
-@@ -28,12 +28,43 @@
-
- is_verbose_mode && $poldek_l
-
-- n=$($poldek_l | grep -vE '^dbg:' | wc -l)
-+ n=$($poldek_l | grep 'test://' | wc -l)
- assertEquals "2 sources expected" "$n" "2"
-
- n=$($poldek_l | grep -E '^test[12] ' | wc -l)
- assertEquals "2 sources expected, but not those" "$n" "2"
- }
-+
-+testConfAsRoot()
-+{
-+ create_local_conf
-+ msgn "--conf"
-+ poldek_l="$POLDEK --conf $TMPDIR/poldek.conf -q -l"
-+
-+ is_verbose_mode && $poldek_l
-+
-+ n=$(fakeroot $poldek_l | grep 'test://' | wc -l)
-+ assertEquals "2 sources expected" "$n" "2"
-+
-+ n=$(fakeroot $poldek_l | grep -E '^test[12] ' | wc -l)
-+ assertEquals "2 sources expected, but not those" "$n" "2"
-+
-+ msgn "default conf"
-+ mkdir $TMPDIR/home || fail "mkdir"
-+ mv -f $TMPDIR/poldek.conf $TMPDIR/home/.poldekrc
-+ HOME=$TMPDIR/home
-+ export HOME
-+
-+ poldek_l="$POLDEK -q -l"
-+ is_verbose_mode && $poldek_l
-+
-+ n=$(fakeroot $poldek_l | grep 'test://' | wc -l)
-+ assertEquals "2 sources expected" "$n" "2"
-+
-+ n=$(fakeroot $poldek_l | grep -E '^test[12] ' | wc -l)
-+ assertEquals "2 sources expected, but not those" "$n" "2"
-+}
-+
-
- testConfInclude()
- {
+++ /dev/null
-Index: capreq.c
-===================================================================
-RCS file: /cvsroot/poldek/poldek/capreq.c,v
-retrieving revision 1.44
-diff -u -r1.44 capreq.c
---- capreq.c 21 Jun 2007 16:47:45 -0000 1.44
-+++ capreq.c 29 Jun 2007 20:10:22 -0000
-@@ -59,7 +59,7 @@
- return strcmp(capreq_name(cr1), capreq_name(cr2));
- }
-
--__inline__
-+__inline__ static
- int capreq_cmp2name(struct capreq *cr1, const char *name)
- {
- return strcmp(capreq_name(cr1), name);
-@@ -427,9 +427,24 @@
- __inline__
- int capreq_arr_find(tn_array *capreqs, const char *name)
- {
-+ /* capreq_cmp2name is compilant with capreq_cmp_name_evr */
-+ if (!n_array_is_sorted(capreqs))
-+ n_array_sort(capreqs);
-+
- return n_array_bsearch_idx_ex(capreqs, name,
- (tn_fn_cmp)capreq_cmp2name);
- }
-+
-+__inline__
-+int capreq_arr_contains(tn_array *capreqs, const char *name)
-+{
-+ if (!n_array_is_sorted(capreqs))
-+ n_array_sort(capreqs); /* capreq_cmp2name */
-+
-+ return n_array_bsearch_idx_ex(capreqs, name,
-+ (tn_fn_cmp)capreq_cmp2name) > -1;
-+}
-+
-
- tn_buf *capreq_arr_join(tn_array *capreqs, tn_buf *nbuf, const char *sep)
- {
-Index: capreq.h
-===================================================================
-RCS file: /cvsroot/poldek/poldek/capreq.h,v
-retrieving revision 1.30
-diff -u -r1.30 capreq.h
---- capreq.h 21 Jun 2007 22:29:49 -0000 1.30
-+++ capreq.h 29 Jun 2007 20:10:22 -0000
-@@ -117,12 +117,12 @@
- int capreq_strcmp_name_evr(struct capreq *pr1, struct capreq *pr2);
-
- int capreq_cmp_name(struct capreq *cr1, struct capreq *cr2);
--int capreq_cmp2name(struct capreq *pr1, const char *name);
- int capreq_cmp_name_evr(struct capreq *cr1, struct capreq *cr2);
-
- #ifndef SWIG
- tn_array *capreq_arr_new(int size);
--int capreq_arr_find(tn_array *capreqs, const char *name);
-+int capreq_arr_find(tn_array *capreqs, const char *name); /* returns index */
-+int capreq_arr_contains(tn_array *capreqs, const char *name); /* returns bool */
- tn_buf *capreq_arr_join(tn_array *capreqs, tn_buf *nbuf, const char *sep);
-
- int capreq_arr_store_n(tn_array *arr);
-Index: libpoldek.sym
-===================================================================
-RCS file: /cvsroot/poldek/poldek/libpoldek.sym,v
-retrieving revision 1.28
-diff -u -r1.28 libpoldek.sym
---- libpoldek.sym 28 Jun 2007 22:28:21 -0000 1.28
-+++ libpoldek.sym 29 Jun 2007 20:10:22 -0000
-@@ -20,7 +20,6 @@
- capreq_arr_store
- capreq_arr_store_n
- capreq_clone
--capreq_cmp2name
- capreq_cmp_name
- capreq_cmp_name_evr
- capreq_epoch_
-Index: pkg.c
-===================================================================
-RCS file: /cvsroot/poldek/poldek/pkg.c,v
-retrieving revision 1.115
-diff -u -r1.115 pkg.c
---- pkg.c 21 Jun 2007 16:47:45 -0000 1.115
-+++ pkg.c 29 Jun 2007 20:10:23 -0000
-@@ -920,8 +920,7 @@
- struct capreq *cnfl = NULL;
-
- DBGF("%s %s%s", pkg_id(pkg), pkg_id(cpkg), isbastard ? " (bastard)" : "");
-- if (n_array_bsearch_ex(pkg->cnfls, cpkg->name,
-- (tn_fn_cmp)capreq_cmp2name) == NULL) {
-+ if (!capreq_arr_contains(pkg->cnfls, cpkg->name)) {
- cnfl = capreq_new(pkg->na, cpkg->name, cpkg->epoch, cpkg->ver,
- cpkg->rel, REL_EQ,
- (isbastard ? CAPREQ_BASTARD : 0));
-@@ -935,8 +934,7 @@
-
- int pkg_has_pkgcnfl(struct pkg *pkg, struct pkg *cpkg)
- {
-- return pkg->cnfls && (n_array_bsearch_ex(pkg->cnfls, cpkg->name,
-- (tn_fn_cmp)capreq_cmp2name));
-+ return pkg->cnfls && capreq_arr_contains(pkg->cnfls, cpkg->name);
- }
-
- struct pkguinf *pkg_xuinf(const struct pkg *pkg, tn_array *langs)
-Index: pkgdir/pkgdir_dirindex.c
-===================================================================
-RCS file: /cvsroot/poldek/poldek/pkgdir/pkgdir_dirindex.c,v
-retrieving revision 1.13
-diff -u -r1.13 pkgdir_dirindex.c
---- pkgdir/pkgdir_dirindex.c 24 Jun 2007 22:47:27 -0000 1.13
-+++ pkgdir/pkgdir_dirindex.c 29 Jun 2007 20:10:23 -0000
-@@ -505,7 +505,7 @@
- {
- const char **tl, **tl_save;
- char val[16 * 1024];
-- int vlen, n = 0, nadded = 0;
-+ int vlen, n = 0, nadded = 0, created_here = 0;
-
- n_assert(key[1] == PREFIX_PKGKEY_REQDIR);
- vlen = sizeof(val);
-@@ -513,15 +513,15 @@
- if (tl == NULL)
- return 0;
-
-- if (!pkg->reqs)
-+ if (!pkg->reqs) {
- pkg->reqs = capreq_arr_new(n);
--
-+ created_here = 1;
-+ }
-+
- while (*tl) {
- const char *dir = *tl;
-
-- if (*dir && !n_array_bsearch_ex(pkg->reqs, dir,
-- (tn_fn_cmp)capreq_cmp2name)) {
--
-+ if (*dir && (created_here || !capreq_arr_contains(pkg->reqs, dir))) {
- struct capreq *req = capreq_new(pkg->na, dir, 0, NULL, NULL, 0,
- CAPREQ_BASTARD);
- n_array_push(pkg->reqs, req);
-================================================================
-Index: trurlib/include/trurl/narray.h
-diff -u trurlib/include/trurl/narray.h:1.29 trurlib/include/trurl/narray.h:1.30
---- trurlib/include/trurl/narray.h:1.29 Tue Jun 19 23:52:49 2007
-+++ trurlib/include/trurl/narray.h Sat Jun 30 09:39:51 2007
-@@ -155,7 +155,9 @@
- /* internal macros, do not use them */
- #define TN_ARRAY_set_sorted(arr) ((arr)->flags |= TN_ARRAY_INTERNAL_ISSORTED)
- #define TN_ARRAY_clr_sorted(arr) ((arr)->flags &= ~TN_ARRAY_INTERNAL_ISSORTED)
--#define TN_ARRAY_is_sorted(arr) ((arr)->flags & TN_ARRAY_INTERNAL_ISSORTED)
-+
-+
-+#define n_array_is_sorted(arr) ((arr)->flags & TN_ARRAY_INTERNAL_ISSORTED)
-
- tn_array *n_array_grow_priv_(tn_array *arr, size_t req_size);
- #ifndef SWIG
-
-================================================================
-Index: trurlib/n_array_sorts.c
-diff -u trurlib/n_array_sorts.c:1.6 trurlib/n_array_sorts.c:1.7
---- trurlib/n_array_sorts.c:1.6 Tue Nov 16 20:01:40 2004
-+++ trurlib/n_array_sorts.c Sat Jun 30 09:39:51 2007
-@@ -121,7 +121,7 @@
-
- cmpf = autosort(arr, cmpf, &set_sorted);
-
-- if ((arr->flags & TN_ARRAY_AUTOSORTED) && TN_ARRAY_is_sorted(arr))
-+ if ((arr->flags & TN_ARRAY_AUTOSORTED) && n_array_is_sorted(arr))
- return arr;
-
- switch (alg) {
-
+# $Id$
# PLD Linux Distribution <http://www.pld-linux.org/>.
+#
+# Main sources for PLD Linux 2.0 (Ac)
+
+# specify our packages architecture
+_pld_arch = %ARCH%
+
+# main PLD-site for often changed things:
+_pld_main_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
-_arch = %ARCH%
-_prefix = ftp://ftp.th.pld-linux.org/dists/th
## Some mirrors
## You can use them if you have better connection there
# CI TASK:
-#_prefix = ftp://ftp.task.pld-linux.org/dists/th
+#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/ac
+_pld_prefix = %{_pld_main_prefix}
-_type = pndir
+_ac_idxtype = pndir
-# PLD 3.0 (Th)
+# PLD 2.0 (Ac)
[source]
-type = %{_type}
-name = th
-path = %{_prefix}/PLD/%{_arch}/RPMS/
+type = %{_ac_idxtype}
+name = ac
+path = %{_pld_prefix}/PLD/%{_pld_arch}/PLD/RPMS/
+signed = yes
+# buggy deps -- use one from updates instead
+ignore = msmtp-sendmail*
+pri = 1
[source]
-type = %{_type}
-name = th
-path = %{_prefix}/PLD/noarch/RPMS/
-
-#[source]
-#type = %{_type}
-#name = th-updates
-#path = %{_prefix}/updates/%{_arch}/RPMS/
-#
-#[source]
-#type = %{_type}
-#name = th-updates
-#path = %{_prefix}/updates/noarch/RPMS/
+type = %{_ac_idxtype}
+name = ac-updates
+path = %{_pld_prefix}/updates/%{_pld_arch}/
+signed = yes
+pri = 1
-#[source]
-#type = %{_type}
-#name = th-supported
-#path = %{_prefix}/supported/%{_arch}/
-#auto = no
-
-#[source]
-#type = %{_type}
-#name = th-ready
-#path = %{_prefix}/ready/%{_arch}/RPMS/
-#auto = no
-#autoup = no
-#
-#[source]
-#type = %{_type}
-#name = th-ready
-#path = %{_prefix}/ready/noarch/RPMS/
-#auto = no
-#autoup = no
+[source]
+type = %{_ac_idxtype}
+name = ac-supported
+path = %{_pld_prefix}/supported/%{_pld_arch}/
+signed = yes
+auto = no
+autoup = no
[source]
-type = %{_type}
-name = th-test
-path = %{_prefix}/test/%{_arch}/RPMS/
+type = %{_ac_idxtype}
+name = ac-ready
+path = %{_pld_main_prefix}/ready/%{_pld_arch}/
+#signed = yes
auto = no
autoup = no
[source]
-type = %{_type}
-name = th-test
-path = %{_prefix}/test/noarch/RPMS/
+type = %{_ac_idxtype}
+name = ac-test
+path = %{_pld_main_prefix}/test/%{_pld_arch}/
auto = no
autoup = no
-#
# Conditional build:
%bcond_with static # don't use shared libraries
%bcond_without imode # don't build interactive mode
%bcond_without python # don't build python bindings
#
# required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
-%define ver_db 4.3.27-1
-%define ver_rpm 4.4.9-1
-#
-%define snap 20070703.00
-%define rel 13
+%define ver_db 4.2.50-1
+%define ver_rpm 4.4.9-31
+%define snap 20070703.00
+%define rel 14
Summary: RPM packages management helper tool
Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM
Name: poldek
Source1: %{name}.conf
Source2: %{name}-multilib.conf
Source3: %{name}-aliases.conf
-%if %{with imode}
Source4: %{name}.desktop
Source5: %{name}.png
-%endif
+Patch0: %{name}-dirdeps.patch
Patch1: %{name}-vserver-packages.patch
Patch2: %{name}-config.patch
Patch3: %{name}-multilib.patch
Patch7: %{name}-nohold-fix.patch
Patch8: %{name}-dir-dot.patch
Patch9: %{name}-suggests-one-package.patch
+Patch10: %{name}-reversed-prompt.patch
URL: http://poldek.pld-linux.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: readline-devel >= 5.0
BuildRequires: rpm-devel >= %{ver_rpm}
%{?with_python:BuildRequires: rpm-pythonprov}
+BuildRequires: sed >= 4.0
BuildRequires: xmlto
BuildRequires: zlib-devel
%if %{with static}
Requires(triggerpostun): sed >= 4.0
Requires: %{name}-libs = %{version}-%{release}
Requires: db >= %{ver_db}
+Requires: openssl >= 0.9.7d
Requires: rpm >= %{ver_rpm}
Requires: rpm-lib = %(rpm -q --qf '%{V}' rpm-lib)
# vf* scripts use sed
%prep
%setup -q -n %{name}-%{version}%{?snap:-cvs%{snap}}
+%patch0 -p1
%patch1 -p1
%patch2 -p1
%ifarch %{x8664}
%patch7 -p1
%patch8 -p1
%patch9 -p1
+%patch10 -p1
# cleanup backups after patching
find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
%{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
-%ifarch i486 i686 ppc sparc alpha athlon
+%ifarch i386 i586 i686 ppc sparc alpha athlon
%define _ftp_arch %{_target_cpu}
%else
%ifarch %{x8664}
-%define _ftp_arch x86_64
+%define _ftp_arch amd64
%define _ftp_alt_arch i686
%else
-%ifarch i586
-%define _ftp_arch i486
+%ifarch i486
+%define _ftp_arch i386
%else
%ifarch pentium2 pentium3 pentium4
%define _ftp_arch i686