めんてなのおしごと

Sat, Jul 29, 2017 in debian

昨日の gnome-todo の続き。

lintian warningを確認。

W: gnome-todo: gir-section-not-libdevel usr/share/gir-1.0/Gtd-1.0.gir gnome
N: 
N:    GObject-Introspection XML files (/usr/share/gir-1.0/Foo-23.gir) must be
N:    made available in a development package in the libdevel section of the
N:    archive. This is normally the same libfoo-dev package that contains
N:    other development files.
N:    
N:    Refer to /usr/share/doc/gobject-introspection/policy.txt for details.
N:    
N:    Severity: normal, Certainty: certain
N:    
N:    Check: gir, Type: binary, source

/usr/share/gir-1.0/Gtd-1.0.gir が含まれてるのに section: gnome なgnome-todoパッケージはあかんやろ、と。これはlibdevelなlibgnome-todo-devを作って放り込め、ということだな。

W: gnome-todo: typelib-section-not-introspection usr/lib/x86_64-linux-gnu/girepository-1.0/Gtd-1.0.typelib gnome
N: 
N:    GObject-Introspection binary typelibs (Foo-23.typelib) should be made
N:    available in a GObject-Introspection package in the introspection
N:    section of the archive, normally named gir1.2-foo-23.
N:    
N:    Refer to /usr/share/doc/gobject-introspection/policy.txt for details.
N:    
N:    Severity: normal, Certainty: certain
N:    
N:    Check: gir, Type: binary, source

これも section: introspection なパッケージを作れ、と。どういう名前で作ればいいのかは他のを参考にしよう…

W: gnome-todo: gir-missing-typelib-dependency usr/share/gir-1.0/Gtd-1.0.gir gir1.2-gtd-1.0
N: 
N:    Development packages that contain GObject-Introspection XML files
N:    (/usr/share/gir-1.0/Foo-23.gir) must depend on the package containing
N:    the corresponding binary typelib, which is conventionally named
N:    gir1.2-foo-23. The dependency must be strictly versioned (for example
N:    gir1.2-foo-23 (= ${binary:Version}) when using debhelper).
N:    
N:    Please ignore and override this tag if the typelib is shipped in a
N:    package whose name does not match the typelib's machine-readable name,
N:    and the development package correctly depends on that package instead.
N:    For example, gir1.2-glib-2.0 is named for the GLib-2.0 typelib, but also
N:    contains the GObject-2.0 and Gio-2.0 typelibs, so it is correct that
N:    libglib2.0-dev depends on gir1.2-glib-2.0 but not on gir1.2-gobject-2.0
N:    or gir1.2-gio-2.0.
N:    
N:    Refer to /usr/share/doc/gobject-introspection/policy.txt for details.
N:    
N:    Severity: normal, Certainty: possible
N:    
N:    Check: gir, Type: binary, source

先程の section: introspection なパッケージはgir1.2-gtd-1.0でいいのか。で、それに対する依存関係を記述せよ、と。

W: gnome-todo: typelib-package-name-does-not-match usr/lib/x86_64-linux-gnu/girepository-1.0/Gtd-1.0.typelib gir1.2-gtd-1.0
N: 
N:    GObject-Introspection binary typelibs (Foo-23.typelib) should normally
N:    be made available in a package named gir1.2-foo-23.
N:    
N:    Please ignore and override this tag if the typelib is deliberately
N:    shipped in a package whose name does not match the typelib's
N:    machine-readable name. For example, gir1.2-glib-2.0 is named for the
N:    GLib-2.0 typelib, but also contains the GObject-2.0 and Gio-2.0
N:    typelibs; this is unconventional, but is allowed.
N:    
N:    Refer to /usr/share/doc/gobject-introspection/policy.txt for details.
N:    
N:    Severity: normal, Certainty: possible
N:    
N:    Check: gir, Type: binary, source

gir1.2-gtd-1.0 にtypelibを含めろ、と。

他のパッケージを参考に

正直lintianの指示は概念だけなので、実際にどう対処するかは既存パッケージを真似るのが手っ取り早い。

  • apt-cache pkgnames gir1.2- して適当なパッケージを探し、
  • apt source foobar してソースを眺めて記述を確認し、
  • debian/control.in にパッケージを追加。
  • debian/*.install を追加してどのファイルをどのパッケージに入れるかを決める

ここまででパッケージがビルドできるようになったが、piupartsで既存パッケージからのアップグレードが失敗するんじゃないかな〜と思って眠い頭で実行したらやっぱり失敗した。

   /tmp/apt-dpkg-install-g8TuRA/0-gir1.2-gtd-1.0_3.24.2-3_amd64.deb
   /tmp/apt-dpkg-install-g8TuRA/1-gnome-todo-common_3.24.2-3_all.deb
   /tmp/apt-dpkg-install-g8TuRA/2-libgnome-todo_3.24.2-3_amd64.deb

ふむ、前のgnome-todoと名前は違うのに同じファイルがあるから、ぶつかっちゃうよね。Conflicts:Breakes: の記述が必要だよな。多分 Breakes: が適当。これが完全にreplaceな場合は Replaces: を記述するのだけど、今回は部分的だからそれはなし。で、記述してもう一度piupartsを通す…通った。今回はかなり変更が大きいのでexperimentalにアップロードするようにしておく。NEW queueで数日待つことになるだろう。

作業結果

diff -Nru gnome-todo-3.24.2/debian/changelog gnome-todo-3.24.2/debian/changelog
--- gnome-todo-3.24.2/debian/changelog	2017-06-18 19:47:46.000000000 +0900
+++ gnome-todo-3.24.2/debian/changelog	2017-07-28 22:52:28.000000000 +0900
@@ -1,3 +1,12 @@
+gnome-todo (3.24.2-3) experimental; urgency=medium
+
+  * debian/patches
+    - add 0001-deal-with-appstream-metadata-in-legacy-location.patch 
+  * debian/{control.in,*.install}
+    - split gnome-todo package to several packages
+
+ -- Hideki Yamane <henrich@debian.org>  Fri, 28 Jul 2017 22:52:28 +0900
+
 gnome-todo (3.24.2-2) unstable; urgency=medium
 
   * Upload to unstable
diff -Nru gnome-todo-3.24.2/debian/control gnome-todo-3.24.2/debian/control
--- gnome-todo-3.24.2/debian/control	2017-06-18 19:47:46.000000000 +0900
+++ gnome-todo-3.24.2/debian/control	2017-07-28 22:52:28.000000000 +0900
@@ -6,7 +6,7 @@
 Section: gnome
 Priority: optional
 Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
-Uploaders: Andreas Henriksson <andreas@fatal.se>, Hideki Yamane <henrich@debian.org>, Michael Biebl <biebl@debian.org>
+Uploaders: Andreas Henriksson <andreas@fatal.se>, Hideki Yamane <henrich@debian.org>
 Build-Depends: debhelper (>= 10),
                autoconf-archive,
                gnome-pkg-tools,
@@ -30,6 +30,8 @@
 Architecture: any
 Depends: ${shlibs:Depends},
          ${misc:Depends},
+         gnome-todo-common,
+         libgnome-todo (= ${binary:Version}),
          evolution-data-server (>= 3.17.1),
          gsettings-desktop-schemas
 Description: minimalistic personal task manager designed to fit GNOME desktop
@@ -37,3 +39,56 @@
  the GNOME desktop. Designed from ground up to seamlessly integrate with
  the GNOME desktop environment, To Do enables you to be as productive as
  you want.
+
+Package: gnome-todo-common
+Architecture: all
+Depends: ${misc:Depends},
+Breaks: gnome-todo (<< 3.24.2-3)
+Description: common files for GNOME To Do
+ Library that provides GObject-based interface of GNOME To Do, simplistic
+ personal task manager designed to perfectly fit the GNOME desktop.
+ .
+ This package contains common files.
+
+Package: libgnome-todo
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends},
+Breaks: gnome-todo (<< 3.24.2-3)
+Description: library data for GNOME To Do
+ Library that provides GObject-based interface of GNOME To Do, simplistic
+ personal task manager designed to perfectly fit the GNOME desktop.
+ .
+ This package contains the library files.
+
+Package: libgnome-todo-dev
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends},
+         gir1.2-gtd-1.0 (= ${binary:Version}),
+Breaks: gnome-todo (<< 3.24.2-3)
+Description: development library data for GNOME To Do
+ Library that provides GObject-based interface of GNOME To Do, simplistic
+ personal task manager designed to perfectly fit the GNOME desktop.
+ .
+ This package contains the library development files.
+
+Package: gir1.2-gtd-1.0
+Section: introspection
+Architecture: any
+Depends: ${gir:Depends},
+         ${shlibs:Depends},
+         ${misc:Depends},
+Breaks: gnome-todo (<< 3.24.2-3)
+Description: GObject introspection data for GNOME To Do
+ GNOME To Do is a simplistic personal task manager designed to perfectly fit
+ the GNOME desktop. Designed from ground up to seamlessly integrate with
+ the GNOME desktop environment, To Do enables you to be as productive as
+ you want.
+ .
+ This package contains introspection data for GNOME To Do.
+ .
+ It can be used by packages using the GIRepository format to generate
+ dynamic bindings.
diff -Nru gnome-todo-3.24.2/debian/control.in gnome-todo-3.24.2/debian/control.in
--- gnome-todo-3.24.2/debian/control.in	2017-06-18 19:47:46.000000000 +0900
+++ gnome-todo-3.24.2/debian/control.in	2017-07-28 22:52:28.000000000 +0900
@@ -26,6 +26,8 @@
 Architecture: any
 Depends: ${shlibs:Depends},
          ${misc:Depends},
+         gnome-todo-common,
+         libgnome-todo (= ${binary:Version}),
          evolution-data-server (>= 3.17.1),
          gsettings-desktop-schemas
 Description: minimalistic personal task manager designed to fit GNOME desktop
@@ -33,3 +35,56 @@
  the GNOME desktop. Designed from ground up to seamlessly integrate with
  the GNOME desktop environment, To Do enables you to be as productive as
  you want.
+
+Package: gnome-todo-common
+Architecture: all
+Depends: ${misc:Depends},
+Breaks: gnome-todo (<< 3.24.2-3)
+Description: common files for GNOME To Do
+ Library that provides GObject-based interface of GNOME To Do, simplistic
+ personal task manager designed to perfectly fit the GNOME desktop.
+ .
+ This package contains common files.
+
+Package: libgnome-todo
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends},
+Breaks: gnome-todo (<< 3.24.2-3)
+Description: library data for GNOME To Do
+ Library that provides GObject-based interface of GNOME To Do, simplistic
+ personal task manager designed to perfectly fit the GNOME desktop.
+ .
+ This package contains the library files.
+
+Package: libgnome-todo-dev
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends},
+         gir1.2-gtd-1.0 (= ${binary:Version}),
+Breaks: gnome-todo (<< 3.24.2-3)
+Description: development library data for GNOME To Do
+ Library that provides GObject-based interface of GNOME To Do, simplistic
+ personal task manager designed to perfectly fit the GNOME desktop.
+ .
+ This package contains the library development files.
+
+Package: gir1.2-gtd-1.0
+Section: introspection
+Architecture: any
+Depends: ${gir:Depends},
+         ${shlibs:Depends},
+         ${misc:Depends},
+Breaks: gnome-todo (<< 3.24.2-3)
+Description: GObject introspection data for GNOME To Do
+ GNOME To Do is a simplistic personal task manager designed to perfectly fit
+ the GNOME desktop. Designed from ground up to seamlessly integrate with
+ the GNOME desktop environment, To Do enables you to be as productive as
+ you want.
+ .
+ This package contains introspection data for GNOME To Do.
+ .
+ It can be used by packages using the GIRepository format to generate
+ dynamic bindings.
diff -Nru gnome-todo-3.24.2/debian/gir1.2-gtd-1.0.install gnome-todo-3.24.2/debian/gir1.2-gtd-1.0.install
--- gnome-todo-3.24.2/debian/gir1.2-gtd-1.0.install	1970-01-01 09:00:00.000000000 +0900
+++ gnome-todo-3.24.2/debian/gir1.2-gtd-1.0.install	2017-07-28 22:52:28.000000000 +0900
@@ -0,0 +1 @@
+usr/lib/*/girepository-1.0/*.typelib
diff -Nru gnome-todo-3.24.2/debian/gnome-todo-common.install gnome-todo-3.24.2/debian/gnome-todo-common.install
--- gnome-todo-3.24.2/debian/gnome-todo-common.install	1970-01-01 09:00:00.000000000 +0900
+++ gnome-todo-3.24.2/debian/gnome-todo-common.install	2017-07-28 22:52:28.000000000 +0900
@@ -0,0 +1,6 @@
+usr/share/icons/
+usr/share/locale/
+usr/share/gnome-todo/
+usr/share/metainfo/
+usr/share/dbus-1/
+usr/share/glib-2.0/
diff -Nru gnome-todo-3.24.2/debian/gnome-todo.install gnome-todo-3.24.2/debian/gnome-todo.install
--- gnome-todo-3.24.2/debian/gnome-todo.install	1970-01-01 09:00:00.000000000 +0900
+++ gnome-todo-3.24.2/debian/gnome-todo.install	2017-07-28 22:52:28.000000000 +0900
@@ -0,0 +1,2 @@
+usr/bin/gnome-todo
+usr/share/applications/
diff -Nru gnome-todo-3.24.2/debian/libgnome-todo-dev.install gnome-todo-3.24.2/debian/libgnome-todo-dev.install
--- gnome-todo-3.24.2/debian/libgnome-todo-dev.install	1970-01-01 09:00:00.000000000 +0900
+++ gnome-todo-3.24.2/debian/libgnome-todo-dev.install	2017-07-28 22:52:28.000000000 +0900
@@ -0,0 +1,3 @@
+usr/include/gnome-todo/
+usr/lib/*/pkgconfig/gnome-todo.pc
+usr/share/gir-*/Gtd-*.gir
diff -Nru gnome-todo-3.24.2/debian/libgnome-todo.install gnome-todo-3.24.2/debian/libgnome-todo.install
--- gnome-todo-3.24.2/debian/libgnome-todo.install	1970-01-01 09:00:00.000000000 +0900
+++ gnome-todo-3.24.2/debian/libgnome-todo.install	2017-07-28 22:52:28.000000000 +0900
@@ -0,0 +1 @@
+usr/lib/*/gnome-todo/
diff -Nru gnome-todo-3.24.2/debian/patches/0001-deal-with-appstream-metadata-in-legacy-location.patch gnome-todo-3.24.2/debian/patches/0001-deal-with-appstream-metadata-in-legacy-location.patch
--- gnome-todo-3.24.2/debian/patches/0001-deal-with-appstream-metadata-in-legacy-location.patch	1970-01-01 09:00:00.000000000 +0900
+++ gnome-todo-3.24.2/debian/patches/0001-deal-with-appstream-metadata-in-legacy-location.patch	2017-07-28 22:52:28.000000000 +0900
@@ -0,0 +1,25 @@
+From: Hideki Yamane <henrich@debian.org>
+Date: Fri, 28 Jul 2017 22:51:23 +0900
+Subject: deal with appstream-metadata-in-legacy-location
+
+not /usr/share/appdata/ but /usr/share/metainfo/
+
+Perhaps this patch will be not necessary when build system would move to
+new one.
+---
+ data/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/data/Makefile.am b/data/Makefile.am
+index 827ee36..af44715 100644
+--- a/data/Makefile.am
++++ b/data/Makefile.am
+@@ -13,7 +13,7 @@ autostart_DATA = org.gnome.Todo.Autostart.desktop
+ %.desktop: %.desktop.in
+ 	$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+ 
+-appdatadir = $(datadir)/appdata
++appdatadir = $(datadir)/metainfo
+ appdata_DATA = $(appdata_in_files:.xml.in=.xml)
+ appdata_in_files = $(srcdir)/appdata/org.gnome.Todo.appdata.xml.in
+ 
diff -Nru gnome-todo-3.24.2/debian/patches/series gnome-todo-3.24.2/debian/patches/series
--- gnome-todo-3.24.2/debian/patches/series	1970-01-01 09:00:00.000000000 +0900
+++ gnome-todo-3.24.2/debian/patches/series	2017-07-28 22:52:28.000000000 +0900
@@ -0,0 +1 @@
+0001-deal-with-appstream-metadata-in-legacy-location.patch
diff -Nru gnome-todo-3.24.2/debian/rules gnome-todo-3.24.2/debian/rules
--- gnome-todo-3.24.2/debian/rules	2017-06-18 19:47:46.000000000 +0900
+++ gnome-todo-3.24.2/debian/rules	2017-07-28 22:52:28.000000000 +0900
@@ -28,4 +28,4 @@
 override_dh_auto_install:
 	dh_auto_install
 	# get rid of "non-empty-dependency_libs-in-la-file"
-	find $(CURDIR)/debian/gnome-todo -name *.la -delete
+	find $(CURDIR)/debian/ -name *.la -delete

今日のグルーミング

  • fonts-bpg-georgian
    • debian/copyrightのconvertの際にcopyright holderの記述が website と異なっていて???となって調べて回った。その甲斐あって整理できた&一部フォントが違うライセンスだということもわかったので良かった。