Commit Graph

57 Commits

Author SHA1 Message Date
Jan Tojnar 4d234c01dd build: Switch to Meson’s gnome.post_install function
Instead of using a custom post install script.
This drops the GTK 3 dependency.

Required bumping minimum Meson version to 0.59
for the `update_desktop_database` kwarg.

https://mesonbuild.com/Gnome-module.html#gnomepost_install
2022-12-30 16:35:55 +00:00
Jan Tojnar 6c96a5e7b6 build: Bump Meson dependency to 0.59.0
Required for switching to `gnome.post_install()` function
with `update_desktop_database` kwarg.

Even newer version is available in bullseye-backports in Debian
so it should probably be fine.
2022-12-30 16:35:55 +00:00
Will Thompson 8eba2f2ef3 Prepare for 0.11.0 release 2022-07-22 11:26:28 +01:00
Will Thompson 1c7fe694fa Don't depend on gtk+-3.0 if xmllint is found
When validating the .ui files, we need to determine the path to GTK 4's
relaxng schema. Previously this was erroneously looked up in the prefix
of GTK 3, which malcontent otherwise doesn't depend on.

Define the GTK dependency once, and use that variable everywhere.
2022-07-22 11:09:35 +01:00
Georges Basile Stavracas Neto c31640fa12 build: Switch to GTK4 and libadwaita
Switch the build system to GTK4 and libadwaita, instead of GTK3
and libhandy.

This commit breaks the build.
2022-07-20 19:23:12 -03:00
Christopher Davis d11e609543 dependencies: Add libhandy as a subproject
Allows for building on systems that don't ship libhandy
or a version of libhandy that's new enough.
2022-07-20 19:23:12 -03:00
Philip Withnall 0bbdb242a0 build: Bump Meson dependency to 0.57.0
This means we can depend on fix 42ba8efaf2 in Meson, which fixes use of
`volatile` in the default templates used by `gnome.mkenums_simple()`.
This fixes compiler warnings with recent compilers, which are promoted
to errors due to `-Werror`.

Meson 0.57.0 is available in bullseye-backports in Debian, which means
it’s available basically everywhere now.

Bumping the dependency required fixing a few deprecations in the
`meson.build` files.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-07-13 15:26:11 +01:00
Philip Withnall 9d1e8ac3c5 0.10.5
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-31 13:56:40 +01:00
Philip Withnall d9bcc0537b 0.10.4
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-09 17:17:48 +00:00
Philip Withnall 9dd47e5abc 0.10.3
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-11-01 11:10:05 +00:00
Philip Withnall 33b0692896 0.10.2
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-09-17 12:48:32 +01:00
Philip Withnall a0ec9f1f2f build: Post-release version bump to 0.11.0
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-22 17:49:24 +00:00
Philip Withnall e0fac33638 0.10.1
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-11 14:14:16 +00:00
Philip Withnall 60754b6745 build: Bump version for new release series
This will allow g-c-c to check for version 0.10 at compile time.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-10-20 12:41:05 +01:00
Philip Withnall bf9bf5e8ba 0.9.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-09-03 12:03:51 +01:00
Philip Withnall d085c7f585 build: Use meson.current_source_dir() instead of source_root()
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>
2020-07-06 10:59:45 +01:00
Philip Withnall 659d22ba34 0.8.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-28 14:07:37 +01:00
Philip Withnall 785c5d25cc Merge branch 'wip/jtojnar/meson-cleanups' into 'master'
Various meson cleanups

See merge request pwithnall/malcontent!50
2020-04-28 13:00:25 +00:00
Jan Tojnar 38c1170bda tests: Respect pamlibdir in installed tests
The build allows configuring pam module installation path but then it did
not respect it in installed tests.
2020-04-28 13:57:29 +01:00
Philip Withnall d85126da9d build: Stop building libglib-testing as a subproject
Just add it as a dependency instead. It’s a lot less painful (git
submodules are still a pain to use; and `git evtag` doesn’t work well
with them); and libglib-testing has just done a 0.1.0 release which we
can depend on.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-15 15:03:39 +01:00
Will Thompson c7041f362a meson: bump minimum version to 0.50.0
WARNING: Project specifies a minimum meson_version '>= 0.49.0' but
    uses features which were added in newer versions:
     * 0.50.0: {'install arg in configure_file'}
2020-04-06 14:32:22 +01:00
Philip Withnall aaca135199 libmalcontent: Add enum types to fix introspection of MctManagerError
Without a GType for the error enum, g-ir-scanner fails to properly
associate it with the error quark function, and (for example) error code
matching in JS doesn’t work.

This adds the enum types in a new public header file.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-04 00:37:26 +01:00
Philip Withnall e03bb128b8 malcontent-control: Add an action to launch the help
Also add actions for `app.about` and `app.quit`, for completeness.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-03 15:08:47 +01:00
Philip Withnall b683ef7e37 help: Add a basic user manual for malcontent-control
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-03 15:08:47 +01:00
Philip Withnall 2e8a07d58c 0.7.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-24 11:23:01 +00:00
Philip Withnall 6125cc3a85 build: Add an option to build against libmalcontent from the system
Rather than building it again; this is the second half of resolving the
dependency cycle from the previous commit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #16
2020-03-16 18:31:57 +00:00
Philip Withnall fda2fbd330 build: Add -Dui option to Meson
This allows the UI components (libmalcontent-ui and malcontent-control)
to be disabled in the build so that a dependency cycle with flatpak can
be avoided (by building malcontent twice, once with `-Dui=disabled` and
then again with `-Dui=enabled`).

The dependency graph is:
  malcontent-control → libmalcontent-ui → flatpak → libmalcontent
which becomes cyclic if libmalcontent-ui and libmalcontent can only be
built at the same time.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #16
2020-03-16 18:31:57 +00:00
Philip Withnall bd173218e6 Merge branch 'glib-testing-system' into 'master'
Use libglib-testing submodule only as fallback

See merge request pwithnall/malcontent!40
2020-03-16 18:14:41 +00:00
Philip Withnall 12c320d43a docs: Update license information in README and meson.build
Some of the files in `malcontent-control` are GPL-2.0+.

Use the latest SPDX identifiers in the machine-readable data in
meson.build, but use the deprecated ‘+’ form in the README since it’s a
little more human friendly.

See https://spdx.org/licenses/.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-10 14:12:25 +00:00
Jan Tojnar fc4efbef74
Use libglib-testing submodule only as fallback
Eventually, we will only use the one from system but until then both variants should work.
2020-03-06 20:41:21 +01:00
Philip Withnall 15e3e7a407 0.6.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-27 15:19:00 +00:00
Philip Withnall 77beea2dfe build: Fix definition of PACKAGE_LOCALE_DIR
It was causing translations to be looked for in the wrong place.

Also hard-code `GETTEXT_PACKAGE` since it’s basically API now.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-21 09:45:47 +00:00
Philip Withnall eef28da339 build: Add post-install script to update caches
Update the desktop, schema and icon caches.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #9
2020-02-19 13:58:09 +00:00
Philip Withnall 3289a37317 libmalcontent-ui: Add initial skeleton for separate UI library
Moving the widgets out of malcontent-control means they can be reused in
other projects. In particular, I’m interested in reusing them in
gnome-initial-setup.

The new library will not build yet, but this introduces all the build
framework necessary for moving the source files over.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-04 11:36:58 +00:00
Philip Withnall 0607bfa196 build: Bump version to 0.5.0
So the versioning is right for developing against this unreleased
version.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-04 11:34:41 +00:00
Philip Withnall 2a3f0fd741 libmalcontent: Rework pkg-config file generation
Meson 0.49 has matured its pkg-config file generation a little, and the
API has subtly changed. The main library we’re building a pkg-config
file for is now passed as the first argument; and all dependencies can
be passed to `libraries`/`libraries_private`. Any dependencies which
provide pkg-config files will automatically be moved into the pkg-config
file’s `Requires`/`Requires.private` sections.

See https://mesonbuild.com/Pkgconfig-module.html#implicit-dependencies

This bumps our Meson dependency to ≥ 0.49.0.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-04 11:34:05 +00:00
Philip Withnall 1d8f7d665c malcontent-control: Add initial skeleton application
This does nothing at the moment (not even showing a main window), but it
soon will do.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-29 15:07:15 +00:00
Philip Withnall 254eac4a55 po: A few build fixes for the translation infrastructure
It wasn’t working at all.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-21 15:49:48 +00:00
Philip Withnall f5c74d2c80 build: Fix default value of pamlibdir
The previous version only worked on Fedora-like distributions which have
`libdir = /usr/lib{,64}`. On multi-arch Debian systems, it would
calculate `pamlibdir = /usr/x86_64-linux-gnu/security` which is not
right.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-20 17:13:53 +00:00
Philip Withnall 83d2fdb838 Merge branch 'pam-module' into 'master'
Add session limits support and PAM module

See merge request pwithnall/malcontent!19
2020-01-17 11:28:49 +00:00
Philip Withnall bd7b17ffd4 pam: Add a `pam_malcontent.so` module to enforce time-limited sessions
This involves adding a build-time dependency on PAM.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-16 13:27:17 +00:00
Ting-Wei Lan 8b7d4e46de build: Port meson-make-symlink script to Python
Instead of using non-portable features of GNU ln command, such as -T
and --relative, use Python os.path.relpath function to handle it. This
fixes installation failure on FreeBSD.
2019-12-02 22:57:13 +08:00
Philip Withnall a897a4890b Release version 0.4.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-06-17 11:57:35 +01:00
Philip Withnall 432ba58f74 build: Enable -Wmissing-field-initializers
So we don’t regress on the previous commit in future.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-05-15 14:31:44 +01:00
Philip Withnall 85f24df835 build: Post-release version bump
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-19 18:11:29 +00:00
Philip Withnall 6ff0d7225b build: Bump version number to 0.2.0
To differentiate it from the pre-rename version number, 0.1.0.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-26 17:48:19 +00:00
Philip Withnall 03436eacf5 Rename project from eos-parental-controls to malcontent
Rename the library from libeos-parental-controls to libmalcontent, and
the client from eos-parental-controls-client to malcontent-client.

This was done using the following mechanical edits, and no other
changes:
```
git search-replace -f EPC///MCT
git search-replace -f Epc///Mct
git search-replace -f epc///mct
git search-replace -f eos_parental_controls///malcontent
git search-replace -f eos-parental-controls///malcontent
git search-replace -f EosParentalControls///Malcontent
git search-replace -f 'eos\\-parental\\-controls///malcontent'
git search-replace -f 'Since: 0.1.0///Since: 0.2.0'
```

Note that the accounts-service extension interface has *not* been
renamed, as that would revert people’s parental controls settings in
existing deployments.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-26 17:45:14 +00:00
Philip Withnall 95913d2a3c build: Force libglib-testing to link statically
If the tests are linked to it dynamically, they won’t run without it
installed system wide, which is not what we want.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24004
2018-12-20 17:44:45 +00:00
Philip Withnall 42ba0e13e8 build: Enable -Wdiscarded-qualifiers
The codebase is clean for it, so why not enforce it?

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24004
2018-12-20 13:01:01 +00:00
Philip Withnall a2c2965d25 tests: Add comprehensive tests for libeos-parental-controls
These test get/set behaviour of EpcAppFilter, GAppInfo support, and
various error handling paths and corner cases.

With these tests, coverage of app-filter.c is:
 • Lines: 97%
 • Functions: 100%
 • Branches: 57.5%

The branch coverage is not correctly reported, as it factors in the
failure branches for g_return_if_fail() precondition assertions, which
we deliberately do not test. With those branches manually excluded,
branch coverage is around 89% instead.

This adds libglib-testing as a subproject dependency, for its
GtDBusQueue. It adds gio-unix-2.0 as a dependency of the app-filter
tests, in order to be able to construct GDesktopAppInfos.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24004
2018-12-20 13:01:01 +00:00