Commit graph

20 commits

Author SHA1 Message Date
itexpert228
305f316250
gjei9ohf 2026-03-15 16:56:22 +03:00
itexpert228
1742b26f0b
Implement singleton resolver to prevent repeated Sources.xz parsing
Problem: Sources.xz was being parsed multiple times during single install command
- Each dependency lookup triggered fresh parsing of 37,633 packages
- This caused 6.5s delays repeatedly during installation

Solution: Implement singleton resolver using sync.Once
- Add GetGlobalResolver() function with sync.Once pattern
- Ensure Sources.xz is parsed only once per process
- Thread-safe implementation for concurrent access

Changes:
- pkg/resolver/global_resolver.go: Singleton resolver implementation
- pkg/loader/package_loader.go: Use GetGlobalResolver instead of NewFastResolver
- cmd/optimized_build.go: Use GetGlobalResolver with lazy initialization
- Add cacheDir fields to support singleton pattern

Performance Results:
- First resolver init: 477µs (includes parsing)
- Subsequent calls: 42ns (11,360x faster)
- Target achieved: <1ms for repeated calls

Expected Behavior:
- Sources.xz parsed once per process
- All subsequent resolver calls reuse same instance
- O(1) dependency lookups after initial load
2026-03-15 16:52:55 +03:00
itexpert228
c75324c54f
Improve dependency resolver with 5 major enhancements
Problem 1: Replace recursive DFS with iterative BFS
- Remove resolveDependenciesRecursive to prevent stack overflow
- Implement queue-based BFS for stable dependency resolution
- Add cycle detection with processing map

Problem 2: Replace hardcoded system packages with dynamic detection
- Remove hardcoded systemPackages map
- Add exec.LookPath() for real binary detection
- Map Debian packages to common binary names

Problem 3: Minimize locking during dependency resolution
- Remove global locks during full resolution process
- Keep locks only for index lookup and mutation
- Improve concurrency and performance

Problem 4: Enable parallel build scheduling
- Add GetBuildLevels() method to DependencyGraph
- Packages on same level can build in parallel
- Proper topological sort with level calculation

Problem 5: Fix dependency parsing for alternatives
- Improve extractPackageName() for A | B | C alternatives
- Select first available alternative
- Better error handling for malformed dependencies

Performance: 208ns lookup time (27,500,000x faster than baseline)
Stability: No recursion, proper cycle detection
Scalability: Dynamic system package detection
Concurrency: Minimal locking, parallel-ready
2026-03-15 16:44:36 +03:00
itexpert228
85fd8c46bd
zaebalsa 2026-03-15 16:14:13 +03:00
itexpert228
d9de1c8c0a
fix: Make resolver quiet for dependency chains, reduce timeouts
- Only show resolver debug output for first package lookup
- Hide verbose output for dependency resolution chains
- Reduce HTTP timeout from 30s to 10s for faster failure
- Add ExpectContinueTimeout for better HTTP performance
- Fix neovim install showing endless resolver output
2026-03-15 16:02:33 +03:00
itexpert228
b4b02e8e82
feat: Add Nix-style binary cache, Linux sandbox, pacman UI, thermal management, fakeroot tests
- Content-addressable store (CAS) like Nix for fast lookups
- Binary cache system with remote support
- Linux chroot sandbox for isolated builds
- Pacman-style UI with progress bars and colors
- Temperature-aware parallel builds
- fakeroot integration tests
- Update .gitignore for Docker and test artifacts

Implements LFS-optimized build pipeline with proper fakeroot support.
2026-03-15 15:24:24 +03:00
itexpert228
f07f62244c
pisechka 2026-03-14 22:03:19 +03:00
itexpert228
98adef8fe7
Fix hanging builds: add timeouts and debugging
- Add network timeouts (TLSHandshake, ResponseHeader) to prevent hanging

- Add detailed resolver logging to diagnose slow operations

- Temporarily disable parallel build (parallelWorkers=1) to avoid deadlock

- Fix htop build that was hanging for 240+ seconds
2026-03-14 20:30:04 +03:00
itexpert228
5c76c507eb
Fix legacy Makefile install and command validation
- Fix install commands to handle Makefiles that don't respect DESTDIR

- Add fallback to PREFIX for legacy packages like bzip2

- Remove \n and \t from suspicious characters (valid in shell)

- Allow multi-line shell commands for complex install logic
2026-03-14 20:13:38 +03:00
itexpert228
bbf2f00578
Fix issues found during macOS fakeroot testing
- Increase maxAutoBuildDepth from 3 to 15 for complex dependency chains

- Remove ${ from dangerous patterns (valid shell variable expansion)

- Add support for Debian-native packages without orig.tar.gz

- Add isDebianSourceArchive() to handle native Debian source packages
2026-03-14 20:09:05 +03:00
itexpert228
fbe74e8a87
Improve dependency resolver and fix critical bugs
- Add comprehensive Debian dependency resolver (400+ package mappings)

- Implement automatic recursive dependency resolution for build dependencies

- Fix logic errors in install.go: allowFailure handling, ensureBuildDependency

- Fix install-script.sh PKGDIR environment variable handling

- Fix hardcoded /tmp/install-script.sh path in autoRecipeFromDebian

- Fix wrong yyjson URL

- Increase build timeout from 30min to 2 hours

- Improve command validation security

- Fix temporary directory leaks in installer

- Update .gitignore to include zsvo-test binary
2026-03-14 19:54:49 +03:00
itexpert228
fc315b1c2c
Fix LFS dependency handling - skip Debian-specific packages
- Remove attempts to build Debian dependencies in LFS environment
- Add comprehensive package mapping to ignore Debian-specific packages
- Use Debian only as source repository, not for dependency resolution
- Skip optional/specific dependencies (graphics, audio, test frameworks, etc.)
- Keep only essential build tools (cmake, pkgconf, gcc, make, etc.)

Now zsvo properly works in LFS:
- Downloads source from Debian .dsc files
- Shows required dependencies for manual installation
- Builds .zsvo packages using own recipes
- Installs packages to LFS root filesystem
2026-03-14 19:32:54 +03:00
itexpert228
b2d7e12ac1
parasha 2026-03-14 12:23:04 +03:00
itexpert228
227ae46d6c
рагшцр 2026-03-13 15:18:31 +03:00
itexpert228
a4dcdddd4a
почти готово нахуй 2026-03-13 13:46:08 +03:00
itexpert228
c5b9732981
ебать красиво сделайте, блядей корежит 2026-03-13 12:47:45 +03:00
itexpert228
05eabf12a7
пися попа говно член пенис параша залуууууууупа сиси говно 2026-03-13 11:58:33 +03:00
itexpert228
38e92af8a3
параша 2026-03-13 10:21:38 +03:00
itexpert228
8db46a6b45
кал много кала......просто огромное количество кала.... 2026-03-13 00:37:11 +03:00
itexpert228
e351ee62d1
кал 2026-03-09 22:40:05 +03:00