[CVS] RPM: rpm-5_3: rpm/lib/ rpmds.c rpmfc.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Per Øyvind Karlsen Root: /v/rpm/cvs Email: pkarl...@rpm5.org Module: rpm Date: 28-Apr-2011 17:49:04 Branch: rpm-5_3 Handle: 2011042815490400 Modified files: (Branch: rpm-5_3) rpm/lib rpmds.c rpmfc.c Log: queued changes for fixing uClibc() dependencies and also devel() dependencies, sorry for big commit.. Summary: RevisionChanges Path 2.167.2.15 +78 -11 rpm/lib/rpmds.c 1.73.2.10 +36 -1 rpm/lib/rpmfc.c patch -p0 '@@ .' Index: rpm/lib/rpmds.c $ cvs diff -u -r2.167.2.14 -r2.167.2.15 rpmds.c --- rpm/lib/rpmds.c 16 Apr 2011 14:39:46 - 2.167.2.14 +++ rpm/lib/rpmds.c 28 Apr 2011 15:49:04 - 2.167.2.15 @@ -2906,7 +2906,7 @@ if (isElf64) { /* XXX: eehhk, would've been nice with consistency, mandriva legacy... :| */ if (!devel s[strlen(s)-1] != ')') - (void) stpcpy( stpcpy(tmp, s), ()(64bit)); + tmp = stpcpy( stpcpy(tmp, s), ()(64bit)); else { tmp = stpcpy(tmp, s); if (devel) @@ -2985,8 +2985,11 @@ scn = gelf_offscn (elf, phdr-p_offset); shdr = gelf_getshdr(scn, shdr_mem); data = elf_getdata (scn, data); - interp_name = strdup(data-d_buf); - goto end; + if (data data-d_buf) { + interp_name = strdup(data-d_buf); + goto end; + } + /* no 'data' most likely implies that this is an elf interpreter itself */ } if (elf_getshdrstrndx (elf, shstrndx) = 0) @@ -3006,6 +3009,15 @@ for (cnt = 0; cnt = dynsize; ++cnt) { dyn = gelf_getdyn (data, cnt, dyn_mem); + /* if this an elf interpeter, the only thing we want is to find SONAME + * and return it + */ + if (phdr) { + if (dyn-d_tag != DT_SONAME) + continue; + interp_name = strdup(elf_strptr(elf, shdr-sh_link, dyn-d_un.d_val)); + goto end; + } if (rpath == NULL) { if (dyn-d_tag == DT_RPATH) rpath = elf_strptr (elf, shdr-sh_link, dyn-d_un.d_val); @@ -3015,7 +3027,7 @@ cnt = -1; continue; } - else if (rpath DT_NEEDED == dyn-d_tag) { + else if (rpath dyn-d_tag == DT_NEEDED) { char *tmp, *tmp2; char buf[1024]; char path[1024] = ; @@ -3073,6 +3085,7 @@ strcpy(tmp, path_n); strcat(tmp, /); strcat(tmp, libpath); + if (stat(tmp, statbuf) == 0 statbuf.st_mode S_IRUSR) { path[0] = '\0'; break; @@ -3504,6 +3517,7 @@ char buf[BUFSIZ]; const char * s; int is_executable; +int is_symlink; const char * soname = NULL; rpmds ds; int xx; @@ -3529,12 +3543,6 @@ if ((s = strrchr(fn, '.')) strcmp(s, .so)) return 0; -if ((lnklen = readlink(fn, path, MAXPATHLEN - 1)) == -1) { - warn(%s, fn); - return -1; -} -path[lnklen] = '\0'; - /*@-castfcnptr@*/ if (_rpmds_debug 0) fprintf(stderr, *** rpmdsELF(%s, %d, %p, %p)\n, fn, flags, (void *)add, context); @@ -3545,6 +3553,62 @@ if (lstat(fn, st) != 0) return -1; is_executable = (int)(st-st_mode (S_IXUSR|S_IXGRP|S_IXOTH)); + is_symlink = S_ISLNK(st-st_mode); +} + +if (is_symlink) { +#ifdef NOT_YET + if ((lnklen = readlink(fn, path, MAXPATHLEN - 1)) == -1) { + warn(%s, fn); + return -1; + } + /* XXX: unused, path should expand to absolute path... */ + path[lnklen] = '\0'; +#endif +} else { + FILE *fp = fopen(fn, r); + char buf[BUFSIZ]; + char *in; + stpcpy(path, fn); + fn = NULL; + if (fp == NULL || ferror(fp)) { + if (fp) (void) fclose(fp); + return -1; + } + /* try resolve ld scripts + * certainly *not* state of the art, but should in practice work + * everywhere where
[CVS] RPM: rpm-5_3: rpm/scripts/ Makefile.am
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Per Øyvind Karlsen Root: /v/rpm/cvs Email: pkarl...@rpm5.org Module: rpm Date: 28-Apr-2011 17:51:48 Branch: rpm-5_3 Handle: 2011042815514800 Modified files: (Branch: rpm-5_3) rpm/scripts Makefile.am Log: add missing \ Summary: RevisionChanges Path 1.65.2.10 +1 -1 rpm/scripts/Makefile.am patch -p0 '@@ .' Index: rpm/scripts/Makefile.am $ cvs diff -u -r1.65.2.9 -r1.65.2.10 Makefile.am --- rpm/scripts/Makefile.am 10 Apr 2011 13:54:19 - 1.65.2.9 +++ rpm/scripts/Makefile.am 28 Apr 2011 15:51:48 - 1.65.2.10 @@ -21,7 +21,7 @@ check-java-closure.sh java.prov.sh java.req.sh \ gstreamer.sh javadeps.sh libtooldeps.sh \ mono-find-provides mono-find-requires \ - check-multiarch-files multiarch-platform multiarch-dispatch + check-multiarch-files multiarch-platform multiarch-dispatch \ multiarch-dispatch.h mkmultiarch \ nix_meta \ osgideps.pl pkgconfigdeps.sh \ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/scripts/ Makefile.am
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Per Øyvind Karlsen Root: /v/rpm/cvs Email: pkarl...@rpm5.org Module: rpm Date: 28-Apr-2011 17:55:02 Branch: rpm-5_4 Handle: 2011042815550200 Modified files: (Branch: rpm-5_4) rpm/scripts Makefile.am Log: add missing \ Summary: RevisionChanges Path 1.75.2.7+1 -1 rpm/scripts/Makefile.am patch -p0 '@@ .' Index: rpm/scripts/Makefile.am $ cvs diff -u -r1.75.2.6 -r1.75.2.7 Makefile.am --- rpm/scripts/Makefile.am 10 Apr 2011 13:53:30 - 1.75.2.6 +++ rpm/scripts/Makefile.am 28 Apr 2011 15:55:02 - 1.75.2.7 @@ -23,7 +23,7 @@ check-java-closure.sh java.prov.sh java.req.sh \ gstreamer.sh javadeps.sh libtooldeps.sh mgo \ mono-find-provides mono-find-requires \ - check-multiarch-files multiarch-platform multiarch-dispatch + check-multiarch-files multiarch-platform multiarch-dispatch \ multiarch-dispatch.h mkmultiarch \ nix_meta \ osgideps.pl pkgconfigdeps.sh \ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_3: rpm/macros/ mandriva.in
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Per Øyvind Karlsen Root: /v/rpm/cvs Email: pkarl...@rpm5.org Module: rpm Date: 28-Apr-2011 18:00:54 Branch: rpm-5_3 Handle: 2011042816005400 Modified files: (Branch: rpm-5_3) rpm/macros mandriva.in Log: fix multiarch path (from funda) Summary: RevisionChanges Path 1.1.2.17+3 -2 rpm/macros/mandriva.in patch -p0 '@@ .' Index: rpm/macros/mandriva.in $ cvs diff -u -r1.1.2.16 -r1.1.2.17 mandriva.in --- rpm/macros/mandriva.in11 Apr 2011 00:35:30 - 1.1.2.16 +++ rpm/macros/mandriva.in28 Apr 2011 16:00:54 - 1.1.2.17 @@ -30,6 +30,7 @@ # This will die as soon as remaining usage has been phased out... %mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?subrel:.%subrel} %manbo_mkrel() %mkrel +%multiarch() %{1} # This will enable the use of distepoch and disttag in stead of polluting # %release with such. @@ -101,8 +102,8 @@ %multiarch_platform multiarch-%{_arch}-%{_target_os} %multiarch_bindir%{_bindir}/%{multiarch_platform} %multiarch_includedir%{_includedir}/%{multiarch_platform} -%multiarch_binaries()%{_rpmhome}/rpm/mkmultiarch binaries %{1} -%multiarch_includes()%{_rpmhome}/rpm/mkmultiarch includes %{1} +%multiarch_binaries()%{_rpmhome}/mkmultiarch binaries %{1} +%multiarch_includes()%{_rpmhome}/mkmultiarch includes %{1} # Check for need of multiarch, terminate build if needed and not used. # @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org