- Filter false positives for /etc/profile.d/* file modes.

- Ship *.pyc and *.pyo as usual.
This commit is contained in:
Ville Skyttä 2006-09-16 13:56:59 +00:00
parent 34dd20cf6d
commit b831ed24dd
3 changed files with 35 additions and 19 deletions

View File

@ -0,0 +1,21 @@
--- compile.py~ 2006-04-10 17:32:27.000000000 +0300
+++ compile.py 2006-09-16 16:48:16.000000000 +0300
@@ -12,6 +12,7 @@
import sys
for f in sys.argv[2:]:
+ py_compile.compile(f, f + 'c', sys.argv[1] + f)
py_compile.compile(f, f + 'o', sys.argv[1] + f)
# compile.py ends here
--- Makefile~ 2006-06-29 00:19:16.000000000 +0300
+++ Makefile 2006-09-16 16:50:17.000000000 +0300
@@ -36,7 +36,7 @@
install:
-mkdir -p $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(ETCDIR)/$(PACKAGE) $(DESTDIR)$(ETCDIR)/bash_completion.d $(DESTDIR)$(MANDIR)/man1
- cp -p *.py *.pyo $(DESTDIR)$(LIBDIR)
+ cp -p *.py *.pyc *.pyo $(DESTDIR)$(LIBDIR)
rm -f $(DESTDIR)$(LIBDIR)/compile.py*
if [ -z "$(POLICY)" ]; then \
sed -e 's/@VERSION@/$(VERSION)/' < rpmlint.py > $(DESTDIR)$(LIBDIR)/rpmlint.py ; \

View File

@ -55,3 +55,6 @@ addFilter("outside-libdir-files")
addFilter("-debuginfo no-documentation")
addFilter("-debuginfo [^ ]+ /usr/lib/debug/")
addFilter("non-standard-dir-in-usr libexec")
# Filter false /etc/profile.d positives until fixed upstream (#35714)
addFilter("script-without-shellbang /etc/profile.d/")
addFilter("non-executable-script /etc/profile.d/")

View File

@ -1,6 +1,6 @@
Name: rpmlint
Version: 0.77
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Tool for checking common errors in RPM packages
Group: Development/Tools
@ -9,6 +9,7 @@ URL: http://rpmlint.zarb.org/
Source0: http://rpmlint.zarb.org/download/%{name}-%{version}.tar.bz2
Source1: %{name}.config
Patch0: %{name}-0.77-distregex.patch
Patch1: %{name}-0.77-compile.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -28,6 +29,7 @@ and source packages can be checked.
%prep
%setup -q
%patch0
%patch1
sed -i -e /MenuCheck/d Config.py
@ -37,45 +39,35 @@ make
%install
rm -rf $RPM_BUILD_ROOT
touch rpmlint.pyc rpmlint.pyo # just for the %%exclude to work everywhere
make install DESTDIR=$RPM_BUILD_ROOT ETCDIR=%{_sysconfdir} MANDIR=%{_mandir} \
LIBDIR=%{_datadir}/rpmlint BINDIR=%{_bindir}
echo "# Add local system wide rpmlint configuration here." \
> $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint/config
install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/rpmlint/config
# Take care of files that may be generated later.
cat /dev/null > %{name}-%{version}-files.list
for f in `find $RPM_BUILD_ROOT%{_datadir}/rpmlint -type f -name "*.py"` ; do
f=`echo "$f" | sed "s|^$RPM_BUILD_ROOT||"`
for t in c o ; do
pref=
if [ ! -e "$RPM_BUILD_ROOT$f$t" ] ; then
touch "$RPM_BUILD_ROOT$f$t"
pref='%ghost '
fi
echo "$pref$f$t" >> %{name}-%{version}-files.list
done
done
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}-%{version}-files.list
%files
%defattr(-,root,root,0755)
%doc AUTHORS COPYING ChangeLog README
%config(noreplace) %{_sysconfdir}/rpmlint/
%{_sysconfdir}/bash_completion.d/
%{_bindir}/rpmdiff
%{_bindir}/rpmlint
%dir %{_datadir}/rpmlint/
%{_datadir}/rpmlint/*.py
%{_datadir}/rpmlint/config
%{_datadir}/rpmlint/
%exclude %{_datadir}/rpmlint/rpmlint.py[co]
%{_mandir}/man1/rpmlint.1*
%changelog
* Sat Sep 16 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.77-2
- Filter false positives for /etc/profile.d/* file modes.
- Ship *.pyc and *.pyo as usual.
* Thu Jun 29 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.77-1
- 0.77, fixes #194466, #195962, #196008, #196985.
- Make "disttag" configurable using the DistRegex config file option.