[Git][java-team/scala3][debian/latest] Remove redundant debian/upstream/metadata and default maven.rules; shorten README.source

Juan Manuel Méndez Rey (@mendezr) gitlab at salsa.debian.org
Tue Nov 3 03:18:57 GMT 2026



Juan Manuel Méndez Rey pushed to branch debian/latest at Debian Java Maintainers / scala3


Commits:
865c597d by Juan Manuel Méndez Rey at 2026-11-03T01:15:13+01:00
Remove redundant debian/upstream/metadata and default maven.rules; shorten README.source

- - - - -


3 changed files:

- debian/README.source
- debian/maven.rules
- − debian/upstream/metadata


Changes:

=====================================
debian/README.source
=====================================
@@ -1,70 +1,6 @@
 scala3 for Debian
 =================
 
-This is Scala 3, packaged next to scala (Scala 2.12) and scala-2.13. All
-three can be installed together: the jars carry versioned names
-(scala-library-3.9.0.jar, with series links such as scala-library-3.jar),
-the Maven repository holds the 3.9.0 and 3.x versions, the commands are
-scalac-3 and scala-3, and /usr/bin/scala and /usr/bin/scalac are
-update-alternatives (priority 3090, above scala-2.13's 2133), pointing at
-the newest series installed.
-
-Scope
------
-
-The binary packages hold the compiler (scala3-compiler_3,
-scala3-interfaces, tasty-core_3, scala3-staging_3,
-scala3-tasty-inspector_3), the interactive shell (scala3-repl_3 and the
-scala3-directives-parser_3 it uses), the compiler bridge for sbt's Zinc
-(scala3-sbt-bridge) and the standard library (scala-library 3.9.0 and
-the empty scala3-library_3 that depends on it). In /usr/share/java the
-names drop the "_3" Maven suffix (scala3-compiler-3.9.0.jar,
-scala3-repl-3.9.0.jar, ...); the empty scala3-library_3 jar is only in
-the Maven repository, where it is needed. scaladoc (scaladoc_3, in
-/usr/share/java as scaladoc-3.9.0.jar) is in a package of its own,
-scala3-scaladoc, because it brings flexmark, Liqp, jsoup and Jackson 3,
-which the compiler does not need. Its command scaladoc-3 (also
-/usr/bin/scaladoc, a slave of the scala alternative) and manual page
-are in scala3, so every slave of the group always has its target;
-without scala3-scaladoc the command says which package to install,
-and scala3 Suggests it. Its Scala.js front
-end is built at package build time with Debian's Scala.js (src:scala-js,
-see "scaladoc" below). Not packaged yet: the presentation compiler and
-language server.
-
-The REPL and the bridge are in the scala3 binary package, not in
-packages of their own: the REPL is what scala-3 starts when it has no
-program to run (as scala does for Scala 2), the bridge is a 60 kB jar
-that needs nothing scala3 does not already depend on, and both are built
-from the same source in the same passes as the compiler they run on. The
-REPL brings the dependency on JLine 4 (libjline4-java, with its JNI
-library libjline4-jni), which is co-installable with JLine 3.
-
-Upstream's `scala` command is Scala CLI since 3.5, which cannot be packaged
-here. The scala-3 command is instead written for Debian
-(debian/scala-runner): with a main class it runs a compiled program with
-the Scala 3 standard library on the class path; with none (or with
-compiler options) it starts the REPL, as upstream's own launcher did
-before 3.5 (dotty.tools.repl.Main -usejavacp); -version prints the
-library version. There is no script mode. scala-3 exists as a command
-because scala-2.13 and scala make /usr/bin/scalac a slave of the
-/usr/bin/scala alternative, so a Scala 3 scalac can only take part in
-update-alternatives through a scala command. While scala3 is the selected
-alternative, /usr/bin/fsc, scalap and scaladoc of the other series are not
-linked; they remain available as fsc-2.13, scalap-2.13 and so on.
-
-The REPL's :dep command, which downloads libraries from Maven Central
-with Coursier, is disabled (debian/patches/0002): it says that the jars
-can be put on the class path instead (scala-3 -cp, or :jar in the REPL).
-
-The manual pages scalac-3(1), scala-3(1) and scaladoc-3(1) are written
-for Debian; upstream has no manual page sources for Scala 3.
-
-update-alternatives warns about a slave whose file is missing (and
-calls the group broken when the file comes or goes later), so the
-scaladoc command and its manual page, the targets of two slaves, are in
-scala3 and not in scala3-scaladoc.
-
 Source: four orig tarballs
 --------------------------
 
@@ -72,48 +8,29 @@ debian/watch (format 5) produces all four with uscan, and debian/gbp.conf
 names the three components for gbp import-orig and export-orig.
 
  * scala3_<v>+ds.orig.tar.xz: tag <v> of https://github.com/scala/scala3,
-   repacked (+ds) to drop the Files-Excluded entries of debian/copyright
-   (prebuilt jars, class and TASTy files, minified JavaScript and CSS, fonts
-   under a non-free licence or without source, PDFs without source).
+   repacked (+ds) to drop the Files-Excluded entries of debian/copyright.
 
- * scala3_<v>+ds.orig-scalajs-ir.tar.xz (component scalajs-ir): the ir/
-   directory, LICENSE and NOTICE of tag v1.22.0 of
-   https://github.com/scala-js/scala-js. The compiler embeds the Scala.js
-   IR as source: upstream's build fetches the scalajs-ir_3 sources jar
-   (project/Dependencies.scala, scalaJsIr) and moves it to the package
-   dotty.tools.sjs.ir. That jar is exactly ir/shared/src/main/scala,
-   ir/shared/src/main/scala-3 and ir/jvm/src/main/scala of the tag
-   (byte-identical, checked against scalajs-ir_3-1.22.0-sources.jar from
-   Maven Central). The _2.13 variant differs in Nullables.scala and does not
-   compile under -Yexplicit-nulls.
+ * scala3_<v>+ds.orig-scalajs-ir.tar.xz (component scalajs-ir): ir/,
+   LICENSE and NOTICE of tag v1.22.0 of https://github.com/scala-js/scala-js.
+   Upstream's build embeds the scalajs-ir_3 sources jar, which is exactly
+   ir/shared/src/main/scala, ir/shared/src/main/scala-3 and
+   ir/jvm/src/main/scala of that tag.
 
  * scala3_<v>+ds.orig-scala213-library.tar.xz (component
    scala213-library): src/library, LICENSE and NOTICE of tag v2.13.18 of
-   https://github.com/scala/scala, the Scala 2 version pinned in
-   project/Versions.scala (scala2Version). See "Standard library patch".
+   https://github.com/scala/scala (scala2Version in project/Versions.scala).
 
- * scala3_<v>+ds.orig-scalajs-dom.tar.xz (component scalajs-dom): the
-   dom/ directory, LICENSE and README.md of tag v2.8.1 of
-   https://github.com/scala-js/scala-js-dom, the DOM facades scaladoc's
-   Scala.js front end is compiled against (upstream's build takes
-   scalajs-dom_sjs1_3 from Maven Central). It is a component and not a
-   package of its own because building it needs a Scala 3 compiler with
-   the Scala.js back end, that is scala3 itself.
-   Its Scaladoc comments are MDN documentation under CC-BY-SA 2.5 or later
-   (scala-js-dom's LICENSE), so the tarball is made without them. After
-   uscan, run
+ * scala3_<v>+ds.orig-scalajs-dom.tar.xz (component scalajs-dom): dom/,
+   LICENSE and README.md of tag v2.8.1 of
+   https://github.com/scala-js/scala-js-dom, the DOM facades of scaladoc's
+   Scala.js front end. Its Scaladoc comments are MDN text under CC-BY-SA,
+   so after uscan and before gbp import-orig run
 
      debian/repack-scalajs-dom ../scala3_<v>+ds.orig-scalajs-dom.tar.xz
 
-   before importing it (gbp import-orig). The script blanks every
-   /** ... */ comment and keeps line and column numbers, so the code, the
-   Scala.js IR and the linked scaladoc-scalajs.js are the same as with the
-   comments (checked byte for byte). It also drops MDN's "deprecated"
-   banner sentence from two @deprecated messages. Other comments, strings
-   and files are untouched, and the tarball is rewritten reproducibly. It is a separate
-   step because uscan has no per-component repack hook (Files-Excluded
-   works on whole files, Update-Script runs for the whole package);
-   pristine-tar holds the stripped tarball.
+   It blanks every /** ... */ comment keeping line and column numbers
+   (the compiled output does not change) and rewrites the tarball
+   reproducibly. pristine-tar holds the stripped tarball.
 
 The three components are pinned in debian/watch to the versions the main
 source pins; update the Matching-Pattern lines when upstream changes
@@ -122,205 +39,86 @@ scalaJSVersion, scala2Version or scalaJsDomVersion.
 Two-pass self-host build (no sbt)
 ---------------------------------
 
-debian/build-driver.sh compiles the modules of the first upload in
-dependency order (scala3-interfaces, scala-library, tasty-core,
-scala3-compiler, scala3-staging, scala3-tasty-inspector, then
-scala3-directives-parser, scala3-repl and scala3-sbt-bridge) straight
-with a Scala 3 compiler, with the scalac and javac options of upstream's
-sbt build (project/Build.scala), and assembles the jars with upstream's
-manifests. The last three are built only in the bootstrapped passes, as
-upstream builds them only with its own 3.x compiler. scaladoc is built
-only in the pass whose jars are shipped (SCALADOC=yes).
-debian/rules runs it twice:
+debian/build-driver.sh compiles the modules in dependency order with a
+Scala 3 compiler, with the options of upstream's project/Build.scala, and
+assembles the jars with upstream's manifests. scala3-directives-parser,
+scala3-repl and scala3-sbt-bridge are built only in bootstrapped passes,
+and scaladoc only in the shipped pass. debian/rules runs it twice and
+installs only the pass-2 jars:
 
   pass 1: compiler = scala3 from the archive -> debian/buildout1
   pass 2: compiler = the pass-1 jars          -> debian/buildout2
 
-Only the pass-2 jars are installed. The source package contains no prebuilt
-jar, class or TASTy file.
-
-The Scala.js IR sources are moved to package dotty.tools.sjs.ir at build
-time by the driver, with the same one-line rule as upstream's
-project/Shading.scala (the first "package" line is rewritten, imports are
-left alone), into the directory sbt generates them in, so that the TASTy
-files record the same source paths as upstream's.
-
-Version strings: the compiler of the last pass writes its version into
-every TASTy file of the shipped jars. Upstream publishes jars built by its
-non-bootstrapped compiler, whose version is "<v>-bin-nonbootstrapped", so
-the intermediate compilers here carry that version too and the TASTy
-files match upstream's. The shipped jars say <v> (scalac-3 -version).
+The driver moves the Scala.js IR sources to package dotty.tools.sjs.ir,
+as project/Shading.scala does. The intermediate compilers carry the
+version "<v>-bin-nonbootstrapped", like upstream's, so the TASTy files
+match upstream's.
 
 Standard library patch
 ----------------------
 
-Upstream replaces about 50 classes of the Scala 3 standard library (and
-their nested classes: Function0-2, Tuple1-2, Product1-2, the steppers and
-accumulators, Range, MurmurHash3, ...) with the bytecode Scala 2.13
-generates for them, and adds the classes Scala 2.13 generates that Scala 3
-does not (specialized variants), stripping the Scala 2 pickles and adding
-TASTy and Scala attributes (project/ScalaLibraryPlugin.scala,
-project/StripScala2Annotations.scala). This keeps scala-library 3.x
-binary compatible with 2.13.
-
-The Debian build does the same without sbt:
+As upstream (project/ScalaLibraryPlugin.scala), about 50 classes of the
+Scala 3 standard library are replaced with the bytecode Scala 2.13
+generates for them, to keep scala-library 3.x binary compatible with 2.13:
 
  * debian/build-scala2-library.sh compiles the scala213-library component
-   with scalac 2.13 from the scala-2.13 package, with the options of
-   upstream's scala2-library project (-release:17 -opt:local);
- * debian/PatchStdlib.java, a Java port of the two sbt plugin files above,
-   applies the patch; the list of classes is read at build time from
+   with scalac 2.13 from scala-2.13 (-release:17 -opt:local);
+ * debian/PatchStdlib.java, a Java port of upstream's two sbt plugin
+   files, applies the patch with the class list of
    project/ScalaLibraryFilesToCopy.scala.
 
-With scala-2.13 2.13.18 the 471 patched classes (419 replaced, 52 added)
-are byte-identical to the ones in upstream's scala-library-3.9.0.jar. The
-classes in the scala-library-2.13 package cannot be used instead: they
-target Java 8 and are built without -opt:local.
+With scala-2.13 2.13.18 the patched classes are byte-identical to
+upstream's scala-library-3.9.0.jar.
 
-Stage-0 bootstrap seed (provenance and reproducibility)
--------------------------------------------------------
+scaladoc front end
+------------------
 
-Scala 3 can only be compiled by a Scala 3 compiler, so the very first build
-needs a seed, as for every self-hosting compiler in Debian. It is the only
-non-source input, it is used once, and it is never part of the source
-package or of any binary package.
+debian/build-scaladoc-js.sh (run by the driver) builds scaladoc-scalajs.js
+and contributors.js from source: scala-library-sjs, the scalajs-dom
+component and scaladoc-js, compiled by the pass-2 compiler with -scalajs
+and linked by scalajs-link (src:scala-js) with fullLinkJS settings. The
+CSS bundles are made with the files in sorted order. d3, graphlib-dot,
+dagre-d3 and highlight.js are copied from their Debian packages and
+recorded in Static-Built-Using.
 
-The seed is exactly the reference compiler upstream itself pins for this
-release, in project/Versions.scala at the packaged tag:
-
-  val referenceVersion = "3.8.4"
+Stage-0 bootstrap seed
+----------------------
 
-i.e. upstream's own published 3.8.4 jars:
+The first build needs a Scala 3 compiler. The seed is the reference
+compiler upstream pins in project/Versions.scala at the packaged tag
+(referenceVersion = "3.8.4"), as published on Maven Central:
 
   https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.8.4/scala3-compiler_3-3.8.4.jar
-    sha1   fd73bbbad42749465ad03a55fec3115657bf6f77
     sha256 740be02b51e815ef2a927a422d61fd851e25403655fb9ee2e076b4f9ce1fb34e
   https://repo1.maven.org/maven2/org/scala-lang/scala3-interfaces/3.8.4/scala3-interfaces-3.8.4.jar
-    sha1   82aad3e62ec2486d3d932da97ce328a31603593e
     sha256 eac968f8ff5f7aed55fb9ffb535bb6effaef4c9d3d8593a45b6dd98b7ce0b9d9
   https://repo1.maven.org/maven2/org/scala-lang/tasty-core_3/3.8.4/tasty-core_3-3.8.4.jar
-    sha1   706998b3a218f2977bc60c43db25e3db7090581d
     sha256 eaea300a6fa4ccd24c979f76e1356b10b27151b395ad3249f9ad8afb4ba8ae20
   https://repo1.maven.org/maven2/org/scala-lang/scala-library/3.8.4/scala-library-3.8.4.jar
-    sha1   e44f14c38dba7da4d7050cbf72fbf9dcbb6f9e7d
     sha256 1b8330de5774c15874173f168b674255caa00c5ef3648ab0b6cb763bb7fd2de7
 
-The sha1 values are the ones Maven Central publishes next to each jar.
-The seed runs with Debian's scala-asm and sbt compiler-interface jars.
-
-With sbuild, debian/make-stage0-deb downloads the jars, checks the
-checksums and builds a local-only scala3-stage0 .deb that installs them to
-/usr/share/scala3-stage0. That .deb is never uploaded:
+The seed runs with Debian's scala-asm and sbt compiler-interface jars, and
+is never part of the source package or of a binary package.
+debian/make-stage0-deb downloads the jars, checks them and builds a
+local-only scala3-stage0 .deb:
 
   debian/make-stage0-deb /tmp/stage0
   sbuild --profiles=pkg.scala.stage0 \
     --extra-package=/tmp/stage0/scala3-stage0_3.8.4_all.deb scala3_*.dsc
 
 Without a chroot, put the four jars (named scala3-compiler_3.jar,
-scala3-interfaces.jar, tasty-core_3.jar, scala-library.jar) in a directory
-and point SCALA3_STAGE0 at it:
+scala3-interfaces.jar, tasty-core_3.jar, scala-library.jar) in a directory:
 
   dpkg-buildpackage -Ppkg.scala.stage0 -d SCALA3_STAGE0=$HOME/scala3-stage0
 
-The stage0 profile runs one extra pass first (pass 0, from the seed, with
-upstream's non-bootstrapped options). A compiler built by the 3.8.4 seed
-is not yet a fixed point: it orders the forwarders of one export clause
-differently (dotty.tools.tasty.besteffort.BestEffortTastyFormat). The
-compiler it builds is, so the stage0 build ships the third generation, and
-a normal-profile build against the stage0 output produces the same jars.
-
-This is a NEW package, and NEW throws away the binaries of an accepted
-upload (https://wiki.debian.org/ThrowAwayNewBinaries), so the bootstrap
-takes three uploads: -1 stage0 source+binary to experimental, -2
-source+binary to unstable, -3 source-only. From then on the archive
-self-hosts and the seed is no longer used; the stage0 profile stays only to
-bootstrap new architectures.
-
-Debian changes
---------------
-
- * The Scala3InlineInfo attribute of a class depended on whether the
-   class was first seen from a generic signature or from its own code
-   generation, which varied from run to run, so the -opt build of the
-   standard library was not reproducible (a few classes such as
-   SortedMapOps and AnyAccumulator$ differed between two runs of the same
-   compiler). debian/patches/0001 builds it from the complete member list
-   in both cases; the result equals upstream's published jar for those
-   classes.
-
- * debian/patches/0002 removes the REPL's use of the Coursier interface
-   library (io.get-coursier:interface, not in Debian), with which the
-   :dep command downloaded dependencies from Maven Central at run time.
-   :dep now reports that dependency download is not available and that
-   the jars can be added to the class path. Nothing else in the REPL
-   changes.
-
- * debian/patches/0007 lets the sbt bridge build against sbt
-   compiler-interface 2.x (the one in Debian, used by sbt 2); it still
-   builds against 1.x.
-
-scaladoc
---------
-
-scaladoc is compiled like the other modules, from scaladoc/src plus the
-BuildInfo object sbt-buildinfo generates (written by the driver at sbt's
-path, with sbt-buildinfo's text), with -experimental as upstream. Its
-resources are scaladoc/resources plus what upstream's resource generators
-add (project/Build.scala, bundleCSS and generateStaticAssets): the CSS
-bundles, made with the files in sorted order (upstream takes file system
-order, so its bundles vary between machines), and four plain CSS files of
-scaladoc-js. Upstream's generateStaticAssets also puts two Scala.js
-bundles (scaladoc-scalajs.js, contributors.js) and a downloaded inkuire.js
-in the jar. The two bundles are built from source
-(debian/build-scaladoc-js.sh, run by debian/build-driver.sh):
-scala-library-sjs (the standard library compiled
-with -scalajs, patched with the Scala.js IR of the Scala 2.13 classes from
-scala-js-library, as ScalaLibraryPlugin does), scala-js-dom (component
-scalajs-dom) and scaladoc-js common/main/contributors, all compiled by the
-pass-2 compiler with -scalajs, then linked by scalajs-link (scala-js) with
-fullLinkJS settings and minified, as upstream. Upstream's files end with
-a sourceMappingURL comment for a source map that it does not ship either;
-that line is left out. Apart from it, contributors.js is identical to
-upstream's, and so is scaladoc-scalajs.js when linked with upstream's
-scalajs-dom IR; with scala-js-dom compiled from source here, two
-forwarders take their parameter names from the 3.9 standard library
-(dest/n, x$0) instead of the 3.1.3 one upstream's scalajs-dom jar was
-built against (xs/len, v1), and one function moves: same behaviour,
-47 bytes less. inkuire.js is a prebuilt program and is not shipped:
-
- * debian/patches/0003: scaladoc no longer copies Inkuire into the
-   documentation it writes. Missing: type-signature search.
-
- * debian/patches/0004: generated pages load nothing from other sites.
-   Upstream links d3, graphlib-dot and dagre-d3 from CDNs (type hierarchy
-   graph: now local files, see below) and Scastie's embedded.js in every
-   page (the snippet "run" button, now left out), and turns Markdown
-   emoji into images on a GitHub server (now Unicode characters).
-
- * debian/patches/0005: no dotty-icons font (generated, excluded from the
-   source); no page uses its glyph classes.
-
- * debian/patches/0006: the graph code in ux.js reads the zoom transform
-   from the event (d3 6 and later) or from d3.event (d3 5).
-
-The type hierarchy graph's three scripts are copied into scaladoc's
-resources by debian/build-driver.sh and written into every generated
-site, like scaladoc's own scripts: d3.min.js from node-d3 (5.16; upstream
-loads 6.7), graphlib-dot.min.js from node-graphlib-dot (0.6.4; upstream
-0.6.2) and dagre-d3.min.js from node-dagre-d3-renderer (dagre-d3 0.6.4
-API on dagre-d3-es; upstream 0.6.1). All three copies are recorded in
-Static-Built-Using. Rendered in chromium, a class page shows the same
-graph as with upstream's three scripts: same nodes, edges and labels,
-node positions equal to within a quarter of a pixel.
-
-highlight.pack.js (minified highlight.js 10.3.2, excluded from the
-source) is replaced in the jar by highlight.min.js of libjs-highlight.js
-(10.7.3), which highlights Scala 3 code identically with scaladoc's
-hljs-scala3.js; the copy is recorded in Static-Built-Using.
+The stage0 profile runs one extra pass first (pass 0, from the seed). The
+compiler the seed builds is not yet a fixed point (it orders the
+forwarders of one export clause differently), the next one is, so a
+normal build against the stage0 output produces the same jars.
 
-To compile scaladoc, the JetBrains annotations must be on the class path:
-flexmark marks its methods @NotNull with them, and without the annotation
-classes -Yexplicit-nulls treats those types as nullable and warns, which
--Werror turns into errors.
+NEW throws away binaries (https://wiki.debian.org/ThrowAwayNewBinaries), so
+the bootstrap takes three uploads: -1 stage0 source+binary to
+experimental, -2 source+binary to unstable, -3 source-only. After that the
+archive self-hosts and the stage0 profile is only for new architectures.
 
  -- Juan Manuel Méndez Rey <juan.mendezr at proton.me>


=====================================
debian/maven.rules
=====================================
@@ -1,8 +1,2 @@
 org.scala-lang * * s/3\..*/3.x/ * *
-org.scala-lang.modules scala-asm * s/.*/debian/ * *
-org.scala-sbt compiler-interface * s/.*/debian/ * *
 org.jline * * s/4\..*/4.x/ * *
-com.vladsch.flexmark * * s/.*/debian/ * *
-nl.big-o liqp * s/.*/debian/ * *
-org.jsoup jsoup * s/.*/debian/ * *
-tools.jackson.dataformat jackson-dataformat-yaml * s/.*/debian/ * *


=====================================
debian/upstream/metadata deleted
=====================================
@@ -1,6 +0,0 @@
----
-Bug-Database: https://github.com/scala/scala3/issues
-Bug-Submit: https://github.com/scala/scala3/issues/new
-Repository: https://github.com/scala/scala3.git
-Repository-Browse: https://github.com/scala/scala3
-Documentation: https://docs.scala-lang.org/scala3/



View it on GitLab: https://salsa.debian.org/java-team/scala3/-/commit/865c597dcf4431244fd4cb08588f669c34283b6d

-- 
View it on GitLab: https://salsa.debian.org/java-team/scala3/-/commit/865c597dcf4431244fd4cb08588f669c34283b6d
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20261103/e561aa61/attachment.htm>


More information about the pkg-java-commits mailing list