- we don't support relocated x86 on ppc in qemu either...
fi
dnl Determine the canonical arch-vendor-os for the host machine
-autorelocate_path='%{nil}'
-autorelocate_dcolor='0'
case "${host_cpu}" in
*86) RPMCANONCOLOR=0; RPMCANONARCH=i386 ;;
ia32e*) RPMCANONCOLOR=3; RPMCANONARCH=ia32e ;;
alpha*) RPMCANONCOLOR=0; RPMCANONARCH=alpha ;;
sparc64*) RPMCANONCOLOR=3; RPMCANONARCH=sparc64 ;;
sparc*) RPMCANONCOLOR=3; RPMCANONARCH=sparc ;;
-ia64*) RPMCANONCOLOR=2; RPMCANONARCH=ia64;
- autorelocate_path='/emul/%%{ARCH}-%%{OS}'
- autorelocate_dcolor='1' ;;
+ia64*) RPMCANONCOLOR=2; RPMCANONARCH=ia64 ;;
s390x*) RPMCANONCOLOR=3; RPMCANONARCH=s390x ;;
s390*) RPMCANONCOLOR=0; RPMCANONARCH=s390 ;;
powerpc64*|ppc64*) RPMCANONCOLOR=3; RPMCANONARCH=ppc64 ;;
RPMCANONOS="$host_os_noversion"
RPMCANONGNU="$host_os_gnu"
AC_SUBST(RPMCANONCOLOR)
-AC_SUBST(autorelocate_path)
-AC_SUBST(autorelocate_dcolor)
AC_SUBST(RPMCANONARCH)
AC_SUBST(RPMCANONVENDOR)
AC_SUBST(RPMCANONOS)
? 1 : 0);
}
-#if __ia64__
- /* XXX This assumes that all interpreters are elf executables. */
- if ((a != NULL && a[0] == 'i' && a[1] != '\0' && a[2] == '8' && a[3] == '6')
- && strcmp(argv[0], "/sbin/ldconfig"))
- {
- char * fmt = rpmGetPath("%{?_autorelocate_path}", NULL);
- const char * errstr;
- char * newPath;
- char * t;
-
- newPath = headerSprintf(h, fmt, rpmTagTable, rpmHeaderFormats, &errstr);
- fmt = _free(fmt);
-
- /* XXX On ia64, change leading /emul/ix86 -> /emul/ia32, ick. */
- if (newPath != NULL && *newPath != '\0'
- && strlen(newPath) >= (sizeof("/emul/i386")-1)
- && newPath[0] == '/' && newPath[1] == 'e' && newPath[2] == 'm'
- && newPath[3] == 'u' && newPath[4] == 'l' && newPath[5] == '/'
- && newPath[6] == 'i' && newPath[8] == '8' && newPath[9] == '6')
- {
- newPath[7] = 'a';
- newPath[8] = '3';
- newPath[9] = '2';
- }
-
- t = alloca(strlen(newPath) + strlen(argv[0]) + 1);
- *t = '\0';
- (void) stpcpy( stpcpy(t, newPath), argv[0]);
- newPath = _free(newPath);
- argv[0] = t;
- }
-#endif
-
if (hge(h, RPMTAG_INSTPREFIXES, &ipt, (rpm_data_t *) &prefixes, &numPrefixes)) {
freePrefixes = 1;
} else if (hge(h, RPMTAG_INSTALLPREFIX, NULL, (rpm_data_t *) &oldPrefix, NULL)) {
{ DN = rpmfiDN(fi);
-#if defined(__ia64__)
-/* XXX Make sure that autorelocated file dependencies are satisfied. */
-#define DNPREFIX "/emul/ia32-linux"
- if (!strncmp(DN, DNPREFIX, sizeof(DNPREFIX)-1))
- DN += sizeof(DNPREFIX)-1;
-#endif
/* XXX: reference to within rpmfi, must not be freed */
dieNeedle->dirName = (char *) DN;
}
uint32_t * dirIndexes;
uint32_t * newDirIndexes;
rpm_count_t fileCount, dirCount, numValid;
- uint32_t mydColor = rpmExpandNumeric("%{?_autorelocate_dcolor}");
uint32_t * fFlags = NULL;
uint32_t * fColors = NULL;
uint32_t * dColors = NULL;
for (i = dirCount - 1; i >= 0; i--) {
for (j = numRelocations - 1; j >= 0; j--) {
- /* XXX Don't autorelocate uncolored directories. */
- if (j == p->autorelocatex
- && (dColors[i] == 0 || !(dColors[i] & mydColor)))
- continue;
-
if (relocations[j].oldPath == NULL) /* XXX can't happen */
continue;
len = strcmp(relocations[j].oldPath, "/")
&& !headerIsSource(h)
&& !headerIsEntry(h, RPMTAG_ORIGBASENAMES))
{
- char * fmt = rpmGetPath("%{?_autorelocate_path}", NULL);
- const char * errstr;
- char * newPath;
Header foo;
- /* XXX error handling. */
- newPath = headerSprintf(h, fmt, rpmTagTable, rpmHeaderFormats, &errstr);
- fmt = _free(fmt);
-
-#if __ia64__
- /* XXX On ia64, change leading /emul/ix86 -> /emul/ia32, ick. */
- if (newPath != NULL && *newPath != '\0'
- && strlen(newPath) >= (sizeof("/emul/i386")-1)
- && newPath[0] == '/' && newPath[1] == 'e' && newPath[2] == 'm'
- && newPath[3] == 'u' && newPath[4] == 'l' && newPath[5] == '/'
- && newPath[6] == 'i' && newPath[8] == '8' && newPath[9] == '6')
- {
- newPath[7] = 'a';
- newPath[8] = '3';
- newPath[9] = '2';
- }
-#endif
-
- /* XXX Make sure autoreloc is not already specified. */
- i = p->nrelocs;
- if (newPath != NULL && *newPath != '\0' && p->relocs != NULL)
- for (i = 0; i < p->nrelocs; i++) {
-/* XXX {old,new}Path might be NULL */
- if (strcmp(p->relocs[i].oldPath, "/"))
- continue;
- if (strcmp(p->relocs[i].newPath, newPath))
- continue;
- break;
- }
-
- /* XXX test for incompatible arch triggering autorelocation is dumb. */
- if (newPath != NULL && *newPath != '\0' && i == p->nrelocs
- && p->archScore == 0)
- {
-
- p->relocs =
- xrealloc(p->relocs, (p->nrelocs + 2) * sizeof(*p->relocs));
- p->relocs[p->nrelocs].oldPath = xstrdup("/");
- p->relocs[p->nrelocs].newPath = xstrdup(newPath);
- p->autorelocatex = p->nrelocs;
- p->nrelocs++;
- p->relocs[p->nrelocs].oldPath = NULL;
- p->relocs[p->nrelocs].newPath = NULL;
- }
- newPath = _free(newPath);
-
/* XXX DYING */
if (fi->actions == NULL)
fi->actions = xcalloc(fi->fc, sizeof(*fi->actions));
p->relocs[i].oldPath = NULL;
p->relocs[i].newPath = NULL;
}
- p->autorelocatex = -1;
p->key = key;
p->fd = NULL;
fnpyKey key; /*!< (TR_ADDED) Retrieval key. */
rpmRelocation * relocs; /*!< (TR_ADDED) Payload file relocations. */
int nrelocs; /*!< (TR_ADDED) No. of relocations. */
- int autorelocatex; /*!< (TR_ADDED) Auto relocation entry index. */
FD_t fd; /*!< (TR_ADDED) Payload file descriptor. */
union {
# 2 Elf64 permitted
%_transaction_color @RPMCANONCOLOR@
-# A default autorelocation path prefixed to file paths of packages
-# that have an incompatible arch. This is used on ia64 to prefix
-# /emul/ia32 to i386 file paths, and nowhere else (yet).
-#
-# XXX Note: escaped %% for use in headerSprintf()
-%_autorelocate_path @autorelocate_path@
-
-# A default directory color to choose when directories are
-# auto-relocated.
-%_autorelocate_dcolor @autorelocate_dcolor@
-
# The path to the dependency universe database. The default value
# is the rpmdb-redhat location. The macro is usually defined in
# /etc/rpm/macros.solve, installed with the rpmdb-redhat package.
p = rpmpsGetProblem(psi);
- /* XXX autorelocated i386 on ia64, fix system-config-packages! */
- if (rpmProblemGetType(p) == RPMPROB_BADRELOCATE)
- continue;
-
byName = strdup(rpmProblemGetPkgNEVR(p));
if ((byArch= strrchr(byName, '.')) != NULL)
*byArch++ = '\0';