Monday·09·March·2015
Do we need a zsh-static package in Debian? //at 11:17 //by abe
Dear Planet Debian,
the Debian Zsh Packaging Team (consisting of Michael Prokop, Frank Terbeck, Richard Hartmann and myself) wonders if there’s still a reason to build and ship a zsh-static package in Debian.
There are multiple reasons:
- None of us packagers really use it. (A weak reason, yes.)
- Low popcon: “installed” peak at ca. 150, decreasing; “vote” peak at ca. 40, decreasing as well.
The statically compiled Zsh has some annoying restrictions (#354631 et al) for over 9 years now, which only can be fixed if some other packages change:
To cite Clint Adams, long time Debian Zsh package maintainer:
the problem is that user/group lookups are disabled in the -static build because glibc’s NSS ABI is unstable and static binaries still need to load NSS modules dynamically.
One solution here would be to compile against dietlibc, but for that we’d need an ncurses library built against dietlibc (#471208), too.
So we ask you, the Planet Debian reader:
Do you need Debian’s zsh-static package?
If so, please send an e-mail to us Debian Zsh Maintainers <pkg-zsh-devel@lists.alioth.debian.org> and state that you use zsh-static, and, if you want, please also state why or how you’re using it.
Thanks in advance! Mika, Frank, RichiH and Axel
Tagged as: bug, dietlibc, glibc, packaging, Planet Debian, question, Stretch, zsh, zsh-static
// show without comments // write a comment
Related stories
Wednesday·07·December·2011
automounter vs procmail //at 00:10 //by abe
At work we use .procmailrc
files generated
by CGIpaf to let non-technical users create forwards,
out-of-office mails, etc. and any combination thereof. This also has
the advantage that we can filter out double bounces and spam (which
also prevents us from being listed in spammer blacklists).
Unfortunately autofs (seems independent if autofs4 or autofs5 is used) seems to be unreliable if there are bursts of mount or umount requests, resulting either in “File or directory not found” error message while trying to access the home directory of a user, or “Directory not empty” error messages if the automounter tries to remove the mount point after unmounting. In that case a not mounted directory owned by root is left over.
In the end both cases lead to procmail behaving as if that user does
not have a .procmailrc
– which looks like
sporadically lost mails to those who forward all mails. (The mails
then can be found in the local default INBOX for that user.)
Additionally there are similar issues when the NFS servers are not available.
The most effective countermeasure we found so far was adding tests to
the global /etc/procmailrc
to check if the
user’s home directory exists and belongs to the correct user:
# ----------------- # Global procmailrc # ----------------- # For debugging, turn off if everything works well VERBOSE=1 LOGFILE=/var/log/procmail.log # This only works with bourne shells, $SHELL defaults to the user's # login shell. And by experience dash seems not work, so we use bash. OLDSHELL=$SHELL SHELL=/bin/bash # temporary failure (see EX_TEMPFAIL in /usr/include/sysexits.h) if # $LOGNAME is not set for some reason. (Just to be sure our paths # later on are not senseless. :0 * ? test -z "$LOGNAME" { LOG="Expected variable LOGNAME not set. " EXITCODE=75 :0 /dev/null } # temporary failure (see EX_TEMPFAIL in /usr/include/sysexits.h) if # $HOME is not readable. ~$LOGNAME does not seem to work, so this uses # a hard wired /home/. :0 * ? test ! -r /home/$LOGNAME { LOG="Home of user $LOGNAME not readable: /home/$LOGNAME " EXITCODE=75 :0 /dev/null } # temporary failure (see EX_TEMPFAIL in /usr/include/sysexits.h) if # $HOME has wrong owner. ~$LOGNAME does not seem to work, so this uses # a hard wired /home/. :0 * ? test ! -O /home/$LOGNAME { LOG="Home of user $LOGNAME has wrong owner: /home/$LOGNAME " EXITCODE=75 :0 /dev/null } […]
If you want to store a copy of these mails for debugging purposes on
every delivery attempt, replace /dev/null
with some Maildir or mbox only accessible for root.
One small but important part was to explicitly declare bash as shell for executing the tests, otherwise mails for users with tcsh or zsh as login shell filled up the mail queue and never get delivered (if the SHELL variable never gets fixed).
Only drawback so far: This leads to more lagging e-mail on e-mail
bursts also for those users who have no .procmailrc
– because procmail can’t check if there’s really
no .procmailrc
.
Extensive procmail documentation can be found online at the Procmail
Documentation Project as well as in the man pages procmail(1),
procmailrc(5) and procmailex(5).
Tagged as: autofs, autofs4, autofs5, automounter, bash, CGIpaf, E-Mail, forward, ISG, out-of-office, Postfix, procmail, procmailrc, Sysadmin, tcsh, zsh
// show without comments // write a comment
Related stories
Wednesday·24·November·2010
Perfect Team: autossh and GNU Screen //at 01:06 //by abe
SSH is definitely one of my most often used tools, not only for system administration at work but also on the road with my netbook, an EeePC 701 running Debian Sid.
On the road, it often happens that I have a flaky WLAN or UMTS
connection, so I often have to kill (via <Enter>~.
)
and reconnect my SSH session due to a changed IP address or so.
First step against problems arising from using SSH over unreliable network connections is of course GNU Screen. Second step is use SSH keys and ssh-agent to not needing to type the password on every reconnect.
But it’s still very annoying to kill the SSH connection and call ssh again manually. For luck there is autossh, a wrapper around SSH which regularily checks via two tunnels connect to each other on the remote side if the connection is still alive, and if not, it kills the ssh and starts a new one with the same parameters (i.e. tunnels, port forwardings, commands to call, etc.).
It’s quite obvious that this is perfect to be combined with screen’s
-R
and -d
options (Reattach if a detached
screen is around, else start a new screen; detach a currently attached
screen), so I found myself very often typing (or fetching it from the
commandline history :-):
autossh -t sym.noone.org 'screen -Rd'
-t
is necessary to allocate a terminal device on the
remote machine which is not done by default if you directly call a
command via ssh
.
In comparision to OpenSSH, autossh needs the single quotes, because
otherwise it would parse -Rd
as options to parse to
ssh
and bail out. That’s not a real problem, but when
you’re used to just type ssh -t sym.noone.org screen -Rd
without any quotes, you’ll run into this then and when.
Update, 25-May-2010, 14:55: As Carsten Hey points
out, autossh
also supports the --
option to
declare that all following options and parameters must be passed to
ssh
itself. (End of Update)
Typing that often and mistyping it then and when cries for an shell alias or an shell function. So I came up with the following shell function:
asc() { autossh -x -a -t "$@" 'screen -RdU' }
I used a function instead of an alias in case of autossh
will in future regard all parameters given after the command as part
of the command as ssh
does.
The additional options -x
and -a
disable X
and SSH Agent forwarding which both don’t work if you reattach to an
already running screen
.
And if you’re using Zsh as I do, you can even add some more format string magic to set the window title more or less to the expanded alias, eh, function:
function asc() { # Set the title to something more obvious, e.g. the expanded # alias, eh, function print -Pn "\e]0;%n@%m: autossh -t $* 'screen -RdU'\a"; autossh -x -a -t "$@" 'screen -RdU' } compdef asc=ssh
Update, 25-May-2010, 14:59: As Hauke points out in a
comment, Zsh users should also declare that asc
should
have the same tab completion as ssh
itself. The example
above has been updated accordingly. (End of Update)
In the meantime on the EeePC I use asc
on the
commandline more often than ssh
itself. And I nearly no
more type autossh
. (The most common exception here is
autossh hostname tail -F /path/to/some/logfile
.)
Using that function you can also add common ssh
options
for tunneling, etc. — I use it most often like this:
asc -D 1080 sym.noone.org
This opens a SOCKS proxy on localhost, port 1080 and that way I can surf via the host I’m connecting to by SSH.
There’s one small drawback though: You didn’t expect that I can just
invent some new three letter command without a namespace clash, did
you? There is a free game called Advanced Strategic Command whose binary (and Debian package)
is named asc
, too. If you have that game installed, you
can always call it using its full path, e.g.
/usr/games/asc
on Debian.
P.S.: My whole grml based .zshrc is also
available via git at
git.noone.org as well as on github.
Tagged as: alias, asc, autossh, CLI, Debian, EeePC, function, GNU, grml, nuggets, OpenSSH, Proxy, roadwarrior, screen, shell, Sid, SOCKS, SSH, tip, tunneling, zsh, zshrc
// show without comments // write a comment
Related stories
Friday·15·October·2010
Thoughts on Gitorious and GitHub plus a useful git hook //at 11:36 //by abe
When I took over the developement of xen-tools, I looked around for an appropriate git hosting. I especially had a look at GitHub and Gitorious.
If you just regard the features, GitHub is definitely more targetted on single developers and Gitorious more towards projects:
At GitHub, every repository has its URL under the URL of a user page which makes it nearly impossible to have user independent, “official” repositories for projects which have more than one official developer.
At Gitorious, every hosted repository needs to belong to a project, even if it’s only a published configuration. But a project can have more than one git repository. You only seem to be able to have personal repositories if you clone some existing Gitorious repository.
So from a feature point of view, the xen-tools git repositories fit way better to Gitorious’ hosting while the git repositories with zshrc, conkerorrc and desktop configuration files defintely have a more fitting addresses on GitHub, in my case http://github.com/xtaran/$repository. On Gitorious, they are now together under a “project” called “Axel’s configuration files” at http://gitorious.org/abe which contains git repositories of my on grml’s .zshrc based .zshrc, my configuration for Conkeror and all the files necessary for my ratpoison/xmobar based netbook/laptop desktop.
I though feel a little bad for giving the project the very short “slug” name “abe” instead of “abe-config” (as I did initially) since “abe” is IMHO not a proper “project name” for my configuration files and possibly other projects would have a more reasonable claim for that project name on Gitorious. But that way it suites more its purpose: Gather some of my git repositories which don’t belong to a proper project.
But there’s another important point when comparing Gitorious and GitHub: Free Software needs free tools as Benjamin Mako Hill posted recently on Planet Debian. Despite my (probably well known) distrust against Google and therefore also Google Code, and despite knowing the history of SourceForge becoming non-free, I was not that much aware that GitHub’s software is only partially open source and therefore also not free software while Gitorious is both as it’s licensed under the GNU Affero General Public License (like StatusNet/identi.ca for example) which is basically GPLv3, but its ideas applied to hosted web applications scenario (where the GPL itself doesn’t grasp), too.
Initially I just had the xen-tools git repositories on Gitorious and all my small one-repository “projects” as copies of the repositories on my own git server on GitHub to get some more publicity for them and allow “social cloning”. After reading Mako’s article, I decided to at least have repository clones on Gitorious of all repositories I mirror at GitHub, too.
That way I force nobody to use the non-free tools on GitHub for
“social cloning” one of my git repositories. And of course I have
copies of my code somewhere on the net as backup. Or to say it with
Linus Torvalds’ (slightly updated) words: Only wimps use tape
backup: real men just upload their important stuff on git, and let the
rest of the world clone it.
;-)
But isn’t that tedious to always push your code to three repositories?
No, it isn’t. I just push my code to git.noone.org where I have configured the according remotes and
the following post-receive
hook:
#!/bin/sh read oldrev newrev refname git push gitorious ${refname:t} git push github ${refname:t}
The only other thing necessary is to use ssh-agent and SSH agent
forwarding to at least the host you’re pushing to.
Tagged as: .zshrc, abe, Agent Forwarding, AGPL, Conkeror, Free Software, git, GitHub, Gitorious, gitweb, Google, Google Code, GPL, grml, Hook, Hosting, identi.ca, Linus Torvalds, mako, non-free, Open Source, Planet Debian, Ratpoison, Real Man, Social Coding, Social Networking, SourceForge, SSH, ssh-agent, StatusNet, xen-tools, zsh
// show without comments // write a comment
Related stories
Tuesday·12·October·2010
Still happy with the ASUS EeePC 701 //at 16:02 //by abe
Recently Eric asked on the LUG Vorarlberg mailing list about netbook experience. I wrote a lengthy reply summarizing my experiences with the ASUS EeePC 701. And I thought this is something I probably should share with more people than only one LUG:
I ordered an ASUS EeePC 701 (4G) with US keyboard layout at digitec in Spring 2008, got it approximately one month later and posted a first resumé after one month in my blog.
I’m still very happy with the EeePC 701, despite two commonly mentioned drawbacks (the small screen resolution and the small SSD – which I both don’t see as real problems) and some other minor issues.
What matters
- Very robust and compact case. And thanks to a small fan being the only moving part inside, the EeePC 701 is also very robust against mobile use.
- Very pleasing always-in-my-daypack size (despite the 7" screen it’s the typical 9" netbook size) and easily held with one hand.
- Black. No glossy display. Neither clear varnish nor piano laquer. Short: No bath room tile. Textured surface, small scratches don’t stick out and don’t matter.
- Debian (previously Lenny, now Sid) runs fine on it, even the webcam works out-of-the-box.
- Despite all those neat features, it was fscking cheap at that time. And it was available without Windows.
Nice to have
- There’s power on the USB sockets even if the EeePC is turned off but the power supply is plugged in.
- The speakers are impressingly good and loud for their size. (But my demands with regards to audio are probably not too high, so audiophiles shouldn’t run to ebay because of this. ;-)
- It has three external USB sockets.
What doesn’t matter
- The small 7" 800×480 screen: I like small fonts and do most things inside a terminal anyway. And even with 800×480, those terminals are still much bigger than 80×25 characters. Only some applications and webpages have no heart for small screens.
- The small disk size: Quite a lot of programs fit on 4 GB of disk space. Additionally I use tmpfs a lot. And music and video files are either on a external 500 GB Western Digital 2.5" “My Passport” disk (which I need quite seldomly) or much more come via sshfs and IPv6 from my home server anyway. :-)
- The small keyboard: I just don’t have any problems with the size or layout (right shift right of the cursor up key, etc.) of the keyboard. Well, maybe except that any standard sized keyboard feels extremely large after having used the EeePC exclusively for some weeks. ;-)
- The to 630 MHz underclocked 900 MHz Intel Celeron: It’s enough for most of the things I do with the EeePC. Also the original 512 MB RAM are somehow ok, but for using tmpfs, but no swap space at all, 1 GB or 2 GB are surely the better choice.
- A battery runtime of 2.5h to 3h is fine for me.
What’s not so nice
- The “n” key needs to be pressed slighty stronger than other keys, otherwise no “n” appears. So if one of my texts in average misses more “n” than other letters, I typed it on the EeePC. ;-)
- Home, End, Page-Up, and Page-Down need the Fn key. This means that these keys can only be used with two hands (or one very big hand and I have quite small hands). This is usually no problem and you get used to it. It’s just annoying if you hold the EeePC with one hand and try to type with the other.
- What looks like a single mouse button is a seesaw and therefore
two mouse buttons below one button. This makes it quite hard to press
both at the same time, e.g. for emulating a middle mouse button press.
It usually works in about half of all cases I tried it. My solution
was to bind some key combination to emulate a middle mouse button in
my window manager, ratpoison:
bind y ratclick 2
And that mouse button bar already fell off two times. - The battery reports only in 10% steps, and reporting in percentage instead of mAh is an ACPI standard violation because reporting in percentage is only allowed for non-rechargable batteries. It also doesn’t report any charging and discharging rates. But in the meanwhile nearly all battery meter can cope with these hardware bugs. This was quite a problem in the early days.
- Now, after approximately 1.5 years, the battery slowly fritzes: When charging there are often only seconds between 10% and 40%. Rigorously using up all power of the battery helped a little bit. Looks like some kind of memory effect althought the battery is labeled Li-Ion and not Ni-MH and Li-Ion batteries are said to have no memory effect.
- The SD card reader only works fine if you once completed the setup of the original firmware or set the corresponding BIOS switch appropriately. No idea why.
Similar models
Technically, most of this also counts for the EeePC 900SD (not 901) which only differs in screen, resolution and disk size as well as CPU, but not on the the case. So same size, same robustness, same battery, same mainboard, bigger screen, resolution, disk and faster CPU. (The 901 has a different CPU, a different battery, and a different, glossy and partially chromed case.) See Wikipedia for the technical specifications of all EeePC models.
ASUS’ only big FAILure
Stopping to sell most EeePCs with Linux and cowardly teaming up with Microsoft after having shown big courage to come out with a Linux only netbook. Well, you probably already know, but it’s better without Windows…
So basically you no more get these really neat netbooks from ASUS anymore and you get nearly no netbooks with Linux from ASUS in the stores anymore. It’s a shame.
Would I buy it again?
Sure.
Well, maybe I would also buy the 900SD, 900AX (replacing the harddisk with an SSD) or 702 (8G) instead of the 701, but basically they’re very similar. See Wikipedia for the differences between these EeePC models. And of course I still prefer the versions without Windows.
But despite the low price, the EeePC 701 is surprisingly robust and
still works as on the first day (ok, except battery, the mouse button
bar and the “n” key ;-), so I recently bought a second power supply
(only white ones were available *grrrr*
)
and ordered a bigger third party battery plus an adapter to load the
battery directly from the (second) power supply without EeePC
inbetween.
What desktop do I use on the EeePC?
None.
I use ratpoison as window manager, uxterm, urxvt, and yeahconsole as terminal emulators (running zsh with grml based .zshrc even as root’s login shell :-), wicd-curses as network manager and xmobar (previously dzen2) with i3status as text-only panel. Installed editors are GNU Emacs 23, GNU Zile and nvi. (No vim. :-)
And of course a netbook wouldn’t be a netbook if it wouldn’t have a
lot of network applications installed. For me the most important ones
are: ssh, scp, autossh, sshfs, miredo, conkeror, git,
hg, and rsync.
Tagged as: 701, 900A, 900SD 900AX, 901, ASUS, autossh, Badezimmerkachel, black, Conkeror, curses, Debian, EeePC, Emacs, FAIL, git, grml, Hardware, hg, i3status, IPv6, Lenny, Linux, miredo, nemo, Netbook, nvi, ratpoison, review, rsync, Sid, SSH, sshfs, teredo, tmpfs, urxvt, uxterm, wicd, Windows, xmobar, yeahconsole, zile, zsh
// show without comments // write a comment
Related stories
Tuesday·08·May·2007
Goodbye Woody, Welcome Etch //at 10:54 //by abe
It finally happened. I installed Debian Etch on my last Woody box, a 400 MHz Pentium II with 576 MB RAM named gsa which is my home desktop since I bought it at LinuxTag 2003 in Karlsruhe.
And no I didn’t do a dist-upgrade, neither direct no via Sarge. As already planned I removed some no more necessary operating systems from that box and installed Etch on the freed disk space. Woody is still installed on that box in parallel and was recognized perfectly by Etch’s installer.
I took a few hours but also was big fun to go through Etch package list and to decide what to install. Overall the installation of 5 GB of software took about half a day.
In general everything went fine, the only thing I’m yet missing is sound. Etch didn’t seem to recognize my soundcard at all although it’s a well-known brand and defacto standard for many other soundcards: a Creative Labs Soundblaster. Well, the 16-Bit ISA version, needing the full length of the slot. Worked fine under Woody. Well, I hope I’ll get it working again manually.
What on the other hand is really nice with udev hell —eh— hal and all those new automatic bells and whistles: The desktop (well, at least GNOME Nautilus as well as XFCE, but probably also KDE) recognises when I insert a 3.5” floppy into the drive and shows me a nice floppy icon on the desktop. You think, that’s impossible? Floppy drives don’t inform the rest of the system when a floppy has been inserted without you polling the drive every few seconds? Well, USB floppy drives can. And they do. :-)
I still need time to migrate all the old settings from Woody to Etch. I’ll probably stick with FVWM, but perhaps will use the GNOME enabled version. What’s already done is the migration from tcsh to zsh. On all new or dist-upgraded systems after Etch I’ve chosen zsh so with my last Woody installation retiring I’ve also fully migrated to zsh.
So I’ve got now most of my active private boxes running Etch. Only the noone.org web and mail server “sym” (an amd64 box) as well as my 133 MHz ThinkPad “bijou” are still running Sarge, both with 2.6 kernels.
So with switching to Etch on gsa, I also got no more Debian box
running a 2.4 kernel. The only 2.4 kernel I run is on my FreeWRT WLAN
router named pluriel, which runs 2.4.33.3. But I expect that 2.6.18
will be as stable and long lasting as the famous and rock-solid 2.4.18
from Woody. 18 seems to be Debian’s favourite kernel minor version
recently. ;-)
Tagged as: 2.4.18, 2.4.33.3, 2.6.18, bijou, CT3990, Debian, Debian Installer, Etch, Floppy, FreeWRT, FVWM, gsa, ISA, LinuxTag, Pentium II, pluriel, Sarge, Soundblaster, sym, tcsh, USB, Woody, zsh
// show without comments // write a comment
Related stories
Thursday·02·March·2006
Shell Efficiency Talk at DaLUG today //at 02:29 //by abe
I just uploaded the slides for my shell efficiency talk at the Darmstadt Linux User Group (DaLUG) today at 18:30 CEST at the Technical University of Darmstadt. (The talk will be held in German.)
I will also hold a workshop about the same subject on the 29th of
October 2005 at Linux-Info-Tag Dresden. (Will also be held in German.)
Tagged as: ash, bash, DaLUG, Darmstadt, ksh, Linux, Lynx, Shell, Talk, tcsh, Text Mode, zsh
// show without comments // write a comment