summaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAgeFilesLines
* rpm: fix detection of ppp version for ppp >= 2.5.0Beniamino Galvani2023-04-201-1/+1
| | | | | 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.
* contrib: show clang-format version in failure messageThomas Haller2023-04-181-1/+1
| | | | | | 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).
* release.sh: adjust check for gitlab-ci for changes in pipelineThomas Haller2023-04-131-1/+2
| | | | | | | | - 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.
* find-backports: improve git_ref_exists() to cache also the hashes themselvesThomas Haller2023-04-071-17/+33
| | | | | 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.
* find-backports: warn if any commits are not from the first referenceThomas Haller2023-04-061-0/+26
| | | | | | | | | | | | | | | | | 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.
* find-backports: various cleanups in scriptThomas Haller2023-04-061-11/+11
| | | | | - avoid list([...]). - use some f-strings.
* find-backports: enable debug logging in scriptThomas Haller2023-04-061-10/+22
|
* checkpatch: discourage deprecated "(allow-none)" annotationThomas Haller2023-03-291-0/+1
|
* contrib,tools: move "nm-in-container.sh" script to "tools"Thomas Haller2023-03-206-870/+0
| | | | | 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.
* nm-in-container: disable handling of "/etc/resolv.conf" in container and use ↵Thomas Haller2023-03-163-0/+10
| | | | | | | | | | | | | | 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".
* nm-in-container: add nm-deploy.sh script for reinstalling NetworkManagerThomas Haller2023-03-152-0/+16
|
* nm-in-container: symlink NM/NM-ci directories in nm-in-containerThomas Haller2023-03-151-3/+20
|
* contrib: escape shell arguments in "nm-setup-git.sh" outputThomas Haller2023-03-091-2/+12
|
* release: improve hint about documentation in "release.sh"Thomas Haller2023-03-091-0/+1
| | | | | | 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.
* release: fix honoring $ORIGIN environment variableThomas Haller2023-03-091-2/+3
|
* contrib: update history and hints in "nm-in-container.sh" scriptThomas Haller2023-03-081-3/+3
| | | | | 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.
* contrib: install more packages in "nm-in-container.sh"Thomas Haller2023-03-031-0/+3
|
* contrib: add usage comment to "git-subtree-reimport.sh"Thomas Haller2023-03-031-0/+9
|
* contrib: update "configure-for-system.sh" and start buildThomas Haller2023-02-141-18/+35
| | | | | | | | "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.
* contrib/rpm: minor cleanup of "NetworkManager.spec"Thomas Haller2023-02-141-2/+2
| | | | | Reorder ppp arguments so that they make more sense and are consistent with the autotools code.
* systemd: merge branch systemd into mainThomas Haller2023-02-131-0/+1
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1529
* | contrib/release: fix version in import-docs hint messageThomas Haller2023-02-131-1/+6
| |
* | contrib/rpm: fix "--enable-ppp" flag to build without pppThomas Haller2023-02-101-1/+1
| | | | | | | | | | | | [thaller@redhat.com: I introduced this bug when taking the original patch]. Fixes: 820f6f3a4a42 ('contrib/rpm: sync obsoletes_{initscripts_updown,ifcfg_rh} version')
* | contrib/rpm: sync obsoletes_{initscripts_updown,ifcfg_rh} versionThomas Haller2023-02-101-2/+2
| | | | | | | | | | | | | | | | | | | | 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.
* | contrib/rpm: fix building without pppStewart Smith2023-02-101-0/+4
| | | | | | | | | | | | | | 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
* | contrib/rpm: fix flatpak buildYaakov Selkowitz2023-02-101-5/+7
| | | | | | | | https://src.fedoraproject.org/rpms/NetworkManager/pull-request/13
* | contrib: accept ssh:// git url for origin in "nm-setup-git.sh"Thomas Haller2023-02-091-1/+2
| |
* | contrib: avoid using "sudo" in REQUIRED_PACKAGES scriptsThomas Haller2023-02-082-2/+8
| | | | | | | | | | It's often not installed, and usually we are already root. Avoid using sudo.
* | contrib: add "git-backport-merge" script for backporting merge commits in ↵Thomas Haller2023-02-032-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | contrib: setup "systemd" in makerepo.sh scriptThomas Haller2023-02-011-0/+5
| |
* | contrib/release.sh: add hint about publishing documentation on websiteThomas Haller2023-01-301-1/+30
| |
* | gitlab-ci: use "meson test" for running unit testsThomas Haller2023-01-301-4/+5
| | | | | | | | | | | | | | | | It seems that `meson test` is preferred over `ninja test`. Also, pass "--print-errorlogs" to meson, and pass "-v" to the build steps. Note that `ninja test` already ends up calling `meson test --print-errorlogs`, but it doesn't use "-v", so the logs are truncated.
* | gitlab-ci: rerun meson test on failure with debuggingThomas Haller2023-01-301-7/+10
| | | | | | | | | | | | Like done for autotools. First we run the test without debugging option. If it fails, we run it again to possibly trigger the failure again and get better logs.
* | gitlab-ci: explicitly set "NMTST_DEBUG=debug,..." for second debug runThomas Haller2023-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "debug" is implied when setting NMTST_DEBUG, but not specifying "no-debug". This change has thus no effect, but it seems clearer to be explicit. The "debug" flag affects nmtst_is_debug(). Note that tests *must* not result in different code paths based on debug, they may only 1) print more debug logging 2) do more assertion checks. Having more assertion checks can result in different outcome of the test, that is, that the additional assertion fails first. That is acceptable, because failing earlier is possibly closer to the issue and helps debugging. Also, when the additional failure is fixed and passes, we still will fail at the assertion we are trying to debug. In particular, an access to nmtst_get_rand*()/nmtst_rand*() must not depend on nmtst_is_debug(), because then different randomized paths are taken based on whether debugging is enabled.
* | gitlab-ci: fix randomizing tests in "nm-ci-run.sh"Thomas Haller2023-01-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code was just wrong. Usually in gitlab-ci, NMTST_SEED_RANDOM is unset, so the previous code would not have set it. Which means that our tests run with NMTST_SEED_RANDOM="0". Fuzzing (or randomizing tests) is very useful, we should do that for the unit tests that run in gitlab-ci. Fix this. But don't let the test choose a random number. Instead, let the calling script choose it. That is, because we might run the tests more than once (without debugging and no valgrind; in case of failure return with debugging; with valgrind). Those runs should use the same seed. This fixes commit 70487d9ff8a0 ('ci: randomize tests during our CI'), but as fixing randomization can break previously running tests, we may only want to backport this commit after careful evaluation.
* | contrib/copr: better detect git-ref in "nm-copr-build.sh"Thomas Haller2023-01-241-0/+1
| |
* | contrib/rpm: fix condition in "NetworkManager.spec" (3)Thomas Haller2023-01-241-1/+1
| | | | | | | | | | Fixes: 096b9955d67d ('contrib/fedora: make "lto" in the spec file configurable') Fixes: 7a62845424c4 ('contrib/rpm: fix condition in "NetworkManager.spec"')
* | contrib/rpm: fix condition in "NetworkManager.spec" (2)Thomas Haller2023-01-241-1/+1
| | | | | | | | | | Fixes: 096b9955d67d ('contrib/fedora: make "lto" in the spec file configurable') Fixes: 7a62845424c4 ('contrib/rpm: fix condition in "NetworkManager.spec"')
* | contrib/rpm: fix condition in "NetworkManager.spec"Thomas Haller2023-01-241-1/+1
| | | | | | | | Fixes: 096b9955d67d ('contrib/fedora: make "lto" in the spec file configurable')
* | contrib/fedora: make "lto" in the spec file configurableThomas Haller2023-01-244-2/+31
| | | | | | | | | | | | | | | | | | When we build a copr image, we run the "nm-copr-build.sh" script. That script, should honor "LTO=0|1|" to explicitly enable/disable LTO. Since the copr script only builds a SRPM, which then gets build we need that the default LTO flag in the SRPM is templated. Fixes: 0566e9dc63fb ('contrib: support disabling "LTO" in "nm-copr-build.sh"')
* | contrib: support disabling "LTO" in "nm-copr-build.sh"Thomas Haller2023-01-241-2/+13
| | | | | | | | | | | | | | | | | | The "nm-copr-build.sh" script is run by our copr to generate the SRPM of NetworkManager (via `curl ... | bash`). Building with LTO takes a long time, for testing it can be nice to disable that. Add an environment variable for that. It can be used when manually building an RPM in copr.
* | contrib/fedora: install "python36-gobject" when building with meson on centos7Thomas Haller2023-01-231-0/+4
| | | | | | | | | | | | | | | | | | With the meson build configuration, there is obviously python3 installed and in the path. The build script will pick that up as preferred python. However, we will also need working pygobject to build the documentation. But we only have that for python2 installed. Fix that, by installing "python36-gobject".
* | contrib/fedora: disable "qt" build of examples for spec fileThomas Haller2023-01-231-0/+1
| | | | | | | | | | Otherwise, we require a C++ compiler, but our build requirements don't install g++. So build will fail.
* | contrib/fedora: explicitly set "pppd" path in configure scriptThomas Haller2023-01-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | We have "BuildRequires: ppp-devel". While in Fedora 37 that has a dependency on "ppp" package, that is not the case on Centos7. I didn't test others, but the point is it's not always there. "/usr/sbin/pppd" is provided by "ppp" package, and we might not have it installed via the build requirements. But we only need it to detect the path, which is not necessary on RHEL/Fedora. Just set the path explicitly with the respective configure option.
* | rpm: don't BR dhcp-clientLubomir Rintel2023-01-171-6/+6
| | | | | | | | | | | | | | | | We don't need the builder to install dhcp-client to build with support for it. Requiring it to be installed it not great because it has runtime implications -- it installs a dispatcher script. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1503
* | contrib: add "reexec" step to "nm-in-container.sh"Thomas Haller2023-01-051-4/+9
| | | | | | | | Just a shortcut for reset and exec.
* | contrib: default to run same fedora version in nm-in-container.sh as hostThomas Haller2023-01-051-1/+8
| | | | | | | | | | If the out host runs Fedora, it's most useful that the container is the same Fedora version. Detect it.
* | contrib: install more package in "nm-in-container.sh"Thomas Haller2023-01-041-1/+61
| | | | | | | | | | | | | | | | | | NM-ci wants to install a lot of packages when running the first test. In particular, NM-ci has no nice script that lists all the dependencies, so it's not immediately clear which packages are required. Still, install some of those packages so that they are already present when running the first NM-ci test.
* | contrib/scripts: update "nm-copr-build.sh" script to use new nm-git-bundleThomas Haller2022-12-201-1/+1
| |
* | contrib: fix duplicate package in "contrib/scripts/nm-in-container.sh" scriptThomas Haller2022-12-141-1/+0
| |