<20220318235956.8234-1-ghenry@sentrypeer.org>
https://sentrypeer.org/ Honeypot for a distributed p2p list of bad actor IP addresses and phone numbers testing/ --- testing/sentrypeer/APKBUILD | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 testing/sentrypeer/APKBUILD diff --git a/testing/sentrypeer/APKBUILD b/testing/sentrypeer/APKBUILD new file mode 100644 index 0000000000..7a30907020 --- /dev/null +++ b/testing/sentrypeer/APKBUILD @@ -0,0 +1,40 @@ +# Contributor: Gavin Henry <ghenry@sentrypeer.org> +# Maintainer: Gavin Henry <ghenry@sentrypeer.org> +pkgname=sentrypeer +pkgver=1.2.0 +pkgrel=0 +pkgdesc="Honeypot for a distributed p2p list of bad actor IP addresses and phone numbers" +url="https://sentrypeer.org/" +arch="all" +license="GPL-2.0-only GPL-3.0-only" +makedepends="autoconf autoconf-archive automake pkgconfig sqlite-dev opendht-dev jansson-dev libmicrohttpd-dev libosip2-dev pcre2-dev util-linux-dev" +checkdepends="cmocka-dev curl-dev" +subpackages="$pkgname-doc" +source="$pkgname-$pkgver.tar.gz::https://github.com/SentryPeer/SentryPeer/archive/refs/tags/v$pkgver.tar.gz" +builddir="$srcdir/SentryPeer-$pkgver" + +prepare() { + default_prepare + sed -i '/AM_LDFLAGS=/d' Makefile.am + ./bootstrap.sh +} + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr + make +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums=" +53d06405139828c7d78521db6c9c254952b3596281e115b68e9f7363d67cc39d214effb165296f1c5e9b4f01cd91e3a7e218dd645d51859d05ab2b51d44a7129 sentrypeer-1.2.0.tar.gz +" -- 2.34.1
<164772882080.985.3557823500633546057.gitlab.32199.9455497e623b9a5f9f9dc1761707bcd6a2017060@listserv.local>
<20220318235956.8234-1-ghenry@sentrypeer.org>
(view parent)
@psykose Does this look OK apart from cleaning up my `makedepends=` to match what you advised for opendht? -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_223821
<164772900116.985.12188309805437854915.gitlab.32199.9455497e623b9a5f9f9dc1761707bcd6a2017060@listserv.local>
<164772882080.985.3557823500633546057.gitlab.32199.9455497e623b9a5f9f9dc1761707bcd6a2017060@listserv.local>
(view parent)
sure! and perhaps a comment on why something is deleted in prepare() -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_223822
<164772904877.985.16540835471852275851.gitlab.32199.ea8a90f0ffbd6bac114ac0846d5b4ad128a95d80@listserv.local>
<20220318235956.8234-1-ghenry@sentrypeer.org>
(view parent)
On Fri, 18 Mar 2022 23:59:56 +0000, Gavin Henry wrote: > +url="https://sentrypeer.org/" > +arch="all" > +license="GPL-2.0-only GPL-3.0-only" ```suggestion:-0+0 license="GPL-2.0-only OR GPL-3.0-only" ``` (from a quick look at the files, maybe i'm wrong) -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_223823
<164772965117.985.12396029033516963445.gitlab.32199.2d0c0562b68335537582ffd7a019113780583329@listserv.local>
<20220318235956.8234-1-ghenry@sentrypeer.org>
(view parent)
Thanks! Maybe I should do this via my fork again rather than emailing in? In my dev env here I have an rpath hardcoded for linuxbrew due to a bug: https://github.com/SentryPeer/SentryPeer/commit/765cb2d224d06eb130dd742537f6bad2e529f8b1 https://github.com/Homebrew/discussions/discussions/2587 I'm just removing that with my `sed`. In my Debian package I have a systemd file and defaults file. That would be a `sentrypeer.confd` and `sentrypeer.initd` I think according to what `newapkbuild` minted? ``` alpine:~/sentrypeer$ ls APKBUILD sentrypeer.confd sentrypeer.initd sentrypeer.post-install sentrypeer.pre-install ``` for a daemon process, it's best to use all of above and create a user etc? What's a best practice package I could look at? It would be very similar to what I'm doing in https://github.com/SentryPeer/SentryPeer/blob/main/Dockerfile#L41 as that uses Alpine. Now that `opendht-dev` is in testing, I can update it. Thanks! -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_223830
<164773017821.985.15943803412455167474.gitlab.32199.2d0c0562b68335537582ffd7a019113780583329@listserv.local>
<164772965117.985.12396029033516963445.gitlab.32199.2d0c0562b68335537582ffd7a019113780583329@listserv.local>
(view parent)
> Thanks! Maybe I should do this via my fork again rather than emailing in? it's generally preferred, as it's easier for you to update things with feedback (and integrates with gitlab better, as it's not a new MR made for it each time) > it's best to use all of above and create a user etc? What's a best practice package I could look at? maybe something like testing/soju, or just grep around for .initd . openrc scripts are a bit arcane, but i'll have a look > It would be very similar to what I'm doing in https://github.com/SentryPeer/SentryPeer/blob/main/Dockerfile#L41 sure, looks good. just keep things to /var/lib/sentrypeer as opposed to the /opt folder that is made there if possible. the adduser/addgroup should be in a post-install script, and you can drop the -u/-g uid -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_223835
<164811703192.985.16943402553524097912.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
<20220318235956.8234-1-ghenry@sentrypeer.org>
(view parent)
Hi @psykose , Me again :-) I'm just updating this for use with OpenDHT since it's in core now, but getting attached. That is the correct lib. Is there something I've missed in the APKBUILD file for OpenDHT? Thanks.! [Screenshot_from_2022-03-24_10-15-36](/uploads/fd80e8d854d36ff1003d431f140132d2/Screenshot_from_2022-03-24_10-15-36.png) ![Screenshot_from_2022-03-24_10-13-14](https://gitlab.alpinelinux.org/alpine/aports/uploads/1637294f134998fb0926e675939c8ef8/Screenshot_from_2022-03-24_10-13-14.png) -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_224725
<164811713171.985.14304178337425089510.gitlab.32199.feb5e2540e899fb3886631e91e8ae198696894c8@listserv.local>
<20220318235956.8234-1-ghenry@sentrypeer.org>
(view parent)
This configures correct as per my screenshot: https://github.com/SentryPeer/SentryPeer/blob/main/configure.ac#L101 -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_224726
<164812167880.985.9466619009584127319.gitlab.32199.354ae25912ebb8552f8ec4c775f22753e74b94f9@listserv.local>
<20220318235956.8234-1-ghenry@sentrypeer.org>
(view parent)
Works fine on my local 3.15.1, so must be my Dockerfile. Nevermind. Thanks. -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_224731
<164813438898.985.14506307875032435343.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
<164811703192.985.16943402553524097912.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
(view parent)
could be that libopendht-c.so is accidentally in `opendht` instead of `opendht-libs`, i'll fix that in a sec -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_224762
<164813453425.985.2626932909091533131.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
<164813438898.985.14506307875032435343.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
(view parent)
should be correct now once it builds f15f4bd57c -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_224763
<164813458336.985.3722674662984934463.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
<164813453425.985.2626932909091533131.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
(view parent)
And I've probably installed `opendht` fully on my test VM. Thanks @psykose as always! -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_224765
<164813463330.985.17812261200068243317.gitlab.32199.441097f2551d3fc44aacbeda654a52f005ccfbd1@listserv.local>
<20220318235956.8234-1-ghenry@sentrypeer.org>
(view parent)
I actually just submitted a 2.4.0r1 though. I can redo. Adding python bindings. -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_224766
<164813496878.985.4969965680044760427.gitlab.32199.e4d2d3f8fe0aa7572d8ecafcf9d602c4de050ae6@listserv.local>
<20220318235956.8234-1-ghenry@sentrypeer.org>
(view parent)
Yep, if I only add `opendht-dev` and `opendht-libs` I get the same. -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_224772
<164813509175.985.4184096638201981921.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
<164813458336.985.3722674662984934463.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
(view parent)
yep :) -r1 should need only -dev -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_224773
<164813519073.985.5130294296863934760.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
<164813509175.985.4184096638201981921.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
(view parent)
Shall I do a new patch for r2 then? -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_224774
<164813573934.985.14682928515900420832.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
<164813519073.985.5130294296863934760.gitlab.32199.7fbb8b1bd515483bf02f4069974019c1e10b94ab@listserv.local>
(view parent)
what in it? i already fixed the above issue in -r1 -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_224775
<165072960238.985.1063937654298883974.gitlab.32199.9e9eb6eb41d34c0fae200069abb8d4ec8c7ce2da@listserv.local>
<20220318235956.8234-1-ghenry@sentrypeer.org>
(view parent)
Sorry to bother you @mailinglist-bot, but we've detected that this merge request hasn't seen any recent activity. If you need help or want to discuss your approach with developers you can ping `@team/mentors`. You can also ask on IRC on `#alpine-devel` on irc.oftc.net. If no further activity occurs in this MR, Alpine developers may close it in the future. Thanks for your contribution. -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_231752
<165073072398.985.6431447004890625069.gitlab.32199.9e9eb6eb41d34c0fae200069abb8d4ec8c7ce2da@listserv.local>
<165072960238.985.1063937654298883974.gitlab.32199.9e9eb6eb41d34c0fae200069abb8d4ec8c7ce2da@listserv.local>
(view parent)
Thanks. I think this is good now. I'll re-check. I was awaiting opendht completion. -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_231757
<165075323984.985.1431114128235322858.gitlab.32199.5cda6c7aa01006ca5c1b38c6a27f0b9f80aa20cf@listserv.local>
<20220318235956.8234-1-ghenry@sentrypeer.org>
(view parent)
Thank you Alice. -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_231822
<165075330719.985.13994758180115413713.gitlab.32199.3e752bd74caee2d4d9e596d117194774d6934dc6@listserv.local>
<20220318235956.8234-1-ghenry@sentrypeer.org>
(view parent)
seems to fail on 32-bit arches, so you should disable it there -- via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32199#note_231823