Update to 0.29 release

This commit is contained in:
Stef Walter 2014-11-04 18:52:06 +01:00
parent 84fc961e33
commit 42d4295d24
3 changed files with 124 additions and 155 deletions

View File

@ -1,44 +1,75 @@
# This global is defined by test builders like make-rpms
# global gitcommit blah
# Our SELinux policy gets built in tests and f21 and lower
%if %{defined gitcommit}
%define extra_flags CFLAGS='-O2 -Wall -Werror'
%define selinux 1
%endif
%if 0%{fedora} <= 21
%define selinux 1
%endif
Name: cockpit
Version: 0.28
%if %{defined gitcommit}
Version: %{gitcommit}
%else
Version: 0.29
%endif
Release: 1%{?dist}
Summary: A user interface for Linux servers
License: LGPLv2+
URL: http://cockpit-project.org/
%if %{defined gitcommit}
Source0: cockpit-%{version}.tar.gz
%else
Source0: https://github.com/cockpit-project/cockpit/releases/download/%{version}/cockpit-%{version}.tar.bz2
%endif
Source1: cockpit.pam
Patch0: skip-validation.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: storaged >= 0.3.1
BuildRequires: autoconf automake libtool
BuildRequires: autoconf automake
BuildRequires: intltool
BuildRequires: jsl
BuildRequires: xmlto
BuildRequires: libssh >= 0.6.0
BuildRequires: libssh-devel
BuildRequires: libssh-devel >= 0.6.0
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: keyutils-libs-devel
BuildRequires: dbus-devel
BuildRequires: glib-networking
BuildRequires: systemd
BuildRequires: perl-JavaScript-Minifier-XS
BuildRequires: perl-Locale-PO
BuildRequires: perl-JSON
# jsl hangs on arm on html files
%ifnarch %{arm}
BuildRequires: jsl
%endif
# For selinux
BuildRequires: selinux-policy-devel
BuildRequires: checkpolicy
BuildRequires: /usr/share/selinux/devel/policyhelp
BuildRequires: sed
# For documentation
BuildRequires: /usr/bin/xmlto
Requires: dbus
Requires: glib-networking
@ -53,14 +84,11 @@ 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}
@ -79,28 +107,39 @@ embed or extend Cockpit.
%prep
%setup -q
%patch0 -p1
rm -rf src/libgsystem/*.{c,doap}
%if 0%{?fedora} == 20
sed -i s/unconfined_service_t/unconfined_t/g src/ws/test-server.service.in
%endif
%build
%if %{defined gitcommit}
ls
env NOCONFIGURE=1 ./autogen.sh
%endif
%configure --disable-static --disable-silent-rules --with-cockpit-user=cockpit-ws
make -j1
make -j1 %{?extra_flags} all
%if %{defined selinux}
make selinux
%endif
%check
# The check doesnt run on koji as it requires network
#make check
# make check
%install
%make_install
%if %{defined gitcommit}
make install-test-assets DESTDIR=%{buildroot}
mkdir -p %{buildroot}/%{_datadir}/polkit-1/rules.d
cp src/bridge/polkit-workarounds.rules %{buildroot}/%{_datadir}/polkit-1/rules.d
%endif
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
%if %{defined selinux}
install -d %{buildroot}%{_datadir}/selinux/targeted
install -p -m 644 cockpit.pp %{buildroot}%{_datadir}/selinux/targeted/
%endif
%files
%doc AUTHORS COPYING README.md
@ -149,6 +188,63 @@ test -f %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || true
%postun
%systemd_postun_with_restart cockpit.socket
# Conditionally built packages below
%if %{defined gitcommit}
%package test-assets
Summary: Additional stuff for testing Cockpit
Requires: openssh-clients
%description test-assets
This package contains programs and other files for testing Cockpit, and
pulls in some necessary packages via dependencies.
%files test-assets
%{_datadir}/cockpit-test-assets
%{_datadir}/polkit-1/rules.d
/usr/lib/systemd/system/cockpit-testing.service
/usr/lib/systemd/system/cockpit-testing.socket
/usr/lib/systemd/system/test-server.service
/usr/lib/systemd/system/test-server.socket
%endif
%if %{defined selinux}
%package selinux-policy
Summary: SELinux policy for Cockpit testing
Requires: %{name} = %{version}-%{release}
Requires: %{name}-test-assets = %{version}-%{release}
Requires: selinux-policy
Requires: selinux-policy-targeted
Requires(post): /usr/sbin/semodule, /sbin/restorecon, /sbin/fixfiles
Requires(postun): /usr/sbin/semodule, /sbin/restorecon, /sbin/fixfiles
BuildArch: noarch
%description selinux-policy
SELinux policy for Cockpit testing.
%files selinux-policy
%defattr(-,root,root,0755)
%{_datadir}/selinux/targeted/cockpit.pp
%post selinux-policy
/usr/sbin/semodule -s targeted -i %{_datadir}/selinux/targeted/cockpit.pp &> /dev/null || :
/sbin/fixfiles -R cockpit restore || :
/sbin/fixfiles -R cockpit-test-assets restore || :
/sbin/restorecon -R %{_sharedstatedir}/%{name} || :
%postun selinux-policy
if [ $1 -eq 0 ] ; then
/usr/sbin/semodule -s targeted -r cockpit &> /dev/null || :
/sbin/fixfiles -R cockpit-selinux-policy restore || :
[ -d %{_sharedstatedir}/%{name} ] && \
/sbin/restorecon -R %{_sharedstatedir}/%{name} &> /dev/null || :
fi
%endif
%changelog
* Thu Oct 16 2014 Stef Walter <stefw@redhat.com> - 0.28-1
- Update to 0.28 release

View File

@ -1,127 +0,0 @@
From c3c36a71b0b82429feac45ae791f12440fb8ccd0 Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@redhat.com>
Date: Thu, 16 Oct 2014 19:11:52 +0200
Subject: [PATCH] skip-validation
diff --git a/doc/guide/Makefile-guide.am b/doc/guide/Makefile-guide.am
index b6b0001..f7152c1 100644
--- a/doc/guide/Makefile-guide.am
+++ b/doc/guide/Makefile-guide.am
@@ -39,6 +39,6 @@ CLEANFILES += \
guide/index.html: $(GUIDE_DOCBOOK) $(GUIDE_INCLUDES) $(man_MANS) $(GUIDE_STATIC) $(GUIDE_XSLT)
$(AM_V_GEN) mkdir -p guide/ && rm -rf guide/* && cp $(srcdir)/doc/guide/static/* guide/ && \
- $(XMLTO) html -m $(srcdir)/doc/guide/gtk-doc.xsl -o guide/ \
+ $(XMLTO) html -m $(srcdir)/doc/guide/gtk-doc.xsl -o guide/ --skip-validation \
--searchpath $(abs_builddir):$(abs_srcdir):$(abs_builddir)/doc \
$(srcdir)/$(GUIDE_DOCBOOK)
diff --git a/tools/rcompile b/tools/rcompile
index 3bc0c5a..9652450 100755
--- a/tools/rcompile
+++ b/tools/rcompile
@@ -111,37 +111,6 @@ guess()
esac
}
-jslint()
-{
- # Resolving external dependencies for jsl is a royal pain. We change directory
- # and preprocess all the input files so that it can find scripts. We assume:
- # - relative -> pkg/
- # - /static -> lib/
- # - /cockpit -> pkg/
-
- conf=$(resolve $base)/jsl.conf
- pkg=$base/../pkg
-
- failed=no
- for f in "$@"; do
- sed -f $base/jsl.sed "$f" |
- (
- cd $pkg
- lines=$($jsl -conf $conf -nologo -nofilelisting -nosummary -stdin)
- ret=$?
- if ! empty "$lines"; then
- echo "$lines" | while read line; do
- echo "$f$line" >&2
- done
- fi
- exit $ret
- ) || failed=yes
- done
- if is_yes $failed; then
- exit 1
- fi
-}
-
minify_javascript()
{
perl -e \
@@ -167,6 +136,17 @@ output_javascript()
cat "$@"
}
+jslint()
+{
+ failed=no
+ for f in "$@"; do
+ jsl -conf $base/jsl.conf -nologo -nofilelisting -nosummary -process "$f" || failed=yes
+ done
+ if is_yes $failed; then
+ exit 1
+ fi
+}
+
process_javascript()
{
jslint "$@"
@@ -180,6 +160,37 @@ process_javascript()
fi
}
+html_jslint()
+{
+ # Resolving external dependencies for jsl is a royal pain. We change directory
+ # and preprocess all the input files so that it can find scripts. We assume:
+ # - relative -> pkg/
+ # - /static -> lib/
+ # - /cockpit -> pkg/
+
+ conf=$(resolve $base)/jsl.conf
+ pkg=$base/../pkg
+
+ failed=no
+ for f in "$@"; do
+ sed -f $base/jsl.sed "$f" |
+ (
+ cd $pkg
+ lines=$($jsl -conf $conf -nologo -nofilelisting -nosummary -stdin)
+ ret=$?
+ if ! empty "$lines"; then
+ echo "$lines" | while read line; do
+ echo "$f$line" >&2
+ done
+ fi
+ exit $ret
+ ) || failed=yes
+ done
+ if is_yes $failed; then
+ exit 1
+ fi
+}
+
process_html()
{
if [ $# -ne 1 ]; then
@@ -187,7 +198,7 @@ process_html()
fi
# TODO: Currently we don't validate HTML only javascript in html
- jslint "$1"
+ # html_jslint "$1"
# TODO: Currently we don't support HTML minify
if ! empty $output; then
--
2.1.0

View File

@ -1 +1 @@
34812c50ac1320addf85645328cd58c7 cockpit-0.28.tar.bz2
0908651f7e9d1bc55b175e7313938790 cockpit-0.29.tar.bz2