summaryrefslogtreecommitdiff
path: root/sys-freebsd/freebsd-usbin
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-08-25 07:36:27 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-08-25 07:36:27 +0100
commit43793fab84041cfc5c60c0151d1591b8a69fb24a (patch)
tree6208a7f4fc744684fce0f55acbb47511acace498 /sys-freebsd/freebsd-usbin
parent28e3d252dc8ac8a5635206dfefe1cfe05058d1db (diff)
gentoo resync : 25.08.2018
Diffstat (limited to 'sys-freebsd/freebsd-usbin')
-rw-r--r--sys-freebsd/freebsd-usbin/Manifest2
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-SA-1803-speculative_execution-amd64-11.patch189
-rw-r--r--sys-freebsd/freebsd-usbin/freebsd-usbin-11.1_p1.ebuild191
3 files changed, 382 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-usbin/Manifest b/sys-freebsd/freebsd-usbin/Manifest
index 198f7ebf568d..258eb84ae7a6 100644
--- a/sys-freebsd/freebsd-usbin/Manifest
+++ b/sys-freebsd/freebsd-usbin/Manifest
@@ -2,6 +2,7 @@ AUX freebsd-usbin-10.3-bsdxml2expat.patch 406 BLAKE2B bddbdf3869a084f4a3eed61639
AUX freebsd-usbin-11.0-workaround.patch 374 BLAKE2B 7e4b18ccddd1da87fc2d6bb8d8c98be45cc1b2d1d8b383316746a793b6eb3aa9d722e11ea600d0c49111b00c5ddb237eaa019b2babeed86da7d0beef6ff0189d SHA512 c9e8b493d99581dd7beac48def291843e31649a2962f720ed06ef095a128b039e8308662cfbbfcbecfbd0265132bb7a4df9d895ffe69aac09c129389ba5be518
AUX freebsd-usbin-11.1-bsdxml2expat.patch 841 BLAKE2B 89b5b0ed64dcf5c95eb727110651bb77079a4ccfc346fbd9ac1b26e3a4d53c452d657379ca876e6eb8b50dd90be59737b84405de873613dadf3bebeae7c788de SHA512 69f9055dc536132f1ec46389b53e25261632d726bc74857210ecb5511114f07d4b550e5e4a7a6e066a4a68c4a4bb4e44309d01f569b154fc773247dbd7f3fb23
AUX freebsd-usbin-9.0-newsyslog.patch 507 BLAKE2B 7c95ebd60ca6cc1bac56b84359a389dada9e71de9f275cf99d72f329fb408bd16845fb46d60037c514deb4ea21cd894da57ae28193e56970e383c5a8e1c689b7 SHA512 5423fc577035c2a272d4cb4305c5ee5e1e910a68af44595524665f7b867bd0a48bab0349b2fa13eabc385b2ec29c8f578d018cd8196f3ad20a13a68d36a335ae
+AUX freebsd-usbin-SA-1803-speculative_execution-amd64-11.patch 3658 BLAKE2B 4c7c4aa7d65ae2f36ea08568ca6fb9412456dda432f459a99b5e68858dc5b2ea6e023cb257e6659a5ca31e572c537c9169c832cc5ca39cad7a38efc2c52283df SHA512 c46b73a1c104470d631f3b874e592e33d2bf100258d774fbaec406c3d3985fb3283bce2f51911a5d73e5f66b5a3bc5d38d4cbeab0439acd21cfbf376e496971a
AUX freebsd-usbin-adduser.patch 428 BLAKE2B 3008953aa7ea14405b0e914f518fa05a5de744283110959900ab1ee9887b8b48d8d15131f26280773ff0173f1c60c077c66fedfad1b0310d0e6c5abb5a2b1370 SHA512 51720e3db9bf3728afc0dc370a469746cb1bf61623c44a20c58e27d647e5a5d0360145b1d174382176d803f2558afa2f2a29eca6c85c638529d0e11e2859c0c3
AUX iscsid.initd 429 BLAKE2B 366c216bf7f4584d1aa115302547b7066105b5107a976504c68725a1f7ca80adb7bd19b4acdaa2ea41b45c42bfed2b028a17ab28201163222788432768f2e5a6 SHA512 49a90719aa0279e19899a2107113cad0784a2cf3b57a0c24ad08549fa4b44dcb1aceecd71027e363b8d2cbbe1b590480ef7806cb05d8b00c1830c2d77b8a8540
AUX nfs.confd 303 BLAKE2B 69f72512c7e518f9078ea3873c5a2c9f0e1fef02ba3d769a18d1c8f347a8f8d5981cbe7ce34946431b373ae2b580505d74714f7bdbc0a7298745f02f96d35404 SHA512 4224c7f525e39b105b8d80caa7db0f3e0b07d6c521970b2aacfd707ef524262cbdb9ed8aa5151022d571a759151dd25a280fc765a38e67864b0c446ee9fd6b5a
@@ -13,4 +14,5 @@ AUX rpc.lockd.initd 530 BLAKE2B 03926d9b01e3d191030a18785ef53824836d1826895d064a
AUX rpc.statd.initd 520 BLAKE2B 701d58e57520dd9237a7e2261071304a1f820816c0902e06122a4729872432e6c29dc62a686f53d674a75f2c3050b6adf04b2d3c665f2f3639362fecf0ca929c SHA512 62c3bef69ca0619e3492050379a4c8b490305ab0ee7620143c31be7af414b1f1cbd79feaee345bd5e6bfdfa6c93bcce3cc9ff61a2f63e235a3807920e260cb7a
DIST freebsd-src-11.1.tar.xz 147661560 BLAKE2B a9e6ba9d0e12c8b56ac58575d5f02931edbb6a3545d9dccae78810d2d0470a29b29dd7f724b03b8afafbca23717a71346e4cfbd3530e0f40118a23609c3f414e SHA512 b97707ec7a601ca6bcb682c45f6d94a38484301ac24630d7285eff6f88b027ce6900c93fc62f8ce36e0cf32c91f73a9d1c999db397b7f8782fd74a8551a03aca
EBUILD freebsd-usbin-11.1.ebuild 5442 BLAKE2B 68a9b16ec4eceded11cbfda41eaf8e5d5108e43ba16d351c8e7e82480ab747f9088592bf6dc9aeb35507cfe0d53936108dee467ed0ddac1b728141116925f42b SHA512 ec043c20093c49637c5ee352259015addcf23c610c893a21b3a9f512b097b3d659ed788316540435b3edfedbe3b949325f2a935a8d46acd61593cb27dd6756ac
+EBUILD freebsd-usbin-11.1_p1.ebuild 5548 BLAKE2B 6217891573dc7dd83498f33f90b8c0c8a64ea6ace55694f395a95c9a076047235d8418874f3fc93fb858370a70ed52c3cbeb65a7e053a72ecea5f6feb02d9d9c SHA512 ffa8839deadf38ee3607f372d4aecc418254417c026b712deeb68cb2c7527c2d91f845580d3d3e31f985c6bd975a3524aa54786a76c115beaee765a2fc6f9d3e
MISC metadata.xml 599 BLAKE2B 70b00a85a1d670dc842bf5234aa6a82cc31564ec25c2f1789440b5beae5e4e0ab76b7b16122b92205d616e86225d892eb183f21c3e0c8aa63cb32f60a0647265 SHA512 afe1f9e8ccacac89bcd308b6476bba009035542f86d71f70f27df029ff20dda7ff7ff8c9510e6939d502a31750c6bf69de608440fb61b1d590d018446aa14f99
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-SA-1803-speculative_execution-amd64-11.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-SA-1803-speculative_execution-amd64-11.patch
new file mode 100644
index 000000000000..0cc67ad8f342
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-SA-1803-speculative_execution-amd64-11.patch
@@ -0,0 +1,189 @@
+--- usr.sbin/cpucontrol/cpucontrol.8.orig
++++ usr.sbin/cpucontrol/cpucontrol.8
+@@ -24,7 +24,7 @@
+ .\"
+ .\" $FreeBSD$
+ .\"
+-.Dd June 30, 2009
++.Dd January 5, 2018
+ .Dt CPUCONTROL 8
+ .Os
+ .Sh NAME
+@@ -36,44 +36,48 @@
+ .Nm
+ .Op Fl vh
+ .Fl m Ar msr
+-.Bk
+ .Ar device
+ .Ek
++.Bk
+ .Nm
+ .Op Fl vh
+ .Fl m Ar msr Ns = Ns Ar value
+-.Bk
+ .Ar device
+ .Ek
++.Bk
+ .Nm
+ .Op Fl vh
+ .Fl m Ar msr Ns &= Ns Ar mask
+-.Bk
+ .Ar device
+ .Ek
++.Bk
+ .Nm
+ .Op Fl vh
+ .Fl m Ar msr Ns |= Ns Ar mask
+-.Bk
+ .Ar device
+ .Ek
++.Bk
+ .Nm
+ .Op Fl vh
+ .Fl i Ar level
+-.Bk
+ .Ar device
+ .Ek
++.Bk
+ .Nm
+ .Op Fl vh
+ .Fl i Ar level,level_type
+-.Bk
+ .Ar device
+ .Ek
++.Bk
+ .Nm
+ .Op Fl vh
+ .Op Fl d Ar datadir
+ .Fl u
++.Ar device
++.Ek
+ .Bk
++.Nm
++.Fl e
+ .Ar device
+ .Ek
+ .Sh DESCRIPTION
+@@ -129,6 +133,20 @@
+ .Nm
+ utility will walk through the configured data directories
+ and apply all firmware updates available for this CPU.
++.It Fl e
++Re-evaluate the kernel flags indicating the present CPU features.
++This command is typically executed after a firmware update was applied
++which changes information reported by the
++.Dv CPUID
++instruction.
++.Pp
++.Bf -symbolic
++Only execute the
++.Fl e
++command after the microcode update was applied to all CPUs in the system.
++The kernel does not operate correctly if the features of processors are
++not identical.
++.Ef
+ .It Fl v
+ Increase the verbosity level.
+ .It Fl h
+--- usr.sbin/cpucontrol/cpucontrol.c.orig
++++ usr.sbin/cpucontrol/cpucontrol.c
+@@ -60,6 +60,7 @@
+ #define FLAG_I 0x01
+ #define FLAG_M 0x02
+ #define FLAG_U 0x04
++#define FLAG_E 0x10
+
+ #define OP_INVAL 0x00
+ #define OP_READ 0x01
+@@ -114,7 +115,7 @@
+ if (name == NULL)
+ name = "cpuctl";
+ fprintf(stderr, "Usage: %s [-vh] [-d datadir] [-m msr[=value] | "
+- "-i level | -i level,level_type | -u] device\n", name);
++ "-i level | -i level,level_type | -e | -u] device\n", name);
+ exit(EX_USAGE);
+ }
+
+@@ -338,6 +339,25 @@
+ }
+
+ static int
++do_eval_cpu_features(const char *dev)
++{
++ int fd, error;
++
++ assert(dev != NULL);
++
++ fd = open(dev, O_RDWR);
++ if (fd < 0) {
++ WARN(0, "error opening %s for writing", dev);
++ return (1);
++ }
++ error = ioctl(fd, CPUCTL_EVAL_CPU_FEATURES, NULL);
++ if (error < 0)
++ WARN(0, "ioctl(%s, CPUCTL_EVAL_CPU_FEATURES)", dev);
++ close(fd);
++ return (error);
++}
++
++static int
+ do_update(const char *dev)
+ {
+ int fd;
+@@ -431,11 +451,14 @@
+ * Add all default data dirs to the list first.
+ */
+ datadir_add(DEFAULT_DATADIR);
+- while ((c = getopt(argc, argv, "d:hi:m:uv")) != -1) {
++ while ((c = getopt(argc, argv, "d:ehi:m:uv")) != -1) {
+ switch (c) {
+ case 'd':
+ datadir_add(optarg);
+ break;
++ case 'e':
++ flags |= FLAG_E;
++ break;
+ case 'i':
+ flags |= FLAG_I;
+ cmdarg = optarg;
+@@ -464,22 +487,25 @@
+ /* NOTREACHED */
+ }
+ dev = argv[0];
+- c = flags & (FLAG_I | FLAG_M | FLAG_U);
++ c = flags & (FLAG_E | FLAG_I | FLAG_M | FLAG_U);
+ switch (c) {
+- case FLAG_I:
+- if (strstr(cmdarg, ",") != NULL)
+- error = do_cpuid_count(cmdarg, dev);
+- else
+- error = do_cpuid(cmdarg, dev);
+- break;
+- case FLAG_M:
+- error = do_msr(cmdarg, dev);
+- break;
+- case FLAG_U:
+- error = do_update(dev);
+- break;
+- default:
+- usage(); /* Only one command can be selected. */
++ case FLAG_I:
++ if (strstr(cmdarg, ",") != NULL)
++ error = do_cpuid_count(cmdarg, dev);
++ else
++ error = do_cpuid(cmdarg, dev);
++ break;
++ case FLAG_M:
++ error = do_msr(cmdarg, dev);
++ break;
++ case FLAG_U:
++ error = do_update(dev);
++ break;
++ case FLAG_E:
++ error = do_eval_cpu_features(dev);
++ break;
++ default:
++ usage(); /* Only one command can be selected. */
+ }
+ SLIST_FREE(&datadirs, next, free);
+ return (error == 0 ? 0 : 1);
diff --git a/sys-freebsd/freebsd-usbin/freebsd-usbin-11.1_p1.ebuild b/sys-freebsd/freebsd-usbin/freebsd-usbin-11.1_p1.ebuild
new file mode 100644
index 000000000000..7eb0e4f04f7c
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/freebsd-usbin-11.1_p1.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit bsdmk freebsd flag-o-matic eutils
+
+DESCRIPTION="FreeBSD /usr/sbin tools"
+SLOT="0"
+LICENSE="BSD zfs? ( CDDL )"
+
+# Security Advisory and Errata patches.
+# UPSTREAM_PATCHES=()
+
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~amd64-fbsd ~x86-fbsd"
+ SRC_URI="${SRC_URI}
+ $(freebsd_upstream_patches)"
+fi
+
+EXTRACTONLY="
+ usr.sbin/
+ contrib/
+ usr.bin/
+ lib/
+ sbin/
+ etc/
+ gnu/
+"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*[usb?,bluetooth?,netware?]
+ build? ( sys-apps/baselayout )
+ ssl? ( dev-libs/openssl:0 )
+ >=app-arch/libarchive-3
+ sys-apps/tcp-wrappers
+ dev-util/dialog
+ >=dev-libs/libedit-20120311.3.0-r1
+ net-libs/libpcap
+ kerberos? ( app-crypt/heimdal )"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-ubin-${RV}*
+ zfs? ( =sys-freebsd/freebsd-cddl-${RV}* )
+ !build? ( =sys-freebsd/freebsd-sources-${RV}*
+ >=sys-freebsd/freebsd-sources-11.1_p3 )
+ sys-apps/texinfo
+ sys-devel/flex"
+
+S="${WORKDIR}/usr.sbin"
+
+IUSE="acpi atm audit bluetooth floppy ipv6 kerberos minimal netware nis pam ssl usb build zfs"
+
+pkg_setup() {
+ # Add the required source files.
+ use nis && EXTRACTONLY+="libexec/ "
+ use build && EXTRACTONLY+="sys/ include/ "
+ use zfs && EXTRACTONLY+="cddl/ "
+
+ # Release crunch is something like minimal. It seems to remove everything
+ # which is not needed to work.
+ use minimal && mymakeopts="${mymakeopts} RELEASE_CRUNCH= "
+
+ use acpi || mymakeopts="${mymakeopts} WITHOUT_ACPI= "
+ use atm || mymakeopts="${mymakeopts} WITHOUT_ATM= "
+ use audit || mymakeopts="${mymakeopts} WITHOUT_AUDIT= "
+ use bluetooth || mymakeopts="${mymakeopts} WITHOUT_BLUETOOTH= "
+ use ipv6 || mymakeopts="${mymakeopts} WITHOUT_INET6= WITHOUT_INET6_SUPPORT= "
+ use netware || mymakeopts="${mymakeopts} WITHOUT_IPX= WITHOUT_IPX_SUPPORT= WITHOUT_NCP= "
+ use nis || mymakeopts="${mymakeopts} WITHOUT_NIS= "
+ use pam || mymakeopts="${mymakeopts} WITHOUT_PAM_SUPPORT= "
+ use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL= "
+ use usb || mymakeopts="${mymakeopts} WITHOUT_USB= "
+ use floppy || mymakeopts="${mymakeopts} WITHOUT_FLOPPY= "
+ use kerberos || mymakeopts="${mymakeopts} WITHOUT_GSSAPI= "
+ use zfs || mymakeopts="${mymakeopts} WITHOUT_CDDL= "
+
+ mymakeopts="${mymakeopts} WITHOUT_PF= WITHOUT_LPR= WITHOUT_SENDMAIL= WITHOUT_AUTHPF= WITHOUT_MAILWRAPPER= WITHOUT_UNBOUND= "
+
+ append-flags $(test-flags -fno-strict-aliasing)
+}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-adduser.patch"
+ "${FILESDIR}/${PN}-9.0-newsyslog.patch"
+ "${FILESDIR}/${PN}-11.1-bsdxml2expat.patch"
+ "${FILESDIR}/${PN}-10.3-bsdxml2expat.patch"
+ "${FILESDIR}/${PN}-11.0-workaround.patch"
+ "${FILESDIR}/${PN}-SA-1803-speculative_execution-amd64-11.patch"
+ )
+
+REMOVE_SUBDIRS="
+ tcpdchk tcpdmatch
+ sendmail praliases editmap mailstats makemap
+ pc-sysinstall cron mailwrapper ntp bsnmpd
+ tcpdump ndp inetd
+ wpa/wpa_supplicant wpa/hostapd wpa/hostapd_cli wpa/wpa_cli wpa/wpa_passphrase
+ zic amd
+ pkg freebsd-update service sysrc bsdinstall"
+
+src_prepare() {
+ if ! use build; then
+ [[ ! -e "${WORKDIR}/sys" ]] && ln -s "/usr/src/sys" "${WORKDIR}/sys"
+ [[ ! -e "${WORKDIR}/include" ]] && ln -s "/usr/include" "${WORKDIR}/include"
+ else
+ dummy_mk mount_smbfs
+ fi
+}
+
+src_compile() {
+ # Preparing to build nmtree, ypldap
+ for dir in libnetbsd libopenbsd; do
+ cd "${WORKDIR}/lib/${dir}" || die
+ freebsd_src_compile -j1
+ done
+
+ cd "${S}" || die
+ freebsd_src_compile
+}
+
+src_install() {
+ # By creating these directories we avoid having to do a
+ # more complex hack
+ dodir /usr/share/doc
+ dodir /sbin
+ dodir /usr/libexec
+ dodir /usr/bin
+
+ # FILESDIR is used by some makefiles which will install files
+ # in the wrong place, just put it in the doc directory.
+ freebsd_src_install DOCDIR=/usr/share/doc/${PF}
+
+ # Most of these now come from openrc.
+ for util in iscsid nfs nfsuserd rpc.statd rpc.lockd; do
+ newinitd "${FILESDIR}/"${util}.initd ${util}
+ if [[ -e "${FILESDIR}"/${util}.confd ]]; then \
+ newconfd "${FILESDIR}"/${util}.confd ${util}
+ fi
+ done
+
+ for class in daily monthly weekly; do
+ cat - > "${T}/periodic.${class}" <<EOS
+#!/bin/sh
+/usr/sbin/periodic ${class}
+EOS
+ exeinto /etc/cron.${class}
+ newexe "${T}/periodic.${class}" periodic
+ done
+
+ # Install the pw.conf file to let pw use Gentoo's skel location
+ insinto /etc
+ doins "${FILESDIR}/pw.conf"
+
+ cd "${WORKDIR}/etc" || die
+ doins apmd.conf syslog.conf newsyslog.conf nscd.conf
+
+ if use bluetooth; then
+ insinto /etc/bluetooth
+ doins bluetooth/*
+ rm -f "${D}"/etc/bluetooth/Makefile
+ fi
+
+ cd "${S}"/ppp || die
+ insinto /etc/ppp
+ doins ppp.conf
+
+ # Install the periodic stuff (needs probably to be ported in a more
+ # gentooish way)
+ cd "${WORKDIR}/etc/periodic" || die
+
+ doperiodic daily daily/*.accounting
+ doperiodic monthly monthly/*.accounting
+}
+
+pkg_postinst() {
+ # We need to run pwd_mkdb if key files are not present
+ # If they are, then there is no need to run pwd_mkdb
+ if [[ ! -e "${ROOT}etc/passwd" || ! -e "${ROOT}etc/pwd.db" || ! -e "${ROOT}etc/spwd.db" ]] ; then
+ if [[ -e "${ROOT}etc/master.passwd" ]] ; then
+ einfo "Generating passwd files from ${ROOT}etc/master.passwd"
+ "${ROOT}"usr/sbin/pwd_mkdb -p -d "${ROOT}etc" "${ROOT}etc/master.passwd"
+ else
+ eerror "${ROOT}etc/master.passwd does not exist!"
+ eerror "You will no be able to log into your system!"
+ fi
+ fi
+
+ for logfile in messages security auth.log maillog lpd-errs xferlog cron \
+ debug.log slip.log ppp.log; do
+ [[ -f "${ROOT}/var/log/${logfile}" ]] || touch "${ROOT}/var/log/${logfile}"
+ done
+}