Changeset 8
- Timestamp:
- Sep 3, 2010, 5:27:35 PM (15 years ago)
- Location:
- rpm/trunk
- Files:
-
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
rpm/trunk/Makefile.in
r2 r8 263 263 LIBINTL = @LIBINTL@ 264 264 LIBOBJS = @LIBOBJS@ 265 LIBS = @LIBS@265 LIBS = misc/libmisc.la -lmagic @LIBS@ 266 266 LIBTOOL = @LIBTOOL@ 267 267 LIPO = @LIPO@ … … 750 750 @rm -f rpm$(EXEEXT) 751 751 $(LINK) $(rpm_OBJECTS) $(rpm_LDADD) $(LIBS) 752 # YD link rpm_s statically, so we can use it for bootstrap 753 $(CC) $(LDFLAGS) -o rpm_s.exe $(rpm_OBJECTS) \ 754 build/.libs/rpmbuild_s.a lib/.libs/rpm_s.a rpmio/.libs/rpmio_s.a \ 755 -lsqlite3_s -lz -lbz2 -ldb -lpopt -lmagic -lurpo -lmmap -lpthread -lssp 756 752 757 rpm2cpio$(EXEEXT): $(rpm2cpio_OBJECTS) $(rpm2cpio_DEPENDENCIES) 753 758 @rm -f rpm2cpio$(EXEEXT) … … 1552 1557 install-data-local: 1553 1558 @case "@host_os@" in \ 1554 solaris*|linux*|darwin* ) \1559 solaris*|linux*|darwin*|os2*) \ 1555 1560 DESTDIR="$(DESTDIR)" pkglibdir="$(rpmconfigdir)" $(SHELL) $(top_srcdir)/installplatform rpmrc macros platform ;; \ 1556 1561 esac -
rpm/trunk/build.c
r2 r8 222 222 } 223 223 224 if (*specFile != '/') { 224 if (*specFile != '/' 225 #ifdef __EMX__ 226 && specFile[1] != ':' 227 #endif 228 ) { 225 229 char *cwd = rpmGetCwd(); 226 230 char *s = NULL; -
rpm/trunk/build/Makefile.in
r2 r8 410 410 librpmbuild.la: $(librpmbuild_la_OBJECTS) $(librpmbuild_la_DEPENDENCIES) 411 411 $(librpmbuild_la_LINK) -rpath $(usrlibdir) $(librpmbuild_la_OBJECTS) $(librpmbuild_la_LIBADD) $(LIBS) 412 cp .libs/rpmbuild.a .libs/rpmbuild_s.a 413 dllar -g -nolxlite -Zomf -o .libs/rpmbuild .libs/rpmbuild.a -l../lib/.libs/rpm.a -l../rpmio/.libs/rpmio.a -lmagic -lsqlite3 -ldb -lbz2 -lz -lpopt -lurpo -lmmap -lpthread -lssp 412 414 413 415 mostlyclean-compile: -
rpm/trunk/build/build.c
r2 r8 5 5 6 6 #include "system.h" 7 #ifdef __EMX__ 8 #include <process.h> 9 #include <fcntl.h> 10 #endif 7 11 8 12 #include <rpm/rpmbuild.h> … … 144 148 } 145 149 146 if (*rootDir == '\0') rootDir = "/ ";150 if (*rootDir == '\0') rootDir = "/@unixroot"; 147 151 148 152 buildTemplate = rpmExpand(mTemplate, NULL); … … 171 175 if (_build_debug) 172 176 fprintf(stderr, "*** rootDir %s buildDir %s\n", rootDir, buildDir); 173 if (buildDir && buildDir[0] != '/') { 177 if (buildDir && buildDir[0] != '/' 178 #ifdef __EMX__ 179 && buildDir[1] != ':' 180 #endif 181 ) { 174 182 rc = RPMRC_FAIL; 175 183 goto exit; … … 180 188 181 189 rpmlog(RPMLOG_NOTICE, _("Executing(%s): %s\n"), name, buildCmd); 190 #ifdef __EMX__ 191 child = spawnvp(P_NOWAIT, argv[0], (char *const *)argv); 192 if (child == -1) 193 // waitpid will fail too! 194 rpmlog(RPMLOG_ERR, _("Exec of %s failed (%s): %s\n"), 195 scriptName, name, strerror(errno)); 196 #else 182 197 if (!(child = fork())) { 183 198 … … 190 205 _exit(127); /* exit 127 for compatibility with bash(1) */ 191 206 } 207 #endif 192 208 193 209 pid = waitpid(child, &status, 0); -
rpm/trunk/build/files.c
r2 r8 2181 2181 flp->langs = xstrdup(""); 2182 2182 2183 #ifndef __EMX__ 2183 2184 if (! (flp->uname && flp->gname)) { 2184 2185 rpmlog(RPMLOG_ERR, _("Bad owner/group: %s\n"), diskPath); 2185 2186 fl.processingFailed = 1; 2186 2187 } 2188 #endif 2187 2189 2188 2190 isSpec = 0; -
rpm/trunk/build/names.c
r2 r8 106 106 const char *getGname(gid_t gid) 107 107 { 108 #ifdef __EMX__ 109 struct group fake_gr = { "root", NULL, 0, NULL}; 110 #endif 108 111 struct group *gr; 109 112 int x; … … 118 121 if (x == UGIDMAX) 119 122 rpmlog(RPMLOG_CRIT, _("getGname: too many gid's\n")); 120 123 124 #ifdef __EMX__ 125 gr = &fake_gr; 126 #else 121 127 if ((gr = getgrgid(gid)) == NULL) 122 128 return NULL; 129 #endif 123 130 gids[gid_used] = gid; 124 131 gnames[gid_used] = xstrdup(gr->gr_name); -
rpm/trunk/build/pack.c
r2 r8 477 477 payloadtag = RPMSIGTAG_LONGARCHIVESIZE; 478 478 } 479 (void) rpmAddSignature(sig, sigtarget, sizetag, passPhrase);480 (void) rpmAddSignature(sig, sigtarget, RPMSIGTAG_MD5, passPhrase);479 // (void) rpmAddSignature(sig, sigtarget, sizetag, passPhrase); 480 // (void) rpmAddSignature(sig, sigtarget, RPMSIGTAG_MD5, passPhrase); 481 481 482 482 if ((sigtag = rpmLookupSignatureType(RPMLOOKUPSIG_QUERY)) > 0) { -
rpm/trunk/build/parsePrep.c
r2 r8 26 26 return RPMRC_FAIL; 27 27 } 28 #ifndef __EMX__ 28 29 if (!getUname(sb.st_uid) || !getGname(sb.st_gid)) { 29 30 rpmlog(RPMLOG_ERR, _("Bad owner/group: %s\n"), urlfn); 30 31 return RPMRC_FAIL; 31 32 } 33 #endif 32 34 33 35 return RPMRC_OK; -
rpm/trunk/build/reqprov.c
r2 r8 51 51 rpmTag indextag = 0; 52 52 rpmsenseFlags extra = RPMSENSE_ANY; 53 char N2[_MAX_PATH]; 53 54 54 55 if (Flags & RPMSENSE_PROVIDES) { … … 95 96 96 97 /* Avoid adding duplicate dependencies. */ 97 if (isNewDep(h, nametag, N, EVR, Flags, indextag, index)) { 98 headerPutString(h, nametag, N); 98 strcpy( N2, ""); 99 #ifdef __EMX__ 100 // YD need to add @unixroot remapping 101 if (!strncmp( N, "/bin", 4) || !strncmp( N, "/usr/bin", 8)) { 102 strcpy( N2, "/@unixroot"); 103 } 104 #endif 105 strcat( N2, N); 106 if (isNewDep(h, nametag, N2, EVR, Flags, indextag, index)) { 107 headerPutString(h, nametag, N2); 99 108 headerPutString(h, versiontag, EVR); 100 109 headerPutUint32(h, flagtag, &Flags, 1); -
rpm/trunk/build/rpmfc.c
r2 r8 1 1 #include "system.h" 2 3 #ifdef __EMX__ 4 #include <process.h> 5 #include <stdlib.h> 6 #endif 2 7 3 8 #include <signal.h> … … 95 100 StringBuf readBuff; 96 101 int done; 97 102 #ifdef __EMX__ 103 int i, fd, nbw, nbr; 104 FILE* in; 105 char tmpfile[_MAX_PATH]; 106 char buffer[32*1024]; 107 #endif 108 109 #ifndef __EMX__ 98 110 /* FIX: cast? */ 99 111 oldhandler = signal(SIGPIPE, SIG_IGN); … … 145 157 (void) fcntl(toProg[1], F_SETFL, O_NONBLOCK); 146 158 159 #else 160 161 if (dir && chdir(dir)) { 162 rpmlog(RPMLOG_ERR, _("Couldn't chdir to %s: %s\n"), 163 dir, strerror(errno)); 164 _exit(EXIT_FAILURE); 165 } 166 167 // write data to file 168 strcpy( tmpfile, "check-files-XXXXXX"); 169 if (mktemp( tmpfile) == NULL) { 170 rpmlog(RPMLOG_ERR, _("Couldn't get temp file: %s\n"), 171 strerror(errno)); 172 return NULL; 173 } 174 fd = open( tmpfile, O_CREAT|O_TRUNC|O_BINARY|O_WRONLY); 175 if (fd == -1) { 176 unlink(tmpfile); 177 rpmlog(RPMLOG_ERR, _("Couldn't open temp file: %s\n"), 178 strerror(errno)); 179 return NULL; 180 } 181 nbw = write( fd, writePtr,writeBytesLeft); 182 if (nbw != writeBytesLeft) { 183 close(fd); 184 unlink(tmpfile); 185 rpmlog(RPMLOG_ERR, _("Couldn't write temp file: %s\n"), 186 strerror(errno)); 187 return NULL; 188 } 189 close(fd); 190 191 // create command line, popen does 192 // not directly execute shell scripts :-( 193 // TODO rewrite check-files.sh in rexx 194 strcpy( buffer, "sh -c \""); 195 strcat( buffer, argv[0]); 196 // popen requires backslash! 197 //for( i=0; i<strlen(buffer); i++) 198 // if (buffer[i] == '/') 199 // buffer[i] = '\\'; 200 201 i = 1; 202 while( argv[i] != NULL) { 203 strcat( buffer, " "); 204 strcat( buffer, argv[i++]); 205 } 206 // add temp file 207 strcat( buffer, " "); 208 strcat( buffer, tmpfile); 209 strcat( buffer, "\""); 210 if (0) 211 fprintf( stderr,"command line: '%s'\n", buffer); 212 213 // execute child and read input pipe 214 in = popen( buffer, "r"); 215 if (in == NULL) { 216 unlink(tmpfile); 217 rpmlog(RPMLOG_ERR, _("Couldn't popen: %s\n"), 218 strerror(errno)); 219 return NULL; 220 } 221 222 readBuff = newStringBuf(); 223 224 /* Read any data from prog */ 225 { char buf[BUFSIZ+1]; 226 while (!feof(in)) { 227 nbr = fread(buf, 1, sizeof(buf)-1, in); 228 buf[nbr] = '\0'; 229 if (0) 230 fprintf( stderr,"read '%s'\n",buf); 231 appendStringBuf(readBuff, buf); 232 } 233 } 234 fclose(in); 235 236 // delete temporary 237 unlink(tmpfile); 238 239 #endif // __EMX__ 240 241 #ifndef __EMX__ 147 242 readBuff = newStringBuf(); 148 243 … … 226 321 return NULL; 227 322 } 323 #endif // __EMX__ 324 228 325 return readBuff; 229 326 } … … 715 812 716 813 if (is_executable) { 814 char s2[_MAX_PATH]; 717 815 /* Add to package requires. */ 718 ds = rpmdsSingle(RPMTAG_REQUIRENAME, s, "", RPMSENSE_FIND_REQUIRES); 816 strcpy( s2, ""); 817 #ifdef __EMX__ 818 // YD need to add @unixroot remapping 819 if (!strncmp( s, "/bin", 4) || !strncmp( s, "/usr/bin", 8)) { 820 strcpy( s2, "/@unixroot"); 821 } 822 #endif 823 strcat( s2, s); 824 ds = rpmdsSingle(RPMTAG_REQUIRENAME, s2, "", RPMSENSE_FIND_REQUIRES); 719 825 xx = rpmdsMerge(&fc->requires, ds); 720 826 -
rpm/trunk/configure
r2 r8 18547 18547 else 18548 18548 18549 as_fn_error "missing required NSPR / NSS header" "$LINENO" 518549 echo as_fn_error "missing required NSPR / NSS header" "$LINENO" 5 18550 18550 18551 18551 fi … … 18595 18595 else 18596 18596 18597 as_fn_error "missing required NSS library 'nss3'" "$LINENO" 518597 echo as_fn_error "missing required NSS library 'nss3'" "$LINENO" 5 18598 18598 18599 18599 fi … … 18616 18616 else 18617 18617 ac_check_lib_save_LIBS=$LIBS 18618 LIBS="-lmagic $LIBS"18618 LIBS="-lmagic -lz $LIBS" 18619 18619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18620 18620 /* end confdefs.h. */ -
rpm/trunk/lib/Makefile.in
r2 r8 456 456 AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \ 457 457 -I$(top_builddir)/include/ @WITH_NSS_INCLUDE@ \ 458 -I$(top_builddir)/include/nss \ 458 459 @WITH_POPT_INCLUDE@ @WITH_SQLITE3_INCLUDE@ \ 459 460 -I$(top_srcdir)/misc -DLOCALEDIR="\"$(localedir)\"" \ … … 647 648 librpm.la: $(librpm_la_OBJECTS) $(librpm_la_DEPENDENCIES) 648 649 $(librpm_la_LINK) -rpath $(usrlibdir) $(librpm_la_OBJECTS) $(librpm_la_LIBADD) $(LIBS) 650 cp .libs/rpm.a .libs/rpm_s.a 651 dllar -g -nolxlite -Zomf -o .libs/rpm .libs/rpm.a -l../rpmio/.libs/rpmio.a -lsqlite3 -ldb -lbz2 -lz -lpopt -lurpo -lmmap -lpthread -lssp 652 cp .libs/rpm.dll .. 649 653 650 654 clean-checkPROGRAMS: -
rpm/trunk/lib/backend/sqlite.c
r2 r8 104 104 rpmdb db = dbi->dbi_rpmdb; 105 105 106 if (rstreq(db->db_root, "/") || db->db_chrootDone || sqlInRoot) 106 if (rstreq(db->db_root, "/") 107 #ifdef __EMX__00 108 || rstreq(db->db_root, "/@unixroot") 109 #endif 110 || db->db_chrootDone || sqlInRoot) 107 111 /* Nothing to do, was not already in chroot */ 108 112 return; 113 114 #ifdef __EMX__ 115 // if @unixroot, at least be sure to set current drive! 116 if (rstreq(db->db_root, "/@unixroot")) { 117 if (_debug) 118 fprintf(stderr,"cwd:%s\n", getcwd(NULL,0)); 119 chdir("/@unixroot/"); 120 /* Nothing to do, was not already in chroot */ 121 return; 122 } 123 #endif 109 124 110 125 if (_debug) … … 114 129 xx = chdir("/"); 115 130 xx = chroot(db->db_root); 131 if (_debug) 116 132 assert(xx == 0); 117 133 sqlInRoot=1; -
rpm/trunk/lib/depends.c
r2 r8 34 34 #define HTKEYTYPE const char * 35 35 #define HTDATATYPE int 36 #include "lib/rpmhash .H"37 #include "lib/rpmhash .C"36 #include "lib/rpmhashC.H" 37 #include "lib/rpmhashC.C" 38 38 39 39 /** -
rpm/trunk/lib/fprint.c
r2 r8 15 15 16 16 /* Create new hash table type rpmFpEntryHash */ 17 #include "lib/rpmhash .C"17 #include "lib/rpmhashC.C" 18 18 19 19 #undef HASHTYPE … … 23 23 #define HTKEYTYPE const char * 24 24 #define HTDATATYPE const struct fprintCacheEntry_s * 25 #include "lib/rpmhash .C"25 #include "lib/rpmhashC.C" 26 26 27 27 fingerPrintCache fpCacheCreate(int sizeHint) -
rpm/trunk/lib/fprint.h
r2 r8 36 36 #define HTKEYTYPE const char * 37 37 #define HTDATATYPE const struct fprintCacheEntry_s * 38 #include "lib/rpmhash .H"38 #include "lib/rpmhashC.H" 39 39 40 40 /** … … 71 71 #define HTKEYTYPE const fingerPrint * 72 72 #define HTDATATYPE struct rpmffi_s 73 #include "lib/rpmhash .H"73 #include "lib/rpmhashC.H" 74 74 75 75 /** */ -
rpm/trunk/lib/fsm.c
r2 r8 832 832 fdFiniDigest(fsm->wfd, fsm->digestalgo, &digest, NULL, asAscii); 833 833 834 #ifndef __EMX__ // YD FIXME 834 835 if (digest == NULL) { 835 836 rc = CPIOERR_DIGEST_MISMATCH; 836 837 goto exit; 837 838 } 839 #endif 838 840 839 841 if (fsm->digest != NULL) { … … 2072 2074 break; 2073 2075 case FSM_MKDIR: 2076 #ifdef __EMX__ 2077 if (strcmp(fsm->path, "/@unixroot")==0) 2078 rc = 0; 2079 else 2080 #endif 2074 2081 rc = mkdir(fsm->path, (st->st_mode & 07777)); 2075 2082 if (_fsm_debug && (stage & FSM_SYSCALL)) … … 2080 2087 break; 2081 2088 case FSM_RMDIR: 2089 #ifdef __EMX__ 2090 if (strcmp(fsm->path, "/@unixroot")==0) 2091 rc = 0; 2092 else 2093 #endif 2082 2094 rc = rmdir(fsm->path); 2083 2095 if (_fsm_debug && (stage & FSM_SYSCALL)) -
rpm/trunk/lib/poptALL.c
r2 r8 67 67 const char * rpmcliRcfile = NULL; 68 68 69 const char * rpmcliRootDir = "/ ";69 const char * rpmcliRootDir = "/@unixroot"; 70 70 71 71 rpmQueryFlags rpmcliQueryFlags; -
rpm/trunk/lib/psm.c
r2 r8 3 3 * Package state machine to handle a package from a transaction set. 4 4 */ 5 6 #ifdef __EMX__ 7 #include <process.h> 8 #endif 5 9 6 10 #include "system.h" … … 696 700 xx = Fclose(fd); 697 701 702 #ifdef __EMX__ 703 argvAdd(argvp, "-c"); 704 argvAdd(argvp, fn); 705 #else 698 706 { const char * sn = fn; 699 707 if (!rpmtsChrootDone(ts) && rootDir != NULL && … … 704 712 argvAdd(argvp, sn); 705 713 } 714 #endif 706 715 707 716 if (arg1 >= 0) { … … 713 722 } 714 723 724 #ifdef __EMX__ 725 //psm->sq.child = spawnvp(P_NOWAIT, argvp[0], *argvp); 726 psm->sq.child = spawnvp(P_NOWAIT, "sh.exe", *argvp); 727 psm->sq.reaped = waitpid(psm->sq.child, &psm->sq.status, 0); 728 729 #else 715 730 scriptFd = rpmtsScriptFd(ts); 716 731 if (scriptFd != NULL) { … … 745 760 746 761 (void) psmWait(psm); 762 #endif 747 763 748 764 if (psm->sq.reaped < 0) { … … 1530 1546 /* Change root directory if requested and not already done. */ 1531 1547 if (rootDir != NULL && !(rootDir[0] == '/' && rootDir[1] == '\0') 1548 #ifdef __EMX__ 1549 && strcmp( rootDir, "/@unixroot") != 0 1550 && strcmp( rootDir, "/@unixroot/") != 0 1551 #endif 1532 1552 && !rpmtsChrootDone(ts) && !psm->chrootDone) 1533 1553 { … … 1547 1567 const char * rootDir = rpmtsRootDir(ts); 1548 1568 const char * currDir = rpmtsCurrDir(ts); 1549 if (rootDir != NULL && !rstreq(rootDir, "/") && *rootDir == '/') 1569 if (rootDir != NULL 1570 #ifdef __EMX__ 1571 && strcmp( rootDir, "/@unixroot") != 0 1572 && strcmp( rootDir, "/@unixroot/") != 0 1573 #endif 1574 && !rstreq(rootDir, "/") && *rootDir == '/') 1550 1575 rc = chroot("."); 1551 1576 psm->chrootDone = 0; -
rpm/trunk/lib/rpmal.c
r2 r8 63 63 #define HTKEYTYPE const char * 64 64 #define HTDATATYPE struct availableIndexEntry_s 65 #include "lib/rpmhash .H"66 #include "lib/rpmhash .C"65 #include "lib/rpmhashC.H" 66 #include "lib/rpmhashC.C" 67 67 68 68 #undef HASHTYPE … … 72 72 #define HTKEYTYPE struct fileNameEntry_s 73 73 #define HTDATATYPE struct fileIndexEntry_s 74 #include "lib/rpmhash .H"75 #include "lib/rpmhash .C"74 #include "lib/rpmhashC.H" 75 #include "lib/rpmhashC.C" 76 76 77 77 -
rpm/trunk/lib/rpmdb.c
r2 r8 719 719 } 720 720 721 #ifdef __EMX__ 722 #define _DB_ROOT "/@unixroot" 723 #else 721 724 #define _DB_ROOT "/" 725 #endif 722 726 #define _DB_HOME "%{_dbpath}" 723 727 #define _DB_FULLPATH NULL -
rpm/trunk/lib/rpmlock.c
r2 r8 117 117 118 118 if (!rootDir || rpmtsChrootDone(ts)) 119 rootDir = "/ ";119 rootDir = "/@unixroot"; 120 120 lock = rpmlock_new(rootDir); 121 121 if (!lock) { -
rpm/trunk/lib/rpmrc.c
r2 r8 459 459 460 460 /* Find end-of-line. */ 461 while (*se && *se != '\ n') se++;461 while (*se && *se != '\r' && *se != '\n') se++; 462 462 if (*se != '\0') *se++ = '\0'; 463 463 next = se; -
rpm/trunk/lib/rpmts.c
r2 r8 630 630 case URL_IS_DASH: 631 631 default: 632 rootDir = "/ ";632 rootDir = "/@unixroot"; 633 633 break; 634 634 } -
rpm/trunk/lib/transaction.c
r2 r8 879 879 #define HASHTYPE rpmStringSet 880 880 #define HTKEYTYPE const char * 881 #include "lib/rpmhash .H"882 #include "lib/rpmhash .C"881 #include "lib/rpmhashC.H" 882 #include "lib/rpmhashC.C" 883 883 884 884 /* Get a rpmdbMatchIterator containing all files in … … 1306 1306 uint64_t fileCount = countFiles(ts); 1307 1307 const char * rootDir = rpmtsRootDir(ts); 1308 int dochroot = (rootDir != NULL && !rstreq(rootDir, "/") && *rootDir == '/'); 1308 int dochroot = (rootDir != NULL 1309 #ifdef __EMX__ 1310 && !rstreq(rootDir, "/@unixroot") 1311 && !rstreq(rootDir, "/@unixroot/") 1312 #endif 1313 && !rstreq(rootDir, "/") && *rootDir == '/'); 1309 1314 1310 1315 fingerPrintCache fpc = fpCacheCreate(fileCount/2 + 10001); -
rpm/trunk/lib/verify.c
r2 r8 477 477 rpmtsOpenDB(ts, O_RDONLY); 478 478 rpmdbOpenAll(rpmtsGetRdb(ts)); 479 if (rootDir && !rstreq(rootDir, "/")) { 479 if (rootDir 480 #ifdef __EMX__ 481 && strcmp( rootDir, "/@unixroot") != 0 482 && strcmp( rootDir, "/@unixroot/") != 0 483 #endif 484 && !rstreq(rootDir, "/")) { 480 485 dirfd = open(".", O_RDONLY); 481 486 if (dirfd == -1 || chdir("/") == -1 || chroot(rootDir) == -1) { -
rpm/trunk/macros.in
r2 r8 367 367 # 368 368 # Note: Disable (by commenting out) for legacy compatibility. 369 %__check_files %{_rpmconfigdir}/check-files %{buildroot}369 %__check_files %{_rpmconfigdir}/check-files.os2 %{buildroot} 370 370 371 371 # … … 488 488 %__perl_requires %{_rpmconfigdir}/perl.req 489 489 490 %__python_provides %{_rpmconfigdir}/pythondeps.sh --provides491 %__python_requires %{_rpmconfigdir}/pythondeps.sh --requires490 #%__python_provides %{_rpmconfigdir}/pythondeps.sh --provides 491 #%__python_requires %{_rpmconfigdir}/pythondeps.sh --requires 492 492 493 493 %__mono_provides %{_rpmconfigdir}/mono-find-provides %{_builddir}/%{?buildsubdir} %{buildroot} %{_libdir} … … 661 661 # There are two macros so that --rebuilddb can convert db1 -> db3. 662 662 # 663 %_dbapi 3664 %_dbapi_rebuild 3663 %_dbapi 4 664 %_dbapi_rebuild 4 665 665 666 666 #============================================================================== … … 793 793 # Define per-arch and per-os defaults. Normally overridden by per-target macros. 794 794 %__arch_install_post %{nil} 795 %__os_install_post %{_ __build_post}795 %__os_install_post %{_rpmconfigdir}/brp-strip.os2 796 796 797 797 #============================================================================== … … 973 973 %_libexecdir %{_exec_prefix}/libexec 974 974 %_datadir %{_prefix}/share 975 %_sysconfdir /etc975 %_sysconfdir @sysconfdir@ 976 976 %_sharedstatedir %{_prefix}/com 977 %_localstatedir %{_prefix}/var977 %_localstatedir @localstatedir@ 978 978 %_lib lib 979 979 %_libdir %{_exec_prefix}/%{_lib} -
rpm/trunk/misc/glob.c
r2 r8 942 942 weak_alias (__glob_pattern_p, glob_pattern_p) 943 943 # endif 944 945 #ifdef __EMX__ 946 int glob_pattern_p (const char *pattern, int quote) { 947 return __glob_pattern_p( pattern, quote); 948 } 949 950 #endif 951 944 952 #endif 945 953 -
rpm/trunk/python/Makefile.in
r2 r8 351 351 @PYTHON_TRUE@ -I$(top_builddir)/include/ -I$(top_srcdir)/python \ 352 352 @PYTHON_TRUE@ -I$(top_srcdir)/misc -I@WITH_PYTHON_INCLUDE@ 353 @PYTHON_TRUE@pkgpyexec_LTLIBRARIES = _rpmmodule.la _rpmbmodule.la 353 @PYTHON_TRUE@#pkgpyexec_LTLIBRARIES = _rpmmodule.la _rpmbmodule.la 354 @PYTHON_TRUE@pkgpyexec_LTLIBRARIES = _rpm.dll _rpmb.dll 354 355 @PYTHON_TRUE@pkgpyexec_DATA = rpm/__init__.py rpm/transaction.py 355 356 @PYTHON_TRUE@_rpmmodule_la_LDFLAGS = -module -avoid-version … … 729 730 # Otherwise a system limit (for SysV at least) may be exceeded. 730 731 .NOEXPORT: 732 733 _rpmb.dll: _rpmbmodule.la 734 echo "LIBRARY _rpmb INITINSTANCE TERMINSTANCE" > _rpmb.def 735 echo "DATA MULTIPLE" >> _rpmb.def 736 echo "EXPORTS" >> _rpmb.def 737 cd .libs ; emxexp $(subst .lo,.o,$(_rpmbmodule_la_OBJECTS)) >> ../_rpmb.def 738 $(_rpmbmodule_la_LINK) -Zdll _rpmb.def $(am__rpmbmodule_la_rpath) $(_rpmbmodule_la_OBJECTS) $(_rpmbmodule_la_LIBADD) $(LIBS) -lssp 739 740 _rpm.dll: _rpmmodule.la 741 echo "LIBRARY _rpm INITINSTANCE TERMINSTANCE" > _rpm.def 742 echo "DATA MULTIPLE" >> _rpm.def 743 echo "EXPORTS" >> _rpm.def 744 cd .libs ; emxexp $(subst .lo,.o,$(_rpmmodule_la_OBJECTS)) >> ../_rpm.def 745 $(_rpmmodule_la_LINK) -Zdll _rpm.def $(am__rpmmodule_la_rpath) $(_rpmmodule_la_OBJECTS) $(_rpmmodule_la_LIBADD) $(LIBS) -lssp 746 -
rpm/trunk/python/rpmts-py.c
r2 r8 715 715 static int rpmts_init(rpmtsObject *s, PyObject *args, PyObject *kwds) 716 716 { 717 char * rootDir = "/ ";717 char * rootDir = "/@unixroot"; 718 718 rpmVSFlags vsflags = rpmExpandNumeric("%{?__vsflags}"); 719 719 char * kwlist[] = {"rootdir", "vsflags", 0}; -
rpm/trunk/rpm2cpio.c
r2 r8 20 20 rpmRC rc; 21 21 FD_t gzdi; 22 23 #ifdef __EMX__ 24 _fsetmode( stdin, "b"); 25 _fsetmode( stdout, "b"); 26 #endif 22 27 23 28 setprogname(argv[0]); /* Retrofit glibc __progname */ -
rpm/trunk/rpmio/Makefile.in
r2 r8 326 326 AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) \ 327 327 -I$(top_builddir)/include/ @WITH_NSS_INCLUDE@ \ 328 -I$(top_builddir)/include/nss \ 328 329 @WITH_LUA_INCLUDE@ @WITH_POPT_INCLUDE@ -I$(top_srcdir)/misc \ 329 330 @WITH_LIBELF_INCLUDE@ -DRPMCONFIGDIR="\"@RPMCONFIGDIR@\"" \ … … 410 411 librpmio.la: $(librpmio_la_OBJECTS) $(librpmio_la_DEPENDENCIES) 411 412 $(librpmio_la_LINK) -rpath $(usrlibdir) $(librpmio_la_OBJECTS) $(librpmio_la_LIBADD) $(LIBS) 413 cp .libs/rpmio.a .libs/rpmio_s.a 414 dllar -g -nolxlite -Zomf -o .libs/rpmio .libs/rpmio.a -lbz2 -lz -lpopt -lurpo -lmmap -lpthread -lssp 415 cp .libs/rpmio.dll .. 412 416 413 417 clean-checkPROGRAMS: -
rpm/trunk/rpmio/digest.c
r2 r8 2 2 * \file rpmio/digest.c 3 3 */ 4 5 #include <stdio.h> 4 6 5 7 #include "system.h" … … 14 16 #define DPRINTF(_a) 15 17 #endif 16 17 18 18 19 /** … … 115 116 DIGEST_CTX nctx = NULL; 116 117 if (octx) { 117 HASHContext *hctx = HASH_Clone(octx->hashctx);118 HASHContext *hctx = NULL;//HASH_Clone(octx->hashctx); 118 119 if (hctx) { 119 120 nctx = memcpy(xcalloc(1, sizeof(*nctx)), octx, sizeof(*nctx)); … … 158 159 rpmDigestLength(pgpHashAlgo hashalgo) 159 160 { 160 return HASH_ResultLen(getHashType(hashalgo));161 return 0;//HASH_ResultLen(getHashType(hashalgo)); 161 162 } 162 163 … … 171 172 goto exit; 172 173 173 if ((hashctx = HASH_Create(type)) != NULL) {174 if ((hashctx = (NULL /* HASH_Create(type)*/)) != NULL) { 174 175 ctx = xcalloc(1, sizeof(*ctx)); 175 176 ctx->flags = flags; 176 177 ctx->algo = hashalgo; 177 178 ctx->hashctx = hashctx; 178 HASH_Begin(ctx->hashctx);179 //HASH_Begin(ctx->hashctx); 179 180 } 180 181 … … 199 200 partlen = len; 200 201 } 201 HASH_Update(ctx->hashctx, ptr, partlen);202 //HASH_Update(ctx->hashctx, ptr, partlen); 202 203 ptr += partlen; 203 204 len -= partlen; … … 214 215 if (ctx == NULL) 215 216 return -1; 216 digestlen = HASH_ResultLenContext(ctx->hashctx);217 digestlen = 0;//HASH_ResultLenContext(ctx->hashctx); 217 218 digest = xmalloc(digestlen); 218 219 219 220 DPRINTF((stderr, "*** Final(%p,%p,%p,%zd) hashctx %p digest %p\n", ctx, datap, lenp, asAscii, ctx->hashctx, digest)); 220 221 /* FIX: check rc */ 221 HASH_End(ctx->hashctx, digest, (unsigned int *) &digestlen, digestlen);222 //HASH_End(ctx->hashctx, digest, (unsigned int *) &digestlen, digestlen); 222 223 223 224 /* Return final digest. */ … … 239 240 free(digest); 240 241 } 241 HASH_Destroy(ctx->hashctx);242 //HASH_Destroy(ctx->hashctx); 242 243 memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ 243 244 free(ctx); -
rpm/trunk/rpmio/fts.c
r2 r8 51 51 # define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) 52 52 #endif 53 #if defined(__EMX__) 54 # define _INCLUDE_POSIX_SOURCE 55 # define __errno_location() (&errno) 56 # define dirfd(dirp) -1 57 # define stat64 stat 58 # define _STAT_VER 0 59 # define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp)) 60 #endif 53 61 #if defined(sun) 54 62 # define __errno_location() (&errno) -
rpm/trunk/rpmio/fts.h
r2 r8 37 37 #else 38 38 39 #ifndef __EMX__ 39 40 # define __THROW 41 #endif 40 42 #ifdef __cplusplus 41 43 # define __BEGIN_DECLS extern "C" { -
rpm/trunk/rpmio/rpmfileutil.c
r2 r8 292 292 } 293 293 de = d; 294 #ifdef __EMX__ 295 // YD cannot create /@unixroot dir, skip it 296 if (strncmp( de, "/@unixroot", 10) == 0) 297 de=strchr(de+1,'/'); 298 #endif 294 299 for (;(de=strchr(de+1,'/'));) { 295 300 struct stat st; … … 378 383 char *rpmCleanPath(char * path) 379 384 { 385 #ifdef __EMX__ 386 #define AT_UNIXROOT "/@unixroot" 387 const int AT_UNIXROOT_LEN = strlen(AT_UNIXROOT); 388 #endif 380 389 const char *s; 381 390 char *se, *t, *te; … … 387 396 /*fprintf(stderr, "*** RCP %s ->\n", path); */ 388 397 s = t = te = path; 398 399 #ifdef __EMX__ 400 // clean '//X:/...' or '/X:/...' 401 if (s[3] == ':') 402 s++; 403 if (s[2] == ':') 404 s++; 405 // clean '/@unixroot//@unixroot/...' 406 if (strncmp( s, AT_UNIXROOT "/" AT_UNIXROOT, AT_UNIXROOT_LEN*2) == 0) 407 s += (AT_UNIXROOT_LEN); 408 // clean '/@unixroot/@unixroot/...' 409 if (strncmp( s, AT_UNIXROOT AT_UNIXROOT, AT_UNIXROOT_LEN*2) == 0) 410 s += (AT_UNIXROOT_LEN); 411 // clean '/@unixroot/X:/...' 412 if (strncmp( s, AT_UNIXROOT, AT_UNIXROOT_LEN) == 0 413 && s[AT_UNIXROOT_LEN+2] == ':') 414 s += (AT_UNIXROOT_LEN+1); 415 #endif 416 389 417 while (*s != '\0') { 390 418 /*fprintf(stderr, "*** got \"%.*s\"\trest \"%s\"\n", (t-path), path, s); */ … … 453 481 } 454 482 break; 483 #ifdef __EMX__ 484 case '\\': 485 *t = '/'; 486 break; 487 #endif 455 488 default: 456 489 begin = 0; … … 561 594 int i, j; 562 595 int rc; 596 #ifdef __EMX__ 597 char* _patterns, *_p; 598 #endif 563 599 564 600 if (home != NULL && strlen(home) > 0) 565 601 gflags |= GLOB_TILDE; 566 602 603 #ifdef __EMX__ 604 // hack to convert \\ into / but only for paths (X:\aa\bb\cc) 605 _patterns = _p = strdup(patterns); 606 if (_patterns[1]==':' && _patterns[2]=='\\') 607 do { if (*_p=='\\') *_p='/';} while(*_p++); 608 /* Can't use argvSplit() here, it doesn't handle whitespace etc escapes */ 609 rc = poptParseArgvString(_patterns, &ac, &av); 610 free(_patterns); 611 #else 567 612 /* Can't use argvSplit() here, it doesn't handle whitespace etc escapes */ 568 613 rc = poptParseArgvString(patterns, &ac, &av); 614 #endif 569 615 if (rc) 570 616 return rc; -
rpm/trunk/rpmio/rpmpgp.c
r2 r8 350 350 351 351 if (item == NULL) { 352 if ((item=SECITEM_AllocItem(arena, item, nbytes)) == NULL)352 //if ((item=SECITEM_AllocItem(arena, item, nbytes)) == NULL) 353 353 return item; 354 354 } else { 355 355 if (arena != NULL) 356 item->data = PORT_ArenaGrow(arena, item->data, item->len, nbytes);356 item->data = NULL;//PORT_ArenaGrow(arena, item->data, item->len, nbytes); 357 357 else 358 item->data = PORT_Realloc(item->data, nbytes);358 item->data = NULL;//PORT_Realloc(item->data, nbytes); 359 359 360 360 if (item->data == NULL) { 361 361 if (arena == NULL) 362 SECITEM_FreeItem(item, PR_TRUE);362 //SECITEM_FreeItem(item, PR_TRUE); 363 363 return NULL; 364 364 } … … 376 376 SECKEYPublicKey *key; 377 377 378 arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);378 arena = NULL;//PORT_NewArena(DER_DEFAULT_CHUNKSIZE); 379 379 if (arena == NULL) 380 380 return NULL; 381 381 382 key = PORT_ArenaZAlloc(arena, sizeof(SECKEYPublicKey));382 key = NULL;//PORT_ArenaZAlloc(arena, sizeof(SECKEYPublicKey)); 383 383 384 384 if (key == NULL) { 385 PORT_FreeArena(arena, PR_FALSE);385 //PORT_FreeArena(arena, PR_FALSE); 386 386 return NULL; 387 387 } … … 629 629 xx = pgpMpiSet(pgpSigDSA[i], DSA_SUBPRIME_LEN*8, dsaraw.data + DSA_SUBPRIME_LEN, p, pend); 630 630 if (_dig->sigdata != NULL) 631 SECITEM_FreeItem(_dig->sigdata, PR_FALSE);632 else if ((_dig->sigdata=SECITEM_AllocItem(NULL, NULL, 0)) == NULL) {633 xx = 1;634 break;635 }636 if (DSAU_EncodeDerSig(_dig->sigdata, &dsaraw) != SECSuccess)631 //SECITEM_FreeItem(_dig->sigdata, PR_FALSE); 632 //else if ((_dig->sigdata=SECITEM_AllocItem(NULL, NULL, 0)) == NULL) { 633 // xx = 1; 634 // break; 635 //} 636 //if (DSAU_EncodeDerSig(_dig->sigdata, &dsaraw) != SECSuccess) 637 637 xx = 1; 638 638 break; … … 1261 1261 1262 1262 if (dig->keydata != NULL) { 1263 SECKEY_DestroyPublicKey(dig->keydata);1263 //SECKEY_DestroyPublicKey(dig->keydata); 1264 1264 dig->keydata = NULL; 1265 1265 } 1266 1266 1267 1267 if (dig->sigdata != NULL) { 1268 SECITEM_ZfreeItem(dig->sigdata, PR_TRUE);1268 //SECITEM_ZfreeItem(dig->sigdata, PR_TRUE); 1269 1269 dig->sigdata = NULL; 1270 1270 } … … 1396 1396 /* Zero-pad RSA signature to expected size if necessary */ 1397 1397 if (sigp->pubkey_algo == PGPPUBKEYALGO_RSA) { 1398 size_t siglen = SECKEY_SignatureLen(dig->keydata);1398 size_t siglen = 0;//SECKEY_SignatureLen(dig->keydata); 1399 1399 if (siglen > sig->len) { 1400 1400 size_t pad = siglen - sig->len; 1401 if ((sig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) {1401 //if ((sig = SECITEM_AllocItem(NULL, NULL, siglen)) == NULL) { 1402 1402 goto exit; 1403 }1403 //} 1404 1404 memset(sig->data, 0, pad); 1405 1405 memcpy(sig->data+pad, dig->sigdata->data, dig->sigdata->len); … … 1408 1408 1409 1409 /* XXX VFY_VerifyDigest() is deprecated in NSS 3.12 */ 1410 if (VFY_VerifyDigest(&digest, dig->keydata, sig,1411 getSigAlg(sigp), NULL) == SECSuccess) {1412 res = RPMRC_OK;1413 }1410 //if (VFY_VerifyDigest(&digest, dig->keydata, sig, 1411 // getSigAlg(sigp), NULL) == SECSuccess) { 1412 // res = RPMRC_OK; 1413 //} 1414 1414 1415 1415 if (sig != dig->sigdata) { 1416 SECITEM_ZfreeItem(sig, 1);1416 //SECITEM_ZfreeItem(sig, 1); 1417 1417 } 1418 1418 } … … 1621 1621 /* Initialize NSS if not already done */ 1622 1622 if (!_crypto_initialized) { 1623 if (NSS_NoDB_Init(NULL) != SECSuccess) {1623 //if (NSS_NoDB_Init(NULL) != SECSuccess) { 1624 1624 rc = -1; 1625 } else {1626 _crypto_initialized = 1;1627 }1625 //} else { 1626 // _crypto_initialized = 1; 1627 //} 1628 1628 } 1629 1629 … … 1642 1642 int rc = 0; 1643 1643 if (_crypto_initialized) { 1644 rc = (NSS_Shutdown() != SECSuccess);1644 //rc = (NSS_Shutdown() != SECSuccess); 1645 1645 _crypto_initialized = 0; 1646 1646 } -
rpm/trunk/rpmqv.c
r2 r8 491 491 break; 492 492 case URL_IS_UNKNOWN: 493 #ifdef __EMX__ 494 if (rpmcliRootDir[0] != '/' && rpmcliRootDir[1] != ':') 495 #else 493 496 if (rpmcliRootDir[0] != '/') 497 #endif 494 498 argerror(_("arguments to --root (-r) must begin with a /")); 495 499 break; -
rpm/trunk/rpmrc.in
r2 r8 198 198 os_canon: MacOSX: macosx 21 199 199 200 os_canon: OS2: os2 22 201 200 202 ############################################################# 201 203 # For a given uname().machine, the default build arch -
rpm/trunk/scripts/libtooldeps.sh
r2 r8 1 1 #!/bin/sh 2 3 # TODO fix this script to accept $2 instead of stdin 4 # re-read file to stdin... 5 exec 0<$2 2 6 3 7 [ $# -ge 2 ] || { -
rpm/trunk/scripts/pkgconfigdeps.sh
r2 r8 1 #!/bin/bash 1 #!/bin/sh 2 3 # TODO fix this script to accept $2 instead of stdin 4 # re-read file to stdin... 5 exec 0<$2 2 6 3 7 pkgconfig=/usr/bin/pkg-config -
rpm/trunk/scripts/pythondeps.sh
r2 r8 1 #!/bin/bash 1 #!/bin/sh 2 3 # TODO fix this script to accept $2 instead of stdin 4 # re-read file to stdin... 5 exec 0<$2 2 6 3 7 [ $# -ge 1 ] || {
Note:
See TracChangeset
for help on using the changeset viewer.