Commit 56e15767 authored by Loïc Minier's avatar Loïc Minier

Imported Upstream version 4.4.2.3

parent 317fb9c5
4.4.2.2 -> 4.4.2.3-rc1:
- add support for lzma compressed sources
- remove questionable non-utf polish comment confusing doxygen
- clarify rpmtsCheck() documentation (rhbz#159638)
- clarify rpm manpage wrt rpmbuild binary vs package (rhbz#233232)
- add OSGi dependency extractor script
- rename norwegian translation no -> nb (rhbz#332271)
- find-lang POSIX-compliant find(1) usage + spelling fixes
- find-lang localized man page and qt translation support
- match *.omf, not *omf in find-lang
- debugedit fixes for DW_FORM_ref_addr and empty DW_AT_comp_dir
- don't mess up problem pkgNEVR in python ts.check() (rhbz#349091)
- use NEVRA, not NEVR everywhere for rpmProblems
- add Catalan translation (rhbz#350401)
- fix segfault in %{lua:...}'s rpm_print
- don't automatically print a newline in rpm_print
- fix free on invalid pointer on temp file failure (mdvbz#???)
- use dgettext() instead of just gettext() (mdvbz#???)
- align rpm -V output (mdvbz#31287)
- fix build without -O2 (mdvbz#???)
- make rpmbuild honor --quiet (mdvbz#???, rhbz#124300)
- fix rpm -K segfault on corrupted header (mdvbz#33735)
- fix download path in README
- fix query return codes (rhbz#244236)
- don't do tilde expansion if HOME is not set
- add python method for for retrieving (without setting) ts vsflags
- OS X Leopard portability fixes
- ordering fix (don't use RPMSENSE_PREREQ)
- fix multi-line macro expansion in last line of spec (mdvbz#27417)
- avoid compressFilelist() stack overflow in pathological cases
- handle "use vX.X.X" in perl dependency extraction (rhbz#140597)
- fix field-width specifiers when no space between (rhbz#323221)
- don't unlink non-temporary file in FSM_UNDO (rhbz#223931)
- print --usage to stderr instead of stdout (rhbz#164021)
- set a default 0022 umask value always (#83006)
- last 8 bytes of RSA modulus is keyid for V3 pubkeys (#205080)
- convert '-' to '_' within --define macro names (#124995)
- handle spaces in file path arguments correctly (#217258)
- avoid access(2) quirks querying symlinks, lstat(2) instead (#60288)
- permit files with glob characters in *.rpm packages (#147383)
- add support for triggerprein scriptlets
- add support for Geode CPU (rhbz#428979)
- missing space in russian translation (mdvbz#36974)
- print regular provides on build too (mdvbz#36672)
- bandaid for truncated error message in russian (mdvbz#31680)
- install secondary arch macros on x86_64 (rhbz#194123)
- don't mess up --target when reading rpmrc includes (rhbz#232429)
- whitespace in dirnames fixes wrt rpmbuild (rhbz#220449)
- much improved find-debuginfo script
- debuginfo build-id integration
- bandaid for reads timeouting on heavily loaded systems (mdvbz#???)
4.4.2.1 -> 4.4.2.2:
- avoid .rpmnew if file in package hasn't changed (rhbz#194246)
- avoid .rpmnew/.rpmsave if files only differ by timestamp (rhbz#128622)
- minor makefile cleanups
- install preferred multilib color packages first (rhbz#214737)
- show pre- and posttrans scripts in --scripts query (susebz#253620)
- create compat macros for ia32e and amd64 (rhbz#211119, #223355)
- fix various buffer overflows in macro handling (rhbz#253971)
- fix building with latest glibc open() changes
- convert manuals to UTF-8
- make find-lang --with-gnome picks up omf files (rhbz#251400)
- fail build on dependency extraction errors (rhbz#226751)
- update default per-arch compiler flags for modern gcc (rhbz#212583)
- add comment about checking --help to manuals (rhbz#164281)
- avoid truncating /var/log/rpmpkgs in case of errors (rhbz#232830)
- avoid wrong selinux context on /var/log/rpmpkgs creation (rhbz#315271)
- rpmtsAddInstallElement() consistency (rhbz#180996, rhbz#281611)
- clarify --initdb usage in manual (rhbz#218057)
- skip stale and unaccessible (FUSE) mountpoints (rhbz#190496, 220991)
- buildid-related debugedit fixes
- add/update Spanish and Italian translations
- add missing files for translation (rhbz#249608)
- ARM-architecture fixes
- fix --dump usage description in manual
- update scriptlet names to match with reality (rhbz#248128)
- make docdir checking strict (rhbz#246819)
- perl dependency extraction fixes (rhbz#214496, #198033, #249135)
- permit API users to select non-exiting rpmdb termination
- dont check for termination signals in middle of transaction
- avoid leaving stale locks around on python tracebacks
- debugedit -l file matching fixes
- don't read *.rpmnew etc backup macro files
- fix error reporting on rpm --checksig (rhbz#155079)
- fix false mire matches on nonexistent headers (rhbz#277161)
- handle mire matching on binary blobs
- fix segfault in mire matching on binary data types
- add Sparch Niagara arch support (rhbz#263521)
- add %alpha macro for supported alpha archs (rhbz#295941)
- fix typos in default optflags for some archs (rhbz#305221)
- fix disk space checking on 100% full filesystems (rhbz#308171)
- own omf directories found by find-lang (rhbz#296731)
- fake callbacks on erasure for packages without files (rhbz#259961)
- python: add methods for checking and terminating on signals
- python: add method for expanding macros
4.4.2 -> 4.4.2.1:
- remove internal sqlite, zlib, gettext
- remove obsolete utilities
......
This diff is collapsed.
......@@ -8,7 +8,7 @@ EXTRA_DIST = CHANGES ChangeLog CREDITS Doxyheader GROUPS README.amiga INSTALL \
autodeps/none autodeps/*.prov autodeps/*.req autogen.sh \
config.site db db3/configure installplatform platform* \
po/*.in po/*.po po/rpm.pot \
rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c
rpm.magic rpmpopt-$(VERSION) rpmqv.c
SUBDIRS = po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ @WITH_BEECRYPT_SUBDIR@ @WITH_NEON_SUBDIR@ lua rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts doc .
......@@ -122,10 +122,6 @@ pkgsrcdir = $(prefix)/src/$(RPMCANONVENDOR)
install-data-local:
@$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm
@rm -f $(DESTDIR)$(libdir)/rpmrc
@@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc
@rm -f $(DESTDIR)$(libdir)/rpmpopt
@@LN_S@ rpm/rpmpopt $(DESTDIR)$(libdir)/rpmpopt
@rm -f $(DESTDIR)$(libdir)/rpm/rpmt
@@LN_S@ rpmb $(DESTDIR)$(libdir)/rpm/rpmt
@rm -f $(DESTDIR)$(libdir)/rpm/rpme
......@@ -156,7 +152,8 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i486 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i586 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i686 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/geode ;;\
alpha*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alpha ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alphaev6 ;;\
arm*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv3l ;\
......@@ -168,7 +165,9 @@ install-data-local:
sparc*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv8 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv9 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc64 ;;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv9v ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc64 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc64v ;;\
ia64*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ia64 ;;\
s390*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/s390 ;;\
mipsel*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/mipsel ;;\
......@@ -245,5 +244,3 @@ cscope:
cref: ctags cscope
ChangeLog:
hg log -v > ChangeLog
......@@ -255,6 +255,7 @@ ROOT_GROUP = @ROOT_GROUP@
RPM = @RPM@
RPMCANONARCH = @RPMCANONARCH@
RPMCANONCOLOR = @RPMCANONCOLOR@
RPMCANONGNU = @RPMCANONGNU@
RPMCANONOS = @RPMCANONOS@
RPMCANONVENDOR = @RPMCANONVENDOR@
RPMCONFIGDIR = @RPMCONFIGDIR@
......@@ -328,6 +329,7 @@ __ID = @__ID@
__ID_U = @__ID_U@
__INSTALL = @__INSTALL@
__LD = @__LD@
__LZMA = @__LZMA@
__MAKE = @__MAKE@
__MKDIR = @__MKDIR@
__MV = @__MV@
......@@ -409,7 +411,7 @@ EXTRA_DIST = CHANGES ChangeLog CREDITS Doxyheader GROUPS README.amiga INSTALL \
autodeps/none autodeps/*.prov autodeps/*.req autogen.sh \
config.site db db3/configure installplatform platform* \
po/*.in po/*.po po/rpm.pot \
rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c
rpm.magic rpmpopt-$(VERSION) rpmqv.c
SUBDIRS = po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ @WITH_BEECRYPT_SUBDIR@ @WITH_NEON_SUBDIR@ lua rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts doc .
INCLUDES = \
......@@ -1174,10 +1176,6 @@ lint:
install-data-local:
@$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm
@rm -f $(DESTDIR)$(libdir)/rpmrc
@@LN_S@ rpm/rpmrc $(DESTDIR)$(libdir)/rpmrc
@rm -f $(DESTDIR)$(libdir)/rpmpopt
@@LN_S@ rpm/rpmpopt $(DESTDIR)$(libdir)/rpmpopt
@rm -f $(DESTDIR)$(libdir)/rpm/rpmt
@@LN_S@ rpmb $(DESTDIR)$(libdir)/rpm/rpmt
@rm -f $(DESTDIR)$(libdir)/rpm/rpme
......@@ -1208,7 +1206,8 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i486 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i586 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i686 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/geode ;;\
alpha*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alpha ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alphaev6 ;;\
arm*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv3l ;\
......@@ -1220,7 +1219,9 @@ install-data-local:
sparc*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv8 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv9 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc64 ;;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv9v ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc64 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc64v ;;\
ia64*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/ia64 ;;\
s390*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/s390 ;;\
mipsel*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/mipsel ;;\
......@@ -1296,9 +1297,6 @@ cscope:
@CSCOPE@ -b -R
cref: ctags cscope
ChangeLog:
hg log -v > ChangeLog
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
This is RPM, the Red Hat Package Manager.
This is RPM, the RPM Package Manager.
The latest releases are always available at:
ftp://ftp.rpm.org/pub/rpm
http://rpm.org/releases/
Additional RPM documentation (papers, slides, HOWTOs) can also be
found at the same site, as well as http://www.rpm.org.
found at the same site: http://rpm.org.
There is a mailing list for discussion of RPM issues, rpm-list@redhat.com.
To subscribe, send a message to rpm-list-request@redhat.com with the word
......
This diff is collapsed.
......@@ -5,7 +5,7 @@
# This script reads filenames from STDIN and outputs any relevant provides
# information that needs to be included in the package.
filelist=$(sed -n -e '/\.dylib/p' -e '/\.so/p' -e '/\.bundle/p' | sort | uniq | xargs file -L 2>/dev/null | grep "Mach-O.*ppc" | cut -d: -f1)
filelist=$(sed -n -e '/\.dylib/p' -e '/\.so/p' -e '/\.bundle/p' | sort | uniq | xargs file -L 2>/dev/null | grep "Mach-O.*\(ppc\|i386\)" | cut -d: -f1)
for f in $filelist; do
libname=$(basename $f | sed -e 's;\..*;;')
......
......@@ -113,6 +113,7 @@ for f in $liblist $exelist ; do
(START==2) && (LIBNAME!="") && ($4!="") && (($4~/^GLIBC_*/) || ($4~/^GCC_*/)) {
print LIBNAME "(" $4 ")'$lib64'";
}
/^[A-Za-z]/ { START=3; }
'
done | sort -u
......
......@@ -49,11 +49,6 @@ static int checkSpec(rpmts ts, Header h)
return rc;
}
/*
* Kurwa, durni ameryka?ce sobe zawsze my?l?, ?e ca?y ?wiat mwi po
* angielsku...
*/
/* XXX this is still a dumb test but at least it's i18n aware */
/**
*/
static int isSpecFile(const char * specfile)
......@@ -149,7 +144,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
(void) isCompressed(arg, &res);
cmd = alloca(strlen(arg) + 50 + strlen(tmpSpecFile));
sprintf(cmd, "%s < %s | tar xOvf - Specfile 2>&1 > %s",
sprintf(cmd, "%s < '%s' | tar xOvf - Specfile 2>&1 > '%s'",
zcmds[res & 0x3], arg, tmpSpecFile);
if (!(fp = popen(cmd, "r"))) {
rpmError(RPMERR_POPEN, _("Failed to open tar pipe: %m\n"));
......@@ -161,7 +156,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
/* Try again */
(void) pclose(fp);
sprintf(cmd, "%s < %s | tar xOvf - --wildcards \\*.spec 2>&1 > %s",
sprintf(cmd, "%s < '%s' | tar xOvf - --wildcards \\*.spec 2>&1 > '%s'",
zcmds[res & 0x3], arg, tmpSpecFile);
if (!(fp = popen(cmd, "r"))) {
rpmError(RPMERR_POPEN, _("Failed to open tar pipe: %m\n"));
......
......@@ -173,6 +173,7 @@ ROOT_GROUP = @ROOT_GROUP@
RPM = @RPM@
RPMCANONARCH = @RPMCANONARCH@
RPMCANONCOLOR = @RPMCANONCOLOR@
RPMCANONGNU = @RPMCANONGNU@
RPMCANONOS = @RPMCANONOS@
RPMCANONVENDOR = @RPMCANONVENDOR@
RPMCONFIGDIR = @RPMCONFIGDIR@
......@@ -246,6 +247,7 @@ __ID = @__ID@
__ID_U = @__ID_U@
__INSTALL = @__INSTALL@
__LD = @__LD@
__LZMA = @__LZMA@
__MAKE = @__MAKE@
__MKDIR = @__MKDIR@
__MV = @__MV@
......
......@@ -180,11 +180,11 @@ int doScript(Spec spec, int what, const char *name, StringBuf sb, int test)
(void) fputs(buildTemplate, fp);
if (what != RPMBUILD_PREP && what != RPMBUILD_RMBUILD && spec->buildSubdir)
fprintf(fp, "cd %s\n", spec->buildSubdir);
fprintf(fp, "cd '%s'\n", spec->buildSubdir);
if (what == RPMBUILD_RMBUILD) {
if (spec->buildSubdir)
fprintf(fp, "rm -rf %s\n", spec->buildSubdir);
fprintf(fp, "rm -rf '%s'\n", spec->buildSubdir);
} else if (sb != NULL)
fprintf(fp, "%s", getStringBuf(sb));
......
......@@ -1065,7 +1065,6 @@ static int compareFileListRecs(const void * ap, const void * bp) /*@*/
/**
* Test if file is located in a %docdir.
* @bug Use of strstr(3) might result in false positives.
* @param fl package file tree walk data
* @param fileName file path
* @return 1 if doc file, 0 if not
......@@ -1073,9 +1072,12 @@ static int compareFileListRecs(const void * ap, const void * bp) /*@*/
static int isDoc(FileList fl, const char * fileName) /*@*/
{
int x = fl->docDirCount;
size_t k, l;
k = strlen(fileName);
while (x--) {
if (strstr(fileName, fl->docDirs[x]) == fileName)
l = strlen(fl->docDirs[x]);
if (l < k && strncmp(fileName, fl->docDirs[x], l) == 0 && fileName[l] == '/')
return 1;
}
return 0;
......@@ -1894,7 +1896,7 @@ static int processBinaryFile(/*@unused@*/ Package pkg, FileList fl,
/*@-branchstate@*/
rc = rpmGlob(diskURL, &argc, &argv);
if (rc == 0 && argc >= 1 && !Glob_pattern_p(argv[0], quote)) {
if (rc == 0 && argc >= 1) {
for (i = 0; i < argc; i++) {
rc = addFile(fl, argv[i], NULL);
/*@-boundswrite@*/
......@@ -2503,8 +2505,8 @@ int processBinaryFiles(Spec spec, int installSpecialDoc, int test)
if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)))
res = rc;
(void) rpmfcGenerateDepends(spec, pkg);
if ((rc = rpmfcGenerateDepends(spec, pkg)))
res = rc;
}
/* Now we have in fileList list of files from all packages.
......
......@@ -423,7 +423,7 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName,
FD_t fd = NULL;
FD_t ifd = NULL;
int_32 count, sigtag;
const char * sigtarget;
const char * sigtarget = NULL;
const char * rpmio_flags = NULL;
const char * SHA1 = NULL;
char *s;
......
......@@ -137,7 +137,7 @@ static char *doPatch(Spec spec, int c, int strip, const char *db,
sprintf(buf,
"echo \"Patch #%d (%s):\"\n"
"%s -d < %s | patch -p%d %s -s\n"
"%s -d < '%s' | patch -p%d %s -s\n"
"STATUS=$?\n"
"if [ $STATUS -ne 0 ]; then\n"
" exit $STATUS\n"
......@@ -149,7 +149,7 @@ static char *doPatch(Spec spec, int c, int strip, const char *db,
} else {
sprintf(buf,
"echo \"Patch #%d (%s):\"\n"
"patch -p%d %s -s < %s", c, (const char *) basename(fn),
"patch -p%d %s -s < '%s'", c, (const char *) basename(fn),
strip, args, fn);
}
......@@ -255,13 +255,17 @@ static char *doPatch(Spec spec, int c, int strip, const char *db,
t = "%{_unzipbin} -qq";
needtar = 0;
break;
case COMPRESSED_LZMA:
t = "%{__lzma} -dc";
break;
}
zipper = rpmGetPath(t, NULL);
buf[0] = '\0';
t = stpcpy(buf, zipper);
zipper = _free(zipper);
*t++ = ' ';
t = stpcpy(t, " '");
t = stpcpy(t, fn);
t = stpcpy(t, "'");
if (needtar)
t = stpcpy( stpcpy( stpcpy(t, " | tar "), taropts), " -");
t = stpcpy(t,
......@@ -374,20 +378,20 @@ static int doSetupMacro(Spec spec, char *line)
const char *buildDir;
(void) urlPath(buildDirURL, &buildDir);
sprintf(buf, "cd %s", buildDir);
sprintf(buf, "cd '%s'", buildDir);
appendLineStringBuf(spec->prep, buf);
buildDirURL = _free(buildDirURL);
}
/* delete any old sources */
if (!leaveDirs) {
sprintf(buf, "rm -rf %s", spec->buildSubdir);
sprintf(buf, "rm -rf '%s'", spec->buildSubdir);
appendLineStringBuf(spec->prep, buf);
}
/* if necessary, create and cd into the proper dir */
if (createDir) {
sprintf(buf, MKDIR_P " %s\ncd %s",
sprintf(buf, MKDIR_P " %s\ncd '%s'",
spec->buildSubdir, spec->buildSubdir);
appendLineStringBuf(spec->prep, buf);
}
......@@ -404,7 +408,7 @@ static int doSetupMacro(Spec spec, char *line)
before = freeStringBuf(before);
if (!createDir) {
sprintf(buf, "cd %s", spec->buildSubdir);
sprintf(buf, "cd '%s'", spec->buildSubdir);
appendLineStringBuf(spec->prep, buf);
}
......
......@@ -65,6 +65,10 @@ int parseRCPOT(Spec spec, Package pkg, const char *field, rpmTag tagN,
tagflags |= RPMSENSE_PREREQ;
h = spec->buildRestrictions;
break;
case RPMTAG_TRIGGERPREIN:
tagflags |= RPMSENSE_TRIGGERPREIN;
h = pkg->header;
break;
case RPMTAG_TRIGGERIN:
tagflags |= RPMSENSE_TRIGGERIN;
h = pkg->header;
......
......@@ -149,6 +149,13 @@ int parseScript(Spec spec, int parsePart)
progtag = RPMTAG_VERIFYSCRIPTPROG;
partname = "%verifyscript";
break;
case PART_TRIGGERPREIN:
tag = RPMTAG_TRIGGERSCRIPTS;
tagflags = 0;
reqtag = RPMTAG_TRIGGERPREIN;
progtag = RPMTAG_TRIGGERSCRIPTPROG;
partname = "%triggerprein";
break;
case PART_TRIGGERIN:
tag = RPMTAG_TRIGGERSCRIPTS;
tagflags = 0;
......
......@@ -38,6 +38,7 @@ static struct PartRec {
{ PART_CHANGELOG, 0, "%changelog"},
{ PART_DESCRIPTION, 0, "%description"},
{ PART_TRIGGERPOSTUN, 0, "%triggerpostun"},
{ PART_TRIGGERPREIN, 0, "%triggerprein"},
{ PART_TRIGGERUN, 0, "%triggerun"},
{ PART_TRIGGERIN, 0, "%triggerin"},
{ PART_TRIGGERIN, 0, "%trigger"},
......@@ -128,21 +129,10 @@ static void forceIncludeFile(Spec spec, const char * fileName)
/**
*/
/*@-boundswrite@*/
static int copyNextLine(Spec spec, OFI_t *ofi, int strip)
/*@globals rpmGlobalMacroContext, h_errno,
fileSystem @*/
/*@modifies spec->nextline, spec->nextpeekc, spec->lbuf, spec->line,
ofi->readPtr,
rpmGlobalMacroContext, fileSystem @*/
static int copyNextLineFromOFI(Spec spec, OFI_t *ofi)
{
char *last;
char ch;
/* Restore 1st char in (possible) next line */
if (spec->nextline != NULL && spec->nextpeekc != '\0') {
*spec->nextline = spec->nextpeekc;
spec->nextpeekc = '\0';
}
/* Expand next line from file into line buffer */
if (!(spec->nextline && *spec->nextline)) {
int pc = 0, bc = 0, nc = 0;
......@@ -205,6 +195,16 @@ static int copyNextLine(Spec spec, OFI_t *ofi, int strip)
spec->nextline = spec->lbuf;
}
return 0;
}
/**
*/
static void copyNextLineFinish(Spec spec, int strip)
{
char *last;
char ch;
/* Find next line in expanded line buffer */
spec->line = last = spec->nextline;
ch = ' ';
......@@ -225,23 +225,11 @@ static int copyNextLine(Spec spec, OFI_t *ofi, int strip)
if (strip & STRIP_TRAILINGSPACE)
*last = '\0';
return 0;
}
/*@=boundswrite@*/
/*@-boundswrite@*/
int readLine(Spec spec, int strip)
static int readLineFromOFI(Spec spec, OFI_t *ofi)
{
#ifdef DYING
const char *arch;
const char *os;
#endif
char *s;
int match;
struct ReadLevelEntry *rl;
OFI_t *ofi = spec->fileStack;
int rc;
retry:
/* Make sure the current file is open */
......@@ -256,9 +244,8 @@ retry:
}
spec->lineNum = ofi->lineNum = 0;
}
/*@=branchstate@*/
/* Make sure we have something in the read buffer */
/*@=branchstate@*/
if (!(ofi->readPtr && *(ofi->readPtr))) {
/*@-type@*/ /* FIX: cast? */
FILE * f = fdGetFp(ofi->fd);
......@@ -297,6 +284,21 @@ retry:
sl->sl_lines[sl->sl_nlines++] = xstrdup(ofi->readBuf);
}
}
return 0;
}
/*@-boundswrite@*/
int readLine(Spec spec, int strip)
{
#ifdef DYING
const char *arch;
const char *os;
#endif
char *s;
int match;
struct ReadLevelEntry *rl;
OFI_t *ofi = spec->fileStack;
int rc;
#ifdef DYING
arch = NULL;
......@@ -305,13 +307,27 @@ retry:
rpmGetOsInfo(&os, NULL);
#endif
/* Copy next file line into the spec line buffer */
if ((rc = copyNextLine(spec, ofi, strip)) != 0) {
/* Restore 1st char in (possible) next line */
if (spec->nextline != NULL && spec->nextpeekc != '\0') {
*spec->nextline = spec->nextpeekc;
spec->nextpeekc = '\0';
} else {
retry:
/* Make sure we have something in the read buffer */
if ((rc = readLineFromOFI(spec, ofi)) != 0) {
return rc;
}
if ((rc = copyNextLineFromOFI(spec, ofi)) != 0) {
if (rc == RPMERR_UNMATCHEDIF)
goto retry;
return rc;
}
}
/* Copy next file line into the spec line buffer */
copyNextLineFinish(spec, strip);
s = spec->line;
SKIPSPACE(s);
......@@ -524,6 +540,7 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL,
case PART_PRETRANS:
case PART_POSTTRANS:
case PART_VERIFYSCRIPT:
case PART_TRIGGERPREIN:
case PART_TRIGGERIN:
case PART_TRIGGERUN:
case PART_TRIGGERPOSTUN:
......
......@@ -71,7 +71,8 @@ typedef enum rpmParseState_e {
PART_VERIFYSCRIPT = 18, /*!< */
PART_BUILDARCHITECTURES= 19,/*!< */
PART_TRIGGERPOSTUN = 20, /*!< */
PART_LAST = 21 /*!< */
PART_TRIGGERPREIN = 21, /*!< */
PART_LAST = 22 /*!< */
} rpmParseState;
#define STRIP_NOTHING 0
......
......@@ -1378,7 +1378,7 @@ static struct DepMsg_s depMsgs[] = {
_notpre(RPMSENSE_SCRIPT_POSTUN), 0 },
{ "Requires", { "%{?__find_requires}", NULL, NULL, NULL },
-1, -1, RPMTAG_REQUIREFLAGS, /* XXX inherit name/version arrays */
RPMSENSE_PREREQ, RPMSENSE_PREREQ },
RPMSENSE_FIND_REQUIRES|RPMSENSE_TRIGGERIN|RPMSENSE_TRIGGERUN|RPMSENSE_TRIGGERPOSTUN|RPMSENSE_TRIGGERPREIN, 0 },
{ "Conflicts", { "%{?__find_conflicts}", NULL, NULL, NULL },
RPMTAG_CONFLICTNAME, RPMTAG_CONFLICTVERSION, RPMTAG_CONFLICTFLAGS,
0, -1 },
......
......@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
timestamp='2006-07-02'
timestamp='2007-05-17'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -161,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
......@@ -329,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:SunOS:5.*:*)
i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
......@@ -780,7 +781,7 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
i*:MINGW*:*)
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
......@@ -790,12 +791,15 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
x86:Interix*:[3456]*)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T:Interix*:[3456]*)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
*:Inter