4 ms·
I am the pkgin maintainer, and would be interested to hear about any issues you have building pkgin. It should build on any of the 23 platforms that pkgsrc sup
by jperkin 5y ago
I am the pkgin maintainer, and would be interested to hear about any issues you have building pkgin. It should build on any of the 23 platforms that pkgsrc supports, including Linux.
I even offer daily binary package builds for CentOS here: https://pkgsrc.joyent.com/install-on-linux/ https://pkgsrc.joyent.com/install-on-linux/
Feel free to open up an issue at https://github.com/NetBSDfr/pkgin/issues https://github.com/NetBSDfr/pkgin/issues and we can take a look.
- pxc 5y agoThose binaries even sometimes work on Ubuntu, with a little manual linking and good luck, even though it's a total abuse. :D
- johnisgood 5y agoI am trying to compile it from source on Linux. I immediately ran into an annoying issue, which is having the need to specify those directories manually. So I did, and the configure finished successfully when I ran: ./configure --prefix=/home/john/.local/pkg/pkgin-20210529 --with-dbdir=/usr/ --with-libarchive=/usr/ --with-libfetch=/home/john/Downloads/libfetch-2.33 --with-openssl=/usr/ --with-sqlite3=/usr/ --with-pkg-install=/home/john/.local/pkg/pkgsrc-2021Q1/sbin/ --with-machine-arch=x86_64 When I ran `make`, I ran into: actions.c: In function ‘verb_flag’: actions.c:53:3: error: implicit declaration of function ‘strlcat’; did you mean ‘strncat’? [-Werror=implicit-function-declaration] 53 | strlcat(pkgtools_flags, "v", 1); | ^~~~~~~ | strncat Which tells me that I could fix it by providing `-I/usr/include/bsd/` and `-lbsd` or the like. I will give it a go. Any ideas anyway? Edit: I added the above, and it went on to: In function ‘strncpy’, inlined from ‘read_repos’ at fsops.c:133:6: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 8192 equals destination size [-Werror=stringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This does not sound too good, you probably want to fix it (along with the other warnings on Linux). In any case, I got rid of `-Werror` and I have a couple of undefined references. I will most likely get it to work, but you see my issue here, right? Is it the "official" way to compile it from source by the way? Edit #2: I got a working binary by making those changes[1]. Last few lines: CCLD pkgin /usr/bin/ld: external/pkgin-var.o: in function `var_get': /tmp/pkgin/external/var.c:99: warning: This function cannot be safely ported, use getline(3) instead, as it is supported by GNU and POSIX.1-2008. make[1]: Leaving directory '/tmp/pkgin' --- You might want to look into compiling it on Linux, because without those changes[1], you cannot do it. I was using commit e963d1e1a2409ed51d191d936b5f75e35bdf9197, version 20.12.1. [1] You also have to include `<bsd/string.h>` for `strlcpy` on Linux. Only `actions.c` is affected. --- If you want, I am willing to send you an e-mail with the diff, but I will fix the other warnings, too, then. Oh, and instead of relying on `libbsd`, one could just add `strlcpy` and the like themselves. --- By the way, from where do I get the `repositories.conf` exactly? The supplied `repositories.conf` seems outdated. I tried using both `ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/$arch/5.1/All` and `http://mirror-master.dragonflybsd.org/packages/$arch/DragonFly-$osrelease/stable/All http://mirror-master.dragonflybsd.org/packages/$arch/DragonF...`, but they were not working. Hmm, I tried to use a working one, but I got this: processing remote summary (https://pkgsrc.joyent.com/packages/Linux/el7/trunk/x86_64/All)... SSL support disabled SSL support disabled SSL support disabled pkgin: Could not fetch https://pkgsrc.joyent.com/packages/Linux/el7/trunk/x86_64/All/pkg_summary.gz I am currently using `file://` that points to the manually downloaded `pkg_summary.gz`. Not sure why SSL support is disabled when I configured it, it specifically asked for it, and I provided it through `--with-openssl=/usr/` and it passed because it found it.
- johnisgood 5y agohttp://ftp.fr.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/7.1/All/ seems to work! Although I do get: pkg_add: Warning: package `bootstrap-mk-files-20180901' was built for a platform: pkg_add: NetBSD/x86_64 7.0 (pkg) vs. Linux/x86_64 5.8.0 (this host) So how would I remedy this for Linux? I want to use "https://pkgsrc.joyent.com/packages/Linux/el7/trunk/x86_64/All/ https://pkgsrc.joyent.com/packages/Linux/el7/trunk/x86_64/Al..." but I get "SSL support disabled". I will debug this I think. --- I fixed it. I had to compile libfetch with `-DWITH_SSL'. --- All in all, there are many problems that I ran into, but nothing that much of a big deal. --- There is one problem I cannot seem to fix: pkg_add: unable to verify signature: Signature key id 4735b9a256aaacaf not found I keep getting this, and I have no clue how to change it or where it came from. Without this, nothing actually gets installed, so I cannot use pkgin or pkg_* until this is resolved. Do you have any clue? I tried to look for anything to change in pkg_install.conf or mk.conf but to no avail. Any ideas?