summaryrefslogtreecommitdiff
path: root/README.rst
blob: cdee00822748926535ac04f2192a72a6b5d381c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
.. image:: https://img.shields.io/badge/license-GPL-3.0.svg

.. image:: https://travis-ci.org/jamesodhunt/procenv.svg?branch=master
   :target: https://travis-ci.org/jamesodhunt/procenv

.. image:: https://scan.coverity.com/projects/jamesodhunt-procenv/badge.svg
   :target: https://scan.coverity.com/projects/jamesodhunt-procenv
   :alt: Coverity Scan Build Status

.. image:: https://img.shields.io/badge/donate-flattr-red.svg
   :alt: Donate via flattr
   :target: https://flattr.com/profile/jamesodhunt

=======
procenv
=======

.. contents::
.. sectnum::

Overview
--------

``procenv`` is a simple command-line utility, written in C and licensed
under the GPL, that dumps all attributes of the environment [#]_ in which
it runs, in well-structured plain ASCII, JSON (YAML), XML or CSV.

It is useful as a test tool, to understand what environment a process
runs in and for system comparison.

``procenv`` runs on Linux, FreeBSD, kFreeBSD, GNU Hurd and Android. It
unashamedly emulates a number of existing system utilities as it is
attempting to be all-encompassing: I wrote it with the aim of being able
to dump "everything" that a process may care about by simply running a
single program (by default). Also, the line of demarcation between
"process", "program" and  "system" is slightly blurry in some aspects.
For example ``sysconf(3)`` variables could arguably be considered system
attributes, but procenv shows these too since they are obviously meant
to be queryable by applications.

.. [#] If you find anything missing, please either raise a bug or send a
       patch :)

Results
-------

``procenv`` is extremely useful for learning about the environment
software builds in. Often, such systems disallow login, but do allow
access to log files. Handily, ``procenv`` runs a battery of tests on
build including running itself so that the build environment gets
captured in the builds logs themselves. Select a link below and drill
down to the build log to see the ``procenv`` output:

Travis-CI
~~~~~~~~~

* https://travis-ci.org/jamesodhunt/procenv

Open Build Service (OBS)
~~~~~~~~~~~~~~~~~~~~~~~~

* https://build.opensuse.org/package/show/home:jamesodhunt:procenv/procenv

If you distro does not yet provide a ``procenv`` package, binary
packages for RHEL, Fedora, Centos, SLES, and Arch Linux are available
from here:

* https://software.opensuse.org/download.html?project=home%3Ajamesodhunt%3Aprocenv&package=procenv

Click on your icon for your distro and follow the instructions.

Note that these packages are "bleeding edge" (generated directly from the github repository).

Ubuntu
~~~~~~

build environment
.................

Click the "twisty" triangle to the left of the release number under a
release name, then click one of the build links (like "``amd64``)":

* https://launchpad.net/ubuntu/+source/procenv

PPA environment
...............

https://code.launchpad.net/~jamesodhunt/+recipe/procenv-daily

Ubuntu Autopkgtest (DEP-8) environment
......................................

* https://jenkins.qa.ubuntu.com/view/Wily/view/AutoPkgTest/job/wily-adt-procenv/
* https://jenkins.qa.ubuntu.com/view/Vivid/view/AutoPkgTest/job/vivid-adt-procenv/
* https://jenkins.qa.ubuntu.com/view/Utopic/view/AutoPkgTest/job/utopic-adt-procenv/
* https://jenkins.qa.ubuntu.com/view/Trusty/view/AutoPkgTest/job/trusty-adt-procenv/

The ``sbuild`` tool environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``procenv`` gets run from within sbuild via a DEP-8 test:

* https://jenkins.qa.ubuntu.com/view/Wily/view/AutoPkgTest/job/wily-adt-sbuild/

The ``pbuilder`` tool environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``procenv`` gets run from within pbuilder via a DEP-8 test:

* https://jenkins.qa.ubuntu.com/view/Wily/view/AutoPkgTest/job/wily-adt-pbuilder/

Debian
~~~~~~

buildd (and ports buildd) environment
.....................................

* https://buildd.debian.org/status/package.php?p=procenv&suite=sid

Debian autopkgtest (DEP-8) environment
......................................

* http://ci.debian.net/#package/procenv

FreeBSD
~~~~~~~

Logs used to be available, but sadly it appears pointyhat.freebsd.com has
been taken offline (any replacement?)

Porting
-------

Can you help port ``procenv`` to other platforms (AIX, HP-UX, Solaris,
...)? If so, please get in contact.

References
----------

See http://ifdeflinux.blogspot.com/2012/10/procenv-and-process-environment.html


Author
------

``procenv`` was written by James Hunt <jamesodhunt@ubuntu.com>.

Home Page
---------

* https://github.com/jamesodhunt/procenv