-diff -ur rpm-4.4.1/lib/rpmrc.c rpm-4.4.1-home_etc/lib/rpmrc.c
---- rpm-4.4.1/lib/rpmrc.c 2005-01-17 19:46:23.000000000 +0100
-+++ rpm-4.4.1-home_etc/lib/rpmrc.c 2005-06-17 14:28:10.000000000 +0200
-@@ -1,6 +1,8 @@
- /*@-bounds@*/
- #include "system.h"
-
-+#include <home_etc.h>
-+
- #include <stdarg.h>
- #if defined(__linux__) && defined(__powerpc__)
- #include <setjmp.h>
-@@ -1814,13 +1814,13 @@
- rc = 1;
- break;
- }
+diff -Nru rpm-4.1/lib/rpmrc.c rpm-4.1.new/lib/rpmrc.c
+--- rpm-4.1/lib/rpmrc.c Tue Aug 20 16:53:44 2002
++++ rpm-4.1.new/lib/rpmrc.c Tue Mar 11 18:41:48 2003
+@@ -1820,23 +1820,37 @@
+ /* Expand ~/ to $HOME/ */
+ fn[0] = '\0';
+ if (r[0] == '~' && r[1] == '/') {
++ const char * etc_dir = getenv("HOME_ETC");
+ const char * home = getenv("HOME");
+- if (home == NULL) {
+- /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */
+- if (rcfiles == rpmRcfiles && myrcfiles != r)
+- continue;
+- rpmError(RPMERR_RPMRC, _("Cannot expand %s\n"), r);
+- rc = 1;
+- break;
+- }
- if (strlen(home) > (sizeof(fn) - strlen(r))) {
-+ if (strlen(_HE(home)) > (sizeof(fn) - strlen(r))) {
- rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
- r);
- rc = 1;
- break;
+- rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
+- r);
+- rc = 1;
+- break;
++ if (etc_dir) {
++ if (strlen(etc_dir) > (sizeof(fn) - strlen(r))) {
++ rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME_ETC is too large.\n"),r);
++ rc = 1;
++ break;
++ }
++ strcpy(fn, etc_dir);
++ strncat(fn, "/", sizeof(fn) - strlen(fn));
++ r+=2;
++ } else {
++ if (home == NULL) {
++ /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */
++ if (rcfiles == rpmRcfiles && myrcfiles != r)
++ continue;
++ rpmError(RPMERR_RPMRC, _("Cannot expand %s\n"), r);
++ rc = 1;
++ break;
++ }
++ if (strlen(home) > (sizeof(fn) - strlen(r))) {
++ rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
++ r);
++ rc = 1;
++ break;
++ }
++ strcpy(fn, home);
++ r++;
}
- strcpy(fn, home);
-+ strcpy(fn, _HE(home));
- r++;
+- r++;
++
++
}
strncat(fn, r, sizeof(fn) - (strlen(fn) + 1));
-diff -ur rpm-4.4.1/rpmio/macro.c rpm-4.4.1-home_etc/rpmio/macro.c
---- rpm-4.4.1/rpmio/macro.c 2005-01-26 04:39:58.000000000 +0100
-+++ rpm-4.4.1-home_etc/rpmio/macro.c 2005-06-17 14:25:02.415093480 +0200
-@@ -5,6 +5,8 @@
+ fn[sizeof(fn)-1] = '\0';
+--- rpm-4.4.8/po/pl.po.orig 2007-04-08 16:11:42.125435004 +0200
++++ rpm-4.4.8/po/pl.po 2007-04-08 16:25:11.343549717 +0200
+@@ -3251,6 +3251,10 @@
+ msgid "Cannot expand %s\n"
+ msgstr "Nie mo¿na rozwin±æ %s\n"
- #include "system.h"
- #include <stdarg.h>
++#: lib/rpmrc.c:1935
++msgid "Cannot read %s, HOME_ETC is too large.\n"
++msgstr "Nie mo¿na odczytaæ %s, HOME_ETC jest zbyt du¿e.\n"
+
-+#include <home_etc.h>
-
- #if !defined(isblank)
- #define isblank(_c) ((_c) == ' ' || (_c) == '\t')
-@@ -1731,7 +1731,7 @@
- /* XXX Prepend the URL leader for globs that have stripped it off */
- maxb = 0;
- for (i = 0; i < gl.gl_pathc; i++) {
-- if ((nb = strlen(&(gl.gl_pathv[i][0]))) > maxb)
-+ if ((nb = strlen(_HE(&(gl.gl_pathv[i][0])))) > maxb)
- maxb = nb;
- }
-
-@@ -1765,7 +1765,7 @@
- const char * globFile = &(gl.gl_pathv[i][0]);
- if (globRoot > globURL && globRoot[-1] == '/')
- while (*globFile == '/') globFile++;
-- strcpy(globRoot, globFile);
-+ strcpy(globRoot, _HE(globFile));
- if (_debug)
- fprintf(stderr, "*** rpmGlob argv[%d] \"%s\"\n", argc, globURL);
- argv[argc++] = xstrdup(globURL);
---- rpm-4.4.1/lib/Makefile.am~ 2005-06-17 15:08:29.901412560 +0200
-+++ rpm-4.4.1/lib/Makefile.am 2005-06-17 15:08:41.173698912 +0200
-@@ -44,7 +44,7 @@
- librpm_la_LDFLAGS = -release 4.4 $(LDFLAGS) \
- $(top_builddir)/rpmdb/librpmdb.la \
- $(top_builddir)/rpmio/librpmio.la \
-- -lpopt \
-+ -lpopt -lhome_etc \
- @WITH_SELINUX_LIB@ \
- @INTLLIBS@
-
---- rpm-4.4.1/rpmio/Makefile.am~ 2005-06-17 15:08:29.902412408 +0200
-+++ rpm-4.4.1/rpmio/Makefile.am 2005-06-17 15:09:10.987166576 +0200
-@@ -37,7 +37,7 @@
- @WITH_LUA_LIB@ \
- $(top_builddir)/file/src/libmagic.la \
- @WITH_ZLIB_LIB@ \
-- -lneon -lpthread
-+ -lneon -lpthread -lhome_etc
- librpmio_la_LIBADD = # $(BEECRYPTLOBJS)
- librpmio_la_DEPENDENCIES = # .created
-
+ #: lib/rpmrc.c:1924
+ #, c-format
+ msgid "Cannot read %s, HOME is too large.\n"