A quick conversion from cvs to git

notes:

  • I store all files related to services under /srv, or provide symbolic links.
  • Personal files are stored in a CVSROOT of :ext:Terry@vectra:/srv/cvs/ and are filed under module ‘Terry’, for lack of a better name lol.
  • server is vectra, workstation is dixie; communication done via the Secure SHell protocol.
  • I don’t use graphical software for these kind of tasks. GUIs are available, but I don’t want them wasting my time
  • The contents of my personal CVS module will be stored in it’s own spot as ‘cvs-head’ for backup purposes: I have no plans of committing to CVS or merging stuff back into it.
  • Access git is more or less just me and occasionally root@hostname, but may be expanded later
OpenBSD server:
# su - root
...
# pkg_add git cvsps
...
# groupadd -g 2005 git
# cd /srv/
# mkdir git
# chmod 7755 git
if you want to lock down the CVS, go to the CVSROOT
and revoke write access on your modules files
e.g. chmod -R ugo-w fooproject
# cd git
# git cvsimport -ikv -d /srv/cvs -C cvs-head Terry
...
# mkdir Terry
# chmod 0750 Terry; chown Terry:git Terry
# su - Terry
$ cd /srv/git/Terry
$ git init
...
FreeBSD workstation:

$ su - root
# pkg_add -r git
# pw groupadd -n git -g 2005 -M Terry
# exit
$ git clone vectra:/srv/git/cvs-head /tmp/Terry
$ cd /tmp/Terry; mv * .* ~/
$ cd ~
$ git remote add origin vectra:/srv/git/Terry
$ git push origin master
...

In a little while, I’ll probably refine things. Originally, I used the old mv file.ext file.c-vN.M and (cd ..; tar cf – project | gzip -c > /tmp/project-N.M.tar && mv /tmp/project-N-M.tar ./project/backups/) style approaches to my stuffs. The first time I went into using a source code management / version control system for a project, I selected Subversion (also known as svn) and enjoyed it quite a lot. Later on, when I decided to start checking in my configuration files, well… I like to keep my OpenBSD box pretty lean & mean; thus I used what came in the base, which was cvs (concurrent versions system). Subversion and CVS are so much alike, that I could live with CVS very easily (after all, it’s just my config files and an occasional project). I prefer svn to cvs, but hey, I’m a cheap bastard!

I’ve been thinking over the merits of Subversion, Bazaar (bzr), and git for various projects. I generally ruled out Monotone on inputs from another programmer, and having a general lack of interest in it myself. I also considered Mercurial (also known as hg), but I’m more familiar with git then hg. One of my friends uses hg for submitting patches to Mozilla and what not, and there is a project I’m involved with that I feel would benefit from using bzr; but either of those would mean a dependency on Python. Despite my levels of fluency in Python, my file server doesn’t have need of a scripting language like Ruby or Python; because OpenBSD provides Perl, SED, and AWK. So for me, git is a smaller package and it is just as easy to choose to pickup git as it is bzr. My workstation will always have Python, but that’s because I write python code lol.

Several of my various micro-projects use git on my work station, because there is no real need to stick them in the CVS server – and I don’t like CVS or rcs enough to employ them for the task lol. I’ve also considered replacing cvs with git on my laptop, and using it to fire off final commits to the CVS server, but eh… fuck CVS.

Tired of shitty software

Ok, now this really pisses me off….

Firefox3 — CPU user time usage jumps up the chart just when scrolling a freaking page, often reaching 97% !!! I really didn’t like the change over from Firefox 1.5.x to Firefox 2.x but this is ludacris man… (and yes, I almost _never_ restart my web browser, I shouldn’t have to, especially when it’s as big, fat, and ugly as all Mozilla products!)

cvs — created a shell function that given a short message, auto-generates the kind of CVS log messages I want in my personal repository; then runs cvs commit -F tempfile. Causes CVS to shout about aborting because you can not specify both a message (as in -m msg) and logfile (as in -F tempfile) at the same time. Yet!!! I checked cvs log, and guess what? The son of a bitch committed it [each time] anyway.

I thought Microsoft’s ‘ERROR_SUCCESS‘ error code was funny, but that one is just stupid :/

And I am not even going to dig into things like UE2, XFire, Pidgin, various APIs and mobile devices ^_^. There are just some things in the computing world… that really piss me off; is it to much to ask for some decent software….? Interestingly, almost all of the software that I use, which doesn’t piss me off regularly — is predominantly portable UNIX software. *sigh*

Hmm, so far it seems to be a bit of a delemia. links-hacked can’t handle posting to LJ; links lacks many small features. ELinks has them all, except the GUI mode, because it’s forked from a really old version of Links lool

Today was really, the only chance I had to sleep… but like normal, I didn’t
get any rest this morning. Work on the otherhand, went fairly smooth. Came home
and got to record most of my thoughts (and designing a window manager) before
chow time. Later, I just crashed for a nap and woke up a few hours later.

Since then, I’ve been been experimenting with links / links-hacked / elinks
some more. Really, elinks is almost exactly what I want… except for the lack
of GUI support. links-hacked, hmm I’m not so sure about right now; I just don’t
see it’s “hacks” as a big enough improvement over links proper. The minimal
adjustments I would need to make to links 2.2, is working with it’s cookies,
user agent spoofing (well, not neccessary, but desired), and add a few hooks
here and there (text entries, key to open new window, etc). In links-hacked,
I’m not sure yet. links-hacked seems to have much more primitive text area
handling, and much like how links lacks a key to open a new window
(links-hacked also lacks it!), there is apparently no key to just open a new
blank tab. Like, what kind of idiot makes a keyboard command to close a tab,
but doesn’t make one for opening one? (at least, if there is, it sure ain’t
documented, and the ‘t’ command from elinks doesn’t work in links-hacked). I
suppose, I could always find a way to stick that in…

EDIT: done, it now opens new tab, hehe.

Now that was kind of cool, I’m wondering what open_in_new_tab()s second
parameter does, and why it always seems to get passed NULL as the 2nd
parameter. Sure enough, I checked the function defition again — and it doens’t
use it for jack, hahaha.

Tried out links-hacked, nice browser but I think I like links 2.2 better.

I downloaded links-hacked, had to make a few trivial changes to the source, and punch it into the face to make it obey –disable-backtrace as intended. Startup time was a bit slower then links, but stil a quick mover. Keybinds seem to be a bit more minimalist, text fields improved visually and tabbed support is present. I couldn’t get lua support to configure though, which is a shame because I really wanted to try it out.

Overall though, I think links 2.2 is a better browser. If no unexpected “gotchas” pop up, links may soon become my default browser on Dixie. +/- a few custom modifications, hehe 😉

It also gave me an idea, I could use links bookmark manger easy enough to simulate the GOTO URL behavior I want, and always munge together a converter between my bookmarks tool and the netscape format; or just get around to writing the appropirate backend, lol. Hmm, this is interesting xD

Now if I could just get this S.O.B. to allow me to customize keybindings without hitting the sources, and some cookie handling – and it would be perfecto.

Ahh, I’m really feeling much better now. Got up and had a bowl of cereal, good to be back to a healthy snack, even if I’m still up at night lol.

Been using links a lot for web browsing latly. During the big upgrades, heavy browsers like Opera 9 and Firefox3 were a bit to bulky with how much resources the portupgrade program throws ontop of the upgrade script (compared to using FreeBSDs built in tools); I also fouled up glib/gtk at one point, so links came in handy. It renders pages fairly well (but without CSS) and even can do images inline (could use better positioning, but hey it’s a simple browser lol). It also has the virtue of low dependencies: C library, standard libraries for compression & encryption, the standard image libraries (libtiff, libjpeg, libpng), and a small subset of X11 libraries.

The worst thing I can say about links, is it lacks tabbed browsing; other wise I think I would use it everywhere I can lol. It’s rending of webpages could be better but the primary problem it has is CSS support, while Lynx renders webpages as if there was no CSS, and as if it was made for all presentation and layout moved into a stylesheet. That’s the worst thing about Lynx ^_^.

If I could get the experimental JavaScript enabled to see how stable it is, combined with the fact that Links renders web pages very well for such a browser (damn good actually). All I would have to do is patch in a few hooks to allow the stuff I want, wherever links doesn’t provide it. (Easy enough, I know C but don’t know my way around the code base).

What I really should do, is check out Links Hacked, which adds tabbed browsing (yay!) and scripting in Lua. I don’t know Lua, but I could learn it swiftly with good cause. Hmm…. xD

The poor phpBB folk

Maintenance

We are sorry to report that we have been attacked through a 0-day-exploit in our PHPList installation (responsible for the mailing list about new releases). phpBB.com will remain unavailable while we work to recover. No vulnerabilities have been found in the phpBB software itself.

You can download phpBB here: http://www.ohloh.net/p/phpbb

You can get support at the temporary support forums or on IRC:
chat.freenode.net #phpbb

A more detailed explanation about the incident.

Press Contact: If you need to get in contact with the management, please email phpbb_press (at) marshalrusty (dot) com.

– the phpBB team

Somehow, this makes me glad that I don’t have to use PHPList… hehe.

Days thoughts, thus far

Managed to get to bed early last night, was only up to around 0330R haha. Dreams were a mixture, of pleasant and unpleasant; the former parts still being on my mind. I also woke up to some good news: an unexpected day off work! Which is good, because tomorrow will likely be a living hell…. as usual.

I’m tired, and it’s only 1736R. Really, I think the dog is the smart one lol, Willows been sleeping all day >_<. Last night, I posted on Daemon Forums asking for suggestions on a lightweight web browser to replace Firefox3. I've used Firefox for a really, really, really long time; but 1.5.x was the best hehe. I found Fx2 disappointing in terms of usability, and Fx3 has been totally useless for me on Windows, and a major pain in the ass under FreeBSD. I also went through Links 2.2, and tested it thoroughly; I could live without CSS support, if only it supported tabbed browsing in the GUI. Links is really a very nice browser on the user side, it also boats great speed and highly legible display. Today, I did some heavy testing on the FreeBSD and Linux builds of Opera 9.63. For a long time, I used Opera, first in the 8.5x and later into the early 9.x before switching defaults. Dillo2, Arora, and Midori are next on my hit list; but it would be awesome to adapt Opera as my standard browser again. I'm a person that very much likes to use his own personal environment, rather then someone else’s can of spam.

I also enjoy software that are both portable, easy to manage, and don’t make you unlearn things just for changing Operating Systems. One of my big beefs with Firefox for example, Unix edit->preferences Vs Windows tools->preferences. It adapts to what the user would expect, which is honourable for such a program I guess, but pisses me off ^_^.

Opera is one of the better proprietary products I’ve encountered, and one of my favorite web browsers. Unlike Internet Explorer and Mozilla Firefox, there is no need to extend it in order to get the most bang for ya buck either 😉

0x5065726c20726f636b7321

Hooah, I’ve nearly completed my little organizational pattern hehe.

~/stuff                            -> dumping ground for work load management
-------/bin -> binaries to help out (links to ~/sh)
------------/cgrep -> comma grepper for contacts file
------------/reminded -> reminder notifications daemon
-------/bookmarks -> links to pages I need to read
-------/contacts -> CSV file with why,method,id of people I need to contact
-------/delegates -> list of things I pawned off on other people (and need to follow up with)
-------/open-loops -> list of things I need to do; if it is here, it is a commitment
-------/reminders -> directory full of reminders
-----------------/YYYY-MM-DDTHH:MM -> send me this files contents on YYYY-MM-DD at HH:MM UTC
-------/hope-chest -> things I wish I had time for; deal with in future
-------/school -> reserved for future need
-------/projects -> tmp files for various projects.

On Sunday (2008-12-07), I started writing cgrep in Perl, and setting up the contacts & open-loops files. Finished the final touches yesterday, and finished reminded today (Aside from tweaks needed for WinXP; adjust $ENV vars). Not to bad, considering how little coding time I’ve had lately :

Terry@dixie$ ~/stuff/bin/cgrep -h   
/usr/home/Terry/stuff/bin/cgrep -- Grep for the contacts CSV file

Usage:
cgrep [IWhimvw] [-f file | --file file] regex [file ...]

Options:
-I, --id grep the 'id' column
-W, --why grep the "why" column
-V, --verbose display line for AWK
-h, --help print usage help info
-i, --ignore-case ignore case distinctions
-m, --method grep the "method" column
--man read manual page
-v, --invert-match select non-matching items
-w, --who grep the "who" column

Terry@dixie$ ~/stuff/bin/reminded -h
/usr/home/Terry/stuff/bin/reminded -- reminder notifications daemon

Usage:
reminded [-t seconds] [-n|-m addr] [-p program] [-d directory]

Options:
-D, --debug Debugging output
-d, --directory Directory to search
-m, --mail=address Remind by Mail to address
-h, --help print usage help info
-n, --notify Remind by notification popup
--man read manual page
-p, --program=string Execute string as the notifier
-t, --timer=secs Sleep secs between checks

Terry@dixie$

I’ll probably modify ~/init.sh to launch reminded during my sessions; maybe rsync files to Vectra, and run it in mailing mode.

Things in ~/stuff/open-loops are more or less sorted into a queue of tasks; which are to be done in mostly the order listed. Once they are done, they get deleted; and generate or nuke other entries IAW the resulting outcome. So far, it’s actually worked well enough; cgrep, reminded, and the structural are all done ahead of schedule. Now if I could just do something about controlling the amount of time available to work on crap!!! I once tried Personal Information Manager (PIM) software, but usually found the surveyed apps to lack the level of flexibility I need. And to hack it in, would take more time then using a few megs in sticky notes. ssh’ing to Vectra and mucking with a todo file ain’t so hot either, so here we go 🙂 It’s simple, it’s effective (as anything else), and no need to screw around with a big, overwait, memory hogging, overly mouse riddled program, just to manage things -> I can use my shell xD.

It’s amazing, how often I can throw perl at a problem, and see it work lol.

Then again, I can usually read my Perl scripts in six++ months… can’t always say the same for other peoples golf game.

TexLive 2008 on FreeBSD

First download the ISO image, and compare the checksums (both md and sha based on avail); alternatively, buy the sucker on DVD :-).

Since I can’t afford a yearly DVD, and don’t have a spare disk; I need to unpack the ISO and mount it directly. If you bought the disk, mount it as normal. For me, this procedure required:

dixie# lzma d texlive2008-20080822.iso.lzma texlive2008-20080822.iso.lzma


LZMA 4.60 beta Copyright (c) 1999-2008 Igor Pavlov 2008-08-19

dixie# mdconfig -a -v -t vnode -u 10 -f texlive2008-20080822.iso


dixie# mount -t cd9660 /dev/md10 /mnt


dixie# ls /mnt


.mkisofsrc index.html source

LICENSE.CTAN install-tl support

LICENSE.TL install-tl.bat texmf

README install-tl.bat.manifest texmf-dist

README.usergroups readme-html.dir texmf-doc

autorun.inf readme-txt.dir tl-portable

bin release-texlive.txt tl-portable.bat

doc.html rr_moved tlpkg

Now that the ISO is ready op, we can start the installation. TexLive uses a nice Perl based installer, if you’ve got the necessary TK GUI modules for Perl installed, you can use a a -gui switch; me, I’m fine with the perl script.

Obviously, you will need lang/perl5 installed, along with the necessary dependencies for programs shipped in TeXLive. I don’t know what release of FreeBSD i386, the binaries in TexLive 2007 were compiled against, but 2008 used FreeBSD 7:

Terry@dixie$ file /usr/local/texlive/2007/bin/i386-freebsd/pdftex          0:11
/usr/local/texlive/2007/bin/i386-freebsd/pdftex: ELF 32-bit LSB executable, Intel 80386,
version 1 (FreeBSD), dynamically linked (uses shared libs), stripped
Terry@dixie$ file /usr/local/texlive/2008/bin/i386-freebsd/pdftex 0:13
/usr/local/texlive/2008/bin/i386-freebsd/pdftex: ELF 32-bit LSB executable, Intel 80386,
version 1 (FreeBSD), for FreeBSD 7.0 (700055), dynamically linked (uses shared libs),
FreeBSD-style, stripped
Terry@dixie$ 0:13

Several of the programs used in TexLive are sh/cmd wrappers, but once installed, you can get a general idea of dependencies with the following command:

Terry@dixie$ ldd /usr/local/texlive/2008/bin/i386-freebsd/* 2>- | pgr      0:17

N.B. 2>- means to close the standard error stream, what you need to type, may vary depending on shell; 2>- works on Bourne style shells (ash/dash, bash, ksh, zsh). In the case of shell script wrappers, you’ll need to open them, and manually parse to find anything hidden; most people don’t need to do this.

For the most part, the depends are on the systems C and C++ libraries (libc, libm, libstdc++), a few require other things, such as ncurses, zlib, the new libthr, and gcc related stuff – all this comes with FreeBSD 7. Some programs require X-related libraries (such as MetaFont), fontconfig, and freetype. If you have a working install of X.Org 7.3, you will probably be fine, while disk space holds out lol. The need for handling #!/bin/sh and ‘#!/usr/bin/env perl’ are of course a prerequisite. On my X based system, everything is ready. Checking all this out, shouldn’t be necessary, and any “missing” perl modules or libraries can be installed later: when required.

Anyway, let’s get to actually installing this sucker:

dixie# cd /mnt; ./install-tl


Platform: i386-freebsd => 'Intel x86 with FreeBSD'

Distribution: live (uncompressed)

Directory for temporary files: '/tmp'

Installer directory: '.'

Loading /mnt/tlpkg/texlive.tlpdb

======================> TeX Live installation procedure <=====================



=======> Note: Letters/digits in indicate menu items <=======

=======> for commands or configurable options <=======



Detected platform: Intel x86 with FreeBSD



<B> binary systems: 1 out of 15



<S> Installation scheme (scheme-full)

83 collections out of 84, disk space required: 1720 MB



Customizing installation scheme:

<C> standard collections

<L> language collections



<D> directories:

TEXDIR (the main TeX directory):

/usr/local/texlive/2008

TEXMFLOCAL (directory for site-wide local files):

/usr/local/texlive/texmf-local

TEXMFSYSVAR (directory for variable and automatically generated data):

/usr/local/texlive/2008/texmf-var

TEXMFSYSCONFIG (directory for local config):

/usr/local/texlive/2008/texmf-config

TEXMFHOME (directory for user-specific files):

~/texmf



<O> options:

[ ] use letter size instead of A4 by default

[X] create all format files

[X] install macro/font doc tree

[X] install macro/font source tree

[ ] create symlinks in standard directories



<V> set up for running from DVD



Other actions:

<I> start installation to hard disk

<H> help

<Q> quit



Enter command: i


Installing: [name of package]
.... repeated for each one, have fun waiting on z
running post install action for bin-texdoc

running post install action for bin-texlive

running post install action for texlive-cz

running post install action for texlive-de

running post install action for texlive-en

running post install action for texlive-fr

running post install action for texlive-pl

running post install action for texlive-ru

running post install action for texlive-zh-cn

running post install action for texlive.infra

running post install action for xetex

running mktexlsr /usr/local/texlive/2008/texmf-dist /usr/local/texlive/2008/texmf

mktexlsr: Updating /usr/local/texlive/2008/texmf-dist/ls-R...

mktexlsr: Updating /usr/local/texlive/2008/texmf/ls-R...

mktexlsr: Done.

writing fmtutil.cnf data to /usr/local/texlive/2008/texmf-var/web2c/fmtutil.cnf

writing updmap.cfg to /usr/local/texlive/2008/texmf-var/web2c/updmap.cfg

writing language.dat data to /usr/local/texlive/2008/texmf-var/tex/generic/config/language.dat

writing language.def data to /usr/local/texlive/2008/texmf-var/tex/generic/config/language.def

running mktexlsr /usr/local/texlive/2008/texmf-var

mktexlsr: Updating /usr/local/texlive/2008/texmf-var/ls-R...

mktexlsr: Done.

running updmap-sys... done

re-running mktexlsr /usr/local/texlive/2008/texmf-var

mktexlsr: Updating /usr/local/texlive/2008/texmf-var/ls-R...

mktexlsr: Done.

pre-generating all format files (fmtutil-sys --all), be patient...done



See

/usr/local/texlive/2008/index.html

for links to documentation. The TeX Live web site (http://tug.org/texlive/)

contains any updates and corrections.



TeX Live is a joint project of the TeX user groups around the world;

please consider supporting it by joining the group best for you. The

list of groups is available on the web at http://tug.org/usergroups.html.



Add /usr/local/texlive/2008/texmf/doc/man to MANPATH.

Add /usr/local/texlive/2008/texmf/doc/info to INFOPATH.

Most importantly, add /usr/local/texlive/2008/bin/i386-freebsd

to your PATH for current and future sessions.



Welcome to TeX Live!



./install-tl: done.

Logfile: /usr/local/texlive/2008/install-tl.log

After that completes, be it 10 minutes later or 10 hours, depending on your hardware…. If desired, one can customize the installation process. If the command prompt scares you, use install-tl -gui instead. You probably will want to setup your installation afterwords, the tlmgr program will be of use, and supports a -gui option I think. For me, all I do is set the default paper type, and update my environment so I can use TeXLive binaries, manuals, and info pages.

dixie# setenv PATH "/usr/local/texlive/2008/bin/i386-freebsd/:$PATH"
dixie# /usr/local/texlive/2008/bin/i386-freebsd/tlmgr paper a4


N.B. the default shell for root on FreeBSD is (t)csh. My interactive shells always sources ~/.site_shrc at the end of it’s setup, so this is where I set my environment, others would probably want ~/.bashrc or other shell specific file:

# TeX Live stuff
PATH="/usr/local/texlive/2008/bin/i386-freebsd:$PATH:/usr/games:/usr/local/bin:/usr/local/sbin:${HOME}/sh:${HOME}/bin"; export PATH
MANPATH="/usr/local/texlive/2008/texmf/doc/man:/usr/share/man:/usr/local/man:$MANPATH"; export MANPATH
INFOPATH="/usr/local/texlive/2008/texmf/doc/info:/usr/share/info:/usr/local/info:$INFOPATH"; export INFOPATH

and resource the file. As root, one can also add the manuals from TexLive to /etc/manpath.conf (read the comments in it), which will update the man commands search path, Updates to the environment can also be done to the various files in your skel system if desired, and mail existing users about the update. I’m not aware if there is a file to configure the info commands search path, probably is, but I don’t use info pages that often ^_^. I require each user account to adjust their own environment before using TexLive, which suits me fine. Once TexLive 2008 is ready op, and one is satisfied, /usr/local/texlive/2007 can be rm -rf’d, recovering around 1.1GB, depending on what you had installed. Also, my 2008 install is ~1.7GB. I generally opt-in to the defaults, but I expect many people would want to setup a more localized-only set of files. Now to clean up:

dixie# umount /mnt
dixie# mdconfig -d -u 10

Happy trails