[Bug 1310092] Review Request: cryptobone - Secure Communication Under Your Control

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

 



https://bugzilla.redhat.com/show_bug.cgi?id=1310092



--- Comment #14 from Richard Shaw <hobbes1069@xxxxxxxxx> ---
I'm assuming the sudogetuser in %post creates an interactive prompt?

Unfortunately the guidelines strictly forbid interactive installs, it's one of
the biggest differences between Fedora/Redhat and Debian philosophies. 

I haven't checked yet but there should be instructions on any setup required
before running the daemon. 

Also, this is probably not compliant:


     if ! systemctl is-active sshd > /dev/null ; then
          systemctl enable sshd 
     fi

However, as long as the dependencies are setup correctly in the service file
for cryptobone, it will start sshd unless the user has masked it. Disabling a
service only stops it from being started by default, if something requires it,
it will be started unless masked.

Some other script feedback:

Daemons are not allowed to be enabled on install unless they have been approved
to do so. You should be using the systemd macros which take care of this for
you:

$ rpm -E %systemd_post

if [ $1 -eq 1 ] ; then 
        # Initial installation 
        systemctl preset  >/dev/null 2>&1 || : 
fi 

$ rpm -E %systemd_preun

if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        systemctl --no-reload disable  > /dev/null 2>&1 || : 
        systemctl stop  > /dev/null 2>&1 || : 
fi 

$ rpm -E %systemd_postun

systemctl daemon-reload >/dev/null 2>&1 || : 


Other odds-and-ends:

# You want to use mkdir -p and always use the directory macros
mkdir $RPM_BUILD_ROOT/usr/share/icons
mkdir $RPM_BUILD_ROOT/usr/share/icons/default

# I prefer %{buildroot} but either is acceptable:
mkdir -p %{buildroot}%{_datadir}/default

# Is a jpg the only one available? PNG/SVGs are preferred, usually XPM is the
backup.
cp $RPM_BUILD_ROOT%{cryptobonedir}/GUI/cryptobone.jpg
$RPM_BUILD_ROOT/usr/share/icons/default

# Is there a reason the desktop file needs to be executable? 
desktop-file-install --dir $RPM_BUILD_ROOT/usr/share/applications -m 755
$RPM_BUILD_ROOT%{cryptobonedir}/GUI/cryptobone.desktop

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review




[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]