85 Debian 2012 2 18
85 Debian 2012 2 1 Introduction Debian Debian Debian Debian Debian Developer ( ) face-to-face Debian Debian Debian Debian Package Debian 1
1 Introduction 1 2 3 2.1........... 3 2.2 dictoss( )..... 3 2.3 yamamoto......... 3 2.4......... 3 2.5......... 3 3 Debian 4 3.1 Debian 84........... 4 4 Debian Trivia Quiz 5 5 Debian KDE 6 5.1 KDE 6 5.2 experimental KDE (KVM+spice) 7 5.3 Debian KDE.............. 9 5.4 KDE.... 9 5.5 Debian KDE.......... 10 5.6 KDE Debian.............. 10 5.7........... 11 5.8........... 11 6 Debhelper 12 6.1 make. 12 6.2 dh........ 12 6.3 dh dpatch patch.. 13 6.4 autotools... 13 6.5........... 14 7 cmake 15 7.1 cmake.......... 15 7.2.......... 15 7.3 IDE....... 17 7.4........... 17 7.5........... 17 2
85 Debian 2012 2 2 : 1. Debian desktop 200 (contrib / 2.1 gnome desktop KDE EBView (RDP) VNC KRDC KSnapshot EBView 2.2 dictoss( ) startx icewm gdm xfce4 gnome KDE KDE 2.3 yamamoto Debian squeeze (amd64) sid i386 sid amd64 PC KDE LAN (?) 2.4 GNOME 3.2.2 Debian unstable experimental upgrade gnome-shell javascript gxconsole( http://gnomefiles.org/content/ show.php/gxconsole?content=132145 ) GNOME3.2.2 GNOME 3.2.2... 2.5 XMonad Haskell Haskell gnome-session sid 3
85 Debian 2012 2 3 Debian 3.1 Debian 84 1 Debian Debian Debian VPS Debian twitter Debhelper dh dh builddeb WEB Debian 4
85 Debian 2012 2 4 Debian Trivia Quiz Debian Debian debian-devel-announce@lists.debian.org debian-devel@lists.debian.org Debian Project News 1. 2/14 wheezy A I18N B / C Look and Feel 2. 2 Debian? A lenny B sarge C woody 3. 1/25 alioth A vasks.debian.org B wagner.debian.org C churro 4. DebConf12? A 2012/7/1-7/7 B 2012/7/8-7/14 C 2012/ 5. wheezy Linux A 3.0 B 3.1 C 3.2 6. / / QA A init B piuparts C upstart 7. 2/18 Debian A 6.0.1 B 6.0.2 C 6.0.4 8. Debian Games Team 2/25,2/26? A (BSP) B Games Team IRC C 9. W3Techs Linux Web 2012 1 No.1 A Debian B CentOS C Ubuntu Server 5
85 Debian 2012 2 5 Debian KDE Debian GNOME Debian KDE 5.1 KDE Debian KDE 1. Debian DVD 2. TAB desktop=kde 106 = = ^ = /install.amd/vmlinuz vga=788 initrd=/install.amd/initrd.gz --- quiet desktop=kde 1 TAB 3. : Debian desktop environment 6
4. 5. KDE 5.2 experimental KDE (KVM+spice) Debian experimental KDE BTS / / / KDE experimental KVM experimental aptitude full-upgrade spice 2 KDE 2 KDE root 1. HostOS PC BIOS CPU ON 2. HostOS http://www.debian.org/cd/netinst CD 3. HostOS /etc/network/interfaces br0 # aptitude install bridge-utils auto br0 iface br0 inet static address 192.168.0.1 netmask 255.255.255.0 bridge_ports none bridge_stp off bridge_fd 0 bridge_maxwait 0 4. HostOS /etc/sysctl.d/bridge-filter-workaround.conf sysctl -p /etc/sysctl.d/bridge-filterworkaround.conf br0 # /etc/sysctl.d/bridge-filter-workaround.conf net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-arptables = 0 7
5. HostOS /etc/ppp/ip-up.d/kvm-bridge-up,/etc/ppp/ip-down.d/kvm-bridge-down #!/bin/sh # /etc/ppp/ip-up.d/kvm-bridge-up PATH=/bin:/usr/bin:/sbin:/usr/sbin CDPATH= sysctl -w net.ipv4.ip_forward=1 iptables -t nat -A POSTROUTING -o $PPP_IFACE -j MASQUERADE iptables -A FORWARD -i br0 -o $PPP_IFACE -j ACCEPT #!/bin/sh # /etc/ppp/ip-down.d/kvm-bridge-down #!/bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin CDPATH= sysctl -w net.ipv4.ip_forward=0 iptables -t nat -D POSTROUTING -o $PPP_IFACE -j MASQUERADE iptables -D FORWARD -i br0 -o $PPP_IFACE -j ACCEPT 6. HostOS kvm/libvirt/spice-client-gtk 7. HostOS GuestOS kde-test.xml virsh define kde-test.xml * 1 <domain type= kvm > <name>kde-test</name> <memory>1048576</memory> <vcpu>1</vcpu> <os> <type arch= x86_64 machine= pc-1.0 >hvm</type> <boot dev= hd /> <boot dev= cdrom /> <bootmenu enable= yes /> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset= utc /> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm</emulator> <disk type= file device= disk > <driver name= qemu type= raw cache= writeback /> <source file= /var/lib/libvirt/images/kde-test.img /> <target dev= vda bus= virtio /> </disk> <disk type= file device= cdrom > <driver name= qemu type= raw /> <!-- directory of cdimage --> <source file= /directory of cdimage/debian-6.0.4-amd64-businesscard.iso /> <target dev= hdc bus= ide /> <readonly/> </disk> <controller type= ide index= 0 /> <interface type= bridge > <!-- mac --> <mac address= 52:54:00:31:cd:5a /> <source bridge= br0 /> <model type= virtio /> </interface> <serial type= pty > <target port= 0 /> </serial> <console type= pty > <target type= serial port= 0 /> </console> <input type= mouse bus= ps2 /> <graphics type= spice port= 5900 autoport= no > <clipboard copypaste= yes /> </graphics> <sound model= ac97 \> <video> <model type= qxl vram= 9216 heads= 1 /> </video> <memballoon model= virtio > </memballoon> </devices> </domain> 8. HostOS 10GB *1 virt-install experimental Segmentation Fault BTS 8
qemu-img create -f raw /var/lib/libvirt/images/kde-test.img 10G 9. HostOS KVM spice virsh start kde-test; spicy -h 127.0.0.1 -p 5900 & 10. GuestOS Debian TAB priority=medium /install.amd/vmlinuz vga=788 initrd=/install.amd/initrd.gz --- quiet priority=medium Debian sid ssh ( ) 11. Debian sid GuestOS 12. GuestOS /etc/apt/source.list # deb http://ftp.jp.debian.org/debian/ experimental main deb-src http://ftp.jp.debian.org/debian/ experimental main 13. GuestOS /etc/apt/preference.d Debian KDE experimental preference cd /etc/apt/preference.d && wget http://pkg-kde.alioth.debian.org/files/kde-experimental 14. GuestOS experimental KDE aptitude update;aptitude aptitude install task-kde-desktop task-japanese-kde-desktop;aptitude clean 15. GuestOS GuestOS KDE experimental 5.3 Debian KDE Debian KDE 1 Debian stable testing unstable experimental upstream KDE 4.4 4.6 4.6 4.7.4 4.8.0 1 Debian KDE KDE upstream 2012 1 25 4.8.0 experimental 5.4 KDE KDE 1. Qt 2. C++ 3. autotools cmake Debian pkg-kde-tools 9
5.5 Debian KDE Debian KDE pkg-kde-tools KDE 1 dh with kde debhelper kde 2 dh auto * buildsystem=kde dh auto * cmake KDE 3 CDBS kde.mk CDBS KDE 4 variables.mk debian/rules $(DEB CMAKE KDE4 FLAGS) 2 pkg-kde-tools 5.6 KDE Debian KDE Debian 5.2 experimental (cmake ) * 2 khello-1.0.0/ http://techbase.kde.org/development/tutorials/first_program main.cpp CMakeLists.txt $ cd khello-1.0.0 $ ls CMakeLists.txt main.cpp $ tar.gz $ cd.. $ tar czf khello_1.0.0.orig.tar.gz khello-1.0.0 $ ls -F khello-1.0.0/ khello_1.0.0.orig.tar.gz $ dh make debian/ rules $ cd khello-1.0.0/debian $ ls -F README.Debian changelog control docs source/ README.source compat copyright rules $ pkg-kde-tools rules # pkg-kde-tools KDE debian/rules %: dh $@ --with kde dpkg-buildpackage -uc -us -rfakeroot *2 KDE aptitude build-dep kdeutils KDE 10
$ dpkg-buildpackage -us -uc -rfakeroot dpkg-buildpackage: source package khello...... dpkg-source: info: building khello in khello_1.0.0-1.debian.tar.gz dpkg-source: info: building khello in khello_1.0.0-1.dsc debian/rules build dh build --with kde dh_testdir dh_auto_configure --buildsystem=kde -- The C compiler identification is GNU -- The CXX compiler identification is GNU...... buildsystem=kde cmake khello 1.0.0-1 amd64.deb pkg-kde-tools? 5.7 Debian KDE KDE 5.8 http://pkg-kde.alioth.debian.org/ Debian KDE Team http://techbase.kde.org KDE Techbase http://kde.org/ KDE http://www.spice-space.org/ SPICE 11
85 Debian 2012 2 6 Debhelper 6.1 make Debhelper dh Debhelper dh auto configure./configure --build= dpkg_architecture_value("deb_build_gnu_type") --prefix=/usr --includedir=/usr/include \ --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --localstatedir=/var \ --libdir=/usr/lib/\$multiarch --libexecdir=/usr/lib/\$multiarch --disable-maintainer-mode \ --disable-dependency-tracking --host= dpkg_architecture_value("deb_host_gnu_type") autotools confugure configure.ac Makefile Makefile.in Makefile.am Debian dh dpatch dh dpatch patch autotools-dev dh autotools-dev updateconfig 6.2 dh dh dh make dh_testdir # dh_auto_configure #./configure configure dh dh $sequences$sequence ( perl ) $sequences dh (remove command) dh (insert before) dh /usr/share/perl5/debian/debhelper/sequence/ 12
insert_before("dh_auto_configure", "dh_ ") ( ) dh auto configure dh rules dh $@ --with dh 6.3 dh dpatch patch dpatch /usr/share/perl5/debian/debhelper/sequence/ dpatch.pm insert_before("dh_auto_configure", "dh_dpatch_patch") insert_before("dh_clean", "dh_dpatch_unpatch") make./configure dh dpatch patch dh dpatch unpatch dh dpatch patch debian/patches/00list dpatch configure dpatch dpatch Build-dep debian/patches/ 00list dh $@ --with dpatch rules make $ dh_dpatch_patch $./configure $ make 6.4 autotools configure GNU autotools GNU autotools Debhelper dh-autoreconf automake autoconf automake autotools-dev autotools-dev /usr/share/perl5/debian/debhelper/sequence/ autotools-dev.pm insert_before("dh_auto_configure", "dh_autotool-dev_updateconfig") insert_before("dh_clean", "dh_autotool-dev_restoreconfig") dh autotool-dev updateconfig config.guess config.sub config.guess.dh-orig config.sub.dh-orig /usr/share/misc/ autotool-dev config.guess config.sub 13
dh-autoreconf /usr/share/perl5/debian/debhelper/sequence/ autoreconf.pm insert_before("dh_auto_configure", "dh_autoreconf") insert_before("dh_clean", "dh_autoreconf_clean") dh autoreconf automake autoconf autoreconf configure Makefile.in dh autoreconf Build-dep dh $@ --with autoreconf rules debian/autoreconf configure Makefile.in autoreconf.pm dh auto configure dh autoreconf dh autoreconf dh with dh-autoreconf Makefile BTS with 6.5 make configure Debhelper 14
85 Debian 2012 2 7 cmake 7.1 cmake KDE cmake autotools autotools autotools sh /bin/sh UNIX OS /bin/sh C /bin/sh cmake /bin/sh UNIX autotools make Makefile Microsoft Visual Studio IDE) Makefile IDE cmake CMakeLists.txt Makefile IDE autotools Makefile.am.vcproj UNIX/Windows DDJ http://drdobbs.com/cpp/184405251 QT moc /ITK CABLE/VTK 7.2 cmake 15
aptitude install cmake (hello.c,config.h.in) /*hello.c*/ #include <stdio.h> #include "config.h" int main(int argc,char **argv) { printf("hello world\n"); #if defined(have_exit) printf("yes, this system has exit()\n"); #endif return(0); } /*config.h.in*/ #cmakedefine HAVE_EXIT CMakeLists.txt # cmake 2.8 cmake_minimum_required(version 2.8) # project project(hello) # cmake # include (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) # exit() HAVE_EXIT check_function_exists(exit HAVE_EXIT) configure_file ( "${PROJECT_SOURCE_DIR}/config.h.in" "${PROJECT_BINARY_DIR}/config.h" ) # cc -I include_directories ("${PROJECT_BINARY_DIR}") # hello hello.c add_executable(hello hello.c) 3 hello-src/ $ ls -lr.: 4 drwxr-xr-x 2 nojima nojima 4096 2 17 03:15 hello-src./hello-src: 8 -rw-r--r-- 1 nojima nojima 46 2 17 03:15 CMakeLists.txt -rw-r--r-- 1 nojima nojima 34 2 17 04:21 config.h.in -rw-r--r-- 1 nojima nojima 91 2 17 03:10 hello.c $ (hello-build) $ ls hello-src $ mkdir hello-build $ cd hello-build cmake $ cmake../hello-src -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works...... -- Looking for exit -- Looking for exit - found -- Configuring done -- Generating done -- Build files have been written to: /.../cmake-test/hello-build $ ls CMakeCache.txt CMakeFiles Makefile cmake_install.cmake config.h Makefile/config.h exit 16
make $ make Scanning dependencies of target hello [100%] Building C object CMakeFiles/hello.dir/hello.c.o Linking C executable hello [100%] Built target hello $ ls -F CMakeCache.txt CMakeFiles/ Makefile cmake_install.cmake config.h hello* $./hello hello world yes, this system has exit() $ CMakeLists.txt (hello) defined(have EXIT) True exit() 7.3 IDE cmake help IDE Debian $ cmake..... The following generators are available on this platform: Unix Makefiles = Generates standard UNIX makefiles. CodeBlocks - Unix Makefiles = Generates CodeBlocks project files. Eclipse CDT4 - Unix Makefiles = Generates Eclipse CDT 4.0 project files. KDevelop3 = Generates KDevelop 3 project files. KDevelop3 - Unix Makefiles = Generates KDevelop 3 project files. $ hello-build KDevelp3 project $ cmake -G KDevelop3../hello-src...... $ ls MakeCache.txt Makefile config.h hello.kdevelop.filelist CMakeFiles cmake_install.cmake hello.kdevelop hello.kdevses $ KDevelp3 (hello.kdevelop ) 7.4 cmake KDE mysql wikipedia(http://ja.wikipedia.org/wiki/ CMake) Debian aptitude 7.5 http://www.cmake.org/ cmake http://www.cmake.org/cmake/help/cmake_tutorial.html cmake http://drdobbs.com/cpp/184405251?pgno=1 DDJ 17
18
Debian 2012 2 18 1 Debian 19