Package Details: crowdsec 1.6.4-1

Git Clone URL: https://aur.archlinux.org/crowdsec.git (read-only, click to copy)
Package Base: crowdsec
Description: The open-source and collaborative security suite
Upstream URL: https://www.crowdsec.net
Licenses: MIT
Submitter: solveit
Maintainer: mhdi
Last Packager: mhdi
Votes: 20
Popularity: 0.195817
First Submitted: 2021-12-01 20:49 (UTC)
Last Updated: 2024-11-20 19:12 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

mhdi commented on 2024-04-08 11:32 (UTC) (edited on 2024-04-08 11:50 (UTC) by mhdi)

@Exentio Thank you for your comment. The previous version of the PKGBUILD incorrectly installed files to /usr/local, which is not in accordance with Arch packaging guidelines. In the new PKGBUILD, I've followed the official Debian and Fedora packaging methods, which can be found in the Crowdsec GitHub repository.

Regarding the wizard.sh script you mentioned, it was necessary in the previous PKGBUILD but is not required in the new one. Everything has been integrated directly into the PKGBUILD.

Exentio commented on 2024-04-08 08:57 (UTC) (edited on 2024-04-08 09:21 (UTC) by Exentio)

I managed to fix the issue. I rolled back to the latest commit from the previous maintainer, changed the version, skipped validity checks, then ran:

cd /usr/local/installers/crowdsec/crowdsec/
sudo ./wizard.sh --upgrade --force

After that, I don't know whether it was because of the issues caused by the new PKGBUILD or because I messed up something myself, I had to reconfigure everything from the beginning because my security engine's login credentials(?) on crowdsec's website changed, it's effectively a new security engine.

This all happened because the PKGBUILD and especially the .install files had too many important processes removed, like running official crowdsec scripts, which are requested to be run even by the official crowsec documentation. If @mhdi, the current maintainer, had read the documentation and even just the comments in the files, nothing would've happened.
Please refrain from taking over maintainers and doing major changes to install scripts if you don't understand what you're doing. And check for typos in folder names, too.

Exentio commented on 2024-04-02 15:52 (UTC) (edited on 2024-04-02 15:53 (UTC) by Exentio)

I'm having an issue with crowdsec related to abseil:

crowdsec: error while loading shared libraries: libabsl_flags.so.2308.0.0: cannot open shared object file: No such file or directory

libabsl_flags.so is effectively missing in any form. Rebuilding the package doesn't fix the problem. Dowgrading abseil makes crowdsec complain about newer versions of the library, but rebuilding while downgraded fails. I only just noticed that cscli isn't working anymore, it used to work earlier this month. Any idea?

doums commented on 2024-03-21 13:34 (UTC)

The problem command is cscli.

Indeed, yes I didn't check for cscli and actually it was still there under /usr/local/bin

xiota commented on 2024-03-21 11:23 (UTC) (edited on 2024-03-21 11:29 (UTC) by xiota)

@doums Use find /usr/local -not -type d. Just do it. Don't use commands that don't find all files.

Hint: The command you used previously searches for crowdsec. The problem command is cscli.

Note: I changed the command to also find symlinks.

doums commented on 2024-03-21 10:27 (UTC)

So how that is possible?

pierre@loup /o/a/crowdsec (master)> la
drwxr-xr-x    - pierre pierre 21 Mar 01:33 .git
.rw-r--r-- 1.2k pierre pierre 21 Mar 01:33 .SRCINFO
.rw-r--r--  467 pierre pierre 21 Mar 01:33 crowdsec.install
.rw-r--r-- 3.2k pierre pierre 21 Mar 01:33 PKGBUILD
pierre@loup /o/a/crowdsec (master)> makepkg -si
==> Making package: crowdsec 1.6.0-2 (Thu 21 Mar 2024 01:37:43 AM CET)
==> Checking runtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (2) abseil-cpp-20230802.1-1  re2-1:20240301-1

Total Installed Size:  6.33 MiB

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring
[redacted]
:: Processing package changes...
(1/2) installing abseil-cpp                                                                   [-------------------------------------------------------] 100%
(2/2) installing re2                                                                          [-------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Cleaning cache âš¡
==> no candidate packages found for pruning
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading crowdsec-1.6.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  897k    0  897k    0     0   759k      0 --:--:--  0:00:01 --:--:-- 1723k
  -> Found crowdsec.install
==> Validating source files with sha256sums...
    crowdsec-1.6.0.tar.gz ... Passed
    crowdsec.install ... Passed
==> Extracting sources...
  -> Extracting crowdsec-1.6.0.tar.gz with bsdtar
==> Starting build()...
Building v1.6.0 (e187c8a) dynamic for linux/amd64
Using C++ regexp library

go build -ldflags "-s -w  -X 'github.com/crowdsecurity/go-cs-lib/version.Version=v1.6.0' -X 'github.com/crowdsecurity/go-cs-lib/version.BuildDate=2024-03-21_01:37:49' -X 'github.com/crowdsecurity/go-cs-lib/version.Tag=e187c8a' -X 'github.com/crowdsecurity/crowdsec/pkg/cwversion.Codename=alphaga' -X 'github.com/crowdsecurity/crowdsec/pkg/csconfig.defaultConfigDir=/etc/crowdsec' -X 'github.com/crowdsecurity/crowdsec/pkg/csconfig.defaultDataDir=/var/lib/crowdsec/data' -X 'github.com/crowdsecurity/crowdsec/pkg/cwversion.Libre2=C++'" -trimpath -tags netgo,osusergo,sqlite_omit_load_extension,re2_cgo  -o crowdsec
go: downloading github.com/crowdsecurity/go-cs-lib v0.0.6
go: downloading github.com/crowdsecurity/coraza/v3 v3.0.0-20240108124027-a62b8d8e5607
go: downloading github.com/crowdsecurity/grokky v0.2.1
go: downloading github.com/crowdsecurity/dlog v0.0.0-20170105205344-4fb5f8204f26
[redacted]
Building Release to dir crowdsec-v1.6.0
crowdsec-v1.6.0/
crowdsec-v1.6.0/test_env.sh
[redacted]
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "crowdsec"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Creating package "crowdsec-debug"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: crowdsec 1.6.0-2 (Thu 21 Mar 2024 01:38:59 AM CET)
==> Installing package crowdsec with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (2) crowdsec-1.6.0-2  crowdsec-debug-1.6.0-2

Total Installed Size:  159.99 MiB

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring                                                                [-------------------------------------------------------] 100%
(2/2) checking package integrity                                                              [-------------------------------------------------------] 100%
(2/2) loading package files                                                                   [-------------------------------------------------------] 100%
(2/2) checking for file conflicts                                                             [-------------------------------------------------------] 100%
(2/2) checking available disk space                                                           [-------------------------------------------------------] 100%
:: Processing package changes...
(1/2) installing crowdsec                                                                     [-------------------------------------------------------] 100%
time="21-03-2024 01:39:10" level=warning msg="Crowdsec is not the latest version. Current version is 'v1.5.5' and the latest stable version is 'v1.6.0'. Please update it!"
time="21-03-2024 01:39:10" level=warning msg="As a result, you will not be able to use parsers/scenarios/collections added to Crowdsec Hub after CrowdSec v1.6.0"
time="21-03-2024 01:39:10" level=info msg="Wrote new 963941 bytes index to /etc/crowdsec/hub/.index.json"
(2/2) installing crowdsec-debug                                                               [-------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/3) Reloading system manager configuration...
(2/3) Arming ConditionNeedsUpdate...
(3/3) Cleaning cache âš¡
==> no candidate packages found for pruning

Especially those logs emitted right during package install??

time="21-03-2024 01:39:10" level=warning msg="Crowdsec is not the latest version. Current version is 'v1.5.5' and the latest stable version is 'v1.6.0'. Please update it!"
time="21-03-2024 01:39:10" level=warning msg="As a result, you will not be able to use parsers/scenarios/collections added to Crowdsec Hub after CrowdSec v1.6.0"

xiota commented on 2024-03-21 10:12 (UTC)

@doums Whatever the reason, you're using an old build, and it has nothing to do with the PKGBUILD.

doums commented on 2024-03-21 09:53 (UTC)

Nah it's not that. I carefully removed every trace left by previous crowdsec install using sudo fd -HI crowdsec / and rm any occurrences. So when I try to install 1.6.0 it's on a very clean system.

xiota commented on 2024-03-21 02:59 (UTC) (edited on 2024-03-21 03:04 (UTC) by xiota)

Previous versions of this package inproperly installed files to /usr/local. If the files were not removed, they would override files installed to the correct location.

The only files that should be in /usr/local are ones you put there yourself. Most people don't use /usr/local at all, so all files should be safe to delete: find /usr/local -type f

doums commented on 2024-03-21 00:32 (UTC) (edited on 2024-03-21 00:43 (UTC) by doums)

Delete, clone a fresh copy, and rebuild

Actually that is what I did. I even cleaned go cache.

It even warns about the version during the package install -> https://b.deip.fr/p/sloth-tiger-pony