Commit Graph

33 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
b427341d28
Rename function chroot to chroot_cmd
Do not create function with the same name as standard command, it is
very confusing.

Fixes QubesOS/qubes-issues#1174
2016-04-20 01:59:34 +02:00
Jason Mehring
09af4b9433 functions.sh: Allow generic TEMPLATE_FLAVOR_DIR that matches all flavors, or even no flavors
Use an asterisk in place of a '+flavor' to indicate a template directory to be applied
to all flavors, or no flavor at all.

    *:/home/user/qubes/qubes-src/some-repo/template-directory
2015-12-24 04:46:50 -05:00
Jason Mehring
b4fbcb8071 functions.sh: unset "build_step_files" var to prevent loading same files if no files found on another run 2015-12-23 05:16:24 -05:00
Jason Mehring
b61fdaf843 function.sh: Allow multiple template directories to be searched
Return all and run matches instead of only one which allows flavors
like salt to have multiple optional modules like mgmt-salt-dev to
run installation scripts in template subdirectories.
2015-12-15 22:25:43 -05:00
Marek Marczykowski-Górecki
5897b1a882
Merge remote-tracking branch 'origin/pr/8'
* origin/pr/8:
  fixed 'verbosity disabling bug' https://github.com/QubesOS/qubes-issues/issues/1100 Deprecated functions setVerboseMode, getXtrace, setXtrace and variable XTRACE, because those were broken and their only use case was function umount_kill. Re-implemented disabling xtrace in function umount_kill, if variable VERBOSE is lower than or equal 2.
2015-08-05 01:40:28 +02:00
Patrick Schleizer
e84645e597
fixed 'verbosity disabling bug'
https://github.com/QubesOS/qubes-issues/issues/1100
Deprecated functions setVerboseMode, getXtrace, setXtrace and variable XTRACE, because those were broken and their only use case was function umount_kill. Re-implemented disabling xtrace in function umount_kill, if variable VERBOSE is lower than or equal 2.
2015-08-04 17:59:50 +02:00
Jason Mehring
3640af684f functions.sh: fix GLOBAL_CACHE error whay array does not yet exist 2015-08-04 00:17:09 -04:00
Jason Mehring
3adfc0385e
SYSTEMD_NSPAWN_ENABLE was missing from chroot if VERBOSE was < 2
- Added some more chroot wrapper function comments
- changed "${@}" to ${1+"$@"} for better form in chroot function
2015-04-27 21:18:07 -04:00
Jason Mehring
2fa8a641a0
Added comment about GLOBAL_CACHE and how it is later renamed 2015-04-13 14:48:32 -04:00
Jason Mehring
87d6284d67
Reworked the way template flavor files are found to allow flavors
- This better allows flavors to be within their own packages such as Whonix

The previous method of discovering flavor configurations was kind of broke
when using a flavor within a different package and including additional
options such as +standard.
2015-04-13 14:48:27 -04:00
Jason Mehring
87aad36262
Added the ability for template files to be found side by side the original file
which allows template flavor suffix to be added to package lists as well as most
any other file type now.

- created a new function to check if a file exists that was refactored out od
  the templateFile function
- Added elementIn function which checks if an element exists within an array
2015-03-15 14:56:08 -04:00
Marek Marczykowski-Górecki
936dff99c0 Provide chroot() wrapper also in quiet mode 2015-02-19 04:07:51 +01:00
Jason Mehring
14762b89e7 Fixed a formatting glitch 2015-02-14 12:32:03 -05:00
Jason Mehring
b342a11c65 Various improvements to functions lib
- Set xtrace verbose mode (-x or +x)
- Added systemd-nspawn alternate to chroot
- Fix message display of multiple paramaters
- templateDir was missing quotes around element which could end up splittng a directory that contained spaces
- added functionality to find template flavors within $SCRIPTSDIR and not have to be located within a sub-directory
- Added a few more comments
2015-02-14 12:31:53 -05:00
Marek Marczykowski-Górecki
5166ca5388 Simplify template name processing
Remove redundant function, move to separate file and load only this file
when only template name is needed. This way a lot less code gets loaded
on every make call.
2015-01-30 04:10:43 +01:00
Jason Mehring
2838225f44 Made sure color chroot function returned shell exit status and not trigger error within that function 2014-11-11 08:57:41 -05:00
Jason Mehring
23f1212b00 VERBOSE and DEBUG will default to defaults if not called by Makefile 2014-11-06 23:56:57 -05:00
Jason Mehring
80caa5ea2e debian: cleanup; everything working except whonix template update 2014-11-04 02:44:05 -05:00
Jason Mehring
422dcc9c24 debian: honor verbose; fixed bug where base package.list was not being used 2014-11-03 23:59:48 -05:00
Jason Mehring
f5ede83def Change copy function not to use wildcard 2014-10-29 08:16:46 -04:00
Jason Mehring
c238716d6a Code cleanup - whonix* not tested 2014-10-28 04:09:55 -04:00
Jason Mehring
e586bc1a2f Fixed some issues with Makefile TEMPLATE_* vars that were expected to be arrays or easily importable as one 2014-10-26 23:55:21 -04:00
Jason Mehring
8588625650 Fixed debian fonts issue where terminal would initially display black on black text
Added some default themes
Added default rendering options
2014-10-26 14:48:09 -04:00
Jason Mehring
cd19220993 Whonix-gateway configurations 2014-10-25 18:06:30 -04:00
Jason Mehring
deb4cbd867 Added ability to name tempaltes within configuration file and check/fix to make sure names under 32 characters 2014-10-24 16:17:29 -04:00
Jason Mehring
0b341f4fb2 Moved qubes-extra-files to its own directory as a sub-template (proxy) as its only needed for proxies
Removed call from qubes_installation scripts for proxy files.  will now be added by sub-template
Renamed extra-whonix-files to files
Modifies functions.sh to allow for very short proxy names and custom directories that will be dist independent
2014-10-24 06:48:11 -04:00
Jason Mehring
c26d0eac1a added static host related files for whonix copy and moved copy to pre whonix install 2014-10-22 22:38:07 -04:00
Jason Mehring
f3a02b1251 Created function to load package.list from proper directories. There can be multiple targets if TEMPLATE_FLAVOR and sub flavors are defined. All package.list files are kept within each flavor directory
Refactored some code to allow above to reduce duplication of code
2014-10-22 16:37:26 -04:00
Jason Mehring
4ad8522455 Fixed typo of SCRIPTSDIR var 2014-10-21 10:00:32 -04:00
Jason Mehring
f597ff760f Added ability to be able to relocate TEMPLATE_FLAVORS to any directory via configuration file
Added ability to specify more than one TEMPLATE_FLAVOR (Primary plus others)
Added ability for all TEMPLATE_FLAVORS and others to be able to hook into scripts (pre / post)
Addeed tests for above functionality
With these changes TEMPLATE_FLAVORS can be self contained and not polute code space
2014-10-21 09:12:05 -04:00
Jason Mehring
60b7f2fa7a Added facl function to restore file permissions on files copied to image 2014-10-19 19:36:59 -04:00
Jason Mehring
64093db75a deb commit for modified packages should be working now 2014-10-17 23:34:01 -04:00
Jason Mehring
1334b8ae50 Added colorized messages and changed scripts to use them
Added a few more whonix replacement tweaks
Updated umount_kill.sh to be able to umount directories that have been deleted
Added a DEBUG feature to save / use already created debootstrap image to save time debugging
2014-10-16 12:03:05 -04:00