installing and using pkgsrc/pkgin on linux, crosscompiling for a netbsd target

Hello.

I'll install netbsd on an old computer, but I am sure I'll have a hard time to get wireless internet working in a way or another. I figured I could do that easily if I managed to install things for this computer, on another one, the one I am using now, by crosscompiling. And that it would be a good training, isn't it ?
For now, if pkg_add and so on are recognized, I still can't "pkg_add pkgin" or any software: it says it doesn't know that package. How come ? I see it, it's there.

ps:some might remember me. Indeed, I failed using this system many time, but I am a romantic, and I can't stop feeling something in my heart anytime I read "pkgsrc" or "netbsd", I just don't know why... so here I am again

In regards to installing pkgin, the variable you need to set is PKG_PATH. It is the URL/path to the binary NetBSD package repository you wish to use. Globally, there are at least 8 http/ftp servers. There are some guidlines on setting up pkgin on NetBSD that come up readily on an Internet Search. Use search terms: NetBSD pkgin. pkgin configuration is specified in /usr/pkg/etc/pkgin which should set a default that is linked to the current -stable branch.

I currently have 2 old PC's running NetBSD 7.0.2 patch with WPA2 encrypted pci wireless cards. It is dependent on your hardware - some wireless chips work better than others.

I use the NetBSD wiki guidelines to set up although I have to manually run dhclient the first time.

I've followed the advises of http://www.unixmen.com/howto-install-pkgin-on-netbsd-6/
As for the wireless of course I know it is possible and I know too that the problem are drivers. Idem for X, which is the very reason I stopped using NBSD last time. But it was a fun time, I hope it will now too.
edit: Knowing both english and french, I happen to forget when I use one or the other ! sorry !

If you click on the two links above, you will see that your link is a deadend. Clicking on the second link shows a list of packages one of which is pkgin.
Packages are specific to the NetBSD Release and the pkgsrc version. Every quarter a new version of pkgsrc is released. These are the currently available pkgsrc versions for the amd64 architecture. I copied them from http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/.

pkgsrc2016Q4 was just released and many packages do not presently build. I would recommend retrieving pkgin from the 7.0_2016Q3 repository. When pkgsrc_2016Q4 is deemed ready, the developers will change the links so that you can easily update. Presently 7.0 -> 7.0_2016Q3. When Q4 is ready the link will be 7.0 -> 7.0_2016Q4.

Last edited by shep; 11th January 2017 at 10:42 PM.
Reason: usual fat finger typos and right brained grammer errors

Oh, sorry, sometimes the addresses in config files are without the ending "/", sometimes with. I got confused. I'll change the pkgsrc tree later, as I doubt I'll find an absent build with the few packages I'll need. So, why do

So there must be something else than $PKG_PATH ? Otherwise, I can still go in the package directory, then run 'bmake install clean clean-depends'. But still no pkg_add anything. I built pkglint, but pkgin gave that:

The other thing that can cause you trouble is to mix repository binaries that were built with one version of pkgsrc with a different version of pkgsrc.

If you your goal is to get your first working NetBSD Desktop I would make several recommendations:

1) Use precompiled binaries (packages). Packages built with pkgsrc_2016Q3 have just finished several months of fixing build failures - it is as good as it's going to get.

2) Use amd64/i386.

3) I use NetBSD 7 but most builds are initiated with NetBSD 6.1 The 7.1 release candidate will have some teething problems and I would avoid it until you are comfortable with setting up a system from stable sources. Using a release candidate adds the extra variable of code in testing - did it fail because of something you did or is it just buggy?

Because one of my goal is to learn to use pkgsrc anywhere and get used to crosscompiling, I'll download an older and more stable tree version. Otherwise, I knew that bmake is for non-netbsd system. I doubt that pkg_add non working at all, is because of the "testing part" of the packages, it is too big a bug. I mean, if it is, I don't imagine how is the 'current' branch.
That tree would be mostly devoid of bugs http://ftp.netbsd.org/pub/pkgsrc/stable/pkgsrc.tar.bz2 is that right ?

Patching and bug fixes continue after a release. If you look at the time and date stamps for pkgsrc_2016Q3, you will see entries that occurred several months after the release of 2016Q3.

A useful mailing list to follow is Pkgsrc bulk build reports. You can scroll back through the archives to get a sense of what is "stable".

If you goal is to install a working Xfce4 desktop, at this time your highest likelyhood of success is with 2016Q3. If you want to help the NetBSD pkgsrc community debug their build scripts, attention is now focused on 2016Q4.