From 00d9a8fc3e9e5bafeff6747e978c1685b384e587 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 4 Aug 2022 02:04:17 +0100 Subject: gentoo auto-resync : 04:08:2022 - 02:04:17 --- net-p2p/kubo/Manifest | 7 ++++ net-p2p/kubo/files/ipfs-at.service | 18 ++++++++++ net-p2p/kubo/files/ipfs.confd | 1 + net-p2p/kubo/files/ipfs.init | 17 ++++++++++ net-p2p/kubo/files/ipfs.service | 19 +++++++++++ net-p2p/kubo/kubo-0.13.1.ebuild | 69 ++++++++++++++++++++++++++++++++++++++ net-p2p/kubo/metadata.xml | 19 +++++++++++ 7 files changed, 150 insertions(+) create mode 100644 net-p2p/kubo/Manifest create mode 100644 net-p2p/kubo/files/ipfs-at.service create mode 100644 net-p2p/kubo/files/ipfs.confd create mode 100644 net-p2p/kubo/files/ipfs.init create mode 100644 net-p2p/kubo/files/ipfs.service create mode 100644 net-p2p/kubo/kubo-0.13.1.ebuild create mode 100644 net-p2p/kubo/metadata.xml (limited to 'net-p2p/kubo') diff --git a/net-p2p/kubo/Manifest b/net-p2p/kubo/Manifest new file mode 100644 index 000000000000..043b813da032 --- /dev/null +++ b/net-p2p/kubo/Manifest @@ -0,0 +1,7 @@ +AUX ipfs-at.service 340 BLAKE2B 776676603baa61cc2b76de86d8b3b1b43810ed81a703f827d5ad095824235870b73ddd4096f1e747ad6d872774fc38e2750792b5c516072cafa82fdcf275426a SHA512 90ff078ca99ef3815318e7b34be31df8531c449687e6fcc36e73ca0671b294ed8cfec922d98b8416a4410c33f587231722b483a2ab3c9e1de47e367fd37f807b +AUX ipfs.confd 30 BLAKE2B 7ecaa40f2a4097690f9d8091da5891e0bbfb0f298bed4a59769c8d0ef978a2471865a01177950da5869b61f3b8c124f43eab97daf297c06efecdc25785a5846d SHA512 c55afeb3efe381d18258ddf00f58325b77156375cf223fb2daa049df056efe22e9139cce0f81dc4c73759dad5097af5f3201414beb5950bd894df9ae8c7c4ed1 +AUX ipfs.init 464 BLAKE2B 553288784ba3df93037f640663d7ed3539f9a55e72ee9a36a9708e5b3f44e1dadff287fee989301b4ddf6fd3a88dbd1cf119386337c14523b9dadb91bdb1833d SHA512 2bc48d759b0dd4936d749aa0a442e39fdc862b5d5283269d4300cf0a5e3dc1bd0111a911d46d7a22dd7fa8023b22a148fbc371fc5bb37ce97912860b068caafc +AUX ipfs.service 372 BLAKE2B 8989cc474ab46309dda6d167fb89476b01d10e07374d53c480a7ee345f13827e25ca19d84b0a3974e45c5d9a0c78abdfd7be262bff48f427aedaac2a9c4094a8 SHA512 35d5edda83bd296f92ffe3ee61f2608eb9ec464225e32ca52582d8e8fe699466c9b412ed224ff44e36e34d3d41a618d50082dd677feeaba53429d3a6913a869a +DIST kubo-0.13.1.tar.gz 13474891 BLAKE2B 2e6e056e27a8783c9d04ea5d8c41d86e45250f5ba95c57737aaf52d36d453be31baab21767008596710d7eb84f471460c32de70faf1764740ea551a5aa4bd38e SHA512 3257d49df61bb31d4054934506ea543df2d9ed1f57b9b6aeef001bb77fe9fdce646fec96ded72b7f9f99e3bc687da77997b1295ebb5a40e20e4df0413e15bfd7 +EBUILD kubo-0.13.1.ebuild 1731 BLAKE2B 050bbb1bd4dbc78b85b2fbd5b1fcf6d8d195aa28993d10f0cc923a33a77e232aa6c3ba16e2a1e3367e7d08300e36f7b7ceb93234e6d894f9357069a4b5dc0b71 SHA512 954dc87554ab7dd1221840cc36caf41497fafb9b2c3066eb1ce6b8f358c4d8c69c29e4c28ed6f44ccc9bde2cfed036d665df767226c166a0da12e38d6bba2b76 +MISC metadata.xml 596 BLAKE2B 68c5576e325ef2e0a6954047b8784427ca8b1d038c4b7fc7a7f2082e2682dbb8b807083251c9e5eca927d070d21b1f5ee9f96e2cb2437a9f5934bdc46f139fb6 SHA512 2d41af83abc0527e9031f8bec8d471dc7d163714bb42b9d7f65c943993e7d554207a5fb85ad96ae94c7876a74e2b3c8dba6a8f70e4f1bbb5a785bb98624233a9 diff --git a/net-p2p/kubo/files/ipfs-at.service b/net-p2p/kubo/files/ipfs-at.service new file mode 100644 index 000000000000..c9ce91294177 --- /dev/null +++ b/net-p2p/kubo/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/kubo/files/ipfs.confd b/net-p2p/kubo/files/ipfs.confd new file mode 100644 index 000000000000..f1e8eb77adf5 --- /dev/null +++ b/net-p2p/kubo/files/ipfs.confd @@ -0,0 +1 @@ +IPFS_PATH=/var/lib/ipfs/.ipfs diff --git a/net-p2p/kubo/files/ipfs.init b/net-p2p/kubo/files/ipfs.init new file mode 100644 index 000000000000..b3798b2175a5 --- /dev/null +++ b/net-p2p/kubo/files/ipfs.init @@ -0,0 +1,17 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 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 -m \ + -1 /var/log/ipfs/ipfs.log \ + -2 /var/log/ipfs/ipfs.log" + +depend() { + need net +} diff --git a/net-p2p/kubo/files/ipfs.service b/net-p2p/kubo/files/ipfs.service new file mode 100644 index 000000000000..12e9d19fd965 --- /dev/null +++ b/net-p2p/kubo/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/kubo/kubo-0.13.1.ebuild b/net-p2p/kubo/kubo-0.13.1.ebuild new file mode 100644 index 000000000000..82573032a2ae --- /dev/null +++ b/net-p2p/kubo/kubo-0.13.1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 go-module systemd + +DESCRIPTION="Main implementation of IPFS" +HOMEPAGE="https://ipfs.io/" +SRC_URI="https://github.com/ipfs/${PN}/releases/download/v${PV}/go-ipfs-source.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + acct-group/ipfs + acct-user/ipfs + sys-fs/fuse:0 +" + +DOCS=( CHANGELOG.md CONTRIBUTING.md README.md docs/ ) + +S="${WORKDIR}" + +src_compile() { + default + + local mygoargs + mygoargs=( + -tags release + ) + + go build "${mygoargs[@]}" -o ipfs ./cmd/ipfs || die + go build "${mygoargs[@]}" -o ipfswatch ./cmd/ipfswatch || die + + IPFS_PATH="" ./ipfs commands completion bash > ipfs-completion.bash || die +} + +src_test() { + go test ./cmd/ipfs/... ./cmd/ipfswatch/... || die +} + +src_install() { + dobin ipfs + dobin ipfswatch + newbashcomp ipfs-completion.bash ipfs + einstalldocs + + systemd_dounit "${FILESDIR}/ipfs.service" + systemd_newunit "${FILESDIR}/ipfs-at.service" "ipfs@.service" + + newinitd "${FILESDIR}/ipfs.init" ipfs + newconfd "${FILESDIR}/ipfs.confd" ipfs + + keepdir /var/log/ipfs + 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.' + + # See https://bugs.gentoo.org/838238 + ewarn 'In case kubo CPU usage is too high run the next workaround' + ewarn 'su -s /bin/sh -c "ipfs config profile apply lowpower" ipfs' + ewarn 'Be aware that this will make your node less visible to other peers' +} diff --git a/net-p2p/kubo/metadata.xml b/net-p2p/kubo/metadata.xml new file mode 100644 index 000000000000..0b0389228dea --- /dev/null +++ b/net-p2p/kubo/metadata.xml @@ -0,0 +1,19 @@ + + + + + davidroman96@gmail.com + David Roman + + + hurikhan77+bgo@gmail.com + Kai Krakow + + + proxy-maint@gentoo.org + Proxy Maintainers + + + ipfs/kubo + + -- cgit v1.2.3