FreeBSD Ports Collection

repository·main·Indexed 22 days ago

https://github.com/freebsd/freebsd-ports

Documentation and configuration guides for the FreeBSD ports tree, including instructions for specific packages such as code-server, raidtest, siege, and various SQLite extensions. Contains details on service management, build requirements, and installation procedures for software ported to FreeBSD.

Tokens
108.8K
Snippets
420
Records
568
Agent score
79%

What's inside freebsd-ports

  1. Overview of fontpreview functionality

    main

    fontpreview is a command-line tool designed to quickly search for and preview installed fonts on your machine. It utilizes fuzzy searching and image generation to provide a visual preview of font styles.

    Key Features:

    • Fuzzy Search: Powered by fzf.
    • Preview Generation: Uses imagemagick to create font previews.
    • Preview Display: Uses nsxiv to display the generated images.
    • Customization: Highly configurable via command-line flags or environment variables.
  2. What is aiobreaker and the Circuit Breaker pattern?

    main

    aiobreaker is a Python implementation of the Circuit Breaker pattern for asyncio. The pattern allows one subsystem to fail without destroying the entire system by wrapping dangerous operations (like integration points) with a component that circumvents calls when the system is unhealthy.

    Key features include:

    • Configurable list of excluded exceptions.
    • Configurable failure threshold and reset timeout.
    • Support for multiple event listeners (synchronous and asynchronous).
    • Ability to guard generator functions.
    • Monitoring and management functions/properties.
    • Optional Redis backing.
  3. How GPRBuild searches for project files on FreeBSD

    main

    When using GPRBuild on FreeBSD, the tool searches for project files in a specific order. In addition to the standard GNAT compiler-specific paths, a global default project directory is searched last. This allows for easier integration of Ada Ports by enabling GPR projects to reference files located in the host's ${PREFIX}.

    The search order is:

    1. <compiler_prefix>/<target>/<runtime>/share/gpr (only if runtime is specified via --RTS or Runtime attribute)
    2. <compiler_prefix>/<target>/lib/gnat (only if runtime is specified via --RTS or Runtime attribute)
    3. <compiler_prefix>/share/gpr/
    4. <compiler_prefix>/lib/gnat/
    5. On FreeBSD only: %%PREFIX%%/share/gpr/ (the global default project directory)
  4. Extension compatibility for code-server

    main

    code-server supports many Visual Studio Code extensions, but compatibility is not guaranteed. Availability depends on the specific extension, the marketplace used, and whether the extension requires features not present in the code-server environment.

    For detailed compatibility information, refer to the official documentation at:

  5. Set up an Inadyn configuration file

    main

    To use one of the provided example configurations, copy the desired example file to %%PREFIX%%/etc/inadyn.conf. You must then edit the file to include your specific hostname, username, and password. For security, ensure the configuration file has restricted permissions (e.g., 600) before starting the service.

    sudo cp freedns.conf %%PREFIX%%/etc/inadyn.conf
    sudo chmod 600 %%PREFIX%%/etc/inadyn.conf
    sudo vim %%PREFIX%%/etc/inadyn.conf
    # [Change username, password and hostname]
    sudo inadyn
  6. Guidelines for Python based ports

    main

    Python ports follow specific rules regarding dependency management and build configuration.

    Version Discovery

    Use the following script to find the latest released version of a Python project: ../../Tools/scripts/pypi-get-latest-version.sh {python project name}

    Dependency Rules

    • General Dependencies: Always replace exact version comparisons in dependencies with >= (e.g., use >=1.2.3 instead of ==1.2.3).
    • Version Limits: Do not add upper version limits for Python based ports.
    • Pillow: Add the pillow dependency as ${PY_PILLOW} without any version information.
    • Setuptools: Never add setuptools to BUILD_DEPENDS. Instead, ensure the distutils element is present in USE_PYTHON.
    • Cython: Never add cython to BUILD_DEPENDS. Instead, add it to USE_PYTHON:
      • For Cython 1.x or 2.x: use the cython element.
      • For Cython 3.x: use the cython3 element.
    • Updates: Dependencies must be updated whenever the port is updated, ensuring they match the requirements set in the project.
    # Example: Finding the latest PyPI version
    ../../Tools/scripts/pypi-get-latest-version.sh my-python-package
  7. Manage the code-server service

    main

    You can manage code-server using the FreeBSD service command. To enable automatic startup at boot, use sysrc to set the enable flag.

    # Enable automatic startup at boot
    sysrc code_server_enable=YES
    
    # Start the service
    service code-server start
    
    # Stop the service
    service code-server stop
    
    # Restart the service
    service code-server restart
    
    # Check service status
    service code-server status
  8. Guidelines for Haskell based ports

    main

    Haskell ports follow a specific naming convention and versioning process.

    Identification

    • All Haskell port directories are prefixed with hs-.

    Version Discovery

    To find the latest released version of a Haskell project, use the following script: ../../Tools/scripts/haskell-get-latest-version.sh {haskell project name}

    # Example: Finding the latest Haskell version
    ../../Tools/scripts/haskell-get-latest-version.sh my-haskell-pkg