# abort on any error: set -e # Used by --update and --apply: chappa_patchdir=chappa-patches echo_others() { # Note: This function is updated by the function update_OTHERS_section, it's # very sensitive to change, the part below must stay as it is or # you will loose this script in the update process if you say "y": cat<author's patch web page. OTHERS } echo_patch_help() { cat <(more...) maildir Maildir Patch. (more...) fillpara Pine justifies paragraphs with more than one level of indentation. (more...) rules Rules patch, to make Pine flexible. (more...) compose Send mail from the command line. WrtAcc Write accents like á, é, ñ etc. circtab Tab check folders on cycles. (more...) count Get the number of new messages when opening a folder. insertpat Reinsert the pattern you searched for last. patchlevel Shows the patchlevel of alpine picoreplacecrash Fix a bug that makes Pico crash in the replace command replacebug Fix a bug in Pico which makes it not update the screen digestbug Fix a bug that makes Alpine not display digests stuffingbug Fix a bug that makes Alpine add spaces to flowed text messages reply New Reply command menu.(more...) fromheader Change your From header without any effort! composeurl Choose a role when composing a message from a mailto: link. colortext Paint special text in the body of the message in any custom color. (more...) searchheader Select messages by the content of an arbitrary header. DelText Delete until the the end of a file, or message (press ^W^X). quota Get the QUOTA information from an IMAP server (if such server supports e QUOTA command). help Get the internal name of a help topic to use it with a x-pine-help URL scheme. ignoresize Decide if you want to ignore errors in size changes of a message when saving a message from an IMAP server. status Fix the update of the status line information in pico unverified Fix a bug that makes Alpine not to give a warning if the Newsgroup header is present utf8bug Fix a bug that makes Alpine filter incorrectly in the UTF-8 filter. END echo_others } #================================================================================== # The following functions are only used for --update: # # # This function decided which patches are downloaded, and packaged: # Every patch which shall be, is echoed, every patch which shall be not is not. # If it encounters a new patch, it is printed on stderror # print_which_shall_be_packaged() { #grep '"info/' index.html | sed 's/.LI.\(.*\)<.*NAME="\([^"]*\)".*/\2 \1/'| wget -m http://staff.washington.edu/chappa/alpine/readme/README.upgrade >&2 error_out= while read name text do case "$name" in cygwin|all|windows) : 'always ignored';; WrtAcc|fancy|maildir|colortext|insertpat|[ors]*bug|*crash) : 'really wanted' echo "$name";; utf8bug|digestbug|ignoresize|searchheader) : 'also wanted' echo "$name";; unverified) : 'also wanted' echo "$name";; rules) : 'conflicts with others and would need extra work' #echo "$name" ;; help|status|reply|DelText|outgoing|count) : 'not important enough';; quota|composeurl|fromheader|circtab) : 'rather not';; patchlevel) : 'lets see';; marksmtpbug) : 'not found';; fillpara) : 'rather dangerous';; password|'#') : 'internal';; *) error_out=1;echo NEW $name;; esac done ,//;s/ Posted.*//;s/which fixes/Fix/;s/which changes/Change/;s/which adds/Add/' \ >others sed '/^cat..OTHERS$/,/^OTHERS$/{/^cat..OTHERS$/b ins;/^OTHERS/p;d};p;d;:ins;r others' ../$0 >change diff ../$0 change || { echo -n "DANGEROUS may loose script work: Apply these changes to $0 (y/*)?" read answer if [ "$answer" = y ]; then cat change >../$0 rm change echo "OTHERS_section updated, restarting from scratch!" cd .. exec bash $0 --update $2 else echo "OTHERS_section updated, please check and do it." exit fi } rm change } check_patch_list() { missing= for name in `ls $chappa_patchdir` do helpentry=`echo_patch_help | sed -n "s/^$name //p"` printf "%-22s %s\n" $name "'$helpentry'" if [ -z "$helpentry" ]; then missing="$missing $name" fi done if [ "$missing" ]; then echo "=======> help entries for $missing are missing, existing - please fix!" exit 4 else echo "---> No help entries are missing" >&2 fi } update_packaged_patches() { mkdir -p test;cd test do_update=true print_which_shall_be_packaged || exit #do_update=false if $do_update;then update_OTHERS_section rm -f index.html wget http://staff.washington.edu/chappa/alpine/ wget -m $(list_packaged_patches_urls) fi #print_which_shall_be_packaged | sed 's/.*/^& /' >shall-be-packaged.patterns #grep '"info/' index.html | sed 's/.LI.\(.*\)<.*NAME="\([^"]*\)".*/\2 \1/'| # grep -f shall-be-packaged.patterns | sed 's/[^ ]* //' >patch-summaries.txt rm -rf $chappa_patchdir mkdir $chappa_patchdir print_which_shall_be_packaged | while read name rest; do if [ "$name" = NEW: ]; then exit fi zcat `get_patch_path $name` >$chappa_patchdir/$name touch -r `get_patch_path $name` $chappa_patchdir/$name done check_patch_list print_which_shall_be_packaged | while read name rest; do if echo_patch_help | sed -n "s/^$name //p"| grep HREF; then : else wget --timestamping -x http://staff.washington.edu/chappa/alpine/info/$name.html || : if [ -s staff.washington.edu/chappa/alpine/info/$name.html ]; then sed '0,/is available for version/d;/\/'$name'.patch/d;/<.[tT][dD]><.[tT][rR]><.[tT][aA][bB][lL][eE]>/,$d' \ staff.washington.edu/chappa/alpine/info/$name.html | iconv -f latin1 -t UTF-8 >$chappa_patchdir/$name.hlp fi fi zcat `get_patch_path $name` >$chappa_patchdir/$name done find $chappa_patchdir -name '*.hlp' -size 0|xargs --no-run-if-empty rm cd - lzma -dc $chappa_patchdir.tar.lzma | tar xvf - diff -r $chappa_patchdir test/$chappa_patchdir | less echo -n 'Changes OK, update $chappa_patchdir.tar.lzma (y/*)? ' read answer if [ "$answer" = y ]; then cd test tar cf ../$chappa_patchdir.tar $chappa_patchdir cd .. tar tfv $chappa_patchdir.tar | sort +5 echo "Compressing using lzma..." old chappa-patches.tar.lzma lzma -9 $chappa_patchdir.tar else echo "$chappa_patchdir.tar.lzma NOT updated!" fi } if [ "$1" = "--update" ]; then set -eu version=$2 update_packaged_patches exit fi if [ "$1" = "--cleanup" ]; then rm -rf test exit fi # Everything above is only for update and cleanup if [ "$1" != "--apply" ]; then echo "cherrypick.sh can either update $chappa_patchdir.tar.lzma, cleanup or apply the patches" echo "usage: cherrypick [ --update | --cleanup | --apply ]" exit 5 fi if [ "$0" -nt "$2" ]; then echo "Attention: $0 is newer than $2 If the update of ${0##*/} needs to change $chappa_patchdir.tar.lzma, you should run: sh ${0##*/} --update otherwise run: touch -r chappa-cherrypick.sh chappa-patches.tar.lzma " exit 4 fi # Everything below is only for apply, it applies all patches in $2 # and generates a patch to pine.hlp which describes the applied patches. print_hlp_pages() { ls $chappa_patchdir | while read name; do if [ -f $chappa_patchdir/$name.hlp ]; then title=`echo_patch_help | sed -n "s/^$name //p"` cat < $title

$title

END # Unlike pure html, alpine's hlp viewer needs # backslashes escaped: sed 's/\\/\\\\/g;s/\\\\"/\\\\\"/g' $chappa_patchdir/$name.hlp echo '' fi done } echo_patch_list() { ls $chappa_patchdir | while read name; do case "$name" in *.hlp) continue;; esac helpentry=`echo_patch_help | sed -n "s/^$name //p"` echo "

  • $helpentry" if [ -f $chappa_patchdir/$name.hlp ]; then echo " (more...)" fi done } generate_patch_help() { ( print_hlp_pages cat < Information on checking for known issues and reporting new issues

    Information on checking for known issues and reporting new issues

    If you have any issues while using this release of Alpine, please search the Novell bugzilla using the advanced search form at http://bugzilla.novell.com/query.cgi and enter "alpine" into the search field for "Summary". In order to see all issues which have been reported so far, unselect all preselections in the Status list of the Impact Section, by holding the Control key while clicking on NEW, ASSIGNED, NEEDINFO an REOPENED before clicking on "Search".

    If your issue is not found in the Novell Bugzilla, please sign in to the Novell Bugzilla and report the issue. You can also visit the Alpine Information Center, and the Alpine-alpha mailing list archive. On the Alpine-alpha mailing list, you can also report and discuss issues.

    Be sure to include the full openSUSE version of alpine (found at the top of this release notes page) in all reports which you make. ====== h_opensuse_patches ====== Information on patches added to this release

    Information on patches added to this release

    This version of Alpine has been modified by including patches from http://staff.washington.edu/chappa/alpine/. These patches include new features and bug fixes. More complete information on each patch included in this version can be found in the web.

    If you have any problems with this release of Pine, please follow the suggestions here

    The list of patches included in this release are:

      END echo_patch_list echo "
    " ) } generate_help_patch() { cat <University of Washington +

    Note: This version of Alpine has been built for openSUSE with +patches of Eduardo Chappa for latest bugfixes and enhanced functionality. +Press ENTER on the link above for more information. +

    Alpine is an "Alternatively Licensed Program for Internet News and Email" produced by the University of Washington. END lines=$(generate_patch_help |wc -l) start=1171 echo "@@ -$start,6 +`expr $start + 1`,`expr $lines + 6` @@" cat < END generate_patch_help | sed 's/^/+/' cat < END } lzma -dc $2 | tar xf - if generate_help_patch | patch -p1; then echo "generated patch applied" else echo "generated patch failed to apply" exit 5 fi rm $chappa_patchdir/*.hlp for patch in $chappa_patchdir/*;do echo echo "Applying $patch" if patch -p1 -i$patch; then echo "$patch applied" else echo "$patch failed to apply" exit 5 fi done exit