Project

General

Profile

Actions

Bug #684

closed

ppa: package uses wrong localstatedir and sysconfdir

Added by Victor Julien about 12 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

When starting suricata from ppa it complains about missing files from /usr/local/etc/suricata/ and about missing directory /usr/local/var/log/suricata

The package should default to /etc/suricata and /var/log/suricata

To do so, add

--sysconfdir=/etc --localstatedir=/var

to the ./configure command

Actions #1

Updated by Peter Manev about 12 years ago

Hi,
did some investigation...

When building PPA , by default it includes the --sysconfdir=/etc --localstatedir=/var on the configure line.


Suricata Configuration:
  AF_PACKET support:                       yes
  PF_RING support:                         no
  NFQueue support:                         yes
  IPFW support:                            no
  DAG enabled:                             no
  Napatech enabled:                        no
  Unix socket enabled:                     no

  libnss support:                          yes
  libnspr support:                         yes
  libjansson support:                      no
  Prelude support:                         no
  PCRE jit:                                no
  libluajit:                               no
  Non-bundled htp:                         yes
  Old barnyard2 support:                   no
  CUDA enabled:                            no

  Unit tests enabled:                      no
  Debug output enabled:                    no
  Debug validation enabled:                no
  Profiling enabled:                       no
  Profiling locks enabled:                 no

Generic build parameters:
  Installation prefix (--prefix):          /usr
  Configuration directory (--sysconfdir):  /etc/suricata/
  Log directory (--localstatedir) :        /var/log/suricata/

  Host:                                    x86_64-pc-linux-gnu
  GCC binary:                              gcc
  GCC Protect enabled:                     no
  GCC march native enabled:                no
  GCC Profile enabled:                     no

I have also enforced it - but the result is the same:

Generic build parameters:
  Installation prefix (--prefix):          /usr
  Configuration directory (--sysconfdir):  /etc/suricata/
  Log directory (--localstatedir) :        /var/log/suricata/

in other words I believe the PPA builds it correctly.

This is the log from the default script:
https://launchpadlibrarian.net/125933334/buildlog_ubuntu-precise-amd64.suricata_1.4-4ubuntu4_BUILDING.txt.gz

This is the log with enforcing the sysconfdir and localstate dir (--sysconfdir=/etc --localstatedir=/var):
https://launchpadlibrarian.net/125934209/buildlog_ubuntu-precise-amd64.suricata_1.4-4ubuntu4_BUILDING.txt.gz

When i manually download and install suricata 1.4

 ./configure --sysconfdir=/etc --localstatedir=/var && make && make install

The result is the same - no problems - and configure output is the same as well.
Then in the yaml - i just change the directories location from /usr/local/xxxx to /etc/suricata and /var/log/suricata.
Then it works fine.

When i repeat the above step - without --sysconfdir=/etc --localstatedir=/var
./configure  && make && make install

we have:

Generic build parameters:
  Installation prefix (--prefix):          /usr/local
  Configuration directory (--sysconfdir):  /usr/local/etc/suricata/
  Log directory (--localstatedir) :        /usr/local/var/log/suricata/

So i think this problem might be during the "./configure stage" inside Suri?

Please correct me if i am wrong.

thanks

Actions #2

Updated by Victor Julien about 12 years ago

  • Status changed from Assigned to Closed

Right, think I messed something up in testing. Sorry for the noise.

Actions #3

Updated by Victor Julien over 9 years ago

  • Target version set to Packaging/PPA
Actions

Also available in: Atom PDF