21 | and especially can have leading whitespaces. |
21 | and especially can have leading whitespaces. |
22 +--------------------------------------------------------------------------- |
22 +--------------------------------------------------------------------------- |
23 Index: build/parsePrep.c |
23 Index: build/parsePrep.c |
24 --- build/parsePrep.c 7 Aug 2002 14:20:45 -0000 1.1.1.10 |
24 --- build/parsePrep.c 7 Aug 2002 14:20:45 -0000 1.1.1.10 |
25 +++ build/parsePrep.c 6 Jun 2005 15:53:04 -0000 1.4 |
25 +++ build/parsePrep.c 6 Jun 2005 15:53:04 -0000 1.4 |
26 @@ -584,12 +635,15 @@ |
26 @@ -584,12 +584,15 @@ |
27 saveLines = splitString(getStringBuf(sb), strlen(getStringBuf(sb)), '\n'); |
27 saveLines = splitString(getStringBuf(sb), strlen(getStringBuf(sb)), '\n'); |
28 /*@-usereleased@*/ |
28 /*@-usereleased@*/ |
29 for (lines = saveLines; *lines; lines++) { |
29 for (lines = saveLines; *lines; lines++) { |
30 + char *cp; |
30 + char *cp; |
31 + for (cp = *lines; *cp == ' ' || *cp == '\t'; cp++) |
31 + for (cp = *lines; *cp == ' ' || *cp == '\t'; cp++) |
48 | Do not pick of the vendor BeeCrypt package on RedHat Linux. |
48 | Do not pick of the vendor BeeCrypt package on RedHat Linux. |
49 +--------------------------------------------------------------------------- |
49 +--------------------------------------------------------------------------- |
50 Index: configure.ac |
50 Index: configure.ac |
51 --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 |
51 --- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4 |
52 +++ configure.ac 13 Sep 2006 13:38:23 -0000 |
52 +++ configure.ac 13 Sep 2006 13:38:23 -0000 |
53 @@ -416,7 +417,7 @@ |
53 @@ -416,7 +416,7 @@ |
54 AC_CHECK_HEADER([beecrypt/beecrypt.h], [ |
54 AC_CHECK_HEADER([beecrypt/beecrypt.h], [ |
55 AC_CHECK_LIB(beecrypt, mpfprintln, [ |
55 AC_CHECK_LIB(beecrypt, mpfprintln, [ |
56 AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).]) |
56 AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).]) |
57 - WITH_BEECRYPT_INCLUDE="-I/usr/include/beecrypt" |
57 - WITH_BEECRYPT_INCLUDE="-I/usr/include/beecrypt" |
58 + WITH_BEECRYPT_INCLUDE="" |
58 + WITH_BEECRYPT_INCLUDE="" |
97 | http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100509 |
97 | http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100509 |
98 +--------------------------------------------------------------------------- |
98 +--------------------------------------------------------------------------- |
99 Index: lib/psm.c |
99 Index: lib/psm.c |
100 --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 |
100 --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 |
101 +++ lib/psm.c 13 Sep 2006 13:38:29 -0000 |
101 +++ lib/psm.c 13 Sep 2006 13:38:29 -0000 |
102 @@ -1106,11 +1128,13 @@ |
102 @@ -1106,11 +1108,13 @@ |
103 const char ** triggerProgs; |
103 const char ** triggerProgs; |
104 int_32 * triggerIndices; |
104 int_32 * triggerIndices; |
105 const char * sourceName; |
105 const char * sourceName; |
106 + const char * triggerName; |
106 + const char * triggerName; |
107 rpmRC rc = RPMRC_OK; |
107 rpmRC rc = RPMRC_OK; |
111 xx = headerNVR(sourceH, &sourceName, NULL, NULL); |
111 xx = headerNVR(sourceH, &sourceName, NULL, NULL); |
112 + xx = headerNVR(triggeredH, &triggerName, NULL, NULL); |
112 + xx = headerNVR(triggeredH, &triggerName, NULL, NULL); |
113 |
113 |
114 trigger = rpmdsInit(rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem)); |
114 trigger = rpmdsInit(rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem)); |
115 if (trigger == NULL) |
115 if (trigger == NULL) |
116 @@ -1149,7 +1173,7 @@ |
116 @@ -1149,7 +1153,7 @@ |
117 { int arg1; |
117 { int arg1; |
118 int index; |
118 int index; |
119 |
119 |
120 - arg1 = rpmdbCountPackages(rpmtsGetRdb(ts), Name); |
120 - arg1 = rpmdbCountPackages(rpmtsGetRdb(ts), Name); |
121 + arg1 = rpmdbCountPackages(rpmtsGetRdb(ts), triggerName); |
121 + arg1 = rpmdbCountPackages(rpmtsGetRdb(ts), triggerName); |
132 | course. |
132 | course. |
133 +--------------------------------------------------------------------------- |
133 +--------------------------------------------------------------------------- |
134 Index: lib/psm.c |
134 Index: lib/psm.c |
135 --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 |
135 --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 |
136 +++ lib/psm.c 13 Sep 2006 13:38:32 -0000 |
136 +++ lib/psm.c 13 Sep 2006 13:38:32 -0000 |
137 @@ -1710,6 +1734,7 @@ |
137 @@ -1710,6 +1714,7 @@ |
138 |
138 |
139 uid = fi->uid; |
139 uid = fi->uid; |
140 gid = fi->gid; |
140 gid = fi->gid; |
141 + if (!headerIsEntry(fi->h, RPMTAG_SOURCEPACKAGE)) { |
141 + if (!headerIsEntry(fi->h, RPMTAG_SOURCEPACKAGE)) { |
142 if (fi->fuser && unameToUid(fi->fuser[i], &uid)) { |
142 if (fi->fuser && unameToUid(fi->fuser[i], &uid)) { |
143 rpmMessage(RPMMESS_WARNING, |
143 rpmMessage(RPMMESS_WARNING, |
144 _("user %s does not exist - using root\n"), |
144 _("user %s does not exist - using root\n"), |
145 @@ -1727,6 +1752,7 @@ |
145 @@ -1727,6 +1732,7 @@ |
146 /* XXX this diddles header memory. */ |
146 /* XXX this diddles header memory. */ |
147 fi->fmodes[i] &= ~S_ISGID; /* turn off the sgid bit */ |
147 fi->fmodes[i] &= ~S_ISGID; /* turn off the sgid bit */ |
148 } |
148 } |
149 + } |
149 + } |
150 if (fi->fuids) fi->fuids[i] = uid; |
150 if (fi->fuids) fi->fuids[i] = uid; |
156 | RPM uses everywhere else, too. |
156 | RPM uses everywhere else, too. |
157 +--------------------------------------------------------------------------- |
157 +--------------------------------------------------------------------------- |
158 Index: lib/psm.c |
158 Index: lib/psm.c |
159 --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 |
159 --- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6 |
160 +++ lib/psm.c 13 Sep 2006 13:38:33 -0000 |
160 +++ lib/psm.c 13 Sep 2006 13:38:33 -0000 |
161 @@ -2027,7 +2053,8 @@ |
161 @@ -2027,7 +2033,8 @@ |
162 case PSM_CHROOT_IN: |
162 case PSM_CHROOT_IN: |
163 { const char * rootDir = rpmtsRootDir(ts); |
163 { const char * rootDir = rpmtsRootDir(ts); |
164 /* Change root directory if requested and not already done. */ |
164 /* Change root directory if requested and not already done. */ |
165 - if (rootDir != NULL && !rpmtsChrootDone(ts) && !psm->chrootDone) { |
165 - if (rootDir != NULL && !rpmtsChrootDone(ts) && !psm->chrootDone) { |
166 + if (rootDir != NULL && !(rootDir[0] == '/' && rootDir[1] == '\0') |
166 + if (rootDir != NULL && !(rootDir[0] == '/' && rootDir[1] == '\0') |
183 | passing the pointer and not the underlying character. |
183 | passing the pointer and not the underlying character. |
184 +--------------------------------------------------------------------------- |
184 +--------------------------------------------------------------------------- |
185 Index: rpmio/macro.c |
185 Index: rpmio/macro.c |
186 --- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 |
186 --- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7 |
187 +++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 |
187 +++ rpmio/macro.c 22 Jan 2004 21:42:32 -0000 1.2 |
188 @@ -879,7 +882,7 @@ |
188 @@ -879,7 +879,7 @@ |
189 */ |
189 */ |
190 /*@-bounds@*/ |
190 /*@-bounds@*/ |
191 /*@dependent@*/ static const char * |
191 /*@dependent@*/ static const char * |
192 -grabArgs(MacroBuf mb, const MacroEntry me, /*@returned@*/ const char * se, char lastc) |
192 -grabArgs(MacroBuf mb, const MacroEntry me, /*@returned@*/ const char * se, char lastc) |
193 +grabArgs(MacroBuf mb, const MacroEntry me, /*@returned@*/ const char * se, char *lastc) |
193 +grabArgs(MacroBuf mb, const MacroEntry me, /*@returned@*/ const char * se, char *lastc) |
194 /*@globals rpmGlobalMacroContext @*/ |
194 /*@globals rpmGlobalMacroContext @*/ |
195 /*@modifies mb, rpmGlobalMacroContext @*/ |
195 /*@modifies mb, rpmGlobalMacroContext @*/ |
196 { |
196 { |
197 @@ -900,7 +903,7 @@ |
197 @@ -900,7 +900,7 @@ |
198 |
198 |
199 /* Copy args into buf until lastc */ |
199 /* Copy args into buf until lastc */ |
200 *be++ = ' '; |
200 *be++ = ' '; |
201 - while ((c = *se++) != '\0' && c != lastc) { |
201 - while ((c = *se++) != '\0' && c != lastc) { |
202 + while ((c = *se++) != '\0' && (se-1) != lastc) { |
202 + while ((c = *se++) != '\0' && (se-1) != lastc) { |
203 /*@-globs@*/ |
203 /*@-globs@*/ |
204 if (!isblank(c)) { |
204 if (!isblank(c)) { |
205 *be++ = c; |
205 *be++ = c; |
206 @@ -968,6 +971,8 @@ |
206 @@ -968,6 +968,8 @@ |
207 /*@-mods@*/ |
207 /*@-mods@*/ |
208 optind = 0; /* XXX but posix != glibc */ |
208 optind = 0; /* XXX but posix != glibc */ |
209 /*@=mods@*/ |
209 /*@=mods@*/ |
210 +#else |
210 +#else |
211 + optind = 1; |
211 + optind = 1; |
212 #endif |
212 #endif |
213 |
213 |
214 opts = me->opts; |
214 opts = me->opts; |
215 @@ -1168,7 +1175,7 @@ |
215 @@ -1168,7 +1170,7 @@ |
216 int c; |
216 int c; |
217 int rc = 0; |
217 int rc = 0; |
218 int negate; |
218 int negate; |
219 - char grab; |
219 - char grab; |
220 + char *grab; |
220 + char *grab; |
221 int chkexist; |
221 int chkexist; |
222 |
222 |
223 if (++mb->depth > max_macro_depth) { |
223 if (++mb->depth > max_macro_depth) { |
224 @@ -1202,7 +1209,7 @@ |
224 @@ -1202,7 +1204,7 @@ |
225 if (mb->depth > 1) /* XXX full expansion for outermost level */ |
225 if (mb->depth > 1) /* XXX full expansion for outermost level */ |
226 t = mb->t; /* save expansion pointer for printExpand */ |
226 t = mb->t; /* save expansion pointer for printExpand */ |
227 negate = 0; |
227 negate = 0; |
228 - grab = '\0'; |
228 - grab = '\0'; |
229 + grab = NULL; |
229 + grab = NULL; |
230 chkexist = 0; |
230 chkexist = 0; |
231 switch ((c = *s)) { |
231 switch ((c = *s)) { |
232 default: /* %name substitution */ |
232 default: /* %name substitution */ |
233 @@ -1237,7 +1244,8 @@ |
233 @@ -1237,7 +1239,8 @@ |
234 /* For "%name " macros ... */ |
234 /* For "%name " macros ... */ |
235 /*@-globs@*/ |
235 /*@-globs@*/ |
236 if ((c = *fe) && isblank(c)) |
236 if ((c = *fe) && isblank(c)) |
237 - grab = '\n'; |
237 - grab = '\n'; |
238 + if ((grab = strchr(fe,'\n')) == NULL) |
238 + if ((grab = strchr(fe,'\n')) == NULL) |
239 + grab = strchr(fe, '\0'); |
239 + grab = strchr(fe, '\0'); |
240 /*@=globs@*/ |
240 /*@=globs@*/ |
241 /*@switchbreak@*/ break; |
241 /*@switchbreak@*/ break; |
242 case '(': /* %(...) shell escape */ |
242 case '(': /* %(...) shell escape */ |
243 @@ -1284,7 +1292,7 @@ |
243 @@ -1284,7 +1287,7 @@ |
244 ge = se - 1; |
244 ge = se - 1; |
245 /*@innerbreak@*/ break; |
245 /*@innerbreak@*/ break; |
246 case ' ': |
246 case ' ': |
247 - grab = se[-1]; |
247 - grab = se[-1]; |
248 + grab = se-1; |
248 + grab = se-1; |
249 /*@innerbreak@*/ break; |
249 /*@innerbreak@*/ break; |
250 default: |
250 default: |
251 /*@innerbreak@*/ break; |
251 /*@innerbreak@*/ break; |
252 @@ -1438,7 +1446,7 @@ |
252 @@ -1438,7 +1441,7 @@ |
253 |
253 |
254 /* Setup args for "%name " macros with opts */ |
254 /* Setup args for "%name " macros with opts */ |
255 if (me && me->opts != NULL) { |
255 if (me && me->opts != NULL) { |
256 - if (grab != '\0') { |
256 - if (grab != '\0') { |
257 + if (grab != NULL) { |
257 + if (grab != NULL) { |