Date: Mon, 07 Mar 2016 14:14:18 -0500 From: Michael Jung <mikej@mikej.com> To: freebsd-pkgbase@freebsd.org, gjb@FreeBSD.org Subject: Success! - [CFT] packaging the base system with pkg(8) Message-ID: <2357da6c0dfa24de6fd8872891a5529e@mail.mikej.com> In-Reply-To: <20160302235429.GD75641@FreeBSD.org> References: <20160302235429.GD75641@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
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
[-- Attachment #2 --]
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
[-- Attachment #3 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJW1301AAoJEAMUWKVHj+KT+rwP/3NogwgInBqdjhcsfjE8mCVa
ZfrIm8JB6Rrlq53W3T6TTvcGMCZSzSowXL7l5doxJO9FbToU9md1A0iELv0VTQks
lgSzQOuArYzRINI9H/PLlmIaMlCJPvk4KJyvZkIj9QgY8Bhmr1AQKNG3KvXBzxo+
NvaKET8GDnbriALn4zaAWNxquPIWCmjsvTg+/B8C40yvyr0roEZbMCH7MFP//lBv
B3Ah3UYp8jdtQ5x7d5tCVy919W4cZsHSWWxMdSA6GPbdbxvScVT14v6fTi/jWdQP
WaewRsOK22vmoZj0F/oVaQmg9tBCHTiSN5J7cXd7zWNO6LQr+Rfk5xQBgi2SRYdq
l5bkr3XmJC3TggYecPNqUDw+CAq/U+KkVqw4Zc8I2aZJW/e1EqMO8fTKUu5Ce8L9
iYKkymHjTPgye/o3rAfHWb7iK3N0vNtdUEShyYStAK3UMOD0NJwDsjrhuQy8P453
2tXxm9JZ2Sdo+Psnf62NgzBwEprkZdENhuFnvYxIOYbij3x5Sf6R0CYgw0TodF6f
9M4J4iINh7fuNORhutjmroSTfGffx5SNQ9fjtk1YV4txRCVi6NsLqedePEQ1S5K0
lEH2ozwr4nv/UNb4RPN/YanbPXOjlbQltDN+3OqWBNwyWM/966zR4KKlCHN9yKnx
iR5GzudtG3KrxSAdBUAu
=HWlk
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2357da6c0dfa24de6fd8872891a5529e>
