jaeksoft / opensearchserver

Open-source Enterprise Grade Search Engine Software
http://www.opensearchserver.com
Apache License 2.0
499 stars 191 forks source link

dpkg error : conffile name 'etc/opensearchserver' is not an absolute pathname #1939

Open judemont opened 10 months ago

judemont commented 10 months ago

Hello,

When I try to install opensearchserver with sudo dpkg -i opensearchserver-1.5.14-d0d167e.deb, I get this error:

dpkg: error processing archive opensearchserver-1.5.14-d0d167e.deb (--install):

conffile name 'etc/opensearchserver' is not an absolute pathname

Errors were encountered while processing:

opensearchserver-1.5.14-d0d167e.deb

I'm on ubuntu 23.04.

justresisting commented 8 months ago

Got the same error on Debian 12.

(Reading database ... 423616 files and directories currently installed.)
Preparing to unpack .../opensearchserver-1.5.14-d0d167e.deb ...
dpkg: error processing archive /home/waydroid/Applications/opensearchserver-1.5.14-d0d167e.deb (--install):
 conffile name 'etc/opensearchserver' is not an absolute pathname
Errors were encountered while processing:
 /home/waydroid/Applications/opensearchserver-1.5.14-d0d167e.deb

I opened up the .DEB archive and fiddled around.

In the file control.tar.gz/./conffiles it has one line that says etc/opensearchserver

I feel like it should be /etc/opensearchserver and I tried to change it and see if it installed but I do not know how to make the archive changes to save.

tcreek commented 5 months ago

Got the same error on Debian 12.

(Reading database ... 423616 files and directories currently installed.)
Preparing to unpack .../opensearchserver-1.5.14-d0d167e.deb ...
dpkg: error processing archive /home/waydroid/Applications/opensearchserver-1.5.14-d0d167e.deb (--install):
 conffile name 'etc/opensearchserver' is not an absolute pathname
Errors were encountered while processing:
 /home/waydroid/Applications/opensearchserver-1.5.14-d0d167e.deb

I opened up the .DEB archive and fiddled around.

In the file control.tar.gz/./conffiles it has one line that says etc/opensearchserver

I feel like it should be /etc/opensearchserver and I tried to change it and see if it installed but I do not know how to make the archive changes to save.

You have to rebuild the package

justresisting commented 4 months ago

I was using Ubuntu 22 when I initially responded to this issue. Currently using Ubuntu 23.10 and wanted to report that the issue still persists on a completely different machine.

You have to rebuild the package

I didn't realize that was what I was doing.

This isn't the correct platform to ask this but if you let me know the easiest way to rebuild a package or direct me to a resource that educate me how to rebuild packages I would be happy to learn and see if making those changes fixes the problem.

tcreek commented 4 months ago

After you made the change, go a level above that directory so when you do the "ls" command you will see it.

Then all you have to do is type in dpkg-deb --build <name of that directory> then you will see the .deb package in the same directory you ware in.

justresisting commented 4 months ago

I know it isn't this difficult. Im not sure how to look at the .deb from the terminal in order to run gdebi.

Thing is now that I looked at it in GDebi I see this output under Lintian Output:

E: opensearchserver: dir-or-file-in-var-run [var/run/opensearchserver/] E: opensearchserver: file-in-etc-not-marked-as-conffile [etc/init.d/opensearchserver] E: opensearchserver: no-changelog usr/share/doc/opensearchserver/changelog.gz (native package) E: opensearchserver: relative-conffile etc/opensearchserver [conffiles:1] W: opensearchserver: absolute-symlink-in-top-level-folder /var/log/opensearchserver [var/lib/opensearchserver/data/logs] W: opensearchserver: init.d-script-does-not-source-init-functions [etc/init.d/opensearchserver] W: opensearchserver: maintainer-script-ignores-errors [postinst] W: opensearchserver: maintainer-script-ignores-errors [preinst] W: opensearchserver: maintainer-script-ignores-errors [prerm] W: opensearchserver: missing-systemd-service-for-init.d-script opensearchserver [etc/init.d/opensearchserver] W: opensearchserver: script-in-etc-init.d-not-registered-via-update-rc.d [etc/init.d/opensearchserver]

Lintian finished with exit status 2

justresisting commented 4 months ago

I asked a certain LLM for help and this is what it said about the issues.

I don't know how to build files well enough to make these fixes. Maybe someone else can.

It looks like these are lintian warnings and errors for a Debian package named "opensearchserver." Lintian is a tool that checks Debian packages for policy compliance and various common errors.

Let's break down some of the key points:

dir-or-file-in-var-run: Indicates that there's a directory or file in /var/run/opensearchserver/ that the package might be using. This might be flagged because typically, packages are expected to use /run/ instead.

file-in-etc-not-marked-as-conffile: Suggests that a file in /etc/init.d/ (specifically opensearchserver) is not marked as a configuration file. Configuration files in /etc/ are usually marked as such to prevent accidental removal.

no-changelog: Indicates that there's no changelog file at the expected location (usr/share/doc/opensearchserver/changelog.gz). Changelogs are useful for tracking changes made to the software.

relative-conffile: Specifies that there's a relative conffile (etc/opensearchserver). Typically, conffiles are expected to be absolute paths.

absolute-symlink-in-top-level-folder: Flags an absolute symlink in the top-level folder (/var/log/opensearchserver pointing to /var/lib/opensearchserver/data/logs). This might be considered unconventional.

init.d-script-does-not-source-init-functions: Suggests that the init.d script (/etc/init.d/opensearchserver) doesn't source the init-functions script, which provides common functions for init scripts.

maintainer-script-ignores-errors: Warns that errors in maintainer scripts (postinst, preinst, prerm) are being ignored. It's generally good practice to handle errors appropriately.

missing-systemd-service-for-init.d-script: Indicates that there is an init.d script but no corresponding systemd service file. This could be a consideration for systems using systemd.

script-in-etc-init.d-not-registered-via-update-rc.d: Suggests that the init.d script is not registered using update-rc.d. This is how Debian manages the symlinks in /etc/rc*.d/ to start and stop services.

These warnings and errors should be addressed to ensure that the package is compliant with Debian packaging guidelines and to improve its overall quality.