Blob Blame History Raw
Name:           cockpit
Version:        0.27
Release:        4%{?dist}
Summary:        A user interface for Linux servers

License:        LGPLv2+
URL:            http://cockpit-project.org/
Source0:        https://github.com/cockpit-project/cockpit/releases/download/%{version}/cockpit-%{version}.tar.bz2
Source1:        cockpit.pam
Patch0:         fedora-branding.patch
Patch1:         cockpit-bz1161759.patch

BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(gudev-1.0)
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(udisks2) >= 2.1.0
BuildRequires: pkgconfig(libgsystem)
BuildRequires: storaged
BuildRequires: pkgconfig(libsystemd-daemon)
BuildRequires: pkgconfig(polkit-agent-1) >= 0.105
BuildRequires: pkgconfig(accountsservice) >= 0.6.35
BuildRequires: pam-devel
BuildRequires: keyutils-libs-devel

BuildRequires: autoconf automake libtool
BuildRequires: intltool
BuildRequires: jsl 
BuildRequires: xmlto
BuildRequires: libssh >= 0.6.0
BuildRequires: libssh-devel
BuildRequires: openssl-devel
BuildRequires: zlib-devel
BuildRequires: krb5-devel
BuildRequires: perl-JavaScript-Minifier-XS
BuildRequires: perl-Locale-PO
BuildRequires: perl-JSON
BuildRequires: libgsystem-devel
BuildRequires: libxslt-devel
BuildRequires: docbook-style-xsl
BuildRequires: dbus-devel
BuildRequires: glib-networking
BuildRequires: git

Requires: dbus
Requires: glib-networking
Requires: realmd
Requires: udisks2 >= 2.1.0
Requires: mdadm
Requires: lvm2
Requires: storaged

Requires: cockpit-assets

Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: systemd


%description
Cockpit runs in a browser and can manage your network of GNU/Linux
machines.


%package assets
Summary: Web assets for Cockpit
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description assets
This package contains the web assets used by Cockpit.

%package doc
Summary: Cockpit deployment and developer guide

%description doc
The Cockpit Deployment and Developer Guide shows sysadmins how to
deploy Cockpit on their machines as well as helps developers who want to
embed or extend Cockpit.

%prep
%setup -q
git apply %{PATCH0}
rm -rf src/libgsystem/*.{c,doap}
%patch1 -p1

%build
%configure --disable-static --disable-silent-rules --with-cockpit-user=cockpit-ws
make %{?_smp_mflags}

%check
# The check doesnt run on koji as it requires network
#make check

%install
%make_install
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/cockpit
rm -f %{buildroot}/%{_libdir}/cockpit/*.so
rm -f %{buildroot}%{_sysconfdir}/dbus-1/system.d/com.redhat.Cockpit.DBusTests.Test.conf
rm -f %{buildroot}%{_unitdir}/cockpit-testing.service
rm -f %{buildroot}%{_unitdir}/cockpit-testing.socket
rm -f %{buildroot}%{_unitdir}/test-server.service
rm -f %{buildroot}%{_unitdir}/test-server.socket
rm -rf %{buildroot}%{_datadir}/cockpit-test-assets


%files
%doc AUTHORS COPYING README.md
%doc %{_mandir}/man5/cockpit.conf.5.gz
%doc %{_mandir}/man8/cockpit-ws.8.gz
%doc %{_mandir}/man8/cockpitd.8.gz
%config(noreplace) %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/pam.d/cockpit
%{_unitdir}/cockpit.service
%{_unitdir}/cockpit.socket
%{_prefix}/lib/firewalld/services/cockpit.xml
%{_datadir}/dbus-1/services/com.redhat.Cockpit.service
%{_datadir}/appdata
%{_datadir}/applications
%{_datadir}/pixmaps
%{_sbindir}/remotectl
%{_libexecdir}/cockpitd
%{_libexecdir}/cockpit-ws
%{_libexecdir}/cockpit-agent
# HACK: We need to do attr because stripping debuginfo removes setuid
# https://bugzilla.redhat.com/show_bug.cgi?id=117858
%attr(4755, -, -) %{_libexecdir}/cockpit-polkit
%attr(4750, root, cockpit-ws) %{_libexecdir}/cockpit-session
%{_libdir}/security/pam_reauthorize.so
%attr(775, -, wheel) %{_sharedstatedir}/%{name}

%files assets
%{_datadir}/%{name}

%files doc
%{_docdir}/cockpit

%pre
getent group cockpit-ws >/dev/null || groupadd -r cockpit-ws
getent passwd cockpit-ws >/dev/null || useradd -r -g cockpit-ws -d / -s /sbin/nologin -c "User for cockpit-ws" cockpit-ws

%post
%systemd_post cockpit.socket
# firewalld only partially picks up changes to its services files without this
test -f %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || true

%preun
%systemd_preun cockpit.socket

%postun
%systemd_postun_with_restart cockpit.socket


%changelog
* Wed Mar 25 2015 Sergio Pascual <sergiopr@fedoraproject.org> - 0.27-4
- Backport of upstream fix rhbz#1161759

* Fri Dec 05 2014 Stef Walter <stefw@redhat.com> - 0.27-3
- Update Fedora specific branding rhbz#1161775

* Fri Nov 21 2014 Stef Walter <stefw@redhat.com> - 0.27-2
- Add Fedora specific branding rhbz#1161775

* Fri Oct 10 2014 Stef Walter <stefw@redhat.com> - 0.27-1
- Update to 0.27 release
- Don't create cockpit-*-admin groups rhbz#1145135
- Fix user management for non-root users rhbz#1140562
- Fix 'out of memory' error during ssh auth rhbz#1142282

* Wed Oct 08 2014 Stef Walter <stefw@redhat.com> - 0.26-1
- Update to 0.26 release
- Can see disk usage on storage page rhbz#1142459
- Better order for lists of block devices rhbz#1142443
- Setting container memory limit fixed rhbz#1142362
- Can create storage volume of maximum capacity rhbz#1142259
- Fix RAID device Bitmap enable/disable error rhbz#1142248
- Docker page connects to right machine rhbz#1142229
- Clear the format dialog label correctly rhbz#1142228
- No 'Drop Privileges' item in menu for root rhbz#1142197
- Don't flash 'Server has closed Connection on logout rhbz#1142175
- Non-root users can manipulate user accounts rhbz#1142154
- Fix strange error message when editing user accounts rhbz#1142154

* Wed Sep 24 2014 Stef Walter <stefw@redhat.com> - 0.25-1
- Update to 0.25 release

* Wed Sep 17 2014 Stef Walter <stefw@redhat.com> - 0.24-1
- Update to 0.24 release

* Wed Sep 10 2014 Stef Walter <stefw@redhat.com> - 0.23-1
- Update to 0.23 release

* Wed Sep 03 2014 Stef Walter <stefw@redhat.com> - 0.22-1
- Update to 0.22 release

* Tue Aug 26 2014 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.21-1
- Update to 0.21 release

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Thu Aug 14 2014 Stef Walter <stefw@redhat.com> 0.20-1
- Update to 0.20 release

* Thu Aug 07 2014 Stef Walter <stefw@redhat.com> 0.19-1
- Update to 0.19 release

* Wed Jul 30 2014 Stef Walter <stefw@redhat.com> 0.18-1
- Update to 0.18 release
- Add glib-networking build requirement

* Thu Jul 24 2014 Stef Walter <stefw@redhat.com> 0.17-1
- Updato to 0.17 release

* Tue Jul 22 2014 Stef Walter <stefw@redhat.com> 0.16-2
- Refer to cockpit.socket in scriptlets rhbz#1110764

* Thu Jul 17 2014 Stef Walter <stefw@redhat.com> 0.16-1
- Update to 0.16 release

* Thu Jul 10 2014 Stef Walter <stefw@redhat.com> 0.15-1
- Update to 0.15 release
- Put pam_reauthorize.so in the cockpit PAM stack

* Thu Jul 03 2014 Stef Walter <stefw@redhat.com> 0.14-1
- Update to 0.14 release

* Mon Jun 30 2014 Stef Walter <stefw@redhat.com> 0.13-1
- Update to 0.13 release

* Tue Jun 24 2014 Stef Walter <stefw@redhat.com> 0.12-1
- Update to upstream 0.12 release

* Fri Jun 20 2014 Stef Walter <stefw@redhat.com> 0.11-1
- Update to upstream 0.11 release

* Thu Jun 12 2014 Stef Walter <stefw@redhat.com> 0.10-1
- Update to upstream 0.10 release

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 23 2014 Stef Walter <stefw@redhat.com> 0.9-1
- Update to upstream 0.9 release
- Fix file attribute for cockpit-polkit

* Wed May 21 2014 Stef Walter <stefw@redhat.com> 0.8-1
- Update to upstream 0.8 release
- cockpitd now runs as a user session DBus service

* Mon May 19 2014 Stef Walter <stefw@redhat.com> 0.7-1
- Update to upstream 0.7 release

* Wed May 14 2014 Stef Walter <stefw@redhat.com> 0.6-1
- Update to upstream 0.6 release

* Tue Apr 15 2014 Stef Walter <stefw@redhat.com> 0.5-1
- Update to upstream 0.5 release

* Thu Apr 03 2014 Stef Walter <stefw@redhat.com> 0.4-1
- Update to upstream 0.4 release
- Lots of packaging cleanup and polish

* Fri Mar 28 2014 Stef Walter <stefw@redhat.com> 0.3-1
- Update to upstream 0.3 release

* Wed Feb 05 2014 Patrick Uiterwijk (LOCAL) <puiterwijk@redhat.com> - 0.2-0.4.20140204git5e1faad
- Redid the release tag

* Tue Feb 04 2014 Patrick Uiterwijk (LOCAL) <puiterwijk@redhat.com> - 0.2-0.3.5e1faadgit
- Fixed license tag
- Updated to new FSF address upstream
- Removing libgsystem before build
- Now claiming specific manpages
- Made the config files noreplace
- Removed the test assets
- Put the web assets in a subpackage

* Tue Feb 04 2014 Patrick Uiterwijk (LOCAL) <puiterwijk@redhat.com> - 0.2-0.2.5e1faadgit
- Patch libgsystem out