From be41960e19c9daee738916df4138559a262ca34a Mon Sep 17 00:00:00 2001 From: root Date: Fri, 12 Feb 2010 03:12:38 +0000 Subject: [PATCH] =?utf8?q?R=C3=A9organisation=20des=20stages?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- stage2/cis-bootscripts | 6 +- stage2/cis-emacs | 108 -------------- stage2/install-2 | 27 +--- stage2/packages-update | 26 ---- {stage2 => stage3}/bootscripts/dhcp | 0 {stage2 => stage3}/bootscripts/nfs | 0 {stage2 => stage3}/bootscripts/portmap | 0 {stage2 => stage3}/bootscripts/sshd | 0 {stage2 => stage3}/cis-dhcp | 3 + stage3/cis-emacs | 41 +----- {stage2 => stage3}/cis-nano | 2 +- {stage2 => stage3}/cis-net-tools | 0 {stage2 => stage3}/cis-nfs-utils | 3 + {stage2 => stage3}/cis-openssh | 3 + {stage2 => stage3}/cis-openssl | 0 {stage2 => stage3}/cis-pam | 0 {stage2 => stage3}/cis-pciutils | 0 {stage2 => stage3}/cis-portmap | 3 + {stage2 => stage3}/cis-reiserfsprogs | 0 {stage2 => stage3}/cis-sudo | 0 {stage2 => stage3}/cis-tcl | 0 {stage2 => stage3}/cis-tcp-wrappers | 0 stage3/packages-update | 26 ++++ stage3/resources/emacsrc | 180 +++++++++++++++++++++++ {stage2/misc => stage3/resources}/nanorc | 0 stage3/stage3-install | 32 +++- {stage5 => stage6}/README | 0 {stage5 => stage6}/TODO | 0 {stage5 => stage6}/cis-ac | 0 {stage5 => stage6}/cis-ac-nobuild | 0 {stage5 => stage6}/cis-avr-libc | 0 {stage5 => stage6}/cis-avrdude | 0 {stage5 => stage6}/cis-binutils | 0 {stage5 => stage6}/cis-gcc1 | 0 {stage5 => stage6}/cis-gcc2 | 0 {stage5 => stage6}/cis-gdb | 0 {stage5 => stage6}/cis-glibc | 0 {stage5 => stage6}/cis-kernel | 0 {stage5 => stage6}/cis-newlib | 0 {stage5 => stage6}/packages-update | 0 {stage5 => stage6}/stage5-additions | 0 {stage5 => stage6}/stage5-install-arm | 0 {stage5 => stage6}/stage5-install-avr | 0 {stage5 => stage6}/stage5-install-geda | 0 {stage5 => stage6}/stage5-install-ppc | 0 45 files changed, 251 insertions(+), 209 deletions(-) delete mode 100755 stage2/cis-emacs rename {stage2 => stage3}/bootscripts/dhcp (100%) rename {stage2 => stage3}/bootscripts/nfs (100%) rename {stage2 => stage3}/bootscripts/portmap (100%) rename {stage2 => stage3}/bootscripts/sshd (100%) rename {stage2 => stage3}/cis-dhcp (95%) rename {stage2 => stage3}/cis-nano (92%) rename {stage2 => stage3}/cis-net-tools (100%) rename {stage2 => stage3}/cis-nfs-utils (89%) rename {stage2 => stage3}/cis-openssh (92%) rename {stage2 => stage3}/cis-openssl (100%) rename {stage2 => stage3}/cis-pam (100%) rename {stage2 => stage3}/cis-pciutils (100%) rename {stage2 => stage3}/cis-portmap (77%) rename {stage2 => stage3}/cis-reiserfsprogs (100%) rename {stage2 => stage3}/cis-sudo (100%) rename {stage2 => stage3}/cis-tcl (100%) rename {stage2 => stage3}/cis-tcp-wrappers (100%) create mode 100644 stage3/resources/emacsrc rename {stage2/misc => stage3/resources}/nanorc (100%) rename {stage5 => stage6}/README (100%) rename {stage5 => stage6}/TODO (100%) rename {stage5 => stage6}/cis-ac (100%) rename {stage5 => stage6}/cis-ac-nobuild (100%) rename {stage5 => stage6}/cis-avr-libc (100%) rename {stage5 => stage6}/cis-avrdude (100%) rename {stage5 => stage6}/cis-binutils (100%) rename {stage5 => stage6}/cis-gcc1 (100%) rename {stage5 => stage6}/cis-gcc2 (100%) rename {stage5 => stage6}/cis-gdb (100%) rename {stage5 => stage6}/cis-glibc (100%) rename {stage5 => stage6}/cis-kernel (100%) rename {stage5 => stage6}/cis-newlib (100%) rename {stage5 => stage6}/packages-update (100%) rename {stage5 => stage6}/stage5-additions (100%) rename {stage5 => stage6}/stage5-install-arm (100%) rename {stage5 => stage6}/stage5-install-avr (100%) rename {stage5 => stage6}/stage5-install-geda (100%) rename {stage5 => stage6}/stage5-install-ppc (100%) diff --git a/stage2/cis-bootscripts b/stage2/cis-bootscripts index 9fc3a49..b334ff5 100755 --- a/stage2/cis-bootscripts +++ b/stage2/cis-bootscripts @@ -84,7 +84,7 @@ fi sed -i -e "s!^\(export PATH=\).*tools.*!\1/bin:/usr/bin:/sbin:/usr/sbin!" /etc/rc.d/init.d/functions # Copying boot scripts -STAGE2_BOOTSCRIPTS="dhcp ifdown ifup keyboard mountnetfs network nfs portmap sshd sysklogd" +STAGE2_BOOTSCRIPTS="ifdown ifup keyboard mountnetfs network sysklogd" for bootscript in ${STAGE2_BOOTSCRIPTS}; do install -m755 bootscripts/${bootscript} /etc/rc.d/init.d done @@ -99,10 +99,6 @@ bootscript_add_rcsysinit keyboard 55 00 # rc3.d bootscript_add_rc3 network 05 80 -bootscript_add_rc3 portmap 10 75 -bootscript_add_rc3 nfs 15 74 -bootscript_add_rc3 dhcp 20 73 -bootscript_add_rc3 sshd 25 70 bootscript_add_rc3 mountnetfs 30 10 chown -R root:root /etc/rc.d /etc/sysconfig diff --git a/stage2/cis-emacs b/stage2/cis-emacs deleted file mode 100755 index 4137455..0000000 --- a/stage2/cis-emacs +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1}-build -../${1}/configure \ - --prefix=/usr \ - --without-sound \ - --with-x=no \ - --without-dbus \ - --with-xpm=no \ - --with-jpeg=no \ - --with-png=no \ - --with-gif=no \ - --with-tiff=no \ - --without-rsvg \ - --libexecdir=/usr/sbin \ - --localstatedir=/var -make -j ${MAKEJOBS} bootstrap -make install - -cat > /etc/skel/.emacs << "EOF" -;; ~/.emacs - -;; Emacs initialization file - -;; Do not display a splash screen on startup -(setq inhibit-splash-screen t) - -;; Pour avoir les accents -(set-keyboard-coding-system 'utf-8) - -;; Set up the keyboard so the delete key on both the regular keyboard -;; and the keypad delete the character under the cursor and to the right -;; under X, instead of the default, backspace behavior. -(global-set-key [delete] 'delete-char) -(global-set-key [kp-delete] 'delete-char) - -;; Turn on font-lock mode for Emacs -(global-font-lock-mode t) - -;; Always end a file with a newline -(setq require-final-newline t) - -;; Stop at the end of the file, not just add lines -(setq next-line-add-newlines nil) - -;; Replaces tabs in files with spaces -(setq-default indent-tabs-mode nil) - -;; Makes the compilation buffer always scrolls to follow -;; output as it comes in. -(setq compilation-scroll-output t) - -;;=========================================================== -;; Key bindings for compiling programs -;;=========================================================== -;; Must add helper function for the make also, otherwise -;; the first definition caused both F3 and F4 to execute "make clean". -(defun compile-make-clean () - (interactive) ;; can be called from kbd - (compile "make clean")) - -(defun compile-make () - (interactive) - (compile "make")) - -(defun checkpatch() - (interactive) - (compile (concat "checkpatch.pl --no-tree --emacs --strict --file " (buffer-file-name)))) - -;; buffer-cycle.el -;; F1: Switch to previous buffers -(autoload 'cycle-buffer-prev "buffer-cycle" t) -(global-set-key [f1] 'cycle-buffer-prev) -;; F2: Switch to next buffers -(autoload 'cycle-buffer-next "buffer-cycle" t) -(global-set-key [f2] 'cycle-buffer-next) - -;; F4: make clean -(global-set-key [f4] 'compile-make-clean) - -;; F5: make -(global-set-key [f5] 'compile-make) - -;; F6: go to next error -(global-set-key [f6] 'next-error) - -;; F7: comment region -(global-set-key [f7] 'comment-region) - -;; F8: code indentation -(global-set-key [f8] 'indent-region) - -;; F9: run checkpatch.pl -(global-set-key [f9] 'checkpatch) -EOF - -exit $? diff --git a/stage2/install-2 b/stage2/install-2 index a090916..4415639 100755 --- a/stage2/install-2 +++ b/stage2/install-2 @@ -59,32 +59,7 @@ ipkg_ac ${TAR_PACKAGE} "--bindir=/bin --libexecdir=/usr/sbin" ipkg_cust ${TEXINFO} cis-texinfo ipkg_cust ${UDEV} cis-udev ipkg_cust ${UDEV_CONFIG} cis-udev-config -###############ipkg_cust ${GRUB} cis-grub - -# Additional HV packages -ipkg_cust ${NANO} cis-nano --enable-color --enable-multibuffer -ipkg_ac ${WHICH} -ipkg_cust ${EMACS} cis-emacs -ipkg_cust ${PCIUTILS} cis-pciutils -ipkg_cust ${REISERFSPROGS} cis-reiserfsprogs -ipkg_cust ${NET_TOOLS} cis-net-tools -ipkg_cust ${DHCP} cis-dhcp -ipkg_ac_nb ${POPT} -ipkg_cust ${PAM} cis-pam -ipkg_cust ${OPENSSL} cis-openssl -ipkg_cust ${OPENSSH} cis-openssh -ipkg_ac ${EXPAT} -ipkg_ac ${APR} --with-installbuilddir=/usr/lib/apr-1/build -ipkg_ac ${APR_UTIL} --with-apr=/usr/bin/apr-1-config -ipkg_ac ${NEON} --with-ssl -ipkg_cust ${TCL} cis-tcl -ipkg_ac ${SQLITE} -ipkg_ac ${SUBVERSION} -ipkg_cust ${SUDO} cis-sudo -ipkg_ac ${WGET} -ipkg_cust ${TCPWRAPPERS} cis-tcp-wrappers -ipkg_cust ${PORTMAP} cis-portmap -ipkg_cust ${NFS_UTILS} cis-nfs-utils +#ipkg_cust ${GRUB} cis-grub rscr once "Installing HV-utilities" cis-hv-utilities rscr mult "Compressing man pages" cis-compressdoc diff --git a/stage2/packages-update b/stage2/packages-update index 4eb36ca..01ce4d0 100755 --- a/stage2/packages-update +++ b/stage2/packages-update @@ -51,7 +51,6 @@ lpkg 1 ${TAR_PACKAGE} lpkg 1 ${TEXINFO} lpkg 1 ${UDEV} lpkg 1 ${XZ_UTILS} -lpkg 1 ${NANO} # These packages are only for stage2 fpkg ${PERL} http://ftp.funet.fi/pub/CPAN/src @@ -76,29 +75,4 @@ fpkg ${SYSKLOGD} http://www.infodrom.org/projects/sysklogd/download fpkg ${UDEV_CONFIG} http://www.linuxfromscratch.org/lfs/downloads/development fpkg ${GRUB} ftp://alpha.gnu.org/gnu/grub -# Additional packages (not in original LFS, only for hvlinux). -fpkg_gnu ${EMACS} -fpkg_gnu ${WHICH} -fpkg ${REISERFSPROGS} http://www.kernel.org/pub/linux/utils/fs/reiserfs -fpkg ${PCIUTILS} ftp://ftp.kernel.org/pub/software/utils/pciutils -fpkg ${NET_TOOLS} http://www.tazenda.demon.co.uk/phil/net-tools -fpkg ${DHCP} ftp://ftp.isc.org/isc/dhcp/dhcp-3.0-history -fpkg ${POPT} http://rpm5.org/files/popt -fpkg ${PAM} http://www.kernel.org/pub/linux/libs/pam/library -fpkg ${OPENSSL} ftp://ftp.openssl.org/source -fpkg ${OPENSSL_ROOT_CERTS} http://anduin.linuxfromscratch.org/files/BLFS -fpkg ${OPENSSH} ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable -fpkg_sf ${EXPAT} -fpkg ${APR} http://apache.sunsite.ualberta.ca/apr -fpkg ${APR_UTIL} http://apache.sunsite.ualberta.ca/apr -fpkg ${NEON} http://www.webdav.org/neon -fpkg_sf ${TCL} -fpkg ${SQLITE} http://www.sqlite.org -fpkg ${SUBVERSION} http://subversion.tigris.org/downloads -fpkg ${SUDO} http://www.sudo.ws/sudo/dist -fpkg_gnu ${WGET} -fpkg ${TCPWRAPPERS} ftp://ftp.porcupine.org/pub/security -fpkg ${PORTMAP} http://neil.brown.name/portmap -fpkg ${NFS_UTILS} ftp://ftp.kernel.org/pub/linux/utils/nfs - exit $? diff --git a/stage2/bootscripts/dhcp b/stage3/bootscripts/dhcp similarity index 100% rename from stage2/bootscripts/dhcp rename to stage3/bootscripts/dhcp diff --git a/stage2/bootscripts/nfs b/stage3/bootscripts/nfs similarity index 100% rename from stage2/bootscripts/nfs rename to stage3/bootscripts/nfs diff --git a/stage2/bootscripts/portmap b/stage3/bootscripts/portmap similarity index 100% rename from stage2/bootscripts/portmap rename to stage3/bootscripts/portmap diff --git a/stage2/bootscripts/sshd b/stage3/bootscripts/sshd similarity index 100% rename from stage2/bootscripts/sshd rename to stage3/bootscripts/sshd diff --git a/stage2/cis-dhcp b/stage3/cis-dhcp similarity index 95% rename from stage2/cis-dhcp rename to stage3/cis-dhcp index 45e0875..bf572fa 100755 --- a/stage2/cis-dhcp +++ b/stage3/cis-dhcp @@ -76,4 +76,7 @@ subnet 192.168.0.0 netmask 255.255.255.0 { } EOF +install -v -m740 ${SCRDIR}/bootscripts/dhcp /etc/rc.d/init.d +bootscript_add_rc3 dhcp 20 73 + exit $? diff --git a/stage3/cis-emacs b/stage3/cis-emacs index d9db20d..93e91ba 100755 --- a/stage3/cis-emacs +++ b/stage3/cis-emacs @@ -20,44 +20,7 @@ make bootstrap make install ldconfig -cat > /etc/skel/.emacs << "EOF" -;; ~/.emacs - -;; Emacs initialization file - -;; Are we running XEmacs or Emacs? -(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) - -;; Set up the keyboard so the delete key on both the regular keyboard -;; and the keypad delete the character under the cursor and to the right -;; under X, instead of the default, backspace behavior. -(global-set-key [delete] 'delete-char) -(global-set-key [kp-delete] 'delete-char) - -;; Do not display a splash screen on startup -(setq inhibit-splash-screen t) - -;; Turn on font-lock mode for Emacs -(cond ((not running-xemacs) - (global-font-lock-mode t) -)) - -;; Always end a file with a newline -(setq require-final-newline t) - -;; Stop at the end of the file, not just add lines -(setq next-line-add-newlines nil) - -;; Enable wheelmouse support by default -(mwheel-install) -(setq mwheel-follow-mouse t) - -;; Replaces tabs in files with spaces -(setq-default indent-tabs-mode nil) - -;; Makes the compilation buffer always scrolls to follow -;; output as it comes in. -(setq compilation-scroll-output t) -EOF +install -m644 ${SCRDIR}/resources/emacsrc /etc/skel/.emacs +install -m644 ${SCRDIR}/resources/emacsrc /root/.emacs exit $? diff --git a/stage2/cis-nano b/stage3/cis-nano similarity index 92% rename from stage2/cis-nano rename to stage3/cis-nano index 48ffe0c..824eeff 100755 --- a/stage2/cis-nano +++ b/stage3/cis-nano @@ -23,7 +23,7 @@ cd ${LFS_TMP}/${PACKAGE}-build ${CONFIGURE_OPTS} make make install -install -m644 ${SCRDIR}/misc/nanorc /etc +install -m644 ${SCRDIR}/resources/nanorc /etc ldconfig exit $? diff --git a/stage2/cis-net-tools b/stage3/cis-net-tools similarity index 100% rename from stage2/cis-net-tools rename to stage3/cis-net-tools diff --git a/stage2/cis-nfs-utils b/stage3/cis-nfs-utils similarity index 89% rename from stage2/cis-nfs-utils rename to stage3/cis-nfs-utils index bb347e5..6a5eeda 100755 --- a/stage2/cis-nfs-utils +++ b/stage3/cis-nfs-utils @@ -31,4 +31,7 @@ cat > /etc/exports << "EOF" #/srv/www/htdocs 192.168.0.0/24(rw,sync) EOF +install -v -m740 ${SCRDIR}/bootscripts/nfs /etc/rc.d/init.d +bootscript_add_rc3 nfs 15 74 + exit $? diff --git a/stage2/cis-openssh b/stage3/cis-openssh similarity index 92% rename from stage2/cis-openssh rename to stage3/cis-openssh index c418771..078ea38 100755 --- a/stage2/cis-openssh +++ b/stage3/cis-openssh @@ -43,4 +43,7 @@ sed -i -e "s!^#X11Forwarding.*!X11Forwarding yes!g" /etc/ssh/sshd_config # Setting MaxAuthTries to 1 sed -i -e "s!^#MaxAuthTries.*!MaxAuthTries 1!g" /etc/ssh/sshd_config +install -v -m740 ${SCRDIR}/bootscripts/sshd /etc/rc.d/init.d +bootscript_add_rc3 sshd 25 70 + exit $? diff --git a/stage2/cis-openssl b/stage3/cis-openssl similarity index 100% rename from stage2/cis-openssl rename to stage3/cis-openssl diff --git a/stage2/cis-pam b/stage3/cis-pam similarity index 100% rename from stage2/cis-pam rename to stage3/cis-pam diff --git a/stage2/cis-pciutils b/stage3/cis-pciutils similarity index 100% rename from stage2/cis-pciutils rename to stage3/cis-pciutils diff --git a/stage2/cis-portmap b/stage3/cis-portmap similarity index 77% rename from stage2/cis-portmap rename to stage3/cis-portmap index 1f34931..6c45582 100755 --- a/stage2/cis-portmap +++ b/stage3/cis-portmap @@ -15,4 +15,7 @@ cd ${LFS_TMP}/${1} make -j ${MAKEJOBS} make install +install -v -m740 ${SCRDIR}/bootscripts/portmap /etc/rc.d/init.d +bootscript_add_rc3 portmap 10 75 + exit $? diff --git a/stage2/cis-reiserfsprogs b/stage3/cis-reiserfsprogs similarity index 100% rename from stage2/cis-reiserfsprogs rename to stage3/cis-reiserfsprogs diff --git a/stage2/cis-sudo b/stage3/cis-sudo similarity index 100% rename from stage2/cis-sudo rename to stage3/cis-sudo diff --git a/stage2/cis-tcl b/stage3/cis-tcl similarity index 100% rename from stage2/cis-tcl rename to stage3/cis-tcl diff --git a/stage2/cis-tcp-wrappers b/stage3/cis-tcp-wrappers similarity index 100% rename from stage2/cis-tcp-wrappers rename to stage3/cis-tcp-wrappers diff --git a/stage3/packages-update b/stage3/packages-update index a3971d6..27ce74c 100755 --- a/stage3/packages-update +++ b/stage3/packages-update @@ -17,11 +17,37 @@ export RCMD_NO_EXIT=1 update_packages_init +# These packages were already downloaded for stage1: +lpkg 1 ${NANO} + # These packages were already downloaded for stage2: lpkg 2 ${INETUTILS} lpkg 2 ${EMACS} # These packages are only for stage3 +fpkg_gnu ${EMACS} +fpkg_gnu ${WHICH} +fpkg ${REISERFSPROGS} http://www.kernel.org/pub/linux/utils/fs/reiserfs +fpkg ${PCIUTILS} ftp://ftp.kernel.org/pub/software/utils/pciutils +fpkg ${NET_TOOLS} http://www.tazenda.demon.co.uk/phil/net-tools +fpkg ${DHCP} ftp://ftp.isc.org/isc/dhcp/dhcp-3.0-history +fpkg ${POPT} http://rpm5.org/files/popt +fpkg ${PAM} http://www.kernel.org/pub/linux/libs/pam/library +fpkg ${OPENSSL} ftp://ftp.openssl.org/source +fpkg ${OPENSSL_ROOT_CERTS} http://anduin.linuxfromscratch.org/files/BLFS +fpkg ${OPENSSH} ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable +fpkg_sf ${EXPAT} +fpkg ${APR} http://apache.sunsite.ualberta.ca/apr +fpkg ${APR_UTIL} http://apache.sunsite.ualberta.ca/apr +fpkg ${NEON} http://www.webdav.org/neon +fpkg_sf ${TCL} +fpkg ${SQLITE} http://www.sqlite.org +fpkg ${SUBVERSION} http://subversion.tigris.org/downloads +fpkg ${SUDO} http://www.sudo.ws/sudo/dist +fpkg_gnu ${WGET} +fpkg ${TCPWRAPPERS} ftp://ftp.porcupine.org/pub/security +fpkg ${PORTMAP} http://neil.brown.name/portmap +fpkg ${NFS_UTILS} ftp://ftp.kernel.org/pub/linux/utils/nfs fpkg_sf ${PCRE} fpkg_sf ${STRACE} fpkg_sf ${DDCLIENT} diff --git a/stage3/resources/emacsrc b/stage3/resources/emacsrc new file mode 100644 index 0000000..9db7a0e --- /dev/null +++ b/stage3/resources/emacsrc @@ -0,0 +1,180 @@ +;; ~/.emacs + +;; Emacs initialization file. +;; Font Lock mode, Auto Compression mode, File Name Shadow +;; Mode, and mouse wheel support are enabled by default. + +;; Do not display a splash screen on startup +(setq inhibit-splash-screen t) + +;; Emacs Load Path +(setq load-path (cons "/usr/local/share/emacs/site-lisp" load-path)) + +;; Affichage du numéro de colonne +(setq column-number-mode t) + +;; Always end a file with a newline +(setq require-final-newline t) + +;; Stop at the end of the file, not just add lines +(setq next-line-add-newlines nil) + +;; Replaces tabs in files with spaces +(setq-default indent-tabs-mode nil) + +;; Makes the compilation buffer always scrolls to follow +;; output as it comes in. +(setq compilation-scroll-output t) + +;; Pour avoir les accents +(set-keyboard-coding-system 'utf-8) + +;; Set up the keyboard so the delete key on both the regular keyboard +;; and the keypad delete the character under the cursor and to the right +;; under X, instead of the default, backspace behavior. +(global-set-key [delete] 'delete-char) +(global-set-key [kp-delete] 'delete-char) + +;; For an unknow reason, the CTRL+RIGHT and RIGHT keys seem +;; to be inveerted... + +;; Map RIGHT and LEFT +;;(global-set-key [(meta O) (D)] 'backward-char) +;;(global-set-key [(meta O) (C)] 'forward-char) +;; Map CTRL+RIGHT and CTRL+LEFT +(global-set-key [C-right] 'forward-word) +(global-set-key [C-left] 'backward-word) + +;; Map Home key to beginning-of-buffer +(global-set-key "\e[1~" 'beginning-of-buffer) +;; Map End key to end-of-buffer +(global-set-key "\e[4~" 'end-of-buffer) + +;;=========================================================== +;; Key bindings for compiling programs +;;=========================================================== +;; Must add helper function for the make also, otherwise +;; the first definition caused both F3 and F4 to execute "make clean". +(defun compile-make-clean () + (interactive) ;; can be called from kbd + (compile "make clean")) + +(defun compile-make () + (interactive) + (compile "make")) + +(defun checkpatch() + (interactive) + (compile (concat "checkpatch.pl --no-tree --emacs --strict --file " (buffer-file-name)))) + +;; buffer-cycle.el +;; F1: Switch to previous buffers +(autoload 'cycle-buffer-prev "buffer-cycle" t) +(global-set-key [f1] 'cycle-buffer-prev) +;; F2: Switch to next buffers +(autoload 'cycle-buffer-next "buffer-cycle" t) +(global-set-key [f2] 'cycle-buffer-next) + +;; F4: make clean +(global-set-key [f4] 'compile-make-clean) + +;; F5: make +(global-set-key [f5] 'compile-make) + +;; F6: go to next error +(global-set-key [f6] 'next-error) + +;; F7: comment region +(global-set-key [f7] 'comment-region) + +;; F8: code indentation +(global-set-key [f8] 'indent-region) + +;; F9: run checkpatch.pl +(global-set-key [f9] 'checkpatch) + +;;================================================== +;; Modes +;;================================================== + +(defun linux-c-mode () + "C mode with adjusted defaults for use with the Linux kernel." + (interactive) + (c-mode) + (c-set-style "K&R") + ;; Replaces tabs in files with spaces + (setq indent-tabs-mode t) + (setq c-basic-offset 8)) + +(defun csv-mode () + "CSV mode." + (interactive) + (setq indent-tabs-mode t) +) + +;; Default for .h and .d files -> linux mode. +(add-to-list 'auto-mode-alist '("\.[ch]$" . linux-c-mode)) + +;; Verilog mode +(autoload 'verilog-mode "verilog-mode" "Verilog mode" t) +(add-to-list 'auto-mode-alist '("\\.v\\'" . verilog-mode)) + +;; PHP mode +(autoload 'php-mode "php-mode" "PHP mode" t) +(add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode)) + +;; ChordPro mode +(autoload 'chordpro-mode "chordpro-mode" "Chordpro mode" t) +(add-to-list 'auto-mode-alist '("\\.cp\\'" . chordpro-mode)) +(add-to-list 'auto-mode-alist '("\\.chopro\\'" . chordpro-mode)) + +;; Lilypond mode +(autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t) +(add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode)) +(add-to-list 'auto-mode-alist '("\\.ily$" . LilyPond-mode)) + +;; CSV mode +(add-to-list 'auto-mode-alist '("\\.csv$" . csv-mode)) + +;; Mutt mode +(autoload 'muttrc-mode "muttrc-mode" "Major mode to edit muttrc files" t) +(add-to-list 'auto-mode-alist '("muttrc\\'" . muttrc-mode)) + +;; When an Emacs init file gets large or has a lot of function definitions, you +;; should consider compiling it: it will load faster when Emacs starts, and its +;; functions will execute faster. +;; Here is a way to automatically compile your InitFile each time you save it: +(defun byte-compile-user-init-file () + (let ((byte-compile-warnings '(unresolved))) + ;; in case compilation fails, don't leave the old .elc around: + (when (file-exists-p (concat user-init-file ".elc")) + (delete-file (concat user-init-file ".elc"))) + (byte-compile-file user-init-file) + ;; (message "%s compiled" user-init-file) + )) +(defun my-emacs-lisp-mode-hook () + (when (equal buffer-file-name user-init-file) + (add-hook 'after-save-hook 'byte-compile-user-init-file t t))) +(add-hook 'emacs-lisp-mode-hook 'my-emacs-lisp-mode-hook) + +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(column-number-mode t) + '(current-language-environment "UTF-8")) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(default ((t (:background "black" :foreground "white" :bold t)))) + '(font-lock-comment-face ((t (:foreground "red" :bold t)))) + '(font-lock-constant-face ((t (:foreground "magenta" :bold t)))) + '(font-lock-function-name-face ((t (:foreground "blue" :bold t)))) + '(font-lock-keyword-face ((t (:foreground "cyan" :bold t)))) + '(font-lock-string-face ((t (:foreground "green" :bold t)))) + '(font-lock-type-face ((t (:foreground "red" :bold t)))) + '(font-lock-variable-name-face ((t (:foreground "yellow" :bold t)))) + '(font-lock-warning-face ((t (:foreground "magenta" :bold t))))) diff --git a/stage2/misc/nanorc b/stage3/resources/nanorc similarity index 100% rename from stage2/misc/nanorc rename to stage3/resources/nanorc diff --git a/stage3/stage3-install b/stage3/stage3-install index 511bc41..513f03a 100755 --- a/stage3/stage3-install +++ b/stage3/stage3-install @@ -23,18 +23,40 @@ init_log_file # Scripts directory export SCRDIR=$(pwd) +ipkg_cust ${NANO} cis-nano --enable-color --enable-multibuffer +ipkg_ac ${WHICH} +ipkg_cust ${EMACS} cis-emacs +ipkg_cust ${PCIUTILS} cis-pciutils +ipkg_cust ${REISERFSPROGS} cis-reiserfsprogs +ipkg_cust ${NET_TOOLS} cis-net-tools +ipkg_cust ${DHCP} cis-dhcp +ipkg_ac_nb ${POPT} +ipkg_cust ${PAM} cis-pam +ipkg_cust ${OPENSSL} cis-openssl +ipkg_cust ${OPENSSH} cis-openssh +ipkg_ac ${EXPAT} +ipkg_ac ${APR} --with-installbuilddir=/usr/lib/apr-1/build +ipkg_ac ${APR_UTIL} --with-apr=/usr/bin/apr-1-config +ipkg_ac ${NEON} --with-ssl +ipkg_cust ${TCL} cis-tcl +ipkg_ac ${SQLITE} +ipkg_ac ${SUBVERSION} +ipkg_cust ${SUDO} cis-sudo +ipkg_ac ${STRACE} ipkg_ac ${PCRE} \ --docdir=/usr/share/doc/pcre \ --enable-utf8 \ --enable-unicode-properties \ --enable-pcregrep-libz \ --enable-pcregrep-libbz2 -ipkg_ac ${STRACE} # Networking +ipkg_ac ${WGET} +ipkg_cust ${TCPWRAPPERS} cis-tcp-wrappers +ipkg_cust ${PORTMAP} cis-portmap +ipkg_cust ${NFS_UTILS} cis-nfs-utils ipkg_cust ${INETUTILS} cis-inetutils if [ "x${USE_DYNAMIC_DNS}" = "xyes" ]; then - # For updating dynamic DNS entries. ipkg_cust ${DDCLIENT} cis-ddclient fi ipkg_ac_nb ${LIBPCAP} @@ -42,18 +64,20 @@ ipkg_ac ${TCPDUMP} ipkg_ac_nb ${NMAP} --without-nmapfe ipkg_cust ${BIND} cis-bind ipkg_cust ${IPTABLES} cis-iptables +ipkg_ac ${CURL} +ipkg_ac ${RSYNC} if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then ipkg_cust ${MYSQL} cis-mysql fi +# Archiving ipkg_cust ${ZIP} cis-zip ipkg_cust ${UNZIP} cis-unzip ipkg_cust ${UNRAR} cis-unrar ipkg_ac ${CPIO} + ipkg_ac ${PARTED} --disable-device-mapper -ipkg_ac ${CURL} -ipkg_ac ${RSYNC} ipkg_ac ${ED} ipkg_ac ${BC} --with-readline INIT_D_PATH=/etc/rc.d/init.d \ diff --git a/stage5/README b/stage6/README similarity index 100% rename from stage5/README rename to stage6/README diff --git a/stage5/TODO b/stage6/TODO similarity index 100% rename from stage5/TODO rename to stage6/TODO diff --git a/stage5/cis-ac b/stage6/cis-ac similarity index 100% rename from stage5/cis-ac rename to stage6/cis-ac diff --git a/stage5/cis-ac-nobuild b/stage6/cis-ac-nobuild similarity index 100% rename from stage5/cis-ac-nobuild rename to stage6/cis-ac-nobuild diff --git a/stage5/cis-avr-libc b/stage6/cis-avr-libc similarity index 100% rename from stage5/cis-avr-libc rename to stage6/cis-avr-libc diff --git a/stage5/cis-avrdude b/stage6/cis-avrdude similarity index 100% rename from stage5/cis-avrdude rename to stage6/cis-avrdude diff --git a/stage5/cis-binutils b/stage6/cis-binutils similarity index 100% rename from stage5/cis-binutils rename to stage6/cis-binutils diff --git a/stage5/cis-gcc1 b/stage6/cis-gcc1 similarity index 100% rename from stage5/cis-gcc1 rename to stage6/cis-gcc1 diff --git a/stage5/cis-gcc2 b/stage6/cis-gcc2 similarity index 100% rename from stage5/cis-gcc2 rename to stage6/cis-gcc2 diff --git a/stage5/cis-gdb b/stage6/cis-gdb similarity index 100% rename from stage5/cis-gdb rename to stage6/cis-gdb diff --git a/stage5/cis-glibc b/stage6/cis-glibc similarity index 100% rename from stage5/cis-glibc rename to stage6/cis-glibc diff --git a/stage5/cis-kernel b/stage6/cis-kernel similarity index 100% rename from stage5/cis-kernel rename to stage6/cis-kernel diff --git a/stage5/cis-newlib b/stage6/cis-newlib similarity index 100% rename from stage5/cis-newlib rename to stage6/cis-newlib diff --git a/stage5/packages-update b/stage6/packages-update similarity index 100% rename from stage5/packages-update rename to stage6/packages-update diff --git a/stage5/stage5-additions b/stage6/stage5-additions similarity index 100% rename from stage5/stage5-additions rename to stage6/stage5-additions diff --git a/stage5/stage5-install-arm b/stage6/stage5-install-arm similarity index 100% rename from stage5/stage5-install-arm rename to stage6/stage5-install-arm diff --git a/stage5/stage5-install-avr b/stage6/stage5-install-avr similarity index 100% rename from stage5/stage5-install-avr rename to stage6/stage5-install-avr diff --git a/stage5/stage5-install-geda b/stage6/stage5-install-geda similarity index 100% rename from stage5/stage5-install-geda rename to stage6/stage5-install-geda diff --git a/stage5/stage5-install-ppc b/stage6/stage5-install-ppc similarity index 100% rename from stage5/stage5-install-ppc rename to stage6/stage5-install-ppc -- 2.20.1