5 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
1c47877f6b
calibre: Run service only if when installed
- This avoids attempting to run the service soon after FreedomBox is installed.

Tests:

- When old freedombox.deb is installed, the service is enabled. When upgraded to
newer .deb with the changes, the service is still enabled but no start attempt
is made by systemd.

- After installation of calibre, the service is running as expected.

- On a fresh installation, calibre service is working as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-10-09 22:09:00 -04:00
Sunil Mohan Adapa
071d61bcc8
*: Move all systemd service files from /lib to /usr
This is now the preferred location in Debian. See:

https://lintian.debian.org/tags/systemd-service-in-odd-location
https://bugs.debian.org/992465
https://bugs.debian.org/987989
d70caa69c6
https://lists.debian.org/debian-devel/2021/08/msg00275.html

Tests:

- Lintian no longer shows errors:
  E: freedombox: systemd-service-in-odd-location lib/.../calibre-server-freedombox.service

- Comparing the old .deb and newly generated .deb with these changes. All the
systemd files show that they are moved from /lib to /usr/lib/systemd.

- After upgrading the deb from older version to a version these changes,
services installed by the package are available (tested after restart with
wordpress and claibre). Services tweaked by the package have the changed
configuration reflected as shown by systemctl show
{service-name}.service (tested after restart with quassel).

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-10-09 22:08:50 -04:00
Veiko Aasa
11801de288
calibre: Fix freedombox.local inaccessible after enabling app
After enabling the calibre app, the app uses IP 127.0.0.1 to advertise
ODPS feeds via BonJour/mDNS. It breaks accessing freedombox.local as it now
points to 127.0.0.1.

This MR disables the BonJour in Calibre.

Fixes #2027.

Tests performed on both Debian stable and testing containers:
- Check the accessability of freedombox.local:
1) Before applying patch:
   - Start the container, check on the host that freedombox.local points to
   correct IP address of the container:
   ```
   host$ avahi-resolve -4 --name freedombox.local
   freedombox.local        10.42.1.166
   ```

   - Enable the calibre app. Check on the host that freedombox.local
   points to wrong ip address 127.0.0.1:
   ```
   host$ avahi-resolve -4 --name freedombox.local
   freedombox.local        127.0.0.1
   ```

2) Stop the calibre app, apply patch (update the calibre systemd service file,
reload systemd), restart the Service Discovery app, check on the host that
freedombox.local points to correct address.

3) Start the calibre app, check on the host that freedombox.local points to
correct address.

- All the calibre functional tests pass.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-01-30 10:50:43 -08:00
Joseph Nuthalapati
5a04f6d309
calibre: Minor changes to app description
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-09-27 22:16:37 +05:30
Joseph Nuthalapati
6bfffeee13
calibre: Add new e-book library app
[joseph: initial code for the app]
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
[sunil: use the modified framework API]
[sunil: simplify setup logic, move to service file]
[sunil: strict security for service file, dynamic users]
[sunil: interface for managing libraries]
[sunil: implement backup/restore]
[sunil: add functional, action, and view tests]
[sunil: use svg icon]
[sunil: update description]
[sunil: fix apache configuration]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-09-27 22:16:07 +05:30