Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Misogynist posted:

It is the worst when cookbook authors do this, and this is the worst thing about the Chef community.

How come?

Adbot
ADBOT LOVES YOU

Riso
Oct 11, 2008

by merry exmarx
Cookbooks are supposed to only do one thing, and that very well. The bigger the cookbooks are, they are not only more difficult to test but also to maintain.

It is much better to create one cookbook to compile, a second to install, and a third to config.
If you change one part of the process in a single cookbook you have to rewrite the whole thing and test it again, instead of just the changed part.

Ashex
Jun 25, 2007

These pipes are cleeeean!!!

fletcher posted:

What's a good way to perform those checks?

Technically, if disk is partitioned it will show up under /dev/sd# so you can do a basic check for that. If you want to be precise, use parted. parted -lm will list all partitions for all disks in machine readable format. You can also feed parted a script which may be useful for you.

ToxicFrog
Apr 26, 2008


What're the current best printer and scanner manufacturers to look at for Linux support? Historically I've used HP (good, but I've never used their scanners), Epson (software was fine, hardware was flaky), and canon (total garbage in every respect).

I've heard good things about brother, but mostly in the context of windows corporate networks; no idea if they're any good for Linux home use.

Ideally I'd like something that connects to the wireless and just works - no setting up my own print server or manually installing drivers on every machine in the house. I think HP is still generally considered the best bet for this, but I wanted to check first.

SamDabbers
May 26, 2003



I'm not sure what you need in a scanner, and I have a Brother MFC that works decently as a network scanner. Brother's Linux drivers are pretty good in just about every respect, actually.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

fletcher posted:

How come?
If you're one of those shops that uses Chef to seed AMIs from Packer and then deploys to auto-scaling groups, that's awesome, because you do it one time. For everybody else, why not a binary? Why spend all this time rebuilding poo poo from source on every single server every time you want to upgrade a piece of software?

It drives me insane because I feel like Chef cookbook authors don't trust their own users to have the technical competency to set up a package repo. (And in fairness, Debian-derived distros do make this process really loving annoying compared to RPM distros.)

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Misogynist posted:

If you're one of those shops that uses Chef to seed AMIs from Packer and then deploys to auto-scaling groups, that's awesome, because you do it one time. For everybody else, why not a binary? Why spend all this time rebuilding poo poo from source on every single server every time you want to upgrade a piece of software?

It drives me insane because I feel like Chef cookbook authors don't trust their own users to have the technical competency to set up a package repo. (And in fairness, Debian-derived distros do make this process really loving annoying compared to RPM distros.)

That does make a lot of sense. I haven't tried building my own packages before, so I'll give that a shot now (checkinstall? fpm?). I'd definitely like to have an apt mirror for internal use down the road, I don't think I'll have a chance to get to that for a little while though. Throwing a .deb on s3 should be easy enough for now.

fletcher fucked around with this message at 20:47 on Jan 30, 2014

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
So, speaking of Chef.

We're currently using Foreman with Puppet to build new hosts. Most of our clients are desktop machines, because we're a research University. Is there a good way to do this kind of thing with Chef? I don't really know a lot about either, but the University as a whole as a Chef Enterprise license, so I'm thinking we should try and migrate to Chef. We're also not very deep in Puppet (not sure if we actually manage anything with Puppet yet), so if we're going to switch, now is a much better time than later.

Riso
Oct 11, 2008

by merry exmarx
A quick google told me Foreman works with Chef...

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
My local bistro does not use a George Foreman Lean Mean Fat-Reducing Grilling Machine, sorry.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
With something like apt-cacher, can I also deploy my own packages to it? Or does it only let me cache packages that exist on the central repos?

CaptainSarcastic
Jul 6, 2013



ToxicFrog posted:

What're the current best printer and scanner manufacturers to look at for Linux support? Historically I've used HP (good, but I've never used their scanners), Epson (software was fine, hardware was flaky), and canon (total garbage in every respect).

I've heard good things about brother, but mostly in the context of windows corporate networks; no idea if they're any good for Linux home use.

Ideally I'd like something that connects to the wireless and just works - no setting up my own print server or manually installing drivers on every machine in the house. I think HP is still generally considered the best bet for this, but I wanted to check first.

I've got an HP all-in-one with built-in wireless that has been remarkably easy and non-painful to use regardless of platform. I've used both Epson and Canon printers just fine under Linux, too, although I had a fairly high-end Canon. For wireless, I think HP is still a good bet.

reading
Jul 27, 2013
When using GNU screen, I can split the window horizontally or vertically with "ctrl-a S" or "ctrl-a |" however even when I switch to the new region using "ctrl-a tab" I cannot enter anything or do anything with it. How can I use these regions? They don't seem to accept any input.

sinky
Feb 22, 2011



Slippery Tilde
You need to switch to the new region and do C-a c to create a new window it in.

Or use tmux because it's better :colbert:

RFC2324
Jun 7, 2012

http 418

If you are in a gui session, I'm very fond of terminator for split screen behaviour.

Xik
Mar 10, 2011

Dinosaur Gum
This is going to sound really dumb, but for the life of me I can't figure it out. How do I go about entering/escaping a unicode character in a sftp get command?

Say, a folder with both "resume" and "résumé". Tab completion is going to stop me at "r", but in this example I want "résumé". I'm on arch in a urxvt terminal ssh'd into a debian machine with byobu running. Within byobu I have a sftp session open to a different debian machine.

I thought I could just \é to escape it but the terminal won't accept that symbol.

Ashex
Jun 25, 2007

These pipes are cleeeean!!!
What's the easiest way to create a srpm from an rpm? I want to repackage the check_mk agent with a modified config file and stuff, I can grab the source from their repo but it seems a little excessive.

spankmeister
Jun 15, 2008






Ashex posted:

What's the easiest way to create a srpm from an rpm? I want to repackage the check_mk agent with a modified config file and stuff, I can grab the source from their repo but it seems a little excessive.

You usually do it the other way around, you get the source RPM, modify it, then you build a regular RPM.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Ashex posted:

What's the easiest way to create a srpm from an rpm? I want to repackage the check_mk agent with a modified config file and stuff, I can grab the source from their repo but it seems a little excessive.
Rather than making your packaging system responsible for owning all your configs, you probably want to look into something built for the task like Puppet or Chef.

evol262
Nov 30, 2010
#!/usr/bin/perl

Ashex posted:

What's the easiest way to create a srpm from an rpm? I want to repackage the check_mk agent with a modified config file and stuff, I can grab the source from their repo but it seems a little excessive.

Learn how to write rpm specfiles. Dump the rpm with rpm2cpio and rpm -qp --scripts $rpm. Write a specfile.

There is no easy way. RPM doesn't work that way. Use config management or create a $somepackage-config rpm which depends on it and does what you want. But use Puppet or Chef

Ashex
Jun 25, 2007

These pipes are cleeeean!!!

evol262 posted:

Learn how to write rpm specfiles. Dump the rpm with rpm2cpio and rpm -qp --scripts $rpm. Write a specfile.

There is no easy way. RPM doesn't work that way. Use config management or create a $somepackage-config rpm which depends on it and does what you want. But use Puppet or Chef


Yeah, I've worked with spec files a bit but I was having trouble finding the spec for this one. Finally dug it out of the projects git repo.

Misogynist posted:

Rather than making your packaging system responsible for owning all your configs, you probably want to look into something built for the task like Puppet or Chef.


I'm working on setting up Salt for this purpose, it's just not at the stage yet where I can start doing this. I'm tweaking the check_mk agent rpm to include a couple extra tools and pre-configured it to allow the server so an rpm works for this purpose in the immediate term.

evensevenone
May 12, 2001
Glass is a solid.

Xik posted:

This is going to sound really dumb, but for the life of me I can't figure it out. How do I go about entering/escaping a unicode character in a sftp get command?

Say, a folder with both "resume" and "résumé". Tab completion is going to stop me at "r", but in this example I want "résumé". I'm on arch in a urxvt terminal ssh'd into a debian machine with byobu running. Within byobu I have a sftp session open to a different debian machine.

I thought I could just \é to escape it but the terminal won't accept that symbol.

You could try "\u00e9" (bash 4.2+ or zsh) or "\xc3\xa9" (older).

evol262
Nov 30, 2010
#!/usr/bin/perl

Ashex posted:

Yeah, I've worked with spec files a bit but I was having trouble finding the spec for this one. Finally dug it out of the projects git repo.

I'm working on setting up Salt for this purpose, it's just not at the stage yet where I can start doing this. I'm tweaking the check_mk agent rpm to include a couple extra tools and pre-configured it to allow the server so an rpm works for this purpose in the immediate term.
Don't do this. The next person who comes in will have no idea that you're modifying specfiles for packages you don't control, and that upstream is different. Rewrite the specfile to give it a different name and obsolete the upstream RPM, or create a -config|-yourcompany|-whatever RPM which depends on it and does more configuration.

Ashex
Jun 25, 2007

These pipes are cleeeean!!!

evol262 posted:

Don't do this. The next person who comes in will have no idea that you're modifying specfiles for packages you don't control, and that upstream is different. Rewrite the specfile to give it a different name and obsolete the upstream RPM, or create a -config|-yourcompany|-whatever RPM which depends on it and does more configuration.

That's a good idea, I'll just add the official package name to conflicts in the specfile.

evol262
Nov 30, 2010
#!/usr/bin/perl

Ashex posted:

That's a good idea, I'll just add the official package name to conflicts in the specfile.

Obsoletes: basepackage

That way "yum -y install yourpackage" or "rpm -Uvh yourpackage" won't bitch about conflicts, and it'll say "hey, uninstall basepackage if it's present and install yourpackage" instead, which is a lot more intuitive (and less likely to cause problems with scripted/kickstarted/whatever installs if someone doesn't know about the conflict and puts basepackage on anyway).

Xik
Mar 10, 2011

Dinosaur Gum

evensevenone posted:

You could try "\u00e9" (bash 4.2+ or zsh) or "\xc3\xa9" (older).

Yeah, already tried that. sftp doesn't appear to interpret those escape strings. The frustrating thing is that in a local and ssh shell I can actually enter in the character directly, but not in sftp.

A further complication, and one I just noticed, is that the target server (which I'm not an admin of) has messed up locale settings. So even though ssh would normally be able to handle the character, it can't when connected to this server. In the end I just settled on juggling around the files into folders with names I could pull down in sftp.

The problem will probably pop up in the future and I would really like to know the "correct" way to handle it. How can I enter unicode characters into sftp assuming both servers in question have UTF8 locale settings? I tested between two machines that have correct settings, ssh can accept the characters but sftp can't. I feel like I'm missing something super obvious, how do admins that work primarily in languages other than English deal with this problem?

RFC2324
Jun 7, 2012

http 418

Xik posted:

Yeah, already tried that. sftp doesn't appear to interpret those escape strings. The frustrating thing is that in a local and ssh shell I can actually enter in the character directly, but not in sftp.

A further complication, and one I just noticed, is that the target server (which I'm not an admin of) has messed up locale settings. So even though ssh would normally be able to handle the character, it can't when connected to this server. In the end I just settled on juggling around the files into folders with names I could pull down in sftp.

The problem will probably pop up in the future and I would really like to know the "correct" way to handle it. How can I enter unicode characters into sftp assuming both servers in question have UTF8 locale settings? I tested between two machines that have correct settings, ssh can accept the characters but sftp can't. I feel like I'm missing something super obvious, how do admins that work primarily in languages other than English deal with this problem?

Why not use something other than sftp, like scp or rsync then?

Xik
Mar 10, 2011

Dinosaur Gum

RFC2324 posted:

Why not use something other than sftp, like scp or rsync then?

Changing tools solves the problem but doesn't answer the question. I could have solved the problem a bunch of ways, and in the past I always just moved them to folders that I could pull down in sftp, problem "solved". It would have taken less time to just do that then make my original post. The point is knowledge for the future.

If someone flat out said that sftp doesn't support unicode characters, that would be fine too, at least it would be an answer. From what I can tell though, later versions of sftp are suppose to support them.

BV
Oct 23, 2005

NO ITS FUNNY. FUCK YOU. TIA
I apologize in advance if this question has been asked a billion times. I've used Windows my entire life, and I'm looking to try out a Linux based OS for home use. I'm not scared of a learning curve, but I would definitely want a GUI. I'd prefer stability over user-friendliness, unless it's something like command line only. I've been thinking about Ubuntu, but I've also read that this sometimes has issues with stability. Does anyone have any suggestions for me?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Ubuntu and Fedora are both OK as first Linux OSes. Fedora is a bit more frustrating to set up with MP3 codecs, Flash, since they're "proprietary software", and Fedora doesn't like that sort of thing. Download a LiveCD of one, boot into it, and see how you like it.

Xik
Mar 10, 2011

Dinosaur Gum

BV posted:

I apologize in advance if this question has been asked a billion times. I've used Windows my entire life, and I'm looking to try out a Linux based OS for home use. I'm not scared of a learning curve, but I would definitely want a GUI. I'd prefer stability over user-friendliness, unless it's something like command line only. I've been thinking about Ubuntu, but I've also read that this sometimes has issues with stability. Does anyone have any suggestions for me?

Have you seen DistroWatch? The "top ranking" distros tend to always be the user friendly ones. Mint, Ubuntu, Fedora. Most of them tend to be as newbie friendly as each other, but have key differences like desktop environment, package manager etc. Normally you would just pick one that suits personal preference, but being new you probably don't know what you prefer yet.

Personally, if all other things being equal, I rank a distro based on it's documentation and access to a community that can help troubleshoot issues. Ubuntu probably fits that best I would say. It's also going to make sorting out device drivers for your hardware and other proprietary stuff like Adobe Flash nice and easy.

I guess it comes down to much would you prefer stability over user-friendliness? Whenever I want a "set and forget" stable distro it's always Debian. Perhaps you could try it and if you keep running into road blocks and it seems too difficult to setup, give Ubuntu a try. Ubuntu is based on Debian, so some of the knowledge (using the package manager for instance) you gain messing around with Ubuntu will help you in the future if you decide to switch to Debian.

pseudorandom name
May 6, 2007

Suspicious Dish posted:

Ubuntu and Fedora are both OK as first Linux OSes. Fedora is a bit more frustrating to set up with MP3 codecs, Flash, since they're "proprietary software", and Fedora doesn't like that sort of thing. Download a LiveCD of one, boot into it, and see how you like it.

Fedora is also inconvenient for GPU drivers.

evol262
Nov 30, 2010
#!/usr/bin/perl

pseudorandom name posted:

Fedora is also inconvenient for GPU drivers.
Rpmfusion isn't hard for nvidia and radeon(hd) is arguably better than fglrx for 99% of people.

Xik posted:

Changing tools solves the problem but doesn't answer the question. I could have solved the problem a bunch of ways, and in the past I always just moved them to folders that I could pull down in sftp, problem "solved". It would have taken less time to just do that then make my original post. The point is knowledge for the future.

If someone flat out said that sftp doesn't support unicode characters, that would be fine too, at least it would be an answer. From what I can tell though, later versions of sftp are suppose to support them.

This is tricky. Are they both utf8? Are you sure? Or is one EASCII? What client? If they're both utf8 or the same ASCII locale, it works. If sshd is running with iso-8859-1...

Xik
Mar 10, 2011

Dinosaur Gum

evol262 posted:

This is tricky. Are they both utf8? Are you sure? Or is one EASCII? What client? If they're both utf8 or the same ASCII locale, it works. If sshd is running with iso-8859-1...

This is the target machine (that I don't have admin access to):

code:
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
That's obviously an issue and it's not going to work there, but I'm testing it between two machines of mine that do have the locale set correctly to en_NZ.UTF-8.
  • I can ssh into them and input the literal symbol "é" into the shell with no issues.
  • sftp won't accept that symbol, there is no visible difference (no placeholder), it's as if I done nothing.
  • If there is no other similar file in the dir then sftp will autocomplete the filename with é in it and get it. (see image below)
sftp will autocomplete with the symbol fine, and has no issue transferring the file.


The problem arises when you are in a sitation like the following:

How would I get tést-file?

Using other tools is not an issue (I input that symbol directly into the shell):


When you say that it should work, do you mean you should be able to input the character directly or it should interpret the escaped sequence? Do you have an example of how "téstfile" should be correctly escaped, maybe I'm doing it wrong?

pseudorandom name
May 6, 2007

There are at least two different byte representations of é; it is possible you're typing in the wrong one.

JHVH-1
Jun 28, 2002
Does it work if you copy and paste the file name in the autocomplete list?

evol262
Nov 30, 2010
#!/usr/bin/perl

Xik posted:

This is the target machine (that I don't have admin access to):

code:
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
That's obviously an issue and it's not going to work there, but I'm testing it between two machines of mine that do have the locale set correctly to en_NZ.UTF-8.
  • I can ssh into them and input the literal symbol "é" into the shell with no issues.
  • sftp won't accept that symbol, there is no visible difference (no placeholder), it's as if I done nothing.
  • If there is no other similar file in the dir then sftp will autocomplete the filename with é in it and get it. (see image below)
sftp will autocomplete with the symbol fine, and has no issue transferring the file.


The problem arises when you are in a sitation like the following:

How would I get tést-file?

Using other tools is not an issue (I input that symbol directly into the shell):


When you say that it should work, do you mean you should be able to input the character directly or it should interpret the escaped sequence? Do you have an example of how "téstfile" should be correctly escaped, maybe I'm doing it wrong?

I read sources a bit and it's very likely that I was wrong about it "just working", but I'd suggest you file a bug with the maintainer of whatever distro you use...

sftp (from openssh) uses libedit rather than readline, and while libedit has UTF-8 support since 2011 or so, I have no idea how complete or usable it is, and there are some horrid sounding commits, where even tab-completing UTF-8 characters only made it into Fedora last year. It may not even be possible to type UTF-8 characters, since the client (look at interactive_loop()) looks somewhat naive. But ask your distro's maintainer.

Other clients should be fine, though...

Hollow Talk
Feb 2, 2014

BV posted:

I apologize in advance if this question has been asked a billion times. I've used Windows my entire life, and I'm looking to try out a Linux based OS for home use. I'm not scared of a learning curve, but I would definitely want a GUI. I'd prefer stability over user-friendliness, unless it's something like command line only. I've been thinking about Ubuntu, but I've also read that this sometimes has issues with stability. Does anyone have any suggestions for me?

Xik posted:

Have you seen DistroWatch? The "top ranking" distros tend to always be the user friendly ones. Mint, Ubuntu, Fedora. Most of them tend to be as newbie friendly as each other, but have key differences like desktop environment, package manager etc. Normally you would just pick one that suits personal preference, but being new you probably don't know what you prefer yet.

Personally, if all other things being equal, I rank a distro based on it's documentation and access to a community that can help troubleshoot issues. Ubuntu probably fits that best I would say. It's also going to make sorting out device drivers for your hardware and other proprietary stuff like Adobe Flash nice and easy.

I guess it comes down to much would you prefer stability over user-friendliness? Whenever I want a "set and forget" stable distro it's always Debian. Perhaps you could try it and if you keep running into road blocks and it seems too difficult to setup, give Ubuntu a try. Ubuntu is based on Debian, so some of the knowledge (using the package manager for instance) you gain messing around with Ubuntu will help you in the future if you decide to switch to Debian.

I always think openSUSE is worth having a look at. Unlike Ubuntu (and its derivatives) it uses pretty much all of the standard or soon-to-be-standard things (like systemd). More importantly, however, openSUSE treats KDE, Gnome, XFCE, LXDE and a number of other desktop environments as absolutely equal. They all ship properly, you can choose between them during installation, and from what I can tell, everything happily coexists. I think this is a nice opportunity for new users to explore the different environments and decide for themselves what they like best. I used to be a heavy KDE user (and didn't mind KDE 4.x, to be honest), but I've since switched, without ever changing anything fundamental. It also uses RPM and I find zypper to better than apt-get/aptitude, so that's a bonus!

You also get to choose between stable (standard), long-term (evergreen), semi-rolling release (tumbleweed) or rolling release aka development (factory → this is like fedora rawhide and will break every now and then), so there should be something for every taste.

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug

Hollow Talk posted:

I always think openSUSE is worth having a look at. Unlike Ubuntu (and its derivatives) it uses pretty much all of the standard or soon-to-be-standard things (like systemd).
A guy who is learning / using linux for the first time doesn't give a poo poo about systemd. There is zero reason to try openSUSE over the most popular distros like fedora or mint. They all use GNOME 3 and all have a KDE alternate, and fedora has about three times as many available packages and about 100x the install base to find/fix bugs and code in compatibility.

Adbot
ADBOT LOVES YOU

Hollow Talk
Feb 2, 2014

Bhodi posted:

A guy who is learning / using linux for the first time doesn't give a poo poo about systemd. There is zero reason to try openSUSE over the most popular distros like fedora or mint. They all use GNOME 3 and all have a KDE alternate, and fedora has about three times as many available packages and about 100x the install base to find/fix bugs and code in compatibility.

YaST is absolutely fantastic especially for new users, since it helps you with a lot of common things, from user/group setup and security, to firewall, common servers, NFS/Samba etc. If somebody wants to try Fedora or Mint then by all means, please do. But so far, my personal Fedora experiences and tries have been largely underwhelming. On top of that, One-Click-Install is nice for new users, and OBS has pretty much any package you can imagine, easily installed via repository, which gives you a valid update path.

It's a distribution that is often overlooked in more US-centric circles (because RH definitely has a bigger presence), but I do think it has some things going for it that are really rather nice, and that's why I bring it up.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply