January 2010
We use Ubuntu Karmic on the desktop, and our printer servers have Novell iPrint. With a bit of trouble, we can offer our users the convenience of using the iPrint client, so that they may install printers in a few clicks.
Note | |
---|---|
The iPrint client for linux is available from our iPrint server.
However, the server deals out clients that work on a SuSE version that uses CUPS 1.3, but they fail on Karmic, with a message |
Note | |
---|---|
This is a bit of a quick writeup. If you don't know how to handle Alien, and packaging in general, you may want to read around first. |
We have an unattended install that sets up Ubuntu Karmic. For the purpose of packaging, we need a few extra packages on it:
sudo apt-get install build-essential alien
I went to my colleague who runs the Novell iPrint server, and got novell-iprint-xclient-sh-6.502.20090929-1.x86_64.rpm
, intended for SLED-11.
I wouldn't know where to fetch it on the Web.
sudo alien --to-deb --generate --scripts --keep-version --fixperms novell-iprint-xclient.x86_64.rpm
error: incorrect format: unknown tag
Directories novell-iprint-xclient-sl-6.502.20090929 and novell-iprint-xclient-sl-6.502.20090929.orig prepared.
This generates directories owned by root
, but we change their ownership to an ordinary user, then cd into one:
chown -R me:me ./
cd novell-iprint-xclient-sl-6.502.20090929
The iPrint client seems to depend on libglitz1
and xulrunner-1.3.1
(or equivalent), so we edit debian/control
to reflect these dependencies.
<snip> Package: novell-iprint-xclient-sl Architecture: amd64 Depends: ${shlibs:Depends}, xulrunner, libglitz1 Description: Mozilla Plug-In and Shared Library for iPrint Novell iPrint is a printing solution that enables you to send documents to printers located throughout the network. Using Internet <snip>
We also modify the {pre,post}{inst,rm}
scripts a bit: mostly all is commented out in preinst
and {pre,post}rm
, and in postinst
we add a snippet that sets FIRST_ARG
to 1.
Then we set a few environment variables, and since Alien doesn't honor them, we change them in a few files before running debuild
:
export DEBEMAIL='j.bokma@rug.nl'
export DEBFULLNAME='Jurjen Bokma'
sed -i 's%jurjen@host\.some\.network%j\.bokma@rug\.nl%g' debian/changelog
sed -i 's%jurjen@host\.some\.network%j\.bokma@rug\.nl%g' debian/control
debuild
dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CPPFLAGS to default value:
dpkg-buildpackage: set LDFLAGS to default value: -Wl,-Bsymbolic-functions
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
dpkg-buildpackage: source package novell-iprint-xclient-sl
dpkg-buildpackage: source version 6.502.20090929-1
dpkg-buildpackage: source changed by Jurjen Bokma <j.bokma@rug.nl>
dpkg-buildpackage: host architecture amd64
fakeroot debian/rules clean
dh_testdir
dh_testroot
dh_clean -d
dpkg-source -b novell-iprint-xclient-sl-6.502.20090929
dpkg-source: info: using source format `1.0'
dpkg-source: info: building novell-iprint-xclient-sl in novell-iprint-xclient-sl_6.502.20090929.orig.tar.gz
dpkg-source: info: building novell-iprint-xclient-sl in novell-iprint-xclient-sl_6.502.20090929-1.diff.gz
dpkg-source: warning: file novell-iprint-xclient-sl-6.502.20090929/debian/postinst has no final newline (either original or modified version)
dpkg-source: warning: file novell-iprint-xclient-sl-6.502.20090929/debian/preinst has no final newline (either original or modified version)
dpkg-source: warning: file novell-iprint-xclient-sl-6.502.20090929/debian/prerm has no final newline (either original or modified version)
dpkg-source: warning: file novell-iprint-xclient-sl-6.502.20090929/debian/postrm has no final newline (either original or modified version)
dpkg-source: warning: missing information for output field Standards-Version
dpkg-source: info: building novell-iprint-xclient-sl in novell-iprint-xclient-sl_6.502.20090929-1.dsc
debian/rules build
dh_testdir
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-iprint-xclient-sl
dh_compress
dh_fixperms
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dpkg-shlibdeps: warning: debian/novell-iprint-xclient-sl/opt/novell/lib64/libiprint.so.1.0.0 contains an unresolvable reference to symbol xmlFreeTextReader: it's probably a plugin.
dpkg-shlibdeps: warning: 17 other similar warnings have been skipped (use -v to see them all).
dpkg-shlibdeps: warning: debian/novell-iprint-xclient-sl/opt/novell/lib/libiprint-ui.so.1.0.0 contains an unresolvable reference to symbol g_free: it's probably a plugin.
dpkg-shlibdeps: warning: 9 other similar warnings have been skipped (use -v to see them all).
dpkg-shlibdeps: warning: debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/npnipp.so contains an unresolvable reference to symbol g_str_hash: it's probably a plugin.
dpkg-shlibdeps: warning: 11 other similar warnings have been skipped (use -v to see them all).
dpkg-shlibdeps: warning: debian/novell-iprint-xclient-sl/opt/novell/lib/libiprint.so.1.0.0 contains an unresolvable reference to symbol xmlFreeTextReader: it's probably a plugin.
dpkg-shlibdeps: warning: 17 other similar warnings have been skipped (use -v to see them all).
dpkg-shlibdeps: warning: couldn't find library libxul.so needed by debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin.so (ELF format: 'elf64-x86-64'; RPATH: '/usr/lib64/gcc/x86_64-suse-linux/4.1.2').
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.
dpkg-shlibdeps: warning: couldn't find library libxpcom.so needed by debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin.so (ELF format: 'elf64-x86-64'; RPATH: '/usr/lib64/gcc/x86_64-suse-linux/4.1.2').
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.
dpkg-shlibdeps: warning: debian/novell-iprint-xclient-sl/opt/novell/iprint/bin/iprint-listener-gui contains an unresolvable reference to symbol xmlTextWriterEndElement: it's probably a plugin.
dpkg-shlibdeps: warning: 16 other similar warnings have been skipped (use -v to see them all).
dpkg-shlibdeps: warning: debian/novell-iprint-xclient-sl/opt/novell/lib64/libiprint-ui.so.1.0.0 contains an unresolvable reference to symbol g_free: it's probably a plugin.
dpkg-shlibdeps: warning: 9 other similar warnings have been skipped (use -v to see them all).
dpkg-shlibdeps: warning: debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/npnipp32.so contains an unresolvable reference to symbol g_str_hash: it's probably a plugin.
dpkg-shlibdeps: warning: 11 other similar warnings have been skipped (use -v to see them all).
dpkg-shlibdeps: warning: couldn't find library libxul.so needed by debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin32.so (ELF format: 'elf32-i386'; RPATH: '/usr/lib/gcc/i586-suse-linux/4.1.2').
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.
dpkg-shlibdeps: warning: couldn't find library libxpcom.so needed by debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin32.so (ELF format: 'elf32-i386'; RPATH: '/usr/lib/gcc/i586-suse-linux/4.1.2').
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.
dpkg-shlibdeps: warning: Can't extract name and version from library name `libplc4.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libplc4.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libplc4.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libnspr4.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libnspr4.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libnspr4.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libplds4.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libplds4.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libplds4.so'
dpkg-shlibdeps: warning: dependency on libplc4.so could be avoided if "debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin.so debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin32.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libxml2.so.2 could be avoided if "debian/novell-iprint-xclient-sl/opt/novell/iprint/bin/iprint-listener debian/novell-iprint-xclient-sl/opt/novell/iprint/bin/iprntcmd debian/novell-iprint-xclient-sl/opt/novell/lib64/libiprint.so.1.0.0 debian/novell-iprint-xclient-sl/usr/lib64/cups/backend/iprint debian/novell-iprint-xclient-sl/opt/novell/lib/libiprint.so.1.0.0 debian/novell-iprint-xclient-sl/opt/novell/iprint/bin/iprint-listener-gui" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libplds4.so could be avoided if "debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin.so debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin32.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgcc_s.so.1 could be avoided if "debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin.so debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin32.so" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgmodule-2.0.so.0 could be avoided if "debian/novell-iprint-xclient-sl/opt/novell/iprint/bin/iprint-listener debian/novell-iprint-xclient-sl/opt/novell/iprint/bin/iprint-ppdeditor debian/novell-iprint-xclient-sl/opt/novell/iprint/bin/iprint-listener-gui" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libnspr4.so could be avoided if "debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin.so debian/novell-iprint-xclient-sl/opt/novell/iprint/plugin/libiprint-plugin32.so" were not uselessly linked against it (they use none of its symbols).
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package `novell-iprint-xclient-sl' in `../novell-iprint-xclient-sl_6.502.20090929-1_amd64.deb'.
dpkg-genchanges >../novell-iprint-xclient-sl_6.502.20090929-1_amd64.changes
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload (original source is included)
Now signing changes and any dsc files...
Could not find a signing program (pgp or gpg)!
debuild: fatal error at line 1255:
running debsign failed
Since the build host doesn't contain my pgp keys, signing fails, so I copy the generated files to another machine and sign and upload from there:
debsign novell-iprint-xclient-sl_6.502.20090929-1_amd64.changes
dupload -t my-repository novell-iprint-xclient-sl_6.502.20090929-1.dsc
With my repository in the sources.list
, installing is simple:
apt-get update
sudo apt-get install novell-iprint-xclient-sl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libglitz1
The following NEW packages will be installed:
libglitz1 novell-iprint-xclient-sl
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 601kB of archives.
After this operation, 2,138kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://osmirror.rug.nl karmic/main libglitz1 0.5.6-1 [88.5kB]
Get:2 http://myrepo.rug.nl jaunty/experimental novell-iprint-xclient-sl 6.502.20090929-1 [512kB]
Fetched 601kB in 0s (2,260kB/s)
Selecting previously deselected package libglitz1.
(Reading database ... 220151 files and directories currently installed.)
Unpacking libglitz1 (from .../libglitz1_0.5.6-1_amd64.deb) ...
Selecting previously deselected package novell-iprint-xclient-sl.
Unpacking novell-iprint-xclient-sl (from .../novell-iprint-xclient-sl_6.502.20090929-1_amd64.deb) ...
cat: /etc/SuSE-release: No such file or directory
Processing triggers for ureadahead ...
Setting up libglitz1 (0.5.6-1) ...
Setting up novell-iprint-xclient-sl (6.502.20090929-1) ...
/var/lib/dpkg/info/novell-iprint-xclient-sl.postinst: line 67: test: configure: integer expression expected
Note:
* Exit and restart all instances of your Web browser before installing the printers.
* Run the iPrint Launcher from the applications menu, if you want to install/use a secure printer without re-login or rebooting your system.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Note | |
---|---|
Yes, the repository is wrongly named, and yes, the {pre,post}{install,rm} scripts should be cleaned up. Especially removing the package results in an ugly mess. |
The user can surf to the printer list on the iPrint server's webpage. Click a printer, have it installed.
Note | |
---|---|
The Linux driver of the printer has to be installed though, and the user must have permission to add printers to the local CUPS server. |