Skip to content
Commits on Source (172)
*.o
/doc/version.xml
/examples/light-client
/examples/light-server
/gupnp-1.0-uninstalled.pc
/gupnp-1.0.pc
/libgupnp/GUPnP-1.0.gir
/libgupnp/GUPnP-1.0.typelib
/libgupnp/gupnp-marshal.c
/libgupnp/gupnp-marshal.h
/m4/gtk-doc.m4
/m4/libtool.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/tests/gtest/test-context
/tests/test-browsing
/tests/test-introspection
/tests/test-proxy
/tests/test-server
/tests/test-white-list
/vala/gupnp-1.0.stamp
/vala/gupnp-1.0.vapi
/build
.vscode
/.flatpak-builder
/build-dir
*~
*.orig
include:
- remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/290b79e0e78eab67a83766f4e9691be554fc4afd/templates/ci-fairy.yml"
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/290b79e0e78eab67a83766f4e9691be554fc4afd/templates/fedora.yml'
- remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/0c312d9c7255f46e741d43bcd1930f09cd12efe7/templates/ci-fairy.yml"
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/0c312d9c7255f46e741d43bcd1930f09cd12efe7/templates/fedora.yml'
variables:
MESON_TEST_TIMEOUT_MULTIPLIER: 3
......@@ -52,6 +52,10 @@ check-merge-request:
.build-template: &build
stage: build
script:
- git clone --depth=1 https://gitlab.gnome.org/GNOME/libsoup.git && pushd libsoup
- meson _build --prefix=/usr -Dtls_check=false -Ddocs=disabled
- ninja -C _build install
- popd
- meson . build --prefix=/usr -Db_coverage=true
- ninja -C build
artifacts:
......@@ -61,23 +65,30 @@ check-merge-request:
.gupnp.fedora@common:
variables:
BASE_TAG: '2021-08-14.0'
BASE_TAG: '2022-08-16.1'
FDO_UPSTREAM_REPO: GNOME/gupnp
FDO_DISTRIBUTION_PACKAGES: 'clang clang-analyzer gcovr git libasan libubsan python3-gobject python3-pip xmlto gobject-introspection-devel gtk-doc libsoup-devel libuuid-devel libxml2-devel vala ninja-build'
FDO_DISTRIBUTION_PACKAGES: 'clang clang-analyzer gcovr git libasan libubsan python3-gobject python3-pip xmlto gobject-introspection-devel gtk-doc libxml2-devel vala ninja-build libnghttp2-devel libpsl-devel sqlite-devel python3-setuptools'
FDO_DISTRIBUTION_EXEC: |
dnf clean all &&
pip3 install meson markdown toml typogrify
pip3 install meson markdown jinja2 Markdown markupsafe pygments toml typogrify gi-docgen
.gupnp.fedora:34@x86_64:
.soup3:
before_script:
- git clone --depth=1 https://gitlab.gnome.org/GNOME/libsoup.git && pushd libsoup
- meson _build --prefix=/usr -Dtls_check=false -Ddocs=disabled
- ninja -C _build install
- popd
.gupnp.fedora:36@x86_64:
extends: .gupnp.fedora@common
variables:
FDO_DISTRIBUTION_VERSION: 34
FDO_DISTRIBUTION_VERSION: 36
FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
build-fedora-container@x86_64:
extends:
- .fdo.container-build@fedora
- .gupnp.fedora:34@x86_64
- .gupnp.fedora:36@x86_64
stage: prepare
variables:
GIT_STRATEGY: none
......@@ -86,7 +97,7 @@ build-fedora-container@x86_64:
build-fedora@x86_64:
extends:
- .fdo.distribution-image@fedora
- .gupnp.fedora:34@x86_64
- .gupnp.fedora:36@x86_64
needs:
- build-fedora-container@x86_64
<<: *build
......@@ -104,7 +115,7 @@ build-fedora@x86_64:
# whole environment for every failed test, and that gives a whole
# screenful of junk each time unless we strip these.
unset $(env|grep -o '^CI_[^=]*')
env LANG=C.UTF-8 LC_ALL=C.UTF-8 meson test --print-errorlogs ${MESON_TEST_EXTRA_ARGS}
env LANG=C.UTF-8 LC_ALL=C.UTF-8 meson test --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} --print-errorlogs ${MESON_TEST_EXTRA_ARGS}
after_script:
- |
echo "Distribution: "
......@@ -126,9 +137,12 @@ build-fedora@x86_64:
junit: "build/meson-logs/testlog.junit.xml"
test-fedora@x86_64:
tags:
- ipv6
extends:
- .fdo.distribution-image@fedora
- .gupnp.fedora:34@x86_64
- .gupnp.fedora:36@x86_64
- .soup3
needs:
- build-fedora@x86_64
<<: *test
......@@ -144,7 +158,8 @@ test-fedora@x86_64:
coverage-analysis:
extends:
- .fdo.distribution-image@fedora
- .gupnp.fedora:34@x86_64
- .gupnp.fedora:36@x86_64
- .soup3
stage: analysis
allow_failure: true
script:
......@@ -162,28 +177,62 @@ coverage-analysis:
static-scan:
extends:
- .fdo.distribution-image@fedora
- .gupnp.fedora:34@x86_64
- .gupnp.fedora:36@x86_64
- .soup3
stage: analysis
needs:
- build-fedora-container@x86_64
script:
- meson --buildtype=debug _scan_build
- export SCANBUILD="$PWD/.gitlab-ci/scanbuild-wrapper.sh"
- ninja -C _scan_build scan-build
artifacts:
paths:
- _scan_build/meson-logs
after_script:
- .gitlab-ci/scanbuild-plist-to-junit.py _scan_build/meson-logs/scanbuild/ > _scan_build/junit-scan-build.xml
artifacts:
reports:
junit: "_scan_build/junit-scan-build.xml"
coverity:
extends:
- .fdo.distribution-image@fedora
- .gupnp.fedora:36@x86_64
- .soup3
stage: analysis
allow_failure: true
script:
- curl https://scan.coverity.com/download/linux64 --data "token=$COVERITY_TOKEN&project=gupnp" --output /tmp/coverity_tool.tgz
- tar zxf /tmp/coverity_tool.tgz
- mkdir coverity-build
- cd coverity-build
- env CC=clang meson ..
- ../cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja
- tar czf cov-int.tar.gz cov-int
- curl https://scan.coverity.com/builds?project=gupnp
--form token=$COVERITY_TOKEN --form email=mail@jensge.org
--form file=@cov-int.tar.gz --form version="`git describe --tags`"
--form description="gitlab CI build"
needs:
- build-fedora-container@x86_64
only:
- master
except:
changes:
- po/*.po
pages:
extends:
- .fdo.distribution-image@fedora
- .gupnp.fedora:34@x86_64
- .gupnp.fedora:36@x86_64
- .soup3
stage: website
script:
- meson doc-build -Dgtk_doc=true
- ninja -C doc-build gupnp-doc
- ninja -C doc-build doc/GUPnP
- mkdir -p public
- mv doc-build/doc/html public/docs
- mv doc-build/doc/GUPnP public/docs
artifacts:
paths:
- public
......
#!/usr/bin/env python3
#
# SPDX-License-Identifier: MIT
#
# Usage:
# $ scanbuild-plist-to-junit.py /path/to/meson-logs/scanbuild/ > junit-report.xml
#
# Converts the plist output from scan-build into a JUnit-compatible XML.
#
# For use with meson, use a wrapper script with this content:
# scan-build -v --status-bugs -plist-html "$@"
# then build with
# SCANBUILD="/abs/path/to/wrapper.sh" ninja -C builddir scan-build
#
# For file context, $PWD has to be the root source directory.
#
# Note that the XML format is tailored towards being useful in the gitlab
# CI, the JUnit format supports more features.
#
# This file is formatted with Python Black
import argparse
import plistlib
import re
import sys
from pathlib import Path
errors = []
class Error(object):
pass
parser = argparse.ArgumentParser(
description="This tool convers scan-build's plist format to JUnit XML"
)
parser.add_argument(
"directory", help="Path to a scan-build output directory", type=Path
)
args = parser.parse_args()
if not args.directory.exists():
print(f"Invalid directory: {args.directory}", file=sys.stderr)
sys.exit(1)
# Meson places scan-build runs into a timestamped directory. To make it
# easier to invoke this script, we just glob everything on the assumption
# that there's only one scanbuild/$timestamp/ directory anyway.
for file in Path(args.directory).glob("**/*.plist"):
with open(file, "rb") as fd:
plist = plistlib.load(fd, fmt=plistlib.FMT_XML)
try:
sources = plist["files"]
for elem in plist["diagnostics"]:
e = Error()
e.type = elem["type"] # Human-readable error type
e.description = elem["description"] # Longer description
e.func = elem["issue_context"] # function name
e.lineno = elem["location"]["line"]
filename = sources[elem["location"]["file"]]
# Remove the ../../../ prefix from the file
e.file = re.sub(r"^(\.\./)*", "", filename)
errors.append(e)
except KeyError:
print(
"Failed to access plist content, incompatible format?", file=sys.stderr
)
sys.exit(1)
# Add a few lines of context for each error that we can print in the xml
# output. Note that e.lineno is 1-indexed.
#
# If one of the files fail, we stop doing this, we're probably in the wrong
# directory.
try:
current_file = None
lines = []
for e in sorted(errors, key=lambda x: x.file):
if current_file != e.file:
current_file = e.file
lines = open(current_file).readlines()
# e.lineno is 1-indexed, lineno is our 0-indexed line number
lineno = e.lineno - 1
start = max(0, lineno - 4)
end = min(len(lines), lineno + 5) # end is exclusive
e.context = [
f"{'>' if line == e.lineno else ' '} {line}: {content}"
for line, content in zip(range(start + 1, end), lines[start:end])
]
except FileNotFoundError:
pass
print('<?xml version="1.0" encoding="utf-8"?>')
print("<testsuites>")
if errors:
suites = sorted(set([s.type for s in errors]))
# Use a counter to ensure test names are unique, otherwise the CI
# display ignores duplicates.
counter = 0
for suite in suites:
errs = [e for e in errors if e.type == suite]
# Note: the grouping by suites doesn't actually do anything in gitlab. Oh well
print(f'<testsuite name="{suite}" failures="{len(errs)}" tests="{len(errs)}">')
for error in errs:
print(
f"""\
<testcase name="{counter}. {error.type} - {error.file}:{error.lineno}" classname="{error.file}">
<failure message="{error.description}">
<![CDATA[
In function {error.func}(),
{error.description}
{error.file}:{error.lineno}
---
{"".join(error.context)}
]]>
</failure>
</testcase>"""
)
counter += 1
print("</testsuite>")
else:
# In case of success, add one test case so that registers in the UI
# properly
print('<testsuite name="scanbuild" failures="0" tests="1">')
print('<testcase name="scanbuild" classname="scanbuild"/>')
print("</testsuite>")
print("</testsuites>")
#!/bin/sh
scan-build -v --status-bugs -plist-html "$@"
1.4.3 (stable)
=====
1.6.0 (stable)
==============
- Re-release of 1.5.4, no functional change
1.5.4 (development)
===================
- Fix build against libsoup 3.1.2 or later
- Do not rely on a log message from libsoup in tests
- Use Docbook 4.5 for manpage
- Do not use env in binding generator
- Add missing libxml2 dependency for test
- ServiceProxy: Properly propagate cancelled actions in
deprecated calls
- ServiceProxy: Fix deprecated async calls, again.
All contributors to this release:
- Jens Georg <mail@jensge.org>
- Tomasz Kłoczko <kloczek@github.com>
Bugs fixed in this release:
- https://gitlab.gnome.org/GNOME/gupnp/issues/67
1.5.3 (development)
===================
- Linux context manager: Do not filter out v6 global addresses
- Context: Add new convenience constructors
- Examples: Fix browse.js for new API
- NetworkManager: Create v4 and v6 contexts if no family is specified
- Connman: Create v4 and v6 contexts if no family is specified
All contributors to this release:
- Jens Georg <mail@jensge.org>
- Jens Georg <mail@jensge.org>
1.4.2 (stable)
=====
1.5.2 (development)
===================
- Minor doc improvements
- Minor example fixes
- Fix pkg-config dependencies
- Fix issues found by coverity
- Deprecate internal UUID generator function
- Set log domains everywhere
- Support IPv6 in all context managers (Windows still broken)
ServiceProxy:
- Fix error handling in sync call
- Fix a memory leak in subscribe()
- Change subscribtion timeout handling
ServiceInfo:
- Remove deprecated callback
ContextFilter:
- Fix it
- Notify only if content changes
DeviceInfo:
- Set task names
- Context: Fix a memory leak if ACL was used
- Doc: Add missing ContextFilter description
- RootDevice: Deprecate get_relative_location call
- Service: Declare _valist functions deprecated
- ServiceProxyAction: add _set() to the public API
- RootDevice, Device & Service: Fix use-after-free if Service lives
longer than RootDevice
- ServiceAction: Deprecate _return() call
- ControlPoint: Deprecate get_context() call
- ServiceProxy: Fix re-queueing the message if POST fails
- ServiceProxy: Fix double-free on ProxyAction
- Doc: Add note regarding ACL and host_path()
- Doc: Add note regarding error handling of call API
ContextManager:
- Add tests for filtering
- Fix behaviour of filter. Now the filter acts as if the context is
appearing/disappearing
Vala:
- Fix ownership of XML doc
Bugs fixed in this release:
- https://gitlab.gnome.org/GNOME/gupnp/issues/42
- https://gitlab.gnome.org/GNOME/gupnp/issues/42
- https://gitlab.gnome.org/GNOME/gupnp/issues/63
- https://gitlab.gnome.org/GNOME/gupnp/issues/60
- https://gitlab.gnome.org/GNOME/gupnp/issues/10
- https://gitlab.gnome.org/GNOME/gupnp/issues/10
- https://gitlab.gnome.org/GNOME/gupnp/issues/10
- https://gitlab.gnome.org/GNOME/gupnp/issues/36
- https://gitlab.gnome.org/GNOME/gupnp/issues/37
- https://gitlab.gnome.org/GNOME/gupnp/issues/70
All contributors to this release:
- Jens Georg <mail@jensge.org>
1.4.1 (stable)
=====
1.5.1 (development)
===================
- Minor doc fixes
- Remove left-overs from WhiteList renaming
- Make tests a little friendlier if there is no ipv6
- Fix a couple of issues from scan-build
DeviceInfo:
- Make DeviceInfo:document accessible
- Offer convenience function DeviceInfo:get_icon_async to combine
icon lookup and icon download
ServiceAction:
- Potential fix for running g_clear_pointer on an uninitialized value
- Fix getting parameters from action
ServiceInfo:
- Do not free an error that was propagated
- Fix introspection on IPv6 devices
Service:
- Fix critical if Soup error other than G_IO_ERROR_CANCELLED occured
All contributors to this release:
- Jens Georg <mail@jensge.org>
1.5.0 (development)
===================
- Port to libsoup3
- API bump (1.6)
- Improved test coverage
- All _valist functions have been removed
- The documentation is now provided by gi-docgen
- All API that was marked as deprecated up until 1.4 has been removed
ServiceIntrospection:
- is now a GInitable
Context:
- Uses GSSDP.Client:port
- Fix reference leak when using ACL
DeviceInfo:
- The get_device() and get_service() virtual functions have been renamed
ServiceAction:
- ServiceAction::return() was renamed to ServiceAction::return_success() to
avoid issues with languages such as python
ServiceInfo:
- Non-gio style introspection functions are now deprecated
Service:
- Returns a proper error instead of calling g_error when autoconnect fails
ServiceProxy:
- Fixes an issue with M-POST fall-back if POST calls failed
- There is no need anymore to call ServiceProxyAction::get() to get SOAP
transport errors; those will now be already presented by the
ServiceProxy::call_action_finish() call.
- Fix regression in async deprecated API
- Fix context creation not failing if the HTTP server fails to bind
Bugs fixed in this release:
- https://gitlab.gnome.org/GNOME/gupnp/issues/58
- https://gitlab.gnome.org/GNOME/gupnp/issues/42
- https://gitlab.gnome.org/GNOME/gupnp/issues/52
- https://gitlab.gnome.org/GNOME/gupnp/issues/53
- https://gitlab.gnome.org/GNOME/gupnp/issues/54
- https://gitlab.gnome.org/GNOME/gupnp/issues/58
- https://gitlab.gnome.org/GNOME/gupnp/issues/60
- https://gitlab.gnome.org/GNOME/gupnp/issues/61
- https://gitlab.gnome.org/GNOME/gupnp/issues/63
All contributors to this release:
- Jens Georg <mail@jensge.org>
- Marvin Schmidt <marv@exherbo.org>
1.4.0 (stable)
=====
......
......@@ -37,3 +37,15 @@ a brief overview.
The developer documentation is available at https://gnome.pages.gitlab.gnome.org/gupnp/docs/
## Running the tests
The tests usually work on localhost (127.0.0.1 and ::1).
On start-up, the ests will check for a network device called "gupnp0". It it exists, it will
additonally use that for running the tests.
To create such a device you can use NetworkManager, for example:
```
$ nmcli c a ifname gupnp0 type dummy ipv4.method link-local ipv6.method link-local
```
#!/usr/bin/env python3
import os
import shutil
references = [
'doc/GUPnP',
]
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
buildroot = os.environ.get('MESON_BUILD_ROOT')
distroot = os.environ.get('MESON_DIST_ROOT')
for reference in references:
src_path = os.path.join(buildroot, reference)
if os.path.isdir(src_path):
dst_path = os.path.join(distroot, reference)
shutil.copytree(src_path, dst_path)
{
"app-id" : "org.gnome.GUPnP",
"runtime" : "org.gnome.Platform",
"runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
"command" : "light-server",
"finish-args" : [
"--share=network",
"--share=ipc",
"--talk-name=org.gtk.vfs",
"--talk-name=org.gtk.vfs.*",
"--filesystem=xdg-pictures",
"--filesystem=xdg-videos",
"--filesystem=xdg-music",
"--own-name=org.gnome.Rygel1"
],
"build-options" : {
"cflags" : "-O2 -g",
"cxxflags" : "-O2 -g",
"env" : {
"V" : "1"
}
},
"cleanup" : [
"/include",
"/lib/pkgconfig",
"/man",
"/share/doc",
"/share/gtk-doc",
"/share/man",
"/share/pkgconfig",
"*.la",
"*.a"
],
"modules" : [
{
"name" : "gssdp",
"buildsystem" : "meson",
"sources" : [
{
"type" : "git",
"url" : "https://gitlab.gnome.org/GNOME/gssdp.git/",
"branch" : "wip/libsoup3"
}
]
},
{
"name" : "gupnp",
"buildsystem" : "meson",
"sources" : [
{
"type" : "git",
"url" : "https://gitlab.gnome.org/GNOME/gupnp.git/",
"branch" : "wip/phako/libsoup3"
}
]
}
]
}
This diff is collapsed.