Commit Graph

572 Commits

Author SHA1 Message Date
Robert Adam
459a3bf888 MAINT: Added clang-format support
The used .clang-format file has been generated using clang-format 6
(shipped with Ubuntu 18.04) and is therefore backwards compatible with
all clang-format versions until v6.
2020-09-11 18:28:38 +02:00
Robert Adam
4f3f61e741 MAINT: Use rel paths in updatetranslations.sh
The script now uses relative paths (in order to not include information
about the committer's file tree in the commit message.

Furthermore the pushd/popd was removed as we don't have to restore the
path in a shell script as these run in a sub-shell anyways and therefore
can't change the calling shell's pwd.
2020-09-06 16:38:09 +02:00
Robert Adam
fa2a42c40f MAINT: Fix updatetranslations.sh error code
Due to the usage of a pipe, lupdate's error code wasn't returned to the
shell as expected.
2020-09-06 13:49:37 +02:00
Robert Adam
401fd0b6e4 MAINT: Fix updatetranslations.sh script 2020-09-06 13:39:30 +02:00
Robert Adam
34c602c85b BUILD(qmake): Remove
This commit removes all qmake-related build-files from the system. We
have now migrated to cmake and are no longer maintaining qmake anyways
and therefore there is no reason to keep it.

Removing it also clearly states to any potential user/programmer that
this project is no longer intended to be compiled with qmake.

Given that the .pri files no longer exist, the mumble-version.py script
had to be adapted to read the version from the CMakeLists.txt file
instead.

Furthermore a few of the submodules support cmake natively and therefore
we no longer need the src/buid-directory approach in order to build
them. The respective build dirs have been removed and the src-dirs have
been renamed.
2020-09-02 08:29:45 +02:00
Robert Adam
756a35e334 MAINT(mumble-version.py): Fix indentation 2020-09-02 08:11:28 +02:00
Robert Adam
a0ccce40f0 CI(installer): Only build a few cultures by default
This should save some time during building the installer which hopefully
helps preventing the Windows CI from exceeding the maximum time.

Co-authored-by: Davide Beatrici <github@davidebeatrici.dev>
2020-08-02 16:04:19 +02:00
Davide Beatrici
c182bc6db0 REFAC(ci): move scripts to dedicated ".ci" folder
The "scripts" folder is quite cluttered, let's make it a bit better.
2020-07-18 00:18:25 +02:00
Davide Beatrici
920bc7528e CI(azure-pipelines): use correct path for build output
"Agent.BuildDirectory" refers to the path on the agent where all folders for the pipeline are created.

"Build.BinariesDirectory" is the correct variable to use: it refers to the path that can be used as an output folder for compiled binaries.

Reference: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables
2020-07-17 19:12:40 +02:00
Robert Adam
30b67b76eb
Merge pull request #4344: FEAT(server): Allow loading welcome text from file
This allows specifying welcometextfile in murmur.ini. If no welcometext
is set in the ini-file, the welcome text is loaded from the file.

Fixes #3723
2020-07-14 17:57:05 +02:00
Davide Beatrici
0b26fc7d3d CI: Build with CMake 2020-07-11 23:33:25 +02:00
Nik Reist
2581534c04 scripts: add PowerShell script to build multilanguage installer
This is basically a replacement for our old Perl script ("build_installer.pl").

Aside from using CPack instead of MSBuild, there's not much difference in terms of methodology.

The Perl script exclusively uses Windows SDK tools; the PowerShell one uses a COM object, a WiX tool and an extra one from FireGiant (WiX's developers).

In future we should investigate whether using the "WindowsInstaller.Installer" COM object (used to replace "msiinfo.exe") we can replace FireGiant's EmbedTransform, so that WiX remains the only dependency.

Co-authored-by: Davide Beatrici <git@davidebeatrici.dev>
2020-07-11 23:33:25 +02:00
Popkornium18
39e12d3325 FEAT(server): Allow loading welcome text from file
This allows specifying welcometextfile in murmur.ini. If no welcometext
is set in the ini-file, the welcome text is loaded from the file.

Fixes #3723
2020-07-08 20:10:32 +02:00
Robert Adam
9d244227aa
Merge pull request #4147: FEAT(server): Add rememberduration option
This option allows to set a threshold on how long a user's channel
should be remembered. This is useful for scenarios where users usually
don't want their channel to be remembered by the server unless they had
a disconnect (aka have ot re-connect after a short period of time).

Implements #4143
2020-07-08 19:21:27 +02:00
Robert Adam
e28855e963 CI(azure): Fix brew-error for installed packages
If brew is asked to install a package that is already installed, it will
set a non-zero exit status that causes the CI to abort and fail.

The fix for that is to explicitly check every package for whether it is
already installed and only if they are not, ask brew to install them.

This fix is the same that has been applied in
3e0c5065d2
2020-07-08 15:57:08 +02:00
deluxghost
13b85a3ae2 FEAT(server): Add rememberduration option
This option allows to set a threshold on how long a user's channel
should be remembered. This is useful for scenarios where users usually
don't want their channel to be remembered by the server unless they had
a disconnect (aka have ot re-connect after a short period of time).

Implements #4143
2020-07-03 19:27:45 +02:00
Robert Adam
6d01625af8 MAINT(snapshot-versions): Change snapshot version format
Until now the snapshot versions looked something like
1.4.0~444~g4afab7c~snapshot. They include the Mumble version which they
are a snapshot for at the beginning, then the revision number (the
amount of commits since the last tag in git's history), followed by the
latest commit's hash (prefixed by "g") and finally the word "snapshot".

The problem with this approach is that it requires knowledge of the git
history at least until the most recent tag. In addition to that it also
requires someone to think about moving the "tag-for-ci" that marks a
release-state in the master branch to be set on every release.

The history requirement is not an issue for a normal clone of the
repository but if someone (e.g. the CI) performs a shallow clone of the
repository, then the script fails.

In order to address this problem, this commit changes the version format
to be 1.4.0~2020-07-02~g4afab7c67~snapshot. The revision number got
replaced by the date of the most recent commit (in ISO format) and the
commit hash is now abbreviated by git itself as it sees fit instead of
manually truncating the commit hash at 7 characters.

That way the script doesn't require knowledge of the latest tag and all
the history after that. That way the script can now be run in a shallow
clone of depth 1.
2020-07-03 13:41:56 +02:00
Konstantin Goncharik
bd3a70206d
REFAC(lgtm): Removed subsequently overwritten key
Dictionary key 'key_exchange' is subsequently overwritten.
2020-06-12 22:39:01 +07:00
Robert Adam
4977ef429d
CI: change update target for AppImages
Previously AppImages built on the CI got their updates from https://dl.mumble.info/snapshots/
but now we have a separate directors `nightly` that'll contain CI build artifacts and this should be used instead.
2020-06-11 09:49:54 +02:00
Robert Adam
5e347c6efb CI: Added check for unprocessed translations
As it happens rather frequently for someone (e.g. me) to forget to
update the translations after having messed with translated strings,
this commit introduces a check to the CI that verifies that the
translations are always up-to-date.
2020-05-10 13:01:57 +02:00
Sean Talts
37d24f6bf2 src/murmur: Add autobanSuccessfulConnections flag.
The idea here is that sometimes you really do have a lot of folks connecting from a single IP,
and if those connections are successful you don't want to ban any of them.
However, in cases where the server needs to guard against malicious users attempting a DDOS
by reconnecting their valid user account over and over, we need to be able to configure the
server to still ban those successful attempts.
2020-04-20 15:05:04 -04:00
Robert Adam
4ab0e03492 CI: Include GRPC support
We have had multiple cases now in which there have been some errors in
changes related to GRPC that weren't detected by the CI because it
excluded the GRPC code from the build process. This will bw changed now.

As all other CIs have been stubborn, for now we'll only build GRPC on
travis as these use a new-enough Ubuntu version to be able to build
GRPC.
MacOS CI I haven't got to work with the whole homebrew stuff and Windows
is done in its own repo (which I won't touch either).

m
2020-04-20 12:07:26 +02:00
Robert Adam
e2fe9574b6
scripts/murmur.ini: Remove duplicated autoban* options 2020-04-05 09:44:30 +02:00
Daniel Lublin
7fde61f681 scripts/murmur.ini: Document settings missing in example murmur.ini 2020-04-04 17:43:07 +02:00
Robert Adam
a829075b57 CI: Publish the Windows installer as a build-artifact on Azure-Pipelines 2020-03-02 19:07:23 +01:00
Robert Adam
cdee0b772d
Merge PR #3957: Improve Azure-Pipelines Windows build 2020-01-30 21:56:09 +01:00
Robert Adam
abc3b916ef scripts/azure-pipelines/install-environment.ps1: Increase the performance of the Invoke-WebRequest by disabling the 'progressbar' 2020-01-30 18:49:26 +01:00
Robert Adam
897860207f scripts/azure-pipelines/install-environment.ps1: Surround Invoke-WebRequest with try/catch to display error message on failure 2020-01-30 18:47:56 +01:00
Robert Adam
30a6b52277 scripts/travis-ci/script.bash: Remove && operator as this breaks the intention of bash's -e flag 2020-01-28 13:30:13 +01:00
Robert Adam
0ad3b54ebd scripts/azure-pipelines/build_install-environment_macos.bash: Remove && operator as this breaks the intention of bash's -e flag 2020-01-28 13:29:02 +01:00
Robert Adam
87ed3ac88b scripts/azure-pipelines/build_linux.bash: Remove && operator as this breaks the intention of bash's -e flag 2020-01-28 13:28:11 +01:00
Robert Adam
d688d76ad8 scripts/azure-pipelines/build_macos.bash: Remove && operator as this breaks the intention of bash's -e flag 2020-01-28 13:20:49 +01:00
Robert Adam
ea1ff86c1e Added configuration file for specifying whether a provided qt-translation should be used as a fallback only or whether it should override an existing Qt translation 2020-01-28 08:15:38 +01:00
Davide Beatrici
4e67a2fafb Auto-update LICENSE.header in source files 2020-01-07 03:09:22 +01:00
John Mckay
f046c74aba Client authentication for gRPC
This adds client authentication using TLS certificates when it is
enabled in gRPC. This just the basic feature right now. You either have
access or you do not.

Access is granted by putting the certificate digests of the authorized
users into the murmur.ini file.
2019-11-30 04:10:04 +00:00
Davide Beatrici
13b7e676d0 CI: remove "libjack-jackd2-dev" dependency 2019-10-31 09:57:58 +01:00
Stefan Hacker
efc8dee561 Remove location reporting from updatetranslations.sh
Locations produce a ton of churn in our diffs with little gain.
If someone actually needs the source location they can still
grep for the string.
2019-10-28 23:34:52 +01:00
Davide Beatrici
9e1a5604d2 Remove CELT 0.11.0
CELT 0.11.0 provides better quality in comparison to CELT 0.7.0, but the two versions of the codecs are not compatible, which is why we provided both of them.

Opus was introduced in Mumble 1.2.4 (7586a61226), thus we expect that most (if not all) users are using it.

By removing CELT 0.11.0 we don't break backwards compatibility, because it's provided by CELT 0.7.0.

The main reason for removing the codec is the fact that its discontinued (in favor of Opus).

Also, CELT 0.11.0 was removed from the Debian package back in 2012: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682010
2019-10-15 03:50:24 +02:00
Davide Beatrici
8d20129db0 Travis CI: disable SonarCloud scanner, incompatible with Ubuntu Bionic (18.04)
Unfortunately "sonar-scanner" fails with the following error:

ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found empty. Please make sure that:
  * you are using the latest version of the build-wrapper and the SonarCFamily analyzer
  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
	at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:239)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:403)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:399)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:362)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:98)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)

The file is not generated because the C/C++ plugin library fails to load:

ERROR: ld.so: object '/home/travis/.sonar/cache/87f7532f0609a32b83c77be7ae487f14/build-wrapper-linux-x86/libinterceptor-${PLATFORM}.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
2019-10-15 02:59:55 +02:00
Davide Beatrici
c16ba44e03 Travis CI: switch to Ubuntu Bionic (18.04)
https://docs.travis-ci.com/user/reference/bionic

The ARM64 build was already using Bionic, even with "dist: xenial".

This commit also changes "https://dl.mumble.info/mirror/mirror.mxe.cc" with "https://dl.mumble.info/mirror/pkg.mxe.cc".

Originally only "mirror.mxe.cc" existed because we set up the mirror when https://pkg.mxe.cc was not reachable (we mirrored https://mirror.mxe.cc).

Once https://pkg.mxe.cc was back online, we mirrored it and symlinked "mirror.mxe.cc" to "pkg.mxe.cc".
2019-10-14 04:15:23 +02:00
Davide Beatrici
8cf4a9c2fd Travis CI: transform Linux x86_64 build into ARM64
Travis CI announced support for ARM64 builds a few days ago: https://blog.travis-ci.com/2019-10-07-multi-cpu-architecture-support

We already have a Linux x86_64 build on Azure Pipelines, which also generates an AppImage.

This commit changes the architecture for the build we have on Travis CI, so that it's not redundant anymore (and becomes useful).

The "no-pch" build is not changed because the only differences consist in the PCH header not being used and the SonarQube Scanner being executed.

Also, we don't want to use an ARM64 builder unnecessarily.
2019-10-13 01:35:41 +02:00
Davide Beatrici
3de7c13305 Travis CI: remove macOS build, it's on Azure Pipelines
The macOS build on Azure Pipelines was restored in 5094de66e0.
2019-10-12 22:50:50 +02:00
Davide Beatrici
445e1a8a18 Azure Pipelines: build macOS installer 2019-10-12 21:52:16 +02:00
Davide Beatrici
e9029a904e Remove "compat", i386 is not supported anymore
"compat" was a very small and simple program; its purpose was to show a message informing the user that the Mumble binary is only for x86_64 processors.

The i386 architecture is not supported in Xcode 10, meaning that we cannot compile it anymore.

https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
2019-10-10 00:11:16 +02:00
Davide Beatrici
f6fc30db22 Azure Pipelines: get Mumble version with mumble-version.py
This commit changes the Linux build script so that it retrieves the full Mumble version using mumble-version.py.

Previously we were using the first 7 characters of the commit hash as version, which is not very descriptive.
2019-10-04 06:07:47 +02:00
Davide Beatrici
46776df2b0 scripts: add mumble-version.py
Copied from our current build environment, the header has been changed to match the one in the other scripts.

mumble-version.py determines the full Mumble version based on multiple variables, such as the current commit hash and the latest tag.

There's no reason to keep it in the build environment repository (mumble-releng), because it's supposed to be run inside the Mumble repository and doesn't depend on anything from the build environment.
2019-10-04 06:07:44 +02:00
Davide Beatrici
c7c4fba683 Azure Pipelines: store build environment in the proper directory
Recent builds have failed because there is not enough space in `C:\` after installing the build environment, which we used to extract in `C:\MumbleBuild`.

This commit changes the PowerShell scripts so that our environment directory (e.g. `MumbleBuild`) is created in the proper directory (Agent.ToolsDirectory's value, e.g. `D:\a\_tool\`) instead of `C:\`.

`C:\MumbleBuild` is still required because our build environment's qmake expects its configuration files to be there (hardcoded). The environment installation script creates a symbolic link to solve the problem.
2019-08-07 06:46:07 +02:00
Davide Beatrici
267e306a25 Travis CI: remove AppImage creation and upload
It's now handled by Azure Pipelines.
2019-07-29 09:02:57 +02:00
Davide Beatrici
bf81051887 Azure Pipelines: add Linux build to create and store AppImage as artifact
This is the first step towards our new build infrastructure.
2019-07-29 07:22:51 +02:00
Davide Beatrici
f8afdd758d Travis CI: remove Qt 4 builds 2019-07-27 23:40:50 +02:00