diff options
Diffstat (limited to 'contrib/conf')
-rwxr-xr-x | contrib/conf/commit-msg | 34 | ||||
-rw-r--r-- | contrib/conf/gnunet/gnunet-system.conf | 14 | ||||
-rw-r--r-- | contrib/conf/gnunet/gnunet-user.conf | 4 | ||||
-rw-r--r-- | contrib/conf/gnunet/meson.build | 6 | ||||
-rw-r--r-- | contrib/conf/gnunet/no_autostart_above_core.conf | 6 | ||||
-rw-r--r-- | contrib/conf/gnunet/no_forcestart.conf | 6 | ||||
-rw-r--r-- | contrib/conf/meson.build | 1 | ||||
-rwxr-xr-x | contrib/conf/prepare-commit-msg | 37 | ||||
-rw-r--r-- | contrib/conf/uncrustify.cfg | 2 | ||||
-rwxr-xr-x | contrib/conf/uncrustify_precommit | 11 |
10 files changed, 96 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 | |||
5 | COMMIT_MSG_FILE=$1 | ||
6 | |||
7 | exec 1>&2 | ||
8 | |||
9 | RET=0 | ||
10 | changed=$(git diff --cached --name-only) | ||
11 | |||
12 | for f in $changed; | ||
13 | do | ||
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 | ||
25 | done | ||
26 | |||
27 | # If no NEWS line found, abort | ||
28 | if [ $RET = 1 ]; | ||
29 | then | ||
30 | echo "Your commit includes staged changes that indicate an API change which requires a NEWS line." | ||
31 | else | ||
32 | echo "Your commit does not include API changes" | ||
33 | fi | ||
34 | exit 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 | 2 | GNUNET_HOME = /var/lib/gnunet/ |
3 | # for the system-wide "gnunet" user. | 3 | GNUNET_DATA_HOME = /var/lib/gnunet/data/ |
4 | [arm] | 4 | GNUNET_RUNTIME_DIR = /var/run/gnunet/ |
5 | SYSTEM_ONLY = YES | ||
6 | USER_ONLY = NO | ||
7 | 5 | ||
6 | [arm] | ||
7 | START_SYSTEM_SERVICES = YES | ||
8 | START_USER_SERVICES = NO | ||
9 | OPTIONS = -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] |
6 | SYSTEM_ONLY = NO | 6 | START_SYSTEM_SERVICES = NO |
7 | USER_ONLY = YES | 7 | START_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 @@ | |||
1 | configure_file(copy: true, | ||
2 | input: 'no_forcestart.conf', | ||
3 | output: 'no_forcestart.conf') | ||
4 | configure_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] |
75 | START_ON_DEMAND = NO | 75 | START_ON_DEMAND = NO |
76 | 76 | ||
77 | [psyc] | ||
78 | START_ON_DEMAND = NO | ||
79 | |||
80 | [rps] | 77 | [rps] |
81 | START_ON_DEMAND = NO | 78 | START_ON_DEMAND = NO |
82 | 79 | ||
@@ -89,8 +86,5 @@ START_ON_DEMAND = NO | |||
89 | [sensor] | 86 | [sensor] |
90 | START_ON_DEMAND = NO | 87 | START_ON_DEMAND = NO |
91 | 88 | ||
92 | [zonemaster-monitor] | ||
93 | START_ON_DEMAND = NO | ||
94 | |||
95 | [zonemaster] | 89 | [zonemaster] |
96 | START_ON_DEMAND = NO | 90 | START_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] |
41 | IMMEDIATE_START = NO | 41 | IMMEDIATE_START = NO |
42 | 42 | ||
43 | [zonemaster-monitor] | ||
44 | IMMEDIATE_START = NO | ||
45 | |||
46 | [psyc] | ||
47 | IMMEDIATE_START = NO | ||
48 | |||
49 | [rps] | 43 | [rps] |
50 | IMMEDIATE_START = NO | 44 | IMMEDIATE_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 | |||
5 | COMMIT_MSG_FILE=$1 | ||
6 | COMMIT_SOURCE=$2 | ||
7 | SHA1=$3 | ||
8 | |||
9 | exec 1>&2 | ||
10 | |||
11 | RET=0 | ||
12 | changed=$(git diff --cached --name-only) | ||
13 | |||
14 | for f in $changed; | ||
15 | do | ||
16 | # Only headers in include | ||
17 | if echo $f | grep \src\/include\/.\*\.h\$ > /dev/null | ||
18 | then | ||
19 | RET=1 | ||
20 | fi | ||
21 | done | ||
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. | ||
27 | if [ -z "$COMMIT_SOURCE" ]; | ||
28 | then | ||
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" | ||
36 | fi | ||
37 | exit 0 | ||
diff --git a/contrib/conf/uncrustify.cfg b/contrib/conf/uncrustify.cfg index 8c9df2c43..af2d8e69c 100644 --- a/contrib/conf/uncrustify.cfg +++ b/contrib/conf/uncrustify.cfg | |||
@@ -28,7 +28,7 @@ ls_code_width=true | |||
28 | pos_arith=lead | 28 | pos_arith=lead |
29 | 29 | ||
30 | # Fully parenthesize boolean exprs | 30 | # Fully parenthesize boolean exprs |
31 | mod_full_paren_if_bool=true | 31 | mod_full_paren_if_bool=false |
32 | 32 | ||
33 | # Braces should be on their own line | 33 | # Braces should be on their own line |
34 | nl_fdef_brace=add | 34 | nl_fdef_brace=add |
diff --git a/contrib/conf/uncrustify_precommit b/contrib/conf/uncrustify_precommit index 24873330f..8e0a605b3 100755 --- a/contrib/conf/uncrustify_precommit +++ b/contrib/conf/uncrustify_precommit | |||
@@ -28,8 +28,11 @@ done | |||
28 | 28 | ||
29 | if [ $RET = 1 ]; | 29 | if [ $RET = 1 ]; |
30 | then | 30 | then |
31 | echo "Run" | 31 | echo "================================================================" |
32 | echo "uncrustify --no-backup -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 "================================================================" | ||
34 | fi | 36 | fi |
35 | exit $RET | 37 | # Do not fail |
38 | exit 0 | ||