From bde7b040aa4d1f25aea420c9316bfcaa64239424 Mon Sep 17 00:00:00 2001 From: Fabio Fantoni Date: Fri, 2 Feb 2024 21:20:08 +0100 Subject: [PATCH 1/4] debian: wrap and sort --- debian/control | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/debian/control b/debian/control index b9e95478..96e5e88d 100644 --- a/debian/control +++ b/debian/control @@ -27,7 +27,10 @@ Vcs-Git: https://github.com/linuxmint/cjs.git Package: cjs Architecture: any -Depends: gir1.2-gtk-3.0, ${misc:Depends}, ${shlibs:Depends} +Depends: + gir1.2-gtk-3.0, + ${misc:Depends}, + ${shlibs:Depends}, Description: Mozilla-based javascript bindings for the Cinnamon platform (cli tool) Makes it possible for applications to use all of Cinnamon's platform libraries using the JavaScript language. It's mainly based on the @@ -45,7 +48,9 @@ Package: libcjs-dbg Section: debug Architecture: any Priority: extra -Depends: libcjs0 (= ${binary:Version}), ${misc:Depends} +Depends: + libcjs0 (= ${binary:Version}), + ${misc:Depends}, Description: Mozilla-based javascript bindings for the Cinnamon platform Makes it possible for applications to use all of Cinnamon platform libraries using the JavaScript language. It's mainly based on the @@ -82,9 +87,20 @@ Package: libcjs0 Architecture: any Multi-Arch: same Section: libs -Depends: ${gir:Depends}, ${misc:Depends}, ${shlibs:Depends} -Conflicts: libcjs0a, libcjs0c, libcjs0e, libcjs0f -Replaces: libcjs0a, libcjs0c, libcjs0e, libcjs0f +Depends: + ${gir:Depends}, + ${misc:Depends}, + ${shlibs:Depends}, +Conflicts: + libcjs0a, + libcjs0c, + libcjs0e, + libcjs0f, +Replaces: + libcjs0a, + libcjs0c, + libcjs0e, + libcjs0f, Description: Mozilla-based javascript bindings for the Cinnamon platform Makes it possible for applications to use all of Cinnamon platform libraries using the JavaScript language. It's mainly based on the From 2b4c98584821833969f6807fc60118d0a772df22 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 29 Dec 2023 23:43:06 +0000 Subject: [PATCH 2/4] d/control: libcjs0 Depends on gir1.2-girepository-2.0 This is used internally by imports.package (modules/script/package.js), and is likely to need to be separated from gir1.2-glib-2.0 during the GLib 2.79/2.80 cycle. At the moment, it is a virtual package provided by the gir1.2-glib-2.0 package. --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 96e5e88d..38214b67 100644 --- a/debian/control +++ b/debian/control @@ -91,6 +91,7 @@ Depends: ${gir:Depends}, ${misc:Depends}, ${shlibs:Depends}, + gir1.2-girepository-2.0, Conflicts: libcjs0a, libcjs0c, From 994fa7f8ab849f858a3ade2cfd1feb4566a6812a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 29 Dec 2023 23:44:40 +0000 Subject: [PATCH 3/4] d/control: libcjs0 Depends on typelibs imported by built-in modules imports.package depends on GLib, GObject and Gio, not just GIRepository. In practice gir1.2-girepository-2.0 (or the package that provides it) will pull in all of those, so this is really just for completeness. --- debian/control | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/control b/debian/control index 38214b67..dc683e7b 100644 --- a/debian/control +++ b/debian/control @@ -91,7 +91,10 @@ Depends: ${gir:Depends}, ${misc:Depends}, ${shlibs:Depends}, + gir1.2-gio-2.0, gir1.2-girepository-2.0, + gir1.2-glib-2.0, + gir1.2-gobject-2.0, Conflicts: libcjs0a, libcjs0c, From f0ab0c9e8c41c784ab13036436190afc4a2c09ec Mon Sep 17 00:00:00 2001 From: Fabio Fantoni Date: Fri, 2 Feb 2024 22:08:36 +0100 Subject: [PATCH 4/4] add cjs-test and enable full autopkgtest This add package of installed tests, useful to do more tests also out of build Full autopkgtest help to spot regression also when depends are updated, for example used in debian CI: https://ci.debian.net/packages/c/cjs/unstable/amd64/ Both installed tests and autopkgtest can be used also manually by users and developers --- debian/cjs-tests.install | 3 +++ debian/cjs-tests.lintian-overrides | 3 +++ debian/control | 14 ++++++++++++++ debian/rules | 14 +++++++++++++- debian/tests/control | 12 +++++++++--- debian/tests/installed-tests | 2 +- debian/tests/testsuite | 4 ---- 7 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 debian/cjs-tests.install create mode 100644 debian/cjs-tests.lintian-overrides delete mode 100755 debian/tests/testsuite diff --git a/debian/cjs-tests.install b/debian/cjs-tests.install new file mode 100644 index 00000000..49188f9e --- /dev/null +++ b/debian/cjs-tests.install @@ -0,0 +1,3 @@ +usr/share/glib-2.0/schemas/org.cinnamon.CjsTest.gschema.xml +usr/share/installed-tests +usr/libexec/installed-tests/cjs diff --git a/debian/cjs-tests.lintian-overrides b/debian/cjs-tests.lintian-overrides new file mode 100644 index 00000000..e59a8521 --- /dev/null +++ b/debian/cjs-tests.lintian-overrides @@ -0,0 +1,3 @@ +# Test data is not documentation, even if it's in a text file +package-contains-documentation-outside-usr-share-doc [usr/libexec/installed-tests/*] +library-not-linked-against-libc [usr/libexec/installed-tests/cjs/*.so] diff --git a/debian/control b/debian/control index dc683e7b..5102b225 100644 --- a/debian/control +++ b/debian/control @@ -40,6 +40,20 @@ Description: Mozilla-based javascript bindings for the Cinnamon platform (cli to uses. . This package contains the interactive console application. + +Package: cjs-tests +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + cjs, + at-spi2-core +Description: Mozilla-based javascript bindings for the Cinnamon platform (tests) + Makes it possible for applications to use all of Cinnamon's platform + libraries using the JavaScript language. It's mainly based on the + Mozilla JavaScript engine and the GObject introspection framework. + . + This package is the frozen version of gjs that the cinnamon desktop currently + uses. . This package contains test programs, designed to be run as part of a regression testsuite. diff --git a/debian/rules b/debian/rules index 19ae3f16..e1772ee2 100755 --- a/debian/rules +++ b/debian/rules @@ -17,12 +17,24 @@ override_dh_auto_configure: dh_auto_configure -- \ -Dauto_features=enabled \ -Dprofiler=disabled \ - -Dinstalled_tests=false \ + -Dinstalled_tests=true \ $(NULL) +execute_after_dh_auto_install: + rm -f debian/tmp/usr/libexec/installed-tests/cjs/js/modules/*/.eslintrc.yml + override_dh_girepository: dh_girepository -l $(BUILDDIR) /usr/lib/$(DEB_HOST_MULTIARCH)/cjs/girepository-1.0 +# debhelper >= 13.4 makes all of /usr/libexec executable, which is not +# quite right for installed-tests +override_dh_fixperms: + dh_fixperms -Xusr/libexec/installed-tests +ifneq ($(filter %-tests,$(built_binaries)),) + chmod --changes u=rw,og=r debian/*-tests/usr/libexec/installed-tests/cjs/*.so + chmod --recursive --changes a+rX,u+w,og-w debian/*-tests/usr/libexec/installed-tests +endif + override_dh_auto_test: GI_TYPELIB_PATH=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE) \ obj-$(DEB_HOST_GNU_TYPE)/cjs-console -c 'print("Smoke-test OK")' diff --git a/debian/tests/control b/debian/tests/control index 2d64be92..f341a109 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,5 +1,11 @@ +Tests: acc +Depends: @, dh-acc, exuberant-ctags +Restrictions: allow-stderr, superficial + Tests: build -Depends: build-essential, libcjs-dev +Depends: libcjs-dev, build-essential +Restrictions: superficial + +Tests: installed-tests +Depends: dbus-daemon, dbus-x11, cjs-tests, gnome-desktop-testing, xauth, xvfb -#Tests: installed-tests -#Depends: dbus-daemon, dbus-x11, cjs-tests, gnome-desktop-testing, xauth, xvfb diff --git a/debian/tests/installed-tests b/debian/tests/installed-tests index df28cae6..d4a7dd55 100755 --- a/debian/tests/installed-tests +++ b/debian/tests/installed-tests @@ -9,4 +9,4 @@ export XDG_RUNTIME_DIR=$AUTOPKGTEST_TMP export LC_ALL=C.UTF-8 # dbus outputs activation messages to stderr which fails the test -dbus-run-session -- xvfb-run -a gnome-desktop-testing-runner gjs 2> >(grep -vE '^(Activating|Successfully activated)')>&2 +dbus-run-session -- xvfb-run -a gnome-desktop-testing-runner cjs 2> >(grep -vE '^(Activating|Successfully activated)')>&2 diff --git a/debian/tests/testsuite b/debian/tests/testsuite deleted file mode 100755 index f0bdf42b..00000000 --- a/debian/tests/testsuite +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# dh_auto_test -make check