Re: usrmerge problem on docker with upgrade

2022-10-31 Thread Hogren

On 2022-10-28 15:49, Tim Woodall wrote:

On Fri, 28 Oct 2022, Tim Woodall wrote:



Top post:
try installing usr-is-merged after changing sources.list before
anything else.

If that works and nobody else chimes in first I'll explain what is 
going

on.

(may or may not work, no time to check now)

Tim.




To followup here:

If the docker container already has merged usr (/bin is a symlink to
/usr/bin etc) then usr-is-merged should install - it has no
dependencies.

if usr-is-merged is installed then the upgrade of base-files will not 
(I

believe) pull in usrmerge and therefore you will not get the configure
error.

What I'm not sure about is whether the error you're seeing explicitly
means that usr is not merged (in which case usr-is-merged will fail to
install) or whether you get that error regardless. I don't have any
systems with usrmerge installed so I cannot quickly check the scripts 
to

see.

Tim.


I tried to modify the Dockerfile :
FROM debian:stable
RUN apt update
RUN apt upgrade -y
RUN echo 'deb http://deb.debian.org/debian testing main' > 
/etc/apt/sources.list

RUN apt update
RUN apt install usr-is-merged
RUN apt upgrade -y
RUN apt dist-upgrade -y

I see that :
#9 1.739 Preparing to unpack .../usr-is-merged_33_all.deb ...
#9 1.751
#9 1.751
#9 1.751 
**

#9 1.751 *
#9 1.751 * The usr-is-merged package cannot be installed because this 
system does

#9 1.751 * not have a merged /usr.
#9 1.751 *
#9 1.751 * Please install the usrmerge package to convert this system to 
merged-/usr.

#9 1.751 *
#9 1.751 * For more information please read 
https://wiki.debian.org/UsrMerge.

#9 1.751 *



On 2022-10-30 13:44, Michael Biebl wrote:

What you said about overlayfs is true and usrmerge is imho giving a
rather clear error message.

That said, I thought the best practice for docker containers is to
throw them away and rebuild them and that upgrading containers is
frowned upon?

If you build / pull a new bookworm docker container, it should be
setup as merged-usr from the start.

Michael


I understand but my specific problem needed to go through Bullseye then 
Bookworm.


Ultimately, I found another solution.

Thank you very much to all for many tips and explanation :)



hogren



Re: usrmerge problem on docker with upgrade

2022-10-27 Thread Hogren



Le 27 octobre 2022 20:03:57 GMT+02:00, "Andrew M.A. Cater" 
 a écrit :
>On Thu, Oct 27, 2022 at 09:05:54AM -0400, Greg Wooledge wrote:
>> On Thu, Oct 27, 2022 at 06:55:12AM -0600, Charles Curley wrote:
>> > On Thu, 27 Oct 2022 09:47:39 +0200
>> > Hogren  wrote:
>> > 
>> > > RUN echo 'deb http://deb.debian.org/debian testing main' > 
>> > > /etc/apt/sources.list
>> > 
>> > I haven't yet read the entire email, but this sticks out like a sore
>> > thumb. It is almost certainly not what you want. This completely
>> > obliterates your entire /etc/apt/sources.list, replacing it with a
>> > single line. For one thing, you lose any reference to the security repo.
>> 
>> To be fair, there *isn't* a security repository for testing.  Well,
>> technically there is one, but it hasn't been used in years.  It's empty.
>> There's nothing in it.
>>
>

Thanks for your infos. 
>There's another problem: if you pin to stable or testing, then you get an
>unpleasant shock when the next iteration of stable is released and there
>are suddenly hundreds of updates.
>
>The whole reason that codenames were brought into Debian was because someone
>released a version of Debian that was not yet ready as "Debian 1.0" on their
>CD set. Debian never released a 1.0 and instead went from 0.97 to 1.1.
>
>if you pin to a release name, then you don't have a flag day when everything
>changes.
>
>If you *really* want to pin to testing - with no security support - you
>can. The other option is to pin to bookworm which won't change when it
>becomes stable/oldstable or whatever. Otherwise, when bookworm gets 
>released, testing magically becomes trixie.
>
>Hope this helps, as ever,
>
>Andy Cater 
>
Yes Andy I know. In fact, I previously tested with releases names, and in one 
of my several tests, I modified to stable/testing. I keep these in my 
demonstration but the problem still here with the two options.


In all cases, thank you.


Anybody can say if this is a bug or not ?


Regards,
Hogren 



usrmerge problem on docker with upgrade

2022-10-27 Thread Hogren

Hello,

I hope that everybody are fine in this quiet dark period.


For a specific project I need to construct a Bookworm docker container, 
through a Bullseye image. For explanation, I need to install Bullseye, 
install a proprietary package (SQL Server driver) from an external 
repository, only compatible with this Debian release, and upgrade to 
Bookworm, to get correct versions of tools like PHP.


I simplified the Dockerfile, so anybody can quietly reproduce the 
problem :

reproduce@debian $ cat Dockerfile
FROM debian:stable
RUN apt update
RUN apt upgrade -y
RUN echo 'deb http://deb.debian.org/debian testing main' > 
/etc/apt/sources.list

RUN apt update
RUN apt upgrade -y
RUN apt dist-upgrade -y

Then, I execute this command :
reproduce@debian $ docker image build --no-cache -t debiantest:latest ./

The complete output is at the end of the mail.

I saw this is a known problem, normally resolved :
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008202

I think that it was resolve for a classic usage of a docker container, 
without an upgrade as I try.



Anybody can help me or confirm me that it’s a bug and I need to open a 
bug issue ?



Thank you very much !



--

[+] Building 38.5s (9/10)
 => [internal] load build definition from Dockerfile0.0s
 => => transferring dockerfile: 38B   0.0s
 => [internal] load .dockerignore 0.0s
 => => transferring context: 2B 0.0s
 => [internal] load metadata for docker.io/library/debian:stable 
1.8s
 => CACHED [1/7] FROM 
docker.io/library/debian:stable@sha256:9583740c100697a7dd186b80198a66ad24927e03437414559f90e0ed2639346e 
   0.0s

 => [2/7] RUN apt update2.9s
 => [3/7] RUN apt upgrade -y1.4s
 => [4/7] RUN echo 'deb http://deb.debian.org/debian testing main' > 
/etc/apt/sources.list0.6s

 => [5/7] RUN apt update3.1s
 => ERROR [6/7] RUN apt upgrade -y28.7s
--
 > [6/7] RUN apt upgrade -y:
#9 0.465
#9 0.465 WARNING: apt does not have a stable CLI interface. Use with 
caution in scripts.

#9 0.465
#9 0.471 Reading package lists...
#9 0.999 Building dependency tree...
#9 1.143 Reading state information...
#9 1.179 Calculating upgrade...
#9 1.438 The following packages were automatically installed and are no 
longer required:
#9 1.439   libffi7 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 
libkrb5support0

#9 1.440   libnsl2 libssl1.1 libssl3 libtirpc-common libtirpc3 lsb-base
#9 1.440 Use 'apt autoremove' to remove them.
#9 2.124 The following NEW packages will be installed:
#9 2.125   gcc-12-base libcap2 libffi8 libfile-find-rule-perl 
libgdbm-compat4 libgdbm6
#9 2.126   libnumber-compare-perl libperl5.34 libssl3 libtext-glob-perl 
netbase perl

#9 2.126   perl-modules-5.34 sensible-utils usrmerge util-linux-extra
#9 2.128 The following packages have been kept back:
#9 2.129   libsemanage-common passwd
#9 2.130 The following packages will be upgraded:
#9 2.130   adduser apt base-files base-passwd bash bsdutils coreutils 
dash debconf
#9 2.131   debianutils diffutils dpkg e2fsprogs findutils gcc-10-base 
gpgv grep gzip
#9 2.131   init-system-helpers libacl1 libapt-pkg6.0 libattr1 
libaudit-common libaudit1
#9 2.131   libblkid1 libbz2-1.0 libc-bin libc6 libcap-ng0 libcom-err2 
libcrypt1
#9 2.131   libdb5.3 libdebconfclient0 libext2fs2 libgcc-s1 libgcrypt20 
libgmp10
#9 2.131   libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed6 
libidn2-0
#9 2.132   libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblz4-1 
liblzma5
#9 2.132   libmount1 libnettle8 libp11-kit0 libpam-modules 
libpam-modules-bin
#9 2.133   libpam-runtime libpam0g libpcre2-8-0 libpcre3 libseccomp2 
libselinux1
#9 2.133   libsmartcols1 libss2 libstdc++6 libsystemd0 libtasn1-6 
libtinfo6
#9 2.134   libtirpc-common libtirpc3 libudev1 libunistring2 libuuid1 
libxxhash0
#9 2.136   libzstd1 login logsave lsb-base mawk mount ncurses-base 
ncurses-bin

#9 2.138   perl-base sed sysvinit-utils tzdata util-linux zlib1g
#9 2.240 85 upgraded, 16 newly installed, 0 to remove and 2 not 
upgraded.

#9 2.240 Need to get 41.5 MB of archives.
#9 2.240 After this operation, 55.6 MB of additional disk space will be 
used.
#9 2.240 Get:1 http://deb.debian.org/debian testing/main amd64 
base-files amd64 12.3 [70.3 kB]
#9 2.351 Get:2 http://deb.debian.org/debian testing/main amd64 libc6 
amd64 2.35-3 [2737 kB]
#9 3.673 Get:3 http://deb.debian.org/debian testing/main amd64 libc-bin 
amd64 2.35-3 [616 kB]
#9 3.705 Get:4 http://deb.debian.org/debian testing/main amd64 
gcc-12-base amd64 12.2.0-3 [208 kB]
#9 3.715 Get:5 http://deb.debian.org/debian testing/main amd64 libgcc-s1 
amd64 12.2.0-3 [50.2 kB]
#9 3.717 Get:6 http://deb.debian.org/debian testing/main amd64 
debianutils amd64 5.7-0.3 [102 kB]
#9 3.723 Get:7 http://deb.debian.org/debian testing/main amd64 bash 
amd64 5.2~rc2-2 [1527 kB]
#9 3.789 Get:8 http://deb.debian.org/debian testing/main amd64 bsdutils 
amd64 1:2.38.1-1.1+b