Subject: Bug#698: RPM spec file with non-existant macro on CentOS 7

From: Jasmin Lévesque <[email-masked]>
Date: Wed, 10 Dec 2014 19:23:14 -0500

Package: x2goserver
Version: 4.1.0.0-0.0x2go1.0.git20141208.1203.heuler.el7.centos.x86_64

When installing the nightly build or a rebuilt package, I encounter the
following error:

/var/tmp/rpm-tmp.e1X31q: line 1: fg: no job control
error:
%pre(x2goserver-4.1.0.0-0.0x2go1.0.git20141208.1203.heuler.el7.centos.x86_64)
scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package
x2goserver-4.1.0.0-0.0x2go1.0.git20141208.1203.heuler.el7.centos.x86_64

The package fails to installs.

When digging for the PREIN scriplet, I find the only %pre in the x2goserver
is this line:
485: %systemd_pre x2goserver.service

These are the built-in macros related to systemd on a fresh CentOS 7
install:

[root@centos7 SPECS]# rpmbuild --showrc | grep systemd_
-14: systemd_post
-14: systemd_postun
-14: systemd_postun_with_restart
-14: systemd_preun
-14: systemd_requires

It seems the %systemd_pre macro is not available.

When commenting the line out, the package builds and installs successfully.

Thanks,

Jasmin Levesque
Senior system analyst
Vlan! Technologie

---

From: Mike Gabriel <[email-masked]>
Date: Thu, 11 Dec 2014 09:57:12 +0000

Control: tag -1 rpm-packages

Hi Jasmin, hi Orion (our Fedora+X2Go guru),

> When commenting the line out, the package builds and installs successfully.

I think I took that from the original Fedora packages provided by  
Orion. Is the systemd_pre macro available on Fedora, but on in EPEL-7?

Or is that macro actually non-existent on all Fedora and derivative versions?

Thanks for feedback!
Mike

-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email-masked], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb

---

From: Orion Poplawski <[email-masked]>
Date: Thu, 11 Dec 2014 07:03:20 -0700

On 12/11/2014 02:57 AM, Mike Gabriel wrote:
> I think I took that from the original Fedora packages provided by Orion.
> Is the systemd_pre macro available on Fedora, but on in EPEL-7?
>

Someone went a bit overboard - there never has been a systemd_pre macro.

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  [email-masked]
Boulder, CO 80301              http://www.cora.nwra.com