Removing the need to have write access to BUILDDIR:

- remove an entry in Config.in (useless, since we impose sudo anyway)
- Update README and CHEATSHEET
This commit is contained in:
Pierre Labastie 2018-02-04 08:50:16 +00:00
parent c7b535b488
commit b7583ec500
3 changed files with 25 additions and 76 deletions

View file

@ -1,11 +1,11 @@
$Id$ $Id$
This file contains examples of menu settings for various tasks. This file contains examples of menu settings for various tasks.
------------------------------ ------------------------------
LFS book, System V, stable (8.0) version. LFS book, System V, stable (8.2) version.
Download the files to /usr/src (verify you have write access) Download the files to /usr/src (verify you have write access)
Build in /mnt/lfs (verify you have write access too) Build in /mnt/lfs (should be owned by root, verify you can execute sudo)
Clean the build directory before beginning Clean the build directory before beginning
Build a kernel, whose configuration is in /home/user/config-4.9.9-lfs-1 Build a kernel, whose configuration is in /home/user/config-4.15-lfs-1
An fstab for the future system is located in /home/user/fstablfs An fstab for the future system is located in /home/user/fstablfs
Run only the critical testsuites Run only the critical testsuites
Settings for a French user Settings for a French user
@ -14,12 +14,11 @@ Run four make jobs in parallel
BOOK Settings ---> BOOK Settings --->
Use BOOK (Linux From Scratch System V) ---> Use BOOK (Linux From Scratch System V) --->
Release (Branch or stable book) ---> Release (Branch or stable book) --->
Branch (preceded by "branch-"), stable Version, or tag (8.0) Branch (preceded by "branch-"), stable Version, or tag (8.2)
[ ] Add blfs-tool support (NEW) [ ] Add blfs-tool support (NEW)
[ ] Add custom tools support (NEW) [ ] Add custom tools support (NEW)
General Settings ---> General Settings --->
[ ] Change the default user/group and homedir for this build (NEW)
Build Directory (/mnt/lfs) Build Directory (/mnt/lfs)
[*] Retrieve source files [*] Retrieve source files
Package Archive Directory (/usr/src) Package Archive Directory (/usr/src)
@ -39,7 +38,7 @@ Build Settings --->
[*] Use a custom fstab file [*] Use a custom fstab file
Fstab file (optional) ($HOME/fstablfs) Fstab file (optional) ($HOME/fstablfs)
[*] Build the kernel [*] Build the kernel
Kernel config file ($HOME/config-4.9.9-lfs-1) Kernel config file ($HOME/config-4.15-lfs-1)
[ ] Strip Installed Binaries/Libraries [ ] Strip Installed Binaries/Libraries
[ ] Install vim-lang package [ ] Install vim-lang package
[ ] DO NOT use/display progress_bar [ ] DO NOT use/display progress_bar
@ -63,9 +62,9 @@ Advanced Features --->
------------------------------ ------------------------------
LFS book, systemd, XML source of the LFS book in /usr/src/lfsbook LFS book, systemd, XML source of the LFS book in /usr/src/lfsbook
Download the files to /usr/src (verify you have write access) Download the files to /usr/src (verify you have write access)
Build in /mnt/lfs (verify you have write access too) Build in /mnt/lfs (should be owned by root, verify you can execute sudo)
Clean the build directory before beginning Clean the build directory before beginning
Build a kernel, whose configuration is in /home/user/config-4.10.3-lfs-systemd Build a kernel, whose configuration is in /home/user/config-4.15-lfs-systemd
An fstab for the future system si located in /home/user/fstablfs An fstab for the future system si located in /home/user/fstablfs
Run all the testsuites Run all the testsuites
Settings for an user in California Settings for an user in California
@ -79,7 +78,6 @@ BOOK Settings --->
[ ] Add custom tools support (NEW) [ ] Add custom tools support (NEW)
General Settings ---> General Settings --->
[ ] Change the default user/group and homedir for this build (NEW)
Build Directory (/mnt/lfs) Build Directory (/mnt/lfs)
[*] Retrieve source files [*] Retrieve source files
Package Archive Directory (/usr/src) Package Archive Directory (/usr/src)
@ -99,7 +97,7 @@ Build Settings --->
[*] Use a custom fstab file [*] Use a custom fstab file
Fstab file (optional) ($HOME/fstablfs) Fstab file (optional) ($HOME/fstablfs)
[*] Build the kernel [*] Build the kernel
Kernel config file ($HOME/config-4.10.3-lfs-systemd Kernel config file ($HOME/config-4.15-lfs-systemd
[ ] Strip Installed Binaries/Libraries [ ] Strip Installed Binaries/Libraries
[ ] Install vim-lang package [ ] Install vim-lang package
[ ] DO NOT use/display progress_bar [ ] DO NOT use/display progress_bar
@ -124,10 +122,10 @@ Advanced Features --->
CLFS book, systemd, stable version (as of April 2017) CLFS book, systemd, stable version (as of April 2017)
X86 multilib X86 multilib
Download the files to /usr/src (verify you have write access) Download the files to /usr/src (verify you have write access)
Build in /mnt/clfs (verify you have write access too) Build in /mnt/clfs (should be owned by root, verify you can execute sudo)
Clean the build directory before beginning Clean the build directory before beginning
Use "boot" method, with a temporary kernel in /home/user/config-boot Use "boot" method, with a temporary kernel in /home/user/config-boot
Build a kernel, whose configuration is in /home/user/config-4.10.3-clfs-systemd Build a kernel, whose configuration is in /home/user/config-4.15-clfs-systemd
An fstab for the future system si located in /home/user/fstablfs An fstab for the future system si located in /home/user/fstablfs
Run all the testsuites for final system Run all the testsuites for final system
Settings for an user in Sidney (Australia) Settings for an user in Sidney (Australia)
@ -145,7 +143,6 @@ BOOK Settings --->
[ ] Add custom tools support (NEW) [ ] Add custom tools support (NEW)
General Settings ---> General Settings --->
[ ] Change the default user/group and homedir for this build (NEW)
Build Directory (/mnt/clfs) Build Directory (/mnt/clfs)
[*] Retrieve source files [*] Retrieve source files
Package Archive Directory (/usr/src) Package Archive Directory (/usr/src)
@ -164,7 +161,7 @@ Build Settings --->
[*] Use a custom fstab file [*] Use a custom fstab file
Fstab file (optional) ($HOME/fstablfs) Fstab file (optional) ($HOME/fstablfs)
[*] Build the kernel [*] Build the kernel
Kernel config file ($HOME/config-4.10.3-clfs-systemd Kernel config file ($HOME/config-4.15-clfs-systemd
[ ] Strip Installed Binaries/Libraries [ ] Strip Installed Binaries/Libraries
[ ] Install vim-lang package [ ] Install vim-lang package
[ ] DO NOT use/display progress_bar [ ] DO NOT use/display progress_bar

View file

@ -647,68 +647,22 @@ endmenu
menu "General Settings" menu "General Settings"
depends !BOOK_BLFS depends !BOOK_BLFS
#--- Set User Account #--- {C,H,}LFS User Account
config CONFIG_USER
bool "Change the default user/group and homedir for this build"
default n
help #-- Unprivileged user and group name
# If you do not have the privilege to create/delete
# users and groups you can specify your own
# user ID for the build
#
# default values for each book
# LFS lfs
# CLFS* clfs
# HLFS hlfs
#
# Also, if your host places users' home dirs into a
# directory other than /home you can specify it here.
config DEF_USER config LUSER
string string
default "lfs" if BOOK_LFS || BOOK_LFS_SYSD default "lfs" if BOOK_LFS || BOOK_LFS_SYSD
default "clfs" if BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3 default "clfs" if BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3
default "hlfs" if BOOK_HLFS default "hlfs" if BOOK_HLFS
config SET_USER
string "User account"
depends CONFIG_USER
default DEF_USER
config CONFIG_GROUP
bool "Set Group?"
default n
depends CONFIG_USER
config SET_GROUP
string "GROUP account"
depends CONFIG_GROUP
default DEF_USER
config CONFIG_HOME
bool "Set home dir?"
default n
depends CONFIG_USER
config SET_HOME
string "Path to the directory under which the user's home directory will be created"
depends CONFIG_HOME
default "/home"
config LUSER
string
default DEF_USER if !CONFIG_USER
default SET_USER if CONFIG_USER
config LGROUP config LGROUP
string string
default LUSER if !CONFIG_GROUP default LUSER
default SET_GROUP if CONFIG_GROUP
config LHOME config LHOME
string string
default "/home" if !CONFIG_HOME default "/home"
default SET_HOME if CONFIG_HOME
#--- End Set User Account #--- End Set User Account
config BUILDDIR config BUILDDIR

20
README
View file

@ -61,10 +61,8 @@ $Id$
"Mounting the new partition". Note that the default name for the "Mounting the new partition". Note that the default name for the
partition mount point is "/mnt/build_dir", instead of /mnt/{c,}lfs. partition mount point is "/mnt/build_dir", instead of /mnt/{c,}lfs.
You can change that default to anything you'd like in the menu, so you You can change that default to anything you'd like in the menu, so you
may name it /mnt/lfs, or whatever you like. One important point is that may name it /mnt/lfs, or whatever you like. We'll use the name
the user you are logged in as (and not the (c)lfs user) should have write /mnt/build_dir in the sequel.
permission to the mounted directory. We'll use the name /mnt/build_dir
in the sequel.
The tool can download the needed packages for you, or you may download The tool can download the needed packages for you, or you may download
them yourself. The tool may optionally use a package archive directory them yourself. The tool may optionally use a package archive directory
@ -104,6 +102,13 @@ $Id$
5. RUNNING:: 5. RUNNING::
IMPORTANT::
You must be logged as a normal user with sudo privileges to run
the Makefile. Furthermore, you are supposed to have enough privilege
to become any user. If you are not bothered about security issues,
the entry for the user "jhalfs_user" in /etc/sudoers could be
jhalfs_user ALL=(ALL) NOPASSWD:ALL
The command <make> will launch a menu based configuration program. The The command <make> will launch a menu based configuration program. The
underlying menu code was borrowed from BusyBox and slightly modified for underlying menu code was borrowed from BusyBox and slightly modified for
our use. our use.
@ -159,13 +164,6 @@ $Id$
have used the default parameters (see the layout under $BUILDDIR in the have used the default parameters (see the layout under $BUILDDIR in the
Q&A below). Q&A below).
IMPORTANT::
You must be logged as a normal user with sudo privileges to run
the Makefile. Furthermore, you are supposed to have enough privilege
to become any user. If you are not bothered about security issues,
the entry for the user "jhalfs_user" in /etc/sudoers could be
jhalfs_user ALL=(ALL) NOPASSWD:ALL
NOTE:: NOTE::
If you run the jhalfs script directly the only function you can select If you run the jhalfs script directly the only function you can select
is to display the version number by running <./jhalfs -v> is to display the version number by running <./jhalfs -v>