Development/Docs/Contributor Tricks
From Mandriva
Contents |
Content overview
This page is about technical issues for anyone producing packages for Mandriva. Organisational issues are described in Maintainer Howto.
Shell aliases
You can set up aliases to make life easier for yourself. Some examples are:
alias tailue="tail -f /var/log/ue/ue.$(date +%Y%m).log" alias ue="sudo /usr/local/bin/ue" alias findrpm='find $(rpm --eval %_rpmdir) $(rpm --eval %_srcrpmdir) -mtime -1 -type f' alias ftpcontrib="sudo /usr/local/bin/ftpcontrib $(findrpm)" alias ftpcooker="sudo /usr/local/bin/ftpcooker $(findrpm)" alias rpmlint='rpmlint `findrpm`'
SSH configuration
If you want to directly use ssh on nX computer.
/home/misc $ ssh n1 hostname ; hostname n1.mandriva.com crovax
First, you need to use an ssh key. Use:
ssh-keygen -t dsa
and copy the content of id_dsa.pub to the file .ssh/authorized_keys. Please use a long passphrase (to protect the key is very important for security reasons).
NOTE: You need to be sure of the permissions of your private key ( ~/.ssh/id_dsa on your computer must be "rw" for the owner only), of the permissions of your .ssh folder (e.g. ~/.ssh on your computer must be "rwx" for the owner only). Same thing for the authorized_keys on the server. Therefore when you edit those files remember to change their permission; for example for authorized_keys you can use the command chmod 600 ~/.ssh/authorized_keys.
When all this is ok, you will be able to use an agent with the default Mandriva Linux installation.
Each time you log on to your workstation, type ssh-add in a console, your passphrase, and you will be able to log into kenobi without password. The second thing to do is to enable ssh agent forwarding on kenobi. For this, just add this in your ~/.ssh/config:
Host kenobi.mandriva.com ForwardAgent yes
Now, you can use ssh n1 without password on kenobi. To do so, type:
ssh kenobi.mandriva.com -t ssh n1
But this is not enough. The last step is to add this in your config files:
Host n1 n2 n3 n4 n5 ForwardAgent yes ProxyCommand ssh -qax kenobi.mandriva.com /usr/bin/nc %h %p
Then ssh n1 will take you to n1, using the subversion server through ssh will work, like scp or rsync.
SSH config
Add the following to your ssh config if you use ssh-agent, makes life easier:
# Mandriva Host n1 n2 n3 n4 n5 deborah seggie ForwardAgent yes ProxyCommand ssh -qax kenobi.mandriva.com /usr/bin/nc %h %p Host kenobi Hostname kenobi.mandriva.com # Mandriva chroots Host chroot100 Hostname n1.mandriva.com Port 100 ProxyCommand ssh -qax n1 /usr/bin/nc -w 120 %h %p Host chroot101 Hostname n4.mandriva.com Port 101 ProxyCommand ssh -qax n1 /usr/bin/nc -w 120 %h %p Host chroot102 Hostname n5.mandriva.com Port 102 ProxyCommand ssh -qax n1 /usr/bin/nc -w 120 %h %p Host chroot10264 Hostname deborah.mandriva.com Port 102 ProxyCommand ssh -qax n1 /usr/bin/nc -w 120 %h %p Host chroot2006 Hostname n3.mandriva.com Port 2006 ProxyCommand ssh -qax n1 /usr/bin/nc -w 120 %h %p Host chroot200664 Hostname deborah.mandriva.com Port 2006 ProxyCommand ssh -qax n1 /usr/bin/nc -w 120 %h %p