]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-etc_dir.patch
- updated for 4.4.2
[packages/rpm.git] / rpm-etc_dir.patch
1 --- rpm-4.4.1/lib/rpmrc.c.orig  2005-07-19 18:53:09.096470264 +0200
2 +++ rpm-4.4.1/lib/rpmrc.c       2005-07-19 19:00:48.610613496 +0200
3 @@ -1,6 +1,12 @@
4  /*@-bounds@*/
5  #include "system.h"
6  
7 +#ifdef USE_HOME_ETC
8 +#include <home_etc.h>
9 +#else
10 +#define _HE(x) (x)
11 +#endif
12 +
13  #include <stdarg.h>
14  #if defined(__linux__) && defined(__powerpc__)
15  #include <setjmp.h>
16 @@ -1815,13 +1821,13 @@
17                 rc = 1;
18                 break;
19             }
20 -           if (strlen(home) > (sizeof(fn) - strlen(r))) {
21 +           if (strlen(_HE(home)) > (sizeof(fn) - strlen(r))) {
22                 rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
23                                 r);
24                 rc = 1;
25                 break;
26             }
27 -           strcpy(fn, home);
28 +           strcpy(fn, _HE(home));
29             r++;
30         }
31         strncat(fn, r, sizeof(fn) - (strlen(fn) + 1));
32 --- rpm-4.4.1/rpmio/macro.c.orig        2005-07-19 18:53:09.358430440 +0200
33 +++ rpm-4.4.1/rpmio/macro.c     2005-07-19 19:04:25.098702304 +0200
34 @@ -6,6 +6,12 @@
35  #include "system.h"
36  #include <stdarg.h>
37  
38 +#ifdef USE_HOME_ETC
39 +#include <home_etc.h>
40 +#else
41 +#define _HE(x) (x)
42 +#endif
43 +
44  #if !defined(isblank)
45  #define        isblank(_c)     ((_c) == ' ' || (_c) == '\t')
46  #endif
47 @@ -1732,7 +1738,7 @@
48         /* XXX Prepend the URL leader for globs that have stripped it off */
49         maxb = 0;
50         for (i = 0; i < gl.gl_pathc; i++) {
51 -           if ((nb = strlen(&(gl.gl_pathv[i][0]))) > maxb)
52 +           if ((nb = strlen(_HE(&(gl.gl_pathv[i][0])))) > maxb)
53                 maxb = nb;
54         }
55         
56 @@ -1766,7 +1772,7 @@
57             const char * globFile = &(gl.gl_pathv[i][0]);
58             if (globRoot > globURL && globRoot[-1] == '/')
59                 while (*globFile == '/') globFile++;
60 -           strcpy(globRoot, globFile);
61 +           strcpy(globRoot, _HE(globFile));
62  if (_debug)
63  fprintf(stderr, "*** rpmGlob argv[%d] \"%s\"\n", argc, globURL);
64             argv[argc++] = xstrdup(globURL);
65 --- rpm-4.4.2/lib/Makefile.am.orig      2005-07-23 13:40:23.191135552 +0200
66 +++ rpm-4.4.2/lib/Makefile.am   2005-07-23 13:41:49.474018560 +0200
67 @@ -46,6 +46,7 @@
68         $(top_builddir)/rpmio/librpmio.la \
69         @WITH_POPT_LIB@ \
70         @WITH_SELINUX_LIB@ \
71 +       @HOME_ETC_LIB@ \
72         @INTLLIBS@
73  
74  getdate.c: getdate.y
75 --- rpm-4.4.2/rpmio/Makefile.am.orig    2005-07-23 13:40:23.194135096 +0200
76 +++ rpm-4.4.2/rpmio/Makefile.am 2005-07-23 13:42:06.205474992 +0200
77 @@ -40,6 +40,7 @@
78         @WITH_LUA_LIB@ \
79         @WITH_MAGIC_LIB@ \
80         @WITH_ZLIB_LIB@ \
81 +       @HOME_ETC_LIB@ \
82         -lpthread
83  librpmio_la_LIBADD = # $(BEECRYPTLOBJS)
84  librpmio_la_DEPENDENCIES = # .created
85 --- rpm-4.4.1/configure.ac.orig 2005-07-19 18:53:09.385426000 +0200
86 +++ rpm-4.4.1/configure.ac      2005-07-19 19:10:49.732229120 +0200
87 @@ -945,6 +945,14 @@
88  fi
89  AC_SUBST(WITH_SELINUX_LIB)
90  
91 +withval=no
92 +AC_ARG_WITH(home_etc, [  --with-home_etc         build with home_etc support ])
93 +if test $withval != no ; then
94 +  AC_DEFINE(USE_HOME_ETC, 1, [Build with home_etc support?])
95 +  HOME_ETC_LIB="-lhome_etc"
96 +fi
97 +AC_SUBST(HOME_ETC_LIB)
98 +
99  WITH_LUA_LIB=
100  WITH_LUA_SUBDIR=
101  WITH_LUA_INCLUDE=
This page took 0.039788 seconds and 4 git commands to generate.