From 2fbcd0676845a1184a86326282dd701d070a6e54 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 21 May 2022 19:51:14 +0200 Subject: [PATCH] www-apps/misskey: Try to fix permission denied error yarn tried to unlink a file in /var/tmp/portage/ Signed-off-by: tastytea --- ...y-12.110.1-r3.ebuild => misskey-12.110.1-r4.ebuild} | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) rename www-apps/misskey/{misskey-12.110.1-r3.ebuild => misskey-12.110.1-r4.ebuild} (93%) diff --git a/www-apps/misskey/misskey-12.110.1-r3.ebuild b/www-apps/misskey/misskey-12.110.1-r4.ebuild similarity index 93% rename from www-apps/misskey/misskey-12.110.1-r3.ebuild rename to www-apps/misskey/misskey-12.110.1-r4.ebuild index a1f4daa..ee350b7 100644 --- a/www-apps/misskey/misskey-12.110.1-r3.ebuild +++ b/www-apps/misskey/misskey-12.110.1-r4.ebuild @@ -114,8 +114,9 @@ pkg_postinst() { elog "Run emerge --config ${CATEGORY}/${PN} to initialise the PostgreSQL database" einfo "Running 'yarn migrate'" - cd "${EROOT}"/opt/misskey/misskey || die - su -s /bin/bash -c "yarn --verbose migrate" misskey || die + su --shell /bin/bash --login --command \ + "cd misskey && yarn --verbose migrate" \ + misskey || die "migration failed" if use nginx; then einfo "An nginx example config can be found at " @@ -131,8 +132,9 @@ pkg_config() { echo "create database misskey; create user misskey with encrypted password '${MY_PASSWORD}'; grant all privileges on database misskey to misskey; \q" \ | su -lc psql postgres || die "database creation failed" - cd "${EROOT}"/opt/misskey/misskey || die - su -s /bin/bash -c "yarn run init" misskey || die "database initialisation failed" + su --shell /bin/bash --login --command \ + "cd misskey && yarn --verbose run init" \ + misskey || die "database initialisation failed" ewarn "When you first start Misskey you will be asked to add an admin account via the web interface, and registrations are enabled." ewarn "Do not expose the web interface to the public until after you configured your instance\!"