Commit a32f7255 authored by Michal Čihař's avatar Michal Čihař

New upstream version 4.14.2+dfsg1

parent abf219e7
This diff is collapsed.
......@@ -635,7 +635,7 @@ rpmlibexecdir = $(prefix)/lib/rpm
rpmconfigdir = $(prefix)/lib/rpm
# Libtool version (current-revision-age) for all our libraries
rpm_version_info = 8:1:0
rpm_version_info = 9:0:1
AM_CFLAGS = @RPMCFLAGS@
CLEANFILES = rpmrc.tmp rpmrc macros platform.tmp platform rpm.pc.tmp \
rpm.pc rpmpopt-@VERSION@.tmp rpmpopt-@VERSION@ \
......
......@@ -480,7 +480,7 @@ rpmlibexecdir = $(prefix)/lib/rpm
rpmconfigdir = $(prefix)/lib/rpm
# Libtool version (current-revision-age) for all our libraries
rpm_version_info = 8:1:0
rpm_version_info = 9:0:1
AM_CFLAGS = @RPMCFLAGS@
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/include/ @WITH_BEECRYPT_INCLUDE@ \
......
......@@ -270,7 +270,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
(rc = packageSources(spec, &cookie)))
return rc;
goto exit;
if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
(rc = packageBinaries(spec, cookie, (didBuild == 0))))
......
......@@ -213,7 +213,7 @@ static int rdToken(ParseState state)
p++;
} else {
rpmlog(RPMLOG_ERR, _("syntax error while parsing ==\n"));
return -1;
goto err;
}
break;
case '!':
......@@ -243,7 +243,7 @@ static int rdToken(ParseState state)
p++;
} else {
rpmlog(RPMLOG_ERR, _("syntax error while parsing &&\n"));
return -1;
goto err;
}
break;
case '|':
......@@ -252,7 +252,7 @@ static int rdToken(ParseState state)
p++;
} else {
rpmlog(RPMLOG_ERR, _("syntax error while parsing ||\n"));
return -1;
goto err;
}
break;
......@@ -302,7 +302,7 @@ static int rdToken(ParseState state)
} else {
rpmlog(RPMLOG_ERR, _("parse error in expression\n"));
return -1;
goto err;
}
}
......@@ -314,6 +314,10 @@ static int rdToken(ParseState state)
DEBUG(valueDump("rdToken:", state->tokenValue, stdout));
return 0;
err:
valueFree(v);
return -1;
}
static Value doLogical(ParseState state);
......@@ -323,28 +327,28 @@ static Value doLogical(ParseState state);
*/
static Value doPrimary(ParseState state)
{
Value v;
Value v = NULL;
DEBUG(printf("doPrimary()\n"));
switch (state->nextToken) {
case TOK_OPEN_P:
if (rdToken(state))
return NULL;
goto err;
v = doLogical(state);
if (state->nextToken != TOK_CLOSE_P) {
rpmlog(RPMLOG_ERR, _("unmatched (\n"));
return NULL;
goto err;
}
if (rdToken(state))
return NULL;
goto err;
break;
case TOK_INTEGER:
case TOK_STRING:
v = state->tokenValue;
if (rdToken(state))
return NULL;
goto err;
break;
case TOK_IDENTIFIER: {
......@@ -352,21 +356,21 @@ static Value doPrimary(ParseState state)
v = valueMakeString( rpmExpand(name, NULL) );
if (rdToken(state))
return NULL;
goto err;
break;
}
case TOK_MINUS:
if (rdToken(state))
return NULL;
goto err;
v = doPrimary(state);
if (v == NULL)
return NULL;
goto err;
if (! valueIsInteger(v)) {
rpmlog(RPMLOG_ERR, _("- only on numbers\n"));
return NULL;
goto err;
}
v = valueMakeInteger(- v->data.i);
......@@ -374,26 +378,30 @@ static Value doPrimary(ParseState state)
case TOK_NOT:
if (rdToken(state))
return NULL;
goto err;
v = doPrimary(state);
if (v == NULL)
return NULL;
goto err;
if (! valueIsInteger(v)) {
rpmlog(RPMLOG_ERR, _("! only on numbers\n"));
return NULL;
goto err;
}
v = valueMakeInteger(! v->data.i);
break;
default:
return NULL;
goto err;
break;
}
DEBUG(valueDump("doPrimary:", v, stdout));
return v;
err:
valueFree(v);
return NULL;
}
/**
......@@ -401,30 +409,30 @@ static Value doPrimary(ParseState state)
*/
static Value doMultiplyDivide(ParseState state)
{
Value v1, v2 = NULL;
Value v1 = NULL, v2 = NULL;
DEBUG(printf("doMultiplyDivide()\n"));
v1 = doPrimary(state);
if (v1 == NULL)
return NULL;
goto err;
while (state->nextToken == TOK_MULTIPLY
|| state->nextToken == TOK_DIVIDE) {
int op = state->nextToken;
if (rdToken(state))
return NULL;
goto err;
if (v2) valueFree(v2);
v2 = doPrimary(state);
if (v2 == NULL)
return NULL;
goto err;
if (! valueSameType(v1, v2)) {
rpmlog(RPMLOG_ERR, _("types must match\n"));
return NULL;
goto err;
}
if (valueIsInteger(v1)) {
......@@ -437,12 +445,17 @@ static Value doMultiplyDivide(ParseState state)
v1 = valueMakeInteger(i1 / i2);
} else {
rpmlog(RPMLOG_ERR, _("* / not suported for strings\n"));
return NULL;
goto err;
}
}
if (v2) valueFree(v2);
return v1;
err:
valueFree(v1);
valueFree(v2);
return NULL;
}
/**
......@@ -450,29 +463,29 @@ static Value doMultiplyDivide(ParseState state)
*/
static Value doAddSubtract(ParseState state)
{
Value v1, v2 = NULL;
Value v1 = NULL, v2 = NULL;
DEBUG(printf("doAddSubtract()\n"));
v1 = doMultiplyDivide(state);
if (v1 == NULL)
return NULL;
goto err;
while (state->nextToken == TOK_ADD || state->nextToken == TOK_MINUS) {
int op = state->nextToken;
if (rdToken(state))
return NULL;
goto err;
if (v2) valueFree(v2);
v2 = doMultiplyDivide(state);
if (v2 == NULL)
return NULL;
goto err;
if (! valueSameType(v1, v2)) {
rpmlog(RPMLOG_ERR, _("types must match\n"));
return NULL;
goto err;
}
if (valueIsInteger(v1)) {
......@@ -488,7 +501,7 @@ static Value doAddSubtract(ParseState state)
if (op == TOK_MINUS) {
rpmlog(RPMLOG_ERR, _("- not suported for strings\n"));
return NULL;
goto err;
}
copy = xmalloc(strlen(v1->data.s) + strlen(v2->data.s) + 1);
......@@ -501,6 +514,11 @@ static Value doAddSubtract(ParseState state)
if (v2) valueFree(v2);
return v1;
err:
valueFree(v1);
valueFree(v2);
return NULL;
}
/**
......@@ -508,29 +526,29 @@ static Value doAddSubtract(ParseState state)
*/
static Value doRelational(ParseState state)
{
Value v1, v2 = NULL;
Value v1 = NULL, v2 = NULL;
DEBUG(printf("doRelational()\n"));
v1 = doAddSubtract(state);
if (v1 == NULL)
return NULL;
goto err;
while (state->nextToken >= TOK_EQ && state->nextToken <= TOK_GE) {
int op = state->nextToken;
if (rdToken(state))
return NULL;
goto err;
if (v2) valueFree(v2);
v2 = doAddSubtract(state);
if (v2 == NULL)
return NULL;
goto err;
if (! valueSameType(v1, v2)) {
rpmlog(RPMLOG_ERR, _("types must match\n"));
return NULL;
goto err;
}
if (valueIsInteger(v1)) {
......@@ -592,6 +610,11 @@ static Value doRelational(ParseState state)
if (v2) valueFree(v2);
return v1;
err:
valueFree(v1);
valueFree(v2);
return NULL;
}
/**
......@@ -599,30 +622,30 @@ static Value doRelational(ParseState state)
*/
static Value doLogical(ParseState state)
{
Value v1, v2 = NULL;
Value v1 = NULL, v2 = NULL;
DEBUG(printf("doLogical()\n"));
v1 = doRelational(state);
if (v1 == NULL)
return NULL;
goto err;
while (state->nextToken == TOK_LOGICAL_AND
|| state->nextToken == TOK_LOGICAL_OR) {
int op = state->nextToken;
if (rdToken(state))
return NULL;
goto err;
if (v2) valueFree(v2);
v2 = doRelational(state);
if (v2 == NULL)
return NULL;
goto err;
if (! valueSameType(v1, v2)) {
rpmlog(RPMLOG_ERR, _("types must match\n"));
return NULL;
goto err;
}
if (valueIsInteger(v1)) {
......@@ -635,12 +658,17 @@ static Value doLogical(ParseState state)
v1 = valueMakeInteger(i1 || i2);
} else {
rpmlog(RPMLOG_ERR, _("&& and || not suported for strings\n"));
return NULL;
goto err;
}
}
if (v2) valueFree(v2);
return v1;
err:
valueFree(v1);
valueFree(v2);
return NULL;
}
int parseExpressionBoolean(const char *expr)
......@@ -659,16 +687,13 @@ int parseExpressionBoolean(const char *expr)
/* Parse the expression. */
v = doLogical(&state);
if (!v) {
state.str = _free(state.str);
return -1;
}
if (!v)
goto exit;
/* If the next token is not TOK_EOF, we have a syntax error. */
if (state.nextToken != TOK_EOF) {
rpmlog(RPMLOG_ERR, _("syntax error in expression\n"));
state.str = _free(state.str);
return -1;
goto exit;
}
DEBUG(valueDump("parseExprBoolean:", v, stdout));
......@@ -684,6 +709,7 @@ int parseExpressionBoolean(const char *expr)
break;
}
exit:
state.str = _free(state.str);
valueFree(v);
return result;
......
......@@ -2124,7 +2124,7 @@ static rpmRC processBinaryFile(Package pkg, FileList fl, const char * fileName)
goto exit;
}
if (rpmGlob(diskPath, &argc, &argv) == 0 && argc >= 1) {
if (rpmGlob(diskPath, &argc, &argv) == 0) {
for (i = 0; i < argc; i++) {
rc = addFile(fl, argv[i], NULL);
}
......
......@@ -163,8 +163,6 @@ static int dateToTimet(const char * datestr, time_t * secs, int * date_words)
tz = xstrdup(tz);
if (*date_words == 6) {
/* changelog date is in read time zone */
tz = getenv("TZ");
if (tz) tz = xstrdup(tz);
setenv("TZ", tz_name, 1);
} else {
/* changelog date is always in UTC */
......
......@@ -521,6 +521,7 @@ static struct optionalTag {
{ RPMTAG_PACKAGER, "%{packager}" },
{ RPMTAG_DISTRIBUTION, "%{distribution}" },
{ RPMTAG_DISTURL, "%{disturl}" },
{ RPMTAG_DISTTAG, "%{disttag}" },
{ RPMTAG_BUGURL, "%{bugurl}" },
{ -1, NULL }
};
......@@ -1081,9 +1082,10 @@ int parsePreamble(rpmSpec spec, int initialPackage)
int nextPart = PART_ERROR;
int res = PART_ERROR; /* assume failure */
int rc;
char *name, *linep;
char *linep;
int flag = 0;
Package pkg;
char *name = NULL;
char *NVR = NULL;
char lang[BUFSIZ];
......@@ -1098,10 +1100,8 @@ int parsePreamble(rpmSpec spec, int initialPackage)
if (rpmCharCheck(spec, name, WHITELIST_NAME))
goto exit;
if (!lookupPackage(spec, name, flag, NULL)) {
free(name);
if (!lookupPackage(spec, name, flag, NULL))
goto exit;
}
/* Construct the package */
if (flag == PART_SUBNAME) {
......@@ -1109,7 +1109,6 @@ int parsePreamble(rpmSpec spec, int initialPackage)
headerGetString(spec->packages->header, RPMTAG_NAME), name);
} else
NVR = xstrdup(name);
free(name);
pkg = newPackage(NVR, spec->pool, &spec->packages);
headerPutString(pkg->header, RPMTAG_NAME, NVR);
} else {
......@@ -1172,6 +1171,9 @@ int parsePreamble(rpmSpec spec, int initialPackage)
*/
if (initialPackage) {
char *buildRoot = rpmGetPath(spec->buildRoot, NULL);
free(spec->buildRoot);
spec->buildRoot = buildRoot;
rpmPushMacro(spec->macros, "buildroot", NULL, spec->buildRoot, RMIL_SPEC);
if (*buildRoot == '\0') {
rpmlog(RPMLOG_ERR, _("%%{buildroot} couldn't be empty\n"));
goto exit;
......@@ -1180,9 +1182,6 @@ int parsePreamble(rpmSpec spec, int initialPackage)
rpmlog(RPMLOG_ERR, _("%%{buildroot} can not be \"/\"\n"));
goto exit;
}
free(spec->buildRoot);
spec->buildRoot = buildRoot;
rpmPushMacro(spec->macros, "buildroot", NULL, spec->buildRoot, RMIL_SPEC);
}
/* XXX Skip valid arch check if not building binary package */
......@@ -1215,6 +1214,7 @@ int parsePreamble(rpmSpec spec, int initialPackage)
res = nextPart;
exit:
free(name);
free(NVR);
return res;
}
......@@ -81,7 +81,7 @@ static char *doPatch(rpmSpec spec, uint32_t c, int strip, const char *db,
fn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
/* On non-build parse's, file cannot be stat'd or read. */
if ((spec->flags & RPMSPEC_FORCE) || rpmFileIsCompressed(fn, &compressed) || checkOwners(fn)) goto exit;
if ((spec->flags & RPMSPEC_FORCE) || checkOwners(fn) || rpmFileIsCompressed(fn, &compressed)) goto exit;
if (db) {
rasprintf(&arg_backup,
......@@ -171,7 +171,7 @@ static char *doUntar(rpmSpec spec, uint32_t c, int quietly)
fn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
/* XXX On non-build parse's, file cannot be stat'd or read */
if (!(spec->flags & RPMSPEC_FORCE) && (rpmFileIsCompressed(fn, &compressed) || checkOwners(fn))) {
if (!(spec->flags & RPMSPEC_FORCE) && (checkOwners(fn) || rpmFileIsCompressed(fn, &compressed))) {
goto exit;
}
......
......@@ -504,6 +504,7 @@ static const rpmTagVal sourceTags[] = {
RPMTAG_PACKAGER,
RPMTAG_DISTRIBUTION,
RPMTAG_DISTURL,
RPMTAG_DISTTAG,
RPMTAG_VENDOR,
RPMTAG_LICENSE,
RPMTAG_GROUP,
......
......@@ -308,9 +308,12 @@ rpmSpec rpmSpecFree(rpmSpec spec)
spec->BANames = _free(spec->BANames);
#ifdef WITH_LUA
// only destroy lua tables if there are no BASpecs left
if (spec->recursing || spec->BACount == 0) {
rpmlua lua = NULL; /* global state */
rpmluaDelVar(lua, "patches");
rpmluaDelVar(lua, "sources");
}
#endif
spec->sources = freeSources(spec->sources);
......
......@@ -6,6 +6,9 @@
/* Build with dmalloc support? */
#undef DMALLOC
/* Build with systemd inhibit plugin? */
#undef ENABLE_INHIBIT_PLUGIN
/* Enable new rpm database format? */
#undef ENABLE_NDB
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for rpm 4.14.1.
# Generated by GNU Autoconf 2.69 for rpm 4.14.2.
#
# Report bugs to <rpm-maint@lists.rpm.org>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='rpm'
PACKAGE_TARNAME='rpm'
PACKAGE_VERSION='4.14.1'
PACKAGE_STRING='rpm 4.14.1'
PACKAGE_VERSION='4.14.2'
PACKAGE_STRING='rpm 4.14.2'
PACKAGE_BUGREPORT='rpm-maint@lists.rpm.org'
PACKAGE_URL=''
......@@ -657,6 +657,8 @@ DBUS_FALSE
DBUS_TRUE
DBUS_LIBS
DBUS_CFLAGS
ENABLE_INHIBIT_PLUGIN_FALSE
ENABLE_INHIBIT_PLUGIN_TRUE
ENABLE_PLUGINS_FALSE
ENABLE_PLUGINS_TRUE
WITH_LUA_FALSE
......@@ -974,6 +976,7 @@ with_cap
with_acl
with_lua
enable_plugins
enable_inhibit_plugin
with_dmalloc
with_vendor
with_rundir
......@@ -1548,7 +1551,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures rpm 4.14.1 to adapt to many kinds of systems.
\`configure' configures rpm 4.14.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1618,7 +1621,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of rpm 4.14.1:";;
short | recursive ) echo "Configuration of rpm 4.14.2:";;
esac
cat <<\_ACEOF
......@@ -1649,6 +1652,8 @@ Optional Features:
--disable-rpath do not hardcode runtime library paths
--enable-python build rpm python bindings
--disable-plugins build without plugin support
--disable-inhibit-plugin
build without systemd inhibit plugin
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
......@@ -1790,7 +1795,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
rpm configure 4.14.1
rpm configure 4.14.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2437,7 +2442,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by rpm $as_me 4.14.1, which was
It was created by rpm $as_me 4.14.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3307,7 +3312,7 @@ fi
# Define the identity of the package.
PACKAGE='rpm'
VERSION='4.14.1'
VERSION='4.14.2'
cat >>confdefs.h <<_ACEOF
......@@ -26246,9 +26251,34 @@ else
fi
# Check whether --enable-inhibit_plugin was given.
if test "${enable_inhibit_plugin+set}" = set; then :
enableval=$enable_inhibit_plugin;
else
enable_inhibit_plugin=yes
fi
if test "$enable_inhibit_plugin" = yes; then :
$as_echo "#define ENABLE_INHIBIT_PLUGIN 1" >>confdefs.h
fi
if test "$enable_inhibit_plugin" = yes; then
ENABLE_INHIBIT_PLUGIN_TRUE=
ENABLE_INHIBIT_PLUGIN_FALSE='#'
else
ENABLE_INHIBIT_PLUGIN_TRUE='#'
ENABLE_INHIBIT_PLUGIN_FALSE=
fi
with_dbus=no
if test "$enable_plugins" != no; then :
if test "$enable_inhibit_plugin" != no; then :
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
......@@ -26325,6 +26355,8 @@ fi
fi
fi
if test "$with_dbus" = yes; then
DBUS_TRUE=
......@@ -26747,6 +26779,10 @@ if test -z "${ENABLE_PLUGINS_TRUE}" && test -z "${ENABLE_PLUGINS_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_PLUGINS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_INHIBIT_PLUGIN_TRUE}" && test -z "${ENABLE_INHIBIT_PLUGIN_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_INHIBIT_PLUGIN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${DBUS_TRUE}" && test -z "${DBUS_FALSE}"; then
as_fn_error $? "conditional \"DBUS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
......@@ -27164,7 +27200,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="