Bug 212044 - [NEW PORT] www/ufdbguard: squidGuard fork compatible with newer squid versions
Summary: [NEW PORT] www/ufdbguard: squidGuard fork compatible with newer squid versions
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-22 08:48 UTC by Pavel Timofeev
Modified: 2016-08-24 04:10 UTC (History)
1 user (show)

See Also:


Attachments
port (12.75 KB, application/x-shar)
2016-08-22 08:48 UTC, Pavel Timofeev
no flags Details
new port (13.13 KB, patch)
2016-08-23 17:49 UTC, Pavel Timofeev
timp87: maintainer-approval+
Details | Diff
new port 2 (13.45 KB, text/plain)
2016-08-24 03:12 UTC, Pavel Timofeev
timp87: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Timofeev 2016-08-22 08:48:20 UTC
Created attachment 173929 [details]
port

This is a port of ufdbGuard.
https://www.urlfilterdb.com/products/ufdbguard.html
It's a squidGuard fork compatible with newer squid versions.

This port needs additional `ufdb` user and group creation.

Committer: please, create appropriate entries in ports/UIDs and ports/GIDs file.

Tester: open port's Makefile and change USERS from `ufdb` to `squid`. This will make testing easier.

Looking forward the the feedback!
Comment 1 Kurt Jaeger freebsd_committer freebsd_triage 2016-08-22 18:25:34 UTC
GIDs:
ufdb:*:898:
UIDs:
ufdb:*:898:898::0:0:ufdb user:/nonexistent:/usr/sbin/nologin
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2016-08-22 18:34:31 UTC
This happens when the port is build using poudriere: It fails in stage:

sh ./install_etcfiles.sh /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/etc/ufdbGuard /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin

***  You must be root but you appear to be nobody. ***
The ufdb startup script cannot be installed...

*** Error code 1

Any idea ? Did you test in poudriere ?
Comment 3 Pavel Timofeev 2016-08-22 18:42:12 UTC
(In reply to Kurt Jaeger from comment #2)
To be honest I haven't tested it in poudriere. I have no idea about the error.
It passes make stage && make check-plist && make package.

I'll definitely take a look.
Comment 4 Pavel Timofeev 2016-08-23 16:03:16 UTC
Hmm, looks like the needed user is added to the system only after actual port installation process.
Thinking...
Comment 5 Pavel Timofeev 2016-08-23 16:19:37 UTC
(In reply to timp87 from comment #4)
Also there is another issue:

===========================================================================
====> Running Q/A tests (stage-qa)
Warning: setuid files in the stage directory (are these necessary?):
828 -rwsr-sr-x  1 root  wheel  61448 Aug 23 16:12:51 2016 /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdbsignal
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
====>> Checking for staging violations... done
====>> Error: Filesystem touched during stage (files must install to ${STAGEDIR}):
etc/services: 
        size (86128, 86182)
build of www/ufdbguard ended at Tue Aug 23 19:12:52 MSK 2016
build time: 00:00:10
!!! build failure encountered !!!
[00:00:13] ====>> Error: Build failed in phase: stage_fs_violation
[00:00:13] ====>> Cleaning up
[00:00:13] ====>> Umounting file systems
Comment 6 Pavel Timofeev 2016-08-23 17:49:39 UTC
Created attachment 173975 [details]
new port

Ok, now it looks fixed!
Comment 7 Pavel Timofeev 2016-08-23 19:40:38 UTC
(In reply to Kurt Jaeger from comment #2)
In normal situation it looks like
...
./copy_user_params /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdbUpdate ufdbUpdate

  ***  Make sure you set DOWNLOAD_USER and DOWNLOAD_PASSWORD in /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdbUpdate
  ***  During the evaluation period you may use the demo username/password.
  ***  ____________________________________________________________________

/wrkdirs/usr/ports/www/ufdbguard/work/ufdbGuard-1.31/install-sh -c ufdbUpdate /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdbUpdate
making install.bin in src
/wrkdirs/usr/ports/www/ufdbguard/work/ufdbGuard-1.31/install-sh -c ufdbConvertDB /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdbConvertDB
/wrkdirs/usr/ports/www/ufdbguard/work/ufdbGuard-1.31/install-sh -c ufdbGenTable /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdbGenTable
/wrkdirs/usr/ports/www/ufdbguard/work/ufdbGuard-1.31/install-sh -c ufdbAnalyse /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdbAnalyse
/wrkdirs/usr/ports/www/ufdbguard/work/ufdbGuard-1.31/install-sh -c ufdbhttpd /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdbhttpd
/wrkdirs/usr/ports/www/ufdbguard/work/ufdbGuard-1.31/install-sh -c ufdb_analyse_urls.pl /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdb_analyse_urls
/wrkdirs/usr/ports/www/ufdbguard/work/ufdbGuard-1.31/install-sh -c ufdb_analyse_users.pl /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdb_analyse_users
/wrkdirs/usr/ports/www/ufdbguard/work/ufdbGuard-1.31/install-sh -c ufdb_top_urls.pl /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdb_top_urls
/wrkdirs/usr/ports/www/ufdbguard/work/ufdbGuard-1.31/install-sh -c ufdb_top_users.pl /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin/ufdb_top_users
sh ./install_etcfiles.sh /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/etc/ufdbGuard /wrkdirs/usr/ports/www/ufdbguard/work/stage/usr/local/bin
install_etcfiles.sh:  does not yet exist (OK)
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... target_directory
System configuration settings file is 
if [ /var/run/ufdbGuard != /var/tmp ] ; then /wrkdirs/usr/ports/www/ufdbguard/work/ufdbGuard-1.31/install-sh -c -o root -d /wrkdirs/usr/ports/www/ufdbguard/work/stage/var/run/ufdbGuard ; fi
echo "Installing SSL root certificates"
Installing SSL root certificates
...
Comment 8 Pavel Timofeev 2016-08-24 03:12:11 UTC
Created attachment 173987 [details]
new port 2

@Kurt, your problem is fixed.
Comment 9 Kurt Jaeger freebsd_committer freebsd_triage 2016-08-24 03:57:05 UTC
testbuilds@work
Comment 10 Kurt Jaeger freebsd_committer freebsd_triage 2016-08-24 04:10:06 UTC
Committed, thanks!
Comment 11 commit-hook freebsd_committer freebsd_triage 2016-08-24 04:10:48 UTC
A commit references this bug:

Author: pi
Date: Wed Aug 24 04:09:47 UTC 2016
New revision: 420758
URL: https://svnweb.freebsd.org/changeset/ports/420758

Log:
  New port: www/ufdbguard: squidGuard fork compatible with newer squid versions

  ufdbGuard is a URL filter for the Squid web proxy. Besides blocking
  access from PCs and smartphones to undesired websites, ufdbGuard
  has safety features to make browsing safer and to block remote
  access. ufdbGuard supports configuration of groups with different
  web access policies, SafeSearch enforcement, SSH tunnel detection,
  safer HTTPS traffic, time-based access rules and much more.

  WWW: https://www.urlfilterdb.com/

  PR:		212044
  Submitted by:	Pavel Timofeev <timp87@gmail.com>

Changes:
  head/GIDs
  head/UIDs
  head/www/Makefile
  head/www/ufdbguard/
  head/www/ufdbguard/Makefile
  head/www/ufdbguard/distinfo
  head/www/ufdbguard/files/
  head/www/ufdbguard/files/patch-src_Makefile.in
  head/www/ufdbguard/files/patch-src_check__config__file
  head/www/ufdbguard/files/patch-src_install__etcfiles.sh.in
  head/www/ufdbguard/files/patch-src_ufdbGuard.conf.in
  head/www/ufdbguard/files/pkg-message.in
  head/www/ufdbguard/files/ufdbguardd.in
  head/www/ufdbguard/pkg-descr
  head/www/ufdbguard/pkg-plist