2011年4月11日 星期一

host android git mirror site with gitosis

* use wildcard support gitosis
https://github.com/mzupan/gitosis

* gitosis-post-update problem
http://blog.binfalse.de/2010/10/lost-my-gitosis-post-update/

* get android in repositories folder android/
repo init -u git://git.android-x86.org/manifest.git --mirror
repo sync
(have a cup...)

* modify writable field with wildcard to restricted users
* get manifest at first
git clone git@<serverip>:android/manifest

* change git server upstream to your server by edit default.xml
fetch=git@"<serverip>:/android/"
* and then push back to server
git commit -am 'update local server'
git push

* create your local copy
repo init -u git@<serverip>:android/manifest.git
repo sync


reference:
http://gregmeiste.com/post/3842942731/mirror-android-repositories-on-a-local-server

2011年3月16日 星期三

Debian on Nextvod

debian-rootfs-20101014
http://goo.gl/w1PD1

sysv-rc: /usr/sbin/update-rc.d
dpkg: /usr/sbin/install-info
dpkg: /usr/bin/dpkg
dpkg: /usr/bin/dpkg-split
dpkg: /usr/bin/dpkg-deb
dpkg: /usr/bin/dpkg-query
debianutils: /bin/run-parts

mkdir -p /var/lib/dpkg
mkdir -p /var/lib/dpkg/updates/
mkdir -p /var/lib/dpkg/info/
touch /var/lib/dpkg/available
touch /var/lib/dpkg/status

/etc/apt/trustdb.gpg
/etc/apt/trusted.gpg

http://ftp.debian-ports.org/debian/pool-sh4/main/a/apt/apt-utils_0.8.12_sh4.deb
http://ftp.debian-ports.org/debian/pool-sh4/main/a/apt/apt_0.8.12_sh4.deb
http://ftp.debian-ports.org/debian/pool-sh4/main/a/apt/libapt-pkg-dev_0.8.12_sh4.deb
http://ftp.debian-ports.org/debian/pool-sh4/main/b/bzip2/libbz2-1.0_1.0.5-6_sh4.deb
http://ftp.debian-ports.org/debian/pool-sh4/main/r/readline6/libreadline6_6.1-3_sh4.deb
http://ftp.debian-ports.org/debian/pool-sh4/main/g/gnupg/gpgv_1.4.11-3_sh4.deb
http://ftp.debian-ports.org/debian/pool-sh4/main/g/gnupg/gnupg_1.4.11-3_sh4.deb
http://ftp.debian-ports.org/debian/pool-sh4/main/libu/libusb/libusb-0.1-4_0.1.12-17_sh4.deb

/usr/lib/libstdc++.so.6.0.12
/usr/lib/libz.so.1.2.3.3

apt-get -f install libgcc1 libc-bin
apt-get -f install libacl1 libattr1
apt-get -f install coreutils
apt-get -f install libc6 libstdc++6 zlib1g debian-archive-keyring libdb5.1 gcc-4.5-base readline-cmmon libncurses5 dpkg install-info xz-utils libselinux1 liblzma2

2011年3月10日 星期四

STLinux (for nextvod usage)

* Install on Ubuntu
http://www.stlinux.com/faq?q=node/361

* STAPI
http://www.hwport.com/wiki.php/STLinuxInstall

* Cross-compile for transmission
http://code.google.com/p/wydevices/wiki/Howto_install_STLinux23
http://code.google.com/p/wydevices/wiki/Howto_crosscompile_transmission2_for_wydevices

* rtorrent
http://libtorrent.rakshasa.no/wiki
http://libtorrent.rakshasa.no/browser/trunk/rtorrent/doc/rtorrent.rc?rev=latest

** STLinux should have
stlinux23-sh4-curl-dev
stlinux23-sh4-openssl
stlinux23-sh4-zlib

** hacks if you cannot find libs
/usb/lib/libstdc++.la
/usb/lib/libstdc++.so
/usb/lib/libcurl.so

** sigc++
./configure --host="sh4-linux" --prefix="/opt/STM/STLinux-2.3/devkit/sh4/target/" --libdir="/opt/STM/STLinux-2.3/devkit/sh4/target/usr/lib" --disable-documentation
make
make install

** libtorrent
./configure --host=sh4-linux --prefix=/opt/STM/STLinux-2.3/devkit/sh4/target/ --enable-aligned --libdir="/opt/STM/STLinux-2.3/devkit/sh4/target/usr/lib"

** xmlrpc-c
*** fix lib/expat/gennmtab/Makefile at first. use host's gcc, instead of sh4-linux-gcc
./configure --host=sh4-linux --prefix=/opt/STM/STLinux-2.3/devkit/sh4/target/ --libdir="/opt/STM/STLinux-2.3/devkit/sh4/target/usr/lib"

** rtorrent
./configure --host=sh4-linux --prefix=/opt/STM/STLinux-2.3/devkit/sh4/target/ --libdir="/opt/STM/STLinux-2.3/devkit/sh4/target/usr/lib" --with-xmlrpc-c=/opt/STM/STLinux-2.3/devkit/sh4/target/bin/xmlrpc-c-config

** lighttpd
./configure --host=sh4-linux --prefix=/opt/STM/STLinux-2.3/devkit/sh4/target/ --libdir="/opt/STM/STLinux-2.3/devkit/sh4/target/usr/lib" --with-openssl

** pack rpms by checkinstall
http://checkinstall.izto.org/
sudo checkinstall -D --install=no --pkgarch=sh4 --maintainer=Harry --nodoc --strip=no

* Nextvod
https://www.nextvod.com.tw/tw/yiwangle/opensource.jsp
http://stevennick.pixnet.net/blog
http://snowwolf725.blogspot.com

2011年1月6日 星期四

ubuntu forward

sudo iptables -A FORWARD -o usb0 -i eth0 -s 10.0.0.0/24 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A POSTROUTING -t nat -j MASQUERADE
sudo iptables-save | sudo tee /etc/iptables.sav


add "iptables-restore < /etc/iptables.sav" in /etc/rc.local

2010年11月4日 星期四

git

Enhanced shell prompt
One specificity of git over something lke subversion is that all your branch stay in the same directory.
Thanks to the git completion extensions available in git-core, you can enhance your shell prompt to display the name of the branch you are working on. For example, if you set:

PS1='\u@\h:\w$(__git_ps1 " (%s)") \$ '

2010年11月2日 星期二

Virtualbox

VBoxManage.exe modifyvm "Ubuntu 10.04 for WRL4" --natpf1 "guestssh,tcp,,22,,22


VBoxManage.exe startvm "Ubuntu 10.04 for WRL4" --type headless

2010年10月25日 星期一

network-manager 3g modem debug

NM_SERIAL_DEBUG=1 NM_PPP_DEBUG=1 /usr/sbin/NetworkManager --no-daemon

refer:
http://ubuntuforums.org/showthread.php?t=1466490

https://bugs.edge.launchpad.net/ubuntu/+source/network-manager/+bug/259028

http://www.ubuntu-tw.org/modules/newbb/viewtopic.php?viewmode=thread&topic_id=8730&forum=3&post_id=110840

http://www.facebook.com/note.php?note_id=104520692922518