diff options
Diffstat (limited to 'sys-freebsd/freebsd-ubin')
-rw-r--r-- | sys-freebsd/freebsd-ubin/files/freebsd-ubin-11.0-setXid.patch | 147 | ||||
-rw-r--r-- | sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild | 44 |
2 files changed, 172 insertions, 19 deletions
diff --git a/sys-freebsd/freebsd-ubin/files/freebsd-ubin-11.0-setXid.patch b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-11.0-setXid.patch new file mode 100644 index 0000000..946cc5b --- /dev/null +++ b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-11.0-setXid.patch @@ -0,0 +1,147 @@ +diff --git a/usr.bin/at/Makefile b/usr.bin/at/Makefile +index d199a85..dc5cafd 100644 +--- a/usr.bin/at/Makefile ++++ b/usr.bin/at/Makefile +@@ -17,6 +17,8 @@ BINOWN= root + BINMODE= 4555 + CLEANFILES+= at.1 + ++LDFLAGS+=-Wl,-z,now ++ + at.1: at.man + @${ECHO} Making ${.TARGET:T} from ${.ALLSRC:T}; \ + sed -e \ +diff --git a/usr.bin/chpass/Makefile b/usr.bin/chpass/Makefile +index 4427417..4f774a1 100644 +--- a/usr.bin/chpass/Makefile ++++ b/usr.bin/chpass/Makefile +@@ -17,6 +17,8 @@ CFLAGS+= -DYP + #CFLAGS+=-DRESTRICT_FULLNAME_CHANGE + CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../lib/libc/gen -I. + ++LDFLAGS+=-Wl,-z,now ++ + LIBADD= crypt util + .if ${MK_NIS} != "no" + LIBADD+= ypclnt +diff --git a/usr.bin/fstat/Makefile b/usr.bin/fstat/Makefile +index cd03a51..9a0fe6e 100644 +--- a/usr.bin/fstat/Makefile ++++ b/usr.bin/fstat/Makefile +@@ -9,3 +9,5 @@ LIBADD= procstat + MAN1= fuser.1 fstat.1 + + .include <bsd.prog.mk> ++LDFLAGS+=-Wl,-z,now ++ +diff --git a/usr.bin/lock/Makefile b/usr.bin/lock/Makefile +index 07321f7..ed2c786 100644 +--- a/usr.bin/lock/Makefile ++++ b/usr.bin/lock/Makefile +@@ -7,4 +7,6 @@ BINMODE=4555 + + LIBADD= crypt + ++LDFLAGS+=-Wl,-z,now ++ + .include <bsd.prog.mk> +diff --git a/usr.bin/login/Makefile b/usr.bin/login/Makefile +index 3499575..62a7356 100644 +--- a/usr.bin/login/Makefile ++++ b/usr.bin/login/Makefile +@@ -16,6 +16,8 @@ CFLAGS+= -DUSE_BSM_AUDIT + LIBADD+= bsm + .endif + ++LDFLAGS+=-Wl,-z,now ++ + .if ${MK_SETUID_LOGIN} != "no" + BINOWN= root + BINMODE=4555 +diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile +index 52cc3c7..11ebb2f 100644 +--- a/usr.bin/netstat/Makefile ++++ b/usr.bin/netstat/Makefile +@@ -57,6 +57,8 @@ BINGRP= kmem + BINMODE=2555 + LIBADD= kvm memstat xo util + ++LDFLAGS+=-Wl,-z,now ++ + .if ${MK_NETGRAPH_SUPPORT} != "no" + SRCS+= netgraph.c + LIBADD+= netgraph +diff --git a/usr.bin/opieinfo/Makefile b/usr.bin/opieinfo/Makefile +index 3114a92..5c41213 100644 +--- a/usr.bin/opieinfo/Makefile ++++ b/usr.bin/opieinfo/Makefile +@@ -12,6 +12,8 @@ WARNS?= 0 + + LIBADD= opie + ++LDFLAGS+=-Wl,-z,now ++ + BINOWN= root + BINMODE=4555 + PRECIOUSPROG= +diff --git a/usr.bin/opiepasswd/Makefile b/usr.bin/opiepasswd/Makefile +index ae35b20..32ba59b 100644 +--- a/usr.bin/opiepasswd/Makefile ++++ b/usr.bin/opiepasswd/Makefile +@@ -12,6 +12,8 @@ WARNS?= 0 + + LIBADD= opie + ++LDFLAGS+=-Wl,-z,now ++ + BINOWN= root + BINMODE=4555 + PRECIOUSPROG= +diff --git a/usr.bin/passwd/Makefile b/usr.bin/passwd/Makefile +index 758be2d..ebde1a6 100644 +--- a/usr.bin/passwd/Makefile ++++ b/usr.bin/passwd/Makefile +@@ -13,6 +13,8 @@ SYMLINKS = ${BINDIR}/passwd ${BINDIR}/yppasswd + MLINKS = passwd.1 yppasswd.1 + .endif + ++LDFLAGS+=-Wl,-z,now ++ + beforeinstall: + .for i in passwd yppasswd + [ ! -e ${DESTDIR}${BINDIR}/$i ] || \ +diff --git a/usr.bin/su/Makefile b/usr.bin/su/Makefile +index b3dd829..26eaa63 100644 +--- a/usr.bin/su/Makefile ++++ b/usr.bin/su/Makefile +@@ -10,6 +10,8 @@ WARNS?= 5 + LIBADD= util pam + + .if ${MK_AUDIT} != "no" ++LDFLAGS+=-Wl,-z,now ++ + CFLAGS+= -DUSE_BSM_AUDIT + LIBADD+= bsm + .endif +diff --git a/usr.bin/wall/Makefile b/usr.bin/wall/Makefile +index 0579add..571be8d 100644 +--- a/usr.bin/wall/Makefile ++++ b/usr.bin/wall/Makefile +@@ -6,4 +6,6 @@ SRCS= ttymsg.c wall.c + BINGRP= tty + BINMODE=2555 + ++LDFLAGS+=-Wl,-z,now ++ + .include <bsd.prog.mk> +diff --git a/usr.bin/write/Makefile b/usr.bin/write/Makefile +index ba06110..ba6ce04 100644 +--- a/usr.bin/write/Makefile ++++ b/usr.bin/write/Makefile +@@ -5,4 +5,6 @@ PROG= write + BINMODE=2555 + BINGRP= tty + ++LDFLAGS+=-Wl,-z,now ++ + .include <bsd.prog.mk> diff --git a/sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild b/sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild index 3cdde79..f9bcdb2 100644 --- a/sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild +++ b/sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild @@ -11,9 +11,6 @@ SLOT="0" IUSE="ar atm audit bluetooth ipv6 kerberos netware nis ssl usb build zfs" LICENSE="BSD zfs? ( CDDL )" -# Security Advisory and Errata patches. -UPSTREAM_PATCHES=( "SA-16:25/bspatch.patch" ) - if [[ ${PV} != *9999* ]]; then KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" SRC_URI="${SRC_URI} @@ -55,18 +52,13 @@ S="${WORKDIR}/usr.bin" PATCHES=( "${FILESDIR}/${PN}-6.0-bsdcmp.patch" "${FILESDIR}/${PN}-9.0-fixmakefiles.patch" - "${FILESDIR}/${PN}-setXid.patch" + "${FILESDIR}/${PN}-11.0-setXid.patch" "${FILESDIR}/${PN}-lint-stdarg.patch" - "${FILESDIR}/${PN}-8.0-xinstall.patch" "${FILESDIR}/${PN}-9.1-bsdar.patch" "${FILESDIR}/${PN}-9.1-minigzip.patch" - "${FILESDIR}/${PN}-10.0-atf.patch" "${FILESDIR}/${PN}-10.0-dtc-gcc46.patch" - "${FILESDIR}/${PN}-10.0-kdump-ioctl.patch" - "${FILESDIR}/${PN}-10.0-mandoc.patch" - "${FILESDIR}/${PN}-10.2-bsdxml.patch" "${FILESDIR}/${PN}-10.2-talk-workaround.patch" - "${FILESDIR}/${PN}-10.3-bmake-workaround.patch" ) + "${FILESDIR}/${PN}-10.2-bsdxml.patch" ) # Here we remove some sources we don't need because they are already # provided by portage's packages or similar. In order: @@ -89,7 +81,8 @@ REMOVE_SUBDIRS="bzip2 bzip2recover tar cpio compile_et lex vi smbutil file vacation nc ftp telnet c99 c89 bc dc - whois tftp man" + whois tftp man + addr2line bsdcat cxxfilt cxxfilt elfcopy nm readelf sdiff size soelim strings" pkg_setup() { # Add the required source files. @@ -106,7 +99,7 @@ pkg_setup() { use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL= " use usb || mymakeopts="${mymakeopts} WITHOUT_USB= " use zfs || mymakeopts="${mymakeopts} WITHOUT_CDDL= " - mymakeopts="${mymakeopts} WITHOUT_CLANG= WITHOUT_LZMA_SUPPORT= WITHOUT_SVN= WITHOUT_SVNLITE= WITHOUT_OPENSSH= WITHOUT_LDNS_UTILS= " + mymakeopts="${mymakeopts} WITHOUT_CLANG= WITHOUT_LZMA_SUPPORT= WITHOUT_SVN= WITHOUT_SVNLITE= WITHOUT_OPENSSH= WITHOUT_LDNS_UTILS= WITHOUT_MANDOCDB= " } pkg_preinst() { @@ -131,7 +124,7 @@ src_prepare() { sed -i -e 's:"manpath -q":"manpath":' "${S}/whereis/pathnames.h" # Build a dynamic make - sed -i -e '/^NO_SHARED/ s/^/#/' "${S}"/make/Makefile || die + sed -i -e '/^NO_SHARED/ s/^/#/' "${S}"/bmake/Makefile.inc || die # Disable it here otherwise our patch wont apply use ar || dummy_mk ar @@ -151,16 +144,29 @@ setup_multilib_vars() { } src_compile() { - # Preparing to build mandoc - cd "${WORKDIR}/lib/libmandoc" || die - freebsd_src_compile -j1 - - cd "${S}" || die - local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) + # Preparing to build addr2line, elfcopy, m4 + local MULTIBUILD_VARIANTS="${DEFAULT_ABI}" + for dir in libelftc libpe libopenbsd ; do + cd "${WORKDIR}/lib/${dir}" || die + multibuild_foreach_variant freebsd_multilib_multibuild_wrapper freebsd_src_compile -j1 + done + MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) multibuild_foreach_variant freebsd_multilib_multibuild_wrapper setup_multilib_vars freebsd_src_compile -j1 } src_install() { + cd "${S}"/calendar/calendars || die + for dir in $(find . -type d ! -name "." ) ; do + dodir /usr/share/calendar/"$(basename ${dir})" + done + for l in en_US.ISO8859-1 en_US.ISO8859-15 fr_BE.ISO8859-1 \ + fr_BE.ISO8859-15 fr_CA.ISO8859-1 fr_CA.ISO8859-15 \ + fr_CH.ISO8859-1 fr_CH.ISO8859-15 fr_FR.ISO8859-15 \ + de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \ + de_CH.ISO8859-15 de_DE.ISO8859-15 pt_PT.ISO8859-1 ; do + dodir "/usr/share/nls/${l}" + done + local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) multibuild_foreach_variant freebsd_multilib_multibuild_wrapper setup_multilib_vars freebsd_src_install |