Re: [gentoo-dev] Should we join the which hunt?

2022-05-14 Thread orbea
On Fri, 13 May 2022 09:11:30 +0200
Ulrich Mueller  wrote:

> Recently Debian has started to transition away from the "which"
> command. [1]
> 
> which is a non-POSIX command which prints out the location of
> specified executables that are in your path. Unfortunately, there are
> several versions of the program around which are not compatible with
> each other. We package the GNU version as sys-apps/which, which is in
> the system set since 2004.
> 
> Already in 2007, vapier asked developers to avoid which in ebuilds.
> [2] The replacement in most circumstances is "type -p" which is a bash
> builtin command.
> 
> So, should we join the "which hunt", with the goal of removing
> sys-apps/which from the system set and from stage1? I think the first
> step would be to identify which packages use which, and add it as an
> explicit dependency. (Maybe the tinderbox could help there?) A bug for
> this [3] has already been filed by mgorny some time ago.
> 
> Unfortunately, the command pops up in unexpected places, e.g. it
> appears to be an (indirect) build-time dependency of systemd. [4]
> 
> Ulrich
> 
> [1] https://lwn.net/Articles/874049/
> [2]
> https://archives.gentoo.org/gentoo-dev/message/e04d4db72572dd5fec48e87c6b18c525
> [3] https://bugs.gentoo.org/646588 [4] https://bugs.gentoo.org/502084

To solve this exact issue I wrote a pure shell script to find
executable files in the user's $PATH. It should work with posix
compatible shell and about as fast as which(1).

https://notabug.org/orbea/exists/src/master/exists.sh

There are a lot of tests as well.

https://notabug.org/orbea/exists/src/master/test.sh



[gentoo-dev] Last rites: dev-python/django-taggit-serializer, dev-python/django-rq, dev-python/python-iptables

2022-05-14 Thread Sam James
# Sam James  (2022-05-15)
# Unmaintained, doesn't support Python 3.10+, no tests.
# Removal on 2022-06-15.
dev-python/django-taggit-serializer

# Sam James  (2022-05-15)
# Unmaintained, does not support Python 3.10+. Removal on 2022-06-15.
dev-python/django-rq

# Sam James  (2022-05-15)
# Masked for removal. No reverse dependencies, no releases in 2 years,
# does not support Python 3.10+. Removal on 2022-06-15.
dev-python/python-iptables



signature.asc
Description: Message signed with OpenPGP


[gentoo-dev] [PATCH v2 5/5] ruby-ng.eclass: fgrep -> grep -F

2022-05-14 Thread Sam James
Signed-off-by: Sam James 
---
 eclass/ruby-ng.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index 70cb5be74b87..f0d6c4f6f6c4 100644
--- a/eclass/ruby-ng.eclass
+++ b/eclass/ruby-ng.eclass
@@ -604,7 +604,7 @@ _each_ruby_check_install() {
# that's what changes between two implementations (otherwise you'd get 
false
# positives now that Ruby 1.9.2 installs with the same sitedir as 1.8)
${scancmd} -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" \
-   | fgrep -v "${libruby_soname}" \
+   | grep -F -v "${libruby_soname}" \
| grep -E -v "${RUBY_QA_ALLOWED_LIBS}" \
> "${T}"/ruby-ng-${_ruby_implementation}-mislink.log
 
-- 
2.35.1




[gentoo-dev] [PATCH v2 4/5] qmail.eclass: egrep -> grep -E

2022-05-14 Thread Sam James
Signed-off-by: Sam James 
---
 eclass/qmail.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 471f2fe7ce5e..707cc91adfd8 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -452,7 +452,7 @@ qmail_tcprules_config() {
line="${ip}${tcpstring}"
for proto in smtp qmtp qmqp; do
f="${EROOT}${TCPRULES_DIR}/tcp.qmail-${proto}"
-   egrep -qs "${line}" "${f}" || echo "${line}" >> "${f}"
+   grep -E -qs "${line}" "${f}" || echo "${line}" >> "${f}"
done
done
 }
-- 
2.35.1




[gentoo-dev] [PATCH v2 3/5] haskell-cabal.eclass: egrep -> grep -E

2022-05-14 Thread Sam James
Signed-off-by: Sam James 
---
 eclass/haskell-cabal.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index ae3229cc2676..64dcabb852b1 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: haskell-cabal.eclass
@@ -288,8 +288,8 @@ cabal-show-brokens() {
elog "ghc-pkg check: 'checking for other broken packages:'"
# pretty-printer
$(ghc-getghcpkg) check 2>&1 \
-   | egrep -v '^Warning: haddock-(html|interfaces): ' \
-   | egrep -v '^Warning: include-dirs: ' \
+   | grep -E -v '^Warning: haddock-(html|interfaces): ' \
+   | grep -E -v '^Warning: include-dirs: ' \
| head -n 20
 
cabal-die-if-nonempty 'broken' \
-- 
2.35.1




[gentoo-dev] [PATCH v2 2/5] epatch.eclass: egrep -> grep -E

2022-05-14 Thread Sam James
Signed-off-by: Sam James 
---
 eclass/epatch.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass
index 5d18befe55b9..6a9c460da0a3 100644
--- a/eclass/epatch.eclass
+++ b/eclass/epatch.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: epatch.eclass
@@ -285,13 +285,13 @@ epatch() {
# people could (accidently) patch files in the root filesystem.
# Or trigger other unpleasantries #237667.  So disallow -p0 on
# such patches.
-   local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk 
'$2 != "/dev/null" { print }')
+   local abs_paths=$(grep -E -n '^[-+]{3} /' "${PATCH_TARGET}" | 
awk '$2 != "/dev/null" { print }')
if [[ -n ${abs_paths} ]] ; then
count=1
printf "NOTE: skipping -p0 due to absolute paths in 
patch:\n%s\n" "${abs_paths}" >> "${STDERR_TARGET}"
fi
# Similar reason, but with relative paths.
-   local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' 
"${PATCH_TARGET}")
+   local rel_paths=$(grep -E -n '^[-+]{3} [^   ]*[.][.]/' 
"${PATCH_TARGET}")
if [[ -n ${rel_paths} ]] ; then
echo
eerror "Rejected Patch: ${patchname}!"
-- 
2.35.1




[gentoo-dev] [PATCH v2 1/5] autotools.eclass: egrep -> grep -E

2022-05-14 Thread Sam James
Signed-off-by: Sam James 
---
 eclass/autotools.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index b8eeb55fd8f2..d6c5b7f0ec0d 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -283,7 +283,7 @@ _at_uses_pkg() {
for macro ; do
args+=( -e "^[[:space:]]*${macro}\>" )
done
-   egrep -q "${args[@]}" configure.??
+   grep -E -q "${args[@]}" configure.??
fi
 }
 _at_uses_autoheader()  { _at_uses_pkg A{C,M}_CONFIG_HEADER{S,}; }
-- 
2.35.1




[gentoo-dev] [PATCH] linux-info.eclass: Documentation updates

2022-05-14 Thread Mike Pagano

Document functions which did not have any
documentation or was not formatted to gentoo
specifications

Signed-off-by: Mike Pagano 
---
 eclass/linux-info.eclass | 38 ++
 1 file changed, 34 insertions(+), 4 deletions(-)

diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index d2003874d..a61ba0153 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -169,9 +169,9 @@ set_arch_to_portage() {
 # Set the env ARCH to match what the package manager expects.
 set_arch_to_pkgmgr() { export ARCH=$(tc-arch); }
 
-# qeinfo "Message"

-# ---
-# qeinfo is a quiet einfo call when EBUILD_PHASE
+# @FUNCTION: qout
+# @DESCRIPTION:
+# qout   is a quiet call when EBUILD_PHASE
 # should not have visible output.
 qout() {
local outputmsg type
@@ -186,8 +186,22 @@ qout() {
[ -n "${outputmsg}" ] && ${type} "${outputmsg}"
 }
 
+# @FUNCTION: qeinfo

+# @DESCRIPTION:
+# qeinfo is a quiet einfo call when EBUILD_PHASE
+# should not have visible output.
 qeinfo() { qout einfo "${@}" ; }
+
+# @FUNCTION: qewarn
+# @DESCRIPTION:
+# qewarn is a quiet ewarn call when EBUILD_PHASE
+# should not have visible output.
 qewarn() { qout ewarn "${@}" ; }
+
+# @FUNCTION: qeerror
+# @DESCRIPTION:
+# qeerror is a quiet error call when EBUILD_PHASE
+# should not have visible output.
 qeerror() { qout eerror "${@}" ; }
 
 # File Functions

@@ -269,6 +283,11 @@ getfilevar_noexec() {
 # config is available at all.
 _LINUX_CONFIG_EXISTS_DONE=
 
+# @FUNCTION: linux_config_qa_check

+# @INTERNAL
+# @DESCRIPTION:
+# Helper funciton which returns an error before the function argument is run
+# if no config exists
 linux_config_qa_check() {
local f="$1"
if [ -z "${_LINUX_CONFIG_EXISTS_DONE}" ]; then
@@ -438,6 +457,9 @@ kernel_is() {
"${1:-${KV_MAJOR:-0}}.${2:-${KV_MINOR:-0}}.${3:-${KV_PATCH:-0}}"
 }
 
+# @FUNCTION: get_makefile_extract_function

+# @INTERNAL
+# @DESCRIPTION:
 # Check if the Makefile is valid for direct parsing.
 # Check status results:
 # - PASS, use 'getfilevar' to extract values
@@ -453,7 +475,10 @@ get_makefile_extract_function() {
echo "${mkfunc}"
 }
 
-# internal variable, so we know to only print the warning once

+# @ECLASS_VARIABLE: get_version_warning_done
+# @INTERNAL
+# @DESCRIPTION:
+# Internal variable to ensure we print a message only once
 get_version_warning_done=
 
 # @FUNCTION: get_version

@@ -870,6 +895,11 @@ check_extra_config() {
export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}"
 }
 
+# @FUNCTION: check_zlibinflate

+# @DESCRIPTION:
+# helper function to make sure a ZLIB_INFLATE configuration
+# has the requried symbols
+# See https://bugs.gentoo.org/27882
 check_zlibinflate() {
if ! use kernel_linux; then
die "${FUNCNAME}() called on non-Linux system, please fix the 
ebuild"
--
2.35.1




OpenPGP_signature
Description: OpenPGP digital signature


Re: [gentoo-dev] License of news items

2022-05-14 Thread Ulrich Mueller
> On Sun, 08 May 2022, Ulrich Mueller wrote:

 Alternatively, we could add a new header line with license
 information to the items themselves, but that would be more
 complicated with (IMHO) little gain.

>>> For better consistency, we could also add a 'License' tag to the
>>> news items.

>> Yeah, but see what I had said above.

>> However, if the consensus is that we should have such a line, see
>> attached patch for GLEP 42.

> Coming back to this old thread. There were no more replies, but I
> don't feel like merging this patch after such a long time, unless
> there would be more support for it.

> So, any further opinions?

No answer, therefore I am going to drop that patch.

Ulrich


signature.asc
Description: PGP signature


[gentoo-dev] [PATCH v3] 2022-05-14-apache-nginx-glep-81: add news

2022-05-14 Thread Conrad Kostecki
Signed-off-by: Conrad Kostecki 
---
 .../2022-05-14-apache-nginx-glep-81.en.txt| 60 +++
 1 file changed, 60 insertions(+)
 create mode 100644 
2022-05-14-apache-nginx-glep-81/2022-05-14-apache-nginx-glep-81.en.txt

diff --git 
a/2022-05-14-apache-nginx-glep-81/2022-05-14-apache-nginx-glep-81.en.txt 
b/2022-05-14-apache-nginx-glep-81/2022-05-14-apache-nginx-glep-81.en.txt
new file mode 100644
index 000..ae43b4b
--- /dev/null
+++ b/2022-05-14-apache-nginx-glep-81/2022-05-14-apache-nginx-glep-81.en.txt
@@ -0,0 +1,60 @@
+Title: Migration to GLEP-81 enabled webservers
+Author: Conrad Kostecki 
+Posted: 2022-05-14
+Revision: 1
+News-Item-Format: 2.0
+Display-If-Installed: www-servers/apache
+Display-If-Installed: www-servers/nginx
+
+In future, in order to complete the whole GLEP-81 migration,
+the packages www-servers/apache and www-servers/nginx
+will be migrated to GLEP-81.
+
+If changes have been made to the default created user and group
+by one of the both packages, the configuration needs to be updated,
+as otherwise it will be overwritten.
+
+The following configuration settings can be set
+in make.conf or per package in package.env:
+
+1. ACCT_USER__GROUPS
+   for overriding all default groups.
+
+2. ACCT_USER__GROUPS_ADD
+   for adding additional groups to default groups.
+
+3. ACCT_USER__HOME
+   for overriding default home directory.
+
+4. ACCT_USER__HOME_OWNER
+   for overriding default owner of home directory.
+
+5. ACCT_USER__HOME_PERMS
+   for overriding default permissions of home directory.
+
+6. ACCT_USER__SHELL
+   for overriding default assigned shell.
+
+See [1] for more details on those variables.
+
+** Package www-servers/apache will use username/group 'apache'.
+-> ACCT_USER_APACHE_GROUPS=".."
+-> ACCT_USER_APACHE_GROUPS_ADD=".."
+-> ACCT_USER_APACHE_HOME=".."
+-> ACCT_USER_APACHE_HOME_OWNER=".."
+-> ACCT_USER_APACHE_HOME_PERMS=".."
+-> ACCT_USER_APACHE_SHELL=".."
+
+** Package www-servers/nginx will use username/group 'nginx'.
+-> ACCT_USER_NGINX_GROUPS=".."
+-> ACCT_USER_NGINX_GROUPS_ADD=".."
+-> ACCT_USER_NGINX_HOME=".."
+-> ACCT_USER_NGINX_HOME_OWNER=".."
+-> ACCT_USER_NGINX_HOME_PERMS=".."
+-> ACCT_USER_NGINX_SHELL=".."
+
+Please update configuration parameters before emerging
+both GLEP-81 enabled ebuilds, as otherwise configuration
+will be overwritten to default.
+
+[1] https://devmanual.gentoo.org/eclass-reference/acct-user.eclass/index.html
-- 
2.35.1




Re: [gentoo-dev] [PATCH v2] 2022-05-14-apache-nginx-glep-81: add news

2022-05-14 Thread Conrad Kostecki

Hi!

Am 14.05.2022 um 12:04 schrieb Mickaël Bucas:

Le sam. 14 mai 2022 à 01:43, Conrad Kostecki  a écrit :
Could you add a paragraph telling that other configuration values can 
be kept ?

You could also point to the eclass documentation [1] for details. I'm
not sure it's the best solution because it's intended for Gentoo devs,
not users, but if someone runs a web server, he should be able to
handle that.


Good catch. Thank you. I will add them to the news item.

Conrad




Re: [gentoo-dev] [PATCH v2] 2022-05-14-apache-nginx-glep-81: add news

2022-05-14 Thread Mickaël Bucas
Le sam. 14 mai 2022 à 01:43, Conrad Kostecki  a écrit :
>
> Signed-off-by: Conrad Kostecki 
> ---
>  .../2022-05-14-apache-nginx-glep-81.en.txt| 36 +++
>  1 file changed, 36 insertions(+)
>  create mode 100644 
> 2022-05-14-apache-nginx-glep-81/2022-05-14-apache-nginx-glep-81.en.txt
>
> diff --git 
> a/2022-05-14-apache-nginx-glep-81/2022-05-14-apache-nginx-glep-81.en.txt 
> b/2022-05-14-apache-nginx-glep-81/2022-05-14-apache-nginx-glep-81.en.txt
> new file mode 100644
> index 000..34b2e63
> --- /dev/null
> +++ b/2022-05-14-apache-nginx-glep-81/2022-05-14-apache-nginx-glep-81.en.txt
> @@ -0,0 +1,36 @@
> +Title: Migration to GLEP-81 enabled webservers
> +Author: Conrad Kostecki 
> +Posted: 2022-05-14
> +Revision: 1
> +News-Item-Format: 2.0
> +Display-If-Installed: www-servers/apache
> +Display-If-Installed: www-servers/nginx
> +
> +In future, in order to complete the whole GLEP-81 migration,
> +the packages www-servers/apache and www-servers/nginx
> +will be migrated to GLEP-81.
> +
> +If changes have been made to the default created user and group
> +by one of the both packages, the configuration needs to be updated,
> +as otherwise it will be overwritten.
> +
> +The following configuration settings can be set
> +in make.conf or per package in package.env:
> +
> +1. ACCT_USER__GROUPS
> +   for overriding all default groups.
> +
> +2. ACCT_USER__GROUPS_ADD
> +   for adding additional groups to default groups.
> +
> +** Package www-servers/apache will use username/group 'apache'.
> +-> ACCT_USER_APACHE_GROUPS=".."
> +-> ACCT_USER_APACHE_GROUPS_ADD=".."
> +
> +** Package www-servers/nginx will use username/group 'nginx'.
> +-> ACCT_USER_NGINX_GROUPS=".."
> +-> ACCT_USER_NGINX_GROUPS_ADD=".."
> +
> +Please update configuration parameters before emerging
> +both GLEP-81 enabled ebuilds, as otherwise configuration
> +will be overwritten to default.
> --
> 2.35.1
>
>
Hello

As a user of apache, I've also customised the home directory and shell
(I accept the risks).
By reading "acct-user.eclass", I've seen that these customisations can
also be kept.

Could you add a paragraph telling that other configuration values can be kept ?
You could also point to the eclass documentation [1] for details. I'm
not sure it's the best solution because it's intended for Gentoo devs,
not users, but if someone runs a web server, he should be able to
handle that.

Thanks
Best regards

Mickaël Bucas

[1] 
https://devmanual.gentoo.org/eclass-reference/acct-user.eclass/index.html#lbAF