follow symlinks in source packages
authormarc <devnull@localhost>
Tue, 2 Jun 1998 19:30:23 +0000 (19:30 +0000)
committermarc <devnull@localhost>
Tue, 2 Jun 1998 19:30:23 +0000 (19:30 +0000)
copy CHANGELOG* and URL stuff to all subpackages

CVS patchset: 2140
CVS date: 1998/06/02 19:30:23

CHANGES
build/files.c
build/parsePreamble.c
build/parseSpec.c

diff --git a/CHANGES b/CHANGES
index a6e9b53..653f9eb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
 2.5.1 -> 2.5.2:
        - added -bs to build just a source package
        - included irix.req and irix.prov (Tim Mooney)
+       - copy CHANGELOG* and URL tags to all subpackages
+       - follow symlinks when packaging sources
        
 2.5 -> 2.5.1:
        - fail if sources are not regular files
index 88885bf..02deafe 100644 (file)
@@ -234,7 +234,7 @@ int processSourceFiles(Spec spec)
        }
        fl.fileList[x].fileName = strdup(fn);
        fl.fileList[x].verifyFlags = RPMVERIFY_ALL;
-       lstat(s, &sb);
+       stat(s, &sb);
        fl.fileList[x].mode = sb.st_mode;
        fl.fileList[x].uid = sb.st_uid;
        fl.fileList[x].gid = sb.st_gid;
@@ -562,6 +562,9 @@ static void genCpioListAndHeader(struct FileList *fl,
            cpioListPtr->finalGid = p->gid;
            cpioListPtr->mapFlags = CPIO_MAP_PATH | CPIO_MAP_MODE |
                CPIO_MAP_UID | CPIO_MAP_GID;
+           if (isSrc) {
+               cpioListPtr->mapFlags |= CPIO_FOLLOW_SYMLINKS;
+           }
            cpioListPtr++;
            (*cpioCount)++;
        }
index ff979d2..cf50341 100644 (file)
@@ -23,6 +23,10 @@ static int copyTags[] = {
     RPMTAG_DISTRIBUTION,
     RPMTAG_VENDOR,
     RPMTAG_ICON,
+    RPMTAG_CHANGELOGTIME,
+    RPMTAG_CHANGELOGNAME,
+    RPMTAG_CHANGELOGTEXT,
+    RPMTAG_URL,
     0
 };
 
index 2a6a23d..9c7ba5d 100644 (file)
@@ -12,7 +12,6 @@
 #include "read.h"
 #include "misc.h"
 
-static int checkSources(Spec spec);
 static void setStandardMacros(Spec spec, char *arch, char *os);
 
 int parseSpec(Spec *specp, char *specFile, char *buildRoot,
@@ -161,51 +160,9 @@ int parseSpec(Spec *specp, char *specFile, char *buildRoot,
     closeSpec(spec);
     *specp = spec;
 
-    if (checkSources(spec)) {
-       freeSpec(spec);
-       return 1;
-    }
-
     return 0;
 }
 
-static int checkSources(Spec spec)
-{
-    struct Source *p;
-    Package pkg;
-    char buf[BUFSIZ];
-    struct stat sb;
-    int res = 0;
-    
-    p = spec->sources;
-    while (p) {
-       sprintf(buf, "%s/%s", rpmGetVar(RPMVAR_SOURCEDIR), p->source);
-       lstat(buf, &sb);
-       if (! S_ISREG(sb.st_mode)) {
-           rpmError(RPMERR_BADSPEC, "Source file not regular: %s", buf);
-           res = 1;
-       }
-       p = p->next;
-    }
-
-    pkg = spec->packages;
-    while (pkg) {
-       p = pkg->icon;
-       while (p) {
-           sprintf(buf, "%s/%s", rpmGetVar(RPMVAR_SOURCEDIR), p->source);
-           lstat(buf, &sb);
-           if (! S_ISREG(sb.st_mode)) {
-               rpmError(RPMERR_BADSPEC, "Source file not regular: %s", buf);
-               res = 1;
-           }
-           p = p->next;
-       }
-       pkg = pkg->next;
-    }
-
-    return res;
-}
-
 static void setStandardMacros(Spec spec, char *arch, char *os)
 {
     char buf[BUFSIZ];