### WPA Supplicant Command Line Example Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/wpa/wpa_supplicant/README-Windows.txt Demonstrates how to start wpa_supplicant from the command line with specified interface, configuration file, and debug logging enabled. This is useful for initial setup and troubleshooting. ```bash wpa_supplicant.exe -iAtheros -c wpa_supplicant.conf -d ``` -------------------------------- ### Configure Script Usage Examples Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/jemalloc/INSTALL.md Demonstrates how to use the 'configure' script with different options to customize the installation and build of jemalloc. These examples showcase setting installation prefixes, managing version information, and enabling specific features. ```shell ./configure --prefix=/usr/local ``` ```shell ./configure --with-version=1.0.0-1-gabcdef123456 ``` ```shell ./configure --with-rpath=/opt/lib ``` ```shell ./configure --with-mangling=malloc:__wrap_malloc,free:__wrap_free ``` ```shell ./configure --with-jemalloc-prefix=myprefix_ ``` ```shell ./configure --without-export ``` ```shell ./configure --with-private-namespace=my_priv_ ``` ```shell ./configure --with-install-suffix=-custom ``` ```shell ./configure --with-malloc-conf=decay_ms:30000 ``` ```shell ./configure --enable-debug ``` ```shell ./configure --disable-stats ``` ```shell ./configure --enable-prof ``` ```shell ./configure --enable-prof-libunwind ``` ```shell ./configure --disable-prof-libgcc ``` ```shell ./configure --disable-prof-gcc ``` -------------------------------- ### Autoconf Build and Install Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/libevent/README.md Standard procedure for building and installing Libevent using Autoconf. Requires running configure, make, and optionally make verify before installation. ```bash $ ./configure $ make $ make verify # (optional) $ sudo make install ``` ```bash $ ./configure && make $ make verify $ make install ``` ```bash $ CFLAGS=-DUSE_DEBUG ./configure [...] ``` -------------------------------- ### Specify Compiler with CMake (Bash) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/llvm-project/lld/docs/getting_started.rst Example of how to specify custom C and C++ compilers when configuring the build with CMake. This is useful if clang is not the default or installed in a non-standard location. ```bash cmake -DCMAKE_CXX_COMPILER=/path/to/clang++ -DCMAKE_C_COMPILER=/path/to/clang ... ``` -------------------------------- ### Checkout LLVM and Subprojects (Bash) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/llvm-project/lld/docs/getting_started.rst Clones the LLVM project repository, which includes lld and other subprojects. This is the first step in obtaining the source code for building. ```bash git clone https://github.com/llvm/llvm-project.git ``` -------------------------------- ### Build and Install Lua 5.4 in One Step Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/lua/doc/readme.html This command combines the build and installation processes for Lua 5.4. It first compiles the source code and then installs the resulting files to their designated locations. ```bash make all install ``` -------------------------------- ### Test lld Build (Bash) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/llvm-project/lld/docs/getting_started.rst Runs the test suite for lld after it has been built. This command verifies the integrity and correctness of the lld build. ```bash make check-lld ``` -------------------------------- ### Create ZFS Boot Datasets Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/tools/tools/nanobsd/rescue/Files/root/ZFS_Create.txt Establishes the necessary ZFS datasets for the boot environment, specifically 'boot/ROOT' and 'boot/ROOT/root'. These datasets organize the bootable file systems. ```bash zfs create -o mountpoint=/mnt boot/ROOT zfs create boot/ROOT/root ``` -------------------------------- ### Autoconf Build and Install Commands Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/ntp/sntp/libevent/README.md Standard commands to configure, build, verify, and install Libevent using the Autoconf build system. Assumes the 'configure' script is present. ```bash # Configuration and Build ./configure make # Optional verification make verify # Installation (requires root privileges) sudo make install ``` -------------------------------- ### Create ZFS Boot Pool Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/tools/tools/nanobsd/rescue/Files/root/ZFS_Create.txt Creates a ZFS pool named 'boot' with specific mountpoint and snapshot settings. This is the foundational step for ZFS booting. ```bash zpool create -o mountpoint=none boot ... zpool set listsnapshots=on boot ``` -------------------------------- ### Makefile Example: Standard Expat Installation Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/expat/doc/reference.html A sample Makefile demonstrating how to compile and link a C program against the Expat library when it's installed in a standard system location. It specifies the C compiler, linker flags, and the Expat library for linking. ```makefile CC=cc LDFLAGS= LIBS= -lexpat xmlapp: xmlapp.o $(CC) $(LDFLAGS) -o xmlapp xmlapp.o $(LIBS) ``` -------------------------------- ### Start wpa_supplicant with Interface and Configuration Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/wpa/wpa_supplicant/README-Windows.txt Example command to start the wpa_supplicant service on Windows. It specifies the network interface to use (identified by win_if_list.exe), the configuration file, and enables debugging output. The -i option takes the interface name, -c specifies the configuration file, and -d enables debugging. ```shell # wpa_supplicant.exe -i'{769E012B-FD17-4935-A5E3-8090C38E25D2}' -c wpa_supplicant.conf -d ``` -------------------------------- ### Generate Visual Studio Projects with CMake (Bash) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/llvm-project/lld/docs/getting_started.rst Generates Visual Studio project files for building LLVM and lld. This command is executed from an out-of-source build directory. ```bash cd llvm-project/build (out of source build required) cmake -G "Visual Studio 11" -DLLVM_ENABLE_PROJECTS=lld ../llvm ``` -------------------------------- ### Build libxo using setup.sh, configure, and make Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/libxo/doc/getting.rst This sequence of commands outlines the essential steps to build libxo from source. It includes setting up the build environment, configuring the build for the specific system, compiling the code, running tests, and installing the library. ```bash sh bin/setup.sh cd build ../configure make make test sudo make install ``` -------------------------------- ### Disabling Default Configuration File Installation Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/crypto/krb5/src/windows/installer/wix/msi-deployment-guide.txt This section describes how to prevent a default configuration file from being installed by setting its condition to evaluate to false. An example condition 'DONOTINSTALL' is provided. It also notes that an undefined property will always evaluate to false, which can be leveraged to disable files. ```text 1.3) Go to the 'Condition' column of the component. 1.4) Enter a condition that evaluates to false. I.e. 'DONOTINSTALL'. (Note that an undefined property always evaluates to false). Note that you can also use this step to disable other configuration files without providing replacements. ``` -------------------------------- ### Create Bazel Workspace Directory Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/googletest/docs/quickstart-bazel.md Command to create a new directory for your Bazel workspace and navigate into it. This is the initial step for setting up a new Bazel project. ```shell mkdir my_workspace && cd my_workspace ``` -------------------------------- ### CMake Build and Install (General) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/libevent/README.md Configuration options for building Libevent with CMake. These variables control library type, installation paths, featureEnables, and more. ```cmake # Type of the library to build (SHARED or STATIC) # Default is: SHARED for MSVC, otherwise BOTH EVENT__LIBRARY_TYPE:STRING=DEFAULT # Installation directory for CMake files EVENT_INSTALL_CMAKE_DIR:PATH=lib/cmake/libevent # Enable running gcov to get a test coverage report (only works with # GCC/CLang). Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well. EVENT__COVERAGE:BOOL=OFF # Defines if Libevent should build without the benchmark executables EVENT__DISABLE_BENCHMARK:BOOL=OFF # Define if Libevent should build without support for a debug mode EVENT__DISABLE_DEBUG_MODE:BOOL=OFF # Define if Libevent should not allow replacing the mm functions EVENT__DISABLE_MM_REPLACEMENT:BOOL=OFF # Define if Libevent should build without support for OpenSSL encryption EVENT__DISABLE_OPENSSL:BOOL=OFF # Disable the regress tests EVENT__DISABLE_REGRESS:BOOL=OFF # Disable sample files EVENT__DISABLE_SAMPLES:BOOL=OFF # If tests should be compiled or not EVENT__DISABLE_TESTS:BOOL=OFF # Define if Libevent should not be compiled with thread support EVENT__DISABLE_THREAD_SUPPORT:BOOL=OFF # Enables verbose debugging EVENT__ENABLE_VERBOSE_DEBUG:BOOL=OFF # When cross compiling, forces running a test program that verifies that Kqueue # works with pipes. Note that this requires you to manually run the test program # on the the cross compilation target to verify that it works. See CMake # documentation for try_run for more details EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF ``` -------------------------------- ### Basic Installation Commands (Shell) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/kyua/INSTALL.md Standard commands to configure, build, test, and install Kyua from source. Assumes default installation prefix. ```shell #!/bin/sh ./configure make make check # Gain root privileges # make install # Drop root privileges # make installcheck ``` -------------------------------- ### Run QUIC Server Demo (OpenSSL) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/crypto/openssl/demos/guide/README.md This command starts a QUIC server using the provided demo source code. It requires setting the LD_LIBRARY_PATH and specifies the listening port, along with paths to the certificate chain and private key files. ```bash LD_LIBRARY_PATH=../.. ./quic-server-block 4443 ./chain.pem ./pkey.pem ``` -------------------------------- ### Install Lua 5.4 to a Custom Local Directory Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/lua/doc/readme.html This command allows users to specify a custom directory for the local installation of Lua 5.4. The 'INSTALL_TOP' variable points to the desired installation path. ```bash make install INSTALL_TOP=xxx ``` -------------------------------- ### Set up libxo Build Environment Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/libxo/doc/getting.rst This command executes the 'setup.sh' script, which is responsible for generating necessary build files like the 'configure' script using 'autoreconf'. This step is crucial when building from a Git repository. ```bash sh bin/setup.sh ``` -------------------------------- ### Install Lua 5.4 Locally Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/lua/doc/readme.html This command installs Lua 5.4 into a local 'install' directory within the project's root, creating subdirectories for binaries, headers, libraries, and man pages. This is useful for local development without system-wide changes. ```bash make local ``` -------------------------------- ### Install NTP as a Windows Service Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/ntp/html/hints/winnt.html This command installs the 'ntpd' executable as a Windows service, allowing it to start automatically at boot time. The command requires the full path to the ntpd.exe executable. ```batch instsrv.exe ``` -------------------------------- ### Build and install Expat with make (Shell) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/expat/README.md Standard commands to compile and install Expat after running the configure script. 'make' builds the library and utilities, while 'make install' places them in the configured directories. Ensure you have write permissions for installation. ```shell make make install ``` -------------------------------- ### Install Sphinx using easy_install Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/llvm-project/lld/docs/sphinx_intro.rst This command installs the Sphinx documentation generator using the Python easy_install package manager. It's a prerequisite for building Sphinx documentation. ```bash $ sudo easy_install sphinx Searching for sphinx Reading http://pypi.python.org/simple/sphinx/ Reading http://sphinx.pocoo.org/ Best match: Sphinx 1.1.3 ... more lines here .. ``` -------------------------------- ### CMake Build and Install Commands (Unix) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/ntp/sntp/libevent/README.md Standard commands to build Libevent on Unix-like systems using CMake, defaulting to the Unix Makefiles generator. ```bash # Create and change to build directory mkdir build && cd build # Configure (defaults to Unix Makefiles) cmake .. # Build the project make # Optional verification make verify ``` -------------------------------- ### Install Software on FreeBSD for iSCSI Testing Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/tools/regression/iscsi/initiator-instructions.txt Installs benchmarking and database software on FreeBSD using the ports system. Requires the ports tree to be fetched after OS installation. It installs benchmarks/bonnie++, benchmarks/iozone, benchmarks/postmark, databases/postgresql92-server, and databases/postgresql92-contrib. ```bash make install BATCH=1 <; #size-cells = <1>; ranges; smem_region: smem@fa00000 { reg = <0xfa00000 0x200000>; no-map; }; }; smem@fa00000 { compatible = "qcom,smem"; memory-region = <&smem_region>; qcom,rpm-msg-ram = <&rpm_msg_ram>; hwlocks = <&tcsr_mutex 3>; }; soc { rpm_msg_ram: memory@fc428000 { compatible = "qcom,rpm-msg-ram"; reg = <0xfc428000 0x4000>; }; }; ``` -------------------------------- ### Configure Script Help Option (Shell) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/kyua/INSTALL.md Invokes the configure script with the --help flag to display all available configuration options and exits. ```shell #!/bin/sh ./configure --help ``` -------------------------------- ### bcl Setup API Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/bc/manuals/bcl.3.md Functions for initializing, starting, and cleaning up the bcl library, as well as managing global settings like error handling and leading zero display. ```APIDOC ## bcl Setup API ### Description Functions for initializing, starting, and cleaning up the bcl library, as well as managing global settings. ### Methods - **bcl_start** - Description: Starts the bcl library. - Return: BclError - **bcl_end** - Description: Ends the bcl library. - **bcl_init** - Description: Initializes the bcl library. - Return: BclError - **bcl_free** - Description: Frees resources associated with the bcl library. - **bcl_abortOnFatalError** - Description: Checks if the library is set to abort on fatal errors. - Return: bool - **bcl_setAbortOnFatalError** - Description: Sets whether the library should abort on fatal errors. - Parameters: - _abrt_ (bool) - True to abort on fatal errors, false otherwise. - **bcl_leadingZeroes** - Description: Checks if leading zeroes are enabled for number representation. - Return: bool - **bcl_setLeadingZeroes** - Description: Sets whether leading zeroes should be preserved in number representations. - Parameters: - _leadingZeroes_ (bool) - True to enable leading zeroes, false otherwise. - **bcl_gc** - Description: Initiates garbage collection for managed numbers. - **bcl_digitClamp** - Description: Checks if digit clamping is enabled. - Return: bool - **bcl_setDigitClamp** - Description: Sets whether digit clamping is enabled. - Parameters: - _digitClamp_ (bool) - True to enable digit clamping, false otherwise. ``` -------------------------------- ### CMake Build and Install (Unix) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/libevent/README.md Instructions for building Libevent on Unix-like systems using CMake. This process includes creating a build directory, running CMake, and then compiling with make. ```bash $ mkdir build && cd build $ cmake .. # Default to Unix Makefiles. $ make $ make verify # (optional) ``` -------------------------------- ### Log Configuration Examples Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/ntp/ntpd/ntp.conf.html Demonstrates basic ntpd logging configuration using keywords to specify which message classes and events to log. The 'all' prefix can be used for broader logging. ```configuration logconfig =syncstatus +sysevents logconfig =syncall +clockall ``` -------------------------------- ### Autoconf Configure Flags Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/ntp/sntp/libevent/README.md Common flags for the Autoconf './configure' script, controlling static-only builds, installation prefix, GCC warnings, disabling malloc replacement, OpenSSL, and thread support. ```bash # Build only static libraries --disable-shared # Set installation directory --prefix # Enable extra compiler checking with GCC --enable-gcc-warnings # Prevent applications from replacing memory management functions --disable-malloc-replacement # Disable OpenSSL encryption support --disable-openssl # Disable multithreaded environment support --disable-thread-support ``` -------------------------------- ### CMake Build and Install Commands (Windows) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/ntp/sntp/libevent/README.md Instructions for building Libevent on Windows using CMake with a Visual Studio generator. Creates a build directory and opens the generated solution file. ```bash # Create and change to build directory md build && cd build # Configure using Visual Studio 10 generator (or desired version) cmake -G "Visual Studio 10" .. # Open the generated solution file start libevent.sln ``` -------------------------------- ### Test Event Listener Interface (C++) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/googletest/docs/reference/testing.md This C++ code defines the `TestEventListener` interface, which is used to trace the execution of tests. It declares virtual methods that are called at different stages of the test lifecycle, including program start, iteration start, environment setup, test suite start, and test start. These methods allow custom logic to be executed during test runs. ```C++ class TestEventListener { public: virtual void OnTestProgramStart(const UnitTest& unit_test); virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration); virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test); virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test); virtual void OnTestSuiteStart(const TestSuite& test_suite); virtual void OnTestStart(const TestInfo& test_info); // ... other methods }; ``` -------------------------------- ### Build LLVM and lld with CMake (Bash) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/llvm-project/lld/docs/getting_started.rst Configures and builds LLVM and lld using CMake on Unix-like systems. It requires a build directory and specifies the desired generator and projects. ```bash cd llvm-project mkdir build && cd build cmake -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS=lld ../llvm make ``` -------------------------------- ### Install Targets for Jemalloc Components Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/jemalloc/INSTALL.md Lists the make targets for installing specific components of the jemalloc library. This includes binaries, header files, libraries, and documentation. ```make install_bin install_include install_lib_shared install_lib_static install_lib_pc install_lib install_doc_html install_doc_man install_doc ``` -------------------------------- ### Sendmail Milter Configuration Example Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/sendmail/libmilter/docs/installation.html Example Sendmail `.mc` file configurations for defining and ordering input mail filters. Demonstrates Unix-domain and IP socket configurations, along with flag and timeout settings. ```m4 INPUT_MAIL_FILTER(`filter1', `S=unix:/var/run/f1.sock, F=R') INPUT_MAIL_FILTER(`filter2', `S=unix:/var/run/f2.sock, F=T, T=S:1s;R:1s;E:5m') INPUT_MAIL_FILTER(`filter3', `S=inet:999@localhost, T=C:2m') define(`confINPUT_MAIL_FILTERS', `filter2,filter1,filter3') ``` -------------------------------- ### Configure Web Server (Apache2) (Shell) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/crypto/openssl/test/recipes/30-test_evp_data/evppkey_ml_kem_512_decap.txt This snippet enables the Apache2 web server to start automatically on boot and then starts the service. It is a common choice for serving web content. Ensure Apache2 is installed. ```shell sysrc apache2_enable="YES" service apache2 start ``` -------------------------------- ### bc Help and Version Information Options Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/bc/manuals/bc/P.1.md Shows the command-line options for displaying help messages and version information for the bc utility. ```bash bc --help ``` ```bash bc -h ``` ```bash bc --version ``` ```bash bc -v ``` ```bash bc -V ``` -------------------------------- ### CMake Build and Install (Windows) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/libevent/README.md Steps to build Libevent on Windows using CMake and Visual Studio. This involves creating a build directory, running CMake with a specific generator, and opening the generated solution. ```bash $ md build && cd build $ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list. $ start libevent.sln ``` -------------------------------- ### Install easy_install on Linux Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/llvm-project/lld/docs/sphinx_intro.rst Instructions for installing the easy_install tool on Linux systems using the distribution's package manager. This is needed if easy_install is not already present. ```bash apt-get install easy_install ``` ```bash yum install easy_install ``` -------------------------------- ### Install file-magic Python Library Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/file/python/README.md Instructions for installing the file-magic Python library using standard Python packaging tools. This involves running the setup script or using package managers like pip or easy_install. ```shell python setup.py install ``` ```shell easy_install . ``` ```shell pip install file-magic ``` -------------------------------- ### CMake Configuration Variables for Libevent Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/ntp/sntp/libevent/README.md Key CMake variables for configuring Libevent's build. These control library type, installation paths, feature enablement (coverage, benchmarks, debug, SSL, threads), and testing. ```cmake # Type of the library to build (SHARED or STATIC) # Default is: SHARED for MSVC, otherwise BOTH EVENT__LIBRARY_TYPE:STRING=DEFAULT # Installation directory for CMake files EVENT_INSTALL_CMAKE_DIR:PATH=lib/cmake/libevent # Enable running gcov to get a test coverage report (only works with GCC/CLang). # Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well. EVENT__COVERAGE:BOOL=OFF # Defines if Libevent should build without the benchmark executables EVENT__DISABLE_BENCHMARK:BOOL=OFF # Define if Libevent should build without support for a debug mode EVENT__DISABLE_DEBUG_MODE:BOOL=OFF # Define if Libevent should not allow replacing the mm functions EVENT__DISABLE_MM_REPLACEMENT:BOOL=OFF # Define if Libevent should build without support for OpenSSL encryption EVENT__DISABLE_OPENSSL:BOOL=OFF # Disable the regress tests EVENT__DISABLE_REGRESS:BOOL=OFF # Disable sample files EVENT__DISABLE_SAMPLES:BOOL=OFF # If tests should be compiled or not EVENT__DISABLE_TESTS:BOOL=OFF # Define if Libevent should not be compiled with thread support EVENT__DISABLE_THREAD_SUPPORT:BOOL=OFF # Enables verbose debugging EVENT__ENABLE_VERBOSE_DEBUG:BOOL=OFF # When cross compiling, forces running a test program that verifies that Kqueue works with pipes. EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF ``` -------------------------------- ### Install Software on Fedora for iSCSI Testing Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/tools/regression/iscsi/initiator-instructions.txt Installs necessary packages for iSCSI testing on Fedora using yum, then configures services and builds iozone and postmark from source. Requires manual download and compilation for iozone and postmark. ```bash yum install btrfs-progs bonnie++ postgresql-server postgresql-contrib iscsi-initiator-utils chkconfig iscsid on chkconfig iscsi on ``` ```bash make linux cp postmark /usr/local/bin/ cp iozone /usr/local/bin/ ``` -------------------------------- ### Disable manpages installation for bc and dc Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/bc/manuals/build.md This example shows how to prevent the installation of manpages for bc and dc by using either the short -M flag or the long --disable-man-pages option with the configure.sh script. Both commands achieve the same result. ```shell ./configure.sh -M ./configure.sh --disable-man-pages ``` -------------------------------- ### Create a virtual environment Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/llvm-project/lld/docs/sphinx_intro.rst This command creates a new virtual environment named 'my-sphinx-install' in the user's home directory. This environment will be used to install Sphinx and its dependencies. ```bash $ virtualenv ~/my-sphinx-install New python executable in /Users/dummy/my-sphinx-install/bin/python Installing setuptools............done. Installing pip...............done. ``` -------------------------------- ### Configure MySQL Database Server (Shell) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/crypto/openssl/test/recipes/30-test_evp_data/evppkey_ml_kem_512_decap.txt This snippet enables the MySQL database server to start on boot and then starts the service. MySQL is a popular relational database management system. Ensure MySQL is installed and properly configured. ```shell sysrc mysql_enable="YES" service mysql start ``` -------------------------------- ### Running Autosetup Reference Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/sqlite3/autosetup/README.md This command displays the reference manual for the Autosetup configuration process. It is useful for understanding the available options and their configurations. The output can be piped to 'less' for easier navigation. ```shell $ ./configure --reference | less ``` -------------------------------- ### Configure Mail Submission Agent (Postfix SMTPS) (Shell) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/crypto/openssl/test/recipes/30-test_evp_data/evppkey_ml_kem_512_decap.txt This snippet enables the Postfix SMTP server (`smtpd`) to start on boot and then starts the service. Postfix is another popular MTA. Ensure Postfix is installed and configured. ```shell sysrc smtpd_enable="YES" service smtpd start ``` -------------------------------- ### User-Specific Installation Commands (Shell) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/kyua/INSTALL.md Commands to configure, build, test, and install Kyua into a user's home directory, avoiding the need for root privileges. ```shell #!/bin/sh ./configure --prefix ~/local make make check make install make installcheck ``` -------------------------------- ### Setup bcl Library Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/bc/manuals/bcl.3.md Functions to initialize, start, and shut down the bcl library. These functions manage the library's global state and resources. It is important to call `bcl_start` before using other bcl functions and `bcl_end` to clean up. ```c BclError bcl_start(void); void bcl_end(void); BclError bcl_init(void); void bcl_free(void); ``` -------------------------------- ### Configure Web Server (Nginx) (Shell) Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/crypto/openssl/test/recipes/30-test_evp_data/evppkey_ml_kem_512_decap.txt This snippet enables the Nginx web server to start automatically on boot and then starts the service. Nginx is known for its performance and efficiency in serving web content. Ensure Nginx is installed. ```shell sysrc nginx_enable="YES" service nginx start ``` -------------------------------- ### Install Software on Solaris for iSCSI Testing Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/tools/regression/iscsi/initiator-instructions.txt Installs GCC and system headers, then compiles bonnie++, iozone, and postmark from source. It also downloads and unpacks a binary PostgreSQL distribution. Requires manual compilation and installation of third-party tools. ```bash pkg install gcc-45 pkg install system/header ``` ```bash make Solaris10gcc cp bonnie++ /usr/bin/ cp postmark /usr/bin/ cp iozone /usr/bin/ ``` ```bash tar xjf postgresql-9.2.3-S11.i386-32.tar.bz2 -C /usr/postgres/ ``` -------------------------------- ### Generate Kerberos Transform using MSITRAN Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/crypto/krb5/src/windows/installer/wix/msi-deployment-guide.txt This command demonstrates how to generate a Windows Installer transform (.mst) file from an original MSI package and a modified MSI package. The msitran tool is part of the Windows Installer SDK. ```shell > copy kfw.msi kfw-modified.msi (edit the kfw-modified.msi to include the necessary changes) > msitran -g kfw.msi kfw-modified.msi kfw-transform.mst ``` -------------------------------- ### Standard Build Process for Flex Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/flex/README.md This sequence of commands represents the standard routine for building and installing Flex after the source tree has been prepared. ```bash configure && make && make install ``` -------------------------------- ### McASP Configuration Example Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/sys/contrib/device-tree/Bindings/sound/davinci-mcasp-audio.txt A device tree node example for configuring a Texas Instruments McASP controller. It specifies compatibility, register mapping, interrupts, operation mode, TDM slots, serial direction, FIFO event counts, and pin control. This example demonstrates a typical setup for an I2S audio mode. ```device-tree mcasp0: mcasp0@1d00000 { compatible = "ti,da830-mcasp-audio"; reg = <0x100000 0x3000>; reg-names "mpu"; interrupts = <82>, <83>; interrupt-names = "tx", "rx"; op-mode = <0>; /* MCASP_IIS_MODE */ tdm-slots = <2>; serial-dir = < 0 0 0 0 /* 0: INACTIVE, 1: TX, 2: RX */ 0 0 0 0 0 0 0 1 2 0 0 0 >; tx-num-evt = <1>; rx-num-evt = <1>; }; ``` -------------------------------- ### Build LLVM documentation targets Source: https://github.com/ghostbsd/ghostbsd-src/blob/stable/15/contrib/llvm-project/lld/docs/sphinx_intro.rst These commands invoke the build system (ninja or make) to compile the documentation after Sphinx has been enabled. The HTML output will be in a specific subdirectory. ```bash ninja docs-lld-html ``` ```bash make docs-lld-html ```