Magellan Linux

Diff of /smage/trunk/core/glibc/glibc-2.36-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 15654 by niro, Mon Dec 19 08:45:57 2022 UTC revision 15655 by niro, Tue Dec 20 15:35:59 2022 UTC
# Line 312  src_install_glibc() Line 312  src_install_glibc()
312   # remove stale directory   # remove stale directory
313   rm -rf ${BUILDDIR}/thread-backup || die   rm -rf ${BUILDDIR}/thread-backup || die
314    
315  # # prepare glibc for installation; slackware method   # prepare glibc for installation; slackware method
316  # minstalldir /incoming || die   minstalldir /incoming || die
317  # mv ${BINDIR}/usr/$(mlibdir)/*.so ${BINDIR}/incoming || die   mv ${BINDIR}/usr/$(mlibdir)/*.so ${BINDIR}/incoming || die
318  # mv ${BINDIR}/usr/$(mlibdir)/*.so.* ${BINDIR}/incoming || die   mv ${BINDIR}/usr/$(mlibdir)/*.so.* ${BINDIR}/incoming || die
319  # mv ${BINDIR}/incoming ${BINDIR}/usr/$(mlibdir)/incoming || die   mv ${BINDIR}/incoming ${BINDIR}/usr/$(mlibdir)/incoming || die
320  # mv ${BINDIR}/usr/$(mlibdir)/incoming/libmemusage.so ${BINDIR}/usr/$(mlibdir) || die   mv ${BINDIR}/usr/$(mlibdir)/incoming/libmemusage.so ${BINDIR}/usr/$(mlibdir) || die
321    
322     # Beginning with glibc-2.34, shared objects are using their ABI sonames
323     # directly, which is frankly, a terrible idea. It might help other package
324     # managers, but doesn't do us any favors where we already had a system for
325     # dealing with upgrades (and downgrades!). We'll change these libraries to
326     # use the versioned naming system of glibc-2.33 and earlier so that we don't
327     # have to handle these files differently and so that it's easy to see what
328     # version of glibc is in use at a glance.
329     pushd ${BINDIR}/usr/$(mlibdir)/incoming
330     local library
331     for library in *.so.*
332     do
333     mv ${library} $(echo ${library} | cut -f 1 -d .)-${PVER}.so || die
334     done
335     # This one is a special case. We don't want an $ARCH embedded in the
336     # filename. It prevents using the same install scripts on all $ARCH
337     # and does no good since we'll never have multiple $ARCH libraries
338     # installed in the same directory anyway. So give it the previous name
339     # format:
340     mv ld-linux*-${PVER}.so ld-${PVER}.so
341     popd
342  }  }
343    
344  src_install_glibc-dev()  src_install_glibc-dev()
# Line 489  postinstall_glibc() Line 510  postinstall_glibc()
510   local OLD_PTHREAD   local OLD_PTHREAD
511   OLD_PTHREAD="$(readlink ${MROOT}/usr/$(mlibdir)/libpthread.so.0)"   OLD_PTHREAD="$(readlink ${MROOT}/usr/$(mlibdir)/libpthread.so.0)"
512    
513  # # slackware install method   # slackware install method
514  #  
515  # # we cannot easily install the glibc libs,   # we cannot easily install the glibc libs,
516  # # because our tools for cp etc needs them to run   # because our tools for cp etc needs them to run
517  #  
518  # local file   local file
519  #  
520  # echo "     Switching to new glibc ..."   echo "     Switching to new glibc ..."
521  # # swap libraries on the fly:   # swap libraries on the fly:
522  # if [ -x /usr/sbin/ldconfig -a -d /usr/$(mlibdir)/incoming ] && [[ -z ${MROOT} ]]   if [ -x /usr/sbin/ldconfig -a -d /usr/$(mlibdir)/incoming ] && [[ -z ${MROOT} ]]
523  # then   then
524  # # first create copies of the incoming libraries:   # first create copies of the incoming libraries:
525  # cd /usr/$(mlibdir)/incoming   cd /usr/$(mlibdir)/incoming
526  # for file in $(find /usr/$(mlibdir)/incoming -type f)   for file in $(find /usr/$(mlibdir)/incoming -type f)
527  # do   do
528  # if [ ! -r "../$(basename ${file}).incoming" ]   if [ ! -r "../$(basename ${file}).incoming" ]
529  # then   then
530  # cp -a ${file} ../$(basename ${file}).incoming   cp -a ${file} ../$(basename ${file}).incoming
531  # fi   fi
532  # done   done
533  #  
534  # # then switch to them all at once:   # then switch to them all at once:
535  # /usr/sbin/ldconfig -l /usr/$(mlibdir)/*.incoming 2> /dev/null   /usr/sbin/ldconfig -l /usr/$(mlibdir)/*.incoming 2> /dev/null
536  #  
537  # # finally, rename them and clean up:   # Remove old versions of the glibc libraries. If you really don't want to
538  # cd /usr/$(mlibdir)   # do this for some reason, create a file /etc/glibc-nowipe.
539  # for file in *.incoming   if [ ! -r ${MROOT}/etc/glibc-nowipe ]
540  # do   then
541  # rm -f $(basename ${file} .incoming)   local INCOMING LIBRARY LIBPREFIX
542  # cp -a ${file} $(basename ${file} .incoming)  
543  # /usr/sbin/ldconfig -l $(basename ${file} .incoming)   cd /usr/$(mlibdir)
544  # rm -f ${file}   for INCOMING in incoming/*-*
545  # done   do
546  #   LIBPREFIX=$(basename $INCOMING | cut -f 1 -d -)
547  # # no ldconfig?   for LIBRARY in ${LIBPREFIX}-*
548  # # good, it's safe to just jam it on home (and make links below):   do
549  # else   # Don't remove the library if it ends in .incoming:
550  # (   if [ "$(echo $LIBRARY | rev | cut -f 1 -d .)" = "gnimocni" ]
551  # cd ${MROOT}/usr/$(mlibdir)/incoming   then
552  # for file in *   continue
553  # do   fi
554  # cp -a ${file} ..   # Don't remove symlinks:
555  # done   if [ -L $LIBRARY ]
556  #   then
557  # local my_sym   continue
558  # local my_dest   fi
559  #   rm -f $LIBRARY
560  # # rebuild symlinks   done
561  # echo "     Recreating Symlinks:"   done
562  # for i in $(find ${MROOT}/usr/$(mlibdir)/incoming -type l)   fi
563  # do  
564  # my_sym="$(readlink ${i})"   # finally, rename them and clean up:
565  # my_dest="$(basename ${i})"   cd /usr/$(mlibdir)
566  #   for file in *.incoming
567  # echo "       ${my_dest} -> ${my_dest}"   do
568  #   rm -f $(basename ${file} .incoming)
569  # # assure to remove the old ones;   cp -a ${file} $(basename ${file} .incoming)
570  # [ -L ${MROOT}/usr/$(mlibdir)/"${my_dest}" ] && \   /usr/sbin/ldconfig -l $(basename ${file} .incoming)
571  # rm ${MROOT}/usr/$(mlibdir)/"${my_dest}"   rm -f ${file}
572  #   done
573  # ln -snf "${my_sym}" ${MROOT}/usr/$(mlibdir)/"${my_dest}"  
574  # done   # no ldconfig?
575  # )   # good, it's safe to just jam it on home (and make links below):
576  # fi   else
577  #   (
578  # # now, get rid of the temporary directory:   cd ${MROOT}/usr/$(mlibdir)/incoming
579  # rm -rf ${MROOT}/usr/$(mlibdir)/incoming   for file in *
580     do
581     cp -a ${file} ..
582     done
583    
584     local my_sym
585     local my_dest
586    
587     # rebuild symlinks
588     echo "     Recreating Symlinks:"
589     for i in $(find ${MROOT}/usr/$(mlibdir)/incoming -type l)
590     do
591     my_sym="$(readlink ${i})"
592     my_dest="$(basename ${i})"
593    
594     echo "       ${my_dest} -> ${my_dest}"
595    
596     # assure to remove the old ones;
597     [ -L ${MROOT}/usr/$(mlibdir)/"${my_dest}" ] && \
598     rm ${MROOT}/usr/$(mlibdir)/"${my_dest}"
599    
600     ln -snf "${my_sym}" ${MROOT}/usr/$(mlibdir)/"${my_dest}"
601     done
602     )
603     fi
604    
605     # now, get rid of the temporary directory:
606     rm -rf ${MROOT}/usr/$(mlibdir)/incoming
607    
608   # remove stale nptl libpthread-2.?.?.so,   # remove stale nptl libpthread-2.?.?.so,
609   # fix only needed for glibc with linuxthreads;   # fix only needed for glibc with linuxthreads;
# Line 582  postinstall_glibc() Line 630  postinstall_glibc()
630   ln -snf ${NEW_PTHREAD} ${MROOT}/usr/$(mlibdir)/libpthread.so.0   ln -snf ${NEW_PTHREAD} ${MROOT}/usr/$(mlibdir)/libpthread.so.0
631   fi   fi
632    
633  # # now we must fix the mage db files   # now we must fix the mage db files
634  # # to stop the annoying errors messages   # to stop the annoying errors messages
635  # fix_db_files   fix_db_files
636  }  }
637    
638  postinstall_glibc-dev()  postinstall_glibc-dev()

Legend:
Removed from v.15654  
changed lines
  Added in v.15655