diff options
| author | Igor Pashev <pashev.igor@gmail.com> | 2015-10-19 12:01:40 +0300 |
|---|---|---|
| committer | Igor Pashev <pashev.igor@gmail.com> | 2015-10-19 12:01:40 +0300 |
| commit | 6395513c7598b0a8be21f8ec710a8d36bfddd53c (patch) | |
| tree | 2e062226a84a2cc6566bcfa728c46d65904f81a5 /libc | |
| parent | d4a338740c7c5cf3df8f58609440837e64c14241 (diff) | |
| download | illumos-packaging-6395513c7598b0a8be21f8ec710a8d36bfddd53c.tar.gz | |
We can package
Diffstat (limited to 'libc')
| -rw-r--r-- | libc/debian/changelog | 6 | ||||
| -rw-r--r-- | libc/debian/libc-bin.install | 2 | ||||
| -rw-r--r-- | libc/debian/libc1.docs | 2 | ||||
| -rwxr-xr-x | libc/debian/rules | 115 | ||||
| -rw-r--r-- | libc/debian/sunld.manpages | 2 |
5 files changed, 62 insertions, 65 deletions
diff --git a/libc/debian/changelog b/libc/debian/changelog index d8ed5f0..719b91d 100644 --- a/libc/debian/changelog +++ b/libc/debian/changelog @@ -1,3 +1,9 @@ +libc (4.3.1.git.35107df-0.1) unstable; urgency=medium + + * Use 3.0 (quilt) format with new dh_illumos_gate + + -- Igor Pashev <pashev.igor@gmail.com> Sun, 18 Oct 2015 10:39:45 +0300 + libc (4.3+18) UNRELEASED; urgency=medium * Removed gets() [libc-no-gets.patch] diff --git a/libc/debian/libc-bin.install b/libc/debian/libc-bin.install index 91ef760..dcfaca1 100644 --- a/libc/debian/libc-bin.install +++ b/libc/debian/libc-bin.install @@ -1,5 +1,5 @@ -crle usr/bin/ debian/ldconfig sbin/ +usr/bin/crle usr/bin/getconf usr/bin/getent usr/bin/ldd diff --git a/libc/debian/libc1.docs b/libc/debian/libc1.docs index f8293d1..9f69eb4 100644 --- a/libc/debian/libc1.docs +++ b/libc/debian/libc1.docs @@ -1 +1 @@ -usr/src/lib/libc/THIRDPARTYLICENSE +build-tree/usr/src/lib/libc/THIRDPARTYLICENSE diff --git a/libc/debian/rules b/libc/debian/rules index 177a83b..b40353d 100755 --- a/libc/debian/rules +++ b/libc/debian/rules @@ -10,6 +10,27 @@ export DH_VERBOSE = 1 CC = gcc +# We must have this libraries so packages can be compiled, +# but if we just use filters provided by illumos gate, it causes +# some rare FTBFS with GNU ld. We can't use symlink (e. g. libpthread -> libc), +# because in this case libc can go before libgcc_s, and some other packages +# will crash in runtime. So we make a dummy library. + +libs_filters := \ +libaio \ +libdoor \ +libintl \ +libpthread \ +librt \ +libsendfile \ +libthread \ +libxnet \ + +fake_libs := \ +$(libs_filters) \ +libposix4 \ +libdl \ + # These lists are used in packing orig tarball # and in building binaries. Anything that need a # special way of building is extracted in a special way too, @@ -33,6 +54,7 @@ librpcsvc \ libsecdb \ libsocket \ crypt_modules \ +$(libs_filters) # usr/src/lib/nsswitch/* : nsswitch := \ @@ -96,6 +118,7 @@ $(ILLUMOS_GATE): .PHONY: create-orig create-orig: $(ILLUMOS_GATE) dh_illumos_gate --create-orig --build \ + $(ILLUMOS_GATE)/usr/src/cmd/netfiles \ $(ILLUMOS_GATE)/usr/src/cmd/sgs/Makefile* \ $(ILLUMOS_GATE)/usr/src/cmd/sgs/include \ $(ILLUMOS_GATE)/usr/src/cmd/sgs/ld \ @@ -109,6 +132,8 @@ create-orig: $(ILLUMOS_GATE) $(ILLUMOS_GATE)/usr/src/man/man2/\*.2 \ $(ILLUMOS_GATE)/usr/src/man/man3/\*.3 \ $(ILLUMOS_GATE)/usr/src/man/man3c/\*.3c \ + $(ILLUMOS_GATE)/usr/src/man/man4/crypt.conf.4 \ + $(ILLUMOS_GATE)/usr/src/man/man5/crypt_\*.5 \ $(ILLUMOS_GATE)/usr/src/uts/\*/\*/krtld \ $(ILLUMOS_GATE)/usr/src/uts/\*/krtld \ $(ILLUMOS_GATE)/usr/src/uts/common/sys/avl*.h \ @@ -125,27 +150,7 @@ test-orig: create-orig tar xf ../libc_4.3.1.git.35107df.orig.tar.xz --strip=1 quilt push -a ./debian/rules build - - -# We must have this libraries so packages can be compiled, -# but if we just use filters provided by illumos gate, it causes -# some rare FTBFS with GNU ld. We can't use symlink (e. g. libpthread -> libc), -# because in this case libc can go before libgcc_s, and some other packages -# will crash in runtime. So we make a dummy library. - -libs_filters := \ -libaio \ -libdl \ -libdoor \ -libintl \ -libposix4 \ -libpthread \ -librt \ -libsendfile \ -libthread \ -libxnet \ - -FAKE_LIBS = $(subst lib,,$(libs_filters)) + fakeroot ./debian/rules binary # libs having "install_h" target to install headers first: libs_headers := \ @@ -155,9 +160,6 @@ libsocket \ libnsl \ libgen \ -override_dh_strip: - : # we don't strip *this* libc - override_dh_auto_configure: dh_illumos_gate --configure --destdir=$(BUILD) --root=$(ROOT) echo 'export DEB_CRYPT_MODULE_DIR_32="$$DEB_LIBDIR_32/security"' >> $(BUILD)/usr/env.sh @@ -208,12 +210,14 @@ override_dh_auto_build: cp -vrf debian/compat_headers/* $(ROOT)/usr/include/ # build libs - dh_illumos_make $(libs:%=$(BUILD)/usr/src/lib/%) + # libutil is brought by our patch, it's not a part of the gate + dh_illumos_make $(patsubst %,$(BUILD)/usr/src/lib/%,$(libs) libutil) dh_illumos_make $(nsswitch:%=$(BUILD)/usr/src/lib/nsswitch/%) # build sgs dh_illumos_make --native $(BUILD)/usr/src/cmd/sgs/tools dh_illumos_make $(sgs:%=$(BUILD)/usr/src/cmd/sgs/%) + cp usr/src/man/man1/ld.1 $(BUILD)/usr/src/man/man1/sunld.1 # these two are patched: dh_illumos_make --native \ $(BUILD)/usr/src/cmd/sgs/ld/i386 \ @@ -221,8 +225,16 @@ override_dh_auto_build: # build tools: dh_illumos_make --native $(make) $(cmd:%=$(BUILD)/usr/src/cmd/%) + . $(BUILD)/usr/env.sh; unset LD_ALTEXEC; \ + $(CC) $(CFLAGS) -o $(ROOT)/usr/bin/crle \ + -DDEB_USRLIBDIR_32=\"$$DEB_USRLIBDIR_32\" \ + -DDEB_USRLIBDIR_64=\"$$DEB_USRLIBDIR_64\" \ + -DDEB_HOST_ARCH_BITS=$$DEB_HOST_ARCH_BITS \ + debian/crle.c -install-stamp: build-stamp +override_dh_auto_install: + rm -rf debian/tmp + cp -a $(ROOT) debian/tmp for l in `find debian/tmp/lib32 -maxdepth 1 -type l -name \*.so`; do \ ln -sf `readlink -f $$l` debian/tmp/usr/lib32/`basename $$l`; \ rm $$l; \ @@ -233,7 +245,7 @@ install-stamp: build-stamp done symlinks -c debian/tmp/usr/lib32 symlinks -c debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) - set -x; for l in $(FAKE_LIBS); do \ + set -x; for l in $(subst lib,,$(fake_libs)); do \ rm -f debian/tmp/usr/lib32/lib$$l.so && \ rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/lib$$l.so && \ echo "ASSERT(1, \"This is a fake library: ld -l$$l works, but nothing is linked\")" > debian/tmp/usr/lib32/lib$$l.so && \ @@ -246,27 +258,20 @@ install-stamp: build-stamp : # Even sunld: ln -sf libc.so.1 debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libc.so - touch $@ - -binary-stamp: install-stamp - dh_testdir - dh_testroot - dh_installdirs +override_dh_install: debian/LC_DATA.gz debian/locales.config dh_install find debian/locales/usr/share/i18n/locales -name *.UTF-8.src | \ xargs sed -i '/^LC_CTYPE/,/^END LC_CTYPE/d' - # language=C because of ld.so.1.1 ./debian/generate-locales-all + +override_dh_installman: + # language=C because of ld.so.1.1 dh_installman --language=C - dh_installdocs - dh_installexamples - dh_installchangelogs - dh_installdebconf - dh_link - dh_compress - dh_makeshlibs -- -c4 - dh_shlibdeps +override_dh_strip: + : # we don't strip *this* libc + +override_dh_fixperms: dh_fixperms chmod 0755 \ debian/*/usr/lib/*/lddstub \ @@ -274,41 +279,27 @@ binary-stamp: install-stamp debian/*/usr/lib/*/crle \ debian/*/usr/lib?*/crle \ debian/*/lib/*/ld.so.* \ - debian/*/lib?*/ld.so.* \ - + debian/*/lib?*/ld.so.* chmod 4755 debian/*/usr/lib/utmp_update - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - touch $@ +override_dh_makeshlibs: + dh_makeshlibs -- -c4 # We remove LC_DATA from all *.UTF-8.src # and when regenerating locales will insert contents of LC_DATA # into source locale file. Illumos localedef does not support # copy action for including other files source files. -debian/LC_DATA.gz: patch-stamp - sh usr/src/cmd/localedef/data/ctype.sh \ - usr/src/cmd/localedef/data/*.UTF-8.src \ +debian/LC_DATA.gz: + sh $(BUILD)/usr/src/cmd/localedef/data/ctype.sh \ + $(BUILD)/usr/src/cmd/localedef/data/*.UTF-8.src \ | gzip -c -9 > $@ debian/locales.config: debian/locales.config.in perl -pe 'BEGIN {undef $$/; open(IN, "debian/SUPPORTED"); $$j=<IN>;} s/__PROVIDED_LOCALES__/$$j/g;' \ $< > $@ -crle: debian/crle.c - . usr/env.sh; unset LD_ALTEXEC; \ - $(CC) $(CFLAGS) -o $@ \ - -DDEB_USRLIBDIR_32=\"$$DEB_USRLIBDIR_32\" \ - -DDEB_USRLIBDIR_64=\"$$DEB_USRLIBDIR_64\" \ - -DDEB_HOST_ARCH_BITS=$$DEB_HOST_ARCH_BITS \ - $< - - override_dh_auto_clean: rm -rf $(BUILD) rm -f debian/LC_DATA.* rm -f debian/locales.config - rm -f crle diff --git a/libc/debian/sunld.manpages b/libc/debian/sunld.manpages index 028e060..bffba1d 100644 --- a/libc/debian/sunld.manpages +++ b/libc/debian/sunld.manpages @@ -1 +1 @@ -usr/src/man/man1/sunld.1 +build-tree/usr/src/man/man1/sunld.1 |
