Description of problem: The package has: postinstall scriptlet (using /bin/sh): if [ $1 -eq 1 ] ; then # Initial installation /bin/systemctl enable nfs-client.target >/dev/null 2>&1 || : /bin/systemctl start nfs-client.target >/dev/null 2>&1 || : fi See https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_scriptlets https://docs.fedoraproject.org/en-US/packaging-guidelines/DefaultServices/#_how_to_enable_a_service_by_default In particular, this causes problems when 'systemctl preset-all' is called. It should be possible to do this after installation, and it should be a noop if no additional presets have been installed. Please convert nfs-utils to use the standard scriptlets and add an appropriate entry in the global presets if appropriate. Version-Release number of selected component (if applicable): nfs-utils-2.5.4-2.rc3.fc35.x86_64
Oh, this also applies to nfs-convert.service: # Enable nfs-convert so if an old configuration # exists a conversion will occur /bin/systemctl enable nfs-convert >/dev/null 2>&1 || :
https://src.fedoraproject.org/rpms/nfs-utils/pull-request/12
(In reply to Zbigniew Jędrzejewski-Szmek from comment #2) > https://src.fedoraproject.org/rpms/nfs-utils/pull-request/12 Just curious... What problem is this fixing? Also how much testing was done with these changes and why is the "%post -n nfsv4-client-utils" section not needed? Why does the nfsv4-client-utils package, a client only package going a %systemd_post nfs-server.service?
> Just curious... What problem is this fixing? As described in the original report, this is against the packaging guidelines. Those guidelines were created to give uniformity and predictability. This package is one of two in the distro that explicitly ignore the preset mechanism. > why is the "%post -n nfsv4-client-utils" section not needed? The unit files are all in nfs-utils. So restarting the service when nfsv4-client-utils is installed is not necessary. Oh, I see that those files are listed in both packages! That is strange. Service units should be located in just one package, so that ownership is clear. And the scriptlets should be moved to that owning package then. > Also how much testing was done with these changes I only tested installation/uninstallation, and that the %posttrans scriplets remove things as expected.
(In reply to Zbigniew Jędrzejewski-Szmek from comment #4) > > Just curious... What problem is this fixing? > > As described in the original report, this is against the packaging > guidelines. > Those guidelines were created to give uniformity and predictability. This > package > is one of two in the distro that explicitly ignore the preset mechanism. Years back... I could not get those those macros to work. Services were not being enabled or started during installations or upgrades which is the reason I went back to them. Where do I look to find out what these macros actually do? Meaning where do I get the answer to what does systemd_post and systemd_preun actually do. I didn't see that in the docs you pointed me to. > > > why is the "%post -n nfsv4-client-utils" section not needed? > > The unit files are all in nfs-utils. So restarting the service when > nfsv4-client-utils > is installed is not necessary. > > Oh, I see that those files are listed in both packages! > That is strange. Service units should be located in just one package, so > that ownership > is clear. And the scriptlets should be moved to that owning package then. Maybe what is not clear it is one package or the other not both. nfsv4-client-utils is a light weight NFS client only package, hopefully more container friendly with less dependencies. nfs-utils is both client and server so they are not compatible. > > > Also how much testing was done with these changes > > I only tested installation/uninstallation, and that the %posttrans scriplets > remove things as expected. That is the point... I'm pretty sure these change will break the nfsv4-client-utils package. Would you mind if I take a look at this issue... using your changes as the template, come up with a solution suitable to both of us? Question: What is the idea behind using nfs-server.cleanup file?
This message is a reminder that Fedora Linux 36 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '36'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 36 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16. Fedora Linux 36 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.
This work is resumed in https://bugzilla.redhat.com/show_bug.cgi?id=2218006 *** This bug has been marked as a duplicate of bug 2218006 ***
Sorry for not responding earlier. I'll take a look at the newer bug.