Page MenuHomeFreeBSD

Templates/config.site: double-slash root as not distinct with single-slash root is a given on FreeBSD
AbandonedPublic

Authored by swills on Jan 13 2019, 9:24 PM.

Details

Reviewers
sbruno
ml_vishwin.info
Group Reviewers
portmgr
Summary

Initially an IRC conversation.

When (cross-)building ports with qemu-user-static, some configure scripts check to see if double-slash root is distinct from single-slash root. These configure scripts execute wc to run this check, which hangs under qemu-user-static.

In FreeBSD, double-slash root is not distinct from single-slash root. Make that a given so the check is always "cached".

Test Plan

exp-run?

Diff Detail

Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 21946
Build 21188: arc lint + arc unit

Event Timeline

ml_vishwin.info set the repository for this revision to rP FreeBSD ports repository.Jan 13 2019, 9:25 PM
bapt added a subscriber: bapt.Jan 22 2019, 2:53 PM

yes it is a good idea, but it will requires an exp-run

pi added a subscriber: pi.Feb 5 2019, 4:29 PM

Testbuild of databases/mongodb36 can progress beyond this point with this patch.

pi added a comment.Feb 5 2019, 4:31 PM

(ahem, with poudriere under arm64.aarch64, running on a amd64 host)

antoine added a subscriber: antoine.May 8 2019, 6:27 PM

I don't think this is needed, update your src tree and poudriere.

ml_vishwin.info abandoned this revision.May 8 2019, 7:44 PM

Indeed, as wc(1) is now part of native-xtools, which is what actually hangs in qemu-aarch64-static during this check, this change is no longer needed.

swills commandeered this revision.May 19 2019, 4:46 PM
swills edited reviewers, added: ml_vishwin.info; removed: swills.

This still seems necessary to me. There's no entry in make.nxb.conf for WC (see here) and configure for (at least) devel/gettext-runtime doesn't seem to use WC, it calls wc directly:

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
$as_echo_n "checking whether // is distinct from /... " >&6; }
if ${gl_cv_double_slash_root+:} false; then :
  $as_echo_n "(cached) " >&6
else
   if test x"$cross_compiling" = xyes ; then
        # When cross-compiling, there is no way to tell whether // is special
        # short of a list of hosts.  However, the only known hosts to date
        # that have a distinct // are Apollo DomainOS (too old to port to),
        # Cygwin, and z/OS.  If anyone knows of another system for which // has
        # special semantics and is distinct from /, please report it to
        # <bug-gnulib@gnu.org>.
        case $host in
          *-cygwin | i370-ibm-openedition)
            gl_cv_double_slash_root=yes ;;
          *)
            # Be optimistic and assume that / and // are the same when we
            # don't know.
            gl_cv_double_slash_root='unknown, assuming no' ;;
        esac
      else
        set x `ls -di / // 2>/dev/null`
        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
          gl_cv_double_slash_root=no
        else
          gl_cv_double_slash_root=yes
        fi
      fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
$as_echo "$gl_cv_double_slash_root" >&6; }
  if test "$gl_cv_double_slash_root" = yes; then

$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h

  fi

so it would need to have /nxb-bin/usr/bin is not added to PATH, which I think we decided against at some point.

swills reclaimed this revision.May 19 2019, 4:47 PM

This still seems necessary to me. There's no entry in make.nxb.conf for WC (see here) and configure for (at least) devel/gettext-runtime doesn't seem to use WC, it calls wc directly:

wc should be hardlinked in the jail : https://github.com/freebsd/poudriere/blob/master/src/share/poudriere/common.sh#L2242

swills abandoned this revision.May 19 2019, 6:52 PM

Ah, I see. Seems I need poudriere from git instead of ports-mgmt/poudriere-devel. Thanks.