Changeset 725


Ignore:
Timestamp:
Nov 21, 2007 3:14:44 PM (6 years ago)
Author:
jrollins
Message:

debirf: finalizing changes for non-root operation

Location:
trunk/debirf
Files:
1 added
1 deleted
8 edited
2 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/debirf/debian/changelog

    r720 r725  
    22 
    33  * changed debootstrap to run with fakechroot 
    4   * changed plugins to run under fakeroot 
    5   * the above changes mean being root is not necessary to make-debirf. 
    6   * ***STILL IN DEVELOPMENT*** 
     4  * changed plugins to run under fakeroot, and debirf_exec to use fakechroot 
     5  * being root is no longer necessary to make-debirf, therefore make-debirf was moved to /usr/bin/ 
     6  * debirf can now function with stock debian kernels (as of 2.6.22), in rootfs 
     7  * /var/lib/debirf no longer included.  default buildd is ~/.debirf 
     8  * removed /etc/debirf in favor of doc/example-profiles 
    79 
    8  -- Jameson Rollins <jrollins@fifthhorseman.net>  Wed, 21 Nov 2007 01:32:50 -0500 
     10 -- Jameson Rollins <jrollins@fifthhorseman.net>  Wed, 21 Nov 2007 15:11:46 -0500 
    911 
    1012debirf (0.5) unstable; urgency=low 
  • trunk/debirf/debian/debirf.links

    r724 r725  
    1 /usr/share/debirf/plugins/a0_prep-root /etc/debirf/profiles/minimal/plugins/a0_prep-root 
    2 /usr/share/debirf/plugins/a0_motd /etc/debirf/profiles/minimal/plugins/a0_motd 
    3 /usr/share/debirf/plugins/bootlog /etc/debirf/profiles/minimal/plugins/bootlog 
    4 /usr/share/debirf/plugins/hostname /etc/debirf/profiles/minimal/plugins/hostname 
    5 /usr/share/debirf/plugins/install-kernel /etc/debirf/profiles/minimal/plugins/install-kernel 
    6 /usr/share/debirf/plugins/interfaces /etc/debirf/profiles/minimal/plugins/interfaces 
    7 /usr/share/debirf/plugins/root-bashrc /etc/debirf/profiles/minimal/plugins/root-bashrc 
    8 /usr/share/debirf/plugins/z0_remove-locales /etc/debirf/profiles/minimal/plugins/z0_remove-locales 
    9 /usr/share/debirf/plugins/z1_clean-root /etc/debirf/profiles/minimal/plugins/z1_clean-root 
     1/usr/share/debirf/plugins/a0_prep-root /usr/share/doc/debirf/example-profiles/minimal/plugins/a0_prep-root 
     2/usr/share/debirf/plugins/a0_motd /usr/share/doc/debirf/example-profiles/minimal/plugins/a0_motd 
     3/usr/share/debirf/plugins/bootlog /usr/share/doc/debirf/example-profiles/minimal/plugins/bootlog 
     4/usr/share/debirf/plugins/hostname /usr/share/doc/debirf/example-profiles/minimal/plugins/hostname 
     5/usr/share/debirf/plugins/install-kernel /usr/share/doc/debirf/example-profiles/minimal/plugins/install-kernel 
     6/usr/share/debirf/plugins/interfaces /usr/share/doc/debirf/example-profiles/minimal/plugins/interfaces 
     7/usr/share/debirf/plugins/root-bashrc /usr/share/doc/debirf/example-profiles/minimal/plugins/root-bashrc 
     8/usr/share/debirf/plugins/z0_remove-locales /usr/share/doc/debirf/example-profiles/minimal/plugins/z0_remove-locales 
     9/usr/share/debirf/plugins/z1_clean-root /usr/share/doc/debirf/example-profiles/minimal/plugins/z1_clean-root 
    1010 
    11 /usr/share/debirf/plugins/a0_prep-root /etc/debirf/profiles/rescue/plugins/a0_prep-root 
    12 /usr/share/debirf/plugins/a0_motd /etc/debirf/profiles/rescue/plugins/a0_motd 
    13 /usr/share/debirf/plugins/apt-get-disk-rescue /etc/debirf/profiles/rescue/plugins/apt-get-disk-rescue 
    14 /usr/share/debirf/plugins/bootlog /etc/debirf/profiles/rescue/plugins/bootlog 
    15 /usr/share/debirf/plugins/hostname /etc/debirf/profiles/rescue/plugins/hostname 
    16 /usr/share/debirf/plugins/install-kernel /etc/debirf/profiles/rescue/plugins/install-kernel 
    17 /usr/share/debirf/plugins/interfaces /etc/debirf/profiles/rescue/plugins/interfaces 
    18 /usr/share/debirf/plugins/root-bashrc /etc/debirf/profiles/rescue/plugins/root-bashrc 
    19 /usr/share/debirf/plugins/serial-terminal /etc/debirf/profiles/rescue/plugins/serial-terminal 
    20 /usr/share/debirf/plugins/z0_remove-locales /etc/debirf/profiles/rescue/plugins/z0_remove-locales 
    21 /usr/share/debirf/plugins/z1_clean-root /etc/debirf/profiles/rescue/plugins/z1_clean-root 
     11/usr/share/debirf/plugins/a0_prep-root /usr/share/doc/debirf/example-profiles/rescue/plugins/a0_prep-root 
     12/usr/share/debirf/plugins/a0_motd /usr/share/doc/debirf/example-profiles/rescue/plugins/a0_motd 
     13/usr/share/debirf/plugins/apt-get-disk-rescue /usr/share/doc/debirf/example-profiles/rescue/plugins/apt-get-disk-rescue 
     14/usr/share/debirf/plugins/bootlog /usr/share/doc/debirf/example-profiles/rescue/plugins/bootlog 
     15/usr/share/debirf/plugins/hostname /usr/share/doc/debirf/example-profiles/rescue/plugins/hostname 
     16/usr/share/debirf/plugins/install-kernel /usr/share/doc/debirf/example-profiles/rescue/plugins/install-kernel 
     17/usr/share/debirf/plugins/interfaces /usr/share/doc/debirf/example-profiles/rescue/plugins/interfaces 
     18/usr/share/debirf/plugins/root-bashrc /usr/share/doc/debirf/example-profiles/rescue/plugins/root-bashrc 
     19/usr/share/debirf/plugins/serial-terminal /usr/share/doc/debirf/example-profiles/rescue/plugins/serial-terminal 
     20/usr/share/debirf/plugins/z0_remove-locales /usr/share/doc/debirf/example-profiles/rescue/plugins/z0_remove-locales 
     21/usr/share/debirf/plugins/z1_clean-root /usr/share/doc/debirf/example-profiles/rescue/plugins/z1_clean-root 
  • trunk/debirf/doc/example-profiles/minimal/debirf.conf

    r691 r725  
    77 
    88# where to build the debirf 
    9 #DEBIRF_BUILDD="/var/lib/debirf" 
     9#DEBIRF_BUILDD="~/debirf" 
    1010 
    1111# the debirf root, used by plugins 
  • trunk/debirf/doc/example-profiles/rescue/debirf.conf

    r691 r725  
    77 
    88# where to build the debirf 
    9 #DEBIRF_BUILDD="/var/lib/debirf" 
     9#DEBIRF_BUILDD="~/.debirf" 
    1010 
    1111# the debirf root, used by plugins 
  • trunk/debirf/fs/usr/bin/make-debirf

    r721 r725  
    1 #!/bin/bash -e 
    2  
    3 # make-debirf: script to build debirf system (must be root). 
     1#!/bin/bash 
     2 
     3# make-debirf: script to build debirf system. 
    44# 
    55# The debirf scripts were written by 
     
    3939    # exclude aptitude 
    4040    mkdir -p "$DEBIRF_ROOT" 
    41     #/usr/sbin/debootstrap --exclude=aptitude "$DEBIRF_DISTRO" "$DEBIRF_ROOT" "$DEBIRF_MIRROR" 
    4241    fakeroot -s "$DEBIRF_FAKECHROOT_STATE" fakechroot debootstrap --variant=fakechroot "$DEBIRF_DISTRO" "$DEBIRF_ROOT" "$DEBIRF_MIRROR" 
    4342} 
     
    4847        export $var 
    4948    done 
    50     #run-parts --verbose "$DEBIRF_PLUGINS" 
    5149    fakeroot -i "$DEBIRF_FAKECHROOT_STATE" -s "$DEBIRF_FAKECHROOT_STATE" run-parts --verbose "$DEBIRF_PLUGINS" 
    5250} 
     
    6058     
    6159    # create root image 
    62     msg "creating debirf initrd..." 
    6360    ( cd "$DEBIRF_ROOT" && find * | cpio -H newc --create  | gzip ) > "$1" 
    6461} 
     
    8380EOF 
    8481    # create root image 
    85     msg "creating debirf initrd..." 
    8682    cp initrd.img* "$1" 
    8783    ( cd "$DEBIRF_ROOT" && find * | cpio -H newc --create  | gzip ) >> "$1" 
     
    107103 
    108104    # create root image 
    109     msg "creating debirf initrd..." 
    110105    ( cd "$DEBIRF_ROOT" && find * | cpio -H newc --create  | gzip ) > "$1" 
    111 } 
    112  
    113 # mount sys, proc 
    114 mount_proc-sys() { 
    115     msg "mounting proc..." 
    116     mount -t proc proc "$DEBIRF_ROOT/proc" 
    117     msg "mounting sys..." 
    118     mount -t sysfs sys "$DEBIRF_ROOT/sys" 
    119 } 
    120  
    121 # umount sys, proc 
    122 umount_proc-sys() { 
    123     [ "$DEBIRF_ROOT" ] || exit 
    124     if mount | grep -q "$DEBIRF_ROOT/proc" ; then 
    125         msg "umounting proc..." 
    126         umount "$DEBIRF_ROOT/proc" || failure "Can not umount proc." 
    127     fi 
    128     if mount | grep -q "$DEBIRF_ROOT/sys" ; then 
    129         msg "umounting sys..." 
    130         umount "$DEBIRF_ROOT/sys" || failure "Can not umount sys." 
    131     fi 
    132106} 
    133107 
     
    254228setup_debirf_info 
    255229 
     230# run plugins 
    256231if [ "$DEBIRF_PLUGINS" ] ; then 
    257     #mount_proc-sys 
    258      
    259     # run plugins 
    260232    msg "executing plugins..." 
    261233    run_plugins 
    262234    msg "plugins complete." 
    263  
    264     #umount_proc-sys 
    265235fi 
    266236 
     
    274244KERNAVAIL=$(ls -1 "$DEBIRF_ROOT/lib/modules" | head -n1) 
    275245DEBIRF_INITRD="${DEBIRF_LABEL}_${DEBIRF_DISTRO}_${KERNAVAIL}.cgz" 
     246msg "creating debirf initrd..." 
    276247create_initrd_${DEBIRF_METHOD} "$DEBIRF_BUILDD/$DEBIRF_INITRD" 
    277248 
  • trunk/debirf/fs/usr/share/debirf/debirf.conf.defaults

    r488 r725  
    55 
    66# where to build the debirf 
    7 DEBIRF_BUILDD=${DEBIRF_BUILDD:-"/var/lib/debirf"} 
     7DEBIRF_BUILDD=${DEBIRF_BUILDD:-"~/.debirf"} 
    88 
    99# the debirf root, used by plugins 
  • trunk/debirf/fs/usr/share/debirf/plugins/a0_prep-root

    r724 r725  
    1212# or later. 
    1313 
    14 # functions to write files in debirf root /etc 
    15 ### ONLY RUN WITH debirf_exec ! ### 
    16 write_etc_hostname() { 
    17     echo "$DEBIRF_LABEL" > /etc/hostname 
    18 } 
     14# write all the debirf environment variables to the on-root debirf config file 
     15debirf_info_comment 'the following config variables were set during build:' 
     16for var in ${!DEBIRF_*}; do 
     17    debirf_info_sh "${var}=${!var}" 
     18done 
    1919 
    20 write_etc_hosts() { 
    21     cat <<EOF > /etc/hosts 
     20# write /etc/hostname 
     21echo "$DEBIRF_LABEL" > "${DEBIRF_ROOT}/etc/hostname" 
     22 
     23# write /etc/hosts 
     24cat > "${DEBIRF_ROOT}/etc/hosts" <<EOF 
    2225127.0.0.1       localhost $DEBIRF_LABEL 
    2326 
     
    3033ff02::3 ip6-allhosts 
    3134EOF 
    32 } 
    33  
    34 # write all the debirf environment variables to the on-root debirf config file 
    35 debirf_info_comment 'the following config variables were set during build:' 
    36 for var in ${!DEBIRF_*}; do 
    37     debirf_info_sh "${var}=${!var}" 
    38 done 
    39  
    40 # write /etc/hostname 
    41 debirf_exec write_etc_hostname 
    42 # write /etc/hosts 
    43 debirf_exec write_etc_hosts 
    4435 
    4536# update apt 
  • trunk/debirf/fs/usr/share/debirf/plugins/install-kernel

    r721 r725  
    2121    debirf_exec dpkg --install "root/$KNAME" 
    2222    # and clean up, just in case there were missing dependencies. 
    23     debirf_exec apt-get --assume-yes -f install 
     23    debirf_exec apt-get --assume-yes --force-yes -f install 
    2424    rm "$DEBIRF_ROOT/root/$KNAME" 
    2525} 
Note: See TracChangeset for help on using the changeset viewer.