Re: [gentoo-dev] [PATCH] qmail.eclass: Patch make-makelib.sh only if it is present

2023-04-03 Thread Rolf Eike Beer
Am Montag, 3. April 2023, 13:37:35 CEST schrieb Petr Vaněk:
> Some packages use qmail_set_cc function but they don't contain
> make-makelib.sh script. However, recent addition of || die to the sed
> patching this file is newly triggering build failure. This commit
> addresses the problem by checking if the script is available.

Yes, please.


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Last rites: net-mail/vchkuser

2022-11-15 Thread Rolf Eike Beer
Am Montag, 14. November 2022, 22:53:43 CET schrieb Peter Stuge:
> John Helmert III wrote:
> > > Jonas Stein wrote:
> > > > # Dead upstream
> > > > # Removal after 2023-01-01.  Bug #881249.
> > > > net-mail/vchkuser
> > > 
> > > Was there an actual issue with the package that prompted you to do
> > > this - something that a package maintainer should have resolved?
> > > 
> > > I think it's a bad idea to remove a package if "Upstream Homepage and
> > > SRC_URI is gone" and "Gentoo is the last distro with this package"
> > > are the only reasons...
> > 
> > Do you use it? Is it still functional?
> 
> I don't use it, I use something else for the same task.

Are you actually using netqmail[spp] or even notqmail[spp]? I only check that 
it builds when doing anything to the ebuilds, so I would love to hear from 
somebody if it actually works.

Please either email me or find me as Dakon on Libera.Chat or OFTC.

Greetings,

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [PATCH 2/2] qmail.eclass: remove usage of egrep

2022-05-21 Thread Rolf Eike Beer
Am Samstag, 21. Mai 2022, 10:44:35 CEST schrieb Ulrich Mueller:
> >>>>> On Mon, 16 May 2022, Rolf Eike Beer wrote:
> > This does not use extended regular expressions in any way. While at it
> > change the way these matches are done: it's irrelevant if the entire
> > expression is in the file, if there is any rule for the given IP address
> > then do not add the new
> > expression.
> 
> Series LGTM. However, "git am" fails for the second patch because the
> line breaks in your message are messed up:
> 
>Applying: qmail.eclass: remove usage of egrep
>error: corrupt patch at line 17
>Patch failed at 0001 qmail.eclass: remove usage of egrep
> 
> (I believe the problem is not on my side, because I see the spurious
> line breaks also in archives:
> https://archives.gentoo.org/gentoo-dev/message/b34c3f96f9e4069516b1457e7b0b4
> 904#L32 )

This is likely a problem of the GPG signing.

You can get the patches directly from git here:

https://github.com/DerDakon/gentoo/tree/qmail-eclass


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 2/2] qmail.eclass: remove usage of egrep

2022-05-16 Thread Rolf Eike Beer
This does not use extended regular expressions in any way. While at it change
the way these matches are done: it's irrelevant if the entire expression is in
the file, if there is any rule for the given IP address then do not add the 
new
expression.

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 9b2c5a8c7fb..ed53bca56fa 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -409,7 +409,7 @@ qmail_config_fast() {
 }
 
 qmail_tcprules_config() {
-   local localips ip tcpstring line proto f
+   local localips ip tcpstring proto f
 
einfo "Accepting relaying by default from all ips configured on 
this machine."
 
@@ -425,10 +425,9 @@ qmail_tcprules_config() {
tcpstring=':allow,RELAYCLIENT="",RBLSMTPD=""'
 
for ip in ${localips}; do
-   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 -qs "^${ip}:" "${f}" || echo "${ip}$
{tcpstring}" >> "${f}"
done
done
 }
-- 
2.35.3



signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 1/2] qmail.eclass: drop obsolete install hooks

2022-05-16 Thread Rolf Eike Beer
The last user went away with mail-mta/qmail-ldap.

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 24 
 1 file changed, 24 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 471f2fe7ce5..9b2c5a8c7fb 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -169,9 +169,6 @@ qmail_base_install() {
doexe qmail-queue
 
)
-
-   declare -F qmail_base_install_hook >/dev/null && \
-   qmail_base_install_hook
 }
 
 qmail_config_install() {
@@ -182,9 +179,6 @@ qmail_config_install() {
einfo "Installing configuration sanity checker and launcher"
insinto "${QMAIL_HOME}"/bin
doins "${GENQMAIL_S}"/control/qmail-config-system
-
-   declare -F qmail_config_install_hook >/dev/null && \
-   qmail_config_install_hook
 }
 
 qmail_man_install() {
@@ -200,9 +194,6 @@ qmail_man_install() {
else
dodoc CHANGES.md FAQ.md SECURITY.md THOUGHTS.md UPGRADE.md
fi
-
-   declare -F qmail_man_install_hook >/dev/null && \
-   qmail_man_install_hook
 }
 
 qmail_sendmail_install() {
@@ -211,9 +202,6 @@ qmail_sendmail_install() {
 
dosym "${QMAIL_HOME}"/bin/sendmail /usr/sbin/sendmail
dosym "${QMAIL_HOME}"/bin/sendmail /usr/lib/sendmail
-
-   declare -F qmail_sendmail_install_hook >/dev/null && \
-   qmail_sendmail_install_hook
 }
 
 qmail_maildir_install() {
@@ -245,9 +233,6 @@ qmail_maildir_install() {
done
 
)
-
-   declare -F qmail_maildir_install_hook >/dev/null && \
-   qmail_maildir_install_hook
 }
 
 qmail_tcprules_install() {
@@ -280,9 +265,6 @@ qmail_supervise_install() {
qmail_supervise_install_one qmail-pop3d
use ssl && qmail_supervise_install_one qmail-pop3sd
fi
-
-   declare -F qmail_supervise_install_hook >/dev/null && \
-   qmail_supervise_install_hook
 }
 
 qmail_spp_install() {
@@ -295,9 +277,6 @@ qmail_spp_install() {
for i in authlog mfdnscheck ifauthnext tarpit; do
dospp "${GENQMAIL_S}"/spp/${i}
done
-
-   declare -F qmail_spp_install_hook >/dev/null && \
-   qmail_spp_install_hook
 }
 
 qmail_ssl_install() {
@@ -317,9 +296,6 @@ qmail_ssl_install() {
doexe "${GENQMAIL_S}"/ssl/qmail-genrsacert.sh
 
keepdir "${QMAIL_HOME}"/control/tlshosts
-
-   declare -F qmail_ssl_install_hook >/dev/null && \
-   qmail_ssl_install_hook
 }
 
 qmail_src_install() {
-- 
2.35.3



signature.asc
Description: This is a digitally signed message part.


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

2022-05-15 Thread Rolf Eike Beer
Am Sonntag, 15. Mai 2022, 03:08:41 CEST schrieb 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
>  }

NACK, but for the simple reason that this doesn't need the extended syntax 
at all. Just drop it and use plain grep here.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Re: You currently cannot smoothly upgrade a 4 months old Gentoo system

2021-11-04 Thread Rolf Eike Beer
Philip Webb wrote:

> Portage error msgs are difficult to read & often simply unhelpful.

With difficult to read you mean something like "someone decided that it's a 
good idea to print the blocked packages atoms in dark blue on black and other 
stuff in yellow so it would be equally unreadable on white background", right?

Just going to hide again,

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [RFC] Moving more architectures to ~arch only

2021-11-04 Thread Rolf Eike Beer
> My machines should actually do some useful stuff, like running my Nagios and
> a bunch of nightly builds (CMake, libarchive, things like that). For that,
> I'd like to have the actual system to work. Given the amount of breakage I
> find when doing stabilizations I suspect this is not going to happen.

Just to make that slightly more clear: the keywordings and stabilizations 
happen in their own chroots. But the main install of the system is what I like 
to have really working.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [RFC] Moving more architectures to ~arch only

2021-10-20 Thread Rolf Eike Beer
Am Montag, 18. Oktober 2021, 03:08:52 CEST schrieb John Helmert III:
> On Mon, Oct 18, 2021 at 02:25:47AM +0200, Thomas Deutschmann wrote:
> > On 2021-10-14 15:40, Marek Szuba wrote:
> > > WDYT?
> > 
> > Could you please elaborate what you are expecting from this change?
> > 
> > I.e. will this solve any problem (please name it)? Will it allow us to
> > move forward where we are blocked at the moment (please name it)?
> 
> A security bug, for example, is currently blocked for almost a month
> waiting for hppa stabilization [1], and this isn't the first time
> we've had to wait for a "slower" arch on a security bug.

I had a system outage of my machine that I run the stabilizations on a few 
weeks back, and then the bug actually slipped through. Which is no excuse, 
but…

-get access to hake (the hppa dev machine) and help doing it. This could fail 
if the machine is trying to build a stage or so, which takes multiple days…

-if you feel that something is missing come over to #gentoo-hppa and ping us 
about that

I'm running libgcrypt tests right now, should hopefully be done until 
tomorrow.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [RFC] Moving more architectures to ~arch only

2021-10-15 Thread Rolf Eike Beer
Am Donnerstag, 14. Oktober 2021, 15:40:02 CEST schrieb Marek Szuba:
> Dear everyone,
> 
> Following some private discussions, I feel quite strongly now that it
> would both considerably improve certain processes and make our use of
> limited manpower more efficient were we to further reduce the number of
> stable arches in Gentoo Linux. Specifically, I propose to drop
>   - hppa,
>   - sparc,
> to ~arch-only status.
> 
> There are IMHO several good reasons for this:
>   - we have got very few people actually supporting these arches, and in
> case of hppa there is also the hardware bottleneck. Subsequently,
> stabilisation requests often take a long time to resolve
>   - last but by no means least, my personal experience from the last
> several years suggests that running ~arch is reasonably trouble-free
> these days
> 
> WDYT?

Reducing to what I have a personal opinion about.

For quite a while I have been more or less the arch testing team for hppa and 
sparc, the latter reduced since ago and sam meanwhile utilize even faster 
machines to do much of the the sparc work (yay!). Running these machines is a 
bumpy ride. Things break quite regularly, besides the arch-independent 
breakage like missing dependencies or similar things, which I also find quite 
regularly.

My machines should actually do some useful stuff, like running my Nagios and a 
bunch of nightly builds (CMake, libarchive, things like that). For that, I'd 
like to have the actual system to work. Given the amount of breakage I find 
when doing stabilizations I suspect this is not going to happen. My fear is 
that I'll be rebuilding stuff because there is an upgrade, and then back 
because there was an update, and in between I have to find out what actually 
went wrong. That's close to what I'm doing now, with the difference that the 
main system meanwhile can do it's work because it usually is unaffected, and I 
can decide to ignore the problem for one or another day until I'm bored enough 
to fight the breakage again.

So from my limited PoV this would likely even increase the work that I have to 
do, or the pressure to do it in time to fix the system up to a point where it 
works.

We have already removed many stable packages from hppa, just to reduce the 
amount of work. If sparc really becomes a problem I suspect that dropping most 
of the multimedia or whatever stuff there could also reduce the amount of work 
needed.

Another note: these machines are quite slow, especially the hppa ones, when 
compared with a modern PC with SSD and tons of RAM. I would really _really_ 
welcome it if people could just run tatt for stabilizations on amd64 in a 
regularly empty chroot. It finds tons of stuff with missing dependencies or 
useflags (USE=static is always good for trouble) that I would otherwise run 
into on the slow machines. If you fix only half of the things before it hits 
the minor arches, which is not limited to the above list, it will greatly 
reduce the pain for everyone with a vintage fetish.

So, do what I can't stop you from doing, but at least for me dropping hppa 
will likely not reduce any pain, and if sparc really is a problem than 
dropping some packages will likely do the same thing also. Oh, and maybe mark 
some for fonts and stuff ALLARCHES ;)

Eike (aka Dakon)

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Infra support for mail submission with implicit TLS on port 465

2021-08-17 Thread Rolf Eike Beer
Am Dienstag, 17. August 2021, 00:23:26 CEST schrieb Robin H. Johnson:
> On Sat, Aug 14, 2021 at 05:15:54PM +0200, Hanno Böck wrote:
> > FWIW I am Co-author of the paper that documented these attacks, so in
> > case you have any questions I guess I can answer them.
> 
> Yes, I have a question: are you going to claim DJB's $500 qmail security
> reward?

That would be lame, as DJB did not implement STARTTLS.


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 4/3 v2] qmail.eclass: remove needless keepdirs

2021-08-14 Thread Rolf Eike Beer
Adding an extra keep file in the intermediate /var/qmail is never necessary,
and the binary directory is filled by the installation anyway.

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 86a299ca60d..9abe0548194 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -134,8 +134,8 @@ qmail_base_install() {
(
einfo "Setting up basic directory hierarchy"
diropts -o root -g qmail
-   keepdir "${QMAIL_HOME}"/{,bin,control}
-   keepdir "${QMAIL_HOME}"/users
+   dodir "${QMAIL_HOME}"/bin
+   keepdir "${QMAIL_HOME}"/{control,users}
diropts -o alias -g qmail
keepdir "${QMAIL_HOME}"/alias
 
-- 
2.26.2



signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 2/3 v4] qmail.eclass: remove magic to query root group

2021-08-14 Thread Rolf Eike Beer
The default owner is root:root anyway, so just make sure other settings do not
leak outside from the places where it is actually used. Use more appropiate
install helpers at several places. This also fixes qmail_supervise_install_one()
when called from outside of qmail_src_install().

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 87 ++---
 1 file changed, 42 insertions(+), 45 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 6b04cbf7792..be31dccc101 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -72,9 +72,8 @@ is_prime() {
 }
 
 dospp() {
-   insinto "${QMAIL_HOME}"/plugins/
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
-   newins $1 ${2:-$(basename $1)}
+   exeinto "${QMAIL_HOME}"/plugins/
+   newexe ${1} ${2:-$(basename ${1})}
 }
 
 # @FUNCTION: dosupervise
@@ -86,17 +85,14 @@ dosupervise() {
local runfile=${2:-${service}} logfile=${3:-${service}-log}
[[ -z "${service}" ]] && die "no service given"
 
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
-   diropts -o root -g "${GROUP_ROOT}" -m 0755
-
dodir ${SUPERVISE_DIR}/${service}{,/log}
fperms +t ${SUPERVISE_DIR}/${service}{,/log}
 
-   insinto ${SUPERVISE_DIR}/${service}
-   newins ${runfile} run
+   exeinto ${SUPERVISE_DIR}/${service}
+   newexe ${runfile} run
 
-   insinto ${SUPERVISE_DIR}/${service}/log
-   newins ${logfile} run
+   exeinto ${SUPERVISE_DIR}/${service}/log
+   newexe ${logfile} run
 }
 
 # @FUNCTION: qmail_set_cc
@@ -149,41 +145,45 @@ qmail_spp_src_compile() {
 }
 
 qmail_base_install() {
+   # subshell to not leak the install options
+   (
einfo "Setting up basic directory hierarchy"
-   diropts -o root -g qmail -m 755
+   diropts -o root -g qmail
keepdir "${QMAIL_HOME}"/{,bin,control}
keepdir "${QMAIL_HOME}"/users
-   diropts -o alias -g qmail -m 755
+   diropts -o alias -g qmail
keepdir "${QMAIL_HOME}"/alias
 
einfo "Adding env.d entry for qmail"
doenvd "${GENQMAIL_S}"/conf/99qmail
 
einfo "Installing all qmail software"
-   insinto "${QMAIL_HOME}"/bin
+   exeinto "${QMAIL_HOME}"/bin
 
-   insopts -o root -g qmail -m 755
-   doins bouncesaying condredirect config-fast datemail except forward 
maildir2mbox \
+   exeopts -o root -g qmail
+   doexe bouncesaying condredirect config-fast datemail except forward 
maildir2mbox \
maildirmake mailsubj predate preline qbiff \

qmail-{inject,qmqpc,qmqpd,qmtpd,qread,qstat,smtpd,tcpok,tcpto,showctl} \
qreceipt sendmail tcp-env
 
# obsolete tools, install if they are still present
for i in elq maildirwatch pinq qail qsmhook; do
-   [[ -x ${i} ]] && doins ${i}
+   [[ -x ${i} ]] && doexe ${i}
done
 
-   use pop3 && doins qmail-pop3d
+   use pop3 && doexe qmail-pop3d
 
-   insopts -o root -g qmail -m 711
-   doins qmail-{clean,getpw,local,pw2u,remote,rspawn,send} splogger
-   use pop3 && doins qmail-popup
+   exeopts -o root -g qmail -m 711
+   doexe qmail-{clean,getpw,local,pw2u,remote,rspawn,send} splogger
+   use pop3 && doexe qmail-popup
 
-   insopts -o root -g qmail -m 700
-   doins qmail-{lspawn,newmrh,newu,start}
+   exeopts -o root -g qmail -m 700
+   doexe qmail-{lspawn,newmrh,newu,start}
 
-   insopts -o qmailq -g qmail -m 4711
-   doins qmail-queue
+   exeopts -o qmailq -g qmail -m 4711
+   doexe qmail-queue
+
+   )
 
declare -F qmail_base_install_hook >/dev/null && \
qmail_base_install_hook
@@ -192,12 +192,10 @@ qmail_base_install() {
 qmail_config_install() {
einfo "Installing stock configuration files"
insinto "${QMAIL_HOME}"/control
-   insopts -o root -g "${GROUP_ROOT}" -m 644
doins "${GENQMAIL_S}"/control/{conf-*,defaultdelivery}
 
einfo "Installing configuration sanity checker and launcher"
insinto "${QMAIL_HOME}"/bin
-   insopts -o root -g "${GROUP_ROOT}" -m 644
doins "${GENQMAIL_S}"/control/qmail-config-system
 
declare -F qmail_config_install_hook >/dev/null && \
@@ -224,7 +222,6 @@ qmail_man_install() {
 
 qmail_sendmail_install() {
einfo "Installing sendmail replacement"
-   diropts -m 755
dodir /usr/sbin /usr/lib
 
dosym "${QMAIL_HOME}"/bin/sendmail /usr/sbin/sendmail
@@ -235,12 +232,21 @@ qmail_sendmail_install() {
 }
 
 qmail_maildir_install() {
+   # subshell to not leak the i

Re: [gentoo-dev] [PATCH 2/3 v3] qmail.eclass: remove magic to query root group

2021-08-14 Thread Rolf Eike Beer
Am Samstag, 14. August 2021, 12:52:15 CEST schrieb Ulrich Mueller:
> >>>>> On Sat, 14 Aug 2021, Rolf Eike Beer wrote:
> > The default owner is root:root anyway, so just make sure other settings do
> > not leak outside from the places where it is actually used. This also
> > fixes qmail_supervise_install_one() when called from outside of
> > qmail_src_install().
> Looking at this patch again, I wonder about two points in general:
> 
> - diropts -m 0755 shouldn't be necessary. 0775 is dodir's default, and I
>   don't see any diropts with another -m option in the eclass.
> 
> - insinto ...; insopts -m 0755; doins ... presumably indicates that the
>   wrong tool is used, i.e. it should be exeinto ...; doexe ... instead.
>   doexe already defaults to file mode 0755.

You are absolutely right. I suspect the code simply predates those helpers, 
I'm going to clean this up. It will often not reduce the amount of calls as 
there are several things that get installed with different group and 
permissions.

Sadly the docs at 
https://devmanual.gentoo.org/function-reference/install-functions/ do not show 
the defaults, is there a better place to looks at?

Eike

signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 2/3 v3] qmail.eclass: remove magic to query root group

2021-08-14 Thread Rolf Eike Beer
The default owner is root:root anyway, so just make sure other settings do not
leak outside from the places where it is actually used. This also fixes
qmail_supervise_install_one() when called from outside of qmail_src_install().

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 32 ++--
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 6b04cbf7792..c4f0b98ab30 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -73,7 +73,7 @@ is_prime() {
 
 dospp() {
insinto "${QMAIL_HOME}"/plugins/
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
+   insopts -m 0755
newins $1 ${2:-$(basename $1)}
 }
 
@@ -86,8 +86,8 @@ dosupervise() {
local runfile=${2:-${service}} logfile=${3:-${service}-log}
[[ -z "${service}" ]] && die "no service given"
 
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
-   diropts -o root -g "${GROUP_ROOT}" -m 0755
+   insopts -m 0755
+   diropts -m 0755
 
dodir ${SUPERVISE_DIR}/${service}{,/log}
fperms +t ${SUPERVISE_DIR}/${service}{,/log}
@@ -185,6 +185,10 @@ qmail_base_install() {
insopts -o qmailq -g qmail -m 4711
doins qmail-queue
 
+   # reset to default
+   insopts -o root -g root -m 644
+   diropts -o root -g root -m 755
+
declare -F qmail_base_install_hook >/dev/null && \
qmail_base_install_hook
 }
@@ -192,12 +196,12 @@ qmail_base_install() {
 qmail_config_install() {
einfo "Installing stock configuration files"
insinto "${QMAIL_HOME}"/control
-   insopts -o root -g "${GROUP_ROOT}" -m 644
+   insopts -m 644
doins "${GENQMAIL_S}"/control/{conf-*,defaultdelivery}
 
einfo "Installing configuration sanity checker and launcher"
insinto "${QMAIL_HOME}"/bin
-   insopts -o root -g "${GROUP_ROOT}" -m 644
+   insopts -m 644
doins "${GENQMAIL_S}"/control/qmail-config-system
 
declare -F qmail_config_install_hook >/dev/null && \
@@ -254,9 +258,9 @@ qmail_maildir_install() {
done
 
einfo "Setting up default maildirs in the account skeleton"
-   diropts -o root -g "${GROUP_ROOT}" -m 755
+   diropts -o root -g root -m 755
insinto /etc/skel
-   insopts -o root -g "${GROUP_ROOT}" -m 644
+   insopts -m 644
newins "${GENQMAIL_S}"/control/defaultdelivery .qmail.sample
"${MAILDIRMAKE}" "${D}"/etc/skel/.maildir
keepdir /etc/skel/.maildir/{cur,new,tmp}
@@ -268,7 +272,7 @@ qmail_maildir_install() {
 qmail_tcprules_install() {
dodir "${TCPRULES_DIR}"
insinto "${TCPRULES_DIR}"
-   insopts -o root -g "${GROUP_ROOT}" -m 0644
+   insopts -m 0644
doins "${GENQMAIL_S}"/tcprules/Makefile.qmail
doins "${GENQMAIL_S}"/tcprules/tcp.qmail-*
use ssl && use pop3 || rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd
@@ -276,8 +280,10 @@ qmail_tcprules_install() {
 
 qmail_supervise_install_one() {
dosupervise ${1}
-   diropts -o qmaill -g "${GROUP_ROOT}" -m 755
+   diropts -o qmaill -g root -m 755
keepdir /var/log/qmail/${1}
+   # reset to default
+   diropts -o root -g root
 }
 
 qmail_supervise_install() {
@@ -301,7 +307,7 @@ qmail_supervise_install() {
 qmail_spp_install() {
einfo "Installing qmail-spp configuration files"
insinto "${QMAIL_HOME}"/control/
-   insopts -o root -g "${GROUP_ROOT}" -m 0644
+   insopts -m 0644
doins "${GENQMAIL_S}"/spp/smtpplugins
 
einfo "Installing qmail-spp plugins"
@@ -321,16 +327,15 @@ qmail_ssl_install() {
 
einfo "Installing SSL Certificate creation script"
insinto "${QMAIL_HOME}"/control
-   insopts -o root -g "${GROUP_ROOT}" -m 0644
+   insopts -m 0644
doins "${GENQMAIL_S}"/ssl/servercert.cnf
 
insinto "${QMAIL_HOME}"/bin
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
+   insopts -m 0755
doins "${GENQMAIL_S}"/ssl/mkservercert
 
einfo "Installing RSA key generation cronjob"
insinto /etc/${CRON_FOLDER}
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
doins "${GENQMAIL_S}"/ssl/qmail-genrsacert.sh
 
keepdir "${QMAIL_HOME}"/control/tlshosts
@@ -340,7 +345,6 @@ qmail_ssl_install() {
 }
 
 qmail_src_install() {
-   export GROUP_ROOT="$(id -gn root)"
qmail_base_install
qmail_config_install
qmail_man_install
-- 
2.26.2



signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 5/3] qmail.eclass: retire qmail_tcprules_fixup()

2021-08-13 Thread Rolf Eike Beer
This has been in all ebuilds since the move of the portage tree to git, so
everyone should have already moved the files.

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass| 22 --
 mail-mta/netqmail/netqmail-1.06-r14.ebuild |  4 
 mail-mta/notqmail/notqmail-1.08-r3.ebuild  |  4 
 mail-mta/notqmail/notqmail-.ebuild |  4 
 4 files changed, 34 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index c25950cc303..7f4d1f77e42 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -374,28 +374,6 @@ qmail_rootmail_fixup() {
chown -R alias:qmail "${ROOT}${QMAIL_HOME}"/alias/.maildir 2>/dev/null
 }
 
-qmail_tcprules_fixup() {
-   mkdir -p "${TCPRULES_DIR}"
-   local POP_FILES=
-   use pop3 && POP_FILES="pop3 pop3.cdb"
-   for f in {smtp,qmtp,qmqp}{,.cdb} ${POP_FILES}; do
-   old="/etc/tcp.${f}"
-   new="${TCPRULES_DIR}/tcp.qmail-${f}"
-   fail=0
-   if [[ -f "${old}" && ! -f "${new}" ]]; then
-   einfo "Moving ${old} to ${new}"
-   cp "${old}" "${new}" || fail=1
-   else
-   fail=1
-   fi
-   if [[ "${fail}" = 1 && -f "${old}" ]]; then
-   eerror "Error moving ${old} to ${new}, be sure to check 
the"
-   eerror "configuration! You may have already moved the 
files,"
-   eerror "in which case you can delete ${old}"
-   fi
-   done
-}
-
 qmail_tcprules_build() {
for f in tcp.qmail-{smtp,qmtp,qmqp,pop3,pop3s}; do
# please note that we don't check if it exists
diff --git a/mail-mta/netqmail/netqmail-1.06-r14.ebuild 
b/mail-mta/netqmail/netqmail-1.06-r14.ebuild
index aef1ed5b4dd..e1f20404872 100644
--- a/mail-mta/netqmail/netqmail-1.06-r14.ebuild
+++ b/mail-mta/netqmail/netqmail-1.06-r14.ebuild
@@ -173,10 +173,6 @@ pkg_postinst() {
elog
 }
 
-pkg_preinst() {
-   qmail_tcprules_fixup
-}
-
 pkg_config() {
# avoid some weird locale problems
export LC_ALL=C
diff --git a/mail-mta/notqmail/notqmail-1.08-r3.ebuild 
b/mail-mta/notqmail/notqmail-1.08-r3.ebuild
index 382f241e719..6afc55ac3bd 100644
--- a/mail-mta/notqmail/notqmail-1.08-r3.ebuild
+++ b/mail-mta/notqmail/notqmail-1.08-r3.ebuild
@@ -173,10 +173,6 @@ pkg_postinst() {
elog
 }
 
-pkg_preinst() {
-   qmail_tcprules_fixup
-}
-
 pkg_config() {
# avoid some weird locale problems
export LC_ALL=C
diff --git a/mail-mta/notqmail/notqmail-.ebuild 
b/mail-mta/notqmail/notqmail-.ebuild
index 8673f74908f..224aaed0628 100644
--- a/mail-mta/notqmail/notqmail-.ebuild
+++ b/mail-mta/notqmail/notqmail-.ebuild
@@ -168,10 +168,6 @@ pkg_postinst() {
elog
 }
 
-pkg_preinst() {
-   qmail_tcprules_fixup
-}
-
 pkg_config() {
# avoid some weird locale problems
export LC_ALL=C
-- 
2.26.2



signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [PATCH 2/3] qmail.eclass: remove magic to query root group

2021-08-13 Thread Rolf Eike Beer
Am Freitag, 13. August 2021, 11:06:09 CEST schrieb Ulrich Mueller:
> >>>>> On Fri, 13 Aug 2021, Rolf Eike Beer wrote:
> > Am Donnerstag, 12. August 2021, 19:39:08 CEST schrieb Michael Orlitzky:
> >> On Thu, 2021-08-12 at 17:22 +0200, Rolf Eike Beer wrote:
> >> > The default owner is root:root anyway.
> >> 
> >> This is only true of you don't call insopts earlier with some other
> >> value. I see "insopts -o root -g qmail -m 700" in there so you might
> >> want to double check.
> > 
> > Not my day.
> > 
> > Ok, given that there are several places that change users and groups
> > and the subfunctions are not always called it would be very few places
> > where I can remove the root:root (about 3) and be sure that everything
> > works. For that reason I would just keep them all and go back to the
> > initial patch 2.
> 
> I believe the method of choice would be to execute the offending
> insopts/doins pair in a subshell, i.e. put a ( ) pair around them.

I will just do it the other way: explicitly reset it to defaults in the 2 
functions that actually set something special.


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 4/3] qmail.eclass: remove needless keepdirs

2021-08-13 Thread Rolf Eike Beer
Adding an extra keep file in the intermediate /var/qmail is never necessary,
and the binary directory is filled by the installation anyway.

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 4aeba918ed4..5fbfdd6af75 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -136,8 +136,8 @@ qmail_spp_src_compile() {
 qmail_base_install() {
einfo "Setting up basic directory hierarchy"
diropts -o root -g qmail -m 755
-   keepdir "${QMAIL_HOME}"/{,bin,control}
-   keepdir "${QMAIL_HOME}"/users
+   dodir "${QMAIL_HOME}"/{,bin}
+   keepdir "${QMAIL_HOME}"/{control,users}
diropts -o alias -g qmail -m 755
keepdir "${QMAIL_HOME}"/alias
 
-- 
2.26.2



signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [PATCH 2/3] qmail.eclass: remove magic to query root group

2021-08-13 Thread Rolf Eike Beer
Am Donnerstag, 12. August 2021, 19:39:08 CEST schrieb Michael Orlitzky:
> On Thu, 2021-08-12 at 17:22 +0200, Rolf Eike Beer wrote:
> > The default owner is root:root anyway.
> 
> This is only true of you don't call insopts earlier with some other
> value. I see "insopts -o root -g qmail -m 700" in there so you might
> want to double check.

Not my day.

Ok, given that there are several places that change users and groups and the 
subfunctions are not always called it would be very few places where I can 
remove the root:root (about 3) and be sure that everything works. For that 
reason I would just keep them all and go back to the initial patch 2.

Eike

signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 3/3] qmail.eclass: simplify is_prime()

2021-08-12 Thread Rolf Eike Beer
The previous algorithm would scan for all primes for a given number, which
takes needlessly long.

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass   | 51 +++---
 eclass/tests/qmail.sh | 52 +++
 2 files changed, 70 insertions(+), 33 deletions(-)
 create mode 100755 eclass/tests/qmail.sh

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 40130a502cb..9f644dd74c8 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -29,46 +29,31 @@ GENQMAIL_S="${WORKDIR}"/genqmail-${GENQMAIL_PV}
 QMAIL_SPP_F=qmail-spp-${QMAIL_SPP_PV}.tar.gz
 QMAIL_SPP_S="${WORKDIR}"/qmail-spp-${QMAIL_SPP_PV}
 
-# @FUNCTION: primes
-# @USAGE:  
+# @FUNCTION: is_prime
+# @USAGE: 
 # @DESCRIPTION:
-# Prints a list of primes between min and max inclusive
-# Note: this functions gets very slow when used with large numbers.
-primes() {
-   local min=${1} max=${2}
-   local result= primelist=2 i p
+# Checks wether a number is a valid prime number for queue split
+is_prime() {
+   local number=${1} i
+
+   if [[ ${number} -lt 7 ]]; then
+   # too small
+   return 1
+   fi
 
-   [[ ${min} -le 2 ]] && result="${result} 2"
+   if [[ $[number % 2] == 0 ]]; then
+   return 1
+   fi
 
-   for ((i = 3; i <= max; i += 2))
+   # let i run up to the square root of number
+   for ((i = 3; i * i <= number; i += 2))
do
-   for p in ${primelist}
-   do
-   [[ $[i % p] == 0 || $[p * p] -gt ${i} ]] && \
-   break
-   done
-   if [[ $[i % p] != 0 ]]
-   then
-   primelist="${primelist} ${i}"
-   [[ ${i} -ge ${min} ]] && \
-   result="${result} ${i}"
+   if [[ $[number % i ] == 0 ]]; then
+   return 1
fi
done
 
-   echo ${result}
-}
-
-# @FUNCTION: is_prima
-# @USAGE: 
-# @DESCRIPTION:
-# Checks wether a number is a prime number
-is_prime() {
-   local number=${1} i
-   for i in $(primes ${number} ${number})
-   do
-   [[ ${i} == ${number} ]] && return 0
-   done
-   return 1
+   return 0
 }
 
 dospp() {
diff --git a/eclass/tests/qmail.sh b/eclass/tests/qmail.sh
new file mode 100755
index 000..3520ed2a9d5
--- /dev/null
+++ b/eclass/tests/qmail.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+source tests-common.sh
+
+inherit qmail
+
+# some numbers are blocked because they are to small even if prime
+test_low_numbers() {
+   tbegin "low numbers"
+
+   for i in $(seq 0 6); do
+   if is_prime ${i}; then
+   return tend 1 "${i} badly accepted"
+   fi
+   done
+
+   tend 0
+}
+
+# test a given number for being prime
+check_prime_number() {
+   # use factor from coreutils to count the factors
+   if [[ $(factor $1 | cut -d: -f2 | wc -w) == 1 ]]; then
+   return $(is_prime $1)
+   else
+   return $(is_prime $1 && false || true)
+   fi
+}
+
+test_primes() {
+   tbegin "factorizations from ${1} to ${2}"
+
+   for i in $(seq ${1:?} ${2:?}); do
+   if ! check_prime_number $i; then
+   tend 1 "${i} returned bad factorization"
+   return 1
+   fi
+   done
+
+   tend 0
+}
+
+test_low_numbers
+test_primes 7 99
+for i in $(seq 100 100 1000); do
+   test_primes $i $((i + 99))
+done
+
+texit
-- 
2.26.2



signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [PATCH 3/5] qmail.eclass: simplify is_prime()

2021-08-12 Thread Rolf Eike Beer
Am Donnerstag, 12. August 2021, 13:25:09 CEST schrieb Ulrich Mueller:
> >>>>> On Thu, 12 Aug 2021, Rolf Eike Beer wrote:
> > -# @FUNCTION: primes
> > -# @USAGE:  
> > +# @FUNCTION: is_prime
> > +# @USAGE: 
> > 
> >  # @DESCRIPTION:
> > -# Prints a list of primes between min and max inclusive
> > -# Note: this functions gets very slow when used with large numbers.
> > -primes() {
> > -   local min=${1} max=${2}
> > -   local result= primelist=2 i p
> > +# Checks wether a number is a valid prime number for queue split
> > +is_prime() {
> > +   local number=${1} i
> > +
> > +   if [[ ${number} < 7 ]]; then
> > +   # too small
> > +   return 0
> > +   fi
> 
> So e.g. all numbers between 100 and 699 qualify as primes? I doubt that
> this is what was intended. :)

Nope.

> This function asks for a unit test in eclass/tests/.

Indeed, that would uncover that it had to be "return 1" above.

The eclass guide at https://devmanual.gentoo.org/eclass-writing/index.html 
doesn't mention these tests with any words, not even how to run them.

Eike

signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 2/3] qmail.eclass: remove magic to query root group

2021-08-12 Thread Rolf Eike Beer
The default owner is root:root anyway. This also fixes
qmail_supervise_install_one() when called from outside of qmail_src_install().

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 6b04cbf7792..40130a502cb 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -73,7 +73,7 @@ is_prime() {
 
 dospp() {
insinto "${QMAIL_HOME}"/plugins/
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
+   insopts -m 0755
newins $1 ${2:-$(basename $1)}
 }
 
@@ -86,8 +86,8 @@ dosupervise() {
local runfile=${2:-${service}} logfile=${3:-${service}-log}
[[ -z "${service}" ]] && die "no service given"
 
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
-   diropts -o root -g "${GROUP_ROOT}" -m 0755
+   insopts -m 0755
+   diropts -m 0755
 
dodir ${SUPERVISE_DIR}/${service}{,/log}
fperms +t ${SUPERVISE_DIR}/${service}{,/log}
@@ -192,12 +192,12 @@ qmail_base_install() {
 qmail_config_install() {
einfo "Installing stock configuration files"
insinto "${QMAIL_HOME}"/control
-   insopts -o root -g "${GROUP_ROOT}" -m 644
+   insopts -m 644
doins "${GENQMAIL_S}"/control/{conf-*,defaultdelivery}
 
einfo "Installing configuration sanity checker and launcher"
insinto "${QMAIL_HOME}"/bin
-   insopts -o root -g "${GROUP_ROOT}" -m 644
+   insopts -m 644
doins "${GENQMAIL_S}"/control/qmail-config-system
 
declare -F qmail_config_install_hook >/dev/null && \
@@ -254,9 +254,9 @@ qmail_maildir_install() {
done
 
einfo "Setting up default maildirs in the account skeleton"
-   diropts -o root -g "${GROUP_ROOT}" -m 755
+   diropts -m 755
insinto /etc/skel
-   insopts -o root -g "${GROUP_ROOT}" -m 644
+   insopts -m 644
newins "${GENQMAIL_S}"/control/defaultdelivery .qmail.sample
"${MAILDIRMAKE}" "${D}"/etc/skel/.maildir
keepdir /etc/skel/.maildir/{cur,new,tmp}
@@ -268,7 +268,7 @@ qmail_maildir_install() {
 qmail_tcprules_install() {
dodir "${TCPRULES_DIR}"
insinto "${TCPRULES_DIR}"
-   insopts -o root -g "${GROUP_ROOT}" -m 0644
+   insopts -m 0644
doins "${GENQMAIL_S}"/tcprules/Makefile.qmail
doins "${GENQMAIL_S}"/tcprules/tcp.qmail-*
use ssl && use pop3 || rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd
@@ -276,7 +276,7 @@ qmail_tcprules_install() {
 
 qmail_supervise_install_one() {
dosupervise ${1}
-   diropts -o qmaill -g "${GROUP_ROOT}" -m 755
+   diropts -o qmaill -g root -m 755
keepdir /var/log/qmail/${1}
 }
 
@@ -301,7 +301,7 @@ qmail_supervise_install() {
 qmail_spp_install() {
einfo "Installing qmail-spp configuration files"
insinto "${QMAIL_HOME}"/control/
-   insopts -o root -g "${GROUP_ROOT}" -m 0644
+   insopts -m 0644
doins "${GENQMAIL_S}"/spp/smtpplugins
 
einfo "Installing qmail-spp plugins"
@@ -321,16 +321,16 @@ qmail_ssl_install() {
 
einfo "Installing SSL Certificate creation script"
insinto "${QMAIL_HOME}"/control
-   insopts -o root -g "${GROUP_ROOT}" -m 0644
+   insopts -m 0644
doins "${GENQMAIL_S}"/ssl/servercert.cnf
 
insinto "${QMAIL_HOME}"/bin
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
+   insopts -m 0755
doins "${GENQMAIL_S}"/ssl/mkservercert
 
einfo "Installing RSA key generation cronjob"
insinto /etc/${CRON_FOLDER}
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
+   insopts -m 0755
doins "${GENQMAIL_S}"/ssl/qmail-genrsacert.sh
 
keepdir "${QMAIL_HOME}"/control/tlshosts
@@ -340,7 +340,6 @@ qmail_ssl_install() {
 }
 
 qmail_src_install() {
-   export GROUP_ROOT="$(id -gn root)"
qmail_base_install
qmail_config_install
qmail_man_install
-- 
2.26.2



signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [PATCH 2/3] qmail.eclass: hardcode root group

2021-08-12 Thread Rolf Eike Beer
Am Donnerstag, 12. August 2021, 13:13:23 CEST schrieb Ulrich Mueller:
> >>>>> On Thu, 12 Aug 2021, Rolf Eike Beer wrote:
> >  dospp() {
> >  
> > insinto "${QMAIL_HOME}"/plugins/
> > 
> > -   insopts -o root -g "${GROUP_ROOT}" -m 0755
> > +   insopts -o root -g root -m 0755
> 
> install defaults to root anyway, so why are explicit -o and -g needed
> here? (Same applies below, of course.)

I suspected that, but at the end I was just following bad examples:

 git grep 'insopts\s\+.*-[og]\s\+root'


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 3/5] qmail.eclass: simplify is_prime()

2021-08-12 Thread Rolf Eike Beer
The previous algorithm would scan for all primes for a given number, which
takes needlessly long.

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 51 -
 1 file changed, 18 insertions(+), 33 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 6ed026a1d9d..6ea27249c63 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -29,46 +29,31 @@ GENQMAIL_S="${WORKDIR}"/genqmail-${GENQMAIL_PV}
 QMAIL_SPP_F=qmail-spp-${QMAIL_SPP_PV}.tar.gz
 QMAIL_SPP_S="${WORKDIR}"/qmail-spp-${QMAIL_SPP_PV}
 
-# @FUNCTION: primes
-# @USAGE:  
+# @FUNCTION: is_prime
+# @USAGE: 
 # @DESCRIPTION:
-# Prints a list of primes between min and max inclusive
-# Note: this functions gets very slow when used with large numbers.
-primes() {
-   local min=${1} max=${2}
-   local result= primelist=2 i p
+# Checks wether a number is a valid prime number for queue split
+is_prime() {
+   local number=${1} i
+
+   if [[ ${number} < 7 ]]; then
+   # too small
+   return 0
+   fi
 
-   [[ ${min} -le 2 ]] && result="${result} 2"
+   if [[ $[number % 2] == 0 ]]; then
+   return 1
+   fi
 
-   for ((i = 3; i <= max; i += 2))
+   # let i run up to the square root of number
+   for ((i = 3; i * i <= number; i += 2))
do
-   for p in ${primelist}
-   do
-   [[ $[i % p] == 0 || $[p * p] -gt ${i} ]] && \
-   break
-   done
-   if [[ $[i % p] != 0 ]]
-   then
-   primelist="${primelist} ${i}"
-   [[ ${i} -ge ${min} ]] && \
-   result="${result} ${i}"
+   if [[ $[number % i ] == 0 ]]; then
+   return 1
fi
done
 
-   echo ${result}
-}
-
-# @FUNCTION: is_prima
-# @USAGE: 
-# @DESCRIPTION:
-# Checks wether a number is a prime number
-is_prime() {
-   local number=${1} i
-   for i in $(primes ${number} ${number})
-   do
-   [[ ${i} == ${number} ]] && return 0
-   done
-   return 1
+   return 0
 }
 
 dospp() {
-- 
2.26.2



signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 2/3] qmail.eclass: hardcode root group

2021-08-12 Thread Rolf Eike Beer
This also fixes qmail_supervise_install_one when called from outside of
qmail_src_install.

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 6b04cbf7792..6ed026a1d9d 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -73,7 +73,7 @@ is_prime() {
 
 dospp() {
insinto "${QMAIL_HOME}"/plugins/
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
+   insopts -o root -g root -m 0755
newins $1 ${2:-$(basename $1)}
 }
 
@@ -86,8 +86,8 @@ dosupervise() {
local runfile=${2:-${service}} logfile=${3:-${service}-log}
[[ -z "${service}" ]] && die "no service given"
 
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
-   diropts -o root -g "${GROUP_ROOT}" -m 0755
+   insopts -o root -g root -m 0755
+   diropts -o root -g root -m 0755
 
dodir ${SUPERVISE_DIR}/${service}{,/log}
fperms +t ${SUPERVISE_DIR}/${service}{,/log}
@@ -192,12 +192,12 @@ qmail_base_install() {
 qmail_config_install() {
einfo "Installing stock configuration files"
insinto "${QMAIL_HOME}"/control
-   insopts -o root -g "${GROUP_ROOT}" -m 644
+   insopts -o root -g root -m 644
doins "${GENQMAIL_S}"/control/{conf-*,defaultdelivery}
 
einfo "Installing configuration sanity checker and launcher"
insinto "${QMAIL_HOME}"/bin
-   insopts -o root -g "${GROUP_ROOT}" -m 644
+   insopts -o root -g root -m 644
doins "${GENQMAIL_S}"/control/qmail-config-system
 
declare -F qmail_config_install_hook >/dev/null && \
@@ -254,9 +254,9 @@ qmail_maildir_install() {
done
 
einfo "Setting up default maildirs in the account skeleton"
-   diropts -o root -g "${GROUP_ROOT}" -m 755
+   diropts -o root -g root -m 755
insinto /etc/skel
-   insopts -o root -g "${GROUP_ROOT}" -m 644
+   insopts -o root -g root -m 644
newins "${GENQMAIL_S}"/control/defaultdelivery .qmail.sample
"${MAILDIRMAKE}" "${D}"/etc/skel/.maildir
keepdir /etc/skel/.maildir/{cur,new,tmp}
@@ -268,7 +268,7 @@ qmail_maildir_install() {
 qmail_tcprules_install() {
dodir "${TCPRULES_DIR}"
insinto "${TCPRULES_DIR}"
-   insopts -o root -g "${GROUP_ROOT}" -m 0644
+   insopts -o root -g root -m 0644
doins "${GENQMAIL_S}"/tcprules/Makefile.qmail
doins "${GENQMAIL_S}"/tcprules/tcp.qmail-*
use ssl && use pop3 || rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd
@@ -276,7 +276,7 @@ qmail_tcprules_install() {
 
 qmail_supervise_install_one() {
dosupervise ${1}
-   diropts -o qmaill -g "${GROUP_ROOT}" -m 755
+   diropts -o qmaill -g root -m 755
keepdir /var/log/qmail/${1}
 }
 
@@ -301,7 +301,7 @@ qmail_supervise_install() {
 qmail_spp_install() {
einfo "Installing qmail-spp configuration files"
insinto "${QMAIL_HOME}"/control/
-   insopts -o root -g "${GROUP_ROOT}" -m 0644
+   insopts -o root -g root -m 0644
doins "${GENQMAIL_S}"/spp/smtpplugins
 
einfo "Installing qmail-spp plugins"
@@ -321,16 +321,16 @@ qmail_ssl_install() {
 
einfo "Installing SSL Certificate creation script"
insinto "${QMAIL_HOME}"/control
-   insopts -o root -g "${GROUP_ROOT}" -m 0644
+   insopts -o root -g root -m 0644
doins "${GENQMAIL_S}"/ssl/servercert.cnf
 
insinto "${QMAIL_HOME}"/bin
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
+   insopts -o root -g root -m 0755
doins "${GENQMAIL_S}"/ssl/mkservercert
 
einfo "Installing RSA key generation cronjob"
insinto /etc/${CRON_FOLDER}
-   insopts -o root -g "${GROUP_ROOT}" -m 0755
+   insopts -o root -g root -m 0755
doins "${GENQMAIL_S}"/ssl/qmail-genrsacert.sh
 
keepdir "${QMAIL_HOME}"/control/tlshosts
@@ -340,7 +340,6 @@ qmail_ssl_install() {
 }
 
 qmail_src_install() {
-   export GROUP_ROOT="$(id -gn root)"
qmail_base_install
qmail_config_install
qmail_man_install
-- 
2.26.2



signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH 1/3] qmail.eclass: support EAPI 8

2021-08-12 Thread Rolf Eike Beer
Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 76c612f026f..6b04cbf7792 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -4,11 +4,11 @@
 # @ECLASS: qmail.eclass
 # @MAINTAINER:
 # Rolf Eike Beer 
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: common qmail functions
 
 case ${EAPI:-0} in
-   [67]) ;;
+   [78]) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-- 
2.26.2



signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Declare the type of source

2021-06-28 Thread Rolf Eike Beer
Am Montag, 28. Juni 2021, 15:03:59 CEST schrieb Michał Górny:
> On Mon, 2021-06-28 at 15:00 +0200, Agostino Sarubbo wrote:
> > Hello all,
> > 
> > long story short:
> > 
> > when there is a major change (new gcc, new libc, and so on), tinderbox
> > takes a lot of time to test the entire tree.
> > 
> > Let's do a practical example:
> > A new version of sys-devel/gcc is added to the tree.
> > 
> > There is no way to know how much packages compiles C/C++ code, so the
> > easiest way is compile the entire tree.
> > 
> > Instead, imagine that each ebuild declares a variable called SOURCETYPE (
> > or similar, or in metadata.xml if you prefer ) and with a tool like
> > equery/eix we are able to get the list of all packages that compiles C
> > code.
> > 
> > The same thing applies to other languages like python, ruby, go and so on
> > where compile the dev-$language category covers a lot of packages, but
> > there will be always other ebuilds that uses $language in other
> > categories.
> > 
> > What do you think?
> 
> It's a worthwhile goal but it's practically impossible to get it right.
> For example, right now we've had quite a few cases of Python ebuilds
> wrongly declaring , i.e. people missing use of C
> besides Python.
> 
> That is, unless you can figure out a way for Portage to reliably detect
> SOURCETYPE and tell people what to set.

When I read this my initial idea was like that:

-if SOURCETYPE is not given it is assumed to be *, i.e. the package depends on 
any language when rebuilding much like it would be now
-if SOURCETYPE is given then tc-getcc and friends would start returning /bin/
false for every language compiler not enabled, or better just call die
-similarly CC, CXX and friends are exported to /bin/false, which should catch 
a lot of ebuilds that use the compilers without using tc-get* now

Sounds like EAPI=9 ;)

For now one could stuff this into an eclass to get the ebuilds right until 
portage actually makes use of the variable to simplify the build tree.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [PATCH] qmail.eclass: simplify is_prime()

2021-06-18 Thread Rolf Eike Beer
Am Freitag, 18. Juni 2021, 21:10:27 CEST schrieb Michael Orlitzky:
> > This depends on the actual domain of numbers. If the primes involved
> > have 20 digits as in your example, then factor should be used of course.
> > 
> > I suspect though that we're talking about small numbers (below 100?)
> > here, in which case a solution in pure bash would be preferable.
> 
> If so, we could just list them all.

The primes are usually small, the default is 23, and I have never seen anyone 
_lowering_ that number. The whole point is: the algorithm does much more than 
it should, which makes it needlessly verbose. The simpler the solution the 
better, preferably without restricting the actual number.

Eike


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH] qmail.eclass: simplify is_prime()

2021-06-17 Thread Rolf Eike Beer
The previous algorithm would scan for all primes for a given number, which
takes needlessly long.

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 45 -
 1 file changed, 12 insertions(+), 33 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index f42f0491515..aaec205a6bd 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -20,46 +20,25 @@ GENQMAIL_S="${WORKDIR}"/genqmail-${GENQMAIL_PV}
 QMAIL_SPP_F=qmail-spp-${QMAIL_SPP_PV}.tar.gz
 QMAIL_SPP_S="${WORKDIR}"/qmail-spp-${QMAIL_SPP_PV}
 
-# @FUNCTION: primes
-# @USAGE:  
-# @DESCRIPTION:
-# Prints a list of primes between min and max inclusive
-# Note: this functions gets very slow when used with large numbers.
-primes() {
-   local min=${1} max=${2}
-   local result= primelist=2 i p
-
-   [[ ${min} -le 2 ]] && result="${result} 2"
-
-   for ((i = 3; i <= max; i += 2))
-   do
-   for p in ${primelist}
-   do
-   [[ $[i % p] == 0 || $[p * p] -gt ${i} ]] && \
-   break
-   done
-   if [[ $[i % p] != 0 ]]
-   then
-   primelist="${primelist} ${i}"
-   [[ ${i} -ge ${min} ]] && \
-   result="${result} ${i}"
-   fi
-   done
-
-   echo ${result}
-}
-
-# @FUNCTION: is_prima
+# @FUNCTION: is_prime
 # @USAGE: 
 # @DESCRIPTION:
 # Checks wether a number is a prime number
 is_prime() {
local number=${1} i
-   for i in $(primes ${number} ${number})
+
+   if [[ $[number % 2] == 0 ]]; then
+   return 1
+   fi
+
+   for ((i = 3; i * i <= number; i += 2))
do
-   [[ ${i} == ${number} ]] && return 0
+   if [[ $[number % i ] == 0 ]]; then
+   return 1
+   fi
done
-   return 1
+
+   return 0
 }
 
 dospp() {
-- 
2.26.2



signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Packages up for grabs, round #2

2021-05-31 Thread Rolf Eike Beer
Am Montag, 31. Mai 2021, 22:49:56 CEST schrieb David Seifert:
> The following packages have been dropped to m-n, since their maintainers
> haven't touched them in over a year and show no signs of maintaining
> them:
> 
>   dev-libs/libowfat

I guess this need little attention anyway, but I can proxy-assist as I need it 
if noone else is bored enough to take it.

Eike

signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] qmail.eclass: clean up and make it work with upcoming notqmail changes

2020-06-20 Thread Rolf Eike Beer
The split in the install functions was needed for packages like miniqmail, that
only installed a subset of the functions. It has meanwhile been removed from
tree.

In turn notqmail is going to drop some obsolete programs from the installation.
Most documentation files also have been renamed to *.md.

Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 54 ++---
 1 file changed, 26 insertions(+), 28 deletions(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index a78c118c89e..21f317fd34a 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -117,8 +117,7 @@ qmail_spp_src_unpack() {
 
 # @FUNCTION: qmail_src_postunpack
 # @DESCRIPTION:
-# Unpack common config files, apply custom patches if supplied and
-# set built configuration (CFLAGS, LDFLAGS, etc)
+# Unpack common config files, and set built configuration (CFLAGS, LDFLAGS, 
etc)
 qmail_src_postunpack() {
cd "${S}"
 
@@ -144,33 +143,27 @@ qmail_base_install() {
einfo "Setting up basic directory hierarchy"
diropts -o root -g qmail -m 755
keepdir "${QMAIL_HOME}"/{,bin,control}
-
-   einfo "Installing basic qmail software"
-   insinto "${QMAIL_HOME}"/bin
-
-   insopts -o root -g qmail -m 755
-   doins datemail elq forward maildir2mbox maildirmake \
-   maildirwatch mailsubj pinq predate qail \
-   qmail-{inject,qmqpc,showctl} sendmail
-
-   einfo "Adding env.d entry for qmail"
-   doenvd "${GENQMAIL_S}"/conf/99qmail
-
-   declare -F qmail_base_install_hook >/dev/null && \
-   qmail_base_install_hook
-}
-
-qmail_full_install() {
-   einfo "Setting up full directory hierarchy"
keepdir "${QMAIL_HOME}"/users
diropts -o alias -g qmail -m 755
keepdir "${QMAIL_HOME}"/alias
 
+   einfo "Adding env.d entry for qmail"
+   doenvd "${GENQMAIL_S}"/conf/99qmail
+
einfo "Installing all qmail software"
+   insinto "${QMAIL_HOME}"/bin
+
insopts -o root -g qmail -m 755
-   doins bouncesaying condredirect config-fast except preline qbiff \
-   qmail-{qmqpd,qmtpd,qread,qstat,smtpd,tcpok,tcpto} \
-   qreceipt qsmhook tcp-env
+   doins bouncesaying condredirect config-fast datemail except forward 
maildir2mbox \
+   maildirmake mailsubj predate preline qbiff \
+   
qmail-{inject,qmqpc,qmqpd,qmtpd,qread,qstat,smtpd,tcpok,tcpto,showctl} \
+   qreceipt sendmail tcp-env
+
+   # obsolete tools, install if they are still present
+   for i in elq maildirwatch pinq qail qsmhook; do
+   [[ -x ${i} ]] && doins ${i}
+   done
+
use pop3 && doins qmail-pop3d
 
insopts -o root -g qmail -m 711
@@ -183,8 +176,8 @@ qmail_full_install() {
insopts -o qmailq -g qmail -m 4711
doins qmail-queue
 
-   declare -F qmail_full_install_hook >/dev/null && \
-   qmail_full_install_hook
+   declare -F qmail_base_install_hook >/dev/null && \
+   qmail_base_install_hook
 }
 
 qmail_config_install() {
@@ -207,8 +200,14 @@ qmail_man_install() {
 
into /usr
doman *.[1578]
-   dodoc BLURB* CHANGES FAQ INSTALL* PIC* README* REMOVE* SECURITY \
-   SENDMAIL* TEST* THANKS* THOUGHTS UPGRADE VERSION*
+   dodoc BLURB* INSTALL* PIC* README* REMOVE* \
+   SENDMAIL* TEST* THANKS* VERSION*
+   # notqmail converted the files to markdown
+   if [ -f CHANGES ]; then
+   dodoc CHANGES FAQ SECURITY THOUGHTS UPGRADE
+   else
+   dodoc CHANGES.md FAQ.md SECURITY.md THOUGHTS.md UPGRADE.md
+   fi
 
declare -F qmail_man_install_hook >/dev/null && \
qmail_man_install_hook
@@ -334,7 +333,6 @@ qmail_ssl_install() {
 qmail_src_install() {
export GROUP_ROOT="$(id -gn root)"
qmail_base_install
-   qmail_full_install
qmail_config_install
qmail_man_install
qmail_sendmail_install
-- 
2.26.2



signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [PATCH v3 6/9] glep-0072: Combine and amend description of states

2020-04-14 Thread Rolf Eike Beer
Am Montag, 13. April 2020, 20:49:45 CEST schrieb Andreas K. Hüttel:
> > > [Maybe someone who actually does slow-arch work should speak up. Anyone
> > > out
> > > there still reading g-dev?]
> > 
> > I'm lost.  The original definition said that this state is for arches
> > that use stable only on subset of packages needed for stage building.
> > Why would people file streqs for other packages then?
> 
> Shrug. I'm not going to fight here for anything.
> 
> Just my experience after some arches lost stable status was that these arch
> people still wanted to get CC'ed in stabilization requests. If only to keep
> track.

I would very much welcome if these arches would be CC'ed on anything that was 
previously stable for them, i.e. nattka '*'. I'm fighting the dependency tree 
on hppa and stable to get them back to stable with a managable set of 
packages. I had at least 2 packges over the weekend that lost their stable 
keywords in a "cleanup old versions" after a previous stable request where one 
of these arches was forgotten. Luckily this wasn't too late now, if this 
happens after a while it is a nightmare to fight that back.

And when we are at it, please don't forget these arches when doing ALLARCHES 
stabilization either. I hope that nattka will actually improve both 
situations.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [PATCH 1/1] python.eclass: add PYTHON_COMPAT_ALLOW_EXTRA_IMPLS

2020-03-26 Thread Rolf Eike Beer
> +[[ -n ${PYTHON_COMPAT_ALLOW_EXTRA_IMPLS[*]} ]] &&

Without string check:

[[ ${#PYTHON_COMPAT_ALLOW_EXTRA_IMPLS[@]} -gt 0 ]]

> + _PYTHON_ALL_IMPLS+=( ${PYTHON_COMPAT_ALLOW_EXTRA_IMPLS} )
>  readonly _PYTHON_ALL_IMPLS

Once array, always array:

_PYTHON_ALL_IMPLS+=( ${PYTHON_COMPAT_ALLOW_EXTRA_IMPLS[@]} )


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] rfc: noarch keyword

2020-03-18 Thread Rolf Eike Beer

Am 2020-03-18 16:10, schrieb Jaco Kroon:

Hi,

I'd be in support.  Especially for "data only" kind of packages, like:

net-misc/asterisk-moh-opsound
net-misc/asterisk-extra-sounds
net-misc/asterisk-core-sounds


My immediate target was aspell dictionaries and fonts.



Re: [gentoo-dev] rfc: noarch keyword

2020-03-18 Thread Rolf Eike Beer

Am 2020-03-18 15:54, schrieb William Hubbs:

All,

this came up again on the recent thread about dropping non x86/amd64
support for python packages, and I want to bring it up again on its own
thread.

How often do architecture specific bugs really exist in languages like
perl, python etc? From what I've seen they are pretty rare. Not to 
mention,

if we found one somewhere, we could adjust keywords as necessary.


I'm not judging this proposal, just a data point: packages that e.g. 
read from /proc, especially /proc/cpuinfo, get easily blow up on 
architecture changes. See https://bugs.gentoo.org/663424 for an example.


Eike



Re: [gentoo-dev] Last rites: net-mail/automx

2020-03-17 Thread Rolf Eike Beer
Am Dienstag, 17. März 2020, 18:50:33 CET schrieb Marc Schiffbauer:
> # Marc Schiffbauer  (2020-03-17)
> # No py3 support, replaced by its successor automx2
> # Removal in 30 days. Bug #708410
> net-mail/automx

I still think it's a bad idea to put automx2 in www-servers. This is no 
general web server, it's just a thing that uses HTTP transport. YMMV.

Eike


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Changes made by acct-* ebuilds

2020-02-14 Thread Rolf Eike Beer
> There's a significant difference between changing group membership for
> a system user versus a user account that is used interactively.
> 
> I don't think the handbook advises people to mess with system accounts.

>From my experience this is quite common for web-stuff and similar things, 
where you suddenly want to be daemon1 in the group of daemon2 so it can read 
it's files.

How about something like an EXTRA_GROUPS env var that one can set via profile? 
That could be set per package, acct-user templates could change that at merge 
time, or if USE=exact-groups is set even complain if the new and old group 
setting does not match. Or the other way round: always fail if the group 
membership of the given user is not exactly what the ebuild states + 
EXTRA_GROUPS, and let the user pass in USE=force-group for that ebuild to fix 
things up.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Vanilla sources

2020-01-04 Thread Rolf Eike Beer
Am Samstag, 4. Januar 2020, 19:41:05 CET schrieb William Hubbs:
> On Fri, Jan 03, 2020 at 09:55:31AM -0500, Michael Orlitzky wrote:
> > On 1/3/20 9:52 AM, Michael Orlitzky wrote:
> > > But here we are. Do we make OpenRC Linux-only and steal the fix from
> > > systemd? Or pretend to support other operating systems, but leave them
> > > insecure?
> > 
> > Or the gripping hand: rewrite opentmpfiles in C, so that it's only as
> > insecure as checkpath.
> 
> There is a pr open for opentmpfiles for this, and we are also discussing
> writing it in rust.

Bad idea. If you wonder why: eshowkw dev-lang/rust.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Keywordreqs and slacking arch teams

2020-01-04 Thread Rolf Eike Beer
Am Samstag, 4. Januar 2020, 12:25:07 CET schrieb Michael 'veremitz' Everitt:
> On 04/01/20 11:09, Rolf Eike Beer wrote:
> > Am Freitag, 3. Januar 2020, 11:00:14 CET schrieb Rolf Eike Beer:
> >> Am Freitag, 3. Januar 2020, 03:40:35 CET schrieb Aaron Bauman:
> >>> On January 2, 2020 6:35:08 PM EST, Rolf Eike Beer  
wrote:
> >>>> Am Freitag, 3. Januar 2020, 00:25:06 CET schrieb Mike Pagano:
> >>>>> hppa is making us keep old kernels around [1].  Should the kernel team
> >>>>> be
> >>>>> doing more to get your attention then CC'ing hppa on all of the kernel
> >>>>> STABLEREQ bugs [2]?
> >>>> 
> >>>> I only run vanilla-sources since there are still lot of cache
> >>>> corruption
> >>>> problems in hppa kernels, or whatever makes them flaky.
> >>>> 
> >>>> Linux pioneer 5.4.6-parisc64 #1 SMP Fri Dec 27 10:23:09 CET 2019
> >>>> parisc64
> >>>> PA8800 (Mako) 9000/785/C8000 GNU/Linux
> >>>> Linux voyager 5.4.6-parisc #1 Fri Dec 27 15:46:43 CET 2019 parisc
> >>>> PA8600
> >>>> (PCX-W+) 9000/785/C3600 GNU/Linux
> >>>> 
> >>>> So _I_ personally would say just drop old kernels, but that is in no
> >>>> way
> >>>> authorative.
> >>> 
> >>> Ugh. gentoo-sources is just a patch (trivial) on top of vanilla-kernel
> >>> sources of each stable and LTS version.
> >> 
> >> If it's just that I could test them, but this still be no LTS version
> >> that I would look at.
> > 
> > So, do you want me to stable a random gentoo-sources (usually the most
> > recent one) every few weeks when I just happen to upgrade my machine?

> I don't think that works very well with kernel/security-team stabilisation
> policies, sadly.
> 
> Is there any possibility you would be able to do a stabilisation run, and
> do a reboot cycle on one LTS branch (of choice, eg. most recent) and then
> revert to your preferred kernel afterwards?

This is annoying, because it usually collides with the nightly runs in some 
way. Doing the build on the C3600 took ~1d last time, the C8000 is faster, but 
I still have to time this right.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Keywordreqs and slacking arch teams

2020-01-04 Thread Rolf Eike Beer
Am Freitag, 3. Januar 2020, 11:00:14 CET schrieb Rolf Eike Beer:
> Am Freitag, 3. Januar 2020, 03:40:35 CET schrieb Aaron Bauman:
> > On January 2, 2020 6:35:08 PM EST, Rolf Eike Beer  wrote:
> > >Am Freitag, 3. Januar 2020, 00:25:06 CET schrieb Mike Pagano:
> > >> hppa is making us keep old kernels around [1].  Should the kernel team
> > >> be
> > >> doing more to get your attention then CC'ing hppa on all of the kernel
> > >> STABLEREQ bugs [2]?
> > >
> > >I only run vanilla-sources since there are still lot of cache
> > >corruption
> > >problems in hppa kernels, or whatever makes them flaky.
> > >
> > >Linux pioneer 5.4.6-parisc64 #1 SMP Fri Dec 27 10:23:09 CET 2019 parisc64
> > >PA8800 (Mako) 9000/785/C8000 GNU/Linux
> > >Linux voyager 5.4.6-parisc #1 Fri Dec 27 15:46:43 CET 2019 parisc PA8600
> > >(PCX-W+) 9000/785/C3600 GNU/Linux
> > >
> > >So _I_ personally would say just drop old kernels, but that is in no
> > >way
> > >authorative.
> > 
> > Ugh. gentoo-sources is just a patch (trivial) on top of vanilla-kernel
> > sources of each stable and LTS version.
> 
> If it's just that I could test them, but this still be no LTS version that I
> would look at.

So, do you want me to stable a random gentoo-sources (usually the most recent 
one) every few weeks when I just happen to upgrade my machine?

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Keywordreqs and slacking arch teams

2020-01-03 Thread Rolf Eike Beer
Am Freitag, 3. Januar 2020, 03:40:35 CET schrieb Aaron Bauman:
> On January 2, 2020 6:35:08 PM EST, Rolf Eike Beer  wrote:
> >Am Freitag, 3. Januar 2020, 00:25:06 CET schrieb Mike Pagano:

> >> hppa is making us keep old kernels around [1].  Should the kernel team be
> >> doing more to get your attention then CC'ing hppa on all of the kernel
> >> STABLEREQ bugs [2]?
> >
> >I only run vanilla-sources since there are still lot of cache
> >corruption
> >problems in hppa kernels, or whatever makes them flaky.
> >
> >Linux pioneer 5.4.6-parisc64 #1 SMP Fri Dec 27 10:23:09 CET 2019 parisc64
> >PA8800 (Mako) 9000/785/C8000 GNU/Linux
> >Linux voyager 5.4.6-parisc #1 Fri Dec 27 15:46:43 CET 2019 parisc PA8600
> >(PCX-W+) 9000/785/C3600 GNU/Linux
> >
> >So _I_ personally would say just drop old kernels, but that is in no
> >way
> >authorative.

> Ugh. gentoo-sources is just a patch (trivial) on top of vanilla-kernel
> sources of each stable and LTS version.

If it's just that I could test them, but this still be no LTS version that I 
would look at.

Just some background: these machines run CMake and some other software nightly 
builds, which starts ~3:00 and takes them until the afternoon. I have chroots 
for stabilization and keywording on them, and the tatt scripts will wait if 
any process of my buildbot user (that's just the name, not the software) is 
active. If the nightlies are done, then the tatt scripts will continue and hog 
the machine.

I will do a kernel upgrade usually if the machine crashed anyway, which means 
every few weeks, and then I go to the most recent version.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Keywordreqs and slacking arch teams

2020-01-02 Thread Rolf Eike Beer
Am Freitag, 3. Januar 2020, 00:25:06 CET schrieb Mike Pagano:
> On Thursday, January 2, 2020 3:32:12 PM EST Rolf Eike Beer wrote:
> > > - Allowed a simple "Add keyword(s)  for package " interface,
> > > 
> > >   that intelligently created an issue and a target list, and then once
> > >   the list was built, constantly ensured the list to be valid, or
> > >   determined automatically when sub-work was completed and reducing the
> > >   published list automatically, and then responded to potential issues
> > >   based on changes in git, ( as opposed to being only triggered when
> > >   the bug was touched )
> > 
> > As someone who does both keywordings and stabilizations regularly on hppa
> 
> > and sparc I think I must share a bit of my experiences:
> 
> 
> hppa is making us keep old kernels around [1].  Should the kernel team be
> doing more to get your attention then CC'ing hppa on all of the kernel
> STABLEREQ bugs [2]?

I only run vanilla-sources since there are still lot of cache corruption 
problems in hppa kernels, or whatever makes them flaky.

Linux pioneer 5.4.6-parisc64 #1 SMP Fri Dec 27 10:23:09 CET 2019 parisc64 
PA8800 (Mako) 9000/785/C8000 GNU/Linux
Linux voyager 5.4.6-parisc #1 Fri Dec 27 15:46:43 CET 2019 parisc PA8600 (PCX-
W+) 9000/785/C3600 GNU/Linux

So _I_ personally would say just drop old kernels, but that is in no way 
authorative.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Keywordreqs and slacking arch teams

2020-01-02 Thread Rolf Eike Beer
> - Allowed a simple "Add keyword(s)  for package " interface,
>   that intelligently created an issue and a target list, and then once
>   the list was built, constantly ensured the list to be valid, or
>   determined automatically when sub-work was completed and reducing the
>   published list automatically, and then responded to potential issues
>   based on changes in git, ( as opposed to being only triggered when
>   the bug was touched )

As someone who does both keywordings and stabilizations regularly on hppa and 
sparc I think I must share a bit of my experiences:

-some arches are regularly forgotten to be CC'ed, which happens for the above 
arches quite regularly as they are exp

-if I need to do a bug at a later point when I want to newly stabilize a given 
package for a new arch it is extremely helpful if

  - the package list was not reduced on a later point because parts were 
already handled

  - arch specifications for packages are reduced to the absolute need, i.e. 
especially not given if the arch list would match the initial CC list

I use tatt for my work, and that automatically sorts out all packages that 
have non-matching package list. Sure, there could be improvements for several 
things in tatt, but that is IMHO absolutely right the way it is. So if you 
give all arches and I later decide to do the same bug on an additional arch 
then it will not do a single package.

So if you want my work easier, then
-don't forget to CC exp arches
-don't clean the package list only because packages are already done
-let tatt run on your dev box, or preferably in a new chroot yourself, on your 
package, and fix all the broken dependencies and stuff there yourself. Your 
amd64 laptop is still way faster than my crowded C8000, and doing a roundtrip 
through the bugtracker until you find time to fix it will just make you think 
of "slacking arch teams" next time.

Thanks,

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Needs ideas: Upcoming circular dependency: expat <> CMake

2019-12-19 Thread Rolf Eike Beer

Am 2019-12-18 22:44, schrieb Francesco Riosa:
Il giorno mer 18 dic 2019 alle ore 22:03 Sebastian Pipping 


ha scritto:



CMake bundles a (previously outdated and vulnerable) copy of expat so
I'm not sure if re-activating that bundle — say with a new use flag
"system-expat" — would be a good thing to resort to for breaking the
cycle, with regard to security in particular.


Pushing gently upstream to upgrade bundled expat copy would (at least
temporarily) fix the issue and also benefit other use cases. Maybe they 
are

Gentoo friendly
they also release quite often, which would fix the problem soon


This is in CMake 3.16.0:

commit 50bc359184472700e9776a0a9d6f7e06ea82b9ce
Author: Brad King 
Date:   Mon Nov 11 10:44:17 2019 -0500

expat: Update CMake build for 2.2.9

commit b63a5c88a2089494e53f22f83db1925435161934
Merge: 512fabaa9d 1712885b4f
Author: Brad King 
Date:   Mon Nov 11 10:42:32 2019 -0500

Merge branch 'upstream-expat' into update-expat

* upstream-expat:
  expat 2019-09-25 (a7bc26b6)

These things _are_ updated regularly, but in case something is missed 
just file a bug at gitlab.kitware.com. All these bundled thing bumps are 
scripted as far as possible, so the actual overhead is quite small.


Eike



[gentoo-dev] gid 212 for cmd5checkpw

2019-11-10 Thread Rolf Eike Beer
Currently cmd5checkpw has a user of the same name at uid 212, but no group. 
The user owns the password database, and the binary is setuid to that user. I 
would like to change both to use a special group instead, so the user is not 
able to modify the files anymore. Since noone uses gid 212 I think it would be 
a good fit.

signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] qmail.eclass: hide qmail-pop3 behind a use flag

2019-10-27 Thread Rolf Eike Beer
Other solutions offer much more features and better security, so do not 
install this by default. Keep it for the moment for those who explicitely want 
it.

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index b6ef483aa82..5a30461704e 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -169,11 +169,13 @@ qmail_full_install() {
einfo "Installing all qmail software"
insopts -o root -g qmail -m 755
doins bouncesaying condredirect config-fast except preline qbiff \
-   qmail-{pop3d,qmqpd,qmtpd,qread,qstat,smtpd,tcpok,tcpto} \
+   qmail-{qmqpd,qmtpd,qread,qstat,smtpd,tcpok,tcpto} \
qreceipt qsmhook tcp-env
+   use pop3 && doins qmail-pop3d
 
insopts -o root -g qmail -m 711
-   doins qmail-{clean,getpw,local,popup,pw2u,remote,rspawn,send} splogger
+   doins qmail-{clean,getpw,local,pw2u,remote,rspawn,send} splogger
+   use pop3 && doins qmail-popup
 
insopts -o root -g qmail -m 700
doins qmail-{lspawn,newmrh,newu,start}
@@ -261,7 +263,13 @@ qmail_tcprules_install() {
insopts -o root -g "$GROUP_ROOT" -m 0644
doins "${GENQMAIL_S}"/tcprules/Makefile.qmail
doins "${GENQMAIL_S}"/tcprules/tcp.qmail-*
-   use ssl || rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd
+   use ssl && use pop3 || rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd
+}
+
+qmail_supervise_install_one() {
+   dosupervise ${i}
+   diropts -o qmaill -g "$GROUP_ROOT" -m 755
+   keepdir /var/log/qmail/${i}
 }
 
 qmail_supervise_install() {
@@ -269,16 +277,13 @@ qmail_supervise_install() {
 
cd "${GENQMAIL_S}"/supervise
 
-   for i in qmail-{send,smtpd,qmtpd,qmqpd,pop3d}; do
-   dosupervise ${i}
-   diropts -o qmaill -g "$GROUP_ROOT" -m 755
-   keepdir /var/log/qmail/${i}
+   for i in qmail-{send,smtpd,qmtpd,qmqpd}; do
+   qmail_supervise_install_one ${i}
done
 
-   if use ssl; then
-   dosupervise qmail-pop3sd
-   diropts -o qmaill -g "$GROUP_ROOT" -m 755
-   keepdir /var/log/qmail/qmail-pop3sd
+   if use pop3; then
+   qmail_supervise_install_one qmail-pop3d
+   use ssl && qmail_supervise_install_one qmail-pop3sd
fi
 
declare -F qmail_supervise_install_hook >/dev/null && \
@@ -375,7 +380,9 @@ qmail_rootmail_fixup() {
 
 qmail_tcprules_fixup() {
mkdir -p "${TCPRULES_DIR}"
-   for f in {smtp,qmtp,qmqp,pop3}{,.cdb}; do
+   local POP_FILES=
+   use pop3 && POP_FILES="pop3 pop3.cdb"
+   for f in {smtp,qmtp,qmqp}{,.cdb} ${POP_FILES}; do
old="/etc/tcp.${f}"
new="${TCPRULES_DIR}/tcp.qmail-${f}"
fail=0
@@ -417,13 +424,15 @@ qmail_supervise_config_notice() {
elog "ln -s ${SUPERVISE_DIR}/qmail-send /service/qmail-send"
elog "ln -s ${SUPERVISE_DIR}/qmail-smtpd /service/qmail-smtpd"
elog
-   elog "To start the pop3 server as well, create the following link:"
-   elog "ln -s ${SUPERVISE_DIR}/qmail-pop3d /service/qmail-pop3d"
-   elog
-   if use ssl; then
-   elog "To start the pop3s server as well, create the following 
link:"
-   elog "ln -s ${SUPERVISE_DIR}/qmail-pop3sd /service/qmail-pop3sd"
+   if use pop3; then
+   elog "To start the pop3 server as well, create the following 
link:"
+   elog "ln -s ${SUPERVISE_DIR}/qmail-pop3d /service/qmail-pop3d"
elog
+   if use ssl; then
+   elog "To start the pop3s server as well, create the 
following link:"
+   elog "ln -s ${SUPERVISE_DIR}/qmail-pop3sd 
/service/qmail-pop3sd"
+   elog
+   fi
fi
elog "Additionally, the QMTP and QMQP protocols are supported, "
elog "and can be started as:"


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] What is the source for https://dev.gentoo.org/~hollow/distfiles/genqmail-*

2019-10-10 Thread Rolf Eike Beer
> > > > Please pick this up and move it somewhere into Gentoo git
> > > > infrastructure. I can transfer ownership to the Github Gentoo
> > > > organization if you would like.
> > > > Afterwards I just need someone to push the button and create a new
> > > > snapshot from that (preferably together with a git tag).
> > > 
> > > Is there really a reason to do that? Since you're maintaining it, just
> > > keep
> > > it on your gh.
> > 
> > I just want to prevent that the same thing happens again.
> 
> I don't see a difference between a stale repo on your GitHub account
> and a stale repo on Gentoo Infra.  Except the former is easy to fork,
> and the latter we have in dozens, and nobody knows what to do with them.

Then let's at least move it into the Gentoo org on GitHub and give me push 
access like it is for tatt.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] What is the source for https://dev.gentoo.org/~hollow/distfiles/genqmail-*

2019-10-10 Thread Rolf Eike Beer
Am Donnerstag, 10. Oktober 2019, 12:15:09 CEST schrieb Michał Górny:
> Dnia October 10, 2019 9:39:38 AM UTC, Rolf Eike Beer  
napisał(a):
> >Am Samstag, 21. September 2019, 10:50:07 CEST schrieb Rolf Eike Beer:
> >> Hi,
> >> 
> >> I'm planning to do some cleanups to the qmail stuff. One thing s that the
> >> genqmail tarball is from 20080406 and needs to be patched itself, which
> >> makes things complicated. So, does anyone know what was the source of
> >> these tarballs? I can't look into the directory, maybe there are even
> >> older ones?
> >
> >> Otherwise I would propose to just start a new git repo for that and do a
> >> new snapshot with the patches already incorporated.
> >
> >So I guess noone knows. Can someone assist me in creating a new upstream? I
> >have created a new git repository with the original tarball and the 2 
> >existing patches, which can be found here: 
> >https://github.com/DerDakon/genqmail
> >
> >Please pick this up and move it somewhere into Gentoo git infrastructure. I
> >can transfer ownership to the Github Gentoo organization if you would like.
> >Afterwards I just need someone to push the button and create a new snapshot
> >from that (preferably together with a git tag).
> 
> Is there really a reason to do that? Since you're maintaining it, just keep
> it on your gh.

I just want to prevent that the same thing happens again.

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] What is the source for https://dev.gentoo.org/~hollow/distfiles/genqmail-*

2019-10-10 Thread Rolf Eike Beer
Am Samstag, 21. September 2019, 10:50:07 CEST schrieb Rolf Eike Beer:
> Hi,
> 
> I'm planning to do some cleanups to the qmail stuff. One thing is that the
> genqmail tarball is from 20080406 and needs to be patched itself, which
> makes things complicated. So, does anyone know what was the source of these
> tarballs? I can't look into the directory, maybe there are even older ones?
> Otherwise I would propose to just start a new git repo for that and do a
> new snapshot with the patches already incorporated.

So I guess noone knows. Can someone assist me in creating a new upstream? I 
have created a new git repository with the original tarball and the 2 existing 
patches, which can be found here: https://github.com/DerDakon/genqmail

Please pick this up and move it somewhere into Gentoo git infrastructure. I 
can transfer ownership to the Github Gentoo organization if you would like. 
Afterwards I just need someone to push the button and create a new snapshot 
from that (preferably together with a git tag).

If that is done I can switch over the netqmail ebuild to use the new tarball 
so we can start to phase out the old one.

Eike

P.S.: you can find me on Freenode as Dakon if that makes things go faster

signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] qmail.eclass: update documentation to install

2019-09-28 Thread Rolf Eike Beer
https://github.com/gentoo/gentoo/pull/13074

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Use acct-* for qmail users

2019-09-21 Thread Rolf Eike Beer
Am Mittwoch, 18. September 2019, 21:51:41 CEST schrieb Rolf Eike Beer:
> > Also, please do not add packages with no maintainer listed in
> > metadata.xml. You can list yourself + proxy-maint at least. If you
> > don't want to maintain them, you'll need to find someone else to do
> > it.
> 
> Done.

Ping?

signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] What is the source for https://dev.gentoo.org/~hollow/distfiles/genqmail-*

2019-09-21 Thread Rolf Eike Beer
Hi,

I'm planning to do some cleanups to the qmail stuff. One thing is that the 
genqmail tarball is from 20080406 and needs to be patched itself, which makes 
things complicated. So, does anyone know what was the source of these 
tarballs? I can't look into the directory, maybe there are even older ones? 
Otherwise I would propose to just start a new git repo for that and do a new 
snapshot with the patches already incorporated.

Greetings,

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Use acct-* for qmail users

2019-09-18 Thread Rolf Eike Beer
> Also, please do not add packages with no maintainer listed in
> metadata.xml. You can list yourself + proxy-maint at least. If you
> don't want to maintain them, you'll need to find someone else to do
> it.

Done.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Use acct-* for qmail users

2019-09-15 Thread Rolf Eike Beer
Am Sonntag, 15. September 2019, 17:29:11 CEST schrieb Mike Gilbert:
> On Sun, Sep 15, 2019 at 5:10 AM Rolf Eike Beer  wrote:
> > Am Donnerstag, 12. September 2019, 18:38:30 CEST schrieb Rolf Eike Beer:
> > > Am Mittwoch, 11. September 2019, 00:54:39 CEST schrieb Michael Orlitzky:
> > > > On 9/10/19 4:25 PM, Rolf Eike Beer wrote:
> > > > > I'm not entirely sure. It's what qmail always has done and what the
> > > > > eclass
> > > > > also did.
> > > > 
> > > > This is suggested by the qmail documentation,
> > > > 
> > > >   http://lifewithqmail.org/lwq.html#create-users
> > > > 
> > > > ...but goes back to at least 1998, and likely earlier. I grepped the
> > > > source and don't see any obvious uses of $HOME. It was probably
> > > > suggested by DJB simply because it's a directory, and guaranteed to
> > > > exist on the various platforms that qmail supported at the time.
> > > 
> > > I have tested it without a home directory on 2 of my machines and it
> > > seems
> > > like it works fine. I have removed the home directory from the patches.
> > 
> > Ping?
> 
> I still see ACCT_USER_HOME=/var/qmail/alias in acct-user/alias.

This is not /var/qmail as for the other ones, but indeed the mail distribution 
user of qmail. The home directory is actually needed as this user receives all 
mail that cannot be delivered otherwise and can be rerouted from that home 
directory.

> Also, please do not add packages with no maintainer listed in
> metadata.xml. You can list yourself + proxy-maint at least. If you
> don't want to maintain them, you'll need to find someone else to do
> it.

Hijacking qmail is a different story, I will care for that soon ;)

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Use acct-* for qmail users

2019-09-15 Thread Rolf Eike Beer
Am Donnerstag, 12. September 2019, 18:38:30 CEST schrieb Rolf Eike Beer:
> Am Mittwoch, 11. September 2019, 00:54:39 CEST schrieb Michael Orlitzky:
> > On 9/10/19 4:25 PM, Rolf Eike Beer wrote:
> > > I'm not entirely sure. It's what qmail always has done and what the
> > > eclass
> > > also did.
> > 
> > This is suggested by the qmail documentation,
> > 
> >   http://lifewithqmail.org/lwq.html#create-users
> > 
> > ...but goes back to at least 1998, and likely earlier. I grepped the
> > source and don't see any obvious uses of $HOME. It was probably
> > suggested by DJB simply because it's a directory, and guaranteed to
> > exist on the various platforms that qmail supported at the time.
> 
> I have tested it without a home directory on 2 of my machines and it seems
> like it works fine. I have removed the home directory from the patches.

Ping?

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Use acct-* for qmail users

2019-09-12 Thread Rolf Eike Beer
Am Mittwoch, 11. September 2019, 00:54:39 CEST schrieb Michael Orlitzky:
> On 9/10/19 4:25 PM, Rolf Eike Beer wrote:
> > I'm not entirely sure. It's what qmail always has done and what the eclass
> > also did.
> 
> This is suggested by the qmail documentation,
> 
>   http://lifewithqmail.org/lwq.html#create-users
> 
> ...but goes back to at least 1998, and likely earlier. I grepped the
> source and don't see any obvious uses of $HOME. It was probably
> suggested by DJB simply because it's a directory, and guaranteed to
> exist on the various platforms that qmail supported at the time.

I have tested it without a home directory on 2 of my machines and it seems 
like it works fine. I have removed the home directory from the patches.

Greetings,

Eike

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Need ARM/AArch64 test data for cpuid2cpuflags

2019-09-12 Thread Rolf Eike Beer

Am 2019-09-11 07:24, schrieb Michał Górny:

On Tue, 2019-09-10 at 22:44 +0200, Michał Górny wrote:

Hi, everyone.

I've recently (finally!) started adding tests to cpuid2cpuflags.  
Tests

are based on mocked syscalls that return arch-specific data read from
text files.  So far I've got x86 and ppc covered, and now I'd like to
add tests for various arm hardware.  Since ARM covers a pretty broad
range of hardware, I'd use as much data as possible, especially from
different ARM generations.

If you have an ARM board and would like to help, please:

wget https://dev.gentoo.org/~mgorny/dist/cpuid2cpuflags-7-dev.tar.bz2
tar -xf cpuid2cpuflags-7-dev.tar.bz2
cd cpuid2cpuflags-7-dev
./configure
make hwcap-dump
./hwcap-dump

and send me the output along with 'uname -m'.  TIA!



I'm sorry but sending it this late, I forgot two more important things:

1. Name of the CPU or the board (i.e. something I can use to name
the test).

2. Output of cpuid2cpuflags, preferably verified against cpuinfo.


Wandboard:

# uname -m
armv7l
# hwcap-dump
hwcap:0008b8d6
hwcap2:
# ./cpuid2cpuflags
CPU_FLAGS_ARM: edsp neon thumb vfp vfpv3 vfp-d32 v4 v5 v6 v7 thumb2
# cat /proc/cpuinfo
processor   : 0
model name  : ARMv7 Processor rev 10 (v7l)
BogoMIPS: 7.54
Features: half thumb fastmult vfp edsp thumbee neon vfpv3 tls 
vfpd32

CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part: 0xc09
CPU revision: 10

Hardware: Freescale i.MX6 Quad/DualLite (Device Tree)
Revision: 
Serial  : 

Eike



Re: [gentoo-dev] Use acct-* for qmail users

2019-09-10 Thread Rolf Eike Beer
Am Dienstag, 10. September 2019, 21:14:51 CEST schrieb Mike Gilbert:
> On Tue, Sep 10, 2019 at 11:48 AM Rolf Eike Beer  wrote:
> > I have created a PR here that removes manual creation of users and groups
> > from qmail.eclass and uses acct-* for that. There are already fixed uids
> > and gids for these things, I just put them into ebuilds:
> > 
> > https://github.com/gentoo/gentoo/pull/12898
> 
> Do the users actually need home directories?
> 
> Please see Michael Orlitzky's proposed guidelines.
> 
> https://archives.gentoo.org/gentoo-dev/message/fc55ac57cd92d9c1e156d13c882b0
> 8cf

I'm not entirely sure. It's what qmail always has done and what the eclass 
also did.


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] Use acct-* for qmail users

2019-09-10 Thread Rolf Eike Beer
I have created a PR here that removes manual creation of users and groups from 
qmail.eclass and uses acct-* for that. There are already fixed uids and gids 
for these things, I just put them into ebuilds:

https://github.com/gentoo/gentoo/pull/12898

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] qmail.eclass: 2 bugfixes

2019-08-12 Thread Rolf Eike Beer
Am Montag, 12. August 2019, 23:10:56 CEST schrieb Michael Orlitzky:
> On 8/9/19 3:26 PM, Rolf Eike Beer wrote:
> > +   use ssl && epatch "${FILESDIR}"/qmail-smtputf8.patch
> 
> EAI doesn't require SSL as far as I know. Is this conditional on the USE
> flag only because the patch won't apply otherwise? (If so, it may be
> worth a comment to that effect.)

Yes, it's a problem with the patch, not EAI.

But nice that you tell me that I attached the wrong patch.

Eike>From ff7224e595e2c1b5e293a1fc7991e70f68b04669 Mon Sep 17 00:00:00 2001
From: Rolf Eike Beer 
Date: Wed, 7 Aug 2019 12:08:54 +0200
Subject: [PATCH] qmail.eclass: honor toolchain settings for ar and ranlib

Closes: https://bugs.gentoo.org/471436
Signed-off-by: Rolf Eike Beer 
---
 eclass/qmail.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 6ebbff442c..18f685e4db 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -102,6 +102,7 @@ qmail_set_cc() {
 
 	echo "${cc} ${CFLAGS} ${CPPFLAGS}"  > ./conf-cc || die 'Patching conf-cc failed.'
 	echo "${ld} ${LDFLAGS}" > ./conf-ld || die 'Patching conf-ld failed.'
+	sed -e "s#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i make-makelib.sh
 }
 
 # @FUNCTION: qmail_create_groups
-- 
2.16.4



signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] qmail.eclass: 2 bugfixes

2019-08-09 Thread Rolf Eike Beer
Also in GitHub as https://github.com/gentoo/gentoo/pull/12632 and https://
github.com/gentoo/gentoo/pull/12631.

I have not seen any qmail patch every modifying makelib, so the change is 
rather direct in contrast to the compiler settings in the same function.

To verify the man change look at the current install, it has dot-qmail.N once 
in man5 with the correct contents and once in man8, where one finds the 
template.

There is a third (net)qmail PR open if you like to look into qmail code: 
https://github.com/gentoo/gentoo/pull/12630

Greetings

Eike>From 3a3d81e0828d3362f868b09fc7ebbef9c7148701 Mon Sep 17 00:00:00 2001
From: Rolf Eike Beer 
Date: Wed, 7 Aug 2019 11:49:34 +0200
Subject: [PATCH] mail-mta/netqmail: fix build without ssl

Closes: https://bugs.gentoo.org/649854
Signed-off-by: Rolf Eike Beer 
---
 mail-mta/netqmail/netqmail-1.06-r4.ebuild | 14 --
 mail-mta/netqmail/netqmail-1.06-r5.ebuild | 16 +---
 mail-mta/netqmail/netqmail-1.06-r6.ebuild | 16 +---
 3 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/mail-mta/netqmail/netqmail-1.06-r4.ebuild b/mail-mta/netqmail/netqmail-1.06-r4.ebuild
index 1f750f0f17..aa64d3d57d 100644
--- a/mail-mta/netqmail/netqmail-1.06-r4.ebuild
+++ b/mail-mta/netqmail/netqmail-1.06-r4.ebuild
@@ -101,12 +101,14 @@ src_prepare() {
 	ht_fix_file Makefile*
 
 	if ! use vanilla; then
-		# This patch contains relative paths and needs to be cleaned up.
-		sed 's~^--- ../../~--- ~g' \
-			<"${DISTDIR}"/${QMAIL_TLS_F} \
-			>"${T}"/${QMAIL_TLS_F} || die
-		use ssl&& epatch "${T}"/${QMAIL_TLS_F}
-		use ssl&& epatch "${DISTDIR}"/${QMAIL_TLS_CVE}
+		if use ssl; then
+			# This patch contains relative paths and needs to be cleaned up.
+			sed 's~^--- ../../~--- ~g' \
+< "${DISTDIR}"/${QMAIL_TLS_F} \
+> "${T}"/${QMAIL_TLS_F} || die
+			epatch "${T}"/${QMAIL_TLS_F}
+			epatch "${DISTDIR}"/${QMAIL_TLS_CVE}
+		fi
 		use highvolume && epatch "${DISTDIR}"/${QMAIL_BIGTODO_F}
 
 		if use qmail-spp; then
diff --git a/mail-mta/netqmail/netqmail-1.06-r5.ebuild b/mail-mta/netqmail/netqmail-1.06-r5.ebuild
index 31387c2767..f6f4cfb3de 100644
--- a/mail-mta/netqmail/netqmail-1.06-r5.ebuild
+++ b/mail-mta/netqmail/netqmail-1.06-r5.ebuild
@@ -105,12 +105,14 @@ src_prepare() {
 	ht_fix_file Makefile*
 
 	if ! use vanilla; then
-		# This patch contains relative paths and needs to be cleaned up.
-		sed 's~^--- ../../~--- ~g' \
-			<"${DISTDIR}"/${QMAIL_TLS_F} \
-			>"${T}"/${QMAIL_TLS_F} || die
-		use ssl&& epatch "${T}"/${QMAIL_TLS_F}
-		use ssl&& epatch "${DISTDIR}"/${QMAIL_TLS_CVE}
+		if use ssl; then
+			# This patch contains relative paths and needs to be cleaned up.
+			sed 's~^--- ../../~--- ~g' \
+< "${DISTDIR}"/${QMAIL_TLS_F} \
+> "${T}"/${QMAIL_TLS_F} || die
+			epatch "${T}"/${QMAIL_TLS_F}
+			epatch "${DISTDIR}"/${QMAIL_TLS_CVE}
+		fi
 		use highvolume && epatch "${DISTDIR}"/${QMAIL_BIGTODO_F}
 
 		if use qmail-spp; then
@@ -127,7 +129,7 @@ src_prepare() {
 
 	cd "${WORKDIR}" || die
 	epatch "${FILESDIR}"/use-new-path-for-functions.sh.patch
-	epatch "${FILESDIR}"/qmail-smtputf8.patch
+	use ssl && epatch "${FILESDIR}"/qmail-smtputf8.patch
 	cd - || die
 
 	qmail_src_postunpack
diff --git a/mail-mta/netqmail/netqmail-1.06-r6.ebuild b/mail-mta/netqmail/netqmail-1.06-r6.ebuild
index ea0d2b7b10..f78baf94aa 100644
--- a/mail-mta/netqmail/netqmail-1.06-r6.ebuild
+++ b/mail-mta/netqmail/netqmail-1.06-r6.ebuild
@@ -105,12 +105,14 @@ src_prepare() {
 	ht_fix_file Makefile*
 
 	if ! use vanilla; then
-		# This patch contains relative paths and needs to be cleaned up.
-		sed 's~^--- ../../~--- ~g' \
-			<"${DISTDIR}"/${QMAIL_TLS_F} \
-			>"${T}"/${QMAIL_TLS_F} || die
-		use ssl&& epatch "${T}"/${QMAIL_TLS_F}
-		use ssl&& epatch "${DISTDIR}"/${QMAIL_TLS_CVE}
+		if use ssl; then
+			# This patch contains relative paths and needs to be cleaned up.
+			sed 's~^--- ../../~--- ~g' \
+< "${DISTDIR}"/${QMAIL_TLS_F} \
+> "${T}"/${QMAIL_TLS_F} || die
+			epatch "${T}"/${QMAIL_TLS_F}
+			epatch "${DISTDIR}"/${QMAIL_TLS_CVE}
+		fi
 		use highvolume && epatch "${DISTDIR}"/${QMAIL_BIGTODO_F}
 
 		if use qmail-spp; then
@@ -127,7 +129,7 @@ src_prepare() {
 
 	cd "${WORKDIR}" || die
 	epatch "${FILESDIR}"/use-new-path-for-functions.sh.patch
-	epatch "${FILESDIR}"/qmail-smtputf8.patch
+	use ssl && epatch "${FILESDIR}"/qmail-smtputf8.patch
 	cd - || die
 
 	qmail_src_postunpack
-- 
2.16.4

>From 05b14c5edb506a72c9626212fb0331