summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-10-13 22:19:36 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-10-14 23:22:23 +0100
commit4b19be30aa626b327c885dae62c559ec0e9fb935 (patch)
tree76e74807bc479502e13866b581b6bf86734ec634 /eclass
parent30d6f67c98d149508509d5e86f176d558793acc0 (diff)
gentoo resync : 13.10.2019
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin37489 -> 37634 bytes
-rw-r--r--eclass/acct-group.eclass2
-rw-r--r--eclass/acct-user.eclass2
-rw-r--r--eclass/bazel.eclass2
-rw-r--r--eclass/bsdmk.eclass2
-rw-r--r--eclass/cron.eclass2
-rw-r--r--eclass/flag-o-matic.eclass8
-rw-r--r--eclass/freebsd.eclass5
-rw-r--r--eclass/go-module.eclass178
-rw-r--r--eclass/kernel-2.eclass12
-rw-r--r--eclass/mozconfig-v6.60.eclass2
-rw-r--r--eclass/office-ext-r1.eclass2
-rw-r--r--eclass/pax-utils.eclass2
-rw-r--r--eclass/qmail.eclass5
-rw-r--r--eclass/qt5-build.eclass2
-rw-r--r--eclass/ruby-fakegem.eclass2
-rw-r--r--eclass/toolchain-binutils.eclass2
-rw-r--r--eclass/toolchain-glibc.eclass2
18 files changed, 207 insertions, 25 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index e926bc25f3b3..3231925b1992 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index 99919789b2c7..0b943454a92e 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -75,7 +75,7 @@ readonly ACCT_GROUP_NAME
# << Boilerplate ebuild variables >>
: ${DESCRIPTION:="System group: ${ACCT_GROUP_NAME}"}
: ${SLOT:=0}
-: ${KEYWORDS:=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris}
+: ${KEYWORDS:=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris}
S=${WORKDIR}
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index c2e643332ccc..be6b3dd3e600 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -115,7 +115,7 @@ readonly ACCT_USER_NAME
# << Boilerplate ebuild variables >>
: ${DESCRIPTION:="System user: ${ACCT_USER_NAME}"}
: ${SLOT:=0}
-: ${KEYWORDS:=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris}
+: ${KEYWORDS:=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris}
S=${WORKDIR}
diff --git a/eclass/bazel.eclass b/eclass/bazel.eclass
index 4eacb75776e4..7c5f92977ba5 100644
--- a/eclass/bazel.eclass
+++ b/eclass/bazel.eclass
@@ -193,7 +193,7 @@ bazel_load_distfiles() {
elif [[ ${rename} -eq 1 ]]; then
# Make sure the distfile is used
if [[ "${A}" == *"${word}"* ]]; then
- echo "Copying ${file} to bazel distdir as ${word}"
+ echo "Copying ${word} to bazel distdir as ${file}"
ln -s "${DISTDIR}/${word}" "${T}/bazel-distdir/${file}" || die
fi
rename=0
diff --git a/eclass/bsdmk.eclass b/eclass/bsdmk.eclass
index 4286a36b745f..ab91b0e4a977 100644
--- a/eclass/bsdmk.eclass
+++ b/eclass/bsdmk.eclass
@@ -3,7 +3,7 @@
# @ECLASS: bsdmk.eclass
# @MAINTAINER:
-# bsd@gentoo.org
+# maintainer-needed@gentoo.org
# @BLURB: Some functions for BSDmake
inherit toolchain-funcs portability flag-o-matic
diff --git a/eclass/cron.eclass b/eclass/cron.eclass
index 89835f646170..b9f436a4a5aa 100644
--- a/eclass/cron.eclass
+++ b/eclass/cron.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: cron.eclass
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 89b259cc222f..f882b09d6219 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -436,11 +436,13 @@ test-flag-PROG() {
[[ -z ${comp} || -z $1 ]] && return 1
# verify selected compiler exists before using it
- comp=$(tc-get${comp})
- type -p ${comp} >/dev/null || return 1
+ comp=($(tc-get${comp}))
+ # 'comp' can already contain compiler options.
+ # 'type' needs a binary name
+ type -p ${comp[0]} >/dev/null || return 1
local cmdline=(
- ${comp}
+ "${comp[@]}"
# Clang will warn about unknown gcc flags but exit 0.
# Need -Werror to force it to exit non-zero.
-Werror
diff --git a/eclass/freebsd.eclass b/eclass/freebsd.eclass
index 420312b50833..baebf439159e 100644
--- a/eclass/freebsd.eclass
+++ b/eclass/freebsd.eclass
@@ -1,5 +1,10 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
+# @DEAD
+# FreeBSD project is dead, and all consumers are gone.
+# Bug #683284. Removal in 14 days.
+
#
# @MAINTAINER:
# maintainer-needed@gentoo.org
diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
new file mode 100644
index 000000000000..9c11959fdf84
--- /dev/null
+++ b/eclass/go-module.eclass
@@ -0,0 +1,178 @@
+# Copyright 2019 Gentoo authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: go-module.eclass
+# @MAINTAINER:
+# William Hubbs <williamh@gentoo.org>
+# @SUPPORTED_EAPIS: 7
+# @BLURB: basic eclass for building software written as go modules
+# @DESCRIPTION:
+# This eclass provides basic settings and functions
+# needed by all software written in the go programming language that uses
+# go modules.
+#
+# You will know the software you are packaging uses modules because
+# it will have files named go.sum and go.mod in its top-level source
+# directory. If it does not have these files, use the golang-* eclasses.
+#
+# If it has these files and a directory named vendor in its top-level
+# source directory, you only need to inherit the eclass since upstream
+# is vendoring the dependencies.
+#
+# If it does not have a vendor directory, you should use the EGO_VENDOR
+# variable and the go-module_vendor_uris function as shown in the
+# example below to handle dependencies.
+#
+# Since Go programs are statically linked, it is important that your ebuild's
+# LICENSE= setting includes the licenses of all statically linked
+# dependencies. So please make sure it is accurate.
+#
+# @EXAMPLE:
+#
+# @CODE
+#
+# inherit go-module
+#
+# EGO_VENDOR=(
+# "github.com/xenolf/lego 6cac0ea7d8b28c889f709ec7fa92e92b82f490dd"
+# "golang.org/x/crypto 453249f01cfeb54c3d549ddb75ff152ca243f9d8 github.com/golang/crypto"
+# )
+#
+# SRC_URI="https://github.com/example/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+# $(go-module_vendor_uris)"
+#
+# @CODE
+
+case ${EAPI:-0} in
+ 7) ;;
+ *) die "${ECLASS} API in EAPI ${EAPI} not yet established."
+esac
+
+if [[ -z ${_GO_MODULE} ]]; then
+
+_GO_MODULE=1
+
+BDEPEND=">=dev-lang/go-1.12"
+
+# Force go to build in module mode.
+# In this mode the GOPATH environment variable is ignored.
+# this will become the default in the future.
+export GO111MODULE=on
+
+# The following go flags should be used for all builds.
+# -mod=vendor stopps downloading of dependencies from the internet.
+# -v prints the names of packages as they are compiled
+# -x prints commands as they are executed
+export GOFLAGS="-mod=vendor -v -x"
+
+# Do not complain about CFLAGS etc since go projects do not use them.
+QA_FLAGS_IGNORED='.*'
+
+# Go packages should not be stripped with strip(1).
+RESTRICT="strip"
+
+EXPORT_FUNCTIONS src_unpack pkg_postinst
+
+# @ECLASS-VARIABLE: EGO_VENDOR
+# @DESCRIPTION:
+# This variable contains a list of vendored packages.
+# The items of this array are strings that contain the
+# import path and the git commit hash for a vendored package.
+# If the import path does not start with github.com, the third argument
+# can be used to point to a github repository.
+
+# @FUNCTION: go-module_vendor_uris
+# @DESCRIPTION:
+# Convert the information in EGO_VENDOR to a format suitable for
+# SRC_URI.
+# A call to this function should be added to SRC_URI in your ebuild if
+# the upstream package does not include vendored dependencies.
+go-module_vendor_uris() {
+ local hash import line repo x
+ for line in "${EGO_VENDOR[@]}"; do
+ read -r import hash repo x <<< "${line}"
+ if [[ -n $x ]]; then
+ eerror "Trailing information in EGO_VENDOR in ${P}.ebuild"
+ eerror "${line}"
+ eerror "Trailing information is: \"$x\""
+ die "Invalid EGO_VENDOR format"
+ fi
+ : "${repo:=${import}}"
+ echo "https://${repo}/archive/${hash}.tar.gz -> ${repo//\//-}-${hash}.tar.gz"
+ done
+}
+
+# @FUNCTION: go-module_src_unpack
+# @DESCRIPTION:
+# Extract all archives in ${a} which are not nentioned in ${EGO_VENDOR}
+# to their usual locations then extract all archives mentioned in
+# ${EGO_VENDOR} to ${S}/vendor.
+go-module_src_unpack() {
+ debug-print-function ${FUNCNAME} "$@"
+ local f hash import line repo tarball vendor_tarballs x
+ vendor_tarballs=()
+ for line in "${EGO_VENDOR[@]}"; do
+ read -r import hash repo x <<< "${line}"
+ if [[ -n $x ]]; then
+ eerror "Trailing information in EGO_VENDOR in ${P}.ebuild"
+ eerror "${line}"
+ die "Invalid EGO_VENDOR format"
+ fi
+ : "${repo:=${import}}"
+ vendor_tarballs+=("${repo//\//-}-${hash}.tar.gz")
+ done
+ for f in $A; do
+ [[ -n ${vendor_tarballs[*]} ]] && has "$f" "${vendor_tarballs[@]}" &&
+ continue
+ unpack "$f"
+ done
+
+ [[ -z ${vendor_tarballs[*]} ]] && return
+ for line in "${EGO_VENDOR[@]}"; do
+ read -r import hash repo _ <<< "${line}"
+ : "${repo:=${import}}"
+ tarball=${repo//\//-}-${hash}.tar.gz
+ ebegin "Vendoring ${import} ${tarball}"
+ rm -fr "${S}/vendor/${import}" || die
+ mkdir -p "${S}/vendor/${import}" || die
+ tar -C "${S}/vendor/${import}" -x --strip-components 1 \
+ -f "${DISTDIR}/${tarball}" || die
+ eend
+ done
+}
+
+# @FUNCTION: go-module_live_vendor
+# @DESCRIPTION:
+# This function is used in live ebuilds to vendor the dependencies when
+# upstream doesn't vendor them.
+go-module_live_vendor() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ has live ${PROPERTIES} ||
+ die "${FUNCNAME} only allowed in live ebuilds"
+ [[ "${EBUILD_PHASE}" == unpack ]] ||
+ die "${FUNCNAME} only allowed in src_unpack"
+ [[ -d "${S}"/vendor ]] ||
+ die "${FUNCNAME} only allowed when upstream isn't vendoring"
+
+ pushd "${S}" >& /dev/null || die
+ go mod vendor || die
+ popd >& /dev/null || die
+}
+
+# @FUNCTION: go-module_pkg_postinst
+# @DESCRIPTION:
+# Display a warning about security updates for Go programs.
+go-module_pkg_postinst() {
+ debug-print-function ${FUNCNAME} "$@"
+ [[ -n ${REPLACING_VERSIONS} ]] && return 0
+ ewarn "${PN} is written in the Go programming language."
+ ewarn "Since this language is statically linked, security"
+ ewarn "updates will be handled in individual packages and will be"
+ ewarn "difficult for us to track as a distribution."
+ ewarn "For this reason, please update any go packages asap when new"
+ ewarn "versions enter the tree or go stable if you are running the"
+ ewarn "stable tree."
+}
+
+fi
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 784b3929d436..62e6c23e15cf 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -295,7 +295,7 @@ handle_genpatches() {
UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}"
debug-print "genpatches tarball: $tarball"
fi
- GENPATCHES_URI+=" ${use_cond_start}mirror://gentoo/${tarball}${use_cond_end}"
+ GENPATCHES_URI+=" ${use_cond_start}$(echo https://dev.gentoo.org/~{mpagano,whissi}/dist/genpatches/${tarball})${use_cond_end}"
done
}
@@ -371,17 +371,17 @@ detect_version() {
# at this point 031412, Linus is putting all 3.x kernels in a
# 3.x directory, may need to revisit when 4.x is released
- KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.x"
+ KERNEL_BASE_URI="https://www.kernel.org/pub/linux/kernel/v${KV_MAJOR}.x"
[[ -n "${K_LONGTERM}" ]] &&
KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_PATCH_ARR}"
else
- #KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.0"
- #KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
+ #KERNEL_BASE_URI="https://www.kernel.org/pub/linux/kernel/v${KV_MAJOR}.0"
+ #KERNEL_BASE_URI="https://www.kernel.org/pub/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
if [[ ${KV_MAJOR} -ge 3 ]]; then
- KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.x"
+ KERNEL_BASE_URI="https://www.kernel.org/pub/linux/kernel/v${KV_MAJOR}.x"
else
- KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
+ KERNEL_BASE_URI="https://www.kernel.org/pub/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
fi
[[ -n "${K_LONGTERM}" ]] &&
diff --git a/eclass/mozconfig-v6.60.eclass b/eclass/mozconfig-v6.60.eclass
index ae83ebd6c314..4cbf6fe9618b 100644
--- a/eclass/mozconfig-v6.60.eclass
+++ b/eclass/mozconfig-v6.60.eclass
@@ -194,11 +194,9 @@ DEPEND="app-arch/zip
)
pulseaudio? ( media-sound/pulseaudio )
elibc_glibc? (
- virtual/cargo
virtual/rust
)
elibc_musl? (
- virtual/cargo
virtual/rust
)
${RDEPEND}"
diff --git a/eclass/office-ext-r1.eclass b/eclass/office-ext-r1.eclass
index 7ac6145342a8..04df18698fb8 100644
--- a/eclass/office-ext-r1.eclass
+++ b/eclass/office-ext-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: office-ext-r1.eclass
diff --git a/eclass/pax-utils.eclass b/eclass/pax-utils.eclass
index ef7c5b90069b..1e109c884b14 100644
--- a/eclass/pax-utils.eclass
+++ b/eclass/pax-utils.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: pax-utils.eclass
diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 158cf1607cf5..b6ef483aa82c 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -6,7 +6,7 @@
# qmail-bugs@gentoo.org
# @BLURB: common qmail functions
-inherit flag-o-matic toolchain-funcs fixheadtails user
+inherit flag-o-matic toolchain-funcs fixheadtails
# hardcoded paths
QMAIL_HOME="/var/qmail"
@@ -206,8 +206,7 @@ qmail_man_install() {
into /usr
doman *.[1578]
dodoc BLURB* CHANGES FAQ INSTALL* PIC* README* REMOVE* SECURITY \
- SENDMAIL SYSDEPS TEST* THANKS* THOUGHTS TODO* \
- UPGRADE VERSION*
+ SENDMAIL* TEST* THANKS* THOUGHTS UPGRADE VERSION*
declare -F qmail_man_install_hook >/dev/null && \
qmail_man_install_hook
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index b22124100d3e..2e5a15d930ab 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: qt5-build.eclass
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index f75e1669b0ca..e600b02b9649 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -176,7 +176,7 @@ case ${RUBY_FAKEGEM_RECIPE_TEST} in
;;
esac
-SRC_URI="mirror://rubygems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}${RUBY_FAKEGEM_SUFFIX:+-${RUBY_FAKEGEM_SUFFIX}}.gem"
+SRC_URI="https://rubygems.org/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}${RUBY_FAKEGEM_SUFFIX:+-${RUBY_FAKEGEM_SUFFIX}}.gem"
ruby_add_bdepend virtual/rubygems
ruby_add_rdepend virtual/rubygems
diff --git a/eclass/toolchain-binutils.eclass b/eclass/toolchain-binutils.eclass
index d15afb8531e7..0b691d822762 100644
--- a/eclass/toolchain-binutils.eclass
+++ b/eclass/toolchain-binutils.eclass
@@ -57,7 +57,7 @@ case ${BTYPE} in
SRC_URI="ftp://gcc.gnu.org/pub/binutils/snapshots/binutils-${BVER}.tar.bz2
ftp://sourceware.org/pub/binutils/snapshots/binutils-${BVER}.tar.bz2" ;;
hjlu)
- SRC_URI="mirror://kernel/linux/devel/binutils/binutils-${BVER}.tar."
+ SRC_URI="https://www.kernel.org/pub/linux/devel/binutils/binutils-${BVER}.tar."
version_is_at_least 2.21.51.0.5 && SRC_URI+="xz" || SRC_URI+="bz2" ;;
rel) SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.bz2" ;;
esac
diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass
index 4aa06db55293..30781fed7775 100644
--- a/eclass/toolchain-glibc.eclass
+++ b/eclass/toolchain-glibc.eclass
@@ -516,7 +516,7 @@ toolchain-glibc_pkg_pretend() {
if has_version ">${CATEGORY}/${P}-r10000" ; then
eerror "Sanity check to keep you from breaking your system:"
eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
+ [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
fi
if ! glibc_run_test '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n'