diff --git a/www-apps/pleroma/Manifest b/www-apps/pleroma/Manifest index 6828521ed..b9f4fc929 100644 --- a/www-apps/pleroma/Manifest +++ b/www-apps/pleroma/Manifest @@ -2,12 +2,12 @@ Hash: SHA256 DIST pleroma-0.9.9.tar.bz2 29447938 BLAKE2B 94092b3583043a7737511959610ee81b4525a9b7f77a7743ec865adcb0f44c1287f10f07b6da8529113aa0f7f0533d9aae425aba295a560ca7523ddbf1c23aec SHA512 48df04a20d2891c9ace26bafac7e3ee07abd6b7d189e1b6bdd85143188745262995c56030c38d22c8125ee78a691bdf5b0e8eb8d8065fe9ff94a73e0638d4955 -EBUILD pleroma-0.9.9-r1.ebuild 4181 BLAKE2B 15333193b2da2dc58f4f27e6365d78c6f4aa3c75033d3d47f77decff79d159f6a2f25eafc927d359104c23749a29e9e4f3166a2fa589f4872bf6879b0f7c70af SHA512 8ec26240fd46543db5380ebae19d59b527de3849d20004925696f3a277e52eb053f41f3dbe670be4916232c320093be9fca6f9dceef54c30a2ed019287dd87fb +EBUILD pleroma-0.9.9-r2.ebuild 4260 BLAKE2B 506461b39c06a41485fb3ef88e8ccb18f09fb237d83f7d5ada2828e8ac4924b8b5e7c025e9aa1d890e9d0d910317bbd311074340613624edf7b7cb3c3fc04706 SHA512 9346555b5de2c3b1d1ecec037078c5c3acfee40183d829c25b514b8e64e5b7fe3b36d44f4dbe488984fa40675edd9151e9fb04761894b0a3dbb3d0fe0438905e MISC metadata.xml 993 BLAKE2B adc5c72fe12b6fdb4eb20c1d79dde227b088b437ffd21d16cc5775fa5bb7fa6363890dd5017fbe7f5a00a794a38fb298ce17e6402f6d3d5441985effd0d7e1db SHA512 6ff23fa60c0f22ef7a433e3d1b4919d074508898504b7168c925da8840f542afcdc891a9f4df69dc8eb6c44b7d9c41e6b94fdecd404ca738169124bcdab0af0d -----BEGIN PGP SIGNATURE----- -iHUEAREIAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXHDpZwAKCRDPw5SX8bJu -B674AP0ZURVKVxA42Ditud2nHGemCmECS2gMkB9CzAqUOr3A1wD/VwKrlE/q3unV -Hj2r4Ys4buD/dUCd6nVP8y7zx32Ax+o= -=hi2s +iHUEAREIAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXHD8QQAKCRDPw5SX8bJu +B6AGAP9vCCJCb3spp85s0GEknxXMb8RybzhAq1ulr+X69EzWKAD/WAX2ardIlP+c +ZPVWhYW62tdCeXJFBe8IDsYH2N3nceY= +=LrIc -----END PGP SIGNATURE----- diff --git a/www-apps/pleroma/pleroma-0.9.9-r1.ebuild b/www-apps/pleroma/pleroma-0.9.9-r2.ebuild similarity index 79% rename from www-apps/pleroma/pleroma-0.9.9-r1.ebuild rename to www-apps/pleroma/pleroma-0.9.9-r2.ebuild index dc85e6af8..37cec8379 100644 --- a/www-apps/pleroma/pleroma-0.9.9-r1.ebuild +++ b/www-apps/pleroma/pleroma-0.9.9-r2.ebuild @@ -8,19 +8,17 @@ inherit user systemd MY_P="${PN}-v${PV}" DESCRIPTION="Microblogging server software that can federate with other servers." HOMEPAGE="https://pleroma.social/ https://git.pleroma.social/pleroma/pleroma/" -SRC_URI="https://git.pleroma.social/pleroma/pleroma/-/archive/v0.9.9/${MY_P}.tar.bz2 +SRC_URI="https://git.pleroma.social/pleroma/pleroma/-/archive/v${PV}/${MY_P}.tar.bz2 -> ${P}.tar.bz2" LICENSE="AGPL-3" SLOT="0" KEYWORDS="" -IUSE="apache +nginx syslog systemd" +IUSE="apache +nginx syslog" RDEPEND=" >=dev-lang/elixir-1.6.6 - dev-vcs/git >=dev-db/postgresql-9.6.11[uuid] - app-admin/sudo apache? ( www-servers/apache ) nginx? ( www-servers/nginx ) " @@ -30,8 +28,6 @@ S="${WORKDIR}/${MY_P}" pkg_preinst() { elog "This ebuild comes with a lot of bundles libraries." - ewarn "This ebuild may overwrite files you have edited. Waiting 10 seconds ..." - sleep 10 || die # Backup user-modified files if [ -f "${EROOT}/opt/pleroma/priv/static/instance/panel.html" ]; then @@ -40,6 +36,9 @@ pkg_preinst() { mv "${EROOT}/opt/pleroma/priv/static/static/terms-of-service.html"{,~} || die mv "${EROOT}/opt/pleroma/priv/static/instance/thumbnail.jpeg"{,~} || die fi + + ewarn "This ebuild may overwrite files you have edited. Waiting 10 seconds ..." + sleep 10 || die } pkg_setup() { @@ -52,11 +51,6 @@ src_prepare() { sed -i 's|directory=~pleroma/pleroma|directory=~pleroma|' \ "${S}/installation/init.d/pleroma" || die - if use syslog; then - # Log to syslog - sed -i 's/command_background=1/command_background=1\nerror_logger="logger"\noutput_logger="logger"/' \ - "${S}/installation/init.d/pleroma" || die - fi } src_install() { @@ -75,11 +69,8 @@ src_install() { dodoc docs/* - if use systemd; then - systemd_dounit installation/pleroma.service - else - doinitd installation/init.d/pleroma - fi + doinitd installation/init.d/pleroma + systemd_dounit installation/pleroma.service } pkg_postinst() { @@ -91,6 +82,10 @@ pkg_postinst() { einfo "An example config for apache has been installed in the doc directory." fi + if ! grep -q MIX_ENV ~pleroma/.profile; then + echo "export MIX_ENV=prod" >> ~pleroma/.profile + fi + # Restore user-modified files if [ -f "${EROOT}/opt/pleroma/priv/static/instance/panel.html~" ]; then einfo "Restoring panel.html, terms-of-service.html and thumbnail.jpeg ..." @@ -107,18 +102,23 @@ pkg_config() { if [ ! -f ${configfile} ]; then einfo "Installing the dependencies..." einfo "Answer with yes if it asks you to install Hex." - sudo -u pleroma mix deps.get || die + su -s /bin/sh -c "mix deps.get" pleroma || die einfo "Generating the configuration..." einfo "Answer with yes if it asks you to install rebar3." - sudo -u pleroma mix pleroma.instance gen || die - mv -v config/{generated_config.exs,prod.secret.exs} || die + su -s /bin/sh -c "mix pleroma.instance gen" pleroma || die + mv config/{generated_config.exs,prod.secret.exs} || die + + if use syslog; then + echo -e "config :logger,\n backends: [{ExSyslogger, :ex_syslogger}]\n\n" \ + "config :logger, :ex_syslogger,\n level: :warn'" >> ${configfile} + fi einfo "Creating the database..." - sudo -u postgres psql -f config/setup_db.psql || die + su -s /bin/sh -c "psql -f config/setup_db.psql" postgres || die einfo "Running the database migration..." - sudo -u pleroma MIX_ENV=prod mix ecto.migrate || die + su -s /bin/sh -c "MIX_ENV=prod mix ecto.migrate" pleroma || die einfo "Your configuration file is in ${configfile}." else @@ -137,10 +137,10 @@ pkg_config() { fi einfo "Updating the dependencies..." - sudo -u pleroma mix deps.get || die + su -s /bin/sh -c "mix deps.get" pleroma || die einfo "Running the database migration..." - sudo -u pleroma MIX_ENV=prod mix ecto.migrate || die + su -s /bin/sh -c "MIX_ENV=prod mix ecto.migrate" pleroma || die if [ ${started} -eq 1 ]; then einfo "Starting pleroma..."