bonjour la liste
il existait une ancienne version de sid-milter pour centos
je viens de le modifier pour l adapter à la realese en cours 1.0.0
quand pensez vous ? je peux le proposer sur EPEL ? je ne connais pas la procedure à suivre ?
le fichier spec ummary: Sendmail milter for SenderID Name: sid-milter Version: 1.0.0 Release: 1%{?dist} License: GPL Group: System Environment/Daemons URL: http://sourceforge.net/projects/sid-milter/
Source0: http://prdownloads.sourceforge.net/sid-milter/%%7Bname%7D-%%7Bversion%7D.tar... BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: sendmail-devel Requires: sendmail
Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service
%description The sid-milter package is an open source implementation of the Sender-ID sender authentication system proposed by the IETF MARID working group. It consists of a library that implements the MARID authentication service, and a milter-based filter application that can plug in to the sendmail MTA to provide that service to sufficiently recent sendmail MTAs.
%prep %setup -q
%{__cat} <<'EOF' >sid-milter.sysconfig # Default values # #PORT="inet:10040@localhost" #USER="sid-milter" #REJECTION=0 #EXTRA_ARGS="-h -l"
# User configuration # #PORT0="inet:10040@localhost" #PORT1="inet:10040@localhost" #REJECTION1=1 #... EOF
%{__cat} <<'EOF' >sid-milter.sysv #!/bin/bash # # Init file for SenderID sendmail milter. # # chkconfig: - 79 21 # description: sid-filter is a daemon that hooks into sendmail and \ # sign/verify mail according SenderID standard # # processname: sid-filter # config: %{_sysconfdir}/sysconfig/sid-milter # pidfile: %{_localstatedir}/run/sid-milter.pid
source %{_initrddir}/functions source %{_sysconfdir}/sysconfig/network
# Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0
[ -x %{_sbindir}/sid-filter ] || exit 1
### Default variables PORT="inet:10040@localhost" USER="sid-milter" REJECTION=0 EXTRA_ARGS="-h -l" SYSCONFIG="%{_sysconfdir}/sysconfig/sid-milter"
### Read configuration [ -r "$SYSCONFIG" ] && source "$SYSCONFIG" NUM=0 CMD_ARGS=() while [ ! -z $(eval "echo $PORT${NUM}") ]; do LPORT=${PORT} LREJECTION=${REJECTION} LEXTRA_ARGS=${EXTRA_ARGS} [ ! -z $(eval "echo $PORT${NUM}") ] && LPORT=$(eval "echo $PORT${NUM}") [ ! -z $(eval "echo $REJECTION${NUM}") ] && LREJECTION=$(eval "echo $REJECTION${NUM}") [ ! -z $(eval "echo $EXTRA_ARGS${NUM}") ] && LEXTRA_ARGS=$(eval "echo $EXTRA_ARGS${NUM}") CMD_ARGS[${NUM}]="-u $USER -p $LPORT -r $LREJECTION $LEXTRA_ARGS" NUM=$((${NUM}+1)) done if [ ${#CMD_ARGS[*]} -eq 0 ]; then CMD_ARGS[0]="-u $USER -p $PORT -r $REJECTION $EXTRA_ARGS" fi
RETVAL=0 prog="sid-filter" desc="SenderID milter" #pidfile=%{_localstatedir}/run/sid-milter.pid
start() { for ((i=0; $i<${#CMD_ARGS[*]}; i=$(($i+1)) )); do pidfile=%{_localstatedir}/run/${prog}${i}.pid echo -n $"Starting $desc ($prog #$i): " touch $pidfile chown $USER $pidfile daemon --user $USER %{_sbindir}/${prog} ${CMD_ARGS[$i]} -P $pidfile RETVAL=$? echo [ $RETVAL -eq 0 ] && touch %{_localstatedir}/lock/subsys/${prog}${i} done return $RETVAL }
stop() { echo -n $"Shutting down all $desc ($prog): " killproc $prog RETVAL=$? echo if [ $RETVAL -eq 0 ]; then for ((i=0; $i<${#CMD_ARGS[*]}; i=$(($i+1)) )); do pidfile=%{_localstatedir}/run/${prog}${i}.pid echo -n $"Cleanup for $desc ($prog #$i): " rm -f %{_localstatedir}/lock/subsys/${prog}${i} echo done fi return $RETVAL }
restart() { stop sleep 2 start }
case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; condrestart) [ -e %{_localstatedir}/lock/subsys/${prog} ] && restart RETVAL=$? ;; status) status $prog RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" RETVAL=1 esac
exit $RETVAL EOF
%build %{__make} %{?_smp_mflags}
%install %{__rm} -rf %{buildroot}
%{__install} -D -m0755 sid-milter.sysv %{buildroot}%{_initrddir}/sid-milter %{__install} -D -m0644 sid-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/sid-milter %{__install} -d -m0700 %{buildroot}%{_localstatedir}/run/sid-milter %{__install} -D -m0664 sid-filter/sid-filter.8 %{buildroot}%{_mandir}/man8/sid-filter.8 %{__install} -D -m0755 obj.`uname -s`.`uname -r`.`uname -p`/sid-filter/sid-filter %{buildroot}%{_sbindir}/sid-filter %{__strip} %{buildroot}%{_sbindir}/sid-filter %{__cp} sid-filter/README sid-filter/SID_README
%pre /usr/sbin/useradd -r -s /sbin/nologin -d %{_localstatedir}/run/sid-milter \ -c "SenderID Milter" sid-milt &>/dev/null || :
%post /sbin/chkconfig --add sid-milter || :
%preun if [ $1 -eq 0 ]; then /sbin/service sid-milter stop &>/dev/null || : /sbin/chkconfig --del sid-milter || : fi
%postun /sbin/service sid-milter condrestart &>/dev/null || :
%clean %{__rm} -rf %{buildroot}
%files %defattr(-, root, root, 0755) %doc INSTALL KNOWNBUGS LICENSE README README-SenderID RELEASE_NOTES sid-filter/SID_README %{_mandir}/man8/sid-filter.8* %config(noreplace) %{_sysconfdir}/sysconfig/sid-milter %{_initrddir}/sid-milter %{_sbindir}/sid-filter %dir %attr(-,sid-milt,root) %{_localstatedir}/run/sid-milter
%changelog * Mon Feb 12 2007 Jacob Leaver jleaver@c-corp.net - 0.2.14-1 - Compile for CentOS * Fri Jul 8 2006 Petr Vokac vokac@kmlinux.fjfi.cvut.cz - 0.2.13-1 - Initial package.
On Wed, 16 Dec 2009 23:40:56 +0100, fakessh fakessh@fakessh.eu wrote:
bonjour la liste
je viens de l installer sur mon rps de prod et le resultat est ok les auto respondeurs repondent sender id plus spf ok
comment faire pour le proposer sur epel ?
il existait une ancienne version de sid-milter pour centos
je viens de le modifier pour l adapter à la realese en cours 1.0.0
quand pensez vous ? je peux le proposer sur EPEL ? je ne connais pas la procedure à suivre ?
le fichier spec ummary: Sendmail milter for SenderID Name: sid-milter Version: 1.0.0 Release: 1%{?dist} License: GPL Group: System Environment/Daemons URL: http://sourceforge.net/projects/sid-milter/
Source0: http://prdownloads.sourceforge.net/sid-milter/%%7Bname%7D-%%7Bversion%7D.tar... BuildRoot:
%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u}
-n)
BuildRequires: sendmail-devel Requires: sendmail
Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service
%description The sid-milter package is an open source implementation of the Sender-ID sender authentication system proposed by the IETF MARID working group.
It
consists of a library that implements the MARID authentication service, and a milter-based filter application that can plug in to the sendmail MTA
to
provide that service to sufficiently recent sendmail MTAs.
%prep %setup -q
%{__cat} <<'EOF' >sid-milter.sysconfig # Default values # #PORT="inet:10040@localhost" #USER="sid-milter" #REJECTION=0 #EXTRA_ARGS="-h -l"
# User configuration # #PORT0="inet:10040@localhost" #PORT1="inet:10040@localhost" #REJECTION1=1 #... EOF
%{__cat} <<'EOF' >sid-milter.sysv #!/bin/bash # # Init file for SenderID sendmail milter. # # chkconfig: - 79 21 # description: sid-filter is a daemon that hooks into sendmail and \ # sign/verify mail according SenderID standard # # processname: sid-filter # config: %{_sysconfdir}/sysconfig/sid-milter # pidfile: %{_localstatedir}/run/sid-milter.pid
source %{_initrddir}/functions source %{_sysconfdir}/sysconfig/network
# Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0
[ -x %{_sbindir}/sid-filter ] || exit 1
### Default variables PORT="inet:10040@localhost" USER="sid-milter" REJECTION=0 EXTRA_ARGS="-h -l" SYSCONFIG="%{_sysconfdir}/sysconfig/sid-milter"
### Read configuration [ -r "$SYSCONFIG" ] && source "$SYSCONFIG" NUM=0 CMD_ARGS=() while [ ! -z $(eval "echo $PORT${NUM}") ]; do LPORT=${PORT} LREJECTION=${REJECTION} LEXTRA_ARGS=${EXTRA_ARGS} [ ! -z $(eval "echo $PORT${NUM}") ] && LPORT=$(eval "echo $PORT${NUM}") [ ! -z $(eval "echo $REJECTION${NUM}") ] && LREJECTION=$(eval "echo $REJECTION${NUM}") [ ! -z $(eval "echo $EXTRA_ARGS${NUM}") ] && LEXTRA_ARGS=$(eval "echo $EXTRA_ARGS${NUM}") CMD_ARGS[${NUM}]="-u $USER -p $LPORT -r $LREJECTION $LEXTRA_ARGS" NUM=$((${NUM}+1)) done if [ ${#CMD_ARGS[*]} -eq 0 ]; then CMD_ARGS[0]="-u $USER -p $PORT -r $REJECTION $EXTRA_ARGS" fi
RETVAL=0 prog="sid-filter" desc="SenderID milter" #pidfile=%{_localstatedir}/run/sid-milter.pid
start() { for ((i=0; $i<${#CMD_ARGS[*]}; i=$(($i+1)) )); do pidfile=%{_localstatedir}/run/${prog}${i}.pid echo -n $"Starting $desc ($prog #$i): " touch $pidfile chown $USER $pidfile daemon --user $USER %{_sbindir}/${prog} ${CMD_ARGS[$i]} -P $pidfile RETVAL=$? echo [ $RETVAL -eq 0 ] && touch %{_localstatedir}/lock/subsys/${prog}${i} done return $RETVAL }
stop() { echo -n $"Shutting down all $desc ($prog): " killproc $prog RETVAL=$? echo if [ $RETVAL -eq 0 ]; then for ((i=0; $i<${#CMD_ARGS[*]}; i=$(($i+1)) )); do pidfile=%{_localstatedir}/run/${prog}${i}.pid echo -n $"Cleanup for $desc ($prog #$i): " rm -f %{_localstatedir}/lock/subsys/${prog}${i} echo done fi return $RETVAL }
restart() { stop sleep 2 start }
case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; condrestart) [ -e %{_localstatedir}/lock/subsys/${prog} ] && restart RETVAL=$? ;; status) status $prog RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" RETVAL=1 esac
exit $RETVAL EOF
%build %{__make} %{?_smp_mflags}
%install %{__rm} -rf %{buildroot}
%{__install} -D -m0755 sid-milter.sysv %{buildroot}%{_initrddir}/sid-milter %{__install} -D -m0644 sid-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/sid-milter %{__install} -d -m0700 %{buildroot}%{_localstatedir}/run/sid-milter %{__install} -D -m0664 sid-filter/sid-filter.8 %{buildroot}%{_mandir}/man8/sid-filter.8 %{__install} -D -m0755 obj.`uname -s`.`uname -r`.`uname -p`/sid-filter/sid-filter %{buildroot}%{_sbindir}/sid-filter %{__strip} %{buildroot}%{_sbindir}/sid-filter %{__cp} sid-filter/README sid-filter/SID_README
%pre /usr/sbin/useradd -r -s /sbin/nologin -d
%{_localstatedir}/run/sid-milter
\ -c "SenderID Milter" sid-milt &>/dev/null || :
%post /sbin/chkconfig --add sid-milter || :
%preun if [ $1 -eq 0 ]; then /sbin/service sid-milter stop &>/dev/null || : /sbin/chkconfig --del sid-milter || : fi
%postun /sbin/service sid-milter condrestart &>/dev/null || :
%clean %{__rm} -rf %{buildroot}
%files %defattr(-, root, root, 0755) %doc INSTALL KNOWNBUGS LICENSE README README-SenderID RELEASE_NOTES sid-filter/SID_README %{_mandir}/man8/sid-filter.8* %config(noreplace) %{_sysconfdir}/sysconfig/sid-milter %{_initrddir}/sid-milter %{_sbindir}/sid-filter %dir %attr(-,sid-milt,root) %{_localstatedir}/run/sid-milter
%changelog
- Mon Feb 12 2007 Jacob Leaver jleaver@c-corp.net - 0.2.14-1
- Compile for CentOS
- Fri Jul 8 2006 Petr Vokac vokac@kmlinux.fjfi.cvut.cz - 0.2.13-1
- Initial package.
CentOS-fr mailing list CentOS-fr@centos.org http://lists.centos.org/mailman/listinfo/centos-fr
On Thu, 17 Dec 2009 18:07:47 +0100, fakessh fakessh@fakessh.eu wrote:
On Wed, 16 Dec 2009 23:40:56 +0100, fakessh fakessh@fakessh.eu wrote:
bonjour la liste
je viens de l installer sur mon rps de prod et le resultat est ok les auto respondeurs repondent sender id plus spf ok
comment faire pour le proposer sur epel ?
il existait une ancienne version de sid-milter pour centos
je viens de le modifier pour l adapter à la realese en cours 1.0.0
quand pensez vous ? je peux le proposer sur EPEL ? je ne connais pas la procedure à suivre ?
le fichier spec
j ai fait encore quelques modifications que voici le .spec du rpm
Summary: Sendmail milter for SenderID Name: sid-milter Version: 1.0.0 Release: 1%{?dist} License: GPL Group: System Environment/Daemons URL: http://sourceforge.net/projects/sid-milter/
Source0: http://prdownloads.sourceforge.net/sid-milter/%%7Bname%7D-%%7Bversion%7D.tar... BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: sendmail-devel Requires: sendmail
Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service
%description The sid-milter package is an open source implementation of the Sender-ID sender authentication system proposed by the IETF MARID working group. It consists of a library that implements the MARID authentication service, and a milter-based filter application that can plug in to the sendmail MTA to provide that service to sufficiently recent sendmail MTAs.
%prep %setup -q
%{__cat} <<'EOF' >sid-milter.sysconfig # Default values # #PORT="inet:10034@localhost" #USER="sid-milt" #REJECTION=0 #EXTRA_ARGS="-h -l"
# User configuration # #PORT0="inet:10034@localhost" #PORT1="inet:10035@localhost" #REJECTION1=1 #... EOF
%{__cat} <<'EOF' >sid-milter.sysv #!/bin/bash # # Init file for SenderID sendmail milter. # # chkconfig: - 79 21 # description: sid-filter is a daemon that hooks into sendmail and \ # sign/verify mail according SenderID standard # # processname: sid-filter #config: %{_sysconfdir}/sysconfig/sid-milter #pidfile: %{_localstatedir}/run/sid-milter.pid
source %{_initrddir}/functions source %{_sysconfdir}/sysconfig/network
# Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0
[ -x %{_sbindir}/sid-filter ] || exit 1
### Default variables PORT="inet:10034@localhost" USER="sid-milt" REJECTION=0 EXTRA_ARGS="-h -l" SYSCONFIG="%{_sysconfdir}/sysconfig/sid-milter"
### Read configuration [ -r "$SYSCONFIG" ] && source "$SYSCONFIG" NUM=0 CMD_ARGS=() while [ ! -z $(eval "echo $PORT${NUM}") ]; do LPORT=${PORT} LREJECTION=${REJECTION} LEXTRA_ARGS=${EXTRA_ARGS} [ ! -z $(eval "echo $PORT${NUM}") ] && LPORT=$(eval "echo $PORT${NUM}") [ ! -z $(eval "echo $REJECTION${NUM}") ] && LREJECTION=$(eval "echo $REJECTION${NUM}") [ ! -z $(eval "echo $EXTRA_ARGS${NUM}") ] && LEXTRA_ARGS=$(eval "echo $EXTRA_ARGS${NUM}") CMD_ARGS[${NUM}]="-u $USER -p $LPORT -r $LREJECTION $LEXTRA_ARGS" NUM=$((${NUM}+1)) done if [ ${#CMD_ARGS[*]} -eq 0 ]; then CMD_ARGS[0]="-u $USER -p $PORT -r $REJECTION $EXTRA_ARGS" fi
RETVAL=0 prog="sid-filter" desc="SenderID milter" pidfile=%{_localstatedir}/run/sid-milter.pid
start() { for ((i=0; $i<${#CMD_ARGS[*]}; i=$(($i+1)) )); do pidfile=%{_localstatedir}/run/${prog}${i}.pid echo -n $"Starting $desc ($prog #$i): " touch $pidfile chown $USER $pidfile daemon --user $USER %{_sbindir}/${prog} ${CMD_ARGS[$i]} -P $pidfile RETVAL=$? echo [ $RETVAL -eq 0 ] && touch %{_localstatedir}/lock/subsys/${prog}${i} done return $RETVAL }
stop() { echo -n $"Shutting down all $desc ($prog): " killproc $prog RETVAL=$? echo if [ $RETVAL -eq 0 ]; then for ((i=0; $i<${#CMD_ARGS[*]}; i=$(($i+1)) )); do pidfile=%{_localstatedir}/run/${prog}${i}.pid echo -n $"Cleanup for $desc ($prog #$i): " rm -f %{_localstatedir}/lock/subsys/${prog}${i} echo done fi return $RETVAL }
restart() { stop sleep 2 start }
case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; condrestart) [ -e %{_localstatedir}/lock/subsys/${prog} ] && restart RETVAL=$? ;; status) status $prog RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" RETVAL=1 esac
exit $RETVAL EOF
%build %{__make} %{?_smp_mflags}
%install %{__rm} -rf %{buildroot}
%{__install} -D -m0755 sid-milter.sysv %{buildroot}%{_initrddir}/sid-milter %{__install} -D -m0644 sid-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/sid-milter %{__install} -d -m0700 %{buildroot}%{_localstatedir}/run/sid-milter %{__install} -D -m0664 sid-filter/sid-filter.8 %{buildroot}%{_mandir}/man8/sid-filter.8 %{__install} -D -m0755 obj.`uname -s`.`uname -r`.`uname -p`/sid-filter/sid-filter %{buildroot}%{_sbindir}/sid-filter %{__strip} %{buildroot}%{_sbindir}/sid-filter %{__cp} sid-filter/README sid-filter/SID_README
%pre /usr/sbin/useradd -r -s /sbin/nologin -d %{_localstatedir}/run/sid-milter \ -c "SenderID Milter" sid-milt &>/dev/null || :
%post /sbin/chkconfig --add sid-milter || :
%preun if [ $1 -eq 0 ]; then /sbin/service sid-milter stop &>/dev/null || : /sbin/chkconfig --del sid-milter || : fi
%postun /sbin/service sid-milter condrestart &>/dev/null || :
%clean %{__rm} -rf %{buildroot}
%files %defattr(-, root, root, 0755) %doc INSTALL KNOWNBUGS LICENSE README README-SenderID RELEASE_NOTES sid-filter/SID_README %{_mandir}/man8/sid-filter.8* %config(noreplace) %{_sysconfdir}/sysconfig/sid-milter %{_initrddir}/sid-milter %{_sbindir}/sid-filter %dir %attr(-,sid-milt,root) %{_localstatedir}/run/sid-milter
%changelog * Mon Feb 12 2007 Jacob Leaver jleaver@c-corp.net - 0.2.14-1 - Compile for CentOS * Fri Jul 8 2006 Petr Vokac vokac@kmlinux.fjfi.cvut.cz - 0.2.13-1 - Initial package.
Bonjour a tous,
Moi aussi je suis entrain de faire un rpm et j'aurai quelques questions :
que veut dire || : après certaine ligne ? et ça : 1%{?dist} ?
Mon fichier psec ne contient qu'un script shell
j'ai rajouté ceci dedans :
### ajout %post ./pcisst/pcdsst.sh
c'est la bonne technique ?
merci d'avance
On Thu, 17 Dec 2009 18:44:41 +0100, fakessh fakessh@fakessh.eu wrote:
On Thu, 17 Dec 2009 18:07:47 +0100, fakessh fakessh@fakessh.eu wrote:
On Wed, 16 Dec 2009 23:40:56 +0100, fakessh fakessh@fakessh.eu wrote:
bonjour la liste
je viens de l installer sur mon rps de prod et le resultat est ok les auto respondeurs repondent sender id plus spf ok
comment faire pour le proposer sur epel ?
il existait une ancienne version de sid-milter pour centos
je viens de le modifier pour l adapter à la realese en cours 1.0.0
quand pensez vous ? je peux le proposer sur EPEL ? je ne connais pas la procedure à suivre ?
le fichier spec
j ai fait encore quelques modifications que voici le .spec du rpm
Summary: Sendmail milter for SenderID Name: sid-milter Version: 1.0.0 Release: 1%{?dist} License: GPL Group: System Environment/Daemons URL: http://sourceforge.net/projects/sid-milter/
Source0: http://prdownloads.sourceforge.net/sid-milter/%%7Bname%7D-%%7Bversion%7D.tar... BuildRoot: %{ tmppath}/%{name}-%{version}-%{release}-root-%(%{ id
u}
-n)
BuildRequires: sendmail-devel Requires: sendmail
Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service
%description The sid-milter package is an open source implementation of the Sender-ID sender authentication system proposed by the IETF MARID working group.
It
consists of a library that implements the MARID authentication service, and a milter-based filter application that can plug in to the sendmail MTA
to
provide that service to sufficiently recent sendmail MTAs.
%prep %setup -q
%{ cat} <<'EOF' >sid-milter.sysconfig # Default values # #PORT="inet:10034@localhost" #USER="sid-milt" #REJECTION=0 #EXTRA ARGS="-h -l"
# User configuration # #PORT0="inet:10034@localhost" #PORT1="inet:10035@localhost" #REJECTION1=1 #... EOF
%{ cat} <<'EOF' >sid-milter.sysv #!/bin/bash # # Init file for SenderID sendmail milter. # # chkconfig: - 79 21 # description: sid-filter is a daemon that hooks into sendmail and \ # sign/verify mail according SenderID standard # # processname: sid-filter #config: %{ sysconfdir}/sysconfig/sid-milter #pidfile: %{ localstatedir}/run/sid-milter.pid
source %{ initrddir}/functions source %{ sysconfdir}/sysconfig/network
# Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0
[ -x %{ sbindir}/sid-filter ] || exit 1
### Default variables PORT="inet:10034@localhost" USER="sid-milt" REJECTION=0 EXTRA ARGS="-h -l" SYSCONFIG="%{ sysconfdir}/sysconfig/sid-milter"
### Read configuration [ -r "$SYSCONFIG" ] && source "$SYSCONFIG" NUM=0 CMD ARGS=() while [ ! -z $(eval "echo $PORT${NUM}") ]; do LPORT=${PORT} LREJECTION=${REJECTION} LEXTRA ARGS=${EXTRA ARGS} [ ! -z $(eval "echo $PORT${NUM}") ] && LPORT=$(eval "echo $PORT${NUM}") [ ! -z $(eval "echo $REJECTION${NUM}") ] && LREJECTION=$(eval "echo $REJECTION${NUM}") [ ! -z $(eval "echo $EXTRA ARGS${NUM}") ] && LEXTRA ARGS=$(eval "echo $EXTRA ARGS${NUM}") CMD ARGS[${NUM}]="-u $USER -p $LPORT -r $LREJECTION $LEXTRA ARGS" NUM=$((${NUM}+1)) done if [ ${#CMD ARGS[*]} -eq 0 ]; then CMD ARGS[0]="-u $USER -p $PORT -r $REJECTION $EXTRA ARGS" fi
RETVAL=0 prog="sid-filter" desc="SenderID milter" pidfile=%{ localstatedir}/run/sid-milter.pid
start() { for ((i=0; $i<${#CMD ARGS[*]}; i=$(($i+1)) )); do pidfile=%{ localstatedir}/run/${prog}${i}.pid echo -n $"Starting $desc ($prog #$i): " touch $pidfile chown $USER $pidfile daemon --user $USER %{ sbindir}/${prog} ${CMD ARGS[$i]} -P $pidfile RETVAL=$? echo [ $RETVAL -eq 0 ] && touch %{ localstatedir}/lock/subsys/${prog}${i} done return $RETVAL }
stop() { echo -n $"Shutting down all $desc ($prog): " killproc $prog RETVAL=$? echo if [ $RETVAL -eq 0 ]; then for ((i=0; $i<${#CMD ARGS[*]}; i=$(($i+1)) )); do pidfile=%{ localstatedir}/run/${prog}${i}.pid echo -n $"Cleanup for $desc ($prog #$i): " rm -f %{ localstatedir}/lock/subsys/${prog}${i} echo done fi return $RETVAL }
restart() { stop sleep 2 start }
case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; condrestart) [ -e %{ localstatedir}/lock/subsys/${prog} ] && restart RETVAL=$? ;; status) status $prog RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" RETVAL=1 esac
exit $RETVAL EOF
%build %{ make} %{? smp mflags}
%install %{ rm} -rf %{buildroot}
%{ install} -D -m0755 sid-milter.sysv %{buildroot}%{ initrddir}/sid-milter %{ install} -D -m0644 sid-milter.sysconfig %{buildroot}%{ sysconfdir}/sysconfig/sid-milter %{ install} -d -m0700 %{buildroot}%{ localstatedir}/run/sid-milter %{ install} -D -m0664 sid-filter/sid-filter.8 %{buildroot}%{ mandir}/man8/sid-filter.8 %{ install} -D -m0755 obj.`uname -s`.`uname -r`.`uname -p`/sid-filter/sid-filter %{buildroot}%{ sbindir}/sid-filter %{ strip} %{buildroot}%{ sbindir}/sid-filter %{ cp} sid-filter/README sid-filter/SID README
%pre /usr/sbin/useradd -r -s /sbin/nologin -d %{
localstatedir}/run/sid-milter
\ -c "SenderID Milter" sid-milt &>/dev/null || :
%post /sbin/chkconfig --add sid-milter || :
%preun if [ $1 -eq 0 ]; then /sbin/service sid-milter stop &>/dev/null || : /sbin/chkconfig --del sid-milter || : fi
%postun /sbin/service sid-milter condrestart &>/dev/null || :
%clean %{ rm} -rf %{buildroot}
%files %defattr(-, root, root, 0755) %doc INSTALL KNOWNBUGS LICENSE README README-SenderID RELEASE NOTES sid-filter/SID README %{ mandir}/man8/sid-filter.8* %config(noreplace) %{ sysconfdir}/sysconfig/sid-milter %{ initrddir}/sid-milter %{ sbindir}/sid-filter %dir %attr(-,sid-milt,root) %{ localstatedir}/run/sid-milter
%changelog
- Mon Feb 12 2007 Jacob Leaver jleaver@c-corp.net - 0.2.14-1
- Compile for CentOS
- Fri Jul 8 2006 Petr Vokac vokac@kmlinux.fjfi.cvut.cz - 0.2.13-1
- Initial package.
CentOS-fr mailing list CentOS-fr@centos.org http://lists.centos.org/mailman/listinfo/centos-fr
On Fri, 18 Dec 2009 10:03:36 +0100, GanGan gangan@zalteam.com wrote:
Bonjour a tous,
Moi aussi je suis entrain de faire un rpm et j'aurai quelques questions
:
que veut dire || : après certaine ligne ? "je ne connais pas bien
/bin/bash
et ça : 1%{?dist} ? cela c est le numero de version
Mon fichier psec ne contient qu'un script shell
j'ai rajouté ceci dedans :
### ajout %post ./pcisst/pcdsst.sh je ne sais pas ce que c est : ce script .sh
c'est la bonne technique ?
merci d'avance
moi je me suis base sur le rpm source de http://www.c-corp.net/linux/centos/4/generic/SRPMS/ dans lequel j ai fais le minimum de modifications
le .spec cela ressemble à un script en bash en effet et je ne connais pas bien bash
en tout cas mon .spec compile bien et donne de bon resultat sur les auto repondeurs genre sa-test@sendmail.net
on voit bien dans le header du mail X-SenderID: Sendmail Sender-ID Filter v1.0.0 r13151.ovh.net <unknown-msgid> Authentication-Results: r13151.ovh.net; sender-id=pass header.from=fakessh@fakessh.eu; auth=pass (PLAIN); spf=pass smtp.mfrom=fakessh@fakessh.eu
tout semble normal
pour vos question sur les rpm le mieux c est de commencer avec un rpm source que l on connait bien et faire les modifications petits à petits
sur le wiki Fedora il y a de bonnes explications sur la construction de rpm : mock et rpmlint
bonjour la liste
je viens de l installer sur mon rps de prod et le resultat est ok les auto respondeurs repondent sender id plus spf ok
comment faire pour le proposer sur epel ?
il existait une ancienne version de sid-milter pour centos
je viens de le modifier pour l adapter à la realese en cours 1.0.0
quand pensez vous ? je peux le proposer sur EPEL ? je ne connais pas la procedure à suivre ?
le fichier spec
j ai fait encore quelques modifications que voici le .spec du rpm
Summary: Sendmail milter for SenderID Name: sid-milter Version: 1.0.0 Release: 1%{?dist} License: GPL Group: System Environment/Daemons URL: http://sourceforge.net/projects/sid-milter/
Source0: http://prdownloads.sourceforge.net/sid-milter/%%7Bname%7D-%%7Bversion%7D.tar... BuildRoot: %{ tmppath}/%{name}-%{version}-%{release}-root-%(%{ id
u}
-n)
BuildRequires: sendmail-devel Requires: sendmail
Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service
%description The sid-milter package is an open source implementation of the
Sender-ID
sender authentication system proposed by the IETF MARID working group.
It
consists of a library that implements the MARID authentication service, and a milter-based filter application that can plug in to the sendmail MTA
to
provide that service to sufficiently recent sendmail MTAs.
%prep %setup -q
%{ cat} <<'EOF' >sid-milter.sysconfig # Default values # #PORT="inet:10034@localhost" #USER="sid-milt" #REJECTION=0 #EXTRA ARGS="-h -l"
# User configuration # #PORT0="inet:10034@localhost" #PORT1="inet:10035@localhost" #REJECTION1=1 #... EOF
%{ cat} <<'EOF' >sid-milter.sysv #!/bin/bash # # Init file for SenderID sendmail milter. # # chkconfig: - 79 21 # description: sid-filter is a daemon that hooks into sendmail and \ # sign/verify mail according SenderID standard # # processname: sid-filter #config: %{ sysconfdir}/sysconfig/sid-milter #pidfile: %{ localstatedir}/run/sid-milter.pid
source %{ initrddir}/functions source %{ sysconfdir}/sysconfig/network
# Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0
[ -x %{ sbindir}/sid-filter ] || exit 1
### Default variables PORT="inet:10034@localhost" USER="sid-milt" REJECTION=0 EXTRA ARGS="-h -l" SYSCONFIG="%{ sysconfdir}/sysconfig/sid-milter"
### Read configuration [ -r "$SYSCONFIG" ] && source "$SYSCONFIG" NUM=0 CMD ARGS=() while [ ! -z $(eval "echo $PORT${NUM}") ]; do LPORT=${PORT} LREJECTION=${REJECTION} LEXTRA ARGS=${EXTRA ARGS} [ ! -z $(eval "echo $PORT${NUM}") ] && LPORT=$(eval "echo $PORT${NUM}") [ ! -z $(eval "echo $REJECTION${NUM}") ] && LREJECTION=$(eval "echo $REJECTION${NUM}") [ ! -z $(eval "echo $EXTRA ARGS${NUM}") ] && LEXTRA ARGS=$(eval
"echo
$EXTRA ARGS${NUM}") CMD ARGS[${NUM}]="-u $USER -p $LPORT -r $LREJECTION $LEXTRA ARGS" NUM=$((${NUM}+1)) done if [ ${#CMD ARGS[*]} -eq 0 ]; then CMD ARGS[0]="-u $USER -p $PORT -r $REJECTION $EXTRA ARGS" fi
RETVAL=0 prog="sid-filter" desc="SenderID milter" pidfile=%{ localstatedir}/run/sid-milter.pid
start() { for ((i=0; $i<${#CMD ARGS[*]}; i=$(($i+1)) )); do pidfile=%{ localstatedir}/run/${prog}${i}.pid echo -n $"Starting $desc ($prog #$i): " touch $pidfile chown $USER $pidfile daemon --user $USER %{ sbindir}/${prog} ${CMD ARGS[$i]} -P $pidfile RETVAL=$? echo [ $RETVAL -eq 0 ] && touch %{ localstatedir}/lock/subsys/${prog}${i} done return $RETVAL }
stop() { echo -n $"Shutting down all $desc ($prog): " killproc $prog RETVAL=$? echo if [ $RETVAL -eq 0 ]; then for ((i=0; $i<${#CMD ARGS[*]}; i=$(($i+1)) )); do pidfile=%{ localstatedir}/run/${prog}${i}.pid echo -n $"Cleanup for $desc ($prog #$i): " rm -f %{ localstatedir}/lock/subsys/${prog}${i} echo done fi return $RETVAL }
restart() { stop sleep 2 start }
case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; condrestart) [ -e %{ localstatedir}/lock/subsys/${prog} ] && restart RETVAL=$? ;; status) status $prog RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" RETVAL=1 esac
exit $RETVAL EOF
%build %{ make} %{? smp mflags}
%install %{ rm} -rf %{buildroot}
%{ install} -D -m0755 sid-milter.sysv %{buildroot}%{ initrddir}/sid-milter %{ install} -D -m0644 sid-milter.sysconfig %{buildroot}%{ sysconfdir}/sysconfig/sid-milter %{ install} -d -m0700 %{buildroot}%{ localstatedir}/run/sid-milter %{ install} -D -m0664 sid-filter/sid-filter.8 %{buildroot}%{ mandir}/man8/sid-filter.8 %{ install} -D -m0755 obj.`uname -s`.`uname -r`.`uname -p`/sid-filter/sid-filter %{buildroot}%{ sbindir}/sid-filter %{ strip} %{buildroot}%{ sbindir}/sid-filter %{ cp} sid-filter/README sid-filter/SID README
%pre /usr/sbin/useradd -r -s /sbin/nologin -d %{
localstatedir}/run/sid-milter
\ -c "SenderID Milter" sid-milt &>/dev/null || :
%post /sbin/chkconfig --add sid-milter || :
%preun if [ $1 -eq 0 ]; then /sbin/service sid-milter stop &>/dev/null || : /sbin/chkconfig --del sid-milter || : fi
%postun /sbin/service sid-milter condrestart &>/dev/null || :
%clean %{ rm} -rf %{buildroot}
%files %defattr(-, root, root, 0755) %doc INSTALL KNOWNBUGS LICENSE README README-SenderID RELEASE NOTES sid-filter/SID README %{ mandir}/man8/sid-filter.8* %config(noreplace) %{ sysconfdir}/sysconfig/sid-milter %{ initrddir}/sid-milter %{ sbindir}/sid-filter %dir %attr(-,sid-milt,root) %{ localstatedir}/run/sid-milter
%changelog
- Mon Feb 12 2007 Jacob Leaver jleaver@c-corp.net - 0.2.14-1
- Compile for CentOS
- Fri Jul 8 2006 Petr Vokac vokac@kmlinux.fjfi.cvut.cz - 0.2.13-1
- Initial package.
CentOS-fr mailing list CentOS-fr@centos.org http://lists.centos.org/mailman/listinfo/centos-fr