Bug 192587 - [NEW PORT] www/sams2: web-based Squid account management system
Summary: [NEW PORT] www/sams2: web-based Squid account management system
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: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-11 17:37 UTC by Roman
Modified: 2014-08-26 10:29 UTC (History)
3 users (show)

See Also:


Attachments
sams2.shar (24.93 KB, text/plain)
2014-08-11 17:38 UTC, Roman
no flags Details
sams2.shar (24.60 KB, text/plain)
2014-08-13 00:43 UTC, Roman
no flags Details
make check-plist;make stage-qa;portlint (981 bytes, text/plain)
2014-08-13 00:52 UTC, Roman
no flags Details
sams.shar (25.23 KB, text/plain)
2014-08-13 11:02 UTC, Roman
no flags Details
sams2.shar (24.63 KB, text/plain)
2014-08-14 14:31 UTC, Roman
no flags Details
sams2.shar (24.62 KB, text/plain)
2014-08-14 14:43 UTC, Roman
no flags Details
sams2.conf adapted for freebsd (1014 bytes, text/plain)
2014-08-15 09:55 UTC, Mikhail
no flags Details
sams2.shar (25.90 KB, text/plain)
2014-08-15 14:11 UTC, Roman
no flags Details
sams2.shar (23.60 KB, patch)
2014-08-26 10:26 UTC, Roman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roman 2014-08-11 17:37:10 UTC
SAMS2 (Squid Account Management System) is a WEB-based interface for managing Squid. Descendant of broken www/sams, but absolutely new and different.
Comment 1 Roman 2014-08-11 17:38:17 UTC
Created attachment 145674 [details]
sams2.shar
Comment 2 John Marino freebsd_committer freebsd_triage 2014-08-11 20:46:08 UTC
Thanks, we are making progress.  Now, do you have any verification available?  In order of preference, examples of what I'm looking for are:

1) "poudriere testport" or "poudriere bulk -t" logs
2) Redports or tinderbox logs
3) "make check-plist" followed by "make stage-qa" output  (https://www.freebsd.org/doc/en/books/porters-handbook/porting-testing.html)

Also, please run "portlint" and paste the output.



Also, is there a good reason not to call this www/sams?
There's no problem resurrecting www/sams and then replacing it with this shar.  I don't see an immediate need to call this sams2 (it's generally not a good idea to have the version in the name although there plenty of exceptions)
Comment 3 Roman 2014-08-13 00:43:36 UTC
Created attachment 145743 [details]
sams2.shar

Fixed some issues.
Comment 4 Roman 2014-08-13 00:52:15 UTC
Created attachment 145744 [details]
make check-plist;make stage-qa;portlint
Comment 5 Roman 2014-08-13 00:55:54 UTC
Hi John.
sams2.shar, in attachment, updated.
Tests are here https://razumit.ru/poudriere/.
Checks in attachment here https://bz-attachments.freebsd.org/attachment.cgi?id=145744.

Not sure about the proper name. There is two different versions of SAMS, 1.x and 2.x. 
Latter one actively developing, but about first one not sure.
Comment 6 John Marino freebsd_committer freebsd_triage 2014-08-13 01:04:12 UTC
These warnings need to be fixed:

Warning: 'bin/samsparser' is not stripped consider using ${STRIP_CMD}
Warning: 'bin/sams2daemon' is not stripped consider using ${STRIP_CMD}
Warning: 'bin/sams2redir' is not stripped consider using ${STRIP_CMD}
Warning: 'lib/sams2/libloadavg.so.1' is not stripped consider using ${STRIP_CMD}
Warning: 'lib/sams2/libfsusage.so.1' is not stripped consider using ${STRIP_CMD}
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for directories owned by MTREEs
===> Checking for directories handled by dependencies
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
====>> Checking for staging violations... done


If it's an automake file, it may have "install-strip" target.  If you define "INSTALL_TARGET= install-strip" in that case, the warnings will go away.


the version "2" is part of the packagename already.  So your package name right now is "sams2-2.0" which is redundant.  There is no sams 1, so there's nothing to get confused with.  It's perfectly normal to keep the same port name and increase the versions.

So I think you should go back to calling this "sams" unless there truly is no upgrade path from sams-1 to sams-2


Anyway, you are very close.  Fix those stage-qa warnings and thing about renaming it, then I think it will be patch-ready.
Comment 7 Roman 2014-08-13 11:02:02 UTC
Created attachment 145753 [details]
sams.shar

renamed to sams
Comment 8 Roman 2014-08-13 11:04:42 UTC
INSTALL_TARGET= install-strip did the trick. make stage-qa return no warnings.
Renamed to sams.
Comment 9 John Marino freebsd_committer freebsd_triage 2014-08-13 11:07:04 UTC
fantastic!

Note to next committer: resurrect www/sams first, then replace it with this shar.

Moving to patch-ready.
Comment 10 Mikhail 2014-08-13 16:49:34 UTC
But what if this approach sams2 update the old sams? I'm not sure a smooth transition from version 1.x.x to version sams 2.x.x. As rightly pointed above - in fact it is two different projects.
Comment 11 John Marino freebsd_committer freebsd_triage 2014-08-13 16:54:10 UTC
(In reply to Mikhail from comment #10)
> But what if this approach sams2 update the old sams? 

There is no "old" sams.
There's no sams at all, it's been deleted, remember?

> I'm not sure a smooth
> transition from version 1.x.x to version sams 2.x.x. As rightly pointed
> above - in fact it is two different projects.

What do you mean?  Is it a fork?  Is not sams-2.0 the logical successor to sams-1.0 ?
Comment 12 Mikhail 2014-08-13 17:09:57 UTC
I'm talking about the case when sams 1.0 is already installed. (For example, I)
Yes, sams2 rather fork of sams project.
And sams2 unlikely will pick up settings and database from sams 1.0 "as is".
But at least in sams 2 present tool for import from samas 1.0 database.
Do you think in this approach appropriate to replacement sams-sams2?
Comment 13 John Marino freebsd_committer freebsd_triage 2014-08-13 17:24:25 UTC
why not?  We can add an entry to UPDATING section for this. 

But if you guys really want to be called something else, we can do that as well.  I'd prefer something other than "sams2" but if there's not a better name, so be it.
Comment 14 Mikhail 2014-08-13 19:28:30 UTC
Well, as an option.
Looking forward to the emergence of a new port.
Comment 15 Roman 2014-08-14 14:31:11 UTC
Created attachment 145773 [details]
sams2.shar
Comment 16 Roman 2014-08-14 14:33:22 UTC
Dmitry Chemerik, author of sams also thinks that it should be sams2.
Comment 17 John Marino freebsd_committer freebsd_triage 2014-08-14 14:34:01 UTC
new version please:

XPORTREVISION=	1
XPORTEPOCH=	1


If this is a new port then neither PORTREVISION nor PORTEPOCHE should be set
Comment 18 Roman 2014-08-14 14:43:48 UTC
Created attachment 145774 [details]
sams2.shar
Comment 19 Roman 2014-08-14 14:46:23 UTC
Removed PORTREVISION, PORTEPOCH. 
Added PORTVERSION.
Comment 20 Mikhail 2014-08-14 20:08:04 UTC
Need a small fix:
sams2 designed primarily for Linux, as in linux squid is not located in /usr/local/sbin, but in /usr/sbin
Therefore, for sams2 daemon was able to work correctly in FreeBSD needs to create a symbolic link:
ln -s /usr/local/sbin/squid/usr/sbin/squid
Otherwise, the sams2 daemon will not start.
Everything else works great!
Tested on freebsd 10+mysql5.6+php55+apache24+squid33
Comment 21 Mikhail 2014-08-14 20:10:02 UTC
(In reply to Mikhail from comment #20)
> Need a small fix:
> sams2 designed primarily for Linux, as in linux squid is not located in
> /usr/local/sbin, but in /usr/sbin
> Therefore, for sams2 daemon was able to work correctly in FreeBSD needs to
> create a symbolic link:
> ln -s /usr/local/sbin/squid/usr/sbin/squid
> Otherwise, the sams2 daemon will not start.
> Everything else works great!
> Tested on freebsd 10+mysql5.6+php55+apache24+squid33

symbolic link:
ln -s /usr/local/sbin/squid /usr/sbin/squid


Sorry for the any clerical.
Comment 22 John Marino freebsd_committer freebsd_triage 2014-08-14 22:04:33 UTC
(In reply to Mikhail from comment #21)

> symbolic link:
> ln -s /usr/local/sbin/squid /usr/sbin/squid
> 
> 
> Sorry for the any clerical.

will not work.
Ports is not allowed to install anything in /usr/sbin, that's part of base.

You need a better solution.  Patch sams2 to look in the right place to begin with.
Comment 23 Mikhail 2014-08-15 03:07:04 UTC
Sorry, this is not a bug. I just did not pay attention to the new variable "SQUIDPATH" file sams2.conf.
The default value is "/usr/sbin", changed to "/usr/local/sbin" and there have been no creation of links.
Everything works fine.
I think the port is ready for use. I wait for it appearance in the ports tree.
Comment 24 John Marino freebsd_committer freebsd_triage 2014-08-15 06:14:37 UTC
(In reply to Mikhail from comment #23)
> Sorry, this is not a bug. I just did not pay attention to the new variable
> "SQUIDPATH" file sams2.conf.
> The default value is "/usr/sbin", changed to "/usr/local/sbin" and there
> have been no creation of links.

If I understood this correctly, sams2 will default to /usr/sbin unless this variable is explicitly set in the sams2.conf file.

It sounds like the default is bad.  Or at the very list, this definition should be preset in a sample conf file.

To have it not work by default is not optimal.  I would have to look to see the details though.
Comment 25 Mikhail 2014-08-15 07:35:49 UTC
No, this variable is initially set in file sams2.conf 
ie: "SQUIDPATH =/usr/sbin"
For freebsd should be changed to: "SQUIDPATH =/usr/local/sbin"
Once again, I draw your attention to - it's not a bug, but my flaw in the initial configuration sams2.
I can later put here a working example file sams2.conf, adapted for freebsd.
Comment 26 John Marino freebsd_committer freebsd_triage 2014-08-15 07:40:19 UTC
(In reply to Mikhail from comment #25)
> No, this variable is initially set in file sams2.conf 
> ie: "SQUIDPATH =/usr/sbin"
> For freebsd should be changed to: "SQUIDPATH =/usr/local/sbin"
> Once again, I draw your attention to - it's not a bug, but my flaw in the
> initial configuration sams2.
> I can later put here a working example file sams2.conf, adapted for freebsd.

You mean there is no sample sams2.conf yet?  
It sounds like one is needed, why not add it now before the PR is claimed?

if the conf.sample can be used with defaults, it should be preinstalled with the @sample keyword in the pkg-plist.  But maybe it's impossible to run sams2 with an unaltered conf file, I don't know.  In any case, a conf.sample should be provided with decent default values.
Comment 27 Mikhail 2014-08-15 07:56:37 UTC
No, it is. And with examples and comments. But the default settings do not provide the correct work "out of the box."
Need at least change the path to squid, squid.conf, squid logs dir and squid cache dir, to make things work.
Iin its turn have already resulted in most of these parameters in accordance with the default paths for squid/cache/log/squid.conf in freebsd.
Comment 28 Mikhail 2014-08-15 09:55:55 UTC
Created attachment 145808 [details]
sams2.conf adapted for freebsd

Here is config sams2.conf in which I have corrected all paths to the SQUID file and logs.
Comment 29 Roman 2014-08-15 14:11:07 UTC
Created attachment 145819 [details]
sams2.shar

Added sams2.conf
Comment 30 John Marino freebsd_committer freebsd_triage 2014-08-15 15:31:53 UTC
no resurrection anymore, as long as we are fixing title.
Comment 31 Roman 2014-08-15 15:36:46 UTC
(In reply to John Marino from comment #30)
> no resurrection anymore, as long as we are fixing title.
All is fixed for now I suppose.
Comment 32 John Marino freebsd_committer freebsd_triage 2014-08-24 09:32:40 UTC
minor feedback: you have "@" masking pre-install commands.  Don't mask installation commands.  The exception is mkdir; you are allowed to mask mkdir commands during install phase.  The rest have to be visible.
Comment 33 John Marino freebsd_committer freebsd_triage 2014-08-24 09:33:56 UTC
major feedback: Your sams2.conf method is unacceptable; it will overwrite existing conf files.  You must use @sample in pkg-plist for this.  See advanced plist methods in porters handbook.

I'll fix it here but you need to understand why it's wrong what you did.
Comment 34 John Marino freebsd_committer freebsd_triage 2014-08-24 09:36:33 UTC
There seems to be some sort of typo in pkg-plist, %%ETCDIR%%.conf makes no sense at all.  My guess it was for sams2.conf even though there is not even a directory separator
Comment 35 John Marino freebsd_committer freebsd_triage 2014-08-24 09:43:13 UTC
what happens if apache is at 2.2?  Right now no version of mod_php will be listed as run depends.  Is that what is intended?
Comment 36 Roman 2014-08-24 09:44:35 UTC
(In reply to John Marino from comment #35)
> what happens if apache is at 2.2?  Right now no version of mod_php will be
> listed as run depends.  Is that what is intended?
Yes, there is no need to separate mod_php for apache2.2.
Comment 37 John Marino freebsd_committer freebsd_triage 2014-08-24 09:48:20 UTC
okay, thanks.  I am running testport now to see about these apache sams2.conf files to see if they are overwriting as well.  They might also need @sample treatment
Comment 38 John Marino freebsd_committer freebsd_triage 2014-08-24 09:50:03 UTC
moderate issue: 

Every single directory is removed with @dirrmtry.  Surely this is incorrect.  You must use @dirrm when it is guaranteed to succeed.

I do not care that make makeplist generated that.  It's supposed to be manually tailored.  make makeplist is a bit stupid that way.
Comment 39 John Marino freebsd_committer freebsd_triage 2014-08-24 09:51:56 UTC
I am going to convert this to PORTDOCS.  It will simplify the pkg-plist and make future maintenance easier for you.
Comment 40 John Marino freebsd_committer freebsd_triage 2014-08-24 09:59:42 UTC
the docs need to be in %%DOCSDIR%%, not %%DOCSDIR%%-2.0.0

I see no reason to have versioning on sams2 documents especially when only one version of sams2 is going to be on the system at the time.
Comment 41 John Marino freebsd_committer freebsd_triage 2014-08-24 10:20:00 UTC
These files aren't getting installed:

%%APACHEETCDIR%%/doc4%%AP_NAME%%.conf
%%APACHEETCDIR%%/doc4%%AP_NAME%%.conf-e
%%APACHEETCDIR%%/%%AP_NAME%%.conf
%%APACHEETCDIR%%/%%AP_NAME%%.conf-e


Why are they here?
Is it apache 2.2 only?
Comment 42 John Marino freebsd_committer freebsd_triage 2014-08-24 10:22:35 UTC
okay, hold on, it's in the stage directory but wasn't installed.  Checking further.
Comment 43 John Marino freebsd_committer freebsd_triage 2014-08-24 10:25:43 UTC
what's the point of .conf and .conf-e ?

--- doc4sams2.conf-e    2014-08-24 10:08:11.000000000 +0000
+++ doc4sams2.conf      2014-08-24 10:08:11.000000000 +0000
@@ -3,7 +3,7 @@
 # to be accessed at http://localhost/sams2/
 #

-Alias /sams2/doc __DOCPREFIX
+Alias /sams2/doc /usr/local/share/doc/sams2

 <Location "/sams2/doc">
     Options Indexes

--- sams2.conf-e        2014-08-24 10:08:11.000000000 +0000
+++ sams2.conf  2014-08-24 10:08:11.000000000 +0000
@@ -3,7 +3,7 @@
 # to be accessed at http://localhost/sams2/
 #

-Alias /sams2 __WEBPREFIX
+Alias /sams2 /usr/local/share/sams2

 <Location "/sams2">
     Options Indexes


It seems to me that conf-e shouldn't be installed at all, and conf should really be conf.sample (installed with @sample)

Right?
Comment 44 John Marino freebsd_committer freebsd_triage 2014-08-24 10:27:26 UTC
BIG QUESTION:

You are installing this in %%DATADIR%%
shouldn't it be installed in %%WWWDIR%% ?
Comment 45 John Marino freebsd_committer freebsd_triage 2014-08-24 10:30:38 UTC
another question, are the apache24 files installed when sams2 is build on apache22 ?  If not, shouldn't these be conditional in the pkg-plist?
Comment 46 Roman 2014-08-24 10:38:20 UTC
> It seems to me that conf-e shouldn't be installed at all, and conf should
> really be conf.sample (installed with @sample)
> 
> Right?
I think yes.


> BIG QUESTION:
> 
> You are installing this in %%DATADIR%%
> shouldn't it be installed in %%WWWDIR%% ?
It is from make makeplist. Anyway it is installing in correct paths. Should it be fixed?

> another question, are the apache24 files installed when sams2 is build on
> apache22 ?  If not, shouldn't these be conditional in the pkg-plist?
If there is already apache22 in system apache24 will not be installing.
Comment 47 John Marino freebsd_committer freebsd_triage 2014-08-24 10:41:13 UTC
(In reply to Roman from comment #46)
> > You are installing this in %%DATADIR%%
> > shouldn't it be installed in %%WWWDIR%% ?
> It is from make makeplist. Anyway it is installing in correct paths. Should
> it be fixed?

make makeplist creats the list from where it got installed.  That doesn't mean it got installed in the correct spot for FreeBSD.  I don't think it did.  I'll have to override the location just like I had to for the docsdir.


> > another question, are the apache24 files installed when sams2 is build on
> > apache22 ?  If not, shouldn't these be conditional in the pkg-plist?
> If there is already apache22 in system apache24 will not be installing.

Well then the port will fail to install in that case because you don't have a conditional switch.  I'll have to fix that too.
Comment 48 John Marino freebsd_committer freebsd_triage 2014-08-24 10:45:25 UTC
I'm going to leave it in %%DATADIR%%.  I'm not sure that %%WWWDIR%% is correct in this case.
Comment 49 John Marino freebsd_committer freebsd_triage 2014-08-24 10:53:12 UTC
You trusted "make makeplist" way too much.

There are many %%AP_NAME%% variables that are completely incorrect.  They should be hardcoded "sams2", not a variable.  

The lesson is:  The warning at the top of the resulting plist says not to use the plist as given, but to review and edit it.  You used it without changing it and that was a mistake.
Comment 50 John Marino freebsd_committer freebsd_triage 2014-08-24 11:15:55 UTC
look at this post-install message:

***********************************************************************
*                             INSTALL COMPLETE                        *
***********************************************************************

Add following into httpd.conf:

Alias /sams2 /usr/local/share/sams2/

restart httpd, and point your browser to http://yourserver/sams2




why would http://yourserver/sams2 work if you don't install it in %%%WWWDIR%%?
Comment 51 John Marino freebsd_committer freebsd_triage 2014-08-24 11:17:59 UTC
ack, your pkg-message is also hardcode to /usr/local.   <---- don't do that
Comment 52 Roman 2014-08-24 11:25:58 UTC
(In reply to John Marino from comment #50)
> 
> Alias /sams2 /usr/local/share/sams2/
> 
> restart httpd, and point your browser to http://yourserver/sams2
> why would http://yourserver/sams2 work if you don't install it in
> %%%WWWDIR%%?
Because of Alias, above.

(In reply to John Marino from comment #51)
> ack, your pkg-message is also hardcode to /usr/local.   <---- don't do that
Didn't get it, hardcoded where?
Comment 53 John Marino freebsd_committer freebsd_triage 2014-08-24 11:29:31 UTC
(In reply to Roman from comment #52)
> (In reply to John Marino from comment #50)
> > 
> > Alias /sams2 /usr/local/share/sams2/
> > 
> > restart httpd, and point your browser to http://yourserver/sams2
> > why would http://yourserver/sams2 work if you don't install it in
> > %%%WWWDIR%%?
> Because of Alias, above.
> 
> (In reply to John Marino from comment #51)
> > ack, your pkg-message is also hardcode to /usr/local.   <---- don't do that
> Didn't get it, hardcoded where?


You can't assume this is installed in /usr/local.  That's only the default.  It could be anything.

I was in the process of shifting it to www/sams2
Wouldn't it be better there?
Your instructions are apache-specific no?  what about other webservers?
Comment 54 John Marino freebsd_committer freebsd_triage 2014-08-24 11:38:39 UTC
Okay, it's building and installing cleanly in %%WWWDIR%%

If you agree that's okay, then the only thing left to do is modify the pkg-message to:

"point your browser to http://yourserver/sams2"

The http server doesn't need to be restarted, no conf changes are needed.  The pkg-message doesn't even need variables.

What do you think?
Comment 55 Roman 2014-08-24 11:41:35 UTC
(In reply to John Marino from comment #54)
> Okay, it's building and installing cleanly in %%WWWDIR%%
> 
> If you agree that's okay, then the only thing left to do is modify the
> pkg-message to:
> 
> "point your browser to http://yourserver/sams2"
> 
> The http server doesn't need to be restarted, no conf changes are needed. 
> The pkg-message doesn't even need variables.
> 
> What do you think?
Yes, seems all right.
Comment 56 John Marino freebsd_committer freebsd_triage 2014-08-24 11:52:53 UTC
FYI, I used MAKE_ARGS to fix the directories because CONFIGURE_ARGS wasn't working.  I just realized that is because you overrode the configure target but incompletely, thus breaking CONFIGURE_ARGS.

I think I'm going to fiddle with this a bit more to restore configure.
Comment 57 John Marino freebsd_committer freebsd_triage 2014-08-24 12:01:00 UTC
makefile.cvs is calling a bunch of autotools that weren't specified.  It's probably not even needed, we probably only need to specify them with USE_AUTOTOOLS
Comment 58 John Marino freebsd_committer freebsd_triage 2014-08-24 13:08:25 UTC
this is frustrating.  If I do the configure properly, it won't build.  Only your hacky way works.

That indicates sams2 makefile stuff isn't quite current.
I'm tired off wasting so much time on this so I'm probably going to keep your way.
Comment 59 John Marino freebsd_committer freebsd_triage 2014-08-24 13:27:18 UTC
I'll commit this when I get back.

The configure script says it knows --docdir but it doesn't.  The configure system is kind of messed up.  I had to hack docdir with MAKE_ARGS.
Comment 60 commit-hook freebsd_committer freebsd_triage 2014-08-24 16:12:58 UTC
A commit references this bug:

Author: marino
Date: Sun Aug 24 16:12:52 UTC 2014
New revision: 365952
URL: http://svnweb.freebsd.org/changeset/ports/365952

Log:
  Add new port www/sams2

  PR:		192587
  Submitted by:	Roman
  Modified by:	marino

  SAMS (Squid Account Management System) is a WEB-based interface and tool to
  manage users of SQUID proxy server.  Main features are:

      * manage users access to SQUID - proxy with NTLM, NCSA authorization
        or IP address
      * manage prohibition of users to access to URL
      * manage to rewrite requested URL to graphical resources (banners,
        counters)
      * save and build reports of users statistic
      * switch of users access to SQUID proxy if his traffic quota is off
      * manage a delay pools for users groups

Changes:
  head/www/Makefile
  head/www/sams2/
  head/www/sams2/Makefile
  head/www/sams2/distinfo
  head/www/sams2/files/
  head/www/sams2/files/sams2
  head/www/sams2/files/sams2.conf.sample.in
  head/www/sams2/pkg-descr
  head/www/sams2/pkg-message
  head/www/sams2/pkg-plist
Comment 61 John Marino freebsd_committer freebsd_triage 2014-08-24 16:14:45 UTC
The issues with the configure script were very annoying and cost me a lot of time.  I made a lot of changes but it builds cleanly with stage-qa.  I hope it's what you want and need.
Comment 62 Roman 2014-08-25 13:03:35 UTC
Hi, John.
Great job, thanks.
Strange, it's claiming that require apache24, but that's not true.
Comment 63 John Marino freebsd_committer freebsd_triage 2014-08-25 14:14:40 UTC
(In reply to Roman from comment #62)
> Hi, John.
> Great job, thanks.
> Strange, it's claiming that require apache24, but that's not true.

No, it sames it requires apache.  However, that means apache24 unless you explicitly put apache22 in your make.conf

That's your line.  I didn't add it.
Comment 64 John Marino freebsd_committer freebsd_triage 2014-08-25 16:46:41 UTC
(In reply to John Marino from comment #63)
> (In reply to Roman from comment #62)
> > Hi, John.
> > Great job, thanks.
> > Strange, it's claiming that require apache24, but that's not true.
> 
> No, it says it requires apache.  However, that means apache24 unless you
> explicitly put apache22 in your make.conf
> 
> That's your line.  I didn't add it.


I also don't think it should have apache hardcoded.  Do you want to convert this to options?  for example, have a non-default option to add apache dependency?
Comment 65 Roman 2014-08-25 16:54:00 UTC
> I also don't think it should have apache hardcoded.  Do you want to convert
> this to options?  for example, have a non-default option to add apache
> dependency?
Yes, that would be better.
Comment 66 John Marino freebsd_committer freebsd_triage 2014-08-25 18:43:16 UTC
damn it.

Sams is morphing the install depending on if it detects a webserver. It could do different things with conf/conf-e depending on what it finds.
Comment 67 John Marino freebsd_committer freebsd_triage 2014-08-25 19:51:38 UTC
FYI:  (I really never want to see this port again, I spent another 2 hours on it)

Author: marino
Date: Mon Aug 25 19:49:16 2014
New Revision: 366141
URL: http://svnweb.freebsd.org/changeset/ports/366141
QAT: https://qat.redports.org/buildarchive/r366141/

Log:
  www/sams2: Fix some issues, especially apache22
  
  There were a number of issues with the first version of sams2.  The
  pkg-plist still had a bad "make makeplist" variable ("24" was wrongly
  converted to %%APACHE_VERSION%%).  There was also a typo on a PLIST
  substitution but this has been completely removed.
  
  This port was converted to options, particularly the APACHE option was
  added as a non-default option.  If selected, it will require the
  default version of Apache as a dependency and install sample apache
  conf files.  Previously the port would scan the whole system and install
  conf files in different locations depending on what it found.  Now the
  conf file creation is carefully controlled.
  
  Discussed with maintainer.
Comment 68 Roman 2014-08-26 10:26:43 UTC
Created attachment 146297 [details]
sams2.shar

fixed SQUIDLOGDIR
Comment 69 Roman 2014-08-26 10:27:58 UTC
(In reply to John Marino from comment #67)
> FYI:  (I really never want to see this port again, I spent another 2 hours
> on it)
Sorry to hear that, hope it isn't my fault mainly.

Fixed minor issue with SQUIDLOGDIR.
Comment 70 John Marino freebsd_committer freebsd_triage 2014-08-26 10:29:03 UTC
I can't use this.

"shar" is only for the initial port.
After that you submit patches.

It also really needs to be a new PR, but I'll accept a patch on this one.