diff --git a/debian/changelog b/debian/changelog
index e3950d179ff91cb1a7690c81b1e3ebe38e06fccf..1df3a7433f6eff57caa75e4d6e1f1b5da4cc4bb1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xraylib (4.0.0+dfsg1-4) UNRELEASED; urgency=medium
+
+  * Trim trailing whitespace.
+  * Set upstream metadata fields: Repository-Browse.
+  * Update standards version to 4.6.2, no changes needed.
+  * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Mon, 06 Mar 2023 21:13:39 -0000
+
 xraylib (4.0.0+dfsg1-3) unstable; urgency=medium
 
   * Applied MR from Adrian Bunk to workaround address space limitations on
diff --git a/debian/control b/debian/control
index 7b8d03fab9f5980de39fbc6486806c4901da3ab0..971577624b9f359be0f6c22582958d7e9a240732 100644
--- a/debian/control
+++ b/debian/control
@@ -6,11 +6,11 @@ Uploaders:
  Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>,
  Freexian Packaging Team <team+freexian@tracker.debian.org>,
  Picca Frédéric-Emmanuel <picca@debian.org>
-Build-Depends: 
+Build-Depends:
  debhelper-compat (= 13), dh-sequence-python3, dh-sequence-numpy3, python3-dev,
  python3-numpy, swig, cython3, pkg-config,
  dh-python, meson
-Standards-Version: 4.6.0
+Standards-Version: 4.6.2
 Homepage: https://github.com/tschoonj/xraylib
 Vcs-Browser: https://salsa.debian.org/science-team/xraylib
 Vcs-Git: https://salsa.debian.org/science-team/xraylib.git
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000000000000000000000000000000000000..00d94c51b05e61b99235b494a9042677a6c4137e
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,5 @@
+---
+Bug-Database: https://github.com/tschoonj/xraylib/issues
+Bug-Submit: https://github.com/tschoonj/xraylib/issues/new
+Repository: https://github.com/tschoonj/xraylib.git
+Repository-Browse: https://github.com/tschoonj/xraylib