YunoHost-Apps / kbin_ynh

Kbin is a decentralized content aggregator and microblogging platform running on the Fediverse network.
GNU Affero General Public License v3.0
7 stars 1 forks source link

Testing #1

Open ericgaspar opened 1 year ago

ericgaspar commented 1 year ago

Problem

Solution

PR Status

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)

ericgaspar commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Meow :cat2: Test Badge

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:v: Test Badge

csolisr commented 1 year ago
 Do not run Composer as root/super user! See https://getcomposer.org/root for details
Aborting as no plugin should be loaded if running as super user is not explicitly allowed

Odd, I thought ynh_install_composer automatically dealt with the privileges issue?

tituspijean commented 1 year ago

It does not!

https://yunohost.org/en/packaging_apps_helpers#ynh-composer-exec and its "Dude, show me the code!" link: https://github.com/YunoHost/yunohost/blob/19eb48b6e73267685e1417122ac47908c1cf2472/helpers/php#L490

There is no ynh_exec_as or sudo -u $app in there.

However, I am surprised other apps like Flarum have not triggered that warning and failure...

csolisr commented 1 year ago

Hey @ericgaspar , mind if I upload a patch to this branch to solve the ynh_install_composer issue (and continue the packaging), or would you rather do it yourself?

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:sunflower: Test Badge

csolisr commented 1 year ago

Sorry about that, I just found that php-symfony-mercure is only shipped on Debian 12 or higher.

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Alrighty! Test Badge

csolisr commented 1 year ago

Another snag we hit: turns out that I can't simply chain ynh_exec_as and ynh_install_composer - the latter doesn't get properly escaped. Any ideas?

101202 INFO INFO - [#######++++.........] > Installing kbin with Composer...
101202 INFO DEBUG - + ynh_exec_as kbin ynh_install_composer
101202 INFO DEBUG - + local user=kbin
101202 INFO DEBUG - + shift 1
101202 INFO DEBUG - ++ whoami
101202 INFO DEBUG - + [[ kbin = root ]]
101202 INFO DEBUG - + sudo -u kbin ynh_install_composer
101202 INFO WARNING - sudo: ynh_install_composer: command not found
csolisr commented 1 year ago

OK I think I have an idea of what happened. ynh_install_composer does not require the ynh_exec_as, but the rest of the commands do. !testme

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:carousel_horse: Test Badge

csolisr commented 1 year ago

Never mind, the Composer commands also fail here. Any clues on how to make it run as the app user instead of root, while correctly escaping the YNH macros?

csolisr commented 1 year ago

I had to go and browse an old version of flarum_ynh's repository to get a version of ynh_install_composer that did allow to set the user that would run the application. So, I had to manually import it into the repository.

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:sunflower: Test Badge

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:carousel_horse: Test Badge

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:rocket: Test Badge

csolisr commented 1 year ago

So we still have to bind $final_path - how did this helper even work in the first place?

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:v: Test Badge

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:stuck_out_tongue_winking_eye: Test Badge

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:rocket: Test Badge

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:sunflower: Test Badge

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Alrighty! Test Badge

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Fingers crossed! Test Badge

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:carousel_horse: Test Badge

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Fingers crossed! Test Badge

csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:v: Test Badge

csolisr commented 1 year ago

Bingo:

WARNING Invalid argument dump-env prod. Use "composer require dump-env prod" instead to add packages to your composer.json.
csolisr commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:rocket: Test Badge

csolisr commented 11 months ago

To confirm - is this pull request still in progress? @ericgaspar

ericgaspar commented 11 months ago

!testme

yunohost-bot commented 11 months ago

:stuck_out_tongue_winking_eye: Test Badge

ericgaspar commented 11 months ago

!testme