Steve skrev, on 23-12-2007 19:53:
[...]
Is this more suiting your needs:
I don't have any needs ;) Everything works for me.
# rpmbuild --with mysql --with clamav --with daemon --with syslog --with
large-domain --with virtual_users --target=i686 -ba dspam-3.8.0-1.1.spec
I don't call Clamav from dspam and never would - I call clamd from
amavisd-new, together with BitDefender and Sophos AV. Where's your
BitDefender here?
Wrote: /usr/src/redhat/SRPMS/dspam-3.8.0-1.1.src.rpm
It's generally considered bad practice for root to build rpms (or
software at all, imagine the make cd'ing to a non-existent directory and
doing 'rm -rf *') and you have to be root to build in the
/usr/src/redhat/ hierarchy. I build as the mortal tonni in my own home
directory and have a ~/.rpmmacros that gives the hierarchy.
Wrote: /usr/src/redhat/RPMS/i686/dspam-3.8.0-1.1.i686.rpm
Wrote: /usr/src/redhat/RPMS/i686/dspam-mysql_drv-3.8.0-1.1.i686.rpm
Wrote: /usr/src/redhat/RPMS/i686/dspam-devel-3.8.0-1.1.i686.rpm
Wrote: /usr/src/redhat/RPMS/i686/dspam-web-3.8.0-1.1.i686.rpm
I don't have a web rpm; I suppose I should (I don't use the web GUI).
Then everything would have to go into /usr/share, according to Red Hat.
And here the content:
/usr/src/redhat/RPMS/i686/dspam-3.8.0-1.1.i686.rpm:
Ok up to here ...
[...]
drwxr-xr-x 2 root root 0 Dec 23 20:41 /usr/lib/dspam
I don't have a directory /usr/lib/dspam in 3.8.0, but ok.
-rwxr-xr-x 1 root root 51488 Dec 23 20:41
/usr/lib/dspam/libhash_drv.a
-rwxr-xr-x 1 root root 850 Dec 23 20:41
/usr/lib/dspam/libhash_drv.la
lrwxr-xr-x 1 root root 20 Dec 23 20:41
/usr/lib/dspam/libhash_drv.so -> libhash_drv.so.7.0.0
lrwxr-xr-x 1 root root 20 Dec 23 20:41
/usr/lib/dspam/libhash_drv.so.7 -> libhash_drv.so.7.0.0
-rwxr-xr-x 1 root root 51657 Dec 23 20:41
/usr/lib/dspam/libhash_drv.so.7.0.0
All these go into /usr/lib.
-rwxr-xr-x 1 root root 310260 Dec 23 20:41 /usr/lib/libdspam.a
-rwxr-xr-x 1 root root 802 Dec 23 20:41 /usr/lib/libdspam.la
lrwxr-xr-x 1 root root 17 Dec 23 20:41 /usr/lib/libdspam.so
-> libdspam.so.7.0.0
lrwxr-xr-x 1 root root 17 Dec 23 20:41 /usr/lib/libdspam.so.7
-> libdspam.so.7.0.0
-rwxr-xr-x 1 root root 227730 Dec 23 20:41
/usr/lib/libdspam.so.7.0.0
Same as these.
drwxr-xr-x 2 root root 0 Dec 23 20:41
/usr/share/doc/dspam-3.8.0
-rw-r--r-- 1 root root 210769 Mar 18 2007
/usr/share/doc/dspam-3.8.0/CHANGELOG
-rw-r--r-- 1 root root 89797 Mar 18 2007
/usr/share/doc/dspam-3.8.0/README
-rw-r--r-- 1 root root 211 Mar 18 2007
/usr/share/doc/dspam-3.8.0/RELEASE.NOTES
-rw-r--r-- 1 root root 3179 Mar 18 2007
/usr/share/doc/dspam-3.8.0/UPGRADING
-rwxr-xr-x 1 root root 1409 Mar 11 2005
/usr/share/doc/dspam-3.8.0/courier.txt
-rwxr-xr-x 1 root root 4221 Mar 11 2005
/usr/share/doc/dspam-3.8.0/exim.txt
-rw-r--r-- 1 root root 1629 May 17 2006
/usr/share/doc/dspam-3.8.0/markov.txt
-rwxr-xr-x 1 root root 8431 Dec 23 20:39
/usr/share/doc/dspam-3.8.0/mysql_drv.txt
-rw-r--r-- 1 root root 1505 Mar 11 2005
/usr/share/doc/dspam-3.8.0/osx.txt
-rwxr-xr-x 1 root root 5925 Sep 24 2005
/usr/share/doc/dspam-3.8.0/pgsql_drv.txt
-rwxr-xr-x 1 root root 1858 Mar 11 2005
/usr/share/doc/dspam-3.8.0/pop3filter.txt
-rwxr-xr-x 1 root root 7018 Jan 18 2006
/usr/share/doc/dspam-3.8.0/postfix.txt
-rwxr-xr-x 1 root root 2372 Mar 11 2005
/usr/share/doc/dspam-3.8.0/qmail.txt
-rwxr-xr-x 1 root root 6796 Mar 18 2007
/usr/share/doc/dspam-3.8.0/relay.txt
-rwxr-xr-x 1 root root 1312 Mar 11 2005
/usr/share/doc/dspam-3.8.0/sendmail.txt
-rwxr-xr-x 1 root root 3704 May 25 2006
/usr/share/doc/dspam-3.8.0/sqlite_drv.txt
-rw-r--r-- 1 root root 3585 May 24 2006
/usr/share/doc/dspam-3.8.0/tests.txt
-rw-r--r-- 1 root root 4731 Dec 23 20:41
/usr/share/man/man1/dspam.1.gz
-rw-r--r-- 1 root root 1138 Dec 23 20:41
/usr/share/man/man1/dspam_clean.1.gz
-rw-r--r-- 1 root root 788 Dec 23 20:41
/usr/share/man/man1/dspam_dump.1.gz
-rw-r--r-- 1 root root 940 Dec 23 20:41
/usr/share/man/man1/dspam_merge.1.gz
-rw-r--r-- 1 root root 859 Dec 23 20:41
/usr/share/man/man1/dspam_stats.1.gz
-rw-r--r-- 1 root root 867 Dec 23 20:41
/usr/share/man/man1/dspam_train.1.gz
>
drwxr-xr-x 2 root root 0 Dec 23 20:41 /var/lib/dspam
drw-r--r-- 2 root root 0 Dec 23 20:41 /var/lib/dspam/opt-in
drw-r--r-- 2 root root 0 Dec 23 20:41
/var/lib/dspam/opt-out
drw-r--r-- 2 root root 0 Dec 23 20:41
/var/lib/dspam/sql-scripts
drw-r--r-- 2 root root 0 Dec 23 20:41 /var/lib/dspam/txt
-rw-r--r-- 1 root root 2257 Dec 23 20:41
/var/lib/dspam/txt/firstrun.txt
-rw-r--r-- 1 root root 1315 Dec 23 20:41
/var/lib/dspam/txt/firstspam.txt
-rw-r--r-- 1 root root 59 Dec 23 20:41
/var/lib/dspam/txt/msgtag.nonspam
-rw-r--r-- 1 root root 55 Dec 23 20:41
/var/lib/dsstuffpam/txt/msgtag.spam
-rw-r--r-- 1 root root 1283 Dec 23 20:41
/var/lib/dspam/txt/quarantinefull.txt
drwxr-xr-x 2 root root 0 Dec 23 20:41 /var/log/dspam
drwxr-xr-x 2 root root 0 Dec 23 20:41 /var/run/dspam
No problem with this. Quite the reverse, you've put $DSPAMHOME into
/var/lib, which is where I suspect Red Hat would (e.g. LDAP, MySQL). I
don't have the logs in /var/log/dspam, I have them in $DSPAMHOME which
is where Jonz put them, but you're probably right. I have
/var/run/dspam.pid since dspam --daemon is running as root and no
problems with writes.
/usr/src/redhat/RPMS/i686/dspam-devel-3.8.0-1.1.i686.rpm:
drwxr-xr-x 2 root root 0 Dec 23 20:41 /usr/include/dspam
-rw-r--r-- 1 root root 4869 Dec 23 20:41
/usr/include/dspam/agent_shared.h
-rw-r--r-- 1 root root 6402 Dec 23 20:41
/usr/include/dspam/auto-config.h
-rw-r--r-- 1 root root 918 Dec 23 20:41
/usr/include/dspam/base64.h
-rw-r--r-- 1 root root 2145 Dec 23 20:41
/usr/include/dspam/bnr.h
-rw-r--r-- 1 root root 1078 Dec 23 20:41
/usr/include/dspam/buffer.h
-rw-r--r-- 1 root root 1725 Dec 23 20:41
/usr/include/dspam/client.h
-rw-r--r-- 1 root root 2505 Dec 23 20:41
/usr/include/dspam/config.h
-rw-r--r-- 1 root root 1019 Dec 23 20:41
/usr/include/dspam/config_api.h
-rw-r--r-- 1 root root 1444 Dec 23 20:41
/usr/include/dspam/config_shared.h
-rw-r--r-- 1 root root 2295 Dec 23 20:41
/usr/include/dspam/daemon.h
-rw-r--r-- 1 root root 5111 Dec 23 20:41
/usr/include/dspam/decode.h
-rw-r--r-- 1 root root 2227 Dec 23 20:41
/usr/include/dspam/diction.h
-rw-r--r-- 1 root root 3284 Dec 23 20:41
/usr/include/dspam/dspam.h
-rw-r--r-- 1 root root 944 Dec 23 20:41
/usr/include/dspam/dspamc.h
-rw-r--r-- 1 root root 1426 Dec 23 20:41
/usr/include/dspam/error.h
-rw-r--r-- 1 root root 1987 Dec 23 20:41
/usr/include/dspam/hash.h
-rw-r--r-- 1 root root 3156 Dec 23 20:41
/usr/include/dspam/hash_drv.h
-rw-r--r-- 1 root root 1543 Dec 23 20:41
/usr/include/dspam/heap.h
-rw-r--r-- 1 root root 7651 Dec 23 20:41
/usr/include/dspam/language.h
-rw-r--r-- 1 root root 1017 Dec 23 20:41
/usr/include/dspam/ldap_client.h
-rw-r--r-- 1 root root 3378 Dec 23 20:41
/usr/include/dspam/libdspam.h
-rw-r--r-- 1 root root 12138 Dec 23 20:41
/usr/include/dspam/libdspam_objects.h
-rw-r--r-- 1 root root 1672 Dec 23 20:41
/usr/include/dspam/list.h
-rw-r--r-- 1 root root 2759 Dec 23 20:41
/usr/include/dspam/mysql_drv.h
-rw-r--r-- 1 root root 126 Dec 23 20:41
/usr/include/dspam/ncore_adp.h
-rw-r--r-- 1 root root 2507 Dec 23 20:41
/usr/include/dspam/nodetree.h
-rw-r--r-- 1 root root 2992 Dec 23 20:41
/usr/include/dspam/pgsql_drv.h
-rw-r--r-- 1 root root 1974 Dec 23 20:41
/usr/include/dspam/pref.h
-rw-r--r-- 1 root root 1108 Dec 23 20:41
/usr/include/dspam/read_config.h
-rw-r--r-- 1 root root 1947 Dec 23 20:41
/usr/include/dspam/sqlite3_drv.h
-rw-r--r-- 1 root root 1938 Dec 23 20:41
/usr/include/dspam/sqlite_drv.h
-rw-r--r-- 1 root root 5455 Dec 23 20:41
/usr/include/dspam/storage_driver.h
-rw-r--r-- 1 root root 2253 Dec 23 20:41
/usr/include/dspam/tokenizer.h
-rw-r--r-- 1 root root 3041 Dec 23 20:41
/usr/include/dspam/util.h
Ok, but a lot of this stuff (e.g. mysql_drv.h) wasn't in the build root
and almost certainly isn't needed for dspam-devel (it's already been
used to make the drivers and libs).
-rw-r--r-- 1 root root 190 Dec 23 20:41
/usr/lib/pkgconfig/dspam.pc
drwxr-xr-x 2 root root 0 Dec 23 20:41
/usr/share/doc/dspam-devel-3.8.0
-rw-r--r-- 1 root root 9962 May 16 2006
/usr/share/doc/dspam-devel-3.8.0/example.c
I put this in /usr/share/doc/dspam-3.8.0, probably right to have a
separate doc directory for dspam-devel - but there isn't much in it, is
there?
lrw-r--r-- 1 root root 33 Dec 23 20:41
/usr/share/man/man3/dspam_addattribute.3.gz -> /usr/share/man/man3/libdspam.3.gz
lrw-r--r-- 1 root root 33 Dec 23 20:41
/usr/share/man/man3/dspam_attach.3.gz -> /usr/share/man/man3/libdspam.3.gz
lrw-r--r-- 1 root root 33 Dec 23 20:41
/usr/share/man/man3/dspam_create.3.gz -> /usr/share/man/man3/libdspam.3.gz
lrw-r--r-- 1 root root 33 Dec 23 20:41
/usr/share/man/man3/dspam_destroy.3.gz -> /usr/share/man/man3/libdspam.3.gz
lrw-r--r-- 1 root root 33 Dec 23 20:41
/usr/share/man/man3/dspam_detach.3.gz -> /usr/share/man/man3/libdspam.3.gz
lrw-r--r-- 1 root root 33 Dec 23 20:41
/usr/share/man/man3/dspam_getsource.3.gz -> /usr/share/man/man3/libdspam.3.gz
lrw-r--r-- 1 root root 33 Dec 23 20:41
/usr/share/man/man3/dspam_init.3.gz -> /usr/share/man/man3/libdspam.3.gz
lrw-r--r-- 1 root root 33 Dec 23 20:41
/usr/share/man/man3/dspam_process.3.gz -> /usr/share/man/man3/libdspam.3.gz
-rw-r--r-- 1 root root 2589 Dec 23 20:41
/usr/share/man/man3/libdspam.3.gz
Ok. That alone is a load of nasty dancing in the spec, isn't it?
/usr/src/redhat/RPMS/i686/dspam-mysql_drv-3.8.0-1.1.i686.rpm:
drwxr-xr-x 2 root root 0 Dec 23 20:41 /usr/lib/dspam
-rwxr-xr-x 1 root root 87080 Dec 23 20:41
/usr/lib/dspam/libmysql_drv.a
-rwxr-xr-x 1 root root 892 Dec 23 20:41
/usr/lib/dspam/libmysql_drv.la
lrwxr-xr-x 1 root root 21 Dec 23 20:41
/usr/lib/dspam/libmysql_drv.so -> libmysql_drv.so.7.0.0
lrwxr-xr-x 1 root root 21 Dec 23 20:41
/usr/lib/dspam/libmysql_drv.so.7 -> libmysql_drv.so.7.0.0
-rwxr-xr-x 1 root root 81073 Dec 23 20:41
/usr/lib/dspam/libmysql_drv.so.7.0.0
drwxr-xr-x 2 root root 0 Dec 23 20:41
/var/lib/dspam/sql-scripts
-rw-r--r-- 1 root root 1303 Dec 23 20:41
/var/lib/dspam/sql-scripts/mysql_objects-4.1.sql
-rw-r--r-- 1 root root 1266 Dec 23 20:41
/var/lib/dspam/sql-scripts/mysql_objects-space.sql
-rw-r--r-- 1 root root 1249 Dec 23 20:41
/var/lib/dspam/sql-scripts/mysql_objects-speed.sql
-rw-r--r-- 1 root root 1370 Dec 23 20:41
/var/lib/dspam/sql-scripts/mysql_purge-4.1.sql
-rw-r--r-- 1 root root 593 Dec 23 20:41
/var/lib/dspam/sql-scripts/mysql_purge.sql
-rw-r--r-- 1 root root 250 Dec 23 20:41
/var/lib/dspam/sql-scripts/mysql_virtual_user_aliases.sql
-rw-r--r-- 1 root root 262 Dec 23 20:41
/var/lib/dspam/sql-scripts/mysql_virtual_users.sql
As you (probably) know, I force my builders to build all of the drivers
- that was a suggestion from Jonz, but your way is probably more ...
hmmm ... Swiss ;)
/usr/src/redhat/RPMS/i686/dspam-web-3.8.0-1.1.i686.rpm:
drwxr-xr-x 2 root root 0 Dec 23 20:41 /var/www/dspam
-rw-r--r-- 1 root root 22764 May 13 2006
/var/www/dspam/admin.cgi
-rw-r--r-- 1 root root 3396 May 13 2006
/var/www/dspam/admingraph.cgi
[...]
I have a real problem seen from Red Hat's hierarchy viewpoint with the
above. RH installs all http stuff to /usr/share and /etc, not to
/var/www. Personally I do put all of my own http stuff in /var/www. But
I haven't used the dspam GUI, ever, so in my rpm it's in
/usr/share/doc/dspam-3.8.0/webui/ for people to do what they want.
# rpm -Uvh /usr/src/redhat/RPMS/i686/dspam{-,-mysql_drv-}3.8.0-1.1.i686.rpm
Preparing... ########################################### [100%]
1:dspam ########################################### [ 50%]
2:dspam-mysql_drv ########################################### [100%]
Great, it installs ...
# dspam --version
DSPAM Anti-Spam Suite 3.8.0 (agent/library)
Copyright (c) 2002-2006 Jonathan A. Zdziarski
http://dspam.nuclearelephant.com
DSPAM may be copied only under the terms of the GNU General Public License,
a copy of which can be found with the DSPAM distribution kit.
Configuration parameters: '--build=i686-redhat-linux-gnu'
'--host=i686-redhat-linux-gnu' '--target=i686-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--enable-long-usernames' '--enable-syslog'
'--enable-domain-scale' '--disable-large-scale' '--disable-homedir'
'--enable-virtual-users' '--enable-preferences-extension'
'--with-mysql-includes=/usr/include/mysql'
'--with-mysql-libraries=/usr/lib/mysql' '--enable-daemon' '--disable-ldap'
'--enable-clamav' '--disable-debug' '--disable-verbose-debug'
'--disable-bnr-debug' '--with-storage-driver=hash_drv,mysql_drv'
'--with-dspam-home=/var/lib/dspam' '--sysconfdir=/etc'
'--with-dspam-owner=nobody' '--with-dspam-group=mail'
'--with-dspam-home-group=mail' '--with-
ds
pam-mode=2511' '--with-logdir=/var/log/dspam' 'CFLAGS=-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=generic
-fasynchronous-unwind-tables' 'CXXFLAGS=-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=generic
-fasynchronous-unwind-tables' 'FFLAGS=-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i686 -mtune=generic
-fasynchronous-unwind-tables' 'build_alias=i686-redhat-linux-gnu'
'host_alias=i686-redhat-linux-gnu' 'target_alias=i686-redhat-linux-gnu'
I see a lot of output that's already in /usr/lib/rpm/macros but I
don't see --enable-daemon --enable-debug --enable-preferences-extension
--enable-homedir --with-dspam-owner/group --with-dspam-home and other
stuff I have.
I still don't see the point of Gentoo patches on stuff which, though it
might not work on Gentoo, still works perfectly on Red Hat RHEL5 and FC6
and (judging from what the CVS stuff does) sigsegvs when I don't want it
Steve, I appreciate the trouble you're going to here. I do things
differently from you, I'm Norwegian English and you're Swiss and no
doubt have your own philosophy. I think my method is kinder to my users
because they don't have to cope with command-line difficulties, even
though it probably forces them to install at least two back-end packages
and development packages they'll never use.
Now let's get on to the business of seeing why standalone CVS dspam
called from stdin sigsegvs on FC6 (the daemon doesn't)? Got any idea?
Why should I have to use useless Gentoo patches for curing problems I
don't have?
Best,
--Tonni
--
Tony Earnshaw
Email: tonni at hetnet dot nl