[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] Re: Builds of leafnode2 for OpenSUSE on OBS



On 2018-03-26 07:30, MatÄj Cepl wrote:
> I had to have screw up something with the RPM scripts. On my 
> RHEL I get this:
> 
>     mitmanek:~# rpm -q --scripts leafnode
>     preinstall program: /bin/sh
>     postinstall scriptlet (using /bin/sh):
> 
>     if [ $1 -eq 1 ] ; then 
>             # Initial installation 
>             systemctl preset leafnode@.service >/dev/null 2>&1 || : 
>     fi 
> 
>     if [ $1 -eq 1 ] ; then
>         chown -R news:news /var/spool/news
>         chmod -R 775 /var/spool/news
>     fi

In my case, /var/spool/news is a symlink.

>     preuninstall scriptlet (using /bin/sh):
> 
>     if [ $1 -eq 0 ] ; then 
>             # Package removal, not upgrade 
>             systemctl --no-reload disable leafnode@.service > /dev/null 2>&1 || : 
>             systemctl stop leafnode@.service > /dev/null 2>&1 || : 
>     fi
>     postuninstall scriptlet (using /bin/sh):
> 
>     systemctl daemon-reload >/dev/null 2>&1 || : 
>     if [ $1 -ge 1 ] ; then 
>             # Package upgrade, not uninstall 
>             systemctl try-restart leafnode@.service >/dev/null 2>&1 || : 
>     fi
>     mitmanek:~#

File "/usr/lib/systemd/system/leafnode@.service" exists. However,
systemctl doesn't list it:

minas-tirith:~ # systemctl status leafnode@.service
Failed to get properties: Unit name leafnode@.service is not valid.
minas-tirith:~ #

> 
> I have to tried to setup appropriate macros in the SPEC file, 
> but apparently I screwed up. Sometimes, too many macros are just 
> too many and explicit is better than implicit (see, what's my 
> main programming language? ;)). Which of the SUSE macros would 
> do the functional equivalent of above?

I don't know.

This is a question for the opensuse-packaging@xxxxxxxxxxxx  or
opensuse-buildservice@xxx mail lists, it exceeds my knowledge.


>> Is then xinet.d needed?
> 
> Absolutely not! xinetd is dead, hard as stone (namely, the 
> headstone).

Ah, ok. Then you have to add "something" to convert the
/etc/xinet.d/leafnode file to ".rpmold" to deactivate it automatically.

-- 
Cheers / Saludos,

		Carlos E. R.
		(from 42.3 x86_64 "Malachite" at Telcontar)

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxx
https://krusty.dt.e-technik.tu-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/