Closed frju365 closed 6 years ago
Hello, i am happy to this good news. I'm not the initial creator but I'have done last updates. Of course I've agree. :)
Personally, I've abandoned this project. I don't use Apache anymore and I can no longer keep maintaining this. I'm sorry.
If aymhce is happy to do the job, perfect!
ok. So, @aymhce, do you agree with the fact of being the (official) maintainer of the application ?
@frju365 No problem, during time that I'm user of Ampache :)
Congratulation \o/
And now, it's time to suffer ! Mouhahaha
Indeed, this app can become official, but... Before that, there's a lot of work to do. In fact, we (together, not you alone) have to refactoring this app to fit to the official packaging standard.
But, obviously we will be here with you to do that. And let's do the things step by step. First, have a quick look at the example app. https://github.com/YunoHost/example_ynh/blob/master/scripts/install
The first thing to do is to give to your code some room, by separate each part with a big uppercase comment (like the example app above). It's quite simple to do, but you have to do that because you know your code. After that, it will be really more simple for us to review the code and help you to go forward.
Ok i look that for the few next days
@maniackcrudelis First step done
Thanks for that! Now a few more requests (don't hesitate to look at the example_ynh application):
final_path
variableynh_backup
syntax (e.g. ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
)
use ynh_restore_file
accordinglyynh_string_random
to generate your passwordsynh_string_replace
instead of sed substitutionsynh_install_dependencies
(and ynh_remove_dependencies
) instead of apt-get update/apt-get install; this allows to remove unneeded dependencies without breaking any app when removing your appynh_secure_remove
instead of rm -f
; it prevents (now and in a future when someone modifies a script) from removing important filessystemctl reload/restart <service>
_common
to _common.sh
ynh_setup_source
(with app.src
file) to download the application source)ynh_local_curl
to execute your curl callI know it does look like a heavy Christmas list, but don't forget we're here to help! Don't hesitate to ask any question, and proceed step-by-step. You can report your progress here and call for intermediate reviews. You can also join our apps XMPP chat room π
Good luck! π
EDIT : Don't forget to work on a separate branch, and open a Pull Request so that we can interact while keeping your application functional for the community π
I have done a PR. Just, I haven't applying the 2 last points.
Thanks for your work! That looks already much cleaner now! π
final_path
variable --> OKynh_backup
syntax (e.g. ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
) --> OK
use ynh_restore_file
accordingly --> OKynh_string_random
to generate your passwords --> OKynh_string_replace
instead of sed substitutions --> OKynh_install_dependencies
(and ynh_remove_dependencies
) instead of apt-get update/apt-get install; this allows to remove unneeded dependencies without breaking any app when removing your app --> Partially OK: you need to take care of existing instances: you should use the ynh_install_dependencies
in the upgrade script as well, otherwise there will be an error at removal when executing ynh_remove_dependencies
.ynh_secure_remove
instead of rm -f
; it prevents (now and in a future when someone modifies a script) from removing important files --> OKsystemctl reload/restart <service>
--> OK_common
to _common.sh
--> OKSome more comments:
ynh_add/remove_nginx_config
helper (you'll then also avoid reloading nginx service in your scripts)set -eu/set -u
in install/remove/upgrade
scriptrestore
scriptFor ynh_setup_source
and ynh_local_curl
, do you just need some time or do you need some explanations?
Ok thanks. No problem for ynh_setup_source
, ynh_local_curl
, just a problem of time for me. I can continue this weekend or next week.
Hello, I think the app is up to date with all the recommendations, except for set -eu
because the app isn't ββlonger valid in package_linter ...
Sorry, I had a lot of work on something else, thanks to JimboJoe to took care or you. You've done a wonderful job so far aymhce.
I see some things though:
Sorry, other scripts for the next time ;)
Ok, next week I'll work about your recommandations. Thanks for watching
Hello, I currently have a professional mission that fascinates me and takes all my time. Don't worry, I will not forget ampache. But sorry for that.
We completely understand that, take your time and thanks for your work π
Hello ! So I'm back :) with a new commit. @maniackcrudelis can you verify it please ?
Hey nice to see you back o/
There's some point though:
Why do you not keep the ssowat button in nginx ? https://github.com/aymhce/ampache_ynh/blob/0b3f9e2611bdf49b938b3ea235d93a5e59b6ad51/conf/nginx.conf#L51 It's a real question.
After that, I think is going to be all good :) (I think but I have not enough time right now to perform a complete test. Maybe this evening.)
PS: Just like that, I don't know what is "prettyphoto", but it encounter a lot of 404 in my test.
Just like that, I don't know what is "prettyphoto", but it encounter a lot of 404 in my test.
That's because your nginx conf file is not correct.
[...]
#enable subsonic api
if ( !-d $request_filename ) {
rewrite ^/ampacherest/(.*)\.view$ /ampacherest/index.php?action=$1 last;
rewrite ^/ampacherest/fake/(.+)$ /ampacheplay/$1 last;
[...]
rewrite ^/ampacheplay/ssid/(.*)/type/(.*)/oid/([0-9]+)/uid/([0-9]+)/client/(.*)/noscrobble/([0-1])/player/(.*)/name/(.*)$ /ampacheplay/index.php?ssid=$1&type=$2&oid=$3&uid=$4&client=$5&noscrobble=$6&player=$7&name=$8 last;
rewrite ^/ampacheplay/ssid/(.*)/type/(.*)/oid/([0-9]+)/uid/([0-9]+)/client/(.*)/noscrobble/([0-1])/bitrate/([0-9]+)/player/(.*)/name/(.*)$ /ampacheplay/index.php?ssid=$1&type=$2&oid=$3&uid=$4&client=$5&noscrobble=$6&bitrate=$7player=$8&name=$9 last;
rewrite ^/ampacheplay/ssid/(.*)/type/(.*)/oid/([0-9]+)/uid/([0-9]+)/client/(.*)/noscrobble/([0-1])/transcode_to/(w+)/bitrate/([0-9]+)/player/(.*)/name/(.*)$ /ampacheplay/index.php?ssid=$1&type=$2&oid=$3&uid=$4&client=$5&noscrobble=$6&transcode_to=$7&bitrate=$8&player=$9&name=$10 last;
[...]
location ^~ /ampachebin/ {
[...]
location ^~ /ampacheconfig/ {
[...]
rewrite ^/ampacheplay/ssid/(\w+)/type/(\w+)/oid/([0-9]+)/uid/([0-9]+)/name/(.*)$ /ampacheplay/index.php?ssid=$1&type=$2&oid=$3&uid=$4&name=$5 last;
rewrite ^/ampacheplay/ssid/(\w+)/type/(\w+)/oid/([0-9]+)/uid/([0-9]+)/client/(.*)/noscrobble/([0-1])/name/(.*)$ /ampacheplay/index.php?ssid=$1&type=$2&oid=$3&uid=$4&client=$5&noscrobble=$6&name=$7 last;
location /ampacherest {
[...]
Otherwise, all seems to work as expected.
Do you need any help with all that ?
Hello @maniackcrudelis
Ok I see the problem for nginx, sorry it been a while since I didn't work on ampache
For the level 4, in fact I can see it works with my test, but, if there any code you can link, it's really better. You can simply, if it's only one link, put it just before the level 4 in the check_process file, with a # to comment it.
I did a complete test with Package check. It's almost all ok. I still have a problem with prettyphoto and also with some .js files in ampache/lib. And there're a lot of warnings from composer.
I think we can do something about that. I expect to have some free time tomorrow and saturday afternoon. I can try to help you about those problems.
Ok thanks for feedback. I'll add a link for level 4. Also, I don't test manually my apache pkg yet. It will done tomorrow evening. So I will see all issues that you mean.
I can't make any PR on your repository, I don't know why... So for the warnings print by composer, here a fix:
@@ -25,7 +25,8 @@ ampache_ynh_install () {
25 cd $final_path
26 php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
27 php composer-setup.php
28 - php composer.phar install --prefer-source --no-interaction
29 + php composer.phar update --no-interaction --no-dev
30 + php composer.phar install --prefer-source --no-interaction --no-dev
31 # Set permissions to ampache directory
32 chown -R www-data: $final_path
33 )
So... for the 404 errors, you can try to connect to that:
https://domain.tld/ampache/lib/components/prettyphoto/images/prettyPhoto/default/loader.gif
The error seems to be in this part of the nginx conf:
#enable subsonic api
if ( !-d $request_filename ) {
rewrite ^__PATH__/rest/(.*)\.view$ __PATH__/rest/index.php?action=$1 last;
rewrite ^__PATH__/rest/fake/(.+)$ __PATH__/play/$1 last;
}
But if you remove that, it doesn't work neither and you're going to fall on the portal. I guess it would be something bad in these rewrites. But I don't know why...
Thanks for help. About the 404 errors, there is an issue from ampache source code...
docker@yunohost:/var/www/ampache# fgrep -R pretty lib/components/require.css | head d -1
div.pp_default .pp_top .pp_left { background: url(prettyphoto/images/prettyPhoto/default/sprite.png) -78px -93px no-repeat; } /* Top left corner */
docker@yunohost:/var/www/ampache# ls lib/components/prettyphoto/images/prettyPhoto/default/sprite.png
ls: cannot access prettyphoto/images/prettyPhoto/default/sprite.png: No such file or directory
docker@yunohost:/var/www/ampache# ls lib/components/prettyphoto/
css js prettyphoto-built.css prettyphoto-built.js
Ok, let's forget those 404 then.
It's all good for me. Let's merge your PR, see what the CI says. And make the ultimate PR \o/
it's a very good work, @aymhce !
Hello, builds are done and ok,
Go to do the last PR
Hello, Since the last week, the community members have voted to elect the next two future official applications. (https://forum.yunohost.org/t/elis-les-futures-apps-officielles-elect-the-next-official-apps/3484)
Today, we announce to you that your app has been chosen to become official. To be sure that you agree, we need a confirmation from you within 2 weeks.
By entering in the official group of application, you will have to keep maintaining your application. You will have to create PR before commiting to the master branche and your PRs will have to be reviewed by the Apps Group of Yunohost following our guidline. Of course, you will get help from the App Group to help you maintaining this application.
No confirmation of you means that you disagree with the decision of the community and another application will join the official group instead of ampache.
Thanks, The Apps Group