From 2183f0553c660dab120cac6e01bc5eb58f567767 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 12 Jul 2022 11:38:12 +0200 Subject: [PATCH 1/5] android/meson.build: use apksigner instead of jarsigner This is required for targetSdkVersion=30. apksigner requires running zipalign first. --- android/apk/meson.build | 53 ++++++++++++++++++++--------------------- android/meson.build | 2 +- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/android/apk/meson.build b/android/apk/meson.build index fc9c81737..1695ef502 100644 --- a/android/apk/meson.build +++ b/android/apk/meson.build @@ -12,18 +12,30 @@ unsigned_apk = custom_target( ], ) +aligned_apk = custom_target( + 'mpd-aligned.apk', + output: 'mpd-aligned.apk', + input: unsigned_apk, + command: [ + android_zipalign, + '-f', '4', + '@INPUT@', '@OUTPUT@', + ], +) + if get_option('android_debug_keystore') != '' debug_apk = custom_target( 'mpd-debug.apk', output: 'mpd-debug.apk', - input: unsigned_apk, + input: aligned_apk, command: [ - jarsigner, - '-keystore', get_option('android_debug_keystore'), - '-storepass', 'android', - '-signedjar', '@OUTPUT@', - '@INPUT@', - 'androiddebugkey', + apksigner, 'sign', + '--in', '@INPUT@', + '--out', '@OUTPUT@', + '--debuggable-apk-permitted', + '-ks', get_option('android_debug_keystore'), + '--ks-key-alias', 'androiddebugkey', + '--ks-pass', 'pass:android', ], build_by_default: true ) @@ -31,29 +43,16 @@ endif if get_option('android_keystore') != '' and get_option('android_keyalias') != '' and get_option('android_keypass') != '' unaligned_apk = custom_target( - 'mpd-unaligned.apk', - output: 'mpd-unaligned.apk', - input: unsigned_apk, - command: [ - jarsigner, - '-digestalg', 'SHA1', '-sigalg', 'MD5withRSA', - '-keystore', get_option('android_keystore'), - '-storepass', get_option('android_keypass'), - '-signedjar', '@OUTPUT@', - '@INPUT@', - get_option('android_keyalias'), - ], - ) - - apk = custom_target( 'mpd.apk', output: 'mpd.apk', - input: unaligned_apk, + input: aligned_apk, command: [ - android_zipalign, - '-f', '4', - '@INPUT@', '@OUTPUT@', + apksigner, 'sign', + '--in', '@INPUT@', + '--out', '@OUTPUT@', + '-ks', get_option('android_keystore'), + '--ks-key-alias', get_option('android_keyalias'), + '--ks-pass', 'pass:' + get_option('android_keypass'), ], - build_by_default: true ) endif diff --git a/android/meson.build b/android/meson.build index a8caa0243..75134e942 100644 --- a/android/meson.build +++ b/android/meson.build @@ -17,7 +17,7 @@ android_dx = join_paths(android_build_tools_dir, 'dx') android_zipalign = join_paths(android_build_tools_dir, 'zipalign') javac = find_program('javac') -jarsigner = find_program('jarsigner') +apksigner = find_program('apksigner') rsvg_convert = find_program('rsvg-convert') convert = find_program('convert') zip = find_program('zip') From f8a8de87e43b4196a3405a00c9a1e32113805ffc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 12 Jul 2022 11:35:27 +0200 Subject: [PATCH 2/5] android/AndroidManifest.xml: update targetSdkVersion to 30 Required by Google Play. --- android/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 96978936a..90d5ac6a6 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -5,7 +5,7 @@ android:versionCode="66" android:versionName="0.23.7"> - + From b45f3c8deb12a825a5302c12d7d684434df7fb25 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 12 Jul 2022 11:28:07 +0200 Subject: [PATCH 3/5] Android release 0.23.8 --- android/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 90d5ac6a6..ef8df3f49 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="67" + android:versionName="0.23.8"> From 79f9b268bb73f0cadb57b30cb875d960546b9849 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 12 Jul 2022 10:56:34 +0200 Subject: [PATCH 4/5] increment version number to 0.23.9 --- NEWS | 2 ++ android/AndroidManifest.xml | 4 ++-- doc/conf.py | 2 +- meson.build | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 54be560c5..70a0c77a9 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +ver 0.23.9 (not yet released) + ver 0.23.8 (2022/07/09) * storage - curl: fix crash if web server does not understand WebDAV diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index ef8df3f49..3586de703 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="68" + android:versionName="0.23.9"> diff --git a/doc/conf.py b/doc/conf.py index 170e0e8cd..59f705e8d 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -38,7 +38,7 @@ author = 'Max Kellermann' # built documents. # # The short X.Y version. -version = '0.23.8' +version = '0.23.9' # The full version, including alpha/beta/rc tags. #release = version + '~git' diff --git a/meson.build b/meson.build index e371c274f..51d6139a4 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'mpd', ['c', 'cpp'], - version: '0.23.8', + version: '0.23.9', meson_version: '>= 0.56.0', default_options: [ 'c_std=c11', From cd0396c1f1a39dc1b1be80584e48d043821d8707 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 12 Jul 2022 11:59:11 +0200 Subject: [PATCH 5/5] test/run_decoder: remove bogus assert() --- test/run_decoder.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/run_decoder.cxx b/test/run_decoder.cxx index cdfa852b4..b33c75b3c 100644 --- a/test/run_decoder.cxx +++ b/test/run_decoder.cxx @@ -148,8 +148,6 @@ public: } DecoderCommand GetCommand() noexcept override { - assert(IsInitialized()); - if (seek_where != SongTime{}) { if (!seekable) return DecoderCommand::STOP;