25 May 2017

9pc

System: Microsoft Windows 10 Home Edition
CPUs: Intel(R) Celeron(R) CPU N3060 @1.60GHz
64-bit Operating System, x64-based processor
Deps: vs_community__1560150700.1495339730.exe,
9pc.tar.gz

Installation of 9P for C#.

https://www.visualstudio.com/downloads/
vs_community__1560150700.1495339730.exe

See the previous post for the Visual Studio setup.

http://plan9.bell-labs.com/sources/contrib/zwansch/
9pc.tar.gz

Try Igor Pavlov's 7-Zip (64-bit x64) for extraction.

Create a new Project directory named 9pc with the 2 .cs files.

Open VS and create a new C# project from the code.

Running code analysis on the solution resulted in the following output.

CA2237: Microsoft.Usage : Add [Serializable] to 'ninepexception' as this type implements ISerializable.

CA1001: Microsoft.Design : Implement IDisposable on 'ninep' because it creates members of the following IDisposable types: 'Socket'.

CS0618: 'Dns.Resolve(string)' is obsolete: 'Resolve is obsoleted for this type, please use GetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202'

A partial update to the code (which I haven't applied or tested).

main.cs

-            iphost = Dns.Resolve(host);
+           iphost = Dns.GetHostEntry(host);
addr = iphost.AddressList;
ep = new IPEndPoint(addr[0], port);

+   [SerializableAttribute]
     class ninepexception : Exception
     {
         public ninepexception(string str)
         {
             Console.WriteLine("9P error: {0}", str);
         }
     }

Renaming the 32-bit executable and running it.

C:\Users\Eric\9pc.exe
Connected
sources.cs.bell-labs.com% ls
drwxrwxr-x 9grid 9grid 0 9grid
-rw-rw-r-- bootes sys 0 _sources
drwxrwxr-x adm sys 0 adm
drwxrwxr-x sys sys 0 contrib
drwxrwxr-x bootes sys 0 dist
-rw-rw---- geoff sys 396576 du
drwxrwxr-x sys sys 0 extra
drwxrwx--- fastos fastos 0 fastos
-rw-rw-r-- sys sys 9142602 lsr
drwxrwxr-x geoff nix 0 nix
drwxrwxrwx glenda sys 0 patch
drwxrwxr-x sys sys 0 plan9
drwxrwxr-x sys sys 0 wiki
drwxrwxr-x xen xen 0 xen
sources.cs.bell-labs.com% ^C
C:\Users\Eric\>EXIT

9P is a nice protocol!

18 May 2017

9pvfs

System: Microsoft Windows 10 Home Edition
CPUs: Intel(R) Celeron(R) CPU N3060 @1.60GHz
64-bit Operating System, x64-based processor
Deps: vs_community__1560150700.1495339730.exe,
tcl866-src.zip, tclvfs.tar.gz, tcllib-1.18.zip (optional),
trf2.1.4.zip (optional)

This post is not finished.

Next month I will write another post with a GNU/Linux install,
where with Tcl's bundled sqlite3 one should remember to add
to the configure script argumants "-DHAVE_USLEEP=1".

Installation of A. Belinfante's 9P2000 implementation.

http://plan9.bell-labs.com/sources/contrib/axel/tcl/9pvfs/
9pvfs.tcl
main-auth.tcl
main-no-auth.tcl
p9sk1.tcl

Possibly this could provide a Windows-native access to the Kirara
indexing software installed on Plan 9.

https://www.visualstudio.com/downloads/
vs_community__1560150700.1495339730.exe

Run the installer selecting the following individual components.

☑ Static analysis tools
☑ Text template Transformation
☑ Compilers, build tools, and runtimes
☑ C# and Visual Basic Roslyn compilers
☑ MSBuild
☑ VC++ 2017 v141 toolset (x86,x64)
☑ Just-in-Time debugger
☑ Visual Studio C++ core features
☑ Windows 10 SDK (10.015063.0) for Desktop C++ x86 and x64

https://sourceforge.net/projects/tcl/
tcl866-src.zip

Open an x64 Native Tools Command Prompt as an administrator.

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26430.6
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Windows\System32>CD \tcl866-src\tcl8.6.6\win

C:\tcl866-src\tcl8.6.6\win>nmake.exe -f makefile.vc MACHINE=AMD64

...

C:\tcl866-src\tcl8.6.6\win>nmake.exe -f makefile.vc install INSTALLDIR=c:\progra~1\tcl

...

C:\tcl866-src\tcl8.6.6\win>EXIT

Add "C:\Program Files\tcl\bin" to your System Environment Variable PATH.

NB: Setting the macro CFG_ENCODING to, e.g., 850, resulted in the failure
of tclsh86t.exe to install: the default is cp1252. I presume this is a bug and not
limited to cp850.

https://sourceforge.net/projects/tcllib/files/tcllib/1.18/
tcllib-1.18.zip

Open an x64 Native Tools Command Prompt as an administrator.

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26430.6
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26430.6
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Windows\System32>CD \tcllib-1.18

C:\tcllib-1.18>tclsh86t.exe installer.tcl
Installing Tcllib 1.18
You have chosen the following configuration ...

Packages:      C:/Program Files/tcl/lib/tcllib1.18
Applications:  C:/Program Files/tcl/bin
Examples:      C:/Program Files/tcl/bin/tcllib_examples1.18
Documentation:

        NROFF:  Not installed.
        HTML:   C:/Program Files/tcl/tcllib_doc

Is the chosen configuration ok ? y/N: y
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Generating C:/Program Files/tcl/lib/tcllib1.18/pkgIndex.tcl
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Generating C:/Program Files/tcl/bin/dtplite.tcl

Generating C:/Program Files/tcl/bin/nns.tcl

Generating C:/Program Files/tcl/bin/nnsd.tcl

Generating C:/Program Files/tcl/bin/nnslog.tcl

Generating C:/Program Files/tcl/bin/page.tcl

Generating C:/Program Files/tcl/bin/pt.tcl

Generating C:/Program Files/tcl/bin/tcldocstrip.tcl


C:\tcllib-1.18>EXIT

https://sourceforge.net/projects/tcltrf/
trf2.1.4.zip

(unfinished section)
http://p-nand-q.com/programming/windows/building_openssl_with_visual_studio_2013.html
http://developer.covenanteyes.com/building-openssl-for-visual-studio/
https://www.openssl.org/source/
http://mirrors.slackware.com/slackware/slackware64-14.2/patches/source/openssl/

http://tclvfs.cvs.sourceforge.net/viewvc/tclvfs/
tclvfs.tar.gz

Try Igor Pavlov's 7-Zip (64-bit x64) for extraction.

Allocation for private headers, a patch (Japanese webpage)
for \tclvfs\generic\vfs.c,

  #endif
+ #include <tclPort.h>  /* moved in front of tcl.h */
  #include <tcl.h>
  /* Required to access the 'stat' structure fields, and TclInExit() */
  #include "tclInt.h"
- #include "tclPort.h"

  /*

and a patch for \tclvfs\win\rules.vc were needed
in order to get tclvfs-1.4.2 to compile.

  !if $(TCLINSTALL)
- _TCLBINDIR      = "$(_TCLDIR)\bin"
- TCLSH = "$(_TCLBINDIR)\tclsh$(TCL_VERSION)$(SUFX).exe"
+ TCLSH = "$(_TCLDIR)\tclsh$(TCL_VERSION)$(SUFX).exe"
  !if !exist($(TCLSH)) && $(TCL_THREADS)
- TCLSH           = "$(_TCLBINDIR)\tclsh$(TCL_VERSION)t$(SUFX).exe"
+ TCLSH           = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)t$(SUFX).exe"
  !endif

Open an x64 Native Tools Command Prompt as an administrator.

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26430.6
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Windows\System32>CD \tclvfs\win

C:\tclvfs\win>nmake.exe -f makefile.vc MACHINE=AMD64

Microsoft (R) Program Maintenance Utility Version 14.10.25019.0
Copyright (C) Microsoft Corporation.  All rights reserved.

===============================================================================
*** Compiler has 'Optimizations'
*** Intermediate directory will be '.\Release_AMD64_VC9\vfs_ThreadedDynamic'
*** Output directory will be '.\Release_AMD64_VC9'
*** Suffix for binaries will be ''
*** Optional defines are '-DTCL_CFGVAL_ENCODING=\"cp1252\" -DSTDC_HEADERS -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -DUSE_THREAD_STORAGE=1 -DTCL_CFG_OPTIMIZED -DTCL_CFG_DO64BIT'
*** Compiler version 9. Target machine is AMD64
*** Compiler options '-W3  -Ot -Oi -fp:strict -Gs -GS -GL  -RTC1 -W3'
*** Link options '-ltcg'
        rc -fo .\Release_AMD64_VC9\vfs_ThreadedDynamic\tclvfs.res -r -i "..\generic" -D__WIN32__  -DCOMMAVERSION=1,4,0,0  -DDOTVERSION=\"1.4\"  -DVERSION=\"14\"  -d TCL_THREADS  ..\win\tclvfs.rc
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl -DPACKAGE_NAME="\"vfs\""  -DPACKAGE_VERSION="\"1.4\""  -DBUILD_vfs -nologo -c -W3 -W3 -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE -Fp.\Release_AMD64_VC9\vfs_ThreadedDynamic\ -DUSE_TCL_STUBS  -Ot -Oi -fp:strict -Gs -GS -GL -MD -I"C:\Program Files\Tcl\lib\..\include" -I"..\win" -I"..\generic" -DTCL_CFGVAL_ENCODING=\"cp1252\" -DSTDC_HEADERS -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -DUSE_THREAD_STORAGE=1 -DTCL_CFG_OPTIMIZED -DTCL_CFG_DO64BIT -DBUILD_vfs -Fo.\Release_AMD64_VC9\vfs_ThreadedDynamic\ @C:\Users\Eric\AppData\Local\Temp\nmBE29.tmp
vfs.c
        link -nologo -machine:AMD64 -ltcg -release -opt:ref -opt:icf,3 -dll -base:0x10A70000 -out:.\Release_AMD64_VC9\vfs14.dll "C:\Program Files\Tcl\lib\..\lib\tclstub86.lib" @C:\Users\Eric\AppData\Local\Temp\nmC1A5.tmp
   Creating library .\Release_AMD64_VC9\vfs14.lib and object .\Release_AMD64_VC9\vfs14.exp
Generating code
Finished generating code
        if exist .\Release_AMD64_VC9\vfs14.dll.manifest mt -nologo -manifest .\Release_AMD64_VC9\vfs14.dll.manifest -outputresource:.\Release_AMD64_VC9\vfs14.dll;2
        nmakehlp -s C:\Users\Eric\AppData\Local\Temp\nmC3D8.tmp ..\pkgIndex.tcl.in > .\Release_AMD64_VC9\pkgIndex.tcl
        nmakehlp -s C:\Users\Eric\AppData\Local\Temp\nmC447.tmp ..\library\vfs.tcl.in > .\Release_AMD64_VC9\vfs.tcl

C:\tclvfs\win>EXIT

http://wiki.tcl.tk/15632
http://wiki.tcl.tk/2466

The Msys2 project has a cvs package.

https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/x86_64/
cvs-1.11.23-2-x86_64.pkg.tar.xz

And, likewise a tclvfs-cvs package, where the tclvfs module was checked
out from the CVS server, but configured without threads enabled.

https://sourceforge.net/projects/msys2/files/REPOS/MINGW/x86_64/
mingw-w64-x86_64-tclvfs-cvs-20130425-3.src.tar.gz

27 April 2017

cvmfs

This post will be about the CernVM-FS.

http://cernvm.cern.ch/portal/filesystem

Proposed distro specific code changes to the GitHub repository.

https://github.com/cvmfs/cvmfs/tree/devel/cvmfs
cvmfs_config

sys_arch=$(uname)

case $sys_arch in
  Linux )
    if [ -x /sbin/service ]; then
      service="/sbin/service"
    elif [ -x /usr/sbin/service ]; then
      # Ubuntu
      service="/usr/sbin/service"
    elif [ -x /sbin/rc-service ] ; then
      # OpenRC
      service="/sbin/rc-service"
    elif [ -x /usr/bin/systemctl ] ; then
      # archlinux
      service="/usr/bin/systemctl"
    fi
    if [ -x /sbin/pidof ]; then
      pidof="/sbin/pidof"
    else
      # Ubuntu
      pidof="/bin/pidof"
    fi
-    if [ -x /sbin/fuser ]; then
+    if [ -x /bin/fuser ]; then
+      fuser="/bin/fuser"  # SuSE, Ubuntu
+    elif [ -x /sbin/fuser ]; then
      fuser="/sbin/fuser"  # RHEL
-    else
-      fuser="/bin/fuser"  # Ubuntu, SuSE
+    elif [ -x /usr/bin/fuser ]; then
+      fuser="/usr/bin/fuser"  # Slackware
    fi
    if [ -x /usr/bin/fusermount ]; then
      fusermount="/usr/bin/fusermount"  # RHEL, SuSE
    else
-      fusermount="/bin/fusermount"  # Ubuntu
+      fusermount="/bin/fusermount"  # Slackware, Ubuntu
    fi
    if [ ! -x /usr/bin/attr ]; then
      # Fedora
      if [ ! -x /bin/attr ]; then
        echo "attr utility required"
        exit 1
      fi
    fi
    fuse_fs_type="fuse"
    ;;

  Darwin )
    fuser="/usr/bin/fuser"
    fuse_fs_type="osxfusefs"
    ;;

  * )
    echo "Architecture $sys_arch is not supported"
    exit 1 ;;
esac

http://cvmfs.readthedocs.io/en/stable/cpt-squid.html

https://slackbuilds.org/repository/14.2/network/
squid-3.5.20.tar.xz
squid.tar.gz

eric6

System: Slackware Linux (version 14.2)
CPU: Intel(R) Core(TM) Duo CPU T2500 @2.00GHz
Deps: eric6-17.04.1.tar.gz
eric6-i18n-en-17.04.1.tar.gz

Installation of eric6-17.04.1.

https://sourceforge.net/projects/eric-ide/files/eric6/stable/17.04.1/

eric6-17.04.1.tar.gz
eric6-i18n-en-17.04.1.tar.gz

https://slackbuilds.org/repository/14.2/development/

https://slackbuilds.org/repository/14.2/libraries/
https://slackbuilds.org/repository/14.2/python/

bash-4.3# installpkg MarkupSafe-0.23-i486-1_SBo.tgz \
> PyStemmer-1.3.0-i586-1_SBo.tgz Pygments-2.1.3-i586-1_SBo.tgz \
> alabaster-0.7.9-i586-1_SBo.tgz cx_Freeze-4.2.3-i486-1_SBo.tgz \
> docutils-0.12-i486-1_SBo.tgz imagesize-0.7.1-i586-1_SBo.tgz \
> pyenchant-1.6.8-i586-1_SBo.tgz python-lazy-object-proxy-1.2.2-i586-1_SBo.tgz \
> python-requests-2.13.0-i586-1_SBo.tgz python-wrapt-1.10.8-i586-1_SBo.tgz \
> pytz-2016.10-i586-1_SBo.tgz six-1.10.0-i586-1_SBo.tgz


...

bash-4.3# installpkg Jinja2-2.7.3-i486-1_SBo.tgz \
> astroid-1.5.2-i586-1_SBo.tgz babel-2.3.4-i586-1_SBo.tgz \
> logilab-common-0.63.2-i486-1_SBo.tgz snowballstemmer-1.2.1-i586-1_SBo.tgz


...

bash-4.3# installpkg Sphinx-1.5.5-i586-1_SBo.tgz \
> pylint-1.5.2-i486-1_SBo.tgz


...

bash-4.3#

A SlackBuild for eric6 is located in the sidebar.

bash-4.3# installpkg eric6-17.04.1-i586-1_SBo.tgz

...

bash-4.3# exit

NB: You need at least Qt version 5.6.0 to execute the eric6 (QtWebEngine) web browser,
which is not supplied with this version of Slackware Linux; while the eric6 (QtWebKit) web
browser works fine.

22 April 2017

hubfs

http://9p.io/wiki/plan9/expanding_your_grid/index.html

http://9p.io/wiki/plan9/Configuring_a_Standalone_CPU_Server/index.html
http://9p.io/wiki/plan9/adding_a_new_user/index.html
http://9p.io/wiki/plan9/Network_configuration/index.html

http://9p.io/wiki/plan9/Installing_a_Plan_9_file_server/index.html
http://9p.io/wiki/plan9/setting_up_fossil/index.html
http://9p.io/wiki/plan9/setting_up_Venti/index.html

http://9p.io/wiki/plan9/connecting_to_other_OSes/index.html
http://9p.io/wiki/plan9/connecting_from_other_OSes/index.html

http://9p.io/wiki/plan9/hubfs/index.html
http://plan9.bell-labs.com/magic/man2html/4/consolefs

http://plan9.bell-labs.com/sources/contrib/mycroftiv/hubfs1.1/

NB: For Windows 10 (CU) 64-bit WSL probably one would want from a plan9port install
to connect to a GNU/Linux 64-bit machine on a LAN, and then use p9p's 9pfuse on the
latter for p9p/unix; the README file has a couple of scripts. On MacOS X you probably
need from Terminal to switch from bash to rc before starting acme.

The hubfs(1) and io(1) man pages are in the sidebar.

19 April 2017

p9p

System: Slackware Linux (version 14.2)
CPU: Intel(R) Core(TM) Duo CPU T2500 @2.00GHz
Deps: plan9port-20140306.tgz

https://code.google.com/archive/p/plan9port/downloads
plan9port-20140306.tgz

I recently compiled plan9port-20140306.tgz with Slackware-14.2's glibc-2.23.

The plan9port files' compilation produced terminal output as follows:

9c  sam.c
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

The suggestion has been forwarded to avoid the deprecated function usleep() in favour of nanosleep(), the change of the feature test macro (FTM) appears to have occurred in glibc subsequent to Slackware-14.1's glibc-2.17, so the warnings likely do not occur with those releases.

screen

System: Microsoft Windows 10 Home Edition
CPUs: Intel(R) Celeron(R) CPU N3060 @1.60GHz
64-bit Operating System, x64-based processor

I haven't looked at Win10 (CU) released on 11-04-17, it might be interesting though if one could from a Win64 installed GNU emacs reattach a WSL detached GNU Screen session.

Here is H. Oliveira's code which could be added to an emacs' customisation file.

;; GNU screen inside GNU Emacs
(defun term-screen ()
  (interactive)
  "Open GNU screen session or reattaches existing one"
  (require 'term)
  (setq term-ansi-buffer-name (concat "*" "terminal" "*"))
  (term-ansi-make-term term-ansi-buffer-name
                             "/usr/bin/screen" nil "-d" "-R")

  (set-buffer term-ansi-buffer-name)
  (term-mode)
  (term-char-mode)

  (term-set-escape-char ?\C-x)

  (switch-to-buffer term-ansi-buffer-name))

(global-set-key (kbd "C-c t") 'term-screen)

NB: I presume the path to the ELF64 screen should be adjusted for the PE64 emacs.