aboutsummaryrefslogtreecommitdiff
path: root/contrib/conf
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/conf')
-rwxr-xr-xcontrib/conf/commit-msg34
-rw-r--r--contrib/conf/gnunet/gnunet-system.conf14
-rw-r--r--contrib/conf/gnunet/gnunet-user.conf4
-rw-r--r--contrib/conf/gnunet/meson.build6
-rw-r--r--contrib/conf/gnunet/no_autostart_above_core.conf6
-rw-r--r--contrib/conf/gnunet/no_forcestart.conf6
-rw-r--r--contrib/conf/meson.build1
-rwxr-xr-xcontrib/conf/prepare-commit-msg37
-rw-r--r--contrib/conf/uncrustify.cfg19
-rwxr-xr-xcontrib/conf/uncrustify_precommit11
10 files changed, 113 insertions, 25 deletions
diff --git a/contrib/conf/commit-msg b/contrib/conf/commit-msg
new file mode 100755
index 000000000..e57333c00
--- /dev/null
+++ b/contrib/conf/commit-msg
@@ -0,0 +1,34 @@
1#!/bin/bash
2
3# use as .git/hooks/commit-msg
4
5COMMIT_MSG_FILE=$1
6
7exec 1>&2
8
9RET=0
10changed=$(git diff --cached --name-only)
11
12for f in $changed;
13do
14 # Only headers in include
15 if echo $f | grep \src\/include\/.\*\.h\$ > /dev/null
16 then
17 RET=1
18 # Check if it has a NEWS line
19 if cat $COMMIT_MSG_FILE | grep -i "^NEWS:\s[-,a-zA-Z][a-zA-Z]*" > /dev/null
20 then
21 RET=0
22 break
23 fi
24 fi
25done
26
27# If no NEWS line found, abort
28if [ $RET = 1 ];
29then
30 echo "Your commit includes staged changes that indicate an API change which requires a NEWS line."
31else
32 echo "Your commit does not include API changes"
33fi
34exit 0
diff --git a/contrib/conf/gnunet/gnunet-system.conf b/contrib/conf/gnunet/gnunet-system.conf
index 6f9b0f379..dc0528cf3 100644
--- a/contrib/conf/gnunet/gnunet-system.conf
+++ b/contrib/conf/gnunet/gnunet-system.conf
@@ -1,7 +1,9 @@
1# Sample configuration file to be installed in /etc/gnunet.conf 1[path]
2# for a multi-user GNUnet setup. This is then the configuration 2GNUNET_HOME = /var/lib/gnunet/
3# for the system-wide "gnunet" user. 3GNUNET_DATA_HOME = /var/lib/gnunet/data/
4[arm] 4GNUNET_RUNTIME_DIR = /var/run/gnunet/
5SYSTEM_ONLY = YES
6USER_ONLY = NO
7 5
6[arm]
7START_SYSTEM_SERVICES = YES
8START_USER_SERVICES = NO
9OPTIONS = -l /var/log/gnunet.log
diff --git a/contrib/conf/gnunet/gnunet-user.conf b/contrib/conf/gnunet/gnunet-user.conf
index de95c216c..f4763e45a 100644
--- a/contrib/conf/gnunet/gnunet-user.conf
+++ b/contrib/conf/gnunet/gnunet-user.conf
@@ -3,6 +3,6 @@
3# in the $HOME directory of each normal user (and in 3# in the $HOME directory of each normal user (and in
4# /etc/skel/). 4# /etc/skel/).
5[arm] 5[arm]
6SYSTEM_ONLY = NO 6START_SYSTEM_SERVICES = NO
7USER_ONLY = YES 7START_USER_SERVICES = YES
8 8
diff --git a/contrib/conf/gnunet/meson.build b/contrib/conf/gnunet/meson.build
new file mode 100644
index 000000000..0419784fb
--- /dev/null
+++ b/contrib/conf/gnunet/meson.build
@@ -0,0 +1,6 @@
1configure_file(copy: true,
2 input: 'no_forcestart.conf',
3 output: 'no_forcestart.conf')
4configure_file(copy: true,
5 input: 'no_autostart_above_core.conf',
6 output: 'no_autostart_above_core.conf')
diff --git a/contrib/conf/gnunet/no_autostart_above_core.conf b/contrib/conf/gnunet/no_autostart_above_core.conf
index 478addd29..8ed4dcb60 100644
--- a/contrib/conf/gnunet/no_autostart_above_core.conf
+++ b/contrib/conf/gnunet/no_autostart_above_core.conf
@@ -74,9 +74,6 @@ START_ON_DEMAND = NO
74[social] 74[social]
75START_ON_DEMAND = NO 75START_ON_DEMAND = NO
76 76
77[psyc]
78START_ON_DEMAND = NO
79
80[rps] 77[rps]
81START_ON_DEMAND = NO 78START_ON_DEMAND = NO
82 79
@@ -89,8 +86,5 @@ START_ON_DEMAND = NO
89[sensor] 86[sensor]
90START_ON_DEMAND = NO 87START_ON_DEMAND = NO
91 88
92[zonemaster-monitor]
93START_ON_DEMAND = NO
94
95[zonemaster] 89[zonemaster]
96START_ON_DEMAND = NO 90START_ON_DEMAND = NO
diff --git a/contrib/conf/gnunet/no_forcestart.conf b/contrib/conf/gnunet/no_forcestart.conf
index 2c874489e..0c4a209be 100644
--- a/contrib/conf/gnunet/no_forcestart.conf
+++ b/contrib/conf/gnunet/no_forcestart.conf
@@ -40,12 +40,6 @@ IMMEDIATE_START = NO
40[zonemaster] 40[zonemaster]
41IMMEDIATE_START = NO 41IMMEDIATE_START = NO
42 42
43[zonemaster-monitor]
44IMMEDIATE_START = NO
45
46[psyc]
47IMMEDIATE_START = NO
48
49[rps] 43[rps]
50IMMEDIATE_START = NO 44IMMEDIATE_START = NO
51 45
diff --git a/contrib/conf/meson.build b/contrib/conf/meson.build
new file mode 100644
index 000000000..f0e4647df
--- /dev/null
+++ b/contrib/conf/meson.build
@@ -0,0 +1 @@
subdir('gnunet')
diff --git a/contrib/conf/prepare-commit-msg b/contrib/conf/prepare-commit-msg
new file mode 100755
index 000000000..a95f29430
--- /dev/null
+++ b/contrib/conf/prepare-commit-msg
@@ -0,0 +1,37 @@
1#!/bin/bash
2
3# use as .git/hooks/pre-commit
4
5COMMIT_MSG_FILE=$1
6COMMIT_SOURCE=$2
7SHA1=$3
8
9exec 1>&2
10
11RET=0
12changed=$(git diff --cached --name-only)
13
14for f in $changed;
15do
16 # Only headers in include
17 if echo $f | grep \src\/include\/.\*\.h\$ > /dev/null
18 then
19 RET=1
20 fi
21done
22
23# Only add custom message when there is no commit source
24# ($COMMIT_SOURCE is empty). Otherwise, keep the default message
25# proposed by Git. Possible commit source: message, template,
26# merge, squash or commit.
27if [ -z "$COMMIT_SOURCE" ];
28then
29 hint=$(cat "$COMMIT_MSG_FILE")
30 echo -e "# Our commit subject format policy is:\n# <subsystem>: <description>\n# Adding 'Issue #1234'/'Fixes #1234' into the description will automatically update/resolve issue #1234 in mantis." > "$COMMIT_MSG_FILE"
31 if [ $RET = 1 ];
32 then
33 echo -e "# Your commit includes staged changes that indicate an API change which requires a NEWS line." >> "$COMMIT_MSG_FILE"
34 fi
35 echo "$hint" >> "$COMMIT_MSG_FILE"
36fi
37exit 0
diff --git a/contrib/conf/uncrustify.cfg b/contrib/conf/uncrustify.cfg
index b02ebc4a5..af2d8e69c 100644
--- a/contrib/conf/uncrustify.cfg
+++ b/contrib/conf/uncrustify.cfg
@@ -4,7 +4,7 @@ output_tab_size = 2
4indent_columns = 2 4indent_columns = 2
5indent_with_tabs = 0 5indent_with_tabs = 0
6indent_case_brace = 2 6indent_case_brace = 2
7indent_label=0 7indent_label=-16
8 8
9code_width=80 9code_width=80
10#cmd_width=80 10#cmd_width=80
@@ -49,8 +49,12 @@ nl_assign_brace=remove
49 49
50# No extra newlines that cause noisy diffs 50# No extra newlines that cause noisy diffs
51nl_start_of_file=remove 51nl_start_of_file=remove
52nl_after_func_proto = 2
53nl_after_func_body = 3
52# If there's no new line, it's not a text file! 54# If there's no new line, it's not a text file!
53nl_end_of_file=add 55nl_end_of_file=add
56nl_max_blank_in_func = 3
57nl_max = 3
54 58
55sp_inside_paren = remove 59sp_inside_paren = remove
56 60
@@ -69,6 +73,7 @@ sp_between_ptr_star = remove
69sp_before_sparen = add 73sp_before_sparen = add
70 74
71sp_inside_fparen = remove 75sp_inside_fparen = remove
76sp_inside_sparen = remove
72 77
73# add space before function call and decl: "foo (x)" 78# add space before function call and decl: "foo (x)"
74sp_func_call_paren = add 79sp_func_call_paren = add
@@ -76,3 +81,15 @@ sp_func_proto_paren = add
76sp_func_proto_paren_empty = add 81sp_func_proto_paren_empty = add
77sp_func_def_paren = add 82sp_func_def_paren = add
78sp_func_def_paren_empty = add 83sp_func_def_paren_empty = add
84
85# We'd want it for "if ( (foo) || (bar) )", but not for "if (m())",
86# so as uncrustify doesn't give exactly what we want => ignore
87sp_paren_paren = ignore
88sp_inside_paren = remove
89sp_bool = force
90
91nl_func_type_name = force
92#nl_branch_else = add
93nl_else_brace = add
94nl_elseif_brace = add
95nl_for_brace = add
diff --git a/contrib/conf/uncrustify_precommit b/contrib/conf/uncrustify_precommit
index 3a06511d1..8e0a605b3 100755
--- a/contrib/conf/uncrustify_precommit
+++ b/contrib/conf/uncrustify_precommit
@@ -28,8 +28,11 @@ done
28 28
29if [ $RET = 1 ]; 29if [ $RET = 1 ];
30then 30then
31 echo "Run" 31 echo "================================================================"
32 echo "uncrustify --replace -c uncrustify.cfg ${crustified}" 32 echo " Your changes are ugly! "
33 echo "before committing." 33 echo " Uncrustify your code in your next commit. "
34 echo " See https://docs.gnunet.org/latest/developers/style.html#coding-style "
35 echo "================================================================"
34fi 36fi
35exit $RET 37# Do not fail
38exit 0