Re: shtool rotate patch to pass file values to epilog/prolog

2008-09-21 Thread Bill Campbell
On Sun, Sep 21, 2008, Ralf S. Engelschall wrote:
>On Fri, Sep 19, 2008, Bill Campbell wrote:
>
>> The attached patch to the sh.rotate script sets an environment
>> variable ROTATE_LOGFILE with the name of the current file being
>> processed before invoking the epilog or prolog programs.  This
>> permits the epilog/prolog script to do things such as calling
>> webalizer to process the file being rotated.
>>
>> The problem is that defining multiple log files in the rc.conf
>> file with lines like the follow cause the epilog/prolog programs
>> to be execute multiple times without knowledge of which file is
>> being processed.
>>
>>  apache_log_files="/opkg/var/apache/log/*access*log"
>>
>> I first tried having the sh.rotate script add an argument to the
>> eval of the epilog/prolog command, but this does not work when
>> the command is compound as in the rc.apache daily processing:
>>
>>  -E "${apache_log_epilog} && rc apache reload"
>>
>> Creating a new environment variable avoids this problem and
>> cannot break any existing epilog/prolog programs as they will not
>> be aware of the variable.
>
>Ok, taken over into my GNU shtool source tree for inclusion into
>GNU shtool 2.0.9 -- with just a small adjustment: ROTATE_LOGFILE
>-> SHTOOL_ROTATE_LOGFILE to avoid any conflicts. Thanks for your
>contribution, Bill!

Thanks Ralf.

I thought you might want to use a more descriptive environment
variable, and that get it into the main shtool.

Presumably this will make it into the shtool rotate man page?

Bill
-- 
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:  (206) 236-1676  Mercer Island, WA 98040-0820
Fax:(206) 232-9186

There is far more danger in public than in private monopoly, for when
Government goes into business it can always shift its losses to the
taxpayers.  Government never makes ends meet -- and that is the first
requisite of business. -- Thomas Edison
__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


shtool rotate patch to pass file values to epilog/prolog

2008-09-19 Thread Bill Campbell
The attached patch to the sh.rotate script sets an environment
variable ROTATE_LOGFILE with the name of the current file being
processed before invoking the epilog or prolog programs.  This
permits the epilog/prolog script to do things such as calling
webalizer to process the file being rotated.

The problem is that defining multiple log files in the rc.conf
file with lines like the follow cause the epilog/prolog programs
to be execute multiple times without knowledge of which file is
being processed.

apache_log_files="/opkg/var/apache/log/*access*log"

I first tried having the sh.rotate script add an argument to the
eval of the epilog/prolog command, but this does not work when
the command is compound as in the rc.apache daily processing:

-E "${apache_log_epilog} && rc apache reload"

Creating a new environment variable avoids this problem and
cannot break any existing epilog/prolog programs as they will not
be aware of the variable.

Bill
-- 
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:  (206) 236-1676  Mercer Island, WA 98040-0820
Fax:(206) 232-9186

Breathe fire, slay dragons, and take chances. Failure is temporary, regret
is eternal.
--- sh.rotate.orig  2008-04-02 13:10:17.0 -0700
+++ sh.rotate   2008-09-19 11:48:40.504881762 -0700
@@ -205,6 +205,10 @@
 if [ ".$opt_t" = .yes ]; then
 echo "$opt_P"
 fi
+# pass current log file name to prolog
+# prolog cannot be handed an argument as it may be
+# called as "prolog && something"
+ROTATE_LOGFILE="$ldir/$file"; export ROTATE_LOGFILE
 eval $opt_P
 [ $? -ne 0 ] && shtool_exit $?
 fi
@@ -394,6 +398,10 @@
 if [ ".$opt_t" = .yes ]; then
 echo "$opt_E"
 fi
+# pass archive file name to epilog command
+# epilog cannot be handed an argument as it is often
+# called as "epilog && something"
+ROTATE_LOGFILE="${adir}/${file}.${n}"; export ROTATE_LOGFILE
 eval $opt_E
 [ $? -ne 0 ] && shtool_exit $?
 fi


webalizer -- add with-bzip2 option

2008-09-18 Thread Bill Campbell
May I suggest adding ``--with-bzip2'' to the default options to
configure in the webalizer package as it is required to process
the default compressed apache log files.

Bill
-- 
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:  (206) 236-1676  Mercer Island, WA 98040-0820
Fax:(206) 232-9186

It is practically impossible to teach good programming style to
students that have had prior exposure to BASIC: as potential
programmers they are mentally mutilated beyond hope of
regeneration.  -- Dijkstra
__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: BIND -- Problems with Linux capabilties

2008-07-25 Thread Bill Campbell
On Fri, Jul 25, 2008, Ralf S. Engelschall wrote:
>On Thu, Jul 24, 2008, Bill Campbell wrote:
>
>> I ran into a problem today attempting to build the current version of bind,
>> bind-9.5.0p1-20080709.src.rpm, on a SuSE Linux Enterprise 9 PL3
>> system with the following error:
>>
>> /csrel25/bin/cc -I/csrel25/RPM/TMP/bind-9.5.0-P1 -I./include -I./../include 
>> -I/csrel25/RPM/TMP/bind-9.5.0-P1/lib/dns/include -I../../../lib/dns/include 
>> -I/csrel25/RPM/TMP/bind-9.5.0-P1/lib/isc/include -I../../../lib/isc 
>> -I../../../lib/isc/include -I../../../lib/isc/unix/include 
>> -I../../../lib/isc/nothreads/include -I../../../lib/isc/x86_32/include -fPIC 
>> -I/csrel25/include -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings 
>> -Wformat -Wpointer-arith -fno-strict-aliasing -c os.c -o os.o
>> os.c: In function 'linux_initialprivs':
>> os.c:266: error: invalid operands to binary |
>> make[3]: *** [os.lo] Error 1
>> make[2]: *** [subdirs] Error 1
>> make[1]: *** [subdirs] Error 1
>> make: *** [subdirs] Error 1
>> error: Bad exit status from 
>>
>> This is in the line that is patched in bind.patch, and results when
>> attempting to OR something into a structure, a practice that has been
>> deprecated for decades (no wonder it' Buggy Internet Name Daemon :-).
>
>Ok, I see. But before we completely disable the Capability stuff, can
>you once again try to build the latest "bind" package? I tried to adjust
>the patch to fit the BIND 9.5.0 world order and hopefully it now builds
>for you even without --disable-linux-caps. Can you check?

That appears to have fixed it (why didn't I think of that :-).

Bill
-- 
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:  (206) 236-1676  Mercer Island, WA 98040-0820
Fax:(206) 232-9186

Giving money and power to government is like giving whiskey and car keys to
teenage boys -- P.J. O'Rourke
__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: BIND -- Problems with Linux capabilties

2008-07-25 Thread Bill Campbell
On Fri, Jul 25, 2008, Ralf S. Engelschall wrote:
>On Thu, Jul 24, 2008, Bill Campbell wrote:
>
>> I ran into a problem today attempting to build the current version of bind,
>> bind-9.5.0p1-20080709.src.rpm, on a SuSE Linux Enterprise 9 PL3
>> system with the following error:
>>
>> /csrel25/bin/cc -I/csrel25/RPM/TMP/bind-9.5.0-P1 -I./include -I./../include 
>> -I/csrel25/RPM/TMP/bind-9.5.0-P1/lib/dns/include -I../../../lib/dns/include 
>> -I/csrel25/RPM/TMP/bind-9.5.0-P1/lib/isc/include -I../../../lib/isc 
>> -I../../../lib/isc/include -I../../../lib/isc/unix/include 
>> -I../../../lib/isc/nothreads/include -I../../../lib/isc/x86_32/include -fPIC 
>> -I/csrel25/include -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings 
>> -Wformat -Wpointer-arith -fno-strict-aliasing -c os.c -o os.o
>> os.c: In function 'linux_initialprivs':
>> os.c:266: error: invalid operands to binary |
>> make[3]: *** [os.lo] Error 1
>> make[2]: *** [subdirs] Error 1
>> make[1]: *** [subdirs] Error 1
>> make: *** [subdirs] Error 1
>> error: Bad exit status from 
>>
>> This is in the line that is patched in bind.patch, and results when
>> attempting to OR something into a structure, a practice that has been
>> deprecated for decades (no wonder it' Buggy Internet Name Daemon :-).
>
>Ok, I see. But before we completely disable the Capability stuff, can
>you once again try to build the latest "bind" package? I tried to adjust
>the patch to fit the BIND 9.5.0 world order and hopefully it now builds
>for you even without --disable-linux-caps. Can you check?

I will have to do this in a couple of days as I will be going out of town
early Friday, and won't be where I can test this until Sunday night or
Monday morning.

I had run into this issue a week or so ago when building on another Linux
platform, but didn't follow up at the time as we normally use djbdns, not
bind.  Looking at the code after running the command through cpp only to
get everything expanded, it looks as though the ``caps |= ...'' is
operating on a structure, which really is not a very sensible thing to do
if one expects portability.  Then again diddling bits like this has
portability issues in any case as it could run into problems depending on
the endianess of the machine.

Bill
-- 
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:  (206) 236-1676  Mercer Island, WA 98040-0820
Fax:(206) 232-9186

Permit me to issue and control the money of a nation, and I care not
who makes its laws.  -- Mayer Amschel Rothschild
__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


BIND -- Problems with Linux capabilties

2008-07-24 Thread Bill Campbell
I ran into a problem today attempting to build the current version of bind,
bind-9.5.0p1-20080709.src.rpm, on a SuSE Linux Enterprise 9 PL3
system with the following error:

/csrel25/bin/cc -I/csrel25/RPM/TMP/bind-9.5.0-P1 -I./include -I./../include 
-I/csrel25/RPM/TMP/bind-9.5.0-P1/lib/dns/include -I../../../lib/dns/include 
-I/csrel25/RPM/TMP/bind-9.5.0-P1/lib/isc/include -I../../../lib/isc 
-I../../../lib/isc/include -I../../../lib/isc/unix/include 
-I../../../lib/isc/nothreads/include -I../../../lib/isc/x86_32/include -fPIC 
-I/csrel25/include -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings 
-Wformat -Wpointer-arith -fno-strict-aliasing -c os.c -o os.o
os.c: In function 'linux_initialprivs':
os.c:266: error: invalid operands to binary |
make[3]: *** [os.lo] Error 1
make[2]: *** [subdirs] Error 1
make[1]: *** [subdirs] Error 1
make: *** [subdirs] Error 1
error: Bad exit status from 

This is in the line that is patched in bind.patch, and results when
attempting to OR something into a structure, a practice that has been
deprecated for decades (no wonder it' Buggy Internet Name Daemon :-).

The package did build on a SuSE Linux Enterprise 10 system which has a
different version of libcap the source of sys/capability.h.  The SLES10
system has linux/capability.h but no sys/capability.h while SLES9SP3 has
both.

I got BIND to build by turning off linux capabilities in the configure,
adding an option to the bind.spec file to allow turning this off.  I don't
know what one loses by disabling these functions, but I'm going out of town
in the morning and don't have time to dig into this today.

The attached patch to bind.spec enables this option.

Bill
-- 
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:  (206) 236-1676  Mercer Island, WA 98040-0820
Fax:(206) 232-9186

Most people, sometime in their lives, stumble across truth. Most jump
up, brush themselves off, and hurry on about their business as if
nothing had happened. - Sir Winston Churchill
--- bind.spec.orig  2008-07-24 16:36:48.614596725 -0700
+++ bind.spec   2008-07-24 16:24:15.0 -0700
@@ -36,7 +36,7 @@
 Group:DNS
 License:  ISC
 Version:  %{V_opkg}
-Release:  20080709
+Release:  20080724
 
 #   package options
 %option   with_dnssecyes
@@ -45,6 +45,7 @@
 %option   with_mysql no
 %option   with_odbc  no
 %option   with_ldap  no
+%option   with_linux_cap yes
 
 #   list of sources
 Source0:  ftp://ftp.isc.org/isc/bind9/%{V_dist}/bind-%{V_dist}.tar.gz
@@ -147,6 +148,9 @@
 --without-libxml2 \
 --with-libtool \
 --disable-shared \
+%if "%{with_linux_cap}" == "no"
+--disable-linux-caps \
+%endif
 --disable-nls
 
 #   build program


Re: OpenPKG on Mac OS X 10.4

2007-05-28 Thread Bill Campbell
On Mon, May 28, 2007, Anders F Bj?rklund wrote:
>Tried OpenPKG on Mac OS X and ran into some minor
>build issues with using static libraries on Darwin...

I've got a fair number of packages running on PowerPC OS X.

I've found that most packages require dynamic libraries to function as
darwin/OS X just doesn't do static libraries for most things.  To that end,
I've frequently had to fiddle the .spec files to allow shared libraries
when building on darwin.

I built a dummy package for gcc since I'm not smart enough to figure out
how to get it to build from source.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

There is no distinctly native American criminal class save Congress
-- Mark Twain
__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


[FWD] LISA '07 Call For Papers

2007-02-21 Thread Bill Campbell
I think it would be a very good idea if we could get one or more
presentations on OpenPKG at this conference.  This would seem to
be to be an event that would have many of the people who would
benefit from OpenPKG.

Another event coming up that would be interesting is the O'Reilly
Open Source conference in Portland Oregon this summer.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``If the future navigation system [for interactive networked services on
the NII] looks like something from Microsoft, it will never work.''
(Chairman of Walt Disney Television & Telecommunications)
--- Begin Message ---

Call for Papers
LISA '07: 21st Large Installation System Administration Conference
November 11-16, 2007, Dallas, TX, USA
http://www.usenix.org/lisa07/cfpa
Extended abstract and paper submissions due: May 14, 2007
Sponsored by USENIX and SAGE


Dear Colleague,

The LISA '07 organizers invite you to contribute proposals for refereed
papers, invited talks, and workshops, plus any ideas you have for Guru
Is In sessions, Work-in-Progress Reports, the new poster session, and
training sessions.

The Call for Participation with submission guidelines and sample topics
can be found on the USENIX Web site at http://www.usenix.org/lisa07/cfpa

For twenty years, the annual LISA conference has been the foremost
worldwide gathering for everyone interested in the technical and
administrative issues of running a large computing facility.
Administrators of all specialties and levels of expertise meet at LISA
to exchange ideas, sharpen old skills, learn new techniques, debate
current issues, and meet colleagues and friends.

The conference's diverse group of participants is matched by an equally
broad spectrum of activities:

* A training program for both beginners and experienced attendees covers
many administrative topics, ranging from basic administrative procedures
to using cutting-edge technologies.

* Refereed papers present the latest developments and ideas related to
system and network administration.

* Invited talks discuss important and timely topics and often spark
lively debates and conversation.

* Work-in-Progress Reports (WiPs) provide brief peeks at next year's
innovations.

* NEW! The Poster Session offers the opportunity to describe your
current work.

GET INVOLVED!
* Submit a draft paper or extended abstract proposal for a refereed
paper.
* Propose a training session topic.
* Suggest an invited talk speaker.
* Share your experience by leading a Guru Is In session.
* Submit a proposal for a workshop.
* NEW! Submit a poster.
* Present a Work-in-Progress Report (WiP).
* Organize or suggest a Birds-of-a-Feather (BoF) session.
* Email an idea to the program chair: [EMAIL PROTECTED]

We look forward to hearing from you!

On behalf of the LISA '07 Organizers,

Paul Anderson
University of Edinburgh
[EMAIL PROTECTED]


IMPORTANT DATES
Extended abstract and paper submissions due: May 14, 2007
Invited talk proposals due: May 21, 2007
Notification to authors: June 27, 2007
Final papers due: August 20, 2007
Poster proposals due: September 3, 2007
Notification to poster presenters: September 17, 2007
Submission guidelines and more information can be found at
http://www.usenix.org/lisa07/cfpa
-

___
Slug-list mailing list
[EMAIL PROTECTED]
http://mailman.celestial.com/mailman/listinfo/slug-list
http://www.seaslug.org/

--- End Message ---


Re: Munin packaged for OpenPKG

2007-01-04 Thread Bill Campbell
On Thu, Jan 04, 2007, Ralf S. Engelschall wrote:
>On Thu, Jan 04, 2007, Cato Christoffer Feness wrote:
>
>> On Sunday 10 December 2006 10:47, Ralf S. Engelschall wrote:
>> > In order to be committed to the OpenPKG CVS repository, the whole
>> > package specification has to pass the "openpkg dev lint" command of
>> > OpenPKG-CURRENT without any warnings. If you are using the "openpkg dev"
>> > development environment you can just run "openpkg dev lint" to check
>> > all your sources. If you don't use "openpkg dev", you can just install
>> > the "openpkg-tools" package of OpenPKG-CURRENT and run the following
>> > commands while staying in your package source directory: "openpkg
>> > lint-spec *.spec" and "openpkg lint-rc rc.*". Before the package doesn't
>> > pass the OpenPKG "lint" commands it cannot be committed at all, so
>> > silently passing the "lint" commands is a prerequisite for any package
>> > to become part of OpenPKG. If you need help in resolving some "lint"
>> > complains, do not hesitate to tell us here. I'll try to help you to
>> > resolve all the remaining issues.
>>
>> I've cleaned up the spec and rc files, and the lint commands no longer
>> generate warnings under OpenPKG-CURRENT or OpenPKG-2.5.
>>
>> The binary RPM won't build on OpenPKG-CURRENT, however. It fails while
>> running 'make' under the %install section, as the Munin Makefile is
>> attempting to chown some directories to the user openpkg-r ( ~ l_rusr in my
>> instance).
>>
>> The problem seems to be that /openpkg/bin/make is run by user openpkg ( ~
>> l_musr) during rpm -bb, which is not privileged to do chown.
>>
>> During rpm -bi, make is run by root, and everything works fine. Additonally,
>> everything works fine on OpenPKG-2.5.0.
>>
>> I could resolve this by simply abandoning the non-privileged user scheme of
>> Munin, but that seems a shame from a security point of view.
>>
>> If you can provide me with some info on how to proceed with this, I'd be
>> grateful.
>
>The solution is that you have to disable the chown(1) call in the "make
>install" step and emulate the ownership in the %files section by adding
>e.g. '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/' to the end of
>the "rpmtool files" call. See lots of other OpenPKG packages (e.g.
>postfix.spec) for examples. All(!) OpenPKG packages are required to
>be buildable without special privileges. For the linting it is just
>required that it passed OpenPKG-CURRENT as OpenPKG 2.5 is already end of
>life and new packages start their life in OpenPKG-CURRENT only.

Some Makefiles will have the chown and possibly chgrp as variables so
one can do something like ``%{l_make} CHOWN=true...'' to work around
build problems.

Another way to work around these easily is to use replace chown and
chgrp calls in the makefiles with something like:

%{l_shtool} subst \
-e 's/chown/true/g' \
-e 's/chgrp/true/g' \
Makefile */Makefile

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``When dealing with any spammer, one must always keep in mind that you
are dealing with someone who makes their living through forgery, fraud,
theft, subterfuge and obfuscation.  Stated simply, spammers lie.''
 David Ritz <[EMAIL PROTECTED]>
__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Changes on OpenPKG build site?

2006-12-18 Thread Bill Campbell
When I logged into the OpenPKG build site this afternoon to
update swatch, adding run control and a default configuration
file, things didn't work as I expected.  When I used commands
like ``openpkg dev build swatch'' or ``openpkg dev fetch swatch''
it kept comming up with errors like:

openpkg:dev:ERROR: /usr/opkg/libexec/openpkg-tools/dev.sh:ERROR:
don't know which rpm to exec (E unset)

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

A fake fortuneteller can be tolerated.  But an authentic soothsayer should
be shot on sight.  Cassandra did not get half the kicking around she deserved.
-- R.A. Heinlein
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Tracking stray fsl logging

2006-12-15 Thread Bill Campbell
On Thu, Dec 14, 2006, Thomas Lotterer wrote:
>Bill,
>
>Bill Campbell<[EMAIL PROTECTED]> wrote on 2006-12-13 19:04:
>> Is there any easy way to identify the program that's causing
>> entries to end up in the %{l_prefix}/var/fsl/fsl.log file?
>> 
>this is really a challenge because fsl doesn't know the application it is
>linked into and the application being faked into believing it is using syslog
>doesn't know about fsl!

OK:

I've tracked this down to the libwrap implementation in openssh where
it calls the tcpwrappers ``refuse'' routine which uses syslog without
an openlog first.  This is done in the sshd.c file.  The openssh log.c
routines go through some machinations to determine whether to user
openlog_r or openlog, but do the right thing.

Interestingly enough there's a comment in the log.c file around line
291 that recognized that libwrap may have done syslog things without a
proper open.

A crude hack might be to call the ``logit'' routine from sshd.c just
before calling ``refuse''.  It would end up with an extra line in the
logs, but would get them all in the right place.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Microsoft IIS has more holes than a wheel of Swiss Cheese after a shotgun
blast'' -- John Dvorak
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Tracking stray fsl logging

2006-12-14 Thread Bill Campbell
On Thu, Dec 14, 2006, Thomas Lotterer wrote:
>Bill,
>
>Bill Campbell<[EMAIL PROTECTED]> wrote on 2006-12-13 19:04:
>> Is there any easy way to identify the program that's causing
>> entries to end up in the %{l_prefix}/var/fsl/fsl.log file?
>> 
>this is really a challenge because fsl doesn't know the application it is
>linked into and the application being faked into believing it is using syslog
>doesn't know about fsl!

I'm glad it isn't just me :-).

Thanks for the suggestions on dealing with this.

I suspect that the problem is someplace in openssh as swatch
reports looking at the fsl.log and openssh.log files have a
tendency to have entries at similar times.

BTW:  I've done some work on the swatch package, cleaning it up t
use perl-openpkg, adding standard rc.d/rc.swatch run control, and
including a prototype configuration file.  I plan to update the
CURRENT package after a few days testing here to work on the
configuration file.


>> I'm seeing a bunch of things saying ``refused connect from...'',
>> with nothing to identify the program that generated these.
>> 
>Because of the library and the application being unable to help each other, the
>developer or packager must tie them together.  Hints to track down the logging
>application:
>
>find packages that use fsl
>$ openpkg rpm -q --whatrequires fsl
>
>unpack the sources and hunt for the messages you see
>$ openpkg rpm -Uvh foo.src.rpm
>$ cd $PREFIX/RPM/SRC/foo
>$ openpkg rpm -bp foo.spec
>$ cd $PREFIX/RPM/TMP/foo ...
>$ grep -R "refused connect"
>
>if that doesn't help, find executable binaries that have fsl embedded
>$ openpkg rpm -ql `openpkg rpm -q --whatrequires fsl` \
>  | egrep '/([s]bin|libexec)/' \
>  | xargs what
>
>read "openpkg man fsl" and hunt for "what(1)" to understand the search.
>
>Once the applications are identified, their sources can be reviewed to find
>calls to openlog(3). The facility passed there is the key for fsl to redirect
>log messages catched from syslog(3). The problem with the syslog API is that
>the use of openlog is optional. Apps omitting openlog cannot be used with fsl
>and must be patched to call openlog.
>
>Going one step deeper is to rebuild fsl with_fsl_debuglogcode=yes, install it
>and rebuild one of the candidate packages with this fsl. Again, read "openpkg
>man fsl" and this time hunt for -with-fsl-debug. And yes, you are reading
>correct: this debugging stuff uses the contents of a symlink (not the file the
>symlink is pointing to) as raw configuration data.
> 
>
>-- 
>Thomas
>______
>The OpenPKG Projectwww.openpkg.org
>Developer Communication List   openpkg-dev@openpkg.org
>

-- 
Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

What's this script do?
unzip ; touch ; finger ; mount ; gasp ; yes ; umount ; sleep
Hint for the answer: not everything is computer-oriented. Sometimes you're
in a sleeping bag, camping out.
(Contributed by Frans van der Zande.)
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Tracking stray fsl logging

2006-12-13 Thread Bill Campbell
Is there any easy way to identify the program that's causing
entries to end up in the %{l_prefix}/var/fsl/fsl.log file?

I'm seeing a bunch of things saying ``refused connect from...'',
with nothing to identify the program that generated these.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

Many companies that have made themselves dependent on [the equipment of a
certain major manufacturer] (and in doing so have sold their soul to the
devil) will collapse under the sheer weight of the unmastered complexity of
their data processing systems.
-- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Zope and Plone

2006-11-26 Thread Bill Campbell
On Fri, Nov 24, 2006, Bill Campbell wrote:
>On Fri, Nov 24, 2006, Ralf S. Engelschall wrote:
>>On Fri, Nov 24, 2006, Tres Seaver wrote:
>>
>>> [...]
>>
>>Ok, I've now downgraded "zope" in CURRENT from 3.3.0 to 2.9.6 and added
>>a "zope-plone" package according to Bill's work. Bill, can you test
>>these two packages in CURRENT in depth and give feedback whether now all
>>works just fine?
>
>Will do, probably today and over the weekend.

One thing I have found is that the version of ExternalEditor in
the Plone-2.5.1 packaging doesn't work reliably (if at all) when
using ZopeEditManager on MacOS X 10.4.8 (Tiger).  I've removed
that part of the installation here, and gone back to the old
zope-externaleditor-0.7.2 package I had been using which works.

When I posted a question about this on the Plone mailing list, it
was suggested that going back to ExternalEditor 0.9.1, but the
site for current EditManager sources is off-line due to spamming
problems.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

There is no distinctly native American criminal class save Congress
-- Mark Twain
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Zope and Plone

2006-11-24 Thread Bill Campbell
On Fri, Nov 24, 2006, Ralf S. Engelschall wrote:
>On Fri, Nov 24, 2006, Tres Seaver wrote:
>
>> [...]
>
>Ok, I've now downgraded "zope" in CURRENT from 3.3.0 to 2.9.6 and added
>a "zope-plone" package according to Bill's work. Bill, can you test
>these two packages in CURRENT in depth and give feedback whether now all
>works just fine?

Will do, probably today and over the weekend.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

The difference between science and the fuzzy subjects is that science
requires reasoning while those other subjects merely require scholarship.
-- Robert Heinlein
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Zope and Plone

2006-11-24 Thread Bill Campbell
On Fri, Nov 24, 2006, Ralf S. Engelschall wrote:
>On Thu, Nov 23, 2006, Bill Campbell wrote:
>
>> I spent a fair amount of time getting zope and plone working
>> under OpenPKG this week.  The current packaged zope-2.9.1 is
>> somewhat out of date
>
>Zope 2.9.1? Our current Zope package in CURRENT
>is for Zope 3.3.0, Bill!?

I have to say that our primary use of Zope is running Plone.

As I understand it, Plone doesn't work on Zope 3.x.

When I first started digging into this earlier this week as we
have to update our productions systems (which have been running
zope-2.7.4 and Plone-2.0.4) I looked at the CURRENT and STABLE
branches.  I found zope-2.9.1-2.20060622 to be the most recent
OpenPKG version of zope-2.x so that was my starting point.

Our production systems are a mix of Release 2.5 with newer
packages from CURRENT or STABLE as necessary to stay with
releases of programs like spamassassin, clamav, and amavisd.

When I build zope-2.9.1-2.20060622.src.rpm, I found that it would
not start as the zopectl program pointed to an invalid location
for the installed Startup/zopectl.py script, and it wasn't
setting the environment correctly.  I modified zopectl and
zoperun to get it to run, but Plone-2.5.1 then failed.

It seems that the installation procedure and install directories
of zope were in a state of flux around 2.9.1, which installed
zope under the %{l_prefix}/lib/python director intead of outside
the python directory structure.  Since Plone's documentation says
it neads zope-2.9.4 or later, I went with the latest release in
the 2.9.x releases.

I built a OpenPKG package on zope-2.10.1 only to find that Plone
had problems with that as well.

My final cut on zope-2.9.6 required minimal modification of the
zope.spec file to take care of using ``make ... install'' in
place of the ``python install.py'' of the 2.9.1 spec file, and
fixing the zopectl and zoperun scripts to point to the correct
scripts under the %{l_prefix}/lib/zope/Zope2/Startup directory,
and setting the SOFTWARE_HOME enviornment variable correctly.

>> , and wouldn't start requiring changes to the
>> zopectl and zoperun scripts as the paths have changed.
>>
>> I found that the current Plone-2.5.1 won't run with zope.2.10.x,
>> and the most recent version it likes is zope-2.9.6.
>>
>> I modified the zopectl and zoperun scripts to use the correct
>> paths, and had to do some tweaking to the build process as the
>> zope build process has changed since zope-2.9.1.  The main
>> changes I made were to add the --prefix to the build process,
>> change the %install to use make defining LN=true to avoid a
>> problem with the install process, making the symlink to python
>> in the zope.spec file.
>>
>> The Plone packaging is based loosely on Tres' packaging of
>> zope-cmf, installing under %{l_prefix}/lib/zope-plone with the
>> appropriate symlinks to %{l_prefix}/var/zope/Products.  It also
>> installs zopeedit.py under %{l_prefix}/bin/ manually to avoid
>> problems using ``python setup.py install'' in the spec file.
>>
>> I have these packages available here:
>>
>>  ftp://ftp.celestial.com/tmp/zope-2.9.6-20061121.src.rpm
>> ftp://ftp.celestial.com/tmp/zope-plone-2.5.1-20061123.src.rpm
>
>Ok, so do I understand correctly: Zope/Plone insists on running with
>Zope 2.9.6 only. That's the reason why you downgraded from Zope 3.3.0 to
>2.9.6, right? Hmm... but then I would expect that we (1) fix the "zope"
>package at the version 3.3.0 (in case it is also broken), (2) create a
>"zope2" package which still provides Zope 2.9.6 but has "Provides: zope
>= %{version}-%{release}" and then (3) create the "zope-plone" package
>which has "...PreReq: zope <= 2.9". I really would like to see that
>we both provide the "latest and greatest" Zope and a working couple
>Zope+Plone. Can you do this and commit those changes, Bill?

I'll take a look at that for CURRENT, probably this weekend.

I suggest that the zope-2.9.1 in the stable release be updated to
zope-2.9.6 since the current version isn't working.

My guess at this time is that we're probably the only ones using
Zope since nobody has brought up these problems.

We're going to be looking at several Plone Products as part of an
effort to get a standardized system for customer Intranets, and I
will be creating packages for those we decide to use.  Would it
be logical to use names like zope-plone-atbibliolist to indicate
their dependency on Zope and Plone, or would some other naming
convention be better?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer W

Zope and Plone

2006-11-23 Thread Bill Campbell
I spent a fair amount of time getting zope and plone working
under OpenPKG this week.  The current packaged zope-2.9.1 is
somewhat out of date, and wouldn't start requiring changes to the
zopectl and zoperun scripts as the paths have changed.

I found that the current Plone-2.5.1 won't run with zope.2.10.x,
and the most recent version it likes is zope-2.9.6.

I modified the zopectl and zoperun scripts to use the correct
paths, and had to do some tweaking to the build process as the
zope build process has changed since zope-2.9.1.  The main
changes I made were to add the --prefix to the build process,
change the %install to use make defining LN=true to avoid a
problem with the install process, making the symlink to python
in the zope.spec file.

The Plone packaging is based loosely on Tres' packaging of
zope-cmf, installing under %{l_prefix}/lib/zope-plone with the
appropriate symlinks to %{l_prefix}/var/zope/Products.  It also
installs zopeedit.py under %{l_prefix}/bin/ manually to avoid
problems using ``python setup.py install'' in the spec file.

I have these packages available here:

ftp://ftp.celestial.com/tmp/zope-2.9.6-20061121.src.rpm
ftp://ftp.celestial.com/tmp/zope-plone-2.5.1-20061123.src.rpm

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

Democracy must be sometihng more than two wolves and a sheep voting on what
to have for dinner -- James Bovard
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Mysql binary logging and replication.

2006-11-09 Thread Bill Campbell
Has anybody done anything with mysql replication which seems to require
binary logging?

I'm just trying to figure out mysql replication, and am not too
familiar with the ins and outs of mysql logging.

In particular the rc.mysql run control %daily processing is written to
handle normal ascii logs, and I’m not sure how to deal with the binary logs
which seem to be incremented twice by the ‘‘rc mysql restart’’ command 
in
%daily processing.  There is a 4 byte binary log file created each night
just before the binary log index file, and another binary log file which
has the real updates.

It seems to me that it would be more appropriate to have mysql
reload rather than stop and start when doing binary logging.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``the purpose of government is to reign in the rights of the people''
-Bill Clinton during an interview on MTV in 1993
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Openssh build problem and patch

2006-11-09 Thread Bill Campbell
On Thu, Nov 09, 2006, Ralf S. Engelschall wrote:
>On Thu, Nov 09, 2006, Bill Campbell wrote:
>
>> While attempting to build openssh-4.5p1-20061108.src.rpm I ran
>> into a compile failure fixed by the attached patch.
>>
>> The variables I moved out of the function into the global area are called
>> later in the source file.  This same problem exists in other openssh‐4.4*
>> packages I tried building (we’re running mostly Release 2.5 with some from
>> CURRENT as security issues and such are needed).
>>
>> Here’s the ‘‘openpkg rpm ‐qi openssh’’ on our development system 
>> showing
>> the options we’re using.
>> [...]
>> openssh::with_sftplogging = yes
>> [...]
>
>Ah, I see. The openssh.patch.sftplogging is actually broken here. Yes,
>the two variables were actually in the wrong function at all. I've now
>fixed the patch (by not moving the variables to the global scope but
>back to the right function). Seems like the patch got broken during some
>upgrades in the past. Now fixed in CURRENT and 2-STABLE. Thanks for the
>feedback, Bill.

I figured it might be something like that, but took the easy way out to get
things working here as I have several systems to update.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

My brother sent me a postcard the other day with this big satellite photo
of the entire earth on it. On the back it said: ``Wish you were here''.
-- Steven Wright
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Openssh build problem and patch

2006-11-09 Thread Bill Campbell
While attempting to build openssh-4.5p1-20061108.src.rpm I ran
into a compile failure fixed by the attached patch.

The variables I moved out of the function into the global area are called
later in the source file.  This same problem exists in other openssh‐4.4*
packages I tried building (we’re running mostly Release 2.5 with some from
CURRENT as security issues and such are needed).

Here’s the ‘‘openpkg rpm ‐qi openssh’’ on our development system 
showing
the options we’re using.

Name: openssh   Source RPM:   openssh-4.5p1-20061109.src.rpm
Version:  4.5p1 Signature:
md5:1ebfdaadd72c335ad117b12b131e1c50
Release:  20061109  Build Host:   ayn.mi.celestial.com
Group:SSH   Build System: amd64-suse10
Class:CORE  Build Time:   Thu Nov  9 13:02:40 2006
Distrib:  OpenPKG Community Install Time: Thu Nov  9 13:03:09 2006
License:  BSD   Install Size: 8050441 bytes
Packager: OpenPKG Foundation e.V.   Relocations:  /csrel25 
Vendor:   The OpenBSD Project
Summary:  Secure Shell (SSH)
URL:  http://www.openssh.com/
Description:
Secure Shell (SSH) is a facility for logging into a remote machine
and for remotely executing commands on a remote machine. It is
intended to replace rlogin(1) and rsh(1), and provide secure
encrypted communications between two untrusted hosts over an
insecure network. X11 connections and arbitrary TCP/IP ports can
also be forwarded over the secure channel. OpenSSH is OpenBSD's
rework of the last free version of SSH, bringing it up to date in
terms of security and features, as well as removing all patented
algorithms to separate libraries (OpenSSL).
Provides:
openssh::with_fsl = yes
openssh::with_connect = no
openssh::with_alias = no
openssh::with_chroot = no
openssh::with_ldap = no
openssh::with_pam = no
openssh::with_sftplogging = yes
openssh::with_skey = no
openssh::with_watchdog = yes
openssh::with_wrap = yes
openssh::with_x11 = yes
openssh::with_trysetpath = yes
openssh::with_libedit = no
openssh::with_hpn = no
openssh = 4.5p1-20061109

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``The Income Tax has made more Liars out of American people than Golf has.''
Will Rogers
diff -uNr ../openssh-4.4p1.orig/servconf.c ./servconf.c
--- ../openssh-4.4p1.orig/servconf.c2006-11-09 12:48:19.109585000 -0800
+++ ./servconf.c2006-11-09 12:53:01.595239250 -0800
@@ -468,12 +468,13 @@
return sBadOption;
 }
 
+unsigned int umaskvalue = 0;
+char *umaskptr;
+
 static void
 add_listen_addr(ServerOptions *options, char *addr, u_short port)
 {
u_int i;
-   unsigned int umaskvalue = 0;
-   char *umaskptr;
 
if (options->num_ports == 0)
options->ports[options->num_ports++] = SSH_DEFAULT_PORT;


Re: Ubuntu mail and postfix

2006-10-27 Thread Bill Campbell
On Fri, Oct 27, 2006, Steffen Weinreich wrote:
>-BEGIN PGP SIGNED MESSAGE-
>Hash: SHA1
>
>Ralf S. Engelschall schrieb:
>
>> AFAIK some people have hacked together a dummy dpkg package which
>> provides those symlinks for Debian/Ubuntu and this way is 100% in sync
>> with the Debian/Ubuntu package management. 
>
>What we are using is a empty dummy package which provides
>mail-transport-agent and the symlink will be done by hand
>
>You find a copy of the package at
>http://www.weinreich.org/tmp/openpkg-dummy-mta_1.0_all.deb

Thanks Steve.

I've been trying to figure out how to build something like this,
but find the debian documentation less than enlightening (but
then when I was first learning RPM ten years ago, I would have
probably said much the same thing :-).

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Microsoft IIS has more holes than a wheel of Swiss Cheese after a shotgun
blast'' -- John Dvorak
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Ubuntu mail and postfix

2006-10-25 Thread Bill Campbell
I've been working to get OpenPKG things working on Ubuntu Dapper
Drake, and have some questions which may well be a result of my
ignorance on Debian style systems (the vast majority of my Linux
experience is SuSE, and previously Caldera).

The Ubuntu system is installed from the alternate server CD so
starts out as a very minimal install.  Part of my learning curve
has been to figure out what essential things are missing, and how
to deal with dpkg/apt-get to find and install the necessary bits
and pieces.

Things were going along reasonably well although for some reason
the root PATH always seemed to include the OpenPKG directories in
front of the normal root directories, and I couldn't figure out
where this is set so had to hack the /etc/profile to fix that.

The most recent problem I found was the lack of the ``mail''
program, and when I installed mailx using apt-get, it also
installed postfix because of the dependencies which can cause
problems as it conflicts with the OpenPKG version of postfix.

I can disable the Ubuntu postfix by setting DAEMON to something
that isn't executable in the /etc/default/postfix file, but that
doesn't deal with programs like mail that want to pipe through
the /usr/sbin/sendmail or /usr/lib/sendmail programs.  I suspect
that a dpkg update of the postfix program may change these if
they're symlinked to the OpenPKG postfix.

I ran into a similar problem with SuSE Linux, and did a Dirty
Hack(tm) to the OpenPKG postfix package we use locally that
installs a /bin/rpm package, openpkg-postfix, which ``Provides''
smtp_daemon and ``Obsoletes: postfix'' and makes symlinks in
/usr/lib/sendmail and /usr/sbin/sendmil to the OpenPKG sendmail.
Without the /bin/rpm openpkg-postfix package, SuSE on-line
updates insist on reinstalling postfix if it's been removed
unless there's another package which provices smtp_daemon.

I don't know anything about building packages for Debian systems
so can't do something similar with climbing a long learning curve.

My main questions then are:

  1.  Does anybody have an idea why the root PATH has the OpenPKG
  directories by default?  I have used grep on all the textfiles in the
  root file system to see if I could find out where this is being set
  without success.

  2.  How do people deal with replacing the MTA on the underlying system
  without running into conflicts with its package management system?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``It will be of little avail to the people that the laws are made by men of
their own choice if the laws be so voluminous that they cannot be read, or
so incoherent that they cannot be understood.''
-James Madison, Federalist Paper #62
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Python fix so tkinter works.

2006-10-10 Thread Bill Campbell
The attached python.patch file fixes a problem with python-2.4.3
which we have been using in a hybrid Release 2.5 system, and
fixes a problem in the setup.py file that prevented the tkinter
extension from building.  It simply sets dotversion to blank in
the section where setup.py is looking for the tcl and tk headers.

A more general fix that would require less fiddling with programs
that expect the tcl and tk include files to have the version
appended would be to make an appropriate symlink in the tcl
package:

ln -s %{l_prefix}/include/tcl %{l_prefix}/include/tcl8.4

The naming in the tcl package now is inconsistent with the
version number appended to the %{l_prefix}/lib/tcl8.4 directory,
but not the %{l_prefix}/include/tcl directory.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``It will be of little avail to the people that the laws are made by men of
their own choice if the laws be so voluminous that they cannot be read, or
so incoherent that they cannot be understood.''
-James Madison, Federalist Paper #62
diff -uNr ../python-2.4.3-20060330/Include/pyport.h ./Include/pyport.h
--- ../python-2.4.3-20060330/Include/pyport.h   2005-09-14 10:54:39.0 
-0700
+++ ./Include/pyport.h  2006-10-10 16:49:32.537152750 -0700
@@ -251,8 +251,12 @@
  * config to #define Py_HUGE_VAL to something that works on your platform.
  */
 #ifndef Py_HUGE_VAL
+#if defined (__SVR4) && defined (__sun)
+#define Py_HUGE_VAL HUGE
+#else
 #define Py_HUGE_VAL HUGE_VAL
 #endif
+#endif
 
 /* Py_OVERFLOWED(X)
  * Return 1 iff a libm function overflowed.  Set errno to 0 before calling
diff -uNr ../python-2.4.3-20060330/setup.py ./setup.py
--- ../python-2.4.3-20060330/setup.py   2006-03-23 11:07:46.0 -0800
+++ ./setup.py  2006-10-10 16:50:22.864298000 -0700
@@ -1006,6 +1006,9 @@
 dotversion = dotversion[:-1] + '.' + dotversion[-1]
 tcl_include_sub = []
 tk_include_sub = []
+# OpenPKG doesn't append version to include
+# directory.
+dotversion = ''
 for dir in inc_dirs:
 tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
 tk_include_sub += [dir + os.sep + "tk" + dotversion]


Re: Patch to pdflib.spec

2006-10-10 Thread Bill Campbell
On Tue, Oct 10, 2006, Ralf S. Engelschall wrote:
>On Mon, Oct 09, 2006, Bill Campbell wrote:
>
>> The attached patch to the Release 2.5 version of pdflib fixes a
>> problem building on SuSE Linux Enterprise 10 in which the build
>> was failing saying it didn't know how to build ``-lpng''.
>>
>> It turns out that the included piece for the Makefile uses the
>> variables PNGLIBLINK and JPEGLIBLINK in dependencies so requires
>> file names here, not loader options.  I put in a couple of loops
>> through the l_ldflags macro to test for the libraries since on
>> the 64 bit machines this may need to check multiple directories.
>>
>> It also required adding ``-lpng -ljpeg'' to LDFLAGS to get things
>> to load properly.
>>
>> Looking at the pdflib.spec file in the CURRENT version of pdflib,
>> it appears that it should have the same patch applied.
>
>Ok, now fixed in CURRENT with pdflib-7.0.0-20061010 and higher. I've
>just not taken over the loop as it is not required because we explicitly
>depended on _OUR_ "png", "jpeg" and "zlib" and this way we know
>precisely the path to the libxxx.a file. Thanks for your contribution,

The reason I did the loops is that gcc does use create and use
the %{l_prefix}/lib64 directory on 64-bit machines.  While it's
probably redundant, it does cover the general case and would work
if there were reasons to have 32 and 64 bit libraries on a
machine.  Put it under the category of defensive programming if
you like.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``It will be of little avail to the people that the laws are made by men of
their own choice if the laws be so voluminous that they cannot be read, or
so incoherent that they cannot be understood.''
-James Madison, Federalist Paper #62
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Patch to pdflib.spec

2006-10-09 Thread Bill Campbell
The attached patch to the Release 2.5 version of pdflib fixes a
problem building on SuSE Linux Enterprise 10 in which the build
was failing saying it didn't know how to build ``-lpng''.

It turns out that the included piece for the Makefile uses the
variables PNGLIBLINK and JPEGLIBLINK in dependencies so requires
file names here, not loader options.  I put in a couple of loops
through the l_ldflags macro to test for the libraries since on
the 64 bit machines this may need to check multiple directories.

It also required adding ``-lpng -ljpeg'' to LDFLAGS to get things
to load properly.

Looking at the pdflib.spec file in the CURRENT version of pdflib,
it appears that it should have the same patch applied.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``No matter how much I may exaggerate it, it must have a certain amount of
truth...Now rumor travels fast but it don't stay put as long as truth''
Will Rogers
--- pdflib.spec.orig2006-10-09 16:37:28.0 -0700
+++ pdflib.spec 2006-10-09 16:25:39.915957000 -0700
@@ -37,7 +37,7 @@
 Group:Graphics
 License:  PDFlib
 Version:  %{V_long}
-Release:  2.5.0
+Release:  20061009
 
 #   list of sources
 Source0:  
http://www.pdflib.com/products/pdflib/download/%{V_comp}src/PDFlib-Lite-%{V_long}.tar.gz
@@ -78,17 +78,35 @@
 configure
 
 %build
+# The next two loops kludge around strange Makefile rules
+# which fail when handed loader options, -lpng and -ljpeg
+for libdir in %{l_ldflags}; do #{
+libdir=`echo $libdir | sed -e 's/-L//'`
+lib=$libdir/libpng.a
+test -s $lib && {
+PNGLIBLINK=$lib
+break
+}
+done #}
+for libdir in %{l_ldflags}; do #{
+libdir=`echo $libdir | sed -e 's/-L//'`
+lib=$libdir/libjpeg.a
+test -s $lib && {
+JPEGLIBLINK=$lib
+break
+}
+done #}
 ECHO="%{l_prefix}/bin/gecho" \
 CC="%{l_cc}" \
 CFLAGS="%{l_cflags -O}" \
 INSTALL="%{l_shtool} install -c" \
 PNGLIBINC="%{l_cppflags libpng .}" \
-PNGLIBLINK="-lpng" \
+PNGLIBLINK="$PNGLIBLINK" \
 JPEGLIBINC="%{l_cppflags}" \
-JPEGLIBLINK="-ljpeg" \
+JPEGLIBLINK="$JPEGLIBLINK" \
 FLATELIBINC="%{l_cppflags}" \
 FLATELIBLINK="-lz" \
-LDFLAGS="%{l_ldflags}" \
+LDFLAGS="%{l_ldflags} -lpng -ljpeg" \
 ./configure \
 --prefix=%{l_prefix} \
 --disable-shared
@@ -127,4 +145,3 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-


Re: query all build options?

2006-10-04 Thread Bill Campbell
On Wed, Oct 04, 2006, Dennis McRitchie wrote:
>Bill,
>
>You recently posted a perl script called rpmgetopts.pl. Is this the one
>you meant?

I guess I posted the older perl version.  I then rewrote it in python,
adding a few features such as automatically enclosing the ``--define''
lines between ``openpkg rpm "$@"'' and the spec file name.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``The Income Tax has made more Liars out of American people than Golf has.''
Will Rogers
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: query all build options?

2006-10-04 Thread Bill Campbell
On Wed, Oct 04, 2006, David M. Fetter wrote:
>Is there a simply built-in method to query all installed rpms for what
>build options are used?

I recently posted a python script, getrpms.py, that I use to make it easy
to create the ~/.openpkg/build file used by ``openpkg build'' or scripts
that can be used in a SRC/packagename directory.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Perhaps, when committing your first federal crime, it would be unwise to
slap your name and address on it and mail it to 10,000 people.'' --Dogbert
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Getent shell script calls.

2006-09-28 Thread Bill Campbell
On Thu, Sep 28, 2006, Mark Keller wrote:
>I have a feature request or bug fix as I see it.
>
>We use LDAP for NSS/PAM and we have about 50,000 user accounts and 50,000 
>groups. Each user has a group. I have noticed that our LDAP servers were 
>having some performance problems from time to time. I narrowed it down to 
>openpkg causing severe LDAP lookups during cron routines and other types of 
>openpkg commands.
>
>I found the following three shell scripts calling getent in a horribly 
>inefficient way. Basically causing a complete dump of the password and 
>group file for certain operations.

I ran into the same problem some time ago.  Since I think that
these calls are used exclusively to get the OpenPKG specific
users and groups, and I have these users and groups in the local
/etc/passwd and /etc/shadow file (or /etc/master.passwd on
FreeBSD systems), I made a dummy getent program in the PATH
before the system's getent.  This getent may be a symlink to
/bin/true since all it has to do is return successfully.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

The very powerful and the very stupid have one thing in common.
Instead of altering their views to fit the facts, they alter the facts
to fit their views ... which can be very uncomfortable if you happen to
be one of the facts that needs altering.
-- Doctor Who, "Face of Evil"
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Patch for quagga build

2006-09-26 Thread Bill Campbell
When I tried building the CURRENT version of quagga on a SuSE
Linux Enterprise 10 system this morning, it failed to link
because the readline library was ``-lncurses -lreadline'' instead
of ``-lreadline -lncurses'' causing undefined symbols.

I looked at the configure and configure.ac files to see if there
was a clean way to hack them before running configure, and didn't
see anything reasonable.  I then did a Crude Hack(tm) in the
build process by modifying the config.status file after configure
is complete which seems to work.

The attached patch should work now.  I don't think this should
break other systems.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

Bagdikian's Observation:
Trying to be a first-rate reporter on the average American
newspaper is like trying to play Bach's "St. Matthew Passion"
on a ukelele.
--- quagga.spec.orig2006-09-26 11:17:27.914119750 -0700
+++ idiff.out   2006-09-26 11:17:44.819176250 -0700
@@ -33,7 +33,7 @@
 Group:Routing
 License:  GPL
 Version:  0.99.5
-Release:  20060924
+Release:  20060926
 
 #   list of sources
 Source0:  http://www.quagga.net/download/quagga-%{version}.tar.gz
@@ -100,6 +100,12 @@
 --disable-shared \
 $ISISD
 
+# kludge to correct configure error as -lncurses has to be
+# after -lreadline
+%{l_shtool} subst \
+-e 's/-lncurses -lreadline/-lreadline -lncurses/' \
+config.status
+sh config.status
 #   build package
 %{l_make} %{l_mflags -O}
 


Re: perl Authen::PAM

2006-09-12 Thread Bill Campbell
On Tue, Sep 12, 2006, Ralf S. Engelschall wrote:
>On Tue, Sep 12, 2006, Ralf S. Engelschall wrote:
>
>> On Mon, Sep 11, 2006, Bill Campbell wrote:
>>
>> > Is the perl Authen::PAM in any of the multitude of perl packages?
>> >
>> > The only perl Authen:: module I see in in the perl-sys package,
>> > so this seems to be a logical place for it.
>> >
>> > I'm working on webmin and usermin which know about OpenPKG
>> > packages, and usermin wants this.
>>
>> We still do not have Authen::PAM in any perl-xxx until now. But, yes,
>> perl-sys seems to be the most reasonable place for it. If you add it,
>> make sure it can be enabled/disabled with an "%option with_pam" as not
>> every Unix supports PAM (although all major Linux, BSD and Solaris
>> nowaways do).
>
>Ok, added for you: http://cvs.openpkg.org/chngview?cn=30007

Thanks Ralf.  You're too quick for me as I just saw this :-).

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Do not meddle in the affairs of cats, for they are subtle and will piss on
your computer.''  --Bruce Graham
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


perl Authen::PAM

2006-09-11 Thread Bill Campbell
Is the perl Authen::PAM in any of the multitude of perl packages?

The only perl Authen:: module I see in in the perl-sys package,
so this seems to be a logical place for it.

I'm working on webmin and usermin which know about OpenPKG
packages, and usermin wants this.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Most people, sometime in their lives, stumble across truth. Most jump
up, brush themselves off, and hurry on about their business as if
nothing had happened.'' - Sir Winston Churchill
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Spamassassin run control sleep patch

2006-08-30 Thread Bill Campbell
On Wed, Aug 30, 2006, Ralf S. Engelschall wrote:
>On Mon, Aug 28, 2006, Bill Campbell wrote:
>
>> The attached patch to the spamassassin-3.1.4-20060825.src.rpm run
>> control file, rc.spamassassin, sets a new configuration variable,
>> spamassassin_stop_sleep="5", and moves the sleep from the restart
>> to the stop section.
>> [...]
>
>I've taken over this change idea, but we have to keep in mind that this
>is a general OpenPKG issue: we have lots of daemons which do the sleep
>in %stop and also lots we do it in %restart. This should be aligned in
>all packages, but the question is what is generally better: %stop and
>%restart. I also tend to %stop myself...

I prefer doing in stop as I often do ``rc package stop start'' to
insure that the stop processing is done (which may remove pid
files), and the start is then done.  A restart won't start a
process that isn't running so isn't as general.

I think it would be a Good Idea(tm) have the stop time in a
%config variable to allow per-site tweaking.  I've found several
packages that may take a fairly long time to terminate all
processes on busy systems (apache comes to mind) and the hard
coded sleep time isn't sufficient.

I used the variable name packagename_stop_sleep in case there are
other sleep times in a run control script that should have their
own sleep time variable.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``The whole aim of practical politics is to keep the populace alarmed (and
hence clamorous to be led to safety) by an endless series of hobgoblins.''
   -- H.L. Mencken, 1923
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Spamassassin run control sleep patch

2006-08-28 Thread Bill Campbell
The attached patch to the spamassassin-3.1.4-20060825.src.rpm run
control file, rc.spamassassin, sets a new configuration variable,
spamassassin_stop_sleep="5", and moves the sleep from the restart
to the stop section.

I've found that the restart often doesn't allow adequate time
after the stop for SA to complete its shutdown so the start
fails as the bind finds the port busy.  This occurs on systems
that are processing 30,000+ SA messages a day, and frequently
have a load average around 4 or 5.

Putting this in the configuration section then allows local
changes if necessary.

Moving the sleep from the restart to the start section enables
the sleep in ``rc spamassassin stop start'' instead of just in
the restart invocation.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``A Democracy cannot exist as a permanent form of government.  It can only
exist until the voters discover they can vote themselves largesse out of
the public treasury.  From the moment on the majority always votes for the
candidate promising the most benefits from the public treasury with the
result that Democracy always collapses over a loose fiscal policy, always
to be followed by a Dictatorship.''
Professor Alexander Fraser Tytler.  1801
--- rc.spamassassin.orig2006-08-28 12:09:46.799765008 -0700
+++ rc.spamassassin 2006-08-28 12:11:00.045629944 -0700
@@ -13,6 +13,8 @@
 spamassassin_log_numfiles="10"
 spamassassin_log_minsize="1M"
 spamassassin_log_complevel="9"
+spamassassin_stop_sleep="5"
+
 
 %common
 spamassassin_etcdir="@l_prefix@/etc/spamassassin"
@@ -47,12 +49,12 @@
 rcService spamassassin enable yes || exit 0
 rcService spamassassin active no && exit 0
 spamassassin_signal TERM
+sleep "$spamassassin_stop_sleep"
 
 %restart -p 600 -u @l_susr@
 rcService spamassassin enable yes || exit 0
 rcService spamassassin active no && exit 0
 rc spamassassin stop
-sleep 2
 rc spamassassin start
 
 %daily -u @l_susr@


Postfix pflogsumm patch to expand -d option (dates)

2006-08-25 Thread Bill Campbell
The attached patch extends the -d option of pflogsumm to use any
date parseable with the perl Date::Parse module in addition to
its normal ``today'' and ``yesterday'' options.  The option now
takes arguments such as ``pflogsumm -d 2006-08-15 ...''.

I wanted to be able to rerun pflogsumm against old postfix.log
files to get some statistics, and found the standard options
useless.  Running without the -d option on a typical daily log
file would throw the Per-Hour reports off since they're averages
per hour which is pretty useless if the daily log file has a few
lines from the previous or following day.

I think this should work with pretty much any version of postfix
in the OpenPKG trees as this hasn't changed in quite a while.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Rightful liberty is unobstructed action according to our will within
limits drawn around us by the equal rights of others. I do not add 'within
the limits of the law' because law is often but the tyrant's will, and
always so when it violates the rights of the individual.''
-Thomas Jefferson
diff -uNr ../postfix-2.2.5-20060528/pflogsumm-1.1.0/pflogsumm.1 
./pflogsumm-1.1.0/pflogsumm.1
--- ../postfix-2.2.5-20060528/pflogsumm-1.1.0/pflogsumm.1   2003-12-12 
06:41:55.0 -0800
+++ ./pflogsumm-1.1.0/pflogsumm.1   2006-08-25 17:41:57.257264392 -0700
@@ -225,6 +225,8 @@
 .Vb 2
 \&-d today   generate report for just today
 \&-d yesterday   generate report for just "yesterday"
+\&-d -MM-DD  generate report for just "-MM-DD"
+\&   (Really takes string Date::Parse will handle)
 .Ve
 .Vb 1
 \&-e extended (extreme? excessive?) detail
diff -uNr ../postfix-2.2.5-20060528/pflogsumm-1.1.0/pflogsumm.pl 
./pflogsumm-1.1.0/pflogsumm.pl
--- ../postfix-2.2.5-20060528/pflogsumm-1.1.0/pflogsumm.pl  2006-08-25 
17:39:01.59560 -0700
+++ ./pflogsumm-1.1.0/pflogsumm.pl  2006-08-25 17:43:45.572797928 -0700
@@ -10,7 +10,7 @@
 
 =head1 SYNOPSIS
 
-pflogsumm.pl -[eq] [-d ] [-h ] [-u ]
+pflogsumm.pl -[eq] [-d ] [-h ] [-u ]
[--verp_mung[=]] [--verbose_msg_detail] [--iso_date_time]
[-m|--uucp_mung] [-i|--ignore_case] [--smtpd_stats] [--mailq]
[--problems_first] [--rej_add_from] [--no_bounce_detail]
@@ -37,6 +37,9 @@
 
 -d today   generate report for just today
 -d yesterday   generate report for just "yesterday"
+-d -MM-DD  generate report for just "-MM-DD"
+   (Actually this will take any date string
+   parsable by the perl Date::Parse module)
 
 -e extended (extreme? excessive?) detail
 
@@ -1372,9 +1375,10 @@
 
 my $time = time();
 if($dateOpt eq "yesterday") {
-   $time -= $aDay;
+   $time -= $aDay;
 } elsif($dateOpt ne "today") {
-   die "$usageMsg\n";
+   use Date::Parse;
+   $time = str2time($dateOpt);
 }
 my ($t_mday, $t_mon) = (localtime($time))[3,4];
 


Re: Mysql run control bug.

2006-08-10 Thread Bill Campbell
On Thu, Aug 10, 2006, Ralf S. Engelschall wrote:
>On Thu, Aug 10, 2006, Bill Campbell wrote:
>
>> I just ran into a problem this morning when a customer noted that the mysql
>> common.log and update.log files were growing out of control.  After doing
>> some checking, I figured out that the main problem is that the %restart
>> section of the %{l_prefix}/etc/rc.d/rc.mysql run control file needs to run
>> as root, not as the restricted user.
>>
>> Running %restart as the restricted user won't allow it to do the necessary
>> ``stop start'' as it requires root priviledges to run the %stop section.
>>
>> Unless I'm mistaken, any %restart section must run at the higher
>> priviledges of the %start and %start sections.
>
>Yes, you're right, Bill. We really need that the %restart section is run
>as the super-user because once the run-command process has downgraded
>its privileges, it cannot upggrade it again.
>
>This bug was introduced by me when I upgraded from MySQL 4 to 5. I
>cannot remember why I thought that the restricted user privileges are
>sufficient there.

Ralf:

I think it goes back farther than that.  While looking at some of our older
installations that are running as far back as Release 2.0 I see the same
thing in the mysql-4.0.21-2.2.0.src.rpm package.  It looks like it may have
been the MySQL 3 -> 4 where this was introduced.

In any case, thanks for fixing it.

I figure that others who may be running older versions of the OpenPKG
system may want to be aware of this, and make the appropriate changes in
their local packages.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``I presume you all know who I am.  I am humble Abraham Lincoln.  I have been
solicited by many friends to become a candidate for the legistlature.  My
politics are short and sweet, like the old woman's dance.  I am in favor of
a national bank ... in favor of the internal improvements system, and a
high protective tariff.'' -- Abraham Lincoln, 1832
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Mysql run control bug.

2006-08-10 Thread Bill Campbell
I just ran into a problem this morning when a customer noted that the mysql
common.log and update.log files were growing out of control.  After doing
some checking, I figured out that the main problem is that the %restart
section of the %{l_prefix}/etc/rc.d/rc.mysql run control file needs to run
as root, not as the restricted user.

Running %restart as the restricted user won't allow it to do the necessary
``stop start'' as it requires root priviledges to run the %stop section.

Unless I'm mistaken, any %restart section must run at the higher
priviledges of the %start and %start sections.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

We contend that for a nation to try to tax itself into prosperity is like a
man standing in a bucket and trying to lift himself up by the handle.
-- Winston Churchill
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: X11 font problem on SuSE 10.1 ThinkPad A30

2006-07-21 Thread Bill Campbell
Following up on my own post.

On Thu, Jul 20, 2006, Bill Campbell wrote:
>I'm having a problem with a ThinkPad A30 running SuSE 10.1 and a mostly
>Release 2.5 system with some CURRENT thrown in for flavour.
>
>When logging in as a normal user via kdm and the kde desktop, the fonts
>aren't configured properly.  Every character is a little rectangle with
>nothing in it.  Logging in with some other desktops, failsafe, and others,
>works fine.
>
>X11 works fine on a mini-tower system with the same OpenPKG packages.
>
>The SuSE 10.1 systems are essentially identical except for some packages
>that are specific to the laptop.
>
>The packages on the Thinkpad were installed from binaries built on the
>mini-tower, and the CPUs are different which could be the source of the
>problem.  The Thinkpad is running ``Intel(R) Pentium(R) 4 Mobile CPU
>1.60GHz'' and the mini-tower ``AMD Athlon(tm) processor''.
>
>Does anybody have any suggestions other than rebuilding everything on the
>ThinkPad from source?

I rebuilt everything on the Thinkpad last night (9+ hours of
steady compiling :-).  That didn't solve the problem.

Digging in further, I found that the startkde process was pulling
in some shared libraries from the %{l_prefix}/lib directory that
were created resulting from a consistent typo I had made when
building on the AMD64 architecture which seems to require shared
libraries in some cases (it probably has something to do with the
-fPIC option that rpmtool generates on this architecture).

It appears that the xft package that was giving the problems on the
ThinkPad, or really fontconfig-2.3.91-2.5.0.src.rpm.

I can't test this on the Thinkpad as my customer picked that
machine up this afternoon, and the problem doesn't exhibit itself
on the SuSE 10.1 system I have here for development.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders, give
orders, cooperate, act alone, solve equations, analyze a new problem, pitch
manure, program a computer, cook a tasty meal, fight efficiently, die
gallantly.  Specialization is for insects.'' Robert Heinlein
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


X11 font problem on SuSE 10.1 ThinkPad A30

2006-07-20 Thread Bill Campbell
I'm having a problem with a ThinkPad A30 running SuSE 10.1 and a mostly
Release 2.5 system with some CURRENT thrown in for flavour.

When logging in as a normal user via kdm and the kde desktop, the fonts
aren't configured properly.  Every character is a little rectangle with
nothing in it.  Logging in with some other desktops, failsafe, and others,
works fine.

X11 works fine on a mini-tower system with the same OpenPKG packages.

The SuSE 10.1 systems are essentially identical except for some packages
that are specific to the laptop.

The packages on the Thinkpad were installed from binaries built on the
mini-tower, and the CPUs are different which could be the source of the
problem.  The Thinkpad is running ``Intel(R) Pentium(R) 4 Mobile CPU
1.60GHz'' and the mini-tower ``AMD Athlon(tm) processor''.

Does anybody have any suggestions other than rebuilding everything on the
ThinkPad from source?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

Government's view of the economy could be summed up in a few short phrases:
If it moves, tax it.  If it keeps moving, regulate it.  And if it stops
moving, subsidize it -- Ronald Reagan
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: openssh Release 2.5 /bin missing from superuser path

2006-06-27 Thread Bill Campbell
On Tue, Jun 27, 2006, Ralf S. Engelschall wrote:
>On Tue, Jun 27, 2006, Bill Campbell wrote:
>
>> On Tue, Jun 27, 2006, Ralf S. Engelschall wrote:
>> >On Tue, Jun 27, 2006, Bill Campbell wrote:
>> >
>> >> Is there a reason that --with-superuser-path doesn't have /bin in
>> >> it when with_trysetpath=yes in UPD/openssh-4.2p1-2.5.3.src.rpm?
>> >
>> >No, seems like it was just forgotten. OTOH I see a strange
>> >/usr/local/bin there which should be there for consistency reasons.
>> >I've fixed this now: http://cvs.openpkg.org/chngview?cn=28963
>> >Thanks for the hint, Bill.
>>
>> When I was fixing my local copy I also noticed %{l_prefix}/sbin
>> isn't in the superuser path.
>
>Good catch. Now added, too.

I could probably have done the updates myself, but I wanted to make sure
that wasn't a Good Reason(tm) that it had been left out.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

Bagdikian's Observation:
Trying to be a first-rate reporter on the average American
newspaper is like trying to play Bach's "St. Matthew Passion"
on a ukelele.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: openssh Release 2.5 /bin missing from superuser path

2006-06-27 Thread Bill Campbell
On Tue, Jun 27, 2006, Ralf S. Engelschall wrote:
>On Tue, Jun 27, 2006, Bill Campbell wrote:
>
>> Is there a reason that --with-superuser-path doesn't have /bin in
>> it when with_trysetpath=yes in UPD/openssh-4.2p1-2.5.3.src.rpm?
>
>No, seems like it was just forgotten. OTOH I see a strange
>/usr/local/bin there which should be there for consistency reasons.
>I've fixed this now: http://cvs.openpkg.org/chngview?cn=28963
>Thanks for the hint, Bill.

When I was fixing my local copy I also noticed %{l_prefix}/sbin
isn't in the superuser path.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

When a place gets crowded enough to require ID's, social collapse is
not far away.  It is time to go elsewhere.  The best thing about space
travel is that it made it possible to go elsewhere.
-- Robert Heinlein
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


openssh Release 2.5 /bin missing from superuser path

2006-06-27 Thread Bill Campbell
Is there a reason that --with-superuser-path doesn't have /bin in
it when with_trysetpath=yes in UPD/openssh-4.2p1-2.5.3.src.rpm?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Scientists are explorers. Philosophers are tourists.'' -- Richard Feynman
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Apache-1.3 configuration Include wildcard change

2006-06-01 Thread Bill Campbell
On Thu, Jun 01, 2006, Christoph Schug wrote:
>On Wed, May 31, 2006, Bill Campbell wrote:
>
>> I just ran into a problem with apache-1.3.35 in which it did
>> process the apache.base wildcard include:
>> 
>> Include %{l_prefix}/etc/apache/apache.d/*.conf
>[...]
>
>Without having looked into details there have been changes regarding the
>Include semantics with Apache 1.3.35. Those changes have been backed out
>with 1.3.36 [1].
>
>To me it look related to [2][3], maybe this will give you some hint. Are
>you able to reproduce the problem with 1.3.36?

Ralf:

I haven't been able to check the references as our backbone
provider, Global Crossings, seems to be having problems routing
to significant areas on the 'Net this morning.  To get to a
customer's machine about 20 miles from here, I have to first ssh
into one of our machines about 2,000 miles from here, then ssh
back to the customer's box.

I just installed apache-1.3.36-20060528 from CURRENT, and that is expanding
the wildcard normally.

I hadn't tried it with 1.3.36, mostly because the CURRENT package is using
php5, and the version of horde we're running says it doesn't like that.  I
know very little about php beyond how to spell it, and am concerned about
what will break.

Even though the horde/test.php routine say it's an incompatible version of
php, horde-3.0.10 seems to be working, at least it does simple things like
check mail and create IMAP folders.

>[1] http://www.apache.org/dist/httpd/Announcement1.3.html
>[2] http://issues.apache.org/bugzilla/show_bug.cgi?id=39516
>[3] http://lists.freebsd.org/pipermail/freebsd-ports/2006-May/032152.html
>
>-cs
>__
>The OpenPKG Projectwww.openpkg.org
>Developer Communication List   openpkg-dev@openpkg.org
>

-- 
Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

Memoirs -- Bill Clinton is getting $12 million for his memoirs, and his
wife Hillary got $8 million for hers.  That's $20 million for memories from
two people who for eight years repeatedly testified  they couldn't remember
anything.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Apache-1.3 configuration Include wildcard change

2006-05-31 Thread Bill Campbell
I just ran into a problem with apache-1.3.35 in which it did
process the apache.base wildcard include:

Include %{l_prefix}/etc/apache/apache.d/*.conf

It tries to process everything under an Included directory --
including CVS directories and files starting with ``.''.

Is there some option in building apache-1.3.xx that allows it to
use the old behaviour, or perhaps a configuration option?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

DOS: n., A small annoying boot virus that causes random spontaneous system
 crashes, usually just before saving a massive project.  Easily cured by
 UNIX.  See also MS-DOS, IBM-DOS, DR-DOS.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


openldap, bdb, mutexes and threads SLES9/AMD64

2006-05-29 Thread Bill Campbell
I'm having problems getting openldap-2.3.23 working in a mostly Release 2.5
environment, SLES9-SP3 on Athlon-64 with db-4.3.29.0.  Basically I think
that the problems are BDB/Threads related, and I'm reluctant to start
flailing on this since chaning the BDB routines basically requires
rebuilding large numbers of packages that depend on them.

The CURRENT version is db-4.4.20.2 which generally means that lots of APIs
have changed which can cause problems with programs that haven't been
updated (minor programs like perl, python, mysql, openldap, etc.  :-)

The first problem that prevented openldap from starting at all was that the
db.spec file in 2.5 and CURRENT checks %{l_platform -p} and doesn't find
anything to match ``amd64-suse9'' so uses the default ``UNIX/fcntl''.
OpenLDAP won't start because with this setting it doesn't find fast
mutexes.

I hacked the spec file to add amd*-* with x86/gcc-assembly, which allows
openldap to start and build its files, but ldapsearch hangs forever.  After
running and hanging ldapsearch, the slapd process becomes immune to
anything short of a ``kill -9''.  The db-4.4.20.2 package has an
x86_64/gcc-assembly option, but when I try using that it gets an error.

If no --with-mutex is specified on this platform it defaults to the
configure process defaults to posix threads, but openldap fails with ``
unable to initialize mutex: Function not implemmented''.

I'm in way over my head when it comes to threads, mutexes, etc. 

The only way I've been able to get openldap-2.3.23 working to the point
where ldapsearch runs to completion is to hack the spec file to disable
threads entirely which requires disabling slurpd as requires them.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

If you think health care is expensive now, wait until you see what it coses
when it's free -- P.J. O'Rourke
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: glib2 with_threads compatibility issue

2006-05-28 Thread Bill Campbell
On Sun, May 28, 2006, Ralf S. Engelschall wrote:
>On Sat, May 27, 2006, Bill Campbell wrote:
>
>> While building packages on a SLES9-SP3 system, mostly Release 2.5
>> with some CURRENT thrown in for flavour, I found a conflict
>> between the perl-gtk in Release 2.5 and wx-2.6.3-20060524.src.rpm
>> from the current tree.  perl-gtk requires glib2 with_threads=no
>> while wx requires with_threads=yes.  No other package we have
>> installed that requires glib2 seems to care about its threads.
>>
...
>The perl-gtk version in 2.5 really requires with_threads=no in glib2 as
>it isn't able to deal with its threads support. In CURRENT the perl-gtk
>is a newer one which supports with_threads=no and with_threads=yes
>and hence the glib2 has with_threads=yes by default (as more packages
>require it). If you really want to mix 2.5 and CURRENT here you have to
>pick perl-gtk from CURRENT, too.

Thanks for the info Ralf.

I've found some other packages that have to be built from CURRENT as well
(the Release 2.5 ncurses does funny things on a 64 bit system).

I don't really want to mix 2.5 with CURRENT, but have to get something
working on the 64-bit architectures for our production machines (the 32-bit
versions have been working on a mostly 2.3 tree).

At this point I'm climbing the learning curve on the 64 bit builds on SuSE
Linux Enterprise 9 SP3.  I think that the only things that are
necessary are:

  1.  Modify the %{l_prefix}/etc/rc.d/rc.openpkg run control script's
  LD_LIBRARY_PATH setting to prepend /lib64 /usr/lib64 to the
  /lib/usr/lib part and prepend %{l_prefix}/lib64 before the
  %{l_prefix}/lib since gcc puts several of its libraries there.

  2.  I had to build gcc --with-shared to get the Berkeley database
  routines to compile although this was something I did early in my
  build process so this may not be absolutely required.

  3.  Modify %{l_ldflags} to generate -L%{l_prefix}/lib64 -L%{l_prefix}/lib
  so that builds would get the gcc 64 bit libraries.  The attached
  patch to the rpmtool script handles this.

  4.  Have the bootstrap script put %{l_prefix}lib64 in the /etc/ld.so.conf
  file before the %{l_prefix}/lib entry.  The /etc/ld.so.conf is used
  frequently in configure scripts generated by the libtool, automake,
  autoconf packages to generate search paths.

  I think this should bin the openpkg.spec %post processing, but I
  haven't been able to figure out where it's doing this.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

Government spending?  I don't know what it's all about.  I don't know
any more about this thing than an economist does, and, God knows, he
doesn't know much.
-- Will Rogers
--- rpmtool.orig2006-05-13 08:56:10.0 -0700
+++ rpmtool 2006-05-28 12:12:35.311848968 -0700
@@ -535,7 +535,8 @@
 fi
 done
 if [ $std -eq 0 ]; then
-ldflags="-L${opt_p}/lib$ldflags"
+ldflags="-L${opt_p}/lib $ldflags"
+test -d ${opt_p}/lib64 && ldflags="-L${opt_p}/lib64 $ldflags"
 fi
 echo "x$ldflags" | sed -e 's;^x;;' -e 's;^ *;;'
 ;;


glib2 with_threads compatibility issue

2006-05-27 Thread Bill Campbell
While building packages on a SLES9-SP3 system, mostly Release 2.5
with some CURRENT thrown in for flavour, I found a conflict
between the perl-gtk in Release 2.5 and wx-2.6.3-20060524.src.rpm
from the current tree.  perl-gtk requires glib2 with_threads=no
while wx requires with_threads=yes.  No other package we have
installed that requires glib2 seems to care about its threads.

I haven't a clue what the issues here might be.  I assume that
somebody had a good reason to specify this.

FWIW:  I seem to have things building properly in 64 bit mode on
the Athlon-64 system after doing some crude hacks including a
local rpmmacros file to force the cflags and ldflags.  I'm
planning on writing this up with proposed changes to the
bootstrap process where it fiddles /etc/ld.so.conf, modifying
rpmtool to generate the proper cflags and ldflags, and modifying
the LD_LIBRARY_PATH in the rc.openpkg run control to include the
64 bit libaries on SuSE Linux Enterpris 9 systems.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``People from East Germany have found the West so confusing. It's so much
easier when you have only one party.'' -- Linus Torvalde, Linux Expo Canada
when asked about confusion over many Linux distributions.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Questions on 64 bit builds SLES9SP3.

2006-05-26 Thread Bill Campbell
I'm trying to build OpenPKG Release 2.5 with some CURRENT packages on a
SuSE Linux Enterprise 9, Service Pack 3 system.  The processor is an AMD
Athlon-64.

I thought I was beginning to understand building in the mixed 32/64 bit
environment on SLES9, but, after three days of hacking, I have more
questions than answers -- mostly related to gcc finding and building the
correct 64-bit libraries.  The only system I've ever worked with that
generated code for different library types is SCO OpenServer which creates
COFF and ELF libraries using the options to the C compilter -belf, -bcoff,
etc. (and gcc uses -melf if I remeber correctly).

The rest of this are notes and questions (probably displaying my ignorance
on this more than anything else :-).

SLES9 has 32-bit libraries in the normal places, and the 64-bit in /lib64,
/usr/lib64, and /usr/X11R6/lib64 (and probably more that I haven't found
yet).

I think that the openpkg rc.openpkg run control should be setting
LD_LIBRARY_PATH to use /lib64 and /usr/lib64.

The OpenPKG x11 package doesn't set x11_libdir="/usr/X11/lib64".  Packages
that use imake need some tweaking since the Imake.tmpl file isn't found
where expected.

Building the Berkeley db package fails, unable to find things like
db_create.  There are other linking issues that seemed to require that gcc
be built with --enable-shared.

Some of the linking and configure problems seem to result from the libtool,
automake, autoconf family searching the /lib and /usr/lib directories
instead of /lib64 and /usr/lib64.  I did some tweaking using shtool to
replace "/lib /usr/lib" with "/lib64 /usr/lib64", but this hardly seems
like the Right Way(tm) to do this.

Looking at the gcc-4.0.3 gcc.spec file, it has multilib disabled for Intel
64 bit architectures.  Should this be disabled for amd64 as well?

Can gcc be built to only produce 64-bit code, and is this a good idea?

If an OpenPKG instance is to have multiple libraries, this complicates
things thoroughly such as %{l_prefix}/lib.  I would rather see multiple
OpenPKG instances than mix them.

Should gcc be called with the ``-m64'' option to find the correct library
files?  If so, where's the best place to define this?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

If you want government to intervene domestically, you're a liberal.  If you
want government to intervene overseas, you're a conservative.  If you want
government to intervene everywhere, you're a moderate.  If you don't want
government to intervene anywhere, you're an extremist -- Joseph Sobran
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Openldap schemas should be configuration files?

2006-05-10 Thread Bill Campbell
On Wed, May 10, 2006, Ralf S. Engelschall wrote:
>On Tue, May 09, 2006, Bill Campbell wrote:
>
>> I would like to suggest that the openldap etc/openldap/schema files be
>> marked as config files.  I just spent a fair amount of time trying to
>> figure out why horde/imp/turba couldn't add addresses to an openldap
>> addressbook from the mail message which turned out to be the result of a
>> patch to the core.schema having been lost during an openldap update.
>>
>> While I don't really like turba's requirement that something as basic as
>> the core.schema be modified, I haven't been able to figure out their code
>> well enough to fix this (their checkrequired code on openldap databases
>> doesn't seem to work).
>
>Although IMHO this opens the chance that people even more edit those
>files, as long as the schema/ldif files are located under etc/ it is
>reasonable to flag them as %config although they are not really intended
>for editing. So, changed: http://cvs.openpkg.org/chngview?cn=28340

I agree totally with that.

One other change that we've done with openldap here is to add an
option, with_wrap, with tcpwrappers support.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

The day-to-day travails of the IBM programmer are so amusing to most of
us who are fortunate enough never to have been one -- like watching
Charlie Chaplin trying to cook a shoe.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Openldap schemas should be configuration files?

2006-05-09 Thread Bill Campbell
I would like to suggest that the openldap etc/openldap/schema files be
marked as config files.  I just spent a fair amount of time trying to
figure out why horde/imp/turba couldn't add addresses to an openldap
addressbook from the mail message which turned out to be the result of a
patch to the core.schema having been lost during an openldap update.

While I don't really like turba's requirement that something as basic as
the core.schema be modified, I haven't been able to figure out their code
well enough to fix this (their checkrequired code on openldap databases
doesn't seem to work).

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

Breathe fire, slay dragons, and take chances. Failure is temporary, regret
is eternal.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: New package, iftop.

2006-04-20 Thread Bill Campbell
On Mon, Apr 17, 2006, robert j. wozny wrote:
>On Apr 14, 2006, at 10:43 PM, Bill Campbell wrote:
>
>>>try older version/spec from <http://web.ziew.org/storage/openpkg/src/
>>>iftop/>. It's build and works on solaris/sparc. (but doesn't work on
>>>macosx)
>>I just tried this on the rm7 sparc9 system, with the attache
>>iftop.spec file, and it fails in the POSIX threads test.  When I
>>extracted the test conftest.c file from config.log, and tried
>>compiling it with the command from config.log, it compiled
>>without errors.
>
>yep, compile is not enough. solaris needs -lpthread to build thread- 
>safe programs.

Added that, but now it's barfing on various w32xxx thing its
looking for in the ncurses library.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

We contend that for a nation to try to tax itself into prosperity is like a
man standing in a bucket and trying to lift himself up by the handle.
-- Winston Churchill
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: New package, iftop.

2006-04-14 Thread Bill Campbell
On Thu, Apr 13, 2006, robert j. wozny wrote:
>On Apr 13, 2006, at 5:56 PM, Mark Keller wrote:
>
>>Anyhow, the Bill's version doesn't build on Solaris 9 sparc either.  
>>Just in
>>case anyone cares.
>
>try older version/spec from <http://web.ziew.org/storage/openpkg/src/ 
>iftop/>. It's build and works on solaris/sparc. (but doesn't work on  
>macosx)

I just tried this on the rm7 sparc9 system, with the attache
iftop.spec file, and it fails in the POSIX threads test.  When I
extracted the test conftest.c file from config.log, and tried
compiling it with the command from config.log, it compiled
without errors.

I'm very much out of practice dealing with Solaris, and don't
understand what it is doing.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``If you make yourselves sheep, the wolves will eat you'' -- Benjamin Franklin
##
##  iftop.spec -- OpenPKG RPM Package Specification
##  Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
##  Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
##
##  Permission to use, copy, modify, and distribute this software for
##  any purpose with or without fee is hereby granted, provided that
##  the above copyright notice and this permission notice appear in all
##  copies.
##
##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
##  SUCH DAMAGE.
##

#   package information
Name: iftop
Summary:  Display Network Interface Activity
URL:  http://www.ex-parrot.com/~pdw/iftop
Vendor:   Paul Warren & Chris Lightfoot
Packager: OpenPKG
Distribution: OpenPKG
Class:EVAL
Group:Network
License:  GPL
Version:  0.17
Release:  20060414

#   list of sources
Source0:  
http://www.ex-parrot.com/~pdw/iftop/download/iftop-%{version}.tar.gz
Patch0:   iftop.patch

#   build information
Prefix:   %{l_prefix}
BuildRoot:%{l_buildroot}
BuildPreReq:  OpenPKG, openpkg >= 20040130
PreReq:   OpenPKG, openpkg >= 20040130
BuildPreReq:  libpcap, ncurses
PreReq:   libpcap, ncurses
AutoReq:  no
AutoReqProv:  no

%description
iftop does for network usage what top(1) does for CPU usage. It
listens to network traffic on a named interface and displays a table
of current bandwidth usage by pairs of hosts.

%track
prog iftop = {
version   = %{version}
url   = http://www.ex-parrot.com/~pdw/iftop/download/
regex = iftop-(__VER__)\.tar\.gz
}

%prep
%setup -q
%patch -p0

%build
case "%{l_target t}" in #{(
*-sunos5*) # Solaris 9
%{l_shtool} subst \
-e 's;u_int32_t;uint32_t;g' \
options.c
;;
esac #}

CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
CPPFLAGS="%{l_cppflags}" \
LDFLAGS="%{l_ldflags}" \
./configure \
--prefix=%{l_prefix} \
--disable-shared

%{l_make} %{l_mflags -O}

%install
rm -rf $RPM_BUILD_ROOT
%{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}

%files -f files

%clean
rm -rf $RPM_BUILD_ROOT



Re: New package, iftop.

2006-04-13 Thread Bill Campbell
On Thu, Apr 13, 2006, Ralf S. Engelschall wrote:
>On Wed, Apr 12, 2006, Bill Campbell wrote:
>
>> I just heard about iftop at a Seattle Unix Group meeting last
>> night, and it appears to be a very useful tool for diagnosing
>> network issues.  Basically it's like the ``top'' program, but for
>> network interfaces.
>
>Yes, is a really neat tool.
>
>> As Ralf suggested bringing new packages up on openpkg-dev before
>> committing them to the current tree, our SPRMS for this is here:
>>
>>   ftp://ftp.celestial.com/tmp/iftop-0.17-20060412.src.rpm
>>
>> I have built and tested this on SuSE Linux Enterprise 9 and
>> FreeBSD 4.8 (the freebsd version doesn't automatically pick up
>> the correct interface but works fine when it's specified with the
>> -i option).
>
>Thanks, Bill. I've reviewed the package and here are my suggestions to
>further improve it before you commit it to OpenPKG-CURRENT:

I just released this as modified.  Thanks Ralf.

I don't have a Solaris 9 Sparc system available (and don't know
how to use the build farm to get access to one :-).  I have a
Sparc IPX sitting under a bench somewhere, but it's horribly slow
and doesn't have enough RAM to do anything useful.

...
Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Are we at last brought to such a humiliating and debasing degradation,
that we cannot be trusted with arms for our own defense? Where is the
difference between having our arms in our own possession and under our own
direction, and having them under the management of Congress? If our defense
be the real object of having those arms, in whose hands can they be trusted
with more propriety, or equal safety to us, as in our own hands?''
-- Patrick Henry June 9, 1788, in the Virginia Convention on the
ratification of the Constitution.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


New package, iftop.

2006-04-12 Thread Bill Campbell
I just heard about iftop at a Seattle Unix Group meeting last
night, and it appears to be a very useful tool for diagnosing
network issues.  Basically it's like the ``top'' program, but for
network interfaces.

As Ralf suggested bringing new packages up on openpkg-dev before
committing them to the current tree, our SPRMS for this is here:

ftp://ftp.celestial.com/tmp/iftop-0.17-20060412.src.rpm

I have built and tested this on SuSE Linux Enterprise 9 and
FreeBSD 4.8 (the freebsd version doesn't automatically pick up
the correct interface but works fine when it's specified with the
-i option).

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

The day-to-day travails of the IBM programmer are so amusing to most of
us who are fortunate enough never to have been one -- like watching
Charlie Chaplin trying to cook a shoe.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Courier-authlib and courier-imap packages

2006-04-07 Thread Bill Campbell
Sorry:

I meant to send the original to the openpkg-dev list, not both
that and the openpkg-users lists.

I found a problem in the courier-imap.spec file where what I
thought was a freebsd issue was really related to the version of
automake installed.  An updated SRPMs file is available:

ftp://ftp.celestial.com/tmp/courier-imap-4.1.0-20060407.src.rpm

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Never blame a legislative body for not doing something.  When they do
nothing, that don't hurt anybody.  When they do something is when they
become dangerous.''
Will Rogers
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Courier-authlib and courier-imap packages

2006-04-07 Thread Bill Campbell
ing
pam_ldap authentication and NFS mounted directories on a system
with about 7,500 mailboxes with normal Unix $HOME/Maildir.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

There's no trick to being a humorist when you have the whole government
working for you.
-- Will Rogers
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Alternatives to getent, ypcat, etc. in getting ids.

2006-03-30 Thread Bill Campbell
There are several places in the rpm package where it uses getent,
ypcat, and nidump to get uids and gids.  This can take quite a
while on systems with thousands of users, particularly if they're
doing openldap authentication where threading may be an issue.

Might it not be better to parse the output of the ``id'' command
to get this information, and leave the heavy lifting to the OS,
or perhaps add this to the ubiquitous GNU shtool?

The only systems I have here are several Linux flavours, FreeBSD
4.8, and an SCO OpenServer 5.0.6a box, all of which have similar
output of the ``id username'' command which would be quick and
easy to parse.  The ``gid'' function in coreutils should always
be the same, but it might not be available, particularly during
the bootstrap process.

Bill
--
INTERNET:  [EMAIL PROTECTED]   Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/   PO Box 820; 6641 E. Mercer Way
FAX:   (206) 232-9186   Mercer Island, WA 98040-0820; (206) 236-1676
http://www.celestial.com/

The question is, why are politicians so eager to be president?  What is
it about the job that makes it worth revealing, on national television,
that you have the ethical standards of a slime-coated piece of
industrial waste?
-- Dave Barry, "On Presidential Politics"
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: What is %ghost in RPM %files?

2006-03-28 Thread Bill Campbell
On Wed, Mar 29, 2006, Michael van Elst wrote:
>On Tue, Mar 28, 2006 at 06:27:07PM -0800, Bill Campbell wrote:
>> I'm building a package for the current courier-imap, and the
>> tarball's sample courier-imap.spec file uses something I've never
>> seen before in the %files section ``%ghost %attr(600,...''.
>> 
>> What is the meaning of %ghost?
>
>%ghost specifies a file that does not exist in the RPM archive
>but is added to the RPM database. It might be created by the
>package and will be removed later with the package.

Interesting.  It the courier-imap package, this refers to pid and
lock files which are actually created, but dynamic.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

The difference between science and the fuzzy subjects is that science
requires reasoning while those other subjects merely require scholarship.
-- Robert Heinlein
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


What is %ghost in RPM %files?

2006-03-28 Thread Bill Campbell
I'm building a package for the current courier-imap, and the
tarball's sample courier-imap.spec file uses something I've never
seen before in the %files section ``%ghost %attr(600,...''.

What is the meaning of %ghost?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``If ye love wealth greater than liberty, the tranquillity of servitude
greater than the animating contest for freedom, go home from us in peace.
We seek not your consul, nor your arms.  Crouch down and lick the hand that
feeds you.  May your chains set lightly upon you;  and may posterity forget
ye were our countrymen.'' -- Samuel Adams (American Patriot)
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Spamassassin run control patch and extra perl modules

2006-03-13 Thread Bill Campbell
On Mon, Mar 13, 2006, Ralf S. Engelschall wrote:
>On Mon, Mar 13, 2006, Bill Campbell wrote:
>
>> I spent a fair amount of time this weekend dealing with
>> spamassassin and adding some modules that it would like to have.
>>
>> We've run into a situation occassionaly where spamd doesn't seem
>> to use %{l_prefix}/etc/spamassassin for its local rules.  Adding
>> ``--siteconfigpath=%{l_prefix}/etc/spamassassin'' to the startup
>> cures the problem.
>>
>> Adding this to the rc.spamassassin file would eliminate this type
>> of problem, and I don't see that it would hurt anything.
>>
...
>> My main question then is whether these changes should be made in
>> the CURRENT versions of spamassassin, perl-mail, and perl-net?
>
>I've checked the source of spamd(8) and there is no default
>at all for the local rules dir. So it makes sense to add the
>--siteconfigpath to the rc.spamassassin. I've done this now for us. See
>http://cvs.openpkg.org/chngview?cn=27717 for details.
>
>The IP::Country I've also added to perl-net as it looks rather useful.
>See http://cvs.openpkg.org/chngview?cn=27718 for details.
>
>But Mail::SPF::Query we cannot add to perl-mail as it requires stuff
>from perl-www and this whould mean a cyclic dependency. And SPF is nasty
>stuff, yes. So I recommend to leave this out and if really wished (in
>spamassassin it is _optional_ only) one easily can install it via the
>CPAN shell into the site_perl/ area of our Perl installation.

Thanks Ralf.  I agree that SPF is basically worthless, and having SPF
records in DNS can actually cause more problems than they might ever cure.

I suppose one could add it to perl-www, but then that's not a very logical
place for mail related things is it :-).

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Rights'' is a fictional abstraction.  No one has ``Rights'', neither
machines nor flesh-and-blood.  Persons... have opportunities, not rights,
which they use or do not use.
-- Lazarus Long
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Spamassassin run control patch and extra perl modules

2006-03-13 Thread Bill Campbell
I spent a fair amount of time this weekend dealing with
spamassassin and adding some modules that it would like to have.

We've run into a situation occassionaly where spamd doesn't seem
to use %{l_prefix}/etc/spamassassin for its local rules.  Adding
``--siteconfigpath=%{l_prefix}/etc/spamassassin'' to the startup
cures the problem.

Adding this to the rc.spamassassin file would eliminate this type
of problem, and I don't see that it would hurt anything.

As for the perl modules, Spamassassin looks for Mail::SPF::Query
and IP::Country during the installation.  While I think that SPF
is a Bad Idea(tm), one of our larger ISP customers wanted this
added, and the IP::Country module might be useful as well.

I added the Mail::SPF::Query module here to the perl-mail
package, and IP::Country to perl-net since these seem to be the
logical packages.  I did find it necessary to add these to the
Release 2.2 and Release 2.3 packages since we were getting errors
when I tried using the CURRENT version, suitably modified to
adjust the perl version, in the earlier release trees.

My main question then is whether these changes should be made in
the CURRENT versions of spamassassin, perl-mail, and perl-net?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``It is better to die on your feet than to live on your knees!''
-- Emiliano Zapata.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Target based depenencies -- How?

2006-02-17 Thread Bill Campbell
On Fri, Feb 17, 2006, Ralf S. Engelschall wrote:
>On Thu, Feb 16, 2006, Bill Campbell wrote:
>
>> I just ran into an issue build the jpeg package on OS X where it
>> needs to have shared libraries enabled, which in turn requires
>> having a copy of ./libtool in the build directory to build the
>> shared libraries.
>>
>> One problem is that there is no configure.ac or configure.in in
>> the dorectory so aclocal and libtoolize.  It worked when I copied
>> the %{l_prefix}/bin/libtool script into the directory, which
>> probably comes under the term Crude Hacks(tm).
>>
>> I would like to make the jpeg package depend on the libtool
>> package, but I don't really know how to define conditionals in
>> the top part of a SPEC file that match patterns.  It's easy
>> enough in the scripted parts to use ``case "%{l_target t}"'''.
>>
>> I have seen some %defines that execute shell scripts, but these
>> seem even more of a kludge -- not to mention I would have to dig
>> through some ancient Caldera SRPMS to remember how they work.
>
>Theoretically it would be possible to use something like '%if
>"%{l_target -t}" == "..."' inside a *.spec file but this has two
>problems: (1) you can compare only against a fixed string (which is
>not practical) and (2) it will horribly break the existing FTP service
>XML/RDF generator ("openpkg index") parsing tools ("openpkg build") as
>they do not understand those types of conditions.
>
>Currently the only possibility I see would be create an option
>"with_shared", depend on "libtool" under "with_shared=yes" and use a
>'case "%{l_target t}"' inside the %build section in combination with
>a wrapping '%if "%{with_shared}" == "yes"' to activate the stuff. Not
>elegant, I know. But we are contraint by the RPM features and the
>post-processing tools.

I think I suggested recently that we add a macro to rpm which
could be globally set, say %{l_with_shared}, that would normally
be set to ``--disable-shared'', but could be ``--with-shared''
for targets that require it.

This would cover the vast majority of the spec files I've seen,
but wouldn't be sufficient in cases where considerable effort is
made to remove shared configurations (e.g. gtk2 where a good
chunk of the %prep and %build sections are devoted to this).  It
would be much cleaner to be able to wrap these in %if..%endifs
than in ``case'' statements.

The only package I've come across so far that required more than
changing the ``--disable-shared'' to ``--enable-shared'' is the
tiff package where ``--disable-shared --enable-static'' was
necessary to duplicate the current action.

>But BTW, what is the reason that we need shared libraries for JPEG under
>MacOS X?

There a few issues, all related, that lead me to believe that all
libraries must be built --with-shared on OS X.

First off, the linker frequently doesn't find components in a
static library, even with ``-L%{l_prefix}/lib -l$libname'', but
will find if the appropriate .dylib file is present.

Another issue that I found yesterday while trying to build
abiword, which requires a metric tonne of libraries, is that
building with shared libraries uses ``-fno-common'' which is
neceaary to avoid linking failures.  I'm still trying to get this
build done, but so far I've had to rebuild jpeg, gettext, tiff,
xrender, fontconfig, cairo, and gtk2 with shared libraries.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

When I hear a man applauded by the mob I always feel a pang of pity
for him.  All he has to do to be hissed is to live long enough.
-- H.L. Mencken, ``Minority Report''
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Target based depenencies -- How?

2006-02-16 Thread Bill Campbell
I just ran into an issue build the jpeg package on OS X where it
needs to have shared libraries enabled, which in turn requires
having a copy of ./libtool in the build directory to build the
shared libraries.

One problem is that there is no configure.ac or configure.in in
the dorectory so aclocal and libtoolize.  It worked when I copied
the %{l_prefix}/bin/libtool script into the directory, which
probably comes under the term Crude Hacks(tm).

I would like to make the jpeg package depend on the libtool
package, but I don't really know how to define conditionals in
the top part of a SPEC file that match patterns.  It's easy
enough in the scripted parts to use ``case "%{l_target t}"'''.

I have seen some %defines that execute shell scripts, but these
seem even more of a kludge -- not to mention I would have to dig
through some ancient Caldera SRPMS to remember how they work.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``My reading of history convinces me that most bad government results
from too much government.'' --Thomas Jefferson.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Spec file shtool/build policy

2006-02-14 Thread Bill Campbell
On Tue, Feb 14, 2006, Thomas Lotterer wrote:
>Bill Campbell<[EMAIL PROTECTED]> wrote on 2006-02-13 23:35:10:
>> I would like to suggest that any %{l_shtool} subst subsitutions don't belong
>> in the %setup section, but properly belong at the beginning of the %build
>> section.
>> 
>I remember we put some efforts into moving almost every patch-like "shtool
>subst" construct into the %prep section to complement the %patch instructions.
>Besides developer's convenience I do not see a reason why automated source
>tweaking should be split and partially moved outside the %prep section.
>Deferring substitions to the %build section sometimes inhibits repetitive
>execution via "rpm --short-circuit" which means a shift would move the paint to
>a different location with no real cure.

I don't think that moving substitutions to %build would break most
short-circuits since they generally will have no effect when run a
second time as the substitutions will have already been made.

When I'm writing my own spec files, and want to do some kind of
substitutions, I often run a ``find | xargs grep -l ..> tmplist''
routine to create a list of the files to change before doing the
substitutions, then test for a non-empty list before running shtool
to make the substitutions.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

Giving money and power to government is like giving whiskey and car keys to
teenage boys -- P.J. O'Rourke
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Spec file shtool/build policy

2006-02-14 Thread Bill Campbell
On Tue, Feb 14, 2006, Ralf S. Engelschall wrote:
>On Tue, Feb 14, 2006, Bill Campbell wrote:
>
>> [...]
>> Since this is mostly a style issue, can we suggest as a matter of policy
>> that the substitutions be put in the %build section?
>
>Yes, I vote for doing it this way.

I'll be doing several updates to CURRENT packages as I find changes
necessary for OS X/darwin.  Would there be any objections to my moving
these if I find them?

>> [...]
>> >I also think the %prep sections should only contain %setup and %patch
>> >commands because (1) that's how the %prep section AFAIK was intended
>> >for by the RPM authors (2) the %prep section and especially its %setup
>> >macro is REALLY DEEP magic (e.g. its expanded "cd" part is sticky and
>> >automatically duplicates into all other sections, etc) and (3) it also
>> >simplifies the developer tasks.
>>
>> Is there any way to figure this magic out other than reading the rpm source
>> code?
>
>I've assembled some of this magic some time ago in the file
>openpkg-dev.txt in the CVS. You can read it directly via URL
>http://cvs.openpkg.org/getfile/openpkg-doc/quickref/openpkg-dev.txt

Good stuff.  Thanks.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``We maintain that the very foundation of our way of life is what we call
free enterprise,'' said Cash McCall, "but when one of our citizens
show enough free enterprise to pile up a little of that profit, we do
our best to make him feel that he ought to be ashamed of himself."
-- Cameron Hawley
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Spec file shtool/build policy

2006-02-14 Thread Bill Campbell
On Tue, Feb 14, 2006, Ralf S. Engelschall wrote:
>On Mon, Feb 13, 2006, Bill Campbell wrote:
>
>> I would like to suggest that any %{l_shtool} subst subsitutions don't
>> belong in the %setup section, but properly belong at the beginning of the
>> %build section.
>>
>> IHMO, the %setup section should only be for loading sources and applying
>> patches.  Putting processing like substitutions in it makes the job of
>> building new patches more difficult as one cannot just to an ``rpm -bp''
>> operation to get clean sources from which one can generate diffs.
>
>Yes and no. Yes, because you're right, they make trouble and always
>have to be proceeded with an "exit 0" temporarily (that's what I do).
>No, because one could argue that substitutions are just a different
>technique of patching the sources and hence should be grouped together
>with the patch files.

I too use exit 0 when I encounter this.

On the other hand, many of the substitutions with shtool are target
dependent which varies from build to build.

>Although I usually always prefer consistency and grouping (where I would
>bundle "shtool subst" and "%patch"), I personally also tend to agree
>with you, Bill.

Since this is mostly a style issue, can we suggest as a matter of policy
that the substitutions be put in the %build section?  It's not something
that changes the outcome of the build.  In most cases, it's simply a matter
of moving the %build line to immediately precede the substitutions.

There are some packages, apache comes to mind, where the %setup section
conditionally installs source packages.  In these cases the substitutions
may well be necessary in line with the setup.

>I also think the %prep sections should only contain %setup and %patch
>commands because (1) that's how the %prep section AFAIK was intended
>for by the RPM authors (2) the %prep section and especially its %setup
>macro is REALLY DEEP magic (e.g. its expanded "cd" part is sticky and
>automatically duplicates into all other sections, etc) and (3) it also
>simplifies the developer tasks.

Is there any way to figure this magic out other than reading the rpm source
code?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``People from East Germany have found the West so confusing. It's so much
easier when you have only one party.'' -- Linus Torvalde, Linux Expo Canada
when asked about confusion over many Linux distributions.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Spec file shtool/build policy

2006-02-13 Thread Bill Campbell
I would like to suggest that any %{l_shtool} subst subsitutions don't
belong in the %setup section, but properly belong at the beginning of the
%build section.

IHMO, the %setup section should only be for loading sources and applying
patches.  Putting processing like substitutions in it makes the job of
building new patches more difficult as one cannot just to an ``rpm -bp''
operation to get clean sources from which one can generate diffs.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Unix is simple. It just takes a genius to understand its simplicity'' --
Dennis Ritchie
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Shared library suggestion

2006-02-08 Thread Bill Campbell
While working on getting OpenPKG packages working under OS X
Tiger, I've found that a fair number of programs won't link
unless shared libraries are enabled requiring some hackage to the
spec files.

It seems to me that this in an architecture dependent problem,
and that some architectures (e.g. OS X) handle shared libraries
in a manner that avoids the issues relating to multiple instances
of OpenPKG.

I would like to suggest adding a macro to rpm, say %{l_config_shared},
that would be set on most architectures to ``--disable-shared'',
and would be used in the %build sections of spec files:

./configure \
%{l_config_shared} \
...

This would solve many of the problems I've seen with OS X Tiger,
and I think would also allow local customization at build time
using --define or -D options.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

My brother sent me a postcard the other day with this big satellite photo
of the entire earth on it. On the back it said: ``Wish you were here''.
-- Steven Wright
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: porting openpkg-20060204 on OS X Tiger

2006-02-07 Thread Bill Campbell
On Tue, Feb 07, 2006, Ralf S. Engelschall wrote:
>> > On Sat, Feb 04, 2006, Bill Campbell wrote:
>> Christoph S.  plans to establish a MacOS X 10.4 XServe in the
>> OpenPKG Foundation setup next week. Once this box is available to us
>> I'll investigate on our OSSP uuid to get it building under MacOS X
>> out-of-the-box (perhaps with this workaround you applied, we'll see).
>
>Ok, the latest and greatest "openpkg" package from OpenPKG-CURRENT now
>builds fine for me under MacOS X 10.4. Please retry with this version.
>As the next step I'll try to make sure all CORE packages build on MacOS
>X 10.4...

I'm rsync'ing our mirrors now to get this.

Have you looked at the crontabs setup in the bootstrap?  This has changed
in Tiger, but I haven't had time to dig into their new routines to figure
out how it works under ``/System/Library/LaunchDaemons''.

I have found it necessary to --enable-sharing on several packages to get
them to link properly on OS X Tiger, notably ncurses and python.

My first cuts at building python appeared to be successful, but all
dynamically loadable components that aren't pure python would fail on
routines that are in the core libpython.

I can update CVS for packages with the changes I've had to make to get
things, but I've been waiting until I get a better handle on how things
work under OS X Tiger.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

The very powerful and the very stupid have one thing in common.
Instead of altering their views to fit the facts, they alter the facts
to fit their views ... which can be very uncomfortable if you happen to
be one of the facts that needs altering.
-- Doctor Who, "Face of Evil"
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: coreutils -- remove hostname, uname, with_legacy yes

2006-02-05 Thread Bill Campbell
On Sun, Feb 05, 2006, Bill Campbell wrote:
>On Sun, Feb 05, 2006, Ralf S. Engelschall wrote:
>>On Sat, Feb 04, 2006, Bill Campbell wrote:
>>
>>> The attached patch against the Release 2.5 coreutils.spec file removes two
>>> programs and their related man pages when building with the option
>>> ``with_legacy yes''.
>>>
>>> The uname and hostname commands are used extensively in configure files to
>>> detect system type, and having the gnu-ish versions in the PATH before the
>>> system's versions break many packages (starting with make and tar in the
>>> openpkg package itself :-)
>>
>>Looks reasonable.
>>Commit it to CVS, Bill!
>
>Will do.

Done.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders, give
orders, cooperate, act alone, solve equations, analyze a new problem, pitch
manure, program a computer, cook a tasty meal, fight efficiently, die
gallantly.  Specialization is for insects.'' Robert Heinlein
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: porting openpkg-20060204 on OS X Tiger

2006-02-05 Thread Bill Campbell
On Sun, Feb 05, 2006, Ralf S. Engelschall wrote:
>On Sat, Feb 04, 2006, Bill Campbell wrote:
>
>> On Sat, Feb 04, 2006, Bill Campbell wrote:
>> >I'm trying to build openpkg-20060204 on OS X Tiger this morning.
>> >
>> >The first problem I found was in OSSP uuid where there's a conflict with
>> >the system definition of uuid_t in /usr/include/unistd.h and the uuid.h.in
>> >file,
>> >
>> >So far I've tried a few things including running ``aclocal'' in the
>> >directory, but the only one that allowed uuid to build is to hack the
>> >uuid.h.in file to redefine uuid_t when building on Tiger.
>> >
>> >I did this with this patch, and modifying the openpkg.spec file to apply
>> >the patch and add ``-DDARWIN'' to CFLAGS.  I would prefer to use something
>> >that's defined by gcc automatically, but haven't been able to find the
>> >default CPP definitions on Apple's site.
>>
>> The patch I posted earlier today worked -- at least I have the
>> basic bootstrap built, have built ``make'', and am in the
>> processo of building gcc.
>>
>> Ralf probably has a better fix for uuid than this.
>> [...]
>
>Christoph S.  plans to establish a MacOS X 10.4 XServe in the
>OpenPKG Foundation setup next week. Once this box is available to us
>I'll investigate on our OSSP uuid to get it building under MacOS X
>out-of-the-box (perhaps with this workaround you applied, we'll see).

Sounds good to me.

I've been building packages on my Tiger system here, finding
things like the coreutils problem with uname and hostname that I
just updated in CVS.

I gave up trying to get gcc to build, and after looking at what
they've done in the ``fink'' project, using ``virtual'' packages
for gcc, I made an empty package the Provides gcc.  Perl seemed
to be happy with that, allowing me to build the coreutils and
openpkg-tools.

The last thing I tried to build yesterday that failed was ncurses
which is needed by the diffutils package.  I suspect that this is
a problem with the ranlib arguments as it's getting an Undefined
symbol on ``__nc_trim_sgr0'' which I think is part of ncurses.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Most people, sometime in their lives, stumble across truth. Most jump
up, brush themselves off, and hurry on about their business as if
nothing had happened.'' - Sir Winston Churchill
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: coreutils -- remove hostname, uname, with_legacy yes

2006-02-05 Thread Bill Campbell
On Sun, Feb 05, 2006, Ralf S. Engelschall wrote:
>On Sat, Feb 04, 2006, Bill Campbell wrote:
>
>> The attached patch against the Release 2.5 coreutils.spec file removes two
>> programs and their related man pages when building with the option
>> ``with_legacy yes''.
>>
>> The uname and hostname commands are used extensively in configure files to
>> detect system type, and having the gnu-ish versions in the PATH before the
>> system's versions break many packages (starting with make and tar in the
>> openpkg package itself :-)
>
>Looks reasonable.
>Commit it to CVS, Bill!

Will do.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``The man who produces while others dispose of his product is a slave.''
   Ayn Rand
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


coreutils -- remove hostname, uname, with_legacy yes

2006-02-04 Thread Bill Campbell
The attached patch against the Release 2.5 coreutils.spec file removes two
programs and their related man pages when building with the option
``with_legacy yes''.

The uname and hostname commands are used extensively in configure files to
detect system type, and having the gnu-ish versions in the PATH before the
system's versions break many packages (starting with make and tar in the
openpkg package itself :-)

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

If you think health care is expensive now, wait until you see what it coses
when it's free -- P.J. O'Rourke
--- coreutils.spec.orig 2006-02-04 22:47:56.0 -0800
+++ coreutils.spec  2006-02-04 22:31:28.0 -0800
@@ -33,7 +33,7 @@
 Group:Utility
 License:  GPL
 Version:  5.2.1
-Release:  2.5.0
+Release:  20060204
 
 #   package options
 %option   with_legacy  no
@@ -118,6 +118,11 @@
   for i in g*; do
   ln -s $i `echo "$i" | sed -e 's;^g;;'`
   done
+  # these cause problems on SuSE 8.x and Darwin
+  for p in hostname uname ; do
+rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$p
+rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/${p}*
+  done
 ) || exit $?
 %endif
 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir


Re: porting openpkg-20060204 on OS X Tiger

2006-02-04 Thread Bill Campbell
On Sat, Feb 04, 2006, Bill Campbell wrote:
>I'm trying to build openpkg-20060204 on OS X Tiger this morning.
>
>The first problem I found was in OSSP uuid where there's a conflict with
>the system definition of uuid_t in /usr/include/unistd.h and the uuid.h.in
>file,
>
>So far I've tried a few things including running ``aclocal'' in the
>directory, but the only one that allowed uuid to build is to hack the
>uuid.h.in file to redefine uuid_t when building on Tiger.
>
>I did this with this patch, and modifying the openpkg.spec file to apply
>the patch and add ``-DDARWIN'' to CFLAGS.  I would prefer to use something
>that's defined by gcc automatically, but haven't been able to find the
>default CPP definitions on Apple's site.

The patch I posted earlier today worked -- at least I have the
basic bootstrap built, have built ``make'', and am in the
processo of building gcc.

Ralf probably has a better fix for uuid than this.

I'm attaching the patch and the openpkg.spec file I used to
bootstrap this.

The files are also here:

http://opkg.libertysoft.org/opsys/osx/

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``Now if there is one thing that we do worse than any other nation, it is
try and manage somebody else's affairs.''
Will Rogers
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


porting openpkg-20060204 on OS X Tiger

2006-02-04 Thread Bill Campbell
I'm trying to build openpkg-20060204 on OS X Tiger this morning.

The first problem I found was in OSSP uuid where there's a conflict with
the system definition of uuid_t in /usr/include/unistd.h and the uuid.h.in
file,

So far I've tried a few things including running ``aclocal'' in the
directory, but the only one that allowed uuid to build is to hack the
uuid.h.in file to redefine uuid_t when building on Tiger.

I did this with this patch, and modifying the openpkg.spec file to apply
the patch and add ``-DDARWIN'' to CFLAGS.  I would prefer to use something
that's defined by gcc automatically, but haven't been able to find the
default CPP definitions on Apple's site.

--- uuid.h.in.orig  2006-02-04 11:33:10.0 -0800
+++ uuid.h.in   2006-02-04 11:06:05.0 -0800
@@ -79,6 +79,9 @@
 
 /* UUID abstract data type */
 struct uuid_st;
+#ifdef DARWIN /*{*/
+#define uuid_t myuuid_t
+#endif /*} DARWIN */
 typedef struct uuid_st uuid_t;
 
 /* UUID object handling */

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``If ye love wealth greater than liberty, the tranquillity of servitude
greater than the animating contest for freedom, go home from us in peace.
We seek not your consul, nor your arms.  Crouch down and lick the hand that
feeds you.  May your chains set lightly upon you;  and may posterity forget
ye were our countrymen.'' -- Samuel Adams (American Patriot)
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: amavisdlogsumm divide by zero patch.

2006-01-03 Thread Bill Campbell
On Tue, Jan 03, 2006, Ralf S. Engelschall wrote:
>On Tue, Jan 03, 2006, Bill Campbell wrote:
>
>> I ran into a divide-by-zero problem this morning when running
>> the amavisd log summary problem, with the attached patch fixes.
>
>Looks good to me. Feel free to commit it to CVS, Bill.

Done -- after some fiddling to figure out how things had changed
since the last time I did that :-).

There are still issues with that summary program, in that I think
the log format may have changed resulting in its not finding
anything to score.  The problem was that the divide-by-zero cause
it to fail in the run control daily which aborted it before it
ran the log rotation making for some *VERY* large log files.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``I have no reason to suppose that he, who would take away my Liberty, would
not when he had me in his Power, take away everything else.''  John Locke
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


amavisdlogsumm divide by zero patch.

2006-01-03 Thread Bill Campbell
I ran into a divide-by-zero problem this morning when running
the amavisd log summary problem, with the attached patch fixes.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``We shouldn't elect a President;  we should elect a magician.''
Will Rogers
--- amavislogsumm-0.6   2005-08-17 08:14:33.0 -0700
+++ /tmp/amavislogsumm  2006-01-03 09:13:03.827429145 -0800
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/csrel22/bin/perl
 
 #
 # amavislogsumm - analyse amavisd-new logfiles. Read from STDIN
@@ -309,7 +309,7 @@
 if ($spamCount > 0) {
 printf "\tSPAM : %5.2f\n", ($spamHitSum / $spamCount); 
 }
-if (($timeLineCount - $spamCount) > 0) { 
+if (($timeLineCount - $spamCount - $unscoredMail) > 0) { 
 printf "\tHAM  : %5.2f\n", ($noneSpamHitSum / ($timeLineCount - 
$spamCount - $unscoredMail)); 
 print "\n";
 }


Problems with apache-1.3.33 and mod_dav on Linux

2006-01-01 Thread Bill Campbell
I'm having a problem with apache-1.3.33 on a Release 2.3 systems
running on SuSE Linux Enterprise System 9 (SLES9) and SuSE 9.2
Professional where the apache process is segfaulting on every
request when mod_dav is enabled.

As I remember, this seems to be a long-standing problem as I had
disabled mod_dav in our apache builds quite a while back because
of segfaults, but nover had any reason to deal with the problem
until last week.

I have attached the output of ``openpkg rpm -qi apache'' to show
what options are enabled, a gzip'ed copy of the apache.spec file
which has been slightly modified from the stock Release 2.3
version to deal with some missing libraries, and a gzip'ed file
with the output of ``strace apache -X'' after setting then
environemt manually with the apache.sh file used by rc.apache run
control.  The process runs until a request comes in, then it dies
shortly after the munmap command.

Looking at the sources, I think that the problem may be in the
file, apache_1.3.33/src/main/http_core.c, since that seems to be
the only file referencing htaccess and munmap, but that's only a
SWAG (Scientific Wild Assed Guess) on my part.

FWIW, a slightly older version of apache, apache-1.3.31, with
similar options and mod_dav enabled is working on a FreeBSD 4.8
system here that's running OpenPKG Release 2.2 (mostly).

Has anybody here seen similar problems?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``...I'm not one of those who think Bill Gates is the devil.  I simply
suspect that if Microsoft ever met up with the devil, it wouldn't need an
interpreter.'' -- Nick Petreley
Name: apacheSource RPM:   apache-1.3.33-20051215.src.rpm
Version:  1.3.33Signature:
md5:b0b5d0af44e51db4b24a781db1afd5a0
Release:  20051215  Build Host:   mx2.atricaserver.com
Group:Web   Build System: ix86-suse9
Class:BASE  Build Time:   Wed Dec 28 15:21:48 2005
Distrib:  OpenPKG   Install Time: Wed Dec 28 15:22:17 2005
License:  ASF   Install Size: 14645630 bytes
Packager: The OpenPKG Project   Relocations:  /csrel23 
Vendor:   Apache Software Foundation
Summary:  Apache HTTP Server
URL:  http://httpd.apache.org/
Description:
The Apache Project is a collaborative software development effort
aimed at creating a robust, commercial-grade, featureful, and
freely-available source code implementation of an HTTP (Web) server.
The project is jointly managed by a group of volunteers located
around the world, using the Internet and the Web to communicate,
plan, and develop the server and its related documentation. These
volunteers are known as the Apache Group. In addition, hundreds
of users have contributed ideas, code, and documentation to the
project.
Provides:
apache::with_suexec = yes
apache::with_suexec_caller = csoft
apache::with_suexec_userdir = public_html
apache::with_suphp = no
apache::with_suphp_caller = csoft
apache::with_suphp_phpcgi = /csrel23/cgi/php
apache::with_mod_ssl = yes
apache::with_mod_perl = yes
apache::with_mod_php = yes
apache::with_mod_dav = yes
apache::with_mod_layout = no
apache::with_mod_macro = no
apache::with_mod_auth_ldap = no
apache::with_mod_auth_radius = no
apache::with_mod_auth_mysql = yes
apache::with_mod_auth_pam = no
apache::with_mod_gzip = yes
apache::with_mod_fastcgi = no
apache::with_mod_throttle = no
apache::with_mod_access_referer = no
apache::with_mod_owa = no
apache::with_mod_roaming = no
apache::with_mod_relocate = no
apache::with_mod_security = no
apache::with_mod_dosevasive = no
apache::with_mod_php_hardened = no
apache::with_mod_php_calendar = no
apache::with_mod_php_mssql = no
apache::with_mod_php_mysql = yes
apache::with_mod_php_pgsql = yes
apache::with_mod_php_gd = yes
apache::with_mod_php_bdb = yes
apache::with_mod_php_debug = no
apache::with_mod_php_pdflib = no
apache::with_mod_php_zlib = yes
apache::with_mod_php_bzip2 = yes
apache::with_mod_php_ssl = yes
apache::with_mod_php_openldap = yes
apache::with_mod_php_openldapsasl = no
apache::with_mod_php_mm = no
apache::with_mod_php_pcre = yes
apache::with_mod_php_ftp = no
apache::with_mod_php_java = no
apache::with_mod_php_oci7 = no
apache::with_mod_php_oci8 = no
apache::with_mod_php_freetype = no
apache::with_mod_php_t1lib = no
apache::with_mod_php_gettext = yes
apache::with_mod_php_imap = yes
apache::with_mod_php_xml = yes
apache::with_mod_php_dom = yes
apache::with_mod_php_bc = no
apache::with_mod

Berkeley DB vs openldap

2005-12-19 Thread Bill Campbell
There was some mention recently about issues with the berkeley
database routines and openldap.

I've been having problems with openldap-2.2.23-2.3.0.src.rpm and
db-4.3.27.3-2.3.0.src.rpm under OpenPKG Release 2.3 in which the
ldapsearch functions hang when doing searches that return large
numbers of matches (I've set sizelimit unlimited in slapd.conf
and SIZELIMIT 0 in ldap.conf).

I'm attempting to use openldap for authentication on a system
with about 7,000 accounts which results in about 14,000 ldap
entries minimum as we're setting up things for personal address
books when creating the authentication entries.

I tried updating the berkeley routines to db-4.3.29.0-2.5.0.src.rpm
and to openldap-2.3.11-2.5.0.src.rpm from Release 2.5 (enduring
the usual grief when updating the Berserkely routines :-).  The
resulting system still had search problems, and, in addition,
slapcat and slapindex died with memory faults.

I guess my first question is, is there a better back end to use
with openldap than the Berkeley DB?  Personally I would be
willing to give up a bit of performance to get away from BDB with
it's absolutely ugly coding kludges and version compatibility
problems.

Every time sleepycat updates BDB, it seems to break anything that
uses it.  There were major issues with Release 2.3 caused by
going from db-4.2.52 to db-4.3.x.  My biggest problems were with
python and perl, two of the more complex packages around.

It seems to me that it would be a Good Idea(tm) to hold off
updating the BDB in OpenPKG until it has been around long enough
for other packages to adjust to its Latest & Greatest API.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``The Income Tax has made more Liars out of American people than Golf has.''
Will Rogers
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Amavisd fails to restart during daily processing.

2005-11-16 Thread Bill Campbell
On Wed, Nov 16, 2005, Ralf S. Engelschall wrote:
>On Tue, Nov 15, 2005, Bill Campbell wrote:
...
>> There is a two second sleep in the %restart section of the rc.amavisd run
>> control script.  I think it might be a good idea to bump this
>> significantly, say to 20 seconds or so.
>
>Hmmm... I tried it multiple times on rm0.openpkg.net and amavis seems
>to stop fine and easily within 2 seconds. Ok, it's no problem to
>increase the time a little bit, but 20 seconds are rather long. Ok, for
>restarting it could be ok to have longer delays, but in general one has
>to be very carefully to not stretch the delays in rc scripts too much,
>because I know of servers with over a dozend OpenPKG instances and lots
>of daemons in each instance and where cleanly shutting down the machine
>is not possible without explicitly increasing the shutdown timeout in
>init(8) ;-) I would recommend that you retry with 4 seconds or perhaps 8
>seconds and see what happens. I guess this should be enough.

I don't see this problem frequently which is why I never dug into it
before.  The thing that led me to this conclusion was one of our customers
who took the time to examine his logs and figure it out.

Perhaps it would be best to add a variable to the configuration section
that could be overridden in the %{l_prefix}/etc/rc.conf file.

>> This would explain several occassions where our main mailing list server
>> here stopped working with a dead amavisd process.  That machine isn't
>> particularly fast, and the load average can get pretty high when delivering
>> large Mailman lists.
>
>Ok, a slow machine and a high load certainly can cause the 2 second
>delay to be too less. Ok, I've now comitted a 4 second delay and if your
>tests show that we really need even more we can easily bump it up again,
>of course. I just want to avoid increasing the delays too much without a
>definitive need.
>
>> I think this also is applicable to apache as I've seen many instances where
>> it takes longer than the 2 second sleep time in the apache %stop section
>> before all the apache processes are complete.
>
>Yes, that's correct. I've now added an extra delay of 4 seconds to the
>"restart" part of rc.apache. This way there is an effective delay of 6
>instead of 2 seconds now on Apache restarts and still just the 2 seconds
>delay on plain stops.

That makes sense.

Again, I think that putting the restart delay into the configuration
section where it can be overridden in the rc.conf file may well be the best
solution.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``A Democracy cannot exist as a permanent form of government.  It can only
exist until the voters discover they can vote themselves largesse out of
the public treasury.  From the moment on the majority always votes for the
candidate promising the most benefits from the public treasury with the
result that Democracy always collapses over a loose fiscal policy, always
to be followed by a Dictatorship.''
Professor Alexander Fraser Tytler.  1801
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Amavisd fails to restart during daily processing.

2005-11-15 Thread Bill Campbell
I had a customer e-mail me today saying that their mail system had stopped
processing mail last night, finding that amavisd had stopped.  Larry sent
me an excerpt from the amavisd log that indicated that the TCP process
couldn't bind because the port was already in use.

This sounded like a problem that might occur when a process is restarted
using rc run control, and looking at the rc.amavisd script, sure enough it
does a restart during log processing.

There is a two second sleep in the %restart section of the rc.amavisd run
control script.  I think it might be a good idea to bump this
significantly, say to 20 seconds or so.

This would explain several occassions where our main mailing list server
here stopped working with a dead amavisd process.  That machine isn't
particularly fast, and the load average can get pretty high when delivering
large Mailman lists.

I think this also is applicable to apache as I've seen many instances where
it takes longer than the 2 second sleep time in the apache %stop section
before all the apache processes are complete.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``My reading of history convinces me that most bad government results
from too much government.'' --Thomas Jefferson.
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: rc.postgresql patch to fix restart after abnormal termination

2005-11-11 Thread Bill Campbell
Was this patch from June ever considered?  It's still a problem.

On Sun, Jun 19, 2005, Bill Campbell wrote:
>The attached patch for postgresql addresses a long-standing
>problem with postgresql in which it doesn't restart after an
>abnormal termination (e.g. system reboot after power loss).
>
>The problem is caused because the pg_ctl program only checks for
>the existence of the postmaster.pid file, but doesn't check to
>see if that process is still running.
>
>I looked at the source for the pg_ctl program to see if it would
>be easy to fix it to check the running status, but it didn't look
>like it was going to be easy so I just tweaked the rc.postgresql
>to check this, removing the pid and associated Unix sockets
>before running the pg_ctl check.
>
>This patch is against the Release 2.3 package, but I don't think
>it's significantly different for CURRENT.
>
>Bill
>--
>INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
>UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
>FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
>URL: http://www.celestial.com/
>
>``Perhaps, when committing your first federal crime, it would be unwise to
>slap your name and address on it and mail it to 10,000 people.'' --Dogbert

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

The only logical reason to take guns away from responsible people is to
give irresponsible people an edge in the perpetration of their crimes
against us. -- The Idaho Observer, Vol. 1, No. 2 February 1997
--- rc.postgresql.orig  2005-01-18 11:51:53.0 -0800
+++ idiff.out   2005-11-11 15:31:10.417308536 -0800
@@ -22,6 +22,7 @@
 postgresql_opts="-h $postgresql_socket_inet -k $postgresql_socket_unix"
 postgresql_opts="$postgresql_opts $postgresql_flags"
 postgresql_log_file="@l_prefix@/var/postgresql/run/postgresql.log"
+postgresql_pidfile="@l_prefix@/var/postgresql/db/postmaster.pid"
 postgresql_slony1_pidfile="@l_prefix@/var/postgresql/run/slon.pid"
 postgresql_slony1_start () {
 ( . @l_prefix@/etc/postgresql/slony1.conf
@@ -45,8 +46,19 @@
 %status -u @l_rusr@ -o
 postgresql_usable="unknown"
 postgresql_active="no"
-rcService postgresql enable yes && \
+rcService postgresql enable yes && {
+# The pg_ctl file doesn't do smart things about checking
+# for running processes so this preliminary test will
+# remove the pid and Unix domain stuff before running
+# pg_ctl if the postmaster process isn't active.
+test -s $postgresql_pidfile && {
+kill -0 `head -1 $postgresql_pidfile` 2>/dev/null || {
+rm -f $postgresql_pidfile
+rm -f $postgresql_datadir/../run/.s*
+}
+}
 @l_prefix@/bin/pg_ctl status -D $postgresql_datadir >/dev/null && 
postgresql_active="yes"
+}
 echo "postgresql_enable=\"$postgresql_enable\""
 echo "postgresql_usable=\"$postgresql_usable\""
 echo "postgresql_active=\"$postgresql_active\""


Re: [CVS] OpenPKG: openpkg-src/gcc/ gcc.patch.amd64 gcc.spec

2005-09-19 Thread Bill Campbell
On Mon, Sep 19, 2005, Steve Weinreich wrote:
>
...
>Yes you are right. The issue is that configure thinks we are crosscompiling 
>under amd64-linux and bails out therefore but do not understand the reason 
>for this.
>
>>2. I'm very unhappy that this hack for this single platform
>>   is such intrusive to our GCC package. A patch of nearly 200KB and
>>   for a generated file like "configure". Rather CVS intrusive and hard
>>   to maintain. It is possible to reduce it in size? Or even better:
>>   to replace it with a single "%{l_shtool} subst"? For instance the
>>   patch seems to remove always the same piece of code. We could so
>>   something like "s/test x.gcc_no_link = xyes/false/g" and this way
>>   already reduce the patch to the first hunk (which is different).
>
>I have tried 3 other patches before which failed all later in the build 
>process. In the gentoo build for gcc 3.4.3.20050110-r2 the Configure.ac is 
>modified and a autoreconf called afterwards which also doesn't work for me. 
>The first working patch was the patch which i have checked in which is 
>indeed huge and ugly, but it worked in the first place.

I haven't looked closely at the gcc source tree in quite a while,
however if it uses the standard gnu autoconf, automake, etc., you
might solve the problems by running aclocal, then autoconf to
rebuild the configure file.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

There is no distinctly native American criminal class save Congress
-- Mark Twain
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: small modification in firefox.spec

2005-09-17 Thread Bill Campbell
On Sat, Sep 17, 2005, Ralf S. Engelschall wrote:
>On Sat, Sep 17, 2005, PLI wrote:
>
>> in firefox.spec, firefox-init.tar.gz is in gzip format.
>> could you add "-z" option to tar ?
>>
>> thanks.
>>
>> --- ./firefox.spec.orig 2005-09-17 15:58:08.0 +0200
>> +++ ./firefox.spec  2005-09-17 15:58:12.0 +0200
>> @@ -260,7 +260,7 @@
>>
>>  #   add initialization files
>>  ( cd $RPM_BUILD_ROOT%{l_prefix}/lib && \
>> -  %{l_tar} -xf %{SOURCE firefox-init.tar.gz} && \
>> +  %{l_tar} -zxf %{SOURCE firefox-init.tar.gz} && \
>>rm -f firefox/README
>>  ) || exit $?
>
>Thanks for the hint. I've fixed it now. But I had to use a combination
>of gzip and tar as not all tar implementations support the -z option.

Doesn't %{l_tar} always refer to the gnu-tar built into OpenPKG?
If so, one should be able to safely assume that it supports the
option to use gzip compression.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

There are three kinds of men. The ones that learn by reading. The few who
learn by observation.  The rest of them have to pee on the electric fence
for themselves. -- Will Rogers
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Shared Libraries

2005-09-13 Thread Bill Campbell
On Tue, Sep 13, 2005, Birger Krägelin wrote:
>> So, the main argument against shared libraries is the support 
>> of multiple instances, currently.
>
>What's the argument against static linking?
>Memory shouldn't be a problem anymore...

I think that there are some programs that require static linking,
notably things like unixodbc and anything that wants to use the
libperl dynamic linking to embed perl support in an application.

I seem to remember fighing with some programs as well that are very hard to
convince not to use dynamic linking, thus picking up things like a vendor's
Berkeley database routines instead of the OpenPKG static libraries.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Anyone who thinks Microsoft never does anything truly innovative isn't
paying attention to the part of the company that pushes the state of
its art: Microsoft's legal department.'' 
   --Ed Foster, InfoWorld Gripe Line columnist
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: (r_usr,r_grp) => (with_user,with_group) ?

2005-08-17 Thread Bill Campbell
On Wed, Aug 17, 2005, Ralf S. Engelschall wrote:
>On Wed, Aug 17, 2005, Bill Campbell wrote:
>
>> [...]
>> If there's a pressing reason for someone to use non-standard ownership,
>> they're free to modify the spec file and rebuild for their local use.
>> [...]
>
>Oh, yes, indeed. Thanks for the hint, Bill. I've totally overlooked
>that this is also possible here -- and IMHO adequate for this local
>situation. People just have to understand that for cleanness reasons we
>should not add hooks and hacks into OpenPKG to solve every non-standard
>problem.
>
>But we should at least better document or automate the process of
>performing local changes and maintaining them. Perhaps if it is more
>straight-forward and easy for local admins to apply and maintain their
>local adjustments their life would be easier and the pressure onto us
>for including those hacks is reduced, too. So, we perhaps should provide
>a Wiki page or whatever which shows the local admin how to use Anon-CVS
>for checking out the sources, rolling their own adjusted packages and
>maintaining their changes by stepping from release to release via "cvs
>up -rOPENPKG_X_Y_SOLID" and merging potential conflicts.

One thing I've done is to make notes on various packages which include
those things that I've modified for our local use, and have these available
on our libertysoft.org web site.  I put these up as much for my own use
since they help me remember what I've done and why.

http://www.libertysoft.org/openpkg/

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

The difference between science and the fuzzy subjects is that science
requires reasoning while those other subjects merely require scholarship.
-- Robert Heinlein
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: (r_usr,r_grp) => (with_user,with_group) ?

2005-08-17 Thread Bill Campbell
On Wed, Aug 17, 2005, Ralf S. Engelschall wrote:
>On Wed, Aug 17, 2005, Matthias Kurz wrote:
>
>> Shouldn't all packages that use r_usr and/or r_grp get an option to
>> specify a "real" user/group ? Else, when someone gains access to one
>> package that uses r_usr/r_grp, he would also have access to files from
>> other packages. Also, this may support people who are "used" to use
>> special (common) users for such cases.
>
>We have those with_{user,group} options just in "amanda", "bacula"
>and one more package I cannot remember. And to be honest, the whole
>with_{user,group} I just accepted in those few packages because people
>wished it multiple times and I got tired of arguing and thought "well,
>it doesn't really hurt in those few packages, so ok".
>
...
>If we really come to the conclusion that those options are absolutely
>necessary, then we should at least think about orthogonality and
>completeness and instead of adding with_{user,group} options to each
>package we should use a more general RPM mechanism overwrite all those
>variables (--define "l_usr xxx") plus add the possibility to make them
>sticky throughout upgrades.

I agree.

The only package that I've had to fiddle user/group names is uucp, and that
because the underlying OS ties these into dialup getty.  One of these days,
I'll get hylafax packaged, and it's going to require the same things for
faxgetty to work properly.

If there's a pressing reason for someone to use non-standard ownership,
they're free to modify the spec file and rebuild for their local use.  This
is a bit of a PITA for the local user since they then have to keep track of
these changes as updates come out, but that's their problem.

Security on database related applications can easily be handled using the
underlying database's security model without any changed required for
OpenPKG packages.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

The ultimate result of shielding men from the effects of folly is to fill
the world with fools. -- Herbert Spencer (1891)
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: RPM tag change, SuSE Linux Enterprise 9.0

2005-08-13 Thread Bill Campbell
On Sat, Aug 13, 2005, Ralf S. Engelschall wrote:
>On Tue, Aug 02, 2005, Bill Campbell wrote:
>
>> I just ran into what seems to be to be a wierd problem.  I built our normal
>> selection of packages on one SuSE Linux Enterprise 9 (SLES9) system which
>> created the tag suse9.  I then installed the binary packages on another
>> SLES9 system where the OS is identical.
>>
>> I had a problem with clamav giving an invalid instruction on the second
>> machine so did an ``openpkg build -z binutils gcc'' to rebuild since the
>> second machine has is a VIA EPIA while the first has an Intel Celeron
>> processor, figuring that the difference in CPU might make a difference.
>> The build process included a rebuild of openpkg itself to the latest
>> CURRENT version (the rest is primarily Release 2.3).
>>
>> After rebuilding openpkg, the tag had changed from suse9 to linux2.6 which
>> naturally broke the generated update script.
>>
>> Why would the tag change since I didn't specify any when originally
>> bootstrapping OpenPKG?
>
>Are you really speaking about the --tag stuff or do you mean the
>platform identifier. I guess you mean that the platform identifier
>changed from x86-suse9 to x86-linux2.6, right? This can happen if the
>underlying SLES9 perhaps has to /etc/SuSE-release or /etc/SuSE_version
>file AFAIK. Can you check this, Bill?

You're right.  I've always accepted the default tag, and after I posted
this, I did `openpkg rpm --showrc | grep suse9'' on the original system,
and it was all OS related.

I'm not sure what caused this problem, and it hasn't happened again.  The
hardware that I was using was giving wierd behaviour on several things so
has been replaced.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Never do your enemy a minor injury.''
- Machiavelli
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Patches to amavisd to properly enable clamav

2005-08-04 Thread Bill Campbell
The attached amavisd.patch and amavisd.spec.patch files do two things.
First the amavisd.patch uncomments the clamd daemon startup section of the
amavisd.conf file (I figured this was cleaner than attempting to hack this
into the shtool edits).  The patch to the spec file adds the amavisd.patch
handling, and fixes a long-standing bug in the shtool subst handling on the
amavisd.conf file where it was replacing on the wrong pattern to point to
the clamav socket.

I originally created the amavisd.patch from the CURRENT version of amavisd,
but that failed to start on the older Release 2.3 system where I'm doing my
production development giving lots of perl errors saying it couldn't find
necessary modules.  With the exception of the Release date, the patch to
the spec file should work on the CURRENT version of amavisd.

I would also like to suggest that as a matter of policy, anything like the
shtool subst processing should be handled at the beginning of the %build
section of spec files, not under %setup.  I think that the only things that
should be done under %setup is to install sources and apply patches to
them.  Doing that, an ``openpkg rpm -bp'' command can create a fairly clean
directory for doing additional patches without having to deal with the
directory after substitutions have been done.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Systems, Inc.
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

Government's view of the economy could be summed up in a few short phrases:
If it moves, tax it.  If it keeps moving, regulate it.  And if it stops
moving, subsidize it -- Ronald Reagan
diff -uNr ../amavisd-new-2.3.2.orig/amavisd.conf ./amavisd.conf
--- ../amavisd-new-2.3.2.orig/amavisd.conf  2005-06-29 03:26:05.0 
-0700
+++ ./amavisd.conf  2005-08-04 17:23:32.099593481 -0700
@@ -285,14 +285,14 @@
 # ### http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/
 # ['Sophos SAVI', \&sophos_savi ],
 
-# ### http://www.clamav.net/
-# ['ClamAV-clamd',
-#   \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd"],
-#   qr/\bOK$/, qr/\bFOUND$/,
-#   qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
-# # NOTE: the easiest is to run clamd under the same user as amavisd; match the
-# # socket name (LocalSocket) in clamav.conf to the socket name in this entry
-# # When running chrooted one may prefer: ["CONTSCAN {}\n","$MYHOME/clamd"],
+### http://www.clamav.net/
+['ClamAV-clamd',
+  \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd"],
+  qr/\bOK$/, qr/\bFOUND$/,
+  qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
+# NOTE: the easiest is to run clamd under the same user as amavisd; match the
+# socket name (LocalSocket) in clamav.conf to the socket name in this entry
+# When running chrooted one may prefer: ["CONTSCAN {}\n","$MYHOME/clamd"],
 
 # ### http://www.clamav.net/ and CPAN  (memory-hungry! clamd is preferred)
 # ['Mail::ClamAV', \&ask_clamav, "*", [0], [1], qr/^INFECTED: (.+)/],
--- amavisd.spec.orig   2005-02-21 09:02:24.0 -0800
+++ amavisd.spec2005-08-04 17:32:48.572331933 -0700
@@ -34,7 +34,7 @@
 Group:Mail
 License:  GPL
 Version:  2.2.1
-Release:  2.3.0
+Release:  20050804
 
 #   package options
 %option   with_milter no
@@ -43,6 +43,7 @@
 Source0:  http://www.ijs.si/software/amavisd/amavisd-new-%{version}.tar.gz
 Source1:  http://homepages.hs-bremen.de/~renegat/amavislogsumm
 Source2:  rc.amavisd
+Patch0:   amavisd.patch
 
 #   build information
 Prefix:   %{l_prefix}
@@ -75,12 +76,13 @@
 
 %prep
 %setup -q -n amavisd-new-%{version}
+   %patch0 -p0
 %{l_shtool} subst \
 -e "s;'clamscan';'%{l_prefix}/bin/clamscan';g" \
 -e "s;'uvscan';'%{l_prefix}/bin/uvscan';g" \
 -e "s;'sweep';'%{l_prefix}/bin/sweep';g" \
 -e "s;'f-prot';'%{l_prefix}/bin/f-prot';g" \
--e 's;/var/amavis/clamd;%{l_prefix}/var/clamav/clamd.sock;g' \
+-e 's;/var/run/clamav/clamd;%{l_prefix}/var/clamav/clamd.sock;g' \
 -e 's;/var/amavis;%{l_prefix}/var/amavisd;g' \
 -e 's;/var/virusmails;%{l_prefix}/var/amavisd/virusmails;g' \
 -e 's;/usr/bin/sendmail;%{l_prefix}/sbin/sendmail;g' \


RPM tag change, SuSE Linux Enterprise 9.0

2005-08-02 Thread Bill Campbell
I just ran into what seems to be to be a wierd problem.  I built our normal
selection of packages on one SuSE Linux Enterprise 9 (SLES9) system which
created the tag suse9.  I then installed the binary packages on another
SLES9 system where the OS is identical.

I had a problem with clamav giving an invalid instruction on the second
machine so did an ``openpkg build -z binutils gcc'' to rebuild since the
second machine has is a VIA EPIA while the first has an Intel Celeron
processor, figuring that the difference in CPU might make a difference.
The build process included a rebuild of openpkg itself to the latest
CURRENT version (the rest is primarily Release 2.3).

After rebuilding openpkg, the tag had changed from suse9 to linux2.6 which
naturally broke the generated update script.

Why would the tag change since I didn't specify any when originally
bootstrapping OpenPKG?

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Capitalism works primarily because most of the ways that a company can be
scum end up being extremely bad for business when there's working
competition.'' -rra
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: OpenSSH PATH problem

2005-07-16 Thread Bill Campbell
On Sat, Jul 16, 2005, Albert Chin wrote:
>On Fri, Jul 15, 2005 at 02:24:13PM -0700, David M. Fetter wrote:
>> This also means that things like `rsync -av -e ssh dir/
>> host:/tmp/dir/` will not work because openssh won't see the rsync
>> binary that resides under %{l_prefix}/bin, etc.
>
>Easily fixed by configuring rsync with --with-rsync-path.

That's a workaround, not a solution, particularly if one has remote sites
connecting that don't know anything about your local configuration.

Changes in the local system's configuration should be transparent to
external systems, and not require that they know anything about my internal
configuration.

It also doesn't address issues where there may be a vendor's version of a
program that would be run instead of the desired OpenPKG version.

IHMO, If I'm going to run the OpenPKG version of openssh or other server
software, it should be aware of and use OpenPKG versions of programs in
preference to the vendor's version.  This is one of the main reasons I use
OpenPKG as it allows me to have a common environment, independent of the
underlying OS.

Before I started using OpenPKG, I would often replace the vendor's versions
of programs with OpenSource versions to make it easier to deal with
differences in systems.  This often required making changes that either
broke the vendor's update procedures, or required extensive work to undo
their effects after an update.  I first found out about OpenPKG when I read
Ralf's article in SysAdmin magazine, which was great timing as I was also
evaluating alternatives to Caldera's OpenLinux, and was going to have to
make a fairly major change in our software and installation procedures in
any case.  I've been doing applications and systems software on *nix
systems since 1982, and OpenPKG has vastly simplified this job.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Americans are so enamored of equality that they would rather be equal
in slavery than unequal in freedom.''
-Alexis de Tocqueville, 1805-1859
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: OpenSSH PATH problem

2005-07-15 Thread Bill Campbell
On Fri, Jul 15, 2005, David M. Fetter wrote:
>Actually, we are having the same problem now.  I found out why.  It is
>because of the following configure options:
>
>220 --disable-etc-default-login \
>221 --with-default-path=/bin:/usr/bin \
>222 --with-superuser-path=/bin:/usr/bin:/sbin:/usr/sbin \
>
>I understand the thoughts behind adding such configure options, however
>for the generic use of openssh, these options shouldn't be default.  In
>addition, these options break openssh for everybody who is using an
>openpkg environment because this means that prior to login the path is
>hardcoded to what you see above.  This also means that things like
>`rsync -av -e ssh dir/ host:/tmp/dir/` will not work because openssh
>won't see the rsync binary that resides under %{l_prefix}/bin, etc.
>This breaks svn over ssh as well.  So, either these options should
>include %{l_prefix}/bin and %{l_prefix}/sbin or they should just be
>removed altogether.  Any thoughts?

I agree totally (and we modify openssh locally to make it work in what I
consider a sane manner).  While there may be some systems that don't honor
the PATH settings of openssh, I don't think that tuning to their lowest
common denominator makes sense, and violates the principle of least
surprise.

>On Tue, 2005-03-29 at 21:48 +0200, Ralf S. Engelschall wrote:
>> On Tue, Mar 29, 2005, Bill Campbell wrote:
>> 
>> > I ran into a problem at a customer's yesterday when I found that
>> > openssh no longer prepends the OpenPKG bin directory to the PATH
>> > on the server.  Looking back through my archives, this appears to
>> > have happened between Release 2.1 and Release 2.2.  This causes
>> > things like ``rsync -e ssh xxx'' to fail on the remote system or
>> > to find invalid configuration if there's a vendor supplied
>> > version of the program on the remote end that conflicts with the
>> > OpenPKG version of the program.
>> >
>> > The attached patch fixes this in what I think is a logical manner
>> > for OpenPKG Release 2.2, 2.3, and CURRENT.
>> 
>> Unfortunately, no, it doesn't. Well, to be precise, it "fixes" it
>> on those platforms where OpenSSH supports the --with-default-path
>> functionality only!
>> 
>> That's the reason why we explicitly removed any %{l_prefix} stuff there
>> (see http://cvs.openpkg.org/chngview?cn=19660) for cross-platform
>> consistency reasons. Because it is totally confusing if one some
>> platforms one magically has the %{l_prefix} in path by default set
>> by sshd(8) and on other platforms it isn't. Hence we decided to
>> intentionally not try to add %{l_prefix}/bin there at all and instead
>> have to life with the fact that there has to be either (1) a global
>> shell profile setting PATH correctly, or (2) a local shell profile
>> setting PATH correctly or (3) the user calls the command with an
>> absolute path.
>> 
>> All this I personally don't like very much, but to be honest, I do not
>> see a solution. Even hacking sshd(8) is not possible because the reason
>> why --with-default-path isn't working on all platforms is partly because
>> on those login(1) is used by sshd(8) (and this way PATH is reset by the
>> system after sshd forked off its child), etc.
>> 
>>Ralf S. Engelschall
>>[EMAIL PROTECTED]
>>www.engelschall.com
>> 
>> __
>> The OpenPKG Projectwww.openpkg.org
>> Developer Communication List   openpkg-dev@openpkg.org
>> 
>-- 
>David M. Fetter - UNIX Systems Administrator
>Portland State University - www.oit.pdx.edu



-- 
Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Never chastise a Windows user...just smile at them kindly as you would a
disadvantaged child.'' WBM
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Building on OS X 10.4, Tiger

2005-07-05 Thread Bill Campbell
I did a first cut at bootstrapping the CURRENT version of OpenPKG
on a new Mac OS X Tiger system with all updates installed.  The
build failed in what looks to me may be a problem in the way it's
building the libraries (ranlib perhaps).  I have built relatively
recent versions of OpenPKG on OS X 10.3, Panther without major
difficulties.

Output of the build is available here:

http://www.celestial.com/Members/bill/tmp/tmpbuild.log

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Unix is simple. It just takes a genius to understand its simplicity'' --
Dennis Ritchie
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: OpenPKG mirrors

2005-07-02 Thread Bill Campbell
On Sat, Jul 02, 2005, Matthias Kurz wrote:
>
>Hi.
>
>Is there a complete list of mirrors somewhere ?
>When there is something on openpkg.org, that it is just not easy to
>find :) It should jump in my face, when i go to "Download Area".

We have current and release SRC and UPD directories available.  Release
sources are available from Release 1.2 through 2.4.

ftp://ftp.celestial.com/mirrors/ftp.openpkg.org/

Rsync access is also available:

ftp.celestial.com::openpkg_current -> /mirrors/ftp.openpkg.org/current
ftp.celestial.com::openpkg_release -> /mirrors/ftp.openpkg.org/release

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``It's just got so that 90 percent of the people in this country don't give
a damn.  Politics ain't worrying this country one tenth as much as parking
space.''
Will Rogers
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Q: Pointers to OpenPKG-HOWTOs ?

2005-07-01 Thread Bill Campbell
On Fri, Jul 01, 2005, Matthias Kurz wrote:
>
>Hi.
>
>I've seen some pointers in the past, but i cannot find them again. Are
>there some public documents/HOWTOs, where people describe how they
>configure and maintain OpenPKG ?

I have an overview on one of our sites that I wrote a couple of
years ago (and need to update).  It's also referenced at the
bottom of the OpenPKG documentation page.

http://www.libertysoft.org/openpkg/overview/

David Fetter, also has written quite a bit, certainly more detailled than
mine.  This is also referenced on the OpenPKG documentation page.

http://www.cns.pdx.edu/documentation/openpkg/psu_unofficial_openpkg_howto.html

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

Many companies that have made themselves dependent on [the equipment of a
certain major manufacturer] (and in doing so have sold their soul to the
devil) will collapse under the sheer weight of the unmastered complexity of
their data processing systems.
-- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Spamassassin run control patch

2005-06-28 Thread Bill Campbell
On Tue, Jun 28, 2005, Ralf S. Engelschall wrote:
>On Tue, Jun 28, 2005, Bill Campbell wrote:
>
...
>Ok, good idea. Just two suggestions:
>
>First I personally would not add those comments to the %config section
>(because we never have comments in any %config section and if we comment
>two variables we actually have to comment the others, too).

Personally I would like to see more comments in the run control files.
Generally I think it would be a Good Idea(tm) to let others know the logic
behind some of the variables.  As an example, the behaviour of the
127.0.0.1 listening options varies from package to package (e.g. in rsync,
setting it to "" causes the daemon to listen on all interfaces, while many
others require that one set it to "0.0.0.0"

I really liked it when many things were standardized in the rc files about
Release 2.0 or so, and I would like to see some additional standardization,
where possible, in things like this.

>Second, for more flexibility and to align with other packages, would it
>make sense to use just a single 'spamassassin_flags="-A 127. --local"'
>variable? Because I always tend to the following: either a variable
>named "spamassassin_allowed_ips" is really just a list of IPs (as its
>name indicates) or if it is really a list of command line flags its
>better to merge this with a more generic and reusable variable like
>"spamassassin_flags".

Again, this is a matter of style.  I prefer to keep things simple, with one
function per variable, preferably with descriptive names, rather than lump
them all together.  Descriptive variable names and comments make it easier
for someone unfamiliar with an rc file to figure out what's going on
without having to understand shell scripting.

...
>Are you still happy with this, Bill?

Generally yes :-).  It takes care of the major problem.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

Imagine if every Thursday your shoes exploded if you tied them the usual
way.  This happens to us all the time with computers, and nobody thinks of
complaining.
-- Jef Raskin http://jefraskin.com/
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Spamassassin run control patch

2005-06-28 Thread Bill Campbell
I've been working with spamassassin recently using spamd in a
mail delivery system to allow per-user preferences which don't
seem to be handled when running under amavisd, and to provide
more fine grained spam checking.  In doing this I found that
spamd didn't allow connections from remote machines, even if the
interface was changed from 127.0.0.1.  The attached patch to the
rc.spamassassin file adds a couple of variables to the %config
section to allow these in the @l_prefix@/etc/rc.conf file, and
changes the %start section to use these variables.

The variables control, (a) who is allowed to connect to the
server, and (b) whether to use network tests.  I think that the
default settings shouldn't change the current behaviour of
spamassassin (but might include 10. and whatever the other local
IP range is that I never remember :-).

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

With Congress, every time they make a joke it's a law; and every time
they make a law it's a joke.
-- Will Rogers
--- rc.spamassassin.origTue Jun 28 09:29:44 2005
+++ rc.spamassassin Tue Jun 28 10:23:01 2005
@@ -12,6 +12,12 @@
 spamassassin_log_numfiles="10"
 spamassassin_log_minsize="1M"
 spamassassin_log_complevel="9"
+# These options control various startup options, and are
+# included here to allow changes in the @l_prefix@/etc/rc.conf file.
+# Allow local private networks and local host to connect
+spamassassin_allowed_ips='-A 192.168. -A 127.'
+# Use only local tests
+spamassassin_local_only='--local'
 
 %common
 spamassassin_pidfile="@l_prefix@/var/spamassassin/spamassassin.pid"
@@ -36,7 +42,8 @@
 --pidfile="${spamassassin_pidfile}" \
 --listen-ip="${spamassassin_iface}" \
 --port="${spamassassin_port}" \
---local
+$spamassassin_allowed_ips \
+$spamassassin_local_only
 
 %stop -p 400 -u @l_susr@
 rcService spamassassin enable yes || exit 0


rc.postgresql patch to fix restart after abnormal termination

2005-06-19 Thread Bill Campbell
The attached patch for postgresql addresses a long-standing
problem with postgresql in which it doesn't restart after an
abnormal termination (e.g. system reboot after power loss).

The problem is caused because the pg_ctl program only checks for
the existence of the postmaster.pid file, but doesn't check to
see if that process is still running.

I looked at the source for the pg_ctl program to see if it would
be easy to fix it to check the running status, but it didn't look
like it was going to be easy so I just tweaked the rc.postgresql
to check this, removing the pid and associated Unix sockets
before running the pg_ctl check.

This patch is against the Release 2.3 package, but I don't think
it's significantly different for CURRENT.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Perhaps, when committing your first federal crime, it would be unwise to
slap your name and address on it and mail it to 10,000 people.'' --Dogbert
--- rc.postgresql.orig  2005-01-18 11:51:53.0 -0800
+++ rc.postgresql   2005-06-19 10:20:34.896097403 -0700
@@ -22,6 +22,7 @@
 postgresql_opts="-h $postgresql_socket_inet -k $postgresql_socket_unix"
 postgresql_opts="$postgresql_opts $postgresql_flags"
 postgresql_log_file="@l_prefix@/var/postgresql/run/postgresql.log"
+postgresql_pidfile="@l_prefix@/var/postgresql/db/postmaster.pid"
 postgresql_slony1_pidfile="@l_prefix@/var/postgresql/run/slon.pid"
 postgresql_slony1_start () {
 ( . @l_prefix@/etc/postgresql/slony1.conf
@@ -45,8 +46,19 @@
 %status -u @l_rusr@ -o
 postgresql_usable="unknown"
 postgresql_active="no"
-rcService postgresql enable yes && \
+rcService postgresql enable yes && {
+# The pg_ctl file doesn't do smart things about checking
+# for running processes so this preliminary test will
+# remove the pid and Unix domain stuff before running
+# pg_ctl if the postmaster process isn't active.
+test -s $postgresql_pidfile && {
+kill -0 `head -1 $postgresql_pidfile` 2>/dev/null || {
+rm -f $postgresql_pidfile
+rm -f $postgresql_datadir/../run/.s*
+}
+}
 @l_prefix@/bin/pg_ctl status -D $postgresql_datadir >/dev/null && 
postgresql_active="yes"
+}
 echo "postgresql_enable=\"$postgresql_enable\""
 echo "postgresql_usable=\"$postgresql_usable\""
 echo "postgresql_active=\"$postgresql_active\""


Re: Dependency problems, apache and with_mod_php_dom

2005-06-18 Thread Bill Campbell
On Sat, Jun 18, 2005, Ralf S. Engelschall wrote:
>On Fri, Jun 17, 2005, Bill Campbell wrote:
>
>> I ran into a problem today building UPD/apache-1.3.33-2.3.3.src.rpm on a
>> SuSE 9.2 Professional system where it wasn't finding necessary libraries
>> which turned out to have been found in the SuSE gcrypt package.
>>
>> This had been building on our in-house systems because we have pretty much
>> all the SuSE development packages installed, but failed on what is going to
>> be a production machine which has far fewer packages installed.
>
>Hmmm... I doubt that your problem is really about gcrypt. The DOM stuff
>is all about XML and even after removing gcrypt and gpg-error and
>building "apache" under with_mod_php=yes and with_mod_php_dom=yes on
>rm0.openpkg.net I see no problem. The only thing PHP picked up is the
>libxml/libxslt stuff (as expected) plus libcrypt.a for crypt(3). So, a
>dependency to gcrypt would be something totally unexpected for me, Bill.

If it isn't the mod_dom, then the only other thing I changed on that build
was to turn on apache::with_mod_php_gd.  Thinking about it, the graphics
libraries may well be the ones that wanted the gcrypt.

>> Since I haven't figured out how to get opd build to work with packages
>> having many options, and I already committed one gaffe today by improperly
>> checking in an update, I'm attaching a patch against the apache.spec file
>> which should work.
>
>$ opd bu -D with_mod_php_dom=yes
>
>PS: This discussion should actually take place on openpkg-dev@openpkg.org,
>hence I've moved it there.

My bad.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

There are three kinds of men. The ones that learn by reading. The few who
learn by observation.  The rest of them have to pee on the electric fence
for themselves. -- Will Rogers
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Python and Zope add-on packages

2005-06-03 Thread Bill Campbell
On Fri, Jun 03, 2005, Tres Seaver wrote:
>I uploaded a set of packages last night which extend Python or Zope (in
>ways similar to the 'perl-' packages).  I have a couple of
>questions about the work I did:
>
> - The Python add-ons just do the "simplest thing", which is to drop the
>   various artifacts into '/lib/python/site-packages'.  They do
>   not create package-specific directories under '/lib'.
>
>   An alternate approach would be to create such a directory, e.g.
>   '/lib/python-', and then drop a 'bar.pth' file into
>   the 'site-packages' directory.
>
> - The Zope add-ons *do* create a package-specific lib directory, and
>   then symlink the actual Product directory from there into the
>   Zope "instance home" products directory,
>   '/var/zope/Products'.
>
>The difference in approach is due to the fact that I just used Python's
>distutils support to install the Python add-ons, whereas I was following
>my earlier model (from the 'zope-cmf' package) for the Zope add-ons.
>Which approach fits better with the OpenPkg way?

I think that your current approach is correct, and parallels the various
perl packages (e.g. perl-www) which put their components in the same place
that a normal CPAN install would.  Adding ``python-'' in front of the
component names would require fiddling python source, or at least adding
something to the module search path.

Given that I'm doing most of my development now in python after using perl
since version 3.x, I would like to see python packaging similar to the perl
(e.g. python-www, python-mail, etc.) that group related add-ons that aren't
included in the base python.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

Cutting the space budget really restores my faith in humanity.  It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation.
-- Johnny Hart
__
The OpenPKG Projectwww.openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


OpenPKG locking for cron jobs

2005-06-01 Thread Bill Campbell
I ran into a problem this morning where the load average on one
of our systems was extremely high, and found that a major factor
was multiple daily runs of findutils rebuilding locate database.

This type of problem can occur when cron jobs start without
testing to see if the previous run is still active.

When I first tackled this issue many years ago, my solution was
to use the ``shlock'' program from the usenet news software, and
incorporate that in our maintenance scripts.

I would like to suggest implementing this in OpenPKG for the
quarterly, hourly, daily, weekly, and monthly cron jobs with lock
files like %{l_prefix}/var/package/quarterly.lock.  The code to
do this is simple (some might say Crude but Effective).

I've attached the source that we use for shlock, and I think it
would be easy to put this under %{l_prefix}/lib/openpkg or
%{l_prefix}/libexec/openpkg directories.  I've also included the
man page for this from ``inn''.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:   camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

Bagdikian's Observation:
Trying to be a first-rate reporter on the average American
newspaper is like trying to play Bach's "St. Matthew Passion"
on a ukelele.
/*  $Revision: 3.3 $
**
**  Produce reliable locks for shell scripts, by Peter Honeyman as told
**  to Rich $alz.
*/
#include 
/* #include "configdata.h" */
#include 
#include 
#include 
#include 

#define PID_T int
#define POINTER void*
#define SIZE_T size_t
#define NORETURN void

private boolBinaryLock;
private charCANTUNLINK[] = "Can't unlink \"%s\", %s\n";
private charCANTOPEN[] = "Can't open \"%s\", %s\n";


/*
**  See if the process named in an existing lock still exists by
**  sending it a null signal.
*/
private bool
ValidLock(name, JustChecking)
char*name;
boolJustChecking;
{
register intfd;
register inti;
PID_T   pid;
charbuff[BUFSIZ];

/* Open the file. */
if ((fd = open(name, O_RDONLY)) < 0) {
if (JustChecking)
return FALSE;
(void)fprintf(stderr, CANTOPEN, name, strerror(errno));
return TRUE;
}

/* Read the PID that is written there. */
if (BinaryLock) {
if (read(fd, (char *)&pid, sizeof pid) != sizeof pid) {
(void)close(fd);
return FALSE;
}
}
else {
if ((i = read(fd, buff, sizeof buff - 1)) <= 0) {
(void)close(fd);
return FALSE;
}
buff[i] = '\0';
pid = (PID_T) atol(buff);
}
(void)close(fd);
if (pid <= 0)
return FALSE;

/* Send the signal. */
if (kill(pid, 0) < 0 && errno == ESRCH)
return FALSE;

/* Either the kill worked, or we're optimistic about the error code. */
return TRUE;
}


/*
**  Unlink a file, print a message on error, and exit.
*/
private NORETURN
UnlinkAndExit(name, x)
char*name;
int x;
{
if (unlink(name) < 0)
(void)fprintf(stderr, CANTUNLINK, name, strerror(errno));
exit(x);
}


/*
**  Print a usage message and exit.
*/
private NORETURN
Usage()
{
(void)fprintf(stderr, "Usage: shlock [-u|-b] -f file -p pid\n");
exit(1);
/* NOTREACHED */
}


int
main(ac, av)
int ac;
char*av[];
{
register inti;
register char   *p;
register intfd;
chartmp[BUFSIZ];
charbuff[BUFSIZ];
char*name;
PID_T   pid;
boolok;
boolJustChecking;

/* Set defaults. */
pid = 0;
name = NULL;
JustChecking = FALSE;
/* (void)umask(NEWSUMASK); */

/* Parse JCL. */
while ((i = getopt(ac, av, "bcup:f:")) != EOF)
switch (i) {
default:
Usage();
/* NOTREACHED */
case 'b':
case 'u':
BinaryLock = TRUE;
break;
case 'c':
JustChecking = TRUE;
break;
case 'p':
pid = (PID_T) atol(optarg);
break;
case 'f':
name = optarg;
break;
}
ac -= optind;
av += optind;
if (ac || pid == 0 || name == NULL)
Usage();

/* Create the temp file in the same directory as the destination. */
if ((p = strrchr(name, '/')) != NULL) {
*p = '\0';
(void)sprintf(tmp, "%s/shlock%ld", name, (long)getpid());
*p = '/';
}
else

  1   2   3   4   >