Merge lupin functionality + add external hooks

Bug #144798 reported by Agostino Russo
2
Affects Status Importance Assigned to Milestone
Wubi
Fix Released
Low
Unassigned
casper (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: casper

1) Move lupin find_iso and find_preseed (and related helper functions) to Casper since they are not specific to loopinstallations

2) Rename boot parameters as follows:

find_iso -> iso or hd/iso
find_preseed -> preseed or import/preseed or hd/preseed

3) Add new boot parameters to casper:

override_script #script to be executed at the end of casper-bottom, after squashfs is mounted
override_files # => cp -a override_files /tmp/ (the path can be relative to override_script folder)

4) Path syntax

myfile=/path/to/file #absolute path starting at initrd root
myfile=path/to/file #relative path is allowed for some parameters (e.g. override_files)
myfile=FIND=/path/to/file #implies search in all block devices
myfile=UUID=/fccafdc7-d7cc-4594-9459-a8f0db7b9f7f/path/to/file
myfile=DEV=/sda/path/to/file

5) Add following methods (see lupin helper functions):

get_file PATH PARENT (gets files or folder given path syntax above, parent is used for relative paths)
find_file (called by get_file, if FIND is used)
cleanup (we should probably use $FOUNDPATH as opposed to passing an argument)

Tags: wubi

Related branches

Revision history for this message
Jose De la Rosa (jose-de-la-rosa) wrote : unsubscribe

unsubscribe

Colin Watson (cjwatson)
Changed in casper:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Agostino Russo (ago) wrote :

Revised external hooks proposal:

Add 1 extra boot parameter (which replaces find_preseed, override_script, and override_files)

custom_installation=/path/to/custom/installation/folder

In casper-premount, a script looks for the custom_installation folder, copies it to /custom_installation, copies the preseed file to / for initrd preseeding and runs casper_premount.sh. In casper-bottom, a script runs casper_bottom.sh and then moves /custom_installation to /root/custom_installation. Further hooks are used within ubiquity. The structure of the custom_installation folder is as follows.

/custom_installation
/custom_installation/preseed.cfg #the preseed file is loaded via initrd preseeding
/custom_installation/hooks #the following scripts are executed as follows:
/custom_installation/hooks/casper_premount.sh #executed as soon as the casper folder is copied
/custom_installation/hooks/casper_bottom.sh #executed within casper-bottom
/custom_installation/hooks/early_command.sh #executed at the beginning of the Ubiquity installation
/custom_installation/hooks/late_command.sh #executed at a later stage of the Ubiquity installation
/custom_installation/hooks/success_command.sh #executed at the end of the Ubiquity installation

External files and packages can be placed anywhere within the casper folder, it's up to the hook scripts to use them.

Revision history for this message
Colin Watson (cjwatson) wrote :

Any installer boot parameter that doesn't contain a slash is incorrectly named, because it will be carried over to bootloader configurations (there are a small number of exceptions but they have to be maintained manually and we should not add to them without good cause).

Revision history for this message
Agostino Russo (ago) wrote :

I have added a preliminary implementation of the above to lupin/casper

Still missing are the hooks for:

/custom-installation/hooks/early_command.sh
/custom-installation/hooks/late_command.sh
/custom-installation/hooks/success_command.sh

They should work as the casper hooks for /custom-installation/hooks/casper_bottom.sh

Revision history for this message
Agostino Russo (ago) wrote :

I'd also suggest to designate a folder to act as a temporary local repository:

/custom_installation/repository

And another folder:

/custom_installation/sources.list.d

Containing repositories to be added to /etc/apt/sources.list.d

Agostino Russo (ago)
Changed in wubi:
importance: Undecided → Low
status: New → In Progress
Agostino Russo (ago)
Changed in wubi:
status: In Progress → Fix Committed
Revision history for this message
Evan (ev) wrote :

the lupin.hardy branch checks for both custom-installation= and debian-installer/custom-installation=. As I understand it, only the latter is appropriate.
The stubbed out debian/ files from debhelper are not necessary.
Changelog entries should not be modified after the respective version is uploaded.

Some nits that are not blocking issues, but that you should be aware of nevertheless:
You don't need to put [ Agostino Russo ] in a changelog entry unless more than one person contributed to that version. See ubiquity's changelog for an example.
You skipped 0.11.

I'll make these fixes and upload the new version after I run some errands.

Agostino Russo (ago)
Changed in wubi:
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

Setting to Fix Released as Evan uploaded the new version.

Changed in casper (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.