General Haiku Discussion

Here you can talk about anything relating to Haiku.

Automated nightly installer

Forum thread started by Kev on Sat, 2013-04-06 22:29

Finding Haiku stable enough to use on a daily basis, but also finding bugs, I've found lately that to make sure I'm not reporting something that is fixed in the latest nightly, I download and install nightlies quite a bit. Personally, I have two Haiku partitions, one "stable" and one "nightly". After the Nth time of doing a bunch of manual tasks to accomplish setting my Haiku nightly the way I like it after a fresh install, I thought, why I don't I write a simple script that I can launch from "stable" that will back up a few basic settings and my desktop, download the latest nightly, wipe out my "nightly" partition, install the latest, and put my settings back.

I can hear a few possible objections:

1) it's not generally accepted to have the "general public" using nightlies all the time
2) settings files might change format, so this might cause problems
3) not everyone has two dedicated Haiku partitions so this might be of limited usefulness
4) using cp -r instead of the Installer may not be a supported installation method

Nonetheless, if you're actively testing things, happen to have two partitions, and don't mind working with the caveat of changing settings file formats, I thought it might be useful. For me, it just means that the longer parts (downloading, backing up/restoring, copying) can be run back-to-back unattended, so I can do this and go for a lunch break or whatever, without having to run back every few minutes, and expect a fresh, current desktop when I return.

As for Installer if someone could advise that'd be great. I think I was once told this but the issue was more that I was dragging and dropping over an existing install, rather than wiping it clean and then copying all files.

Would anybody be interested in it? Or did everybody else write their own version of this a long time ago? :-]

Update: Okay, if ModeenF is interested, that's good enough for me. Also updated to incorporate SuperUser answers. There are some assumptions:

1. your nightly volume is /Haiku-testing/
2. you want the latest gcc4hybrid .tar.xz
3. you don't mind keeping old images in ~ (the script lets you specify an old image .tar.xz on the command line if you want to revert to it)
4. there are certain files you want to back up and certain ones you want to unzip after a reinstall--these probably won't be what you want!
5. your /Haiku-testing/ partition is /dev/disk/ata/0/master/3

So with that and the assumption that this will destroy everything (after all, it does contain an rm -r command) and you accept all responsibility for using it, you might find this a useful starting point:

	

    #! /bin/sh
    set -e
    # HAIKU_FILES_URL=http://www.haiku-files.org/unsupported-builds/x86-gcc4hybrid/
    HAIKU_FILES_URL=http://www.haiku-files.org/haiku/development/
    HAIKU_TAR_XZ=$1
    cd ~
    if [ ! -e $HAIKU_TAR_XZ ]; then
      echo "$HAIKU_TAR_XZ not found"
      HAIKU_TAR_XZ=
    fi
    if [ "$HAIKU_TAR_XZ" == "" ]; then
      echo "Getting latest Haiku version (you can also supply a .tar.xz filename on the command line)"
      wget -q $HAIKU_FILES_URL -O latest-haiku.html
      HAIKU_TAR_XZ=`perl -ne 'print if /VMDK/../raw\.tar\.xz/' ~/latest-haiku.html | perl -ne '/\.\/(.*raw\.tar\.xz)/;print $1'`
      rm latest-haiku.html
    fi
    read -r -p "Are you sure you want to back up only part of /Haiku_Nightly, trash it, then install $HAIKU_TAR_XZ? [y/N]" YESNO
    if [ "$YESNO" != "y" ]; then
      echo >&2 "Aborting"
      exit 1
    fi
    if [ ! -e $HAIKU_TAR_XZ ]; then
      wget $HAIKU_FILES_URL$HAIKU_TAR_XZ
    fi
    echo "Backing up some settings, ~/config/bin, ~/setup, and ~/Desktop from /Haiku_Nightly"
    unmount /Haiku_Nightly
    if [ -e /Haiku_Nightly/_HaikuAutoCreated ]; then
      rmdir /Haiku_Nightly/_HaikuAutoCreated
      rmdir /Haiku_Nightly
    fi
    mkdir /Haiku_Nightly
    mount /dev/disk/ata/0/master/0_2 /Haiku_Nightly
    TIMESTAMP=`date +%Y%m%d%H%M`
    checkfs /boot
    set +e
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/settings/time_dststatus
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/settings/shortcuts_settings
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/settings/Key_map
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/settings/RTC_time_settings
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/settings/Time\ settings
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/settings/Keyboard_settings
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/settings/Tracker/TrackerSettings
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/non-packaged/bin/*
    # following line for cronie port
    zip -yr Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/apps/*
    zip -yr Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/notes/*
    zip -yr Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/notes/.hg/*
    zip -yr Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/todo/*
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/*
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/.*
    zip -yr Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/setup/*
    zip -yr Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/Desktop/* -x Home
    # it's possible the next line may not be a good idea, but I want a fifth screen...
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /boot/home/config/settings/Screen_data
    zip -yr Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/settings/WebPositive/*
    # zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/settings/WebPositive/Bookmarks/*
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/system/settings/etc/profile.d/bash_completion_todo.sh
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/system/settings/etc/profile.d/kevhome.sh
    # the following line is a workaround for the bug where shortcuts don't work out-of-the-box since some time after the last alpha
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/non-packaged/add-ons/input_server/filters/shortcut_catcher
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/settings/pe/keybindings
    zip Haiku_Nightly-backup-$TIMESTAMP.zip /Haiku_Nightly/home/config/settings/boot/launch/*
    set -e
    echo "Unzipping Haiku image"
    tar -x --xz -f $HAIKU_TAR_XZ
    mkdir /ht
    mount haiku-nightly.image /ht
    echo "Trashing /Haiku_Nightly/"
    unmount -f /Haiku_Nightly/
    mkfs -q -t bfs /dev/disk/ata/0/master/0_2 Haiku_Nightly
    mount /dev/disk/ata/0/master/0_2 /Haiku_Nightly
    echo "Installing $HAIKU_TAR_XZ"
    cp -Rd /ht/* /Haiku_Nightly/
    unmount /ht
    makebootable /Haiku_Nightly
    echo "Restoring backup"
    cd /
    set +e
    unzip -o ~/Haiku_Nightly-backup-$TIMESTAMP.zip
    set -e
    echo "Tidying up"
    cd ~
    rm haiku-nightly.image
    rm ReadMe.txt
    shutdown -r

-K

PS If anyone wants to help me improve this script, I have a couple SuperUser questions unanswered:
http://superuser.com/questions/579069/unattended-installation-of-a-pkg-f...
(new one not in original post) http://superuser.com/questions/579836/how-to-get-something-to-start-on-n...

Thanks for BSnow!

Forum thread started by macsnafu on Fri, 2013-04-05 23:13

I just wanted to say thanks for including BSnow--an excellent use of a replicant on the Haiku. I've always liked XSnow from the *Nix systems, and now it's on Haiku! But where's Santa and the reindeer? ;-)

problems with cdrecord3.01a07/08

Forum thread started by Morbid on Sun, 2013-03-31 23:55

Hallo everyone,

have tried to blank a CD-RW 700MB with this Command:
cdrecord dev=2,3,0 speed=8 blank=fast/disk
in Terminal and with BurnItNow EXT.
Both variants are freezing Haiku after 10 Sekonds.
Mouse and Keyboard don't responce and no KDL-Message.
Haiku hrev45410 and a LG gh22LS50 DVD-Burner SATA
Anyone here with the same Problem???

Information about Books BeOS

Forum thread started by victorrufobenito on Fri, 2013-03-29 18:53

Hello, I am a romantic love BeOS, user-level, like Haiku. I've always loved investigating on my own self and like I said I'm just a user without extensive programming knowledge. Maybe it's the right place, I live in Spain and am interested in finding a number of books and papers to follow in my online self. I wonder if someone could help me providing me any, for pdf.
I'm looking for are "The BeOS Bible" by Scot Hacker, "Be Developer's Guide" by The Be Development Team, "Be Advanced Topics" The Be Development Team and "Programming the Be Operating System" Dan Parks Sydow.
I have ever asked but I AbeBooks THROUGH Unfortunately we do not seem to answer To Have Those titles in stock at the moment.
Thank you very much in advance to all

Information about Books BeOS

Forum thread started by victorrufobenito on Fri, 2013-03-29 18:52

Hello, I am a romantic love BeOS, user-level, like Haiku. I've always loved investigating on my own self and like I said I'm just a user without extensive programming knowledge. Maybe it's the right place, I live in Spain and am interested in finding a number of books and papers to follow in my online self. I wonder if someone could help me providing me any, for pdf.
I'm looking for are "The BeOS Bible" by Scot Hacker, "Be Developer's Guide" by The Be Development Team, "Be Advanced Topics" The Be Development Team and "Programming the Be Operating System" Dan Parks Sydow.
I have ever asked but I AbeBooks THROUGH Unfortunately we do not seem to answer To Have Those titles in stock at the moment.
Thank you very much in advance to all

announcement of a Haiku Fan

Forum thread started by lord_webi on Fri, 2013-03-29 17:26

this is just a first announcement of a new and upcoming Haiku forum powered by vBulletin !

http://www.haikuza.net

Platform: vBulletin 4.x CMS fully licensed - sponsored by "me" (no need for any donation)

Wanted:
- Mods
- Users
- Designers
- Haiku Fans
- clerics spreading the word

contact me for any questions or suggestions:
lord_webi(at)root86.org

I try to install all that stuff during the current weekend ...

Thanks for supporting !

Knowledge is wisdom

Forum thread started by Xectis on Thu, 2013-03-28 20:43

I know for a fact BeOS was the BEST operating system in existence for the masses in its time, period. I also know the main reason for its demise was not so much financial mismanagement but the bullying and powerful tactics of a certain popular OS institution which helped destroyed BeOS.

I give the developers and passionate helpers of Haiku all credit for continuing this labour of love and if there's anything I can help with in any way you have my services.

Regards

Syndicate content