[buildiso] add feature to validate compatibilty of profiles #77

Closed
opened 2015-03-14 21:54:52 +00:00 by philm · 3 comments
philm commented 2015-03-14 21:54:52 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

Issue #76 is one of the best examples of broken profiles. We need a feature/routine to validate them:

  • check key config files
  • check key folders
  • check version compatibility
*Created by: philmmanjaro* Issue #76 is one of the best examples of broken profiles. We need a feature/routine to validate them: - check key config files - check key folders - check version compatibility
philm commented 2015-04-10 13:44:48 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

Like to enhance ...

check_run_dir(){
    if [[ ! -f shared/Packages-Systemd ]] || [[ ! -f shared/Packages-Openrc ]];then
        die "${0##*/} is not run in a valid iso-profiles folder!"
    fi
}

I'll do that.

Atm, we check shared folder, and before the build of profile the profile folder with a separate function check_sanity().

check_sanity(){
    if [[ ! -f $1 ]]; then
        eval "$2"
    fi
}
*Created by: udeved* Like to enhance ... ``` check_run_dir(){ if [[ ! -f shared/Packages-Systemd ]] || [[ ! -f shared/Packages-Openrc ]];then die "${0##*/} is not run in a valid iso-profiles folder!" fi } ``` I'll do that. Atm, we check shared folder, and before the build of profile the profile folder with a separate function check_sanity(). ``` check_sanity(){ if [[ ! -f $1 ]]; then eval "$2" fi } ```
philm commented 2015-05-04 00:14:55 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

[manjaro-tools-iso-profiles] $ buildiso -p foo
==> Checking profile [foo]
  -> has_keyfiles: false
  -> has_keydirs: false
==> ERROR: Profile sanity check failed.

[manjaro-tools] $ buildiso -p lxqt 
==> ERROR: buildiso is not run in a valid iso-profiles folder!

[manjaro-tools-iso-profiles] $ buildiso -p lxqt-openrc -ix
==> Checking profile [lxqt-openrc]
  -> has_keyfiles: true
  -> has_keydirs: true
 --> Profile sanity check passed.
==> Start building [lxqt-openrc]
*Created by: udeved* ``` [manjaro-tools-iso-profiles] $ buildiso -p foo ==> Checking profile [foo] -> has_keyfiles: false -> has_keydirs: false ==> ERROR: Profile sanity check failed. [manjaro-tools] $ buildiso -p lxqt ==> ERROR: buildiso is not run in a valid iso-profiles folder! [manjaro-tools-iso-profiles] $ buildiso -p lxqt-openrc -ix ==> Checking profile [lxqt-openrc] -> has_keyfiles: true -> has_keydirs: true --> Profile sanity check passed. ==> Start building [lxqt-openrc] ```
philm commented 2015-05-04 10:04:30 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

The check is for a minimal profile build requirement.

If one file or dir is missing, the entire check fails for files and dirs respectively.

I also added a chroot version check against manjaro-tools version installed.
If chroot version is outdated, chroot will be recreated. It may be a useless check for buildiso, however, it works nicely with buildpkg, and the build won't error out with outdated chroot msg.

*Created by: udeved* The check is for a minimal profile build requirement. If one file or dir is missing, the entire check fails for files and dirs respectively. I also added a chroot version check against manjaro-tools version installed. If chroot version is outdated, chroot will be recreated. It may be a useless check for buildiso, however, it works nicely with buildpkg, and the build won't error out with outdated chroot msg.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tools/manjaro-tools#77
No description provided.