pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/pkg



Module Name:    pkgsrc
Committed By:   marino
Date:           Mon Nov 14 18:59:13 UTC 2016

Modified Files:
        pkgsrc/pkgtools/pkg: Makefile distinfo
Added Files:
        pkgsrc/pkgtools/pkg/patches: patch-external_libfetch_http.c

Log Message:
pkgtools/pkg: bring in most of pkgsrc-synth improvements

Several updates in pkgsrc-synth work are applicable to pkgtools/pkg so
let's bring them in.  Some changes:

1) fetching segfault fixed
2) change VULNXML URL from FreeBSD ports to pkgsrc version
3) Fix vulnerability report URLs (404) to valid ones (DragonFlyBSD.org)
4) Add ability to build debuggable version
5) Fix PKG_DBDIR default setting for pkg (honor mk.conf)
6) Fix another segfault on NetBSD when pkg(8) attempts to read elfhints.
   This is only valid on FreeBSD and DragonFly, so bring in upstream
   fix to block on other platforms.
7) Set as BOOTSTRAP_PKG and block USE_CWRAPPERS for bootstrap reasons
8) realign SUBST* definitions


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/pkgtools/pkg/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/pkgtools/pkg/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/pkgtools/pkg/patches/patch-external_libfetch_http.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/pkg/Makefile
diff -u pkgsrc/pkgtools/pkg/Makefile:1.12 pkgsrc/pkgtools/pkg/Makefile:1.13
--- pkgsrc/pkgtools/pkg/Makefile:1.12   Fri Oct 28 23:37:53 2016
+++ pkgsrc/pkgtools/pkg/Makefile        Mon Nov 14 18:59:12 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2016/10/28 23:37:53 marino Exp $
+# $NetBSD: Makefile,v 1.13 2016/11/14 18:59:12 marino Exp $
 
 DISTNAME=      pkg-1.8.7
 PKGREVISION=   6
@@ -11,11 +11,19 @@ HOMEPAGE=   https://wiki.freebsd.org/pkgng
 COMMENT=       Package management tool for FreeBSD
 LICENSE=       2-clause-bsd
 
+BOOTSTRAP_PKG= yes
 GNU_CONFIGURE= yes
+USE_CWRAPPERS= no
 USE_LANGUAGES= c
 
 CPPFLAGS+=     -D_LOCALBASE="\"${PREFIX}\""
 CPPFLAGS+=     -DPORTSDIR="\"${PKG.portsdir}\""
+CPPFLAGS+=     -DDEFAULT_VULNXML_URL="\"http://muscles.dragonflybsd.org/pkgsrc-vuxml/vuln.xml.bz2\"";
+
+.if defined(DEBUG_PKGNG)
+CFLAGS:=       ${CFLAGS:N-O2} -ggdb -O0
+_STRIPFLAG_INSTALL=    # don't strip
+.endif
 
 AUTO_MKDIRS=   yes
 
@@ -56,20 +64,40 @@ SUBST_FILES.pkgconf-prefix= src/pkg.conf
 SUBST_SED.pkgconf-prefix+=     -e "s|/usr/local|${PREFIX}|g"
 SUBST_MESSAGE.pkgconf-prefix=  Correct the installation prefix in pkg.conf(5).
 
-SUBST_CLASSES+=        portsdir
-SUBST_STAGE.portsdir=          pre-install
-SUBST_FILES.portsdir=          libpkg/pkg_config.c \
-                               src/pkg.conf.sample \
-                               docs/pkg-create.8 \
-                               docs/pkg-set.8 \
-                               docs/pkg-repo.8 \
-                               docs/pkg.conf.5 \
-                               docs/pkg-version.8 \
-                               docs/pkg.8
-SUBST_SED.portsdir=            -e "s|/usr/ports|${PKG.portsdir}|g" \
-                               -e "s|/var/db/pkg|${PKG_DBDIR}|g" \
-                               -e "s|/var/cache/pkg|${VARBASE}/cache/pkgng|g"
-SUBST_MESSAGE.portsdir=                Correct reference to FreeBSD portsdir.
+SUBST_CLASSES+=                portsdir
+SUBST_STAGE.portsdir=  pre-install
+SUBST_FILES.portsdir=  src/pkg.conf.sample \
+                       docs/pkg-create.8 \
+                       docs/pkg-set.8 \
+                       docs/pkg-repo.8 \
+                       docs/pkg.conf.5 \
+                       docs/pkg-version.8 \
+                       docs/pkg.8
+SUBST_SED.portsdir=    -e "s|/usr/ports|${PKG.portsdir}|g" \
+                       -e "s|/var/db/pkg|${PKGNG_DBDIR}|g" \
+                       -e "s|/var/cache/pkg|${VARBASE}/cache/pkgng|g"
+SUBST_MESSAGE.portsdir=        Correct reference to FreeBSD portsdir.
+
+SUBST_CLASSES+=                config
+SUBST_STAGE.config=    post-patch
+SUBST_FILES.config=    libpkg/pkg_config.c
+SUBST_SED.config=      -e "s|/usr/ports|${PKG.portsdir}|g" \
+                       -e "s|/var/db/pkg|${PKGNG_DBDIR}|g" \
+                       -e "s|/var/cache/pkg|${VARBASE}/cache/pkgng|g"
+SUBST_MESSAGE.config=  Update pkg(8) defaults.
+
+SUBST_CLASSES+=                vuxml
+SUBST_STAGE.vuxml=     post-patch
+SUBST_FILES.vuxml=     libpkg/pkg_audit.c
+SUBST_SED.vuxml=       -e "s|https://vuxml.FreeBSD.org/freebsd|http://muscles.dragonflybsd.org/pkgsrc-vuxml/reports|"
+SUBST_MESSAGE.vuxml=   Direct audit reports to Pkgsrc vuxml
+
+SUBST_CLASSES+=                ldhints
+SUBST_STAGE.ldhints=   post-patch
+SUBST_FILES.ldhints=   libpkg/private/ldconfig.h libpkg/elfhints.c
+SUBST_SED.ldhints=     -e "s|/var/run/ld-elf.so.hints|/var/run/ld.so.hints|" \
+                       -e 's,ifndef __linux__,if defined __FreeBSD__ || defined __DragonFly__,'
+SUBST_MESSAGE.ldhints= Disable ldconfig hints for NetBSD
 
 .if defined(PACKAGE_BUILDING) # set by Synth which has custom location, so use default path
 PKG.portsdir?= /usr/pkgsrc
@@ -113,6 +141,13 @@ post-install:
                ${DESTDIR}${EGDIR}/
 
 .include "../../mk/bsd.prefs.mk"
+
+.if defined (PKG_DBDIR)
+PKGNG_DBDIR?=  ${PKG_DBDIR}
+.else
+PKGNG_DBDIR?=  /var/db/pkgng
+.endif
+
 .if ${OPSYS} != "FreeBSD" && ${OPSYS} != "DragonFly" && ${OPSYS} != "NetBSD"
 .include "../../archivers/libarchive/buildlink3.mk"
 .endif

Index: pkgsrc/pkgtools/pkg/distinfo
diff -u pkgsrc/pkgtools/pkg/distinfo:1.6 pkgsrc/pkgtools/pkg/distinfo:1.7
--- pkgsrc/pkgtools/pkg/distinfo:1.6    Tue Oct 25 11:51:40 2016
+++ pkgsrc/pkgtools/pkg/distinfo        Mon Nov 14 18:59:12 2016
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.6 2016/10/25 11:51:40 khorben Exp $
+$NetBSD: distinfo,v 1.7 2016/11/14 18:59:12 marino Exp $
 
 SHA1 (pkg-1.8.7.tar.xz) = 4727c25b0e4c34df1bf7a00df0e9c6370e855416
 RMD160 (pkg-1.8.7.tar.xz) = f0087c0e88ef890300a46a28d0644926fa7a7acb
 SHA512 (pkg-1.8.7.tar.xz) = 61b1553cb444ba30bcf1c9a5da204ff29b08ad87641c3f49fb7e7efd9f5396742e6812bf96a0228d3e76916648511faa086d197cc41c2ced9979615e23a3bc43
 Size (pkg-1.8.7.tar.xz) = 1950148 bytes
 SHA1 (patch-docs_Makefile.am) = aa6d5c9310c644d13d55c3176cd186c37cccc7c2
+SHA1 (patch-external_libfetch_http.c) = 9e618f80d6d72af7011351a8903b83f73130cdba
 SHA1 (patch-libpkg_pkg.h.in) = e74a96513c1e74ddea8a5b05b080cef57976d68b
 SHA1 (patch-libpkg_pkg__elf.c) = 07174f421e162fc74f1c2b306f60da1273b8b6ec

Added files:

Index: pkgsrc/pkgtools/pkg/patches/patch-external_libfetch_http.c
diff -u /dev/null pkgsrc/pkgtools/pkg/patches/patch-external_libfetch_http.c:1.1
--- /dev/null   Mon Nov 14 18:59:13 2016
+++ pkgsrc/pkgtools/pkg/patches/patch-external_libfetch_http.c  Mon Nov 14 18:59:12 2016
@@ -0,0 +1,12 @@
+--- external/libfetch/http.c.orig      2016-02-10 23:09:08 UTC
++++ external/libfetch/http.c
+@@ -60,6 +60,9 @@
+  * SUCH DAMAGE.
+  */
+ #define _XOPEN_SOURCE
++#ifdef __NetBSD__
++#define _NETBSD_SOURCE
++#endif
+ #include <sys/param.h>
+ #include <sys/socket.h>
+ #include <sys/time.h>



Home | Main Index | Thread Index | Old Index