Thank you for your reply. I was able to resolve it using another method:
2 - Extract the deb package:
Code:
ac -x blah-amd64.deb
ls -ltr
-rw-r--r-- 1 root root 4 Dec 3 15:53 debian-binary
-rw-r--r-- 1 root root 92233080 Dec 3 15:58 data.tar.gz
-rw-r--r-- 1 root root 684 Dec 3 16:36 control.tar.gz
3 - Create a DEBIAN directory and extract the control file there because it is need for the rebuild:
Code:
mkdir DEBIAN
cp control.tar.gz DEBIAN
tar zcvf control.tar.gz
ls -ltr
-rwxr-xr-x 1 root root 210 Dec 2 09:49 prerm
-rwxr-xr-x 1 root root 255 Dec 2 09:49 postrm
-rwxr-xr-x 1 root root 193 Dec 2 09:49 postinst
-rw-r--r-- 1 root root 296 Dec 3 16:34 control
-rw-rw-r-- 1 root root 684 Dec 3 16:36 control.tar.gz
4 - Retar up the control file without the control.tar.gz in it:
Code:
tar cvzf data.tar.gz --exclude=control.tar.gz ./
5 - Extract your the data.tar.gz, make your changes and retar it up:
Code:
tar zxvf data.tar.gz
ls -ltr
usr/
vi ./usr/share/blah/blah.1
wq
tar zcvf data.tar.gz --exclude=control.tar.gz ./usr
6 - create the simple debian-binary
Code:
cat > debian-binary <<EOF
2.0\n
EOF
to repackage deb file:
Code:
ar rc blah-amd64.deb debian-binary control.tar.gz data.tar.gz
optional use
Code:
dpkg-deb -b directory blah-amd64.deb
To view contents of the deb file:
Code:
ar tv blah-amd64.deb
or dpkg-deb -c blah-amd64.deb