In distributions that package shared libraries and daemons separately,
it's possible to have the shared library (because it's required to run
something like Flatpak) but not the accountsservice daemon or its
malcontent extension (because the administrator of this particular
installation has no interest in parental controls, and their choice of
desktop environment is such that nothing else depends on accountsservice
either). This minimizes the memory and disk space cost of enabling the
libmalcontent feature in Flatpak for those who do not need it, while
keeping it available for those that do.
Treat this the same as if accountsservice is available but the
malcontent extension is not: fail open, by returning
MCT_MANAGER_ERROR_DISABLED.
Resolves: https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/27
Bug-Debian: https://bugs.debian.org/972145
Signed-off-by: Simon McVittie <smcv@debian.org>
Rather than updating the packages on a generic Debian Unstable image
every time a CI build happens, pre-build the image and pre-download all
the dependencies.
This should speed the CI runs up; they currently take about 4 minutes.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
This time, add it as a wrap module rather than a git submodule. They’re
easier to manage, and integrate better with Meson.
The subproject has to be re-added so that malcontent can be built on
Debian Stable and Fedora 31 for the gnome-software CI. See
https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/487.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
The latter doesn’t work well when building as a subproject — it
explicitly refers to the parent project root.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
We’ll drop the Transifex translation machinery downstream after this, so
this is the last time the translations will be synced.
I have not verified any of these translations, but am upstreaming them
on the premise that some strings are better than no strings.
This commit was produced by:
1. `ninja malcontent-update-po`
2. Copy in po files from downstream
3. `ninja malcontent-update-po` again
4. Manually drop header-only changes
5. Manually drop changes to `translator-credits`
6. Manually drop some conflicted strings from `id.po` (prefer the
upstream versions)
7. Manually merge headers
There are no more `help/` translations to upstream.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Replace usages of the terms whitelist and blacklist with the more
inclusive and more precise terms allowlist and blocklist, which are
actually also more consistent with parts of the codebase, e.g.
mct_app_filter_is_content_type_allowed().
The only API break here is in libmalcontent/app-filter.h but the
relevant API is not used anywhere else in Endless OS beyond this repo,
nor to my knowledge in any other distribution. Also, per the README,
this project's API is not stable, so now is a good time to make this
change.
This is a backport of commit 01e9ee8113 from appstream-glib:
as-content-rating: Lower the OARS/CSM mapping of sex-homosexuality/intense
This rationalises it with the OARS/CSM mapping of
sex-themes/intense, and with many western societal norms. It is
against the laws and morals of various western countries to discriminate
on sexual orientation, so the mappings for sex-homosexuality/intense and
sex-themes/intense should be the same.
The mappings for the other values of sex-homosexuality and sex-themes
remain different, as their descriptions aren’t as comparable (for
example, for `mild`, the descriptions are “Indirect references to
homosexuality” vs “Provocative references or descriptions”).
The sex-homosexuality ratings category does need to continue to exist,
though, as it’s illegal in some countries to *not* discriminate on
sexual orientation. Those countries can provide and maintain their own
OARS/age mappings.
See https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/21.
This issue is now being solved in appstream-glib as the content rating
code has been moved there so it can be shared between malcontent and
gnome-software.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes: https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/21
If a suitably new version of appstream-glib is available, use its
implementation of content rating systems (see
https://github.com/hughsie/appstream-glib/pull/364), rather than our
forked one.
This adds a dependency on libappstream-glib, but no particular version.
Eventually, our copy of `gs-content-rating.[ch]` can be dropped.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes: #7
This incorporates the following commits from gnome-software:
• 4db48ef429501d86a45e87eaf8dd97e59dea0d58
• a62b57a60f886a61c30f17b08277c1b826068a9d
• 617f0de4f109efe319de36cbc42076e667578eda
Signed-off-by: Philip Withnall <withnall@endlessm.com>
This aligns the copy of the API here with what’s being proposed in
appstream-glib (https://github.com/hughsie/appstream-glib/pull/364). In
a few commits’ time, this copy will be deprecated.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
This incorporates commit ed981f1d26f9a2c086eeccdee2909959de64f908 from
gnome-software, which ensures that content rating systems are chosen by
territory rather than language.
Signed-off-by: Philip Withnall <withnall@endlessm.com>