tags2 = {}
for tag in tags:
tag = tag.strip()
- if tag == "tip":
+ if tag == "tip" or tag == "master":
continue
try:
t = tag.split('.')
files.append('configure.in')
elif repo in ['alsa-lib', 'alsa-plugins', 'alsa-utils',
'alsa-firmware', 'alsa-oss']:
- lines = open(config.ROOT + '/' + repo + '/configure.in').readlines()
+ lines = open(config.ROOT + '/' + repo + '/configure.ac').readlines()
for idx in range(0, len(lines)):
- if lines[idx].startswith('AM_INIT_AUTOMAKE(%s, ' % repo):
- lines[idx] = 'AM_INIT_AUTOMAKE(%s, %s)\n' % (repo, version)
+ if lines[idx].startswith('AC_INIT(%s, ' % repo):
+ lines[idx] = 'AC_INIT(%s, %s)\n' % (repo, version)
print(lines[idx][:-1])
break
- open(config.ROOT + '/' + repo + '/configure.in', "w+").write(''.join(lines))
- files.append('configure.in')
+ open(config.ROOT + '/' + repo + '/configure.ac', "w+").write(''.join(lines))
+ files.append('configure.ac')
+ elif repo in ['tinycompress']:
+ lines = open(config.ROOT + '/' + repo + '/configure.ac').readlines()
+ for idx in range(0, len(lines)):
+ if lines[idx].startswith('AC_INIT([%s], ' % repo):
+ lines[idx] = 'AC_INIT([%s], [%s])\n' % (repo, version)
+ print(lines[idx][:-1])
+ break
+ open(config.ROOT + '/' + repo + '/configure.ac', "w+").write(''.join(lines))
+ files.append('configure.ac')
elif repo == 'alsa-tools':
lines = open(config.ROOT + '/' + repo + '/Makefile').readlines()
for idx in range(0, len(lines)):
open(config.ROOT + '/' + repo + '/PKG-INFO', "w+").write(''.join(lines))
files.append('PKG-INFO')
os.chdir(config.ROOT + '/' + repo)
- for file in files:
- if os.system("git add %s" % file):
- raise ValueError, "git add %s" % file
- if os.system('git commit -m "Release %s\n\nSigned-off-by: Jaroslav Kysela <perex@perex.cz>\n"' % tag):
- raise ValueError, "git commit"
+ if not repo in ['alsa-ucm-conf', 'alsa-topology-conf']:
+ for file in files:
+ if os.system("git add %s" % file):
+ raise ValueError, "git add %s" % file
+ if os.system('git commit -m "Release %s\n\nSigned-off-by: Jaroslav Kysela <perex@perex.cz>\n"' % tag):
+ raise ValueError, "git commit"
if not repo in ['alsa-driver']:
if os.system('git tag %s -a -m "Release %s\n\nSigned-off-by: Jaroslav Kysela <perex@perex.cz>\n"' % (tag, tag)):
raise ValueError, "git tag"
def mediawiki_header(fp, title):
fp.write("""\
-<mediawiki xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.3/ http://www.mediawiki.org/xml/export-0.3.xsd" version="0.3" xml:lang="en">
+<mediawiki version="0.3" xml:lang="en">
<page>
<title>%s</title>
<revision>
continue
tags1 = []
base = rev2 == 'HEAD' and 'v999.999.999' or rev2
- if not check_tag(tags, xrev):
+ while not check_tag(tags, xrev):
if rev2[0] != 'v':
base = 'v9.9.9'
elif rev2[-3:-1] == "rc":
def getgitfile(url, file, size=1024):
from urllib import splithost
- from httplib import HTTP
- if not url.startswith('http:'):
+ from httplib import HTTPS
+ if not url.startswith('https:'):
raise ValueError, "URL %s" % url
- host, selector = splithost(url[5:])
- h = HTTP(host)
+ host, selector = splithost(url[6:])
+ h = HTTPS(host)
h.putrequest('GET', url + '/' + file)
h.endheaders()
h.getreply()
return res
def getorigin(repo = 'alsa-kernel'):
- origin = getgitfile('http://git.alsa-project.org/http/%s.git' % repo, 'info/refs', size=8192)
+ origin = getgitfile('https://git.alsa-project.org/http/%s.git' % repo, 'info/refs', size=8192)
for line in origin.splitlines():
a = line.strip().split('\t')
if a[1] == 'refs/heads/master':
def one(argv=''):
- def filecheck1(file):
+ def filecheck(file):
return True
- def filecheck2(file):
- return True
-
- def fileconv1(file, prefix=''):
+ def fileconv(file, prefix=''):
if file == '/dev/null':
return file
if prefix and file.startswith(prefix):
file = file[len(prefix):]
+ if file.startswith('mirror/'):
+ file = file[7:]
+ else:
+ file = 'alsa/' + file
return file
- def fileconv2(file, prefix=''):
- if file == '/dev/null':
- return file
- if prefix and file.startswith(prefix):
- file = file[len(prefix):]
- if file.startswith('Documentation/DocBook/alsa-driver-api.tmpl'):
- pass
- elif file.startswith('Documentation/'):
- file = 'Documentation/sound/alsa/' + file[14:]
- elif file.startswith('include/'):
- file = 'include/sound/' + file[8:]
- elif file.startswith('scripts/'):
- pass
- elif file.startswith('.'):
- pass
- else:
- file = 'sound/' + file
- return 'mirror/' + file
+ def is_mirror(l):
+ mirror = alsa = 0
+ for f in l['files']:
+ if f.startswith('mirror/'):
+ mirror += 1
+ else:
+ alsa += 1
+# if mirror and alsa:
+# raise ValueError, "ALSA + MIRROR?"
+ return alsa < mirror
+
+ def do_merge(branch, rbranch, l):
+ if not branch is None:
+ if git_system(repo2, "checkout master"):
+ raise ValueError
+ comment = git_popen(repo2, "log --pretty=format:\"%%s\n %%H\" HEAD..%s" % branch).read(1024*1024)
+ top = "Merge branch '%s'" % branch
+ if comment:
+ comment = top + ":\n\n" + comment
+ else:
+ comment = top
+ comment = comment.replace('"', '\\"').replace('`', '\\`')
+ lines = comment.splitlines()
+ if len(lines) > 500:
+ comment = ''.join(lines[:500])
+ comment += "\n\nAnd more... (truncated)"
+ if git_system(repo2, "merge --no-edit --no-log -m \"%s\" %s" % (comment, branch)):
+ raise ValueError
+ if git_system(repo2, "checkout %s" % rbranch):
+ raise ValueError
+ incremental = True
+ incbase = 'v1.0.25'
+ incend = 'HEAD'
dir = os.path.expanduser('~/alsa/')
repo1 = 'alsa-driver'
- repo2 = 'alsa-kmirror'
- repo3 = 'alsa-driver.new'
- conv = {repo1:fileconv1, repo2:fileconv2}
- check = {repo1:filecheck1, repo2:filecheck2}
- if argv and 'clear' in argv and os.path.exists(dir + repo3):
- rmtree(dir + repo3)
- if not os.path.exists(dir + repo3):
- os.mkdir(dir + repo3)
- if git_system(repo3, "init"):
+ repo2 = 'alsa-driver.alsa'
+ if not incremental or \
+ (argv and 'clear' in argv and os.path.exists(dir + repo2)):
+ rmtree(dir + repo2)
+ if not os.path.exists(dir + repo2):
+ os.mkdir(dir + repo2)
+ if git_system(repo2, "init"):
raise ValueError, "git init error"
- tags1 = version_sort(os.popen("%s tag" % git(repo1)).readlines())
- tags1.remove('v1.0.2')
- tags1.remove('v1.0.2b')
- tags2 = version_sort(os.popen("%s tag" % git(repo2)).readlines())
- tags1.append('master')
- tags2.append('master')
- tags3 = version_sort(os.popen("%s tag" % git(repo3)).readlines())
+ exports = 'export GIT_COMMITER_DATE="Mon Jan 1 00:00:01 1990 +0000" ; '
+ exports += 'export GIT_AUTHOR_DATE="Mon Jan 1 00:00:01 1990 +0000"'
+ for b in ['master', 'mirror', 'build']:
+ if git_system(repo2, "checkout --orphan %s" % b):
+ raise ValueError
+ if git_system(repo2, "commit --allow-empty -m \"root commit\"", exports=exports):
+ raise ValueError
+ tags1 = version_sort(os.popen("%s branch" % git(repo1)).readlines())
init1 = os.popen("%s log master --pretty=format:%%H --reverse" % git(repo1)).readline().strip()
- init2 = os.popen("%s log master --pretty=format:%%H --reverse" % git(repo2)).readline().strip()
- if not tags1 or not tags2 or not init1 or not init2:
+ if not tags1 or not init1:
raise ValueError, "init"
-
- if tags3:
- for tag in tags3:
- tags1.remove(tag)
- tags2.remove(tag)
-
- for tag in tags1:
- if not tag in tags2:
- raise ValueError, "tag %s is not in %s" % (tag, repo2)
- for tag in tags2:
- if not tag in tags1:
- raise ValueError, "tag %s is not in %s" % (tag, repo1)
-
- ptag = None
- if tags3:
- ptag = tags3[-1]
- if git_system(repo3, "reset --hard %s" % ptag):
- raise ValueError, "git reset tag error"
+ tags1.append('HEAD')
+
+ if incremental:
+ prev1 = incbase
+ tags1 = [incend]
+ for b in ['master', 'mirror', 'build']:
+ if git_system(repo2, "checkout %s" % b):
+ raise ValueError
+ if b == 'master':
+ c = 'release/%s' % incbase
+ else:
+ c = b + '/' + incbase
+ if git_system(repo2, "reset --hard %s" % c):
+ raise ValueError
+ if git_system(repo2, "clean -f -d"):
+ raise ValueError
+ else:
+ prev1 = init1
+ abranch = None
+ os.chdir(dir + repo2)
for tag in tags1:
- prev1 = prev2 = ptag
- if ptag is None:
- prev1 = init1
- prev2 = init2
- ptag = tag[:]
- print prev1, prev2, tag
log1 = git_read_commits(dir + repo1, prev1, tag, reverse=True)
- log2 = git_read_commits(dir + repo2, prev2, tag, reverse=True)
if prev1 == init1:
l1 = git_read_commits(dir + repo1, prev1, prev1)
l1[0]['root_flag'] = True
- l2 = git_read_commits(dir + repo2, prev2, prev2)
- l2[0]['root_flag'] = True
log1 = l1 + log1
- log2 = l2 + log2
- if not log1 and not log2:
+ if not log1:
continue
- log = []
- while log1 or log2:
- if not log1:
- log.append(log2[0])
- log2.pop(0)
- log[-1]['repo'] = repo2
- elif not log2:
- log.append(log1[0])
- log1.pop(0)
- log[-1]['repo'] = repo1
- else:
- if log1[0]['CommitDate'] <= log2[0]['CommitDate']:
- log.append(log1[0])
- log1.pop(0)
- log[-1]['repo'] = repo1
- else:
- log.append(log2[0])
- log2.pop(0)
- log[-1]['repo'] = repo2
-
- for l in log:
- if l['repo'] == 'alsa-kmirror' and \
- l['ref'] in ['8ef26bb6279a048d838063a4b740cb716b30c75a',
- '6ae95af9a82c9f80a80ddd41a5ca2964a380fb77',
- '3cd9d1b408f301cdbf42e94a5cd3c6eb7019b57c',
- '60b096ce86d24ae797813dbcc117ca9194f82cca',
- '73b89c7c2d4f6f194316bcbac3448ea6e146aeb4',
- '88b6b99716dfb5026305f0e9a11f99a650b3e12f']:
- continue
- if l['comment'].startswith('Merge branch '):
- continue
+ for l in log1:
+ mirror = is_mirror(l)
+ branch = mirror and 'mirror' or 'build'
+ if abranch != branch:
+ do_merge(abranch, branch, l)
+ abranch = branch
+
ok = False
for a in ('alsatool-abort', 'alsatool-skip'):
if os.path.exists(tmpfile(a)):
os.remove(tmpfile(a))
while not ok:
try:
- try_to_merge(repo3, 'master', l['repo'], l, fileconv=conv[l['repo']], filecheck=check[l['repo']], do_checkout=False)
+ try_to_merge(repo2, 'master', repo1, l, fileconv=fileconv, filecheck=filecheck, do_checkout=False)
ok = True
except:
print "Unexpected error:", sys.exc_info()[0]
print "Type 'touch %s; exit' to abort..." % tmpfile("alsatool-abort")
print "Type 'touch %s; exit' to skip the patch..." % tmpfile("alsatool-skip")
print "Or make changes and type 'exit' to restart..."
- os.chdir(dir + repo3)
+ os.chdir(dir + repo2)
os.system("PS1='alsatool fix [\u@\h \W]\$ ' /bin/bash")
if os.path.exists(tmpfile("alsatool-abort")):
raise
if os.path.exists(tmpfile("alsatool-skip")):
print "Skipping..."
ok = True
-
- if git_system(repo3, "tag -a %s -m \"Release %s\"" % (tag, tag)):
+
+ do_merge(abranch, 'master', l)
+ abranch = None
+ if tag == 'HEAD':
+ break
+ if git_system(repo2, "tag release/%s" % tag):
+ raise ValueError
+ if git_system(repo2, "checkout build"):
raise ValueError
+ if git_system(repo2, "tag build/%s" % tag):
+ raise ValueError
+ if git_system(repo2, "checkout mirror"):
+ raise ValueError
+ if git_system(repo2, "tag mirror/%s" % tag):
+ raise ValueError
+ prev1 = tag
def onecheck(argv=''):
from dircache import listdir
os.chdir(dir)
if os.system('rm -rf ' + dir + '/%s*' % package(repo)):
raise ValueError, "rm -rf"
- if os.system('LANG=C wget http://www.alsa-project.org/snapshot/?package=%s' % repo):
+ if os.system('LANG=C wget -O %s.tar.bz2 http://www.alsa-project.org/snapshot/?package=%s' % (repo, repo)):
raise ValueError, "wget"
filename = ''
for f in listdir('.'):
- if f.startswith(package(repo) + '-'):
+ if f.startswith(package(repo) + '.'):
filename = f
break
if not filename:
print('Found %s...' % filename)
if os.system('tar xjf %s' % filename):
raise ValueError, "tar xjf %s" % filename
- os.chdir(filename[:-8])
+ p = os.popen('tar tjf %s 2> /dev/null | head -1' % filename).read(1024*1024)
+ os.chdir(p.strip())
if not repo in ['alsa-tools', 'alsa-python']:
args = ''
- if repo == 'alsa-driver':
- args = ' --with-kernel=$HOME/alsa/alsa-kernel'
+ #if repo == 'alsa-driver':
+ # args = ' --with-kernel=$HOME/alsa/alsa-kernel'
print "configure%s" % args
if os.system("./configure%s" % args):
raise ValueError, "configure"
def compile(argv=''):
repos = selectrepos(argv)
- if 'alsa' in repos:
- repos.remove('alsa')
- if 'alsa-kmirror' in repos:
- repos.remove('alsa-kmirror')
+ for r in ['alsa', 'alsa-kmirror', 'alsa-ucm-conf', 'alsa-topology-conf']:
+ if r in repos:
+ repos.remove(r)
for repo in repos:
compile0(repo)
raise ValueError, "repo syntax error"
repo = a
branch = b
- return driver_merge('alsa-driver', 'master', repo, branch)
+ return driver_merge('alsa-driver', 'mirror', repo, branch)
def ddiff(argv=''):
repo = 'alsa-kernel'
raise ValueError, "repo syntax error"
repo = a
branch = b
- return compare_trees('alsa-driver.new', 'master', repo, branch)
+ return compare_trees('alsa-driver', 'mirror', repo, branch)
def kmerge(argv=''):
os.chdir(config.ROOT + '/alsa-kernel')
raise ValueError, ' pull ' + url + ' ' + branch
if os.system(git0 + ' branch -f ' + lbranch + ' ' + ref):
raise ValueError, ' branch ' + lbranch + ' ' + ref
- if os.system(git0 + ' push -f origin ' + lbranch):
raise ValueError, ' push -f origin ' + lbranch
changes += 1
if changes > 0:
if os.system(git0 + ' push -f origin alsamerge/master'):
raise ValueError, ' push -f origin alsamerge/master'
+def replace0(dir, f, t):
+ from dircache import listdir
+
+ cnt = 0
+ for f0 in listdir(dir):
+ if f0[0] == '.': continue
+ if f0.endswith('~'): continue
+ if f0.endswith('.lo'): continue
+ if f0.endswith('.o'): continue
+ filename = dir + '/' + f0
+ if os.path.islink(filename):
+ continue
+ if os.path.isdir(filename):
+ cnt += replace0(filename, f, t)
+ continue
+ fp = open(filename)
+ b = fp.read(10*1024*1024)
+ fp.close()
+ c = b.replace(f, t)
+ if b != c:
+ cnt += 1
+ fp = open(filename, 'w+')
+ fp.write(c)
+ fp.close()
+ return cnt
+
+def replace(argv=None):
+ if not argv[0].startswith('--from='):
+ raise ValueError, ' replace expect --from=""'
+ f = argv[0][7:]
+ if not argv[1].startswith('--to='):
+ raise ValueError, ' replace expect --to=""'
+ t = argv[1][5:]
+ print('Replacing:')
+ print(' from: "%s"' % f)
+ print(' to: "%s"' % t)
+ repos = selectrepos(argv[2:])
+ cnt = 0
+ for repo in repos:
+ cnt += replace0(config.ROOT + '/' + repo, f, t)
+ if cnt > 0:
+ print('Replaces in %d files.' % cnt)
+ else:
+ print('Not found')
+
+
def background(argv=''):
global BACKGROUND
BACKGROUND=argv
['kmerge', kmerge, '', 'Merge trees for all ALSA developers'],
['one', one, '', 'Merge alsa-kmirror and alsa-driver trees to one alsa-driver tree'],
['onecheck', onecheck, '', 'Compare integrity of the one alsa-driver tree'],
- ['oneretag', oneretag, '', 'Retag the one alsa-driver tree']
+ ['oneretag', oneretag, '', 'Retag the one alsa-driver tree'],
+ ['replace', replace, '', 'Replace string in selected repositories'],
]
def main():
samplerate, data = read_wav(filename, channel)
+ samplerate -= 0
+
windowsize = len(data)
lowfreq = 200
highfreq = 6000
['/seq/aconnect/.*', 'aconnect'],
['/seq/aseqnet/.*', 'aseqnet'],
['/iecset/.*', 'iecset'],
- ['/configure.in', 'Core'],
+ ['/alsa-info/.*', 'alsa-info.sh'],
+ ['/topology/.*', 'alsatplg (topology)'],
+ ['/bat/.*', 'bat (basic audio tester)'],
+ ['/axfer/.*', 'Audio Transfer utility'],
+ ['/configure.*', 'Core'],
['/Makefile.am', 'Core'],
['/Makefile.am', 'Core'],
- ['/README', 'Core'],
+ ['/README.*', 'Core'],
['/INSTALL', 'Core'],
['/COPYING', 'Core'],
['/include/gettext.h', 'IGNORE'],
['/hgcompile', 'hgcompile'],
['/gitcompile', 'gitcompile'],
['/ChangeLog', 'IGNORE'],
+ ['/.travis.yml', 'Core'],
['/', 'ERROR'],
],
"alsa-driver": [
['/SUPPORTED_KERNELS', 'Sound Core'],
['/MAINTAINERS', 'MAINTAINERS file'],
['/Rules.make', 'Sound Core'],
- ['/configure.in', 'Sound Core'],
+ ['/configure.*', 'Sound Core'],
['/kconfig.vers', 'Sound Core'],
['/cvscompile', 'cvscompile script'],
['/hgcompile', 'hgcompile script'],
['/hwmixvolume/.*', 'hwmixvolume'],
['/hda-verb/.*', 'hda-verb'],
['/hdajackretask/.*', 'HDA Jack Retask'],
+ ['/hdajacksensetest/.*', 'HDA Jack Sense Test'],
['/seq/sbiload/.*', 'sbiload'],
['/seq/cvscompile', 'Core'],
['/seq/hgcompile', 'Core'],
['/include/conv.h', 'Core'],
['/include/list.h', 'Core'],
['/include/error.h', 'Core'],
+ ['/include/type_compat.h', 'Compatibility routines'],
+ ['/include/bswap.h', 'Compatibility routines'],
['/include/conf.h', 'Config API'],
['/include/control.h', 'Control API'],
['/include/control_external.h', 'External Control Plugin SDK'],
['/include/alsa-symbols.h', 'Core'],
['/include/iatomic.h', 'Core'],
['/include/use-case.h', 'Use Case Manager API'],
+ ['/include/topology.h', 'Topology API'],
+ ['/include/aserver.h', 'ALSA Server'],
+ ['/include/alisp.h', 'ALSA Lisp'],
['/src/use-case.c', 'Use Case Manager API'],
['/src/control/.*', 'Control API'],
['/src/mixer/.*', 'Mixer API'],
['/src/instr/.*', 'Instrument API'],
['/src/hwdep/.*', 'HWDEP API'],
['/src/ucm/.*', 'Use Case Manager API'],
+ ['/src/topology/.*', 'Topology API'],
+ ['/src/compat/.*', 'Compatibility routines'],
['/src/ordinary_mixer/.*', 'Mixer Ordinary API'],
['/src/ordinary_pcm/.*', 'PCM Ordinary API'],
['/src/input.*', 'I/O subsystem'],
['/src/Versions', 'Core'],
['/modules/mixer/simple/.*', 'Simple Abstraction Mixer Modules'],
['/aserver/.*', 'ALSA Server'],
+ ['/alsalisp/.*', 'ALSA Lisp'],
['/doc/.*', 'Documentation'],
['/utils/.*', 'Utils'],
['/test/.*', 'Test/Example code'],
['/m4/.*', 'Core'],
- ['/configure.in', 'Core'],
+ ['/configure.*', 'Core'],
['/INSTALL', 'Documentation'],
['/NOTES', 'Documentation'],
+ ['/README*', 'Documentation'],
+ ['/COPYING', 'Documentation'],
['/cvscompile', 'Core'],
['/hgcompile', 'Core'],
['/gitcompile', 'Core'],
+ ['/.travis.yml', 'Core'],
['/', 'ERROR'],
],
"alsa-firmware": [
['/maestro3/.*', 'Maestro3 Firmware'],
['/sb16/.*', 'SB16 (CSP) Firmware'],
['/aica/.*', 'AICA (Dreamcast) Firmware'],
- ['/configure.in', 'Core'],
+ ['/ca0132/.*', 'Sound Blaster HDA CA0132 Firmware'],
+ ['/cs46xx/.*', 'Cirrus Logic CS46xx Firmware'],
+ ['/configure.*', 'Core'],
['/Makefile.am', 'Core'],
- ['/README', 'Core'],
+ ['/README.*', 'Core'],
+ ['/COPY.*', 'Core'],
['/cvscompile', 'Core'],
['/hgcompile', 'Core'],
['/gitcompile', 'Core'],
+ ['/.travis.yml', 'Core'],
['/', 'ERROR'],
],
"alsa-plugins": [
['/maemo/.*', 'Alsa support for Maemo SDK (n770)'],
['/pph/.*', 'Public Parrot Hack rate converter'],
['/rate-lavc/.*', "libavcodec's resampler"],
+ ['/rate-lav/.*', "libavcodec's resampler"],
['/usb_stream/.*', 'USB stream plugin'],
['/speex/.*', 'Speex PCM plugin'],
['/arcam-av/.*', 'Arcam AV control plugin'],
+ ['/aaf/.*', 'AVTP Audio Format (AAF) PCM plugin'],
['/m4/.*', 'Core'],
['/COPYING.GPL', 'Core'],
['/COPYING', 'Core'],
- ['/configure.in', 'Core'],
+ ['/configure.*', 'Core'],
['/cvscompile', 'Core'],
['/hgcompile', 'Core'],
['/gitcompile', 'Core'],
+ ['/install-hooks.am', 'Core'],
['/', 'ERROR'],
],
"alsa-python": [
+ ['/pyalsa/common.h', 'Core'],
['/pyalsa/alsacard.c', 'pyalsa.alsacard module'],
['/pyalsa/alsacontrol.c', 'pyalsa.alsacontrol module'],
['/pyalsa/alsahcontrol.c', 'pyalsa.alsahcontrol module'],
['/alsa/mixer.c', 'Mixer Emulation'],
['/alsa/stdioemu.c', 'Core'],
['/alsa/alsa-oss.c', 'Core'],
+ ['/alsa/alsa-oss-emul.h', 'Core'],
['/alsa/Makefile.am', 'Core'],
['/alsa/aoss.1', 'Manual Page'],
['/alsa/aoss.in', 'aoss script'],
['/alsa/aoss.old.in', 'aoss script'],
+ ['/oss-redir/.*', 'OSS Redirection'],
['/include/version.h', 'ALSA Version'],
- ['/configure.in', 'Core'],
+ ['/configure.*', 'Core'],
+ ['/cvscompile', 'Core'],
+ ['/hgcompile', 'Core'],
+ ['/gitcompile', 'Core'],
+ ['/COPYING', 'Documentation'],
+ ['/', 'ERROR'],
+ ],
+ "tinycompress": [
+ ['/include/.*', 'Header files'],
+ ['/src/lib/.*', 'Library'],
+ ['/src/utils/.*', 'Utilities'],
+ ['/compress.c', 'Library'],
+ ['/src/Makefile.*', 'Core'],
+ ['/cplay.c', 'Utilities'],
+ ['/crec.c', 'Utilities'],
+ ['/utils.c', 'Utilities'],
+ ['/configure.*', 'Core'],
['/cvscompile', 'Core'],
['/hgcompile', 'Core'],
['/gitcompile', 'Core'],
+ ['/Android.mk', 'Core'],
+ ['/autogen.sh', 'Core'],
+ ['/makefile.linux', 'Core'],
+ ['/README', 'Core'],
+ ['/AUTHORS', 'Core'],
+ ['/INSTALL', 'Core'],
+ ['/COPYING', 'Core'],
+ ['/NEWS', 'Core'],
+ ['/ChangeLog', 'Core'],
+ ['/m4/.place_holder', 'IGNORE'],
['/', 'ERROR'],
],
+ "alsa-ucm-conf": [
+ ['/ucm/.*', 'Configuration'],
+ ['/ucm2/.*', 'Configuration'],
+ ['/README*', 'Description'],
+ ['/LICEN*', 'Description'],
+ ['/', 'ERROR'],
+ ],
+ "alsa-topology-conf": [
+ ['/topology', 'Configuration files'],
+ ['/README.*', 'Description'],
+ ['/LICEN.*', 'Description'],
+ ['/', 'ERROR'],
+ ]
}
class CommentRegex:
GERRORSA = []
TMPDIR = '/dev/shm/alsatool'
SMTP_SERVER = 'localhost'
-GIT_KERNEL_MERGE = 'v3.3'
-GIT_DRIVER_MERGE = 'v1.0.24'
+GIT_KERNEL_MERGE = 'v4.8'
+GIT_DRIVER_MERGE = 'mirror/v1.0.25'
GIT_MERGE_REPOS = [
('git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git', 'master', 'linux-2.6', 'http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git'),
('git://git.alsa-project.org/alsa-kernel.git', 'fixes', 'perex-fixes', 'http://git.alsa-project.org/http/alsa-kernel.git'),
('git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git', 'topic/asoc', 'tiwai-topic-asoc', 'http://www.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git')
]
REPOSITORIES = [
- 'alsa', 'alsa-driver', 'alsa-lib', 'alsa-utils',
+ 'alsa', 'alsa-lib', 'alsa-utils',
'alsa-tools', 'alsa-firmware', 'alsa-oss', 'alsa-plugins',
- 'alsa-python'
+ 'alsa-python', 'tinycompress', 'alsa-ucm-conf', 'alsa-topology-conf'
]
ALSA_FILES = (
+ 'Documentation/devicetree/bindings/sound/',
'Documentation/sound/alsa/',
'sound/',
- 'include/sound/'
+ 'include/sound/',
+ 'include/uapi/sound/'
)
NOT_ALSA_FILES = (
'sound/oss/',
from os import popen, mkdir, system, chdir, getcwd, remove, listdir
from os.path import isdir, exists, split
from shutil import rmtree
-from utils import git_popen, git_system, git_repo, is_alsa_file, to_alsa_file2, \
+from utils import git_popen, git_system, git_repo, is_alsa_file, to_alsa_file, \
tmpfile, tmpdir, diff_compare2, to_kernel_file, \
git_read_commits, raw_subject
import re
return True
def analyze_diff(fp, full=False, filter_git=False,
- filecheck=is_alsa_file, fileconv=to_alsa_file2):
+ filecheck=is_alsa_file, fileconv=to_alsa_file):
def afile(file, prefix):
if file.startswith('/dev/'):
for f in commit['files']:
if not is_alsa_file(f):
continue
- src = git_repo(driver_repo) + '/' + to_alsa_file2(f)
+ src = git_repo(driver_repo) + '/' + to_alsa_file(f)
dst = git_repo(kernel_repo) + '/' + f
lines = popen("diff -uN %s %s 2> /dev/null" % (src, dst)).readlines()
if lines:
return ok
def try_to_merge(driver_repo, driver_branch, src_repo, commit,
- filecheck=is_alsa_file, fileconv=to_alsa_file2,
+ filecheck=is_alsa_file, fileconv=to_alsa_file,
do_checkout=True):
comment = commit['comment'].splitlines()
ref = commit['ref']
fuzz += 1
else:
succeed += 1
+ if ref == '03510ca07ad48941072d673321d2b009be6dfcd4':
+ return False
if failed:
print 'Merge skipped %s %s (%s failed)' % (ref[:7], comment[0], failed)
chdir(curdir)
ref[:7] in ['bdb527e', 'fc5b15f', '82b1d73', \
'02a237b', 'ef8d60f', 'c0fa6c8', \
'1605282', '3946860', 'd70f363', \
- '6539799', '152a3a7', '79980d9']:
+ '6539799', '152a3a7', '79980d9', \
+ '2955b47', '5daf53a', '5e70b7f', \
+ '2203747', '04564e3', '946cc36', \
+ '07b706d', '68214d9', '257d36f', \
+ 'ab6340c', '6cab3e1', '0875eb7', \
+ '54f6019', '31a62d4', 'fc48851', \
+ '559c200', 'ec6f432', '617ade6', \
+ 'e043403', 'a06e427', 'acc8da7', \
+ '59b5645', '338c658', 'e9a7495', \
+ 'db8d3af', '9a199b8', '05004cb', \
+ 'c28b14f', '03510ca', '6489573', \
+ 'e95d73c', 'd8f6479', '2488708', \
+ 'de0d712', '88d5e52']:
print ' It is probably OK...'
return False
- raise ValueError
+ print 'Press Enter to continue and skip this path, or press Ctrl-C to abort'
+ stdin.readline()
return False
if git_system(driver_repo, "apply --check --binary --allow-binary-replacement %s" % patchfile):
print 'Merge skipped %s %s (apply check)' % (ref[:7], comment[0])
chdir(curdir)
if not do_checkout:
raise ValueError
+ if ref[:7] in ['617ade6', 'd8f6479', '0799958', 'ed520c9', 'bdfbf25', 'e948262', '5c2b063']:
+ print ' It is probably OK...'
+ return False
+ print 'Press Enter to continue and skip this path, or press Ctrl-C to abort'
+ stdin.readline()
return False
if git_system(driver_repo, "apply --binary --allow-binary-replacement %s" % patchfile):
chdir(curdir)
raise ValueError, 'git apply'
- if addfiles and git_system(driver_repo, "add %s" % ' '.join(addfiles)):
+ if addfiles and git_system(driver_repo, "add -f %s" % ' '.join(addfiles)):
chdir(curdir)
raise ValueError, 'git add'
if rmfiles and git_system(driver_repo, "rm %s" % ' '.join(rmfiles)):
rmtree(worktreek, ignore_errors=True)
mkdir(worktree)
mkdir(worktreek)
- if git_system(driver_repo, "archive --format=tar %s mirror | tar xf - -C %s" % (driver_branch, worktree)):
+ if git_system(driver_repo, "archive --format=tar %s | tar xf - -C %s" % (driver_branch, worktree)):
raise ValueError, 'git export (alsa-driver)'
- if git_system(kernel_repo, "archive --format=tar %s sound include/sound Documentation/DocBook Documentation/sound/alsa | tar xf - -C %s" % (kernel_branch, worktreek)):
+ if git_system(kernel_repo, "archive --format=tar %s sound include/sound include/uapi/sound include/dt-bindings/sound Documentation/sound Documentation/devicetree/bindings/sound | tar xf - -C %s" % (kernel_branch, worktreek)):
raise ValueError, 'git export (kernel)'
git_system(driver_repo, "checkout %s" % driver_branch)
git_system(kernel_repo, "checkout %s" % kernel_branch)
curdir = getcwd()
chdir(tmpdir())
- for f in listdir("alsa-kernel-repo/Documentation/DocBook"):
- if not f in ['.', '..', 'alsa-driver-api.tmpl']:
- x = "alsa-kernel-repo/Documentation/DocBook/" + f
- if isdir(x):
- rmtree(x)
- else:
- remove(x)
- remove("alsa-driver-repo/mirror/.gitignore")
- rmtree("alsa-driver-repo/mirror/scripts")
- rmtree("alsa-driver-repo/mirror/sound/oss")
+ #
+ oklist = []
+ for f in listdir("alsa-driver-repo/Documentation/devicetree/bindings/sound/"):
+ if not f in ['.', '..']:
+ oklist.append(f)
+ for f in listdir("alsa-kernel-repo/Documentation/devicetree/bindings/sound/"):
+ if not f in ['.', '..'] and not f in oklist:
+ remove('alsa-kernel-repo/Documentation/devicetree/bindings/sound/' + f)
+ #
+ remove("alsa-driver-repo/.gitignore")
+ rmtree("alsa-driver-repo/sound/oss")
+ rmtree("alsa-driver-repo/scripts")
+ #remove("alsa-kernel-repo/.gitignore")
rmtree("alsa-kernel-repo/sound/oss")
+ rmtree("alsa-kernel-repo/Documentation/sound/oss")
if 0:
for i in ['.git-ok-commits', '.hgignore', '.hgtags', '.gitignore', 'kernel', 'scripts',
'oss', 'usb/usbmixer.h', 'usb/usbmixer_maps.c']:
rmtree("alsa-kmirror-repo/%s" % i)
elif exists("alsa-kmirror-repo/%s" % i):
remove("alsa-kmirror-repo/%s" % i)
- for i in ['oss', 'pci/ac97/ak4531_codec.c', 'isa/sb/sb16_csp_codecs.h',
+ for i in ['oss', 'Documentation/sound/oss',
+ 'pci/ac97/ak4531_codec.c', 'isa/sb/sb16_csp_codecs.h',
'pci/korg1212/korg1212-firmware.h', 'pci/ymfpci/ymfpci_image.h',
'pci/hda/hda_patch.h',
'isa/ad1848/ad1848_lib.c', 'isa/cs423x/cs4231_lib.c', 'isa/cs423x/cs4232.c',
'usb/caiaq/caiaq-midi.c', 'usb/caiaq/caiaq-midi.h',
'usb/usbmixer.h',
'usb/usbmixer_maps.c',
- 'isa/wavefront/yss225.c'
+ 'isa/wavefront/yss225.c',
+ 'sound/soc/intel/common/sst-acpi.c',
+ 'sound/soc/intel/common/sst-dsp.c',
+ 'sound/soc/intel/common/sst-dsp.h',
+ 'sound/soc/intel/common/sst-dsp-priv.h',
+ 'sound/soc/intel/common/sst-firmware.c',
]:
if isdir("alsa-kernel-repo/%s" % i):
rmtree("alsa-kernel-repo/%s" % i)
elif exists("alsa-kernel-repo/%s" % i):
remove("alsa-kernel-repo/%s" % i)
- fp = popen("diff -ruNp alsa-driver-repo/mirror alsa-kernel-repo")
+ fp = popen("diff -ruNp alsa-driver-repo alsa-kernel-repo")
notempty = False
while 1:
line = fp.readline()
def to_alsa_file(gitfile, prefix=''):
if gitfile == '/dev/null':
return '/dev/null'
- if prefix and gitfile.startswith(prefix):
- gitfile = gitfile[len(prefix):]
- for t in config.ALSA_TRANSLATE:
- if gitfile.startswith(t[0]):
- return prefix + t[1] + gitfile[len(t[0]):]
- raise ValueError, repr(gitfile)
-
-def to_alsa_file2(gitfile, prefix=''):
- return prefix + 'mirror/' + gitfile
+ return prefix + gitfile
def to_kernel_file(gitfile, prefix=''):
if gitfile == '/dev/null':
return '/dev/null'
if prefix and gitfile.startswith(prefix):
- gitfile = gitfile[len(prefix):]
- for t in config.ALSA_RTRANSLATE:
- if gitfile.startswith(t[0]):
- return prefix + t[1] + gitfile[len(t[0]):]
- raise ValueError, repr(gitfile)
+ return gitfile
+ return prefix + gitfile
def git_repo(repo):
if repo == '.':