1: #!/usr/bin/env bash
     2: cat << EOF >> /dev/null
     3: =============================================================================
     4: =============================================================================
     5: 
     6:                    VirOS Ancestor Rebasing Guide
     7: 
     8: =============================================================================
     9: =============================================================================
    10: 
    11: 
    12: =============================================================================
    13: Overview
    14: -----------------------------------------------------------------------------
    15: 
    16: Rebasing against a major ancestor/upstream release is currently a rather
    17: involved process.  As the wisdom of pushing as much as possible upstream
    18: progresses, as well as refactoring/resequencing VirOS itself continues,
    19: this process should hopefully reach some nearly push-button level minimum.
    20: But...  that's tomrrow, this is today, and here are the notes used for
    21: the f12 rebase
    22: 
    23: =============================================================================
    24: Creating a new ancestor type as a copy of the previous version
    25: -----------------------------------------------------------------------------
    26: 
    27: EOF
    28: 
    29: # set old and new ancestor versions
    30: old_fbase=11
    31: new_fbase=12
    32: 
    33: old_orkbase="0.9.$(( ${old_fbase} - 9 ))"
    34: old_gbase="0.$(( ${old_fbase} - 7 ))"
    35: # not quite so automatic
    36: old_gbase="${old_gbase}.1"
    37: 
    38: new_orkbase="0.9.$(( ${new_fbase} - 9 ))"
    39: new_gbase="0.$(( ${new_fbase} - 7 )).0"
    40: 
    41: 
    42: # calculate abbreviations
    43: old_gbase_short=$( echo ${old_gbase} | sed -e 's/\([^\.]*\.[^\.]*\).*/\1/' )
    44: new_gbase_short=$( echo ${new_gbase} | sed -e 's/\([^\.]*\.[^\.]*\).*/\1/' )
    45: 
    46: echo -en "\n\nrebasing parameters:\n\n"
    47: echo "old_fbase: ${old_fbase}"
    48: echo "new_fbase: ${new_fbase}"
    49: 
    50: echo "old_orkbase: ${old_orkbase}"
    51: echo "old_gbase: ${old_gbase}"
    52: echo "old_gbase_short: ${old_gbase_short}"
    53: 
    54: echo "new_orkbase: ${new_orkbase}"
    55: echo "new_gbase: ${new_gbase}"
    56: echo "new_gbase_short: ${new_gbase_short}"
    57: 
    58: echo -en "\n\n</rebasing parameters>\n\n"
    59: 
    60: progdir=$( dirname $( readlink -e "${0}" ) )
    61: progname=$( basename $( readlink -e "${0}" ) )
    62: 
    63: cd ${progdir}/../..
    64: 
    65: echo "pwd is $( pwd )"
    66: 
    67: rm -f ancestors/fedora-${new_fbase}
    68: cp -av \
    69:    ancestors/fedora-${old_fbase} \
    70:    ancestors/fedora-${new_fbase}
    71: 
    72: rm -f ancestors/default
    73: ln -s \
    74:     g-zyx-${new_gbase_short} \
    75:     ancestors/default
    76: 
    77: cp \
    78:     strains/F-ZyX-${old_gbase_short}.ks \
    79:     strains/F-ZyX-${new_gbase_short}.ks 
    80: 
    81: cp \
    82:     strains/F-ZyX-${old_gbase_short}.vml \
    83:     strains/F-ZyX-${new_gbase_short}.vml 
    84: 
    85: cp \
    86:     strains/Fork-ZyX-${old_orkbase}.vml \
    87:     strains/Fork-ZyX-${new_orkbase}.vml 
    88: 
    89: cp \
    90:     strains/G-ZyX-${old_gbase}.vml \
    91:     strains/G-ZyX-${new_gbase}.vml
    92: 
    93: cp \
    94:     strains/Guitar-ZyX-${old_gbase}.vml \
    95:     strains/Guitar-ZyX-${new_gbase}.vml
    96: 
    97: 
    98: cat << EOF >> /dev/null
    99: =============================================================================
   100: 
   101: check
   102: - then edit .vml files, making appropriate adjustments
   103:   - todo: just make good sed commands in script above
   104: 
   105: Creating the initial ancestor specific lowlevel config (kickstart/preseed/)
   106: -----------------------------------------------------------------------------
   107: 
   108: check
   109: - get spin-kickstarts package from fedora repo, use non-updates as that
   110:   is presumably what was used to spin the main release (though update
   111:   looks to be pretty minimal via changelogs, so I'll use, easy enough
   112:   to 3way diff that later if suspect)
   113: - 3way merge, in one window, meld prior fedora vs gz ks, then in
   114:   edit window, merge previous gz into current fedora
   115: 
   116: check
   117: mirror_base_dir="/mnt/big/pub/org/info/mirrors"
   118: # make ${mirror_base_dir}/f${new_fbase}/viros.mirrors.cfg
   119: # note: this could be a simple automagic cgi script
   120: ls -1A ${mirror_base_dir}/f${new_fbase}/ | grep ___ \
   121:     > ${mirror_base_dir}/f${new_fbase}/viros.mirrors.cfg
   122: 
   123: check
   124: - fitness/zbuild 
   125:   - mirrors.cfg path
   126:   - strain_version
   127: 
   128: check (need to improve)
   129: - ancestor vxmog qfakeroot.config has hardcoded memtest86+ version
   130: 
   131: check (but ugly)
   132: new - copied compose.repos to compose.repos.f12, and adjusted in all the new vml
   133: 
   134: =========== one time (not obviously subsequently relevent) issues ==============
   135: 
   136: d need unused common defaults for netinstiso and checksum, to feed to
   137:   - tools/scripts/synthesize, adust defaults
   138:   - tools/scripts/generate, ditto
   139:   - strains/F-ZyX-0.4.vml, ditto
   140:   - unused because new F-ZyX-VERSION.vml will have the used version
   141: 
   142: d nash gone, now switch_root
   143: 
   144: d plymouth
   145: 
   146: d added qreaper back to synth, though after removing some acpi= kern args
   147: 
   148: d memtest version in qfakeroot.config of zyx-live vxmog
   149: 
   150: d rc.sysinit.zyx
   151: 
   152: ******************** undone/todo
   153: 
   154: todo- actually test persistent /home with 0.4.1, litd rebase, lusb-creator-mod
   155: 
   156: 
   157: 
   158: ****************** defer till f12 native
   159: 
   160: - functions/halt
   161: - unwind ksflatten workaround (if indeed bug is fixed)
   162: - xrandr brightness... gdm , etc x11 prefdm (--no-daemon is called by event.d, so have it do startx
   163: 
   164: ================================================================================
   165: ================================================================================
   166: EOF
   167: 
   168: