debian/0000775000000000000000000000000012310705252007165 5ustar debian/patches/0000775000000000000000000000000012310705251010613 5ustar debian/patches/series0000664000000000000000000000000012264537131012026 0ustar debian/patches/upstream-cross-platform-fixes0000664000000000000000000002224712264537131016502 0ustar Description: Upstream cross-platform fixes for non x86/AMD64 platforms. procenv (0.27-2) unstable; urgency=low . * Upstream sync including fixes for Hurd semaphores, and those platforms which don't support the complete set of standard Linux signals. Author: James Hunt --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- procenv-0.27.orig/TODO +++ procenv-0.27/TODO @@ -1,5 +1,9 @@ # TODO +- XXX: run show_compiler_details *before* build to help diagnose + failures. +- Add YAML output format? +- Sort *all* output values. - Introduce "value()" that can take a bare value. This will allow for example mount options to be displayed in a container. - Non-root queryable hdd attributes? --- procenv-0.27.orig/ChangeLog +++ procenv-0.27/ChangeLog @@ -1,3 +1,28 @@ +2013-10-30 James Hunt + + * src/procenv.c: + - show_signals(): Check return from get_signal_name() in case a + platform doesn't provide the signal in question. + - get_kernel_bits(): Return error value rather than calling die(). + - show_bsd_mounts(): Removed unused variables. + - Added a few extra asserts to ensure section_open() is passed a valid + name. + * src/procenv.h: Need to define 'semun' on Hurd too. + +2013-10-25 James Hunt + + * TODO: Stuff. + * src/procenv.c: get_arch(): Fix for AARCH64 which seemingly isn't + considered to be "ARM" by gcc. + +2013-10-15 James Hunt + + * man/procenv.1: + - Fix for lintian bug: spelling-error-in-binary. + * src/procenv.c: + - Fixes for lintian bugs: spelling-error-in-manpage, + hyphen-used-as-minus-sign. + 2013-10-14 James Hunt * configure.ac: Add '--debug' option. --- /dev/null +++ procenv-0.27/TODO.debian @@ -0,0 +1,5 @@ +# Debian fixes: + +- powerpc: + - semmap: -1674096 + - 'procenv -E' crash --- procenv-0.27.orig/src/procenv.c +++ procenv-0.27/src/procenv.c @@ -716,7 +716,7 @@ usage (void) show (" - Any long option name may be shortened as long as it remains unique."); show (" - The 'crumb' output format is designed for easy parsing: it displays"); show (" the data in a flattened format with each value on a separate line"); - show (" preceeded by all appropriate headings which are separated by the"); + show (" preceded by all appropriate headings which are separated by the"); show (" current separator."); show (""); } @@ -1461,6 +1461,9 @@ show_signals (void) blocked = 1; signal_name = get_signal_name (i); + if (! signal_name) + continue; + signal_desc = strsignal (i); object_open (FALSE); @@ -2403,7 +2406,7 @@ get_kernel_bits (void) errno = 0; value = sysconf (_SC_LONG_BIT); if (value == -1 && errno != 0) - die ("failed to determine kernel bits"); + return -1; return value; #endif return -1; @@ -2709,10 +2712,11 @@ show_linux_mounts (ShowMountType what) used_files = fs.f_files - fs.f_ffree; } - get_major_minor (mnt->mnt_dir, + (void)get_major_minor (mnt->mnt_dir, &major, &minor); + assert (mnt->mnt_dir); section_open (mnt->mnt_dir); entry ("filesystem", "'%s'", mnt->mnt_fsname); @@ -2954,6 +2958,7 @@ show_network_if (const struct ifaddrs *i family = ifa->ifa_addr->sa_family; + assert (ifa->ifa_name); section_open (ifa->ifa_name); entry ("family", "%s (0x%x)", get_net_family_name (family), family); @@ -3276,7 +3281,6 @@ show_bsd_mounts (ShowMountType what) statfs_int_type bfree; statfs_int_type bavail; statfs_int_type used; - int ret; common_assert (); @@ -3297,9 +3301,7 @@ show_bsd_mounts (ShowMountType what) mnt->f_mntonname); if (what == SHOW_ALL || what == SHOW_MOUNTS) { - char *str = NULL; - - ret = get_major_minor (mnt->f_mntonname, + (void)get_major_minor (mnt->f_mntonname, &major, &minor); @@ -3309,6 +3311,7 @@ show_bsd_mounts (ShowMountType what) bavail = mnt->f_bavail * multiplier; used = blocks - bfree; + assert (mnt->f_mntfromname); section_open (mnt->f_mntfromname); entry ("dir", "'%s'", mnt->f_mntonname); @@ -4429,9 +4432,6 @@ get_arch (void) { #ifdef __arm__ -#ifdef __aarch64__ - return "ARM64"; -#endif #ifdef __ARM_PCS_VFP return "ARMhf"; #endif @@ -4441,6 +4441,11 @@ get_arch (void) return "ARM"; #endif + /* not arm apparently! :) */ +#ifdef __aarch64__ + return "ARM64/AARCH64"; +#endif + #ifdef __hppa__ return "HP/PA RISC"; #endif @@ -4509,6 +4514,8 @@ libs_callback (struct dl_phdr_info *info return 0; path = info->dlpi_name; + assert (path); + name = strrchr (path, '/'); if (name) { --- procenv-0.27.orig/src/procenv.h +++ procenv-0.27/src/procenv.h @@ -817,7 +817,7 @@ void show_semaphores_bsd (void); void show_msg_queues_bsd (void); #endif /* PROCENV_BSD + __FreeBSD_kernel__ */ -#if defined (PROCENV_LINUX) +#if defined (PROCENV_LINUX) || defined (PROCENV_HURD) /* semctl(2) on Linux tells us _we_ must define this */ union semun { --- /dev/null +++ procenv-0.27/tmp/procenv_0.27-1_i386.changes @@ -0,0 +1,44 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA512 + +Format: 1.8 +Date: Wed, 23 Oct 2013 09:13:49 +0100 +Source: procenv +Binary: procenv +Architecture: i386 +Version: 0.27-1 +Distribution: sid +Urgency: low +Maintainer: James Hunt +Changed-By: James Hunt +Description: + procenv - Utility to show process environment +Changes: + procenv (0.27-1) unstable; urgency=low + . + * New upstream release. + * debian/control: Add expat and perl to Build-Depends for tests. +Checksums-Sha1: + 4c02b5fa90eb4306c4e219287163d84cf19a14c8 50048 procenv_0.27-1_i386.deb +Checksums-Sha256: + 23d3987be04b5bd942c471eff0f6c9639288ecfa7c9835ccfe20404495374d41 50048 procenv_0.27-1_i386.deb +Files: + 887a1a7b03a7d0c0d5569656a279ced8 50048 utils optional procenv_0.27-1_i386.deb + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.14 (GNU/Linux) + +iQIcBAEBCgAGBQJSZ4miAAoJEJ1Q4UTmNXMnRcwP/1H2slCi5dX2tRCURpwVSQEH +GN1CKi1YdjJn/1HXcaGTaBVJLR2UpCx+8IXJZADyLEtzM4eQhXPokmKI5qipKELx +RESrdltkzdHuAsu0jDU9jXk9d9MNMhu7XY9lVosT5wDKKPfj793e3u/Pji1e7g0P +cAMuN3WJM6KP5EcXhq+V9bOjXx4KvEBiJ/fsTTydtX5ad2s5jMrQ3N87RZCoh2LB +/h8ifs4l+/+jzlkgryemgMKNhI5gJYT4PoDhqK8PceJub6kDVtJYq3PA/1iVd1HO +/GvKCgy/9dzJSif1yNyC/e6aCcfuxiCOBGNsHvISzU2sM6IlZXGy6fTJ+jLTt2ZD +cdpkONMeLCmt2axrJ6P5TZ+AVeA89DopLF0aiw/WS0MJ9k/LRGZWyfI84+/L4Uf4 +Au+W2/53zO0gIXWbIOIlK5h0QORkLWzqz6EfYDx3hwrUYX0ANrRNyGNp8xYIwViG +VbFIoX/qs2lqg+ralaC/YQkWlsK6KJqIC38dnz+JXs3p7c8/XjM5FpKhoXn9TDM3 +Dly0ZYVBfoygYrEncyyMH8WLNeFvUG34/zIuQtX3XF62hLfEr4ldRg8WGfFL8WPK +VKxKm5myaWn0wfPexP54sQES2uOzblm9iqO6iajnI7MCQ5wufBLJd6edmNI9p/1q +GqOjKZtm/Yd0Ed12XTdB +=pZiW +-----END PGP SIGNATURE----- --- procenv-0.27.orig/man/procenv.1 +++ procenv-0.27/man/procenv.1 @@ -414,7 +414,7 @@ Any long option name may be shortened as The .I crumb output format is designed for easy parsing: it displays the data in a -flattened format with each value on a separate line preceeded by all +flattened format with each value on a separate line preceded by all appropriate headings which are separated by the current separator. .IP \(bu The \fB\-\-message\-queues\fR, \fB\-\-semaphores\fR and @@ -431,10 +431,10 @@ the values are queryable, there is no do \& # Send compiler information to syslog (note the order of the options). \& procenv \-\-output=syslog \-\-compiler \& -\& # Run a command ('mycmd --arg1 --foo=bar') without creating a new +\& # Run a command ('mycmd \-\-arg1 \-\-foo=bar') without creating a new \& # process, but have procenv run first and log its output to a \& # regular file. -\& exec procenv \-\-file=/tmp/procenv.log --exec -- mycmd --arg1 --foo=bar +\& exec procenv \-\-file=/tmp/procenv.log \-\-exec \-\- mycmd \-\-arg1 \-\-foo=bar \& \& # The following kernel command-line snippet will cause procenv to \& # write output to first serial tty device and then execute init(8) @@ -442,16 +442,16 @@ the values are queryable, there is no do \& init=/usr/bin/procenv PROCENV_FILE=/dev/ttyS0 PROCENV_EXEC="/sbin/init \-\-debug" \& \& # Display all data in JSON format using an indent of 4 spaces -\& procenv --format=json --indent=4 +\& procenv \-\-format=json \-\-indent=4 \& \& # Display all data in XML format using tabs for indents -\& procenv --format=xml --indent-char="\t" +\& procenv \-\-format=xml \-\-indent-char="\t" \& \& # Display resource limits in easily-parseable format -\& procenv --format=crumb --limits +\& procenv \-\-format=crumb \-\-limits \& \& # Produce output suitable for importing into a spreadsheet -\& procenv --format=crumb --crumb-separator=\(aq,\(aq --separator=\(aq,\(aq --limits +\& procenv \-\-format=crumb \-\-crumb-separator=\(aq,\(aq \-\-separator=\(aq,\(aq \-\-limits .Ve .Ve .\" debian/control0000664000000000000000000000151012310705076010571 0ustar Source: procenv Section: utils Priority: optional Maintainer: James Hunt Build-Depends: debhelper (>= 9.0.0), dh-autoreconf, libkvm-dev [kfreebsd-any], pkg-config, automake (>= 1.12), perl, expat, libnuma-dev [linux-i386 linux-amd64 linux-ia64 linux-mips linux-mipsel linux-powerpc linux-ppc64 linux-ppc64el linux-x32], libcap-dev [linux-any] Standards-Version: 3.9.5 Homepage: https://code.launchpad.net/procenv XS-Testsuite: autopkgtest Package: procenv Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Utility to show process environment This package contains a command-line tool that displays as much detail about itself and its environment as possible. It can be used as a test tool, to understand the type of environment a process runs in, and for comparing system environments. debian/source/0000775000000000000000000000000012310705251010464 5ustar debian/source/format0000664000000000000000000000001412264537131011702 0ustar 3.0 (quilt) debian/manpages0000664000000000000000000000001612264537131010707 0ustar man/procenv.1 debian/watch0000664000000000000000000000014712264537131010227 0ustar version=3 https://launchpad.net/procenv/+download https://launchpad.net/procenv/.*/procenv-(.+).tar.gz debian/rules0000775000000000000000000000010312264537131010246 0ustar #!/usr/bin/make -f # -*- makefile -*- %: dh $@ --with autoreconf debian/compat0000664000000000000000000000000212264537131010372 0ustar 9 debian/copyright0000664000000000000000000000216412264537131011132 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: procenv Upstream-Contact: James Hunt Source: https://code.launchpad.net/procenv Files: * Copyright: 2012 James Hunt License: GPL-3.0+ Files: debian/* Copyright: 2012 James Hunt License: GPL-3.0+ License: GPL-3.0+ 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 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 General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". debian/docs0000664000000000000000000000002112264537131010040 0ustar NEWS README TODO debian/tests/0000775000000000000000000000000012310705251010326 5ustar debian/tests/control0000664000000000000000000000002512264537131011736 0ustar Tests: run-installed debian/tests/run-installed0000775000000000000000000000106612264537131013050 0ustar #!/bin/sh -e #--------------------------------------------------------------------- # Run packaged version of procenv. # # Note that we do not need to run 'make check', since dh(1) does that # automatically via dh_auto_test(1). As a result, procenv is run # _twice_: via this test, but also before this test is run when dh # prepares the package source. This is ok though since, interestingly, # the environments *are* different, and not just due to the obvious # pid changes. #--------------------------------------------------------------------- /usr/bin/procenv debian/changelog0000664000000000000000000001617712310705234011053 0ustar procenv (0.33-2) unstable; urgency=medium * debian/control: Only Build-Depend on libcap-dev on linux. -- James Hunt Fri, 14 Mar 2014 23:01:57 +0000 procenv (0.33-1) unstable; urgency=medium * debian/control: Add Build-Depends on libcap-dev for upcoming release. * New upstream release. -- James Hunt Fri, 14 Mar 2014 20:44:41 +0000 procenv (0.32-1) unstable; urgency=medium * New upstream release. -- James Hunt Fri, 31 Jan 2014 21:14:00 +0000 procenv (0.30-1) unstable; urgency=medium * New upstream release. -- James Hunt Sat, 18 Jan 2014 09:14:42 +0000 procenv (0.29-2) unstable; urgency=medium * debian/control: Add missing linux-ppc64 and linux-ppc64el architectures to libnuma-dev Build-Depends (LP: #1268840). -- James Hunt Tue, 14 Jan 2014 08:59:05 +0000 procenv (0.29-1) unstable; urgency=medium * New upstream release. * debian/control: Only Build-Depend on libnuma for linux architectures supporting NUMA. -- James Hunt Mon, 13 Jan 2014 20:52:22 +0000 procenv (0.28-1) unstable; urgency=medium * New upstream release. * debian/control: Add libnuma-dev to Build-Depends. -- James Hunt Sun, 12 Jan 2014 15:39:02 +0000 procenv (0.27-2) unstable; urgency=low * Upstream sync including fixes for Hurd semaphores, and those platforms which don't support the complete set of standard Linux signals. -- James Hunt Wed, 30 Oct 2013 19:15:56 +0000 procenv (0.27-1) unstable; urgency=low * New upstream release. * debian/control: Add expat and perl to Build-Depends for tests. -- James Hunt Wed, 23 Oct 2013 09:13:49 +0100 procenv (0.26-1) unstable; urgency=low * New upstream release. -- James Hunt Tue, 27 Aug 2013 23:09:03 +0100 procenv (0.25-1) unstable; urgency=low * debian/control: Add build-depends on automake >= 1.12 for 'serial-tests' used in configure.ac * New upstream release. -- James Hunt Fri, 19 Jul 2013 21:40:43 +0100 procenv (0.24-1) unstable; urgency=low * New upstream release. * Update for standards version 3.9.4 and to resolve lintian illegal-runtime-test-name warning. -- James Hunt Mon, 01 Jul 2013 14:31:40 +0100 procenv (0.23-1) unstable; urgency=low * New upstream release. -- James Hunt Fri, 31 May 2013 12:42:34 +0100 procenv (0.22-1) unstable; urgency=low * New upstream release. -- James Hunt Mon, 20 May 2013 17:30:02 +0100 procenv (0.21-1) unstable; urgency=low * New upstream release. -- James Hunt Sun, 07 Apr 2013 19:43:14 +0100 procenv (0.20-2) unstable; urgency=low * debian/docs: Removed ChangeLog to appease lintian. -- James Hunt Tue, 12 Feb 2013 08:49:59 +0000 procenv (0.20-1) unstable; urgency=low * New upstream release. -- James Hunt Tue, 15 Jan 2013 21:10:53 +0000 procenv (0.19-1) unstable; urgency=low * New upstream release. * debian/rules: Remove unnecessary changelog handling code. -- James Hunt Mon, 17 Dec 2012 19:24:45 +0000 procenv (0.18-1) unstable; urgency=low * New upstream release. -- James Hunt Thu, 06 Dec 2012 20:33:06 +0000 procenv (0.17-1) unstable; urgency=low * New upstream release. -- James Hunt Thu, 06 Dec 2012 19:17:56 +0000 procenv (0.16-1) unstable; urgency=low * New upstream release. -- James Hunt Sun, 02 Dec 2012 22:57:07 +0000 procenv (0.15-2) unstable; urgency=low * debian/control: Added missing Build-Depends on pkg-config. -- James Hunt Sun, 02 Dec 2012 22:55:05 +0000 procenv (0.15-1) unstable; urgency=low * New upstream release that includes fixes to tolerate clock resolution query failures seen on Hurd (Closes: #694627). -- James Hunt Wed, 28 Nov 2012 20:44:41 +0000 procenv (0.14-1) unstable; urgency=low * New upstream release. -- James Hunt Wed, 28 Nov 2012 20:04:20 +0000 procenv (0.13-2) unstable; urgency=low * debian/tests/make_check: Removed as not required since autopkgtest already runs 'make check' automatically via dh_auto_test as part of its setup phase before the DEP-8 tests are run. * debian/tests/run_installed: test added to run the installed version of procenv. * debian/tests/control: Removed everything aside from specification of new run_installed test. -- James Hunt Wed, 28 Nov 2012 19:39:54 +0000 procenv (0.13-1) unstable; urgency=low * New upstream release. -- James Hunt Mon, 26 Nov 2012 13:31:39 +0000 procenv (0.12-2) unstable; urgency=low * Added DEP-8 autopkgtest support. -- James Hunt Sun, 25 Nov 2012 17:31:51 +0000 procenv (0.12-1) unstable; urgency=low * New upstream release including fix to handle identifying GNU/Hurd (Closes: #693973). -- James Hunt Thu, 22 Nov 2012 20:30:45 +0000 procenv (0.11-1) unstable; urgency=low * New upstream release which handles prctl failures gracefully. This should not strictly be required but for the fact that when building in a chroot environment, the running kernel version may well be back-level with respect to the installed libc such that although libc advertises the availability of particular prctl options, the kernel is unable to honour them, since it has no knowledge of them. (Closes: #693764, #693795). -- James Hunt Wed, 21 Nov 2012 19:44:15 +0000 procenv (0.10-1) unstable; urgency=low * New upstream release which checks running kernel version to determine if capabilities can be legitimately queried (Closes #693795). * Fixed previous changelog entry to show how bugs closed. -- James Hunt Tue, 20 Nov 2012 19:46:19 +0000 procenv (0.9-1) unstable; urgency=low * New upstream release (which fixes all bugs below directly except #693767). * Check kernel version before querying CAP_SYSLOG and PR_GET_SECCOMP (Closes: #693764). * Hack to define PATH_MAX for Hurd, which doesn't specify this (Closes: #693766). * Guard against 'CIBAUD' not being defined (Closes: #693769). * Guard against SIGSTKFLT, SIGUNUSED and CMSPAR not being defined (Closes: #693768). * debian/control: Added libkvm-dev to Build-Depends for kfreebsd (Closes: #693767). -- James Hunt Tue, 20 Nov 2012 08:48:28 +0000 procenv (0.8-1) unstable; urgency=low * New upstream release. -- James Hunt Fri, 16 Nov 2012 21:12:14 +0000 procenv (0.7-1) unstable; urgency=low * Merge of new upstream release. -- James Hunt Mon, 05 Nov 2012 20:04:40 +0000 procenv (0.5-1) unstable; urgency=low * Initial release. (Closes: #691801) -- James Hunt Tue, 30 Oct 2012 09:17:49 +0000