From 0cd1ac2807b48fa084e14d02e67797ced67f88ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Tue, 2 Jul 2024 13:41:08 +0200 Subject: feat(blog): write about nextcloud + openbsd --- ...24-07-01-openbsd-nextcloud-memories-exiftool.md | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 src/b/2024-07-01-openbsd-nextcloud-memories-exiftool.md (limited to 'src') diff --git a/src/b/2024-07-01-openbsd-nextcloud-memories-exiftool.md b/src/b/2024-07-01-openbsd-nextcloud-memories-exiftool.md new file mode 100644 index 0000000..c9dc4ff --- /dev/null +++ b/src/b/2024-07-01-openbsd-nextcloud-memories-exiftool.md @@ -0,0 +1,94 @@ +--- +title: OpenBSD, Nextcloud, Memories and ExifTool +date: 2024-07-01 +--- + +## Why? + +I have setup an OpenBSD bare-metal server in an old SuperMicro enclosure. +[Memories](https://apps.nextcloud.com/apps/memories) is known to be a great +replacement for Google Photos and Co. + +However there are some quirks that needs to be fixed after a fresh install. + +## How? + +### Extiftool/ffmpeg + +Copy the ffmpeg, ffprobe and perl binaries in the */var/www* chroot, preserving +their directory structure. Same for each of their libraries, retrieved with ldd. + +Copy the libdata perl5 directory in the */var/www* chroot. + +``` +mkdir /var/www/usr/local/libdata +cp -r /usr/local/libdata/perl5 /var/www/usr/local/libdata +``` + +### Filecache template + +If for some reasons you can not preview the details of a file from Memories or +share it, fire up an sql client and delete this non-existing file from its index +*(thanks +[nextcloud/server/#40886](https://github.com/nextcloud/server/issues/40886))*: + +``` +DELETE FROM oc_filecache +WHERE path like '%merged-template-prepend.js.deps%'; +``` + +### Memories Android client + +Edit the *config/config.php* file in your nextcloud root directory with the +following lines *(thanks +)*: + +``` +'overwrite.cli.url' => 'https://', +'overwritehost' => '', +'overwriteprotocol' => 'https', +``` + +### Automation + +Most of these steps are automated at +[roles/nextcloud/tasks/dependencies.yml](https://git.rgoncalves.se/_infrastructure/rules/tree/roles/nextcloud/tasks/dependencies.yml) + +``` +--- + +- name: copy dependencies binaries to chroot + ansible.builtin.include_role: + name: copy_bin + vars: + copy_bin__root_dir: "{{ httpd_pre__chroot_dir }}" + copy_bin__name: "{{ nextcloud__loop_dependencies_item }}" + loop_control: + loop_var: nextcloud__loop_dependencies_item + loop: + - ffmpeg + - ffprobe + - perl + +- name: copy dependencies for exiftool + ansible.builtin.copy: + src: /usr/local/bin/exiftool + dest: "{{ httpd_pre__chroot_dir }}/bin/exiftool" + mode: preserve + remote_src: true + +- name: create perl dependencies directory + ansible.builtin.file: + path: "{{ httpd_pre__chroot_dir }}/{{ nextcloud__perl_libdata_dir | dirname }}" + owner: 0 + group: 0 + mode: "0755" + state: directory + +- name: copy perl dependencies + ansible.builtin.copy: + src: "{{ nextcloud__perl_libdata_dir }}" + dest: "{{ httpd_pre__chroot_dir }}/{{ nextcloud__perl_libdata_dir | dirname }}" + mode: preserve + remote_src: true +``` -- cgit v1.2.3