News for hackers. Stuff that matters.
Re:OpenBSD 5.5 Released by clarry on Thursday May 01, 2014 @01:06PM (#7681090)
I should note that most OpenBSD users don't like needless tinkering and therefore stick to the binary packages. Those who want more up to date packages run a -current snapshot. Stable packages are also available via M:Tier.

But if you want to tinker and build your packages, you can do that. That's what the ports tree is there for. That is how the OpenBSD packages are built.

> - build binary packages for ports that either don't exist upstream (stuff I ported) or are outdated upstream?

The package target for bsd.port.mk(5):

     package       Build a port package (or packages in a MULTI_PACKAGES case)
                   from the fake installation.  Involves creating packaging
                   information from templates (see COMMENT, SUBST_VARS among
                   others) and invoking pkg_create(1) for each package in the
                   MULTI_PACKAGES list.  If the repository already contains
                   up-to-date packages, they are not rebuilt.

> - distribute those in a decent way (PKG_PATH swapping..?)

It is very easy to distribute OpenBSD packages. You can use http, ftp, nfs.. Yes, PKG_PATH needs to be set, just like you need to configure the package manager to your own repo on any other system.

> actually it supports multiple sources, apt like. Can PKG_PATH do that?

pkg_add(1):

     PKG_PATH     If a given package name cannot be found, the directories
                  named by PKG_PATH are searched.  It should contain a series
                  of entries separated by colons.  Each entry consists of a
                  directory name.  URL schemes such as FTP, HTTP, HTTPS, or
                  SCP are also appropriate.  The current directory may be
                  indicated implicitly by an empty directory name, or
                  explicitly by a single period (`./').

> poudriere allows me to build (in bulk) all my relevant packages in jails

So OpenBSD doesn't have jails, but it is possible to do ports builds from a read-only ports tree using a non-privileged user, with systrace in place to filter accesses that shouldn't happen.

> In the end, pkg_* feel like ooold Solaris, or like using Slackware again. That's package management on a different level and feels like a step down from apt/yum/pacman/pkgng.

You sure have lots of feelings about a package manager you don't know. Have you even used it?

I haven't used pkgng and my experience with yum & pacman is limited, but apt (and aptitude) is what made me finally quit using Linux; I'm 100% OpenBSD now. pkg_add is a definite step up for me, whether using subjective feelings or the number of times it's broken things for me as the metric.

Re:OpenBSD 5.5 Released by darklajid on Thursday May 01, 2014 @01:41PM (#7681360)
Hey.

I appreciate the help people are offering here. I'm building a list of links (currently the Porter's handbook and various links around that) to read and decided that I need to dive deeper, give it a real spin (again) before commenting .. again.

If I understand the first part of your answer, or where it is coming from: I .. do understand that I can create packages. I don't understand how I'd have my own ports tree in a sensible way (do you have a couple of trees? Build package A from here, package B from there?), when you need stuff that just isn't ported/too 'niche'. Or if you need to bump a version of a port that is in the official tree.

I knew about make package, see above (same on/similar to systems I use today).

I posted my new understanding about PKG_PATH elsewhere in this thread, but I guess I DO have to admit that I should've hit the man page first. Admittedly I never used it for more than pointing to one single official mirror in the couple of VMs I played with. Anyway: Cool.

I'm not married to jails, I just like that poudriere offers a very nice way to build packages in an isolated environment. Security isn't the biggest concern here: One thing that this allows me to do for example is to run one version of FreeBSD and build packages in a jail of another version (or another arch, or both). At this point I assume there's an OpenBSD equivalent for this functionality as well though. :)

My feelings about pkg_* are honestly based on older experiences with FreeBSD and recent but discontinued explorations in NetBSD. My last OpenBSD installation is a while back and I might've given up quite quickly. Which of course might entirely be a fault of my character.

No offense intended, if you feel I attacked either you or a project you sympathize with I'm sorry about that.

Re:OpenBSD 5.5 Released by clarry on Thursday May 01, 2014 @02:23PM (#7681705)
No offense taken.

I just felt that your knowledge is seriously outdated or not based on actual usage of the OpenBSD tool (which, by the way, has had a steady stream of improvements throughout its existence). And it looks like I was right, if your experience is indeed based on FreeBSD & NetBSD. OpenBSD has its own tool, which was written from scratch on and for OpenBSD by Marc Espie. It is not based on the code by Hubbard. It is not at all the same thing the other BSDs have.

As for your own ports tree -- well, I can't tell what is the best method for your scenario; I primarily use the binary packages (and sometimes compile things outside the ports tree). But the most obvious thing to do (which I've done) is to checkout the official ports tree, add your own ports and/or make your changes in it and use it as such. You might have to merge upstream changes if they've updated something you have touched. But if you want to track the official ports in addition to your own, then it makes all the sense to watch out for overlapping updates, no?

Also, if you're bumping ports because the OpenBSD porters haven't done so yet, it might be a good idea to send the diff to ports@.

Re:OpenBSD 5.5 Released by darklajid on Thursday May 01, 2014 @05:16PM (#7682741)
Glad that you're not offended.

As you correctly stated, my dislike for the pkg_* tools is probably without merit here and based on incorrect assumptions. I'll make sure to learn about the OpenBSD variants.

The ports tree.. Well, that's what I'd like portshaker [1] for. Yes, you can do that manually, but it's a pain.

Bumping ports: Same for FreeBSD, but unless OpenBSD has a much more responsive ports teams/mailing list, this won't usually work fast (I know, I'm extrapolating again). I have currently a meager list of four ports in my overlay that currently don't exist in FreeBSD or are outdated, but these exist for quite a while now ("weeks"). I try to be a good citizen and submit these things upstream, but I don't like to depend on someone having commit access.

1: http://www.manualpages.de/FreeBSD/FreeBSD-ports-9.0-RELEASE/...

Re:OpenBSD 5.5 Released by seryoiupfurds on Friday May 02, 2014 @01:00AM (#7684204)
> I don't understand how I'd have my own ports tree in a sensible way (do you have a couple of trees? Build package A from here, package B from there?), when you need stuff that just isn't ported/too 'niche'.

There's a /usr/ports/mystuff directory for building your own ports. Unless I'm missing something, I don't see why you'd need a whole new ports tree?