Commit graph

884 commits

Author SHA1 Message Date
Beniamino Galvani
a45163b131 rpm: disable wireless extensions on Fedora
The Fedora kernel is built without WEXT since many years:

https://fedoraproject.org/wiki/Changes/RemoveWirelessExtensions
2025-12-18 16:06:44 +01:00
Íñigo Huguet
118475d571 ci: build with -D systemdsystemgeneratordir=no
Avoid build failures in some distros.
  ERROR: Assert failed: systemd required but not found, please provide a valid systemd user generator dir or disable it

Fixes: 636fb5ef24 ('systemd: install initrd services using a generator')
2025-12-12 15:24:09 +01:00
Beniamino Galvani
1a52bbe7c9 libnm: add function to copy a certificate or key as user
Add a new public function nm_utils_copy_cert_as_user() to libnm. It
reads a certificate or key file on behalf of the given user and writes
it to a directory in /run/NetworkManager. It is useful for VPN plugins
that run as root and need to verify that the user owning the
connection (the one listed in the connection.permissions property) can
access the file.
2025-12-12 12:43:15 +01:00
Íñigo Huguet
d8f143f601 spec: enable polkit_noauth_group for Fedora <= 43 and RHEL <= 10
In Fedora 44 and RHEL 11, admin users will need to type their password
even on local consoles.
2025-12-12 12:38:48 +01:00
Íñigo Huguet
0b75d905e5 polkit: remove the modify_system build option
This build option allowed non-admin users to create system-wide
connections. Generally, this is not a good idea as system-wide changes
should be done by administrators.

However, the main reason for the change is that this can be used to
bypass filesystem permissions, among possibly other attacks. As the
daemon runs as root, a user can create a system-wide connection that
uses a certificate from a different user to authenticate in a WiFi
network protected with 802.1X or a VPN, because as root user the daemon
can access to the file.

This patch does not completely fix the issue, as users can still create
private connections specifying a path to another user's connection. This
will be addressed in other patch. However, this patch is needed too,
because in system-wide connections we don't store which user created the
connection, so there woudn't be any way to check his/her permissions.

This is part of the fix for CVE-2025-9615

See: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1809
2025-12-12 12:38:48 +01:00
Jan Vaclav
ae134ca9f4 build/configure_for_system: stop building with ifcfg_rh support
It has been deprecated for a long time, so it would be probably
fine to stop building with it enabled. RHEL 9 is excluded since
it still supports the ifcfg-rh format.
2025-12-04 11:33:13 +00:00
Jan Vaclav
55f96057c6 build/configure_for_system: disable building with team on rhel10+ 2025-12-04 11:33:13 +00:00
Jan Vaclav
de0a37b248 build: fix rhel version detection in configure_for_system 2025-12-04 11:33:13 +00:00
Antonio Alvarez Feijoo
636fb5ef24 systemd: install initrd services using a generator
Since both `NetworkManager.service` and `NetworkManager-initrd.service` are
allocated for the same bus name (`org.freedesktop.NetworkManager`) and this is
not allowed, the best option is to use a systemd generator to install them only
in the initrd, instead of setting fixed Install sections.

Fixes #1814
2025-11-20 13:26:15 +00:00
Jan Vaclav
8d33aaa5b6 build: drop "ebpf" configuration for n-acd compilation
Since we now check whether the user's machine supports
eBPF at runtime, we can drop all of this build machinery.
2025-10-22 21:48:39 +02:00
Íñigo Huguet
13d8cda04e ci: update distros 2025-09-08 12:58:27 +02:00
Beniamino Galvani
fcf9b60cc2 build: remove autotools leftovers 2025-09-08 10:46:44 +00:00
Beniamino Galvani
94d7dd9b11 rpm: change system_ca_path
/etc/pki/tls/cert.pem was a symlink to
/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem since Fedora 19 and
it is being removed in Fedora 43.

See https://fedoraproject.org/wiki/Changes/droppingOfCertPemFile

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2257
https://bugzilla.redhat.com/show_bug.cgi?id=2380436
2025-08-25 15:19:47 +02:00
Íñigo Huguet
3cba4f2627 spec: add git_tag_version
The URL to the tarball needs the git tag, that might be 1.54-rc1 instead
of 1.53.90. Allow to define it as a separate variable in the spec file.
It can be set as `git_tag_version %{real_version}` when they are
identical.

It is not really needed here in the upstream spec file, as the "Source"
line is commented out, but add it as a reference for donwstream spec
files.
2025-07-07 09:27:05 +02:00
Eli Schwartz
fe62ce6a4b ci: avoid building manpages on Fedora
It appears that xsltproc is not installed there. It is generally needed
for the docs build too, so as a crude CI heuristic, don't build anywhere
that docs are disabled.
2025-05-30 09:42:55 +00:00
Tomas Bzatek
ec917dc670 ci: add libnvme dependency
Required for the nm-initrd-generator NBFT support.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
2025-04-28 16:09:54 +00:00
Jan Vaclav
0f469b30ad build: add path definition for ip6tables 2025-04-01 08:08:52 +00:00
Michael Biebl
0e83c595f3 Rephrase certain expressions to avoid the usage of the term "allows to" 2025-03-27 09:44:07 +01:00
Michael Biebl
10e58f7c3c typo fix: allows to -> allows one to
Detected by lintian:

Example:
I: network-manager: typo-in-manual-page "allows to" "allows one to" [usr/share/man/man5/NetworkManager.conf.5.gz:1266]
2025-03-26 19:22:01 +01:00
Beniamino Galvani
481afec6ea release: fix validation of gitlab token
If the token is wrong or expired, the command still returns
success. Check the content of the reply instead.

Fixes: f05192ada8 ('release.sh: release to freedesktop.org, not to GNOME')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2148
2025-03-25 14:35:55 +01:00
Fernando Fernandez Mancera
b281ae0c22 contrib/makerepo.sh: fix script for fedpkg 1.44
If the user of the script still uses fedpkg 1.44 the script fails
because the -build directory doesn't exist.

Now it was tested in both versions.
2025-03-12 09:16:50 +00:00
Íñigo Huguet
a60ca31fd9 spec: specify paths to *-initrd.service files from the buildroot
Fixes: 91e36ea214 ('spec: don't install *-initrd.services')
2025-03-04 07:19:56 +01:00
Íñigo Huguet
91e36ea214 spec: don't install *-initrd.services
They cannot be used yet as Dracut need changes. They are not really
tested, neither, so better not to install them as they might cause
confusion about their purpose.
2025-03-03 15:42:36 +01:00
Íñigo Huguet
90c403f4ef contrib/build: ignore missing signingkey in git config
Fixes: 64f8ec6099 ('rpm/build*.sh: trap failures')
2025-02-28 14:33:18 +01:00
Antonio Alvarez Feijoo
8640ea822f systemd: add initrd-specific services
Decouple from a specific initrd generator (dracut) the systemd services that
provide networking in the initrd using NM, thus allowing other systemd-based
initrd generators to take advantage of it.

These new services are:
- `NetworkManager-config-initrd.service`: it starts very early at boot, parses
the kernel command line using `nm-initrd-generator` and sets the
`/run/NetworkManager/initrd/neednet` flag to activate the other initrd services,
and also sets the hostname if needed.
- `NetworkManager-initrd.service`: it basically does the same job as the
`NetworkManager.service`, but in the initrd.
- `NetworkManager-wait-online-initrd.service`: ordered before
`network-online.target`, it will allow other services that require networking to
delay their start until NM has finished.
2025-02-26 09:31:05 +00:00
Lubomir Rintel
39efc8a394 fedora/REQUIRED_PACKAGES: remove very old optional package names
Attempting to install these takes time and they are no longer there
since ancient times. CentOS 9 and later are fine.
2025-02-25 09:38:49 +00:00
Lubomir Rintel
e2aa19a06c Revert "fedora/REQUIRED_PACKAGES: speed up optional packages installation"
dnf --skip-unavailable not available on CentOS 9.

This reverts commit 5409d4f5cd.
2025-02-25 09:38:49 +00:00
Lubomir Rintel
054962aeea contrib: drop old gtkdoc patch
This has been integrated 6 years ago.
2025-02-25 09:38:49 +00:00
Lubomir Rintel
aea231f489 contrib/build: ignore initial failure to set $SOURCE
More fallout from set -e patch, encountered during a release.

Fixes: 64f8ec6099 ('rpm/build*.sh: trap failures')
2025-02-25 09:38:49 +00:00
Lubomir Rintel
dd0b4e72e8 fedora/REQUIRED_PACKAGES: make teamd and dhclient optional
They are no longer in RHEL 10 and we can build just fine without them.
2025-02-06 10:40:09 +01:00
Lubomir Rintel
5409d4f5cd fedora/REQUIRED_PACKAGES: speed up optional packages installation
Don't try to install one by one by calling dnf repeatedly.
It is slow. Instead, use --skip-broken option.
2025-02-06 10:40:09 +01:00
Lubomir Rintel
593608c604 fedora/REQUIRED_PACKAGES: make cscope and bash-completion optional
We do not actually need them.
2025-02-06 10:40:09 +01:00
Lubomir Rintel
64f8ec6099 rpm/build*.sh: trap failures 2025-02-06 10:40:09 +01:00
Lubomir Rintel
6f9ecc7621 rpm/build_clean: do not use jq
It is not available when bootstrapping in beaker. Python is always
there.
2025-02-06 10:40:09 +01:00
Lubomir Rintel
dcd523a573 rpm/build_clean: fix an error message 2025-02-06 10:40:09 +01:00
Beniamino Galvani
98b124a661 dhcp: drop dhcpcanon support
Drop support for the "dhcpcanon" DHCP client. It's unmantained, as the
last code change was in 2018:

  https://github.com/juga0/dhcpcanon/commits

There is no need to first deprecate it because it was still marked as
"experimental" in NM. Also, it's not packaged by any recent distro, so
we can assume that nobody will miss it.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2112
2025-01-20 18:56:41 +01:00
Fernando Fernandez Mancera
6819f05644 contrib/makerepo.sh: adapt to "fedpkg prep" new behavior
Now "fedpkg prep" command is generating a directory with the "-build"
suffix containing the build directory inside. We need to extract it.

Real example:

If the script is used for a branch related to nm-1-46, the "fedpkg prep"
command will generate a NetworkManager-1.46-build/ directory containing
the NetworkManager-1.46/ sources directory. We just need to move the
NetworkManager-1.46/ out.
2025-01-13 13:29:17 +01:00
Íñigo Huguet
5c62286a77 release, find-backports: formatting and log small fixes 2024-12-23 12:41:34 +01:00
Íñigo Huguet
248addcc22 find-backports: fix Ignore-Fixes detection
The regex for "Fixes" also matches with "Ignore-Fixes", so the commit is
added twice and then removed only once by the "Ignore-Fixes". It still
remains once in the list of commits to backport, making that
"Ignore-Fixes" does not work. Fix it.
2024-12-23 12:32:13 +01:00
Íñigo Huguet
3caf7178b9 release.sh: check the right pipelines
Now we are using scheduled pipelines for various purposes like
regenerating the container images and triage the issues and MRs. That
means that the last pipeline ran for main might not be the pipeline with
the jobs building and testing the code.

Use `source=push` to retrieve only pipelines that are not scheduled.
2024-12-23 12:32:13 +01:00
Íñigo Huguet
88b7cf0f28 release: fix help text
The help text is read from the comments at the top of the script itself.
However, to detect what lines belongs to the help text, a range was
defined as:
- Start: any line starting with `# `
- End: any line starting `# Run with --no-test`

If any later line starts with `# ` is considered as a new matching
range, and from it to the end of the file is printed too.

Fix it by defining the range:
- Start: line 2
- End: blank line
2024-12-23 12:32:13 +01:00
Íñigo Huguet
f05192ada8 release.sh: release to freedesktop.org, not to GNOME
GNOME has changed the process to publish releases to download.gnome.org.
Now, it is required to do it from the CI of projects hosted in GNOME's
repositories.

As we don't have the project hosted there, we have 2 options:
- Create a mirror and set up the CI so we continue using
  download.gnome.org.
- Stop publishing the tarballs there and do it in gitlab.freedesktop.org
  from now on.

After a brief discussion we have decided that the second makes more
sense, so adapt release.sh to do that.

https://discourse.gnome.org/t/gnome-release-service-ftpadmin-replacement-coming-11th-december/25487
https://handbook.gnome.org/maintainers/making-a-release.html
2024-12-20 15:33:29 +00:00
Beniamino Galvani
0209a55d24 contrib/copr: update the URL for nm-git-bundle
The old bundle is no longer available, use the latest one.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2086
2024-12-09 17:38:36 +01:00
Wen Liang
7ab3362940 spec: add iputils as recommended dependency for ping command
NetworkManager relies on the ping command provided by `/usr/bin/ping`
from the iputils package to proceed the gateway or ip addresses
connectivity check.  This change ensures that iputils is recommended as a
dependency, making the ping command available for use during runtime but
not enforcing its installation as mandatory since NM can still proceed
to activate the connection even if the ping operation failed.
2024-11-04 14:25:54 +00:00
Beniamino Galvani
3e93134c04 checkpatch: silence warning about direct properties for the IP setting
Since NMSettingIPConfig is an abstract type that cannot be
instantiated, the overrides for the direct properties are defined on
the subclasses (NMSettingIP4Config and NMSettingIP6Config).

Silence the warning about using direct properties.
2024-10-23 15:06:58 +02:00
Íñigo Huguet
5792038572 contrib/rpm: Add ipcalc dependency to dispatcher-routing-roules
The dispatcher script uses it.
2024-10-11 12:14:50 +02:00
Fernando Fernandez Mancera
5f54ced2ee fedora: install ethtool explicitly
Some container images do not have ethtool installed by default and it is
needed for a test-core unit test to run.
2024-10-07 14:09:42 +02:00
Fernando Fernandez Mancera
180f6e3739 release: fix version parsing from meson
Fixes: 6707ce0754 ('build: use meson for version info')
2024-09-16 12:21:00 +02:00
Jan Vaclav
593580feae build: remove make/autotools from required packages 2024-09-11 12:18:15 +00:00
Jan Vaclav
4db1829bc7 all: remove misc mentions of autotools in docs 2024-09-11 12:18:15 +00:00