1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/alltube_ynh.git synced 2024-09-03 18:06:12 +02:00

Merge pull request #23 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-07-17 11:11:40 +02:00 committed by GitHub
commit 2ee817ca5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 168 additions and 197 deletions

View file

@ -1,6 +1,6 @@
---
name: Bug report
about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all.
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
---
@ -8,28 +8,30 @@ about: Create a report to help us debug, it would be nice to fill the template a
1. *Read this whole template first.*
2. *Determine if you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
- *Otherwise, the issue may be due to alltube itself. Refer to its documentation or repository for help.*
- *If you have a doubt, post here, we will figure it out together.*
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
- *When in doubt, post here and we will figure it out together.*
3. *Delete the italic comments as you write over them below, and remove this guide.*
---
**Describe the bug**
### Describe the bug
*A clear and concise description of what the bug is.*
**Versions**
### Context
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
- YunoHost version: x.x.x
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
- If yes, please explain:
- Using, or trying to install package version/branch:
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
**To Reproduce**
*Steps to reproduce the behavior.*
### Steps to reproduce
- *If you performed a command from the CLI, the command itself is enough. For example:*
```sh
sudo yunohost app install alltube
sudo yunohost app install the_app
```
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:*
@ -38,9 +40,16 @@ about: Create a report to help us debug, it would be nice to fill the template a
3. *Scroll down to '...'*
4. *See error*
**Expected behavior**
### Expected behavior
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
**Logs**
*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.*
### Logs
*When an operation fails, YunoHost provides a simple way to share the logs.*
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
*If applicable and useful, add screenshots to help explain your problem.*

16
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,16 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished and ready to be reviewed/tested
- [ ] The fix/enhancement were manually tested (if applicable)
## Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

View file

@ -1,52 +1,43 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# AllTube for YunoHost
[![Integration level](https://dash.yunohost.org/integration/alltube.svg)](https://dash.yunohost.org/appci/app/alltube) ![](https://ci-apps.yunohost.org/ci/badges/alltube.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/alltube.maintain.svg)
[![Install AllTube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=alltube)
[![Install AllTube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=alltube)
*[Lire ce readme en français.](./README_fr.md)*
> *This package allows you to install AllTube quickly and simply on a YunoHost server.
> *This package allows you to install AllTube 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
AllTube is a HTML GUI for Youtube-dl.
**Shipped version:** 2.3.0
Web interface for Youtube-dl
**Shipped version:** 3.0.0~ynh1
**Demo:** https://alltubedownload.net/
## Screenshots
![Screenshot](https://github.com/Rudloff/alltube/raw/master/img/screenshot.png "alltube GUI screenshot")
![](./doc/screenshots/screenshot.png)
## Demo
* [Official demo](https://alltubedownload.net/)
## Disclaimers / important information
## Configuration
How to configure this app: Edit `config.yml` file via SSH.
To configure AllTube: edit the file `/var/www/alltube/config/config.yml` via SSH.
## Documentation
## Documentation and resources
* No documentation, only a [FAQ](https://github.com/Rudloff/alltube/blob/master/resources/FAQ.md)
#### Multi-user support
There is no user account in the app.
#### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/alltube%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/alltube/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/alltube%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/alltube/)
## Links
* Report a bug: https://github.com/YunoHost-Apps/alltube_ynh/issues
* App website: https://alltubedownload.net/
* App sources: https://github.com/Rudloff/alltube
* YunoHost website: https://yunohost.org/
---
* Official app website: https://alltubedownload.net/
* Official admin documentation: https://github.com/Rudloff/alltube/blob/master/resources/FAQ.md
* Upstream app code repository: https://github.com/Rudloff/alltube
* YunoHost documentation for this app: https://yunohost.org/app_alltube
* Report a bug: https://github.com/YunoHost-Apps/alltube_ynh/issues
## Developer info
@ -58,3 +49,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/alltube_ynh/tree/test
or
sudo yunohost app upgrade alltube -u https://github.com/YunoHost-Apps/alltube_ynh/tree/testing --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps

View file

@ -1,51 +1,39 @@
# AllTube pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/alltube.svg)](https://dash.yunohost.org/appci/app/alltube) ![](https://ci-apps.yunohost.org/ci/badges/alltube.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/alltube.maintain.svg)
[![Installer AllTube avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=alltube)
[![Installer AllTube avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=alltube)
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer AllTube rapidement et simplement sur un serveur Yunohost.
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
> *Ce package vous permet d'installer AllTube 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
AllTube est une IHM web pour Youtube-dl.
**Version incluse:** 2.3.0
Interface Web pour Youtube-dl
**Version incluse :** 3.0.0~ynh1
**Démo :** https://alltubedownload.net/
## Captures d'écran
![Captures d'écran](https://github.com/Rudloff/alltube/raw/master/img/screenshot.png "alltube IHM")
![](./doc/screenshots/screenshot.png)
## Démo
* [Démo officielle](https://alltubedownload.net/)
## Avertissements / informations importantes
## Configuration
Pour configurer AllTube : éditez le fichier `config.yml` via SSH.
Pour configurer AllTube : éditez le fichier `/var/www/alltube/config/config.yml` via SSH.
## Documentation
## Documentations et ressources
* Pas de documentation officelle, une simple [FAQ](https://github.com/Rudloff/alltube/blob/master/resources/FAQ.md)
#### Support multi-utilisateur
Pas de compte utilisateur dans l'application
#### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/alltube%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/alltube/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/alltube%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/alltube/)
## Liens
* Signaler un bug: https://github.com/YunoHost-Apps/alltube_ynh/issues
* Site de l'application: https://alltubedownload.net/
* Sources de l'application: https://github.com/Rudloff/alltube
* Site web YunoHost: https://yunohost.org/
---
* Site officiel de l'app : https://alltubedownload.net/
* Documentation officielle de l'admin : https://github.com/Rudloff/alltube/blob/master/resources/FAQ.md
* Dépôt de code officiel de l'app : https://github.com/Rudloff/alltube
* Documentation YunoHost pour cette app : https://yunohost.org/app_alltube
* Signaler un bug : https://github.com/YunoHost-Apps/alltube_ynh/issues
## Informations pour les développeurs
@ -57,3 +45,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/alltube_ynh/tree/test
ou
sudo yunohost app upgrade alltube -u https://github.com/YunoHost-Apps/alltube_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps

View file

@ -1,8 +1,8 @@
;; Test complet
; Manifest
domain="domain.tld" (DOMAIN)
path="/path" (PATH)
is_public=1 (PUBLIC|public=1|private=0)
domain="domain.tld"
path="/path"
is_public=1
; Checks
pkg_linter=1
setup_sub_dir=1
@ -14,8 +14,6 @@
upgrade=1 from_commit=f172ccd39cb043c72fe214cb15ea2db53c9f0325
backup_restore=1
multi_instance=1
incorrect_path=1
port_already_use=0
change_url=1
;;; Options
Email=plopoyop@gmail.com

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/Rudloff/alltube/releases/download/2.3.0/alltube-2.3.0.zip
SOURCE_SUM=1b7932dcdec14187f513b227b0db36bfd4d103ffe17a373f749a3251609f7d6c
SOURCE_URL=https://github.com/Rudloff/alltube/releases/download/3.0.0/alltube-3.0.0.zip
SOURCE_SUM=df79bea6a0273b9584894ca9eddd384e8c5322ef3f85612f64071bea589616a2
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=false
SOURCE_IN_SUBDIR=true

BIN
doc/.DS_Store vendored Normal file

Binary file not shown.

3
doc/DISCLAIMER.md Normal file
View file

@ -0,0 +1,3 @@
## Configuration
To configure AllTube: edit the file `/var/www/alltube/config/config.yml` via SSH.

3
doc/DISCLAIMER_fr.md Normal file
View file

@ -0,0 +1,3 @@
## Configuration
Pour configurer AllTube : éditez le fichier `/var/www/alltube/config/config.yml` via SSH.

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

View file

@ -6,47 +6,47 @@
"en": "Web interface for Youtube-dl",
"fr": "Interface Web pour Youtube-dl"
},
"version": "2.3.0~ynh2",
"version": "3.0.0~ynh1",
"url": "http://alltubedownload.net/",
"upstream": {
"license": "GPL-3.0-only",
"website": "https://alltubedownload.net/",
"demo": "https://alltubedownload.net/",
"admindoc": "https://github.com/Rudloff/alltube/blob/master/resources/FAQ.md",
"code": "https://github.com/Rudloff/alltube"
},
"license": "GPL-3.0-only",
"maintainer": {
"name": "plopoyop",
"email": "plopoyop@gmail.com"
},
"requirements": {
"yunohost": ">= 3.8.1"
"yunohost": ">= 4.2.0"
},
"multi_instance": true,
"services": [
"nginx"
"nginx",
"php7.3-fpm"
],
"arguments": {
"install" : [
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain name for AllTube",
"fr": "Choisissez un nom de domaine pour AllTube"
},
"example": "example.com"
},
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for AllTube",
"fr": "Choisissez un chemin pour AllTube"
},
"example": "/alltube",
"default": "/alltube"
},
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Is it a public application?",
"fr": "Est-ce une application publique ?"
"help": {
"en": "If enabled, AllTube will be accessible by people who do not have an account. This can be changed later via the webadmin.",
"fr": "Si cette case est cochée, AllTube sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
},
"default": true
}

View file

@ -1,18 +0,0 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished.
- [ ] Tested with Package_check.
- [ ] Fix or enhancement tested.
- [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested.
## Package_check results
---
*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/alltube_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/alltube_ynh%20PR-NUM-%20(USERNAME)/)

View file

@ -9,7 +9,7 @@ pkg_dependencies="ffmpeg"
YNH_PHP_VERSION="7.3"
extra_php_dependencies="php$YNH_PHP_VERSION-intl php$YNH_PHP_VERSION-curl php$YNH_PHP_VERSION-mbstring"
extra_php_dependencies="php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-mbstring"
#=================================================
# PERSONAL HELPERS

View file

@ -29,6 +29,23 @@ ynh_script_progression --message="Loading installation settings..."
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
# Restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CHECK WHICH PARTS SHOULD BE CHANGED
#=================================================

View file

@ -47,7 +47,6 @@ ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
#=================================================
# STANDARD MODIFICATIONS
@ -58,6 +57,14 @@ ynh_script_progression --message="Installing dependencies..." --weight=60
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -67,6 +74,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -75,14 +86,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -105,26 +108,15 @@ ynh_script_progression --message="Storing the config file checksum..."
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum "$final_path/config/config.yml"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..."
# Set permissions to app files
chown -R root: $final_path
chown -R $app: $final_path/templates_c/
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..." --weight=1
ynh_script_progression --message="Configuring permissions..." --weight=1
# Make app public if necessary
if [ $is_public -eq 1 ]
then
ynh_permission_update --permission "main" --add visitors
ynh_permission_update --permission="main" --add="visitors"
fi
#=================================================

View file

@ -48,6 +48,14 @@ ynh_script_progression --message="Restoring the NGINX configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -55,22 +63,9 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$final_path"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
#=================================================
# RESTORE USER RIGHTS
#=================================================
ynh_script_progression --message="Restoring user rights..."
# Restore permissions on app files
chown -R root: $final_path
chown -R $app: $final_path/templates_c/
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION

View file

@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
@ -33,21 +32,19 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=1
is_public=1
elif [ "$is_public" = "No" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=0
is_public=0
fi
# If final_path doesn't exist, create it
if [ -z "$final_path" ]; then
final_path=/var/www/$app
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -62,6 +59,14 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=2
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -76,6 +81,10 @@ then
ynh_setup_source --dest_dir="$final_path"
fi
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -91,14 +100,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=60
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=2
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -117,34 +118,6 @@ ynh_backup_if_checksum_is_different "$final_path/config/config.yml"
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum "$final_path/config/config.yml"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files
chown -R root: $final_path
chown -R $app: $final_path/templates_c/
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..." --weight=1
#remove old parameters
unprotected_uris=$(ynh_app_setting_get --app=$app --key=unprotected_uris)
if [ ! -z "$unprotected_uris" ]; then
ynh_app_setting_delete --app=$app --key=unprotected_uris
fi
# Make app public if necessary
if [ $is_public -eq 1 ]
then
ynh_permission_update --permission "main" --add visitors
fi
#=================================================
# RELOAD NGINX
#=================================================