[Utnubu-discuss] Debian Live and Ubiquity

Виталий Петров v31337 at gmail.com
Wed Oct 8 09:40:10 UTC 2008


Hello! I tried to correct the ubiquity for the normal work on Debian Live.
If you are interested, it would be a small correction in diff.gz. This is
not the final version, but nevertheless working.

--- ubiquity-1.10.3.orig/d-i/source/localechooser/localechooser
+++ ubiquity-1.10.3/d-i/source/localechooser/localechooser
@@ -115,9 +115,9 @@
  done
  IFS="$OLDIFS"

- db_subst $tpl_languagelist CODES "$codes"
- db_subst $tpl_languagelist NAMES_EN "$names_en"
- db_subst $tpl_languagelist NAMES_BOTH "$names_both"
+ db_subst $tpl_languagelist\ CODES\ "$codes"
+ db_subst $tpl_languagelist\ NAMES_EN\ "$names_en"
+ db_subst $tpl_languagelist\ NAMES_BOTH\ "$names_both"

  echo $level >/var/lib/localechooser/langlevel
 }
---
ubiquity-1.10.3.orig/d-i/source/console-setup/debian/console-setup.postinst
+++ ubiquity-1.10.3/d-i/source/console-setup/debian/console-setup.postinst
@@ -95,9 +95,7 @@

  . $CONFIGFILE || true

- if [ "$model" = SKIP ]; then
- BOOTTIME_KMAP_MD5=
- elif \
+ if \
  [ -z "$BOOTTIME_KMAP_MD5" ] \
  || [ ! -f "$CONFIGDIR/boottime.kmap.gz" ] \
  || echo "$BOOTTIME_KMAP_MD5 $CONFIGDIR/boottime.kmap.gz" \
@@ -143,23 +141,22 @@

 # In d-i debhelper doesn't use /etc/init.d scripts :-)
 if [ -f /usr/share/console-setup-mini/console-setup.config ]; then
- if [ -d /lib/debian-installer ]; then
- setupcon --force --save
- else
- # setting the font corrupts X
- setupcon --save-only
- setupcon --force -k
- cat >&2 <<EOF
-Your console font configuration will be updated the next time your system
-boots. If you want to update it now, run 'setupcon' from a virtual console.
-EOF
- fi
+ setupcon --force --save
 fi

-#DEBHELPER#
-
-if type update-initramfs >/dev/null 2>&1; then
- update-initramfs -u
+# Automatically added by dh_installinit
+if [ -x "/etc/init.d/keyboard-setup" ]; then
+ update-rc.d keyboard-setup start 06 S . >/dev/null || exit $?
+fi
+# End automatically added section
+# Automatically added by dh_installinit
+if [ -x "/etc/init.d/console-setup" ]; then
+ update-rc.d console-setup start 49 S . >/dev/null
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d console-setup start || exit $?
+ else
+ /etc/init.d/console-setup start || exit $?
+ fi
 fi
+# End automatically added section

-exit 0
--- ubiquity-1.10.3.orig/scripts/install.py
+++ ubiquity-1.10.3/scripts/install.py
@@ -762,10 +762,11 @@
  '/var/log/installer/version', '/var/log/casper.log'):
  target_log_file = os.path.join(target_dir,
  os.path.basename(log_file))
- if not misc.execute('cp', '-a', log_file, target_log_file):
- syslog.syslog(syslog.LOG_ERR,
- 'Failed to copy installation log file')
- os.chmod(target_log_file, stat.S_IRUSR | stat.S_IWUSR)
+ if os.path.isfile(target_log_file):
+ if not misc.execute('cp', '-a', log_file, target_log_file):
+ syslog.syslog(syslog.LOG_ERR,
+ 'Failed to copy installation log file')
+ os.chmod(target_log_file, stat.S_IRUSR | stat.S_IWUSR)
  try:
  status = open(os.path.join(self.target, 'var/lib/dpkg/status'))
  status_gz = gzip.open(os.path.join(target_dir,
@@ -835,7 +836,10 @@
  mountpoint = '/var/lib/ubiquity/%s' % sysloop
  if not os.path.isdir(mountpoint):
  os.mkdir(mountpoint)
- misc.execute('mount', dev, mountpoint)
+ if not misc.execute('mount', dev, mountpoint)
+ misc.execute('losetup', '-d', dev)
+ misc.execute('mount', '-o', 'loop', fsfile, mountpoint)
+ dev = 'unused'

  return (dev, mountpoint)

@@ -866,7 +870,8 @@
  # Manual detection on non-unionfs systems
  fsfiles = ['/cdrom/casper/filesystem.cloop',
  '/cdrom/casper/filesystem.squashfs',
- '/cdrom/META/META.squashfs']
+ '/cdrom/META/META.squashfs',
+ '/live/image/live/filesystem.squashfs']

  for fsfile in fsfiles:
  if fsfile != '' and os.path.isfile(fsfile):
@@ -916,10 +921,10 @@
  if not misc.execute('umount', mountpoint):
  raise InstallStepError("Failed to unmount %s" % mountpoint)
  for dev in devs:
- if dev != '' and not misc.execute('losetup', '-d', dev):
- raise InstallStepError(
- "Failed to detach loopback device %s" % dev)
-
+ if dev != 'unused':
+ if dev != '' and not misc.execute('losetup', '-d', dev):
+ raise InstallStepError(
+ "Failed to detach loopback device %s" % dev)

  def chroot_setup(self, x11=False):
  """Set up /target for safe package management operations."""
@@ -1364,7 +1369,10 @@
  'usplash',
  'popularity-contest',
  'libpaper1',
- 'ssl-cert']
+ 'ssl-cert',
+ 'splashy',
+ 'xserver-xorg',
+ 'initramfs-tools']

  try:
  for package in packages:



-- 
С Уважением, Виталий

Блог: http://vitaljkapblog.livejournal.com/
Lastfm: http://www.lastfm.ru/user/kafik-fafik/
ICQ: 578-126
E-Mail: v31337 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/utnubu-discuss/attachments/20081008/8836eaa2/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ubiquity_1.10.3.diff.gz
Type: application/x-gzip
Size: 1714 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/utnubu-discuss/attachments/20081008/8836eaa2/attachment.bin 


More information about the Utnubu-discuss mailing list