summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/Config.in7
-rw-r--r--package/Depends.mk2
-rw-r--r--package/Makefile4
-rw-r--r--package/base-files/extra/etc/profile2
-rw-r--r--package/busybox/config/Config.in28
-rw-r--r--package/make/Config.in6
-rw-r--r--package/make/Makefile27
-rw-r--r--package/nspr/Config.in5
-rw-r--r--package/nspr/Makefile30
-rw-r--r--package/nss/Config.in5
-rw-r--r--package/nss/Makefile43
-rw-r--r--package/nss/patches/patch-mozilla_security_coreconf_Linux_mk15
-rw-r--r--package/nss/patches/patch-mozilla_security_coreconf_arch_mk11
-rw-r--r--package/nss/patches/patch-mozilla_security_coreconf_arch_mk.orig11
-rw-r--r--package/nss/patches/patch-mozilla_security_coreconf_nsinstall_Makefile13
-rw-r--r--package/nss/patches/patch-mozilla_security_nss_cmd_shlibsign_sign_sh11
-rw-r--r--package/patch/Config.in6
-rw-r--r--package/patch/Makefile27
-rw-r--r--package/patch/patches/patch-Makefile_in18
-rw-r--r--package/rpm/Config.in11
-rw-r--r--package/rpm/Makefile37
-rw-r--r--package/rpm/patches/patch-config_guess207
-rw-r--r--package/rpm/patches/patch-config_sub180
-rw-r--r--package/rpm/patches/patch-configure11
-rw-r--r--package/rpm/patches/patch-rpmio_fts_c12
-rw-r--r--package/rpm/patches/patch-rpmio_rpmio_h12
-rw-r--r--package/rpm/patches/patch-rpmio_rpmio_h.orig22
-rw-r--r--package/rpm/patches/patch-rpmio_rpmsq_c132
-rw-r--r--package/rpm/patches/patch-rpmio_rpmsq_c.orig30
29 files changed, 909 insertions, 16 deletions
diff --git a/package/Config.in b/package/Config.in
index d080a2d3c..3ea7feac5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -12,6 +12,7 @@ source "package/cfgfs/Config.in"
source "package/uclibc/Config.in"
source "package/glibc/Config.in"
source "package/libc/Config.in"
+source "package/rpm/Config.in"
endmenu
menu "Bluetooth"
@@ -141,7 +142,8 @@ source "package/comgt/Config.in"
source "package/fbset/Config.in"
source "package/file/Config.in"
source "package/hdparm/Config.in"
-source "package/usbutils/Config.in" # lsusb
+source "package/usbutils/Config.in"
+source "package/patch/Config.in"
source "package/pciutils/Config.in"
source "package/procps/Config.in"
source "package/sispmctl/Config.in"
@@ -350,6 +352,7 @@ source "package/gcc/Config.in"
source "package/haserl/Config.in"
source "package/jamvm/Config.in"
source "package/lua/Config.in"
+source "package/make/Config.in"
source "package/microperl/Config.in"
source "package/php/Config.in"
source "package/ruby/Config.in"
@@ -397,6 +400,8 @@ source "package/libid3tag/Config.in"
source "package/jpeg/Config.in" # libjpeg
source "package/lame/Config.in.lib" # libltdl
source "package/mpfr/Config.in"
+source "package/nspr/Config.in"
+source "package/nss/Config.in"
source "package/libtool/Config.in" # libltdl
source "package/openldap/Config.in.lib"
source "package/liblzo/Config.in"
diff --git a/package/Depends.mk b/package/Depends.mk
index 25d58ab58..9a45f5823 100644
--- a/package/Depends.mk
+++ b/package/Depends.mk
@@ -182,6 +182,8 @@ raddump-compile: openssl-compile libpcap-compile
radiusclient-ng-compile: openssl-compile
rarpd-compile: libnet-compile
readline-compile: ncurses-compile
+nss-compile: nspr-compile zlib-compile
+rpm-compile: nss-compile libdb-compile
rrdcollect-compile: rrdtool-compile
rrdtool-compile: libxml2-compile cgilib-compile freetype-compile libart-compile libpng-compile
rsync-compile: popt-compile
diff --git a/package/Makefile b/package/Makefile
index 9e3209630..5245918fb 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -223,6 +223,7 @@ package-$(ADK_COMPILE_LUA) += lua
package-$(ADK_COMPILE_LVM) += lvm
package-$(ADK_PACKAGE_MACCHANGER) += macchanger
package-$(ADK_PACKAGE_MADPLAY) += madplay
+package-$(ADK_PACKAGE_MAKE) += make
package-$(ADK_PACKAGE_MARADNS) += maradns
package-$(ADK_PACKAGE_MGETTY) += mgetty
package-$(ADK_PACKAGE_MC) += mc
@@ -258,6 +259,7 @@ package-$(ADK_PACKAGE_NFS_UTILS) += nfs-utils
package-$(ADK_PACKAGE_NFS_KERNEL_NFSD) += nfs-utils
package-$(ADK_PACKAGE_NMAP) += nmap
package-$(ADK_PACKAGE_NTPCLIENT) += ntpclient
+package-$(ADK_PACKAGE_NSS) += nss
package-$(ADK_PACKAGE_OBEXFTP) += obexftp
package-$(ADK_PACKAGE_OLSRD) += olsrd
package-$(ADK_COMPILE_OPENCDK) += opencdk
@@ -278,6 +280,7 @@ package-$(ADK_PACKAGE_OWFS) += owfs
package-$(ADK_PACKAGE_P910ND) += p910nd
package-$(ADK_PACKAGE_PALANTIR) += palantir
package-$(ADK_PACKAGE_PARPROUTED) += parprouted
+package-$(ADK_PACKAGE_PATCH) += patch
package-$(ADK_PACKAGE_PCIUTILS) += pciutils
package-$(ADK_COMPILE_PCRE) += pcre
package-$(ADK_COMPILE_PHP) += php
@@ -307,6 +310,7 @@ package-$(ADK_PACKAGE_REAIM) += reaim
package-$(ADK_PACKAGE_RENDERPROTO) += renderproto
package-$(ADK_PACKAGE_RESOURCEPROTO) += resourceproto
package-$(ADK_COMPILE_RP_PPPOE) += rp-pppoe
+package-$(ADK_PACKAGE_RPM) += rpm
package-$(ADK_PACKAGE_RRDCOLLECT) += rrdcollect
package-$(ADK_COMPILE_RRDTOOL) += rrdtool
package-$(ADK_PACKAGE_RUBY) += ruby
diff --git a/package/base-files/extra/etc/profile b/package/base-files/extra/etc/profile
index 55002b01f..798548a46 100644
--- a/package/base-files/extra/etc/profile
+++ b/package/base-files/extra/etc/profile
@@ -9,4 +9,4 @@ cat /etc/banner 2>&-
[ -x /usr/bin/less ] || alias less=more
[ -x /usr/bin/vim ] || alias vim=vi
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
-[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 /lib/ld.so "$@"; }
+[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 "$@"; }
diff --git a/package/busybox/config/Config.in b/package/busybox/config/Config.in
index b41788be0..0426f7288 100644
--- a/package/busybox/config/Config.in
+++ b/package/busybox/config/Config.in
@@ -273,20 +273,20 @@ endmenu
menu 'Build Options'
-#config BUSYBOX_STATIC
-# bool "Build BusyBox as a static binary (no shared libs)"
-# default n
-# help
-# If you want to build a static BusyBox binary, which does not
-# use or require any shared libraries, then enable this option.
-# This can cause BusyBox to be considerably larger, so you should
-# leave this option false unless you have a good reason (i.e.
-# your target platform does not support shared libraries, or
-# you are building an initrd which doesn't need anything but
-# BusyBox, etc).
-#
-# Most people will leave this set to 'N'.
-#
+config BUSYBOX_STATIC
+ bool "Build BusyBox as a static binary (no shared libs)"
+ default n
+ help
+ If you want to build a static BusyBox binary, which does not
+ use or require any shared libraries, then enable this option.
+ This can cause BusyBox to be considerably larger, so you should
+ leave this option false unless you have a good reason (i.e.
+ your target platform does not support shared libraries, or
+ you are building an initrd which doesn't need anything but
+ BusyBox, etc).
+
+ Most people will leave this set to 'N'.
+
#config BUSYBOX_PIE
# bool "Build BusyBox as a position independent executable"
# default n
diff --git a/package/make/Config.in b/package/make/Config.in
new file mode 100644
index 000000000..6fe261e4c
--- /dev/null
+++ b/package/make/Config.in
@@ -0,0 +1,6 @@
+config ADK_PACKAGE_MAKE
+ prompt "make.............................. GNU make"
+ tristate
+ default n
+ help
+ GNU make
diff --git a/package/make/Makefile b/package/make/Makefile
new file mode 100644
index 000000000..e8af2ed26
--- /dev/null
+++ b/package/make/Makefile
@@ -0,0 +1,27 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= make
+PKG_VERSION:= 3.81
+PKG_RELEASE:= 1
+PKG_MD5SUM:= a4e9494ac6dc3f6b0c5ff75c5d52abba
+PKG_DESCR:= GNU make
+PKG_SECTION:= misc
+PKG_URL:= http://www.gnu.org/software/make
+PKG_SITES:= ${MASTER_SITE_GNU:=make/}
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,MAKE,make,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_STYLE= gnu
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_MAKE)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/make $(IDIR_MAKE)/usr/bin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/nspr/Config.in b/package/nspr/Config.in
new file mode 100644
index 000000000..9cc1e9cbb
--- /dev/null
+++ b/package/nspr/Config.in
@@ -0,0 +1,5 @@
+config ADK_PACKAGE_NSPR
+ prompt "nspr.............................. Red Hat package manager"
+ tristate
+ default n
+ help
diff --git a/package/nspr/Makefile b/package/nspr/Makefile
new file mode 100644
index 000000000..aa6a168bd
--- /dev/null
+++ b/package/nspr/Makefile
@@ -0,0 +1,30 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= nspr
+PKG_VERSION:= 4.8
+PKG_RELEASE:= 1
+PKG_MD5SUM:= e0916a72bcc6c427551ea262183fdb26
+PKG_DESCR:= NSPR library
+PKG_SECTION:= libs
+PKG_URL:= http://www.mozilla.org/projects/nspr/
+PKG_SITES:= https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8/src/
+
+WRKSRC= ${WRKDIST}/mozilla/nsprpub
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,NSPR,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_ENV+= HOST_CC="${HOSTCC}" HOST_CFLAGS="${HOSTCFLAGS}"
+CONFIGURE_STYLE= gnu
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_NSPR)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/*.so* $(IDIR_NSPR)/usr/lib
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/nss/Config.in b/package/nss/Config.in
new file mode 100644
index 000000000..06c56929e
--- /dev/null
+++ b/package/nss/Config.in
@@ -0,0 +1,5 @@
+config ADK_PACKAGE_NSS
+ prompt "nss............................... NSS library"
+ tristate
+ default n
+ help
diff --git a/package/nss/Makefile b/package/nss/Makefile
new file mode 100644
index 000000000..a837cd8d9
--- /dev/null
+++ b/package/nss/Makefile
@@ -0,0 +1,43 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= nss
+PKG_VERSION:= 3.12.3
+PKG_RELEASE:= 1
+PKG_MD5SUM:= ecb7079ba4ebcf29b7716775384f1f18
+PKG_DESCR:= Network Security Services (NSS) library
+PKG_SECTION:= libs
+PKG_URL:= http://www.mozilla.org/projects/security/pki/nss/
+PKG_SITES:= ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_3_RTM/src/
+
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+WRKSRC= ${WRKDIST}/mozilla/security/nss
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,NSS,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+ifeq ($(ADK_LINUX_64),y)
+TCFLAGS+= -DUSE_64
+MAKE_FLAGS+= USE_64=1
+endif
+
+MAKE_FLAGS+= NATIVE_CC="${HOSTCC}" NATIVE_FLAGS="${HOSTCFLAGS}" NATIVE_LDFLAGS="${HOSTLDFLAGS}"
+TCPPFLAGS+= -I${STAGING_DIR}/usr/include/nspr
+TCFLAGS+= -I${STAGING_DIR}/usr/include/nspr
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+MAKE_FLAGS+= SOURCE_MD_DIR=${WRKDIST}/dist DIST=${WRKDIST}/dist NSS_DISABLE_DBM=1 OS_TEST=${ARCH} \
+ ARCHFLAG="${TCFLAGS} ${TCPPFLAGS}"
+ALL_TARGET:= build_coreconf all
+XAKE_FLAGS+= OS_TEST=${ARCH} NSS_DISABLE_DBM=1
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_NSS)/usr/lib
+ ${INSTALL_DATA} ${WRKDIST}/dist/lib/*.so $(IDIR_NSS)/usr/lib
+ ${INSTALL_DIR} ${STAGING_DIR}/usr/include/nss
+ ${INSTALL_DATA} ${WRKDIST}/mozilla/dist/public/nss/* ${STAGING_DIR}/usr/include/nss
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/nss/patches/patch-mozilla_security_coreconf_Linux_mk b/package/nss/patches/patch-mozilla_security_coreconf_Linux_mk
new file mode 100644
index 000000000..cce23e2ee
--- /dev/null
+++ b/package/nss/patches/patch-mozilla_security_coreconf_Linux_mk
@@ -0,0 +1,15 @@
+--- nss-3.12.3.orig/mozilla/security/coreconf/Linux.mk 2008-09-06 01:17:23.000000000 +0200
++++ nss-3.12.3/mozilla/security/coreconf/Linux.mk 2009-06-24 19:11:27.470840369 +0200
+@@ -46,9 +46,9 @@ ifeq ($(USE_PTHREADS),1)
+ IMPL_STRATEGY = _PTH
+ endif
+
+-CC = gcc
+-CCC = g++
+-RANLIB = ranlib
++CC ?= gcc
++CCC ?= g++
++RANLIB ?= ranlib
+
+ DEFAULT_COMPILER = gcc
+
diff --git a/package/nss/patches/patch-mozilla_security_coreconf_arch_mk b/package/nss/patches/patch-mozilla_security_coreconf_arch_mk
new file mode 100644
index 000000000..1ebf69cc9
--- /dev/null
+++ b/package/nss/patches/patch-mozilla_security_coreconf_arch_mk
@@ -0,0 +1,11 @@
+--- nss-3.12.3.orig/mozilla/security/coreconf/arch.mk 2009-03-11 19:54:24.000000000 +0100
++++ nss-3.12.3/mozilla/security/coreconf/arch.mk 2009-06-24 21:46:32.910214640 +0200
+@@ -329,7 +329,7 @@ endif
+ # IMPL_STRATEGY may be defined too.
+ #
+
+-OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
++OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(LIBC_TAG).OBJ
+
+ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+ ifndef BUILD_OPT
diff --git a/package/nss/patches/patch-mozilla_security_coreconf_arch_mk.orig b/package/nss/patches/patch-mozilla_security_coreconf_arch_mk.orig
new file mode 100644
index 000000000..20af1c767
--- /dev/null
+++ b/package/nss/patches/patch-mozilla_security_coreconf_arch_mk.orig
@@ -0,0 +1,11 @@
+--- nss-3.12.3.orig/mozilla/security/coreconf/arch.mk 2009-03-11 19:54:24.000000000 +0100
++++ nss-3.12.3/mozilla/security/coreconf/arch.mk 2009-06-24 21:38:51.010734431 +0200
+@@ -329,7 +329,7 @@ endif
+ # IMPL_STRATEGY may be defined too.
+ #
+
+-OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
++OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(LIBC_TAG)$(OBJDIR_TAG).OBJ
+
+ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+ ifndef BUILD_OPT
diff --git a/package/nss/patches/patch-mozilla_security_coreconf_nsinstall_Makefile b/package/nss/patches/patch-mozilla_security_coreconf_nsinstall_Makefile
new file mode 100644
index 000000000..db87f018b
--- /dev/null
+++ b/package/nss/patches/patch-mozilla_security_coreconf_nsinstall_Makefile
@@ -0,0 +1,13 @@
+--- nss-3.12.3.orig/mozilla/security/coreconf/nsinstall/Makefile 2005-10-06 00:25:37.000000000 +0200
++++ nss-3.12.3/mozilla/security/coreconf/nsinstall/Makefile 2009-06-24 19:48:52.858310011 +0200
+@@ -65,6 +65,10 @@ ifdef NATIVE_FLAGS
+ OS_CFLAGS=$(NATIVE_FLAGS)
+ endif
+
++ifdef NATIVE_LDFLAGS
++LDFLAGS=$(NATIVE_LDFLAGS)
++endif
++
+ include $(DEPTH)/coreconf/rules.mk
+
+ # Redefine MAKE_OBJDIR for just this directory
diff --git a/package/nss/patches/patch-mozilla_security_nss_cmd_shlibsign_sign_sh b/package/nss/patches/patch-mozilla_security_nss_cmd_shlibsign_sign_sh
new file mode 100644
index 000000000..9c643dacf
--- /dev/null
+++ b/package/nss/patches/patch-mozilla_security_nss_cmd_shlibsign_sign_sh
@@ -0,0 +1,11 @@
+--- nss-3.12.3.orig/mozilla/security/nss/cmd/shlibsign/sign.sh 2006-01-18 21:56:28.000000000 +0100
++++ nss-3.12.3/mozilla/security/nss/cmd/shlibsign/sign.sh 2009-06-24 21:27:49.462838938 +0200
+@@ -53,6 +53,7 @@ OpenVMS)
+ ADDON_PATH=${1}/lib:${4}:$ADDON_PATH
+ export ADDON_PATH
+ echo ${2}/shlibsign -v -i ${5}
+- ${2}/shlibsign -v -i ${5}
++ #disable for cross-compile
++ #${2}/shlibsign -v -i ${5}
+ ;;
+ esac
diff --git a/package/patch/Config.in b/package/patch/Config.in
new file mode 100644
index 000000000..651abdde9
--- /dev/null
+++ b/package/patch/Config.in
@@ -0,0 +1,6 @@
+config ADK_PACKAGE_PATCH
+ prompt "patch............................. patch"
+ tristate
+ default n
+ help
+ patch
diff --git a/package/patch/Makefile b/package/patch/Makefile
new file mode 100644
index 000000000..80a608f0d
--- /dev/null
+++ b/package/patch/Makefile
@@ -0,0 +1,27 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= patch
+PKG_VERSION:= 2.5.9
+PKG_RELEASE:= 1
+PKG_MD5SUM:= dacfb618082f8d3a2194601193cf8716
+PKG_DESCR:= GNU patch
+PKG_SECTION:= misc
+PKG_URL:= http://www.gnu.org/software/patch
+PKG_SITES:= ${MASTER_SITE_GNU:=patch/}
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,PATCH,patch,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_STYLE= gnu
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_PATCH)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/patch $(IDIR_PATCH)/usr/bin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/patch/patches/patch-Makefile_in b/package/patch/patches/patch-Makefile_in
new file mode 100644
index 000000000..eab39b6e8
--- /dev/null
+++ b/package/patch/patches/patch-Makefile_in
@@ -0,0 +1,18 @@
+--- patch-2.5.9.orig/Makefile.in 2003-05-20 18:15:48.000000000 +0200
++++ patch-2.5.9/Makefile.in 2009-06-13 22:52:33.487310060 +0200
+@@ -112,11 +112,11 @@ patch$(EXEEXT): $(OBJS)
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
+
+ install:: all installdirs
+- $(INSTALL_PROGRAM) patch$(EXEEXT) $(bindir)/$(patch_name)$(EXEEXT)
+- -$(INSTALL_DATA) $(srcdir)/patch.man $(man1dir)/$(patch_name)$(man1ext)
++ $(INSTALL_PROGRAM) patch$(EXEEXT) $(DESTDIR)/$(bindir)/$(patch_name)$(EXEEXT)
++ -$(INSTALL_DATA) $(srcdir)/patch.man $(DESTDIR)/$(man1dir)/$(patch_name)$(man1ext)
+
+-installdirs::
+- $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(man1dir)
++installdirs:
++ $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(man1dir)
+
+ install-strip::
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
diff --git a/package/rpm/Config.in b/package/rpm/Config.in
new file mode 100644
index 000000000..c84884a08
--- /dev/null
+++ b/package/rpm/Config.in
@@ -0,0 +1,11 @@
+config ADK_PACKAGE_RPM
+ prompt "rpm............................... Red Hat package manager"
+ tristate
+ depends on ADK_CXX
+ select ADK_PACKAGE_NSS
+ select ADK_PACKAGE_NSPR
+ select ADK_PACKAGE_ZLIB
+ select ADK_PACKAGE_LIBDB
+ default n
+ help
+ Red Hat package manager
diff --git a/package/rpm/Makefile b/package/rpm/Makefile
new file mode 100644
index 000000000..c7cf91c97
--- /dev/null
+++ b/package/rpm/Makefile
@@ -0,0 +1,37 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= rpm
+PKG_VERSION:= 4.7.0
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 74791d638c571ec79f06227d453a6a03
+PKG_DESCR:= GNU rpm
+PKG_SECTION:= base
+PKG_URL:= http://www.rpm.org
+PKG_SITES:= http://rpm.org/releases/rpm-4.7.x/
+
+DISTFILES:= ${PKG_NAME}-$(PKG_VERSION).tar.bz2
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,RPM,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+TCPPFLAGS+= -I${STAGING_DIR}/usr/include/nspr \
+ -I${STAGING_DIR}/usr/include/nss
+CONFIGURE_STYLE:= gnu
+CONFIGURE_ARGS:= --with-external-db \
+ --without-lua
+BUILD_STYLE:= auto
+INSTALL_STYLE:= auto
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_RPM)/usr/bin $(IDIR_RPM)/usr/lib
+ $(INSTALL_DIR) $(IDIR_RPM)/usr/lib/rpm
+ $(INSTALL_BIN) $(WRKINST)/bin/rpm $(IDIR_RPM)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/rpm* $(IDIR_RPM)/usr/bin
+ $(CP) $(WRKINST)/usr/lib/*.so* $(IDIR_RPM)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/rpm/* $(IDIR_RPM)/usr/lib/rpm
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/rpm/patches/patch-config_guess b/package/rpm/patches/patch-config_guess
new file mode 100644
index 000000000..b5ec8f21a
--- /dev/null
+++ b/package/rpm/patches/patch-config_guess
@@ -0,0 +1,207 @@
+--- rpm-4.7.0.orig/config.guess 2008-08-30 00:27:10.000000000 +0200
++++ rpm-4.7.0/config.guess 2009-06-11 17:31:39.670840385 +0200
+@@ -4,7 +4,7 @@
+ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ # Free Software Foundation, Inc.
+
+-timestamp='2008-01-23'
++timestamp='2008-09-28'
+
+ # This file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by
+@@ -139,6 +139,23 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
+ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
++if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
++ eval $set_cc_for_build
++ cat << EOF > $dummy.c
++ #include <features.h>
++ #ifdef __UCLIBC__
++ # ifdef __UCLIBC_CONFIG_VERSION__
++ LIBC=uclibc __UCLIBC_CONFIG_VERSION__
++ # else
++ LIBC=uclibc
++ # endif
++ #else
++ LIBC=gnu
++ #endif
++EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
++fi
++
+ # Note: order is significant - the case branches are not exclusive.
+
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -796,7 +813,7 @@ EOF
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+- EM64T | authenticamd)
++ EM64T | authenticamd | genuineintel)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+@@ -840,31 +857,31 @@ EOF
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+- echo cris-axis-linux-gnu
++ echo cris-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+- echo crisv32-axis-linux-gnu
++ echo crisv32-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+- echo frv-unknown-linux-gnu
++ echo frv-unknown-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+@@ -887,7 +904,7 @@ EOF
+ s: ::g
+ p
+ }'`"
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+@@ -910,16 +927,16 @@ EOF
+ s: ::g
+ p
+ }'`"
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ or32:Linux:*:*)
+- echo or32-unknown-linux-gnu
++ echo or32-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+- echo powerpc-unknown-linux-gnu
++ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64:Linux:*:*)
+- echo powerpc64-unknown-linux-gnu
++ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+@@ -932,40 +949,43 @@ EOF
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ padre:Linux:*:*)
++ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+- PA7*) echo hppa1.1-unknown-linux-gnu ;;
+- PA8*) echo hppa2.0-unknown-linux-gnu ;;
+- *) echo hppa-unknown-linux-gnu ;;
++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
++ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+- echo hppa64-unknown-linux-gnu
++ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+- echo ${UNAME_MACHINE}-dec-linux-gnu
++ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+- echo x86_64-unknown-linux-gnu
++ echo x86_64-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+@@ -980,20 +1000,19 @@ EOF
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
++ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
+ ;;
+ a.out-i386-linux)
+- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+- exit ;;
+- coff-i386)
+- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
+ exit ;;
+ esac
++ # This should get integrated into the C code below, but now we hack
++ if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+@@ -1216,6 +1235,9 @@ EOF
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
++ echo i586-pc-haiku
++ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
diff --git a/package/rpm/patches/patch-config_sub b/package/rpm/patches/patch-config_sub
new file mode 100644
index 000000000..3b14117be
--- /dev/null
+++ b/package/rpm/patches/patch-config_sub
@@ -0,0 +1,180 @@
+--- rpm-4.7.0.orig/config.sub 2008-08-30 00:27:10.000000000 +0200
++++ rpm-4.7.0/config.sub 2009-06-11 17:31:39.670840385 +0200
+@@ -4,7 +4,7 @@
+ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ # Free Software Foundation, Inc.
+
+-timestamp='2008-01-16'
++timestamp='2008-09-08'
+
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -244,18 +244,20 @@ case $basic_machine in
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+- | d10v | d30v | dlx | dsp16xx \
++ | d10v | d30v | dlx | dsp16xx | dvp \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+- | maxq | mb | microblaze | mcore | mep \
++ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+- | mips64vr | mips64vrel \
++ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
++ | mips64r5900 | mips64r5900el \
++ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+@@ -277,7 +279,7 @@ case $basic_machine in
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | score \
+- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
++ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+@@ -286,7 +288,7 @@ case $basic_machine in
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+- | z8k)
++ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+@@ -331,12 +333,14 @@ case $basic_machine in
+ | ip2k-* | iq2000-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+- | m88110-* | m88k-* | maxq-* | mcore-* \
++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+- | mips64vr-* | mips64vrel-* \
++ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
++ | mips64r5900-* | mips64r5900el-* \
++ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+@@ -358,20 +362,20 @@ case $basic_machine in
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+- | z8k-*)
++ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+@@ -459,6 +463,10 @@ case $basic_machine in
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
++ cegcc)
++ basic_machine=arm-unknown
++ os=-cegcc
++ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+@@ -526,6 +534,10 @@ case $basic_machine in
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
++ dicos)
++ basic_machine=i686-pc
++ os=-dicos
++ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+@@ -714,6 +726,24 @@ case $basic_machine in
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
++ mipsEE* | ee | ps2)
++ basic_machine=mips64r5900el-scei
++ case $os in
++ -linux*)
++ ;;
++ *)
++ os=-elf
++ ;;
++ esac
++ ;;
++ iop)
++ basic_machine=mipsel-scei
++ os=-irx
++ ;;
++ dvp)
++ basic_machine=dvp-scei
++ os=-elf
++ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+@@ -1128,6 +1158,10 @@ case $basic_machine in
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
++ z80-*-coff)
++ basic_machine=z80-unknown
++ os=-sim
++ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+@@ -1248,7 +1282,7 @@ case $os in
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+- | -chorusos* | -chorusrdb* \
++ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+@@ -1258,7 +1292,7 @@ case $os in
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+@@ -1388,6 +1422,9 @@ case $os in
+ -zvmoe)
+ os=-zvmoe
+ ;;
++ -dicos*)
++ os=-dicos
++ ;;
+ -none)
+ ;;
+ *)
diff --git a/package/rpm/patches/patch-configure b/package/rpm/patches/patch-configure
new file mode 100644
index 000000000..7602cc370
--- /dev/null
+++ b/package/rpm/patches/patch-configure
@@ -0,0 +1,11 @@
+--- rpm-4.7.0.orig/configure 2009-04-16 10:10:33.000000000 +0200
++++ rpm-4.7.0/configure 2009-06-23 19:55:16.747272696 +0200
+@@ -21839,7 +21839,7 @@ if test "$GCC" = yes; then
+ CFLAGS="$CFLAGS -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wno-char-subscripts"
+ # XXX disabled for now due to noise from NSPR headers
+ # CFLAGS="$CFLAGS -Wstrict-prototypes"
+- cflags_to_try="-fno-strict-aliasing -fstack-protector"
++ cflags_to_try="-fno-strict-aliasing"
+ { $as_echo "$as_me:$LINENO: checking supported compiler flags" >&5
+ $as_echo_n "checking supported compiler flags... " >&6; }
+ old_cflags=$CFLAGS
diff --git a/package/rpm/patches/patch-rpmio_fts_c b/package/rpm/patches/patch-rpmio_fts_c
new file mode 100644
index 000000000..90bed89de
--- /dev/null
+++ b/package/rpm/patches/patch-rpmio_fts_c
@@ -0,0 +1,12 @@
+--- rpm-4.7.0.orig/rpmio/fts.c 2009-03-03 07:51:52.000000000 +0100
++++ rpm-4.7.0/rpmio/fts.c 2009-06-25 20:23:10.374967519 +0200
+@@ -64,6 +64,9 @@ static char sccsid[] = "@(#)fts.c 8.6 (B
+ #include "rpmio/fts.h"
+ #include <rpm/rpmio.h>
+ #include <rpm/rpmurl.h>
++#ifdef __UCLIBC__
++# define __fxstat64(_stat_ver, _fd, _sbp) fstat64((_fd), (_sbp))
++#endif
+ # define __set_errno(val) (*__errno_location ()) = (val)
+ # define __open open
+ # define __close close
diff --git a/package/rpm/patches/patch-rpmio_rpmio_h b/package/rpm/patches/patch-rpmio_rpmio_h
new file mode 100644
index 000000000..bb7c0b073
--- /dev/null
+++ b/package/rpm/patches/patch-rpmio_rpmio_h
@@ -0,0 +1,12 @@
+--- rpm-4.7.0.orig/rpmio/rpmio.h 2009-03-03 07:51:52.000000000 +0100
++++ rpm-4.7.0/rpmio/rpmio.h 2009-06-25 20:22:25.734966728 +0200
+@@ -26,7 +26,8 @@ extern "C" {
+ * typedefs to isolate the lossage.
+ */
+ #if defined(__GLIBC__) && \
+- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
++ (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && \
++ !defined(__UCLIBC__)
+ #define USE_COOKIE_SEEK_POINTER 1
+ typedef _IO_off64_t _libio_off_t;
+ typedef _libio_off_t * _libio_pos_t;
diff --git a/package/rpm/patches/patch-rpmio_rpmio_h.orig b/package/rpm/patches/patch-rpmio_rpmio_h.orig
new file mode 100644
index 000000000..a2d2d8572
--- /dev/null
+++ b/package/rpm/patches/patch-rpmio_rpmio_h.orig
@@ -0,0 +1,22 @@
+--- rpm-4.7.0.orig/rpmio/rpmio.h 2009-03-03 07:51:52.000000000 +0100
++++ rpm-4.7.0/rpmio/rpmio.h 2009-06-25 19:32:01.343208721 +0200
+@@ -25,15 +25,19 @@ extern "C" {
+ * argument as a pointer rather than as an off_t. The snarl below defines
+ * typedefs to isolate the lossage.
+ */
++/*
+ #if defined(__GLIBC__) && \
+ (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
+ #define USE_COOKIE_SEEK_POINTER 1
+ typedef _IO_off64_t _libio_off_t;
+ typedef _libio_off_t * _libio_pos_t;
+ #else
++*/
+ typedef off_t _libio_off_t;
+ typedef off_t _libio_pos_t;
++/*
+ #endif
++*/
+
+ /** \ingroup rpmio
+ */
diff --git a/package/rpm/patches/patch-rpmio_rpmsq_c b/package/rpm/patches/patch-rpmio_rpmsq_c
new file mode 100644
index 000000000..779101b62
--- /dev/null
+++ b/package/rpm/patches/patch-rpmio_rpmsq_c
@@ -0,0 +1,132 @@
+--- rpm-4.7.0.orig/rpmio/rpmsq.c 2009-03-03 07:51:52.000000000 +0100
++++ rpm-4.7.0/rpmio/rpmsq.c 2009-06-25 20:15:31.954966249 +0200
+@@ -83,6 +83,7 @@ static rpmsq rpmsqQueue = &rpmsqRock;
+ */
+ static int rpmsqInsert(void * elem, void * prev)
+ {
++ sigset_t new_set, old_set;
+ rpmsq sq = (rpmsq) elem;
+ int ret = -1;
+
+@@ -91,7 +92,9 @@ static int rpmsqInsert(void * elem, void
+ if (_rpmsq_debug)
+ fprintf(stderr, " Insert(%p): %p\n", ME(), sq);
+ #endif
+- ret = sighold(SIGCHLD);
++ sigemptyset(&new_set);
++ sigaddset(&new_set, SIGCHLD);
++ ret = sigprocmask(SIG_BLOCK, &new_set, &old_set);
+ if (ret == 0) {
+ sq->child = 0;
+ sq->reaped = 0;
+@@ -102,7 +105,7 @@ fprintf(stderr, " Insert(%p): %p\n",
+ sq->id = ME();
+ ret = pthread_mutex_init(&sq->mutex, NULL);
+ insque(elem, (prev != NULL ? prev : rpmsqQueue));
+- ret = sigrelse(SIGCHLD);
++ ret = sigprocmask(SIG_SETMASK, &old_set, NULL);
+ }
+ }
+ return ret;
+@@ -115,6 +118,7 @@ fprintf(stderr, " Insert(%p): %p\n",
+ */
+ static int rpmsqRemove(void * elem)
+ {
++ sigset_t new_set, old_set;
+ rpmsq sq = (rpmsq) elem;
+ int ret = -1;
+
+@@ -124,7 +128,9 @@ static int rpmsqRemove(void * elem)
+ if (_rpmsq_debug)
+ fprintf(stderr, " Remove(%p): %p\n", ME(), sq);
+ #endif
+- ret = sighold (SIGCHLD);
++ sigemptyset(&new_set);
++ sigaddset(&new_set, SIGCHLD);
++ ret = sigprocmask(SIG_BLOCK, &new_set, &old_set);
+ if (ret == 0) {
+ remque(elem);
+
+@@ -142,7 +148,7 @@ fprintf(stderr, " Remove(%p): %p\n",
+ sq->reaped = 0;
+ sq->child = 0;
+ #endif
+- ret = sigrelse(SIGCHLD);
++ ret = sigprocmask(SIG_SETMASK, &old_set, NULL);
+ }
+ }
+ return ret;
+@@ -289,6 +295,7 @@ int rpmsqEnable(int signum, rpmsqAction_
+
+ pid_t rpmsqFork(rpmsq sq)
+ {
++ sigset_t new_set, old_set;
+ pid_t pid;
+ int xx;
+ int nothreads = 0; /* XXX: Shouldn't this be a global? */
+@@ -304,7 +311,9 @@ fprintf(stderr, " Enable(%p): %p\n",
+
+ xx = pipe(sq->pipes);
+
+- xx = sighold(SIGCHLD);
++ sigemptyset(&new_set);
++ sigaddset(&new_set, SIGCHLD);
++ xx = sigprocmask(SIG_BLOCK, &new_set, &old_set);
+
+ /*
+ * Initialize the cond var mutex. We have to aquire the lock we
+@@ -355,7 +364,7 @@ fprintf(stderr, " Parent(%p): %p chil
+ }
+
+ out:
+- xx = sigrelse(SIGCHLD);
++ xx = sigprocmask(SIG_SETMASK, &old_set, NULL);
+ return sq->child;
+ }
+
+@@ -367,12 +376,15 @@ out:
+ */
+ static int rpmsqWaitUnregister(rpmsq sq)
+ {
++ sigset_t new_set, old_set;
+ int nothreads = 0;
+ int ret = 0;
+ int xx;
+
+ /* Protect sq->reaped from handler changes. */
+- ret = sighold(SIGCHLD);
++ sigemptyset(&new_set);
++ sigaddset(&new_set, SIGCHLD);
++ ret = sigprocmask(SIG_BLOCK, &new_set, &old_set);
+
+ /* Start the child, linux often runs child before parent. */
+ if (sq->pipes[0] >= 0)
+@@ -388,9 +400,9 @@ static int rpmsqWaitUnregister(rpmsq sq)
+ while (ret == 0 && sq->reaped != sq->child) {
+ if (nothreads)
+ /* Note that sigpause re-enables SIGCHLD. */
+- ret = sigpause(SIGCHLD);
++ ret = sigsuspend(&new_set);
+ else {
+- xx = sigrelse(SIGCHLD);
++ xx = sigprocmask(SIG_SETMASK, &old_set, NULL);
+
+ /*
+ * We start before the fork with this mutex locked;
+@@ -398,14 +410,14 @@ static int rpmsqWaitUnregister(rpmsq sq)
+ * So if we get the lock the child has been reaped.
+ */
+ ret = pthread_mutex_lock(&sq->mutex);
+- xx = sighold(SIGCHLD);
++ xx = sigprocmask(SIG_BLOCK, &new_set, &old_set);
+ }
+ }
+
+ /* Accumulate stopwatch time spent waiting, potential performance gain. */
+ sq->ms_scriptlets += rpmswExit(&sq->op, -1)/1000;
+
+- xx = sigrelse(SIGCHLD);
++ xx = sigprocmask(SIG_SETMASK, &old_set, NULL);
+
+ #ifdef _RPMSQ_DEBUG
+ if (_rpmsq_debug)
diff --git a/package/rpm/patches/patch-rpmio_rpmsq_c.orig b/package/rpm/patches/patch-rpmio_rpmsq_c.orig
new file mode 100644
index 000000000..c192ed276
--- /dev/null
+++ b/package/rpm/patches/patch-rpmio_rpmsq_c.orig
@@ -0,0 +1,30 @@
+--- rpm-4.7.0.orig/rpmio/rpmsq.c 2009-03-03 07:51:52.000000000 +0100
++++ rpm-4.7.0/rpmio/rpmsq.c 2009-06-25 20:02:58.903020248 +0200
+@@ -115,6 +115,7 @@ fprintf(stderr, " Insert(%p): %p\n",
+ */
+ static int rpmsqRemove(void * elem)
+ {
++ sigset_t new_set, old_set;
+ rpmsq sq = (rpmsq) elem;
+ int ret = -1;
+
+@@ -124,7 +125,9 @@ static int rpmsqRemove(void * elem)
+ if (_rpmsq_debug)
+ fprintf(stderr, " Remove(%p): %p\n", ME(), sq);
+ #endif
+- ret = sighold (SIGCHLD);
++ sigemptyset( &new_set );
++ sigaddset( &new_set, SIGCHLD );
++ ret = sigprocmask(SIG_BLOCK, &new_set, &old_set);
+ if (ret == 0) {
+ remque(elem);
+
+@@ -142,7 +145,7 @@ fprintf(stderr, " Remove(%p): %p\n",
+ sq->reaped = 0;
+ sq->child = 0;
+ #endif
+- ret = sigrelse(SIGCHLD);
++ ret = sigprocmask( SIG_SETMASK, &old_set, NULL );
+ }
+ }
+ return ret;