My company have been building a turnkey appliance for the last few weeks. I have a vm setup with a turnkey-core install on it with tklpatch that I use to build the iso images as we iterate through out initial build.

I can happily do the following on this system:

working

root@core ~# ls
iso  linked-data
root@core ~# tklpatch iso/turnkey-core-12.0-squeeze-x86.iso linked-data/
# extracting root filesystem and isolinux from ISO
Parallel unsquashfs: Using 1 processor
25597 inodes (25986 blocks) to write
 
[========================================================================================================================================================================================================================/] 25986/25986 100%
</snip>
95.41% done, estimate finish Thu Apr 18 10:16:31 2013
Total translation table size: 2048
Total rockridge attributes bytes: 1816
Total directory bytes: 4096
Path table size(bytes): 40
Max brk space used 0
104817 extents written (204 MB)
root@core ~# ls
iso  linked-data  turnkey-core-12.0-squeeze-x86-patched.iso

and it correctly builds our iso image. Recently I tried to replicate this at home and build another vm (just a fresh install of turnkey-core with tklpatch installed). However when I went to "apt-get install tklpatch" it says no installation candidate is available, once I have done an "apt-get update;apt-get install tklpatch" it installs however I'm now unable to build iso images:

broken

root@core ~# ls

linked-data  turnkey-core-12.0-squeeze-x86.iso
root@core ~# tklpatch turnkey-core-12.0-squeeze-x86.iso linked-data/
# extracting root filesystem and isolinux from ISO
Parallel unsquashfs: Using 1 processor
25597 inodes (25986 blocks) to write
 
[===========================================================\] 25986/25986 100%
created 23964 files
created 2837 directories
created 1074 symlinks
created 38 devices
created 1 fifos
TKLPATCH_ISOLABEL: linked-data
# applying patch linked-data
# executing config script linked-data/conf/pre-debs
Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
# chroot execute: /tmp/tklpatch/pre-debs
Removing 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
root@core ~# ls
linked-data                           turnkey-core-12.0-squeeze-x86.iso
turnkey-core-12.0-squeeze-x86.cdroot  turnkey-core-12.0-squeeze-x86.rootfs
 
For comparison (working then broken package versions):
 
working:
root@core ~# apt-cache show tklpatch
Package: tklpatch
Priority: optional
Section: misc
Installed-Size: 85
Maintainer: Alon Swartz <alon@turnkeylinux.org>
Architecture: i386
Version: 0.93+12+gf0f0943
Depends: squashfs-tools, genisoimage, tar, gzip
Filename: pool/squeeze/main/t/tklpatch/tklpatch_0.93+12+gf0f0943_i386.deb
Size: 10126
MD5sum: 76db6fb4ab0b4a57c29b5ae2844e3d8e
SHA1: 8cce782dd731d8aaf8e37fae539b261cad6aca87
SHA256: 4ec355e531ef5d76068b58945bfa4d8a38ce50ef3037262607105acc2daa0f2b
Description: TurnKey Linux Customization Mechanism
 
Package: tklpatch
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 85
Maintainer: Alon Swartz <alon@turnkeylinux.org>
Architecture: all
Version: 0.93+10+g4c48672
Depends: squashfs-tools, genisoimage, tar, gzip
Description: TurnKey Linux Customization Mechanism
 
broken:
root@core ~# apt-cache show tklpatch
Package: tklpatch
Priority: optional
Section: misc
Installed-Size: 85
Maintainer: Alon Swartz <alon@turnkeylinux.org>
Architecture: i386
Version: 0.93+12+gf0f0943
Depends: squashfs-tools, genisoimage, tar, gzip
Filename: pool/squeeze/main/t/tklpatch/tklpatch_0.93+12+gf0f0943_i386.deb
Size: 10126
MD5sum: 76db6fb4ab0b4a57c29b5ae2844e3d8e
SHA1: 8cce782dd731d8aaf8e37fae539b261cad6aca87
SHA256: 4ec355e531ef5d76068b58945bfa4d8a38ce50ef3037262607105acc2daa0f2b
Description: TurnKey Linux Customization Mechanism
 
Is this intentional - has the usage of tklpatch changed, or is this a bug in the packaged version of tklpatch? I have disabled automatic updates on my office build machine as I'm worried that the latest version in the repository is broken.
 
The full working and broken tklpatch output are attached.
 
Regards
Andy

Replies (18)

I haven't used it lately...

Reply 1

But I don't think it's broken. Looking at your post it seems that it's the same TKLPatch deb (same file name, same size and same hashes...!)

A quick glance at you console output makes me think that your conf is probably not executable, but I'm only guessing...

That's strange...

Reply 2

I don't think the latest changes should have broken anything, especially not like this...

What do you have in linked-data/conf/pre-debs ? Thats where it seems to be failing, and no error message is really strange. Could you add -x to pre-debs so it outputs what its doing?

tree and ls -lash outputs

Reply 3

 

root@core ~# tree linked-data/
linked-data/
|-- conf
|   |-- functions
|   |-- post-debs
|   |-- post-overlay
|   |-- pre-debs
|   `-- pre-overlay
|-- debs
`-- overlay
    |-- etc
    |   |-- apache2
    |   |   `-- sites-available
    |   |       |-- default
    |   |       `-- sparql
    |   |-- default
    |   |   `-- virtuoso-opensource-6.1
    |   |-- ssh
    |   |   `-- sshd_config
    |   `-- virtuoso-opensource-6.1
    |       `-- virtuoso.ini
    |-- home
    |   `-- eldis
    |       `-- rdf
    |           `-- global.graph
    |-- opt
    |   `-- tools
    |       |-- eldis_crawl.py
    |       |-- eldis_crawl.py~
    |       |-- eldis_load.isql
    |       |-- eldis_remove.isql
    |       |-- eldis_update.isql
    |       |-- eldis_update.py
    |       |-- eldis_update2.isql
    |       |-- r4d_load.isql
    |       |-- r4d_remove.isql
    |       |-- r4d_update.isql
    |       |-- r4d_update.py
    |       `-- rdfloader.sql
    |-- sbin
    |   |-- update_linked_data
    |   `-- update_linked_data~
    |-- usr
    |   `-- lib
    |       `-- inithooks
    |           |-- bin
    |           |   |-- data_imports.py
    |           |   |-- set_virtuoso_password.py
    |           |   |-- use_eldis.py
    |           |   `-- use_r4d.py
    |           `-- firstboot.d
    |               |-- 35adduser
    |               |-- data_imports.sh
    |               |-- postfix_config
    |               `-- virtuoso.sh
    `-- var
        `-- www
            |-- SNORQL-master.zip
            `-- htdocs
                `-- snorql
                    |-- index.html
                    |-- link.png
                    |-- namespaces.js
                    |-- prototype.js
                    |-- rdf_flyer.24.gif
                    |-- scriptaculous
                    |   |-- builder.js
                    |   |-- controls.js
                    |   |-- dragdrop.js
                    |   |-- effects.js
                    |   |-- scriptaculous.js
                    |   |-- slider.js
                    |   |-- sound.js
                    |   `-- unittest.js
                    |-- snorql.js
                    |-- sparql.js
                    |-- style.css
                    `-- xml-to-html.xsl
 
root@core ~/linked-data# ls -lash
total 24K
4.0K drwxr-xr-x 5 root root 4.0K Apr 18 09:35 .
4.0K drwx------ 6 root root 4.0K Apr 18 09:44 ..
4.0K -rw-r--r-- 1 root root    2 Apr 18 09:35 .gitignore
4.0K drwxr-xr-x 2 root root 4.0K Apr 18 09:35 conf
4.0K drwxr-xr-x 2 root root 4.0K Apr 18 09:35 debs
4.0K drwxr-xr-x 8 root root 4.0K Apr 18 09:35 overlay
 
root@core linked-data/conf# ls -lash
total 28K
4.0K drwxr-xr-x 2 root root 4.0K Apr 18 09:35 .
4.0K drwxr-xr-x 5 root root 4.0K Apr 18 09:35 ..
4.0K -rwxr-xr-x 1 root root  206 Apr 18 09:35 functions
4.0K -rwxr-xr-x 1 root root   46 Apr 18 09:35 post-debs
4.0K -rwxr-xr-x 1 root root  580 Apr 18 09:35 post-overlay
4.0K -rwxr-xr-x 1 root root   46 Apr 18 09:35 pre-debs
4.0K -rwxr-xr-x 1 root root  413 Apr 18 09:35 pre-overlay
 

further testing

Reply 5

our pre-debs is empty:

#!/bin/bash -ex

# executed before apply-debs

Are they the same version of TKL?

Reply 6

I just installed TKLPatch on TKL v12.0 core and my apt-cache output looks the same as you second one. I also tried installing your patch but I got a different output (although obviously I'm using v13.0RC Core ISO so perhaps that's the problem...)

tklpatch turnkey-core-13.0rc-wheezy-amd64.iso Linked-Data/linked-data/
# extracting root filesystem and isolinux from ISO
Parallel unsquashfs: Using 2 processors
26243 inodes (27393 blocks) to write

[=================...=================|] 27393/27393 100%
created 23482 files
created 3003 directories
created 2709 symlinks
created 38 devices
created 1 fifos
TKLPATCH_ISOLABEL: linked-data
# applying patch Linked-Data/linked-data
# executing config script Linked-Data/linked-data/conf/pre-debs
chroot: failed to run command `dpkg-divert': Exec format error

apt-cache show is not identical between hosts

Reply 7

deffinately something odd, this is the full apt-cache show output from both systems, why do they look different???

working:

 

root@core ~# apt-cache show tklpatch
Package: tklpatch
Priority: optional
Section: misc
Installed-Size: 85
Maintainer: Alon Swartz <alon@turnkeylinux.org>
Architecture: i386
Version: 0.93+12+gf0f0943
Depends: squashfs-tools, genisoimage, tar, gzip
Filename: pool/squeeze/main/t/tklpatch/tklpatch_0.93+12+gf0f0943_i386.deb
Size: 10126
MD5sum: 76db6fb4ab0b4a57c29b5ae2844e3d8e
SHA1: 8cce782dd731d8aaf8e37fae539b261cad6aca87
SHA256: 4ec355e531ef5d76068b58945bfa4d8a38ce50ef3037262607105acc2daa0f2b
Description: TurnKey Linux Customization Mechanism
 
Package: tklpatch
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 85
Maintainer: Alon Swartz <alon@turnkeylinux.org>
Architecture: all
Version: 0.93+10+g4c48672
Depends: squashfs-tools, genisoimage, tar, gzip
Description: TurnKey Linux Customization Mechanism
 
broken
 
root@core linked-data/conf# apt-cache show tklpatch
Package: tklpatch
Priority: optional
Section: misc
Installed-Size: 85
Maintainer: Alon Swartz <alon@turnkeylinux.org>
Architecture: i386
Version: 0.93+12+gf0f0943
Depends: squashfs-tools, genisoimage, tar, gzip
Filename: pool/squeeze/main/t/tklpatch/tklpatch_0.93+12+gf0f0943_i386.deb
Size: 10126
MD5sum: 76db6fb4ab0b4a57c29b5ae2844e3d8e
SHA1: 8cce782dd731d8aaf8e37fae539b261cad6aca87
SHA256: 4ec355e531ef5d76068b58945bfa4d8a38ce50ef3037262607105acc2daa0f2b
Description: TurnKey Linux Customization Mechanism

annoying

Reply 8

It's annoying, because my 2 week old build machine that hasn't had any updates works fine, but every new install I do (or whenever our customer tries to generate an iso off the patch) the build breaks.

even though I'm doing a fresh git clone of the same repo before building :-/

I also did an apt-cache show apt to see if the debian apt tool chain has changed and it's the same version on both.

:(

for hijinks (test 13rc - it didn't break the build)

Reply 9

first thing first, rm -r linked-data and started over on both hosts. then did a git clone to rebuild both the patch directories (because of how we set our git repo up then did a mv Linked-Data/linked-data ../, rm -r Linked-Data.

so old working machine, this time with 13rc:

</snip - output so long it went out of my console history>

 

 96.64% done, estimate finish Thu Apr 18 13:39:47 2013
Total translation table size: 2048
Total rockridge attributes bytes: 1816
Total directory bytes: 4096
Path table size(bytes): 40
Max brk space used 0
119008 extents written (232 MB)
 
which seemed to have worked as beutifully as we'd expect for a totally new revision of the OS!

and new not-working machine, this time with 13rc:

 

root@core ~# tklpatch turnkey-core-13.0rc-wheezy-i386.iso linked-data/
# extracting root filesystem and isolinux from ISO
Parallel unsquashfs: Using 1 processor
26475 inodes (27487 blocks) to write
 
[===========================================================-] 27487/27487 100%
created 23715 files
created 3022 directories
created 2708 symlinks
created 38 devices
created 1 fifos
TKLPATCH_ISOLABEL: linked-data
# applying patch linked-data
 
same problem as before, though weirdly still different from Jeremy's output (though i built this with a turnkey 12 host, just using the 13rc iso image.
 
Anything else I can provide to assist please let me know.
 
Andy

32bit vs 64bit explains Jeremy's build problem

Reply 10

chroot: failed to run command `dpkg-divert': Exec format error

Jeremy did you try and build this patch with an amd64 iso on a 32bit system - I only get this error when I try and build against 64bit ISO on our 32bit build machine, if I use the i386 iso then it gets much further <see post above>

 

Andy

okay that was a crock of rubbish

Reply 11

okay im talking guff now, both fail in the same way, 32bit or 64bit on the "non working" build machine:

root@core ~# tklpatch turnkey-core-13.0rc-wheezy-i386.iso linked-data/
# extracting root filesystem and isolinux from ISO
Parallel unsquashfs: Using 1 processor
26475 inodes (27487 blocks) to write
 
[===========================================================-] 27487/27487 100%
created 23715 files
created 3022 directories
created 2708 symlinks
created 38 devices
created 1 fifos
TKLPATCH_ISOLABEL: linked-data
# applying patch linked-data
 
root@core ~# tklpatch turnkey-core-13.0rc-wheezy-amd64.iso linked-data/
# extracting root filesystem and isolinux from ISO
Parallel unsquashfs: Using 1 processor
26243 inodes (27393 blocks) to write
 
[===========================================================\] 27393/27393 100%
created 23482 files
created 3003 directories
created 2709 symlinks
created 38 devices
created 1 fifos
TKLPATCH_ISOLABEL: linked-data
# applying patch linked-data
 
However on the 'working' build machine I get this:
 
root@core ~# tklpatch iso/turnkey-core-13.0rc-wheezy-amd64.iso linked-data/
# extracting root filesystem and isolinux from ISO
Parallel unsquashfs: Using 1 processor
26243 inodes (27393 blocks) to write
 
[===========================================================\] 27393/27393 100%
created 23482 files
created 3003 directories
created 2709 symlinks
created 38 devices
created 1 fifos
TKLPATCH_ISOLABEL: linked-data
# applying patch linked-data
# executing config script linked-data/conf/pre-debs
chroot: failed to run command `dpkg-divert': Exec format error

brand new vm same problem.

Reply 12

if someone could check my workflow am I missing a step 

 

okay brand new virtual-box vm, installed from turnkey-core-12.0-squeeze-x86.iso onto a 64bit capable VM, default settings have only set the root password then complete console history:
 
# apt-get install vim openssh-server tklpatch
<removed>
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Resolving freefr.dl.sourceforge.net... 158.255.96.7, 2001:1b48:10f::7
Connecting to freefr.dl.sourceforge.net|158.255.96.7|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 138291200 (132M) [application/octet-stream]
Saving to: `turnkey-core-12.0-squeeze-x86.iso'
 
100%[======================================>] 138,291,200 1.59M/s   in 82s     
 
2013-04-18 14:06:48 (1.61 MB/s) - `turnkey-core-12.0-squeeze-x86.iso' saved [138291200/138291200]
Cloning into Linked-Data...
remote: Counting objects: 444, done.
remote: Compressing objects: 100% (284/284), done.
remote: Total 444 (delta 127), reused 335 (delta 59)
Receiving objects: 100% (444/444), 705.06 KiB | 428 KiB/s, done.
Resolving deltas: 100% (127/127), done.
root@core ~# mv Linked-Data/linked-data/ .
root@core ~# rm -r Linked-Data/
root@core ~# ls
linked-data  turnkey-core-12.0-squeeze-x86.iso
root@core ~# tklpatch turnkey-core-12.0-squeeze-x86.iso linked-data/
# extracting root filesystem and isolinux from ISO
Parallel unsquashfs: Using 1 processor
25597 inodes (25986 blocks) to write
 
[===========================================================|] 25986/25986 100%
created 23964 files
created 2837 directories
created 1074 symlinks
created 38 devices
created 1 fifos
TKLPATCH_ISOLABEL: linked-data
# applying patch linked-data
# executing config script linked-data/conf/pre-debs
Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
# chroot execute: /tmp/tklpatch/pre-debs
Removing 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
root@core ~# cd linked-data/conf
root@core linked-data/conf# ls -lash
total 28K
4.0K drwxr-xr-x 2 root root 4.0K Apr 18 14:08 .
4.0K drwxr-xr-x 5 root root 4.0K Apr 18 14:08 ..
4.0K -rwxr-xr-x 1 root root  206 Apr 18 14:08 functions
4.0K -rwxr-xr-x 1 root root   46 Apr 18 14:08 post-debs
4.0K -rwxr-xr-x 1 root root  580 Apr 18 14:08 post-overlay
4.0K -rwxr-xr-x 1 root root   46 Apr 18 14:08 pre-debs
4.0K -rwxr-xr-x 1 root root  413 Apr 18 14:08 pre-overlay

You are right, 64 bit the issue...

Reply 13

I have just applied this to a 32 bit v12 ISO (inside 32 bit TKL v12 Core) and it seems to work.

At least initially...

tklpatch turnkey-core-12.0-squeeze-x86.iso Linked-Data/linked-data/
# extracting root filesystem and isolinux from ISO
Parallel unsquashfs: Using 2 processors
25597 inodes (25986 blocks) to write

[========================================================\] 25986/25986 100%
created 23964 files
created 2837 directories
created 1074 symlinks
created 38 devices
created 1 fifos
TKLPATCH_ISOLABEL: linked-data
# applying patch Linked-Data/linked-data
# executing config script Linked-Data/linked-data/conf/pre-debs
Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
# chroot execute: /tmp/tklpatch/pre-debs
Removing 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
# executing config script Linked-Data/linked-data/conf/post-debs
Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
# chroot execute: /tmp/tklpatch/post-debs
Removing 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
# executing config script Linked-Data/linked-data/conf/pre-overlay
Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
# chroot execute: /tmp/tklpatch/pre-overlay
++ dirname /tmp/tklpatch/pre-overlay
+ cwd=/tmp/tklpatch
+ source /tmp/tklpatch/functions
+ install apache2 openjdk-6-jre openssh-server php5 python2.6 virtuoso-opensource
virtuoso-vad-conductor virtuoso-vad-isparql wget python-pip
+ apt-get update
Get:1 http://security.debian.org squeeze/updates Release.gpg [836 B]
Ign http://security.debian.org/ squeeze/updates/contrib Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Get:2 http://security.debian.org squeeze/updates Release [87.0 kB]
Get:3 http://archive.turnkeylinux.org squeeze-security Release.gpg [490 B]
Ign http://archive.turnkeylinux.org/debian/ squeeze-security/main Translation-en
Get:4 http://archive.turnkeylinux.org squeeze Release.gpg [490 B]
Ign http://archive.turnkeylinux.org/debian/ squeeze/main Translation-en
Get:5 http://security.debian.org squeeze/updates/main i386 Packages [389 kB]
Get:6 http://archive.turnkeylinux.org squeeze-security Release [1070 B]
Get:7 http://archive.turnkeylinux.org squeeze Release [1322 B]
Get:8 http://ftp.debian.org squeeze Release.gpg [1672 B]
Ign http://ftp.debian.org/debian/ squeeze/contrib Translation-en
Get:9 http://security.debian.org squeeze/updates/contrib i386 Packages [621 B]
Ign http://ftp.debian.org/debian/ squeeze/main Translation-en
Get:10 http://ftp.debian.org squeeze Release [99.8 kB]
Get:11 http://archive.turnkeylinux.org squeeze-security/main i386 Packages [665 B]
Get:12 http://archive.turnkeylinux.org squeeze/main i386 Packages [26.5 kB]
Get:13 http://ftp.debian.org squeeze/main i386 Packages [8633 kB]
Get:14 http://ftp.debian.org squeeze/contrib i386 Packages [65.6 kB]
Fetched 9309 kB in 37s (247 kB/s)
Reading package lists... Done
+ DEBIAN_FRONTEND=noninteractive
+ apt-get -y -o DPkg::Options::=--force-confdef -o DPkg::Options::=--force-confold
install apache2 openjdk-6-jre openssh-server php5 python2.6 virtuoso-opensource
virtuoso-vad-conductor virtuoso-vad-isparql wget python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python2.6 is already the newest version.
wget is already the newest version.
The following extra packages will be installed:
  apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common
ca-certificates-java defoma fontconfig fontconfig-config java-common
libaccess-bridge-java libaccess-bridge-java-jni libapache2-mod-php5 libapr1
libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libasound2 libasyncns0
libatk1.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libcairo2
libcups2 libdatrie1 libdbus-1-3 libflac8 libfontconfig1 libgif4 libglib2.0-0 libgomp1
libgtk2.0-0 libgtk2.0-common libice6 libjasper1 libjpeg62 liblcms1 liblqr-1-0 libltdl7
libmagickcore3 libmagickwand3 libnspr4-0d libnss3-1d libogg0 libonig2 libpango1.0-0
libpango1.0-common libpcre3 libpixman-1-0 libpng12-0 libpulse0 libqdbm14 libsm6
libsndfile1 libthai-data libthai0 libtiff4 libvirtodbc0 libvorbis0a libvorbisenc2
libwbxml2-0 libx11-6 libx11-data libxau6 libxcb-render-util0 libxcb-render0 libxcb1
libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxft2 libxi6
libxinerama1 libxrandr2 libxrender1 libxt6 libxtst6 odbcinst odbcinst1debian2
openjdk-6-jre-headless openjdk-6-jre-lib openssh-client php5-common
python-pkg-resources python-setuptools shared-mime-info ttf-dejavu-core tzdata
tzdata-java virtuoso-opensource-6.1 virtuoso-opensource-6.1-bin
virtuoso-opensource-6.1-common x11-common
Suggested packages:
  www-browser apache2-doc apache2-suexec apache2-suexec-custom defoma-doc psfontmgr
x-ttcidfont-conf dfontmgr default-jre equivs php-pear libasound2-plugins cups-common
librsvg2-common gvfs libjasper-runtime liblcms-utils libmagickcore3-extra
ttf-japanese-gothic ttf-japanese-mincho ttf-thryomanes ttf-baekmuk ttf-arphic-gbsn00lp
ttf-arphic-bsmi00lp ttf-arphic-gkai00mp ttf-arphic-bkai00mp pulseaudio icedtea6-plugin
libnss-mdns sun-java6-fonts ttf-sazanami-gothic ttf-kochi-gothic ttf-sazanami-mincho
ttf-kochi-mincho ttf-wqy-microhei ttf-wqy-zenhei ttf-indic-fonts ssh-askpass
libpam-ssh keychain rssh molly-guard ufw python-distribute python-distribute-doc
virtuoso-vad-doc virtuoso-vad-demo virtuoso-vad-tutorial virtuoso-vad-rdfmappers
virtuoso-vad-sparqldemo virtuoso-vad-syncml virtuoso-vad-bpel virtuoso-vad-ods
Recommended packages:
  ssl-cert libfont-freetype-perl php5-cli libatk1.0-data dbus libglib2.0-data
hicolor-icon-theme libgtk2.0-bin ghostscript gsfonts ttf-dejavu-extra xauth
openssh-blacklist-extra php5-suhosin virtuoso-server virtuoso-vsp-startpage
The following NEW packages will be installed:
  apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common
ca-certificates-java defoma fontconfig fontconfig-config java-common
libaccess-bridge-java libaccess-bridge-java-jni libapache2-mod-php5 libapr1
libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libasound2 libasyncns0
libatk1.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libcairo2 libcups2
libdatrie1 libdbus-1-3 libflac8 libfontconfig1 libgif4 libglib2.0-0 libgomp1
libgtk2.0-0 libgtk2.0-common libice6 libjasper1 libjpeg62 liblcms1 liblqr-1-0 libltdl7
libmagickcore3 libmagickwand3 libnspr4-0d libnss3-1d libogg0 libonig2 libpango1.0-0
libpango1.0-common libpcre3 libpixman-1-0 libpng12-0 libpulse0 libqdbm14 libsm6
libsndfile1 libthai-data libthai0 libtiff4 libvirtodbc0 libvorbis0a libvorbisenc2
libwbxml2-0 libx11-6 libx11-data libxau6 libxcb-render-util0 libxcb-render0 libxcb1
libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxft2 libxi6
libxinerama1 libxrandr2 libxrender1 libxt6 libxtst6 odbcinst odbcinst1debian2
openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib php5 php5-common python-pip
python-pkg-resources python-setuptools shared-mime-info ttf-dejavu-core tzdata-java
virtuoso-opensource virtuoso-opensource-6.1 virtuoso-opensource-6.1-bin
virtuoso-opensource-6.1-common virtuoso-vad-conductor virtuoso-vad-isparql x11-common
The following packages will be upgraded:
  openssh-client openssh-server tzdata
3 upgraded, 101 newly installed, 0 to remove and 65 not upgraded.
Need to get 73.1 MB of archives.
After this operation, 201 MB of additional disk space will be used.
Get:1 http://security.debian.org/ squeeze/updates/main apache2.2-bin i386 2.2.16-6+squeeze11 [1355 kB]

<snip>

# applying overlay Linked-Data/linked-data/overlay
# executing config script Linked-Data/linked-data/conf/post-overlay
Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
# chroot execute: /tmp/tklpatch/post-overlay + a2enmod auth_digest proxy_http
Enabling module auth_digest. Considering dependency proxy for proxy_http:
Enabling module proxy. Enabling module proxy_http. Run '/etc/init.d/apache2 restart'
to activate new configuration!
+ a2ensite sparql Enabling site sparql.
Run '/etc/init.d/apache2 reload' to activate new configuration!
+ rm /var/www/index.html< + echo 'Hello world - I just patched TurnKey!'
Removing 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
# cleaning up stray files Adding 'local diversion of /sbin/initctl to
/sbin/initctl.distrib'
# chroot execute: rm -rf /var/log/dpkg.log /var/log/apt/* /var/lib/apt/lists/*
/var/cache/apt/archives/*.deb /var/cache/apt/*.bin
Removing 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
# preparing cdroot Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on turnkey-core-12.0-squeeze-x86.cdroot/casper/10root.squashfs,
 block size 131072.
[==================================================================\] 30424/30424 100%

Exportable Squashfs 4.0 filesystem, data block size 131072 compressed data,
compressed metadata, compressed fragments duplicates are removed
Filesystem size 195896.63 Kbytes (191.31 Mbytes)
38.02% of uncompressed filesystem size (515217.09 Kbytes)
Inode table size 334121 bytes (326.29 Kbytes)
30.14% of uncompressed inode table size (1108440 bytes)
Directory table size 323332 bytes (315.75 Kbytes)
45.54% of uncompressed directory table size (709950 bytes)
Number of duplicate files found 1943
Number of inodes 32984
Number of files 28126
Number of fragments 1589
Number of symbolic links  1510
Number of device nodes 38
Number of fifo nodes 1
Number of socket nodes 0
Number of directories 3309
Number of ids (unique uids + gids) 19
Number of uids 7
root (0)
man (6)
libuuid (100)
ntp (101)
www-data (33)
proxy (13)
shellinabox (103)
Number of gids 18
root (0)
tty (5)
kmem (15)
disk (6)
shadow (42)
certssl (1000)
bin (2)
crontab (102)
utmp (43)
ssh (104)
staff (50)
libuuid (101
www-data (33)
proxy (13)
ntp (103)
shellinabox (105)
adm (4)
mail (8)
# generating turnkey-core-12.0-squeeze-x86-patched.iso
Size of boot image is 4 sectors -> No emulation  
4.81% done, estimate finish Thu Apr 18 21:43:43 2013  
9.62% done, estimate finish Thu Apr 18 21:43:43 2013   

<snip>

96.09% done, estimate finish Thu Apr 18 21:43:46 2013
Total translation table size: 2048
Total rockridge attributes bytes: 1816
Total directory bytes: 4574
Path table size(bytes): 40
Max brk space used 0 104087 extents written (203 MB)

Obviously inserted page breaks for readability... And FYI it was using a v12 Core ISO I had already on my server (a known good one) and the clone of your git repo that I did last night.

Although my base install (what I installed TKLPatch into) has been installed for some time, but theoretically it should be at least similar to yours (as you haven't run apt-get upgrade...)

When I run

apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  auto-apt-archive confconsole di-live hubdns inithooks pycurl-wrapper python-dialog
shellinabox tklbam tklbam-python-boto tklbam-squid tklbam-squid-common tklpatch
turnkey-pylib turnkey-sysinfo turnkey-version webmin webmin-custom webmin-fdisk webmin-file
webmin-firewall webmin-lvm webmin-mount webmin-net webmin-passwd webmin-raid webmin-shell
webmin-software webmin-sshd webmin-syslog webmin-text-editor webmin-theme-stressfree
webmin-updown webmin-useradmin
34 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.1 MB of archives.
After this operation, 752 kB of additional disk space will be used.

And then try to run your patch again (I removed the previously patched ISO) I get this:

tklpatch turnkey-core-12.0-squeeze-x86.iso Linked-Data/linked-data/
# extracting root filesystem and isolinux from ISO
Parallel unsquashfs: Using 2 processors
25597 inodes (25986 blocks) to write

[=================================================|] 25986/25986 100%
created 23964 files
created 2837 directories
created 1074 symlinks
created 38 devices
created 1 fifos
TKLPATCH_ISOLABEL: linked-data
# applying patch Linked-Data/linked-data
# executing config script Linked-Data/linked-data/conf/pre-debs
Adding 'local diversion of /sbin/initctl to /sbin/initctl.distrib'
# chroot execute: /tmp/tklpatch/pre-debs
Removing 'local diversion of /sbin/initctl to /sbin/initctl.distrib'

Some strange stuff going on there!

seems the same

Reply 14

that's pretty much exactly what I get!

 

the reason it looks like i havn't done an apt-get upgrade is because during the install i told it to install security updates (which requires and apt-get update) so by the time i install tklpatch i get the current repo version.

 

if i don't do this, or don't manuallly apt-get update, i get a "no installation candidate available" message when trying to apt-get install it.

what version of tklpatch

Reply 15

 

Which version of tklpatch do you have now? I notice it WAS upgraded by apt. You should be able to do an apt-cache show tklpatch to get the version info.

 

The following packages will be upgraded:
  auto-apt-archive confconsole di-live hubdns inithooks pycurl-wrapper python-dialog
shellinabox tklbam tklbam-python-boto tklbam-squid tklbam-squid-common tklpatch

because mine shows the same version but chops the bottom half of the package details of the apt-cache show output but otherwise looks the same, it's deff changing something though!

Nice work Alon

Reply 16

Glad it's all good now! :)

There was a regression, deployed a fix.

Reply 17

I found the issue, and you are correct - there was a regression (sorry about that!). The part that was failing was during enumeration of debs overlay - if debs/ existed but didn't contain any *all.deb or *$arch.deb, it would return a non-zero exit code which would traverse back up to the main tklpatch script, and abort.

I fixed the code, and verified it now works with all the use cases i could think of. I also updated the package archive with the new version:

apt-get update
apt-get install tklpatch

Again, sorry about that.