libz: Add symbol versions (not active)
authorJohn Marino <draco@marino.st>
Thu, 13 Jun 2013 16:11:56 +0000 (18:11 +0200)
committerJohn Marino <draco@marino.st>
Thu, 13 Jun 2013 16:23:51 +0000 (18:23 +0200)
Every time symbol versioning is added to a system library, it will
require a full buildworld for the next build.  In addition, if the major
version isn't bumped, it will break the binary packages that link to it.

The working plan is to add versioning to libaries, but not hook it into
the build unless "RELEASE36" is defined.  When all the libraries have
been versioned, then these conditions will be removed so only one full
buildworld will be required to minimize inconvenience to users.

All versioned libraries will be bumped with the exception of libc as it
has already been bumped for branch 3.5, thus libc.so.7 is already
available.  In other words, we bump to avoid package breakage and that's
no longer an issue for libc.

After this commit, libz will build as before unless RELEASE36=yes is
defined in make.conf or passed to make during buildworld.

lib/libz/Makefile
lib/libz/Symbol.map [new file with mode: 0644]

index 13c9c23..2a94eac 100644 (file)
@@ -18,4 +18,10 @@ CFLAGS+= -I${CONTRIBDIR} -I${.CURDIR}
 
 INCS=          zconf.h zlib.h
 
+.if defined(RELEASE36)
+SHLIB_MAJOR=   4
+VERSION_DEF=   ${.CURDIR}/../libc/Versions.def
+SYMBOL_MAPS=   ${.CURDIR}/Symbol.map
+.endif
+
 .include <bsd.lib.mk>
diff --git a/lib/libz/Symbol.map b/lib/libz/Symbol.map
new file mode 100644 (file)
index 0000000..77143b9
--- /dev/null
@@ -0,0 +1,94 @@
+DF306.0 {
+    adler32;
+    adler32_combine;
+    adler32_combine64;
+    compress;
+    compress2;
+    compressBound;
+    crc32;
+    crc32_combine;
+    crc32_combine64;
+    deflate;
+    deflateBound;
+    deflateCopy;
+    deflateEnd;
+    deflateInit2_;
+    deflateInit_;
+    deflateParams;
+    deflatePending;
+    deflatePrime;
+    deflateReset;
+    deflateResetKeep;
+    deflateSetDictionary;
+    deflateSetHeader;
+    deflateTune;
+    get_crc_table;
+    gzbuffer;
+    gzclearerr;
+    gzclose;
+    gzclose_r;
+    gzclose_w;
+    gzdirect;
+    gzdopen;
+    gzeof;
+    gzerror;
+    gzflush;
+    gzgetc;
+    gzgetc_;
+    gzgets;
+    gzoffset;
+    gzoffset64;
+    gzopen;
+    gzopen64;
+    gzprintf;
+    gzputc;
+    gzputs;
+    gzread;
+    gzrewind;
+    gzseek;
+    gzseek64;
+    gzsetparams;
+    gztell;
+    gztell64;
+    gzungetc;
+    gzwrite;
+    gzvprintf;
+    inflate;
+    inflateBack;
+    inflateBackEnd;
+    inflateBackInit_;
+    inflateCopy;
+    inflateEnd;
+    inflateGetDictionary;
+    inflateGetHeader;
+    inflateInit2_;
+    inflateInit_;
+    inflateMark;
+    inflatePrime;
+    inflateReset;
+    inflateReset2;
+    inflateResetKeep;
+    inflateSetDictionary;
+    inflateSync;
+    inflateSyncPoint;
+    inflateUndermine;
+    uncompress;
+    zError;
+    zlibCompileFlags;
+    zlibversion;
+    zopen;
+};
+
+/*
+ *  local symbols don't need to be listed
+ *
+    deflate_copyright;
+    inflate_copyright;
+    inflate_fast;
+    inflate_table;
+    zcalloc;
+    zcfree;
+    z_errmsg;
+    gz_error;
+    gz_intmax;
+*/