all: move "src/" directory to "src/core/"

Currently "src/" mostly contains the source code of the daemon.
I say mostly, because that is not true, there are also the device,
settings, wwan, ppp plugins, the initrd generator, the pppd and dhcp
helper, and probably more.

Also we have source code under libnm-core/, libnm/, clients/, and
shared/ directories. That is all confusing.

We should have one "src" directory, that contains subdirectories. Those
subdirectories should contain individual parts (libraries or
applications), that possibly have dependencies on other subdirectories.
There should be a flat hierarchy of directories under src/, which
contains individual modules.

As the name "src/" is already taken, that prevents any sensible
restructuring of the code.

As a first step, move "src/" to "src/core/". This gives space to
reorganize the code better by moving individual components into "src/".

For inspiration, look at systemd's "src/" directory.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/743
This commit is contained in:
Thomas Haller
2021-02-03 15:25:56 +01:00
parent 97ed143e04
commit ac1a9e03e4
961 changed files with 1623 additions and 1571 deletions

153
.gitignore vendored
View File

@@ -219,57 +219,57 @@ test-*.trs
/po/quot.sed
/po/remove-potcdate.sin
/src/NetworkManager
/src/NetworkManager-all-sym
/src/NetworkManager.ver
/src/devices/bluetooth/tests/nm-bt-test
/src/devices/tests/test-acd
/src/devices/tests/test-lldp
/src/devices/wifi/tests/test-devices-wifi
/src/devices/wwan/tests/test-service-providers
/src/dhcp/nm-dhcp-helper
/src/dhcp/tests/test-dhcp-dhclient
/src/dhcp/tests/test-dhcp-options
/src/dhcp/tests/test-dhcp-utils
/src/dnsmasq/tests/test-dnsmasq-utils
/src/initrd/nm-initrd-generator
/src/initrd/tests/test-cmdline-reader
/src/initrd/tests/test-dt-reader
/src/initrd/tests/test-ibft-reader
/src/nm-iface-helper
/src/ndisc/tests/test-ndisc-fake
/src/ndisc/tests/test-ndisc-linux
/src/platform/tests/monitor
/src/platform/tests/test-address-fake
/src/platform/tests/test-address-linux
/src/platform/tests/test-cleanup-fake
/src/platform/tests/test-cleanup-linux
/src/platform/tests/test-link-fake
/src/platform/tests/test-link-linux
/src/platform/tests/test-nmp-object
/src/platform/tests/test-platform-general
/src/platform/tests/test-route-fake
/src/platform/tests/test-route-linux
/src/platform/tests/test-tc-fake
/src/platform/tests/test-tc-linux
/src/settings/plugins/ifcfg-rh/nmdbus-ifcfg-rh.[ch]
/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh
/src/settings/plugins/ifupdown/tests/test-ifupdown
/src/settings/plugins/keyfile/tests/test-keyfile-settings
/src/settings/plugins/ifcfg-rh/tests/network-scripts/tmp/
/src/supplicant/tests/test-supplicant-config
/src/tests/config/test-config
/src/tests/test-core
/src/tests/test-core-with-expect
/src/tests/test-dcb
/src/tests/test-ip4-config
/src/tests/test-ip6-config
/src/tests/test-l3cfg
/src/tests/test-route-manager-fake
/src/tests/test-route-manager-linux
/src/tests/test-systemd
/src/tests/test-utils
/src/tests/test-wired-defname
/src/core/NetworkManager
/src/core/NetworkManager-all-sym
/src/core/NetworkManager.ver
/src/core/devices/bluetooth/tests/nm-bt-test
/src/core/devices/tests/test-acd
/src/core/devices/tests/test-lldp
/src/core/devices/wifi/tests/test-devices-wifi
/src/core/devices/wwan/tests/test-service-providers
/src/core/dhcp/nm-dhcp-helper
/src/core/dhcp/tests/test-dhcp-dhclient
/src/core/dhcp/tests/test-dhcp-options
/src/core/dhcp/tests/test-dhcp-utils
/src/core/dnsmasq/tests/test-dnsmasq-utils
/src/core/initrd/nm-initrd-generator
/src/core/initrd/tests/test-cmdline-reader
/src/core/initrd/tests/test-dt-reader
/src/core/initrd/tests/test-ibft-reader
/src/core/nm-iface-helper
/src/core/ndisc/tests/test-ndisc-fake
/src/core/ndisc/tests/test-ndisc-linux
/src/core/platform/tests/monitor
/src/core/platform/tests/test-address-fake
/src/core/platform/tests/test-address-linux
/src/core/platform/tests/test-cleanup-fake
/src/core/platform/tests/test-cleanup-linux
/src/core/platform/tests/test-link-fake
/src/core/platform/tests/test-link-linux
/src/core/platform/tests/test-nmp-object
/src/core/platform/tests/test-platform-general
/src/core/platform/tests/test-route-fake
/src/core/platform/tests/test-route-linux
/src/core/platform/tests/test-tc-fake
/src/core/platform/tests/test-tc-linux
/src/core/settings/plugins/ifcfg-rh/nmdbus-ifcfg-rh.[ch]
/src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh
/src/core/settings/plugins/ifupdown/tests/test-ifupdown
/src/core/settings/plugins/keyfile/tests/test-keyfile-settings
/src/core/settings/plugins/ifcfg-rh/tests/network-scripts/tmp/
/src/core/supplicant/tests/test-supplicant-config
/src/core/tests/config/test-config
/src/core/tests/test-core
/src/core/tests/test-core-with-expect
/src/core/tests/test-dcb
/src/core/tests/test-ip4-config
/src/core/tests/test-ip6-config
/src/core/tests/test-l3cfg
/src/core/tests/test-route-manager-fake
/src/core/tests/test-route-manager-linux
/src/core/tests/test-systemd
/src/core/tests/test-utils
/src/core/tests/test-wired-defname
/vapi/*.vapi
@@ -369,3 +369,54 @@ test-*.trs
/src/tests/test-general
/src/tests/test-general-with-expect
/src/tests/test-resolvconf-capture
/src/NetworkManager
/src/NetworkManager-all-sym
/src/NetworkManager.ver
/src/devices/bluetooth/tests/nm-bt-test
/src/devices/tests/test-acd
/src/devices/tests/test-lldp
/src/devices/wifi/tests/test-devices-wifi
/src/devices/wwan/tests/test-service-providers
/src/dhcp/nm-dhcp-helper
/src/dhcp/tests/test-dhcp-dhclient
/src/dhcp/tests/test-dhcp-options
/src/dhcp/tests/test-dhcp-utils
/src/dnsmasq/tests/test-dnsmasq-utils
/src/initrd/nm-initrd-generator
/src/initrd/tests/test-cmdline-reader
/src/initrd/tests/test-dt-reader
/src/initrd/tests/test-ibft-reader
/src/nm-iface-helper
/src/ndisc/tests/test-ndisc-fake
/src/ndisc/tests/test-ndisc-linux
/src/platform/tests/monitor
/src/platform/tests/test-address-fake
/src/platform/tests/test-address-linux
/src/platform/tests/test-cleanup-fake
/src/platform/tests/test-cleanup-linux
/src/platform/tests/test-link-fake
/src/platform/tests/test-link-linux
/src/platform/tests/test-nmp-object
/src/platform/tests/test-platform-general
/src/platform/tests/test-route-fake
/src/platform/tests/test-route-linux
/src/platform/tests/test-tc-fake
/src/platform/tests/test-tc-linux
/src/settings/plugins/ifcfg-rh/nmdbus-ifcfg-rh.[ch]
/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh
/src/settings/plugins/ifupdown/tests/test-ifupdown
/src/settings/plugins/keyfile/tests/test-keyfile-settings
/src/settings/plugins/ifcfg-rh/tests/network-scripts/tmp/
/src/supplicant/tests/test-supplicant-config
/src/tests/config/test-config
/src/tests/test-core
/src/tests/test-core-with-expect
/src/tests/test-dcb
/src/tests/test-ip4-config
/src/tests/test-ip6-config
/src/tests/test-l3cfg
/src/tests/test-route-manager-fake
/src/tests/test-route-manager-linux
/src/tests/test-systemd
/src/tests/test-utils
/src/tests/test-wired-defname

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@ REQUIRED_AUTOMAKE_VERSION=1.9
PKG_NAME=NetworkManager
(test -f $srcdir/configure.ac \
&& test -f $srcdir/src/main.c) || {
&& test -f $srcdir/src/core/main.c) || {
printf "**Error**: Directory "\`$srcdir\'" does not look like the" >&2
echo " top-level $PKG_NAME directory" >&2
exit 1

View File

@@ -18,7 +18,7 @@ EXCLUDE=(
":(exclude)shared/n-dhcp4"
":(exclude)shared/nm-std-aux/unaligned.h"
":(exclude)shared/systemd/src"
":(exclude)src/systemd/src"
":(exclude)src/core/systemd/src"
)
NM_ROOT="$(git rev-parse --show-toplevel)" || die "not inside a git repository"

View File

@@ -905,7 +905,7 @@ subdir('introspection')
subdir('shared')
subdir('libnm-core')
subdir('libnm')
subdir('src')
subdir('src/core')
subdir('dispatcher')
subdir('clients')
subdir('data')

View File

@@ -148,38 +148,38 @@ libnm/nm-vpn-service-plugin.c
data/org.freedesktop.NetworkManager.policy.in.in
shared/nm-glib-aux/nm-shared-utils.c
shared/nm-log-core/nm-logging.c
src/NetworkManagerUtils.c
src/main.c
src/main-utils.c
src/dhcp/nm-dhcp-dhclient.c
src/dhcp/nm-dhcp-dhclient-utils.c
src/dhcp/nm-dhcp-manager.c
src/dns/nm-dns-manager.c
src/devices/adsl/nm-device-adsl.c
src/devices/bluetooth/nm-bluez-manager.c
src/devices/bluetooth/nm-device-bt.c
src/devices/nm-device-6lowpan.c
src/devices/nm-device-bond.c
src/devices/nm-device-bridge.c
src/devices/nm-device-dummy.c
src/devices/nm-device-ethernet.c
src/devices/nm-device-ethernet-utils.c
src/devices/nm-device-infiniband.c
src/devices/nm-device-ip-tunnel.c
src/devices/nm-device-macvlan.c
src/devices/nm-device-tun.c
src/devices/nm-device-veth.c
src/devices/nm-device-vlan.c
src/devices/nm-device-vrf.c
src/devices/nm-device-vxlan.c
src/devices/nm-device-wpan.c
src/devices/team/nm-device-team.c
src/devices/wifi/nm-device-olpc-mesh.c
src/devices/wifi/nm-device-wifi.c
src/devices/wifi/nm-wifi-utils.c
src/devices/wwan/nm-modem-broadband.c
src/nm-config.c
src/nm-iface-helper.c
src/nm-manager.c
src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
src/core/NetworkManagerUtils.c
src/core/main.c
src/core/main-utils.c
src/core/dhcp/nm-dhcp-dhclient.c
src/core/dhcp/nm-dhcp-dhclient-utils.c
src/core/dhcp/nm-dhcp-manager.c
src/core/dns/nm-dns-manager.c
src/core/devices/adsl/nm-device-adsl.c
src/core/devices/bluetooth/nm-bluez-manager.c
src/core/devices/bluetooth/nm-device-bt.c
src/core/devices/nm-device-6lowpan.c
src/core/devices/nm-device-bond.c
src/core/devices/nm-device-bridge.c
src/core/devices/nm-device-dummy.c
src/core/devices/nm-device-ethernet.c
src/core/devices/nm-device-ethernet-utils.c
src/core/devices/nm-device-infiniband.c
src/core/devices/nm-device-ip-tunnel.c
src/core/devices/nm-device-macvlan.c
src/core/devices/nm-device-tun.c
src/core/devices/nm-device-veth.c
src/core/devices/nm-device-vlan.c
src/core/devices/nm-device-vrf.c
src/core/devices/nm-device-vxlan.c
src/core/devices/nm-device-wpan.c
src/core/devices/team/nm-device-team.c
src/core/devices/wifi/nm-device-olpc-mesh.c
src/core/devices/wifi/nm-device-wifi.c
src/core/devices/wifi/nm-wifi-utils.c
src/core/devices/wwan/nm-modem-broadband.c
src/core/nm-config.c
src/core/nm-iface-helper.c
src/core/nm-manager.c
src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c
src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c

Some files were not shown because too many files have changed in this diff Show More