Metadata-Version: 2.2
Name: bisos.banna
Version: 0.49
Summary: bisos.banna:  BANNA (BISOS Assigned Names and Numbers Authority)
Author: Mohsen Banan
Author-email: libre@mohsen.1.banan.byname.net
Maintainer: Mohsen Banan
Maintainer-email: libre@mohsen.1.banan.byname.net
License: AGPL
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: bisos
Requires-Dist: bisos.b
Requires-Dist: bisos.common
Requires-Dist: bisos.csPlayer
Requires-Dist: setuptools==75.8.0
Requires-Dist: wheel==0.38.4
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: license
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: requires-dist
Dynamic: summary

===============================================================
bisos.banna: BANNA (BISOS Assigned Names and Numbers Authority)
===============================================================

.. contents::
   :depth: 3
..

Overview
========

bisos.banna is a python package for BISOS Assigned Names and Numbers
Authority

Package Documentation At Github
===============================

The information below is a subset of the full of documentation for this
bisos-pip package. More complete documentation is available at:
https://github.com/bisos-pip/banna-cs

Realted Resources
=================

+--------------------------+------------------------------------------+
| bisos Capabilities Panel | file:./panels/biso                       |
|                          | s.banna/_nodeBase_/fullUsagePanel-en.org |
+--------------------------+------------------------------------------+
|                          |                                          |
+--------------------------+------------------------------------------+

.. _table-of-contents:

Table of Contents TOC
=====================

-  `Overview <#overview>`__
-  `Package Documentation At
   Github <#package-documentation-at-github>`__
-  `Realted Resources <#realted-resources>`__
-  `What banna Assigns <#what-banna-assigns>`__

   -  `TCP ports and ``.internal``
      names <#tcp-ports-and-internal-names>`__
   -  `System accounts (uid/gid) <#system-accounts-uidgid>`__
   -  `Commands <#commands>`__

-  `Installation <#installation>`__

   -  `Installation With pip <#installation-with-pip>`__
   -  `Installation With pipx <#installation-with-pipx>`__

-  `Part of BISOS and ByStar — ByStar Internet Services Operating
   System <#part-of-bisos-and-bystar-----bystar-internet-services-operating-system>`__
-  `bisos.banna as a Standalone Piece of
   BISOS <#bisosbanna-as-a-standalone-piece-of-bisos>`__
-  `Documentation and Blee-Panels <#documentation-and-blee-panels>`__

   -  `bisos.banna Blee-Panels <#bisosbanna-blee-panels>`__

-  `Support <#support>`__

What banna Assigns
==================

banna is the single authority for the names and numbers BISOS services
bind to. Each is assigned once and never recomputed, so a new entry
never moves an existing one, and each registry rejects duplicates when
it is imported.

+-----------------+--------------------+-----------------------------+
| Registry        | Module             | Assigns                     |
+=================+====================+=============================+
| TCP ports       | ``tcpPorts.py``    | ``portNu`` per service;     |
|                 |                    | and, for those with a       |
|                 |                    | ``.internal`` name, its     |
+-----------------+--------------------+-----------------------------+
|                 |                    | ``hereIp`` (``127.0.22.x``) |
|                 |                    | and ``hereName`` (defaults  |
|                 |                    | to ``portName``)            |
+-----------------+--------------------+-----------------------------+
| Unix sockets    | ``unixSockets.py`` | RPyC socket numbers         |
+-----------------+--------------------+-----------------------------+
| System accounts | ``sysAccts.py``    | ``uid=/=gid`` of every      |
|                 |                    | account a BISOS capability  |
|                 |                    | creates                     |
+-----------------+--------------------+-----------------------------+

TCP ports and ``.internal`` names
---------------------------------

Code looks a port up rather than hardcoding it:
``tcpPorts.tcpPortsAssignedList.tcpPortsList['kafka'].portNu``. A port
with a ``hereIp`` gets a line in ``/etc/hosts``, generated by
``bannaForEtcHosts`` and installed by ``bisos.dnsCap``. The IP is stored
with the port (since 2026-10-09; before, it was derived from sorted
position, so adding a port could renumber others). ``hereName`` lets a
port publish another name: ``kafka.internal`` is Kafbat UI's port
(``kafbatUi``, 24009), not the broker's. ``hereIpOf(name)`` returns the
IP without needing ``/etc/hosts`` to be current.

System accounts (uid/gid)
-------------------------

``useradd -r`` picks numbers per host, so the same account differs
between platforms, and files moved between them (backups, rsync, cloned
VMs, NFS) or logs disagree. ``sysAccts.py`` assigns them from 500 upward
(inside Debian's dynamic system range, without changing
``/etc/login.defs``: ``adduser --system`` counts up from 100 and
``useradd -r`` down from 999): airflow 501, kafka 503, prometheus 504,
grafana 505, pypiserver 506, devpi 507, geneweb 508, the qmail block
510–519, the gitlab block 520–529. ``useraddScript(acctName)`` is the
bash an sbom runs: it creates the account with its numbers, warns if an
existing account differs, and refuses if a number is already taken.

Commands
--------

.. code:: bash

   bannaInfo.cs -i bannaForEtcHosts       # the /etc/hosts block: hereIp  hereName.internal  # port=
   bannaInfo.cs -i bannaForEtcPasswd      # /etc/passwd lines of every registered account
   bannaInfo.cs -i bannaForEtcGroup       # /etc/group lines of their primary groups
   bannaInfo.cs -i bannaSysAcctsVerify    # read-only: this host's accounts against the registry

Installation
============

The sources for the bisos.banna pip package is maintained at:
https://github.com/bisos-pip/banna.

The bisos.banna pip package is available at PYPI as
https://pypi.org/project/bisos.banna

You can install bisos.banna with pip or pipx.

Installation With pip
---------------------

If you need access to bisos.banna as a python module, you can install it
with pip:

.. code:: bash

   pip install bisos.banna

Installation With pipx
----------------------

If you only need access to bisos.banna as a command on command-line, you
can install it with pipx:

.. code:: bash

   pipx install bisos.banna

The following commands are made available:

-  seedBanna.cs
-  exmpl-banna.cs

Part of BISOS and ByStar — ByStar Internet Services Operating System
====================================================================

| Layered on top of Debian, **BISOS**: (By\* Internet Services Operating
  System) is a unified and universal framework for developing both
  internet services and software-service continuums that use internet
  services. See `Bootstrapping ByStar, BISOS and
  Blee <https://github.com/bxGenesis/start>`__ for information about
  getting started with BISOS.
| **BISOS** is a foundation for **The Libre-Halaal ByStar Digital
  Ecosystem** which is described as a cure for losses of autonomy and
  privacy in a book titled: `Nature of
  Polyexistentials <https://github.com/bxplpc/120033>`__

*bisos.banna* is part of BISOS.

bisos.banna as a Standalone Piece of BISOS
==========================================

bisos.banna is a standalone piece of BISOS. It can be used as a
self-contained Python package separate from BISOS. Follow the
installation and usage instructions below for your own use.

Documentation and Blee-Panels
=============================

bisos.banna is part of ByStar Digital Ecosystem http://www.by-star.net.

This module's primary documentation is in the form of Blee-Panels.
Additional information is also available in:
http://www.by-star.net/PLPC/180047

bisos.banna Blee-Panels
-----------------------

bisos.banna Blee-Panels are in ./panels directory. From within Blee and
BISOS these panels are accessible under the Blee "Panels" menu.

Support
=======

| For support, criticism, comments and questions; please contact the
  author/maintainer
| `Mohsen Banan <http://mohsen.1.banan.byname.net>`__ at:
  http://mohsen.1.banan.byname.net/contact
