Commit Graph

781 Commits

Author SHA1 Message Date
Thomas Haller
eb5b78c4bf all: drop support for building with Python2
Now that we no longer test on CentOS7, we also have no more tests that
build using Python2.

Note that build with Python2 is currently broken already (which would be
fixable).

Drop Python2 too.

Existing Python scripts still use a common subset of Python2 and
Python3. They can be improved to use Python3 features in the future.
2023-11-14 10:29:48 +01:00
Íñigo Huguet
1560052dcc contrib/rpm: libnm: migrate to SPDX license
The license identifier was updated for the main package, but not for
libnm which overrides it to LGPL 2.1 or later. Update it too.

Fixes: 8c5aec7a1b ('contrib/rpm: migrate to SPDX license')
2023-11-07 07:20:04 +00:00
Íñigo Huguet
72b2485042 spec: Add missing epoch to some obsoleted versions
An rpm linter has complained with:
Missing epoch prefix on the version-release in 'Obsoletes: NetworkManager < 1.0.0' for NetworkManager-team
2023-10-25 10:20:03 +00:00
Beniamino Galvani
cb4c8c2147 contrib/rpm: add note about interface renaming with ifcfg vs keyfile 2023-10-03 14:09:21 +02:00
Beniamino Galvani
c3ca0b90cd contrib/rpm: ship a different readme when ifcfg migration is enabled
Ship a different file in /etc/sysconfig/network-scripts to warn that
migration is enabled.
2023-10-03 14:09:21 +02:00
Íñigo Huguet
510952b036 contrib: add libpsl-dev to debian requirements
It's installed for Fedora and Alpine, and building with meson requires
it by default.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1723
2023-09-13 16:29:01 +02:00
Beniamino Galvani
995539cd30 contrib/rpm: enable ifcfg migration on Fedora 39+
https://fedoraproject.org/wiki/Changes/MigrateIfcfgToKeyfile
2023-08-10 13:21:49 +02:00
Thomas Haller
514e944da3 contrib: add "cloud-init", "firewalld", "nftables" to makerepo.sh script 2023-07-14 09:40:26 +02:00
Thomas Haller
f08102bf41 contrib: autodetect the Fedora version for "nm-code-format-container.sh" script
From time to time we bump the used clang-format (and Fedora) version.
Previously, we had to change more than one places.

Instead, let the "nm-code-format-container.sh" parse it from ".gitlab-ci/config.yml".
2023-06-27 15:19:01 +02:00
Miroslav Suchy
8c5aec7a1b contrib/rpm: migrate to SPDX license
Fedora is moving to SPDX standard in naming a licenses.
See https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_2 .

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1668
2023-06-23 10:14:56 +02:00
Thomas Haller
dd561875dc contrib/rpm: update RPM description for NetworkManager-cloud-setup package
https://bugzilla.redhat.com/show_bug.cgi?id=2214491
2023-06-13 09:34:36 +02:00
Wen Liang
f04a9eb098 cloud-setup: add pre-up event to prevent reaching network-online.target
network-online.target should not be reached before nm-cloud-setup
completes configuring the network, which may make user service get
started before the network is fully configured.

Setting nm-cloud-setup.service as "Before=network-online.target" would
maybe have already achieved that. However, also use a pre-up dispatcher
script, so that the device activation in NetworkManager is also waiting
for nm-cloud-setup to complete.

https://bugzilla.redhat.com/show_bug.cgi?id=2151040
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1653
2023-06-09 09:18:20 -04:00
Thomas Haller
9ede7e04b1 contrib: extend usage for "contrib/scripts/nm-setup-git.sh" script 2023-06-06 15:00:23 +02:00
Thomas Haller
e75deb8c94 contrib/copr: update URL in "nm-copr-build.sh" to new nm-git-bundle 2023-06-06 14:53:37 +02:00
Thomas Haller
a8b2997fa5 contrib/copr: improve readme in copr scripts (2) 2023-06-06 12:21:30 +02:00
Thomas Haller
fd6fcf335c contrib/copr: improve readme in copr scripts 2023-06-06 12:20:29 +02:00
Thomas Haller
fe95e07fef contrib: fix fedora/REQUIRED_PACKAGES for {lib,}vala-devel
Originally, the package was called vala-devel (it still is on CentOS7).
Then it was renamed to libvala-devel, but keeping a Provides.

On Fedora 39, the Provides was dropped. Workaround.
2023-05-19 12:49:23 +02:00
Thomas Haller
c275d24637 clang-format: reformat code with clang-format 16.0.2-1.fc38
This is the version shipped in Fedora 38. As Fedora 38 is now out, the
core developers switch to it. Our gitlab-ci will also use that as base
image for the check-{patch.tree} tests and to generate the pages. There
is a need that everybody agrees on which clang-format version to use,
and that version should be the one of the currently used Fedora release.

Also update the used Fedora image in "contrib/scripts/nm-code-format-container.sh"
script.

The gitlab-ci still needs update in the following commit. This change
in isolation will break the "check-tree" test.
2023-05-19 10:53:13 +02:00
Thomas Haller
e37a15acad all: avoid "==" bashism in scripts 2023-05-18 09:16:41 +02:00
Beniamino Galvani
c67d65f733 rpm: fix detection of ppp version for ppp >= 2.5.0
In ppp 2.5.0 the "patchlevel.h" header file was removed and pkg-config
must be used. Update the detection command to support both ways.
2023-04-20 11:55:49 +02:00
Thomas Haller
cae2011b08 contrib: show clang-format version in failure message
The actual formatting depends on the version of clang-format. Print the
used version, which is in particular interesting when we get an error in
our gitlab-ci check (which uses the correct version).
2023-04-18 19:05:02 +02:00
Thomas Haller
229163202d release.sh: adjust check for gitlab-ci for changes in pipeline
- We need to fetch more entries per page. 100 is the maximum without
  pagination, but that is enough for us.

- Previously, we checked all stages. Now, let's skip the "prep" and "tier3" stages.
  This change should work both with old and new pipelines.
2023-04-13 13:18:27 +02:00
Thomas Haller
fe4e5c24e4 find-backports: improve git_ref_exists() to cache also the hashes themselves
git_ref_exists() memoizes the result. But while it looks up the SHA sum
for "ref", it also can cache the result for the SHA sum itself.
2023-04-07 17:23:13 +02:00
Thomas Haller
65ef6bc9bc find-backports: warn if any commits are not from the first reference
Every branch (for example "nm-1-40") has exactly one next branch, from
which patches should be backported (in that example that branch is
"nm-1-42").

While "find-backports" searches all newer branches for patches, it does
not make it clear form where the patch should come from.

That means, if you run the script `contrib/scripts/find-backports origin/nm-1-40`
it will check nm-1-42 and main branch, and might suggest to backport
patches that are only on main, but not "nm-1-42". That would be wrong,
because patches need to first go into nm-1-42, and then backported (from
there) further to nm-1-40.

Print a warning to highlight that.
2023-04-06 21:37:10 +02:00
Thomas Haller
9f89910852 find-backports: various cleanups in script
- avoid list([...]).
- use some f-strings.
2023-04-06 18:34:15 +02:00
Thomas Haller
efd23da26b find-backports: enable debug logging in script 2023-04-06 18:34:15 +02:00
Thomas Haller
1ed3854402 checkpatch: discourage deprecated "(allow-none)" annotation 2023-03-29 11:46:48 +02:00
Thomas Haller
2c9faea63c contrib,tools: move "nm-in-container.sh" script to "tools"
This script seems very useful to me. Give it a more prominent place and
move it out from "contrib/scripts". Also do some further renaming.
2023-03-20 08:59:59 +01:00
Thomas Haller
a6802cfa74 nm-in-container: disable handling of "/etc/resolv.conf" in container and use 8.8.8.8.
By default, podman bind mounts a "/etc/resolv.conf" file. That prevents
NetworkManager (inside the container) to update the file, which leads to
warnings in the log and certain NM-ci tests won't pass due to that.

Disable handling of "/etc/resolv.conf" in podman. But also pre-deploy a
default resolv.conf, with the google name server 8.8.8.8.  I don't
understand why, but even with "--dns=none", writing "/etc/resolv.conf"
while building the container doesn't take effect.  Instead, write a
usable "/etc/resolv.conf" from "/etc/rc.d/rc.local".
2023-03-16 08:33:00 +01:00
Thomas Haller
d453188ed2 nm-in-container: add nm-deploy.sh script for reinstalling NetworkManager 2023-03-15 16:50:57 +01:00
Thomas Haller
0c233fb216 nm-in-container: symlink NM/NM-ci directories in nm-in-container 2023-03-15 16:50:57 +01:00
Thomas Haller
9bf193f1a8 contrib: escape shell arguments in "nm-setup-git.sh" output 2023-03-09 16:56:18 +01:00
Thomas Haller
3c548dd081 release: improve hint about documentation in "release.sh"
A "minor" release can still be the latest release. It depends
on which minor release you do. The script isn't smart enough
to understand the difference, so make the hint a bit clearer.
2023-03-09 09:50:03 +01:00
Thomas Haller
b88700bd4b release: fix honoring $ORIGIN environment variable 2023-03-09 09:05:21 +01:00
Thomas Haller
acd895e1f7 contrib: update history and hints in "nm-in-container.sh" script
Calling `nm-env-prepare.sh --prefix eth -i 1 && nmcli device connect eth1` has
a race, where NetworkManager didn't see the interface yet. Add a sleep.
2023-03-08 11:22:52 +01:00
Thomas Haller
d0732962d2 contrib: install more packages in "nm-in-container.sh" 2023-03-03 15:42:05 +01:00
Thomas Haller
713de313dc contrib: add usage comment to "git-subtree-reimport.sh" 2023-03-03 13:45:31 +01:00
Thomas Haller
004464cfbd contrib: update "configure-for-system.sh" and start build
"configure-for-system.sh" is supposed to be in sync with
NetworkManager.spec. Update for the recent changes.

Also add a make/ninja call at the end. Almost always we want to build
after the configure.
2023-02-14 09:15:39 +01:00
Thomas Haller
786ebecee9 contrib/rpm: minor cleanup of "NetworkManager.spec"
Reorder ppp arguments so that they make more sense and are consistent
with the autotools code.
2023-02-14 09:03:31 +01:00
Thomas Haller
5973e83160 systemd: merge branch systemd into main
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1529
2023-02-13 15:33:02 +01:00
Thomas Haller
a798b4f3f6 contrib/release: fix version in import-docs hint message 2023-02-13 10:24:08 +01:00
Thomas Haller
06dc84a563 contrib/rpm: fix "--enable-ppp" flag to build without ppp
[thaller@redhat.com: I introduced this bug when taking the original patch].

Fixes: 820f6f3a4a ('contrib/rpm: sync obsoletes_{initscripts_updown,ifcfg_rh} version')
2023-02-10 10:09:27 +01:00
Thomas Haller
820f6f3a4a contrib/rpm: sync obsoletes_{initscripts_updown,ifcfg_rh} version
Initially, when we obsoleted {initscripts_updown,ifcfg_rh}, the package
versions that we build from this upstream spec file differed from what
we put into Fedora/RHEL.

By now, this is long gone, and for upstream package builds we don't care
to accurately track the version, when using upstream/copr builds. Just
sync the version to what they are in Fedora/RHEL.
2023-02-10 10:05:03 +01:00
Stewart Smith
2598ec3a1f contrib/rpm: fix building without ppp
We need to explicitly say we don't want PPP as the default is
that we do want to build with PPP.

https://src.fedoraproject.org/rpms/NetworkManager/pull-request/13
2023-02-10 09:53:15 +01:00
Yaakov Selkowitz
42cd422f18 contrib/rpm: fix flatpak build
https://src.fedoraproject.org/rpms/NetworkManager/pull-request/13
2023-02-10 09:51:01 +01:00
Thomas Haller
46f39829d9 contrib: accept ssh:// git url for origin in "nm-setup-git.sh" 2023-02-09 19:22:37 +01:00
Thomas Haller
f6805debee contrib: avoid using "sudo" in REQUIRED_PACKAGES scripts
It's often not installed, and usually we are already root. Avoid
using sudo.
2023-02-08 09:51:25 +01:00
Thomas Haller
0ee784f1f0 contrib: add "git-backport-merge" script for backporting merge commits in NetworkManager
On the main branch, we commonly rebase our WIP branches to latest HEAD,
before merging them with "--no-ff". The effect is to have a merge commit
that acts as a parentheses around the set of patches.

When backporting such a branch, we should preserve that structure and
take the merge commit too. We should must use `git cherry-pick -x` to
record the commit IDs of the original patch.

This script helps with that.

Also hook it up in "contrib/scripts/nm-setup-git.sh" to create an alias
for it. This alias has the advantage, of fetching the latest version of
the script from "main" or "origin/main", so it also works on older
branches.
2023-02-03 10:37:35 +01:00
Thomas Haller
362a96ff52 contrib: setup "systemd" in makerepo.sh script 2023-02-01 11:05:13 +01:00
Thomas Haller
00affc7b6f contrib/release.sh: add hint about publishing documentation on website 2023-01-30 09:32:01 +01:00