nrelease: Add 'IMGSIZE_MB' to specify file size in units of MB The image file size was specified by the 'IMGSIZE' variable, but it's the number of 512-byte sectors, which isn't intuitive and requires a manual conversion. Add the 'IMGSIZE_MB' variable to directly specify the file size in units of MB, which is more intuitive and friendly.
nrelease: Improve 'etc.hdd' creation to eliminate inconsistency Previously, the 'etc.hdd' was created during the 'buildiso' target and then updated in the 'pkgs' target. However, in the 'pkgs' target, only the password files (i.e., master.passwd, passwd, group) were copied but the password DBs (i.e., pwd.db, spwd.db) were not rebuild. This caused an inconsistency in 'etc.hdd'. When a user tried manual installation and forgot to run 'pwd_mkdb', the installed system would fail to add new users and generate errors like: > pw: user 'myuser' disappeared during update. > adduser: ERROR: There was an error adding user (myuser). This commit improves the creation of 'etc.hdd'. Reorder the 'customiso' target *after* the 'pkgs' target, so we can simply copy the 'etc' to 'etc.hdd' and be done, without any further changes, and the resulting password files and DBs are in consistency. In addition, this avoids adding the 'installer' user to the 'etc.hdd' and so we get a cleaner system by default. See also: https://lists.dragonflybsd.org/pipermail/users/2023-February/428576.html (Regenerating the password databases on new installs)
nrelease - Copy `/etc/ssl/cert.pem` into ISOROOT Otherwise it fails when using target `binpkg`: ``` 9984868:error:14FFF086:SSL routines:(UNKNOWN)SSL_internal:certificate verify failed:/usr/src/lib/libressl/../../crypto/libressl/ssl/tls13_client.c:617: pkg-static: https://mirror-master.dragonflybsd.org/dports/dragonfly:6.4:x86:64/LATEST/packagesite.txz: Authentication error Unable to update repository Avalon Error updating repositories! ```
nrelease: Use pw(8) and chpass(1) to setup 'installer' and 'root' users Use pw(8) to add the 'installer' user and use chpass(1) to disable passwords for the 'installer' and 'root' users. So we can drop the customized 'master.passwd' file and be in sync with the one in usr/src/etc.
nrelease: Remove superfluous files * The 'pwd.db' and 'spwd.db' files should be generated by pwd_mkdb(8). * The 'login.conf' is not customized and thus not needed. Anyway, the 'gui' framework is still using the deprecated pkgsrc framework and has not been maintained for years...
release: Mount tmpfs at /usr/local/etc only if exists for ISO For an ISO release built with the 'nopkgs' option, it doesn't have the '/usr/local/etc' directory. Thus the boot process would fail because it cannot mount tmpfs at the non-existent directory '/usr/local/etc'. Fix this issue by checking the existence of '/usr/local/etc' before appending the corresponding entry to the ISO's fstab.