DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Take a look at this. You need to create a fake file system tree where it's more comfortable for you; it can be inside your home directory, for example, in a directory named "my_deb", which will emulate the root directory, so inside "my_deb" you will have "etc" and "usr" with the stuff you want installed (BTW, be careful with what you put inside these directories, if it's a specific program it should have its own directory inside /usr, likely). You will also need a "DEBIAN" subdirectory containing a "control" file with the info about your package (check the guide for information about how to create the "control" file). Then you execute:
(Changing "version" and "architecture" for the real version and architecture of the .deb file). If everything goes fine, you should have a nice .deb to install. Of course, a package created like this won't meet the debian standards, but for personal use, it's ok.
BTW, which package are you trying to build? If you have a doinst.sh script, then maybe it will take charge of installing the package itself, so there would be no need of creating a .deb package.
Thx a lot, this is my doinst.sh script an I need deb file for live usb-hdd:
Code:
#!/bin/sh
# postinst script for mdaemon
#
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
on_init_error()
{
exit 1
}
case "$1" in
configure|abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Give VIEW_USB access to the USB devices to allow USB redirection
VIEW_USB="/usr/lib/vmware/vmware-view-usb"
if [ -x "$VIEW_USB" ]; then
if [ -e /proc/bus/usb ]; then
groupadd usb 2>/dev/null || : # Do not error if group already exists
GROUP_ID=$(cat /etc/group | grep -r "^usb" | cut -d ':' -f 3)
sed -i '/\/proc\/bus\/usb/d' /etc/fstab
echo "none /proc/bus/usb usbfs listgid=$GROUP_ID,listmode=0664,busgid=$GROUP_ID,busmode=0775,devgid=$GROUP_ID,devmode=0664 0 0" >> /etc/fstab
chown root:usb $VIEW_USB
chmod 2755 $VIEW_USB
umount /proc/bus/usb || :
mount /proc/bus/usb
else
echo "/proc/bus/usb reqired for USB redirection support."
fi
fi
# Change sysinfo indicator to vmware-view to avoid updating the sysinfo package
PKG_LIST=/etc/SysInfo/pkg_list.conf
if [ -f "$PKG_LIST" ]; then
sed -i '/hptc-view-mgr/d' $PKG_LIST
sed -i '/vmware-view-client/d' $PKG_LIST
sed -i '/hptc-view-client/d' $PKG_LIST
echo "vmware-view-client" >> $PKG_LIST
fi
# One time hack to link the appropriate Qt 4.4/4.6 usb plugin to the usb-mgr
# so that this package can be installed on ThinPro 3.1 and 3.2
QT_VERSION=$(ls -l /usr/lib/libQtCore.so.4)
QT_VERSION=${QT_VERSION##*libQtCore.so.}
PLUGIN=/usr/lib/hptc-usb-mgr/plugins/libUsbVMwareView.so
if [ -f "$PLUGIN" ]; then
rm -rf $PLUGIN
fi
if [ "$QT_VERSION" = "4.4.0" ]; then
ln -s /usr/lib/vmware/plugins/libUsbVMwareView-4.4.so $PLUGIN
else
ln -s /usr/lib/vmware/plugins/libUsbVMwareView-4.6.so $PLUGIN
fi
exit 0
Is this a program you compiled your self from source? If it is, then you can either install it running "make install", or install checkinstall (through apt-get/aptitude), and execute checkinstall -D as root, inside the source directory.
Then you can rebuild it with dpkg-deb, as I explained above in my first post. If you extracted it and you only need to change the doinst.sh file, then it will be easier, since you probably have the file system tree of the extracted package already, as well as the control file.
To extract the contents of the "DEBIAN" subdirectory, simply execute:
Code:
dpkg-deb -e packagename.deb
Then put this DEBIAN directory inside the root of the program directory you extracted before, do the changes you need to do, and rebuild it with dpkg-deb.
BTW, may I ask what's wrong with the original .deb file you extracted? Doesn't it work without changing the doinst.sh script? (just wondering, in case there's a better solution ).
BTW, may I ask what's wrong with the original .deb file you extracted? Doesn't it work without changing the doinst.sh script? (just wondering, in case there's a better solution ).
I'd like to create live usb-hdd with vmware-view-client.deb.
I put this vmware-view-client.deb file into config/chroot_local-packages directory on my squeeze.
During creation I'm getting this problem:
Code:
# lb build
.................................................................................
update-initramfs: Generating /boot/initrd.img-2.6.32-5-686
df: Warning: cannot read table of mounted file systems: No such file or directory
egrep: /etc/fstab: No such file or directory
egrep: /etc/fstab: No such file or directory
Errors were encountered while processing:
vmware-view-client
hptc-view-mgr
E: Sub-process /usr/bin/dpkg returned an error code (1)
P: Begin unmounting filesystems...
I try to change vmware-view-client.deb file to get working.
That's really strange, because dpkg -i vmware-view-client.deb works well on my squeeze.
Perhaps this entry from doinst.sh:
hmm, I'm not sure about what may be causing that error, but you can try the modified .deb to see how it works (although, for some reason, I suspect the problem is elsewhere).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.