Move featureset patches and series file to debian/patches-<featureset>.
Fixes lintian warning patch-file-present-but-not-mentioned-in-series. Also preparation for using dgit, which will remove everything except the main patch series under debian/patches.
This commit is contained in:
parent
07b57afec5
commit
26224f8bb8
|
@ -1,6 +1,7 @@
|
||||||
!/patches
|
!/patches*
|
||||||
!*.patch
|
!*.patch
|
||||||
!*.diff
|
!*.diff
|
||||||
|
!series
|
||||||
*.debhelper*
|
*.debhelper*
|
||||||
*.local
|
*.local
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
|
@ -98,8 +98,8 @@ features/ and debian/. Patches are in the standard kernel patch
|
||||||
format (unified diff to be applied with patch -p1) and generally have
|
format (unified diff to be applied with patch -p1) and generally have
|
||||||
DEP-3 headers.
|
DEP-3 headers.
|
||||||
|
|
||||||
The series file 'series' is used for all configurations and a series
|
For each optional featureset there is an additional patch directory
|
||||||
file 'series-<featureset>' is used for each optional featureset.
|
debian/patches-<featureset>.
|
||||||
|
|
||||||
If you want to generate a source tree with all patches applied, run
|
If you want to generate a source tree with all patches applied, run
|
||||||
make -f debian/rules source
|
make -f debian/rules source
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
|
|
||||||
TMPDIR=$(mktemp -d)
|
TMPDIR=$(mktemp -d)
|
||||||
trap "rm -rf $TMPDIR" EXIT
|
trap "rm -rf $TMPDIR" EXIT
|
||||||
sed '/^#/d; /^[[:space:]]*$/d; /^X /d; s/^+ //; s,^,debian/patches/,' debian/patches/series* | sort -u > $TMPDIR/used
|
for patchdir in debian/patches*; do
|
||||||
find debian/patches ! -path '*/series*' -type f -name "*.diff" -o -name "*.patch" -printf "%p\n" | sort > $TMPDIR/avail
|
sed '/^#/d; /^[[:space:]]*$/d; /^X /d; s/^+ //; s,^,'"$patchdir"'/,' "$patchdir"/series
|
||||||
|
done | sort -u > $TMPDIR/used
|
||||||
|
find debian/patches* ! -path '*/series' -type f -name "*.diff" -o -name "*.patch" -printf "%p\n" | sort > $TMPDIR/avail
|
||||||
echo "Used patches"
|
echo "Used patches"
|
||||||
echo "=============="
|
echo "=============="
|
||||||
cat $TMPDIR/used
|
cat $TMPDIR/used
|
||||||
|
|
|
@ -3,9 +3,8 @@
|
||||||
import codecs, errno, io, os, os.path, re, shutil, subprocess, sys, tempfile
|
import codecs, errno, io, os, os.path, re, shutil, subprocess, sys, tempfile
|
||||||
|
|
||||||
def main(source, version=None):
|
def main(source, version=None):
|
||||||
patch_dir = 'debian/patches'
|
patch_dir = 'debian/patches-rt'
|
||||||
rt_patch_dir = 'features/all/rt'
|
series_name = 'series'
|
||||||
series_name = 'series-rt'
|
|
||||||
old_series = set()
|
old_series = set()
|
||||||
new_series = set()
|
new_series = set()
|
||||||
|
|
||||||
|
@ -19,10 +18,8 @@ def main(source, version=None):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
with open(os.path.join(patch_dir, series_name), 'w') as series_fh:
|
with open(os.path.join(patch_dir, series_name), 'w') as series_fh:
|
||||||
# Add directory prefix to all filenames.
|
|
||||||
# Add Origin to all patch headers.
|
# Add Origin to all patch headers.
|
||||||
def add_patch(name, source_patch, origin):
|
def add_patch(name, source_patch, origin):
|
||||||
name = os.path.join(rt_patch_dir, name)
|
|
||||||
path = os.path.join(patch_dir, name)
|
path = os.path.join(patch_dir, name)
|
||||||
try:
|
try:
|
||||||
os.unlink(path)
|
os.unlink(path)
|
||||||
|
@ -37,8 +34,6 @@ def main(source, version=None):
|
||||||
patch.write('\n')
|
patch.write('\n')
|
||||||
in_header = False
|
in_header = False
|
||||||
patch.write(line)
|
patch.write(line)
|
||||||
series_fh.write(name)
|
|
||||||
series_fh.write('\n')
|
|
||||||
new_series.add(name)
|
new_series.add(name)
|
||||||
|
|
||||||
if os.path.isdir(os.path.join(source, '.git')):
|
if os.path.isdir(os.path.join(source, '.git')):
|
||||||
|
@ -60,13 +55,12 @@ def main(source, version=None):
|
||||||
|
|
||||||
args = ['git', 'format-patch', 'v%s..v%s-rebase' % (up_ver, version)]
|
args = ['git', 'format-patch', 'v%s..v%s-rebase' % (up_ver, version)]
|
||||||
format_proc = subprocess.Popen(args,
|
format_proc = subprocess.Popen(args,
|
||||||
cwd=os.path.join(patch_dir, rt_patch_dir),
|
cwd=patch_dir,
|
||||||
env=env, stdout=subprocess.PIPE)
|
env=env, stdout=subprocess.PIPE)
|
||||||
with io.open(format_proc.stdout.fileno(), encoding='utf-8') as pipe:
|
with io.open(format_proc.stdout.fileno(), encoding='utf-8') as pipe:
|
||||||
for line in pipe:
|
for line in pipe:
|
||||||
name = line.strip('\n')
|
name = line.strip('\n')
|
||||||
with open(os.path.join(patch_dir, rt_patch_dir, name)) as \
|
with open(os.path.join(patch_dir, name)) as source_patch:
|
||||||
source_patch:
|
|
||||||
patch_from = source_patch.readline()
|
patch_from = source_patch.readline()
|
||||||
match = re.match(r'From ([0-9a-f]{40}) ', patch_from)
|
match = re.match(r'From ([0-9a-f]{40}) ', patch_from)
|
||||||
assert match
|
assert match
|
||||||
|
@ -115,8 +109,6 @@ def main(source, version=None):
|
||||||
if name != '' and name[0] != '#':
|
if name != '' and name[0] != '#':
|
||||||
with open(os.path.join(source_dir, name)) as source_patch:
|
with open(os.path.join(source_dir, name)) as source_patch:
|
||||||
add_patch(name, source_patch, origin)
|
add_patch(name, source_patch, origin)
|
||||||
else:
|
|
||||||
# Leave comments and empty lines unchanged
|
|
||||||
series_fh.write(line)
|
series_fh.write(line)
|
||||||
finally:
|
finally:
|
||||||
shutil.rmtree(temp_dir)
|
shutil.rmtree(temp_dir)
|
||||||
|
|
|
@ -64,25 +64,24 @@ if [ "${version%a~test}" = "$version" ]; then
|
||||||
dch -v "$version" --distribution UNRELEASED "Testing patches $*"
|
dch -v "$version" --distribution UNRELEASED "Testing patches $*"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make new directory for patches
|
|
||||||
mkdir -p debian/patches/test
|
|
||||||
|
|
||||||
# Ignore user's .quiltrc
|
# Ignore user's .quiltrc
|
||||||
alias quilt='quilt --quiltrc -'
|
alias quilt='quilt --quiltrc -'
|
||||||
|
|
||||||
# Try to clean up any previous test patches
|
# Try to clean up any previous test patches
|
||||||
if [ "$featureset" = none ]; then
|
if [ "$featureset" = none ]; then
|
||||||
|
patchdir=debian/patches
|
||||||
while patch="$(quilt next 2>/dev/null || quilt top 2>/dev/null)" && \
|
while patch="$(quilt next 2>/dev/null || quilt top 2>/dev/null)" && \
|
||||||
[ "${patch#test/}" != "$patch" ]; do
|
[ "${patch#test/}" != "$patch" ]; do
|
||||||
quilt delete -r "$patch"
|
quilt delete -r "$patch"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
sed -i '/^test\//d' debian/patches/series-${featureset}
|
patchdir=debian/patches-${featureset}
|
||||||
|
sed -i '/^test\//d' $patchdir/series
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare a new directory for the patches
|
# Prepare a new directory for the patches
|
||||||
rm -rf debian/patches/test/
|
rm -rf $patchdir/test/
|
||||||
mkdir debian/patches/test
|
mkdir $patchdir/test
|
||||||
|
|
||||||
# Regenerate control and included rules
|
# Regenerate control and included rules
|
||||||
rm debian/control debian/rules.gen
|
rm debian/control debian/rules.gen
|
||||||
|
|
|
@ -3,6 +3,7 @@ linux (4.18.6-2) UNRELEASED; urgency=medium
|
||||||
[ Ben Hutchings ]
|
[ Ben Hutchings ]
|
||||||
* [x86] wireless: Enable R8822BE as module (Closes: #908330)
|
* [x86] wireless: Enable R8822BE as module (Closes: #908330)
|
||||||
* Move all patch generation scripts to debian/bin
|
* Move all patch generation scripts to debian/bin
|
||||||
|
* [rt] genpatch-rt: Store patches and series file in debian/patches-rt
|
||||||
|
|
||||||
[ Salvatore Bonaccorso ]
|
[ Salvatore Bonaccorso ]
|
||||||
* mac80211: don't update the PM state of a peer upon a multicast frame
|
* mac80211: don't update the PM state of a peer upon a multicast frame
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue