From a3196cc835c7532279355fe56d7564868e43ff15 Mon Sep 17 00:00:00 2001 From: David Roman Date: Tue, 12 Jul 2022 15:58:09 +0200 Subject: net-p2p/*: move go-ipfs -> kubo Signed-off-by: David Roman Closes: https://github.com/gentoo/gentoo/pull/26371 Signed-off-by: Sam James --- net-p2p/go-ipfs/Manifest | 1 - 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.13.1.ebuild | 69 ----------------------------------- net-p2p/go-ipfs/metadata.xml | 16 -------- net-p2p/kubo/Manifest | 1 + 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 | 16 ++++++++ profiles/updates/3Q-2022 | 1 + 15 files changed, 142 insertions(+), 141 deletions(-) delete mode 100644 net-p2p/go-ipfs/Manifest delete mode 100644 net-p2p/go-ipfs/files/ipfs-at.service delete mode 100644 net-p2p/go-ipfs/files/ipfs.confd delete mode 100644 net-p2p/go-ipfs/files/ipfs.init delete mode 100644 net-p2p/go-ipfs/files/ipfs.service delete mode 100644 net-p2p/go-ipfs/go-ipfs-0.13.1.ebuild delete mode 100644 net-p2p/go-ipfs/metadata.xml 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 diff --git a/net-p2p/go-ipfs/Manifest b/net-p2p/go-ipfs/Manifest deleted file mode 100644 index 773ebd4ef95f..000000000000 --- a/net-p2p/go-ipfs/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST go-ipfs-0.13.1.tar.gz 13474891 BLAKE2B 2e6e056e27a8783c9d04ea5d8c41d86e45250f5ba95c57737aaf52d36d453be31baab21767008596710d7eb84f471460c32de70faf1764740ea551a5aa4bd38e SHA512 3257d49df61bb31d4054934506ea543df2d9ed1f57b9b6aeef001bb77fe9fdce646fec96ded72b7f9f99e3bc687da77997b1295ebb5a40e20e4df0413e15bfd7 diff --git a/net-p2p/go-ipfs/files/ipfs-at.service b/net-p2p/go-ipfs/files/ipfs-at.service deleted file mode 100644 index c9ce91294177..000000000000 --- a/net-p2p/go-ipfs/files/ipfs-at.service +++ /dev/null @@ -1,18 +0,0 @@ -[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 deleted file mode 100644 index f1e8eb77adf5..000000000000 --- a/net-p2p/go-ipfs/files/ipfs.confd +++ /dev/null @@ -1 +0,0 @@ -IPFS_PATH=/var/lib/ipfs/.ipfs diff --git a/net-p2p/go-ipfs/files/ipfs.init b/net-p2p/go-ipfs/files/ipfs.init deleted file mode 100644 index b3798b2175a5..000000000000 --- a/net-p2p/go-ipfs/files/ipfs.init +++ /dev/null @@ -1,17 +0,0 @@ -#!/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/go-ipfs/files/ipfs.service b/net-p2p/go-ipfs/files/ipfs.service deleted file mode 100644 index 12e9d19fd965..000000000000 --- a/net-p2p/go-ipfs/files/ipfs.service +++ /dev/null @@ -1,19 +0,0 @@ -[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.13.1.ebuild b/net-p2p/go-ipfs/go-ipfs-0.13.1.ebuild deleted file mode 100644 index 3418b0d7a9b5..000000000000 --- a/net-p2p/go-ipfs/go-ipfs-0.13.1.ebuild +++ /dev/null @@ -1,69 +0,0 @@ -# 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}/${PN}-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 go-ipfs CPU usage is too high run the next workaround' - ewarn 'su -s /bin/sh -c "ipfs config profile apply lowpower"' - ewarn 'Be aware that this will make your node less visible to other peers' -} diff --git a/net-p2p/go-ipfs/metadata.xml b/net-p2p/go-ipfs/metadata.xml deleted file mode 100644 index 9e33ed00d6e0..000000000000 --- a/net-p2p/go-ipfs/metadata.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - davidroman96@gmail.com - David Roman - - - hurikhan77+bgo@gmail.com - Kai Krakow - - - proxy-maint@gentoo.org - Proxy Maintainers - - diff --git a/net-p2p/kubo/Manifest b/net-p2p/kubo/Manifest new file mode 100644 index 000000000000..09ae8432b7a0 --- /dev/null +++ b/net-p2p/kubo/Manifest @@ -0,0 +1 @@ +DIST kubo-0.13.1.tar.gz 13474891 BLAKE2B 2e6e056e27a8783c9d04ea5d8c41d86e45250f5ba95c57737aaf52d36d453be31baab21767008596710d7eb84f471460c32de70faf1764740ea551a5aa4bd38e SHA512 3257d49df61bb31d4054934506ea543df2d9ed1f57b9b6aeef001bb77fe9fdce646fec96ded72b7f9f99e3bc687da77997b1295ebb5a40e20e4df0413e15bfd7 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..9e33ed00d6e0 --- /dev/null +++ b/net-p2p/kubo/metadata.xml @@ -0,0 +1,16 @@ + + + + + davidroman96@gmail.com + David Roman + + + hurikhan77+bgo@gmail.com + Kai Krakow + + + proxy-maint@gentoo.org + Proxy Maintainers + + diff --git a/profiles/updates/3Q-2022 b/profiles/updates/3Q-2022 index 0ac639a1c5db..2cdcd10dc1c9 100644 --- a/profiles/updates/3Q-2022 +++ b/profiles/updates/3Q-2022 @@ -11,3 +11,4 @@ move net-misc/cni-plugins app-containers/cni-plugins move gnome-extra/chrome-gnome-shell gnome-extra/gnome-browser-connector move dev-python/PyQt6_sip dev-python/PyQt6-sip move dev-python/PyQt6_WebEngine dev-python/PyQt6-WebEngine +move net-p2p/go-ipfs net-p2p/kubo -- cgit v1.2.3-65-gdbad