Merge in default ENGINE-259
authorDamiano Boppart <damiano@pep-security.net>
Tue, 19 Sep 2017 14:42:44 +0200
branchENGINE-259
changeset 20717bdd10417b1c
parent 2064 c222d7d481ad
parent 2069 21c3f4a8174f
child 2072 ecc35092791d
Merge in default
     1.1 --- a/Makefile.conf	Mon Sep 18 16:09:57 2017 +0200
     1.2 +++ b/Makefile.conf	Tue Sep 19 14:42:44 2017 +0200
     1.3 @@ -3,14 +3,22 @@
     1.4  # This file may be used under the terms of the GNU General Public License version 3
     1.5  # see LICENSE.txt
     1.6  
     1.7 -# This file assembles all the make variables that a maintainer or dev may want to taylor to his or her needs on a given platform.
     1.8 +# This file assembles all the make variables that a maintainer or dev may
     1.9 +# want to taylor to his or her needs on a given platform.
    1.10  
    1.11 -# To use custom build configuration variables, put them in a new file with the path `build-config/<name>.conf`. Execute `export PLATFORM_OVERRIDE=<name>` before running make. If this environment variable is not set, make will load a default configuration for your platform.
    1.12 +# To use custom build configuration variables, put them in a new file with
    1.13 +# the path `build-config/<name>.conf`.
    1.14 +# Execute `export PLATFORM_OVERRIDE=<name>` before running make.  If this
    1.15 +# environment variable is not set, make will load a default configuration
    1.16 +# for your platform.
    1.17  
    1.18  BUILD_CONFIG:=$(dir $(lastword $(MAKEFILE_LIST)))build-config
    1.19  
    1.20  include $(BUILD_CONFIG)/common.conf
    1.21 -# cross-compiling is currently not supported, but maybe you can hack something with `PLATFORM_OVERRIDE`
    1.22 +
    1.23 +# cross-compiling is currently not supported, but maybe you can hack
    1.24 +# something with `PLATFORM_OVERRIDE`
    1.25 +
    1.26  ifeq ($(BUILD_ON),$(BUILD_FOR))
    1.27      include $(BUILD_CONFIG)/$(BUILD_ON).conf
    1.28  else
     2.1 --- a/build-config/common.conf	Mon Sep 18 16:09:57 2017 +0200
     2.2 +++ b/build-config/common.conf	Tue Sep 19 14:42:44 2017 +0200
     2.3 @@ -3,28 +3,42 @@
     2.4  # This file may be used under the terms of the GNU General Public License version 3
     2.5  # see LICENSE.txt
     2.6  
     2.7 -# General remark: to use (only) system libraries, set all the *_INC and *_LIB variables to the empty string.
     2.8 -# All the *_INC and *_LIB variables are command line flags, not paths. Thus, all *_INC variables' values must start with "-I", and all *_LIB variables' values must start with "-L".
     2.9 +# General remark: to use (only) system libraries, set all the *_INC and
    2.10 +# *_LIB variables to the empty string.
    2.11 +# All the *_INC and *_LIB variables are command line flags, not paths. 
    2.12 +# Thus, all *_INC variables' values must start with "-I", and all *_LIB
    2.13 +# variables' values must start with "-L".
    2.14  
    2.15  ######### General #########
    2.16 +
    2.17  BUILD_ON:=$(shell uname)
    2.18 +
    2.19  # This variable specifies the platform that the engine should be cross-compiled for.
    2.20  BUILD_FOR=$(BUILD_ON)
    2.21 +
    2.22  # Installation path prefix for libraries and binaries, except for system.db
    2.23  PREFIX=$(HOME)
    2.24 +
    2.25  # Installation path for system.db
    2.26  SYSTEM_DB=/usr/local/share/pEp/system.db
    2.27 +
    2.28  # Filename of the pEpEngine library
    2.29  #TARGET This option is platform-specific
    2.30 -# If not empty, create a debug build. This variable is ineffective in your PLATFORM_OVERRIDE.conf file.
    2.31 +
    2.32 +# If not empty, create a debug build.  This variable is ineffective in your
    2.33 +# PLATFORM_OVERRIDE.conf file.
    2.34  DEBUG=
    2.35 -# If not empty, print compiler warnings. This variable is ineffective in your PLATFORM_OVERRIDE.conf file.
    2.36 +
    2.37 +# If not empty, print compiler warnings.  This variable is ineffective in
    2.38 +# your PLATFORM_OVERRIDE.conf file.
    2.39  WARN=placeholder
    2.40  
    2.41  ######### C #########
    2.42  #CC This option is platform-specific
    2.43  CPPFLAGS=
    2.44 +
    2.45  #CFLAGS This option is platform-specific
    2.46 +
    2.47  # Additional CFLAGS used for compiling ASN1C-generated code
    2.48  #CFLAGS_GENERATED This option is platform-specific
    2.49  
    2.50 @@ -34,7 +48,9 @@
    2.51  
    2.52  ######### C and C++ #########
    2.53  TARGET_ARCH=
    2.54 -# The following two variables will be appended to. You can thus not set them to a fixed value here.
    2.55 +
    2.56 +# The following two variables will be appended to.  You can thus not set
    2.57 +# them to a fixed value here.
    2.58  #LDFLAGS= This option is platform-specific
    2.59  LDLIBS=
    2.60  
    2.61 @@ -46,6 +62,7 @@
    2.62  ######### asn1c #########
    2.63  # asn1c binary
    2.64  ASN1C=asn1c
    2.65 +
    2.66  # asn1c include search flag
    2.67  ASN1C_INC=
    2.68  #ASN1C_INC=-I$(HOME)/include
    2.69 @@ -53,27 +70,36 @@
    2.70  ######### libetpan #########
    2.71  # libetpan library search flag
    2.72  ETPAN_LIB=-L$(PREFIX)/lib
    2.73 +
    2.74  # libetpan include search flag
    2.75  ETPAN_INC=-I$(PREFIX)/include
    2.76  
    2.77  ######### sqlite3 #########
    2.78 -# If empty (or undefined), compile sqlite3 from the sources shipped with the pEp distribution. Otherwise, use an sqlite3 implementation found in the OS's include/library paths.
    2.79 +# If empty (or undefined), compile sqlite3 from the sources shipped with the
    2.80 +# pEp distribution.  Otherwise, use an sqlite3 implementation found in the
    2.81 +# OS's include/library paths.
    2.82  SQLITE3_FROM_OS=placeholder
    2.83  
    2.84  ######### OpenPGP #########
    2.85  # Path of GPG binary
    2.86  GPG_CMD:=$(shell gpgconf --list-components | awk -F: '/^gpg:/ { print $$3; exit 0; }')
    2.87 +
    2.88  # Selects OpenPGP implementation. must be either `GPG` or `NETPGP`
    2.89  OPENPGP=GPG
    2.90 +
    2.91  # Path of libGPGME binary
    2.92  #LIBGPGME This option is platform-specific
    2.93 +
    2.94  # libGPGME library search flag
    2.95  #GPGME_LIB= This option is platform-specific
    2.96 +
    2.97  # libGPGME include search flag
    2.98  #GPGME_INC= This option is platform-specific
    2.99 +
   2.100  # NETPGP library search flag
   2.101  NETPGP_LIB=
   2.102  #NETPGP_LIB=-L$(PREFIX)/lib
   2.103 +
   2.104  # libGPGME include search flag
   2.105  NETPGP_INC=
   2.106  #NETPGP_INC=-I$(PREFIX)/include
   2.107 @@ -87,5 +113,6 @@
   2.108  EXTRA_MACROS=
   2.109  
   2.110  ######### Misc #########
   2.111 -# FIXME Maybe include these variables here. Check how they are used throughout the project before setting them here
   2.112 +# FIXME Maybe include these variables here.  Check how they are used
   2.113 +# throughout the project before setting them here
   2.114  #LLDB_BIN
     3.1 --- a/src/pgp_gpg.c	Mon Sep 18 16:09:57 2017 +0200
     3.2 +++ b/src/pgp_gpg.c	Tue Sep 19 14:42:44 2017 +0200
     3.3 @@ -107,7 +107,7 @@
     3.4      if (!at)
     3.5          at = address + addr_len;
     3.6          
     3.7 -    char* retval = calloc(1, sizeof(char)*(addr_len + 1));
     3.8 +    char* retval = calloc(1, addr_len + 1);
     3.9  
    3.10      const char* addr_curr = address;
    3.11      char* retval_curr = retval;
     4.1 --- a/test/pEp_subject_received_test.cc	Mon Sep 18 16:09:57 2017 +0200
     4.2 +++ b/test/pEp_subject_received_test.cc	Tue Sep 19 14:42:44 2017 +0200
     4.3 @@ -36,7 +36,7 @@
     4.4      pEp_identity * me = new_identity("pep.test.recip@kgrothoff.org", "93D19F24AD6F4C4BA9134AAF84D9217908DB0AEE", PEP_OWN_USERID, "pEp Test Recipient");    
     4.5      PEP_STATUS status = myself(session, me);
     4.6      
     4.7 -    pEp_identity * you = new_identity("pep.test.apple@pep-project.org", NULL, "TOFU_pep.test.apple@pep-project.org", "pEp Test Recipient");    
     4.8 +    pEp_identity * you = new_identity("pep.test.alice@pep-project.org", NULL, "TOFU_pep.test.alice@pep-project.org", "Alice Test");    
     4.9      
    4.10      status = update_identity(session, you);
    4.11      trust_personal_key(session, you);