You are not logged in.

#1 2020-03-12 01:01:10

unmellow
Member
Registered: 2020-03-12
Posts: 38

[SOLVED]someone please make/help make a loki-network package

i made most of it here https://github.com/unmellow/lokinet-aur
but i need to be able to setcap on the file after the install but i can't find a way to
also i have no idea how to upload it to the aur once i even fix that


you can read more about lokinet here https://loki.network/
and here https://github.com/loki-project/loki-network

Last edited by unmellow (2020-03-23 03:16:34)

Offline

#2 2020-03-12 01:04:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED]someone please make/help make a loki-network package

Please read the wiki.  Following that page would clear up most, if not all issues.  Read until you realize why that "gensum" script is rather silly.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2020-03-12 01:28:48

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED]someone please make/help make a loki-network package

	GIT_DISCOVERY_ACROSS_FILESYSTEM=true
	git submodule init

How is this even supposed to work if you use a tarball as a source? That is not how git works.

You could add the submodules as additional sources and link them into the external/ directory, but the best way to deal with this would be for upstream to actually fix their build to use system versions of stuff. For example, nlohmann-json and chrono-date are in the [community] repository and should be located using system packages.

The setcap stuff needs to be done in a post_install / post_upgrade scriptlet.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2020-03-12 04:35:42

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

so i did everything you all told me to do plus i figured out how to use git-lfs but i still need a way to setcap on the lokinet binary
https://bbs.archlinux.org/viewtopic.php?id=251572 they say it's impossible here and suggest making a unit file and i tried but it didn't work

Offline

#5 2020-03-12 10:10:26

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED]someone please make/help make a loki-network package

unmellow wrote:

i still need a way to setcap on the lokinet binary

eschwartz wrote:

The setcap stuff needs to be done in a post_install / post_upgrade scriptlet.

https://git.archlinux.org/svntogit/pack … iputils#n2

Offline

#6 2020-03-12 10:23:37

shyaminayesh
Member
From: Gampaha, Sri Lanka
Registered: 2015-04-19
Posts: 12
Website

Re: [SOLVED]someone please make/help make a loki-network package

did some quick improvements and made a PR. might be helpful. got a compilation error due to some libsodium thing and had to stop there for now. I'll take a look at it again in the evening.

Offline

#7 2020-03-12 12:37:48

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

thanks @shyaminayesh libsodium is a make dependency so you have to install that yourself i used alot of your script except i switched using prebuilt static library's for now
because of problems with git sub modules specifically nlohmann

@loqs i'll try it again i probrably did something worng but last time that didn't work

Offline

#8 2020-03-12 12:46:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED]someone please make/help make a loki-network package

No, make dependencies are installed by makepkg when they are listed in makedepends.

Remove empty variables.

Do not SKIP integrity checks for static sources.

And why did this switch from building the program to installing a precompiled binary?  If the source is available, build from source.  If not, then the package name must end in -bin.

Again, this is all covered in the fairly short wiki page I pointed to.  We can certainly help with the hard parts here, but don't expect to be hand-held through the simple parts that are clearly outlined in the wiki.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2020-03-12 12:49:58

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

i'm skiping integrity checks because i want things to work before i generate checksums for all the files
and i might switch back to using the source i just need to fix nlohmann
i figure these parts are easy and can be done last once i get setcap working witch i havent yet

Offline

#10 2020-03-12 12:53:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED]someone please make/help make a loki-network package

Eh ... ok.  So "I skipped all the easy things you told me to do" completely contradicts your earlier statement "so i did everything you all told me to do".

But I'll leave this be then.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2020-03-12 14:20:37

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

i made libsodium a make dependency witch should fix your compilation problem @shyaminayesh
unfortunetly i need to run
    git submodule update --init --recursive --remote
    git submodule update --init --recursive
to get it to compile and i don't know how to do that

Last edited by unmellow (2020-03-12 14:21:48)

Offline

#12 2020-03-12 15:45:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED]someone please make/help make a loki-network package

You can get the submodules in a prepare function if needed.  You'll also need at least cmake as a makedepends.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#13 2020-03-12 16:20:09

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

i have found out what my sub module issue was and the only way i can fix it is to delete .git
or find someway to hide the fact that we're in a git repository from make
i might be able to create container to do that but i think just telling people to delete git will be easyer

Offline

#14 2020-03-12 16:21:33

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED]someone please make/help make a loki-network package

For 0.6.4 I did not need the sub modules,  this was based on your original PKGBUILD

# Maintainer: Your Name <Amazingminecrafter2015@gmail.com>
pkgname=loki-network
pkgver=0.6.4
pkgrel=1
pkgdesc="Lokinet is an anonymous, decentralized and IP based overlay network for the internet."
arch=(x86_64)
url="https://github.com/loki-project/loki-network"
license=('custom')
depends=('systemd-resolvconf' 'curl' 'libsodium' 'libuv')
makedepends=('git' 'cmake')
provides=(lokinet)
source=("git+https://github.com/loki-project/loki-network.git#tag=v$pkgver?signed")
md5sums=("SKIP")
validpgpkeys=('67EF6BA68E7B0B0D6EB4F7D4F357B3B42F6F9B05')

build() {
        cd "$pkgname"	
        cmake -DCMAKE_INSTALL_PREFIX=/usr -DNATIVE_BUILD=OFF -DWITH_SHARED=ON -DSUBMODULE_CHECK=OFF -B build
        make -C build
}

package() {
	cd "$pkgname"
	make -C build DESTDIR="$pkgdir/" install
	mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
	cp LICENSE "$pkgdir/usr/share/licenses/$pkgname"
	mkdir -p "$pkgdir/usr/lib/systemd/system/"
	cp debian/lokinet.service "$pkgdir/usr/lib/systemd/system/"
}

Last edited by loqs (2020-03-12 16:26:25)

Offline

#15 2020-03-12 16:38:11

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

i said this on the git but 6.4 has a bug i forgot the details but i just doesn't work
so i'm using ver 0.7.0rc3 (i might just us master tbh)
i put the package sig source in a comment next to source if someone can tell me how to get the pgkey to put into validpgpkeys
i can actually sign the package

Last edited by unmellow (2020-03-12 16:39:53)

Offline

#16 2020-03-12 16:49:00

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED]someone please make/help make a loki-network package

Have you imported the gpg key into the keyring you use to build the package?
Edit:

_tag=v0.7.0-rc3
pkgver=0.7.0rc3
....
source=("git+https://github.com/loki-project/loki-network.git#tag=$_tag?signed")

Tag is signed with the same key as v0.6.4

Last edited by loqs (2020-03-12 16:54:12)

Offline

#17 2020-03-12 16:56:13

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

i don't have a public.key though only .sig

Offline

#18 2020-03-12 16:59:20

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED]someone please make/help make a loki-network package

Verifying source file signatures with gpg...
    loki-network git repo ... FAILED (unknown public key F357B3B42F6F9B05)

Offline

#19 2020-03-12 17:02:34

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

meltonmb:~/lokinet-aur# gpg --import F357B3B42F6F9B05
gpg: can't open 'F357B3B42F6F9B05': No such file or directory
gpg: Total number processed: 0


gpg --import ./lokinet-v0.7.0-rc3.tar.xz.sig
gpg: Total number processed: 0

Last edited by unmellow (2020-03-12 17:03:54)

Offline

#20 2020-03-12 17:05:25

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED]someone please make/help make a loki-network package

That is why I provided the link to using a gpg keyserver so you can download the key.  gpg --import is for when you have the keys in a file.

Offline

#21 2020-03-12 17:08:03

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

oh ok yeah i just did what you said and it worked i should have read your entire post

Offline

#22 2020-03-13 00:41:39

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

so it works now it just works now to find out how to submit it to the aur

Offline

#23 2020-03-13 00:51:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED]someone please make/help make a loki-network package

The PKGBUILD you currently have on github is not yet ready to go to the AUR.  There are all those other "easy" things you need to clean up.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#24 2020-03-13 05:49:14

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

the first two things sha256sum is skip because i heard you're allowed to skip em if you do gpg signing the third custom file has the checksum or do
i need to gen checksums for gpg signed things too?

Offline

#25 2020-03-13 05:51:48

unmellow
Member
Registered: 2020-03-12
Posts: 38

Re: [SOLVED]someone please make/help make a loki-network package

yeah i'm building from source things that aren't gpg signed have a sha256sum and i use source now

Offline

Board footer

Powered by FluxBB