From 10eda0cb8ad5dc61cd64bc0d44446063c7ebda9b Mon Sep 17 00:00:00 2001 From: root Date: Thu, 14 Nov 1996 21:57:24 +0000 Subject: [PATCH] verify script stuff CVS patchset: 1162 CVS date: 1996/11/14 21:57:24 --- build/pack.c | 9 ++++++--- build/spec.c | 34 ++++++++++++++++++++-------------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/build/pack.c b/build/pack.c index ff74c8d..c2ec3c8 100644 --- a/build/pack.c +++ b/build/pack.c @@ -464,6 +464,7 @@ int packageBinaries(Spec s, char *passPhrase, int doPackage) case RPMTAG_POSTIN: case RPMTAG_PREUN: case RPMTAG_POSTUN: + case RPMTAG_VERIFYSCRIPT: continue; break; /* Shouldn't need this */ default: @@ -533,7 +534,7 @@ int packageBinaries(Spec s, char *passPhrase, int doPackage) if (process_filelist(outHeader, pr, pr->filelist, &size, nametmp, packageVersion, packageRelease, RPMLEAD_BINARY, - prefix)) { + prefix, NULL)) { return 1; } @@ -617,6 +618,7 @@ int packageSource(Spec s, char *passPhrase) char *vendor; char *dist; char *p; + char *specFile; Header outHeader; StringBuf filelist; StringBuf cpioFileList; @@ -640,10 +642,11 @@ int packageSource(Spec s, char *passPhrase) /* Link in the spec file and all the sources */ p = strrchr(s->specfile, '/'); + specFile = p+1; sprintf(dest, "%s%s", tempdir, p); symlink(s->specfile, dest); appendLineStringBuf(filelist, dest); - appendLineStringBuf(cpioFileList, p+1); + appendLineStringBuf(cpioFileList, specFile); source = s->sources; scount = 0; pcount = 0; @@ -736,7 +739,7 @@ int packageSource(Spec s, char *passPhrase) /* Process the file list */ if (process_filelist(outHeader, NULL, filelist, &size, s->name, version, release, RPMLEAD_SOURCE, - NULL)) { + NULL, specFile)) { return 1; } diff --git a/build/spec.c b/build/spec.c index 55d2a05..90851f5 100644 --- a/build/spec.c +++ b/build/spec.c @@ -686,20 +686,21 @@ static int find_preamble_line(char *line, char **s) } /* None of these can be 0 !! */ -#define PREAMBLE_PART 1 -#define PREP_PART 2 -#define BUILD_PART 3 -#define INSTALL_PART 4 -#define CLEAN_PART 5 -#define PREIN_PART 6 -#define POSTIN_PART 7 -#define PREUN_PART 8 -#define POSTUN_PART 9 -#define FILES_PART 10 -#define CHANGELOG_PART 11 -#define DESCRIPTION_PART 12 -#define TRIGGERON_PART 13 -#define TRIGGEROFF_PART 14 +#define PREAMBLE_PART 1 +#define PREP_PART 2 +#define BUILD_PART 3 +#define INSTALL_PART 4 +#define CLEAN_PART 5 +#define PREIN_PART 6 +#define POSTIN_PART 7 +#define PREUN_PART 8 +#define POSTUN_PART 9 +#define FILES_PART 10 +#define CHANGELOG_PART 11 +#define DESCRIPTION_PART 12 +#define TRIGGERON_PART 13 +#define TRIGGEROFF_PART 14 +#define VERIFYSCRIPT_PART 15 static struct part_rec { int part; @@ -720,6 +721,7 @@ static struct part_rec { {DESCRIPTION_PART, 0, "%description"}, {TRIGGERON_PART, 0, "%triggeron"}, {TRIGGEROFF_PART, 0, "%triggeroff"}, + {VERIFYSCRIPT_PART, 0, "%verifyscript"}, {0, 0, 0} }; @@ -865,6 +867,9 @@ Spec parseSpec(FILE *f, char *specfile, char *buildRootOverride) case POSTUN_PART: t1 = RPMTAG_POSTUN; break; + case VERIFYSCRIPT_PART: + t1 = RPMTAG_VERIFYSCRIPT; + break; case DESCRIPTION_PART: /* %description is a little special. We need to */ /* strip off trailing blank lines. */ @@ -1207,6 +1212,7 @@ Spec parseSpec(FILE *f, char *specfile, char *buildRootOverride) case POSTIN_PART: case PREUN_PART: case POSTUN_PART: + case VERIFYSCRIPT_PART: appendLineStringBuf(sb, line); break; case TRIGGERON_PART: -- 2.7.4