Bug 193474 - security/webshag: some ports improvements.
Summary: security/webshag: some ports improvements.
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-09 03:01 UTC by clutton
Modified: 2017-10-22 14:59 UTC (History)
2 users (show)

See Also:


Attachments
diff file for the port (1.47 KB, patch)
2014-09-09 03:01 UTC, clutton
no flags Details | Diff
build log (13.28 KB, text/plain)
2014-09-09 03:02 UTC, clutton
no flags Details
new patch with %%PREFIX%% and @sample (2.87 KB, patch)
2014-09-10 05:11 UTC, clutton
no flags Details | Diff
PREFIX -> LOCALBASE (2.88 KB, patch)
2014-09-17 16:36 UTC, clutton
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description clutton 2014-09-09 03:01:36 UTC
Created attachment 147091 [details]
diff file for the port

I was pointed out that I've missed some things.

LICENSE_FILE


- OPTIONS helpers: NMAP_BUILD_DEPENDS=
- Its definitely a BUILD not RUN_DEPENDS?

- USES=shebangfix?

> +%%ETCDIR%%.conf
Does this need a filename?
Comment 1 clutton 2014-09-09 03:02:02 UTC
Created attachment 147092 [details]
build log
Comment 2 Jason E. Hale freebsd_committer 2014-09-09 13:17:31 UTC
Patch looks fine for the issues that were brought up, but there are other issues that should have been addressed before this port was added:

- webshag.conf should probably be installed as webshag.conf.sample and use the @sample keyword in pkg-plist so that edited configs don't get overwritten.
- patch-setup_linux_py uses hard-coded paths for PREFIX and LOCALBASE...this should be fixed.  You could use %%PREFIX%% and %%LOCALBASE%% in the patch instead, then use a post-patch replacement.
- Python bytecode should be pre-generated with and without the -O flag (.pyo and .pyc files) for everything installed in PYTHON_SITELIBDIR so there are no leftovers.
Comment 3 clutton 2014-09-10 05:07:31 UTC
(In reply to Jason E. Hale from comment #2)
> Patch looks fine for the issues that were brought up, but there are other
> issues that should have been addressed before this port was added:
> 
> - webshag.conf should probably be installed as webshag.conf.sample and use
> the @sample keyword in pkg-plist so that edited configs don't get
> overwritten.
> - patch-setup_linux_py uses hard-coded paths for PREFIX and LOCALBASE...this
> should be fixed.  You could use %%PREFIX%% and %%LOCALBASE%% in the patch
> instead, then use a post-patch replacement.
> - Python bytecode should be pre-generated with and without the -O flag (.pyo
> and .pyc files) for everything installed in PYTHON_SITELIBDIR so there are
> no leftovers.

USE_PYTHON=	distutils
PYSETUP=	setup.linux.py

I'm not sure how can I use -O flag. Because some things are already predefined in /usr/ports/Mk/Uses/python.mk

PYDISTUTILS_CONFIGUREARGS?=	# empty
PYDISTUTILS_BUILDARGS?=		# empty
PYDISTUTILS_INSTALLARGS?=	-c -O1 --prefix=${PREFIX}
.if defined(_PYTHON_FEATURE_DISTUTILS)
. if !defined(PYDISTUTILS_INSTALLNOSINGLE)
Comment 4 clutton 2014-09-10 05:11:28 UTC
Created attachment 147153 [details]
new patch with %%PREFIX%% and @sample
Comment 5 Jason E. Hale freebsd_committer 2014-09-10 07:44:45 UTC
The sub for nmap should be LOCALBASE, not PREFIX

As for the Python bytecode stuff, have a look at the post-install target of astro/gpsd for an example of how to handle it.  Of course, pkg-plist will have to include those files as well.
Comment 6 clutton 2014-09-17 16:36:25 UTC
Created attachment 147408 [details]
PREFIX -> LOCALBASE
Comment 7 clutton 2014-09-17 16:38:37 UTC
Python bytecode should be pre-generated with and without the -O flag (.pyo and .pyc files) for everything installed in PYTHON_SITELIBDIR so there are no leftovers.

There's no bytecode.

cd /tmp/usr/ports/security/webshag/work/stage/usr/local
Ξ usr/local → find . -type f
./bin/webshag_cli
./lib/python2.7/site-packages/webshag/gui/__init__.py
./lib/python2.7/site-packages/webshag/gui/gui_pscan.py
./lib/python2.7/site-packages/webshag/gui/gui.py
./lib/python2.7/site-packages/webshag/gui/gui_spider.py
./lib/python2.7/site-packages/webshag/gui/gui_info.py
./lib/python2.7/site-packages/webshag/gui/gui_widgets.py
./lib/python2.7/site-packages/webshag/gui/gui_images.py
./lib/python2.7/site-packages/webshag/gui/gui_uscan.py
./lib/python2.7/site-packages/webshag/gui/gui_fuzz.py
./lib/python2.7/site-packages/webshag/__init__.py
./lib/python2.7/site-packages/webshag/core/core_http.py
./lib/python2.7/site-packages/webshag/core/__init__.py
./lib/python2.7/site-packages/webshag/core/core_error.py
./lib/python2.7/site-packages/webshag/core/core_utilities.py
./lib/python2.7/site-packages/webshag/core/core_file.py
./lib/python2.7/site-packages/webshag/modules/module_pscan.py
./lib/python2.7/site-packages/webshag/modules/__init__.py
./lib/python2.7/site-packages/webshag/modules/module_uscan.py
./lib/python2.7/site-packages/webshag/modules/module_spider.py
./lib/python2.7/site-packages/webshag/modules/module_info.py
./lib/python2.7/site-packages/webshag/modules/module_fuzz.py
./lib/python2.7/site-packages/webshag/update/update.py
./lib/python2.7/site-packages/webshag/update/__init__.py
./lib/python2.7/site-packages/webshag/export/__init__.py
./lib/python2.7/site-packages/webshag/export/export.py
./share/licenses/webshag-1.10/GPLv3
./share/licenses/webshag-1.10/LICENSE
./share/licenses/webshag-1.10/catalog.mk
./share/webshag/proxies/proxies.txt
./share/webshag/fuzzer/directory-list-2.3-small.txt
./share/webshag/fuzzer/extensions.txt
./share/webshag/fuzzer/directory-list-1.0.txt
./share/webshag/custom/custom_tests.db
./share/webshag/custom/banners.db
./share/webshag/nikto/db_tests
./share/webshag/nikto/db_variables
./etc/webshag.conf.sample
Comment 8 Tobias Kortkamp freebsd_committer 2017-10-22 14:15:23 UTC
The last update to this bug was > 3 years ago.  Is this still relevant?
Comment 9 clutton 2017-10-22 14:32:24 UTC
(In reply to Tobias Kortkamp from comment #8)

Nope. I'd love to have this scanner removed from ports tree, since better ones available and this was abandoned.
Comment 10 Tobias Kortkamp freebsd_committer 2017-10-22 14:34:20 UTC
(In reply to clutton from comment #9)
No problem, I'll mark it DEPRECATED and drop you as maintainer.
Comment 11 commit-hook freebsd_committer 2017-10-22 14:43:12 UTC
A commit references this bug:

Author: tobik
Date: Sun Oct 22 14:42:36 UTC 2017
New revision: 452648
URL: https://svnweb.freebsd.org/changeset/ports/452648

Log:
  security/webshag: Mark deprecated

  There are better audit tools available and this was abandoned.

  - Also reset maintainer

  PR:		193474
  Requested by:	clutton@zoho.com (maintainer)

Changes:
  head/security/webshag/Makefile
Comment 12 Tobias Kortkamp freebsd_committer 2017-10-22 14:45:16 UTC
Done.  Thanks!
Comment 13 clutton 2017-10-22 14:47:58 UTC
(In reply to Tobias Kortkamp from comment #12)

Tnx, would it be deleted or I have to confirm something?
Comment 14 Tobias Kortkamp freebsd_committer 2017-10-22 14:51:01 UTC
(In reply to clutton from comment #13)
I've set an expiration date for 2017-11-30, so hopefully it'll be deleted
shortly after.  You won't have to do anything.
Comment 15 clutton 2017-10-22 14:59:37 UTC
(In reply to Tobias Kortkamp from comment #14)

Ok, thank you good sir!