www-apps/pleroma-installer: New package
the build was successful Details

Package-Manager: Portage-2.3.51, Repoman-2.3.11
Manifest-Sign-Key: 3555266864CA6D7FF45AA6E7CFC39497F1B26E07
This commit is contained in:
tastytea 2019-02-06 12:44:24 +01:00
parent eba52562a1
commit 0826fce448
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
5 changed files with 176 additions and 0 deletions

View File

@ -0,0 +1,14 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
AUX install_pleroma.sh 1219 BLAKE2B d97ea44cd608ff0528134093f17bbea2aada5ed57ad69444a7847a924a4b4368055116ff8cf46b2ba7c423c6adc0adedb5179e1f9729cb28f6b2bbd495daab25 SHA512 f4c24ac6547924787f7ef033d75748f4e30657ff1d84aaaffdeb40f17f21adaaa581335e894bbb0009b119a759637af00ed9cd4667dfcdeac886916c5c08b017
AUX upgrade_pleroma.sh 791 BLAKE2B 3123e3bcc06bab422a554eeb9c5da6b100107125d16e9a661c90b1c09d1f4b8fd5cbdc743ed521db0ba7593a4967bd384695834d1951fa84ca2dd802773e31c1 SHA512 d08ffce3cfeba971022c0e1f9a08daffc10e60fa8d7920d99a840bbe7744d487d064e9d641f57ff89db77ba9c5fe0fd51999cce112ef7e8a2c1a5bf5a8c021ad
EBUILD pleroma-installer-1.ebuild 1699 BLAKE2B d8a7c3ffb779d09c2be1a5c18039c29c97dabc320e9fca0771bd900c8c685f72ce9c5678c9473159a92da04d85c7860a2d4b819eb8f92b01f5105e321dd58e49 SHA512 76c8030249f205623e97915116efc1118a90687dee46e4491727905accbe51b17bfd5c328aaca426ae625b0fab95587adb225396419f63a61e0dd043cb73e175
MISC metadata.xml 993 BLAKE2B adc5c72fe12b6fdb4eb20c1d79dde227b088b437ffd21d16cc5775fa5bb7fa6363890dd5017fbe7f5a00a794a38fb298ce17e6402f6d3d5441985effd0d7e1db SHA512 6ff23fa60c0f22ef7a433e3d1b4919d074508898504b7168c925da8840f542afcdc891a9f4df69dc8eb6c44b7d9c41e6b94fdecd404ca738169124bcdab0af0d
-----BEGIN PGP SIGNATURE-----
iHUEAREIAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXFrIfQAKCRDPw5SX8bJu
BxPQAPsGT+R5s50Fn9r0UTUQNYkMYI2iDwmTNX4z54zHBEvVlwD/UrjWU4oFTAE2
BSvi0QLkQYD1mT51L41Qhyry3EKGoCs=
=92wY
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,43 @@
#!/bin/sh
echo "This script is only suitable for the initial installation, not for upgrades."
echo "Make sure postgresql is configured and running."
echo "Hit enter to proceed."
read sure
if [ -n "${sure}" ]; then
exit
fi
purple='\033[1;35m'
nocolor='\033[0m'
function die()
{
if [ -n "${1}" ]; then
echo "${1}" >&2
fi
exit 1
}
echo -e "${purple}Cloning pleroma into current dir...${nocolor}"
git clone https://git.pleroma.social/pleroma/pleroma.git || die
mv pleroma/{*,.[a-zA-z0-9]*} . || die
rmdir pleroma || die
echo -e "${purple}Installing the dependencies for pleroma..."
echo -e "Answer with yes if it asks you to install Hex.${nocolor}"
mix deps.get || die
echo -e "${purple}Generating the configuration..."
echo -e "Answer with yes if it asks you to install rebar3.${nocolor}"
mix pleroma.instance gen || die
mv -v config/{generated_config.exs,prod.secret.exs} || die
echo -e "${purple}Creating the database...${nocolor}"
sudo -u postgres psql -f config/setup_db.psql || die
echo -e "${purple}Running the database migration...${nocolor}"
MIX_ENV=prod mix ecto.migrate || die
echo -e "\n${purple}Done! You can now start pleroma with:${nocolor}"
echo "/etc/init.d/pleroma start"

View File

@ -0,0 +1,34 @@
#!/bin/sh
echo "This script will upgrade your pleroma installation."
echo "Pleroma will be stopped for the duration of the update."
echo "Hit enter to proceed."
read sure
if [ -n "${sure}" ]; then
exit
fi
purple='\033[1;35m'
nocolor='\033[0m'
function die()
{
if [ -n "${1}" ]; then
echo "${1}" >&2
fi
exit 1
}
echo -e "${purple}Stopping pleroma...${nocolor}"
sudo /etc/init.d/pleroma stop || die
echo -e "${purple}Pulling the latest changes from upstream...${nocolor}"
git pull || die
echo -e "${purple}Upgrading dependencies...${nocolor}"
mix deps.get || die
echo -e "${purple}Performing database migrations...${nocolor}"
MIX_ENV=prod mix ecto.migrate || die
echo -e "\n${purple}Done! Restarting pleroma...${nocolor}"
sudo /etc/init.d/pleroma restart || die

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<longdescription>
Pleroma is a microblogging server software that can federate (= exchange messages with) other servers that support the same federation standards (OStatus and ActivityPub). Pleroma will federate with all servers that implement either OStatus or ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed. For clients it supports both the GNU Social API with Qvitter extensions and the Mastodon client API.
</longdescription>
<maintainer type="person">
<email>gentoo@tastytea.de</email>
<name>tastytea</name>
</maintainer>
<upstream>
<bugs-to>https://git.pleroma.social/pleroma/pleroma/issues</bugs-to>
</upstream>
<use>
<flag name="apache">Installs a configuration file for apache.</flag>
<flag name="nginx">Installs a configuration file for nginx.</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,67 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit git-r3 user systemd
DESCRIPTION="Microblogging server software that can federate with other servers."
HOMEPAGE="https://pleroma.social/ https://git.pleroma.social/pleroma/pleroma/"
EGIT_REPO_URI="https://git.pleroma.social/pleroma/pleroma.git"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS=""
IUSE="apache +nginx systemd"
RDEPEND="
>=dev-lang/elixir-1.6.6
>=dev-db/postgresql-9.6.11[uuid]
app-admin/sudo
apache? ( www-servers/apache )
nginx? ( www-servers/nginx[nginx_modules_http_slice] )
"
DEPEND=""
pkg_setup() {
enewgroup pleroma
enewuser pleroma -1 /bin/bash /var/lib/pleroma pleroma
}
src_install() {
local pleromadir="${EPREFIX}/var/lib/pleroma/pleroma"
diropts -o pleroma -g pleroma
exeopts -o pleroma -g pleroma
dodir "${pleromadir}"
exeinto "${pleromadir}"
doexe "${FILESDIR}/install_pleroma.sh"
doexe "${FILESDIR}/upgrade_pleroma.sh"
if use nginx; then
dodoc installation/pleroma.nginx
fi
if use apache; then
dodoc installation/pleroma-apache.conf
fi
dodoc docs/*
if use systemd; then
systemd_dounit installation/pleroma.service
else
doinitd installation/init.d/pleroma
fi
}
pkg_postinst() {
elog 'For the initial installation, become the user pleroma, cd to ${HOME}/pleroma and run ./install_pleroma.sh.'
elog "To upgrade, run ./upgrade_pleroma.sh."
elog "Make sure the user pleroma can use sudo and has a strong password."
if use nginx; then
einfo "An example config for nginx has been installed in the doc directory."
fi
if use apache; then
einfo "An example config for apache has been installed in the doc directory."
fi
}