.deb package installation issues
-
Hello all,
I would like to try this monitoring system, but so far I am encountering some issues during installation with .deb packages.
I tried installing them on my Ubuntu 8.04 server, in this order:
netxms-base_1.0.8_i386.deb
netxms-agent_1.0.8_i386.deb
netxms-server_1.0.8_i386.deb
netxms-server-mysql_1.0.8_i386.debthe base package installation went fine, but as soon as I started installing the agent I ran into this issue:
root@pxmonitor:/root/netxms# dpkg -i netxms-agent_1.0.8_i386.deb
Selecting previously deselected package netxms-agent.
(Reading database ... 47061 files and directories currently installed.)
Unpacking netxms-agent (from netxms-agent_1.0.8_i386.deb) ...
Setting up netxms-agent (1.0.8) ...
Cannot open file /etc/nxagentd.confthough, the package gets installed properly, as I can find the binary file under /usr/bin/nxagentd and the relative /etc/init.d/nxagentd startup script.
Tried to subsequently install the server and the mysql package, both of them get installed properly but the configuration file is still missing.
The last tentative I made was to get the nxagentd.conf-dist from the source tarball and manually copy it to /etc/nxagentd.conf, then tried to reinstall the agent,
but the error message is still there AND the configuration file disappeared.I suppose there are some issues in the .deb package post installation scripts, I will open them up now and see if I can find the cause.
regards,
stk. -
I ran lintian on the agent package just to see the errors that would possibly come up...
Discarding all the debian "policy" messages, there are IMHO a couple which are worth noting:E: netxms-agent: file-in-etc-not-marked-as-conffile /etc/init.d/nxagentd W: netxms-agent: script-in-etc-init.d-not-registered-via-update-rc.d /etc/init.d/nxagentd -
Ok, at the end I understood what is that missing file error.... The file is indeed not part of the package, but the error is coming up because the postinst script is actually trying to start the nxagentd as soon as it is installed.
This of course happens for all the .deb packages like the agent, the server and (in my case) the MySql extension.When I manually copied the file from the source tarball, I think I might have removed and reinstalled the agent (the postrm in fact deletes the configuration file from /etc), so this is possibly the reason why it could not find it.
Now that it is installed, I will try to do the manual copy again and see if it starts properly.
My 2 cents: wouldn't be better to put a "dist" config file with the .deb package? if not, what about a message telling the user that he has to remember to supply a configuration file?
Stk.
-
Hi!
It's my first try to create .deb files. I plan to add interactive configurator later which will be started if configuration files are absent. I agree that for now at least a warning message is necessary. Will fix it for 1.0.9 release.
Best regards,
Victor -
Hi Victor,
thank you for your reply. I work with .deb files quite often, so if you might have some questions please feel free to ask

One tool you should definitely use is "lintian", which is the debian .deb packages policy checker - maybe you don't need/want to be completely compliant to the Debian policies, but it is a valuable tool to
check out for omissions or errors.You just execute it with the .deb package as a parameter and it will report you errors and warnings.
stk
-
Hi!
Question about debian packages to experts: currently, my postrm script looks like following:
#!/bin/sh if test "x$1" = "xpurge"; then rm -f /etc/nxagentd.conf rm -f /etc/nxagentd.conf.backup rm -f /etc/nxagentd.conf.sample fiIt supposed to remove configuration files only when package uninstalled completely. However, during upgrade configuration files also got removed. What I am doing wrong?
Best regards,
Victor
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login