move private edit library to /lib/priv
authorJohn Marino <draco@marino.st>
Thu, 28 Jan 2016 19:17:37 +0000 (20:17 +0100)
committerJohn Marino <draco@marino.st>
Thu, 28 Jan 2016 19:21:15 +0000 (20:21 +0100)
While here, fix private ssh and ldns.  The .so and .a versions were
not installed and this probably will break future builds for anyone
that's built world in the last few hours.

Also, all of these private libraries also need -L flags in addition
to -rpath flags.

25 files changed:
Makefile_upgrade.inc
bin/sh/Makefile
etc/mtree/BSD.root.dist
gnu/sbin/lvm/Makefile
lib/libedit/libedit/Makefile
lib/libldns/Makefile
lib/pam_module/pam_ssh/Makefile
sbin/fsdb/Makefile
sbin/vinum/Makefile
secure/Makefile.ssh.common
secure/lib/libssh/Makefile
secure/usr.bin/sftp/Makefile
share/initrd/bin/Makefile
share/initrd/sbin.lvm/Makefile
share/initrd/sbin/Makefile
share/mk/bsd.libnames.mk
usr.bin/bc/Makefile
usr.bin/drill/Makefile
usr.bin/ftp/Makefile
usr.bin/tftp/Makefile
usr.bin/units/Makefile
usr.sbin/802_11/wpa_cli/Makefile
usr.sbin/cdcontrol/Makefile
usr.sbin/lpr/lpc/Makefile
usr.sbin/pppctl/Makefile

index 0d06a5b..438b630 100644 (file)
@@ -2283,6 +2283,14 @@ TO_REMOVE+=/usr/lib/profile/libprivate_ldns.a
 TO_REMOVE+=/usr/lib/libprivate_ssh.*
 TO_REMOVE+=/usr/lib/profile/libprivate_ssh.a
 TO_REMOVE+=/usr/share/man/man5/moduli.5.gz
+TO_REMOVE+=/usr/lib/libprivate_edit.*
+TO_REMOVE+=/usr/lib/profile/libprivate_edit.a
+TO_REMOVE+=/lib/libprivate_edit.so.5
+TO_REMOVE+=/usr/share/man/man3/editline.3.gz
+TO_REMOVE+=/usr/share/man/man3/el_*.3.gz
+TO_REMOVE+=/usr/share/man/man3/history*.3.gz
+TO_REMOVE+=/usr/share/man/man3/tok_*.3.gz
+TO_REMOVE+=/usr/share/man/man5/editrc.5.gz
 
 .if !defined(WANT_INSTALLER)
 TO_REMOVE+=/usr/sbin/dfuibe_installer
index 9a16db4..2626ec7 100644 (file)
@@ -31,15 +31,21 @@ CFLAGS+= -DNO_HISTORY
 .  if exists(/usr/lib/libedit.a)
 DPADD= /usr/lib/libedit.a ${LIBTERMCAP}
 LDADD= -ledit -ltermcap
+.  elif exists(/usr/lib/libprivate_edit.a)
+DPADD= /usr/lib/libprivate_edit.a ${LIBTERMCAP}
+LDADD= -lprivate_edit -ltermcap
 .  else
 DPADD= ${LIBEDIT} ${LIBTERMCAP}
 LDADD= -lprivate_edit -ltermcap
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 .  endif
 .else
 DPADD= ${LIBEDIT} ${LIBTERMCAP}
 LDADD= -lprivate_edit -ltermcap
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 .endif
 
+
 .PATH: ${.CURDIR}/bltin \
        ${.CURDIR}/../kill \
        ${.CURDIR}/../test \
index c2df8b0..9b4d62f 100644 (file)
@@ -64,6 +64,8 @@
         ..
     ..
     lib
+        priv
+        ..
     ..
     libexec
     ..
index acfa7cd..d9df1d0 100644 (file)
@@ -134,6 +134,7 @@ MKLINKS+=   lvchange.8 lvchange.1 \
 LDADD+=                -llvm -ldevmapper -lprop -lprivate_edit -ltermcap -ldevattr
 DPADD+=                ${LIBLVM} ${LIBDEVMAPPER} ${LIBPROP} ${LIBEDIT} ${LIBTERMCAP}
 DPADD+=                ${LIBDEVATTR}
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .PATH: ${LVM2_DISTDIR}/tools
 
index e6eeab1..d028bfd 100644 (file)
@@ -2,8 +2,10 @@
 .include       "../Makefile.inc"
 
 LIB=           private_edit
-SHLIB_MAJOR=   5               # NetBSD designates SHLIB_MAJOR as 3
-SHLIBDIR?=     /lib
+SHLIB_MAJOR=   5
+SHLIBDIR?=     /lib/priv
+LIBDIR?=       /usr/lib/priv
+PROFLIBDIR?=   /usr/lib/priv/profile
 
 SRCDIR=        ${BASEDIR}/src
 .PATH:         ${SRCDIR}
@@ -52,49 +54,6 @@ SRCS+=       fcns.c help.c tokenizern.c historyn.c
 
 INCS=          histedit.h
 
-MAN=           editline.3 editrc.5
-
-MLINKS=        editline.3 el_init.3 \
-               editline.3 el_end.3 \
-               editline.3 el_reset.3 \
-               editline.3 el_gets.3 \
-               editline.3 el_getc.3 \
-               editline.3 el_push.3 \
-               editline.3 el_parse.3 \
-               editline.3 el_set.3 \
-               editline.3 el_get.3 \
-               editline.3 el_source.3 \
-               editline.3 el_resize.3 \
-               editline.3 el_line.3 \
-               editline.3 el_insertstr.3 \
-               editline.3 el_deletestr.3 \
-               editline.3 history_init.3 \
-               editline.3 history_end.3 \
-               editline.3 history.3 \
-               editline.3 tok_init.3 \
-               editline.3 tok_end.3 \
-               editline.3 tok_reset.3 \
-               editline.3 tok_line.3 \
-               editline.3 tok_str.3
-
-MLINKS+=       editline.3 el_wgets.3 \
-               editline.3 el_wgetc.3 \
-               editline.3 el_wpush.3 \
-               editline.3 el_wparse.3 \
-               editline.3 el_wset.3 \
-               editline.3 el_wget.3 \
-               editline.3 el_wline.3 \
-               editline.3 el_winsertstr.3 \
-               editline.3 el_wdeletestr.3 \
-               editline.3 history_winit.3 \
-               editline.3 history_wend.3 \
-               editline.3 history_w.3 \
-               editline.3 tok_winit.3 \
-               editline.3 tok_wend.3 \
-               editline.3 tok_wreset.3 \
-               editline.3 tok_wline.3 \
-               editline.3 tok_wstr.3
-
 CLEANFILES+=   common.h emacs.h fcns.c fcns.h help.c help.h
 CLEANFILES+=   historyn.c tokenizern.c vi.h
 AHDR=          vi.h emacs.h common.h
index a82eacf..8e0edba 100644 (file)
@@ -5,6 +5,7 @@ LDNS=           ${.CURDIR}/../../contrib/ldns
 LIB=           private_ldns
 SHLIB_MAJOR=   1
 SHLIBDIR?=     /usr/lib/priv
+LIBDIR?=       ${SHLIBDIR}
 PROFLIBDIR?=   ${SHLIBDIR}/profile
 
 SRCS  =                rdata.c util.c rr.c packet.c wire2host.c \
index 94cc9db..83b8f8b 100644 (file)
@@ -10,6 +10,6 @@ DPADD=        ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT}
 WARNS?=        4
 SSHDIR=                ${.CURDIR}/../../../crypto/openssh
 CFLAGS+=       -I${SSHDIR} -include ssh_namespace.h
-LDFLAGS+=      -rpath /usr/lib/priv
+LDFLAGS+=      -rpath /usr/lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .include <bsd.lib.mk>
index ab2cd7d..634aaaf 100644 (file)
@@ -10,6 +10,8 @@ SRCS= fsdb.c fsdbutil.c \
 CFLAGS+= -I${.CURDIR}/../fsck
 LDADD+= -lprivate_edit -ltermcap
 DPADD+=        ${LIBEDIT} ${LIBTERMCAP}
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+
 .PATH: ${.CURDIR}/../fsck ${.CURDIR}/../../sys/vfs/ufs
 WARNS?=        1
 
index 010055f..f9af9e7 100644 (file)
@@ -8,5 +8,6 @@ WARNS?= 2
 CFLAGS+=       -I${.CURDIR}/../../lib/libedit -I${.CURDIR}/../../sys
 DPADD= ${LIBEDIT} ${LIBTERMCAP} ${LIBDEVSTAT}
 LDADD= -lprivate_edit -ltermcap -ldevstat
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .include <bsd.prog.mk>
index fcac077..0b6c840 100644 (file)
@@ -5,7 +5,7 @@ CFLAGS+=        -I${.CURDIR}/../../lib/libssh -I${SSHDIR} -include ssh_namespace.h
 .if ${.CURDIR:T} != "libssh"
 DPADD+=        ${LIBSSH} ${LIBCRYPTO} ${LIBUTIL} ${LIBZ} ${LIBPTHREAD}
 LDADD+=        -lprivate_ssh -lcrypto -lutil -lz -lpthread
-LDFLAGS+=      -rpath /usr/lib/priv
+LDFLAGS+=      -rpath /usr/lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 .endif
 
 .PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
index 0f6093d..f27a709 100644 (file)
@@ -27,8 +27,9 @@ SRCS+=        bcrypt_pbkdf.c blowfish.c bsd-misc.c explicit_bzero.c \
 
 WARNS?=        2
 
-SHLIBDIR?=     /usr/lib/priv
-PROFLIBDIR?=   ${SHLIBDIR}/profile
+SHLIBDIR?=     /usr/lib/priv
+LIBDIR?=       ${SHLIBDIR}
+PROFLIBDIR?=   ${SHLIBDIR}/profile
 
 .include "../../Makefile.ssh.common"
 .include <bsd.lib.mk>
index 59a17fa..6bb4c4e 100644 (file)
@@ -9,6 +9,7 @@ SRCS+=  fmt_scaled.c
 
 DPADD+=        ${LIBEDIT} ${LIBTERMCAP}
 LDADD+=        -lprivate_edit -ltermcap
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .include "../../Makefile.ssh.common"
 .include <bsd.prog.mk>
index 22ec345..39d7b81 100644 (file)
@@ -63,8 +63,8 @@ CRUNCH_ALIAS_ssh= scp
 
 CRUNCH_KEEP_ssh= roaming_write roaming_read add_recv_bytes
 
-CRUNCH_LIBS+= -lprivate_ssh -lcrypto -lz -lpthread
-CRUNCH_LDFLAGS+=       -rpath /usr/lib/priv
+CRUNCH_LIBS+=  -lprivate_ssh -lcrypto -lz -lpthread \
+               -rpath /lib/priv:/usr/lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .include <bsd.crunchgen.mk>
 .include <bsd.prog.mk>
index 132adb1..477ec80 100644 (file)
@@ -82,6 +82,7 @@ SYMLINKS+=    lvm ${BINDIR}/lvchange \
 LDADD+=                -llvm -ldevmapper -lprop -lprivate_edit -ltermcap -ldevattr
 DPADD+=                ${LIBLVM} ${LIBDEVMAPPER} ${LIBPROP} ${LIBEDIT} ${LIBTERMCAP}
 DPADD+=                ${LIBDEVATTR}
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .PATH: ${LVM2_DISTDIR}/tools
 
index 33735df..d81a4b6 100644 (file)
@@ -70,6 +70,7 @@ CRUNCH_ALIAS_swapon= swapoff swapctl
 CRUNCH_LIBS+= -lcam -lsbuf -lutil -lkvm -lm -lmd -lhammer -lkiconv
 CRUNCH_LIBS+= -lprivate_edit -ltermcap -ldevstat -lprop -lpthread
 CRUNCH_LIBS+= -lbsdxml -lipsec
+CRUNCH_LIBS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 CRUNCH_SRCDIRS+= usr.sbin
 CRUNCH_PROGS_usr.sbin= boot0cfg chroot
index c6a92a7..9aee101 100644 (file)
@@ -30,7 +30,7 @@ LIBDEVSTAT?=  ${DESTDIR}${LIBDIR}/libdevstat.a
 LIBDIALOG?=    ${DESTDIR}${LIBDIR}/libdialog.a
 LIBDM?=                ${DESTDIR}${LIBDIR}/libdm.a
 #LIBDMSG?=     ${DESTDIR}${LIBDIR}/libdmsg.a
-LIBEDIT?=      ${DESTDIR}${LIBDIR}/libprivate_edit.a
+LIBEDIT?=      ${DESTDIR}${LIBDIR}/priv/libprivate_edit.a
 LIBEVTR?=      ${DESTDIR}${LIBDIR}/libevtr.a
 LIBEXECINFO?=  ${DESTDIR}${LIBDIR}/libexecinfo.a
 LIBFETCH?=     ${DESTDIR}${LIBDIR}/libfetch.a
index de59ec1..7011d37 100644 (file)
@@ -7,6 +7,7 @@ WARNS?=         3
 
 DPADD=         ${LIBEDIT} ${LIBTERMCAP}
 LDADD=         -lprivate_edit -ltermcap
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 SCRIPTS=       bc.library
 SCRIPTSMODE=   444
index 77835ae..b2efb03 100644 (file)
@@ -10,6 +10,6 @@ WARNS?= 2
 LDADD+=        -lprivate_ldns -lcrypto
 DPADD+=        ${LIBLDNS} ${LIBCRYPTO}
 CFLAGS+=-I${.CURDIR} -I${LDNS} -I${LDNS}/drill -I${LDNSBASE}
-LDFLAGS+=      -rpath /usr/lib/priv
+LDFLAGS+=      -rpath /usr/lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .include <bsd.prog.mk>
index ae36f02..2dd112c 100644 (file)
@@ -18,6 +18,7 @@ CFLAGS+=-I${.CURDIR} -I${.OBJDIR} -I${CONTRIBDIR} \
        -D__dead=__dead2 -DUSE_GLOB_H
 LDADD= -lprivate_edit -ltermcap -lutil
 DPADD= ${LIBEDIT} ${LIBTERMCAP} ${LIBUTIL}
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .if !defined(NO_OPENSSL)
 SRCS+= ssl.c
index e526e54..9d611ef 100644 (file)
@@ -4,5 +4,6 @@ PROG=   tftp
 SRCS=  main.c tftp.c tftpsubs.c
 DPADD= ${LIBEDIT} ${LIBTERMCAP}
 LDADD= -lprivate_edit -ltermcap
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .include <bsd.prog.mk>
index f64fc95..5ce61f9 100644 (file)
@@ -6,5 +6,6 @@ FILESDIR=       ${SHAREDIR}/misc
 
 LDADD+=        -lprivate_edit -ltermcap
 DPADD+=        ${LIBEDIT} ${LIBTERMCAP}
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .include <bsd.prog.mk>
index ffb9a72..e45f17a 100644 (file)
@@ -15,5 +15,6 @@ CFLAGS+= -DCONFIG_READLINE
 
 LDADD+= -lprivate_edit -ltermcap
 DPADD+= ${LIBEDIT} ${LIBTERMCAP}
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .include <bsd.prog.mk>
index 182aca2..dfc85aa 100644 (file)
@@ -4,5 +4,6 @@ PROG= cdcontrol
 
 DPADD= ${LIBEDIT} ${LIBTERMCAP}
 LDADD= -lprivate_edit -ltermcap
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .include <bsd.prog.mk>
index 31e012f..58af35f 100644 (file)
@@ -13,5 +13,6 @@ CFLAGS+= -I${.CURDIR}/../common_source
 
 DPADD= ${LIBLPR} ${LIBEDIT} ${LIBTERMCAP}
 LDADD= ${LIBLPR} -lprivate_edit -ltermcap
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .include <bsd.prog.mk>
index eb3d4dc..258ac62 100644 (file)
@@ -5,5 +5,6 @@ MAN=    pppctl.8
 WARNS?=        2
 LDADD+= -lprivate_edit -ltermcap
 DPADD+= ${LIBEDIT} ${LIBTERMCAP}
+LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 
 .include <bsd.prog.mk>