Blame cryptobone.spec

3697809
%global cryptobonedir %{_prefix}/lib/%{name}
5953970
%global _hardened_build 1
3697809
3697809
Name:       cryptobone
be6ce7a
Version:    1.0.2   
5953970
Release:    2%{?dist}
3697809
Summary:    Secure Communication Under Your Control      
3697809
3697809
Group:      Applications/Internet         
3697809
License:    BSD and MIT     
3697809
URL:        https://crypto-bone.com      
be6ce7a
Source0:    https://crypto-bone.com/release/source/cryptobone-1.0.2.tar.gz       
3697809
be6ce7a
be6ce7a
ExclusiveArch: x86_64 %{ix86} %{arm}
3697809
3697809
BuildRequires: libbsd-devel
3697809
BuildRequires: gcc
3697809
BuildRequires: desktop-file-utils
3697809
BuildRequires: systemd
3697809
3697809
3697809
Requires: systemd
3697809
Requires: bash    
3697809
Requires: ksh
3697809
Requires: python
3697809
Requires: tkinter
3697809
Requires: openssh-askpass
3697809
Requires: fetchmail
3697809
Requires: base64
3697809
Requires: MTA 
3697809
#Suggests: postfix
3697809
Requires: socat
3697809
Requires: cryptsetup
3697809
Requires: openssh
3697809
Requires: nmap
3697809
be6ce7a
# If a second Linux computer is used to store the encrypted message keys,
be6ce7a
# this system must use cryptobone-extern instead of cryptobone.
3697809
Conflicts: cryptobone-extern
3697809
3697809
3697809
%description
3697809
The Crypto Bone is a secure messaging system that makes sure a user's
3697809
email is always encrypted without burdening the user with the message
3697809
key management. Based on a GUI and a separate daemon, both ease-of-use
3697809
and security are assured by a novel approach to encryption key management.
3697809
3697809
While the message keys are secured by a daemon running on the Linux machine,
3697809
additional protection can be achieved by using an external device for storing
3697809
encryption keys. This external device can be another Linux computer dedicated
3697809
to this task or a Beagle Bone or a Raspberry Pi.  (https://crypto-bone.com)
3697809
be6ce7a
# The cryptobone package uses the cryptlib library as a private library.
be6ce7a
# As the cryptobone is based on only a very small part of cryptlib,
be6ce7a
# essentially the symmetric encryption enveloping only, and because the
be6ce7a
# reduction of complexity is one of cryptobone's main goals, the 
be6ce7a
# software links to a reduced, minimalistic version of cryptlib.
be6ce7a
# Because the fully-fledged cryptlib uses the the name libcl.so this
be6ce7a
# reduced cryptlib uses a different name (libclr.so) to avoid confusion.
be6ce7a
3697809
3697809
%prep
3697809
%setup 
3697809
3697809
3697809
%build
3697809
%configure
5953970
make %{?_smp_mflags} 
3697809
3697809
%install
3697809
%make_install
3697809
mkdir -p %{buildroot}%{_datadir}/icons/default
3697809
cp %{buildroot}%{cryptobonedir}/GUI/cryptobone.png %{buildroot}%{_datadir}/icons/default
3697809
desktop-file-install --dir %{buildroot}%{_datadir}/applications -m 644 %{buildroot}%{cryptobonedir}/GUI/cryptobone.desktop
3697809
3697809
3697809
%post
3697809
# this script is run after the packet's installation 
3697809
if [ $1 -eq 1 ] ; then
3697809
     # installation only, not running after update
be6ce7a
     if [ -x /usr/sbin/semodule ]; then
be6ce7a
          # only if SELinux is installed, prepare cryptobone.pp
be6ce7a
          /usr/sbin/semodule -i /usr/lib/cryptobone/selinux/cryptobone.pp
be6ce7a
          /usr/sbin/semodule -e cryptobone
be6ce7a
     fi
3697809
fi
3697809
/bin/touch --no-create %{_datadir}/icons/default &>/dev/null || :
3697809
3697809
3697809
%preun
3697809
# this script is run before the package is removed
3697809
if [ $1 -eq 0 ] ; then
3697809
     # removal only, not running before update
3697809
     systemctl stop cryptoboned
3697809
     systemctl disable cryptoboned
3697809
     systemctl disable cryptobone-fetchmail.timer
3697809
     umount %{cryptobonedir}/keys 2> /dev/null
3697809
     rm -f /etc/sudoers.d/cbcontrol
3697809
     if [ -f %{cryptobonedir}/bootswitch ] ; then
3697809
          chattr -i %{cryptobonedir}/bootswitch
3697809
     fi
3697809
     rm -rf /dev/shm/RAM
3697809
     # delete all config files in main cryptobone directory
3697809
     rm -rf %{cryptobonedir}/keys/* 2> /dev/null
3697809
     rm -rf %{cryptobonedir}/cryptobone/* 2> /dev/null
3697809
     rm -f %{cryptobonedir}/database* 2> /dev/null
3697809
     rm -f %{cryptobonedir}/cbb.config 2> /dev/null
3697809
     rm -f %{cryptobonedir}/bootswitch 2> /dev/null
3697809
     rm -f %{cryptobonedir}/keys.tgz 2> /dev/null
3697809
     rm -f %{cryptobonedir}/masterkey 2> /dev/null
3697809
     rm -f %{cryptobonedir}/pinghost 2> /dev/null
3697809
fi
3697809
3697809
%postun
3697809
# this script is run after the package is removed
3697809
if [ $1 -eq 0 ] ; then
3697809
     # just in case!
3697809
     rm -rf %{cryptobonedir} 2> /dev/null > /dev/null
3697809
     /bin/touch --no-create %{_datadir}/icons/default &>/dev/null
3697809
     /usr/bin/gtk-update-icon-cache %{_datadir}/icons/default &>/dev/null  || :
be6ce7a
     if [ -x /usr/sbin/semodule ]; then
be6ce7a
          semodule -d cryptobone
be6ce7a
     fi
3697809
fi
3697809
3697809
%posttrans
3697809
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/default &>/dev/null || :
3697809
3697809
3697809
%files
3697809
%{_unitdir}/cryptoboned.service
3697809
%{_unitdir}/cryptobone-fetchmail.service
3697809
%{_unitdir}/cryptobone-fetchmail.timer
3697809
%{_bindir}/cryptobone
3697809
3697809
# The directory %{cryptobonedir} contains security-critical files that need to be
3697809
# protected from being accessed by non-root users. In addition to restricting the
3697809
# main cryptobone directory to root-access, certain files will also have 0700 mode
3697809
# to ensure that they are protected even if (accidentally) the directory permission
3697809
# might be changed. In particular, this is crucial for the keys subdirectory.
3697809
%{cryptobonedir}
3697809
3697809
%{_datadir}/applications/cryptobone.desktop
3697809
%{_datadir}/icons/default/cryptobone.png
3697809
3697809
%{_mandir}/man8/cryptoboned.8.gz
3697809
%{_mandir}/man8/cryptobone.8.gz
3697809
%{_mandir}/man8/openpgp.8.gz
3697809
%{_mandir}/man8/cbcontrol.8.gz
3697809
3697809
%license   %{_datadir}/licenses/%{name}/COPYING
3697809
%license   %{_datadir}/licenses/%{name}/COPYING-cryptlib
3697809
%doc       %{_docdir}/%{name}/README
3697809
%doc       %{_docdir}/%{name}/README-cryptlib
be6ce7a
%doc       %{_docdir}/%{name}/src-1.0.2.tgz
3697809
3697809
%changelog
be6ce7a
5953970
* Sun Apr 24 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.2-2
5953970
- fixes bug #1329695 (cryptobone is not built with $RPM_OPT_FLAGS)
5953970
- updates cryptobone.png and SELinux policy
5953970
be6ce7a
* Sat Apr 16 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.2-1
be6ce7a
- upgrade to cryptlib-3.4.3 final
be6ce7a
- removing all brainpool crypto code from the cryptlib source code
be6ce7a
- renaming the private cryptlib library to libclr.so
be6ce7a
- adding basic SELinux support
92b392b
e2802af
* Fri Apr 8 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.1-10
e2802af
- correct GUI initialization bug
e2802af
3697809
* Sun Apr 3 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.1-9
3697809
- correct licenses directory in spec file, add help link in cryptobone GUI
3697809
3697809
* Tue Mar 29 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.1-8
3697809
- changed source of cryptoboned, relocated in /usr/lib/cryptobone/init.d
3697809
- moved COPYING to /usr/share/license/cryptobone
3697809
3697809
* Thu Mar 24 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.1-7
3697809
- updated spec file
3697809
3697809
* Fri Mar 18 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.1-6
3697809
- activation check in GUI
3697809
3697809
* Mon Mar 14 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.1-5
3697809
- replaced crontab entry by systemd timer file
3697809
- spec file changes: removed all service enable scripts
3697809
- spec file changes: made installation non-interactive
3697809
3697809
* Tue Mar  1 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.1-4
3697809
- updated spec file
3697809
3697809
* Mon Feb 22 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.1-3
3697809
- updated cron mechanism and systemd
3697809
3697809
* Sat Feb 20 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.1-2
3697809
- changed the installation process and updated spec file
3697809
3697809
* Fri Feb 19 2016 Senderek Web Security <innovation@senderek.ie> - 1.0.1-1
3697809
- RC for Fedora package review with updated makefiles
3697809
3697809
* Sat Feb 13 2016 Senderek Web Security <innovation@senderek.ie> - 1.0-2
3697809
- update of cl343_beta.zip source code by Peter Gutmann
3697809
- removing all previous patches
3697809
3697809
* Sun Jan 24 2016 Senderek Web Security <innovation@senderek.ie> - 1.0-1
3697809
- Initial release of the first version ready for general use.
3697809
3697809
* Sat Jan 16 2016 Senderek Web Security <innovation@senderek.ie> - 0.99-3
3697809
- Security Update: introduction of the cryptobone daemon in version 0.99
3697809
3697809
* Sun Jul 26 2015 Senderek Web Security <innovation@senderek.ie>
3697809
- Initial RPM build