Compare commits

...

3 Commits

Author SHA1 Message Date
Evgeny Vereshchagin 3c2a50c945 oss-fuzz: point the badge directly to our logs 2020-04-04 19:41:33 +02:00
Evgeny Vereshchagin 858b64593a semaphore: switch to upstream-ci
"debian/master" has been broken since
d6483013d5
was merged.
2020-04-04 19:36:53 +03:00
Zbigniew Jędrzejewski-Szmek a2f838d590 detect-virt: also detect "microsoft" as WSL
From https://github.com/microsoft/WSL/issues/423#issuecomment-221627364:
> it's unlikely we'll change it to something that doesn't contain "Microsoft"
> or "WSL".

... but well, it happened. If they change it incompatibly w/o adding an stable
detection mechanism, I think we should not add yet another detection method.
But adding a different casing of "microsoft" is not a very big step, so let's
do that.

Follow-up for #11932.
2020-04-04 16:52:32 +02:00
3 changed files with 9 additions and 8 deletions

View File

@ -7,7 +7,7 @@ System and Service Manager
[![Semaphore CI Build Status](https://semaphoreci.com/api/v1/projects/28a5a3ca-3c56-4078-8b5e-7ed6ef912e14/443470/shields_badge.svg)](https://semaphoreci.com/systemd/systemd)<br/> [![Semaphore CI Build Status](https://semaphoreci.com/api/v1/projects/28a5a3ca-3c56-4078-8b5e-7ed6ef912e14/443470/shields_badge.svg)](https://semaphoreci.com/systemd/systemd)<br/>
[![Coverity Scan Status](https://scan.coverity.com/projects/350/badge.svg)](https://scan.coverity.com/projects/350)<br/> [![Coverity Scan Status](https://scan.coverity.com/projects/350/badge.svg)](https://scan.coverity.com/projects/350)<br/>
[![Fuzzit Status](https://app.fuzzit.dev/badge?org_id=systemd&branch=master)](https://app.fuzzit.dev/orgs/systemd/dashboard)<br/> [![Fuzzit Status](https://app.fuzzit.dev/badge?org_id=systemd&branch=master)](https://app.fuzzit.dev/orgs/systemd/dashboard)<br/>
[![OSS-Fuzz Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/systemd.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html)<br/> [![OSS-Fuzz Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/systemd.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html#systemd)<br/>
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1369/badge)](https://bestpractices.coreinfrastructure.org/projects/1369)<br/> [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1369/badge)](https://bestpractices.coreinfrastructure.org/projects/1369)<br/>
[![Travis CI Build Status](https://travis-ci.org/systemd/systemd.svg?branch=master)](https://travis-ci.org/systemd/systemd)<br/> [![Travis CI Build Status](https://travis-ci.org/systemd/systemd.svg?branch=master)](https://travis-ci.org/systemd/systemd)<br/>
[![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/systemd/systemd.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/systemd/systemd/context:cpp)<br/> [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/systemd/systemd.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/systemd/systemd/context:cpp)<br/>

View File

@ -5,7 +5,7 @@ set -eux
# default to Debian testing # default to Debian testing
DISTRO=${DISTRO:-debian} DISTRO=${DISTRO:-debian}
RELEASE=${RELEASE:-buster} RELEASE=${RELEASE:-buster}
BRANCH=${BRANCH:-debian/master} BRANCH=${BRANCH:-upstream-ci}
ARCH=${ARCH:-amd64} ARCH=${ARCH:-amd64}
CONTAINER=${RELEASE}-${ARCH} CONTAINER=${RELEASE}-${ARCH}
CACHE_DIR=${SEMAPHORE_CACHE_DIR:=/tmp} CACHE_DIR=${SEMAPHORE_CACHE_DIR:=/tmp}

View File

@ -462,13 +462,14 @@ int detect_container(void) {
goto finish; goto finish;
} }
/* "Official" way of detecting WSL https://github.com/Microsoft/WSL/issues/423#issuecomment-221627364 */ /* "Official" way of detecting WSL https://github.com/Microsoft/WSL/issues/423#issuecomment-221627364,
* ... and a working one, since the official one doesn't actually work ;(
*/
r = read_one_line_file("/proc/sys/kernel/osrelease", &o); r = read_one_line_file("/proc/sys/kernel/osrelease", &o);
if (r >= 0) { if (r >= 0 &&
if (strstr(o, "Microsoft") || strstr(o, "WSL")) { (strstr(o, "Microsoft") || strstr(o, "microsoft") || strstr(o, "WSL"))) {
r = VIRTUALIZATION_WSL; r = VIRTUALIZATION_WSL;
goto finish; goto finish;
}
} }
if (getpid_cached() == 1) { if (getpid_cached() == 1) {