This commit is contained in:
Igor Pashev 2013-05-10 18:49:27 +04:00
parent 5c57aabbde
commit cca5bac8a7
11 changed files with 299 additions and 0 deletions

View File

@ -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

5
dumpadm/debian/changelog Normal file
View File

@ -0,0 +1,5 @@
dumpadm (2.10-1) unstable; urgency=low
* Initial release.
-- Igor Pashev <pashev.igor@gmail.com> Fri, 10 May 2013 18:35:52 +0400

1
dumpadm/debian/compat Normal file
View File

@ -0,0 +1 @@
9

38
dumpadm/debian/control Normal file
View File

@ -0,0 +1,38 @@
Source: dumpadm
Section: admin
Priority: standard
Maintainer: Igor Pashev <pashev.igor@gmail.com>
Build-Depends:
dh-illumos,
illumos-source-2.10,
libdiskmgt1-dev,
libfmevent-dev,
libnvpair-dev,
libzfs1-dev,
uuid-dev | libsunuuid-dev,
quilt,
Standards-Version: 3.9.3
Homepage: https://www.illumos.org
Package: dumpadm
Section: admin
Architecture: illumos-any
Depends: ${shlibs:Depends}, ${misc:Depends},
Description: configure operating system crash dump
The dumpadm program is an administrative command that manages the
configuration of the operating system crash dump facility. A crash dump
is a disk copy of the physical memory of the computer at the time of a
fatal system error. When a fatal operating system error occurs, a message
describing the error is printed to the console. The operating system then
generates a crash dump by writing the contents of physical memory to a
predetermined dump device, which is typically a local disk partition. The
dump device can be configured by way of dumpadm. Once the crash dump
has been written to the dump device, the system will reboot.
.
This package includes the dumpadm and savecore utilities and the dumpadm
SMF service.
.
The dumpadm service reconfigures the kernel's dump settings from
/etc/dumpadm.conf and then invokes savecore to locate and retrieve any
saved crash dumps.

67
dumpadm/debian/copyright Normal file
View File

@ -0,0 +1,67 @@
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'.
Files: usr/src/common/bzip2/*
License: BZIP2
This program, "bzip2", the associated library "libbzip2", and all
documentation, are copyright (C) 1996-2010 Julian R Seward. All
rights reserved.
.
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. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
.
3. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
.
4. The name of the author may not be used to endorse or promote
products derived from this software without specific prior written
permission.
.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
.
Julian Seward, jseward@bzip.org
bzip2/libbzip2 version 1.0.6 of 6 September 2010

View File

@ -0,0 +1,4 @@
usr/sbin/dumpadm
usr/bin/savecore
lib/svc/method/svc-dumpadm
lib/svc/manifest/system/dumpadm.xml

View File

@ -0,0 +1,2 @@
usr/src/man/man1m/dumpadm.1m
usr/src/man/man1m/savecore.1m

View File

@ -0,0 +1,75 @@
Index: dumpadm/usr/src/cmd/savecore/Makefile
===================================================================
--- dumpadm.orig/usr/src/cmd/savecore/Makefile 2012-10-08 04:25:33.000000000 +0400
+++ dumpadm/usr/src/cmd/savecore/Makefile 2013-05-10 15:50:48.430525002 +0400
@@ -31,29 +31,8 @@
PROG= savecore
include ../Makefile.cmd
-
-SUBDIRS = $(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
-
-all := TARGET = all
-install := TARGET = install
-clean := TARGET = clean
-clobber := TARGET = clobber
-lint := TARGET = lint
-
-.KEEP_STATE:
-
-all: $(SUBDIRS)
-
-clean clobber lint: $(SUBDIRS)
-
-install: $(SUBDIRS)
- -$(RM) $(ROOTPROG)
- -$(LN) $(ISAEXEC) $(ROOTPROG)
-
-$(SUBDIRS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
+include Makefile.com
+LDLIBS += -lfmevent -lnvpair
+install: all $(ROOTPROG)
include ../Makefile.targ
Index: dumpadm/usr/src/cmd/savecore/Makefile.com
===================================================================
--- dumpadm.orig/usr/src/cmd/savecore/Makefile.com 2012-10-08 04:25:33.000000000 +0400
+++ dumpadm/usr/src/cmd/savecore/Makefile.com 2013-05-10 15:51:30.959388322 +0400
@@ -23,10 +23,10 @@
#
PROG= savecore
-SRCS= ../savecore.c ../../../uts/common/os/compress.c
+SRCS= savecore.c ../../uts/common/os/compress.c
OBJS= savecore.o compress.o
-include ../../Makefile.cmd
+include ../Makefile.cmd
C99MODE = $(C99_ENABLE)
@@ -79,16 +79,16 @@
lint: $(LINTSRCS)
$(LINT.c) $(SRCS) $(LDLIBS)
-include ../../Makefile.targ
+include ../Makefile.targ
-%.o: ../%.c
+%.o: %.c
$(COMPILE.c) -I$(SRC)/common $<
$(POST_PROCESS_O)
-%.o: ../../../uts/common/os/%.c
+%.o: ../../uts/common/os/%.c
$(COMPILE.c) $<
$(POST_PROCESS_O)
-bz2%.o: ../../../common/bzip2/%.c
+bz2%.o: ../../common/bzip2/%.c
$(COMPILE.c) -o $@ -I$(SRC)/common -I$(SRC)/common/bzip2 $<
$(POST_PROCESS_O)

View File

@ -0,0 +1 @@
savecore-arch.patch

95
dumpadm/debian/rules Executable file
View File

@ -0,0 +1,95 @@
#!/usr/bin/make -f
include /usr/share/dpkg/buildflags.mk
export DH_VERBOSE = 1
cmd := \
dumpadm \
savecore
man := \
usr/src/man/man1m/savecore.1m \
usr/src/man/man1m/dumpadm.1m
unpack: unpack-stamp
unpack-stamp:
dh_testdir
dh_illumos_gate --build \
usr/src/uts/common/os/compress.c \
usr/src/common/bzip2 \
$(cmd:%=usr/src/cmd/%) \
$(man) \
# 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
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 \
debian/tmp/usr/sbin \
debian/tmp/lib/svc/manifest/system \
debian/tmp/lib/svc/method
touch $@
install: install-stamp
install-stamp: build-stamp
touch $@
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: install-stamp
dh_testdir
dh_testroot
dh_installdirs
dh_install
dh_strip
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

View File

@ -0,0 +1 @@
3.0 (native)