Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes

2021-06-27 Thread Martin Dummer

Am 27.06.21 um 20:57 schrieb Ulrich Mueller:
> [Either your mailer or something on the way has mangled whitespace in
> your patch, which makes it somewhat hard to read.]

Okay... not good, I will add the patchfile as attachment now.

>> --- a/eclass/vdr-plugin-2.eclass
>> +++ b/eclass/vdr-plugin-2.eclass
>> @@ -76,7 +76,7 @@
>>  inherit flag-o-matic toolchain-funcs unpacker
> This should also inherit strip-linguas.eclass, because strip-linguas is
> called in vdr_linguas_support().
>
> Also, while at it, could you remove the useless IUSE="" assignment in
> line 87?

Okay, I understand. I did not notice the call to "strip-linguas", and
I'm wondering how this could have worked all the years in the past.

Unfortunately "pkgcheck" does not report this.

All changes are applied.


Bye

Martin



From a34b8547accafbc8e658d05fd389f5714c35dcb8 Mon Sep 17 00:00:00 2001
From: Martin Dummer 
Date: Sun, 27 Jun 2021 17:05:23 +0200
Subject: [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes

- add EAPI8 support, no changes necessary
- add BDEPEND=pkgconfig
- remove outdated version numbers from (R)DEPEND
- fix calling of pkg-config
- add many "|| die" which should have been here already for EAPI7

Signed-off-by: Martin Dummer 
---
 eclass/vdr-plugin-2.eclass | 57 +-
 1 file changed, 32 insertions(+), 25 deletions(-)

diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
index 3f3acc41208..6bd3a1fbff0 100644
--- a/eclass/vdr-plugin-2.eclass
+++ b/eclass/vdr-plugin-2.eclass
@@ -73,10 +73,10 @@
 
 [[ ${EAPI} == [5] ]] && inherit multilib
 [[ ${EAPI} == [56] ]] && inherit eutils
-inherit flag-o-matic toolchain-funcs unpacker
+inherit flag-o-matic strip-linguas toolchain-funcs unpacker
 
 case ${EAPI:-0} in
-	5|6|7)
+	5|6|7|8)
 	;;
 	*) die "EAPI ${EAPI} unsupported."
 	;;
@@ -84,8 +84,6 @@ esac
 
 EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm pkg_config
 
-IUSE=""
-
 # Name of the plugin stripped from all vdrplugin-, vdr- and -cvs pre- and postfixes
 VDRPLUGIN="${PN/#vdrplugin-/}"
 VDRPLUGIN="${VDRPLUGIN/#vdr-/}"
@@ -97,10 +95,11 @@ DESCRIPTION="vdr Plugin: ${VDRPLUGIN} (based on vdr-plugin-2.eclass)"
 S="${WORKDIR}/${VDRPLUGIN}-${PV}"
 
 # depend on headers for DVB-driver and vdr-scripts
-DEPEND=">=media-tv/gentoo-vdr-scripts-0.4.2
+BDEPEND="dev-util/pkgconfig"
+DEPEND="media-tv/gentoo-vdr-scripts
 	virtual/linuxtv-dvb-headers"
-RDEPEND=">=media-tv/gentoo-vdr-scripts-0.4.2
-	>=app-eselect/eselect-vdr-0.0.2"
+RDEPEND="media-tv/gentoo-vdr-scripts
+	app-eselect/eselect-vdr"
 
 if [[ "${GENTOO_VDR_CONDITIONAL:-no}" = "yes" ]]; then
 	IUSE="${IUSE} vdr"
@@ -151,7 +150,7 @@ vdr_create_header_checksum_file() {
 	local CHKSUM="header-md5-vdr"
 
 	if [[ -f ${VDR_CHECKSUM_DIR}/header-md5-vdr ]]; then
-		cp "${VDR_CHECKSUM_DIR}/header-md5-vdr" "${CHKSUM}"
+		cp "${VDR_CHECKSUM_DIR}/header-md5-vdr" "${CHKSUM}" || die "Could not copy header-md5-vdr"
 	elif type -p md5sum >/dev/null 2>&1; then
 		(
 			cd "${VDR_INCLUDE_DIR}"
@@ -179,7 +178,8 @@ fix_vdr_libsi_include() {
 	for f; do
 		sed -i "${f}" \
 			-e '/#include/s:"\(.*libsi.*\)":<\1>:' \
-			-e '/#include/s:<.*\(libsi/.*\)>::'
+			-e '/#include/s:<.*\(libsi/.*\)>::' \
+			|| die "sed failed while fixing include of libsi-headers"
 	done
 }
 
@@ -192,7 +192,7 @@ fix_vdr_libsi_include() {
 vdr_patchmakefile() {
 	einfo "Patching Makefile"
 	[[ -e Makefile ]] || die "Makefile of plugin can not be found!"
-	cp Makefile "${WORKDIR}"/Makefile.before
+	cp Makefile "${WORKDIR}"/Makefile.before || die "Failed to copy Makefile"
 
 	# plugin makefiles use VDRDIR in strange ways
 	# assumptions:
@@ -216,14 +216,16 @@ vdr_patchmakefile() {
 		-e '/VDRINCDIR.*=/!s:$(VDRDIR)/include:$(VDRINCDIR):' \
 		\
 		-e 's:-I$(DVBDIR)/include::' \
-		-e 's:-I$(DVBDIR)::'
+		-e 's:-I$(DVBDIR)::' \
+		|| die "sed failed to set \$VDRDIR"
 
 	if ! grep -q APIVERSION Makefile; then
 		ebegin "  Converting to APIVERSION"
 		sed -i Makefile \
 			-e 's:^APIVERSION = :APIVERSION ?= :' \
 			-e 's:$(LIBDIR)/$@.$(VDRVERSION):$(LIBDIR)/$@.$(APIVERSION):' \
-			-e '/VDRVERSION =/a\APIVERSION = $(shell sed -ne '"'"'/define APIVERSION/s/^.*"\\(.*\\)".*$$/\\1/p'"'"' $(VDRDIR)/config.h)'
+			-e '/VDRVERSION =/a\APIVERSION = $(shell sed -ne '"'"'/define APIVERSION/s/^.*"\\(.*\\)".*$$/\\1/p'"'"' $(VDRDIR)/config.h)' \
+			|| die "sed failed to change APIVERSION"
 		eend $?
 	fi
 
@@ -231,13 +233,15 @@ vdr_patchmakefile() {
 	# Do not overwrite CXXFLAGS, add LDFLAGS if missing
 	sed -i Makefile \
 		-e '/^CXXFLAGS[[:space:]]*=/s/=/?=/' \
-		-e '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:'
+		-e '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:' \
+		|| die "sed failed to fix compile-flags"
 
 	# Disabling file stripping, the package manager takes care of it
 	sed -i Makefile \
 		-e '/@.*strip/d' \
 		-e '/strip \$(LIBDIR)\/\$@/d' \
-		-e 's/STRIP.*=.*$/STRIP = true/'
+		-e 's/STRIP.*=.*$/STRIP = true/' \
+		|| die "sed 

Re: [gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes

2021-06-27 Thread Ulrich Mueller
> On Sun, 27 Jun 2021, Martin Dummer wrote:

[Either your mailer or something on the way has mangled whitespace in
your patch, which makes it somewhat hard to read.]

> --- a/eclass/vdr-plugin-2.eclass
> +++ b/eclass/vdr-plugin-2.eclass
> @@ -76,7 +76,7 @@
>  inherit flag-o-matic toolchain-funcs unpacker

This should also inherit strip-linguas.eclass, because strip-linguas is
called in vdr_linguas_support().

Also, while at it, could you remove the useless IUSE="" assignment in
line 87?

Ulrich


signature.asc
Description: PGP signature


[gentoo-dev] [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes

2021-06-27 Thread Martin Dummer
please review and comment.

I will open a github PR for code changes later.


From d5f6916d7fdd194e0c2ab11eea0d48ecb01d122c Mon Sep 17 00:00:00 2001

From: Martin Dummer 
Date: Sun, 27 Jun 2021 17:05:23 +0200
Subject: [PATCH] vdr-plugin-2.eclass: add EAPI8 support, EAPI7+ fixes

- add EAPI8 support, no changes necessary
- add BDEPEND=pkgconfig
- remove outdated version numbers from (R)DEPEND
- fix calling of pkg-config
- add many "|| die" which should have been here already for EAPI7

Signed-off-by: Martin Dummer 
---
 eclass/vdr-plugin-2.eclass | 53 ++
 1 file changed, 31 insertions(+), 22 deletions(-)

diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
index 3f3acc41208..41e43ff34ee 100644
--- a/eclass/vdr-plugin-2.eclass
+++ b/eclass/vdr-plugin-2.eclass
@@ -76,7 +76,7 @@
 inherit flag-o-matic toolchain-funcs unpacker
 
 case ${EAPI:-0} in
-   5|6|7)
+   5|6|7|8)
    ;;
    *) die "EAPI ${EAPI} unsupported."
    ;;
@@ -97,10 +97,11 @@ DESCRIPTION="vdr Plugin: ${VDRPLUGIN} (based on
vdr-plugin-2.eclass)"
 S="${WORKDIR}/${VDRPLUGIN}-${PV}"
 
 # depend on headers for DVB-driver and vdr-scripts
-DEPEND=">=media-tv/gentoo-vdr-scripts-0.4.2
+BDEPEND="dev-util/pkgconfig"
+DEPEND="media-tv/gentoo-vdr-scripts
    virtual/linuxtv-dvb-headers"
-RDEPEND=">=media-tv/gentoo-vdr-scripts-0.4.2
-   >=app-eselect/eselect-vdr-0.0.2"
+RDEPEND="media-tv/gentoo-vdr-scripts
+   app-eselect/eselect-vdr"
 
 if [[ "${GENTOO_VDR_CONDITIONAL:-no}" = "yes" ]]; then
    IUSE="${IUSE} vdr"
@@ -151,7 +152,7 @@ vdr_create_header_checksum_file() {
    local CHKSUM="header-md5-vdr"
 
    if [[ -f ${VDR_CHECKSUM_DIR}/header-md5-vdr ]]; then
-   cp "${VDR_CHECKSUM_DIR}/header-md5-vdr" "${CHKSUM}"
+   cp "${VDR_CHECKSUM_DIR}/header-md5-vdr" "${CHKSUM}" ||
die "Could not copy header-md5-vdr"
    elif type -p md5sum >/dev/null 2>&1; then
    (
    cd "${VDR_INCLUDE_DIR}"
@@ -179,7 +180,8 @@ fix_vdr_libsi_include() {
    for f; do
    sed -i "${f}" \
    -e '/#include/s:"\(.*libsi.*\)":<\1>:' \
-   -e '/#include/s:<.*\(libsi/.*\)>::'
+   -e '/#include/s:<.*\(libsi/.*\)>::' \
+   || die "sed failed while fixing include of
libsi-headers"
    done
 }
 
@@ -192,7 +194,7 @@ fix_vdr_libsi_include() {
 vdr_patchmakefile() {
    einfo "Patching Makefile"
    [[ -e Makefile ]] || die "Makefile of plugin can not be found!"
-   cp Makefile "${WORKDIR}"/Makefile.before
+   cp Makefile "${WORKDIR}"/Makefile.before || die "Failed to copy
Makefile"
 
    # plugin makefiles use VDRDIR in strange ways
    # assumptions:
@@ -216,14 +218,16 @@ vdr_patchmakefile() {
    -e '/VDRINCDIR.*=/!s:$(VDRDIR)/include:$(VDRINCDIR):' \
    \
    -e 's:-I$(DVBDIR)/include::' \
-   -e 's:-I$(DVBDIR)::'
+   -e 's:-I$(DVBDIR)::' \
+   || die "sed failed to set \$VDRDIR"
 
    if ! grep -q APIVERSION Makefile; then
    ebegin "  Converting to APIVERSION"
    sed -i Makefile \
    -e 's:^APIVERSION = :APIVERSION ?= :' \
    -e
's:$(LIBDIR)/$@.$(VDRVERSION):$(LIBDIR)/$@.$(APIVERSION):' \
-   -e '/VDRVERSION =/a\APIVERSION = $(shell sed -ne
'"'"'/define APIVERSION/s/^.*"\\(.*\\)".*$$/\\1/p'"'"' $(VDRDIR)/config.h)'
+   -e '/VDRVERSION =/a\APIVERSION = $(shell sed -ne
'"'"'/define APIVERSION/s/^.*"\\(.*\\)".*$$/\\1/p'"'"'
$(VDRDIR)/config.h)' \
+   || die "sed failed to change APIVERSION"
    eend $?
    fi
 
@@ -231,13 +235,15 @@ vdr_patchmakefile() {
    # Do not overwrite CXXFLAGS, add LDFLAGS if missing
    sed -i Makefile \
    -e '/^CXXFLAGS[[:space:]]*=/s/=/?=/' \
-   -e '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:'
+   -e '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:' \
+   || die "sed failed to fix compile-flags"
 
    # Disabling file stripping, the package manager takes care of it
    sed -i Makefile \
    -e '/@.*strip/d' \
    -e '/strip \$(LIBDIR)\/\$@/d' \
-   -e 's/STRIP.*=.*$/STRIP = true/'
+   -e 's/STRIP.*=.*$/STRIP = true/' \
+   || die "sed failed to fix file stripping"
 
    # Use a file instead of a variable as single-stepping via ebuild
    # destroys environment.
@@ -318,14 +324,15 @@ vdr_i18n() {
    if [[ "${KEEP_I18NOBJECT:-no}" = "yes" ]]; then
    eqawarn "Forced to keep i18n.o"
    else
-   sed -i "s:i18n.o::g" Makefile
+   sed -i "s:i18n.o::g" Makefile || die "sed failed
to remove i18n from Makefile"
    eqawarn "OBJECT i18n.o found, 

Re: [gentoo-dev] [PATCH] Add 2021-06-30-libxcrypt-migration

2021-06-27 Thread Michał Górny
On Sun, 2021-06-27 at 07:33 +0100, Sam James wrote:
> Please note that the 2021-07-07 migration date is preliminary.
> 

LGTM.

-- 
Best regards,
Michał Górny





[gentoo-dev] [PATCH] Add 2021-06-30-libxcrypt-migration

2021-06-27 Thread Sam James
Please note that the 2021-07-07 migration date is preliminary.

Bug: https://bugs.gentoo.org/699422
Signed-off-by: Sam James 
---
 .../2021-06-30-libxcrypt-migration.en.txt | 46 +++
 1 file changed, 46 insertions(+)
 create mode 100644 
2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.en.txt

diff --git 
a/2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.en.txt 
b/2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.en.txt
new file mode 100644
index 000..2dd8b1c
--- /dev/null
+++ b/2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.en.txt
@@ -0,0 +1,46 @@
+Title: migrating from glibc[crypt] to libxcrypt in ~arch
+Author: Andreas K. Hüttel 
+Author: Sam James 
+Posted: 2021-06-30
+Revision: 1
+News-Item-Format: 2.0
+
+The implementation of libcrypt.so within glibc has been deprecated
+for a long time and will be removed in the near future.
+
+For this reason, we are following other distributions (where
+this has been tested for years already) and switching to the 
+external libxcrypt implementation, starting with ~arch 
+installations.
+
+This will be a regular update, and in nearly all cases you
+will not have to take any action and not observe any problems.
+
+We do recommend, however, that your system is *fully* up
+to date first. This is a standard recommendation but in this
+specific case, it is useful to have a simplified depgraph
+to ensure that Portage is able to smoothly calculate
+an upgrade path.
+
+That is, please take the opportunity to fully upgrade your
+systems now, before the migration occurs, to simplify matters.
+
+This change will occur on 2021-07-07 for ~arch users. Stable
+users will update at a later date.
+
+If for whatever reason you do *not* wish to switch now -
+which is only delaying the inevitable - you
+need to take the following steps:
+* unmask and enable the crypt USE flag of sys-libs/glibc
+* mask the system USE flag of sys-libs/libxcrypt
+* mask >=virtual/libcrypt-2
+
+If you wish to manually migrate now, there are a series
+of steps described on the wiki (see below), but the outline is:
+* unforce the crypt USE flag of sys-libs/glibc and disable it
+* unmask the system USE flag of sys-libs/libxcrypt and enable it
+* unmask >=virtual/libcrypt-2
+
+For more information, please see:
+* https://wiki.gentoo.org/wiki/Project:Toolchain/libcrypt_implementation
+* https://bugs.gentoo.org/699422
-- 
2.32.0