• autopkgtest testing postinst

    From Marc Haber@21:1/5 to All on Thu Jul 14 10:00:01 2022
    Hi,

    for adduser (which is Priority: important and installed on nearly every
    Debian system alive), I would like to use ucf to manage adduser.conf in
    the future. I would not like to add ucf as a dependency though.

    I am therefore planning to use ucf in Recommends or Suggests and to
    scaffold the ucf calls in postinst, providing only very basic conffile
    handling in the case where ucf is not installed (leaving that decision
    to the local admin).

    But due to the criticality of the package, I need to test package
    installation in both cases, with and without ucf. This is especially
    important because the case "no ucf" might occur in automated settings
    like the installer, debootstrap, image and testbed building and breakage
    in those functions is likely to do horrible things to Debian's tooling.

    How would I do that in autopkgtest? Can I uninstall and reinstall the
    package in question while an autopkgtest is running?

    I would like to hear about your experiences. Pointers to packages that
    are already doing this would be greatly appreciated as well. Thank you
    very much.

    Greetings
    Marc

    -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lorenzo@21:1/5 to Marc Haber on Thu Jul 14 23:40:01 2022
    Hi,


    On Thu, 14 Jul 2022 09:52:51 +0200
    Marc Haber <mh+debian-mentors@zugschlus.de> wrote:

    Hi,

    [ ... ]

    But due to the criticality of the package, I need to test package installation in both cases, with and without ucf. [ ... ]

    How would I do that in autopkgtest? Can I uninstall and reinstall the
    package in question while an autopkgtest is running?

    Sure


    I would like to hear about your experiences. Pointers to packages that
    are already doing this would be greatly appreciated as well. Thank you
    very much.

    You can look at dh-runit, probably not the best example but it gives
    you the idea

    https://salsa.debian.org/debian/dh-runit/-/blob/master/debian/tests/helper-update-rc.d


    Greetings
    Marc


    Lorenzo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Wise@21:1/5 to Marc Haber on Fri Jul 15 02:40:01 2022
    On Thu, 2022-07-14 at 09:52 +0200, Marc Haber wrote:

    How would I do that in autopkgtest? Can I uninstall and reinstall the
    package in question while an autopkgtest is running?

    Sounds like you want the breaks-testbed and needs-root restrictions:

    https://salsa.debian.org/ci-team/autopkgtest/raw/master/doc/README.package-tests.rst

    --
    bye,
    pabs

    https://wiki.debian.org/PaulWise

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAmLQtdMACgkQMRa6Xp/6 aaMDHBAAnxOR0XduHjxn21vyy0Ms48gtqI/vsb8ccrMBMNDqSRkCCGFCKR8TmFXP cbjV64fHUBvDSJ7l1JIbfeQkcQnkFk0HkR+qjTpw9fZf40ir6c46Z2kwE8hpdS3n +uWc07s3gLCp8LsjmaoN8THyO5zxgVvDtW8bSXWDDebuzYrKKmeMW7jEEySRa0QT 19oAj4V6GPpNsOmYmofEazmFHXiA7CfF6xRDvgKqWB+n9Bt9dUunwE5TuHtW6jZH 3t2B1rB9CO20qJzG1aZX3T8Lg+xTerpZnYbWVeV4uth/RIcOSPR/qwlEwpqfRbY/ W7gkddqn6q28iFTL/SoLdTqP4+HwfRU1tqnRUWJKQ/h83bacaYlde9EoBjTCC0iO 2FcCaUgUx/ax3GB1lclx4/4wVdAuQmdh1pPFCHpJGFvYVuzk1vZjcNqlfvDo7a4Z 9AHEfoQFmLlyNW7GSdelQgIMlLkDiSzIjdUh1vkpUdOT+KiFR7DAHAvETVm78i+o rQ/WMSRgUgDKXTcqzOwsaUnzq6bFIUjt0uQWqJhzkO8KsQo011X/Psrk8c5p9AX8 FhRo3G5IHkTNchNDFbVRd0s94YxL90FibWR759OQiexjhvMjaco5sfHNPwi+5Q49 6625RUdgLgmSlLuxSPIg7Iv3gpsYy4BlyM9Klpz4C6XFxVEkZns=
    =Mg2p
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Lorenzo on Fri Jul 15 09:50:01 2022
    On Thu, Jul 14, 2022 at 11:33:50PM +0200, Lorenzo wrote:
    On Thu, 14 Jul 2022 09:52:51 +0200
    Marc Haber <mh+debian-mentors@zugschlus.de> wrote:
    I would like to hear about your experiences. Pointers to packages that
    are already doing this would be greatly appreciated as well. Thank you
    very much.

    You can look at dh-runit, probably not the best example but it gives
    you the idea

    https://salsa.debian.org/debian/dh-runit/-/blob/master/debian/tests/helper-update-rc.d

    So a testbed has apt configured in a way that apt-get install $PACKAGE
    will install _this_ version of the package? Or will it just pull the
    version from the archive?

    Greetings
    Marc

    -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Barry@21:1/5 to Marc Haber on Fri Jul 15 13:20:01 2022
    On Fri, 2022-07-15 at 09:41 +0200, Marc Haber wrote:
    On Thu, Jul 14, 2022 at 11:33:50PM +0200, Lorenzo wrote:
    On Thu, 14 Jul 2022 09:52:51 +0200
    Marc Haber <mh+debian-mentors@zugschlus.de> wrote:
    I would like to hear about your experiences. Pointers to packages
    that
    are already doing this would be greatly appreciated as well.
    Thank you
    very much.

    You can look at dh-runit, probably not the best example but it
    gives
    you the idea

    https://salsa.debian.org/debian/dh-runit/-/blob/master/debian/tests/helper-update-rc.d

    So a testbed has apt configured in a way that apt-get install
    $PACKAGE
    will install _this_ version of the package? Or will it just pull the
    version from the archive?

    The challenge I have encountered is getting the installed binary; it
    seems that it puts files under /tmp/autopkgtest.XXXXX, but cleans it up
    before the actual tests run? (I have added a test which searches for
    the package during the test run, to no avail.)

    We could always use dpkg-repack I suppose, but we would have to do so
    before any configuration was modified..

    Cheers,
    Matt

    -----BEGIN PGP SIGNATURE-----

    iQJKBAABCgA0FiEEnnn62mSvqqi3CaOCyHh1RhnOe48FAmLRTHIWHG1hdHRAaGF6 ZWxtb2xsdXNrLm9yZwAKCRDIeHVGGc57j/O9EACcviNk2SuVrfsnQF7sjHOC8ACu hfNhoS8iYHKvSNkuldX7yEdkbBU6nIBJkVCM59nb3d3ZQqZ1k4r+YXBpNRvo84TW WU4XYJ0BGhwTCGR55l/rjjRdtDAckU7ESY8lX3zvC1PVk45QgHy8pjgA0UiXzJoW aHtxgjb14N+YAU5Kz8uj6JpGA+2JuFkpUTpRTVaH+nsjHe5B43/ROL27o0/1W1Y/ NFkCfUv4SDmiWjXkqrA3+sggqIdlB4t5ykppryUUQg8DMmGqhym4WMnKHmFRWHPM bwID0k5k90etnMySeXMn6/vzqL78/LSFlLcULfhkXSdbhn5ZSFsOKUVtQz23Og6P wTw6Q1LjZ8LhQUtgpG7Gmkev4ISSyYsRwyW4Ny69a++BsY7o3AhPlNEOgedPjUyz 8oMxda+MsF8IYPL14QZQ1DsI2YNPRdKCmSzEpynEhSbeqX+6oEIM2LU9eJHjB6JO Wd1gUZXXgspsyIGIu7djNdCfFwLk5rj8WeAMOpFZFL9EfLZc5Zh1JeIPGksRBmXY yJ8aXBfBDKV8m7LQ/v+GOMjfZh8eDbbep3tnfQlWe8Vs53xZVXNBUlpyhLCsaDnl YEQM3yq/wCKd4KCWZVu7PTuzfbVmMJjzzNswOob+1BiE8+Jl01Exi77alwELEWxd Nzem9RLu1avSA2vaOw==
    =u4eo
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Barry@21:1/5 to Matt Barry on Fri Jul 15 15:30:01 2022
    On Fri, 2022-07-15 at 07:16 -0400, Matt Barry wrote:
    On Fri, 2022-07-15 at 09:41 +0200, Marc Haber wrote:
    On Thu, Jul 14, 2022 at 11:33:50PM +0200, Lorenzo wrote:
    On Thu, 14 Jul 2022 09:52:51 +0200
    Marc Haber <mh+debian-mentors@zugschlus.de> wrote:
    I would like to hear about your experiences. Pointers to
    packages
    that
    are already doing this would be greatly appreciated as well.
    Thank you
    very much.

    You can look at dh-runit, probably not the best example but it
    gives
    you the idea

    https://salsa.debian.org/debian/dh-runit/-/blob/master/debian/tests/helper-update-rc.d

    So a testbed has apt configured in a way that apt-get install
    $PACKAGE
    will install _this_ version of the package? Or will it just pull
    the
    version from the archive?

    The challenge I have encountered is getting the installed binary; it
    seems that it puts files under /tmp/autopkgtest.XXXXX, but cleans it
    up
    before the actual tests run?  (I have added a test which searches for
    the package during the test run, to no avail.)

    We could always use dpkg-repack I suppose, but we would have to do so
    before any configuration was modified..

    Actually, disregard this, I neglected to attempt the simple solution:

    autopkgtest adds it's own sources.list entry under /tmp, so afaict
    'apt-get --reinstall' will do exactly what it should.

    mb

    -----BEGIN PGP SIGNATURE-----

    iQJKBAABCgA0FiEEnnn62mSvqqi3CaOCyHh1RhnOe48FAmLRakgWHG1hdHRAaGF6 ZWxtb2xsdXNrLm9yZwAKCRDIeHVGGc57j880EACCJNP5ZT/Iln6beELoqOpfi9bl Hyh4p8RJMTurSoj1wfkObrqEJafoCsmfj27UXawZM/T4BkCZM2dsLqZdvYHDBIbR 23B8rgUIT3vrCbNOgQFIewR7BzcmmqdIeMkF6ZgqYVZ5Er5lYOwD4xwtDKcmkwMH +6v5xXZ/RQ4m43BD9pLcNxcX0ec+ABQLbqZCtzYtArOysxbCEV4CgL3fGcNRdbHN kd7sW/pC5SXnTC19W1X5tYUBdTE+WfvqS/fgggRKErVhpF6S9NmfY/ueOnSWkw/6 12OKa8TwraJ8vPjq3RzL4gbQerOOw3FcCyBF23nPI1ulLA1VRMC44b96LSRp9449 i2uGGR3GOiCNFC7TjW94GY3iGDM5uRdAR5vYohFVVj8LysihngMOEaQPab1RBNr0 jpH3RX+iZGJRiWW80zXNJ8cWalutEFSvk8KC+qps4WCD9uAM4U+DbRop3G9iu1QE DCjTZNqgPQDR2ER9sLEnZkAiRn1IsEngRQiVPR8PtYuMpNFfwbpz80cXpNvTKGFB KX3UkgD0/i4zkoBk0g6aNIy0nHfwaasbicEdlbHFkVaYuJSsE5iCF3B9YdcCk6da rt7aAbjyj0glJfK5G1Za65ssZxe9I3RV+todr0DWQOQWsg6N60GxRrPF7VB7TQx3 kUdul4ELfW0r9p/iOQ==
    =ZtE1
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Matt Barry on Thu Jul 21 10:40:01 2022
    On Fri, Jul 15, 2022 at 09:23:20AM -0400, Matt Barry wrote:
    autopkgtest adds it's own sources.list entry under /tmp, so afaict
    'apt-get --reinstall' will do exactly what it should.

    Thanks for finding that out. Is there also a documented way to install
    te packages from stable, testing, unstable to automatically test
    updates?

    Greetings
    Marc

    -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matt Barry@21:1/5 to Marc Haber on Thu Jul 21 13:00:01 2022
    On Thu, 2022-07-21 at 10:30 +0200, Marc Haber wrote:
    On Fri, Jul 15, 2022 at 09:23:20AM -0400, Matt Barry wrote:
    autopkgtest adds it's own sources.list entry under /tmp, so afaict
    'apt-get --reinstall' will do exactly what it should.

    Thanks for finding that out. Is there also a documented way to
    install
    te packages from stable, testing, unstable to automatically test
    updates?

    Not that I'm aware of, but - there is a fairly standard way of adding
    to sources.list.d, so that 'apt install adduser=stable' might be made
    to work; otoh it might be dependency hell (less so perhaps in this
    particular case).

    If you want to test unstable's tests against stable's version I'd maybe
    try:

    git checkout 3.121
    git checkout master -- debian/tests/
    autopkgtest -- <etc>

    But I might be misunderstanding what you want to do..

    Cheers,
    Matt

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Wise@21:1/5 to Marc Haber on Fri Jul 22 04:00:01 2022
    On Thu, 2022-07-21 at 10:30 +0200, Marc Haber wrote:

    Is there also a documented way to install the packages from stable,
    testing, unstable to automatically test updates?

    That sounds like what piuparts is for:

    https://packages.debian.org/unstable/piuparts
    https://piuparts.debian.org/

    --
    bye,
    pabs

    https://wiki.debian.org/PaulWise

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAmLaAuUACgkQMRa6Xp/6 aaNAtg/+JeSxrN/GoKN2Y1nrbqKpeQr/u3OqD1bGY05WjnZr7VtD8PXkzzw5Zv24 RAgdqMmDtv4wjfnAT1znIEfUe6hD1RduV6WlS1LBRcbUW6opqHPMlHh3rI4ElAsy 3apPYEH231oKHnsGM2w8PL0Zicue0yGVTtU/SrfKZlVMozMv7i+37Iloqy1ycl+7 Z/fogY1Ba4mkhk25Kp/5joF8Of6Y4Q2r0Xz37uliN8G15OPxHPUJTscO7HJ9vsKb 1BXyz60jyHwwGx9Lw66phi44XiAfOWfZz9F4SbqbiZyD5HixvY9LkFCpGYFqvDG9 5v3lSI1hp7Ztlsi8nCzbALxUdy+s89zclCdvwfxsJtqA1aPPnlE0bh74FKS3saIu aA1cWNwlKX4u4BiKseAP7gD6epf1TjP2Dax15fBJGw7UdBKImjt/B81MibaPmMNH KMs5sz3p6fpHM4NytkMjERIlMQ1i164h5zq/txwAlQUgngoW9LaFcM4fZSaUQsAm jLJkDWZPEx2sTv9JBIETsEPCOe8hHsD+rXMMap2uGJ2F6YoHlFGPNzWvLzni8Ghh yHRxABjRJVVW8YbjmHCaMGOqYIpUearVSKoGfjJyZg9u1G4XTROSrsitys6t0bLy uMjFBXOw+1sY0+r9u5VoSUaJ6dGy2sbymVoPaNrJp3eqLhe91Pw=
    =xpZ+
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Paul Wise on Fri Jul 22 09:10:02 2022
    On Fri, Jul 22, 2022 at 09:52:37AM +0800, Paul Wise wrote:
    On Thu, 2022-07-21 at 10:30 +0200, Marc Haber wrote:
    Is there also a documented way to install the packages from stable, testing, unstable to automatically test updates?

    That sounds like what piuparts is for:

    https://packages.debian.org/unstable/piuparts
    https://piuparts.debian.org/

    Then this maybe is the point where I need to take a closer look at
    piuparts. I hope it can be parametrized. What I want to do is probably something that our tools don't have built-in checks, I'd like to
    _remove_ debconf support from a package and make a formerly
    debconf/postinst controlled file a dpkg-conffile, and I of course need
    to test a number of combinations including changed conffile, deleted
    conffile etc foo.

    Greetings
    Marc

    -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421

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