This commit is contained in:
Igor Pashev 2013-09-28 11:32:41 +04:00
parent 1ed09a087d
commit a3319e581b
13 changed files with 205 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

View File

@ -0,0 +1,5 @@
libmapid (2.10+1) unstable; urgency=low
* Initial release.
-- Igor Pashev <pashev.igor@gmail.com> Sat, 28 Sep 2013 10:43:10 +0400

1
libmapid/debian/compat Normal file
View File

@ -0,0 +1 @@
9

32
libmapid/debian/control Normal file
View File

@ -0,0 +1,32 @@
Source: libmapid
Section: admin
Priority: optional
Maintainer: Igor Pashev <pashev.igor@gmail.com>
Build-Depends:
illumos-source-2.10,
dh-illumos,
libscf1-dev,
quilt,
symlinks,
Standards-Version: 3.9.3
Homepage: https://www.illumos.org
Package: libmapid1
Section: libs
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Architecture: illumos-any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: NFS user and group id mapping library
This package contains libmapid1 mapidd library.
Package: libmapid1-dev
Section: libdevel
Priority: optional
Architecture: illumos-any
Provides: libmapid-dev
Depends: libmapid1 (= ${binary:Version}), ${misc:Depends},
Description: NFS user and group id mapping library (development files)
This package contains the header files and symlinks needed
to compile applications that use libmapid1.

26
libmapid/debian/copyright Normal file
View File

@ -0,0 +1,26 @@
Files: debian/*
Copyright: 2013, 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'.

View File

@ -0,0 +1,2 @@
usr/lib/*/libmapid.so
usr/include/nfs/mapid.h

View File

@ -0,0 +1 @@
usr/lib/*/libmapid.so.1

View File

@ -0,0 +1,6 @@
libmapid.so.1 libmapid1 #MINVER#
SUNWprivate_1.1@SUNWprivate_1.1 2.10
mapid_derive_domain@SUNWprivate_1.1 2.10
mapid_get_domain@SUNWprivate_1.1 2.10
mapid_reeval_domain@SUNWprivate_1.1 2.10
mapid_stdchk_domain@SUNWprivate_1.1 2.10

View File

@ -0,0 +1,17 @@
Index: libmapid/usr/src/lib/libmapid/Makefile.com
===================================================================
--- libmapid.orig/usr/src/lib/libmapid/Makefile.com 2012-10-08 04:25:41.000000000 +0400
+++ libmapid/usr/src/lib/libmapid/Makefile.com 2013-09-28 10:46:49.073663681 +0400
@@ -36,12 +36,6 @@
LIBS = $(DYNLIB) $(LINTLIB)
#
-# This library will be installed w/all other nfs
-# binaries in /usr/lib/nfs, so define it as such.
-#
-ROOTLIBDIR = $(ROOT)/usr/lib/nfs
-
-#
# SRCS is defined to be $(OBJECTS:%.o=$(SRCDIR)/%.c)
#
SRCDIR = ../common

View File

@ -0,0 +1,13 @@
Index: libmapid/usr/src/lib/libmapid/common/mapid.c
===================================================================
--- libmapid.orig/usr/src/lib/libmapid/common/mapid.c 2012-10-08 04:25:41.000000000 +0400
+++ libmapid/usr/src/lib/libmapid/common/mapid.c 2013-09-28 10:45:51.722541346 +0400
@@ -959,7 +959,7 @@
bzero(value, NS_MAXCDNAME);
ret = nfs_smf_get_prop("nfsmapid_domain", value, DEFAULT_INSTANCE,
SCF_TYPE_ASTRING, NFSMAPID, &bufsz);
- if (ret == SA_OK && *value != NULL) {
+ if (ret == SA_OK && *value != 0) {
char *dp = NULL;
#ifdef DEBUG
char *whoami = "get_nfs_domain";

View File

@ -0,0 +1,2 @@
libmapid-mapid.c.patch
libmapid-libdir.patch

89
libmapid/debian/rules Executable file
View File

@ -0,0 +1,89 @@
#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
export DH_VERBOSE = 1
# libs having "install_h" target to install headers:
libs_headers := \
libmapid
# All libraries to build and to package.
# Order is important:
libs := $(libs_headers) \
unpack: unpack-stamp
unpack-stamp:
dh_testdir
dh_illumos_gate --build \
$(libs:%=usr/src/lib/%) \
usr/src/cmd/fs.d/nfs/lib/smfcfg.h \
usr/src/cmd/fs.d/nfs/lib/smfcfg.c \
# libmapid is 32-bit only in illumos, we build it with --native
echo 'export ROOTFS_LIBDIR=$$ROOT/usr/lib/$(DEB_HOST_MULTIARCH)' >> usr/env.sh
echo 'export ROOTLIBDIR=$$ROOT/usr/lib/$(DEB_HOST_MULTIARCH)' >> usr/env.sh
# 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/usr/lib/$(DEB_HOST_MULTIARCH) \
debian/tmp/usr/include/nfs
touch $@
headers-stamp: patch-stamp dirs-stamp
dh_illumos_make $(libs_headers:%=usr/src/lib/%) -t install_h
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 headers-stamp
dh_illumos_make --native $(libs:%=usr/src/lib/%)
touch $@
binary binary-arch binary-indep: binary-stamp
binary-stamp: install-stamp
dh_testdir
dh_testroot
dh_installdirs
dh_install --fail-missing
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

View File

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