I’m attempting to learn how to update
packages. Got a list of some contrib/unsupported packages that
are not up to date. One such package was chrony so I updated it
to V. 3.4 but it will not install. I wonder if I missed
something that needed changing in Github? Or did I do something
else wrong? Here’s cli output:
# dnf install chrony
Last metadata expiration check: 0:15:45 ago on Mon 18 Mar 2019
"fg: no job control" is almost always caused by a bad rpm macro -- an undefined macro (%xyz) being used in a %post/%postun/... script is expanded to a literal "%xyz" in the script, which in turn is interpreted as job control by bash.
The usual cause of this in packages that work when built locally is that a macro is defined by a different package (quite frequently spec-helper or rpm-helper) that isn't installed into the build environment by default (fix: add a BuildRequires: in the spec file).
In the particular case of chrony, we have this:
%pre
%_pre_useradd %{name} %{_localstatedir}/lib/%{name} /sbin/nologin
%post
%systemd_post chronyd.service
So in order to fix that package, add
BuildRequires: rpm-helper
BuildRequires: systemd-macros
But actually, there's another problem here (though not as clearly visible) -- systemd_post, systemd_preun and friends are obsolete and have been replaced with file triggers (they're now run automatically, no need to call them). So the proper fix is to add only
BuildRequires: rpm-helper
(%_pre_useradd is still needed)
and delete all calls to %systemd_post and friends.
Thanks Bero. I’ve got a ways to go before
I understand half of what you wrote but I did make suggested
changes to chrony and now V. 3.4-2 installs here on x86_64
system.