diff --git a/README.md b/README.md index 4681356..2257b83 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,42 @@ -Seafile for YunoHost -================= + -[![Integration level](https://dash.yunohost.org/integration/seafile.svg)](https://dash.yunohost.org/appci/app/seafile) ![](https://ci-apps.yunohost.org/ci/badges/seafile.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/seafile.maintain.svg) -[![Install seafile with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=seafile) +# Seafile for YunoHost -> *This package allow you to install seafile quickly and simply on a YunoHost server. -If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* +[![Integration level](https://dash.yunohost.org/integration/seafile.svg)](https://dash.yunohost.org/appci/app/seafile) ![Working status](https://ci-apps.yunohost.org/ci/badges/seafile.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/seafile.maintain.svg) +[![Install Seafile with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=seafile) -Overview --------- +*[Lire ce readme en français.](./README_fr.md)* + +> *This package allows you to install Seafile quickly and simply on a YunoHost server. +If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* + +## Overview Seafile is an open Source Cloud Storage application. It's a Enterprise file sync and share platform with high reliability and performance. It's a file hosting platform with high reliability and performance. Put files on your own server. Sync and share files across different devices, or access all the files as a virtual disk. -**Shipped version:** 8.0.5 -Screenshots ------------ +**Shipped version:** 9.0.2~ynh1 -| Cross Platform File Syncing | Mobile File Access | Seafile Drive client : a new nice way to work with your files | File Sharing and Permission Control | -| :------------: | :------------: | :------------: | :------------: | -| ![](https://www.seafile.com/media/img/features/sync-client.jpg) | ![](https://www.seafile.com/media/img/features/mobile-ios-client.jpg) | ![](https://www.seafile.com/media/img/features/drive-client.png) | ![](https://www.seafile.com/media/img/features/sharing-dialog.png) | -| Seafile organize files into libraries. Each library can be synced into any desktop computer, including Windows, Mac and Linux. User can also selectively sync any folder. Unsynced files can be accessed via a feature called “cloud file browser”. Seafile has a fantastic performance in file syncing. Tens of thousands of small files can be synced in a minute. | Access files via Seafile mobile clients. Both Android and iOS are supported. Cached files can be used offline without the network environment. Users can also backup photos and contacts via the mobile clients. | Seafile Drive client let users to extend the local disk space with the massive storage capacity on the Seafile server by mapping storage space on Seafile server as a virtual drive. User can access all files in Seafile immediately, without syncing them. Files can be used offline too. | Libraries and folders can be shared to users or groups, with read-only or read-write permissions. Finer-grained permissions can be set to sub-folders after a folder is shared. Files can be shared to external users via sharing links. Sharing links can be protected by passwords and support setting an expiration date. | -| File Versioning and Snapshot | File locking | Online editing and co-authoring | Audit Log | -| :------------: | :------------: | :------------: | :------------: | -| ![](https://www.seafile.com/media/img/features/file-history.png) | ![](https://www.seafile.com/media/img/features/file-locking.jpg) | ![](https://www.seafile.com/media/img/features/edit-online.png) | ![](https://www.seafile.com/media/img/features/access-logs.jpg) | -| Seafile keeps versions for files and snapshots for folders. Users can restore a file or folder to an old version easily. Snapshot for folders is a handy way to protect files against ransomware. Using de-duplication technology, file versions are kept in an efficient way with reduced storage occupation. | Seafile supports file locking to prevent concurrent editing of files and generating of conflicts files. Users can lock files in web UI or desktop clients. Office files are automatically locked when they’re opened. | Seafile supports online editing and co-authoring for office files (including docx/pptx/xlsx) with integrating with Microsoft Office Online Server or Collabora Online server. Seafile also has a built-in preview for videos, audios, PDFs, images and text files. | Seafile has following logs to help you monitoring your system : Login log: Users'login log- Traffic log: Recording how much traffic is generated via sharing link for each user - Access log: file access log via syncing clients, mobiles clients and Web interface - Edit log: file editing/modification log - Permission log: logs for file access permission changes | +**Demo:** https://demo.seafile.com -Demo ----- +## Screenshots -* [Official demo](https://demo.seafile.com/) +![Screenshot of Seafile](./doc/screenshots/mobile-ios-client.jpg) +![Screenshot of Seafile](./doc/screenshots/drive-client.png) +![Screenshot of Seafile](./doc/screenshots/file-locking.jpg) +![Screenshot of Seafile](./doc/screenshots/access-logs.jpg) +![Screenshot of Seafile](./doc/screenshots/file-history.png) +![Screenshot of Seafile](./doc/screenshots/wiki_en.png) +![Screenshot of Seafile](./doc/screenshots/sharing-dialog.png) +![Screenshot of Seafile](./doc/screenshots/sync-client.jpg) -Documentation -------------- - - * Official documentation: https://manual.seafile.com/ - * YunoHost documentation: There no other documentations, feel free to contribute. - -YunoHost specific features --------------------------- +## Disclaimers / important information ### Multi-users support @@ -61,9 +56,6 @@ Since seafile 6.3 the i386 architecture is no more supported. Seafile don't distribute binary for generic armhf architectures but rpi binary generally work on all arm board. -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/seafile%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/seafile/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/seafile%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/seafile/) - + +# Seafile pour YunoHost + +[![Niveau d'intégration](https://dash.yunohost.org/integration/seafile.svg)](https://dash.yunohost.org/appci/app/seafile) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/seafile.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/seafile.maintain.svg) +[![Installer Seafile avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=seafile) + +*[Read this readme in english.](./README.md)* + +> *Ce package vous permet d'installer Seafile rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* + +## Vue d'ensemble + +Seafile is an open Source Cloud Storage application. + +It's a Enterprise file sync and share platform with high reliability and performance. It's a file hosting platform with high reliability and performance. Put files on your own server. Sync and share files across different devices, or access all the files as a virtual disk. + + +**Version incluse :** 9.0.2~ynh1 + + +**Démo :** https://demo.seafile.com + +## Captures d'écran + +![Capture d'écran de Seafile](./doc/screenshots/mobile-ios-client.jpg) +![Capture d'écran de Seafile](./doc/screenshots/drive-client.png) +![Capture d'écran de Seafile](./doc/screenshots/file-locking.jpg) +![Capture d'écran de Seafile](./doc/screenshots/access-logs.jpg) +![Capture d'écran de Seafile](./doc/screenshots/file-history.png) +![Capture d'écran de Seafile](./doc/screenshots/wiki_en.png) +![Capture d'écran de Seafile](./doc/screenshots/sharing-dialog.png) +![Capture d'écran de Seafile](./doc/screenshots/sync-client.jpg) + +## Avertissements / informations importantes + +### Multi-users support + +This app support LDAP and the SSO authentification. + +If you have Seafile installed before 7.x and you have more than one domain for users in Yunohost or Seafile app is installed on a different domain, you need to migrate your accounts. +You can use the provided action at https://domain.tld/yunohost/admin/#/apps/seafile/actions. You can also use this following command to migrate all of your accounts: +``` +yunohost app action run seafile migrate_user_email_to_mail_email +``` +See [issue#44](https://github.com/YunoHost-Apps/seafile_ynh/issues/44) +for more information. + +### Supported architectures + +Since seafile 6.3 the i386 architecture is no more supported. + +Seafile don't distribute binary for generic armhf architectures but rpi binary generally work on all arm board. + + + +Additional informations +----------------------- + +### Links + + * Report a bug: https://github.com/YunoHost-Apps/seafile_ynh/issues + * App website: https://www.seafile.com + * YunoHost website: https://yunohost.org/ + +--- + +### Install + +From command line: + +`yunohost app install seafile` + +### Upgrade + +By default a backup is made before the upgrade. To avoid this you have theses following possibilites: +- Pass the `NO_BACKUP_UPGRADE` env variable with `1` at each upgrade. By example `NO_BACKUP_UPGRADE=1 yunohost app upgrade synapse`. +- Set the settings `disable_backup_before_upgrade` to `1`. You can set this with this command: + +`yunohost app setting synapse disable_backup_before_upgrade -v 1` + +After this settings will be applied for **all** next upgrade. + +From command line: + +`yunohost app upgrade seafile` + +### Backup + +This app use now the core-only feature of the backup. To keep the integrity of the data and to have a better guarantee of the restoration is recommended to proceed like this: + +- Stop seafile service with theses following command: + +`systemctl stop seafile.service seahub.service` + +- Launch the backup of seafile with this following command: + +`yunohost backup create --app seafile` + +- Do a backup of your data with your specific strategy (could be with rsync, borg backup or just cp). The data is stored in `/home/yunohost.app/seafile-data`. +- Restart the seafile service with theses command: + +`systemctl start seafile.service seahub.service` + +### Remove + +Due of the backup core only feature the data directory in `/home/yunohost.app/seafile-data` **is not removed**. It need to be removed manually to purge app user data. + +### Change URL + +Since now it's possible to change domain or the url of seafile. + +To do this run : `yunohost app change-url seafile -d new_domain.tld -p PATH new_path` + +Developers infos +---------------- + +Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/seafile_ynh/tree/testing). + +To try the testing branch, please proceed like that. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/seafile_ynh/tree/testing --debug +or +sudo yunohost app upgrade seafile -u https://github.com/YunoHost-Apps/seafile_ynh/tree/testing --debug +``` + +TODO +---- + +- Find a way to fix the issue https://github.com/YunoHost-Apps/seafile_ynh/issues/5 + +## Documentations et ressources + +* Site officiel de l'app : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/seafile_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. + +``` bash +sudo yunohost app install https://github.com/YunoHost-Apps/seafile_ynh/tree/testing --debug +ou +sudo yunohost app upgrade seafile -u https://github.com/YunoHost-Apps/seafile_ynh/tree/testing --debug +``` + +**Plus d'infos sur le packaging d'applications :** diff --git a/check_process b/check_process index 3259076..529a0cf 100644 --- a/check_process +++ b/check_process @@ -17,9 +17,8 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=db11d890922564dfdcb7937a3a682957082fbb31 - upgrade=1 from_commit=67e0869de25f4f58710c3d30d5533356745ea676 - upgrade=1 from_commit=6786d9f65e60b2d2a96b9ea4c43897dde3a66199 + upgrade=1 from_commit=99c006ca044c1f82aee6ec68d73b59dd2de52411 + upgrade=1 from_commit=cb4a6e0d02782c75cf270276667ea2f062afd051 backup_restore=1 multi_instance=0 wrong_user=1 @@ -32,9 +31,7 @@ change_url=1 ;;; Upgrade options - ; commit=db11d890922564dfdcb7937a3a682957082fbb31 - name=Version 6.3.4 - branch Old_version_for_CI_3 - ; commit=67e0869de25f4f58710c3d30d5533356745ea676 - name=Before move main dir to opt - branch Old_version_for_CI_2 - ; commit=6786d9f65e60b2d2a96b9ea4c43897dde3a66199 - name=The oldest installable version - branch Old_version_for_CI + ; commit=99c006ca044c1f82aee6ec68d73b59dd2de52411 + name=Version 7.1 Old version for CI 4 branch + ; commit=cb4a6e0d02782c75cf270276667ea2f062afd051 + name=Version 8.x Old version for CI 5 branch diff --git a/conf/x86-64.src b/conf/amd64.src similarity index 74% rename from conf/x86-64.src rename to conf/amd64.src index 84ccc51..aa14472 100644 --- a/conf/x86-64.src +++ b/conf/amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://s3.eu-central-1.amazonaws.com/download.seadrive.org/seafile-server_8.0.5_x86-64.tar.gz -SOURCE_SUM=4065e877e9675afba958aa1007db0d3a53949f8987d7f9849dfa29a6a13a06bf +SOURCE_URL=https://s3.eu-central-1.amazonaws.com/download.seadrive.org/seafile-server_9.0.2_x86-64.tar.gz +SOURCE_SUM=5adb3c800cd48de38b6e5d9b073e03ff375cfa30208a7291c481cdf1e1cf167b # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/x86-64_7_0.src b/conf/amd64_7_0.src similarity index 100% rename from conf/x86-64_7_0.src rename to conf/amd64_7_0.src diff --git a/conf/arm64.src b/conf/arm64.src index dc7b2f6..fa48fe7 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v8.0.5/seafile-server-8.0.5-buster-armv7l.tar.gz -SOURCE_SUM=53a909c0bcb796b21fec3518e9092ec20f8a8b933dc61ea26f3a04aab66efc79 +SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v9.0.2/seafile-server-9.0.2-buster-arm64v8l.tar.gz +SOURCE_SUM=0332a57364f92eaefe0109e5a65f8e3a3b909c3805b9113431d4bde2a962d78c # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/arm.src b/conf/armhf.src similarity index 72% rename from conf/arm.src rename to conf/armhf.src index dc7b2f6..b23bf4e 100644 --- a/conf/arm.src +++ b/conf/armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v8.0.5/seafile-server-8.0.5-buster-armv7l.tar.gz -SOURCE_SUM=53a909c0bcb796b21fec3518e9092ec20f8a8b933dc61ea26f3a04aab66efc79 +SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v9.0.2/seafile-server-9.0.2-buster-arm32v7l.tar.gz +SOURCE_SUM=2aa42caa1420842435ee8a386fb9f3244a0d286a4c1f829a97cba49b41b274df # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/arm_7_0.src b/conf/armhf_7_0.src similarity index 100% rename from conf/arm_7_0.src rename to conf/armhf_7_0.src diff --git a/conf/seafile.service b/conf/seafile.service index ce082eb..8a5dbc1 100644 --- a/conf/seafile.service +++ b/conf/seafile.service @@ -10,5 +10,32 @@ ExecStop=/opt/yunohost/__APP__/seafile-server-latest/seafile.sh stop User=__APP__ Group=__APP__ +# Sandboxing options to harden security +# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +RestrictNamespaces=yes +RestrictRealtime=yes +DevicePolicy=closed +ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +LockPersonality=yes +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap + +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG + [Install] WantedBy=multi-user.target diff --git a/conf/seahub.service b/conf/seahub.service index 554e133..b81a4d4 100644 --- a/conf/seahub.service +++ b/conf/seahub.service @@ -9,5 +9,32 @@ ExecStop=/opt/yunohost/__APP__/seafile-server-latest/seahub.sh stop User=__APP__ Group=__APP__ +# Sandboxing options to harden security +# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +RestrictNamespaces=yes +RestrictRealtime=yes +DevicePolicy=closed +ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +LockPersonality=yes +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @swap + +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG + [Install] WantedBy=multi-user.target diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..22fcfa9 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,3 @@ +Seafile is an open Source Cloud Storage application. + +It's a Enterprise file sync and share platform with high reliability and performance. It's a file hosting platform with high reliability and performance. Put files on your own server. Sync and share files across different devices, or access all the files as a virtual disk. diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..2e49ccf --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,97 @@ +### Multi-users support + +This app support LDAP and the SSO authentification. + +If you have Seafile installed before 7.x and you have more than one domain for users in Yunohost or Seafile app is installed on a different domain, you need to migrate your accounts. +You can use the provided action at https://domain.tld/yunohost/admin/#/apps/seafile/actions. You can also use this following command to migrate all of your accounts: +``` +yunohost app action run seafile migrate_user_email_to_mail_email +``` +See [issue#44](https://github.com/YunoHost-Apps/seafile_ynh/issues/44) +for more information. + +### Supported architectures + +Since seafile 6.3 the i386 architecture is no more supported. + +Seafile don't distribute binary for generic armhf architectures but rpi binary generally work on all arm board. + + + +Additional informations +----------------------- + +### Links + + * Report a bug: https://github.com/YunoHost-Apps/seafile_ynh/issues + * App website: https://www.seafile.com + * YunoHost website: https://yunohost.org/ + +--- + +### Install + +From command line: + +`yunohost app install seafile` + +### Upgrade + +By default a backup is made before the upgrade. To avoid this you have theses following possibilites: +- Pass the `NO_BACKUP_UPGRADE` env variable with `1` at each upgrade. By example `NO_BACKUP_UPGRADE=1 yunohost app upgrade synapse`. +- Set the settings `disable_backup_before_upgrade` to `1`. You can set this with this command: + +`yunohost app setting synapse disable_backup_before_upgrade -v 1` + +After this settings will be applied for **all** next upgrade. + +From command line: + +`yunohost app upgrade seafile` + +### Backup + +This app use now the core-only feature of the backup. To keep the integrity of the data and to have a better guarantee of the restoration is recommended to proceed like this: + +- Stop seafile service with theses following command: + +`systemctl stop seafile.service seahub.service` + +- Launch the backup of seafile with this following command: + +`yunohost backup create --app seafile` + +- Do a backup of your data with your specific strategy (could be with rsync, borg backup or just cp). The data is stored in `/home/yunohost.app/seafile-data`. +- Restart the seafile service with theses command: + +`systemctl start seafile.service seahub.service` + +### Remove + +Due of the backup core only feature the data directory in `/home/yunohost.app/seafile-data` **is not removed**. It need to be removed manually to purge app user data. + +### Change URL + +Since now it's possible to change domain or the url of seafile. + +To do this run : `yunohost app change-url seafile -d new_domain.tld -p PATH new_path` + +Developers infos +---------------- + +Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/seafile_ynh/tree/testing). + +To try the testing branch, please proceed like that. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/seafile_ynh/tree/testing --debug +or +sudo yunohost app upgrade seafile -u https://github.com/YunoHost-Apps/seafile_ynh/tree/testing --debug +``` + +TODO +---- + +- Find a way to fix the issue https://github.com/YunoHost-Apps/seafile_ynh/issues/5 diff --git a/doc/screenshots/access-logs.jpg b/doc/screenshots/access-logs.jpg new file mode 100644 index 0000000..e3d588b Binary files /dev/null and b/doc/screenshots/access-logs.jpg differ diff --git a/doc/screenshots/drive-client.png b/doc/screenshots/drive-client.png new file mode 100644 index 0000000..9996dd2 Binary files /dev/null and b/doc/screenshots/drive-client.png differ diff --git a/doc/screenshots/file-history.png b/doc/screenshots/file-history.png new file mode 100644 index 0000000..969734e Binary files /dev/null and b/doc/screenshots/file-history.png differ diff --git a/doc/screenshots/file-locking.jpg b/doc/screenshots/file-locking.jpg new file mode 100644 index 0000000..48eff4b Binary files /dev/null and b/doc/screenshots/file-locking.jpg differ diff --git a/doc/screenshots/mobile-ios-client.jpg b/doc/screenshots/mobile-ios-client.jpg new file mode 100644 index 0000000..7a8c798 Binary files /dev/null and b/doc/screenshots/mobile-ios-client.jpg differ diff --git a/doc/screenshots/sharing-dialog.png b/doc/screenshots/sharing-dialog.png new file mode 100644 index 0000000..b299201 Binary files /dev/null and b/doc/screenshots/sharing-dialog.png differ diff --git a/doc/screenshots/sync-client.jpg b/doc/screenshots/sync-client.jpg new file mode 100644 index 0000000..f514cb9 Binary files /dev/null and b/doc/screenshots/sync-client.jpg differ diff --git a/doc/screenshots/wiki_en.png b/doc/screenshots/wiki_en.png new file mode 100644 index 0000000..8fff575 Binary files /dev/null and b/doc/screenshots/wiki_en.png differ diff --git a/manifest.json b/manifest.json index 57737cd..8a9703a 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,14 @@ "packaging_format": 1, "license": "AGPL-3.0,Apache-2.0,MIT,GPL-2.0", "url": "https://www.seafile.com", - "version": "8.0.5~ynh1", + "upstream": { + "license": "AGPL-3.0,Apache-2.0,MIT,GPL-2.0", + "website": "https://www.seafile.com", + "demo": "https://demo.seafile.com", + "admindoc": "https://manual.seafile.com", + "code": "https://github.com/haiwen/seafile-server" + }, + "version": "9.0.2~ynh1", "description": { "en": "Open Source Cloud Storage", "fr": "Stockage Cloud Open Source" @@ -23,27 +30,17 @@ "mysql" ], "requirements": { - "yunohost": ">= 4.1" + "yunohost": ">= 4.3" }, "arguments": { "install": [ { "name": "domain", - "type": "domain", - "ask": { - "en": "Choose a domain for Seafile", - "fr": "Choisissez un domaine pour Seafile" - }, - "example": "domain.org" + "type": "domain" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Seafile", - "fr": "Choisissez un chemin pour Seafile" - }, - "example": "/seafile", "default": "/seafile" }, { @@ -58,12 +55,7 @@ }, { "name": "admin", - "type": "user", - "ask": { - "en": "Choose the admin user for Seafile", - "fr": "Choisissez l'administrateur de Seafile" - }, - "example": "johndoe" + "type": "user" }, { "name": "admin_password", @@ -71,17 +63,12 @@ "ask": { "en": "Enter a password for the administrator", "fr": "Entrez un mot de passe pour l'administrateur" - }, - "example": "**Sup3rS3cr3t**" + } }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public site ? If you want to use a desktop client or the smartphone app, make Seafile public.", - "fr": "Est-ce un site public ? Pour utiliser un client sur PC ou l'application mobile, Seafile doit être public" - }, - "help": { + "help": { "en": "If it's not public, everybody which want to access to any page of seafile need to be authenticated on the SSO. On the public mode anybody can access to the authentication page. The shared link will be olso accessible by anybody who has this link.", "fr": "Si n'est pas publique, n'importe qui veux accéder à n'importe quelle page de seafile doit être authentifié dans le SSO. Dans le mode publique n'importe qui peut accéder à la page d'authentification de seafile. Les liens partagé seront aussi accessible par n'import qui qui à ce liens." }, diff --git a/scripts/_common.sh b/scripts/_common.sh index 8fe4517..0f8e7e7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -10,21 +10,21 @@ app=$YNH_APP_INSTANCE_NAME install_source() { mkdir "$final_path/seafile-server-$seafile_version" - if [[ $architecture == "i386" ]] + if [ $YNH_ARCH == "i386" ] || [ $YNH_ARCH == "armel" ] then ynh_die --message "Error : this architecture is no longer supported by the upstream. Please create en issue here : https://github.com/YunoHost-Apps/seafile_ynh/issues to ask to discuss about a support of this architecture" fi - ynh_setup_source "$final_path/seafile-server-$seafile_version" "$architecture" + ynh_setup_source "$final_path/seafile-server-$seafile_version" "$YNH_ARCH" } install_source_7_0() { if ! [ -e $final_path/seafile-server-7.0.5 ]; then mkdir "$final_path/seafile-server-7.0.5" - if [[ $architecture == "i386" ]] + if [ $YNH_ARCH == "i386" ] || [ $YNH_ARCH == "armel" ] then ynh_die --message "Error : this architecture is no longer supported by the upstream. Please create en issue here : https://github.com/YunoHost-Apps/seafile_ynh/issues to ask to discuss about a support of this architecture" fi - ynh_setup_source "$final_path/seafile-server-7.0.5" "$architecture"_7_0 + ynh_setup_source "$final_path/seafile-server-7.0.5" "$YNH_ARCH"_7_0 fi } @@ -33,13 +33,13 @@ install_dependance() { expect ffmpeg \ memcached libmemcached-dev \ python3-scipy python3-matplotlib \ - libjpeg62-turbo-dev zlib1g-dev # For building pillow - ynh_add_swap 2000 + libjpeg62-turbo-dev zlib1g-dev libffi-dev # For building pillow + ynh_add_swap --size=2000 # We need to do that because we can have some issue about the permission access to the pip cache without this chown -R $seafile_user:$seafile_user $final_path # Note that we install imageio to force the dependance, without this imageio 2.8 is installed and it need python3.5 - sudo -u $seafile_user pip3 install --user --no-warn-script-location --upgrade future mysqlclient pymysql Pillow pylibmc captcha jinja2 sqlalchemy psd-tools django-pylibmc django-simple-captcha python3-ldap + sudo -u $seafile_user pip3 install --user --no-warn-script-location --upgrade future mysqlclient PyMySQL Pillow pylibmc captcha Jinja2 SQLAlchemy psd-tools django-pylibmc django-simple-captcha python3-ldap pycryptodome==3.12.0 cffi==1.14.0 # TODO add dependance when upgrade to seafile 8: django==2.2.* ynh_del_swap } @@ -60,7 +60,7 @@ set_permission() { setfacl -R -m user:www-data:rX $final_path/seafile-server-latest/seahub/media # check that this directory exist because in some really old install the data could still be in the main seafile directory - # We also check at the install time when data directory is not already initialised + # We also check at the install time when data directory is not already initialised if [ -e /home/yunohost.app/seafile-data ]; then chown -R $seafile_user:$seafile_user /home/yunohost.app/seafile-data chmod -R o= /home/yunohost.app/seafile-data diff --git a/scripts/expect_scripts/upgrade_8.0.exp b/scripts/expect_scripts/upgrade_8.0.exp index 0816a57..6c86c2b 100644 --- a/scripts/expect_scripts/upgrade_8.0.exp +++ b/scripts/expect_scripts/upgrade_8.0.exp @@ -3,7 +3,7 @@ set timeout 5 set seafile_dir [lindex $argv 0] -spawn $seafile_dir/upgrade/upgrade_7.1_8.0.sh +spawn $seafile_dir/upgrade/upgrade_8.0_9.0.sh expect "to contiune" send "\r"; diff --git a/scripts/expect_scripts/upgrade_9.0.exp b/scripts/expect_scripts/upgrade_9.0.exp new file mode 100644 index 0000000..0816a57 --- /dev/null +++ b/scripts/expect_scripts/upgrade_9.0.exp @@ -0,0 +1,11 @@ +#!/usr/bin/expect +set timeout 5 + +set seafile_dir [lindex $argv 0] + +spawn $seafile_dir/upgrade/upgrade_7.1_8.0.sh + +expect "to contiune" +send "\r"; + +interact diff --git a/scripts/experimental_helper.sh b/scripts/experimental_helper.sh index 6df5480..26538a9 100644 --- a/scripts/experimental_helper.sh +++ b/scripts/experimental_helper.sh @@ -1,28 +1,4 @@ - -# Check the architecture -# -# example: architecture=$(ynh_detect_arch) -# -# usage: ynh_detect_arch -# -# Requires YunoHost version 2.2.4 or higher. - -ynh_detect_arch(){ - local architecture - if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then - architecture="arm64" - elif [ -n "$(uname -m | grep 64)" ]; then - architecture="x86-64" - elif [ -n "$(uname -m | grep 86)" ]; then - architecture="i386" - elif [ -n "$(uname -m | grep arm)" ]; then - architecture="arm" - else - architecture="unknown" - fi - echo $architecture -} - +#!/bin/bash # Add swap # @@ -72,6 +48,12 @@ ynh_add_swap () { # If there's enough space for a swap, and no existing swap here if [ $swap_size -ne 0 ] && [ ! -e /swap_$app ] then + # Create file + truncate -s 0 /swap_$app + + # set the No_COW attribute on the swapfile with chattr + chattr +C /swap_$app || true + # Preallocate space for the swap file, fallocate may sometime not be used, use dd instead in this case if ! fallocate -l ${swap_size}K /swap_$app then @@ -81,7 +63,7 @@ ynh_add_swap () { # Create the swap mkswap /swap_$app # And activate it - swapon /swap_$app + swapon /swap_$app || true # Then add an entry in fstab to load this swap at each boot. echo -e "/swap_$app swap swap defaults 0 0 #Swap added by $app" >> /etc/fstab fi @@ -115,4 +97,3 @@ ynh_is_main_device_a_sd_card () { return 1 fi } - diff --git a/scripts/install b/scripts/install index 6ed4dd5..0aabce2 100644 --- a/scripts/install +++ b/scripts/install @@ -27,7 +27,6 @@ final_path=/opt/yunohost/$app seafile_user=$app admin_password=$YNH_APP_ARG_ADMIN_PASSWORD seafile_version=$(ynh_app_upstream_version) -architecture=$(ynh_detect_arch) # Create special path with / at the end if [[ $path_url == '/' ]] @@ -67,7 +66,6 @@ ynh_app_setting_set --app $app --key admin --value $admin ynh_app_setting_set --app $app --key seahub_port --value $seahub_port ynh_app_setting_set --app $app --key fileserver_port --value $fileserver_port ynh_app_setting_set --app $app --key webdav_port --value $webdav_port -ynh_app_setting_set --app $app --key is_public --value $is_public #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/restore b/scripts/restore index 60adb58..c219717 100644 --- a/scripts/restore +++ b/scripts/restore @@ -24,10 +24,6 @@ db_pwd=$(ynh_app_setting_get --app $app --key mysqlpwd) final_path=$(ynh_app_setting_get --app $app --key final_path) seafile_version=$(ynh_app_upstream_version) seafile_user=$app -architecture=$(ynh_detect_arch) - -# Check domain/path availability -ynh_webpath_available --domain $domain --path_url $path_url || ynh_die --message "$domain/$path_url is not available, please use an other domain or path." #================================================= # STANDARD RESTORATION STEPS diff --git a/scripts/upgrade b/scripts/upgrade index f98aef1..1871195 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,7 +27,6 @@ seafile_user=$app seafile_data=/home/yunohost.app/seafile-data installed_version=${YNH_APP_CURRENT_VERSION/~ynh*/} seafile_version=$(ynh_app_upstream_version) -architecture=$(ynh_detect_arch) if [ "$YNH_APP_CURRENT_VERSION" == '-' ]; then YNH_APP_CURRENT_VERSION="6.0.9~ynh0" @@ -98,7 +97,6 @@ if [ $final_path == "/var/www/$app" ]; then ln -s /home/yunohost.app/seafile-data $final_path/ fi ln -s $final_path/logs /var/log/seafile - set_permission fi ynh_script_progression --message="Upgrading source files..." --weight=6 @@ -218,6 +216,9 @@ EOF sudo -u $seafile_user $expect_scripts_dir/upgrade_8.0.exp $final_path/seafile-server-$seafile_version echo "FILTER = permission=cn=$app.main,ou=permission,dc=yunohost,dc=org" | tee -a $final_path/conf/ccnet.conf ;& +"8.0."* ) + sudo -u $seafile_user $expect_scripts_dir/upgrade_9.0.exp $final_path/seafile-server-$seafile_version +;& esac sudo -u $seafile_user $expect_scripts_dir/minor-upgrade.exp $final_path/seafile-server-$seafile_version