Permalink
Browse files

AFF4 Standard v1.0 C/C++ support

  • Loading branch information...
blschatz committed Apr 6, 2017
1 parent da917bc commit 3251f4e02ae6d5f93c4793b2b822a7084e040a5b
Showing with 8,668 additions and 47,553 deletions.
  1. +288 −0 .gitignore
  2. +1 −1 .gitmodules
  3. +32 −1 INSTALL
  4. +3 −2 Makefile.am
  5. +0 −843 Makefile.in
  6. +0 −1,216 aclocal.m4
  7. +0 −270 ar-lib
  8. +12 −47 autogen.sh
  9. +0 −347 compile
  10. +0 −1,558 config.guess
  11. +0 −1,791 config.sub
  12. +0 −19,269 configure
  13. +72 −77 configure.ac
  14. +0 −791 depcomp
  15. +2 −2 docs/{Doxyfile → Doxyfile.in}
  16. +11 −0 docs/Makefile.am
  17. +0 −527 install-sh
  18. +0 −9,661 ltmain.sh
  19. +1,456 −1,065 m4/libtool.m4
  20. +90 −37 m4/ltoptions.m4
  21. +4 −3 m4/ltsugar.m4
  22. +6 −6 m4/ltversion.m4
  23. +4 −3 m4/lt~obsolete.m4
  24. +74 −0 m4/m4_ax_check_compile_flag.m4
  25. +172 −0 m4/m4_ax_cxx_compile_stdcxx_11.m4
  26. +2 −1 m4/uriparser.m4
  27. +0 −215 missing
  28. +1 −1 pyaff4/pyaff4/aff4.py
  29. +1 −1 pyaff4/pyaff4/data_store.py
  30. +39 −0 samples/test.sh
  31. +0 −2,303 src/Doxyfile
  32. +45 −34 src/Makefile.am
  33. +0 −825 src/Makefile.in
  34. +82 −77 src/aff4_base.h
  35. +0 −6 src/aff4_config.h
  36. +0 −6 src/aff4_config.h.in
  37. +271 −260 src/aff4_directory.cc
  38. +36 −34 src/aff4_directory.h
  39. +14 −12 src/aff4_errors.h
  40. +258 −243 src/aff4_file.cc
  41. +35 −31 src/aff4_file.h
  42. +520 −442 src/aff4_image.cc
  43. +94 −79 src/aff4_image.h
  44. +403 −383 src/aff4_imager_utils.cc
  45. +173 −170 src/aff4_imager_utils.h
  46. +1 −0 src/aff4_init.h
  47. +137 −131 src/aff4_io.h
  48. +511 −463 src/aff4_map.cc
  49. +48 −45 src/aff4_map.h
  50. +31 −29 src/aff4_registry.h
  51. +2 −2 src/aff4_simple.h
  52. +60 −0 src/aff4_symstream.cc
  53. +38 −0 src/aff4_symstream.h
  54. +9 −4 src/aff4_utils.h
  55. +10 −9 src/aff4imager.cc
  56. +29 −16 src/config.h.in
  57. +651 −537 src/data_store.cc
  58. +465 −397 src/data_store.h
  59. +30 −29 src/lexicon.cc
  60. +157 −53 src/lexicon.h
  61. +118 −0 src/libaff4-c.cc
  62. +73 −0 src/libaff4-c.h
  63. +293 −278 src/libaff4.cc
  64. +6 −4 src/libaff4.h
  65. +319 −315 src/rdf.cc
  66. +190 −167 src/rdf.h
  67. +61 −61 src/tclap_parsers.h
  68. +763 −765 src/zip.cc
  69. +199 −197 src/zip.h
  70. +0 −139 test-driver
  71. +18 −16 tests/Makefile.am
  72. +0 −1,194 tests/Makefile.in
  73. +110 −0 tests/aff4_capi.cc
  74. +12 −9 tests/aff4_image_test.cc
  75. +9 −9 tests/aff4_map_tests.cc
  76. +15 −15 tests/data_store_test.cc
  77. +2 −2 tests/directory_test.cc
  78. +9 −8 tests/rdf_tests.cc
  79. +71 −0 tests/rdfquery_test.cc
  80. +6 −4 tests/stream_test.cc
  81. +14 −14 tests/zip_test.cc
  82. +0 −1 third_party/gtest
@@ -1,3 +1,40 @@
# http://www.gnu.org/software/automake

Makefile.in

# http://www.gnu.org/software/autoconf

/autom4te.cache
/autoscan.log
/autoscan-*.log
/aclocal.m4
/compile
/config.h.in
/configure
/configure.scan
/depcomp
/install-sh
/missing
/stamp-h1
/config

/config.h
/config.log
/config.status

# Additional artefacts.
Makefile
/docs/html/
/docs/latex/
/docs/Doxyfile
/docs/doxyfile.stamp
Makefile.in

# C++ Dev

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
@@ -15,6 +52,7 @@

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
@@ -27,6 +65,31 @@
*.out
*.app

# IDE (netbeans)
/nbproject

# IDE (eclipse)
.settings/
.autotools
.cproject
.project

# Visual Studio transient project files.
*.idf
*.sdf
.vs/
*.suo
*.vcxproj.user

# IDE (Xcode)
.dirstamp
.DS_Store
/xcode/libs


# Build
.deps/

.depend
test_filename.bin
*_test
@@ -35,6 +98,7 @@ src/aff4imager
*~

doxygen/
third_party/*

# autoconf related files.
Makefile
@@ -49,3 +113,227 @@ libtool

build/
*.egg-info/

## Some manual tests of stream/map extraction
*.001
core
tests/*.log
tests/*.trs

#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2015 updates:
# - Fixed typo in "xccheckout" line - thanks to @lyck for pointing it out!
# - Fixed the .idea optional ignore. Thanks to @hashier for pointing this out
# - Finally added "xccheckout" to the ignore. Apple still refuses to answer support requests about this, but in practice it seems you should ignore it.
# - minor tweaks from Jona and Coeur (slightly more precise xc* filtering/names)
# 2014 updates:
# - appended non-standard items DISABLED by default (uncomment if you use those tools)
# - removed the edit that an SO.com moderator made without bothering to ask me
# - researched CocoaPods .lock more carefully, thanks to Gokhan Celiker
# 2013 updates:
# - fixed the broken "save personal Schemes"
# - added line-by-line explanations for EVERYTHING (some were missing)
#
# NB: if you are storing "built" products, this WILL NOT WORK,
# and you should use a different .gitignore (or none at all)
# This file is for SOURCE projects, where there are many extra
# files that we want to exclude
#
#########################

#####
# OS X temporary files that should never be committed
#
# c.f. http://www.westwind.com/reference/os-x/invisibles.html

.DS_Store

# c.f. http://www.westwind.com/reference/os-x/invisibles.html

.Trashes

# c.f. http://www.westwind.com/reference/os-x/invisibles.html

*.swp

#
# *.lock - this is used and abused by many editors for many different things.
# For the main ones I use (e.g. Eclipse), it should be excluded
# from source-control, but YMMV.
# (lock files are usually local-only file-synchronization on the local FS that should NOT go in git)
# c.f. the "OPTIONAL" section at bottom though, for tool-specific variations!
#
# In particular, if you're using CocoaPods, you'll want to comment-out this line:
*.lock


#
# profile - REMOVED temporarily (on double-checking, I can't find it in OS X docs?)
#profile


####
# Xcode temporary files that should never be committed
#
# NB: NIB/XIB files still exist even on Storyboard projects, so we want this...

*~.nib


####
# Xcode build files -
#
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData"

DerivedData/

# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build"

build/


#####
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)
#
# This is complicated:
#
# SOMETIMES you need to put this file in version control.
# Apple designed it poorly - if you use "custom executables", they are
# saved in this file.
# 99% of projects do NOT use those, so they do NOT want to version control this file.
# ..but if you're in the 1%, comment out the line "*.pbxuser"

# .pbxuser: http://lists.apple.com/archives/xcode-users/2004/Jan/msg00193.html

*.pbxuser

# .mode1v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html

*.mode1v3

# .mode2v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html

*.mode2v3

# .perspectivev3: http://stackoverflow.com/questions/5223297/xcode-projects-what-is-a-perspectivev3-file

*.perspectivev3

# NB: also, whitelist the default ones, some projects need to use these
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3


####
# Xcode 4 - semi-personal settings
#
# Apple Shared data that Apple put in the wrong folder
# c.f. http://stackoverflow.com/a/19260712/153422
# FROM ANSWER: Apple says "don't ignore it"
# FROM COMMENTS: Apple is wrong; Apple code is too buggy to trust; there are no known negative side-effects to ignoring Apple's unofficial advice and instead doing the thing that actively fixes bugs in Xcode
# Up to you, but ... current advice: ignore it.
*.xccheckout

#
#
# OPTION 1: ---------------------------------
# throw away ALL personal settings (including custom schemes!
# - unless they are "shared")
# As per build/ and DerivedData/, this ought to have a trailing slash
#
# NB: this is exclusive with OPTION 2 below
xcuserdata/

# OPTION 2: ---------------------------------
# get rid of ALL personal settings, but KEEP SOME OF THEM
# - NB: you must manually uncomment the bits you want to keep
#
# NB: this *requires* git v1.8.2 or above; you may need to upgrade to latest OS X,
# or manually install git over the top of the OS X version
# NB: this is exclusive with OPTION 1 above
#
#xcuserdata/**/*

# (requires option 2 above): Personal Schemes
#
#!xcuserdata/**/xcschemes/*

####
# XCode 4 workspaces - more detailed
#
# Workspaces are important! They are a core feature of Xcode - don't exclude them :)
#
# Workspace layout is quite spammy. For reference:
#
# /(root)/
# /(project-name).xcodeproj/
# project.pbxproj
# /project.xcworkspace/
# contents.xcworkspacedata
# /xcuserdata/
# /(your name)/xcuserdatad/
# UserInterfaceState.xcuserstate
# /xcshareddata/
# /xcschemes/
# (shared scheme name).xcscheme
# /xcuserdata/
# /(your name)/xcuserdatad/
# (private scheme).xcscheme
# xcschememanagement.plist
#
#

####
# Xcode 4 - Deprecated classes
#
# Allegedly, if you manually "deprecate" your classes, they get moved here.
#
# We're using source-control, so this is a "feature" that we do not want!

*.moved-aside

####
# OPTIONAL: Some well-known tools that people use side-by-side with Xcode / iOS development
#
# NB: I'd rather not include these here, but gitignore's design is weak and doesn't allow
# modular gitignore: you have to put EVERYTHING in one file.
#
# COCOAPODS:
#
# c.f. http://guides.cocoapods.org/using/using-cocoapods.html#what-is-a-podfilelock
# c.f. http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
#!Podfile.lock
#
# RUBY:
#
# c.f. http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
#
#!Gemfile.lock
#
# IDEA:
#
# c.f. https://www.jetbrains.com/objc/help/managing-projects-under-version-control.html?search=workspace.xml
#
#.idea/workspace.xml
#
# TEXTMATE:
#
# -- UNVERIFIED: c.f. http://stackoverflow.com/a/50283/153422
#
#tm_build_errors

####
# UNKNOWN: recommended by others, but I can't discover what these files are
#
@@ -1,3 +1,3 @@
[submodule "gtest"]
[submodule "third_party/gtest"]
path = third_party/gtest
url = https://github.com/scudette/gtest.git
33 INSTALL
@@ -13,4 +13,35 @@ TESTING
=======

* Build and run the tests:
$ make check
$ make check


BUILDING OS X
================

I have it building (somewhat clean) on OS X now:

$ cd ~/git
$ git clone ssh://bastion/srv/git/aff4.git
$ cd aff4
$ git submodule update --init third_party/gtest
Ignore the error about tree reference.
$ cd third_party/gtest
$ git reset --hard
$ cd ../..
$ ./autogen.sh
$ ./configure CC=clang CXX=clang++ CXXFLAGS="-std=c++11 -stdlib=libc++ -O2 -g0 -I/opt/local/include" LDFLAGS="-stdlib=libc++ -L/opt/local/lib"
$ make

Requirements via macports:
* zlib
* raptor2
* google-glog
* pcrexx
* tclap (missing *.pc file - place in /opt/local/lib/pkgconfig/)

Requirements via manual installation:
* snappy
* uuid

For the manual installations, need to ensure they are installed in /opt/local. ("./configure --prefix=/opt/local")
@@ -1,4 +1,5 @@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

SUBDIRS = src tests
SUBDIRS = src tests docs
dist_doc_DATA = README.md
Oops, something went wrong.

0 comments on commit 3251f4e

Please sign in to comment.