• Unittests writing to HOME (backintime)

    From c.buhtz@posteo.jp@21:1/5 to All on Wed Mar 29 10:00:02 2023
    Hello,

    I assume this topic is not specific to one package but to the whole
    python packaging universe.

    There is "backintime" which unittests do write to $HOME. I'm one of the
    new upstream maintainers and know that this isn't a good idea. It will
    take time to fix this.
    About that problem there is a debian bug report nearly 4 years old

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940319

    It tells that this is a problem because writing to HOME during build "is disabled on Debian auto-builders".

    My question now is why newer version of this package are uploaded then?
    I couldn't find that the tests where deactivated. Maybe this "disabled
    on Debian auto-builders" is outdated and today it is possible to write
    to HOME during build?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to c.buhtz@posteo.jp on Wed Mar 29 11:50:01 2023
    On Wed, Mar 29, 2023 at 07:52:35AM +0000, c.buhtz@posteo.jp wrote:
    I assume this topic is not specific to one package but to the whole python packaging universe.

    There is "backintime" which unittests do write to $HOME. I'm one of the new upstream maintainers and know that this isn't a good idea. It will take time to fix this.
    About that problem there is a debian bug report nearly 4 years old

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940319

    It tells that this is a problem because writing to HOME during build "is disabled on Debian auto-builders".

    My question now is why newer version of this package are uploaded then? I couldn't find that the tests where deactivated.
    As the software doesn't use a discoverabe build system the package needs
    to have all build steps explicitly in d/rules, and it just doesn't have
    the test step there.

    Maybe this "disabled on
    Debian auto-builders" is outdated and today it is possible to write to HOME during build?
    No.
    The usual solution is AFAIK to set a temporary $HOME inside d/rules though.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From c.buhtz@posteo.jp@21:1/5 to All on Wed Mar 29 12:10:01 2023
    Dear Andrey,

    thank you for the reply.

    Am 29.03.2023 11:40 schrieb Andrey Rakhmatullin:
    The usual solution is AFAIK to set a temporary $HOME inside d/rules
    though.

    I was looking into

    https://salsa.debian.org/jmw/pkg-backintime/-/blob/debian/debian/rules

    I don't see creation of a HOME or deactivation of a test.

    I assume I have to wait of an answer from the package maintainer.

    Thanks in advance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon McVittie@21:1/5 to c.buhtz@posteo.jp on Wed Mar 29 13:10:01 2023
    On Wed, 29 Mar 2023 at 07:52:35 +0000, c.buhtz@posteo.jp wrote:
    My question now is why newer version of this package are uploaded then? I couldn't find that the tests where deactivated. Maybe this "disabled on Debian auto-builders" is outdated and today it is possible to write to HOME during build?

    In compat level 13, debhelper will set $HOME to a temporary directory
    during the build (see #942111).

    The user's "official" home directory in the system user database
    (getent passwd $(id -u) | cut -d: -f6) is still set to a directory that
    does't exist (/nonexistent) on the official buildds.

    From an upstream point of view it's still bad for unit tests to do
    anything destructive in $HOME, because upstream developers who run the
    unit tests won't want their data destroyed, but it's harmless to do non-destructive things like writing to ~/.cache.

    smcv

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From buhtz@posteo.de@21:1/5 to All on Wed Mar 29 12:30:01 2023
    Dear Andrey,

    thank you for the reply.

    Am 29.03.2023 11:40 schrieb Andrey Rakhmatullin:
    The usual solution is AFAIK to set a temporary $HOME inside d/rules
    though.

    I was looking into

    https://salsa.debian.org/jmw/pkg-backintime/-/blob/debian/debian/rules

    I don't see creation of a HOME or deactivation of a test.

    I assume I have to wait of an answer from the package maintainer.

    Thanks in advance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to c.buhtz@posteo.jp on Wed Mar 29 15:10:01 2023
    On Wed, Mar 29, 2023 at 10:03:31AM +0000, c.buhtz@posteo.jp wrote:
    The usual solution is AFAIK to set a temporary $HOME inside d/rules
    though.

    I was looking into https://salsa.debian.org/jmw/pkg-backintime/-/blob/debian/debian/rules

    I don't see creation of a HOME or deactivation of a test.
    This means you've missed my explanation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)