Success! - [CFT] packaging the base system with pkg(8)

Michael Jung mikej at mikej.com
Mon Mar 7 19:25:11 UTC 2016


For those who have missed the initial email surrounding this topic, we
are planning on packaging the base system with pkg(8) for 11.0-RELEASE.
<SNIP>

I was successful in following your instructions and upgraded from
11-CURRENT r295677 to r296347 using pkg.

Michael Jung
-------------- next part --------------
Index: ports-mgmt/pkg/files/patch-libpkg_pkg__config.c
===================================================================
--- ports-mgmt/pkg/files/patch-libpkg_pkg__config.c	(nonexistent)
+++ ports-mgmt/pkg/files/patch-libpkg_pkg__config.c	(working copy)
@@ -0,0 +1,15 @@
+--- libpkg/pkg_config.c.orig	2016-01-26 23:32:05 UTC
++++ libpkg/pkg_config.c
+@@ -390,6 +390,12 @@ static struct config_entry c[] = {
+ 		"VALID_URL_SCHEME",
+ 		"pkg+http,pkg+https,https,http,ftp,file,ssh",
+ 	},
++	{
++		PKG_BOOL,
++		"ALLOW_BASE_SHLIBS",
++		"NO",
++		"Enable base libraries analysis",
++	},
+ };
+ 
+ static bool parsed = false;
Index: ports-mgmt/pkg/files/patch-libpkg_pkg__elf.c
===================================================================
--- ports-mgmt/pkg/files/patch-libpkg_pkg__elf.c	(nonexistent)
+++ ports-mgmt/pkg/files/patch-libpkg_pkg__elf.c	(working copy)
@@ -0,0 +1,40 @@
+--- libpkg/pkg_elf.c.orig	2015-09-21 08:53:23 UTC
++++ libpkg/pkg_elf.c
+@@ -85,23 +85,28 @@ static int
+ filter_system_shlibs(const char *name, char *path, size_t pathlen)
+ {
+ 	const char *shlib_path;
++	bool packaging_base = pkg_object_bool(pkg_config_get("ALLOW_BASE_SHLIBS"));
+ 
+-	shlib_path = shlib_list_find_by_name(name);
+-	if (shlib_path == NULL) {
+-		/* dynamic linker could not resolve */
+-		return (EPKG_FATAL);
++	if (!packaging_base) {
++		shlib_path = shlib_list_find_by_name(name);
++		if (shlib_path == NULL) {
++			/* dynamic linker could not resolve */
++			return (EPKG_FATAL);
++		}
+ 	}
+ 
+-	/* match /lib, /lib32, /usr/lib and /usr/lib32 */
+-	if (strncmp(shlib_path, "/lib", 4) == 0 ||
+-	    strncmp(shlib_path, "/usr/lib", 8) == 0)
+-		return (EPKG_END); /* ignore libs from base */
++	if (!packaging_base) {
++		/* match /lib, /lib32, /usr/lib and /usr/lib32 */
++		if (strncmp(shlib_path, "/lib", 4) == 0 ||
++		    strncmp(shlib_path, "/usr/lib", 8) == 0)
++			return (EPKG_END); /* ignore libs from base */
++	}
+ 
+ 	if (path != NULL)
+ 		strncpy(path, shlib_path, pathlen);
+ 
+ 	return (EPKG_OK);
+-} 
++}
+ 
+ /* ARGSUSED */
+ static int
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-pkgbase/attachments/20160307/9055f7ea/attachment.sig>


More information about the freebsd-pkgbase mailing list