- Replace \text{clumpSize} with \mathrm{clumpSize} (2 instances)
- Remove Chinese character 危险, replace with WARNING - DANGEROUS
- Fixes: Command \DH unavailable in encoding OT1
- Fixes: Unicode character errors
Chapter 06 (mount): 306 lines
- Unix mount standards complete
- All options and mount process
- Journaling detection and Linux warnings
- fstab integration
- Common issues and portability
Chapter 07 (hfsutil): 250+ lines
- All commands: hformat, hmount, humount, hvol, hls, hcopy, hmkdir, hdel, hrename, hcd, hpwd, hattrib
- Complete options for each command
- Path syntax and character encoding
- Workflow example
- Testing reference
- Replaced \text{} with \mathrm{} in all equations (chapters 02 and 03)
- Fixed NFD table to use ASCII-only LaTeX accent commands instead of UTF-8
- Removed problematic Unicode characters (accented letters)
- All formulas now use properly escaped underscores
- PDF encoding compatibility ensured
Complete Bit-by-Bit Documentation:
- Every byte of MDB documented with exact offset (162 bytes total)
- All 16 bits of drAtrb explained individually with hex masks
- drNxtCNID: Reserved CNIDs 1-15 fully documented
- Volume name Pascal string format with byte examples
- Extent records complete structure (12 bytes, 3 descriptors)
Memory Layouts:
- Complete volume layout from byte 0 to end
- MDB field map with types and byte counts
- Node descriptor (14 bytes) for B-trees
- BTHeaderRec (106 bytes) complete structure
- Extent descriptor byte-by-byte breakdown
Critical Formulas:
- Alternate MDB: device_size - 1024 (NOT sector-based)
- Date conversion: Unix epoch offset (2082844800)
- Y2K28 limit calculation
- Volume size limits with 16-bit addressing
Endianness Details:
- Big-endian byte order for all multi-byte fields
- Examples of 16-bit and 32-bit value storage
- Code snippets showing correct/incorrect writing
- Hex dump verification commands
Oddities and Edge Cases:
- BD signature origin mystery
- Pascal vs C strings
- MacRoman character encoding differences
- Allocation block alignment requirements
- 16-bit addressing limitations (65,535 blocks max)
Verification:
- xxd commands for checking every critical field
- Expected hex output for validation
- Common errors and how to detect them
Goal: Complete reimplementation possible with only this document
Documentation System:
- Created professional PDF manual using LaTeX
- 10 chapters covering all aspects of hfsutils
- Compiled to 21-page PDF (199KB)
Chapters:
1. Introduction - Installation, quick start, overview
2. HFS Specification - Complete HFS format documentation
3. HFS+ Specification - HFS+ format (stub, to expand)
4-7. Utilities - mkfs, fsck, mount, hfsutil (stubs, to expand)
8. Implementation Details - Architecture (stub)
9. Testing - Test suite documentation (stub)
10. Appendix - Glossary, references, structures
Build System:
- make docs-pdf: Build PDF with pdflatex
- make docs-txt: Extract text from PDF
- make docs: Build all formats
- make install-docs: Install to /usr/share/doc/hfsutils
- make docs-clean: Clean build artifacts
.gitignore Updates:
- Ignore LaTeX temporary files (.aux, .log, .toc, etc.)
- Keep final PDFs for distribution
Requirements:
- TeXLive (pdflatex) for PDF generation
- poppler-utils (pdftotext) for text extraction
- Provides installation instructions if tools missing
Next Steps:
- Expand stub chapters with manpage content
- Add figures and diagrams
- Include implementation notes from doc/*.md
- Convert manpages to LaTeX format
Complete ASCII conversion:
- + in all test output and validation
- ! in all warnings
- All files verified for ASCII-only content
Files updated:
- Makefile (install messages)
- test/test_mkfs.sh (test output)
- test/test_fsck.sh (test output)
- test/test_hfsutils.sh (test output)
- test/lib/validation.sh (validation messages)
Benefits:
- Works on all BSD TTY systems
- Compatible with Linux text consoles
- No Unicode font requirements
- Portable across all POSIX systems
- Serial console compatible
- Minimal system requirements
Changed:
- [OK] in Makefile install messages
- + in all test output
- ! in all test warnings
Reason:
- Ensures compatibility with BSD TTY and minimal terminals
-Works on all terminal types without Unicode font support
- Professional appearance on text-only systems
- No dependency on locale or font configuration
Files affected:
- Makefile (install target messages)
- test/test_mkfs.sh
- test/test_fsck.sh
- test/test_hfsutils.sh
After each install target, show what else can be installed:
Individual utilities (mkfs.hfs, fsck.hfs+, etc.):
- Show related utilities (mkfs fsck mount)
- Show set installation option
- Clear, actionable suggestions
Set installations (install-set-hfs, install-set-hfsplus):
- Show banner with installed utilities
- Suggest complementary sets not yet installed
- Suggest complete installation option
Benefits:
- Users discover available installation options
- Clear guidance on next steps
- Professional installation experience
- Reduces need to read documentation
Example output:
mkfs.hfs installed
Additional options available:
make install-mkfs.hfs+ # Install HFS+ version
make install-fsck.hfs # Install filesystem checker
make install-set-hfs # Install complete HFS toolset
Install Targets:
- install-linux: Installs only filesystem utilities (mkfs, fsck, mount)
* For systems with Linux kernel HFS/HFS+ drivers
* Installs both HFS and HFS+ toolsets
* Does NOT install hfsutil (only works with kernel drivers)
- install-complete: Complete installation (filesystem utilities + hfsutil)
* For systems without HFS mount support
* Or for full installation with both kernel tools and hfsutil
* Includes all manpages (man1 for hfsutil, man8 for fs utilities)
Usage:
make install-linux PREFIX=/usr # Linux systems with kernel drivers
make install-complete PREFIX=/usr/local # Systems needing hfsutil
Added patterns to ignore mount utilities:
- *.hfs+ extension files
- /mount.hfs, /mount.hfs+, /mount.hfsplus symlinks in root
- Prevents accidental commit of mount binaries
- Updated GitHub Actions workflow to test on both Ubuntu and Arch Linux
- Added comprehensive test suite execution for all test categories
- Added specification conformance validation job
- Added cross-platform compatibility verification
- Created .github/README.md documenting workflows and testing procedures
- Added CI status badge to main README.md
Test Coverage:
- Basic functionality tests (mount, ls, copy, delete, etc.)
- Integration workflow tests (backup, restore, migration)
- HFS+ specific tests (formatting, detection, journaling)
- Error handling and edge case tests
- Specification conformance (alternate headers, signatures, fields)
Platform Support:
- Ubuntu Latest: Full test suite with hexdump verification
- Arch Linux: Same test suite in container for rolling-release validation
Artifacts:
- Upload test artifacts on failure for debugging
- Include temp files, logs, and disk images
- Update hfsutils_rcsid to match the new version 4.1.0A.1
- Ensure all version strings are consistent across the codebase
- Maintain historical CHANGELOG entries for 4.1.0A as requested
- Update version strings in src/common/version.c to 4.1.0A.1
- Update all documentation to reflect new version number
- Add comprehensive changelog entry for 4.1.0A.1 with all recent improvements
- Add macOS packaging examples in PACKAGING.md (Homebrew, MacPorts)
- Update compatibility information for BSD systems and macOS
- Document flexible installation system as major feature
Version 4.1.0A.1 represents a significant improvement over 4.1.0A with:
- Complete flexible installation system for all distributions
- Fixed hfsck installation paths
- Enhanced build system robustness
- Comprehensive packaging documentation
- Full compatibility with merged and traditional filesystem layouts
- Clarify that hfsck now properly respects SBINDIR variable
- Update testing instructions to show both merged and traditional system paths
- Ensure packaging documentation is accurate for the corrected behavior
- Update hfsck/Makefile and hfsck/Makefile.in to use SBINDIR instead of hardcoded /sbin
- Add SBINDIR variable to hfsck Makefiles with proper default
- Pass SBINDIR variable from main Makefile to hfsck sub-make calls
- Update documentation to clarify that all system utilities respect SBINDIR
- Ensure hfsck installs to correct directory for both traditional and merged systems
This fixes the issue where hfsck was still installing to /sbin regardless of
SBINDIR setting, ensuring proper distribution packaging compatibility.
- Create PACKAGING.md with detailed instructions for different distributions
- Include examples for Arch Linux, Debian/Ubuntu, Fedora/RHEL, openSUSE
- Document installation variables and file locations
- Provide compatibility information for merged vs traditional /bin systems
- Add testing instructions and package metadata suggestions
This guide helps distribution maintainers properly package hfsutils 4.1.0A
with correct installation paths for their specific distribution requirements.
- Add SBINDIR variable for configurable system binary directory
- Support both traditional (/usr/sbin) and merged (/usr/bin) filesystem layouts
- Smart symlink creation that detects merged vs separate bin/sbin systems
- Proper distribution packaging support with PREFIX=/usr
- Enhanced documentation with packaging examples and modern system compatibility
- Automatic handling of Arch Linux, Fedora 17+, Debian 8+, Ubuntu 15.04+ merged systems
Installation examples:
- Standard: make install PREFIX=/usr DESTDIR=/tmp/pkg
- Merged systems: make install PREFIX=/usr SBINDIR=/usr/bin DESTDIR=/tmp/pkg
- With symlinks: make install-symlinks PREFIX=/usr SBINDIR=/usr/bin
This resolves packaging issues where hfsck was installed to /usr/local/sbin
instead of the expected /usr/bin or /usr/sbin for distribution packages.
- Document autotools fixes and build robustness improvements in CHANGELOG.md
- Add alternative build instructions for autotools issues in README.md
- Mention build-manual target as fallback option
Version 4.1.0A now has robust build system with multiple fallback options.
- Fix config.status rule in hfsck Makefiles (use ./configure instead of ./config.status --recheck)
- Improve hfsck build target with better error handling and fallback
- Add build-manual target to completely avoid autotools when needed
- Enhance install-libs to handle hfsck installation failures gracefully
- Update build.sh with more robust hfsck compilation logic
- Add better logging and error messages throughout build process
This resolves the build errors:
- config.status no existe (Makefile:108 error 127)
- install-libs error 2 (Makefile:225)
Users can now use 'make build-manual' if autotools causes issues.
- Fix hfsplus_format.h include path to use ../common/hfs_detect.h
- Fix hformat.c include paths for hfs_detect.h and hfsplus_format.h
- Correct .gitignore to use root-specific paths (/) to avoid ignoring source directories
- Prevent .gitignore from blocking hfsck/ directory and src/hfsutil/ files
This resolves the compilation error: hfsplus_format.h no existe el fichero o directorio
- Update hfsplus_format.h to use correct path for hfs_detect.h (../common/hfs_detect.h)
- Fix hformat.c to use correct paths for both headers
- Resolves compilation error: hfsplus_format.h no existe el fichero o directorio
This fixes the build error in src/hfsutil/hformat.c:38:11
- Move hfs_detect.h from include/hfsutil/ to include/common/
- Update all include references in source files
- Fix typo in hfsck/main.c include path (../nclude -> ../include)
- Remove duplicate hfs_detect.o rules in hfsck Makefiles
- Update documentation (CHANGELOG.md, TODO, README.md)
- Improve project organization and maintainability
Version: 4.1.0A - Extended implementation with better code organization