Release Engineering

Tasklist

FS#67729 - [archiso] Please reconsider deprecation / removal of customize_airootfs.sh

Attached to Project: Release Engineering
Opened by AMM (amish) - Thursday, 27 August 2020, 02:11 GMT
Last edited by David Runge (dvzrv) - Sunday, 27 September 2020, 17:45 GMT
Task Type Feature Request
Category ArchISO
Status Closed
Assigned To David Runge (dvzrv)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Recently, new archiso version has plans to deprecate the call to customize_airootfs.sh.

I request to reconsider the same for the following issues that I have.

I build custom Arch ISO which is used for rescue as well as Arch installation (with scripts that make Arch installation a bit faster)

I also add (replace) my custom /root/.zshrc as well as /root/.screenrc and /etc/pacman.conf (which has my custom repository) via customize_airootfs.sh.

This way my custom Arch ISO is ready which some aliases (I do not prefere grml's zsh) that I want and some screen settings. And also ready which custom repository for pacman.

Problem:
--------
If I place these custom files in airootfs directory they get overwritten.

My custom /root/.zshrc and /root/.screenrc get overwritten via /etc/skel/ files when root user's home directory is created. (mkarchiso should probably use --no-clobber on line 399 where it copies /etc/skel files to user's home directory)

I am yet to figure out how my custom /etc/pacman.conf gets overwritten (possibly mkarchiso does it somewhere).

So only solution for me to add my custom /root/.zshrc, /root/.screenrc and /etc/pacman.conf was via customize_airootfs.sh

Suggestion:
-----------
Official Arch ISO itself may remove customize_airootfs.sh file but *please do not remove the feature completely*. i.e. if file is there then mkarchiso should run it.

This will help a lot to everyone who wants to customize things after the package installation stage of Arch ISO creation.(i.e. after _run_once _make_packages)

Please reconsider.

Thank you.


Additional info:
* package version(s)
archiso 47.1-1

* config and/or log files etc.
As above.
This task depends upon

Closed by  David Runge (dvzrv)
Sunday, 27 September 2020, 17:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with https://gitlab.archlinux.org/archlinux/a rchiso/-/merge_requests/71

Will be included in 48.
Comment by Eli Schwartz (eschwartz) - Thursday, 27 August 2020, 02:50 GMT
  • Field changed: Attached to Project (Arch Linux → Release Engineering)
  • Field changed: Status (Unconfirmed → Assigned)
  • Task assigned to David Runge (dvzrv)
Moving to the dedicated project.
Comment by AMM (amish) - Thursday, 27 August 2020, 04:50 GMT
Note: not opening another bug report for small thing as its the same /etc/skel related line that introduces the bug.

This line (no. 399) in mkarchiso makes all home directories (including /root) as world readable:
cp -RdT --preserve=mode,timestamps,links -- "${airootfs_dir}/etc/skel" "${airootfs_dir}${passwd[5]}"

The permission 0750 should be restored again by following up above line with chmod line (same as line 367 of mkarchiso)
chmod -f 0750 -- "${airootfs_dir}${passwd[5]}"

Related (resolved) bug report: (point no. 2)
https://bugs.archlinux.org/task/67167

PS: Please also add --no-clobber to above cp line, if you deem fit. So that it does not overwrite existing files if any. And only copies files from /etc/skel if it does not exist.

Thank you.
Comment by David Runge (dvzrv) - Sunday, 27 September 2020, 17:44 GMT
@amish: Thanks for the bug report!

The issue with /etc/skel files has been fixed in !71 [1].
However, I could not reproduce your issue with an /etc/pacman.conf file being overwritten. Please make sure to place the file in the profile's airootfs/etc/ directory!

Note: The customize_rootfs.sh script will eventually still be removed. There are other methods available of running things in the image, preferably by calling something with a systemd service.

[1] https://gitlab.archlinux.org/archlinux/archiso/-/merge_requests/71

Loading...