summaryrefslogtreecommitdiff
path: root/contrib/fedora
Commit message (Collapse)AuthorAgeFilesLines
* contrib/rpm: enable the firewalld zone in F32 and RHEL8bg/shared-mode-firewall-rh1829637Beniamino Galvani2020-05-152-0/+28
|
* contrib/rpm: no longer mention that libnm is "new API"Thomas Haller2020-05-141-6/+4
| | | | | libnm was introduced in version 1.0, December 2014. It's no longer new, and libnm-glib is forgotten.
* contrib/rpm: enable undefined-sanitizer libubsan on RHEL-8th/ubsan-fixesThomas Haller2020-05-141-2/+4
|
* gitlab-ci: optionally install libasan,libubsan via REQUIRED_PACKAGES scriptThomas Haller2020-05-141-0/+2
|
* gitlab-ci: accept failure in REQUIRED_PACKAGES script for non-existing qt-develThomas Haller2020-05-141-3/+3
| | | | | | | | | | | | | | | On CentOS 8, many devel packages are not available. Even after # dnf config-manager --set-enabled PowerTools certain devel packages are missing. Some of these (libndp-devel, mobile-broadband-provider-info-devel, teamd-devel) we build in copr ([1]), but libpsl-devel and qt-devel are still missing. Only install them optionally and allow failure for them not being present. [1] https://copr.fedorainfracloud.org/coprs/nmstate/nm-build-deps/repo/epel-8/nmstate-nm-build-deps-epel-8.repo
* contrib/rpm: log MD5/SHA sums of release tarball during build_clean.shThomas Haller2020-05-082-0/+10
| | | | | | When doing a release, we should care about the checksum of the tarball. Log all of them... also, because fedpkg uses sha512, ftpadmin@gnome uses sha256, etc.
* contrib/rpm: fix spec file using bare wordsThomas Haller2020-04-181-2/+2
| | | | | | error: bare words are no longer supported, please use "...": no != "yes" error: ^ error: /builds/NetworkManager/NetworkManager/contrib/fedora/rpm/NetworkManager.20200418-170120.dp5cp5/SPECS/NetworkManager.spec:596: bad %if condition: no != "yes"
* contrib/rpm: fix spec file using bare wordsThomas Haller2020-04-181-1/+1
| | | | | error: bare words are no longer supported, please use "...": no != yes error: /builds/NetworkManager/NetworkManager/contrib/fedora/rpm/NetworkManager.20200418-163008.VM582H/SPECS/NetworkManager.spec:596: bad %if condition: no != yes
* contrib/rpm: avoid bare words in spec fileThomas Haller2020-04-021-2/+2
| | | | | | | error: bare words are no longer supported, please use "...": "x" != x error: ^ error: /root/nm-build/NetworkManager/contrib/fedora/rpm/NetworkManager.20200402-030113.Hk7EGs/SPECS/NetworkManager.spec:32: bad %if condition: "x" != x ERROR: rpmbuild FAILED
* contrib/REQUIRED_PACKAGES: fix script to work without GNU `which` installedThomas Haller2020-02-101-1/+2
| | | | | `which` is convenient, but not installed in Fedora container images. Fix detection of whether to use `dnf` or `yum`.
* contrib/REQUIRED_PACKAGES: ignore for non-existing packages "dbus-python", ↵Thomas Haller2020-02-101-2/+2
| | | | | | | "pygobject3-base" on Fedora 32 These packages no longer exist on Fedora 32 and dnf fails due to that. Ignore such errors.
* clients: polkit-agent: implement polkit agent without using libpolkitAntonio Cardace2019-12-241-2/+0
|
* build/meson: allow configuring default for main.auth-polkit settingThomas Haller2019-12-111-0/+1
| | | | | | | | | | | | | | | We always build PolicyKit support, because it merely depends on some D-Bus calls. However, there are two things to configure: - the default value for main.auth-polkit in NetworkManager.conf. This is now called "-Dconfig_auth_polkit_default=$VAL". - whether to install the policy file. This is called "-Dpolkit=$VAL". These settings are mostly independent, so add "config_auth_polkit_default" to make the default explicitly configurable. (cherry picked from commit c21c6bc0be2a4467402bc2d8718859dedb10b676)
* cloud-setup: add comment that the tool is still experimentalThomas Haller2019-12-021-0/+1
| | | | (cherry picked from commit 16223cff9172e8b1ea7974af4d613406b0f56607)
* contrib/rpm: explicitly enable/disable bluetooth supportThomas Haller2019-12-021-0/+10
| | | | | | | | | | | The bluetooth plugin (with BlueZ5/NAP support) always gets build, but DUN support requires a library. When enabling build of the bluetooth subpackage, then always enable DUN support. And enable it explicitly, especially meson would not autodetect support and disable it by default. (cherry picked from commit 30f6a5dd21d4f12d72d85708406fe9a6c76ea4d4)
* cloud-setup: add tool for automatic IP configuration in cloudThomas Haller2019-11-282-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | This is a tool for automatically configuring networking in a cloud environment. Currently it only supports IPv4 on EC2, but it's intended for extending to other cloud providers (Azure). See [1] and [2] for how to configure secondary IP addresses on EC2. This is what the tool currently aims to do (but in the future it might do more). [1] https://aws.amazon.com/premiumsupport/knowledge-center/ec2-ubuntu-secondary-network-interface/ It is inspired by SuSE's cloud-netconfig ([1], [2]) and ec2-net-utils package on Amazon Linux ([3], [4]). [1] https://www.suse.com/c/multi-nic-cloud-netconfig-ec2-azure/ [2] https://github.com/SUSE-Enceladus/cloud-netconfig [3] https://github.com/aws/ec2-net-utils [4] https://github.com/lorengordon/ec2-net-utils.git It is also intended to work without configuration. The main point is that you boot an image with NetworkManager and nm-cloud-setup enabled, and it just works.
* contrib/rpm: fix comment in "NetworkManager.conf" about default [main].pluginsThomas Haller2019-11-281-1/+1
| | | | | | | | | The "ibft" plugin is no more. The default on RHEL/Fedora is now "ifcfg-rh[,keyfile]". Adjust the configuration, because a wrong comment is confusing here. Modifying configuration snippets is potentially annoying, because the user might have edited the file, so on upgrade a "NetworkManager.conf.rpmnew" file will be created. Still do it.
* contrib/rpm: avoid warning in specfile about tokens after %endifThomas Haller2019-11-231-2/+2
| | | | | warning: extra tokens at the end of %endif directive in line 717: %endif # end autotools warning: extra tokens at the end of %endif directive in line 775: %endif # end autotools
* contrib/rpm: use proper check for nmtui conditional buildThomas Haller2019-11-221-1/+11
|
* contrib/rpm: drop BuildRequires to deprecated "wireless-tools-devel"Thomas Haller2019-09-252-6/+0
| | | | | | | "wireless-tools-devel" is long depreacted and not used by NetworkManager, not even for WEXT. Drop it from the build dependencies.
* tests: don't install bzip2 as REQUIRED_PACKAGES on Fedora/RHELThomas Haller2019-09-251-1/+0
|
* tests: don't install unnecessary package in gitlab-ci testsThomas Haller2019-09-251-4/+13
| | | | | | | | | | | | REQUIRED_PACKAGES has two uses: - to setup a system for developing NetworkManager. This installs convenience packages like "cscope". - to install the packages required for unit testing in gitlab-ci. For gitlab-ci we should only install the packages that we actually need.
* tests: fix failure installing non-existing packages in REQUIRED_PACKAGESThomas Haller2019-09-251-4/+16
| | | | | | | | | | | | | | Previously, dnf/yum used to ignore packages that didn't exist. In Fedora 32, dnf starts to fail the entire command: No match for argument: python-gobject-base Error: Unable to find a match: python-gobject-base Since this script is supposed to work with different RHEL/Fedora versions, it's expected that not all packages are available everywhere. Fix that, by installing packages that we know that they might be missing one by one (and ignore the error).
* contrib/rpm: "Suggest" wpa_supplicant for NetworkManager-wifi packageThomas Haller2019-09-231-0/+1
| | | | | | | | | | | | | | "NetworkManager-wifi" package requires either wpa_supplicant or iwd. When installing the package without explicitly installing supplicant or iwd (and not having it installed yet), then we want to drag in wpa_supplicant by default. That is accomplished by suggesting wpa_supplicant package. Otherwise, the user installing NetworkManager-wifi might get iwd, which is only functioning if the user explicitly enables the backend in "NetworkManager.conf". https://bugzilla.redhat.com/show_bug.cgi?id=1743585
* wwan/modem-broadband: add capability to look up default APN/username/passwordlr/gsm-default-apnLubomir Rintel2019-09-112-0/+4
| | | | | This allows the GSM connection to Just Work most of the time, as in: "nmcli d connect ttyUSB0".
* COPYING: make sure we ship the relevant license textsLubomir Rintel2019-09-101-0/+2
| | | | | | | | | | | | | This adds LGPL and GFDL texts from the GNU web site and updates the GPL one: COPYING: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt COPYING.LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt COPYING.GFDL: https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt The update to the GPL text is purely cosmetic. However, shipping the exact same file as GNU publishes may help distros that deduplicate the license texts or hardlink duplicates.
* contrib/rpm: explicitly set runstatedir to "/run" when building release tarballThomas Haller2019-08-271-0/+1
| | | | | | | | | | | Nowadays, we should prefer "/run" over "/var/run". When not specifying during ./configure, autotools however still defaults to "/var/run". This default is also visible in the pre-generated documenation, for example `man NetworkManager.conf` says Unless the symlink points to the internal file /run/NetworkManager/resolv.conf, in which case the ...
* contrib/rpm: install our dispatcher scripts into /usr/lib/NetworkManagerLubomir Rintel2019-08-231-6/+10
| | | | That's where they always should have been.
* contrib/rpm: enable IWD (outside RHEL)Lubomir Rintel2019-08-151-1/+5
| | | | | | Let's enable the option to use IWD as an alternative to wpa_supplicant for Wi-Fi support. People have been asking for this, it works, and is well maintained.
* contrib/rpm: fix libnm License tagLubomir Rintel2019-07-311-1/+3
| | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1723395 (cherry picked from commit 2752e3a774953328da9fa8d02614cc7778a86467)
* contrib/rpm: use --with-runstatedir=%{_rundir} instead of hard-coding /runThomas Haller2019-07-291-1/+1
| | | | (cherry picked from commit ea5e96cb06bdf2facec36ed4d6ab3f87f6ff95d2)
* contrib/rpm: fix parsing of %real_version_major for ".0" versionsThomas Haller2019-07-291-1/+1
| | | | (cherry picked from commit 6c9880f8cacc70ed1bea3a463f29cdb171939d7b)
* all: codespell fixesLubomir Rintel2019-07-241-1/+1
| | | | | Codespel run with the same arguments as described in commit 58510ed56679 ('docs: misc. typos pt2').
* settings: rework tracking settings connections and settings pluginsThomas Haller2019-07-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completely rework how settings plugin handle connections and how NMSettings tracks the list of connections. Previously, settings plugins would return objects of (a subtype of) type NMSettingsConnection. The NMSettingsConnection was tightly coupled with the settings plugin. That has a lot of downsides. Change that. When changing this basic relation how settings connections are tracked, everything falls appart. That's why this is a huge change. Also, since I have to largely rewrite the settings plugins, I also added support for multiple keyfile directories, handle in-memory connections only by keyfile plugin and (partly) use copy-on-write NMConnection instances. I don't want to spend effort rewriting large parts while preserving the old way, that anyway should change. E.g. while rewriting ifcfg-rh, I don't want to let it handle in-memory connections because that's not right long-term. -- If the settings plugins themself create subtypes of NMSettingsConnection instances, then a lot of knowledge about tracking connections moves to the plugins. Just try to follow the code what happend during nm_settings_add_connection(). Note how the logic is spread out: - nm_settings_add_connection() calls plugin's add_connection() - add_connection() creates a NMSettingsConnection subtype - the plugin has to know that it's called during add-connection and not emit NM_SETTINGS_PLUGIN_CONNECTION_ADDED signal - NMSettings calls claim_connection() which hocks up the new NMSettingsConnection instance and configures the instance (like calling nm_settings_connection_added()). This summary does not sound like a lot, but try to follow that code. The logic is all over the place. Instead, settings plugins should have a very simple API for adding, modifying, deleting, loading and reloading connections. All the plugin does is to return a NMSettingsStorage handle. The storage instance is a handle to identify a profile in storage (e.g. a particular file). The settings plugin is free to subtype NMSettingsStorage, but it's not necessary. There are no more events raised, and the settings plugin implements the small API in a straightforward manner. NMSettings now drives all of this. Even NMSettingsConnection has now very little concern about how it's tracked and delegates only to NMSettings. This should make settings plugins simpler. Currently settings plugins are so cumbersome to implement, that we avoid having them. It should not be like that and it should be easy, beneficial and lightweight to create a new settings plugin. Note also how the settings plugins no longer care about duplicate UUIDs. Duplicated UUIDs are a fact of life and NMSettings must handle them. No need to overly concern settings plugins with that. -- NMSettingsConnection is exposed directly on D-Bus (being a subtype of NMDBusObject) but it was also a GObject type provided by the settings plugin. Hence, it was not possible to migrate a profile from one plugin to another. However that would be useful when one profile does not support a connection type (like ifcfg-rh not supporting VPN). Currently such migration is not implemented except for migrating them to/from keyfile's run directory. The problem is that migrating profiles in general is complicated but in some cases it is important to do. For example checkpoint rollback should recreate the profile in the right settings plugin, not just add it to persistent storage. This is not yet properly implemented. -- Previously, both keyfile and ifcfg-rh plugin implemented in-memory (unsaved) profiles, while ifupdown plugin cannot handle them. That meant duplication of code and a ifupdown profile could not be modified or made unsaved. This is now unified and only keyfile plugin handles in-memory profiles (bgo #744711). Also, NMSettings is aware of such profiles and treats them specially. In particular, NMSettings drives the migration between persistent and non-persistent storage. Note that a settings plugins may create truly generated, in-memory profiles. The settings plugin is free to generate and persist the profiles in any way it wishes. But the concept of "unsaved" profiles is now something explicitly handled by keyfile plugin. Also, these "unsaved" keyfile profiles are persisted to file system too, to the /run directory. This is great for two reasons: first of all, all profiles from keyfile storage in fact have a backing file -- even the unsaved ones. It also means you can create "unsaved" profiles in /run and load them with `nmcli connection load`, meaning there is a file based API for creating unsaved profiles. The other advantage is that these profiles now survive restarting NetworkManager. It's paramount that restarting the daemon is as non-disruptive as possible. Persisting unsaved files to /run improves here significantly. -- In the past, NMSettingsConnection also implemented NMConnection interface. That was already changed a while ago and instead users call now nm_settings_connection_get_connection() to delegate to a NMSimpleConnection. What however still happened was that the NMConnection instance gets never swapped but instead the instance was modified with nm_connection_replace_settings_from_connection(), clear-secrets, etc. Change that and treat the NMConnection instance immutable. Instead of modifying it, reference/clone a new instance. This changes that previously when somebody wanted to keep a reference to an NMConnection, then the profile would be cloned. Now, it is supposed to be safe to reference the instance directly and everybody must ensure not to modify the instance. nmtst_connection_assert_unchanging() should help with that. The point is that the settings plugins may keep references to the NMConnection instance, and so does the NMSettingsConnection. We want to avoid cloning the instances as long as they are the same. Likewise, the device's applied connection can now also be referenced instead of cloning it. This is not yet done, and possibly there are further improvements possible. -- Also implement multiple keyfile directores /usr/lib, /etc, /run (rh #1674545, bgo #772414). It was always the case that multiple files could provide the same UUID (both in case of keyfile and ifcfg-rh). For keyfile plugin, if a profile in read-only storage in /usr/lib gets modified, then it gets actually stored in /etc (or /run, if the profile is unsaved). -- While at it, make /etc/network/interfaces profiles for ifupdown plugin reloadable. -- https://bugzilla.gnome.org/show_bug.cgi?id=772414 https://bugzilla.gnome.org/show_bug.cgi?id=744711 https://bugzilla.redhat.com/show_bug.cgi?id=1674545
* contrib/rpm: disable rp_filter in config-connectivity-redhatLubomir Rintel2019-07-153-0/+24
| | | | | | | | RHEL ships with a rp_filter and can't change that for historic reasons. That's unfortunate, because it breaks the connectivity checking. Let's override it if the connectivity checking package is installed. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/185
* settings: drop ibft settings pluginth/drop-ibft-settings-pluginThomas Haller2019-06-202-13/+0
| | | | | | | | | | | | | | | The functionality of the ibft settings plugin is now handled by nm-initrd-generator. There is no need for it anymore, drop it. Note that ibft called iscsiadm, which requires CAP_SYS_ADMIN to work ([1]). We really want to drop this capability, so the current solution of a settings plugin (as it is implemented) is wrong. The solution instead is nm-initrd-generator. Also, on Fedora the ibft was disabled and probably on most other distributions as well. This was only used on RHEL. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1371201#c7
* gitlab-ci: also build on CentOS 7.5 and 7.6th/gitlab-ci-centosThomas Haller2019-05-291-0/+2
|
* gitignore: merge gitignore filesThomas Haller2019-05-191-3/+0
| | | | | | | | | For the most part, we only have one main .gitignore file. There were a few nested files, merge them into the main file. I find it better to have only one gitignore file, otherwise the list of ignored files is spread out through the working directory.
* contrib/rpm: set runstatedir to "/run" instead of "/var/run"Thomas Haller2019-05-171-0/+1
| | | | | Do so on all RHEL/Fedora releases. They all use systemd, and it's the right choice for all of them.
* contrib/rpm: reword comment in NetworkManager.confThomas Haller2019-05-171-3/+3
| | | | | | | | | This change is a bit annoying, because we package "NetworkManager.conf" file in our RPM. So, upon package upgrade, rpm will note that a new config file should be installed and thus will leave ".rpmnew" files. Also, don't mention "/var/run". It should really be just "/run" because "/var" might not be mounted in early boot/initrd or in rescue environment.
* contrib/rpm: fix comment in `./build_clean.sh -h` outputThomas Haller2019-05-161-1/+1
|
* contrib/rpm: provide NetworkManager-dispatcherlr/dispatcher-splitLubomir Rintel2019-04-291-0/+2
| | | | | | This is a provide packages that install dispatcher scripts should depend on. It will make it easier to keep track of them and possibly split out the dispatcher into an optional package if not needed.
* contrib/rpm: (trivial) move some %files around, remove a duplicateLubomir Rintel2019-04-291-4/+3
| | | | Just a cosmetic thing.
* gitlab-ci: install glib2-doc via "contrib/fedora/REQUIRED_PACKAGES"Thomas Haller2019-04-201-0/+1
| | | | | | | | | | | We also generate a source tarball and artifact it. Hence, we need proper gtk-doc links. This requires files in /usr/share/gtk-doc/html for adding cross links. Install glib2-doc package. Note that in containers dnf is configured to not install documentation files. We need to override that.
* contrib/rpm: Provide list of units to %systemd_postunTill Maas2019-04-181-2/+4
| | | | | | | %systemd_postun is meant to be run with arguments and Fedora Rawhide seems to enforce this now. Therefore provide the units there, too. https://github.com/NetworkManager/NetworkManager/pull/348
* all: goodbye libnm-glibLubomir Rintel2019-04-163-97/+2
| | | | | | | | | | | | | | | | | | | | | | | This removes libnm-glib, libnm-glib-vpn, and libnm-util for good. The it has been replaced with libnm since NetworkManager 1.0, disabled by default since 1.12 and no up-to-date distributions ship it for years now. Removing the libraries allows us to: * Remove the horrible hacks that were in place to deal with accidental use of both the new and old library in a single process. * Relief the translators of maintenance burden of similar yet different strings. * Get rid of known bad code without chances of ever getting fixed (libnm-glib/nm-object.c and libnm-glib/nm-object-cache.c) * Generally lower the footprint of the releases and our workspace If there are some really really legacy users; they can just build libnm-glib and friends from the NetworkManager-1.16 distribution. The D-Bus API is stable and old libnm-glib will keep working forever. https://github.com/NetworkManager/NetworkManager/pull/308
* Revert "contrib/rpm: drop --with-libnm-glib from build_clean"Thomas Haller2019-04-111-0/+1
| | | | | | | Since we restored libnm-glib in commit b027723e00679f2b709880407a6ff24583faeae3, also revert this commit. This reverts commit 0750ff1f814f3034d5245d0215874c787fc30db5.
* contrib/rpm: disable eBPF for package builds on FedoraThomas Haller2019-04-091-1/+6
| | | | | We have random failures to build on gitlab-ci. Something is wrong, at least, eBPF is not working reliably. Disable it for now.
* contrib/rpm: make spec file more similar to rhel-7'sThomas Haller2019-04-091-11/+62
|
* contrib/rpm: from Fedora 31 onwards use internal DHCP client by defaultThomas Haller2019-04-091-3/+3
| | | | | In RHEL-8.0 we already switched the default DHCP plugin. It's past time that we do the same for Fedora.