Bug 1292221 - RPM needs a faxgetty's systemd service file
Summary: RPM needs a faxgetty's systemd service file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: hylafax+
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lee Howard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-16 18:52 UTC by giulioo
Modified: 2016-01-14 13:27 UTC (History)
1 user (show)

Fixed In Version: hylafax+-5.5.7-1.fc23 hylafax+-5.5.7-1.fc22 hylafax+-5.5.7-1.el7
Clone Of:
Environment:
Last Closed: 2016-01-07 19:56:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
faxgetty systemd service file copied from mgetty (420 bytes, text/plain)
2015-12-16 18:52 UTC, giulioo
no flags Details

Description giulioo 2015-12-16 18:52:30 UTC
Created attachment 1106507 [details]
faxgetty systemd service file copied from mgetty

Description of problem:
RPM lacks a systemd service file for faxgetty activation
 
Version-Release number of selected component (if applicable):
https://dl.fedoraproject.org/pub/epel/7/SRPMS/h/hylafax+-5.5.6-1.el7.src.rpm
 
How reproducible:
Always
 
Steps to Reproduce:
$ rpm -qpl hylafax+-5.5.6-1.el7.x86_64.rpm |grep service
 
Actual results:
/usr/lib/systemd/system/hylafax-faxq.service
/usr/lib/systemd/system/hylafax-hfaxd.service
 
Expected results:
/usr/lib/systemd/system/hylafax-faxq.service
/usr/lib/systemd/system/hylafax-hfaxd.service
/usr/lib/systemd/system/hylafax-faxgetty@.service or faxgetty@.service

Additional info:
I took RHEL7 mgetty systemd file and replaced mgetty->faxgetty and attached it
to this bug.
 
You decide whether it should be hylafax-faxgetty@.service or faxgetty@.service
 
RPM scripts and systemctl:
- The mgetty's rpm only does "systemctl daemon-reload", nothing more.
- For installation, there's nothing to be done, the user has to activate it
  manually depending on the device in use, ie:
  systemctl enable faxgetty@ttyS0
- However, when uninstalling/upgrading something could be done.
  The following examples are using faxgetty@.service (not hylafax-faxgetty)
  and need testing:
 
# for preun
for device_file in /var/spool/hylafax/FIFO.tty*
do
    if [ -p $device_file ]; then
        device=${device_file#*FIFO.}
        /bin/systemctl --no-reload disable faxgetty@${device}.service > /dev/null 2>&1 || :
        /bin/systemctl stop faxgetty@${device}.service > /dev/null 2>&1 || :
    fi
done
 
# for postun
for device_file in /var/spool/hylafax/FIFO.tty*
do
    if [ -p $device_file ]; then
        device=${device_file#*FIFO.}
        /bin/systemctl try-restart faxgetty@${device}.service >/dev/null 2>&1 || :
    fi
done

More tests could be done to check whether each FIFO.tty* file actually has a corresponding systemd service enabled (ie: if user really has enabled faxgetty for that device), but maybe it's overkill, at least for now.

Comment 1 Lee Howard 2015-12-28 05:19:59 UTC
I've committed the service file as recommended, installed as hylafax-faxgetty@.service.  I did not do anything for preun or postun in the spec file as I am not presently in a position to do much testing of such changes.

Comment 2 Fedora Update System 2015-12-28 19:29:36 UTC
hylafax+-5.5.7-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-46ed86440f

Comment 3 Fedora Update System 2015-12-28 19:30:27 UTC
hylafax+-5.5.7-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-9ae379af47

Comment 4 Fedora Update System 2015-12-28 19:31:03 UTC
hylafax+-5.5.7-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-431d6df24e

Comment 5 Fedora Update System 2015-12-30 18:51:41 UTC
hylafax+-5.5.7-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-431d6df24e

Comment 6 Fedora Update System 2015-12-30 19:22:48 UTC
hylafax+-5.5.7-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-9ae379af47

Comment 7 Fedora Update System 2015-12-31 03:21:48 UTC
hylafax+-5.5.7-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-46ed86440f

Comment 8 Fedora Update System 2016-01-07 19:55:59 UTC
hylafax+-5.5.7-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-01-08 03:21:09 UTC
hylafax+-5.5.7-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2016-01-14 13:27:40 UTC
hylafax+-5.5.7-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.