From: Luca Boccassi Date: Fri, 3 Nov 2023 19:22:17 +0000 (+0000) Subject: Import libdnf_0.69.0-2.2.debian.tar.xz X-Git-Tag: archive/raspbian/0.73.1-3+rpi1^2^2~13^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b57127e7e34ba5995fefde2f690096358f959183;p=libdnf.git Import libdnf_0.69.0-2.2.debian.tar.xz [dgit import tarball libdnf 0.69.0-2.2 libdnf_0.69.0-2.2.debian.tar.xz] --- b57127e7e34ba5995fefde2f690096358f959183 diff --git a/changelog b/changelog new file mode 100644 index 0000000..038ab37 --- /dev/null +++ b/changelog @@ -0,0 +1,79 @@ +libdnf (0.69.0-2.2) unstable; urgency=medium + + * Non-maintainer upload. + * Use mkdir -p in override_dh_auto_test to fix FTBFS on buildds + + -- Luca Boccassi Fri, 03 Nov 2023 19:22:17 +0000 + +libdnf (0.69.0-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Move python3 modules from /usr/lib/local/ (Closes: #1052915) + + -- Luca Boccassi Sun, 29 Oct 2023 15:57:28 +0000 + +libdnf (0.69.0-2) unstable; urgency=medium + + * Set myself to maintainer + + -- Frédéric Pierret Sun, 08 Jan 2023 10:08:51 +0100 + +libdnf (0.69.0-1) unstable; urgency=medium + + * Update to libdnf-0.69.0. + * Update debian/control:bump debhelper-compat to 13 and update + Build-Depends constraints. + * Update debian/rules: remove reproducible flag being the default, + remove not needed anymore PYTHON_DESIRED from dh_auto_configure, + remove undeeded override of dh_install as debhelper is bumped and, + few cleanups. + * Update debian/watch: update to use tags endpoint. + + -- Frédéric Pierret Sat, 12 Nov 2022 15:51:20 +0100 + +libdnf (0.62.0-1) experimental; urgency=high + + * Update to libdnf-0.62.0 + + -- Frédéric Pierret Wed, 14 Apr 2021 14:59:34 +0200 + +libdnf (0.55.2-5) unstable; urgency=medium + + * Team upload. + + [ Marek Marczykowski-Górecki ] + * Use shlibs file instead of symbols. + + -- Holger Levsen Thu, 04 Feb 2021 01:17:07 +0100 + +libdnf (0.55.2-4) unstable; urgency=medium + + * Team upload. + * Source upload for testing migration. + + -- Holger Levsen Wed, 03 Feb 2021 13:05:37 +0100 + +libdnf (0.55.2-3) unstable; urgency=medium + + * debian/copyright: Update and specify copyright holders + + -- Frédéric Pierret Tue, 02 Feb 2021 14:13:30 +0100 + +libdnf (0.55.2-2) unstable; urgency=medium + + * Update renamed lintian tag names in lintian overrides. + * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository, + Repository-Browse. + * Remove listed license files (COPYING) from copyright. + * Remove unnecessary get-orig-source-target. + + -- Frédéric Pierret Wed, 30 Dec 2020 09:38:25 -0000 + +libdnf (0.55.2-1) unstable; urgency=medium + + * Initial upload. + * libdnf, libcomps and librepo are all needed for dnf, see #978627 (ITP bug + for dnf) and https://github.com/QubesOS/qubes-issues/issues/5940 for more + details on this packaging efford. + + -- Frédéric Pierret Sat, 26 Dec 2020 10:00:00 +0100 diff --git a/control b/control new file mode 100644 index 0000000..0c26afe --- /dev/null +++ b/control @@ -0,0 +1,134 @@ +Source: libdnf +Section: libs +Priority: optional +Maintainer: Frédéric Pierret +Build-Depends: debhelper-compat (= 13), + dh-python, + python3-dev, + libpython3-dev, + cmake, + pkg-config, + libglib2.0-dev, + libsolv-dev (>= 0.7.14-1.1~), + libsolvext-dev (>= 0.7.14-1.1~), + libsolv-tools (>= 0.7.14-1.1~), + librpm-dev (>= 4.14.2.1+dfsg1-1.1~), + libzstd-dev, + librepo-dev (>= 1.14.5-1~), + gtk-doc-tools, + python3-sphinx, + check, + python3-nose, + libgpgme-dev, + libssl-dev, + libjson-c-dev, + libmodulemd-dev, + libsmartcols-dev, + libsqlite3-dev, + gettext, + swig, + libcppunit-dev, + doxygen, + python3-breathe, + rpm-common (>= 4.14.2.1+dfsg1-1.1~), + valgrind, +Standards-Version: 4.5.1 +Homepage: https://github.com/rpm-software-management/libdnf +Vcs-Browser: https://salsa.debian.org/fepitre/libdnf +Vcs-Git: https://salsa.debian.org/fepitre/libdnf.git +#Testsuite: autopkgtest-pkg-python + +Package: libdnf-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, + libdnf2 (= ${binary:Version}), + libsolv-dev (>= 0.7.14-1.1~), + libsolvext-dev (>= 0.7.14-1.1~), +Breaks: gir1.2-libdnf-1.0 (<< ${binary:Version}) +Description: libdnf - development files + A library providing simplified C and Python APIs to libsolv. + . + This package contains the development header files for the + libdnf library. + +Package: libdnf1 +Depends: ${misc:Depends}, + libdnf2, +Architecture: all +Multi-Arch: foreign +Priority: optional +Section: oldlibs +Description: transitional package + This is a transitional package. It can safely be removed. + +Package: libdnf2 +Provides: libdnf +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, ${misc:Depends}, + libdnf2-common (= ${source:Version}), +Replaces: libdnf1 (<< 0.35.3-1~) +Breaks: libdnf1 (<< 0.35.3-1~) +Description: libdnf - shared library + A library providing simplified C and Python APIs to libsolv. + . + This package provides the libdnf shared library. + +Package: libdnf2-common +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, +Description: libdnf - common files + A library providing simplified C and Python APIs to libsolv. + . + This package provides common files for the libdnf library. + +Package: libdnf-doc +Architecture: all +Multi-Arch: foreign +Section: doc +Depends: ${misc:Depends}, +Description: Documentation for the libdnf library (common documentation) + A library providing simplified C and Python APIs to libsolv. + . + This package installs common documentation for the libdnf + C bindings. + +Package: python3-hawkey +Architecture: any +Multi-Arch: no +Section: python +Depends: ${shlibs:Depends}, ${python3:Depends}, ${misc:Depends}, + libdnf2 (= ${binary:Version}), + python3-libdnf (= ${binary:Version}), +Provides: ${python3:Provides}, +Suggests: python3-hawkey-docs +Description: Python bindings for the hawkey library (Python 3) + A library providing simplified C and Python APIs to libsolv. + . + This package installs the hawkey library for Python 3. + +Package: python3-hawkey-doc +Architecture: all +Multi-Arch: foreign +Section: doc +Depends: ${sphinxdoc:Depends}, ${misc:Depends}, +Description: Python 3 bindings for the hawkey library (common documentation) + A library providing simplified C and Python APIs to libsolv. + . + This package installs common documentation for the hawkey Python + 3 bindings. + +Package: python3-libdnf +Architecture: any +Multi-Arch: no +Section: python +Depends: ${shlibs:Depends}, ${python3:Depends}, ${misc:Depends}, + libdnf2 (= ${binary:Version}), +Provides: ${python3:Provides}, +Description: Python bindings for the libdnf library (Python 3) + A library providing simplified C and Python APIs to libsolv. + . + This package installs the libdnf library for Python 3. diff --git a/copyright b/copyright new file mode 100644 index 0000000..d9980a6 --- /dev/null +++ b/copyright @@ -0,0 +1,245 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: libdnf +Upstream-Contact: https://github.com/rpm-software-management/libdnf/issues +Source: https://github.com/rpm-software-management/libdnf + +Files: * +Copyright: 2012-2020, Red Hat, Inc. +License: LGPL-2.1 + +Files: debian/* +Copyright: 2018, 2019, Mihai Moldovan +License: GPL-2+ + +Files: docs/hawkey/* +Copyright: 2012-2015, Red Hat, Inc. +License: GPL-2+ + +Files: docs/libdnf/html/* +Copyright: 2001-2003, Jürgen Hermann +License: GPL-2+ + +Files: libdnf/* +Copyright: 2012-2020, Red Hat, Inc. +License: LGPL-2.1+ + +Files: libdnf/catch-error.hpp + libdnf/error.hpp +Copyright: 2012-2019, Red Hat, Inc. +License: LGPL-2.1 + +Files: libdnf/dnf-advisory-private.hpp + libdnf/dnf-advisory.cpp + libdnf/dnf-advisory.h + libdnf/dnf-advisorypkg.cpp + libdnf/dnf-advisorypkg.h + libdnf/dnf-advisoryref.cpp + libdnf/dnf-advisoryref.h + libdnf/dnf-packagedelta-private.hpp + libdnf/dnf-packagedelta.cpp + libdnf/dnf-packagedelta.h + libdnf/dnf-sack.cpp + libdnf/dnf-sack.h + libdnf/hy-package-private.hpp + libdnf/hy-package.h + libdnf/hy-packageset.cpp + libdnf/hy-packageset.h +Copyright: 2013-2015, Richard Hughes + 2012-2018, Red Hat, Inc. +License: LGPL-2.1+ + +Files: libdnf/dnf-context.cpp +Copyright: 2016, Igor Gnatenko + 2014, 2015, Richard Hughes +License: LGPL-2.1+ + +Files: libdnf/dnf-context.h + libdnf/dnf-goal.cpp + libdnf/dnf-goal.h + libdnf/dnf-keyring.cpp + libdnf/dnf-keyring.h + libdnf/dnf-lock.cpp + libdnf/dnf-lock.h + libdnf/dnf-package.cpp + libdnf/dnf-package.h + libdnf/dnf-repo-loader.cpp + libdnf/dnf-repo-loader.h + libdnf/dnf-repo.cpp + libdnf/dnf-repo.h + libdnf/dnf-rpmts.cpp + libdnf/dnf-rpmts.h + libdnf/dnf-state.cpp + libdnf/dnf-state.h + libdnf/dnf-transaction.cpp + libdnf/dnf-transaction.h + libdnf/dnf-utils.cpp + libdnf/dnf-utils.h + libdnf/dnf-version.h.in + libdnf/libdnf.h +Copyright: 2008-2015, Richard Hughes +License: LGPL-2.1+ + +Files: libdnf/dnf-enums.h + libdnf/libdnf.pc.in + libdnf/dnf-reldep-list.cpp + libdnf/dnf-reldep-list.h + libdnf/dnf-reldep.cpp + libdnf/dnf-reldep.h +Copyright: 2016, Igor Gnatenko +License: LGPL-2.1+ + +Files: libdnf/dnf-types.h +Copyright: 2015, Colin Walters + 2013-2015, Richard Hughes +License: LGPL-2.1+ + +Files: libdnf/plugin/plugin-private.hpp + libdnf/plugin/plugin.cpp + libdnf/plugin/plugin.h +Copyright: 2012-2020, Red Hat, Inc. +License: LGPL-2.1+ + +Files: libdnf/transaction/sql/* +Copyright: 2012-2019, Red Hat, Inc. +License: LGPL-2.1 + +Files: libdnf/utils/bgettext/bgettext-common.h + libdnf/utils/bgettext/bgettext-lib.h + libdnf/utils/bgettext/bgettext.c + libdnf/utils/bgettext/bgettext.h +Copyright: 2017, Jaroslav Rohel +License: LGPL-3+ + +Files: libdnf/utils/tinyformat/tinyformat.hpp +Copyright: 2011, Chris Foster [chris42f (at) gmail (d0t) com] +License: BSL-1.0 + +Files: plugins/* +Copyright: 2012-2020, Red Hat, Inc. +License: LGPL-2.1+ + +Files: python/* +Copyright: 2012-2020, Red Hat, Inc. +License: LGPL-2.1+ + +Files: tests/hawkey/fixtures.cpp + tests/hawkey/fixtures.h + tests/hawkey/test_advisory.cpp + tests/hawkey/test_advisorypkg.cpp + tests/hawkey/test_advisoryref.cpp + tests/hawkey/test_goal.cpp + tests/hawkey/test_iutil.cpp + tests/hawkey/test_main.cpp + tests/hawkey/test_package.cpp + tests/hawkey/test_packagelist.cpp + tests/hawkey/test_packageset.cpp + tests/hawkey/test_query.cpp + tests/hawkey/test_reldep.cpp + tests/hawkey/test_repo.cpp + tests/hawkey/test_sack.cpp + tests/hawkey/test_selector.cpp + tests/hawkey/test_subject.cpp + tests/hawkey/test_suites.h + tests/hawkey/test_util.cpp + tests/hawkey/testshared.cpp + tests/hawkey/testshared.h + tests/hawkey/testsys.cpp + tests/hawkey/testsys.h +Copyright: 2012-2020, Red Hat, Inc. +License: LGPL-2.1+ + +Files: tests/libdnf/dnf-self-test.c +Copyright: 2008-2015, Richard Hughes +License: LGPL-2.1+ + +License: BSL-1.0 + Permission is hereby granted, free of charge, to any person or organization + obtaining a copy of the software and accompanying documentation covered by + this license (the "Software") to use, reproduce, display, distribute, + execute, and transmit the Software, and to prepare derivative works of the + Software, and to permit third-parties to whom the Software is furnished to + do so, all subject to the following: + . + The copyright notices in the Software and this entire statement, including + the above license grant, this restriction and the following disclaimer, + must be included in all copies of the Software, in whole or in part, and + all derivative works of the Software, unless such copies or derivative + works are solely in the form of machine-executable object code generated by + a source language processor. + . + 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT + SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE + FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + +License: GPL-2+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + . + On Debian systems, the complete text of the GNU General Public + License v2 can be found in `/usr/share/common-licenses/GPL-2'. + +License: LGPL-2.1 + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1 as published by the Free Software Foundation. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU Lesser General + Public License can be found in "/usr/share/common-licenses/LGPL-2.1". + +License: LGPL-2.1+ + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU Lesser General Public + License can be found in /usr/share/common-licenses/LGPL-2.1. + +License: LGPL-3+ + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public + License along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the complete text of the GNU Lesser General + Public License can be found in `/usr/share/common-licenses/LGPL-3'. diff --git a/libdnf-dev.install b/libdnf-dev.install new file mode 100644 index 0000000..399b33a --- /dev/null +++ b/libdnf-dev.install @@ -0,0 +1,3 @@ +usr/include/libdnf +usr/lib/*/libdnf.so +usr/lib/*/pkgconfig/libdnf.pc diff --git a/libdnf-doc.docs b/libdnf-doc.docs new file mode 100644 index 0000000..0b6e0f3 --- /dev/null +++ b/libdnf-doc.docs @@ -0,0 +1,2 @@ +AUTHORS +README.md diff --git a/libdnf-doc.install b/libdnf-doc.install new file mode 100644 index 0000000..986dd64 --- /dev/null +++ b/libdnf-doc.install @@ -0,0 +1 @@ +usr/share/gtk-doc/html/libdnf diff --git a/libdnf-doc.links b/libdnf-doc.links new file mode 100644 index 0000000..7fa3691 --- /dev/null +++ b/libdnf-doc.links @@ -0,0 +1 @@ +usr/share/gtk-doc/html/libdnf usr/share/doc/libdnf-doc/libdnf diff --git a/libdnf1.lintian-overrides b/libdnf1.lintian-overrides new file mode 100644 index 0000000..3148996 --- /dev/null +++ b/libdnf1.lintian-overrides @@ -0,0 +1,3 @@ +# This tag is outdated. The extra priority is deprecated and replaced by the +# optional one. +libdnf1: transitional-package-not-oldlibs-optional diff --git a/libdnf2-common.install b/libdnf2-common.install new file mode 100644 index 0000000..afb5869 --- /dev/null +++ b/libdnf2-common.install @@ -0,0 +1 @@ +usr/share/locale/*/*/libdnf.mo diff --git a/libdnf2.install b/libdnf2.install new file mode 100644 index 0000000..617f3a3 --- /dev/null +++ b/libdnf2.install @@ -0,0 +1,3 @@ +usr/lib/*/libdnf.so.* +usr/lib/*/libdnf/plugins/ +usr/share/man/ diff --git a/libdnf2.lintian-overrides b/libdnf2.lintian-overrides new file mode 100644 index 0000000..ad4f1c2 --- /dev/null +++ b/libdnf2.lintian-overrides @@ -0,0 +1,2 @@ +# File actually describes the directory's purpose. +libdnf2: package-contains-documentation-outside-usr-share-doc diff --git a/libdnf2.shlibs b/libdnf2.shlibs new file mode 100644 index 0000000..b615bcd --- /dev/null +++ b/libdnf2.shlibs @@ -0,0 +1 @@ +libdnf 2 libdnf2 (>= 0.55.2) diff --git a/patches/0001-CMakeLists.txt-append-libsolv-cmake-path.patch b/patches/0001-CMakeLists.txt-append-libsolv-cmake-path.patch new file mode 100644 index 0000000..c7cf647 --- /dev/null +++ b/patches/0001-CMakeLists.txt-append-libsolv-cmake-path.patch @@ -0,0 +1,26 @@ +From 90643bd524891456e546fa08836eb61eb99b57a4 Mon Sep 17 00:00:00 2001 +From: Mihai Moldovan +Date: Tue, 29 Sep 2020 18:30:16 +0200 +Subject: [PATCH] CMakeLists.txt: append libsolv cmake path + +Make sure cmake finds FindLibSolv.cmake installed +in ${CMAKE_INSTALL_PREFIX}/share/cmake/libsolv. +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2dd55c57..00ab52f7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -46,6 +46,7 @@ if(APPLE) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH};/usr/local/share/cmake/Modules/) + include_directories(/usr/local/include) + endif() ++LIST (APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/share/cmake/libsolv/") + + + # build dependencies +-- +2.26.2 + diff --git a/patches/0002-Use-static-libcheck-version.patch b/patches/0002-Use-static-libcheck-version.patch new file mode 100644 index 0000000..8b7e7e5 --- /dev/null +++ b/patches/0002-Use-static-libcheck-version.patch @@ -0,0 +1,27 @@ +From 1b86fcaf2966f098256f6bb044dfa5a5a43ed96b Mon Sep 17 00:00:00 2001 +From: Mihai Moldovan +Date: Tue, 29 Sep 2020 18:30:16 +0200 +Subject: [PATCH] Use static libcheck version. + +Within Debian, only the static libcheck library is shipped. Use it correctly, +since the static library requires additional private libraries and definitions. +--- + tests/hawkey/CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/hawkey/CMakeLists.txt b/tests/hawkey/CMakeLists.txt +index 29402d63..601bb4bc 100644 +--- a/tests/hawkey/CMakeLists.txt ++++ b/tests/hawkey/CMakeLists.txt +@@ -29,6 +29,8 @@ set_target_properties(test_hawkey_main PROPERTIES COMPILE_FLAGS -fPIC) + target_link_libraries(test_hawkey_main + libdnf + ${CHECK_LDFLAGS} ++ ${CHECK_STATIC_LIBRARIES} ++ ${CHECK_STATIC_LDFLAGS} + ${SOLV_LIBRARY} + ${SOLVEXT_LIBRARY} + ${RPMDB_LIBRARY} +-- +2.26.2 + diff --git a/patches/0003-Set-the-default-disttype-to-RPM.patch b/patches/0003-Set-the-default-disttype-to-RPM.patch new file mode 100644 index 0000000..749dde4 --- /dev/null +++ b/patches/0003-Set-the-default-disttype-to-RPM.patch @@ -0,0 +1,46 @@ +From 7339ac2f41639afbfb4c1627e8883629fdb0f097 Mon Sep 17 00:00:00 2001 +From: Mihai Moldovan +Date: Tue, 29 Sep 2020 18:30:16 +0200 +Subject: [PATCH] Set the default disttype to RPM. + +On "foreign" systems, including Debian, libsolv tries to be smart and default +to the native packaging system type. We need to explicitly override it to use +RPM for dnf to work. +--- + libdnf/dnf-sack.cpp | 1 + + tests/hawkey/test_iutil.cpp | 7 +++++++ + 2 files changed, 8 insertions(+) + +diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp +index 6a43f01e..36f4a92b 100644 +--- a/libdnf/dnf-sack.cpp ++++ b/libdnf/dnf-sack.cpp +@@ -186,6 +186,7 @@ dnf_sack_init(DnfSack *sack) + DnfSackPrivate *priv = GET_PRIVATE(sack); + priv->pool = pool_create(); + pool_set_flag(priv->pool, POOL_FLAG_WHATPROVIDESWITHDISABLED, 1); ++ pool_setdisttype(priv->pool, DISTTYPE_RPM); + priv->running_kernel_id = -1; + priv->running_kernel_fn = running_kernel; + priv->considered_uptodate = TRUE; +diff --git a/tests/hawkey/test_iutil.cpp b/tests/hawkey/test_iutil.cpp +index 8d00cc94..0ca12800 100644 +--- a/tests/hawkey/test_iutil.cpp ++++ b/tests/hawkey/test_iutil.cpp +@@ -150,6 +150,13 @@ END_TEST + START_TEST(test_version_split) + { + Pool *pool = pool_create(); ++ ++ /* ++ * On "foreign" systems, the disttype will ++ * not default to RPM. Set this explicitly. ++ */ ++ fail_if(-1 == pool_setdisttype(pool, DISTTYPE_RPM)); ++ + char evr[] = "1:5.9.3-8"; + char *epoch, *version, *release; + +-- +2.26.2 + diff --git a/patches/0004-Enable-implicitobsoleteusescolors-flag.patch b/patches/0004-Enable-implicitobsoleteusescolors-flag.patch new file mode 100644 index 0000000..9c87e8e --- /dev/null +++ b/patches/0004-Enable-implicitobsoleteusescolors-flag.patch @@ -0,0 +1,49 @@ +From 7cba1b05a5647ce0e3d8aa763705fd21e9f4e79f Mon Sep 17 00:00:00 2001 +From: Mihai Moldovan +Date: Tue, 29 Sep 2020 18:30:16 +0200 +Subject: [PATCH] Enable implicitobsoleteusescolors flag. + +This flag is normally enabled by default in libsolv if compiled on Fedora or +Mageia systems, but disabled for all others. Since we explicitly want to +support Fedora (and CentOS/RHEL) repositories with DNF, enable this feature for +correct resolution. +--- + libdnf/dnf-sack.cpp | 1 + + tests/hawkey/test_iutil.cpp | 9 +++++++++ + 2 files changed, 10 insertions(+) + +diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp +index 36f4a92b..2384fccb 100644 +--- a/libdnf/dnf-sack.cpp ++++ b/libdnf/dnf-sack.cpp +@@ -187,6 +187,7 @@ dnf_sack_init(DnfSack *sack) + priv->pool = pool_create(); + pool_set_flag(priv->pool, POOL_FLAG_WHATPROVIDESWITHDISABLED, 1); + pool_setdisttype(priv->pool, DISTTYPE_RPM); ++ pool_set_flag(priv->pool, POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS, 1); + priv->running_kernel_id = -1; + priv->running_kernel_fn = running_kernel; + priv->considered_uptodate = TRUE; +diff --git a/tests/hawkey/test_iutil.cpp b/tests/hawkey/test_iutil.cpp +index 0ca12800..8ce75bfb 100644 +--- a/tests/hawkey/test_iutil.cpp ++++ b/tests/hawkey/test_iutil.cpp +@@ -157,6 +157,15 @@ START_TEST(test_version_split) + */ + fail_if(-1 == pool_setdisttype(pool, DISTTYPE_RPM)); + ++ /* ++ * On "foreign" systems, the implicitobsoleteusescolors ++ * flag is turned off by default. ++ * This leads to unexpected results when working with ++ * Fedora, Mageia or CentOS repositories, so enable it ++ * forcefully. ++ */ ++ pool_set_flag(pool, POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS, 1); ++ + char evr[] = "1:5.9.3-8"; + char *epoch, *version, *release; + +-- +2.26.2 + diff --git a/patches/0005-Tell-libsolv-to-prefer-rpmdb-in-home-directory.patch b/patches/0005-Tell-libsolv-to-prefer-rpmdb-in-home-directory.patch new file mode 100644 index 0000000..36830e6 --- /dev/null +++ b/patches/0005-Tell-libsolv-to-prefer-rpmdb-in-home-directory.patch @@ -0,0 +1,30 @@ +From a4bdb72fb37a46b784b2220fe7156c363f567587 Mon Sep 17 00:00:00 2001 +From: Mihai Moldovan +Date: Tue, 29 Sep 2020 18:30:16 +0200 +Subject: [PATCH] Tell libsolv to prefer rpmdb in home directory. + +The rpm package on Debian is patched to always use the RPMDB in a user's home +directory. Libsolv is not patched in such a way. Since DNF is mixing librpm and +libsolv, strange situations occur. + +Tell libsolv to prefer the rpmdb in the user's home directory. +--- + libdnf/dnf-sack.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libdnf/dnf-sack.cpp b/libdnf/dnf-sack.cpp +index 2384fccb..77efb6ee 100644 +--- a/libdnf/dnf-sack.cpp ++++ b/libdnf/dnf-sack.cpp +@@ -1727,7 +1727,7 @@ dnf_sack_load_system_repo(DnfSack *sack, HyRepo a_hrepo, int flags, GError **err + repo = repo_create(pool, HY_SYSTEM_REPO_NAME); + + g_debug("fetching rpmdb"); +- int flagsrpm = REPO_REUSE_REPODATA | RPM_ADD_WITH_HDRID | REPO_USE_ROOTDIR; ++ int flagsrpm = REPO_REUSE_REPODATA | RPM_ADD_WITH_HDRID | REPO_USE_ROOTDIR | RPMDB_USE_HOMEDIR; + int rc = repo_add_rpmdb_reffp(repo, NULL, flagsrpm); + if (!rc) { + repoImpl->state_main = _HY_LOADED_FETCH; +-- +2.26.2 + diff --git a/patches/0006-Add-rpmdb-in-home-directory-to-checksum-and-DNF-cont.patch b/patches/0006-Add-rpmdb-in-home-directory-to-checksum-and-DNF-cont.patch new file mode 100644 index 0000000..775f378 --- /dev/null +++ b/patches/0006-Add-rpmdb-in-home-directory-to-checksum-and-DNF-cont.patch @@ -0,0 +1,76 @@ +From 2d5455b0a99029ea8881fecdc969458362456949 Mon Sep 17 00:00:00 2001 +From: Mihai Moldovan +Date: Tue, 29 Sep 2020 18:30:16 +0200 +Subject: [PATCH] Add rpmdb in home directory to checksum and DNF context setup + function. + +The rpm package on Debian is patched to always use the RPMDB in a user's home +directory. + +Tell the checksumming and DNF context setup function to prefer the rpmdb in the +user's home directory. +--- + libdnf/dnf-context.cpp | 33 +++++++++++++++++++++++++++------ + libdnf/dnf-utils.cpp | 2 ++ + 2 files changed, 29 insertions(+), 6 deletions(-) + +diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp +index bc4a15b6..598bff9c 100644 +--- a/libdnf/dnf-context.cpp ++++ b/libdnf/dnf-context.cpp +@@ -2234,12 +2234,33 @@ dnf_context_setup(DnfContext *context, + + /* setup a file monitor on the rpmdb, if we're operating on the native / */ + if (g_strcmp0(priv->install_root, "/") == 0) { +- rpmdb_path = g_build_filename(priv->install_root, "var/lib/rpm/Packages", NULL); +- file_rpmdb = g_file_new_for_path(rpmdb_path); +- priv->monitor_rpmdb = g_file_monitor_file(file_rpmdb, +- G_FILE_MONITOR_NONE, +- NULL, +- error); ++ /* Try home directory first. */ ++ gchar *home_dir = g_strdup(g_get_home_dir()); ++ ++ priv->monitor_rpmdb = NULL; ++ ++ if (home_dir) { ++ rpmdb_path = g_build_filename(priv->install_root, home_dir, ".rpmdb/Packages", NULL); ++ ++ g_free(home_dir); ++ home_dir = NULL; ++ ++ file_rpmdb = g_file_new_for_path(rpmdb_path); ++ priv->monitor_rpmdb = g_file_monitor_file(file_rpmdb, ++ G_FILE_MONITOR_NONE, ++ NULL, ++ error); ++ } ++ ++ if (!priv->monitor_rpmdb) { ++ rpmdb_path = g_build_filename(priv->install_root, "var/lib/rpm/Packages", NULL); ++ file_rpmdb = g_file_new_for_path(rpmdb_path); ++ priv->monitor_rpmdb = g_file_monitor_file(file_rpmdb, ++ G_FILE_MONITOR_NONE, ++ NULL, ++ error); ++ } ++ + if (priv->monitor_rpmdb == NULL) + return FALSE; + g_signal_connect(priv->monitor_rpmdb, "changed", +diff --git a/libdnf/dnf-utils.cpp b/libdnf/dnf-utils.cpp +index 874282cf..2ae179bc 100644 +--- a/libdnf/dnf-utils.cpp ++++ b/libdnf/dnf-utils.cpp +@@ -32,6 +32,8 @@ + #include + #include + #include ++#include ++#include + + #include "catch-error.hpp" + #include "dnf-types.h" +-- +2.26.2 + diff --git a/patches/0007-Support-Debian-releases-without-explicit-version.patch b/patches/0007-Support-Debian-releases-without-explicit-version.patch new file mode 100644 index 0000000..ef6c16d --- /dev/null +++ b/patches/0007-Support-Debian-releases-without-explicit-version.patch @@ -0,0 +1,72 @@ +From b1aef4a9d4d5c51fc1d92d12fcc4ddd6fa94d31f Mon Sep 17 00:00:00 2001 +From: Mihai Moldovan +Date: Tue, 29 Sep 2020 18:30:16 +0200 +Subject: [PATCH] Support Debian releases without explicit version. + +On Debian, some series have no version. Most notably testing, unstable and +experimental. + +We have to take this into account, because a missing VERSION_ID tag leads to +test case failures (bad) and DNF context setup failures (much worse). + +Fake the version in such a case. +--- + libdnf/dnf-context.cpp | 42 +++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 39 insertions(+), 3 deletions(-) + +diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp +index 598bff9c..aaa796db 100644 +--- a/libdnf/dnf-context.cpp ++++ b/libdnf/dnf-context.cpp +@@ -1666,9 +1666,45 @@ dnf_context_set_os_release(DnfContext *context, GError **error) try + "os-release", + "VERSION_ID", + error); +- if (maybe_quoted_version == NULL) +- return FALSE; +- version = g_shell_unquote(maybe_quoted_version, error); ++ if (maybe_quoted_version == NULL) { ++ /* ++ * On Debian, some series have no version. ++ * Most notably testing, unstable and experimental. ++ * ++ * Fake the version in such a case. ++ * We do not really care a lot about this, since ++ * we're not using DNF in actual Debian contexts, ++ * but make sure that test cases do not fail. ++ */ ++ g_autofree gchar *maybe_quoted_id = NULL; ++ maybe_quoted_id = g_key_file_get_string(key_file, ++ "os-release", ++ "ID", ++ error); ++ if (!maybe_quoted_id) { ++ return FALSE; ++ } ++ ++ g_autofree gchar *id = g_shell_unquote(maybe_quoted_id, error); ++ ++ if (0 != g_ascii_strncasecmp(id, "debian", strlen("debian"))) { ++ /* Better fail non-Debian plattforms... */ ++ return FALSE; ++ } ++ ++ /* ++ * Distinguishing testing and unstable via the os-release file(s) ++ * is not possible. Using lsb-release would work (as long as it ++ * exists), but requires additional parsing and is overkill. ++ * Just assign a fake version number that is higher than any ++ * existing one. ++ */ ++ version = g_strdup("999"); ++ g_clear_error(error); ++ } ++ else { ++ version = g_shell_unquote(maybe_quoted_version, error); ++ } + if (!version) + return FALSE; + dnf_context_set_release_ver(context, version); +-- +2.26.2 + diff --git a/patches/0008-Workaround-hawkey-test-failures-with-CK_FORK-no.patch b/patches/0008-Workaround-hawkey-test-failures-with-CK_FORK-no.patch new file mode 100644 index 0000000..cacd4da --- /dev/null +++ b/patches/0008-Workaround-hawkey-test-failures-with-CK_FORK-no.patch @@ -0,0 +1,46 @@ +From ac422a0b38f9396483cd58113074c6db2795e276 Mon Sep 17 00:00:00 2001 +From: Mihai Moldovan +Date: Tue, 29 Sep 2020 18:30:16 +0200 +Subject: [PATCH] Workaround hawkey test failures with CK_FORK=no. + +For a description of what is happening here and a rational of why this might +just be okay for us, see the source code comment. +--- + tests/hawkey/test_goal.cpp | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/tests/hawkey/test_goal.cpp b/tests/hawkey/test_goal.cpp +index cca12775..0c4db99c 100644 +--- a/tests/hawkey/test_goal.cpp ++++ b/tests/hawkey/test_goal.cpp +@@ -950,6 +950,27 @@ START_TEST(test_goal_upgrade_disabled_repo) + auto pool = dnf_sack_get_pool(test_globals.sack); + HyGoal goal = hy_goal_create(sack); + ++ /* ++ * This is probably the weirdest workaround ever, but this test case fails ++ * with CK_FORK=no (which is used in the valgrind tests) for an unknown ++ * reason I wasn't able to figure out. ++ * However, just querying the sack, which should be a read-only operation, ++ * seems to remedy this problem. ++ * Since the failure doesn't happen with CK_FORK=yes, whatever is causing ++ * it is likely not a problem in libdnf/hawkey or the libsolv integration, ++ * but rather some sort of... stack or heap corruption? Or a side-effect ++ * of libcheck? ++ * Given that rationale, it's probably okay to mask the problem with this ++ * very weird workaround. ++ */ ++ HyQuery q = hy_query_create (sack); ++ hy_query_filter (q, HY_PKG_REPONAME, HY_EQ, HY_SYSTEM_REPO_NAME); ++ GPtrArray *res = hy_query_run (q); ++ g_ptr_array_unref (res); ++ res = NULL; ++ hy_query_free (q); ++ q = NULL; ++ + hy_goal_upgrade_all(goal); + hy_goal_run_flags(goal, DNF_NONE); + int implicitobsoleteusescolors = pool_get_flag(pool, POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS); +-- +2.26.2 + diff --git a/patches/0009-Use-private-scols_cell_get_alignment-with-older-libs.patch b/patches/0009-Use-private-scols_cell_get_alignment-with-older-libs.patch new file mode 100644 index 0000000..559cac9 --- /dev/null +++ b/patches/0009-Use-private-scols_cell_get_alignment-with-older-libs.patch @@ -0,0 +1,36 @@ +From c98b33ca589a1d5c609b1c2ea6b7d1f75844664b Mon Sep 17 00:00:00 2001 +From: Mihai Moldovan +Date: Tue, 29 Sep 2020 18:30:16 +0200 +Subject: [PATCH] Use private scols_cell_get_alignment() with older + libsmartcols + +Stretch's version of libsmartcols includes the (binary) symbol, but does not +export it via its API, probably to make the intermediate release +API-compatible. + +libdnf needs it, so we'll just declare the function and hope that linking will +be able to pick it up just fine. + +For newer versions, that should just turn into a comment. +--- + libdnf/utils/smartcols/Cell.hpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libdnf/utils/smartcols/Cell.hpp b/libdnf/utils/smartcols/Cell.hpp +index b90f0050..fc3c1d4a 100644 +--- a/libdnf/utils/smartcols/Cell.hpp ++++ b/libdnf/utils/smartcols/Cell.hpp +@@ -26,6 +26,10 @@ + #include + #include + ++extern "C" { ++@LIBSMARTCOLS_COMPAT@ extern int scols_cell_get_alignment(const struct libscols_cell *ce); ++} ++ + class Cell + { + public: +-- +2.26.2 + diff --git a/patches/0011-Set-CMAKE_SKIP_RPATH-to-TRUE.patch b/patches/0011-Set-CMAKE_SKIP_RPATH-to-TRUE.patch new file mode 100644 index 0000000..7eecf72 --- /dev/null +++ b/patches/0011-Set-CMAKE_SKIP_RPATH-to-TRUE.patch @@ -0,0 +1,26 @@ +From ea406b2109c0aba5ac592b2249c0f0a92f62d57b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= + +Date: Tue, 24 Nov 2020 22:16:41 +0100 +Subject: [PATCH] Set CMAKE_SKIP_RPATH to TRUE + +--- + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 00ab52f7..b3fc5cda 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -115,6 +115,8 @@ add_compile_options(-Wcast-align -Wno-uninitialized -Wredundant-decls -Wwrite-st + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 -Wmissing-prototypes -Waggregate-return -Wshadow -Werror=implicit-function-declaration") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wmissing-declarations") + ++SET(CMAKE_SKIP_RPATH TRUE) ++ + # apple: turn rpath off + set(CMAKE_MACOSX_RPATH 0) + +-- +2.26.2 + diff --git a/patches/0012-data-workaround-for-hardcoded-absolute-path-data-in-.patch b/patches/0012-data-workaround-for-hardcoded-absolute-path-data-in-.patch new file mode 100644 index 0000000..36f3ded --- /dev/null +++ b/patches/0012-data-workaround-for-hardcoded-absolute-path-data-in-.patch @@ -0,0 +1,34 @@ +From 9c8e0cb52813ed5c8bd713ecda40ccb5e648b81a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= + +Date: Sat, 28 Nov 2020 23:00:31 +0100 +Subject: [PATCH] data: workaround for hardcoded absolute path data in + variables + +We use clean env for each build to use /tmp as location. This is +a temporary solution until upstream/we found a better way for that. +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b3fc5cda..70804347 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -134,7 +134,7 @@ add_definitions(-DG_LOG_DOMAIN=\\"libdnf\\") + add_definitions(-D_FILE_OFFSET_BITS=64) + + # tests +-add_definitions(-DTESTDATADIR=\\"${CMAKE_SOURCE_DIR}/data/tests\\") ++add_definitions(-DTESTDATADIR=\\"/tmp/data/tests\\") + + # librhsm + if(ENABLE_RHSM_SUPPORT) +@@ -182,3 +182,4 @@ endif() + + + add_subdirectory(etc) ++file(COPY data DESTINATION /tmp) +-- +2.26.2 + diff --git a/patches/0013-python-tests-fix-locale-issues.patch b/patches/0013-python-tests-fix-locale-issues.patch new file mode 100644 index 0000000..d40cf63 --- /dev/null +++ b/patches/0013-python-tests-fix-locale-issues.patch @@ -0,0 +1,46 @@ +From 712085ae6d701317ca00e90fa03c79c733b3f112 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= + +Date: Wed, 2 Dec 2020 11:30:10 +0100 +Subject: [PATCH] python tests: fix locale issues + +It has been observed that manipulating locales in Debian +environement, tests are failing. + +====================================================================== +ERROR: test_custom_querying (tests.test_reldep.Reldep) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/tmp/reprotest.wOQ8sL/build-experiment-1/build-experiment-1/python/hawkey/tests/tests/test_reldep.py", line 78, in test_custom_querying + reldep = hawkey.Reldep(self.sack, u"\u0159 >= 3") +_hawkey.ValueException: Wrong reldep format: \u0159 >= 3 +--- + python/hawkey/tests/tests/__init__.py | 1 + + python/hawkey/tests/tests/base.py | 5 +++++ + 2 files changed, 6 insertions(+) + +diff --git a/python/hawkey/tests/tests/__init__.py b/python/hawkey/tests/tests/__init__.py +index e69de29b..8b137891 100644 +--- a/python/hawkey/tests/tests/__init__.py ++++ b/python/hawkey/tests/tests/__init__.py +@@ -0,0 +1 @@ ++ +diff --git a/python/hawkey/tests/tests/base.py b/python/hawkey/tests/tests/base.py +index 4d5937b2..e46a1d66 100644 +--- a/python/hawkey/tests/tests/base.py ++++ b/python/hawkey/tests/tests/base.py +@@ -33,6 +33,11 @@ if cachedir is None: + cachedir = tempfile.mkdtemp(dir=os.path.dirname(hawkey.test.UNITTEST_DIR), + prefix='pyhawkey') + ++# run tests with C locales ++os.environ["LC_ALL"] = "C" ++os.environ["LANG"] = "C.UTF-8" ++os.environ["LANGUAGE"] = "en_US:en" ++ + class TestCase(unittest.TestCase): + repo_dir = os.path.normpath(os.path.join(__file__, "../../../../../data/tests/hawkey/")) + +-- +2.26.2 + diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..a42e730 --- /dev/null +++ b/patches/series @@ -0,0 +1,12 @@ +0001-CMakeLists.txt-append-libsolv-cmake-path.patch +0002-Use-static-libcheck-version.patch +0003-Set-the-default-disttype-to-RPM.patch +0004-Enable-implicitobsoleteusescolors-flag.patch +0005-Tell-libsolv-to-prefer-rpmdb-in-home-directory.patch +0006-Add-rpmdb-in-home-directory-to-checksum-and-DNF-cont.patch +0007-Support-Debian-releases-without-explicit-version.patch +0008-Workaround-hawkey-test-failures-with-CK_FORK-no.patch +0009-Use-private-scols_cell_get_alignment-with-older-libs.patch +0011-Set-CMAKE_SKIP_RPATH-to-TRUE.patch +0012-data-workaround-for-hardcoded-absolute-path-data-in-.patch +0013-python-tests-fix-locale-issues.patch diff --git a/python3-hawkey-doc.docs b/python3-hawkey-doc.docs new file mode 100644 index 0000000..65aa932 --- /dev/null +++ b/python3-hawkey-doc.docs @@ -0,0 +1,3 @@ +AUTHORS +README.md +build/docs/hawkey/html/ diff --git a/python3-hawkey-doc.links b/python3-hawkey-doc.links new file mode 100644 index 0000000..fe385b3 --- /dev/null +++ b/python3-hawkey-doc.links @@ -0,0 +1,2 @@ +usr/share/javascript/jquery/jquery.js usr/share/doc/python3-hawkey-doc/html/_static/jquery.js +usr/share/javascript/underscore/underscore.js usr/share/doc/python3-hawkey-doc/html/_static/underscore.js diff --git a/python3-hawkey.install b/python3-hawkey.install new file mode 100644 index 0000000..5ea1182 --- /dev/null +++ b/python3-hawkey.install @@ -0,0 +1 @@ +usr/lib/python3/dist-packages/hawkey diff --git a/python3-hawkey.lintian-overrides b/python3-hawkey.lintian-overrides new file mode 100644 index 0000000..92489cb --- /dev/null +++ b/python3-hawkey.lintian-overrides @@ -0,0 +1,4 @@ +# The activation might very well be unnecessary, but debhelper generates it +# nonetheless and there is no good way to avoid it. +# So... avoid the warning, I guess? +python3-hawkey: package-has-unnecessary-activation-of-ldconfig-trigger diff --git a/python3-libdnf.install b/python3-libdnf.install new file mode 100644 index 0000000..909dc53 --- /dev/null +++ b/python3-libdnf.install @@ -0,0 +1 @@ +usr/lib/python3/dist-packages/libdnf diff --git a/rules b/rules new file mode 100755 index 0000000..f48eced --- /dev/null +++ b/rules @@ -0,0 +1,60 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +# export DH_VERBOSE = 1 + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk + +%: + dh "${@}" --buildsystem=cmake --with=python3 + +override_dh_auto_configure: + dh_auto_configure --builddirectory=build -- \ + -DWITH_BINDINGS:BOOL=ON \ + -DWITH_GTKDOC:BOOL=ON \ + -DWITH_HTML:BOOL=ON \ + -DWITH_MAN:BOOL=ON \ + -DENABLE_RHSM_SUPPORT:BOOL=OFF \ + -DENABLE_SOLV_URPMREORDER:BOOL=OFF \ + -DDISABLE_VALGRIND:BOOL=ON \ + -DWITH_ZCHUNK:BOOL=OFF \ + -DCMAKE_INSTALL_PREFIX:PATH="/usr" \ + -DLIB:STRING="lib/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)" + + sed -i -e '/^@LIBSMARTCOLS_COMPAT@/s/^@LIBSMARTCOLS_COMPAT@/\/\//' 'libdnf/utils/smartcols/Cell.hpp'; \ + + # Fix file format + iconv -f ISO-8859-15 -t UTF-8 docs/libdnf/html/common.css -o docs/libdnf/html/common.css + +override_dh_auto_build: + dh_auto_build --builddirectory=build -- all doc-html doc-gtk doc + +override_dh_auto_install: + dh_auto_install --builddirectory=build + + # Remove doctree files (redundant, conflicts with reproducible builds) + rm -rfv 'build/docs/hawkey/html/.doctrees' + + # Use system-provides files. + rm -fv 'build/docs/hawkey/html/_static/jquery.js' \ + 'build/docs/hawkey/html/_static/underscore.js' \ + 'build/docs/hawkey/html/_static/doctools.js' \ + 'build/docs/hawkey/html/_static/language_data.js' \ + 'build/docs/hawkey/html/_static/searchtools.js' + +override_dh_auto_clean: + rm -f 'libdnf/dnf-version.h' + dh_auto_clean --builddirectory=build + +override_dh_auto_test: + mkdir -p '$(CURDIR)/debian/tests-home' + LC_ALL=C HOME='$(CURDIR)/debian/tests-home' dh_auto_test --builddirectory=build -- ARGS='-V' + +override_dh_missing: + dh_missing --fail-missing + +override_dh_installchangelogs: + # Do not try to install a history directory within docs. + dh_installchangelogs -Xhistory diff --git a/source/format b/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/source/options b/source/options new file mode 100644 index 0000000..cb61fa5 --- /dev/null +++ b/source/options @@ -0,0 +1 @@ +extend-diff-ignore = "^[^/]*[.]egg-info/" diff --git a/upstream/metadata b/upstream/metadata new file mode 100644 index 0000000..dcaab2d --- /dev/null +++ b/upstream/metadata @@ -0,0 +1,5 @@ +--- +Bug-Database: https://github.com/rpm-software-management/libdnf/issues +Bug-Submit: https://github.com/rpm-software-management/libdnf/issues/new +Repository: https://github.com/rpm-software-management/libdnf.git +Repository-Browse: https://github.com/rpm-software-management/libdnf diff --git a/watch b/watch new file mode 100644 index 0000000..e402a59 --- /dev/null +++ b/watch @@ -0,0 +1,3 @@ +version=4 +opts=filenamemangle=s/.+\/(\d\S+)\.tar\.gz/libdnf-$1\.tar\.gz/ \ + https://github.com/rpm-software-management/libdnf/tags .*/@ANY_VERSION@\.tar\.gz