diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-02-15 01:05:09 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-02-15 01:05:09 +0000 |
commit | b4653040c62d347b4cfd0e166742d1c2a61e13f4 (patch) | |
tree | 69068db1fa9dd0a1fb18eda23aeff27d23a9a6f2 | |
parent | 7cfcb2679a9040035d52efeea0fee02a665a3aaa (diff) | |
download | illumos-packaging-b4653040c62d347b4cfd0e166742d1c2a61e13f4.tar.gz |
ptools
-rw-r--r-- | ptools/debian/README.source | 10 | ||||
-rw-r--r-- | ptools/debian/changelog | 5 | ||||
-rw-r--r-- | ptools/debian/compat | 1 | ||||
-rw-r--r-- | ptools/debian/control | 28 | ||||
-rw-r--r-- | ptools/debian/copyright | 27 | ||||
-rw-r--r-- | ptools/debian/patches/ptools-Makefile.bld-gnu-make.patch | 13 | ||||
-rw-r--r-- | ptools/debian/patches/ptools-no-isaexec.patch | 19 | ||||
-rw-r--r-- | ptools/debian/patches/ptools-pargs-pointers.patch | 22 | ||||
-rw-r--r-- | ptools/debian/patches/ptools-pargs-use-libiconv.patch | 23 | ||||
-rw-r--r-- | ptools/debian/patches/ptools-psig-pointers.patch | 13 | ||||
-rw-r--r-- | ptools/debian/patches/ptools-psig-use-system-headers.patch | 14 | ||||
-rw-r--r-- | ptools/debian/patches/series | 6 | ||||
-rw-r--r-- | ptools/debian/ptools.install | 1 | ||||
-rw-r--r-- | ptools/debian/ptools.links | 10 | ||||
-rw-r--r-- | ptools/debian/ptools.manpages | 8 | ||||
-rwxr-xr-x | ptools/debian/rules | 87 | ||||
-rw-r--r-- | ptools/debian/source/format | 1 |
17 files changed, 288 insertions, 0 deletions
diff --git a/ptools/debian/README.source b/ptools/debian/README.source new file mode 100644 index 0000000..9988910 --- /dev/null +++ b/ptools/debian/README.source @@ -0,0 +1,10 @@ +Real sources are in the package illumos-source-X.Y, +where X and Y are numbers. Exact values of X and Y +are set in Build-Depends field of debian/control as +well as in the version string in debian/changelog, +in a form of X.Y-1. + +To add a patch you need first to unpack files from +illumos-source-X.Y using ./debian/rules unpack +and, desirably, ./debian/rules patch + diff --git a/ptools/debian/changelog b/ptools/debian/changelog new file mode 100644 index 0000000..a1079be --- /dev/null +++ b/ptools/debian/changelog @@ -0,0 +1,5 @@ +ptools (2.10-1) unstable; urgency=low + + * Initial release. + + -- Igor Pashev <pashev.igor@gmail.com> Fri, 15 Feb 2013 00:49:02 +0000 diff --git a/ptools/debian/compat b/ptools/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/ptools/debian/compat @@ -0,0 +1 @@ +9 diff --git a/ptools/debian/control b/ptools/debian/control new file mode 100644 index 0000000..ced6fe0 --- /dev/null +++ b/ptools/debian/control @@ -0,0 +1,28 @@ +Source: ptools +Section: admin +Priority: standard +Maintainer: Igor Pashev <pashev.igor@gmail.com> +Build-Depends: + dh-illumos, + illumos-source-2.10, + libc-db1-dev, + libcontract-dev, + liblgrp-dev, + libproc1-dev, + quilt, +Standards-Version: 3.9.4 +Homepage: https://www.illumos.org + +Package: ptools +Priority: optional +Architecture: illumos-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: processes observability tools + The suite of tools for a wide range of process tasks. Most of these tools + are built on top of libproc, which is layered on top of procfs, as well as + process core files. The majority of these commands work on corefiles as + well as live processes. Examples are: + * pargs - display process arguments + * pfiles - display open file information + * psig - display signal handler information + * pwdx - display process working directory diff --git a/ptools/debian/copyright b/ptools/debian/copyright new file mode 100644 index 0000000..92d3a40 --- /dev/null +++ b/ptools/debian/copyright @@ -0,0 +1,27 @@ +Files: debian/* +Copyright: 2012, Igor Pashev <pashev.igor@gmail.com> +License: WTFPL-2 + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + . + Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> + . + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + . + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + . + 0. You just DO WHAT THE FUCK YOU WANT TO. + + +Files: * +License: CDDL + Note that sources are not in this package but in the package + illumos-source-X.Y. Those sources are covered by Common Development + and Distribution License (CDDL). + . + On Dyson system, the full text of the CDDL license + can be found in the file `/usr/share/common-licenses/CDDL-1.0'. + diff --git a/ptools/debian/patches/ptools-Makefile.bld-gnu-make.patch b/ptools/debian/patches/ptools-Makefile.bld-gnu-make.patch new file mode 100644 index 0000000..1fcfc27 --- /dev/null +++ b/ptools/debian/patches/ptools-Makefile.bld-gnu-make.patch @@ -0,0 +1,13 @@ +Index: procutils/usr/src/cmd/ptools/Makefile.bld +=================================================================== +--- procutils.orig/usr/src/cmd/ptools/Makefile.bld 2013-02-14 23:05:16.244419714 +0000 ++++ procutils/usr/src/cmd/ptools/Makefile.bld 2013-02-15 00:00:45.107819314 +0000 +@@ -24,7 +24,7 @@ + # Use is subject to license terms. + # + +-PROG:sh = basename `cd ..; pwd` ++PROG = $(shell basename `cd ..; pwd`) + + OBJS = $(PROG).o + diff --git a/ptools/debian/patches/ptools-no-isaexec.patch b/ptools/debian/patches/ptools-no-isaexec.patch new file mode 100644 index 0000000..9753b64 --- /dev/null +++ b/ptools/debian/patches/ptools-no-isaexec.patch @@ -0,0 +1,19 @@ +Description: install only into /usr/bin + Build env should be tuned too to disable + 32 bits on 64 and 64 on 32, see debian/rules +Index: procutils/usr/src/cmd/ptools/Makefile.bld +=================================================================== +--- procutils.orig/usr/src/cmd/ptools/Makefile.bld 2012-10-08 00:25:33.000000000 +0000 ++++ procutils/usr/src/cmd/ptools/Makefile.bld 2013-02-14 17:08:28.865232056 +0000 +@@ -119,10 +119,7 @@ + # Install the ptool, symlinking it into /usr/proc/bin if PTOOL_TYPE is set + # to LEGACY. + # +-install: all $(ROOTISAPROG) +- -$(RM) $(ROOTBINPROG) +- -$(LN) $(ISAEXEC) $(ROOTBINPROG) +- -$(INSTALL_$(PTOOL_TYPE)) ++install: all $(ROOTBINPROG) + + clean: + $(RM) $(OBJS) diff --git a/ptools/debian/patches/ptools-pargs-pointers.patch b/ptools/debian/patches/ptools-pargs-pointers.patch new file mode 100644 index 0000000..9dbd0bd --- /dev/null +++ b/ptools/debian/patches/ptools-pargs-pointers.patch @@ -0,0 +1,22 @@ +Index: procutils/usr/src/cmd/ptools/pargs/pargs.c +=================================================================== +--- procutils.orig/usr/src/cmd/ptools/pargs/pargs.c 2012-10-08 00:25:33.000000000 +0000 ++++ procutils/usr/src/cmd/ptools/pargs/pargs.c 2013-02-14 22:07:45.956806940 +0000 +@@ -1136,7 +1136,7 @@ + + for (i = 0; i < datap->pd_argc; i++) { + (void) printf("argv[%d]: ", i); +- if (datap->pd_argv[i] == NULL) { ++ if (datap->pd_argv[i] == 0) { + (void) printf("<NULL>\n"); + } else if (datap->pd_argv_strs[i] == NULL) { + (void) printf("<0x%0*lx>\n", +@@ -1182,7 +1182,7 @@ + * an error message and bail. + */ + for (i = 0; i < datap->pd_argc; i++) { +- if (datap->pd_argv[i] == NULL || ++ if (datap->pd_argv[i] == 0 || + datap->pd_argv_strs[i] == NULL) { + (void) fprintf(stderr, "%s: target has corrupted " + "argument list\n", command); diff --git a/ptools/debian/patches/ptools-pargs-use-libiconv.patch b/ptools/debian/patches/ptools-pargs-use-libiconv.patch new file mode 100644 index 0000000..24f18e1 --- /dev/null +++ b/ptools/debian/patches/ptools-pargs-use-libiconv.patch @@ -0,0 +1,23 @@ +Index: procutils/usr/src/cmd/ptools/Makefile.bld +=================================================================== +--- procutils.orig/usr/src/cmd/ptools/Makefile.bld 2013-02-14 17:54:55.942423685 +0000 ++++ procutils/usr/src/cmd/ptools/Makefile.bld 2013-02-14 22:14:08.693911556 +0000 +@@ -34,7 +34,7 @@ + + # libproc is added individually as pwait doesn't need it. + # These are defined this way so lint can use them +-LDLIBS_pargs = -lproc ++LDLIBS_pargs = -lproc + LDLIBS_pcred = -lproc + LDLIBS_pfiles = -lproc -lnsl + LDLIBS_pflags = -lproc +@@ -52,6 +52,9 @@ + LDLIBS_ptree = -lproc -lcontract + LDLIBS_pwdx = -lproc + ++# for GNU libiconv: ++LDLIBS_pargs += -liconv ++ + LDLIBS += $(LDLIBS_$(PROG)) + + CERRWARN_plgrp += -_gcc=-Wno-parentheses diff --git a/ptools/debian/patches/ptools-psig-pointers.patch b/ptools/debian/patches/ptools-psig-pointers.patch new file mode 100644 index 0000000..b9f44ec --- /dev/null +++ b/ptools/debian/patches/ptools-psig-pointers.patch @@ -0,0 +1,13 @@ +Index: procutils/usr/src/cmd/ptools/psig/psig.c +=================================================================== +--- procutils.orig/usr/src/cmd/ptools/psig/psig.c 2013-02-14 21:02:48.503433427 +0000 ++++ procutils/usr/src/cmd/ptools/psig/psig.c 2013-02-14 22:03:13.291023923 +0000 +@@ -114,7 +114,7 @@ + GElf_Sym sym; + + if (Plookup_by_name(Pr, "libc.so", "_tdb_bootstrap", &sym) < 0) +- return (NULL); ++ return (0); + #ifdef _LP64 + if (dmodel != PR_MODEL_NATIVE) { + caddr32_t uaddr; diff --git a/ptools/debian/patches/ptools-psig-use-system-headers.patch b/ptools/debian/patches/ptools-psig-use-system-headers.patch new file mode 100644 index 0000000..0210fa4 --- /dev/null +++ b/ptools/debian/patches/ptools-psig-use-system-headers.patch @@ -0,0 +1,14 @@ +Index: procutils/usr/src/cmd/ptools/psig/psig.c +=================================================================== +--- procutils.orig/usr/src/cmd/ptools/psig/psig.c 2012-10-08 00:25:33.000000000 +0000 ++++ procutils/usr/src/cmd/ptools/psig/psig.c 2013-02-14 21:02:48.503433427 +0000 +@@ -38,8 +38,7 @@ + #include <sys/stat.h> + #include <libproc.h> + +-/* evil knowledge of libc internals */ +-#include "../../../lib/libc/inc/thr_uberdata.h" ++#include <thr_uberdata.h> + + #define MAX_SYMNAMLEN 1024 /* Recommended max symbol name length */ + diff --git a/ptools/debian/patches/series b/ptools/debian/patches/series new file mode 100644 index 0000000..23cf100 --- /dev/null +++ b/ptools/debian/patches/series @@ -0,0 +1,6 @@ +ptools-no-isaexec.patch +ptools-psig-use-system-headers.patch +ptools-psig-pointers.patch +ptools-pargs-pointers.patch +ptools-pargs-use-libiconv.patch +ptools-Makefile.bld-gnu-make.patch diff --git a/ptools/debian/ptools.install b/ptools/debian/ptools.install new file mode 100644 index 0000000..1df36c6 --- /dev/null +++ b/ptools/debian/ptools.install @@ -0,0 +1 @@ +usr/bin/* diff --git a/ptools/debian/ptools.links b/ptools/debian/ptools.links new file mode 100644 index 0000000..4863d11 --- /dev/null +++ b/ptools/debian/ptools.links @@ -0,0 +1,10 @@ +usr/share/man/man1/proc.1.gz usr/share/man/man1/pcred.1.gz +usr/share/man/man1/proc.1.gz usr/share/man/man1/pfiles.1.gz +usr/share/man/man1/proc.1.gz usr/share/man/man1/pflags.1.gz +usr/share/man/man1/proc.1.gz usr/share/man/man1/pldd.1.gz +usr/share/man/man1/proc.1.gz usr/share/man/man1/prun.1.gz +usr/share/man/man1/proc.1.gz usr/share/man/man1/psig.1.gz +usr/share/man/man1/proc.1.gz usr/share/man/man1/pstop.1.gz +usr/share/man/man1/proc.1.gz usr/share/man/man1/ptime.1.gz +usr/share/man/man1/proc.1.gz usr/share/man/man1/pwait.1.gz +usr/share/man/man1/proc.1.gz usr/share/man/man1/pwdx.1.gz diff --git a/ptools/debian/ptools.manpages b/ptools/debian/ptools.manpages new file mode 100644 index 0000000..978573e --- /dev/null +++ b/ptools/debian/ptools.manpages @@ -0,0 +1,8 @@ +usr/src/man/man1/pargs.1 +usr/src/man/man1/plgrp.1 +usr/src/man/man1/pmadvise.1 +usr/src/man/man1/pmap.1 +usr/src/man/man1/ppriv.1 +usr/src/man/man1/preap.1 +usr/src/man/man1/proc.1 +usr/src/man/man1/ptree.1 diff --git a/ptools/debian/rules b/ptools/debian/rules new file mode 100755 index 0000000..bc5b62d --- /dev/null +++ b/ptools/debian/rules @@ -0,0 +1,87 @@ +#!/usr/bin/make -f + +include /usr/share/dpkg/architecture.mk + +export DH_VERBOSE = 1 + +cmd := ptools + +unpack: unpack-stamp +unpack-stamp: + dh_testdir + dh_illumos_gate --build \ + usr/src/common/elfcap \ + usr/src/man/man1\* \ + $(cmd:%=usr/src/cmd/%) + + # Buggy and unused: + echo > usr/src/Makefile.msg.targ + + # Use GNU ld: + sed -i '/LD_ALTEXEC/d' usr/env.sh + echo 'BDIRECT=' >> usr/src/cmd/Makefile.cmd + echo 'MAPFILE.NES=' >> usr/src/cmd/Makefile.cmd + echo 'MAPFILE.PGA=' >> usr/src/cmd/Makefile.cmd + echo 'MAPFILE.NED=' >> usr/src/cmd/Makefile.cmd + echo 'ROOTPROG32=$$(ROOTPROG)' >> usr/src/cmd/Makefile.cmd + echo 'ROOTPROG64=$$(ROOTPROG)' >> usr/src/cmd/Makefile.cmd + +ifeq (64,$(DEB_HOST_ARCH_BITS)) + echo 'BUILD64=' >> usr/src/cmd/Makefile.cmd + echo '64ONLY=$$(POUND_SIGN)' >> usr/src/cmd/Makefile.cmd +else + echo 'BUILD64=$$(POUND_SIGN)' >> usr/src/cmd/Makefile.cmd + echo '64ONLY=' >> usr/src/cmd/Makefile.cmd +endif + touch $@ + +patch: patch-stamp +patch-stamp: unpack-stamp + dh_testdir + [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2 + touch $@ + +unpatch: + dh_testdir + [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt pop -a -f || test $$? = 2 + rm -f patch-stamp + +dirs-stamp: unpack-stamp + . usr/env.sh; mkdir -p \ + debian/tmp/usr/bin + touch $@ + +install build build-arch build-indep: build-stamp + +build-stamp: dirs-stamp patch-stamp + dh_illumos_make --native $(cmd:%=usr/src/cmd/%) + touch $@ + +binary binary-arch binary-indep: binary-stamp +binary-stamp: build-stamp + dh_testdir + dh_testroot + dh_installdirs + dh_install + dh_installman + dh_installdocs + dh_installexamples + dh_installchangelogs + dh_bash-completion + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_strip + dh_gencontrol + dh_md5sums + dh_builddeb + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + dh_clean + rm -rf usr .pc + diff --git a/ptools/debian/source/format b/ptools/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/ptools/debian/source/format @@ -0,0 +1 @@ +3.0 (native) |