Request and Ideas: Vim filetype plugins for FreeBSD

2007-04-09 Thread Ian A. Tegebo
I've been working on some ports and vim plugins and came across the
notion that having syntax highlighting for FreeBSD ports files, e.g.
pkg-plist, might be useful.  Firstly, I looked at vim.org and
freebsd-questions and in /usr/local/share/vim/vim* for any existing
material and didn't find anything.

My thoughts for filetype plugins for FreeBSD ports would be:

* Create syntax files for things like:
pkg-plist
pkg-descr
Makefile (when they're underneath a ports category)
rc.conf
sysctl.conf
loader.conf
* Write filetype plugins for ports
You could use portlint as the compiler
Quickfix could then help resolve problems
Vimplate could be used for templating
http://www.vim.org/scripts/script.php?script_id=1808
Tag completion could help with variables like SITE_PERL
* Write filetype plugin for rc.conf
This could utilize omni completion for what's in
/etc/default/rc.conf
...

I notice that other distributions have done similar things.  Has anyone
done any work along these lines?

-- 
Ian Tegebo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Adding paths to @INC in perl

2007-03-26 Thread Ian A. Tegebo
I've found several methods for adding directories to @INC in perl:

www.ncode.ch/papers/Perl-Library-Mechanics.pdf

I was hoping to find a KNOB, or something I could put in pkgtools.conf
so that my custom library path gets included in perl's @INC.  I was
hoping -Dusesitecustomize would have not required a patch to the port's
Makefile but this didn't seem to be the case.  

I'm using -Dotherlibdirs now:

==
--- Makefile-perl   Sat Feb 10 13:11:20 2007
+++ Makefile-perl-rcSat Feb 10 13:10:56 2007
@@ -121,6 +121,10 @@
 .endif
 MAN3PREFIX=${TARGETDIR}/lib/perl5/${PERL_VER}/perl
 
+.if defined(WITH_LIBDIRS)
+CONFIGURE_ARGS+=   -Dotherlibdirs=${WITH_LIBDIRS}
+.endif
+
 test:
@(cd ${WRKSRC}; make test)
 
@@ -145,6 +149,7 @@
@${ECHO}   WITHOUT_PERL_64BITINT=yes Disable 64 bit integers
@${ECHO} (affects only 32-bit 
platforms).
@${ECHO}   WITH_THREADS=yes  Build threaded perl.
+   @${ECHO}   WITH_LIBDIRS=PATH:..  Set the otherlibdirs 
configure arguments.
@${ECHO}   ENABLE_SUIDPERL=yes   Also build set-user-id 
suidperl binary.
@${ECHO} 
==

Is there a better way to do this?  If not, should I submit this patch to the
port maintainer?  

-- 
Ian Tegebo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


www/rt36 with mod_perl2 broken

2006-08-21 Thread Ian A. Tegebo
Has anyone been able to build www/rt36 with apache22 as well as
mod_perl2?  I get the following error with the following command:

portinstall -m 'WITH_APACHE2=yes' www/rt36 

===   rt-3.6.1_1 depends on file: 
/usr/local/lib/perl5/site_perl/5.8.8/Log/Dispatch.pm - not found
===Verifying install for 
/usr/local/lib/perl5/site_perl/5.8.8/Log/Dispatch.pm in 
/usr/ports/devel/p5-Log-Dispatch
===  p5-Log-Dispatch-2.12 is marked as broken: Broken due the new mod_perl2 
API.
*** Error code 1

--
Ian Tegebo
Residential Computing
University of California, Berkeley
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Using mergemaster for non-base files

2006-07-13 Thread Ian A. Tegebo
Is anyone using mergemaster for groups of files that are not being
updated from /usr/src?  I've been thinking of making a copy of 
/usr/src/etc/Makefile and then modifying it so that I can run mergemaster 
like this:

-- script --
MYTMP=/var/tmp/twiki_upgrade
MYSRC=/var/tmp/new_twiki_src
MYDST=/usr/local/www/twiki 

mergemaster -t $MYTMP -m $MYSRC -D $MYDST
 end script 

The first problem I ran into was:

-- Error --
make: don't know how to make distrib-dirs. Stop
make: don't know how to make distrib-dirs. Stop

  *** FATAL ERROR: Cannot 'cd' to /var/tmp/new_twiki_src and install files to
the temproot environment
 end Error ---

Has anyone had any luck with something like this?  My approach will be
to write a Makefile in $MYSRC/etc/Makefile that will have targets:


$ grep -E '^[-a-zA-Z0-9_]+:' /usr/src/etc/Makefile
afterinstall:
distribute:
distribution:
distrib-dirs:
etc-examples:

--
Ian Tegebo
Residential Computing
UC Berkeley
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Maintaining local ports

2006-06-09 Thread Ian A. Tegebo
On Wed, Apr 19, 2006 at 02:10:07AM -0700, Ian A. Tegebo wrote:
 I couldn't find anything in the handbook, freebsddiary, or the mailing
 lists about maintaining your own ports within Ports.
I'm replying to my own post to inform anyone else who's interested to go
look look in freebsd-ports under category and local ports.

--
Ian Tegebo
Residential Computing
University of California Berkeley
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: difference between deinstall and pkg_delete?

2006-06-05 Thread Ian A. Tegebo
On Thu, Jun 01, 2006 at 11:08:14AM -0700, Jon Falconer wrote:
 So I'm wondering what is the difference between pkg_delete and using make
 deinstall from within the ports directory? What does make deinstall do
 that pkg_delete does not do? What does pkg_delete do that make deinstall
 does not do?
After spending some time with /usr/ports/Mk/bsd.port.mk and the man page
for pkg_delete, I think I'm just as confused as you are.  As you
mention, the man page for ports seems to imply that pkg_delete is a bad
thing and that you should use 'make deinstall'.

My analysis of 'make deinstall' in bsd.port.mk concludes that the
deinstall target calls 'pkg_delete -f' on the package names supplied by
pkg_info.  I'm not entirely sure what implications this has for the
installation cookies.

If you were to only use pkg_delete, some things might go wrong.  For
example in the Technical Details section, it mentions the 'require' and
the 'deinstall' scripts that can fail during a pkg_delete.  A 
'pkg_delete -f' would force the issue (and that's what 'make deinstall' 
does).

Getting back to the 'make reinstall' target, it appears that all it does
is 'rm -f' the installation and package cookies before running install.
My conclusion is confusion.  I'm not sure what the man page author meant
by 
Use this to restore a port after using pkg_delete(1)
when you should have used deinstall.

Can someone with more experience give examples that might clarify the
situation?


--
Ian Tegebo
Residential Computing
University of California Berkeley
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Opinion please on quick and dirty

2006-04-21 Thread Ian A. Tegebo
On Thu, Apr 20, 2006 at 11:53:23AM +0800, Low Kian Seong wrote:
 Not really a question, rather a plea of opinion. I looked around for a zope
 howto on FreeBSD but found none, so i wrote my own, and I want to contribute
 the docs back, but before that can anyone interested please have a look at
 it and tell me what you think ? The guide is a quick and dirty on how to get
 zope installed and running on your FreeBSD box.
Adding instructions for howto do this with portupgrade would be helpful,
e.g. dealing with the 'make instance'.

Thanks for the contribution!

--
Ian Tegebo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: PAM/SSH/OPIE configuration without /etc/passwd

2006-04-20 Thread Ian A. Tegebo
On Thu, Apr 20, 2006 at 09:01:52AM -0400, Gabriel O'Brien wrote:
 My goal is to have SSH allow authorized_keys and OPIE authentication but 
 deny all other forms of authentication.  Obviously I want authentication 
 to be denied if the user has neither configured as well.
 
 # auth
 authrequiredpam_nologin.so  no_warn
 authsufficient  pam_opie.so no_warn 
 no_fake_prompts
 authrequisite   pam_opieaccess.so   no_warn allow_local
I'm looking at the last line there and the pam_opieaccess manpage:

---
 The pam_opieaccess module is used in conjunction with the pam_opie(8) PAM
 module to ascertain that authentication can proceed by other means (such
 as the pam_unix(8) module) even if OPIE authentication failed.
---

It looks like that pam_opieaccess.so line might be allowing logins to
continue.

My thought would be that you should try this:
|# auth
|auth  requiredpam_nologin.so  no_warn
|auth  sufficient  pam_opie.so no_warn no_fake_prompts
|auth  requiredpam_ssh.so  try_first_pass
|auth  requiredpam_deny.so no_warn

--
Ian Tegebo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Maintaining local ports

2006-04-19 Thread Ian A. Tegebo
I couldn't find anything in the handbook, freebsddiary, or the mailing
lists about maintaining your own ports within Ports.

I'd like to write ports that would install scripts local to my site such
that multiple hosts can cvsup our local tree and then be able to
install/uninstall using things like 'portupgrade'.  These would be ports
that only we would be interested in.

Gentoo has the portage overlay feature:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3chap=5#doc_chap2

Does anyone know how FreeBSD may accomplish this?  

I've thought about creating my own ports mirror and then including my ports in 
something like /usr/ports/mysite (or /usr/ports/misc).

Has anyone tried this?

--
Ian Tegebo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to handle 'local' ports/packages?

2006-04-19 Thread Ian A. Tegebo
On Wed, Apr 05, 2006 at 10:35:09AM +1000, [EMAIL PROTECTED] wrote:
 I'm happy with the package I've made, as it enables me to check what
 version is installed with pkg_info, I just want it to play nicely with
 other real ports!
I'm after the same thing.

I did come across /usr/ports/Tools/scripts/addport and

http://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/ports.html

I've posted in freebsd-ports about this issue under the subject 
Maintaining Site Specific Ports and have one response at the moment that 
gives a succinct set of steps to try.

Now I'm starting to think about how to create a portsnap mirror that
serves as a distfile proxy and local repository for my site's ports.

--
Ian Tegebo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


ports and interactivity

2006-03-26 Thread Ian A. Tegebo
I'm interested in knowing several things:

1 When is a port interactive?
2 Is there an easy way to determine the above?
3 What are all the options for a given port?

After doing some reading, I understand that one can learn about options
in Makefiles, running make show-config, make show-options, or some
other idiosyncratic method that seems to vary from port to port.

In terms of question 1, there seems like there should be a
IS_INTERACTIVE variable set in the Makefile but in the example of
shells/bash-completion, there is no such variable and yet I was 
presented with what I imagine was dialog prompting me to choose
between bash2 and the newer bash3 (default shells/bash).

I have a hidden agenda here.  I would like to be able to present
portupgrade with a list of ports, preprocess all interactive ports
before any actual building occurs, and then let portupgrade do its
thing.  

Now, I could use the BATCH variable to at least process all
ports that aren't interactive but that hardly seems cool when there
could be dependencies that are interactive (which would show up when I
pass -rRn to portupgrade).

I've also taken a cursory look at portmanager and portmaster but neither
seem to fulfill my agenda.  It's not that I want to simply achieve
automation, I want to do all the human work of evaluating options and
making decisions up front (without all the tedious work of poking around in 
Makefiles when there are already nice things like those dialog prompts).

Has anyone gone down this road?  Does it not go anywhere?  Is there a
better way to do this?  

--
Ian Tegebo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: slapd and bdb-4.2.52

2006-02-16 Thread Ian A. Tegebo
On Thu, Feb 16, 2006 at 03:25:43PM +0100, Per olof Ljungmark wrote:
 AFAIK you can run without the patch but one of the db's will grow 
 forever. I have patched all our slapd's as follows:
 
 /usr/local/etc/rc.d/slapd.sh stop
 cd /usr/ports/databases/db42
 make clean
 make patch
 cd work/db-4.2.52/
 --- fetch the BerkeleyDB42.patch
 patch -p0  BerkeleyDB42.patch
 cd ../../
 make deinstall
 make reinstall
 /usr/local/etc/rc.d/slapd.sh start
 
 http://www.google.se/search?num=100hl=enq=BerkeleyDB42.patch+site%3Aopenldap.orgbtnG=Search
Would this be a case where a problem report should be filed?  I did a
query and I didn't see any that were open for TXN and db42:

http://www.freebsd.org/send-pr.html
http://www.freshports.org/databases/db42/

--
Ian Tegebo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Strange problem with user account

2006-02-15 Thread Ian A. Tegebo
On Fri, Feb 10, 2006 at 08:39:06PM -0800, Ian A. Tegebo wrote:
 Somehow I've foobarred a user account.
The account turned out not to have been foobared.  The account had had
18 groups and this exceeded the kern.ngroups default of 16.  Reducing
the number of groups solved the problem.

 # su USER
 su: setusercontext: Invalid argument
A better ktrace as root is:

# ktrace -di su yontege
# kdump -f ktrace.out
...
1080 su   CALL  setgroups(0x11,0xbfbfe5b0)
1080 su   RET   setgroups -1 errno 22 Invalid argument
...
# man setgroups
-
ERRORS
 The setgroups() system call will fail if:

 [EPERM]The caller is not the super-user.

 [EINVAL]   The number specified in the ngroups argument is larger
than the NGROUPS limit.

 [EFAULT]   The address specified for gidset is outside the
process address space.
-

and then it was elementary.  
 
 I suspect that something funny has happened to the account before the
 migration; something like having been removed from /etc/passwd but
 nowhere else.
And this was an incorrect suspicion which was confirmed by investigating
all of the pwd.db related files.

Hope this helps someone someday.

--
ian
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Strange problem with user account

2006-02-10 Thread Ian A. Tegebo
Somehow I've foobarred a user account.  It's on a system that first had
the account in /etc/passwd, but then I moved the system over to using
LDAP for user imformation.  Other accounts are fine, but this one will
not allow auth and gives the following error when trying to su ian as
root:

# su USER
su: setusercontext: Invalid argument

And doing the following shows

# ktrace su ian
# kdump -f ktrace.out
...
   35Feb 10 20:29:20 su: initgroups(ian,100): Invalid
   argument
   ...
is near the end of the output.  Both ian and the GID 100 show up
just fine when I do:

# id ian
uid=1032(ian) gid=100(users) groups=100(users)

I suspect that something funny has happened to the account before the
migration; something like having been removed from /etc/passwd but
nowhere else.

The problem is that I can't figure out where to look now.

--
ian
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


jdk1.4.2 port and incorrect manpath

2006-02-09 Thread Ian A. Tegebo
I read in man(1) that the MANPATH is comiled into the man binary; after
building the jdk14 port (1.4.2p7_2), I find that the man pages for java
are in /usr/local/jdk1.4.2/man and thus are not accessible except by
specifying them in particular.

   1) Do I need recompile man?
   2) Is the port broken?: I did not see a bug for it, nor a list post.
   3) Is there something else I'm missing?

I'm currently cvsupping to get 1.4.2p8_2.

--
Ian Tegebo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Penrose: Virtual Directory Server

2006-02-07 Thread Ian A. Tegebo
After doing a search in the list for penrose, I couldn't find any hits
for this Virtual Directory Server:

http://docs.safehaus.org/display/PENROSE/Home

I want to use it with PostgreSQL and OpenLDAP directories.  Since I
didn't see anything in ports, I wondered if anyone had gotten this
working on their own.

--
Ian Tegebo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]