Commit Graph

26 Commits

Author SHA1 Message Date
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
Philip Withnall 318b35e3da libeos-parental-controls: Add placeholder unit tests
This commit is mostly to put the test framework in place, and create a
placeholder test library for libeos-parental-controls for packaging.

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

https://phabricator.endlessm.com/T23859
2018-10-06 00:48:36 +01:00
Philip Withnall 63d229e653 eos-parental-controls-client: Add simple client program
This allows querying of the parental controls for a given user (or the
current user).

Includes documentation but no tests yet.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://phabricator.endlessm.com/T23859
2018-10-03 14:53:14 +01:00
Philip Withnall 1235c275eb build: Add gobject-introspection support
Verified to all be introspectable.

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

https://phabricator.endlessm.com/T23859
2018-10-03 14:53:14 +01:00
Philip Withnall 9b8cef7697 build: Add a bug URI in a FIXME comment
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T23859
2018-10-03 14:53:14 +01:00
Philip Withnall fe0c597774 libeos-parental-controls: Initial implementation of library
This allows the app filter to be queried, and includes all the basic
parts of a shared library. Introspection and unit tests are to follow.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://phabricator.endlessm.com/T23859
2018-10-03 14:53:14 +01:00
Philip Withnall b97d101db6 po: Add basic translation support
The messages in the polkit policy file need translating.

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

https://phabricator.endlessm.com/T23858
2018-09-28 10:12:53 +02:00
Philip Withnall 79a4c41eee accounts-service: Add accounts service vendor extension for app filter
Use accounts service’s vendor extension support for storing the app
filter per user, in a way that persists and which access to is
controlled by polkit (so writes can be restricted to administrators).

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

https://phabricator.endlessm.com/T23858
2018-09-28 10:12:53 +02:00