Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Archlinux #6

Open
XenGi opened this issue Mar 13, 2019 · 1 comment
Open

Support for Archlinux #6

XenGi opened this issue Mar 13, 2019 · 1 comment

Comments

@XenGi
Copy link

XenGi commented Mar 13, 2019

I tried porting this to archlinux with not much success. I skipped the weird setup script because it assumes that the otseca files live in someones home dir or similar which is not how you should install software.
I put together this PKGBUILD to install it which seems to work for now but a proper install method would be nice in the future. Maybe try a Makefile or something. It's really ieasy to do and people know how to use those.

# Maintainer: Ricardo (XenGi) Band <email@ricardo.band>
pkgname=otseca
pkgver=1.0.5
pkgrel=1
pkgdesc="Open source security auditing tool to search and dump system configuration"
arch=('i686' 'x86_64')
url="https://github.com/trimstray/otseca"
license=('GPL')
source=("https://github.com/trimstray/otseca/archive/v${pkgver}.tar.gz")
sha256sums=('c04818c531bc8181f5e6603f237d1f6ca7a909c149f73ed7f9a54f94ce065df6')

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  # ./setup.sh install -- not doing that weird thing of an install script

  install -Dm0755 bin/otseca ${pkgdir}/usr/share/otseca/bin/otseca
  install -d ${pkgdir}/usr/bin
  ln -sf /usr/share/otseca/bin/otseca ${pkgdir}/usr/bin/otseca

  install -d ${pkgdir}/usr/share/otseca
  cp -r doc ${pkgdir}/usr/share/otseca/
  gzip ${pkgdir}/usr/share/otseca/doc/man8/otseca.8
  install -d ${pkgdir}/usr/share/man/man8
  ln -sf /usr/share/otseca/doc/man8/otseca.8.gz ${pkgdir}/usr/share/man/man8/otseca.8.gz

  install -Dm0644 -t ${pkgdir}/etc/otseca/ etc/*
  ln -sf /etc/otseca ${pkgdir}/usr/share/otseca/etc

  install -Dm0644 -t ${pkgdir}/usr/share/otseca/lib lib/*
  install -Dm0644 -t ${pkgdir}/usr/share/otseca/src src/*
  cp -r templates ${pkgdir}/usr/share/otseca/templates
  install -Dm0644 README.md ${pkgdir}/usr/share/otseca/README.md

  install -d ${pkgdir}/var/log/otseca
  ln -sf /var/log/otseca ${pkgdir}/usr/share/otseca/log

  install -d ${pkgdir}/usr/share/otseca/data/output
}

Anyway after installing otseca and running it I get the following output:

$ sudo otseca --show-errors
      ┌─────────────────────────────────────────────────────────────┐
      │                                                             │
      │           Φ otseca v1.0.5 security audit script             │
      │                                                             │
      │        Project: https://github.com/trimstray/otseca         │
      │                                                             │
      │               Debian GNU/Linux, CentOS Linux                │
      │                                                             │
      └─────────────────────────────────────────────────────────────┘

      
   °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°

  -- [ Init environment ] --

     • load otseca.conf
     • set dump directory: dump.1552473482
     • set log file: dump.log

   °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°

  -- [ Dump system information ] --

     × task: SYSTEM
     ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
      • exec: uname -a  					 [ DONE ] 
      • exec: uptime    					 [ DONE ] 
      • exec: lsb_release -a    				 [ DONE ] 
      • exec: cat /proc/cpuinfo 				 [ DONE ] 
      • exec: ps -auxenf					 [ DONE ] 
      • grep: "^\s*linux" in /boot/grub/grub.*  		 [ TRUE ] 
         stderr:
sed: can't read /usr/share/otseca/bin/../data/output/dump.1552473482/err.log: No such file or directory

I'm not sure what the problem is. The directory /usr/share/otseca/bin/../data/output/dump.1552473482 has no err.log file but instead some dump.log.1552473482-system-* files.

This doesn't seem to be a archlinux specific problem. SO maybe I found a generic bug here?

trimstray added a commit that referenced this issue Jul 10, 2019
- signed-off-by: trimstray <trimstray@gmail.com>
@trimstray
Copy link
Owner

Hi @XenGi : I apologize for the delay, I hope you have not abandoned your idea.

I added fix for this, please check it:

git pull origin master && git fetch --all && git fetch --prune --tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants