pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/40093: bsd.lib.mk creates circular symlink when SHLIB_MINOR undefined



>Number:         40093
>Category:       pkg
>Synopsis:       bsd.lib.mk creates circular symlink when SHLIB_MINOR undefined
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 03 07:10:00 +0000 2008
>Originator:     Aleksej Saushev <asau%inbox.ru@localhost>
>Release:        NetBSD 5.99.01
>Organization:
>Environment:
System: NetBSD asau.local 5.99.01 NetBSD 5.99.01 (KERN) #0: Wed Nov 5 20:10:09 
MSK 2008 asau%asau.local@localhost:/usr/obj/sys/arch/i386/compile/KERN i386
Architecture: i386
Machine: i386
>Description:
        When using bsd.lib.mk, one has to define both SHLIB_MAJOR and 
SHLIB_MINOR,
        with missing SHLIB_MINOR circular symlink is created at installation.
        bsd.README should've mentioned, that both variables are required for
        correct operation.

        NetBSD bsd.lib.mk's behaviour differs from the above: it just doesn't
        create symlinks, when SHLIB_MAJOR/SHLIB_MINOR variables are undefined.

        When comparing /usr/pkgsrc/pkgtools/bootstrap-mk-files/files/bsd.lib.mk
        and /usr/share/mk/bsd.lib.mk diff produces the following fragment:

 .if ${OBJECT_FMT} == "ELF"
-       ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp
+#  We don't use INSTALL_SYMLINK here because this is just
+#  happening inside the build directory/objdir. XXX Why does
+#  this spend so much effort on libraries that aren't live??? XXX
+.if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \
+    "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}"
+       ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} 
lib${LIB}.so.${SHLIB_MAJOR}.tmp
        mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR}
-       ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
+.endif
+       ${HOST_LN} -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp
        mv -f lib${LIB}.so.tmp lib${LIB}.so
 .endif

        Most probably, pkgsrc mk files are too old compared to NetBSD.
>How-To-Repeat:
        Build test library with SHLIB_MAJOR set and SHLIB_MAJOR unset,
        e.g. on FreeBSD 6.3 i386.
>Fix:
        Update bootstrap-mk-files?
        Fix documentation?



Home | Main Index | Thread Index | Old Index