DFSG NEW Queue

DFSG, Licensing & New Packages Team

Review: golang-github-saintfish-chardet 0.0~git20230101.5e3ef4b+dfsg-1

Package Information

Descriptioncharacter set detection library ported from ICU (library)

Character set detection library for Go, ported from the detection algorithm and statistical data of the International Components for Unicode (ICU) project. Given a byte slice it returns ranked guesses of the text's encoding and language, each with a confidence score.

Separate detectors are provided for plain text and for HTML, the latter ignoring markup when scoring. Recognisers cover the single-byte ISO-8859 and windows-125x families, UTF-8, UTF-16/32 with and without BOM, ISO-2022, and the CJK multi-byte encodings Big5, GB18030, EUC-JP, EUC-KR and Shift_JIS.

MaintainerDebian Go Packaging Team <team+pkg-go@tracker.debian.org>
Changed ByJuan Manuel Méndez Rey <juan.mendezr@proton.me>
Sponsortsimonq2@debian.org
Distributionunstable
Architectureall
VCSgit: https://salsa.debian.org/go-team/packages/golang-github-saintfish-chardet.git (browse)
Closes#1148635
Trackerhttps://tracker.debian.org/pkg/golang-github-saintfish-chardet
Uploaded11 days ago

New Package Report

.changes◂
DateTue, 22 Sep 2026 02:39:05 +0200
Sourcegolang-github-saintfish-chardet
Version0.0~git20230101.5e3ef4b+dfsg-1
Changed-ByJuan Manuel Méndez Rey <juan.mendezr@proton.me>
Architecturesource all
Distributionunstable
Changelog◂
golang-github-saintfish-chardet (0.0~git20230101.5e3ef4b+dfsg-1) unstable; urgency=medium
 .
   * Initial release (Closes: #1148635)
.dsc◂
Priorityoptional
Componentmain
Package-Listgolang-github-saintfish-chardet-dev deb golang optional arch=all
Sectiongolang
debian/copyright◂
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/saintfish/chardet
Upstream-Name: chardet
Upstream-Contact: yusheng.sjtu@gmail.com
Files-Excluded:
 testdata
Comment: The excluded directory holds 13 scraped copies of live third-party web
 pages (Amazon, MercadoLibre, Orange.fr, Virk.dk, Wikipedia and others), about
 1.1 MB, carried as encoding-detection fixtures with no licence grant of any
 kind. The same content is excluded the same way from the existing Debian
 package golang-github-gogits-chardet, which forks this code. The tests that
 read them are skipped; see debian/rules.

Files: *
Copyright: 2012 chardet Authors
 1995-2012 International Business Machines Corporation and others
License: Expat and ICU
Comment: The upstream LICENSE grants Expat and then states: "Partial of the
 Software is derived from ICU project. See icu-license.html for license of the
 derivative portions." Upstream does not identify which files are the derived
 ones, so the union of both licences is declared for the whole tree. The
 detection tables in the recogniser sources are the portions derived from ICU.

Files: icu-license.html
Copyright: 1995-2012 International Business Machines Corporation and others
License: ICU

Files: debian/*
Copyright: 2026 Juan Manuel Méndez Rey <juan.mendezr@proton.me>
License: Expat
Comment: Debian packaging is licensed under the same terms as upstream

License: Expat
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:
 .
 The above copyright notice and this permission notice shall be included in all
 copies or substantial portions of the Software.
 .
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.

License: ICU
 COPYRIGHT AND PERMISSION NOTICE
 .
 Copyright (c) 1995-2012 International Business Machines Corporation and others
 All rights reserved.
 .
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, and/or sell copies of the
 Software, and to permit persons to whom the Software is furnished to do so,
 provided that the above copyright notice(s) and this permission notice appear
 in all copies of the Software and that both the above copyright notice(s) and
 this permission notice appear in supporting documentation.
 .
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE
 LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .
 Except as contained in this notice, the name of a copyright holder shall not
 be used in advertising or otherwise to promote the sale, use or other dealings
 in this Software without prior written authorization of the copyright holder.

DFSG Assistant LLM REVIEW 0 blocker, 0 important, 1 minor

This is an LLM based review using a Debian Inference based workflow. It was not written by a member of the DFSG team and has not been checked by one. It is not a decision on the package: it may be wrong, and it may have missed things.

Reviewed 10 days ago.

Report◂

DFSG NEW review for golang-github-saintfish-chardet version 0.0~git20230101.5e3ef4b+dfsg-1

Summary

  • Licensing is DFSG-compliant and debian/copyright is accurate: Yes
  • Packaging is of good quality: Yes
  • Issues: 0 blocker, 0 important, 1 minor
  • debian/watch: version 5
  • debian/copyright: machine-readable
  • Scan before the review: nothing found

Licensing

DFSG-free and accurately described. The only licences are Expat (LICENSE, Copyright (c) 2012 chardet Authors) and the ICU licence (icu-license.html, IBM 1995-2012); both are free and mutually compatible, and both texts, neither of which is in /usr/share/common-licenses, are reproduced in full in a valid DEP-5 debian/copyright. The IBM holder the prescan check looked for is named in the Files: * Copyright and given its own Files: icu-license.html stanza, and Files-Excluded: testdata matches a directory that is indeed absent from the orig tarball. No unlicensed, non-free or built-without-source file was found.

Packaging

Recognisably pkg-go packaging: debhelper compat 14 through dh-go, dpkg-build-api 1, Architecture: all with Multi-Arch: foreign, Testsuite: autopkgtest-pkg-go, a DEP-3 patch adding the missing go.mod, source format 3.0 (quilt), a sane initial unstable changelog, Standards-Version 4.7.4 (Policy 4.7.4.1) and Vcs-*/Homepage/XS-Go-Import-Path. The one defect is a gbp.conf key that is not a distribution. Two risks could not be confirmed here: a possible file collision with the existing golang-github-gogits-chardet-dev fork, and whether dh-go's dh_golang_autopkgtest resolves the rules' non-default debian/_build build directory.

Issues

minor packaging 1. debian/gbp.conf sets dist = DEP-14, which is not a distribution ◂
  • Files: debian/gbp.conf:3
  • Basis: checked, in the package or with a reference tool
  • Evidence: [DEFAULT] / debian-branch = master / dist = DEP-14; gbp.conf(5) says a gbp buildpackage key is its option with the --git- prefix stripped, and gbp-buildpackage(1) documents --git-dist=DIST as Build for distribution DIST when using git-pbuilder.
  • Problem: DEP-14 is Debian's branch-naming policy, not a Debian suite, so the key is handed to git-pbuilder as the pbuilder/cowbuilder distribution: gbp buildpackage --git-pbuilder would look for a DEP-14 chroot and fail. It also cannot do what it appears to be meant for, since gbp already follows the DEP-14 layout by default, so the line only misleads the next maintainer.
  • Fix: Delete the dist line, or set a real suite such as dist = unstable.
Verified ◂
  • Read every file under debian/ (control, rules, changelog, copyright, docs, gbp.conf, salsa-ci.yml, gitlab-ci.yml, lrc.config, source/format, source/lintian-overrides, patches/series and 0001-add-go-mod.patch, upstream/metadata), and every upstream file in full except single_byte.go and multi_byte.go, whose heads and provenance I read and whose contents I grepped; the whole tree was grepped for copyright, licence and provenance wording.
  • Tree inventory: the orig tarball holds 13 files (2022.go, AUTHORS, detector.go, detector_test.go, example_test.go, icu-license.html, LICENSE, multi_byte.go, README.md, recognizer.go, single_byte.go, unicode.go, utf8.go); the unpacked tree adds only go.mod, which comes from debian/patches/0001-add-go-mod.patch. testdata/ is absent, exactly as Files-Excluded: testdata declares, so the excluded files' licensing cannot affect the package.
  • Licence evidence: no .go file carries a copyright or licence header; the only licence statements in the tree are LICENSE (Expat, Copyright (c) 2012 chardet Authors, plus the pointer to icu-license.html) and icu-license.html (ICU License, Copyright (c) 1995-2012 International Business Machines Corporation and others). Both licences are free and compatible, and debian/copyright reproduces both texts completely; neither is in /usr/share/common-licenses, so including them is required.
  • Prescan: the author check reports no missing holder (14 files scanned, 3 holders declared). The IBM notice it looked for at icu-license.html:14 is now in the Files: * Copyright and in the dedicated Files: icu-license.html stanza with License: ICU.
  • debian/copyright is DEP-5 with the canonical Format: URI: header Comment and Files-Excluded are permitted (copyright-format 5.1, 6.6), the specific icu-license.html and debian/* stanzas follow Files: * so they override it (copyright-format 6.9), and both short names used (Expat, ICU) have stand-alone paragraphs.
  • single_byte.go:782-881 holds the charMap_/ngrams_ tables the copyright comment attributes to ICU's data; there is no generated/DO-NOT-EDIT marker and no go:generate, and no generator input is referenced. The tree contains only text files - Go source, Markdown, the HTML licence and control/changelog/YAML - with no binaries, fonts, images, PDFs, minified code or archives.
  • debian/lrc.config is the per-package licenserecon configuration (documented in /usr/share/doc/licenserecon/ReadMe and /usr/share/lrc/lrc.config); Expat and ICU | ICU is a licence-name alias for what licensecheck reports for icu-license.html, not an exclusion that hides a mismatch.
  • Build dependencies exist: dh-go 1.69 (provides the golang addon, buildsystem and dh_golang_autopkgtest; Conflicts dh-golang and Provides no dh-sequence-golang, so the source/lintian-overrides entry is justified), dpkg-build-api (= 1) from dpkg-dev 1.23.11, and golang-any 2:1.27~1. The source imports only the standard library and its own module path, so go.mod correctly needs no require.
  • Standards-Version 4.7.4 against Policy 4.7.4.1 is current (first two components equal). At compat 14 the bare Depends: ${misc:Depends}, is complete, and dpkg-build-api 1 makes Rules-Requires-Root default to no.
  • The one patch has a DEP-3 header (Description, Author, Forwarded: not-needed, Last-Update), adds only a three-line go.mod, is listed in patches/series and is applied in the tree. XS-Go-Import-Path matches the module path; Homepage, Vcs-Git/Vcs-Browser, Section: golang, Architecture: all and Multi-Arch: foreign are consistent with pkg-go practice.
  • The rules' test override passes -skip TestDetector (a Go >= 1.20 flag; golang-any here is 1.27), so build-time go test skips the testdata-reading detector test and still runs ExampleTextDetector, and the comment and debian/copyright give the same reason. The installed dh_golang_autopkgtest rebuilds through make -f debian/rules build, so the override also governs its test step - subject to the build-directory question under Not confirmed.
  • No maintainer scripts and no debian/tests/ (Testsuite: autopkgtest-pkg-go with autodep8's go template is the pkg-go mechanism); source format 3.0 (quilt); the changelog is a single unstable initial entry closing the ITP, with a version matching the dsc.
  • uscan found the packaged version as the newest upstream release (upstream 0.0~git20230101.5e3ef4b, packaged 0.0~git20230101.5e3ef4b+dfsg).
Not confirmed ◂
  • golang-github-gogits-chardet-dev Provides golang-github-saintfish-chardet-dev (apt-cache) and its description links godoc.org/github.com/saintfish/chardet, which suggests it installs sources under /usr/share/gocode/src/github.com/saintfish/chardet. If it does, the two packages install the same path with different contents and this package declares no Replaces/Breaks/Conflicts; I could not list that package's files to decide it.
  • Whether the autopkgtest can build this package: the installed dh_golang_autopkgtest (from dh-golang 1.67, /usr/bin/dh_golang_autopkgtest) computes APT_BDIR as load_buildsystem('golang')->get_builddir(), which is the compat-14 default _build (Buildsystem/golang.pm DEFAULT_BUILD_DIRECTORY, Dh_Buildsystems.pm), while debian/rules builds in debian/_build; its added override would populate _build and dh_auto_build would then fail with chdir("debian/_build") failed. dh-go 1.69, which autopkgtest would install through Build-Depends, ships its own copy of the script that was not readable here; a test run would show whether it shares this, and using the default _build in debian/rules would remove the risk.
Proposed changes ◂

None.

Uploader's response to the LLM review

Thanks, this will go into the next revision

— Juan Manuel Méndez Rey (mendezr), 10 days ago

Finally, I am dropping the line, though not for that reason. DEP-14 is a documented value for gbp's --git-dist
and gbp accepts both spellings at gbp/scripts/buildpackage.py:212.

It's useless here all the same, so it goes in https://salsa.debian.org/go-team/packages/golang-github-saintfish-chardet/-/merge_requests/8 .

Reported the rule itself at https://salsa.debian.org/dfsg-team/dfsg-new-queue/-/issues/59

So, please, have a look to the issue reported.

— Juan Manuel Méndez Rey (mendezr), 10 days ago

Review Information

accepted — allocated to awm 10 days ago, started 10 days ago, completed 10 days ago.

Final Comment

Hi,

The issue the LLM identified looks like it should be fixed.

Thanks!

Other Reviews of this Package

VersionHashAllocatedCompletedReviewerStatusDetails
0.0~git20230101.5e3ef4b+dfsg-1 ab043078… 2026-10-28 00:36 2026-10-28 00:36 dfsg-uploader rejected VIEW

Back to Dashboard | View all reviews for this package