lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Where in /etc are customizations preserved?


From: Greg Chicares
Subject: [lmi] Where in /etc are customizations preserved?
Date: Mon, 17 Aug 2020 20:28:13 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

If you really enjoy puzzles, explain this before reading further:

/opt/lmi/src/lmi[0]$make $coefficiency unit_tests 2>&1 | tee >(grep '\*\*\*') 
>(grep '????') >(grep '!!!!' --count | xargs printf '%d tests succeeded\n') 
>../log
tee: /proc/self/fd/17: No such file or directory
tee: /proc/self/fd/18: No such file or directory
tee: /proc/self/fd/19: No such file or directory
0 tests succeeded

That happened when logged into a chroot as a normal user.
Logging in as root produced the same outcome. Each individual
test that I tried worked correctly; process substitution is
what fails.

SPOILER COMING BELOW

Vadim--Our redhat server just got an upgrade from 7.6 to 7.8,
and some files I had saved in /etc were removed. Is there any
standard guidance to inform me where I can place files that
need to be preserved?

The schroot.conf(5) manpage:
  https://manpages.debian.org/buster/schroot/schroot.conf.5.en.html
lists a "profile" key for '.conf' files, naming a directory in /etc :
  "The directory is relative to /etc/schroot"
and says that
  "Other packages may provide additional profiles"

Accordingly, I had created a directory "relative to /etc/schroot":
  mkdir -p /etc/schroot/lmi_profile
and populated it, e.g.:
  cat >/etc/schroot/lmi_profile/fstab <<EOF
  ...
  touch    /etc/schroot/lmi_profile/copyfiles
  touch    /etc/schroot/lmi_profile/nssdatabases
but right after the upgrade those files vanished, with the puzzling
result above due to the liquidation of the fstab configured for the
chroot. Most stuff seems to work, until you need something like /proc .

The only '.d' directories that schroot creates are these two:
  /etc/schroot/chroot.d
  /etc/schroot/setup.d
which aren't intended for "profiles", but I guess I could try
setting "profile=setup.d/lmi_profile" and see whether a '/' is
allowed in that .conf key. Or maybe I should overwrite the
contents of one of the profiles that schroot provides, like
  /etc/schroot/buildd
(used only, AFAIK, by debian maintainers) and hope that my
customizations there will be preserved. Otherwise, I could
try "../../srv/something", which is "relative to /etc/schroot",
but that looks comically abusive.

Am I missing some general guideline that would have kept us
safe from this?

I wouldn't assume that the upgrade involved only the RHEL
equivalent of "apt-get dist-upgrade". I have a feeling they
probably ran some script obtained from some vendor. I tried
looking into the recent activity with 'etckeeper', which was
left installed...but its git repository was liquidated (root
cannot find it at all).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]