2.5.3 -> 2.9
+ - cpio_gzip: dup the fd before doing gzdopen (Thanks Erik!)
+ - add --noLang to skip non-default languages.
- writeRPM can now copy cpio archive from fd.
- - add special case code for "/" in %files.
- preliminary macro environment as side effect of rpmrc parse.
- macro handling in rpmlib -- rework include: tag with macro expansion.
- first attempt at librpmbuild API.
- aggregate system includes into system.h.
- rearrange functions to minimize exported routines in librpmbuild API.
- generalize cpio I/O to eliminate pipe to exec'd gzip on install.
- - better query semantics with symlinks (Tim Mooney)
- finish planting /usr/lib/rpm (remove compatibility symlinks)
- build.c: fix incorrect check for successful open
- add new fully recursive macro.c
- create /usr/lib/rpm directory and move rpmrc et al there
2.5.2 -> 2.5.3:
+ - rm .depend for multiple builds in same tree (Will Partain)
+ - add special case code for "/" in %files.
+ - better query semantics with symlinks (Tim Mooney)
- allow %define with leading whitespace
+ - use /usr/lib/rpm for rpmpopt, rpmrc, find-requires, find-provides
+ - added popt 'exec' functionality
+ - made --rebuilddb a bit more robust by checking data types
+ - added --freshen via popt exec stuff
+ - fixed spelling of expected
+ - updated de.po (Karl Eichwalder)
+ - do a better job of checking for a spec file in tarballs
+ (Pavel Roskin)
+ - fixed --triggers alias (Michael Andres)
2.5.1 -> 2.5.2:
- added -bs to build just a source package
SUBDIRS = popt @MISCDIR@ lib build tools @PO@
ALLSUBDIRS = popt misc lib build tools po
-INSTSUBDIRS = lib @PO@
+INSTSUBDIRS = lib scripts @PO@
OTHERSUBDIRS = docs autodeps
OBJS = rpm.o query.o install.o verify.o checksig.o ftp.o url.o build.o \
@GETTEXTSTUB@
-DRPMNLSDIR=\"$(RPMNLSDIR)\" \
-DVERSION=\"$(VERSION)\" \
-DLIBRPMALIAS_FILENAME="\"$(LIBRPMALIAS_FILENAME)"\" \
+ -DRPMCONFIGDIR="\"$(RPMCONFIGDIR)"\" \
-c $(srcdir)/rpm.c
# these rules should be in here, but they drive me batty
.PHONY: depend
depend:
topdir_path=`( cd $(top_srcdir) && pwd )` ; \
+ /bin/rm -f .depend ; \
$(CPP) -MM $(CFLAGS) $(srcdir)/$(SOURCES) | \
sed s+$$topdir_path+$(top_srcdir)+g > .depend ; \
for d in $(ALLSUBDIRS); do \
(cd $$d; $(MAKE) $@) ;\
done
+ /bin/rm -f .depend-done
echo > .depend-done
.PHONY: noconfig
depend:
topdir_path=`( cd $(top_srcdir) && pwd )` ; \
+ /bin/rm -f .depend ; \
$(CPP) $(CFLAGS) -MM $(srcdir)/*.c | \
sed s+$$topdir_path+$(top_srcdir)+g > .depend
Header sig;
struct rpmlead lead;
- if (csa->cpioList != NULL) {
+ if (csa->cpioFdIn < 0) {
csa->cpioArchiveSize = 0;
- /* Add the a bogus archive size to the Header */
+ /* Add a bogus archive size to the Header */
headerAddEntry(header, RPMTAG_ARCHIVESIZE, RPM_INT32_TYPE,
&csa->cpioArchiveSize, 1);
}
}
/* Now set the real archive size in the Header */
- if (csa->cpioList != NULL) {
+ if (csa->cpioFdIn < 0) {
headerModifyEntry(header, RPMTAG_ARCHIVESIZE,
RPM_INT32_TYPE, &csa->cpioArchiveSize, 1);
}
headerGetEntry(header, RPMTAG_RELEASE, NULL, (void **)&release, NULL);
sprintf(buf, "%s-%s-%s", name, version, release);
- if (csa->cpioList != NULL) {
+ if (csa->cpioFdIn < 0) {
rpmGetArchInfo(NULL, &arch);
rpmGetOsInfo(NULL, &os);
} else if (csa->lead != NULL) { /* XXX FIXME: exorcize lead/arch/os */
char *failedFile;
cfd->cpioIoType = cpioIoTypeGzFd;
- cfd->cpioGzFd = gzdopen(fdo, "w9");
+ cfd->cpioGzFd = gzdopen(dup(fdo), "w9");
rc = cpioBuildArchive(cfd, csa->cpioList, csa->cpioCount, NULL, NULL,
&csa->cpioArchiveSize, &failedFile);
gzclose(cfd->cpioGzFd);
#include "popt/popt.h"
+extern int noLang; /* XXX FIXME: pass as arg */
+
/* These have to be global scope to make up for *stupid* compilers */
static char *name;
static char *lang;
}
stripTrailingBlanksStringBuf(sb);
- headerAddI18NString(pkg->header, RPMTAG_DESCRIPTION,
+ if (!(noLang && strcmp(lang, RPMBUILD_DEFAULT_LANG))) {
+ headerAddI18NString(pkg->header, RPMTAG_DESCRIPTION,
getStringBuf(sb), lang);
+ }
freeStringBuf(sb);
return RPMERR_BADSPEC; \
}
+extern int noLang; /* XXX FIXME: pass as arg */
+
static int handlePreambleTag(Spec spec, Package pkg, int tag, char *macro,
char *lang)
{
case RPMTAG_PACKAGER:
if (! *lang) {
headerAddEntry(pkg->header, tag, RPM_STRING_TYPE, field, 1);
- } else {
+ } else if (!(noLang && strcmp(lang, RPMBUILD_DEFAULT_LANG))) {
headerAddI18NString(pkg->header, tag, field, lang);
}
break;
spec->file = NULL;
}
+int noLang = 0; /* XXX FIXME: pass as arg */
+
int parseSpec(Spec *specp, char *specFile, char *buildRoot,
int inBuildArch, char *passPhrase, char *cookie)
{
optflags: sparc -O2
optflags: m68k -O2 -fomit-frame-pointer
optflags: ppc -O2 -fsigned-char
-optflags: hppa1.0 -O2 -mpa-risc-1-0
-optflags: hppa1.1 -O2 -mpa-risc-1-0
+optflags: parisc -O2 -mpa-risc-1-0
optflags: mipseb -O2
optflags: mipsel -O2
optflags: arm3 -O2
arch_canon: IP: sgi 7
arch_canon: rs6000: rs6000 8
-arch_canon: 9000/712: hppa1.1 9
-
arch_canon: sun4u: usparc 10
arch_canon: mipsel: mipsel 11
arch_compat: mipseb: noarch
arch_compat: mipsel: noarch
-arch_compat: hppa1.1: hppa1.0
-arch_compat: hppa1.0: noarch
+arch_compat: parisc: noarch
arch_compat: arm4: arm3
arch_compat: arm3: noarch
buildarch_compat: mipseb: noarch
buildarch_compat: arm4: noarch
buildarch_compat: arm3: noarch
+buildarch_compat: parisc: noarch
depend:
topdir_path=`( cd $(top_srcdir) && pwd )` ; \
+ /bin/rm -f .depend ; \
$(CPP) $(CFLAGS) -MM $(SOURCES) | \
sed s+$$topdir_path+$(top_srcdir)+g > .depend
if ((rc = padoutfd(cfd, &totalsize, 4)))
return rc;
+fprintf(stderr, "ARCHIVESIZE total: %d\n", totalsize);
if (archiveSize) *archiveSize = totalsize;
return 0;
entry->info.count = htonl(pe->count);
entry->info.offset = -1;
+ if (entry->info.type < RPM_MIN_TYPE ||
+ entry->info.type > RPM_MAX_TYPE) return NULL;
+
src = dataStart + htonl(pe->offset);
entry->length = dataLength(entry->info.type, src,
entry->info.count, 1);
/* Entry Types */
+#define RPM_MIN_TYPE 0
#define RPM_NULL_TYPE 0
#define RPM_CHAR_TYPE 1
#define RPM_INT8_TYPE 2
#define RPM_BIN_TYPE 7
#define RPM_STRING_ARRAY_TYPE 8
#define RPM_I18NSTRING_TYPE 9
+#define RPM_MAX_TYPE 9
/* Tags -- general use tags should start at 1000 (RPM's tag space starts
there) */
recnum = rpmdbFirstRecNum(olddb);
while (recnum > 0) {
if (!(h = rpmdbGetRecord(olddb, recnum))) {
- rpmError(RPMERR_INTERNAL, _("cannot read database record at %d"),
+ rpmError(RPMERR_INTERNAL,
+ _("record number %d in database is bad -- skipping it"),
recnum);
- failed = 1;
break;
- }
-
- /* let's sanity check this record a bit, otherwise just skip it */
- if (headerIsEntry(h, RPMTAG_NAME) &&
- headerIsEntry(h, RPMTAG_VERSION) &&
- headerIsEntry(h, RPMTAG_RELEASE) &&
- headerIsEntry(h, RPMTAG_RELEASE) &&
- headerIsEntry(h, RPMTAG_BUILDTIME)) {
- if (rpmdbAdd(newdb, h)) {
- rpmError(RPMERR_INTERNAL,
- _("cannot add record originally at %d"), recnum);
- failed = 1;
- break;
- }
} else {
- rpmError(RPMERR_INTERNAL,
- _("record number %d in database is bad -- skipping it"),
- recnum);
+ /* let's sanity check this record a bit, otherwise just skip it */
+ if (headerIsEntry(h, RPMTAG_NAME) &&
+ headerIsEntry(h, RPMTAG_VERSION) &&
+ headerIsEntry(h, RPMTAG_RELEASE) &&
+ headerIsEntry(h, RPMTAG_RELEASE) &&
+ headerIsEntry(h, RPMTAG_BUILDTIME)) {
+ if (rpmdbAdd(newdb, h)) {
+ rpmError(RPMERR_INTERNAL,
+ _("cannot add record originally at %d"), recnum);
+ failed = 1;
+ break;
+ }
+ } else {
+ rpmError(RPMERR_INTERNAL,
+ _("record number %d in database is bad -- skipping it"),
+ recnum);
+ }
}
recnum = rpmdbNextRecNum(olddb, recnum);
}
if (cpu_version == CPU_PA_RISC1_2)
strcpy(un.machine, "parisc");
# endif
+# if defined(CPU_PA_RISC2_0)
+ if (cpu_version == CPU_PA_RISC2_0)
+ strcpy(un.machine, "parisc");
+# endif
}
# endif
depend:
topdir_path=`( cd $(top_srcdir) && pwd )` ; \
+ /bin/rm -f .depend ; \
$(CPP) $(CFLAGS) -MM $(srcdir)/*.c | \
sed s+$$topdir_path+$(top_srcdir)+g > .depend
static int initdb;
static int justdb;
static int noDeps;
-static int noOrder;
static int noFiles;
+extern int noLang;
static int noMd5;
+static int noOrder;
static int noPgp;
static int noScripts;
static int noTriggers;
{ "justdb", '\0', 0, &justdb, 0 },
{ "list", 'l', 0, 0, 'l' },
{ "nodeps", '\0', 0, &noDeps, 0 },
- { "noorder", '\0', 0, &noOrder, 0 },
{ "nofiles", '\0', 0, &noFiles, 0 },
+ { "nolang", '\0', 0, &noLang, 0 },
{ "nomd5", '\0', 0, &noMd5, 0 },
+ { "noorder", '\0', 0, &noOrder, 0 },
{ "nopgp", '\0', 0, &noPgp, 0 },
{ "noscripts", '\0', 0, &noScripts, 0 },
{ "notriggers", '\0', 0, &noTriggers, 0 },
initdb = 0;
justdb = 0;
noDeps = 0;
- noOrder = 0;
noFiles = 0;
+ noLang = 0;
noMd5 = 0;
+ noOrder = 0;
noPgp = 0;
noScripts = 0;
noTriggers = 0;
optCon = poptGetContext("rpm", argc, argv, optionsTable, 0);
poptReadConfigFile(optCon, LIBRPMALIAS_FILENAME);
poptReadDefaultConfig(optCon, 1);
+ poptSetExecPath(optCon, RPMCONFIGDIR, 1);
while ((arg = poptGetNextOpt(optCon)) > 0) {
optArg = poptGetOptArg(optCon);
exit(1);
if (build(specFile, buildAmount, passPhrase, buildRootOverride,
- 0, test, cookie,rcfile,arch,os,buildplatforms)) {
+ 0, test, cookie, rcfile, arch, os, buildplatforms)) {
exit(1);
}
free(cookie);
while ((pkg = poptGetArg(optCon)))
if (build(pkg, buildAmount, passPhrase, buildRootOverride,
bigMode == MODE_TARBUILD, test, NULL,
- rcfile,arch,os,buildplatforms)) {
+ rcfile, arch, os, buildplatforms)) {
exit(1);
}
break;
rpm alias --triggerscripts --qf '\
[trigger%{TRIGGERTYPE} script (through %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\
%{TRIGGERSCRIPTS}\n]'
-apm alias --triggers --triggerscripts
+rpm alias --triggers --triggerscripts
rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%-27{INSTALLTIME:date}}:{(not installed)}|\n' \
--pipe "sort -r -n | sed 's,^..........,,' | awk '{printf(\"%-35s %-3s %-3s %2s %-8s %-4s\n\", $1, $2, $3, $4, $5, $6)}' "
rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]'
+rpm exec --freshen freshen.sh
+rpm alias -F --freshen
depend:
topdir_path=`( cd $(top_srcdir) && pwd )` ; \
+ /bin/rm -f .depend ; \
$(CPP) $(CFLAGS) -MM $(srcdir)/*.c | \
sed s+$$topdir_path+$(top_srcdir)+g > .depend