Is the apt-setup-udeb current ?

Deb McLemore debmc at linux.vnet.ibm.com
Thu Feb 23 01:56:39 UTC 2017


Hi All,

Let me start this thread by making some observations and then based on 
what others deem investigative we can leave it at that.

We are using live-build to build some live systems which are using the 
config/binary property of LB_DEBIAN_INSTALL="live".

Other properties of interest are LB_DEBIAN_INSTALLER_GUI="false", Image 
is for architecture of amd64, Distribution for yakkety.

We are currently using the live-build version of 1:20161216 (v5 or so, 
the latest in the git repo).

Most scenarios are working wonderfully, that's the good news. The 
observation made is the following:

When attempting to use a *preseed.cfg* to by-pass ALL the manual menu 
prompts, etc. we hit a unique (or maybe corner-case ?) scenario which 
may or may not be main-line.

We have a CDROM image built for the live-build binary, but its sparsely 
populated, expecting to do mirror pulls of the majority of the packages 
to complete the installation (like a netinst, but the type is "live", so 
there is a pool archive available).  All goes well until almost the end 
of the apt-setup-udeb.postinst step.  This is where we have debugged the 
root cause to be the */var/lib/dpkg/info/apt-setup-udeb.postinst* 
script.  The script in the udeb of 
*apt-setup-udeb_0.104ubuntu5_amd64.udeb* seems to not be what is shown 
in the current git tree and the revision history on the 
*apt-setup-udeb.postinst* script doesn't seem to reflect that its 
changed recently, so we are wondering why the contents of not only this 
script but of the entire *apt-setup-udeb_0.104ubuntu5_amd64.udeb* 
appears to be out-of-sync.

The debugging problem came down to a use case where the /cdrom was NOT 
mounted and so the conditions in the OLD *apt-setup-udeb.postinst* 
script failed the first check to make a backup copy of the 
*sources.list* file which left the entire *sources.lis**t* reverted back 
to only CDROM contents when we had properly seeded the *sources.list* to 
setup the mirrors and actually did the entire downloads through 
installing the software, but at the very end of the install it was 
flagged and install stopped.  We first saw the file named 
*sources.list.apt-setup* showing up in */target/etc/apt* which was at 
first unexplainable since we had break points earlier which had showed 
the *sources.list* properly setup and working fine.

_*Two questions:*_

1 - Is this a packaging problem and the levels of scripts and content of 
the *apt-setup-udeb* needs to be refreshed ?
2 - Is there a latest *apt-setup-udeb* you can point us to for our test 
efforts ?  We are working around this for now.

Here is a brief comparison of the two levels we've queried (the file 
contents and number of scripts differ as well, the following is just a 
high-level introduction to the hierarchy).

********************************************************************

_apt-setup-udeb_0.104ubuntu5_amd64.udeb
_

$ dpkg -c apt-setup-udeb_0.104ubuntu5_amd64.udeb
drwxr-xr-x root/root         0 2016-06-08 12:17 ./
drwxr-xr-x root/root         0 2016-06-08 12:17 ./usr/
drwxr-xr-x root/root         0 2016-06-08 12:17 ./usr/bin/
-rwxr-xr-x root/root      2061 2016-06-08 12:08 ./usr/bin/apt-setup
-rwxr-xr-x root/root      1204 2016-06-08 12:08 
./usr/bin/apt-setup-signed-release
-rwxr-xr-x root/root      3582 2016-06-08 12:08 ./usr/bin/apt-setup-verify
drwxr-xr-x root/root         0 2016-06-08 12:17 ./usr/lib/
drwxr-xr-x root/root         0 2016-06-08 12:17 ./usr/lib/apt-setup/
drwxr-xr-x root/root         0 2016-06-08 12:17 
./usr/lib/apt-setup/generators/
-rwxr-xr-x root/root       644 2016-06-08 12:08 
./usr/lib/apt-setup/generators/01setup
-rwxr-xr-x root/root      1197 2016-06-08 12:08 
./usr/lib/apt-setup/generators/60local
-rwxr-xr-x root/root      2104 2016-06-08 12:08 
./usr/lib/apt-setup/generators/90services-select
-rwxr-xr-x root/root      1785 2016-06-08 12:08 
./usr/lib/apt-setup/generators/91security
-rwxr-xr-x root/root       925 2016-06-08 12:08 
./usr/lib/apt-setup/generators/95overlay

_$ cat DEBIAN/postinst_
#!/bin/sh
set -e

. /usr/share/debconf/confmodule

# If we're installing from CD, then we won't need this sources.list until
# nearly the end of pkgsel; the one generated during base system
# installation will do just fine until then.
if [ -f /cdrom/.disk/base_installable ]; then
     cp -a /target/etc/apt/sources.list /target/etc/apt/sources.list.base
fi

apt-setup --log-output /target

if [ -f /target/etc/apt/sources.list.base ]; then
     logger -t apt-setup 'Using only basic sources for CD installation'
     mv -f /target/etc/apt/sources.list \
           /target/etc/apt/sources.list.apt-setup
     mv -f /target/etc/apt/sources.list.base /target/etc/apt/sources.list
     in-target apt-get -o APT::Get::Download=false \
               -o APT::Get::List-Cleanup=false update
fi

exit 0

********************************************************************

The following is from the latest builds:

$ ls -altr
total 356
-rw-rw-r-- 1 debmc debmc 348699 Feb 22 15:20 
~ubuntu-installer_apt-setup_master-r1163.tgz

$ ls -altr ~ubuntu-installer/apt-setup/master/generators
total 60
-rwxr-xr-x 1 root root 2138 Feb 22 15:20 93backports
-rwxr-xr-x 1 root root 2122 Feb 22 15:20 92updates
-rwxr-xr-x 1 root root 1301 Feb 22 15:20 91security
-rwxr-xr-x 1 root root 1897 Feb 22 15:20 90services-select
-rwxr-xr-x 1 root root 1197 Feb 22 15:20 60local
-rwxr-xr-x 1 root root 6248 Feb 22 15:20 50mirror.ubuntu
-rwxr-xr-x 1 root root 5750 Feb 22 15:20 50mirror
-rwxr-xr-x 1 root root 4195 Feb 22 15:20 41cdset
-rwxr-xr-x 1 root root 3241 Feb 22 15:20 40cdrom
-rwxr-xr-x 1 root root  644 Feb 22 15:20 01setup
drwxr-xr-x 5 root root 4096 Feb 22 15:21 ..
drwxr-xr-x 2 root root 4096 Feb 22 15:21 .


_$ cat ~ubuntu-installer/apt-setup/master/debian/apt-setup-udeb.postinst_
#!/bin/sh
set -e
apt-setup --log-output /target



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-installer/attachments/20170223/44ea8acc/attachment.html>


More information about the Ubuntu-installer mailing list