Commit Graph

16 Commits

Author SHA1 Message Date
Pablo Lezaeta 9177614897 Attempt to implement remaining stuff 2025-12-17 21:05:00 -03:00
Pablo Lezaeta Reyes bfa1cae85c Refactor code structure for improved readability and maintainability 2025-11-12 11:36:13 -03:00
Pablo Lezaeta Reyes 02d1f76a83 Fix HFS/HFS+ specification conformance and reorganize project
## Specification Conformance Fixes

### Alternate Header Location (Critical Bug Fix)
- Fixed alternate MDB/VH location for both HFS and HFS+
- Changed from (total_sectors - 1) * sector_size to device_size - 1024
- Conforms to Apple TN1150: '1024 bytes before the end of the volume'
- Files: src/mkfs/mkfs_hfs_format.c

### HFS+ Volume Header Field Alignment
- Added missing rsrcClumpSize field (offset +56, 4 bytes)
- Added missing dataClumpSize field (offset +60, 4 bytes)
- Fixed nextCatalogID placement (now correctly at offset +64)
- Set nextCatalogID initial value to 16 (kHFSFirstUserCatalogNodeID)
- Files: src/mkfs/mkfs_hfs_format.c

### HFS+ Volume Attributes
- Set kHFSVolumeUnmountedBit (0x0100) in attributes field
- Changed from 0x00000000 to 0x00000100 per TN1150 spec
- Files: src/mkfs/mkfs_hfs_format.c

## Documentation

### New Technical Documentation (./doc/)
- TN1150_HFS_PLUS_VOLUME_FORMAT.md: Apple official HFS+ spec
- HFS_CLASSIC_SPECIFICATION.md: Complete HFS Classic spec
- WIKIPEDIA_HFS_PLUS.md: Wikipedia HFS+ reference
- HFS_IMPLEMENTATION_NOTES.md: Practical implementation guide
- DEVELOPMENT_HISTORY.md: Project evolution and lessons learned
- README.md: Documentation index with quick reference

Total: 6 technical documents, 65.9 KB offline reference

## Project Reorganization

### Consolidated Documentation
- Removed 9 scattered summary .md files from root
- Consolidated into doc/DEVELOPMENT_HISTORY.md
- Files removed: BUILD_SYSTEM_SUMMARY.md, DEPENDENCY_RESOLUTION_SUMMARY.md,
  EMBEDDED_REORGANIZATION_SUMMARY.md, HFS_PLUS_IMPLEMENTATION_SUMMARY.md,
  TASK_3.4_COMPLETION_SUMMARY.md, MKFS_TEST_RESULTS.md, CORRECCION.md,
  ENTREGABLES.md, RESUMEN_FINAL.md

### Organized Test Scripts
- Moved 7 test scripts from root to test/
- Scripts: test_fsck_enhanced.sh, test_hcopy_manual*.sh,
  test_hfs_integrity.sh, test_hfs_spec_validation.sh,
  test_recursive_integrity.sh, test_spec_conformance.sh

### Updated .gitignore
- Added temporary log files (build_output.log, test_output.txt, etc.)
- Added generated configuration files (Makefiles, config.h, os.c)
- Added IDE directories (.vs/)
- Added consolidated documentation patterns (*_SUMMARY.md)

## Updated Files
- README.md: Links to new documentation, updated limitations
- TODO: Current status (November 2025), recent achievements
- PROJECT_STRUCTURE.md: Updated directory structure documentation
- test/README.md: Updated test organization

## Impact
- Specification-compliant HFS/HFS+ volume creation
- Clean, navigable project structure (24 root files vs ~40)
- Comprehensive offline technical documentation
- All tests organized in test/ directory

Resolves: Specification conformance issues
Related: Apple TN1150, HFS/HFS+ standards compliance
2025-11-11 01:59:09 -03:00
Pablo Lezaeta Reyes 4b792146f3 feat: modernize build system with DESTDIR support and standard Unix conventions
Major build system overhaul implementing modern Unix build standards:

Build System Features:
- Add DESTDIR support for package building staging
- Add PREFIX, BINDIR, LIBDIR, INCLUDEDIR, MANDIR variables
- Add CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS support
- Implement proper variable propagation to all sub-makefiles
- Add automatic manual page installation
- Add library and header installation for development

Files Modified:
- Makefile: Complete rewrite with modern variable handling
- build.sh: Enhanced with environment variable propagation
- libhfs/Makefile*: Added DESTDIR and compiler variable support
- librsrc/Makefile*: Added DESTDIR and compiler variable support
- hfsck/Makefile*: Added DESTDIR and compiler variable support
- libhfs/os/unix.c: Fixed include issues for modern systems

Documentation:
- Add BUILD.md: Comprehensive build system documentation
- Add CHANGELOG.md: Consolidated version history (replaces CHANGES)
- Update COPYRIGHT: Consolidated license info (replaces COPYING)
- Add TEST_RESULTS.md: Build system test verification
- Update README.md: New build system features and documentation links

Testing & Validation:
- Add validate_build.sh: Build system validation script
- Add test_build.sh: Usage examples and testing script
- All tests pass on WSL/Ubuntu environment

Backward Compatibility:
- All existing build commands continue to work
- Enhanced functionality without breaking changes
- Optional traditional command symlinks maintained

Package Manager Support:
- Standard DESTDIR enables clean deb/rpm packaging
- Proper FHS-compliant directory layout
- Cross-compilation support via compiler variables

This modernization enables hfsutils to work with standard Unix build
tools and package managers while maintaining full backward compatibility.
2025-10-21 17:20:43 -03:00
Pablo Lezaeta Reyes 3db5925bfe Status of updateabilition for hfsck 2025-10-20 22:24:51 -03:00
Pablo Lezaeta Reyes 2d47454ca4 add -Werror 2025-10-20 21:29:30 -03:00
Pablo Lezaeta Reyes 476cfb9f39 build: 2025-10-20 20:54:31 -03:00
Pablo Lezaeta Reyes 71b2a557f7 added the respective files 2025-10-14 23:26:26 -03:00
Pablo Lezaeta Reyes 3e2dda921b An small mistake i did earlier whe i tried to update the README... still a wip anyways 2025-10-14 23:16:55 -03:00
Andrea Rogers 21d0d418e3 autoconf: Generate libhfs and librsrc Makefiles 2024-06-28 20:53:04 -05:00
Andrea Rogers 0e079e8ff0 automake: Create .stamp directory for reasons
Might rework in the future to get rid of silly hacky thing...
2024-06-28 20:36:11 -05:00
Andrea Rogers d983eb6ee9 We configure.ac now 2024-06-28 20:28:42 -05:00
Andrea Rogers 8af7cee4a8 autoconf: rm AC_REQUIRE(AC_PROG_CC) and more warnings
We're getting closer to these macros actually working!! 😻

The generated ./configure now runs without any errors, but it looks like
it's time to set my sights on de-crustifying the Automake stuffs...
2024-06-28 20:17:54 -05:00
Andrea Rogers 55c7d8a76f configure.ac: Trad is bad 2024-06-23 07:19:15 -05:00
Andrea Rogers 14f09fbfa2 rm all config.h.in files, rm configure.ac cruft 2024-06-23 07:03:37 -05:00
Pablo Lezaeta Reyes 60d1b2c293 Initial import from https://www.mars.org/home/rob/proj/hfs/
Signed-off-by: Pablo Lezaeta Reyes <prflr88@gmail.com>
2017-09-27 00:10:03 -03:00