Commit graph

25 commits

Author SHA1 Message Date
Thomas Haller 977ea352a0
all: update deprecated SPDX license identifiers
These SPDX license identifiers are deprecated ([1]). Update them.

[1] https://spdx.org/licenses/

  sed \
     -e '1 s%^/\* SPDX-License-Identifier: \(GPL-2.0\|LGPL-2.1\)+ \*/$%/* SPDX-License-Identifier: \1-or-later */%' \
     -e '1,2 s%^\(--\|#\|//\) SPDX-License-Identifier: \(GPL-2.0\|LGPL-2.1\)+$%\1 SPDX-License-Identifier: \2-or-later%' \
     -i \
     $(git grep -l SPDX-License-Identifier -- \
         ':(exclude)shared/c-*/' \
         ':(exclude)shared/n-*/' \
         ':(exclude)shared/systemd/src' \
         ':(exclude)src/systemd/src')
2021-01-05 09:46:21 +01:00
Thomas Haller 3b69f02164 all: unify format of our Copyright source code comments
```bash

readarray -d '' FILES < <(
  git ls-files -z \
    ':(exclude)po' \
    ':(exclude)shared/c-rbtree' \
    ':(exclude)shared/c-list' \
    ':(exclude)shared/c-siphash' \
    ':(exclude)shared/c-stdaux' \
    ':(exclude)shared/n-acd' \
    ':(exclude)shared/n-dhcp4' \
    ':(exclude)src/systemd/src' \
    ':(exclude)shared/systemd/src' \
    ':(exclude)m4' \
    ':(exclude)COPYING*'
  )

sed \
  -e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) *[-–] *\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C1pyright#\5 - \7#\9/' \
  -e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) *[,] *\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C2pyright#\5, \7#\9/' \
  -e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C3pyright#\5#\7/' \
  -e 's/^Copyright \(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/C4pyright#\1#\3/' \
  -i \
  "${FILES[@]}"

echo ">>> untouched Copyright lines"
git grep Copyright "${FILES[@]}"

echo ">>> Copyright lines with unusual extra"
git grep '\<C[0-9]pyright#' "${FILES[@]}" | grep -i reserved

sed \
  -e 's/\<C[0-9]pyright#\([^#]*\)#\(.*\)$/Copyright (C) \1 \2/' \
  -i \
  "${FILES[@]}"

```

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/298
2019-10-02 17:03:52 +02:00
Thomas Haller abff46cacf all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
Lubomir Rintel 24028a2246 all: SPDX header conversion
$ find * -type f |xargs perl contrib/scripts/spdx.pl
  $ git rm contrib/scripts/spdx.pl
2019-09-10 11:19:56 +02:00
Thomas Haller 3c47285f4a all: drop vim file variables from source files
sed '1,3 { /^\(#\|--\) *vim:/d }; 1 { /^\/\* *vim:.*\*\/$/ d}' -i $(git grep -l 'vim:')
2019-06-11 10:08:07 +02:00
Thomas Haller c0e075c902 all: drop emacs file variables from source files
We no longer add these. If you use Emacs, configure it yourself.

Also, due to our "smart-tab" usage the editor anyway does a subpar
job handling our tabs. However, on the upside every user can choose
whatever tab-width he/she prefers. If "smart-tabs" are used properly
(like we do), every tab-width will work.

No manual changes, just ran commands:

    F=($(git grep -l -e '-\*-'))
    sed '1 { /\/\* *-\*-  *[mM]ode.*\*\/$/d }'     -i "${F[@]}"
    sed '1,4 { /^\(#\|--\|dnl\) *-\*- [mM]ode/d }' -i "${F[@]}"

Check remaining lines with:

    git grep -e '-\*-'

The ultimate purpose of this is to cleanup our files and eventually use
SPDX license identifiers. For that, first get rid of the boilerplate lines.
2019-06-11 10:04:00 +02:00
Thomas Haller 28da0154fc all: drop trailing spaces 2018-02-07 13:32:04 +01:00
Jiří Klimeš c391fb299b nm-import-openvpn: sort the options alphabetically 2016-11-10 20:56:44 +01:00
Jiří Klimeš 3219bb3b76 nm-import-openvpn: remove old code for 'dev' option 2016-11-10 20:56:44 +01:00
Jiří Klimeš 79643ce28a nm-import-openvpn: parse quoted string as a single word
It is necessary, for example, for this to work:
verify-x509-name "C=US, L=Cambridge, CN=GNOME, emailAddress=networkmanager-list@gnome.org" subject
2016-11-10 20:56:44 +01:00
Jiří Klimeš c4ed2483b2 nm-import-openvpn: import 'verify-x509-name' option
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=b51b3562ce079cc0be426e968fe1c90faadc0efd
2016-11-10 20:56:44 +01:00
Jiří Klimeš bc446c3ab8 nm-import-openvpn: improve importing 'comp-lzo' option
https://bugzilla.gnome.org/show_bug.cgi?id=769177
https://bugzilla.redhat.com/show_bug.cgi?id=1355688
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833166
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=62bdd278d69cc396479af9d05a0b776d5ad386bf
2016-11-10 20:56:44 +01:00
Jiří Klimeš e58cfa4fc1 nm-import-openvpn: improve parsing and checking 'route' option 2016-11-10 20:56:44 +01:00
Jiří Klimeš f7e4b748e1 nm-import-openvpn: import 'ns-cert-type' option
https://bugzilla.gnome.org/show_bug.cgi?id=719430
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=644e55ed404edbc953e323d13c57297b53cc0f8b
2016-11-10 20:56:44 +01:00
Jiří Klimeš 978328712b nm-import-openvpn: import 'tls-cipher' option
https://bugzilla.gnome.org/show_bug.cgi?id=763484
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=d7a84afe1d1948c7990a08b18913e65550c222a0
2016-11-10 20:56:44 +01:00
Jiří Klimeš 367d13a7dd nm-import-openvpn: import 'max-routes' option
https://bugzilla.gnome.org/show_bug.cgi?id=720097
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=c4d45e51280d5b0cb8c5e8f826d68c3262162080
2016-11-10 20:56:44 +01:00
Jiří Klimeš 966e0fb50e nm-import-openvpn: import 'tun-ipv6' option
https://bugzilla.gnome.org/show_bug.cgi?id=761907
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=ffda527d8a932f2e3419d6c64623540e5b190d9e
2016-11-10 20:56:44 +01:00
Jiří Klimeš acaf7cf641 nm-import-openvpn: import 'route' option
https://bugzilla.gnome.org/show_bug.cgi?id=753578
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=4eb5f3ad43cdc62c6d4d254731e24c90b87ba91a
2015-12-07 12:22:45 +01:00
Jiří Klimeš 02cfeac668 nm-import-openvpn: import 'keepalive' option
https://bugzilla.gnome.org/show_bug.cgi?id=651657
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=6afd16bcacd87a019e12f4df0d63a9e0e8c94e9e
2015-08-19 12:39:06 +02:00
Jiří Klimeš e655358d44 nm-import-openvpn: import 'ping', 'ping-exit' and 'ping-restart' options
https://bugzilla.gnome.org/show_bug.cgi?id=651657
https://git.gnome.org/browse/network-manager-openvpn/commit/?id=054cc997ca38e5d786859fa6d032c4404af3d28a
2015-08-19 12:23:04 +02:00
Jiří Klimeš bde1cd342e nm-import-openvpn: improve error checking 2015-08-19 12:23:04 +02:00
Jiří Klimeš a646870684 nm-import-openvpn: fix importing OpenVPN configuration with 'tls-client' 2015-08-19 10:58:29 +02:00
Jiří Klimeš a5e43ab510 nm-import-openvpn: import 'float' OpenVPN option
https://bugzilla.gnome.org/show_bug.cgi?id=737108

Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2015-05-28 12:04:58 +02:00
Jiří Klimeš 466515e953 contrib/scripts: fix importing 'remote' and 'remote-random' options for openvpn
see https://bugzilla.redhat.com/show_bug.cgi?id=1194643
2015-05-19 09:21:50 +02:00
Jiří Klimeš 1a2798d1a4 contrib/scripts: nm-import-openvpn - script for importing OpenVPN configs to NM
Synopsis:
 $ nm-import-openvpn -i <infile1> <infile2> ...

 $ nm-import-openvpn <infile> <outfile>

Put the file to NetworkManager:
 # cp <outfile> /etc/NetworkManager/system-connections/
 # chmod 600 /etc/NetworkManager/system-connections/<outfile>
 # nmcli con load /etc/NetworkManager/system-connections/<outfile>
2015-05-19 09:21:50 +02:00