Samba 3.0.22 Porting by Vidya Sagar

Executive Summary
This paper is intended to illustrate the details of porting one of the most popular and useful open source applications,
Samba version 3.0 22, from the internet and interoperability domain. The paper should provide sufficient information to
1) Refresh a new version of Samba on MPE/iX,
2) Apply future patches released by Samba organization (
www.samba.org) and
3) Quickly fix defects in Samba/iX
The primary target audience of this paper is those programmers involved in any of the above mentioned activities that can
be classified into two types: 1) a person familiar with MPE/iX but less familiar with open source or the GNU tools, 2) a
person familiar with open source and the associated tools, but less familiar with MPE/iX and some of MPE/iX's POSIX
limitations. This paper is based on the porting of Samba-3.0.22 by the vCSY lab and suitable examples are provided
based on their experience.
While this paper discusses a port of Samba, it is not strictly restricted within the domain of Samba. A few selected porting
concepts are generalized to provide some information to the programmers to enable them to port any Open Source
application that conforms to POSIX standards. This motivates the secondary target audience who wants to port any Open
Source or UNIX application on MPE/iX.
This paper also discusses the GNU tools in sufficient enough detail to give an idea to beginners, the POSIX interface
implementation on MPE/iX and the MPE/iX limitations, with ideas about how to overcome them. Finally this paper also
describes the details of Samba porting, starting from downloading the application source through the porting steps to
follow until one can use the new Samba to access files on an MPE/iX system.
Introduction
The MPE/iX implementation of POSIX.1 C APIs and POSIX.2 conforming shell makes many UNIX targeted applications
eligible to be ported on MPE/iX. Further, while many recent ‘Open Source’ applications are based upon a POSIX.4
standard, there exists enough of a POSIX framework to allow a useful implementation of such applications. Samba is one
such application which provides a set of file server/sharing interoperability features between Windows and UNIX like
systems. The MPE/iX version of Samba, sometime called Samba/iX, allows Windows based systems to access Files
stored on MPE/iX Servers.
The paper starts with a very brief
background on MPE/iX, POSIX compliance and GNU tools. In this paper we will
describe how to port (refresh) a new version of Samba starting from downloading the source code through bringing up a
new Samba/iX file server on a MPE/iX System. One major subject to be covered is how to evaluate which features of an
application like Samba can be supported by MPE.
We also discuss how to configure the build machine for porting from the installation of GNU tools and utilities, through the
creation of build accounts and setting proper capability permissions. The porting of the Samba code is the basis of this
example.
The
porting section discusses the process of how Samba has been successfully ported on MPE/iX, followed by some
common problems, and a few performance notes applicable for Samba porting. The porting section also discusses how
to apply patches released by the Samba organization. It is assumed that the reader has basic knowledge of the C
programming language and UNIX environment (shell, system calls, file systems, signals etc).
The differences between UNIX systems and MPE/iX from a programming perspective are also outlined as a part of the
evaluation of features in the application considered for the port.
Conventions:
The paper follows a few typographical conventions listed below:
1. “I” refers the author who shares their experience through this paper and “You” refers the audience/reader (porter)
of this paper.
2. Programs text/snippets, variables, command, scripts, file names are colored set in courier new font.
3. Examples and demonstrations are set in courier new font and colored blue.
4. When we show interactions with MPE/iX CI (command interpreter) we use colon (“:”) as CI prompt and to show
interactions with MPE/iX POSIX shell we use shell prompt as “shell/iX”.
1