Refracta Development, Scripts, etc.
Post a reply
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: ready to do some tests

Thu Aug 04, 2011 2:01 am

Here's the latest. It seems to work, but I forsee problems. If you keep a work directory and then change the work directory and keep the work again, you could have several copies of your system taking up extra space.
I added /media and /mnt to the disk report window. Not sure if this works in all situation.
Default options are built into the script. The config file overrides those options. The options window lets you choose some settings on the fly, but those don't persist beyond a single run of the script. I'm thinking of doing away with the options window and relying on the config file for customizations. Seems safer.
I tried to arrange it so that you didn't have to see the options window unless you wanted to, but my first attempt at that didn't work. It would be nice to get a disk report first, then change settings if you want, and then get another disk report.
Gui version of refractasnapshot
https://github.com/fsmithred/refracta/b ... -0.04-pre1
Updated config file (added option to create md5sum file with the iso)
https://github.com/fsmithred/refracta/b ... pshot.conf
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: ready to do some tests

Sat Aug 06, 2011 5:57 pm

Tested once here in standard Squeeze, works and iso boots in VB.
A typo in the new conf file at line 28 might cause problems:

Code:
  `snapshot_exlcudes="/usr/local/lib/refractasnapshot/exclude.list"`

should probably be

Code:
  `snapshot_excludes="/usr/local/lib/refractasnapshot/exclude.list"`

The md5 was written correctly. It allows a check for a bad burn in the event of boot failure, why not write it by default?
Not tried other conf changes yet except changing that typo.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: ready to do some tests

Sat Aug 06, 2011 9:01 pm

OK, I think I eradicated the spelling error.

Code:
  `grep -l exlcudes * | wc -l
  23
  sed -i 's/exlcudes/excludes/g' *
  grep -l exlcudes * | wc -l
  0
  `

I guess I could turn on the md5 option again. It was turned off by default before I fixed the code not to count the md5 files in the total space taken up by snapshots. I'm probably going to do away with the options menu, just to simplify things. Right now, it's possible to select the same directory for $work_dir and $snapshot_dir, and if $save_work is set to "no", the snapshot gets deleted at the end of the run. It's a lot easier to explain that in the comments inside the config file than it is to explain it in a window. Plus, I want to keep the total number of windows and selections to a minimum, in keeping with Dean's original ideas for simplicity.
I tried it a couple of times with putting work and snapshots on a mounted partition, and it worked, so it seems like it's just about finished. Will clean it up and roll it into a deb file and be done with it for awhile.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: ready to do some tests

Fri Aug 12, 2011 2:42 pm

Here's the latest version -
https://github.com/fsmithred/refracta/b ... -0.04-pre5
Did away with the options window. Now it just reports disk space and settings. Changes can be made in the config file. Reorganized the code a bit, and changed some of the on-screen text to make it more understandable. Put more instructions in the config file comments, too.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: ready to do some tests

Sat Aug 13, 2011 9:46 pm

deb files are ready. I made them the easy way (according to Dean's instructions.)
refractasnapshot_9.0.0_all.deb is the CLI version
https://github.com/fsmithred/refracta/b ... .0_all.deb
refractasnapshot-gui_9.0.0_all.deb is the GUI version. Note that refractasnapshot-gui depends on refractasnapshot, so you need both debs for this.
https://github.com/fsmithred/refracta/b ... .0_all.deb
These debs will replace older versions of refractasnapshot when installed.
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: ready to do some tests

Tue Aug 16, 2011 11:02 am

Good to see the debs are made.
Not looked at or tested them properly yet but no issues installing with dpkg -i
I did extract them and saw all the files seem to be there. A quick look at the control file shows live-initramfs listed as a dependency. Unless I have missed the point, that is only a transitional "dummy" package to upgrade Lenny to Squeeze; the real work is now done by the live-boot scripts.
It does not exist in wheezy/sid so the debs would be uninstallable (snapshot variations have worked here on wheezy before)
EDIT
Running lintian on the debs shows numerous ownership errors, did you not build using fakeroot?
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: ready to do some tests

Tue Aug 16, 2011 11:44 am

Yeah, numerous errors. I built with `dpkg --build` because I was getting errors with debuild. Thanks for the tip - I forgot that was a dummy package. It's been removed from the control file, and I uploaded new debs.
Changed the name a bit, too. For both the installer and the snapshot tool, the base package installs everything except the script that uses zenity, and the gui package installs just the graphical script. You'll need both to run the gui script. Did that so someone who has no X can still install and run the cli script. Probably still lots of lintian errors. I need to work on my packaging skills.
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: ready to do some tests

Tue Aug 16, 2011 2:15 pm

I use:

Code:
  `fakeroot dpkg-deb -b $package_files_directory xyz.deb`

Anyway, good work. I prefer a deb with a few quirks than loose files all over the place which neither me nor apt/dpkg can keep track of.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: ready to do some tests

Tue Aug 16, 2011 3:58 pm

I managed to build a proper deb for snapshot, but I'm not going to upload it. I had to change the path from /usr/local/blah to /usr/blah in the install file and in the script, and I just realized I forgot to change it in the config file. Also had to get some names to agree. (package name refractasnapshot-base won't work with path /usr/share/doc/refractasnapshot).
For now, everything can stay in /usr/local as it's been. The debs I uploaded will replace the 8.x versions when you install them with dpkg. They can be uninstalled with dpkg or with aptitude (didn't try apt-get.)
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: ready to do some tests

Tue Aug 16, 2011 11:54 pm

I use apt-get in preference to aptitude, apt-get handles refractasnapshot OK
What I did see in the extracted deb was a directoty ".pc" It got put in the system root on installing the deb and why it was there caused a little head-scratching (is it something to do with a diff/patch utility?)
I'm not that well-up on building debs but know that Lintian does not like /usr/local/whatever (I often use there for my own stuff) I just ignore that, believing /usr/local to be an appropriate place for non-official-Debian stuff. There was also a gripe with one or more image files flagged as executable, probably not serious.
As far as I know, ideally the changelog should be a "gzip -9" and there should exist a file list with md5sums in DEBIAN/md5sums
I find it easier to use a custom script to extract/build/rebuild debs, remembering and typing each individual command multiple times gets tiresome.
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.