Mailinglist Archive: opensuse-packaging (205 mails)

< Previous Next >
Re: [opensuse-packaging] Specfile Guidelines sweep over Factory
On Tuesday 2011-09-20 13:37, Stephan Kulow wrote:

Am Dienstag, 20. September 2011 schrieb Jan Engelhardt:
On Monday 2011-09-19 21:02, Stephan Kulow wrote:
Am Montag, 19. September 2011, 02:44:36 schrieb Jan Engelhardt:
vuntz mentioned it might be good to inform people, though I doubt anyone
is going to read this..

As you may have noticed I am going through all factory packages to
implement a few of the specfile guidelines[1] in semi-automated fashion,

among them the following subtasks:
It's fine that you do that, but stop the request spam now. You know, we're
trying to do a 12.1 release and all I'm doing all day long (and with me
tons of others) is trying to get your spam out of the way.

So submit it, but not more than 100 a week please.

With 100/w, it would take next to a year to go through all factory
packages. I think we need better tools... off I go.

Well, the simple things should be integrated into the format_spec thingy -
either based on the current perl script or a stripped down spec-cleaner.

That should work..

## /usr/lib/osc/source_validators/10-the-way-of-the-dodo
#!/bin/bash

DIR_TO_CHECK="$1"
if [[ -z "$DIR_TO_CHECK" ]]; then
DIR_TO_CHECK="$PWD";
fi;
for i in "$DIR_TO_CHECK"/*.spec; do
if [[ ! -f "$i" ]]; then
continue;
fi;
if pcregrep -iq '^autoreqprov\s*:\s*(?!off)(?!no)' "$i"; then
echo "*** $i: Undesired AutoReqProv tag";
fail=1;
fi;
if pcregrep -iq '^#\*snorootforbuild' "$i"; then
echo "*** $i: Undesired norootforbuild tag";
fail=1;
fi;
if pcregrep -iq '^#\*suseforbuild' "$i"; then
echo "*** $i: Undesired useforbuild tag";
fail=1;
fi;
if pcregrep -iq '^Author(\(?s\))?:?' "$i"; then
echo "*** $i: Author list no longer desired";
# don't fail, could be false positive
fi;
if pcregrep -q '^%clean\b' "$i"; then
echo "*** $i: %clean section no longer required";
fail=1;
fi;
if pcregrep -q '%{\?jobs:\s*-j\s*%{?jobs}?}' "$i"; then
echo "*** $i: Consider replacing %{?jobs:-j%jobs} by
%{?_smp_mflags} if possible.";
# Don't fail; things like scons can also be told the number of
# jobs, but naturally, scons does not know make's other options.
fi;
done;
if [[ "$fail" -ne "" ]]; then
echo "*** Please see
http://en.opensuse.org/openSUSE:Specfile_guidelines for details.";
exit 1;
fi;
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups