From 4ed47b4dae253245792eb7936af7f883f8e05008 Mon Sep 17 00:00:00 2001 From: Mark Feit Date: Mon, 1 Jul 2024 19:51:40 +0000 Subject: [PATCH] Overhaul of jq for Debian (11). #1445 --- jq/unibuild-packaging/deb/control | 3 +- jq/unibuild-packaging/deb/jq.docs | 2 - jq/unibuild-packaging/deb/libjq1.symbols | 175 ------------------ .../deb/patches/disable-static-libtool.patch | 36 ---- .../dont-distribute-duplicate-docs.patch | 17 -- .../deb/patches/enable-manpages.patch | 16 -- .../patches/patch-version-into-build.patch | 20 -- jq/unibuild-packaging/deb/patches/series | 4 - jq/unibuild-packaging/deb/rules | 17 +- 9 files changed, 9 insertions(+), 281 deletions(-) delete mode 100644 jq/unibuild-packaging/deb/jq.docs delete mode 100644 jq/unibuild-packaging/deb/libjq1.symbols delete mode 100644 jq/unibuild-packaging/deb/patches/disable-static-libtool.patch delete mode 100644 jq/unibuild-packaging/deb/patches/dont-distribute-duplicate-docs.patch delete mode 100644 jq/unibuild-packaging/deb/patches/enable-manpages.patch delete mode 100644 jq/unibuild-packaging/deb/patches/patch-version-into-build.patch delete mode 100644 jq/unibuild-packaging/deb/patches/series diff --git a/jq/unibuild-packaging/deb/control b/jq/unibuild-packaging/deb/control index 650510ca9a..508882f3ef 100644 --- a/jq/unibuild-packaging/deb/control +++ b/jq/unibuild-packaging/deb/control @@ -2,7 +2,8 @@ Source: jq Section: utils Priority: optional Maintainer: ChangZhuo Chen (陳昌倬) -Build-Depends: debhelper (>= 10), dh-autoreconf, flex, bison, libtool-bin, valgrind [amd64 i386], rake, ruby-ronn, libonig-dev +Build-Depends: debhelper (>= 10), dh-autoreconf, flex, bison, libtool-bin, valgrind [amd64 i386], rake, ruby-ronn, libonig-dev, + python3-lxml, python3-markdown Standards-Version: 3.9.6 Homepage: https://github.com/stedolan/jq Vcs-Git: git://anonscm.debian.org/users/else-guest/jq.git diff --git a/jq/unibuild-packaging/deb/jq.docs b/jq/unibuild-packaging/deb/jq.docs deleted file mode 100644 index 55bc0a63d3..0000000000 --- a/jq/unibuild-packaging/deb/jq.docs +++ /dev/null @@ -1,2 +0,0 @@ -README -AUTHORS diff --git a/jq/unibuild-packaging/deb/libjq1.symbols b/jq/unibuild-packaging/deb/libjq1.symbols deleted file mode 100644 index 265ebaf50b..0000000000 --- a/jq/unibuild-packaging/deb/libjq1.symbols +++ /dev/null @@ -1,175 +0,0 @@ -libjq.so.1 libjq1 #MINVER# - jq_compile@Base 1.5 - jq_compile_args@Base 1.5 - jq_dump_disassembly@Base 1.5 - jq_format_error@Base 1.5 - jq_get_attr@Base 1.5 - jq_get_debug_cb@Base 1.5 - jq_get_error_cb@Base 1.5 - jq_get_error_message@Base 1.6-1~bpo8+1 - jq_get_exit_code@Base 1.6-1~bpo8+1 - jq_get_input_cb@Base 1.5 - jq_get_jq_origin@Base 1.5 - jq_get_lib_dirs@Base 1.5 - jq_get_prog_origin@Base 1.5 - jq_halt@Base 1.6-1~bpo8+1 - jq_halted@Base 1.6-1~bpo8+1 - jq_init@Base 1.5 - jq_next@Base 1.5 - jq_parse@Base 1.5 - jq_parse_library@Base 1.5 - jq_realpath@Base 1.5 - jq_report_error@Base 1.5 - jq_set_attr@Base 1.5 - jq_set_attrs@Base 1.5 - jq_set_colors@Base 1.6-1~bpo8+1 - jq_set_debug_cb@Base 1.5 - jq_set_error_cb@Base 1.5 - jq_set_input_cb@Base 1.5 - jq_set_nomem_handler@Base 1.5 - jq_start@Base 1.5 - jq_teardown@Base 1.5 - jq_testsuite@Base 1.5 - jq_util_input_add_input@Base 1.5 - jq_util_input_errors@Base 1.5 - jq_util_input_free@Base 1.5 - jq_util_input_get_current_filename@Base 1.5 - jq_util_input_get_current_line@Base 1.5 - jq_util_input_get_position@Base 1.5 - jq_util_input_init@Base 1.5 - jq_util_input_next_input@Base 1.5 - jq_util_input_next_input_cb@Base 1.5 - jq_util_input_set_parser@Base 1.5 - jq_yy_create_buffer@Base 1.5 - jq_yy_delete_buffer@Base 1.5 - jq_yy_flush_buffer@Base 1.5 - jq_yy_scan_buffer@Base 1.5 - jq_yy_scan_bytes@Base 1.5 - jq_yy_scan_string@Base 1.5 - jq_yy_switch_to_buffer@Base 1.5 - jq_yyalloc@Base 1.5 - jq_yyfree@Base 1.5 - jq_yyget_column@Base 1.5 - jq_yyget_debug@Base 1.5 - jq_yyget_extra@Base 1.5 - jq_yyget_in@Base 1.5 - jq_yyget_leng@Base 1.5 - jq_yyget_lineno@Base 1.5 - jq_yyget_lloc@Base 1.5 - jq_yyget_lval@Base 1.5 - jq_yyget_out@Base 1.5 - jq_yyget_text@Base 1.5 - jq_yylex@Base 1.5 - jq_yylex_destroy@Base 1.5 - jq_yylex_init@Base 1.5 - jq_yylex_init_extra@Base 1.5 - jq_yypop_buffer_state@Base 1.5 - jq_yypush_buffer_state@Base 1.5 - jq_yyrealloc@Base 1.5 - jq_yyrestart@Base 1.5 - jq_yyset_column@Base 1.5 - jq_yyset_debug@Base 1.5 - jq_yyset_extra@Base 1.5 - jq_yyset_in@Base 1.5 - jq_yyset_lineno@Base 1.5 - jq_yyset_lloc@Base 1.5 - jq_yyset_lval@Base 1.5 - jq_yyset_out@Base 1.5 - jv_array@Base 1.5 - jv_array_append@Base 1.5 - jv_array_concat@Base 1.5 - jv_array_contains@Base 1.5 - jv_array_get@Base 1.5 - jv_array_indexes@Base 1.5 - jv_array_length@Base 1.5 - jv_array_set@Base 1.5 - jv_array_sized@Base 1.5 - jv_array_slice@Base 1.5 - jv_bool@Base 1.5 - jv_cmp@Base 1.5 - jv_contains@Base 1.5 - jv_copy@Base 1.5 - jv_delpaths@Base 1.5 -#MISSING: 1.6-1~bpo8+1# jv_dels@Base 1.5 - jv_dump@Base 1.5 - jv_dump_string@Base 1.5 - jv_dump_string_trunc@Base 1.5 - jv_dumpf@Base 1.5 - jv_equal@Base 1.5 - jv_false@Base 1.5 - jv_free@Base 1.5 - jv_get@Base 1.5 - jv_get_kind@Base 1.5 - jv_get_refcnt@Base 1.5 - jv_getpath@Base 1.5 - jv_group@Base 1.5 - jv_has@Base 1.5 - jv_identical@Base 1.5 - jv_invalid@Base 1.5 - jv_invalid_get_msg@Base 1.5 - jv_invalid_has_msg@Base 1.5 - jv_invalid_with_msg@Base 1.5 - jv_is_integer@Base 1.5 - jv_is_integer_large@Base 1.6-1~bpo8+1 - jv_keys@Base 1.5 - jv_keys_unsorted@Base 1.5 - jv_kind_name@Base 1.5 - jv_load_file@Base 1.5 - jv_mem_alloc@Base 1.5 - jv_mem_alloc_unguarded@Base 1.5 - jv_mem_calloc@Base 1.5 - jv_mem_calloc_unguarded@Base 1.5 - jv_mem_free@Base 1.5 - jv_mem_realloc@Base 1.5 - jv_mem_strdup@Base 1.5 - jv_mem_strdup_unguarded@Base 1.5 - jv_mem_uninit_setup@Base 1.5 - jv_mem_uninitialised@Base 1.5 - jv_nomem_handler@Base 1.5 - jv_null@Base 1.5 - jv_number@Base 1.5 - jv_number_value@Base 1.5 - jv_object@Base 1.5 - jv_object_contains@Base 1.5 - jv_object_delete@Base 1.5 - jv_object_get@Base 1.5 - jv_object_has@Base 1.6-1~bpo8+1 - jv_object_iter@Base 1.5 - jv_object_iter_key@Base 1.5 - jv_object_iter_next@Base 1.5 - jv_object_iter_valid@Base 1.5 - jv_object_iter_value@Base 1.5 - jv_object_length@Base 1.5 - jv_object_merge@Base 1.5 - jv_object_merge_recursive@Base 1.5 - jv_object_set@Base 1.5 - jv_parse@Base 1.5 - jv_parse_sized@Base 1.5 - jv_parser_free@Base 1.5 - jv_parser_new@Base 1.5 - jv_parser_next@Base 1.5 - jv_parser_remaining@Base 1.5 - jv_parser_set_buf@Base 1.5 - jv_set@Base 1.5 - jv_setpath@Base 1.5 - jv_show@Base 1.5 - jv_sort@Base 1.5 - jv_string@Base 1.5 - jv_string_append_buf@Base 1.5 - jv_string_append_codepoint@Base 1.5 - jv_string_append_str@Base 1.5 - jv_string_concat@Base 1.5 - jv_string_empty@Base 1.5 - jv_string_explode@Base 1.5 - jv_string_fmt@Base 1.5 - jv_string_hash@Base 1.5 - jv_string_implode@Base 1.5 - jv_string_indexes@Base 1.5 - jv_string_length_bytes@Base 1.5 - jv_string_length_codepoints@Base 1.5 - jv_string_sized@Base 1.5 - jv_string_slice@Base 1.5 - jv_string_split@Base 1.5 - jv_string_value@Base 1.5 - jv_string_vfmt@Base 1.5 - jv_true@Base 1.5 diff --git a/jq/unibuild-packaging/deb/patches/disable-static-libtool.patch b/jq/unibuild-packaging/deb/patches/disable-static-libtool.patch deleted file mode 100644 index 6558faa2e1..0000000000 --- a/jq/unibuild-packaging/deb/patches/disable-static-libtool.patch +++ /dev/null @@ -1,36 +0,0 @@ -Description: Ensure jq doesn't statically link in libraries -Author: Harlan Lieberman-Berg -Forwarded: not-needed ---- a/Makefile.am 2019-03-28 15:39:06.250612941 +0100 -+++ b/Makefile.am 2019-03-28 15:40:03.799573053 +0100 -@@ -106,7 +106,6 @@ - - bin_PROGRAMS = jq - jq_SOURCES = src/main.c src/version.h --jq_LDFLAGS = -static-libtool-libs - jq_LDADD = libjq.la -lm - - if WIN32 -@@ -114,7 +113,7 @@ - endif - - if ENABLE_ALL_STATIC --jq_LDFLAGS += -all-static -+jq_LDFLAGS = -all-static - endif - - ### Tests (make check) ---- a/tests/setup 2019-03-28 15:39:06.250612941 +0100 -+++ b/tests/setup 2019-03-28 15:41:10.104679165 +0100 -@@ -13,8 +13,9 @@ - JQ=$JQBASEDIR/jq - - if [ -z "${NO_VALGRIND-}" ] && which valgrind > /dev/null; then -- VALGRIND="valgrind --error-exitcode=1 --leak-check=full \ -- --suppressions=$JQTESTDIR/onig.supp" -+ VALGRIND="libtool --mode=execute valgrind \ -+ --error-exitcode=1 --leak-check=full \ -+ --suppressions=$JQTESTDIR/onig.supp" - VG_EXIT0=--error-exitcode=0 - Q=-q - else diff --git a/jq/unibuild-packaging/deb/patches/dont-distribute-duplicate-docs.patch b/jq/unibuild-packaging/deb/patches/dont-distribute-duplicate-docs.patch deleted file mode 100644 index 0e4932b9af..0000000000 --- a/jq/unibuild-packaging/deb/patches/dont-distribute-duplicate-docs.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Do not distribute COPYING, fixes lintian warning -Author: Simon Elsbrock -Forwarded: not-needed -Last-Update: 2015-10-11 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/Makefile.am 2019-03-28 15:35:58.927487070 +0100 -+++ b/Makefile.am 2019-03-28 15:35:58.923487003 +0100 -@@ -183,7 +183,7 @@ - # README.md is expected in Github projects, good stuff in it, so we'll - # distribute it and install it with the package in the doc directory. - docdir = ${datadir}/doc/${PACKAGE} --dist_doc_DATA = README.md COPYING AUTHORS README -+dist_doc_DATA = AUTHORS README - - RELEASE ?= 1 - rpm: dist jq.spec diff --git a/jq/unibuild-packaging/deb/patches/enable-manpages.patch b/jq/unibuild-packaging/deb/patches/enable-manpages.patch deleted file mode 100644 index e1c28a3db2..0000000000 --- a/jq/unibuild-packaging/deb/patches/enable-manpages.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: patch Makefile to always generate the manpage. -Author: Simon Elsbrock -Forwarded: not-needed -Last-Update: 2014-06-21 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/Makefile.am 2018-11-02 01:49:29.000000000 +0000 -+++ b/Makefile.am 2023-03-07 21:57:14.293868124 +0000 -@@ -126,6 +126,7 @@ - ### Building the manpage - - man_MANS = jq.1 -+ENABLE_DOCS=1 - if ENABLE_DOCS - jq.1: $(srcdir)/docs/content/3.manual/manual.yml - $(AM_V_GEN) ( cd ${abs_srcdir}/docs; '$(BUNDLER)' exec rake manpage ) > $@ || { rm -f $@; false; } diff --git a/jq/unibuild-packaging/deb/patches/patch-version-into-build.patch b/jq/unibuild-packaging/deb/patches/patch-version-into-build.patch deleted file mode 100644 index b9455c8239..0000000000 --- a/jq/unibuild-packaging/deb/patches/patch-version-into-build.patch +++ /dev/null @@ -1,20 +0,0 @@ -Description: Set release version manually. - jq sets the build version by parsing the git branch. There is no git branch during - package building however. This patch sets the version manually. The version can be - looked up using `git describe --tags --match 'upstream*' | sed 's/^upstream\///'`. -Author: Simon Elsbrock -Bug: https://github.com/stedolan/jq/issues/434 -Last-Update: 2014-06-21 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/configure.ac 2019-03-28 15:35:39.647165283 +0100 -+++ b/configure.ac 2019-03-28 15:35:54.055405757 +0100 -@@ -1,7 +1,4 @@ --m4_define([jq_version], -- m4_esyscmd_s([(git rev-parse --verify -q jq-1.0 > /dev/null && -- (git describe --tags --dirty --match 'jq-*'|sed 's/^jq-//')) || -- echo `git rev-parse --abbrev-ref HEAD`-`git describe --always --dirty`]))) -+m4_define([jq_version], '1.6') - - AC_INIT([jq], [jq_version], [https://github.com/stedolan/jq/issues], - [jq], [https://stedolan.github.io/jq]) diff --git a/jq/unibuild-packaging/deb/patches/series b/jq/unibuild-packaging/deb/patches/series deleted file mode 100644 index 2fe3cafafa..0000000000 --- a/jq/unibuild-packaging/deb/patches/series +++ /dev/null @@ -1,4 +0,0 @@ -enable-manpages.patch -patch-version-into-build.patch -dont-distribute-duplicate-docs.patch -disable-static-libtool.patch diff --git a/jq/unibuild-packaging/deb/rules b/jq/unibuild-packaging/deb/rules index 4f48137a8c..02e9b3805c 100755 --- a/jq/unibuild-packaging/deb/rules +++ b/jq/unibuild-packaging/deb/rules @@ -15,27 +15,24 @@ get-orig-source: # This target replaces the version script with one that doesn't get # the wrong answer by depending on git. -_fix-version: - printf "#!/bin/sh -e\necho '%s.10+pscheduler-patches'\n" \ - $$(./configure --version | head -1 | sed -e "s/^[^']*'//g; s/'.*\$$//g") \ +_fix-version: libjq.pc + printf '#!/bin/sh -e \necho %s\n' "$$(awk '$$1 == "Version:" { print $$2 }' libjq.pc | head -1)" \ > ./scripts/version + override_dh_auto_configure: _fix-version - cd docs && rake manpage > ../jq.1 dh_auto_configure -- --disable-static --disable-fpectl --without-fpectl -override_dh_auto_test: -override_dh_auto_clean: - dh_auto_clean - test ! -f ./jq.1.old || mv ./jq.1.old jq.1 +override_dh_installdocs: + cd docs && ./build_manpage.py > jq.1 + dh_installdocs -override_dh_install: - dh_install --list-missing %: dh $@ --with autoreconf + # Ubuntu dbgsym.ddeb are currently not supported by reprepro override_dh_strip: dh_strip --no-automatic-dbgsym