site  contact  subhomenews

Xarchive now extracts DEBIAN control folder

September 11, 2021 — BarryK

Jon (scsijon in the Puppy Forum) is helping me to get Chrome and Chromium working non-root. This has resulted in me making a discovery yesterday, about the Xarchive archiver and extraction GUI tool.

Jon downloaded a Chrome 64-bit DEB file, and clicked on it, in a running EasyOS 2.9, to install it. The PETget installer, if sees a post-install script, will execute it. Then he got it working as user 'spot'.

He emailed instructions to me, including to edit script /usr/bin/google-chrome.

I downloaded the same DEB, opened it up using Xarchive to examine its contents, then manually copied the files to install it. It did not have script /usr/bin/google-chrome.

The penny dropped. Xarchive does not extract the 'DEBIAN' control folder. This has a post-install script that creates /usr/bin/google-chrome.

I want to use Xarchive to view and extract exactly what is inside a archive file!

I have modified /usr/lib/xarchive/wrappers/, inserted a line:

    -e) # extract: from archive passed files 
# convert deb to a temporary tar file
tmptar="$(mktemp -t tartmp.XXXXXX)"
$DEB_PROG $CONVERT_OPTS "$archive" > "$tmptar"
# extract files from the temporary tar
$TAR_PROG $TAR_EXTRACT_OPTS "$tmptar" "$@"
#20210911 BK include control info in extraction...
$DEB_PROG -e $archive DEBIAN
# remove temporary tar
rm "$tmptar"
exit $wrapper_status

...where DEB_PROG=dpkg-deb

Unfortunately, the DEBIAN folder is not listed when viewing the .deb file contents in Xarchive. Probably could be done, but complicates the script immensely.

At least now, when extract a .deb file, will get the DEBIAN folder and can examine what is in it. Not a perfect solution, but passable.

Note, some other pups are using Xarchiver, which is a different project, does the same thing. Xarchive is a dead project, last release in 2006:

However, Puppy developers have worked on it since, and it has been internationalized. There are also posts about additional wrapper scripts. Here is one old post:

Here is the source that I use:    

Tags: easy