summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sharemgr/debian/README.source10
-rw-r--r--sharemgr/debian/changelog5
-rw-r--r--sharemgr/debian/compat1
-rw-r--r--sharemgr/debian/control27
-rw-r--r--sharemgr/debian/copyright62
-rw-r--r--sharemgr/debian/patches/series4
-rw-r--r--sharemgr/debian/patches/share-gnumake.patch27
-rw-r--r--sharemgr/debian/patches/sharemgr-commands.c.patch13
-rw-r--r--sharemgr/debian/patches/sharemgr-libiconv.patch12
-rw-r--r--sharemgr/debian/patches/sharemgr-no-isaexec.patch53
-rwxr-xr-xsharemgr/debian/rules77
-rw-r--r--sharemgr/debian/sharemgr.install10
-rw-r--r--sharemgr/debian/sharemgr.manpages11
-rw-r--r--sharemgr/debian/source/format1
14 files changed, 313 insertions, 0 deletions
diff --git a/sharemgr/debian/README.source b/sharemgr/debian/README.source
new file mode 100644
index 0000000..9988910
--- /dev/null
+++ b/sharemgr/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/sharemgr/debian/changelog b/sharemgr/debian/changelog
new file mode 100644
index 0000000..3600b79
--- /dev/null
+++ b/sharemgr/debian/changelog
@@ -0,0 +1,5 @@
+sharemgr (2.10+1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Igor Pashev <pashev.igor@gmail.com> Fri, 27 Sep 2013 15:07:15 +0400
diff --git a/sharemgr/debian/compat b/sharemgr/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/sharemgr/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/sharemgr/debian/control b/sharemgr/debian/control
new file mode 100644
index 0000000..6d487a7
--- /dev/null
+++ b/sharemgr/debian/control
@@ -0,0 +1,27 @@
+Source: sharemgr
+Section: admin
+Priority: standard
+Maintainer: Igor Pashev <pashev.igor@gmail.com>
+Build-Depends:
+ illumos-source-2.10,
+ dh-illumos,
+ dh-smf,
+ libscf1-dev,
+ libshare1-dev,
+ libumem1-dev,
+ libxml2-dev,
+ quilt,
+ symlinks,
+Standards-Version: 3.9.3
+Homepage: https://www.illumos.org
+
+Package: sharemgr
+Section: admin
+Architecture: illumos-any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: utilities for file sharing
+ This package includes the sharemgr(1M) utility as well as some other
+ file-sharing tools like dfmounts, share, shareall and others.
+ .
+ This package also provides svc:/network/shares/group SMF service.
+
diff --git a/sharemgr/debian/copyright b/sharemgr/debian/copyright
new file mode 100644
index 0000000..2b18913
--- /dev/null
+++ b/sharemgr/debian/copyright
@@ -0,0 +1,62 @@
+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: usr/src/lib/libinetutil/common/ifaddrlist.c
+Copyright: 1997, The Regents of the University of California.
+ 2009 Sun Microsystems, Inc.
+License: 4-clause BSD
+ Copyright (c) 1997
+ The Regents of the University of California. 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. 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 Computer Systems
+ Engineering Group at Lawrence Berkeley Laboratory.
+ 4. Neither the name of the University nor of the Laboratory 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: *
+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/sharemgr/debian/patches/series b/sharemgr/debian/patches/series
new file mode 100644
index 0000000..b91aa88
--- /dev/null
+++ b/sharemgr/debian/patches/series
@@ -0,0 +1,4 @@
+sharemgr-commands.c.patch
+sharemgr-libiconv.patch
+sharemgr-no-isaexec.patch
+share-gnumake.patch
diff --git a/sharemgr/debian/patches/share-gnumake.patch b/sharemgr/debian/patches/share-gnumake.patch
new file mode 100644
index 0000000..ec2bfe8
--- /dev/null
+++ b/sharemgr/debian/patches/share-gnumake.patch
@@ -0,0 +1,27 @@
+Index: sharemgr/usr/src/cmd/dfs.cmds/shareall/Makefile
+===================================================================
+--- sharemgr.orig/usr/src/cmd/dfs.cmds/shareall/Makefile 2012-10-08 04:25:23.000000000 +0400
++++ sharemgr/usr/src/cmd/dfs.cmds/shareall/Makefile 2013-09-27 12:15:08.002690724 +0400
+@@ -36,6 +36,9 @@
+
+ all: $(PROG)
+
++$(PROG): $(PROG).sh
++ cp $< $@
++
+ install: all $(ROOTUSRSBINPROG)
+
+ clean:
+Index: sharemgr/usr/src/cmd/dfs.cmds/unshareall/Makefile
+===================================================================
+--- sharemgr.orig/usr/src/cmd/dfs.cmds/unshareall/Makefile 2012-10-08 04:25:23.000000000 +0400
++++ sharemgr/usr/src/cmd/dfs.cmds/unshareall/Makefile 2013-09-27 12:16:29.997180540 +0400
+@@ -35,6 +35,8 @@
+ .KEEP_STATE:
+
+ all: $(PROG)
++$(PROG): $(PROG).sh
++ cp $< $@
+
+ install: all $(ROOTUSRSBINPROG)
+
diff --git a/sharemgr/debian/patches/sharemgr-commands.c.patch b/sharemgr/debian/patches/sharemgr-commands.c.patch
new file mode 100644
index 0000000..03ff3a2
--- /dev/null
+++ b/sharemgr/debian/patches/sharemgr-commands.c.patch
@@ -0,0 +1,13 @@
+Index: sharemgr/usr/src/cmd/dfs.cmds/sharemgr/commands.c
+===================================================================
+--- sharemgr.orig/usr/src/cmd/dfs.cmds/sharemgr/commands.c 2012-10-08 04:25:23.000000000 +0400
++++ sharemgr/usr/src/cmd/dfs.cmds/sharemgr/commands.c 2013-09-27 12:03:29.566661971 +0400
+@@ -5897,7 +5897,7 @@
+ {"stop", CMD_NODISPLAY, sa_stop_group, USAGE_STOP, SVC_SET|SVC_ACTION},
+ {"unset", 0, sa_unset, USAGE_UNSET, SVC_SET},
+ {"unshare", 0, sa_legacy_unshare, USAGE_UNSHARE, SVC_SET|SVC_ACTION},
+- {NULL, 0, NULL, NULL}
++ {NULL, 0, NULL, 0}
+ };
+
+ static char *
diff --git a/sharemgr/debian/patches/sharemgr-libiconv.patch b/sharemgr/debian/patches/sharemgr-libiconv.patch
new file mode 100644
index 0000000..cc74a61
--- /dev/null
+++ b/sharemgr/debian/patches/sharemgr-libiconv.patch
@@ -0,0 +1,12 @@
+Index: sharemgr/usr/src/cmd/dfs.cmds/sharemgr/Makefile.com
+===================================================================
+--- sharemgr.orig/usr/src/cmd/dfs.cmds/sharemgr/Makefile.com 2013-09-27 12:07:14.198436589 +0400
++++ sharemgr/usr/src/cmd/dfs.cmds/sharemgr/Makefile.com 2013-09-27 12:08:54.971476663 +0400
+@@ -39,6 +39,7 @@
+ -I../..
+ CPPFLAGS += $(MYCPPFLAGS)
+ LDLIBS += -lshare -lscf -lsecdb -lumem
++LDLIBS += -liconv
+ all install := LDLIBS += -lxml2
+ LINTFLAGS += -u
+
diff --git a/sharemgr/debian/patches/sharemgr-no-isaexec.patch b/sharemgr/debian/patches/sharemgr-no-isaexec.patch
new file mode 100644
index 0000000..7cd049a
--- /dev/null
+++ b/sharemgr/debian/patches/sharemgr-no-isaexec.patch
@@ -0,0 +1,53 @@
+Index: sharemgr/usr/src/cmd/dfs.cmds/sharemgr/Makefile
+===================================================================
+--- sharemgr.orig/usr/src/cmd/dfs.cmds/sharemgr/Makefile 2013-09-27 12:09:18.370128033 +0400
++++ sharemgr/usr/src/cmd/dfs.cmds/sharemgr/Makefile 2013-09-27 12:09:31.109034111 +0400
+@@ -38,8 +38,11 @@
+ #
+ # One for each ISA.
+ #
+-SUBDIRS = $(MACH)
+-$(SHAREMGR64)$(BUILD64)SUBDIRS += $(MACH64)
++ifeq ($(DEB_BUILD_ARCH_BITS),32)
++SUBDIRS = $(MACH)
++else
++SUBDIRS = $(MACH64)
++endif
+
+ LINKS= share unshare
+ ROOTLINKS= $(LINKS:%=$(ROOTUSRSBIN)/%)
+Index: sharemgr/usr/src/cmd/dfs.cmds/sharemgr/Makefile.com
+===================================================================
+--- sharemgr.orig/usr/src/cmd/dfs.cmds/sharemgr/Makefile.com 2013-09-27 12:09:30.912683454 +0400
++++ sharemgr/usr/src/cmd/dfs.cmds/sharemgr/Makefile.com 2013-09-27 12:09:31.110607526 +0400
+@@ -48,10 +48,6 @@
+ POFILES = $(SRCS:.c=.po)
+ POFILE = sharemgr.po
+
+-LN_ISAEXEC= \
+- $(RM) $(ROOTUSRSBINPROG); \
+- $(LN) $(ISAEXEC) $(ROOTUSRSBINPROG)
+-
+ .KEEP_STATE:
+
+ all: $(PROG)
+Index: sharemgr/usr/src/cmd/dfs.cmds/sharemgr/amd64/Makefile
+===================================================================
+--- sharemgr.orig/usr/src/cmd/dfs.cmds/sharemgr/amd64/Makefile 2012-10-08 04:25:23.000000000 +0400
++++ sharemgr/usr/src/cmd/dfs.cmds/sharemgr/amd64/Makefile 2013-09-27 12:12:36.825814790 +0400
+@@ -27,4 +27,4 @@
+ include ../Makefile.com
+ include ../../../Makefile.cmd.64
+
+-install: $(ROOTUSRSBINPROG64)
++install: $(ROOTUSRSBINPROG)
+Index: sharemgr/usr/src/cmd/dfs.cmds/sharemgr/i386/Makefile
+===================================================================
+--- sharemgr.orig/usr/src/cmd/dfs.cmds/sharemgr/i386/Makefile 2012-10-08 04:25:23.000000000 +0400
++++ sharemgr/usr/src/cmd/dfs.cmds/sharemgr/i386/Makefile 2013-09-27 12:12:28.790843681 +0400
+@@ -27,4 +27,4 @@
+
+ include ../Makefile.com
+
+-$(SHAREMGR64)install: $(ROOTUSRSBINPROG32) ; $(LN_ISAEXEC)
++install: $(ROOTUSRSBINPROG)
diff --git a/sharemgr/debian/rules b/sharemgr/debian/rules
new file mode 100755
index 0000000..7d97507
--- /dev/null
+++ b/sharemgr/debian/rules
@@ -0,0 +1,77 @@
+#!/usr/bin/make -f
+
+include /usr/share/dpkg/architecture.mk
+export DH_VERBOSE = 1
+
+cmd := dfs.cmds
+
+
+unpack: unpack-stamp
+unpack-stamp:
+ dh_testdir
+ dh_illumos_gate --build \
+ $(cmd:%=usr/src/cmd/%) \
+ usr/src/cmd/fs.d/nfs/share/fstypes \
+ usr/src/man/man4/fstypes.4 \
+ usr/src/man/man1m/\*share\*.1m \
+ usr/src/man/man1m/dfmounts.1m
+
+ # Not used and buggy:
+ echo > usr/src/Makefile.msg.targ
+ 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:
+ . usr/env.sh; mkdir -p \
+ debian/tmp/lib/svc/manifest/network/shares \
+ debian/tmp/usr/sbin
+ touch $@
+
+install install install-arch install-indep: install-stamp
+install-stamp: build-stamp
+ touch $@
+
+build build-arch build-indep: build-stamp
+build-stamp: patch-stamp dirs-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 --fail-missing
+ dh_smf
+ dh_installman
+ dh_installdocs
+ dh_installexamples
+ dh_installchangelogs
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs -- -c4
+ 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/sharemgr/debian/sharemgr.install b/sharemgr/debian/sharemgr.install
new file mode 100644
index 0000000..9348608
--- /dev/null
+++ b/sharemgr/debian/sharemgr.install
@@ -0,0 +1,10 @@
+lib/svc/manifest/network/shares/group.xml
+usr/sbin/dfmounts
+usr/sbin/dfshares
+usr/sbin/share
+usr/sbin/shareall
+usr/sbin/sharectl
+usr/sbin/sharemgr
+usr/sbin/unshare
+usr/sbin/unshareall
+usr/src/cmd/fs.d/nfs/share/fstypes /etc/dfs/
diff --git a/sharemgr/debian/sharemgr.manpages b/sharemgr/debian/sharemgr.manpages
new file mode 100644
index 0000000..5ee039f
--- /dev/null
+++ b/sharemgr/debian/sharemgr.manpages
@@ -0,0 +1,11 @@
+usr/src/man/man1m/dfmounts.1m
+usr/src/man/man1m/dfshares.1m
+usr/src/man/man1m/dfshares_nfs.1m
+usr/src/man/man1m/share.1m
+usr/src/man/man1m/share_nfs.1m
+usr/src/man/man1m/shareall.1m
+usr/src/man/man1m/sharectl.1m
+usr/src/man/man1m/sharemgr.1m
+usr/src/man/man1m/unshare.1m
+usr/src/man/man1m/unshare_nfs.1m
+usr/src/man/man4/fstypes.4
diff --git a/sharemgr/debian/source/format b/sharemgr/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/sharemgr/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)