Skip to content

Commit 7445008

Browse files
committed
Use a more accurate name than "libtool".
1 parent 7fd2201 commit 7445008

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
lines changed

macros.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,8 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\
564564
#
565565
# Generate minimum versions for ELF libraries that don't provide
566566
# versioned symbol?
567-
#%_elf_provide_fallback_versions --libtool-version-fallback
568-
#%_elf_require_fallback_versions --libtool-version-fallback
567+
#%_elf_provide_fallback_versions --full-name-version-fallback
568+
#%_elf_require_fallback_versions --full-name-version-fallback
569569

570570
# Directories whose contents should be considered as documentation.
571571
%__docdir_path %{_datadir}/doc:%{_datadir}/man:%{_datadir}/info:%{_datadir}/gtk-doc/html:%{_datadir}/gnome/help:%{?_docdir}:%{?_mandir}:%{?_infodir}:%{?_javadocdir}:/usr/doc:/usr/man:/usr/info:/usr/X11R6/man

tests/rpmbuild.at

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,9 +1114,9 @@ RPMDB_INIT
11141114

11151115
AT_CHECK([
11161116
runroot_other chmod a-x /data/misc/libhello.so
1117-
runroot_other ${RPM_CONFIGDIR}/elfdeps -R --libtool-version-fallback /data/misc/libhello.so
1117+
runroot_other ${RPM_CONFIGDIR}/elfdeps -R --full-name-version-fallback /data/misc/libhello.so
11181118
runroot_other chmod a+x /data/misc/libhello.so
1119-
runroot_other ${RPM_CONFIGDIR}/elfdeps -R --libtool-version-fallback /data/misc/libhello.so
1119+
runroot_other ${RPM_CONFIGDIR}/elfdeps -R --full-name-version-fallback /data/misc/libhello.so
11201120
],
11211121
[0],
11221122
[libc.so.6(GLIBC_2.2.5)(64bit)
@@ -1130,9 +1130,9 @@ rtld(GNU_HASH)
11301130

11311131
AT_CHECK([
11321132
runroot_other chmod a-x /data/misc/libhello.so.1.0.0
1133-
runroot_other ${RPM_CONFIGDIR}/elfdeps -P --libtool-version-fallback /data/misc/libhello.so
1133+
runroot_other ${RPM_CONFIGDIR}/elfdeps -P --full-name-version-fallback /data/misc/libhello.so
11341134
runroot_other chmod a+x /data/misc/libhello.so.1.0.0
1135-
runroot_other ${RPM_CONFIGDIR}/elfdeps -P --libtool-version-fallback /data/misc/libhello.so
1135+
runroot_other ${RPM_CONFIGDIR}/elfdeps -P --full-name-version-fallback /data/misc/libhello.so
11361136
],
11371137
[0],
11381138
[libhello.so()(64bit) = 1.0.0
@@ -1144,9 +1144,9 @@ AT_SKIP_IF([! $HAVE_GNU_DLFCN])
11441144
AT_CHECK([
11451145
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${RPMTEST}/data/misc
11461146
runroot_other chmod a-x /data/misc/helloexe
1147-
${RPM_CONFIGDIR}/elfdeps -R --libtool-version-fallback ${RPMTEST}/data/misc/helloexe
1147+
${RPM_CONFIGDIR}/elfdeps -R --full-name-version-fallback ${RPMTEST}/data/misc/helloexe
11481148
runroot_other chmod a+x /data/misc/helloexe
1149-
${RPM_CONFIGDIR}/elfdeps -R --libtool-version-fallback ${RPMTEST}/data/misc/helloexe
1149+
${RPM_CONFIGDIR}/elfdeps -R --full-name-version-fallback ${RPMTEST}/data/misc/helloexe
11501150
],
11511151
[0],
11521152
[libc.so.6(GLIBC_2.2.5)(64bit)
@@ -1160,9 +1160,9 @@ AT_SKIP_IF([! $HAVE_GNU_DLFCN])
11601160
AT_CHECK([
11611161
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${RPMTEST}/data/misc
11621162
runroot_other chmod a-x /data/misc/hellopie
1163-
${RPM_CONFIGDIR}/elfdeps -R --libtool-version-fallback ${RPMTEST}/data/misc/hellopie
1163+
${RPM_CONFIGDIR}/elfdeps -R --full-name-version-fallback ${RPMTEST}/data/misc/hellopie
11641164
runroot_other chmod a+x /data/misc/hellopie
1165-
${RPM_CONFIGDIR}/elfdeps -R --libtool-version-fallback ${RPMTEST}/data/misc/hellopie
1165+
${RPM_CONFIGDIR}/elfdeps -R --full-name-version-fallback ${RPMTEST}/data/misc/hellopie
11661166
],
11671167
[0],
11681168
[libc.so.6(GLIBC_2.2.5)(64bit)
@@ -1176,9 +1176,9 @@ AT_SKIP_IF([$HAVE_GNU_DLFCN])
11761176
AT_CHECK([
11771177
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${RPMTEST}/data/misc
11781178
runroot_other chmod a-x /data/misc/helloexe
1179-
${RPM_CONFIGDIR}/elfdeps -R --libtool-version-fallback ${RPMTEST}/data/misc/helloexe
1179+
${RPM_CONFIGDIR}/elfdeps -R --full-name-version-fallback ${RPMTEST}/data/misc/helloexe
11801180
runroot_other chmod a+x /data/misc/helloexe
1181-
${RPM_CONFIGDIR}/elfdeps -R --libtool-version-fallback ${RPMTEST}/data/misc/helloexe
1181+
${RPM_CONFIGDIR}/elfdeps -R --full-name-version-fallback ${RPMTEST}/data/misc/helloexe
11821182
],
11831183
[0],
11841184
[libc.so.6(GLIBC_2.2.5)(64bit)
@@ -1192,9 +1192,9 @@ AT_SKIP_IF([$HAVE_GNU_DLFCN])
11921192
AT_CHECK([
11931193
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${RPMTEST}/data/misc
11941194
runroot_other chmod a-x /data/misc/hellopie
1195-
${RPM_CONFIGDIR}/elfdeps -R --libtool-version-fallback ${RPMTEST}/data/misc/hellopie
1195+
${RPM_CONFIGDIR}/elfdeps -R --full-name-version-fallback ${RPMTEST}/data/misc/hellopie
11961196
runroot_other chmod a+x /data/misc/hellopie
1197-
${RPM_CONFIGDIR}/elfdeps -R --libtool-version-fallback ${RPMTEST}/data/misc/hellopie
1197+
${RPM_CONFIGDIR}/elfdeps -R --full-name-version-fallback ${RPMTEST}/data/misc/hellopie
11981198
],
11991199
[0],
12001200
[libc.so.6(GLIBC_2.2.5)(64bit)

tools/elfdeps.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <rpm/rpmstring.h>
1717
#include <rpm/argv.h>
1818

19-
int libtool_version_fallback = 0;
19+
int full_name_version_fallback = 0;
2020
int soname_only = 0;
2121
int fake_soname = 1;
2222
int filter_soname = 1;
@@ -43,7 +43,7 @@ typedef struct elfInfo_s {
4343
* If filename is a symlink to a path that contains ".so." followed by
4444
* a version number, return a copy of the version number.
4545
*/
46-
static char *getLibtoolVer(const char *filename)
46+
static char *getFullNameVer(const char *filename)
4747
{
4848
const char *so, *link_basename, *dest_basename;
4949
char dest[PATH_MAX];
@@ -106,7 +106,7 @@ static char *getLibtoolVer(const char *filename)
106106
* functions, which isn't necessarily safe, so do that in a separate
107107
* process.
108108
*/
109-
static char *getLibtoolVerFromShLink(const char *filename)
109+
static char *getFullNameVerFromShLink(const char *filename)
110110
{
111111
#if defined(HAVE_DLMOPEN) && defined(HAVE_DLINFO)
112112
char dest[PATH_MAX];
@@ -130,7 +130,7 @@ static char *getLibtoolVerFromShLink(const char *filename)
130130
if (dl_handle == NULL) _exit(EXIT_FAILURE);
131131
if (dlinfo(dl_handle, RTLD_DI_LINKMAP, &linkmap) == -1)
132132
_exit(EXIT_FAILURE);
133-
version = getLibtoolVer(linkmap->l_name);
133+
version = getFullNameVer(linkmap->l_name);
134134
if (version)
135135
(void) write(pipefd[1], version, strlen(version));
136136
close(pipefd[1]);
@@ -246,7 +246,7 @@ static void addDep(ARGV_t *deps,
246246

247247
if (compare_op && fallback_ver) {
248248
/*
249-
* when versioned symbols aren't available, the libtool version
249+
* when versioned symbols aren't available, the full name version
250250
* might be used to generate a minimum dependency version.
251251
*/
252252
rasprintf(&dep,
@@ -372,17 +372,17 @@ static void processDynamic(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei)
372372
if (genRequires(ei)) {
373373
s = elf_strptr(ei->elf, shdr->sh_link, dyn->d_un.d_val);
374374
if (s) {
375-
char *libtool_ver = NULL;
375+
char *full_name_ver = NULL;
376376
/*
377377
* If soname matches an item already in the deps, then
378378
* it had versioned symbols and doesn't require fallback.
379379
*/
380-
if (libtool_version_fallback &&
380+
if (full_name_version_fallback &&
381381
!findSonameInDeps(ei->requires, s)) {
382-
libtool_ver = getLibtoolVerFromShLink(s);
382+
full_name_ver = getFullNameVerFromShLink(s);
383383
}
384-
addDep(&ei->requires, s, NULL, ei->marker, ">=", libtool_ver);
385-
free(libtool_ver);
384+
addDep(&ei->requires, s, NULL, ei->marker, ">=", full_name_ver);
385+
free(full_name_ver);
386386
}
387387
}
388388
break;
@@ -483,12 +483,12 @@ static int processFile(const char *fn, int dtype)
483483
ei->soname = rstrdup(bn ? bn + 1 : fn);
484484
}
485485
if (ei->soname) {
486-
char *libtool_ver = NULL;
487-
if (libtool_version_fallback) {
488-
libtool_ver = getLibtoolVer(fn);
486+
char *full_name_ver = NULL;
487+
if (full_name_version_fallback) {
488+
full_name_ver = getFullNameVer(fn);
489489
}
490-
addDep(&ei->provides, ei->soname, NULL, ei->marker, "=", libtool_ver);
491-
free(libtool_ver);
490+
addDep(&ei->provides, ei->soname, NULL, ei->marker, "=", full_name_ver);
491+
free(full_name_ver);
492492
}
493493
}
494494

@@ -529,7 +529,7 @@ int main(int argc, char *argv[])
529529
struct poptOption opts[] = {
530530
{ "provides", 'P', POPT_ARG_VAL, &provides, -1, NULL, NULL },
531531
{ "requires", 'R', POPT_ARG_VAL, &requires, -1, NULL, NULL },
532-
{ "libtool-version-fallback", 0, POPT_ARG_VAL, &libtool_version_fallback, -1, NULL, NULL },
532+
{ "full-name-version-fallback", 0, POPT_ARG_VAL, &full_name_version_fallback, -1, NULL, NULL },
533533
{ "soname-only", 0, POPT_ARG_VAL, &soname_only, -1, NULL, NULL },
534534
{ "no-fake-soname", 0, POPT_ARG_VAL, &fake_soname, 0, NULL, NULL },
535535
{ "no-filter-soname", 0, POPT_ARG_VAL, &filter_soname, 0, NULL, NULL },

0 commit comments

Comments
 (0)