You are not logged in.

#1 2017-09-09 19:24:39

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

[NOTABUG] bunsen-netinstall: no dpkg-divert for /etc/skel

For systems installed with the bunsen-netinstall script, there is no diversion for /usr/share/bunsen/skel to be used in place of /etc/skel

root@Diproton:~ # dpkg-divert --list
diversion of /usr/share/dict/words to /usr/share/dict/words.pre-dictionaries-common by dictionaries-common
diversion of /etc/dpkg/origins/default to /etc/dpkg/origins/default.bunsen-orig by bunsen-os-release
diversion of /usr/share/vim/vim80/doc/help.txt to /usr/share/vim/vim80/doc/help.txt.vim-tiny by vim-runtime
diversion of /usr/lib/x86_64-linux-gnu/thunarx-2/thunar-wallpaper-plugin.so to /usr/lib/x86_64-linux-gnu/thunarx-2/thunar-wallpaper-plugin.so.bunsen-disabled by bunsen-thunar
diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash
diversion of /etc/lightdm/lightdm-gtk-greeter.conf to /etc/lightdm/lightdm-gtk-greeter.conf.bunsen-orig by bunsen-configs
diversion of /etc/lsb-release to /etc/lsb-release.bunsen-orig by bunsen-os-release
diversion of /usr/share/man/man1/dh_gstscancodecs.1.gz to /usr/share/man/man1/dh_gstscancodecs.1.gz-gst0.10 by libgstreamer1.0-dev
diversion of /etc/os-release to /etc/os-release.bunsen-orig by bunsen-os-release
diversion of /usr/share/applications/firefox-esr.desktop to /usr/share/applications/firefox-esr.desktop.diverted by xul-ext-iceweasel-branding
diversion of /usr/bin/firefox to /usr/bin/firefox.real by firefox-esr
diversion of /bin/sh to /bin/sh.distrib by dash
diversion of /usr/bin/dh_gstscancodecs to /usr/bin/dh_gstscancodecs-gst0.10 by libgstreamer1.0-dev
diversion of /usr/share/initramfs-tools/hooks/klibc to /usr/share/initramfs-tools/hooks/klibc^i-t by klibc-utils
diversion of /usr/share/applications/iceweasel.desktop to /usr/share/applications/iceweasel.desktop.diverted by xul-ext-iceweasel-branding
diversion of /usr/share/vim/vim80/doc/tags to /usr/share/vim/vim80/doc/tags.vim-tiny by vim-runtime
root@Diproton:~ #

tl;dr:

root@Diproton:~ # dpkg-divert --list | grep skel
1|root@Diproton:~ #

As a result, any newly-added users must log in and run `/usr/lib/bunsen/configs/bl-user-setup` to get the correct configuration files for our desktop.

The preinst script for the bunsen-configs package adds diversions for the $SUSPECT_CONFFILES, we could either expand this to include all the configuration files or install a modified /etc/adduser.conf instead, I think.

Last edited by Head_on_a_Stick (2017-09-10 09:28:59)


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#2 2017-09-10 02:36:17

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,561
Website

Re: [NOTABUG] bunsen-netinstall: no dpkg-divert for /etc/skel

tl:dr
Politely disagree - I think it's fine the way it is.

A) It works OK.
New users don't have to run the setup script, the lightdm config runs it automatically, and sets a marker to ensure it's only run once. (If you're not using lightdm, you haven't installed default BL. We're trying to make it as modular as possible, but I think a sysadmin who makes a major modification like that should be able to work around the ramifications.)
This way allows experienced sysadmins to create "empty" users without all the BL config if they want to, as twoion commented when moving our config files out of /etc first came up.

B) implementation would be very difficult
Currently we leave the default Debian /etc/skel alone, allowing the system to maintain .bash_logout and .bashrc and default .profile.
AFAIK it's not possible to dpkg-divert a whole directory, only individual files, which would make for a whole slew of hard-to-maintain code.
Anyway, there are no original files in /etc/skel to divert, nor much likelihood that a package would put them there, so we'd be diverting non-existent files and presumably replacing them with ours, ie populating /etc/skel, which the bunsenlabs/skel directory was meant to avoid. (Debian does not recommend putting a lot of files in /etc/skel.)
Strictly, dpkg-diverts aren't recommended for conffiles (it's often done though).

above link wrote:

Do not attempt to divert a conffile, as dpkg does not handle it well.

https://wiki.debian.org/Adding%20and%20removing%20diversions wrote:

Diversions are a bit finicky.

Above finickiness confirmed from experience.

We use a few dpkg-diverts here and there, but I don't think we should massively increase them.

Last edited by johnraff (2017-09-10 03:40:55)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#3 2017-09-10 09:28:24

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [NOTABUG] bunsen-netinstall: no dpkg-divert for /etc/skel

^ Thank you very much for the extended explanation, it is much appreciated.

johnraff wrote:

I think it's fine the way it is.

+1

New users don't have to run the setup script, the lightdm config runs it automatically, and sets a marker to ensure it's only run once.

I am so sorry but I missed that particular piece in the puzzle so this thread is just noise.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

Board footer

Powered by FluxBB