Skip to content

Commit 11f16c0

Browse files
Ramon Medeirosalinefm
Ramon Medeiros
authored andcommitted
Issue #962: Suggestion to check spec guidelines
Run rpmlint on check-local Signed-off-by: Ramon Medeiros <[email protected]>
1 parent 9873c49 commit 11f16c0

5 files changed

+45
-3
lines changed

Makefile.am

+4-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ check-local:
8282
&& echo "ERROR: Whitespaces found" || echo "Ok"; \
8383
echo "IBM copyright year verification ..." ; \
8484
/bin/bash ../../../../check-IBM-license-header.sh ; \
85-
fi
85+
fi;
86+
@if [ -f $(RPMLINT) ]; then \
87+
./check_spec_errors.sh; \
88+
fi;
8689

8790
# Link built mo files in the source tree to enable use of translations from
8891
# within the source tree

check_spec_errors.sh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
#
4+
# Project Kimchi
5+
#
6+
# Copyright IBM Corp, 2016
7+
#
8+
# Code derived from Wok Project
9+
#
10+
# This library is free software; you can redistribute it and/or
11+
# modify it under the terms of the GNU Lesser General Public
12+
# License as published by the Free Software Foundation; either
13+
# version 2.1 of the License, or (at your option) any later version.
14+
#
15+
# This library is distributed in the hope that it will be useful,
16+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18+
# Lesser General Public License for more details.
19+
#
20+
# You should have received a copy of the GNU Lesser General Public
21+
# License along with this library; if not, write to the Free Software
22+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23+
24+
echo "Checking spec guidelines"
25+
26+
# create links
27+
cp contrib/kimchi.spec.fedora contrib/kimchi_fedora.spec
28+
cp contrib/kimchi.spec.suse contrib/kimchi_suse.spec
29+
30+
# run checking
31+
rpmlint contrib/kimchi_fedora.spec
32+
rpmlint contrib/kimchi_suse.spec
33+
34+
# remove links
35+
rm contrib/kimchi_fedora.spec
36+
rm contrib/kimchi_suse.spec
37+
38+

configure.ac

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ AM_INIT_AUTOMAKE([-Wno-portability])
3636
AM_PATH_PYTHON([2.6])
3737
AC_PATH_PROG([PEP8], [pep8], [/usr/bin/pep8])
3838
AC_PATH_PROG([GIT], [git], [/usr/bin/git])
39+
AC_PATH_PROG([RPMLINT], [rpmlint], [/usr/bin/rpmlint])
3940
AC_PYTHON_MODULE([unittest])
4041
AC_SUBST([HAVE_PYMOD_UNITTEST])
4142
AC_SUBST([PYTHON_VERSION])

docs/fedora-deps.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Packages required for UI development
4747
Packages required for tests
4848
---------------------------
4949

50-
$ sudo yum install pyflakes python-pep8 python-requests python-mock
50+
$ sudo yum install pyflakes python-pep8 python-requests python-mock rpmlint
5151

5252
# For RHEL systems, install the additional packages:
5353
$ sudo yum install python-unittest2

docs/opensuse-deps.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ Packages required for UI development
4545
Packages required for tests
4646
---------------------------
4747

48-
$ sudo zypper install python-pyflakes python-pep8 python-requests python-mock
48+
$ sudo zypper install python-pyflakes python-pep8 python-requests python-mock rpmlint

0 commit comments

Comments
 (0)