--- mtree-netbsd-20180822.orig/debian/README.Debian +++ mtree-netbsd-20180822/debian/README.Debian @@ -0,0 +1,16 @@ +mtree-netbsd for Debian +---------------------- + +This is the mtree package derived from the NetBSD source tree. + +Related packages in Debian include: + + - freebsd-buildutils and freebsd-glue, which provide FreeBSD's legacy fmtree. + - bsdtar (and libarchive), which can generate and process files using the + mtree -C format. + +There is also a document describing the mtree format in the bsdtar +package as the mtree(5) manpage. + + -- John Goerzen Wed, 03 Oct 2018 21:49:57 -0500 + --- mtree-netbsd-20180822.orig/debian/README.source +++ mtree-netbsd-20180822/debian/README.source @@ -0,0 +1,9 @@ +mtree-netbsd for Debian +---------------------- + +Imported to git using: + +git cvsimport -v -d :pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot pkgsrc/pkgtools/mtree/files + + -- John Goerzen Wed, 03 Oct 2018 21:49:57 -0500 + --- mtree-netbsd-20180822.orig/debian/changelog +++ mtree-netbsd-20180822/debian/changelog @@ -0,0 +1,43 @@ +mtree-netbsd (20180822-6) unstable; urgency=medium + + * Remove dependency on freebsd-buildutils for now, since it is + blocking transition to testing and is only used for tests. + Will restore if #957230 gets resolved. + + -- John Goerzen Tue, 12 Jan 2021 09:48:19 -0600 + +mtree-netbsd (20180822-5) unstable; urgency=medium + + * Update build-dep to support libarchive-tools instead of bsdtar. + Closes: #945890. + * Update standards-version. + + -- John Goerzen Sun, 08 Dec 2019 09:40:24 -0600 + +mtree-netbsd (20180822-4) unstable; urgency=low + + * Coordinate with libnbcompat-dev v5 libraries + + -- John Goerzen Fri, 05 Oct 2018 08:44:49 -0500 + +mtree-netbsd (20180822-3) unstable; urgency=low + + * Harmonize build-dep with libnbcompat + * Correct debian/copyright. Closes: #910332. + + -- John Goerzen Fri, 05 Oct 2018 07:50:43 -0500 + +mtree-netbsd (20180822-2) unstable; urgency=medium + + * Adding tests, verifying compatibility with FreeBSD fmtree from + freebsd-buildutils + * Added sub-second time precision + * Added README.Debian + + -- John Goerzen Thu, 04 Oct 2018 08:40:30 -0500 + +mtree-netbsd (20180822-1) unstable; urgency=medium + + * Initial release (Closes: #910253) + + -- John Goerzen Wed, 03 Oct 2018 21:49:57 -0500 --- mtree-netbsd-20180822.orig/debian/compat +++ mtree-netbsd-20180822/debian/compat @@ -0,0 +1 @@ +9 --- mtree-netbsd-20180822.orig/debian/control +++ mtree-netbsd-20180822/debian/control @@ -0,0 +1,24 @@ +Source: mtree-netbsd +Section: utils +Priority: optional +Maintainer: John Goerzen +Build-Depends: debhelper (>= 9), autotools-dev, bmake, libnbcompat-dev (>= 20180822-5), libarchive-tools | bsdtar, libncurses-dev, libbsd-dev, libmd-dev +Standards-Version: 4.4.1 +Homepage: http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/pkgtools/mtree/README.html +Vcs-Git: https://github.com/jgoerzen/mtree-netbsd.git +Vcs-Browser: https://github.com/jgoerzen/mtree-netbsd + +Package: mtree-netbsd +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Validates directory tree against specification + The mtree utility compares a file hierarchy against a specification, + creates a specification for a file hierarchy, or modifies a specification. + This specification can be controlled by the user, but typically includes + file/directory/symlink names, ownership information, permission bits, and + so forth. It may optionally also include various hashes, such as SHA-256 + or MD5. + . + This mtree utility can understand its own files, as well as those generated + by the FreeBSD mtree (in Debian as fmtree in freebsd-buildutils and + freebsd-glue) and bsdtar/libarchive. --- mtree-netbsd-20180822.orig/debian/copyright +++ mtree-netbsd-20180822/debian/copyright @@ -0,0 +1,239 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: mtree +Source: :pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot pkgsrc/pkgtools/mtree/files + +Files: * +Copyright: Copyright (c) 1989, 1990, 1993 The Regents of the University of California. +License: BSD-3-Clause + +Files: debian/* +Copyright: 2018 John Goerzen +License: BSD-3-Clause + +License: BSD-3-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: config.guess +Copyright: Copyright: 1992-2006 Free Software Foundation, +License: GPL-2+ + +Files: configure +Copyright: Copyright: 1992-1996, 1998-2012 Free Software Foundation, Inc. +License: FSF-Unlimited + +License: FSF-Unlimited + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + +Files: create.c +Copyright: Copyright: 1989, 1993 The Regents of the University of California. +License: BSD-3-clause + +Files: debian/README.Debian +Copyright: 2018, John Goerzen +License: GPL-2+ + +Files: debian/README.source +Copyright: 2018, John Goerzen +License: GPL-2+ + +Files: debian/changelog +Copyright: 2018, John Goerzen +License: GPL-2+ + +Files: debian/compat +Copyright: 2018, John Goerzen +License: GPL-2+ + +Files: debian/control +Copyright: 2018, John Goerzen +License: GPL-2+ + +Files: debian/control~ +Copyright: 2018, John Goerzen +License: GPL-2+ + +Files: debian/copyright +Copyright: 2018, John Goerzen +License: GPL-2+ + +Files: debian/gbp.conf +Copyright: 2018, John Goerzen +License: GPL-2+ + +Files: debian/mtree-netbsd-docs.docs +Copyright: 2018, John Goerzen +License: GPL-2+ + +Files: debian/rules +Copyright: 2018, John Goerzen +License: GPL-2+ + +Files: debian/source/format +Copyright: 2018, John Goerzen +License: GPL-2+ + +Files: excludes.c +Copyright: Copyright: 2000 Massachusetts Institute of Technology +License: NTP + +Files: extern.h +Copyright: Copyright: 1991, 1993 The Regents of the University of California. +License: BSD-3-clause + +Files: getid.c +Copyright: Copyright: 1987-1989, 1993-1995 The Regents of the University of California. +License: BSD-4-clause + +Files: install-sh +Copyright: Copyright: 1991 the Massachusetts Institute of Technology +License: NTP + +Files: misc.c +Copyright: Copyright: 1991, 1993 The Regents of the University of California. +License: BSD-3-clause + +Files: mtree.8 +Copyright: Copyright: 1989-1990, 1993 The Regents of the University of California. +License: BSD-4-clause + +Files: mtree.c +Copyright: Copyright: 1989-1990, 1993 The Regents of the University of California. +License: BSD-3-clause + +Files: mtree2nbcompat +Copyright: Copyright: 2004 The NetBSD Foundation, Inc. +License: BSD-2-clause + +Files: pack_dev.c +Copyright: Copyright: 1998, 2001 The NetBSD Foundation, Inc. +License: BSD-4-clause + +Files: pack_dev.h +Copyright: Copyright: 1998, 2001 The NetBSD Foundation, Inc. +License: BSD-4-clause + +Files: spec.c +Copyright: Copyright: 1989, 1993 The Regents of the University of California. +License: BSD-4-clause + +Files: stat_flags.c +Copyright: Copyright: 1993 The Regents of the University of California. +License: BSD-3-clause + +Files: stat_flags.h +Copyright: Copyright: 1991, 1993 The Regents of the University of California. +License: BSD-3-clause + +Files: verify.c +Copyright: Copyright: 1990, 1993 The Regents of the University of California. +License: BSD-3-clause + +License: gpl-2+ + See /usr/share/common-licenses/GPL-2 + +License: isc + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL + WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE + FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +License: ntp + License to copy and use this software is granted provided that it + is identified as the "RSA Data Security, Inc. MD5 Message-Digest + Algorithm" in all material mentioning or referencing this software + or this function. + . + License is also granted to make and use derivative works provided + that such works are identified as "derived from the RSA Data + Security, Inc. MD5 Message-Digest Algorithm" in all material + mentioning or referencing the derived work. + . + RSA Data Security, Inc. makes no representations concerning either + the merchantability of this software or the suitability of this + software for any particular purpose. It is provided "as is" + without express or implied warranty of any kind. + . + These notices must be retained in any copies of any part of this + documentation and/or software. + +License: bsd-4-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the University of + California, Berkeley and its contributors. + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +License: BSD-2-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + --- mtree-netbsd-20180822.orig/debian/gbp.conf +++ mtree-netbsd-20180822/debian/gbp.conf @@ -0,0 +1,3 @@ +[DEFAULT] +debian-branch = debian + --- mtree-netbsd-20180822.orig/debian/mtree-netbsd-docs.docs +++ mtree-netbsd-20180822/debian/mtree-netbsd-docs.docs @@ -0,0 +1,2 @@ +README.Debian +README.source --- mtree-netbsd-20180822.orig/debian/rules +++ mtree-netbsd-20180822/debian/rules @@ -0,0 +1,42 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ --with autotools_dev + + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) + +# Install this in /usr/bin + +# The -DBSD4_4 and -Dst_mtimespec=st_mtim are for sub-second time precision +override_dh_auto_configure: + dh_auto_configure -- --sbindir=/usr/bin LIBS="-lnbcompat -lmd" CPPFLAGS="$(CPPFLAGS) -D_GNU_SOURCE -DBSD4_4 -Dst_mtimespec=st_mtim" + +MTREE_KEYWORDS := cksum,md5digest,sha1digest,sha256digest,rmd160,nlink,gname,uname + +# Add tests +override_dh_auto_test: + # Removing the next two to avoid dependency on freebsd-buildutils, + # which is currently blocking transition of this package into testing, + # per #957230. + #fmtree -c -K $(MTREE_KEYWORDS) | ./mtree + #./mtree -c -K $(MTREE_KEYWORDS) | sed -e 's/\(md5\|sha1\|sha256\|sha384\|sha512\)=/\1digest=/' -e 's/rmd160=/ripemd160digest=/' | fmtree + bsdtar -cf - --options 'mtree:uname,gname,md5,sha1,sha256,sha384,sha512,device,flags,gid,link,mode,nlink,size,time,uid,type,uname' --format mtree . | ./mtree + ./mtree -c -K $(MTREE_KEYWORDS) | ./mtree -C -K $(MTREE_KEYWORDS) | grep md5= | grep sha1= | grep sha256= | grep gname= | grep -q uname= --- mtree-netbsd-20180822.orig/debian/source/format +++ mtree-netbsd-20180822/debian/source/format @@ -0,0 +1 @@ +1.0 --- mtree-netbsd-20180822.orig/pack_dev.c +++ mtree-netbsd-20180822/pack_dev.c @@ -58,6 +58,9 @@ #include #endif +/* Linux libc has these here */ +#include + #if HAVE_LIMITS_H #include #endif --- mtree-netbsd-20180822.orig/spec.c +++ mtree-netbsd-20180822/spec.c @@ -464,7 +464,7 @@ mtree_err("not enough arguments"); result = (*pack)(argc, numbers, &error); if (error != NULL) - mtree_err(error); + mtree_err("%s", error); /* clear up gcc warning */ } else { result = (dev_t)strtoul(arg, &ep, 0); if (*ep != '\0')