News for hackers. Stuff that matters.
Re:BSD vs. Linux by pmoriarty on Friday November 30, 2018 @06:37PM (#18573809)
I've used Gentoo for a long time, and Gentoo (as the article notes) is quite similar to BSD in some ways. It too has a base system. There too the user compiles packages themselves from scratch (though precompiled binaries are available for a handful of packages) in a system like ports (called "portage" on Gentoo). It too has no systemd (unless you want it).

I like Gentoo and still use it, but my biggest problem with it is that compiling packages takes a hell of a long time (especially some monstrosities like QT or webkit, which can take me days or even a week to compile on my old, slow laptop). You really have to have relatively modern system to compile all your packages from scratch, if you don't want to have to do it non-stop, virtually 24 hours a day. It's really annoying. I have better things to dedicate my processor cycles to and my own time to than constantly compiling packages.

So maybe I'll switch. I'm not sure to what, though. I've thought of BSD, but it has the same problem. I don't really like the idea of binary distros either, because of their relative inflexibility (no choice to include/omit package features that you want/don't want), and honestly, I don't really trust binary blobs as much as compiling from source... though maybe in the end it doesn't really matter.

Re:BSD vs. Linux by ams6110 on Friday November 30, 2018 @06:46PM (#18573862)
OpenBSD includes a large number of precompiled packages. In fact you are encouraged to use these rather than compiling from ports unless you have a specific need that isn't met by the standard package.

It's my understanding that most of the other BSDs are similar in this regard, though I don't have first-hand experience.

if you want to stay with Linux, I have heard that Arch is one of the more BSD-like distributions.

Re:BSD vs. Linux by laumars on Friday November 30, 2018 @07:15PM (#18574028)
Arch used to be more BSD-like but since it’s adopted systemd it’s felt very much more mainstream Linux than it used to when it had a BSD-inspired rc.conf. That said, it’s still my preferred desktop OS.

FreeBSD definitely supports binary packages as well. It’s a great system to use too. In fact if there wasn’t a few Linux-specific tools I needed and FreeBSDs hardware support was on a par with Linux, then I would use FreeBSD as my primary system - without a doubt. But as it is I still run FreeBSD for all of my personal servers.

Re:BSD vs. Linux by 2trill2spill on Friday November 30, 2018 @07:38PM (#18574146)
Have you tried the FreeBSD Linux emulator? It can be annoying grabbing the required libraries off a Centos box but once you do it's been pretty reliable for me.
Re:BSD vs. Linux by laumars on Saturday December 01, 2018 @02:23AM (#18575729)
Not recently. About 10 or 15 years ago I used to use the Linux binary compatibility layer but when I last looked - 5ish years ago? - it seemed support for that had languished.

To be honest the tool I’d most want would be Docker and I couldn’t see that working even with binary compatibility.

On the FreeBSD servers I run, I just fire up a VM for the rare occasions I do require Linux (and it is extremely rare that happens), but Arch is a better compromise for me on my laptop.

Re:BSD vs. Linux by sureaboutthis on Friday November 30, 2018 @08:20PM (#18574347)
While Linux may support 10,000 devices, FreeBSD support 9734 of them. And you only need one. FreeBSD probably supports every piece of hardware you use.

Source: me. A FreeBSD workstation user for 16 years who has built his own machine with off the shelf parts since the beginning with a current machine running the latest and greatest.

Re:BSD vs. Linux by sigjuice on Friday November 30, 2018 @07:42PM (#18574166)
OpenBSD precompiled packages have a limitation. http://www.openbsd.org/faq/faq15.html

Binary packages for -release and -stable are not updated.

I also ran into some strangeness with FreeBSD packages. I was on a STABLE release that was not the latest version. It was no longer possible for me to update and install binary packages.

Re:BSD vs. Linux by snazz on Friday November 30, 2018 @08:11PM (#18574308)
If you're okay trusting another party, M:Tier builds updated versions of stable OpenBSD packages. See https://stable.mtier.org

This is generally the accepted solution if you don't want to follow Current.

Re:BSD vs. Linux by zcid on Friday November 30, 2018 @07:24PM (#18574069)
I've had OpenBSD on my laptop for a couple of years now, but I recently installed Void and have been very happy with it. It maintains a lot of the simplicity you get from a BSD. Although it doesn't have a lot of the advantages of OpenBSD security-wise, the performance is better and software compatibility is higher.

Void also has forgone systemd which I find to be a mandatory requirement for a linux system. It's why I left Arch for OpenBSD in the first place. I love the simplicity of runit (the init system Void uses) and their package manager is top notch.

Re:BSD vs. Linux by brobdingnagians on Friday November 30, 2018 @10:04PM (#18574834)
I've done the same thing; had OpenBSD installed on my desktop and loved it, but one piece of software I use wasn't supported very well on it, so I had to go to Void and avoid systemd, but pleasantly happy with the experience. I virtualize OpenBSD so I can have the same environment as my servers.
Re:BSD vs. Linux by jolmg on Friday November 30, 2018 @07:22PM (#18574060)
How about you rent a VPS, build your packages there, and set up the VPS as your own binary package repository? A $5/month ($0.0075/hr) Linode VPS comes with an SSD, and they're absurdly fast with the network. If it helps (I'm not sure where the bottleneck is most of the time), you can rent a more powerful VPS for a few hours for the build and then copy the built packages to a cheap $5/month VPS for hosting. Just don't forget to destroy the more powerful VPS once you're done. Turned off VPSes are still reserved for you so they would continue charging you for it until the hour you destroy it.

I haven't used Gentoo, but you say it can use binary packages. If it's too complicated, another option could be Archlinux. Building packages is really easy. It's just `asp export $package; cd $package; makepkg` and you'll get a $package-$version.pkg.tar.xz in the directory. If you want to modify something, just edit the PKGBUILD that asp downloaded. It's just a simple bash script with standard conventions. Once you're done modifying PKGBUILD, `makepkg` will make the package.

To make a repository, it's just a matter of putting all the .pkg.tar.xz in a directory and running `repose -J $repo .pkg.tar.xz; gpg -b $repo.db`, then hosting that directory with an http server.

Configuring the package manager to use your repo is just a matter of doing something like:

  cat >> /etc/pacman.conf << EOF
  [$repo]
  Server = $url
  EOF
EDIT: Anyone know how we can escape asterisks? The .pkg.tar.xz above is supposed to be a glob.
Re:BSD vs. Linux by pseudalopex on Friday November 30, 2018 @08:39PM (#18574441)
A single CPU core and 1 GB of RAM isn't enough for a build host.

I think DigitalOcean would support this better than Linode. You could keep the build host filesystem on a block storage volume instead of having to recreate it every time, and you could store the built packages in DigitalOcean's equivalent of S3 instead of needing a VPS just to host them.

Re:BSD vs. Linux by jolmg on Friday November 30, 2018 @09:12PM (#18574609)
I guess it depends on the individual packages. While many things can comfortably be quickly built on such hardware, I'm sure it wouldn't be enough for something like Firefox or Chromium. That can be handled by temporarily using a more powerful server.

I don't know about it being better, but you've got me curious. Linode also has block storage volumes. On using something like an S3, I wonder if that's really the best option. I don't know if it's cheaper, but it seems to be less flexible. For example, I like to have my private package repo provided on a VPN, not open to the public. I don't suppose using something akin to S3 would allow for a similar setup.

Re:BSD vs. Linux by jakeogh on Friday November 30, 2018 @08:03PM (#18574268)
Still need to compile once, but I use https://wiki.gentoo.org/wiki/Binary_package_guide#Implementi... and it saves plenty of time. Also, when I deploy a new box, I copy over the portage tree, so most of the packages are pre-built and ready to install into the chroot.
Re:BSD vs. Linux by pmoriarty on Friday November 30, 2018 @08:32PM (#18574407)
I don't trust VPS's.
Re:BSD vs. Linux by jolmg on Friday November 30, 2018 @08:42PM (#18574452)
Security sure is inconvenient. :)

But really, what's your threat model? For a VPS employee/company to mess with your packages, they'd have to be personally targeting you. If you're only worried about systematic, automated handling of all company VPS to insert malware in the ones that have package repositories, then you can probably set it up in an unusual way to evade such a program.

Re:BSD vs. Linux by pmoriarty on Friday November 30, 2018 @10:19PM (#18574878)
What about someone who's located on another VM on the same hardware that hosts mine breaking out of their VM and in to mine and compromising my packages?
Re:BSD vs. Linux by jolmg on Friday November 30, 2018 @10:58PM (#18575047)
You have to chose to trust something. If you keep falling in this rabbit hole of not wanting to trust anything, your only option will be to stay on an airgapped computer, or even ditching that for a paper notebook in case the hardware manufacturers did something. That's unless, of course, you have the time and resources to manufacture your own computer down to implementing every piece of circuitry in each microprocessor.

I think chances are pretty slim that a VPS company's vps isolation is so crappy that you have the chances of getting your vps hardware shared with someone that knows of such a gapping security hole that could be such a huge liability to the VPS company.

EDIT: Also, why would someone go out of their way to compromise a neighboring VPS, check if they, by chance, have a package repository, and insert malware in that? Who are you, that someone would think that's a good use of their time?

You know, society can't function without trust. Every person that's close to you could suddenly turn around and try to kill you, but you have to trust that they function by reason, and know that they have no reason for doing so. Locks around the world are pretty useless to keep strangers from lock-picking them and very many of them are keyed-alike. Their real reason is to simply make it a greater hassle to get to whatever they're protecting and therefore make it a less appealing target. Like so and with other methods, people implement their security by making themselves a less appealing target. Some people setup the outside of their home as a dump while building a mansion inside. These people trust robbers to act on reason.

No one has perfect security. Security is a matter of choosing what to defend against (your threat model), choosing what you can trust, and anchoring your defenses on the things you trust.

EDIT 2: I removed the paragraph on VPSes being virtual in name only. Linode apparently uses KVM.

Re:BSD vs. Linux by craftoman on Saturday December 01, 2018 @02:49PM (#18578534)
VPS providers are basically for personal use only not for enterprises. There have been multiple vulnerabilities that you could exploit another box from your environment.
Re:BSD vs. Linux by sureaboutthis on Friday November 30, 2018 @07:44PM (#18574175)
FreeBSD does not have the same problem. You have your choice of packages or ports. Ports you compile if you want to change the default settings. Otherwise you use packages which are just pre-compiled ports with default settings.
Re:BSD vs. Linux by bch on Friday November 30, 2018 @07:53PM (#18574217)
Ditto NetBSD
Re:BSD vs. Linux by xiii1408 on Friday November 30, 2018 @06:58PM (#18573941)
You definitely should try Arch.

It has a similar "from scratch" policy, but all the official packages are pre-compiled. There's also the Arch User Repository, where you can find proprietary and unofficial packages, many of which will compile from source.

It also has by far the best documentation of any distro.

Re:BSD vs. Linux by coffekaesque on Friday November 30, 2018 @07:24PM (#18574071)
I like the idea of using Arch but it concerns me that it's probably not used a lot in critical places. So way less real eyes in the packages. By real eyes I mean people who will get fired it they introduced malware by not reviewing what's getting installed. It's my own bias but projects like Fedora, Ubuntu, Debian makes me feel a lot less vulnerable. I understand the AUR/PKGBUILD, it's not about that. I'm talking about the official packages and the core.

And when I installed Manjaro it felt like a 13 years old edgy kid riced the defaults. As much as I liked installing Arch from scratch I'm not always in the mood to do it. And if you automate the process you're essentially doing the same (but you don't lose street cred right).

> It also has by far the best documentation of any distro.

It really is the best wiki format and has a lot of valueable content. I wish more projects mimicked the approach. When I'm using Debian's wiki it feels like I have to think too much.

Re:BSD vs. Linux by xiii1408 on Friday November 30, 2018 @08:19PM (#18574343)
Hahahahaha yes that's exactly what Manjaro is.

And, sure, it's not Debian or CentOS, so you don't have as much attention focused on the packages. Their record of keeping malware out is pretty solid, though, as far as we know.

I think a lot of security has to do with simplicity: if you don't understand how your software is configured, you're likely to open up a security hole on your system.

Arch's "don't start doing stuff until the user tells you" posture does a good job of making sure the user is aware of what's running on her system. Contrast this to Debian, which will often start running random services as soon as you install a package (e.g. Apache).

Re:BSD vs. Linux by pmoriarty on Friday November 30, 2018 @10:21PM (#18574886)
I'd tried Arch long ago, and was really disappointed to see the install instructions tell me to check the distro's blog for security updates.

Seemed really amateurish. Hopefully that's changed.

Also, it was really immature compared to Gentoo back then. Now it's had some time to mature, so I might give it another go sometime. But I'd really have to feel I'm getting a huge win over Gentoo to bother.

Re:BSD vs. Linux by annadane on Friday November 30, 2018 @07:12PM (#18574013)
You can try Void Linux
Re:BSD vs. Linux by adamtulinius on Friday November 30, 2018 @06:55PM (#18573913)
Take a look at NixOS. Everything is precompiled, but only until you start changing packages (configure flags and what not).
Re:BSD vs. Linux by snuze on Friday November 30, 2018 @07:04PM (#18573973)
You don’t trust binary blobs? But do you read through all the source you compile? If not, there is little difference.
Re:BSD vs. Linux by newnewpdro on Friday November 30, 2018 @07:36PM (#18574134)
This is akin to arguing living in a room with an unlocked door is no different than living in a locked jail cell if you happen to never try to leave.
Re:BSD vs. Linux by snuze on Saturday December 01, 2018 @08:06PM (#18580107)
If the jail cell is as comfortable as the unlocked room, there is absolutely no difference—until you try to leave. Any sane distribution should come with built binary blobs—and an option to rebuild them at will. But forcing you to build everything from scratch is pedantically impractical. But what do I know, I only do this on regular basis at work!
Re:BSD vs. Linux by newnewpdro on Sunday December 02, 2018 @03:28PM (#18584373)
Binary blobs are not the same as binary packages having source readily available. I see that pmoriarty appears to be misusing the term, I was responding to your comment without having closely read his.