Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:bmwiedemann:reproducible:test
python-rpm
rpm-ghost.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rpm-ghost.patch of Package python-rpm
diff --git a/build/files.c b/build/files.c index 86c601b9f..addbd630d 100644 --- a/build/files.c +++ b/build/files.c @@ -1048,6 +1048,8 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc) /* Generate the header. */ for (i = 0, flp = fl->files.recs; i < fl->files.used; i++, flp++) { rpm_ino_t fileid = flp - fl->files.recs; + //if(flp->flags & RPMFILE_GHOST) + // continue; // still left reguar file for ghost one /* Merge duplicate entries. */ while (i < (fl->files.used - 1) && @@ -1112,6 +1114,15 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc) headerPutString(h, RPMTAG_FILEGROUPNAME, rpmstrPoolStr(fl->pool, flp->gname)); + + if((flp->flags & RPMFILE_GHOST) || S_ISDIR(flp->fl_mode)) { + flp->fl_size = 128*1024; // pessimistic constant to allow reproducible rpms + } + printf("XXX mode=%08o %s\n",flp->fl_mode, flp->diskPath); + if(flp->flags & RPMFILE_GHOST) { + flp->fl_mode &= ~0777; + } + printf("XXM mode=%08o %s\n",flp->fl_mode, flp->diskPath); /* Only use 64bit filesizes tag if required. */ if (fl->largeFiles) { rpm_loff_t rsize64 = (rpm_loff_t)flp->fl_size; @@ -1169,7 +1180,7 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc) } buf[0] = '\0'; - if (S_ISREG(flp->fl_mode)) + if (S_ISREG(flp->fl_mode) && !(flp->flags & RPMFILE_GHOST)) (void) rpmDoDigest(digestalgo, flp->diskPath, 1, (unsigned char *)buf, NULL); headerPutString(h, RPMTAG_FILEDIGESTS, buf);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor