commit 1a020a7dcaa762e3a3dbf7510159187b4456f692 Author: Your Name Date: Sat Aug 16 16:24:12 2025 -0400 First diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..44ddfa8f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tutorial1/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..3b664107 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..55ae9c87 --- /dev/null +++ b/README.md @@ -0,0 +1,190 @@ +# n-OS-tr + +n-OS-tr is an attempt to create a nostr based operating system / distro. + +We are starting with a base of debian live. + +Currently exploring different means to this end. + +## Debian Live Build Setup and Tutorial 1 Implementation + +This document covers the complete process of setting up live-build and implementing Tutorial 1 from the Debian Live Manual. + +### System Requirements + +Tested on Pop!_OS 22.04 LTS (Ubuntu-based system). + +### Phase 1: Installing Dependencies + +The following packages are required for building Debian Live images: + +```bash +sudo apt update +sudo apt install debootstrap xorriso squashfs-tools syslinux-utils cpio gzip gettext +``` + +**Package purposes:** +- `debootstrap`: Creates minimal Debian base system +- `xorriso`: Creates ISO images +- `squashfs-tools`: Creates compressed filesystem +- `syslinux-utils`: Boot loader utilities +- `cpio`, `gzip`, `gettext`: Archive and localization utilities + +### Phase 2: Setting up Live-Build from Repository + +Instead of installing live-build via system packages (which may be outdated), we use the repository directly for the most current version. + +#### Creating the Wrapper Script + +Create `lb-wrapper.sh` for convenient access to live-build commands: + +```bash +#!/bin/bash + +# Set the LIVE_BUILD environment variable to point to our repository +export LIVE_BUILD="$(dirname "$0")/live-build" + +# Execute the live-build frontend with all arguments passed through +"$LIVE_BUILD/frontend/lb" "$@" +``` + +Make it executable: +```bash +chmod +x lb-wrapper.sh +``` + +**Usage:** Replace all `lb` commands with `./lb-wrapper.sh` to use the repository version. + +### Phase 3: Tutorial 1 - Default Image Creation + +Following the Debian Live Manual Tutorial 1 to create a basic live system: + +```bash +mkdir tutorial1 +cd tutorial1 +../lb-wrapper.sh config +``` + +This creates the basic configuration structure in the `config/` directory. + +### Phase 4: Building the Image + +**Important:** Due to keyring compatibility issues between Ubuntu/Pop!_OS and Debian, we need to bypass GPG verification for development builds. + +Build the image as root with security bypass: + +```bash +sudo ../lb-wrapper.sh config --apt-secure false --distribution stable +sudo ../lb-wrapper.sh build 2>&1 | tee build.log +``` + +### Keyring Issues and Troubleshooting + +**Problem:** Pop!_OS/Ubuntu keyrings are incompatible with both Debian testing and stable distributions, causing GPG verification failures. + +**Error examples:** +- Debian testing: `The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 78DBA3BC47EF2265` +- Debian stable: `The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 762F67A0B2C39DE4` + +**Solution:** Use `--apt-secure false` flag to bypass GPG verification for development purposes. + +**Production note:** For production builds, proper keyring setup should be implemented instead of disabling security checks. + +### Expected Results + +- Build time: Varies based on internet connection and system performance +- Output file: `live-image-amd64.hybrid.iso` (approximately 298MB) +- This ISO can be: + - Tested in virtual machines (QEMU, VirtualBox) + - Written to USB drives + - Burned to optical media + +### Command Summary + +Complete sequence for Tutorial 1: + +```bash +# 1. Install dependencies +sudo apt install debootstrap xorriso squashfs-tools syslinux-utils cpio gzip gettext + +# 2. Create wrapper script (if not exists) +# [Create lb-wrapper.sh as shown above] +chmod +x lb-wrapper.sh + +# 3. Create and configure tutorial +mkdir tutorial1 +cd tutorial1 +../lb-wrapper.sh config --apt-secure false --distribution stable + +# 4. Build image +sudo ../lb-wrapper.sh build 2>&1 | tee build.log + +# 5. Result: live-image-amd64.hybrid.iso ready for testing +``` + +### Notes + +- The `--distribution stable` ensures we use Debian stable instead of the default testing +- Build logs are automatically saved due to the wrapper script configuration +- The `--apt-secure false` flag is a workaround for keyring issues on Ubuntu-based systems +- For clean rebuilds, use `sudo ../lb-wrapper.sh clean` before building again + +## FAQ + +### Q: What are the auto, config, and local directories created by `lb config` for? + +**A:** When you run `lb config`, three directories are created: + +1. **auto/** - Created but empty by default + - Used for optional automation scripts that you create yourself + - You can add `auto/config`, `auto/build`, `auto/clean` scripts that run automatically before their respective `lb` commands + - Most basic builds (like Tutorial 1) don't need these files + - Useful for advanced scenarios where you want reproducible builds with version control + +2. **config/** - This is where the real configuration lives + - Contains all the subdirectories for customizing your live system + - Has the main config files (binary, bootstrap, chroot, common, source) with your build parameters + - This is where you add package lists, custom files, hooks, etc. + - Most important directory for customization + +3. **local/** - For local customizations + - Also typically empty unless you have custom executables or files to include + - Used for build-time scripts and tools, not files to include in the final system + +### Q: How do I add files to specific locations in the final live system? + +**A:** Several directories in the config structure map directly to the final system filesystem: + +**For files you want in the final live system:** + +1. **config/includes.chroot/** - Maps directly to the root filesystem (`/`) + - To put a file in `/usr/local/bin/myscript` in the final system + - Place it at `config/includes.chroot/usr/local/bin/myscript` + - Everything in this directory gets copied to `/` in the live system + +2. **config/includes.chroot_after_packages/** - Same mapping, but copied after packages are installed + - Use when you want to overwrite files that packages might have installed + - Same directory mapping as above + +3. **config/includes.chroot_before_packages/** - Copied before packages are installed + - Less commonly used, but available if needed + +**For files you want on the ISO/boot media itself (not in the live system):** + +4. **config/includes.binary/** - Files that go on the boot media + - These appear on the USB/CD itself, not inside the running live system + - Useful for documentation, additional tools, etc. + +**Example:** To put a custom script in `/usr/local/bin/hello` in your live system: +```bash +# 1. Create the directory structure +mkdir -p config/includes.chroot/usr/local/bin/ + +# 2. Put your script there +cp myscript config/includes.chroot/usr/local/bin/hello + +# 3. Make it executable +chmod +x config/includes.chroot/usr/local/bin/hello +``` + +The build process will automatically copy it to the correct location in the live system. diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 00000000..6692e718 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,6 @@ + +rsync -v n-os-tr.sh ~/Servers/LaanTungir/WWW/n-os-tr.sh +rsync -v test.sh ~/Servers/LaanTungir/WWW/test.sh +rsync -v docker.sh ~/Servers/LaanTungir/WWW/docker.sh +# rsync -v --delete n_os_tr.sh ~/Servers/LaanTungir/WWW/n-os-tr.sh + diff --git a/docker.sh b/docker.sh new file mode 100755 index 00000000..addd7da5 --- /dev/null +++ b/docker.sh @@ -0,0 +1,457 @@ +#!/bin/bash + +# Docker Compose Installation and Nginx Setup Script for Debian +set -e + +echo "Starting Docker Compose installation and Nginx setup..." + +# Update package index +echo "Updating package index..." +sudo apt update + +# Install prerequisites +echo "Installing prerequisites..." +sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release + +# Add Docker's official GPG key +echo "Adding Docker's GPG key..." +curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg + +# Add Docker repository +echo "Adding Docker repository..." +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + +# Update package index again +echo "Updating package index with Docker repository..." +sudo apt update + +# Install Docker Engine +echo "Installing Docker Engine..." +sudo apt install -y docker-ce docker-ce-cli containerd.io + +# Start and enable Docker service +echo "Starting Docker service..." +sudo systemctl start docker +sudo systemctl enable docker + +# Add current user to docker group (optional, requires logout/login to take effect) +echo "Adding current user to docker group..." +sudo usermod -aG docker $USER + +# Install Docker Compose +echo "Installing Docker Compose..." +DOCKER_COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*?(?=")') +sudo curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose + +# Verify Docker Compose installation +echo "Verifying Docker Compose installation..." +docker-compose --version + +# Create Docker directory structure +echo "Creating Docker directory structure..." +mkdir -p Docker +cd Docker + +# Create subdirectories +mkdir -p strfry/data blossom/data conf.d WWW + +# Create docker-compose.yml +echo "Creating docker-compose.yml..." +cat > docker-compose.yml << EOF +version: '3.8' + +services: + nginx: + image: nginx:alpine + ports: + - "80:80" + - "443:443" + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf:ro + - ./conf.d:/etc/nginx/conf.d:ro + - ./WWW:/var/www/html:ro + - /etc/letsencrypt:/etc/letsencrypt:ro + restart: unless-stopped + networks: + - web + depends_on: + - strfry + - blossom + + strfry: + image: dockurr/strfry + container_name: strfry + ports: + - "7777:7777" # Internal port for nginx proxy + volumes: + - ./strfry/data:/app/strfry-db + - ./strfry/strfry.conf:/etc/strfry.conf + restart: always + stop_grace_period: 2m + networks: + - web + + blossom: + image: ghcr.io/hzrd149/blossom-server:master + container_name: blossom + ports: + - "3000:3000" # Internal port for nginx proxy + volumes: + - ./blossom/data:/app/data + - ./blossom/config.yml:/app/config.yml + restart: always + networks: + - web + +networks: + web: + driver: bridge + +EOF + +# Create nginx main configuration +echo "Creating nginx.conf..." +cat > nginx.conf << EOF +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '\$remote_addr - \$remote_user [\$time_local] "\$request" ' + '\$status \$body_bytes_sent "\$http_referer" ' + '"\$http_user_agent" "\$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + sendfile on; + keepalive_timeout 65; + + include /etc/nginx/conf.d/*.conf; +} +EOF + +# Create nginx site configuration +echo "Creating nginx site configuration..." +cat > conf.d/default.conf << EOF +server { + listen 80; + server_name localhost; + + # Main website + location / { + root /var/www/html; + index index.html index.htm; + try_files \$uri \$uri/ =404; + } + + # Strfry Nostr relay proxy + location /strfry { + rewrite ^/strfry(.*) \$1 break; + proxy_pass http://strfry:7777; + proxy_http_version 1.1; + proxy_set_header Upgrade \$http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host \$host; + proxy_set_header X-Real-IP \$remote_addr; + proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto \$scheme; + proxy_cache_bypass \$http_upgrade; + proxy_read_timeout 86400; + } + + # Blossom blob storage proxy + location /blossom { + rewrite ^/blossom(.*) \$1 break; + proxy_pass http://blossom:3000; + proxy_http_version 1.1; + proxy_set_header Upgrade \$http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host \$host; + proxy_set_header X-Real-IP \$remote_addr; + proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto \$scheme; + proxy_cache_bypass \$http_upgrade; + client_max_body_size 100M; + } +} +EOF + +# Create strfry configuration +echo "Creating strfry configuration..." +cat > strfry/strfry.conf << EOF +## +## Default strfry config +## + +# Directory that contains the strfry LMDB database (restart required) +db = "./strfry-db/" + +dbParams { + # Maximum number of threads/processes that can simultaneously have LMDB transactions open (restart required) + maxreaders = 256 + + # Size of mmap() to use when loading LMDB (restart required) + mapsize = 512MB +} + +relay { + # Interface to listen on. Use 0.0.0.0 to listen on all interfaces (restart required) + bind = "0.0.0.0" + + # Port to open for the nostr websocket protocol (restart required) + port = 7777 + + # Set OS-limit on maximum number of open files/sockets (if 0, don't attempt to set) (restart required) + nofiles = 1000000 + + # HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case) + realIpHeader = "x-real-ip" + + info { + # NIP-11: Name of this server. Short/descriptive (< 30 characters) + name = "strfry default" + + # NIP-11: Detailed plain-text description of relay + description = "This is a strfry instance." + + # NIP-11: Administrative nostr pubkey, for contact purposes + pubkey = "" + + # NIP-11: Alternative administrative contact (email, website, etc) + contact = "" + } + + # Maximum accepted incoming websocket frame size (should be larger than max event and yesstr msg size) + maxWebsocketPayloadSize = 131072 + + # Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) + autoPingSeconds = 55 + + # If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy) + enableTcpKeepalive = false + + # How much uninterrupted CPU time a REQ query should get during its DB scan + queryTimesliceBudgetMicroseconds = 10000 + + # Maximum records that can be returned per filter + maxFilterLimit = 500 + + # Maximum number of subscriptions (concurrent REQs) a connection can have open at any time + maxSubsPerConnection = 20 + + writePolicy { + # If non-empty, path to an executable script that implements the writePolicy plugin logic + plugin = "" + } + + compression { + # Use permessage-deflate compression if supported by client. Reduces bandwidth, but uses more CPU (restart required) + enabled = true + + # Maintain a sliding window buffer for each connection. Improves compression, but uses more memory (restart required) + slidingWindow = true + } + + logging { + # Dump all incoming messages + dumpInAll = false + + # Dump all incoming EVENT messages + dumpInEvents = false + + # Dump all incoming REQ/CLOSE messages + dumpInReqs = false + + # Log performance metrics for initial REQ database scans + dbScanPerf = false + } + + numThreads { + # Ingester threads: route incoming requests, validate events/sigs (restart required) + ingester = 3 + + # reqWorker threads: Handle initial DB scan for REQ queries (restart required) + reqWorker = 3 + + # reqMonitor threads: Handle filtering of new events (restart required) + reqMonitor = 3 + + # yesstr threads: Experimental yesstr protocol (restart required) + yesstr = 1 + } +} +EOF + +# Create blossom configuration +echo "Creating blossom configuration..." +cat > blossom/config.yml << EOF +# Blossom Server Configuration + +# Server settings +server: + port: 3000 + host: "0.0.0.0" + +# Storage settings +storage: + # Directory to store uploaded files + directory: "/app/data" + + # Maximum file size in bytes (100MB) + maxFileSize: 104857600 + + # Allowed file types (empty array allows all types) + allowedTypes: [] + + # Enable file deduplication + deduplicate: true + +# Authentication settings (optional) +auth: + # Require authentication for uploads + required: false + + # Admin public keys (if auth is enabled) + adminKeys: [] + +# Rate limiting +rateLimit: + # Enable rate limiting + enabled: true + + # Requests per minute per IP + requestsPerMinute: 100 + + # Upload requests per minute per IP + uploadsPerMinute: 10 + +# Logging +logging: + # Log level: debug, info, warn, error + level: "info" + + # Enable access logs + accessLogs: true + +# CORS settings +cors: + # Enable CORS + enabled: true + + # Allowed origins (* for all) + origins: ["*"] + + # Allowed methods + methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"] + + # Allowed headers + headers: ["Content-Type", "Authorization"] + +# Cleanup settings +cleanup: + # Enable automatic cleanup of old files + enabled: false + + # Maximum age of files in days + maxAge: 30 + + # Cleanup interval in hours + interval: 24 +EOF + +# Create sample HTML content +echo "Creating sample HTML content..." +cat > WWW/index.html << EOF + + + + Nostr Services - Docker Setup + + + +
+

Nostr Services - Docker Setup

+

Your Nostr infrastructure is running successfully!

+ +
+

πŸ”— Strfry Nostr Relay

+

Nostr relay for storing and retrieving events

+

Endpoint: ws://localhost/strfry

+
+ +
+

🌸 Blossom Blob Storage

+

Decentralized blob storage for media files

+

Endpoint: http://localhost/blossom

+
+ +
+

Services are proxied through Nginx and running in Docker containers

+
+
+ + +EOF + +# Start services using Docker Compose +echo "Starting Docker services..." +sudo docker-compose up -d + +# Go back to original directory +cd .. + +# Show running containers +echo "Docker containers status:" +sudo docker ps + +echo "" +echo "Installation and setup completed!" +echo "" +echo "Docker directory structure created with:" +echo "- Strfry Nostr relay configuration and data directory" +echo "- Blossom blob storage configuration and data directory" +echo "- Nginx reverse proxy configuration" +echo "- Sample website content" +echo "" +echo "Services are now running and accessible at:" +echo "- Main site: http://localhost" +echo "- Strfry relay: ws://localhost/strfry" +echo "- Blossom storage: http://localhost/blossom" +echo "- External IP: http://$(hostname -I | awk '{print $1}')" +echo "" +echo "Docker management commands (run from Docker/ directory):" +echo "- Stop services: cd Docker && sudo docker-compose down" +echo "- View logs: cd Docker && sudo docker-compose logs [service_name]" +echo "- Restart services: cd Docker && sudo docker-compose restart" +echo "- View status: sudo docker ps" +echo "" +echo "Note: You may need to logout and login again for docker group permissions to take effect." diff --git a/examples - Debian Live Manual.html b/examples - Debian Live Manual.html new file mode 100644 index 00000000..4fdd41e0 --- /dev/null +++ b/examples - Debian Live Manual.html @@ -0,0 +1,603 @@ + + + + + + examples - + Debian Live Manual + + + + + + + + + + + + + + + + + + + +
+ + +
+

+ Live manual +

+

+ Debian Live +

+
+
+ + + +
+ + +
+
+ + + + + + +
+ + <<Β previous + + + + toc + + + + nextΒ >> + + +
+
+

+ Debian Live Manual +

+
+

+ Examples +

+
+ +

+ 16. Examples +

+
+ +

+ This chapter covers example builds for specific use cases with live systems. If you are new to building your own live system images, we recommend you first look at the three tutorials in sequence, as each one teaches new techniques that will help you use and understand the remaining examples. +

+
+ +

+ 16.1 Using the examples +

+
+ +

+ To use these examples you need a system to build them on that meets the requirements listed in Requirements and has live-build installed as described in Installing live-build. +

+
+ +

+ Note that, for the sake of brevity, in these examples we do not specify a local mirror to use for the build. You can speed up downloads considerably if you use a local mirror. You may specify the options when you use lb config, as described in Distribution mirrors used at build time, or for more convenience, set the default for your build system in /etc/live/build.conf. Simply create this file and in it, set the corresponding LB_MIRROR_* variables to your preferred mirror. All other mirrors used in the build will be defaulted from these values. For example: +

+
+ +

+ LB_MIRROR_BOOTSTRAP="http://mirror/debian/"
+LB_MIRROR_CHROOT_SECURITY="http://mirror/debian-security/"
+LB_MIRROR_CHROOT_BACKPORTS="http://mirror/debian-backports/"
+

+
+ +

+ 16.2 Tutorial 1: A default image +

+
+ +

+ Use case: Create a simple first image, learning the basics of live-build. +

+
+ +

+ In this tutorial, we will build a default ISO hybrid live system image containing only base packages (no Xorg) and some live system support packages, as a first exercise in using live-build. +

+
+ +

+ You can't get much simpler than this: +

+
+ +

+ $ mkdir tutorial1 ; cd tutorial1 ; lb config
+

+
+ +

+ Examine the contents of the config/ directory if you wish. You will see stored here a skeletal configuration, ready to customize or, in this case, use immediately to build a default image. +

+
+ +

+ Now, as superuser, build the image, saving a log as you build with tee. +

+
+ +

+ # lb build 2>&1 | tee build.log
+

+
+ +

+ Assuming all goes well, after a while, the current directory will contain live-image-amd64.hybrid.iso. This ISO hybrid image can be booted directly in a virtual machine as described in Testing an ISO image with Qemu and Testing an ISO image with VirtualBox, or else imaged onto optical media or a USB flash device as described in Burning an ISO image to a physical medium and Copying an ISO hybrid image to a USB stick, respectively. +

+
+ +

+ 16.3 Tutorial 2: A web browser utility +

+
+ +

+ Use case: Create a web browser utility image, learning how to apply customizations. +

+
+ +

+ In this tutorial, we will create an image suitable for use as a web browser utility, serving as an introduction to customizing live system images. +

+
+ +

+ $ mkdir tutorial2
+$ cd tutorial2
+$ lb config
+$ echo "task-lxde-desktop firefox-esr" >> config/package-lists/my.list.chroot
+

+
+ +

+ Our choice of LXDE for this example reflects our desire to provide a minimal desktop environment, since the focus of the image is the single use we have in mind, the web browser. We could go even further and provide a default configuration for the web browser in config/includes.chroot/etc/iceweasel/profile/, or additional support packages for viewing various kinds of web content, but we leave this as an exercise for the reader. +

+
+ +

+ Build the image, again as superuser, keeping a log as in Tutorial 1: +

+
+ +

+ # lb build 2>&1 | tee build.log
+

+
+ +

+ Again, verify the image is OK and test, as in Tutorial 1. +

+
+ +

+ 16.4 Tutorial 3: A personalized image +

+
+ +

+ Use case: Create a project to build a personalized image, containing your favourite software to take with you on a USB stick wherever you go, and evolving in successive revisions as your needs and preferences change. +

+
+ +

+ Since we will be changing our personalized image over a number of revisions, and we want to track those changes, trying things experimentally and possibly reverting them if things don't work out, we will keep our configuration in the popular git version control system. We will also use the best practice of autoconfiguration via auto scripts as described in Managing a configuration. +

+
+ +

+ 16.4.1 First revision +

+
+ +

+ $ mkdir -p tutorial3/auto
+$ cp /usr/share/doc/live-build/examples/auto/* tutorial3/auto/
+$ cd tutorial3
+

+
+ +

+ Edit auto/config to read as follows: +

+
+ +

+ #!/bin/sh

+lb config noauto \
+     --distribution stable \
+     "${@}"
+

+
+ +

+ Perform lb config to generate the config tree, using the auto/config script you just created: +

+
+ +

+ $ lb config
+

+
+ +

+ Now populate your local package list: +

+
+ +

+ $ echo "task-lxde-desktop spice-vdagent hexchat" >> config/package-lists/my.list.chroot
+

+
+ +

+ First, --distribution stable ensures that ⌠stable} is used instead of the default {testing⌑. Second, we have added spice-vdagent for easier testing the image in qemu. And finally, we have added an initial favourite package: hexchat. +

+
+ +

+ Now, build the image: +

+
+ +

+ # lb build
+

+
+ +

+ Note that unlike in the first two tutorials, we no longer have to type 2>&1 | tee build.log as that is now included in auto/build. +

+
+ +

+ Once you've tested the image (as in Tutorial 1) and are satisfied it works, it's time to initialize our git repository, adding only the auto scripts we just created, and then make the first commit: +

+
+ +

+ $ git init
+$ cp /usr/share/doc/live-build/examples/gitignore .gitignore
+$ git add .gitignore auto config
+$ git commit -m "Initial import."
+

+
+ +

+ 16.4.2 Second revision +

+
+ +

+ In this revision, we're going to clean up from the first build, replace the smplayer package with vlc package, rebuild, test and commit. +

+
+ +

+ The lb clean command will clean up all generated files from the previous build except for the cache, which saves having to re-download packages. This ensures that the subsequent lb build will re-run all stages to regenerate the files from our new configuration. +

+
+ +

+ # lb clean
+

+
+ +

+ Now install the vlc package before the lxde package chooses between smplayer, vlc and mplayer-gui in our local package list in config/package-lists/my.list.chroot: +

+
+ +

+ $ echo "vlc task-lxde-desktop spice-vdagent hexchat" >> config/package-lists/my.list.chroot
+

+
+ +

+ Build again: +

+
+ +

+ # lb build
+

+
+ +

+ Test, and when you're satisfied, commit the next revision: +

+
+ +

+ $ git commit -a -m "Replacing smplayer with vlc."
+

+
+ +

+ Of course, more complicated changes to the configuration are possible, perhaps adding files in subdirectories of config/. When you commit new revisions, just take care not to hand edit or commit the top-level files in config containing LB_* variables, as these are build products, too, and are always cleaned up by lb clean and re-created with lb config via their respective auto scripts. +

+
+ +

+ We've come to the end of our tutorial series. While many more kinds of customization are possible, even just using the few features explored in these simple examples, an almost infinite variety of different images can be created. The remaining examples in this section cover several other use cases drawn from the collected experiences of users of live systems. +

+
+ +

+ 16.5 A VNC Kiosk Client +

+
+ +

+ Use case: Create an image with live-build to boot directly to a VNC server. +

+
+ +

+ Make a build directory and create an skeletal configuration inside it, disabling recommends to make a minimal system. And then create two initial package lists: the first one generated with a script provided by live-build named Packages (see Generated package lists), and the second one including xorg, gdm3, metacity and xvnc4viewer. +

+
+ +

+ $ mkdir vnc-kiosk-client
+$ cd vnc-kiosk-client
+$ lb config --apt-recommends false
+$ echo '! Packages Priority standard' > config/package-lists/standard.list.chroot
+$ echo "xorg gdm3 metacity xtightvncviewer" > config/package-lists/my.list.chroot
+

+
+ +

+ As explained in Tweaking APT to save space you may need to re-add some recommended packages to make your image work properly. +

+
+ +

+ An easy way to list recommends is using apt-cache. For example: +

+
+ +

+ $ apt-cache depends live-config live-boot
+

+
+ +

+ In this example we found out that we had to re-include several packages recommended by live-config and live-boot: user-setup to make autologin work and sudo as an essential program to shutdown the system. Besides, it could be handy to add live-tools to be able to copy the image to RAM and eject to eventually eject the live medium. So: +

+
+ +

+ $ echo "live-tools user-setup sudo eject" > config/package-lists/recommends.list.chroot
+

+
+ +

+ After that, create the directory /etc/skel in config/includes.chroot and put a custom .xsession in it for the default user that will launch metacity and start xvncviewer, connecting to port 5901 on a server at 192.168.1.2: +

+
+ +

+ $ mkdir -p config/includes.chroot/etc/skel
+$ cat > config/includes.chroot/etc/skel/.xsession << EOF
+#!/bin/sh

+/usr/bin/metacity &
+/usr/bin/xvncviewer 192.168.1.2:1

+exit
+EOF
+

+
+ +

+ Build the image: +

+
+ +

+ # lb build
+

+
+ +

+ Enjoy. +

+
+ +

+ 16.6 A minimal image for a 512MB USB key +

+
+ +

+ Use case: Create a default image with some components removed in order to fit on a 512MB USB key with a little space left over to use as you see fit. +

+
+ +

+ When optimizing an image to fit a certain media size, you need to understand the tradeoffs you are making between size and functionality. In this example, we trim only so much as to make room for additional material within a 512MB media size, but without doing anything to destroy the integrity of the packages contained within, such as the purging of locale data via the localepurge package, or other such "intrusive" optimizations. Of particular note, we use --debootstrap-options to create a minimal system from scratch and --binary image hdd to create an image that can be copied to a USB key. +

+
+ +

+ $ lb config --binary-image hdd --apt-indices false --apt-recommends false --debootstrap-options "--variant=minbase" --firmware-chroot false --memtest none
+

+
+ +

+ To make the image work properly, we must re-add, at least, two recommended packages which are left out by the --apt-recommends false option. See Tweaking APT to save space +

+
+ +

+ $ echo "user-setup sudo" > config/package-lists/recommends.list.chroot
+

+
+ +

+ Additionally, you'll want to have network access, so another two recommended packages need to be re-added: +

+
+ +

+ $ echo "ifupdown isc-dhcp-client" >> config/package-lists/recommends.list.chroot
+

+
+ +

+ Now, build the image in the usual way: +

+
+ +

+ # lb build 2>&1 | tee build.log
+

+
+ +

+ On the author's system at the time of writing this, the above configuration produced a 298MiB image. This compares favourably with the 380MiB image produced by the default configuration in Tutorial 1, when --binary-image hdd is added. +

+
+ +

+ Leaving off APT's indices with --apt-indices false saves a fair amount of space, the tradeoff being that you need to do an apt-get update before using apt in the live system. Dropping recommended packages with --apt-recommends false saves some additional space, at the expense of omitting some packages you might otherwise expect to be there. --debootstrap-options "--variant=minbase" bootstraps a minimal system from the start. Not automatically including firmware packages with --firmware-chroot false saves some space too. And finally, --memtest none prevents the installation of a memory tester. +

+
+ +

+ Note: A minimal system can also be achieved using hooks, like for example the stripped.hook.chroot hook found in /usr/share/doc/live-build/examples/hooks. It may shave off additional small amounts of space and produce an image of 277MiB. However, it does so by removal of documentation and other files from packages installed on the system. This violates the integrity of those packages and that, as the comment header warns, may have unforeseen consequences. That is why using a minimal debootstrap is the recommended way of achieving this goal. +

+
+ +

+ 16.7 A localized GNOME desktop and installer +

+
+ +

+ Use case: Create a GNOME desktop image, localized for Switzerland and including an installer. +

+
+ +

+ We want to make an iso-hybrid image using our preferred desktop, in this case GNOME, containing all of the same packages that would be installed by the standard Debian installer for GNOME. +

+
+ +

+ Our initial problem is the discovery of the names of the appropriate language tasks. Currently, live-build cannot help with this. While we might get lucky and find this by trial-and-error, there is a tool, grep-dctrl, which can be used to dig it out of the task descriptions in tasksel-data, so to prepare, make sure you have both of those things: +

+
+ +

+ # apt-get install dctrl-tools tasksel-data
+

+
+ +

+ Now we can search for the appropriate tasks, first with: +

+
+ +

+ $ grep-dctrl -FTest-lang de /usr/share/tasksel/descs/debian-tasks.desc -sTask
+Task: german
+

+
+ +

+ By this command, we discover the task is called, plainly enough, german. Now to find the related tasks: +

+
+ +

+ $ grep-dctrl -FEnhances german /usr/share/tasksel/descs/debian-tasks.desc -sTask
+Task: german-desktop
+Task: german-kde-desktop
+

+
+ +

+ At boot time we will generate the de_CH.UTF-8 locale and select the ch keyboard layout. Now let's put the pieces together. Recalling from Using metapackages that task metapackages are prefixed task-, we just specify these language boot parameters, then add standard priority packages and all our discovered task metapackages to our package list as follows: +

+
+ +

+ $ mkdir live-gnome-ch
+$ cd live-gnome-ch
+$ lb config \
+     --bootappend-live "boot=live components locales=de_CH.UTF-8 keyboard-layouts=ch" \
+     --debian-installer live
+$ echo '! Packages Priority standard' > config/package-lists/standard.list.chroot
+$ echo task-gnome-desktop task-german task-german-desktop >> config/package-lists/desktop.list.chroot
+$ echo debian-installer-launcher >> config/package-lists/installer.list.chroot
+

+
+ +

+ Note that we have included the debian-installer-launcher package to launch the installer from the live desktop. +

+

+ + + +
+ + + +
+ + +
+
+ + + + + + +
+ + <<Β previous + + + + toc + + + + nextΒ >> + + +
+
+ +
+ + + +
+ \ No newline at end of file diff --git a/examples - Debian Live Manual_files/arrow_next_red.png b/examples - Debian Live Manual_files/arrow_next_red.png new file mode 100644 index 00000000..bc9a98f0 Binary files /dev/null and b/examples - Debian Live Manual_files/arrow_next_red.png differ diff --git a/examples - Debian Live Manual_files/arrow_prev_red.png b/examples - Debian Live Manual_files/arrow_prev_red.png new file mode 100644 index 00000000..9ee70c7a Binary files /dev/null and b/examples - Debian Live Manual_files/arrow_prev_red.png differ diff --git a/examples - Debian Live Manual_files/arrow_up_red.png b/examples - Debian Live Manual_files/arrow_up_red.png new file mode 100644 index 00000000..2168f726 Binary files /dev/null and b/examples - Debian Live Manual_files/arrow_up_red.png differ diff --git a/examples - Debian Live Manual_files/html.css b/examples - Debian Live Manual_files/html.css new file mode 100644 index 00000000..fdc0a5a7 --- /dev/null +++ b/examples - Debian Live Manual_files/html.css @@ -0,0 +1,1344 @@ +/* SiSU css default stylesheet */ + body { + color: black; + background: #ffffff; + background-color: #ffffff; + } +/* + table { + margin-left: 5%; + display: block; + } + tr { + display: block; + } + th,td { + display: inline; + vertical-align: top; + } +*/ + a:link { + color: #003399; + text-decoration: none; + } + a:visited { + color: #003399; + text-decoration: none; + } + a:hover { + color: #000000; + background-color: #f9f9aa; + } + a:hover img { + background-color: #ffffff; + } + a:active { + color: #003399; + text-decoration: underline; + } + a.lnkocn:link { + color: #777777; + text-decoration: none; + } + a.lnkocn:visited { + color: #555555; + text-decoration: none; + } + div { + margin-left: 0; + margin-right: 0; + } + div.p { + margin-left: 5%; + margin-right: 1%; + } + + #top_band { + position: absolute; + top: 0; + bottom: 80px; + width: 100%; + } + #top_band_search { + position: absolute; + top: 0px; + right: 0px; + margin-left: 75%; + width: 20%; + } + #column_left { + position: absolute; + top: 80px; + left: 0; + margin-left: 1%; + width: 20%; + } + #column_center { + position: absolute; + top: 80px; + margin-left: 20%; + width: 55%; + } + #column_right { + position: absolute; + top: 80px; + right: 0px; + margin-left: 75%; + width: 25%; + } + #pane_major { + position: absolute; + top: 0px; + left: 0; + margin-left: 0; + width: 80%; + } + #pane_minor { + position: absolute; + top: 0px; + right: 0px; + margin-left: 75%; + width: 20%; + background-color: #aaaaaa; + } + + .norm, .bold, .verse, .group, .block, .alt { + line-height: 133%; + margin-left: 0em; + margin-right: 2em; + margin-top: 12px; + margin-bottom: 0px; + padding-left: 0em; + text-indent: 0em; + } + p, h0, h1, h2, h3, h4, h5, h6, h7 { + display: block; + font-family: verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; + font-size: 100%; + font-weight: normal; + line-height: 133%; + text-align: justify; + margin-left: 0em; + margin-right: 2em; + text-indent: 0mm; + margin-top: 0.8em; + margin-bottom: 0.8em; + } + + /* indent */ + + p.norm { } + p.i1 {padding-left: 1em;} + p.i2 {padding-left: 2em;} + p.i3 {padding-left: 3em;} + p.i4 {padding-left: 4em;} + p.i5 {padding-left: 5em;} + p.i6 {padding-left: 6em;} + p.i7 {padding-left: 7em;} + p.i8 {padding-left: 8em;} + p.i9 {padding-left: 9em;} + + /* hanging indent */ + + p.h0i0 { + padding-left: 0em; + text-indent: 0em; + } + p.h0i1 { + padding-left: 1em; + text-indent: -1em; + } + p.h0i2 { + padding-left: 2em; + text-indent: -2em; + } + p.h0i3 { + padding-left: 3em; + text-indent: -3em; + } + p.h0i4 { + padding-left: 4em; + text-indent: -4em; + } + p.h0i5 { + padding-left: 5em; + text-indent: -5em; + } + p.h0i6 { + padding-left: 6em; + text-indent: -6em; + } + p.h0i7 { + padding-left: 7em; + text-indent: -7em; + } + p.h0i8 { + padding-left: 8em; + text-indent: -8em; + } + p.h0i9 { + padding-left: 9em; + text-indent: -9em; + } + + p.h1i0 { + padding-left: 0em; + text-indent: 1em; + } + p.h1i1 { + padding-left: 1em; + text-indent: 0em; + } + p.h1i2 { + padding-left: 2em; + text-indent: -1em; + } + p.h1i3 { + padding-left: 3em; + text-indent: -2em; + } + p.h1i4 { + padding-left: 4em; + text-indent: -3em; + } + p.h1i5 { + padding-left: 5em; + text-indent: -4em; + } + p.h1i6 { + padding-left: 6em; + text-indent: -5em; + } + p.h1i7 { + padding-left: 7em; + text-indent: -6em; + } + p.h1i8 { + padding-left: 8em; + text-indent: -7em; + } + p.h1i9 { + padding-left: 9em; + text-indent: -8em; + } + + p.h2i0 { + padding-left: 0em; + text-indent: 2em; + } + p.h2i1 { + padding-left: 1em; + text-indent: 1em; + } + p.h2i2 { + padding-left: 2em; + text-indent: 0em; + } + p.h2i3 { + padding-left: 3em; + text-indent: -1em; + } + p.h2i4 { + padding-left: 4em; + text-indent: -2em; + } + p.h2i5 { + padding-left: 5em; + text-indent: -3em; + } + p.h2i6 { + padding-left: 6em; + text-indent: -4em; + } + p.h2i7 { + padding-left: 7em; + text-indent: -5em; + } + p.h2i8 { + padding-left: 8em; + text-indent: -6em; + } + p.h2i9 { + padding-left: 9em; + text-indent: -7em; + } + + p.h3i0 { + padding-left: 0em; + text-indent: 3em; + } + p.h3i1 { + padding-left: 1em; + text-indent: 2em; + } + p.h3i2 { + padding-left: 2em; + text-indent: 1em; + } + p.h3i3 { + padding-left: 3em; + text-indent: 0em; + } + p.h3i4 { + padding-left: 4em; + text-indent: -1em; + } + p.h3i5 { + padding-left: 5em; + text-indent: -2em; + } + p.h3i6 { + padding-left: 6em; + text-indent: -3em; + } + p.h3i7 { + padding-left: 7em; + text-indent: -4em; + } + p.h3i8 { + padding-left: 8em; + text-indent: -5em; + } + p.h3i9 { + padding-left: 9em; + text-indent: -6em; + } + + p.h4i0 { + padding-left: 0em; + text-indent: 4em; + } + p.h4i1 { + padding-left: 1em; + text-indent: 3em; + } + p.h4i2 { + padding-left: 2em; + text-indent: 2em; + } + p.h4i3 { + padding-left: 3em; + text-indent: 1em; + } + p.h4i4 { + padding-left: 4em; + text-indent: 0em; + } + p.h4i5 { + padding-left: 5em; + text-indent: -1em; + } + p.h4i6 { + padding-left: 6em; + text-indent: -2em; + } + p.h4i7 { + padding-left: 7em; + text-indent: -3em; + } + p.h4i8 { + padding-left: 8em; + text-indent: -4em; + } + p.h4i9 { + padding-left: 9em; + text-indent: -5em; + } + + p.h5i0 { + padding-left: 0em; + text-indent: 5em; + } + p.h5i1 { + padding-left: 1em; + text-indent: 4em; + } + p.h5i2 { + padding-left: 2em; + text-indent: 3em; + } + p.h5i3 { + padding-left: 3em; + text-indent: 2em; + } + p.h5i4 { + padding-left: 4em; + text-indent: 1em; + } + p.h5i5 { + padding-left: 5em; + text-indent: 0em; + } + p.h5i6 { + padding-left: 6em; + text-indent: -1em; + } + p.h5i7 { + padding-left: 7em; + text-indent: -2em; + } + p.h5i8 { + padding-left: 8em; + text-indent: -3em; + } + p.h5i9 { + padding-left: 9em; + text-indent: -4em; + } + + p.h6i0 { + padding-left: 0em; + text-indent: 6em; + } + p.h6i1 { + padding-left: 1em; + text-indent: 5em; + } + p.h6i2 { + padding-left: 2em; + text-indent: 4em; + } + p.h6i3 { + padding-left: 3em; + text-indent: 3em; + } + p.h6i4 { + padding-left: 4em; + text-indent: 2em; + } + p.h6i5 { + padding-left: 5em; + text-indent: 1em; + } + p.h6i6 { + padding-left: 6em; + text-indent: 0em; + } + p.h6i7 { + padding-left: 7em; + text-indent: -1em; + } + p.h6i8 { + padding-left: 8em; + text-indent: -2em; + } + p.h6i9 { + padding-left: 9em; + text-indent: -3em; + } + + p.h7i0 { + padding-left: 0em; + text-indent: 7em; + } + p.h7i1 { + padding-left: 1em; + text-indent: 6em; + } + p.h7i2 { + padding-left: 2em; + text-indent: 5em; + } + p.h7i3 { + padding-left: 3em; + text-indent: 4em; + } + p.h7i4 { + padding-left: 4em; + text-indent: 3em; + } + p.h7i5 { + padding-left: 5em; + text-indent: 2em; + } + p.h7i6 { + padding-left: 6em; + text-indent: 1em; + } + p.h7i7 { + padding-left: 7em; + text-indent: 0em; + } + p.h7i8 { + padding-left: 8em; + text-indent: -1em; + } + p.h7i9 { + padding-left: 9em; + text-indent: -2em; + } + + p.h8i0 { + padding-left: 0em; + text-indent: 8em; + } + p.h8i1 { + padding-left: 1em; + text-indent: 7em; + } + p.h8i2 { + padding-left: 2em; + text-indent: 6em; + } + p.h8i3 { + padding-left: 3em; + text-indent: 5em; + } + p.h8i4 { + padding-left: 4em; + text-indent: 4em; + } + p.h8i5 { + padding-left: 5em; + text-indent: 3em; + } + p.h8i6 { + padding-left: 6em; + text-indent: 2em; + } + p.h8i7 { + padding-left: 7em; + text-indent: 1em; + } + p.h8i8 { + padding-left: 8em; + text-indent: 0em; + } + p.h8i9 { + padding-left: 9em; + text-indent: -1em; + } + + p.h9i0 { + padding-left: 0em; + text-indent: 9em; + } + p.h9i1 { + padding-left: 1em; + text-indent: 8em; + } + p.h9i2 { + padding-left: 2em; + text-indent: 7em; + } + p.h9i3 { + padding-left: 3em; + text-indent: 6em; + } + p.h9i4 { + padding-left: 4em; + text-indent: 5em; + } + p.h9i5 { + padding-left: 5em; + text-indent: 4em; + } + p.h9i6 { + padding-left: 6em; + text-indent: 3em; + } + p.h9i7 { + padding-left: 7em; + text-indent: 2em; + } + p.h9i8 { + padding-left: 8em; + text-indent: 1em; + } + p.h9i9 { + padding-left: 9em; + text-indent: 0em; + } + + p.it0 { + margin-left: 0em; + margin-top: 6px; + margin-bottom: 0px; + line-height: 100%; + } + p.it1 { + margin-left: 1em; + margin-top: 0px; + margin-bottom: 0px; + line-height: 100%; + } + p.it2 { + margin-left: 2em; + margin-top: 0px; + margin-bottom: 0px; + line-height: 100%; + } + p.it3 { + margin-left: 3em; + margin-top: 0px; + margin-bottom: 0px; + line-height: 100%; + } + p.it4 { + margin-left: 4em; + margin-top: 0px; + margin-bottom: 0px; + line-height: 100%; + } + p.it5 { + margin-left: 5em; + margin-top: 0px; + margin-bottom: 0px; + line-height: 100%; + } + p.it6 { + margin-left: 6em; + margin-top: 0px; + margin-bottom: 0px; + line-height: 100%; + } + p.it7 { + margin-left: 7em; + margin-top: 0px; + margin-bottom: 0px; + line-height: 100%; + } + p.it8 { + margin-left: 8em; + margin-top: 0px; + margin-bottom: 0px; + line-height: 100%; + } + p.it9 { + margin-left: 9em; + margin-bottom: 0px; + margin-top: 0px; + line-height: 100%; + } + + p.block { } + + p.group { } + + p.alt { } + + p.verse { + margin-bottom: 6px; + } + + p.code { + font-family: inconsolata, andale mono, courier new, courier, monospace; + font-size: 90%; + text-align: left; + background-color: #eeeeee; + } + + p.caption { + text-align: left; + font-size: 80%; + display: inline; + } + + p.endnote { + font-size: 96%; + line-height: 120%; + text-align: left; + margin-right: 15mm; + } + p.endnote_indent { + font-size: 96%; + line-height: 120%; + text-align: left; + margin-left: 2em; + margin-right: 15mm; + } + + p.center { + text-align: center; + } + p.bold { + font-weight: bold; + } + p.bold_left { + font-weight: bold; + text-align: left; + } + p.centerbold { + text-align: center; + font-weight: bold; + } + p.em { + font-weight: bold; + font-style: normal; + background: #fff3b6; + } + + p.small { + font-size: 80%; + margin-top: 0px; + margin-bottom: 0px; + margin-right: 6px; + text-align: left; + } + + .tiny, .tiny_left, .tiny_right, .tiny_center { + font-size: 10px; + margin-top: 0px; + margin-bottom: 0px; + color: #777777; + margin-right: 6px; + text-align: left; + } + p.tiny { } + p.tiny_left { + margin-left: 0px; + margin-right: 0px; + text-align: left; + } + p.tiny_right { + margin-right: 1em; + text-align: right; + } + p.tiny_center { + margin-left: 0px; + margin-right: 0px; + text-align: center; + } + + p.pane, p.pane_title, p.pane_blurb, p.pane_link, p.pane_indent { + font-size: 80%; + margin-top: 0px; + margin-bottom: 0px; + margin-left: 2mm; + margin-right: 4px; + text-align: left; + } + p.pane { } + p.pane_title { + font-weight: bold; + margin-bottom: 0px; + } + p.pane_blurb { + font-size: 10px; + margin-bottom: 0px; + } + p.pane_link { + font-size: 10px; + margin-bottom: 0px; + margin-left: 4mm; + } + p.pane_indent { + font-size: 10px; + margin-bottom: 0px; + margin-left: 4mm; + } + + p.concordance_word { + line-height: 150%; + font-weight: bold; + display: inline; + margin-top: 4px; + margin-bottom: 1px; + } + p.concordance_count { + font-size: 80%; + color: #777777; + display: inline; + margin-left: 0em; + } + p.concordance_object { + font-size: 80%; + line-height: 120%; + text-align: left; + margin-left: 3em; + margin-top: 1px; + margin-bottom: 3px; + } + p.book_index_lev1 { + line-height: 100%; + margin-top: 4px; + margin-bottom: 1px; + } + p.book_index_lev2 { + line-height: 100%; + text-align: left; + margin-left: 3em; + margin-top: 1px; + margin-bottom: 3px; + } + + p.quickref { + font-size: 10px; + font-style: italic; + margin-top: 0px; + margin-bottom: 0px; + color: #777777; + margin-right: 5px; + text-align: left; + } + p.bigref { + font-size: 11px; + font-weight: bold; + margin-top: 0px; + margin-bottom: 0px; + color: #777777; + margin-right: 5px; + text-align: center; + } + + p.letter { + font-weight: bold; + font-size: 80%; + margin-left: 0em; + margin-top: 2px; + margin-bottom: 2px; + margin-right: 6px; + text-align: left; + color: white; + background: #880000; + } + + tt { + font-family: inconsolata, andale mono, courier new, courier, monospace; + background-color: #eeeeee; + } + + label.ocn { + width: 2%; + float: right; + top: 0; + font-size: 10px; + margin-top: 0px; + margin-bottom: 5px; + color: #777777; + margin-right: 5px; + text-align: right; + background-color: #ffffff; + } + + table { } + tr { } + th,td { + vertical-align: top; + text-align: left; + } + th { + font-weight: bold; + } + + p.left,th.left,td.left { + text-align: left; + } + p.small_left,th.small_left,td.small_left { + text-align: left; + font-size: 80%; + } + p.right,th.right,td.right { + text-align: right; + } + + #horizontal_links { + background: #eeeeee; + margin-left: 5%; + margin-right: 5%; + } + #horizontal { + margin: 0; + padding: 0 0 0 10px; + border-top: 1px solid #000077; + border-bottom: 1px solid #000077; + } + #horizontal li { + margin: 0 0 0 0; + padding: 0 16px 0 0; + display: inline; + list-style-type: none; + text-align: left; + background: none; + } + #horizontal a { + line-height: 12px; + margin: 0 0 0 0; + text-decoration: none; + color: #000077; + } + #horizontal a.active, #horizontal a:hover { + border-bottom: 2px solid #777777; + padding-bottom: 2px; + color: #000077; + } + #horizontal a:hover { + color: #000077; + } + + #document_versions { + position: absolute; + top: 10mm; + right: 2%; + width: 12%; + float: right; + } + + #vertical_links { + position: absolute; + top: 10mm; + right: 0px; + width: 20%; + background: #dddddd; + float: right; + } + #vertical { + padding: 0 12px 0px 0px; + margin-left: 2%; + margin-right: 2%; + } + #vertical li { + display: block; + list-style-type: none; + } + #vertical a { + line-height: 12px; + text-decoration: none; + color: #000077; + } + #vertical a.active, #vertical a:hover { + border-bottom: 2px solid #777777; + padding-bottom: 2px; + color: #000077; + } + + ul, li { + list-style-type: none; + list-style: none; + padding-left: 20px; + display: block; + font-family: verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; + font-weight: normal; + line-height: 150%; + text-align: left; + text-indent: 0mm; + margin-left: 1em; + margin-right: 2em; + margin-top: 3px; + margin-bottom: 3px; + } + + li { + background: url(../image_sys/bullet_09.png) no-repeat 0px 6px; + } + + ul { + } + li.bullet { margin-left: 1em; } + li.i1 { margin-left: 2em; } + li.i2 { margin-left: 3em; } + li.i3 { margin-left: 4em; } + li.i4 { margin-left: 5em; } + li.i5 { margin-left: 6em; } + li.i6 { margin-left: 7em; } + li.i7 { margin-left: 8em; } + li.i8 { margin-left: 9em; } + li.i9 { margin-left: 10em; } + + li.doc, li.ref, li.refcenter { + margin-top: 0px; + margin-bottom: 0px; + margin-right: 0px; + font-size: 8px; + font-style: normal; + text-align: left; + } + li.doc { + background: url(../image_sys/bullet_09.png) no-repeat 0px 6px; + padding-left: 16px; + margin-left: 10px; + margin-right: 0px; + } + li.ref { + background: none; + padding-left: 0; + margin-left: 0; + color: #777777; + } + li.refcenter { + background: url(../image_sys/bullet_09.png) no-repeat 0px 6px; + padding-left: 20px; + margin-left: 10%; + font-size: 9px; + color: #777777; + text-align: center; + } + li.refbold { + list-style-type: none; + padding-left: 16px; + margin-left: 0; + margin-right: 10mm; + font-weight: bold; + } + + h0, h1, h2, h3, h4, h5, h6, h7 { + font-weight: bold; + line-height: 120%; + text-align: left; + margin-top: 20px; + margin-bottom: 10px; + } + h4.norm, h5.norm, h6.norm, h7.norm { + margin-top: 10px; + margin-bottom: 0px; + } + h1.center, h2.center, h3.center, h4.center, h5.center, h6.center, h7.center { + text-align: center; + } + h0 { font-size: 125%; } + h1 { font-size: 120%; } + h2 { font-size: 115%; } + h3 { font-size: 110%; } + h4 { font-size: 105%; } + h5 { font-size: 100%; } + h6 { font-size: 100%; } + h7 { font-size: 100%; } + + h1.i {margin-left: 2em;} + h2.i {margin-left: 3em;} + h3.i {margin-left: 4em;} + h4.i {margin-left: 5em;} + h5.i {margin-left: 6em;} + h6.i {margin-left: 7em;} + h7.i {margin-left: 8em;} + h8.i {margin-left: 9em;} + h9.i {margin-left: 10em;} + h1.top_band { + display: inline; + text-align: left; + margin-top: 0; + margin-left: 4mm; + text-indent: 0mm; + font-weight: bold; + font-size: 120%; + } + h2.top_band_tiny { + font-size: 10px; + font-weight: normal; + margin-top: 0px; + margin-left: 4mm; + text-indent: 0mm; + margin-bottom: 0px; + color: #777777; + margin-left: 140px; + margin-right: 0px; + text-align: left; + } + + p.top_band { + display: inline; + text-align: left; + margin-top: 0; + margin-left: 140px; + text-indent: 0mm; + font-weight: bold; + font-size: 120%; + } + p.top_band_tiny { + font-size: 10px; + margin-top: 0px; + margin-bottom: 0px; + color: #777777; + margin-left: 140px; + margin-right: 0px; + text-align: left; + } + p.top_band_image { + float: left; + display: inline; + text-align: left; + margin-top: 0; + margin-left: 1mm; + text-indent: 0mm; + margin-right: 1mm; + } + + .banner, .subbanner { + font-weight: bold; + text-align: center; + margin-left: 10mm; + margin-right: 15mm; + margin-top: 20px; + margin-bottom: 10px; + } + + h1.banner { + font-size: 120%; + } + h1.subbanner { + font-size: 115%; + } + h2.banner { + font-size: 110%; + } + h3.banner { + color: #990000; + font-size: 105%; + } + h4.banner { + color: #ff0000; + font-size: 100%; + } + h5.banner { + } + h6.banner { + } + h7.banner { + } + + .toc { + font-weight: normal; + margin-top: 6px; + margin-bottom: 6px; + } + h1.toc { + margin-left: 1em; + font-size: 115%; + line-height: 150%; + } + h2.toc { + margin-left: 2em; + font-size: 110%; + line-height: 140%; + } + h3.toc { + margin-left: 3em; + font-size: 105%; + line-height: 120%; + } + h4.toc { + margin-left: 4em; + font-size: 100%; + line-height: 120%; + } + h5.toc { + margin-left: 5em; + font-size: 95%; + line-height: 110%; + } + h6.toc { + margin-left: 6em; + font-size: 90%; + line-height: 110%; + } + h7.toc { + margin-left: 7em; + font-size: 85%; + line-height: 100%; + } + + .microtoc { + margin-top: 2px; + margin-bottom: 2px; + } + + h1.microtoc { + margin-left: 0mm; + font-size: 115%; + } + h2.microtoc { + margin-left: 5mm; + font-size: 110%; + } + h3.microtoc { + margin-left: 10mm; + font-size: 105%; + } + h4.microtoc { + margin-left: 15mm; + font-weight: normal; + font-size: 100%; + } + h5.microtoc { + margin-left: 20mm; + font-weight: normal; + font-size: 95%; + } + h6.microtoc { + margin-left: 25mm; + font-weight: normal; + font-size: 90%; + } + h7.microtoc { + margin-left: 30mm; + font-weight: normal; + font-size: 85%; + } + + .subtoc { + margin-right: 34%; + font-weight: normal; + } + h5.subtoc { + margin-left: 2em; + font-size: 80%; + margin-top: 2px; + margin-bottom: 2px; + } + h6.subtoc { + margin-left: 3em; + font-size: 75%; + margin-top: 0px; + margin-bottom: 0px; + } + h7.subtoc { + margin-left: 4em; + font-size: 70%; + margin-top: 0px; + margin-bottom: 0px; + } + + div.substance { + width: 100%; + background-color: #ffffff; + } + div.ocn { + width: 5%; + float: right; + top: 0; + background-color: #ffffff; + } + div.endnote { + width: 95%; + background-color: #fffffff; + } + div.toc { + position: absolute; + float: left; + margin: 0; + padding: 0; + padding-top: 0.5em; + border: 0; + width: 13em; + background-color: #eeeeee; + margin-right:1em; + } + div.summary { + margin: 0; + padding: 0; + border-left: 13em solid #eeeeee; + padding-left: 1em; + background-color: #eeeeee; + } + div.content, div.main_column { + margin: 0; + padding: 0; + border-left: 13em solid #ffffff; + padding-left: 1em; + padding-right: 1em; + } + div.content0, div.main_column0 { + margin: 0; + padding: 0; + border-left: 0% solid #ffffff; + padding-left: 5%; + } + div.scroll { + margin: 0; + padding: 0; + padding-left: 1em; + padding-right: 1em; + } + div.content:after { + content:' '; + clear:both; + display:block; + height:0; + overflow:hidden + } + div.footer { + clear:left; + padding: 0.5em; + font-size: 80%; + margin: 0; + } + div.toc ul { + list-style: none; + padding: 0; + margin: 0; + } + div.toc li ul a, li ul span.currentlink + { + font-weight: normal; + font-size: 90%; + padding-left: 2em; + background-color: #eeeeee; + } + div.toc a, span.currentlink{ + display:block; + text-decoration: none; + padding-left: 0.5em; + color: #0000aa; + } + hr { + width: 90%; + } + + span.currentlink { + text-decoration: none; + background-color: #aaaaf9; + } + + div.toc a:visited { + color: #0000aa; + } + div.toc a:hover { + color: #000000; + background-color: #f9f9aa; + } + + .minitoc { + font-weight: normal; + margin-top: 2px; + margin-bottom: 2px; + } + h1.minitoc, h2.minitoc, h3.minitoc { + margin-left: 0em; + font-weight: bold; + text-align: left; + font-size: 90%; + margin-top: 4px; + margin-bottom: 4px; + } + h4.minitoc { + margin-left: 0em; + font-size: 90%; + } + h5.minitoc { + margin-left: 1em; + font-size: 85%; + } + h6.minitoc { + margin-left: 2em; + font-size: 85%; + } + h7.minitoc { + margin-left: 3em; + font-size: 80%; + } + h0.minitoc { + margin-left: 0em; + font-size: 90%; + } + + h1.c, h2.c, h3.c, h4.c, h5.c, h6.c, h7.c, p.c { + text-align: center + } + h1.red, h2.red, h3.red, h4.red, h5.red, h6.red, h7.red { + text-align: center; + color: #ff0000; + margin-left: 5mm; + text-indent: 5mm; + margin-top: 30px; + margin-bottom: 20px; + margin-right: 15mm; + } + h1.ruby, h2.ruby, h3.ruby, h4.ruby, h5.ruby, h6.ruby, h7.ruby { + text-align: center; + color: #990000; + margin-left: 5mm; + text-indent: 5mm; + margin-top: 30px; + margin-bottom: 20px; + margin-right: 15mm; + } diff --git a/lb-wrapper.sh b/lb-wrapper.sh new file mode 100755 index 00000000..5e4efe73 --- /dev/null +++ b/lb-wrapper.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Live-build wrapper script +# This script allows you to run live-build commands from the local repository +# without needing to type the full path each time + +# Set the LIVE_BUILD environment variable to point to our local repository +export LIVE_BUILD="/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build" + +# Execute the lb command from our repository with all passed arguments +exec "${LIVE_BUILD}/frontend/lb" "$@" diff --git a/live-build b/live-build new file mode 160000 index 00000000..c2c3f779 --- /dev/null +++ b/live-build @@ -0,0 +1 @@ +Subproject commit c2c3f77929987c06946a210509a3231cd4df02ae diff --git a/n-os-tr.sh b/n-os-tr.sh new file mode 100755 index 00000000..04fde7ef --- /dev/null +++ b/n-os-tr.sh @@ -0,0 +1,700 @@ +#!/bin/bash + +# To download and execute +# curl -s https://corpum.com/root.sh | bash + +# To set up larger font on system +# dpkg-reconfigure console-setup + +echo ""; +echo " β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ "; +echo " β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ "; +echo " β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ "; +echo " β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ "; +echo " β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ "; +echo ""; + + +printf "\n\n +############################################################################# +# Setup System +############################################################################# +\n\n" + +sudo hostnamectl set-hostname nostr + +#CREATE MY DIRECTORIES +mkdir -p ~/Downloads +mkdir -p ~/Applications +mkdir -p ~/Pictures +mkdir -p ~/Music +mkdir -p ~/Temp +mkdir -p ~/Trash + +# ALIAI +############################################################################# +echo "alias ll='ls -l'" >> ~/.bashrc +echo "alias la='ls -a'" >> ~/.bashrc +echo "alias lla='ls -al'" >> ~/.bashrc +echo "alias l='ls -CF'" >> ~/.bashrc +echo "alias ss='gnome-screenshot -a'" >> ~/.bashrc +echo "alias untargz='tar -xzf'" >> ~/.bashrc + + +# (DE)COMPRESSION +############################################################################# +echo "alias un.tar.bz2='tar xvjf'" >> ~/.bashrc +echo "alias un.tar.gz='tar -xzf'" >> ~/.bashrc +echo "alias un.gz=gunzip" >> ~/.bashrc + + + +printf "\n\n +############################################################################# +# INSTALL GENERAL SOFTWARE BEFORE WE GO DARK ... +############################################################################# +\n\n" + +#UPDATE THE SYTEM +sudo add-apt-repository ppa:arduino-team/arduino-stable +sudo apt update -y; +# sudo apt upgrade -y; + +#GENERAL TOOLS +sudo apt install htop -y +sudo apt install ranger -y +sudo apt install sshfs -y +sudo apt install curl -y +sudo apt install vim -y +sudo apt install secure-delete -y +sudo apt install jq -y +sudo apt install wget -y +sudo apt install arduino -y +sudo apt install font-manager -y +sudo apt install moreutils -y; +#FUN +sudo apt install cmatrix -y + +printf "\n\n +############################################################################# +# BRAVE BROWSER +############################################################################# +\n\n" +sudo curl -fsS https://dl.brave.com/install.sh | sh + + +printf "\n + +############################################################################# +# CODIUM +############################################################################# + +\n +" +# Detect system architecture +ARCH=$(dpkg --print-architecture) + +# Get the latest release info and extract the appropriate .deb download URL +CODIUM_URL=$(curl -s https://api.github.com/repos/vscodium/vscodium/releases/latest \ + | grep "browser_download_url.*codium_.*_${ARCH}\.deb" \ + | grep -v "\.sha" \ + | cut -d'"' -f4) + +echo "Found VSCodium URL: $CODIUM_URL" + +# Check if URL was found +if [ -z "$CODIUM_URL" ]; then + echo "Error: Could not find VSCodium .deb download URL" + exit 1 +fi + +# Download the .deb file using curl +echo "Downloading VSCodium..." +curl -L -o "codium_${ARCH}.deb" "$CODIUM_URL" + +# Check if download was successful +if [ $? -ne 0 ]; then + echo "Error: Failed to download VSCodium" + exit 1 +fi + +# Install the .deb package +echo "Installing VSCodium..." +sudo apt update +sudo apt install -y "./codium_${ARCH}.deb" + +# Clean up the downloaded file +sudo rm "codium_${ARCH}.deb" + +echo "VSCodium installation completed!" + + + + +printf "\n\n +############################################################################# +# TIME TO GO DARK +############################################################################# +\n\n +############################################################################# +# INSTALL TOR +############################################################################# +\n\n" + + +# apt update; +sudo apt install -y tor; +sudo apt install -y apt-transport-tor; + +sudo sed -i 's/#ControlPort 9051/ControlPort 9051/' /etc/tor/torrc +sudo sed -i 's/#CookieAuthentication 1/CookieAuthentication 0/' /etc/tor/torrc +sudo /etc/init.d/tor restart + + +printf "\n\n****** Current IP******" +curl ifconfig.me + +printf "\n\n****** Tor IP ******" +# torify curl ifconfig.me 2>/dev/null +torify curl checkip.amazonaws.com + +echo "Press any key to continue..." +read -n 1 -s +printf "\n" + + +printf "\n\n +############################################################################# +# MULLVAD +############################################################################# +\n\n" + + +sudo torify curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc; +printf "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mullvad.list; + +sudo apt update; +sudo apt install mullvad-vpn; + +mullvad account login 6627506529903776; +mullvad lockdown-mode set on; +mullvad relay set location ch; +mullvad connect; + +while true; do + # Run the command + mullvad status; + + # Ask for confirmation to run it again + read -p "Run again? It may take a couple tries (y/n) " answer + + # Check the answer and break the loop if it's not "y" + case $answer in + y|Y) continue ;; + n|N) break ;; + *) echo "Invalid input. Please enter y or n." ;; + esac +done + +printf "\n\n +############################################################################# +# NAK - Nostr Army Knife +############################################################################# +\n\n" + +# Detect architecture for NAK +if [ "$ARCH" = "amd64" ]; then + NAK_ARCH="amd64" +elif [ "$ARCH" = "arm64" ]; then + NAK_ARCH="arm64" +else + NAK_ARCH="amd64" # fallback +fi + +NAK_URL=$(curl -s https://api.github.com/repos/fiatjaf/nak/releases/latest \ + | grep "browser_download_url" \ + | grep "linux-${NAK_ARCH}" \ + | cut -d'"' -f4) + +echo "Found NAK URL: $NAK_URL" +sudo curl -s -L $NAK_URL -o /usr/local/bin/nak +sudo chmod +x /usr/local/bin/nak +echo "NAK deployed. Thank you FiatJaf!" + + +printf "\n\n +############################################################################# +# DOCKER - NGINX - STRFRY - BLOSSOM +############################################################################# +\n\n" + +#!/bin/bash + +# Docker Compose Installation and Nginx Setup Script for Debian +set -e + +echo "Starting Docker Compose installation and Nginx setup..." + +# Install prerequisites +echo "Installing prerequisites..." +sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release + +# Add Docker's official GPG key +echo "Adding Docker's GPG key..." +curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg + +# Add Docker repository +echo "Adding Docker repository..." +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + +# Update package index again +echo "Updating package index with Docker repository..." +sudo apt update + +# Install Docker Engine +echo "Installing Docker Engine..." +sudo apt install -y docker-ce docker-ce-cli containerd.io + +# Start and enable Docker service +echo "Starting Docker service..." +sudo systemctl start docker +sudo systemctl enable docker + +# Add current user to docker group (optional, requires logout/login to take effect) +echo "Adding current user to docker group..." +sudo usermod -aG docker $USER + +# Install Docker Compose +echo "Installing Docker Compose..." +DOCKER_COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*?(?=")') +sudo curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose + +# Verify Docker Compose installation +echo "Verifying Docker Compose installation..." +docker-compose --version + +# Create Docker directory structure +echo "Creating Docker directory structure..." +mkdir -p Docker +cd Docker + +# Create subdirectories +mkdir -p strfry/data blossom/data conf.d WWW + +# Create docker-compose.yml +echo "Creating docker-compose.yml..." +cat > docker-compose.yml << EOF +version: '3.8' + +services: + nginx: + image: nginx + ports: + - "80:80" + - "443:443" + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf:ro + - ./conf.d:/etc/nginx/conf.d:ro + - ./WWW:/var/www/html:ro + - /etc/letsencrypt:/etc/letsencrypt:ro + restart: unless-stopped + networks: + - web + depends_on: + - strfry + - blossom + + strfry: + image: dockurr/strfry + container_name: strfry + ports: + - "7777:7777" # Internal port for nginx proxy + volumes: + - ./strfry/data:/app/strfry-db + - ./strfry/strfry.conf:/etc/strfry.conf + restart: always + stop_grace_period: 2m + networks: + - web + + blossom: + image: ghcr.io/hzrd149/blossom-server:master + container_name: blossom + ports: + - "3000:3000" # Internal port for nginx proxy + volumes: + - ./blossom/data:/app/data + - ./blossom/config.yml:/app/config.yml + restart: always + networks: + - web + +networks: + web: + driver: bridge + +EOF + +# Create nginx main configuration +echo "Creating nginx.conf..." +cat > nginx.conf << EOF +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '\$remote_addr - \$remote_user [\$time_local] "\$request" ' + '\$status \$body_bytes_sent "\$http_referer" ' + '"\$http_user_agent" "\$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + sendfile on; + keepalive_timeout 65; + + include /etc/nginx/conf.d/*.conf; +} +EOF + +# Create nginx site configuration +echo "Creating nginx site configuration..." +cat > conf.d/default.conf << EOF +server { + listen 80; + server_name localhost; + + # Main website + location / { + root /var/www/html; + index index.html index.htm; + try_files \$uri \$uri/ =404; + } + + # Strfry Nostr relay proxy + location /strfry { + rewrite ^/strfry(.*) \$1 break; + proxy_pass http://strfry:7777; + proxy_http_version 1.1; + proxy_set_header Upgrade \$http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host \$host; + proxy_set_header X-Real-IP \$remote_addr; + proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto \$scheme; + proxy_cache_bypass \$http_upgrade; + proxy_read_timeout 86400; + } + + # Blossom blob storage proxy + location /blossom { + rewrite ^/blossom(.*) \$1 break; + proxy_pass http://blossom:3000; + proxy_http_version 1.1; + proxy_set_header Upgrade \$http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host \$host; + proxy_set_header X-Real-IP \$remote_addr; + proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto \$scheme; + proxy_cache_bypass \$http_upgrade; + client_max_body_size 100M; + } +} +EOF + +# Create strfry configuration +echo "Creating strfry configuration..." +cat > strfry/strfry.conf << EOF +## +## Default strfry config +## + +# Directory that contains the strfry LMDB database (restart required) +db = "./strfry-db/" + +dbParams { + # Maximum number of threads/processes that can simultaneously have LMDB transactions open (restart required) + maxreaders = 256 + + # Size of mmap() to use when loading LMDB (restart required) + mapsize = 512MB +} + +relay { + # Interface to listen on. Use 0.0.0.0 to listen on all interfaces (restart required) + bind = "0.0.0.0" + + # Port to open for the nostr websocket protocol (restart required) + port = 7777 + + # Set OS-limit on maximum number of open files/sockets (if 0, don't attempt to set) (restart required) + nofiles = 1000000 + + # HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case) + realIpHeader = "x-real-ip" + + info { + # NIP-11: Name of this server. Short/descriptive (< 30 characters) + name = "strfry default" + + # NIP-11: Detailed plain-text description of relay + description = "This is a strfry instance." + + # NIP-11: Administrative nostr pubkey, for contact purposes + pubkey = "" + + # NIP-11: Alternative administrative contact (email, website, etc) + contact = "" + } + + # Maximum accepted incoming websocket frame size (should be larger than max event and yesstr msg size) + maxWebsocketPayloadSize = 131072 + + # Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) + autoPingSeconds = 55 + + # If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy) + enableTcpKeepalive = false + + # How much uninterrupted CPU time a REQ query should get during its DB scan + queryTimesliceBudgetMicroseconds = 10000 + + # Maximum records that can be returned per filter + maxFilterLimit = 500 + + # Maximum number of subscriptions (concurrent REQs) a connection can have open at any time + maxSubsPerConnection = 20 + + writePolicy { + # If non-empty, path to an executable script that implements the writePolicy plugin logic + plugin = "" + } + + compression { + # Use permessage-deflate compression if supported by client. Reduces bandwidth, but uses more CPU (restart required) + enabled = true + + # Maintain a sliding window buffer for each connection. Improves compression, but uses more memory (restart required) + slidingWindow = true + } + + logging { + # Dump all incoming messages + dumpInAll = false + + # Dump all incoming EVENT messages + dumpInEvents = false + + # Dump all incoming REQ/CLOSE messages + dumpInReqs = false + + # Log performance metrics for initial REQ database scans + dbScanPerf = false + } + + numThreads { + # Ingester threads: route incoming requests, validate events/sigs (restart required) + ingester = 3 + + # reqWorker threads: Handle initial DB scan for REQ queries (restart required) + reqWorker = 3 + + # reqMonitor threads: Handle filtering of new events (restart required) + reqMonitor = 3 + + # yesstr threads: Experimental yesstr protocol (restart required) + yesstr = 1 + } +} +EOF + +# Create blossom configuration +echo "Creating blossom configuration..." +cat > blossom/config.yml << EOF +# Blossom Server Configuration + +# Server settings +server: + port: 3000 + host: "0.0.0.0" + +# Storage settings +storage: + # Directory to store uploaded files + directory: "/app/data" + + # Maximum file size in bytes (100MB) + maxFileSize: 104857600 + + # Allowed file types (empty array allows all types) + allowedTypes: [] + + # Enable file deduplication + deduplicate: true + +# Authentication settings (optional) +auth: + # Require authentication for uploads + required: false + + # Admin public keys (if auth is enabled) + adminKeys: [] + +# Rate limiting +rateLimit: + # Enable rate limiting + enabled: true + + # Requests per minute per IP + requestsPerMinute: 100 + + # Upload requests per minute per IP + uploadsPerMinute: 10 + +# Logging +logging: + # Log level: debug, info, warn, error + level: "info" + + # Enable access logs + accessLogs: true + +# CORS settings +cors: + # Enable CORS + enabled: true + + # Allowed origins (* for all) + origins: ["*"] + + # Allowed methods + methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"] + + # Allowed headers + headers: ["Content-Type", "Authorization"] + +# Cleanup settings +cleanup: + # Enable automatic cleanup of old files + enabled: false + + # Maximum age of files in days + maxAge: 30 + + # Cleanup interval in hours + interval: 24 +EOF + +# Create sample HTML content +echo "Creating sample HTML content..." +cat > WWW/index.html << EOF + + + + Nostr Services - Docker Setup + + + +
+

Nostr Services - Docker Setup

+

Your Nostr infrastructure is running successfully!

+ +
+

πŸ”— Strfry Nostr Relay

+

Nostr relay for storing and retrieving events

+

Endpoint: ws://localhost/strfry

+
+ +
+

🌸 Blossom Blob Storage

+

Decentralized blob storage for media files

+

Endpoint: http://localhost/blossom

+
+ +
+

Services are proxied through Nginx and running in Docker containers

+
+
+ + +EOF + +# Start services using Docker Compose +echo "Starting Docker services..." +sudo docker-compose up -d + +# Go back to original directory +cd .. + +# Show running containers +echo "Docker containers status:" +sudo docker ps + +echo "" +echo "Installation and setup completed!" +echo "" +echo "Docker directory structure created with:" +echo "- Strfry Nostr relay configuration and data directory" +echo "- Blossom blob storage configuration and data directory" +echo "- Nginx reverse proxy configuration" +echo "- Sample website content" +echo "" +echo "Services are now running and accessible at:" +echo "- Main site: http://localhost" +echo "- Strfry relay: ws://localhost/strfry" +echo "- Blossom storage: http://localhost/blossom" +echo "- External IP: http://$(hostname -I | awk '{print $1}')" +echo "" +echo "Docker management commands (run from Docker/ directory):" +echo "- Stop services: cd Docker && sudo docker-compose down" +echo "- View logs: cd Docker && sudo docker-compose logs [service_name]" +echo "- Restart services: cd Docker && sudo docker-compose restart" +echo "- View status: sudo docker ps" +echo "" +echo "Note: You may need to logout and login again for docker group permissions to take effect." + + + + + + + + + + +printf "\n\n +############################################################################# +# CLEAR COMMAND LINE HISTORY +############################################################################# +\n\n" +history -c +# sudo -u root gnome-terminal --working-directory=/root & exit diff --git a/nak b/nak new file mode 100644 index 00000000..a9597074 Binary files /dev/null and b/nak differ diff --git a/nginx.sh b/nginx.sh new file mode 100644 index 00000000..920b3cde --- /dev/null +++ b/nginx.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +mkdir ~/Nginx; +ln -s /var/www/ ~/Nginx/www +ln -s /etc/nginx/nginx.conf ~/Nginx/nginx.conf +ln -s /etc/nginx/sites-available ~/Nginx/sites-available +ln -s /etc/nginx/sites-enabled ~/Nginx/sites-enabled + +mkdir ~/Strfry; diff --git a/root.sh b/root.sh new file mode 100755 index 00000000..7bf70964 --- /dev/null +++ b/root.sh @@ -0,0 +1,200 @@ +#!/bin/bash + +# To download and execute +# curl -s https://corpum.com/root.sh | bash + +# To set up larger font on system +# dpkg-reconfigure console-setup + + +#CHANGE HOSTNAME +#EDIT /etc/hostname +#EDIT /etc/hosts +# or +hostnamectl set-hostname nostr; + + +#CREATE MY DIRECTORIES +mkdir /root/Downloads; +mkdir /root/Applications; +mkdir /root/Temp; +mkdir /root/Trash; + + +#UPDATE THE SYTEM +apt update -y; +# apt upgrade -y; + +#GENERAL TOOLS +apt install htop -y +apt install ranger -y +apt install sshfs -y +apt install curl -y +apt install vim -y +apt install secure-delete -y +apt install jq -y +apt install wget -y +# apt-get install syncthing -y +add-apt-repository ppa:arduino-team/arduino-stable +apt update +apt install arduino -y +apt install font-manager -y +apt install -y docker.io +systemctl start docker +apt install moreutils -y; + +#NODE +# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash + +# nvm install node + + +#FUN +apt install cmatrix -y + +############################################################################# +# ALIAI +############################################################################# + +# BASIC COMMANDS +############################################################################# +echo "alias ll='ls -l'" >> ~/.bashrc +echo "alias la='ls -a'" >> ~/.bashrc +echo "alias lla='ls -al'" >> ~/.bashrc +echo "alias l='ls -CF'" >> ~/.bashrc +echo "alias ss='gnome-screenshot -a'" >> ~/.bashrc +echo "alias untargz='tar -xzf'" >> ~/.bashrc + + +# (DE)COMPRESSION +############################################################################# +echo "alias un.tar.bz2='tar xvjf'" >> ~/.bashrc +echo "alias un.tar.gz='tar -xzf'" >> ~/.bashrc +echo "alias un.gz=gunzip" >> ~/.bashrc + + +# FINAL +############################################################################# +echo "Run 'source .bashrc' to load aliai." + +# BACKGROUND COLOR +############################################################################# +gsettings set org.gnome.desktop.background picture-options 'none' +gsettings set org.gnome.desktop.background primary-color '#000000' + + + +printf " + +############################################################################# +# TOR +############################################################################# + +" +# apt update; +apt install -y tor; +apt install -y apt-transport-tor; + +sed -i 's/#ControlPort 9051/ControlPort 9051/' /etc/tor/torrc +sed -i 's/#CookieAuthentication 1/CookieAuthentication 0/' /etc/tor/torrc +/etc/init.d/tor restart + + +printf "\n\n****** Current IP******" +curl ifconfig.me + +printf "\n\n****** Tor IP ******" +# torify curl ifconfig.me 2>/dev/null +torify curl checkip.amazonaws.com + +echo "Press any key to continue..." +read -n 1 -s + + + + +printf "\n + + +############################################################################# +# MULLVAD +############################################################################# + + +\n +" +#torify wget http://o54hon2e2vj6c7m3aqqu6uyece65by3vgoxxhlqlsvkmacw6a7m7kiad.onion/en/download/app/deb/latest + +torify curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc; +printf "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mullvad.list; + +apt update; +apt install mullvad-vpn; + +mullvad account login 6627506529903776; +mullvad lockdown-mode set on; +mullvad relay set location ch; +mullvad connect; + +while true; do + # Run the command + mullvad status; + + # Ask for confirmation to run it again + read -p "Run again? (y/n) " answer + + # Check the answer and break the loop if it's not "y" + case $answer in + y|Y) continue ;; + n|N) break ;; + *) echo "Invalid input. Please enter y or n." ;; + esac +done + + + +# echo "Press any key to continue..." +# read -n 1 -s + + + +printf "\n + + +############################################################################# +# NOSTR +############################################################################# +" + +# Nostr Army Knife (NAK) +curl -L -o /usr/local/bin/nak https://github.com/fiatjaf/nak/releases/download/v0.11.3/nak-v0.11.3-linux-amd64 +chmod +x /usr/local/bin/nak + +# Stirfry Nostr Relay +# sudo apt install -y git g++ make libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev libsecp256k1-dev libzstd-dev +# cd /usr/local/bin +# git clone https://github.com/hoytech/strfry && cd strfry/ +# git submodule update --init +# make setup-golpe +# make -j4 + + + +# Nostr Alai +timestamp=$(date +%s); nak req -s $timestamp -k 1 --stream $nak_relays_read | jq -r '"\n\(.pubkey[-5:])\n \(.content)\n"' +echo "alias un.gz=gunzip" >> ~/.bashrc +alias nostr_all='timestamp=$(date +%s); nak req -s $timestamp -k 1 --stream $nak_relays_read | jq -r '\''"\n\(.pubkey[-5:])\n \(.content)\n"'\''' + +echo "alias nostr_all='timestamp=\$(date +%s); nak req -s \$timestamp -k 1 --stream \$nak_relays_read | jq -r '\''\"\n\(.pubkey[-5:])\n \(.content)\n\"'\''" >> ~/.bashrc + +# Nostr terminal +curl -L -o /usr/local/bin/nt https://corpum.com/nt +chmod +x /usr/local/bin/nt + +printf " +############################################################################# +# CLEAR COMMAND LINE HISTORY +############################################################################# +" +history -c + diff --git a/set_web_permissions.sh b/set_web_permissions.sh new file mode 100644 index 00000000..21ea5811 --- /dev/null +++ b/set_web_permissions.sh @@ -0,0 +1,281 @@ +#!/bin/bash + +# Web Directory Permission Setup Script +# Sets proper ownership and permissions for web directories + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +# Default web directory - current working directory +DEFAULT_DIR="$(pwd)" + +# Function to print colored output +print_status() { + echo -e "${BLUE}[INFO]${NC} $1" +} + +print_success() { + echo -e "${GREEN}[SUCCESS]${NC} $1" +} + +print_warning() { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +print_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +# Function to show usage +show_usage() { + echo "Usage: $0 [directory_path]" + echo " $0 -h|--help" + echo "" + echo "Sets proper permissions for web directories:" + echo " - Directories: 755 (rwxr-xr-x)" + echo " - Files: 644 (rw-r--r--)" + echo " - Ownership: www-data:www-data" + echo " - Sets group sticky bit on directories" + echo "" + echo "Arguments:" + echo " directory_path Path to web directory (default: current directory)" + echo " -h, --help Show this help message" + echo "" + echo "Examples:" + echo " $0 # Use current directory and all subdirectories" + echo " $0 /var/www/mysite # Use custom directory" + echo " $0 . # Explicitly use current directory" + echo " $0 .. # Use parent directory" +} + +# Function to check if user has sudo privileges +check_sudo() { + if ! sudo -n true 2>/dev/null; then + print_error "This script requires sudo privileges. Please run with sudo or ensure you have sudo access." + exit 1 + fi +} + +# Function to validate directory +validate_directory() { + local dir="$1" + + # Convert to absolute path + dir=$(realpath "$dir" 2>/dev/null) + + if [[ ! -d "$dir" ]]; then + print_error "Directory '$dir' does not exist." + read -p "Do you want to create it? (y/N): " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + if sudo mkdir -p "$dir"; then + print_success "Created directory '$dir'" + else + print_error "Failed to create directory '$dir'" + exit 1 + fi + else + print_error "Aborting - directory does not exist." + exit 1 + fi + fi + + echo "$dir" +} + +# Function to check if www-data user/group exists +check_www_data() { + if ! getent passwd www-data >/dev/null 2>&1; then + print_error "User 'www-data' does not exist on this system." + print_warning "This might not be a web server or you might need a different user." + read -p "Continue anyway? (y/N): " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + exit 1 + fi + fi + + if ! getent group www-data >/dev/null 2>&1; then + print_error "Group 'www-data' does not exist on this system." + exit 1 + fi +} + +# Function to show directory info +show_directory_info() { + local target_dir="$1" + + print_status "Target directory: $target_dir" + print_status "Absolute path: $(realpath "$target_dir")" + + # Count files and directories for progress + local dir_count=$(find "$target_dir" -type d | wc -l) + local file_count=$(find "$target_dir" -type f | wc -l) + local total_items=$((dir_count + file_count)) + + echo " - Directories: $dir_count" + echo " - Files: $file_count" + echo " - Total items: $total_items" + + # Show current permissions of the root directory + print_status "Current permissions of root directory:" + ls -ld "$target_dir" +} + +# Main function to set permissions +set_permissions() { + local target_dir="$1" + + print_status "Starting permission setup for current directory and all subdirectories..." + + # Set ownership recursively + print_status "Setting ownership to www-data:www-data..." + if sudo chown -R www-data:www-data "$target_dir"; then + print_success "Ownership set successfully" + else + print_error "Failed to set ownership" + exit 1 + fi + + # Set directory permissions (755) and enable group sticky bit + print_status "Setting directory permissions to 2755 with group sticky bit..." + if sudo find "$target_dir" -type d -exec chmod 2755 {} \;; then + print_success "Directory permissions set successfully" + else + print_error "Failed to set directory permissions" + exit 1 + fi + + # Set file permissions (644) + print_status "Setting file permissions to 644..." + if sudo find "$target_dir" -type f -exec chmod 644 {} \;; then + print_success "File permissions set successfully" + else + print_error "Failed to set file permissions" + exit 1 + fi + + # Make shell scripts executable if any exist + local script_count=$(find "$target_dir" -name "*.sh" -type f | wc -l) + if [[ $script_count -gt 0 ]]; then + print_status "Found $script_count shell scripts, making them executable..." + sudo find "$target_dir" -name "*.sh" -type f -exec chmod 755 {} \; + print_success "Shell scripts made executable" + fi + + # Make other executable files executable (Python scripts, etc.) + local py_count=$(find "$target_dir" -name "*.py" -type f | wc -l) + if [[ $py_count -gt 0 ]]; then + print_status "Found $py_count Python scripts, checking for executable ones..." + # Only make Python files executable if they have shebang + sudo find "$target_dir" -name "*.py" -type f -exec sh -c 'head -1 "$1" | grep -q "^#!" && chmod 755 "$1"' _ {} \; + fi + + # Set special permissions for common web files + if [[ -f "$target_dir/.htaccess" ]]; then + print_status "Setting .htaccess permissions..." + sudo chmod 644 "$target_dir/.htaccess" + fi + + # Handle any .git directories (make them less accessible) + local git_dirs=$(find "$target_dir" -name ".git" -type d | wc -l) + if [[ $git_dirs -gt 0 ]]; then + print_status "Found $git_dirs .git directories, setting restricted permissions..." + sudo find "$target_dir" -name ".git" -type d -exec chmod 750 {} \; + fi + + print_success "All permissions set successfully!" +} + +# Function to show summary +show_summary() { + local target_dir="$1" + + echo "" + print_status "Permission Summary for: $target_dir" + echo "=========================================" + echo "Ownership: www-data:www-data (all files and directories)" + echo "Directories: 2755 (rwxr-sr-x) with group sticky bit" + echo "Files: 644 (rw-r--r--)" + echo "Shell scripts (*.sh): 755 (rwxr-xr-x)" + echo "Python scripts with shebang: 755 (rwxr-xr-x)" + echo ".git directories: 750 (rwxr-x---)" + echo "" + + # Show some example permissions + print_status "Sample of current permissions:" + echo "Root directory:" + sudo ls -ld "$target_dir" + echo "" + echo "Contents (first 10 items):" + sudo ls -la "$target_dir" | head -11 + + # Show subdirectory count + local subdir_count=$(find "$target_dir" -mindepth 1 -type d | wc -l) + if [[ $subdir_count -gt 0 ]]; then + echo "" + print_status "Also processed $subdir_count subdirectories recursively" + fi +} + +# Main script execution +main() { + local target_dir="$DEFAULT_DIR" + + # Parse command line arguments + case "${1:-}" in + -h|--help) + show_usage + exit 0 + ;; + "") + target_dir="$DEFAULT_DIR" + ;; + *) + target_dir="$1" + ;; + esac + + # Validate inputs and prerequisites + check_sudo + target_dir=$(validate_directory "$target_dir") + check_www_data + + # Show directory information + echo "" + show_directory_info "$target_dir" + + # Confirm action + echo "" + print_warning "WARNING: This will recursively change ownership and permissions for:" + print_warning " Directory: $target_dir" + print_warning " ALL subdirectories and files within it" + print_warning " Ownership will change to: www-data:www-data" + print_warning " Directory permissions: 2755 (with group sticky bit)" + print_warning " File permissions: 644" + echo "" + + read -p "Are you sure you want to continue? (y/N): " -n 1 -r + echo + + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + print_status "Operation cancelled by user." + exit 0 + fi + + # Execute permission changes + set_permissions "$target_dir" + show_summary "$target_dir" + + echo "" + print_success "Web directory permissions have been set successfully!" + print_status "You can now copy files to this directory as a member of www-data group." + print_status "New files will automatically inherit the www-data group due to sticky bit." +} + +# Run main function with all arguments +main "$@" \ No newline at end of file diff --git a/strfry.sh b/strfry.sh new file mode 100644 index 00000000..f035f3eb --- /dev/null +++ b/strfry.sh @@ -0,0 +1,168 @@ + + +[Unit] +Description=strfry service +After=network.target + +[Service] +Type=simple +User=user +WorkingDirectory=/media/teknari/Storage/Strfry +ExecStart=/media/user/Storage/Strfry/strfry --config=./strfry.conf relay +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target + + + + + +## +## Default strfry config +## + +# Directory that contains the strfry LMDB database (restart required) +db = "./strfry-db/" + +dbParams { + # Maximum number of threads/processes that can simultaneously have LMDB transactions open (restart required) + maxreaders = 256 + + # Size of mmap() to use when loading LMDB (default is 10TB, does *not* correspond to disk-space used) (restart required) + mapsize = 10995116277760 + + # Disables read-ahead when accessing the LMDB mapping. Reduces IO activity when DB size is larger than RAM. (restart required) + noReadAhead = false +} + +events { + # Maximum size of normalised JSON, in bytes + maxEventSize = 65536 + + # Events newer than this will be rejected + rejectEventsNewerThanSeconds = 900 + + # Events older than this will be rejected + rejectEventsOlderThanSeconds = 94608000 + + # Ephemeral events older than this will be rejected + rejectEphemeralEventsOlderThanSeconds = 60 + + # Ephemeral events will be deleted from the DB when older than this + ephemeralEventsLifetimeSeconds = 300 + + # Maximum number of tags allowed + maxNumTags = 2000 + + # Maximum size for tag values, in bytes + maxTagValSize = 1024 +} + +relay { + # Interface to listen on. Use 0.0.0.0 to listen on all interfaces (restart required) + bind = "127.0.0.1" + + # Port to open for the nostr websocket protocol (restart required) + port = 7776 + + # Set OS-limit on maximum number of open files/sockets (if 0, don't attempt to set) (restart required) + nofiles = 524288 + + # HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case) + realIpHeader = "" + + info { + # NIP-11: Name of this server. Short/descriptive (< 30 characters) + name = "Laan Tungir" + + # NIP-11: Detailed information about relay, free-form + description = "This is a strfry instance." + + # NIP-11: Administrative nostr pubkey, for contact purposes + pubkey = "1ec454734dcbf6fe54901ce25c0c7c6bca5edd89443416761fadc321d38df139" + + # NIP-11: Alternative administrative contact (email, website, etc) + contact = "" + + # NIP-11: URL pointing to an image to be used as an icon for the relay + icon = "" + + # List of supported lists as JSON array, or empty string to use default. Example: "[1,2]" + nips = "" + } + + # Maximum accepted incoming websocket frame size (should be larger than max event) (restart required) + maxWebsocketPayloadSize = 131072 + + # Maximum number of filters allowed in a REQ + maxReqFilterSize = 200 + + # Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) (restart required) + autoPingSeconds = 55 + + # If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy) + enableTcpKeepalive = false + + # How much uninterrupted CPU time a REQ query should get during its DB scan + queryTimesliceBudgetMicroseconds = 10000 + + # Maximum records that can be returned per filter + maxFilterLimit = 500 + + # Maximum number of subscriptions (concurrent REQs) a connection can have open at any time + maxSubsPerConnection = 20 + + writePolicy { + # If non-empty, path to an executable script that implements the writePolicy plugin logic + plugin = "" + } + + compression { + # Use permessage-deflate compression if supported by client. Reduces bandwidth, but slight increase in CPU (restart required) + enabled = true + + # Maintain a sliding window buffer for each connection. Improves compression, but uses more memory (restart required) + slidingWindow = true + } + + logging { + # Dump all incoming messages + dumpInAll = false + + # Dump all incoming EVENT messages + dumpInEvents = false + + # Dump all incoming REQ/CLOSE messages + dumpInReqs = false + + # Log performance metrics for initial REQ database scans + dbScanPerf = false + + # Log reason for invalid event rejection? Can be disabled to silence excessive logging + invalidEvents = true + } + + numThreads { + # Ingester threads: route incoming requests, validate events/sigs (restart required) + ingester = 3 + + # reqWorker threads: Handle initial DB scan for events (restart required) + reqWorker = 3 + + # reqMonitor threads: Handle filtering of new events (restart required) + reqMonitor = 3 + + # negentropy threads: Handle negentropy protocol messages (restart required) + negentropy = 2 + } + + negentropy { + # Support negentropy protocol messages + enabled = true + + # Maximum records that sync will process before returning an error + maxSyncEvents = 1000000 + } +} diff --git a/test.sh b/test.sh new file mode 100755 index 00000000..51b49103 --- /dev/null +++ b/test.sh @@ -0,0 +1 @@ +5b968086-503c-43b9-9df0-2ca7efc4614c \ No newline at end of file diff --git a/tutorial2/.build/config b/tutorial2/.build/config new file mode 100644 index 00000000..e69de29b diff --git a/tutorial2/config/binary b/tutorial2/config/binary new file mode 100644 index 00000000..359444f3 --- /dev/null +++ b/tutorial2/config/binary @@ -0,0 +1,119 @@ +# config/binary - options for live-build(7), binary stage + +# Set image type +LB_IMAGE_TYPE="iso-hybrid" + +# Set image filesystem +LB_BINARY_FILESYSTEM="fat32" + +# Set apt/aptitude generic indices +LB_APT_INDICES="true" + +# Set boot parameters +LB_BOOTAPPEND_LIVE="boot=live components quiet splash" + +# Set boot parameters +LB_BOOTAPPEND_INSTALL="" + +# Set boot parameters +LB_BOOTAPPEND_LIVE_FAILSAFE="boot=live components memtest noapic noapm nodma nomce nosmp nosplash vga=788" + +# Set BIOS bootloader +LB_BOOTLOADER_BIOS="syslinux" + +# Set EFI bootloader +LB_BOOTLOADER_EFI="grub-efi" + +# Set bootloaders +LB_BOOTLOADERS="" + +# Set checksums +LB_CHECKSUMS="sha256" + +# Set compression +LB_COMPRESSION="none" + +# Support dm-verity on rootfs +LB_DM_VERITY="" + +# Support FEC on dm-verity rootfs +LB_DM_VERITY_FEC_ROOTS="" + +# Set sign script for roothash for dm-verity rootfs +LB_DM_VERITY_SIGN="" + +# Set zsync +LB_ZSYNC="false" + +# Control if we build binary images chrooted +# NEVER, *EVER*, *E*V*E*R* SET THIS OPTION to false. +LB_BUILD_WITH_CHROOT="true" + +# Set debian-installer +LB_DEBIAN_INSTALLER="none" + +# Set debian-installer suite +LB_DEBIAN_INSTALLER_DISTRIBUTION="stable" + +# Set debian-installer preseed filename/url +LB_DEBIAN_INSTALLER_PRESEEDFILE="" + +# Toggle use of GUI debian-installer +LB_DEBIAN_INSTALLER_GUI="true" + +# Set hdd label +LB_HDD_LABEL="DEBIAN_LIVE" + +# Set hdd filesystem size +LB_HDD_SIZE="auto" + +# Set start of partition for the hdd target for BIOSes that expect a specific boot partition start (e.g. "63s"). If empty, use optimal layout. +LB_HDD_PARTITION_START="" + +# Set iso author +LB_ISO_APPLICATION="Debian Live" + +# Set iso preparer +LB_ISO_PREPARER="live-build @LB_VERSION@; https://salsa.debian.org/live-team/live-build" + +# Set iso publisher +LB_ISO_PUBLISHER="Debian Live project; https://wiki.debian.org/DebianLive; debian-live@lists.debian.org" + +# Set iso volume (max 32 chars) +LB_ISO_VOLUME="Debian stable @ISOVOLUME_TS@" + +# Set jffs2 eraseblock size +LB_JFFS2_ERASEBLOCK="" + +# Set memtest +LB_MEMTEST="none" + +# Set loadlin +LB_LOADLIN="false" + +# Set win32-loader +LB_WIN32_LOADER="false" + +# Set net tarball +LB_NET_TARBALL="true" + +# Set onie +LB_ONIE="false" + +# Set onie additional kernel cmdline options +LB_ONIE_KERNEL_CMDLINE="" + +# Set inclusion of firmware packages in debian-installer +LB_FIRMWARE_BINARY="true" + +# Set inclusion of firmware packages in the live image +LB_FIRMWARE_CHROOT="true" + +# Set swap file path +LB_SWAP_FILE_PATH="" + +# Set swap file size +LB_SWAP_FILE_SIZE="512" + +# Enable/disable UEFI secure boot support +LB_UEFI_SECURE_BOOT="auto" diff --git a/tutorial2/config/bootstrap b/tutorial2/config/bootstrap new file mode 100644 index 00000000..eee2429a --- /dev/null +++ b/tutorial2/config/bootstrap @@ -0,0 +1,76 @@ +# config/bootstrap - options for live-build(7), bootstrap stage + +# Select architecture to use +LB_ARCHITECTURE="amd64" + +# Select distribution to use +LB_DISTRIBUTION="stable" + +# Select parent distribution to use +LB_PARENT_DISTRIBUTION="" + +# Select distribution to use in the chroot +LB_DISTRIBUTION_CHROOT="stable" + +# Select parent distribution to use in the chroot +LB_PARENT_DISTRIBUTION_CHROOT="stable" + +# Select distribution to use in the final image +LB_DISTRIBUTION_BINARY="stable" + +# Select parent distribution to use in the final image +LB_PARENT_DISTRIBUTION_BINARY="stable" + +# Select parent distribution for debian-installer to use +LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="" + +# Select archive areas to use +LB_ARCHIVE_AREAS="main" + +# Select parent archive areas to use +LB_PARENT_ARCHIVE_AREAS="main" + +# Set parent mirror to bootstrap from +LB_PARENT_MIRROR_BOOTSTRAP="http://deb.debian.org/debian/" + +# Set parent mirror to fetch packages from +LB_PARENT_MIRROR_CHROOT="http://deb.debian.org/debian/" + +# Set security parent mirror to fetch packages from +LB_PARENT_MIRROR_CHROOT_SECURITY="http://security.debian.org/" + +# Set parent mirror which ends up in the image +LB_PARENT_MIRROR_BINARY="http://deb.debian.org/debian/" + +# Set security parent mirror which ends up in the image +LB_PARENT_MIRROR_BINARY_SECURITY="http://security.debian.org/" + +# Set debian-installer parent mirror +LB_PARENT_MIRROR_DEBIAN_INSTALLER="http://deb.debian.org/debian/" + +# Set mirror to bootstrap from +LB_MIRROR_BOOTSTRAP="http://deb.debian.org/debian/" + +# Set mirror to fetch packages from +LB_MIRROR_CHROOT="http://deb.debian.org/debian/" + +# Set security mirror to fetch packages from +LB_MIRROR_CHROOT_SECURITY="http://security.debian.org/" + +# Set mirror which ends up in the image +LB_MIRROR_BINARY="http://deb.debian.org/debian/" + +# Set security mirror which ends up in the image +LB_MIRROR_BINARY_SECURITY="http://security.debian.org/" + +# Set debian-installer mirror +LB_MIRROR_DEBIAN_INSTALLER="http://deb.debian.org/debian/" + +# Set architectures to use foreign bootstrap +LB_BOOTSTRAP_QEMU_ARCHITECTURE="" + +# Set packages to exclude during foreign bootstrap +LB_BOOTSTRAP_QEMU_EXCLUDE="" + +# Set static qemu binary for foreign bootstrap +LB_BOOTSTRAP_QEMU_STATIC="" diff --git a/tutorial2/config/chroot b/tutorial2/config/chroot new file mode 100644 index 00000000..3b27747c --- /dev/null +++ b/tutorial2/config/chroot @@ -0,0 +1,37 @@ +# config/chroot - options for live-build(7), chroot stage + +# Set chroot filesystem +LB_CHROOT_FILESYSTEM="squashfs" + +# Set chroot squashfs compression level +LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL="" + +# Set chroot squashfs compression type +LB_CHROOT_SQUASHFS_COMPRESSION_TYPE="" + +# Set union filesystem +LB_UNION_FILESYSTEM="overlay" + +# Set interactive build +LB_INTERACTIVE="false" + +# Set keyring packages +LB_KEYRING_PACKAGES="debian-archive-keyring" + +# Set kernel flavour to use (with arch) +LB_LINUX_FLAVOURS_WITH_ARCH="amd64" + +# Set kernel packages to use +LB_LINUX_PACKAGES="linux-image" + +# Enable security updates +LB_SECURITY="true" + +# Enable updates updates +LB_UPDATES="true" + +# Enable backports updates +LB_BACKPORTS="false" + +# Enable proposed updates +LB_PROPOSED_UPDATES="false" diff --git a/tutorial2/config/common b/tutorial2/config/common new file mode 100644 index 00000000..39032bfe --- /dev/null +++ b/tutorial2/config/common @@ -0,0 +1,102 @@ +# config/common - common options for live-build(7) + +# Version of live-build used to build config (config format version) +LB_CONFIGURATION_VERSION="c2c3f77929987c06946a210509a3231cd4df02ae_2025-08-14T20:24:40+01:00" + +# Set package manager +LB_APT="apt" + +# Set proxy for HTTP connections +LB_APT_HTTP_PROXY="" + +# Set apt/aptitude pipeline depth +LB_APT_PIPELINE="" + +# Set apt/aptitude recommends +LB_APT_RECOMMENDS="true" + +# Set apt/aptitude security +LB_APT_SECURE="true" + +# Set apt/aptitude source entries in sources.list +LB_APT_SOURCE_ARCHIVES="true" + +# Control cache +LB_CACHE="true" + +# Control if downloaded package indices should be cached +LB_CACHE_INDICES="false" + +# Control if downloaded packages files should be cached +LB_CACHE_PACKAGES="true" + +# Control if completed stages should be cached +LB_CACHE_STAGES="bootstrap" + +# Set debconf(1) frontend to use +LB_DEBCONF_FRONTEND="noninteractive" + +# Set debconf(1) priority to use +LB_DEBCONF_PRIORITY="critical" + +# Set initramfs hook +LB_INITRAMFS="live-boot" + +# Set initramfs compression +LB_INITRAMFS_COMPRESSION="gzip" + +# Set init system +LB_INITSYSTEM="systemd" + +# Set distribution mode +LB_MODE="debian" + +# Set system type +LB_SYSTEM="live" + +# Set base name of the image +LB_IMAGE_NAME="live-image" + +# Set options to use with apt +APT_OPTIONS="--yes -o Acquire::Retries=5" + +# Set options to use with aptitude +APTITUDE_OPTIONS="--assume-yes -o Acquire::Retries=5" + +# Set options to use with debootstrap +DEBOOTSTRAP_OPTIONS="" + +# Set script to use with debootstrap +DEBOOTSTRAP_SCRIPT="" + +# Set options to use with gzip +GZIP_OPTIONS="-6 --rsyncable" + +# Enable UTC timestamps +LB_UTC_TIME="false" + +# live-build options + +# Enable breakpoints +# If set here, overrides the command line option +#_BREAKPOINTS="false" + +# Enable debug +# If set here, overrides the command line option +#_DEBUG="false" + +# Enable color +# If set here, overrides the command line option +#_COLOR="auto" + +# Enable force +# If set here, overrides the command line option +#_FORCE="false" + +# Enable quiet +# If set here, overrides the command line option +#_QUIET="false" + +# Enable verbose +# If set here, overrides the command line option +#_VERBOSE="false" diff --git a/tutorial2/config/hooks/live/0010-disable-kexec-tools.hook.chroot b/tutorial2/config/hooks/live/0010-disable-kexec-tools.hook.chroot new file mode 120000 index 00000000..8155d9a4 --- /dev/null +++ b/tutorial2/config/hooks/live/0010-disable-kexec-tools.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/live/0010-disable-kexec-tools.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot b/tutorial2/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot new file mode 120000 index 00000000..7e410b16 --- /dev/null +++ b/tutorial2/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/1000-create-mtab-symlink.hook.chroot b/tutorial2/config/hooks/normal/1000-create-mtab-symlink.hook.chroot new file mode 120000 index 00000000..59cf9c4a --- /dev/null +++ b/tutorial2/config/hooks/normal/1000-create-mtab-symlink.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/1000-create-mtab-symlink.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/1010-enable-cryptsetup.hook.chroot b/tutorial2/config/hooks/normal/1010-enable-cryptsetup.hook.chroot new file mode 120000 index 00000000..0bf52dd6 --- /dev/null +++ b/tutorial2/config/hooks/normal/1010-enable-cryptsetup.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/1010-enable-cryptsetup.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/1020-create-locales-files.hook.chroot b/tutorial2/config/hooks/normal/1020-create-locales-files.hook.chroot new file mode 120000 index 00000000..45db4ce8 --- /dev/null +++ b/tutorial2/config/hooks/normal/1020-create-locales-files.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/1020-create-locales-files.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/5000-update-apt-file-cache.hook.chroot b/tutorial2/config/hooks/normal/5000-update-apt-file-cache.hook.chroot new file mode 120000 index 00000000..33f3e18e --- /dev/null +++ b/tutorial2/config/hooks/normal/5000-update-apt-file-cache.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/5000-update-apt-file-cache.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/5010-update-apt-xapian-index.hook.chroot b/tutorial2/config/hooks/normal/5010-update-apt-xapian-index.hook.chroot new file mode 120000 index 00000000..c89a01c4 --- /dev/null +++ b/tutorial2/config/hooks/normal/5010-update-apt-xapian-index.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/5010-update-apt-xapian-index.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/5020-update-glx-alternative.hook.chroot b/tutorial2/config/hooks/normal/5020-update-glx-alternative.hook.chroot new file mode 120000 index 00000000..3421536f --- /dev/null +++ b/tutorial2/config/hooks/normal/5020-update-glx-alternative.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/5020-update-glx-alternative.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/5030-update-plocate-database.hook.chroot b/tutorial2/config/hooks/normal/5030-update-plocate-database.hook.chroot new file mode 120000 index 00000000..3aee28da --- /dev/null +++ b/tutorial2/config/hooks/normal/5030-update-plocate-database.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/5030-update-plocate-database.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/5040-update-nvidia-alternative.hook.chroot b/tutorial2/config/hooks/normal/5040-update-nvidia-alternative.hook.chroot new file mode 120000 index 00000000..36206619 --- /dev/null +++ b/tutorial2/config/hooks/normal/5040-update-nvidia-alternative.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/5040-update-nvidia-alternative.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/5050-dracut.hook.chroot b/tutorial2/config/hooks/normal/5050-dracut.hook.chroot new file mode 120000 index 00000000..55b42f53 --- /dev/null +++ b/tutorial2/config/hooks/normal/5050-dracut.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/5050-dracut.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8000-remove-adjtime-configuration.hook.chroot b/tutorial2/config/hooks/normal/8000-remove-adjtime-configuration.hook.chroot new file mode 120000 index 00000000..48335ef7 --- /dev/null +++ b/tutorial2/config/hooks/normal/8000-remove-adjtime-configuration.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8000-remove-adjtime-configuration.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8010-remove-backup-files.hook.chroot b/tutorial2/config/hooks/normal/8010-remove-backup-files.hook.chroot new file mode 120000 index 00000000..0efe1992 --- /dev/null +++ b/tutorial2/config/hooks/normal/8010-remove-backup-files.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8010-remove-backup-files.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8020-remove-dbus-machine-id.hook.chroot b/tutorial2/config/hooks/normal/8020-remove-dbus-machine-id.hook.chroot new file mode 120000 index 00000000..5f87a078 --- /dev/null +++ b/tutorial2/config/hooks/normal/8020-remove-dbus-machine-id.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8020-remove-dbus-machine-id.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8030-truncate-log-files.hook.chroot b/tutorial2/config/hooks/normal/8030-truncate-log-files.hook.chroot new file mode 120000 index 00000000..1d4b25bb --- /dev/null +++ b/tutorial2/config/hooks/normal/8030-truncate-log-files.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8030-truncate-log-files.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8040-remove-mdadm-configuration.hook.chroot b/tutorial2/config/hooks/normal/8040-remove-mdadm-configuration.hook.chroot new file mode 120000 index 00000000..e0aa6249 --- /dev/null +++ b/tutorial2/config/hooks/normal/8040-remove-mdadm-configuration.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8040-remove-mdadm-configuration.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8050-remove-openssh-server-host-keys.hook.chroot b/tutorial2/config/hooks/normal/8050-remove-openssh-server-host-keys.hook.chroot new file mode 120000 index 00000000..c69faedd --- /dev/null +++ b/tutorial2/config/hooks/normal/8050-remove-openssh-server-host-keys.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8050-remove-openssh-server-host-keys.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8060-remove-systemd-machine-id.hook.chroot b/tutorial2/config/hooks/normal/8060-remove-systemd-machine-id.hook.chroot new file mode 120000 index 00000000..12221302 --- /dev/null +++ b/tutorial2/config/hooks/normal/8060-remove-systemd-machine-id.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8060-remove-systemd-machine-id.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8070-remove-temporary-files.hook.chroot b/tutorial2/config/hooks/normal/8070-remove-temporary-files.hook.chroot new file mode 120000 index 00000000..30285ce0 --- /dev/null +++ b/tutorial2/config/hooks/normal/8070-remove-temporary-files.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8070-remove-temporary-files.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8080-reproducible-glibc.hook.chroot b/tutorial2/config/hooks/normal/8080-reproducible-glibc.hook.chroot new file mode 120000 index 00000000..b77f7edd --- /dev/null +++ b/tutorial2/config/hooks/normal/8080-reproducible-glibc.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8080-reproducible-glibc.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8090-remove-ssl-cert-snakeoil.hook.chroot b/tutorial2/config/hooks/normal/8090-remove-ssl-cert-snakeoil.hook.chroot new file mode 120000 index 00000000..30d6da47 --- /dev/null +++ b/tutorial2/config/hooks/normal/8090-remove-ssl-cert-snakeoil.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8090-remove-ssl-cert-snakeoil.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8100-remove-udev-persistent-cd-rules.hook.chroot b/tutorial2/config/hooks/normal/8100-remove-udev-persistent-cd-rules.hook.chroot new file mode 120000 index 00000000..20f031ec --- /dev/null +++ b/tutorial2/config/hooks/normal/8100-remove-udev-persistent-cd-rules.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8100-remove-udev-persistent-cd-rules.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/8110-remove-udev-persistent-net-rules.hook.chroot b/tutorial2/config/hooks/normal/8110-remove-udev-persistent-net-rules.hook.chroot new file mode 120000 index 00000000..fd7b650b --- /dev/null +++ b/tutorial2/config/hooks/normal/8110-remove-udev-persistent-net-rules.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/8110-remove-udev-persistent-net-rules.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/9000-remove-gnome-icon-cache.hook.chroot b/tutorial2/config/hooks/normal/9000-remove-gnome-icon-cache.hook.chroot new file mode 120000 index 00000000..e97e3430 --- /dev/null +++ b/tutorial2/config/hooks/normal/9000-remove-gnome-icon-cache.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/9000-remove-gnome-icon-cache.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/9010-remove-python-pyc.hook.chroot b/tutorial2/config/hooks/normal/9010-remove-python-pyc.hook.chroot new file mode 120000 index 00000000..c3a3bcd8 --- /dev/null +++ b/tutorial2/config/hooks/normal/9010-remove-python-pyc.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/9010-remove-python-pyc.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/hooks/normal/9020-remove-man-cache.hook.chroot b/tutorial2/config/hooks/normal/9020-remove-man-cache.hook.chroot new file mode 120000 index 00000000..32078a29 --- /dev/null +++ b/tutorial2/config/hooks/normal/9020-remove-man-cache.hook.chroot @@ -0,0 +1 @@ +/home/teknari/Sync/Programming/VibeCoding/n_os_tr/live-build/share/hooks/normal/9020-remove-man-cache.hook.chroot \ No newline at end of file diff --git a/tutorial2/config/package-lists/live.list.chroot b/tutorial2/config/package-lists/live.list.chroot new file mode 100644 index 00000000..ab91c739 --- /dev/null +++ b/tutorial2/config/package-lists/live.list.chroot @@ -0,0 +1,4 @@ +live-boot +live-config +live-config-systemd +systemd-sysv diff --git a/tutorial2/config/source b/tutorial2/config/source new file mode 100644 index 00000000..f8c29a16 --- /dev/null +++ b/tutorial2/config/source @@ -0,0 +1,7 @@ +# config/source - options for live-build(7), source stage + +# Set source option +LB_SOURCE="false" + +# Set image type +LB_SOURCE_IMAGES="tar"