Commit b79b1818 authored by Christof Schulze's avatar Christof Schulze 😎
Browse files

fixed 0%{?rhel} so spec-file check can be done for all packages also on Fedora,

fixed some warings from rpmling,
added CI tests
parent cfd0da16
Loading
Loading
Loading
Loading

.gitlab-ci.yml

0 → 100644
+15 −0
Original line number Diff line number Diff line
image: centos:8


before_script:
  - dnf -y install rpmlint rpm-build


stages:
  - Static Analysis

rpmlint:
  stage: Static Analysis
  script:
    - rpmlint --version
    - rpmlint -i *.spec
+18 −8
Original line number Diff line number Diff line
@@ -8,18 +8,24 @@
#

Name:           ww8-release
%if 0%{?rhel}
%if %{rhel} == 8
Version:        8.0
Version:        8.1
Release:        3%{?dist}
%endif
%if %{rhel} == 7
Version:        7.6
%if 0%{rhel} == 7
Version:        7.7
Release:        4%{?dist}
%endif
%if %{rhel} == 6
%if 0%{rhel} == 6
Version:        6.9
Release:        4%{?dist}
%endif
%endif
%if 0%{?fedora}
Version:        %{fedora}
Release:        1%{?dist}
%endif

Summary:        Configuration for ww8 repository

@@ -33,12 +39,17 @@ Source0: ww8-el.repo
BuildRoot:      %{_tmppath}/%{name}-%{version}
BuildArchitectures: noarch

%if 0%{?rhel}
Requires:       yum
# Sadly system-release and redhat-release are not versionned
Requires:       redhat-release
Requires:       epel-release   = %{rhel}
# Ensure not installable on Fedora
Conflicts:      fedora-release
%endif
%if 0%{?fedora}
Requires:       dnf
%endif

%description
This package contains dnf configuration for the "ww8" RPM Repository,
@@ -56,9 +67,8 @@ echo empty build
%install
rm -rf $RPM_BUILD_ROOT
%{__install} -Dp -m0644 %{SOURCE0} %{buildroot}%{_sysconfdir}/yum.repos.d/ww8-el.repo
#%{__install} -Dp -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ww8
# will be removed on update ww8-el7.repo
rm -f %{_sysconfdir}/yum.repos.d/rpm-ww8.repo
#%%{__install} -Dp -m0644 %%{SOURCE1} %%{buildroot}%%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ww8


%clean
rm -rf $RPM_BUILD_ROOT
@@ -66,7 +76,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%config %{_sysconfdir}/yum.repos.d/ww8-el.repo
#%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ww8
#%%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ww8

%changelog
* Fri Dec 13 2019 Christof Schulze <christof.schulze@fau.de> - 8.0-3