From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 13BF8138350 for ; Thu, 13 Feb 2020 06:26:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 56708E0855; Thu, 13 Feb 2020 06:26:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 29836E0855 for ; Thu, 13 Feb 2020 06:26:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F34AF34EC69 for ; Thu, 13 Feb 2020 06:26:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B0E7B133 for ; Thu, 13 Feb 2020 06:26:42 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1581575191.e5ced3ba64948849d68a23f423841c3bf8428c2b.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/go-ipfs/files/, net-p2p/go-ipfs/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-p2p/go-ipfs/Manifest net-p2p/go-ipfs/files/ipfs-at.service net-p2p/go-ipfs/files/ipfs.confd net-p2p/go-ipfs/files/ipfs.init net-p2p/go-ipfs/files/ipfs.service net-p2p/go-ipfs/go-ipfs-0.4.23.ebuild net-p2p/go-ipfs/metadata.xml X-VCS-Directories: net-p2p/go-ipfs/files/ net-p2p/go-ipfs/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: e5ced3ba64948849d68a23f423841c3bf8428c2b X-VCS-Branch: master Date: Thu, 13 Feb 2020 06:26:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 459e32da-7b2b-458b-a169-63d961ed6226 X-Archives-Hash: 14d2b210dd0aa92879664cd5da2cb1b4 commit: e5ced3ba64948849d68a23f423841c3bf8428c2b Author: David Roman gmail com> AuthorDate: Tue Jul 9 20:58:31 2019 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Thu Feb 13 06:26:31 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5ced3ba net-p2p/go-ipfs: new package non binary version of go-ipfs-bin Package-Manager: Portage-2.3.68, Repoman-2.3.16 Signed-off-by: David Roman gmail.com> Closes: https://github.com/gentoo/gentoo/pull/12412 Signed-off-by: Joonas Niilola gentoo.org> net-p2p/go-ipfs/Manifest | 2 + net-p2p/go-ipfs/files/ipfs-at.service | 18 +++++++++ net-p2p/go-ipfs/files/ipfs.confd | 1 + net-p2p/go-ipfs/files/ipfs.init | 17 +++++++++ net-p2p/go-ipfs/files/ipfs.service | 19 ++++++++++ net-p2p/go-ipfs/go-ipfs-0.4.23.ebuild | 69 +++++++++++++++++++++++++++++++++++ net-p2p/go-ipfs/metadata.xml | 12 ++++++ 7 files changed, 138 insertions(+) diff --git a/net-p2p/go-ipfs/Manifest b/net-p2p/go-ipfs/Manifest new file mode 100644 index 00000000000..7389951ffca --- /dev/null +++ b/net-p2p/go-ipfs/Manifest @@ -0,0 +1,2 @@ +DIST go-ipfs-0.4.23.bash 20753 BLAKE2B c34d29a48cf249b7a646a8a7b6015b9c4a4a5d8656187ec5984b0dfb741a8ca7b2f2d0a10bc0288aa862679c6d52145936b46497936565ba7cdb2ba847fda5b8 SHA512 acd3bdb689964aa5e15965bfea3cd1267f54a2014c05f49f4e536902cbdab3e22038f4f5db5ecc273c147135b265fcb82a41db22bfc3fd8f6ddc8ae43fd053ea +DIST go-ipfs-0.4.23.tar.gz 9415138 BLAKE2B 20f9aa246e2170fd8438fbb98ee92a4b1657f1d3e059530cc8e0a1d98a84ea7bdf5de97980f7b345110bcdbd7ed999a5d814c12eaa051aecc28d2d0a47f88272 SHA512 d87513392336fc537bf9c8578d34d650482001c37c1636d64f68fe5d5291c21990c72286c26f43cb6bc2c9c9df14bae69996b60ad6744f335276d52b0cb6978e diff --git a/net-p2p/go-ipfs/files/ipfs-at.service b/net-p2p/go-ipfs/files/ipfs-at.service new file mode 100644 index 00000000000..c9ce9129417 --- /dev/null +++ b/net-p2p/go-ipfs/files/ipfs-at.service @@ -0,0 +1,18 @@ +[Unit] +Description=InterPlanetary File System +After=network.target + +[Service] +CPUSchedulingPolicy=batch +Environment=IPFS_PATH= +ExecStart=/usr/bin/ipfs daemon --enable-gc --migrate +ExecStop=/usr/bin/ipfs shutdown +LimitNOFILE=8192 +PrivateTmp=yes +ProtectSystem=full +Restart=on-failure +Type=simple +User=%i + +[Install] +WantedBy=multi-user.target diff --git a/net-p2p/go-ipfs/files/ipfs.confd b/net-p2p/go-ipfs/files/ipfs.confd new file mode 100644 index 00000000000..f1e8eb77adf --- /dev/null +++ b/net-p2p/go-ipfs/files/ipfs.confd @@ -0,0 +1 @@ +IPFS_PATH=/var/lib/ipfs/.ipfs diff --git a/net-p2p/go-ipfs/files/ipfs.init b/net-p2p/go-ipfs/files/ipfs.init new file mode 100644 index 00000000000..52f48c52d1c --- /dev/null +++ b/net-p2p/go-ipfs/files/ipfs.init @@ -0,0 +1,17 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +export IPFS_PATH=${IPFS_PATH:-/var/lib/ipfs/.ipfs} + +pidfile="/run/ipfs.pid" +command="/usr/bin/ipfs" +command_args="daemon --enable-gc --migrate" +command_user="ipfs:ipfs" +start_stop_daemon_args="--wait 1000 -b \ + -1 /var/log/ipfs/ipfs.log \ + -2 /var/log/ipfs/ipfs.log" + +depend() { + need net +} diff --git a/net-p2p/go-ipfs/files/ipfs.service b/net-p2p/go-ipfs/files/ipfs.service new file mode 100644 index 00000000000..12e9d19fd96 --- /dev/null +++ b/net-p2p/go-ipfs/files/ipfs.service @@ -0,0 +1,19 @@ +[Unit] +Description=InterPlanetary File System +After=network.target + +[Service] +CPUSchedulingPolicy=batch +Environment=IPFS_PATH=/var/lib/ipfs/.ipfs +ExecStart=/usr/bin/ipfs daemon --enable-gc --migrate +ExecStop=/usr/bin/ipfs shutdown +Group=ipfs +LimitNOFILE=8192 +PrivateTmp=yes +ProtectSystem=full +Restart=on-failure +Type=simple +User=ipfs + +[Install] +WantedBy=multi-user.target diff --git a/net-p2p/go-ipfs/go-ipfs-0.4.23.ebuild b/net-p2p/go-ipfs/go-ipfs-0.4.23.ebuild new file mode 100644 index 00000000000..4b2936e8a48 --- /dev/null +++ b/net-p2p/go-ipfs/go-ipfs-0.4.23.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit bash-completion-r1 go-module golang-build systemd + +DESCRIPTION="Main implementation of IPFS" +HOMEPAGE="https://ipfs.io/" +SRC_URI="https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs-source.tar.gz -> ${P}.tar.gz + https://raw.githubusercontent.com/ipfs/go-ipfs/v${PV}/misc/completion/ipfs-completion.bash -> ${P}.bash" +EGO_PN="github.com/ipfs/go-ipfs" + +LICENSE="Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + !net-p2p/go-ipfs-bin + acct-group/ipfs + acct-user/ipfs + sys-fs/fuse:0 +" + +S="${WORKDIR}" + +DOCS=(CHANGELOG.md CONTRIBUTING.md README.md docs/) + +src_compile() { + local mygoargs=( + -v + -work + -x + -tags release + ) + + go build "${mygoargs[@]}" -o ipfs ${EGO_PN}/cmd/ipfs || die + go build "${mygoargs[@]}" -o ipfswatch ${EGO_PN}/cmd/ipfswatch || die +} + +src_test() { + go test ${EGO_PN}/cmd/ipfs/... ${EGO_PN}/cmd/ipfswatch/... || die +} + +src_install() { + dobin ipfs + dobin ipfswatch + + einstalldocs + + systemd_dounit "${FILESDIR}/ipfs.service" + systemd_newunit "${FILESDIR}/ipfs-at.service" "ipfs@.service" + + newinitd "${FILESDIR}/ipfs.init" ipfs + newconfd "${FILESDIR}/ipfs.confd" ipfs + + newbashcomp "${DISTDIR}/${P}.bash" "ipfs" + keepdir /var/log/ipfs +} + +pkg_preinst() { + fowners -R ipfs:ipfs /var/log/ipfs +} + +pkg_postinst() { + elog 'To be able to use the ipfs service you will need to create the ipfs repository' + elog '(eg: su -s /bin/sh -c "ipfs init -e" ipfs)' + elog 'or change IPFS_PATH of /etc/conf.d/ipfs with another with proper permissions.' +} diff --git a/net-p2p/go-ipfs/metadata.xml b/net-p2p/go-ipfs/metadata.xml new file mode 100644 index 00000000000..b69fe2e3c4a --- /dev/null +++ b/net-p2p/go-ipfs/metadata.xml @@ -0,0 +1,12 @@ + + + + + davidroman96@gmail.com + David Roman + + + proxy-maint@gentoo.org + Proxy Maintainers + +