pcloudcc-lneely/dev
Levi Neely d0d34f4345
Resolve #394: Replace Boost.Program_options with CLI11 (#396)
* Replace Boost.Program_options with CLI11 to resolve version pinning (#394)

- Replace boost::program_options with header-only CLI11 in main.cpp
- Remove boost dependency from Makefile, default.nix, and flake.nix
- Update documentation in doc/BUILD.md
- Add CMakeLists.txt as an alternative build system

This fixes the issue where the binary would fail to find specific libboost_program_options.so versions (e.g., 1.90.0) on systems with newer/older Boost versions. Since CLI11 is header-only, there is no longer a runtime dependency on Boost for pcloudcc.

* Update build configuration and dev scripts to remove remaining Boost references

- Remove Boost from dev scripts and container build configs
- Add -std=c++11 to Makefile CXXFLAGS
- Explicitly add -I. to Makefile CFLAGS for CLI11.hpp include

* Address build review feedback and fix security/bug issues

- Fix passascrypto logic and type (now a flag) in main.cpp
- Fix typo in daemon process name
- Add secret wiping (putil_wipe) for tfa_code and singleton passwords
- Remove redundant App setup in control_tools.cpp
- Use CLI11 envname for PCLOUD_USER
- Fix C++11 compatibility for putil_wipe and App initialization in control_tools.cpp

* Remove phantom CMakeLists.txt and ensure Makefile is the source of truth

---------

Co-authored-by: Levi Neely <lkn@darkstar.example.net>
2026-05-01 15:02:23 +02:00
..
README.md Cherry pick 20240910 (#69) 2024-09-10 16:26:16 +02:00
container-build.sh Resolve #394: Replace Boost.Program_options with CLI11 (#396) 2026-05-01 15:02:23 +02:00
devhost-arch-arm64.sh Resolve #394: Replace Boost.Program_options with CLI11 (#396) 2026-05-01 15:02:23 +02:00
devhost-arch.sh Resolve #394: Replace Boost.Program_options with CLI11 (#396) 2026-05-01 15:02:23 +02:00
devhost-debian.sh Resolve #394: Replace Boost.Program_options with CLI11 (#396) 2026-05-01 15:02:23 +02:00
devhost-fedora.sh Resolve #394: Replace Boost.Program_options with CLI11 (#396) 2026-05-01 15:02:23 +02:00
rename.sh WIP: Decompose namespaces and other cleanup (#94) 2025-03-01 22:21:54 +01:00
sync.sh update devscripts, new arch devhost (#144) 2025-04-06 23:01:31 +02:00

README.md

DevHost Setup Scripts

This repository contains scripts to set up development environments using Podman containers. The scripts allow you to create and manage development hosts based on Fedora or Debian/Ubuntu, and sync your project files between the host and the container.

Scripts

  1. devhost-fedora.sh: Sets up a Fedora-based development environment.
  2. devhost-debian.sh: Sets up a Debian or Ubuntu-based development environment.
  3. sync.sh: Syncs project files between the host and the container.

Prerequisites

  • Podman installed on your host system
  • FUSE support on your host system
  • SSH key pair for authentication (optional, but recommended)

Usage

Setting up a Development Host

Fedora-based Host

./devhost-fedora.sh [OPTIONS]

Debian/Ubuntu-based Host

./devhost-debian.sh [OPTIONS]

Common options for both scripts:

  • -n, --name NAME: Specify the name for the container (default: devhost-[distro]-[username])
  • -u, --user USER: Specify the username to create (default: dev)
  • -p, --password PASS: Specify the user's password (default: devhost)
  • -s, --ssh-port PORT: Specify the SSH port to forward (default: 2222)
  • -r, --remove: Stop and remove the container if it exists
  • -e, --enter: Enter the container as the specified user (builds if not exists)
  • -h, --help: Display the help message

Additional option for devhost-debian.sh:

  • -d, --distro DISTRO: Specify the distribution (debian or ubuntu) (default: debian)

Examples

  1. Create a Fedora-based development host:

    ./devhost-fedora.sh
    
  2. Create an Ubuntu-based development host:

    ./devhost-debian.sh -d ubuntu
    
  3. Create a Debian-based host with a custom name and SSH port:

    ./devhost-debian.sh -n mydevhost -s 2345
    
  4. Enter an existing container:

    ./devhost-fedora.sh -e
    
  5. Remove an existing container:

    ./devhost-debian.sh -r
    

Syncing Project Files

To sync your project files from the host to the container, use the sync.sh script:

./sync.sh [OPTIONS] -c CONTAINER_NAME

Options:

  • -c, --container CONTAINER_NAME: Specify the devhost container name (required)
  • -s, --source DIR: Specify the source directory on the host (default: current directory)
  • -d, --dest DIR: Specify the destination directory in the container
  • -u, --user USER: Specify the user in the container (default: dev)
  • -p, --port PORT: Specify the SSH port (default: 2222)
  • -o, --once: Sync files once and exit
  • -w, --watch: Watch for changes and sync continuously (default)
  • -h, --help: Display the help message

Example:

./sync.sh -c mydevhost-fedora -s /path/to/project -d /src/project -u dev -p 2222 -w

This will sync files from /path/to/project on the host to /src/project in the container named mydevhost-fedora, using the user dev and SSH port 2222. It will continue to watch for changes and sync automatically.

Note:

  • The script syncs files one-way: from the host to the container.
  • The -c or --container option is required.
  • By default, it watches for changes and syncs continuously. Use the -o or --once option for a single sync.
  • Make sure you have rsync installed on your host, and watchexec if you want to use the watch feature.

Notes

  • The scripts assume they are located in a 'dev' subdirectory of the source root.
  • The entire source root will be copied to /src/<source_root_name> in the container.
  • SSH public keys from $HOME/.ssh/*.pub will be copied to the container for key-based authentication.
  • FUSE support is enabled in the containers, allowing for advanced filesystem operations.

Troubleshooting

If you encounter issues with FUSE support, ensure that FUSE is properly installed and loaded on your host system. You may need to run sudo modprobe fuse on the host system.

For any other issues or questions, please open an issue in the repository.