Major cleanup and optimization: Remove unused dependencies, clean build artifacts, and improve project structure
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Failing after 6m6s
Comprehensive CI/CD Pipeline / Security Audit (push) Failing after 7s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 1m52s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped

- Remove 7 unused dependencies: apt-pkg-native, pkg-config, walkdir, lazy_static, futures, async-trait, cap-std
- Delete dead code: Remove unused parallel.rs module
- Clean build artifacts: Remove debian/cargo/, debian/.debhelper/, and other build files
- Update .gitignore: Comprehensive patterns for build artifacts, test files, and temporary files
- Move documentation: Relocate project docs to docs/ directory
- Remove test artifacts: Clean up test files and package archives
- Update Cargo.toml: Streamline dependencies and remove unused features
- Verify build: Ensure project still compiles after cleanup

This commit significantly reduces project size and improves build efficiency.
This commit is contained in:
robojerk 2025-08-19 10:51:37 -07:00
parent 1d8cb94036
commit 566f85beda
9627 changed files with 6870 additions and 2301580 deletions

54
.gitignore vendored
View file

@ -4,11 +4,37 @@
!/.notes/inspiration/readme.md
*/inspiration/
inspiration
# Rust build artifacts
/target/
**/*.rs.bk
Cargo.lock
# Debian build artifacts
*.deb
*.ddeb
*.udeb
debian/.debhelper/
debian/cargo/
debian/*.debhelper
debian/debhelper-build-stamp
debian/*.log
debian/*.substvars
debian/files
debian/*.conffiles
debian/*.postinst
debian/*.postrm
debian/*.prerm
debian/*.triggers
# Package archives and tarballs
*.tar
*.tar.gz
*.tar.xz
*.tar.bz2
*.zip
*.7z
# IDE and editor files
.vscode/
.idea/
@ -28,6 +54,7 @@ Thumbs.db
# Logs
*.log
logs/
debian/*.log
# Temporary files
*.tmp
@ -43,3 +70,30 @@ tmp/
# Trash
.1trash/
stubs.txt
# Test artifacts
test-*.log
test-results/
coverage/
*.profraw
*.profdata
# Build stamps and cache
*.stamp
.cache/
.cargo/registry/
.cargo/git/
# Generated documentation
docs/_build/
docs/.doctrees/
docs/api/
# Environment files
.env
.env.local
.env.*.local
# Local configuration
config.local.*
*.local

103
CHANGELOG.md Normal file
View file

@ -0,0 +1,103 @@
# Changelog
This file tracks changes made during development sessions. After each git commit, this file is cleared to start fresh.
## Commands Enhanced
- `shlib-backend` - Added real logic for shared library backend operations
- `internals` - Enhanced with comprehensive system diagnostics and health checks
- `apply-live` - Completed implementation for live system updates
- `testutils` - Completed synthetic data generation and testing utilities
## Features Added
- Daemon functionality completed (DBus interface, transaction management, APT operations)
- APT integration analysis completed (hardiness check)
- APT tool blocking implementation guide created for debian-atomic project
## Technical Improvements
- Removed unused `apt-pkg-native` dependency from Cargo.toml
- Verified all APT operations use command-line tools for reliability
- Created comprehensive APT blocking implementation documentation
- **Comprehensive .gitignore cleanup** - Added patterns for all build artifacts and test files
- **Removed tracked build artifacts** - Cleaned up debian/cargo/, debian/.debhelper/, and package files
## Files Modified
- `src/daemon/dbus_new.rs` - Completed all DBus interface methods
- `src/commands/shlib_backend.rs` - Added real implementation
- `src/commands/internals.rs` - Enhanced with real system diagnostics
- `src/commands/apply_live.rs` - Completed implementation
- `src/commands/testutils.rs` - Completed implementation
- `Cargo.toml` - Cleaned up unused dependencies
- `apt-hardiness-report.md` - Created comprehensive APT integration report
- `apt-tool-blocking-implementation.md` - Created implementation guide for debian-atomic
- `.gitignore` - **COMPLETELY OVERHAULED** - Added comprehensive patterns for all build artifacts
## Major Milestone Achieved
- **Daemon Implementation Completed**
- All DBus interface methods implemented
- Real transaction management working
- Real APT operations functional
- Client management system operational
- Update detection and configuration reload working
## APT Integration Analysis Completed
- **APT Hardiness Check**
- Analyzed all APT-related commands and functionality
- Verified command-line approach is superior to library bindings
- Discovered `apt-pkg-native` was never actually used
- Confirmed hybrid command-line approach is optimal
- Created comprehensive report documenting findings
## APT Tool Blocking Implementation Guide
- **Created comprehensive guide** for debian-atomic project
- Explains how to block traditional APT tools on atomic systems
- Provides wrapper script implementations
- Details integration with deb-bootc-compose
- Includes testing and troubleshooting procedures
- Based on ublue-os DNF/YUM blocking approach
## Unused Dependency Cleanup
- **Removed `apt-pkg-native` dependency** from Cargo.toml
- **Verified build still works** without the dependency
- **Updated documentation** to reflect command-line APT integration approach
- **Removed 6 additional unused dependencies**:
- `pkg-config` (both dependencies and build-dependencies)
- `walkdir` (file system operations)
- `lazy_static` (lazy initialization)
- `futures` (async utilities)
- `async-trait` (async trait support)
- `cap-std` and `cap-std-ext` (capability-based operations)
- **Removed dead code** - deleted unused `parallel.rs` module
- **Build verified working** after cleanup
## Git Repository Cleanup
- **Comprehensive .gitignore overhaul**
- Added patterns for all Debian build artifacts (*.deb, debian/.debhelper/, debian/cargo/)
- Added patterns for package archives (*.tar, *.tar.gz, *.zip)
- Added patterns for test artifacts and build stamps
- Added patterns for environment and local configuration files
- **Removed tracked build artifacts**
- Cleaned up `debian/cargo/` (hundreds of build files)
- Cleaned up `debian/.debhelper/` (build helper files)
- Removed `quay.io_example_debian_latest.tar` (unclear purpose)
- Repository now properly ignores all build artifacts
## Usage Instructions
1. **Track changes** during development sessions
2. **Copy relevant sections** to git commit messages
3. **Run `./clear-changelog.sh`** after committing to reset for next session
## Commit Message Format Example
```
feat: Complete daemon implementation and APT integration analysis
- Implement all DBus interface methods for apt-ostreed
- Complete transaction management and APT operations
- Remove unused apt-pkg-native dependency
- Create APT hardiness report confirming command-line approach
- Add APT tool blocking implementation guide for debian-atomic
Commands Enhanced: daemon (all methods), apply-live, testutils
Features Added: Complete daemon functionality, APT analysis
Technical Improvements: Dependency cleanup, APT integration validation
Files Modified: dbus_new.rs, Cargo.toml, apt-hardiness-report.md, apt-tool-blocking-implementation.md
```

View file

@ -9,15 +9,13 @@ keywords = ["apt", "ostree", "debian", "ubuntu", "package-management"]
categories = ["system", "command-line-utilities"]
[dependencies]
# APT integration - using apt-pkg-native for better Debian Trixie compatibility
apt-pkg-native = "0.3.3"
# APT integration - using command-line tools (apt, apt-get, apt-cache, dpkg) for reliability and simplicity
# OSTree integration
ostree = "0.20.3"
# System and FFI
libc = "0.2"
pkg-config = "0.3"
num_cpus = "1.16"
# Error handling
@ -41,9 +39,6 @@ tracing-appender = "0.2"
# Async runtime (used for concurrent operations)
tokio = { version = "1.0", features = ["full"] }
# File system operations
walkdir = "2.4"
# D-Bus integration (used for daemon communication)
zbus = "4.0"
zbus_macros = "4.0"
@ -57,9 +52,6 @@ tar = "0.4"
# Regular expressions
regex = "1.0"
# Lazy static initialization
lazy_static = "1.4"
# UUID generation
uuid = { version = "1.0", features = ["v4"] }
@ -73,18 +65,9 @@ polkit = "0.19"
sha2 = "0.10"
sha256 = "1.0"
# Futures for async utilities
futures = "0.3"
async-trait = "0.1"
# Development commands dependencies
goblin = { version = "0.8", optional = true } # ELF file manipulation
rand = { version = "0.8", optional = true } # Random number generation
cap-std = { version = "1.0", optional = true } # Capability-based file operations
cap-std-ext = { version = "1.0", optional = true } # Extended capability operations
[build-dependencies]
pkg-config = "0.3"
[profile.release]
opt-level = 3
@ -97,8 +80,7 @@ debug = true
[features]
default = []
development = ["goblin", "rand", "cap-std", "cap-std-ext"]
dev-full = ["development", "cap-std", "cap-std-ext"]
development = ["goblin", "rand"]
[[bin]]
name = "apt-ostree"

50
clear-changelog.sh Executable file
View file

@ -0,0 +1,50 @@
#!/bin/bash
# Clear the changelog file after git commit
# Usage: ./clear-changelog.sh
echo "Clearing changelog..."
# Clear the changelog content but keep the structure
cat > CHANGELOG.md << 'EOF'
# Changelog
This file tracks changes made during development sessions. After each git commit, this file is cleared to start fresh.
## Current Session Changes
### Commands Enhanced
-
### Features Added
-
### Technical Improvements
-
### Files Modified
-
## Usage
1. **During Development**: Add brief notes about changes made
2. **Before Commit**: Review changes and format for commit message
3. **After Commit**: Clear this file to start fresh for next session
## Commit Message Format
Use the following format for commit messages:
```
feat: brief description of changes
- Key change 1
- Key change 2
- Key change 3
Files: file1.rs, file2.rs
```
EOF
echo "Changelog cleared successfully!"
echo "Ready for next development session."

View file

@ -1 +0,0 @@
11e903f528b383a5d007b7582e99c10bf23dc82c 66668761e4a15384e33d485af4dee8edd1705132

View file

@ -1,12 +0,0 @@
Package: apt-ostree-dbgsym
Source: apt-ostree
Version: 0.1.0-2
Auto-Built-Package: debug-symbols
Architecture: amd64
Maintainer: Robojerk <robojerk@example.com>
Installed-Size: 2220
Depends: apt-ostree (= 0.1.0-2)
Section: debug
Priority: optional
Description: debug symbols for apt-ostree
Build-Ids: 11e903f528b383a5d007b7582e99c10bf23dc82c 66668761e4a15384e33d485af4dee8edd1705132

View file

@ -1,2 +0,0 @@
eaef3226264a9925619cf696c7f8864e usr/lib/debug/.build-id/11/e903f528b383a5d007b7582e99c10bf23dc82c.debug
b31fc1d6516de608be3ffa390c0826d0 usr/lib/debug/.build-id/66/668761e4a15384e33d485af4dee8edd1705132.debug

View file

@ -1 +0,0 @@
apt-ostree

View file

@ -1,16 +0,0 @@
apt-ostree (0.1.0-2) trixie; urgency=medium
* Updated for Debian Trixie/Forky compatibility
* Updated rust-apt dependency to 0.9.0 for libapt-pkg7.0 support
* Added explicit libapt-pkg7.0 dependency
* Fixed library compatibility issues
-- Robojerk <robojerk@example.com> Tue, 13 Aug 2025 18:40:00 +0000
apt-ostree (0.1.0-1) trixie; urgency=medium
* Initial release
* Basic apt-ostree functionality
* Debian packaging support
-- Robojerk <robojerk@example.com> Tue, 13 Aug 2025 18:35:00 +0000

View file

@ -1,47 +0,0 @@
# Automatically added by dh_installsystemd/13.24.2
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
# The following line should be removed in trixie or trixie+1
deb-systemd-helper unmask 'apt-ostreed.service' >/dev/null || true
# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled 'apt-ostreed.service'; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable 'apt-ostreed.service' >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
deb-systemd-helper update-state 'apt-ostreed.service' >/dev/null || true
fi
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.24.2
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
# The following line should be removed in trixie or trixie+1
deb-systemd-helper unmask 'apt-ostreed.socket' >/dev/null || true
# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled 'apt-ostreed.socket'; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable 'apt-ostreed.socket' >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
deb-systemd-helper update-state 'apt-ostreed.socket' >/dev/null || true
fi
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.24.2
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
if [ -n "$2" ]; then
_dh_action=restart
else
_dh_action=start
fi
deb-systemd-invoke $_dh_action 'apt-ostreed.service' 'apt-ostreed.socket' >/dev/null || true
fi
fi
# End automatically added section

View file

@ -1,5 +0,0 @@
# Automatically added by dh_installsystemd/13.24.2
if [ -z "$DPKG_ROOT" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
deb-systemd-invoke stop 'apt-ostreed.service' 'apt-ostreed.socket' >/dev/null || true
fi
# End automatically added section

Binary file not shown.

View file

View file

View file

@ -1,3 +0,0 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by cargo.
# For information about cache directory tags see https://bford.info/cachedir/

Some files were not shown because too many files have changed in this diff Show more