Bug 199263

Summary: security/bruteblock: Latest patch (from bug id 194381 2014-10-15) breaks i386 compatibility
Product: Ports & Packages Reporter: Aleksey Palyutin <fesse>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Many People CC: fesse, ronald-lists
Priority: --- Flags: bugzilla: maintainer-feedback? (amdmi3)
Version: Latest   
Hardware: i386   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194381
Attachments:
Description Flags
rcorder (default)
none
rcorder (ldconfig added to REQUIRE) none

Description Aleksey Palyutin 2015-04-07 12:16:08 UTC
Latest patch from BugId 194381 breaks i386 compatibility. IPFW on i386 needs 32-bit values to be used as optional table field (used to store time), but patched version introduces 'long long', and ipfw table entry timeout goes to far far future, prevents them to be removed by bruteblockd. Without patching 'bruteblock.c' port works well. I think patching 'bruteblock.c' should not be done on i386. May be conditional Makefile?
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-04-09 01:05:36 UTC
A commit references this bug:

Author: amdmi3
Date: Thu Apr  9 01:04:56 UTC 2015
New revision: 383615
URL: https://svnweb.freebsd.org/changeset/ports/383615

Log:
  - Fix printing time_t on i386

  PR:		199263
  Submitted by:	fesse@mail.ru

Changes:
  head/security/bruteblock/Makefile
  head/security/bruteblock/files/patch-bruteblock.c
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2015-04-09 01:05:45 UTC
My bad, I've overlooked this.

Aleksey, Ronald, could you both please check that it now works correctly on i386 and arm?
Comment 3 Aleksey Palyutin 2015-04-09 05:56:36 UTC
Yes, it work fine now on i386.

---

It seem to be another bug in this port. Bruteblockd doesn't start automatically on system reboot, but manual start after logging in work fine. Console output:

Starting bruteblockd.
Shared object "libpcre.so.1" not found, required by bruteblockd
/etc/rc: WARNING: failed to start bruteblockd.

I think it is because bruteblockd starts too early, before ldconfig path is configured. I change startup script by adding DAEMON to REQUIRE string and problem disappeared. I don't know is it common problem or related to my system only, so need further research.

FreeBSD XXX.ru 9.3-RELEASE-p12 FreeBSD 9.3-RELEASE-p12 #2: Fri Mar 27 08:36:04 MSK 2015     XXXX@XXXX.ru:/usr/obj/usr/src/sys/PAE-SERVER  i386
Comment 4 Dmitry Marakasov freebsd_committer freebsd_triage 2015-04-09 14:41:07 UTC
Could you show output of `rcorder /etc/rc.d/* /usr/local/etc/rc.d/*` with default bruteblock rc.d script and after ldconfig is appended to REQUIRE: there?
Comment 5 Aleksey Palyutin 2015-04-10 06:05:44 UTC
Created attachment 155405 [details]
rcorder (default)

Output of `rcorder /etc/rc.d/* /usr/local/etc/rc.d/*` with unmodified bruteblockd rc script
Comment 6 Aleksey Palyutin 2015-04-10 06:07:52 UTC
Created attachment 155406 [details]
rcorder (ldconfig added to REQUIRE)

Output of `rcorder /etc/rc.d/* /usr/local/etc/rc.d/*` with modified bruteblockd rc script (REQUIRE: NETWORKING syslogd ldconfig)
Comment 7 Dmitry Marakasov freebsd_committer freebsd_triage 2015-04-10 11:57:20 UTC
Uh huh, so it should be fixed now.
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-04-10 11:59:45 UTC
A commit references this bug:

Author: amdmi3
Date: Fri Apr 10 11:59:01 UTC 2015
New revision: 383720
URL: https://svnweb.freebsd.org/changeset/ports/383720

Log:
  - Fix boottime startup by requiring ldconfig in rc.d script

  PR:		199263
  Submitted by:	fesse@mail.ru

Changes:
  head/security/bruteblock/Makefile
  head/security/bruteblock/files/bruteblockd.in
Comment 9 commit-hook freebsd_committer freebsd_triage 2015-04-10 12:10:47 UTC
A commit references this bug:

Author: amdmi3
Date: Fri Apr 10 12:10:25 UTC 2015
New revision: 383721
URL: https://svnweb.freebsd.org/changeset/ports/383721

Log:
  - Start before syslogd

  This is needed as bruteblock (not to be confused with bruteblockd)
  which is usually run from syslog, also requires ldconfig, and bruteblockd
  rc.d script provides it for him by depending on ldconfig and running
  before syslogd

  PR:		199263

Changes:
  head/security/bruteblock/Makefile
  head/security/bruteblock/files/bruteblockd.in
Comment 10 Ronald Klop 2015-05-06 14:35:10 UTC
(In reply to Dmitry Marakasov from comment #2)
It works for me on ARM.
Comment 11 Dmitry Marakasov freebsd_committer freebsd_triage 2015-05-06 17:11:53 UTC
Great, thank you!