May 2009
cd novell-xplatlib-1.0.3-39.i586/novell-xplatlib-1.0.3
No problems here with dependencies.
The postrm and postinst scripts need a bit of editing.
They fiddle around with /etc/ld.so.conf
, but on Ubuntu that is generated, so we create etc/ld.so.conf.d/xplatlib.conf
[32]:
/opt/novell/lib
Then we edit debian/postinst
:
#!/bin/sh RPM_INSTALL_PREFIX= # removed because it is not the Debian way #export RPM_INSTALL_PREFIX #if ! grep /opt/novell/lib /etc/ld.so.conf >/dev/null; then # echo "/opt/novell/lib" >>/etc/ld.so.conf #fi /sbin/ldconfig
We remove Emacs backup files and build the package:
rm debian/postinst~
fakeroot ./debian/rules binary
dh_testdir
dh_testdir
dh_testroot
dh_clean -k -d
dh_installdirs
dh_installdocs
dh_installchangelogs
find . -maxdepth 1 -mindepth 1 -not -name debian -print0 | \
xargs -0 -r -i cp -a {} debian/novell-xplatlib
dh_compress
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dpkg-shlibdeps: failure: couldn't find library libclnlnx.so.1 needed by debian/novell-xplatlib/opt/novell/lib/libclxlnx.so.1.0.3 (its RPATH is '').
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to set LD_LIBRARY_PATH.
dh_shlibdeps: command returned error code 512
make: [binary-arch] Error 1 (ignored)
dh_gencontrol
dpkg-gencontrol: warning: unknown substitution variable ${shlibs:Depends}
dh_md5sums
dh_builddeb
dpkg-deb: building package `novell-xplatlib' in `../novell-xplatlib_1.0.3-39_i386.deb'.
The package can be installed and uninstalled without trouble:
sudo dpkg -i ../novell-xplatlib_1.0.3-39_i386.deb
Selecting previously deselected package novell-xplatlib.
(Reading database ... 100079 files and directories currently installed.)
Unpacking novell-xplatlib (from .../novell-xplatlib_1.0.3-39_i386.deb) ...
Setting up novell-xplatlib (1.0.3-39) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
sudo apt-get remove novell-xplatlib
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
novell-xplatlib
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 889kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 100100 files and directories currently installed.)
Removing novell-xplatlib ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
cd novell-xtier-base-3.1.6-12.i586/novell-xtier-base-3.1.6
We unconditionalize (see ) the preinst
, postinst
, prerm
and postrm
.
In preinst
, we unconditionalize, and we stop /etc/init.d/regd
only if it exists.
And because we cannot see the difference between fresh install and upgrade, we don't exit in the upgrade case that the file distinguishes:
<snip> #if test "$1" != 1; then echo " doing rpm upgrade processing" if [ "$YAST_IS_RUNNING" != "instsys" ]; then #echo "Novell XTier Base pre script stoping novell-xregd for upgrade" test -e /etc/init.d/novell-xregd && /etc/init.d/novell-xregd stop fi # Check if we need to export the XTier registry # Note: We export the registry at this time to avoid losing its settings in case # that we have to rebuild the database. if [ -e "/var/opt/novell/xtier/xregd/db/xtier_registry.db" ]; then echo " Exporting XTier Registry to temporary file..." rm -f /var/opt/novell/xtier/xregd/xtier_registry.xml.export LD_LIBRARY_PATH=/opt/novell/xtier/lib /opt/novell/xtier/bin/regutil -e /var/opt/novell/xtier/xregd/xtier_registry.xml.export echo " done exporting XTier Xml Registry" else echo " Saving Pre-XFlaim registry file for upgrade..." cp /etc/opt/novell/xtier/xtier_registry.xml /etc/opt/novell/xtier/xtier_registry.xml.upgrade fi echo "done running Novell XTier Base pre script!" # Since we cannot distinguish between fresh install and upgrade, we don't exit here in Ubuntu/Debian # exit 0 #fi <snip>
Because the package depends on libbfd-2.19.so
, and because that isn't available in Intrepid, we do a Sneaky Symlink (TM):
pushd /usr/lib
sudo ln -s libbfd-2.18.93.20081009.so libbfd-2.19.so
popd
The postinst
complains about a missing EULA
for which ownerships cannot be changed.
(Note that this is an alien addition to the script.)
We couldn't care less about the EULA, and comment the line out.
The prerm
script just exits when upgrading, so we not only unconditionalize it, we remove the upgrade case altogether:
# Unconditional in Debian/Ubuntu, and no use just exiting #if test "$1" == 1; then # echo "done running Novell XTier Base preun script!" # exit 0 #fi
We also replace the install_initd with an update-rc.d line.
The same goes for the postrm
:
# Unconditional in Debian/Ubuntu, and no use exiting or even starting a daemon #if test "$1" == 1; then # if [ "$YAST_IS_RUNNING" != "instsys" ]; then # echo " doing rpm upgrade processing" # #echo "Novell XTier Base postun script starting novell-xregd for upgrade" # /etc/init.d/novell-xregd start # fi # echo "done running Novell XTier Base postun script!" # exit 0 #fi
In etc/init.d/novell-xregd
, the function $START_DAEMON expects the name of the daemon as its first parameter, so we change the line
$START_DAEMON $START_DAEMON_FLAG $DAEMON_USER $DAEMON -d
into:
$START_DAEMON $DAEMON $START_DAEMON_FLAG $DAEMON_USER -d
Then we do the fakeroot ./debian/rules binary and the sudo dpkg -i ../novell-xtier-base_3.1.6-12_i386.deb.
![]() | Warning |
---|---|
The pre- and postinstall scripts are not idempotent yet, but we leave that for later. |
cd novell-novfsd-3.0.0-14.i586/novell-novfsd-3.0.0
The preinst
script stops the service only when doing an install, which is apparently detected in an rpm
by checking $1.
We make this unconditional, for the time being:
# unconditionalized for .deb #echo "novell-novfsd pre install script" #if [ "$1" != 1 ]; then /etc/init.d/novfsd stop || echo "NOVFSD not started" #fi exit 0
In the postinst
script, we replace the RPM-style install_initd with deb-style update-rc.d:
#/usr/lib/lsb/install_initd -f /etc/init.d/novfsd # Debian/Ubuntu doesn't use intall_initd, it uses update-rc.d update-rc.d novfsd defaults
The prerm
, like the preinst
is made unconditional, and the remove_initd is replaced by update-rc.d:
# Unconditional in Debian/Ubuntu #if [ "$1" = 0 ]; then /etc/init.d/novfsd stop #/usr/lib/lsb/remove_initd /etc/init.d/novfsd update-rc.d -f novfsd remove #fi
...
as is the postrm
:
# Unconditional in Debian/Ubuntu #if [ "$1" = 0 ]; then echo "novell-novfsd uninstall script" # Remove symbolic link to init.d script if [ -f /usr/sbin/rcnovfsd ] || [ -L /usr/sbin/rcnovfsd ]; then rm -f /usr/sbin/rcnovfsd fi #fi
In etc/init.d/novfsd
, we remove the rc_* functions at the end of the file: they don't exist in Debian/Ubuntu.