forked from cockpit/cockpit
Accepting request 873183 from home:lnussel:branches:systemsmanagement:cockpit
- Rebuild from git leveraging local-npm-registry OBS-URL: https://build.opensuse.org/request/show/873183 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit?expand=0&rev=61
This commit is contained in:
40
cockpit.spec
40
cockpit.spec
@@ -69,6 +69,12 @@ Source0: https://github.com/cockpit-project/cockpit/releases/download/%{v
|
||||
Source1: cockpit.pam
|
||||
Source2: cockpit-rpmlintrc
|
||||
Source99: README.packaging
|
||||
Source: node_modules.spec.inc
|
||||
Source: package-lock.json
|
||||
Source: node_modules.spec.inc
|
||||
%include %{_sourcedir}/node_modules.spec.inc
|
||||
# need to pretend it's not from git for building
|
||||
Patch: cockpit-redhatfont.diff
|
||||
|
||||
# in RHEL the source package is duplicated: cockpit (building basic packages like cockpit-{bridge,system})
|
||||
# and cockpit-appstream (building optional packages like cockpit-{machines,pcp})
|
||||
@@ -132,6 +138,13 @@ BuildRequires: gdb
|
||||
# For documentation
|
||||
BuildRequires: xmlto
|
||||
|
||||
# for rebuilding nodejs bits
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: nodejs-devel-default
|
||||
BuildRequires: npm
|
||||
BuildRequires: local-npm-registry
|
||||
BuildRequires: sassc
|
||||
|
||||
# This is the "cockpit" metapackage. It should only
|
||||
# Require, Suggest or Recommend other cockpit-xxx subpackages
|
||||
|
||||
@@ -156,9 +169,16 @@ Recommends: subscription-manager-cockpit
|
||||
%setup -q -n cockpit-%{version}
|
||||
%autopatch -p1
|
||||
cp %SOURCE1 tools/cockpit.pam
|
||||
#
|
||||
local-npm-registry %{_sourcedir} install --also=dev
|
||||
find node_modules -name \*.node -print -delete
|
||||
|
||||
%build
|
||||
exec 2>&1
|
||||
PKG_NAME="Cockpit"
|
||||
echo %version > .tarball
|
||||
autoreconf -fvi -I tools
|
||||
#
|
||||
%configure \
|
||||
--disable-silent-rules \
|
||||
--with-cockpit-user=cockpit-ws \
|
||||
@@ -177,7 +197,6 @@ exec 2>&1
|
||||
make -j4 %{?extra_flags} all
|
||||
|
||||
%check
|
||||
exec 2>&1
|
||||
# HACK: Fedora koji builders are very slow, unreliable, and inaccessible for debugging; https://github.com/cockpit-project/cockpit/issues/13909
|
||||
%if 0%{?fedora} >= 0
|
||||
%ifarch s390x
|
||||
@@ -190,10 +209,11 @@ exec 2>&1
|
||||
%define testsuite_skip #
|
||||
%endif
|
||||
%endif
|
||||
%{?testsuite_skip} make -j4 check %{?testsuite_fail}
|
||||
%{?testsuite_skip} make -j4 check || { ls -l /dev/std* ; [ -e ./test-suite.log ] && cat ./test-suite.log ; false; } %{?testsuite_fail}
|
||||
|
||||
%install
|
||||
%make_install
|
||||
# In obs we get write error: stdout
|
||||
%make_install | tee make_install.log
|
||||
make install-tests DESTDIR=%{buildroot}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
|
||||
install -p -m 644 tools/cockpit.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/cockpit
|
||||
@@ -345,6 +365,9 @@ rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit-project.cockpit-selinux.metai
|
||||
rm -f %{buildroot}%{_datadir}/pixmaps/cockpit-sosreport.png
|
||||
%endif
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/cockpit/devel/lib
|
||||
cp -a pkg/lib/patternfly %{buildroot}%{_datadir}/cockpit/devel/lib
|
||||
|
||||
%if 0%{?build_basic}
|
||||
%find_lang cockpit
|
||||
%endif
|
||||
@@ -413,9 +436,7 @@ embed or extend Cockpit.
|
||||
Summary: Cockpit admin interface package for configuring and troubleshooting a system
|
||||
BuildArch: noarch
|
||||
Requires: cockpit-bridge >= %{version}-%{release}
|
||||
%if !0%{?suse_version}
|
||||
Requires: shadow-utils
|
||||
%endif
|
||||
Requires: grep
|
||||
Requires: /usr/bin/pwscore
|
||||
Requires: /usr/bin/date
|
||||
@@ -666,6 +687,15 @@ These files are not required for running Cockpit.
|
||||
%files -n cockpit-tests -f tests.list
|
||||
%{_prefix}/%{__lib}/cockpit-test-assets
|
||||
|
||||
%package devel
|
||||
Summary: Development files for for Cockpit
|
||||
|
||||
%description devel
|
||||
This package contains files used to develop cockpit modules
|
||||
|
||||
%files devel
|
||||
%{_datadir}/cockpit/devel
|
||||
|
||||
%package -n cockpit-machines
|
||||
BuildArch: noarch
|
||||
Summary: Cockpit user interface for virtual machines
|
||||
|
Reference in New Issue
Block a user