From f084b65aa107eaa4684db195bb3c1c8cc39af2fd Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 1 Oct 2015 11:28:39 +0200 Subject: [PATCH] Imported Debian patch 2016.1-alexlarsson1~wily1 --- debian/changelog | 31 ++++++ debian/compat | 1 + debian/control | 102 ++++++++++++++++++ debian/copyright | 50 +++++++++ debian/docs | 1 + debian/gbp.conf | 3 + debian/gir1.2-ostree-1.0.install | 1 + debian/libostree-1-1.install | 2 + debian/libostree-dev.install | 5 + debian/libostree-doc.install | 1 + debian/ostree-grub2.install | 2 + debian/ostree.install | 9 ++ .../libglnx-user-glibc-attr-support.patch | 36 +++++++ ...stree-fix-mutable-tree-test-segfault.patch | 54 ++++++++++ .../patches/ostree-link-test-gpg-gpgme.patch | 15 +++ .../ostree-link-test-rollsum-libz.patch | 22 ++++ .../ostree-use-glibc-attr-support.patch | 64 +++++++++++ debian/patches/series | 0 debian/rules | 24 +++++ debian/source/format | 1 + debian/watch | 2 + 21 files changed, 426 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/gbp.conf create mode 100644 debian/gir1.2-ostree-1.0.install create mode 100755 debian/libostree-1-1.install create mode 100755 debian/libostree-dev.install create mode 100644 debian/libostree-doc.install create mode 100644 debian/ostree-grub2.install create mode 100644 debian/ostree.install create mode 100644 debian/patches/libglnx-user-glibc-attr-support.patch create mode 100644 debian/patches/ostree-fix-mutable-tree-test-segfault.patch create mode 100644 debian/patches/ostree-link-test-gpg-gpgme.patch create mode 100644 debian/patches/ostree-link-test-rollsum-libz.patch create mode 100644 debian/patches/ostree-use-glibc-attr-support.patch create mode 100644 debian/patches/series create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..0215b3f9 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,31 @@ +ostree (2016.1-alexlarsson1~wily1) wily; urgency=medium + + * New upstream release + + -- Alexander Larsson Thu, 01 Oct 2015 11:28:39 +0200 + +ostree (2015.11-alexlarsson1~vivid1) vivid; urgency=medium + + * New upstream release + + -- Alexander Larsson Thu, 01 Oct 2015 11:28:39 +0200 + +ostree (2015.9-alexlarsson1) vivid; urgency=medium + + * New upstream release + + -- Alexander Larsson Thu, 01 Oct 2015 11:28:39 +0200 + +ostree (2015.4-0amigadave2) trusty; urgency=low + + [ David King ] + * Add build dependency on libattr1-dev. + + -- David King Wed, 08 Apr 2015 13:10:39 +0100 + +ostree (2015.4-0amigadave1) trusty; urgency=low + + [ David King ] + * Initial packaging. + + -- David King Thu, 02 Apr 2015 15:40:52 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..be298060 --- /dev/null +++ b/debian/control @@ -0,0 +1,102 @@ +Source: ostree +Section: devel +Priority: optional +Maintainer: Alexander Larsson +Build-Depends: + debhelper (>= 9), + dh-autoreconf, + dh-exec (>= 0.3), + bison, + docbook-xml, + docbook-xsl, + e2fslibs-dev, + gjs, + gtk-doc-tools (>= 1.15), + gobject-introspection, + libarchive-dev (>= 2.8.0), + libattr1-dev, + libcap-dev, + libgirepository1.0-dev (>= 1.34.0), + libglib2.0-dev (>= 2.40.0), + libgpgme11-dev (>= 1.1.8), + libgsystem-dev (>= 2015.1), + liblzma-dev (>= 5.0.5), + libselinux1-dev, + libsoup2.4-dev (>= 2.39.1), + zlib1g-dev +Standards-Version: 3.9.6 +Homepage: https://wiki.gnome.org/Projects/OSTree + +Package: ostree +Architecture: any +Depends: + ${misc:Depends}, + ${shlibs:Depends} +Suggests: dracut +Description: git for operating system binaries + OSTree is a tool for managing bootable, immutable, versioned filesystem trees. + It is not a package system; nor is it a tool for managing full disk images. + Instead, it sits between those levels, offering a blend of the advantages (and + disadvantages) of both. + +Package: libostree-1-1 +Architecture: any +Depends: + ${misc:Depends}, + ${shlibs:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-arch: same +Description: git for operating system binaries (library) + OSTree is a tool for managing bootable, immutable, versioned filesystem trees. + It is not a package system; nor is it a tool for managing full disk images. + Instead, it sits between those levels, offering a blend of the advantages (and + disadvantages) of both. + +Package: gir1.2-ostree-1.0 +Architecture: any +Section: introspection +Depends: + ${misc:Depends}, + ${gir:Depends} +Description: git for operating system binaries (introspection) + This package can be used by other packages using the GIRepository format to + generate dynamic bindings. + +Package: libostree-dev +Architecture: any +Section: libdevel +Depends: + ${misc:Depends}, + ostree (= ${binary:Version}), + gir1.2-ostree-1.0 (= ${binary:Version}), + pkg-config +Suggests: libostree-doc +Description: Development files for the ostree library + Development headers and pkg-config file for ostree. + +Package: libostree-doc +Architecture: all +Section: doc +Depends: ${misc:Depends} +Suggests: devhelp +Description: Development documentation for the ostree library + Development documentation for ostree. + +Package: ostree-grub2 +Architecture: all +Section: devel +Depends: + ${misc:Depends}, + grub2 +Description: GRUB 2 configuration for ostree + Configuration snippets for using ostree with GRUB 2. + +Package: ostree-dbg +Architecture: any +Section: debug +Priority: extra +Depends: + ${misc:Depends}, + libostree-1-1 (= ${binary:Version}) +Description: debugging symbols for libostree-1-1 + This package contains the debugging symbols for libostree-1-1. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..a3537709 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,50 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ostree +Source: https://wiki.gnome.org/Projects/OSTree + +Files: * +Copyright: 2014-2015 Colin Walters +License: LGPL-2+ + +Files: debian/* +Copyright: 2015 David King +License: GPL-2+ + +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 package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2'. + +License: LGPL-2+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Library 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 Library General Public License for more details. + . + You should have received a copy of the GNU Library General Public License + along with this program. If not, see . + . + The complete text of the GNU Library General Public License + can be found in /usr/share/common-licenses/LGPL-2 file. diff --git a/debian/docs b/debian/docs new file mode 100644 index 00000000..b43bf86b --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README.md diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 00000000..d0c1355f --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,3 @@ +[DEFAULT] +pristine-tar = True +compression = xz diff --git a/debian/gir1.2-ostree-1.0.install b/debian/gir1.2-ostree-1.0.install new file mode 100644 index 00000000..d6c0270d --- /dev/null +++ b/debian/gir1.2-ostree-1.0.install @@ -0,0 +1 @@ +usr/lib/*/girepository-1.0 usr/lib diff --git a/debian/libostree-1-1.install b/debian/libostree-1-1.install new file mode 100755 index 00000000..968e95c7 --- /dev/null +++ b/debian/libostree-1-1.install @@ -0,0 +1,2 @@ +#! /usr/bin/dh-exec +usr/lib/${DEB_HOST_MULTIARCH}/libostree-1.so.* diff --git a/debian/libostree-dev.install b/debian/libostree-dev.install new file mode 100755 index 00000000..c3b88548 --- /dev/null +++ b/debian/libostree-dev.install @@ -0,0 +1,5 @@ +#! /usr/bin/dh-exec +usr/include/* +usr/lib/${DEB_HOST_MULTIARCH}/libostree-1.so +usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig +usr/share/gir-1.0/OSTree-1.0.gir diff --git a/debian/libostree-doc.install b/debian/libostree-doc.install new file mode 100644 index 00000000..95af827a --- /dev/null +++ b/debian/libostree-doc.install @@ -0,0 +1 @@ +usr/share/gtk-doc diff --git a/debian/ostree-grub2.install b/debian/ostree-grub2.install new file mode 100644 index 00000000..95085efb --- /dev/null +++ b/debian/ostree-grub2.install @@ -0,0 +1,2 @@ +etc/grub.d/15_ostree +usr/lib/*/ostree/grub2-15_ostree usr/lib/ostree/ diff --git a/debian/ostree.install b/debian/ostree.install new file mode 100644 index 00000000..6fb2d357 --- /dev/null +++ b/debian/ostree.install @@ -0,0 +1,9 @@ +etc/ostree +etc/dracut.conf.d/ostree.conf +lib/systemd/system/ostree*.service +usr/bin/ostree +usr/lib/dracut/modules.d/98ostree +usr/sbin/ostree-prepare-root +usr/sbin/ostree-remount +usr/share/man +usr/share/ostree/trusted.gpg.d diff --git a/debian/patches/libglnx-user-glibc-attr-support.patch b/debian/patches/libglnx-user-glibc-attr-support.patch new file mode 100644 index 00000000..c067d0a0 --- /dev/null +++ b/debian/patches/libglnx-user-glibc-attr-support.patch @@ -0,0 +1,36 @@ +From d59a63e3e650aa75a055e4ede523790d60645435 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Wed, 1 Apr 2015 05:42:26 -0400 +Subject: Switch to using glibc xattrs + +See https://github.com/GNOME/ostree/pull/78 + +diff --git a/glnx-fdio.h b/glnx-fdio.h +index 19f938c..5765a02 100644 +--- a/libglnx/glnx-fdio.h ++++ b/libglnx/glnx-fdio.h +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + /* From systemd/src/shared/util.h */ + /* When we include libgen.h because we need dirname() we immediately + * undefine basename() since libgen.h defines it as a macro to the XDG +diff --git a/glnx-xattrs.h b/glnx-xattrs.h +index 410c722..a566a22 100644 +--- a/libglnx/glnx-xattrs.h ++++ b/libglnx/glnx-xattrs.h +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + + G_BEGIN_DECLS + +-- +cgit v0.10.2 + diff --git a/debian/patches/ostree-fix-mutable-tree-test-segfault.patch b/debian/patches/ostree-fix-mutable-tree-test-segfault.patch new file mode 100644 index 00000000..1615af91 --- /dev/null +++ b/debian/patches/ostree-fix-mutable-tree-test-segfault.patch @@ -0,0 +1,54 @@ +From d667ebe1568591bdd3c3cc23d751ffc5c0a3752c Mon Sep 17 00:00:00 2001 +From: Sam Thursfield +Date: Tue, 31 Mar 2015 12:59:43 -0400 +Subject: core: Fix possible crash in ostree_mutable_tree_walk() + +If the starting index is beyond the end of the list, it's a programming +error. Previously, the code was trying to raise a runtime error, but +actually causing a segfault. + +This was detected by test code in test-mutable-tree.c, which is removed +in this commit because it should now not be possible to crash here. + +https://bugzilla.gnome.org/747032 + +diff --git a/src/libostree/ostree-mutable-tree.c b/src/libostree/ostree-mutable-tree.c +index 26a1ca4..17bcdc9 100644 +--- a/src/libostree/ostree-mutable-tree.c ++++ b/src/libostree/ostree-mutable-tree.c +@@ -315,11 +315,9 @@ ostree_mutable_tree_walk (OstreeMutableTree *self, + OstreeMutableTree **out_subdir, + GError **error) + { +- if (start >= split_path->len) +- { +- return set_error_noent (error, (char*)split_path->pdata[start]); +- } +- else if (start == split_path->len - 1) ++ g_return_val_if_fail (start < split_path->len, FALSE); ++ ++ if (start == split_path->len - 1) + { + *out_subdir = g_object_ref (self); + return TRUE; +diff --git a/tests/test-mutable-tree.c b/tests/test-mutable-tree.c +index ef2b6b5..b0c2386 100644 +--- a/tests/test-mutable-tree.c ++++ b/tests/test-mutable-tree.c +@@ -70,13 +70,6 @@ test_mutable_tree_walk (void) + + { + gs_unref_object OstreeMutableTree *subdir = NULL; +- g_assert_false (ostree_mutable_tree_walk (tree, split_path, 10, &subdir, &error)); +- g_assert_null (subdir); +- g_clear_error (&error); +- } +- +- { +- gs_unref_object OstreeMutableTree *subdir = NULL; + gs_unref_object OstreeMutableTree *a = NULL; + gs_free char *source_checksum = NULL; + ostree_mutable_tree_lookup (tree, "a", &source_checksum, &a, &error); +-- +cgit v0.10.2 + diff --git a/debian/patches/ostree-link-test-gpg-gpgme.patch b/debian/patches/ostree-link-test-gpg-gpgme.patch new file mode 100644 index 00000000..46c67e78 --- /dev/null +++ b/debian/patches/ostree-link-test-gpg-gpgme.patch @@ -0,0 +1,15 @@ +From: David King +Date: Thu, 2 Apr 2015 13:02:39 +0200 +Subject: [PATCH] GPG test needs gpgme to link + +--- a/Makefile-tests.am ++++ b/Makefile-tests.am +@@ -147,7 +147,7 @@ TESTS_LDADD = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_GIO_UNIX_LIBS) + src/libostree/ostree-gpg-verify-result-private.h \ + tests/test-gpg-verify-result.c + tests_test_gpg_verify_result_CFLAGS = $(TESTS_CFLAGS) +-tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) ++tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(GPGME_LIBS) + + EXTRA_DIST += \ + tests/gpg-verify-data/README.md \ diff --git a/debian/patches/ostree-link-test-rollsum-libz.patch b/debian/patches/ostree-link-test-rollsum-libz.patch new file mode 100644 index 00000000..5ce9f6b8 --- /dev/null +++ b/debian/patches/ostree-link-test-rollsum-libz.patch @@ -0,0 +1,22 @@ +From b9fed3d04d5e8cff6f0ad318cc9ab07831af78c0 Mon Sep 17 00:00:00 2001 +From: Daniel Svensson +Date: Wed, 1 Apr 2015 09:38:13 +0200 +Subject: [PATCH] test_rollsum needs -lz to link. + +--- + Makefile-tests.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile-tests.am b/Makefile-tests.am +index 675547d..fa35588 100644 +--- a/Makefile-tests.am ++++ b/Makefile-tests.am +@@ -119,7 +119,7 @@ TESTS_LDADD = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_GIO_UNIX_LIBS) + + tests_test_rollsum_SOURCES = src/libostree/ostree-rollsum.c tests/test-rollsum.c + tests_test_rollsum_CFLAGS = $(TESTS_CFLAGS) +-tests_test_rollsum_LDADD = libbupsplit.la $(TESTS_LDADD) ++tests_test_rollsum_LDADD = libbupsplit.la $(TESTS_LDADD) $(OT_DEP_ZLIB_LIBS) + + tests_test_mutable_tree_CFLAGS = $(TESTS_CFLAGS) + tests_test_mutable_tree_LDADD = $(TESTS_LDADD) diff --git a/debian/patches/ostree-use-glibc-attr-support.patch b/debian/patches/ostree-use-glibc-attr-support.patch new file mode 100644 index 00000000..c41521c9 --- /dev/null +++ b/debian/patches/ostree-use-glibc-attr-support.patch @@ -0,0 +1,64 @@ +From 534c4c20c3fa5ad9500ea96093a3ece7821a6056 Mon Sep 17 00:00:00 2001 +From: Daniel Svensson +Date: Wed, 1 Apr 2015 09:45:20 +0200 +Subject: build: Use glibc's xattr support instead of requiring libattr + +Fixes the build on Debian, and is one library less. + +Closes: #78 + +diff --git a/configure.ac b/configure.ac +index 4042524..e11be41 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -39,7 +39,7 @@ AC_ARG_ENABLE(installed_tests, + [enable_installed_tests=no]) + AM_CONDITIONAL(BUILDOPT_INSTALL_TESTS, test x$enable_installed_tests = xyes) + +-AC_CHECK_HEADER([attr/xattr.h],,[AC_MSG_ERROR([You must have attr/xattr.h from libattr])]) ++AC_CHECK_HEADER([sys/xattr.h],,[AC_MSG_ERROR([You must have sys/xattr.h from glibc])]) + + PKG_PROG_PKG_CONFIG + +diff --git a/src/libostree/ostree-repo-checkout.c b/src/libostree/ostree-repo-checkout.c +index daca66e..22aaf56 100644 +--- a/src/libostree/ostree-repo-checkout.c ++++ b/src/libostree/ostree-repo-checkout.c +@@ -23,7 +23,7 @@ + #include "config.h" + + #include +-#include ++#include + #include + #include + #include "otutil.h" +diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c +index ce5aa07..6ba606f 100644 +--- a/src/libostree/ostree-repo-commit.c ++++ b/src/libostree/ostree-repo-commit.c +@@ -34,7 +34,7 @@ + #include "ostree-checksum-input-stream.h" + #include "ostree-mutable-tree.h" + #include "ostree-varint.h" +-#include ++#include + #include + + gboolean +diff --git a/src/libotutil/ot-fs-utils.c b/src/libotutil/ot-fs-utils.c +index 7137b82..040636b 100644 +--- a/src/libotutil/ot-fs-utils.c ++++ b/src/libotutil/ot-fs-utils.c +@@ -22,7 +22,7 @@ + + #include "ot-fs-utils.h" + #include "libgsystem.h" +-#include ++#include + #include + + int +-- +cgit v0.10.2 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..e69de29b diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..71c311bf --- /dev/null +++ b/debian/rules @@ -0,0 +1,24 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +%: + dh $@ --parallel --with=autoreconf,gir + +override_dh_auto_clean: + +override_dh_autoreconf: + env NOCONFIGURE=1 dh_autoreconf ./autogen.sh + +override_dh_auto_configure: + dh_auto_configure -- \ + --disable-silent-rules \ + --enable-gtk-doc \ + --with-dracut \ + --with-grub2 \ + --with-systemdsystemunitdir=/lib/systemd/system + +override_dh_strip: + dh_strip -postree --dbg-package=ostree-dbg + dh_strip -plibostree-1-1 --dbg-package=ostree-dbg diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..b8048d7e --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +https://git.gnome.org/browse/ostree/snapshot/ostree-([\d.]+)\.tar\.xz