SOURCES (AC-branch): rpm-etc_dir.patch - updated for rpm 4.4.1, us...
baggins
baggins at pld-linux.org
Fri Jun 17 16:38:22 CEST 2005
Author: baggins Date: Fri Jun 17 14:38:22 2005 GMT
Module: SOURCES Tag: AC-branch
---- Log message:
- updated for rpm 4.4.1, use home_etc lib
---- Files affected:
SOURCES:
rpm-etc_dir.patch (1.3 -> 1.3.4.1)
---- Diffs:
================================================================
Index: SOURCES/rpm-etc_dir.patch
diff -u SOURCES/rpm-etc_dir.patch:1.3 SOURCES/rpm-etc_dir.patch:1.3.4.1
--- SOURCES/rpm-etc_dir.patch:1.3 Fri Jun 20 00:49:09 2003
+++ SOURCES/rpm-etc_dir.patch Fri Jun 17 16:38:17 2005
@@ -1,105 +1,80 @@
-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
-@@ -1756,27 +1756,39 @@
- /* 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) {
-+ 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 == defrcfiles && myrcfiles != r)
-- continue;
-- rpmError(RPMERR_RPMRC, _("Cannot expand %s\n"), r);
-- rc = 1;
-- break;
-- }
+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;
+ }
- if (strlen(home) > (sizeof(fn) - strlen(r))) {
-- rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
-+ if (rcfiles == defrcfiles && 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"),
++ if (strlen(_HE(home)) > (sizeof(fn) - strlen(r))) {
+ rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
r);
-- rc = 1;
-- break;
-- }
-- strcpy(fn, home);
-- r++;
-- }
-- strncat(fn, r, sizeof(fn) - (strlen(fn) + 1));
-- fn[sizeof(fn)-1] = '\0';
--
-+ rc = 1;
-+ break;
-+ }
-+ strcpy(fn, home);
-+ r++;
-+ }
-+ }
-+ strncat(fn, r, sizeof(fn) - (strlen(fn) + 1));
-+ fn[sizeof(fn)-1] = '\0';
- /* Read another rcfile */
- fd = Fopen(fn, "r.fpio");
- if (fd == NULL || Ferror(fd)) {
-diff -Nru rpm-4.1/rpmio/macro.c rpm-4.1.new/rpmio/macro.c
---- rpm-4.1/rpmio/macro.c Tue Sep 17 14:58:23 2002
-+++ rpm-4.1.new/rpmio/macro.c Tue Mar 11 18:21:59 2003
-@@ -1614,15 +1614,22 @@
- buf[0] = '\0';
- if (mfile[0] == '~' && mfile[1] == '/') {
- char *home;
-- if ((home = getenv("HOME")) != NULL) {
-- mfile += 2;
-- strncpy(buf, home, sizeof(buf));
-- strncat(buf, "/", sizeof(buf) - strlen(buf));
-+ char *etc_dir = getenv("HOME_ETC");
-+
-+ if (etc_dir) {
-+ mfile += 2;
-+ strncpy(buf, etc_dir, sizeof(buf));
-+ strncat(buf, "/", sizeof(buf) - strlen(buf));
-+ } else {
-+ if ((home = getenv("HOME")) != NULL) {
-+ mfile += 2;
-+ strncpy(buf, home, sizeof(buf));
-+ strncat(buf, "/", sizeof(buf) - strlen(buf));
+ rc = 1;
+ break;
}
-+ }
+- strcpy(fn, home);
++ strcpy(fn, _HE(home));
+ r++;
}
- strncat(buf, mfile, sizeof(buf) - strlen(buf));
- buf[sizeof(buf)-1] = '\0';
--
- fd = Fopen(buf, "r.fpio");
- if (fd == NULL || Ferror(fd)) {
- if (fd) (void) Fclose(fd);
---- rpm-4.3/po/pl.po.orig 2003-06-10 23:59:11.000000000 +0200
-+++ rpm-4.3/po/pl.po 2003-06-11 00:06:16.000000000 +0200
-@@ -2834,6 +2834,10 @@
- msgid "Please contact rpm-list at redhat.com\n"
- msgstr "Proszę skontaktować się z rpm-list at redhat.com\n"
+ 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 @@
-+#: lib/rpmrc.c:1764
-+msgid "Cannot read %s, HOME_ETC is too large.\n"
-+msgstr "Nie można odczytać %s, HOME_ETC jest zbyt duże.\n"
+ #include "system.h"
+ #include <stdarg.h>
+
- #: lib/rpmrc.c:1765
- #, c-format
- msgid "Cannot expand %s\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
+
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/rpm-etc_dir.patch?r1=1.3&r2=1.3.4.1&f=u
More information about the pld-cvs-commit
mailing list