Debian Patches

Status for kotlin/1.3.31+ds1-9

Patch Description Author Forwarded Bugs Origin Last update
066-java9-compatibility-2.patch KT-33889: Do not use private non-API methods from JavacProcessingEnvironment

Avoid using JavacProcessingEnvironment.validImportStringToPattern method
because it has been removed in JDK9. This commit changes how we compute
pattern to match the class names, and it create instances of Pattern
manually by following spec for Processor.getSupportedAnnotationTypes().
Support for module prefix is not added yet.
Ivan Gavrilovic <gavra@google.com> not-needed upstream upstream, commit:aaa00b0f6f6a07984bb2a2e5bb72b8fde3a7e0f6 2023-01-31
067-java17-compatibility.patch [KAPT] Add experimental JDK 17 support
#KT-47583 Fixed
Mikhael Bogdanov <mikhael.bogdanov@jetbrains.com> not-needed upstream upstream, commit:1760befa37f297189b7b8ae0359e5ef35091cbc0 2023-01-31
068-pre-jdk9-reflection.patch Use reflection to call pre JDK9 methods. This is required to build with JDK 9 or later Emmanuel Bourg <ebourg@apache.org> not-needed 2023-01-31
069-disable-javac-wrapper.patch Disables the Javac wrapper to be able to build with Java 17 As of Kotlin 1.8.0 the wrapper, which is triggered by the -Xuse-javac
compiler option, is still not compatible with the JDK 17 classes.
Emmanuel Bourg <ebourg@apache.org> not-needed upstream 2023-01-31
070-replace-proguard-with-jarjar.patch Replaces proguard with jarjar to assemble the kotlin-reflect jar. Proguard 6 is unable to parse the classes of OpenJDK 17, and it looks like
Kotlin classes are evicted even if minimization is disabled, which breaks the build.
To be retried with Proguard 7.
Emmanuel Bourg <ebourg@apache.org> not-needed 2023-01-31
071-java8-compatibility.patch Fixes the backward compatibility when running with Java 8 When building with Java 17 the CharSequence.isEmpty() method is used instead of
the extension method added to the CharSequence class by Kotlin. This causes
NoSuchMethodErrors at runtime when Kotlin is used with Java 8.
Emmanuel Bourg <ebourg@apache.org> not-needed 2023-02-01
072-tty-detection-fallback.patch Fall back to another tty detection method if jansi CLibrary isn't available Emmanuel Bourg <ebourg@apache.org> not-needed 2023-02-03
073-abstractlist.patch Provide overrides for methods introduced in Java 8 API Java 21 sets minimum release level to Java 8, forcing Java 8 API compatibility.
This patch adds toArray() methods required by the new interface signatures.
This patch introduces API incompatibility (extra methods).
Upstream builds with Java 6/7 and does not need this patch.
Vladimir Petko <vladimir.petko@canonical.com> not-needed debian 2024-01-24
074-kapt3.patch KAPT: Use reflection to access code, changed in JDK 21 Related JDK change: https://github.com/openjdk/jdk/commit/a917fb3fcf0fe1a4c4de86c08ae4041462848b82 Ilmir Usmanov <ilmir.usmanov@jetbrains.com> not-needed debian upstream upstream, https://github.com/JetBrains/kotlin/commit/37417f791950bb5fe484edfa8894f26e113fca27 2024-01-24
004-settings-gradle-remove-unwanted-subprojects.patch Remove the location of the projects not built (excluded in debian/gradle.ignoreRules) Samyak Jain <samyak.jn11@gmail.com> not-needed 2021-04-22
043-libraries-groovy-build-changes.patch libraries/*: Groovy build changes Saif Abdul Cassim <saif.15@cse.mrt.ac.lk> not-needed 2021-04-22
050-use-a-specific-asm-api-version-to-deal-with-newer-libasm.patch *: Use a specific ASM API version to deal with newer libasm-java
Current version of Kotlin code is meant to work with Java asm library version
7.0. The version available in Debian is 9.0. asm library provides API
compatibility only when the API version is specified during object creation.

Opcodes.ASM9 == OpCodes.ASM7
Saif Abdul Cassim <saif.15@cse.mrt.ac.lk> not-needed 2021-04-22
051-libraries-kotlin-script-util-remove-use-of-mavenresolver.patch libraries//kotlin-script-util: Remove use of MavenResolver Saif Abdul Cassim <saif.15@cse.mrt.ac.lk> not-needed 2021-04-22
052-core-util-runtime-set-kotlin-compiler-version-to-1.3-snapshot.patch core/util.runtime: Set kotlin compiler version to 1.3-SNAPSHOT Samyak Jain <samyak.jn11@gmail.com> not-needed 2021-04-22
054-ignore-some-proguard-warnings.patch *: Ignore some proguard warnings Samyak Jain <samyak.jn11@gmail.com> not-needed 2021-04-22
055-compiler-backend-remove-some-notnull-annotations.patch compiler/backend: Remove some @NotNull annotations Saif Abdul Cassim <saif.15@cse.mrt.ac.lk> not-needed 2021-04-22
056-compiler-frontend-use-io-vavr-library-instead-of-javaslang.patch compiler/frontend: Use io.vavr library instead of javaslang Samyak Jain <samyak.jn11@gmail.com> not-needed 2021-04-22
057-libraries-kotlin-gradle-plugin-resolve-various-issues.patch libraries//kotlin-gradle-plugin: Resolve various errors
Resolve various version conflicts errors and circular dependencies This resolves
android-gradle-plugin circular dependencies for source, and resolves various
unrefrence errors which was because of gradle circular dependencies (>4.7) the
same various files are backported in gradle (v4.4.1-12).
Samyak Jain <samyak.jn11@gmail.com> not-needed 2021-04-22
058-compiler-backend-backport-fix-for-compilation-with-asm-8.patch compiler/backend: Backport fix for compiling with ASM 8
General rule to use linkedLabel or linkWithLabel when label from node is reused
in other instructions. If label is not linked then it will point to another
labelNode when visited
Mikhail Bogdanov <mikhael.bogdanov@jetbrains.com> not-needed upstream https://github.com/JetBrains/kotlin/commit/db50afeafee3442069cf477f85f7195dbd228dcc 2021-04-22
059-compiler-backend-fix-crash-when-generating-coroutine-functions.patch compiler/backend: Fix crash when generating coroutine functions
When generating JVM byte code for a coroutine, code is inserted to help stop
the function and continue is later. As part of this a variable with name
'$continuation' is also added. This variable is also added to the local
variable table (LVT). The entry in LVT contains that scope of the variable
represented as a starting label (inclusive) and ending label (exclusive).

Before adding a starting label, the starting label is first created. At the
time of creation of the label and at the time of assing the starting label node
to the variable in LVT, different LabelNode are created. This works in a flaky
way because of a reference (.info) in the label in LVT. It somehow does not
work when compiled in Debian due change in ASM Java library or for other
reasons.

This patch fixes the problem by using the same LabelNode at the location of the
label and in LVT. This problem was fixed in later versions of Kotlin due to
ractoring.

This patch is not needed upstream due to refactoring done in commit
d2a80e793825c16506a235a6dc61a6a052835110.
Sunil Mohan Adapa <sunil@medhas.org> not-needed debian 2021-04-22
060-libraries-alter-maven-build-scripts.patch libraries/: Alter maven build scripts, build only needed sub-projects
- Update the version number so that the generate jar files have the correct
version number. Attempt was made to use ${revision} instead of the hard coded
version number. Then revision was passed on the maven build command line with
-Drevision=1.3.31. However, this yields error with mh_patchpoms tool. So, this
was abandoned.

- Disable all sub-projects except kotlin-osgi-bundle (needed by
jitsi-videobridge) and kotlin-maven-plugin (needed by projects using Kotlin with
Maven). Enable more sub-projects as needed.

- Remove useDefaultManifestFile as this has been removed from 3.0 version of
maven-jar-plugin. According to documentation, another way is provided when
non-default manifest file needs to be provided implying that this option is
default now.
Sunil Mohan Adapa <sunil@medhas.org> not-needed 2021-05-03
061-asm-compatibility.patch Fixes the compatibility with the version of ASM in Debian Emmanuel Bourg <ebourg@apache.org> not-needed 2023-01-21
063-ignore-not-exported-packages.patch Suppresses the errors caused by the non exported com.sun.tools.javac.* packages when building with Java 17 Emmanuel Bourg <ebourg@apache.org> not-needed 2023-01-31
064-source-target-level.patch Set the language level to Java 8 Emmanuel Bourg <ebourg@apache.org> not-needed 2023-01-31
065-java9-compatibility.patch Do not depend on BaseFileObject type for incremental KAPT
This class does not exist in JDK9, so running incremental KAPT on
JDK9 fails. Because it is used only to get the name of the file,
this has been replaced with usage of the public JavaFileObject API.
Ivan Gavrilovic <gavra@google.com> not-needed upstream, commit: 4da667564055329edbddec411b803c45c95395c1 2023-01-31
075-late-jdk-api.patch Fix compiler run-time compatibility with legacy JDKs
Mask methods introduced with newer JDKs (tested: up to 21) that are conflicting
with Kotlin built-in stdlib extensions, or mute warnings.

This is necessary to be able to use the compiler libraries with older JREs when
built with the current default JDK (21), e.g. the JDK 8 and 11.

> w: libraries/stdlib/jvm/src/kotlin/collections/MutableCollectionsJVM.kt: (15,
> 38): Extension is shadowed by a member: public open fun sort(p0:
> Comparator<in T!>!): Unit

> w: libraries/stdlib/jvm/src/kotlin/util/Exceptions.kt: (48, 22): Extension is
> shadowed by a member: public final fun addSuppressed(p0: Throwable!): Unit

> w: libraries/stdlib/src/kotlin/comparisons/Comparisons.kt: (294, 30):
> Extension is shadowed by a member: public open fun reversed():
> Comparator<T!>!

> w: libraries/stdlib/src/kotlin/text/Strings.kt: (234, 32): Extension is
> shadowed by a member: public open fun isEmpty(): Boolean

> w:
> compiler/frontend/src/org/jetbrains/kotlin/util/javaslang/javaslangAdapters.kt:
> (31, 19): Extension is shadowed by a member: public open fun getOrNull(): T!

> w: libraries/stdlib/jdk8/src/kotlin/streams/Streams.kt: (60, 26): Extension
> is shadowed by a member: public open fun toList(): (Mutable)List<T!>!

Some of the changes are partial backports:
- from v1.4.30:
- 5cc12b49fcaf (tag: build-1.4.30-dev-1219) Hide
java.lang.CharSequence::isEmpty from Kotlin built-in class
- from v1.5.0:
- a6b51da3081b (tag: build-1.5.0-dev-1490) Fix compilation in the case of
JDK_16 pointing to JDK 1.8
- from v1.9.20:
- b0c5d26d9257 Add new JDK-21 List methods to HIDDEN_METHOD_SIGNATURES
Julien Plissonneau Duquène <sre4ever@free.fr> not-needed 2025-03-26
087-disable-dex-method-count.patch Disable the dex method count of kotlin-stdlib and kotlin-reflect (dex-method-list is not packaged) Emmanuel Bourg <ebourg@apache.org> not-needed
088-disable-idea-ext.patch Disable the IntelliJ integration with gradle-idea-ext (not packaged) Emmanuel Bourg <ebourg@apache.org> not-needed
089-native-platform-linux-only.patch Use only the Linux amd64 variant of native-platform (the other variants are not packaged) Emmanuel Bourg <ebourg@apache.org> not-needed
090-excluded-test-projects.patch Remove the references to the test and example projects not built Emmanuel Bourg <ebourg@apache.org> not-needed
091-disable-test-generators.patch Disable the test generators (the generators project is not built) Emmanuel Bourg <ebourg@apache.org> not-needed
092-build-version-without-ide-plugin.patch Write the plugin version in the root project instead of the IntelliJ plugin (not built) Emmanuel Bourg <ebourg@apache.org> not-needed
076-cve-2020-29582.patch fix CVE-2020-29582
Backports the following commits where applicable:
- 219c200627d1 Native: Use NIO Files.createTemp*() in favor of
File.createTemp*() extension functions
- 39ca1b45b5ba Use NIO Files for creating temp files: build tools
- 0c5c194c17cf Use NIO Files for creating temp files: scripting, daemon,
main-kts
- be704622cbec Use NIO Files for creating temp files: idea plugin

Note that kotlin-stdlib kotlin.io.createTempFile() and createTempDir() were
merely deprecated with Kotlin 1.4.30 and not fixed upstream; their use is still
as safe or unsafe as the underlying java.io.File.createTempFile()
implementation. See log of: libraries/stdlib/jvm/src/kotlin/io/files/Utils.kt
yes debian upstream backport 2025-03-26
077-java23-compatibility.patch Fix the compilation of the kapt3 plugin with Java 23 and later JDK 23 introduced the Markdown documentation comments (JEP 467) and modified
the internal javac API used by kapt3 to generate the Java stubs:
.
- Tokens.Comment.CommentStyle.JAVADOC was renamed to JAVADOC_BLOCK
- Tokens.Comment gained the getPos() and stripIndent() methods
- DocCommentTable gained the getCommentKind() method
.
The comment style is resolved by name at runtime, such that the compiler built
with the current default JDK still works when running on an older JRE.
Emmanuel Bourg <ebourg@apache.org> not-needed 2026-09-21
078-intellij-sdk-local-repository.patch Use the IntelliJ jars of the local repository prepared by debian/rules instead of downloading the IntelliJ SDK and the Android dx tool. Its modules
are resolved without ivy descriptor.
Emmanuel Bourg <ebourg@apache.org> not-needed
079-protobuf-local-repository.patch Use the protobuf library built by debian/rules Emmanuel Bourg <ebourg@apache.org> not-needed
080-shadow-relocated-classes.patch Use jdom2 and the zip classes of Ant instead of the copies relocated in the shadow plugin Emmanuel Bourg <ebourg@apache.org> not-needed
081-disable-dokka-documentation.patch Don't generate the documentation with dokka (not packaged) Emmanuel Bourg <ebourg@apache.org> not-needed
082-disable-publication.patch Neither publish the modules nor generate their javadoc Emmanuel Bourg <ebourg@apache.org> not-needed
083-intellij-sdk-jars.patch Use only the jars of the IntelliJ SDK available in Debian Emmanuel Bourg <ebourg@apache.org> not-needed
084-kotlinx-group-id.patch Publish kotlinx-metadata and kotlin-serialization-compiler under the org.jetbrains.kotlinx groupId Emmanuel Bourg <ebourg@apache.org> not-needed
085-build-version.patch Use the version of Kotlin being built instead of the snapshot version Emmanuel Bourg <ebourg@apache.org> not-needed
086-default-jdk.patch Use the default JDK to run Gradle and to compile all the modules Emmanuel Bourg <ebourg@apache.org> not-needed

All known versions for source package 'kotlin'

Links