From 01e1b979f8fd245b02df33afbacf3e416357caa3 Mon Sep 17 00:00:00 2001 From: r00t Date: Wed, 12 Apr 2017 09:11:53 -0400 Subject: [PATCH 1/8] sudo fix --- extra/templates/VERSION_INFO.txt.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/templates/VERSION_INFO.txt.j2 b/extra/templates/VERSION_INFO.txt.j2 index 817616c..85fb300 100644 --- a/extra/templates/VERSION_INFO.txt.j2 +++ b/extra/templates/VERSION_INFO.txt.j2 @@ -2,5 +2,5 @@ Version: {{ bdisk['ver'] }} Build: {{ build['buildnum'] }} Time: {{ build['time'] }} Machine: {{ hostname }} ({{ distro }}) -User: {{ build['user'] }}{% if build['realuser'] is defined and build['realuser'] > 0 %} ({{ build['realuser'] }}){% endif %} +User: {{ build['user'] }}{% if build['realuser'] is defined and build['realuser']|length > 0 %} ({{ build['realuser'] }}){% endif %} From 6f3a0f6b86affa53fdd9f0ec8dd62af0858a9426 Mon Sep 17 00:00:00 2001 From: r00t Date: Wed, 12 Apr 2017 12:05:58 -0400 Subject: [PATCH 2/8] missed the check if /etc/bdisk/build.ini is specified --- bdisk/host.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bdisk/host.py b/bdisk/host.py index f243bd5..7045555 100755 --- a/bdisk/host.py +++ b/bdisk/host.py @@ -24,7 +24,7 @@ def getHostname(): hostname = platform.node() return(hostname) -def getConfig(conf_file='/etc/bdisk/build.ini'): +def getConfig(conf_file = '/etc/bdisk/build.ini'): conf = False # define some defailt conf paths in case we're installed by # a package manager. in order of the paths we should search. @@ -48,6 +48,8 @@ def getConfig(conf_file='/etc/bdisk/build.ini'): if os.path.isfile(p): conf = p break + else: + conf = conf_file else: conf = conf_file defconf = os.path.abspath('{0}/../extra/dist.build.ini'.format(os.path.dirname(os.path.realpath(__file__)))) From 676265b2aa65add87c6609b7c3b088f5f6ab91fc Mon Sep 17 00:00:00 2001 From: r00t Date: Sat, 6 May 2017 06:53:28 -0400 Subject: [PATCH 3/8] fixing bug in gpg signing --- bdisk/bGPG.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bdisk/bGPG.py b/bdisk/bGPG.py index 34d39bf..aa6f2b4 100755 --- a/bdisk/bGPG.py +++ b/bdisk/bGPG.py @@ -52,13 +52,13 @@ def genGPG(conf): s)) if mykey: try: - privkey = gpg.get_key(mykey, True) + pkeys.append(gpg.get_key(mykey, True)) except: exit('{0}: ERROR: You specified using {1} but we have no secret key for that ID!'.format( datetime.datetime.now(), mykey)) else: - for key in gpg.keylist(None,True): + for key in gpg.keylist(None, True): if key.can_sign: pkeys.append(key) break From 74412e4deae117cb6eeca147c4f759399a31f94d Mon Sep 17 00:00:00 2001 From: r00t Date: Sat, 6 May 2017 08:15:16 -0400 Subject: [PATCH 4/8] fixing minor docs bug --- docs/manual/user/fslayout/TEMPLATES.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manual/user/fslayout/TEMPLATES.adoc b/docs/manual/user/fslayout/TEMPLATES.adoc index d036545..db9d92b 100644 --- a/docs/manual/user/fslayout/TEMPLATES.adoc +++ b/docs/manual/user/fslayout/TEMPLATES.adoc @@ -38,7 +38,7 @@ The `EFI/` directory is similar to <> above also, but needs fewer con The `patches/` directory largely control branding of the mini ISO. They are in https://www.gnu.org/software/diffutils/manual/html_node/Unified-Format.html[unified diff^] (or "patch") format. ===== overlay/ -This directory contains *templated* overlays. These are intended to be templated by the user. See <> for more information on how to use this. Remember to suffix your template files with the `.j2` extension. +This directory contains *templated* overlays. These are intended to be templated by the user. See <> for more information on how to use this. Remember to suffix your template files with the `.j2` extension. ===== pre-build.d/ This directory contains *templated* overlays. These are intended to not be managed by the user, as they handle configuration necessary for building an ISO. See <> for more information on this. From 3bcc023c01085208c131f5cca8dad73886161bac Mon Sep 17 00:00:00 2001 From: r00t Date: Sat, 6 May 2017 08:25:56 -0400 Subject: [PATCH 5/8] cleaning up some layout --- extra/pre-build.d/etc/issue | 90 ------------------------- extra/templates/overlay/etc/hostname.j2 | 1 + 2 files changed, 1 insertion(+), 90 deletions(-) delete mode 100644 extra/pre-build.d/etc/issue create mode 100644 extra/templates/overlay/etc/hostname.j2 diff --git a/extra/pre-build.d/etc/issue b/extra/pre-build.d/etc/issue deleted file mode 100644 index a891f34..0000000 --- a/extra/pre-build.d/etc/issue +++ /dev/null @@ -1,90 +0,0 @@ - -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0dc,.. ..;cxKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMW0d:'. .,cx0WMMMMMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMNx:. .';cldxkkOOOOkkxdl:,.. .ckNMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMKl. .;okKXXXXXXXXXXXXXXXXXXXXXX0xl;. 'oXMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMXl. .:d0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0d;. .dNMMMMMMMMMMMMMM -MMMMMMMMMMMM0; .cOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXKk: :KMMMMMMMMMMMM -MMMMMMMMMMO' 'xKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXKd. ,KMMMMMMMMMM -MMMMMMMMX, ,OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx' :NMMMMMMMM -MMMMMMMd .kXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXd. .kMMMMMMM -MMMMMN' oKKxl:;,;:lkKXXXXXXXXXXXXXXXXXXXXXXXX0dl:;,;:ld0XXXXXXXXXXKc ;WMMMMM -MMMMK. .O0; ':ool:. ;kXXXXXXXXXXXXXXXXXXX0l. .,coooc' .c0XXXXXXXXXk. .NMMMM -MMMK. 'Kx cNMMMMK. ,0XXXXXXXXXXXXXXXKc :0MMMMMMk. cKXXXXXXXX0. .NMMM -MMN. 'Kd kMMMMMM' .OXXXXXXXXXXXXX0. 'XMMMMMMMN 'KXXXXXXXX0. .WMM -MW. .K0 xMMMMMMMd .KXXXXXXXXXXXK' ;WMMMMMMMMM: 'KXXXXXXXX0. ;MM -Mo OXc .MMMMMMMMMXo:;ckN. dXXXXXXXXXXXd NMMMMMMMMMMM0l::l0N dXXXXXXXXXx xM -N :XX, :MMMMMMMMMMMMMMMM; :XXXXXXXXXXX; ,MMMMMMMMMMMMMMMMMMM' :XXXXXXXXXX, .M -d OXX; ,MMMMMMMMMMMMMMMM, :XXXXXXXXXXX: ,MMMMMMMMMMMMMMMMMMM' :XXXXXXXXXXx O -, .XXXx dxxxxxxxxxxxxxxd xXXXXXXXXXXXx dxxxxxxxxxxxxxxxxxd xXXXXXXXXXXK. c -. :XXXXc'''''''''''''''''':XXXXXXXXXXXXXc'''''''''''''''''''''cXXXXXXXXXXXX, ' - lXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX: . - lXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; . -. :XXXXXK0000000000000000000000000000000000000000000000000000KXXXXXXXXXXXXX, ' -, .XXXXXk .KXXXXXXXXXXXK. c -x OXXXXXKKo .............................................. lXXXXXXXXXXXx 0 -W. ;XXXXXXXO ............................................... .XXXXXXXXXXX' .M -Md kXXXXXXX, .............................................. KXXXXXXXXXd OM -MM, .0XXXXXX0. .............................................. KXXXXXXXXO cMM -MMN. .KXXXXXXk ............................................ ;XXXXXXXX0. ,WMM -MMMX. .0XXXXXXk .........................'''............... .0XXXXXXXO. 'WMMM -MMMMX. .kXXXXXXO. .................,cdkO0KKK0Oxo:'........ .kXXXXXXXd ,WMMMM -MMMMMW; cKXXXXXK; .............'ckKKKKKKKKKKKKKK0x;.... '0XXXXXX0; cWMMMMM -MMMMMMMk. .dXXXXXXx. ..........:OKKKKKKKKKKKKKKKKKKKo. .oXXXXXXKl .0MMMMMMM -MMMMMMMMNc .xXXXXXKo. .......lKKKKKKKKKKKKKKKKKK0o' .dKXXXXXKd. lWMMMMMMMM -MMMMMMMMMMK; .oKXXXXKd' ...:KKKKKKKKKKKKKKK0xc' .:kXXXXXX0l. cXMMMMMMMMMM -MMMMMMMMMMMMXc ;xKXXXX0o,. .;ldxkkOkkxol:'. .,lOXXXXXXKd, .lNMMMMMMMMMMMM -MMMMMMMMMMMMMMWx, ,lOXXXXX0xl:,.........';cok0XXXXXXKkl' ;kWMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMNx, .'cdOKXXXXXXXXXXXXXXXXXXXXKOd:' ;kWMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMW0o, .';:loddxxxxddol:,.. .,o0MMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMMXko:'. .':oONMMMMMMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0dc;'......,:lx0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM - ':ox0KXXK0koc'. - .;ok000kxollcccclodxOKXKko;. - ;d00dc'. .;lkXKd;. - .o0Oc. .,codkO0KKKKK0Okxdl;'. .;dXKo' - .oKx, .:d0XXXXXXXXXXXXXXXXXXXXXXXKkl,. .c0Nd. - ,0O; .:xKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXOl' .oN0; - ;Kx. ;xKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0l. :KX: - ,Kx. .lKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXk, ;XX, - k0. .oKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXO, oWO. - ,No :KXX0Okk0XXXXXXXXXXXXXXXXXXXXXXXXXXXK0Okk0KXXXXXXXXXXXk. .KW; - cN, .kKl' ... 'l0XXXXXXXXXXXXXXXXXXXXk:. ... .;dKXXXXXXXXK: kMo - oN. '0d. c0WMMWo ;0XXXXXXXXXXXXXXXKo. 'dKWMMMX, .cKXXXXXXXXo xMd - lW. 'Kl .KMMMMM: xXXXXXXXXXXXXX0' ,KMMMMMMM. .OXXXXXXXXx xMd - ;M; .Kd .NMMMMMMl kXXXXXXXXXXXK. lMMMMMMMMM. .OXXXXXXXXd 0M: - Nx 0X. dMMMMMMMMk;..;dl 'XXXXXXXXXXXc 'MMMMMMMMMMWd,..:Oc ,XXXXXXXXX: .WW. - dW. lXK KMMMMMMMMMMMMMMK KXXXXXXXXXX. dMMMMMMMMMMMMMMMMM0 KXXXXXXXXK. dMk - Wx KXK 0MMMMMMMMMMMMMMK KXXXXXXXXXX. xMMMMMMMMMMMMMMMMM0 KXXXXXXXXXc .MM. -:M; ;XXX; ,xxxxxxxxxxxxxx: 'XXXXXXXXXXXc 'xxxxxxxxxxxxxxxxx; ,XXXXXXXXXXO KMl -xM. oXXX0,,,,,,,,,,,,,,,,,,kXXXXXXXXXXXK;,,,,,,,,,,,,,,,,,,,,OXXXXXXXXXXX. xMO -0M xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. oMK -0M dXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. oMK -xM. lXXXXXkdddddddddddddddddddddddddddddddddddddddddddddddddKXXXXXXXXXXXK kMk -:Mc 'XXXXXc'. :XXXXXXXXXXXx XMc - W0 OXXXXXX0 ............................................ OXXXXXXXXXX; ,MM. - oM' ,XXXXXXX, ............................................ oXXXXXXXXXO 0Mx - NK dXXXXXXO ........................................... lXXXXXXXXK. ;MN. - ,Md kXXXXXXd .......................................... xXXXXXXXX; .NM; - cMl kXXXXXXo ......................................... .KXXXXXXK; .XMl - lMl dXXXXXXd ..................':lodxxdol:'......... .0XXXXXXK' .XMo - :Wx :KXXXXXk. ..............,lkKKKKKKKKKKKKkc'.... .0XXXXXXk. 'NMc - .XK. .xXXXXXK: ..........'oKKKKKKKKKKKKKKKKK0l.. lKXXXXX0; oMN' - dWo .xXXXXXO; .......,OKKKKKKKKKKKKKKKKKkc. .c0XXXXX0c 'KMx - .0Nc .oKXXXXO:. ...'0KKKKKKKKKKKKKK0d:. ,xKXXXXXO: .OM0' - ,0No. ;xKXXXKx:. .;ldxkOOkkxol;'. 'cxKXXXXX0l. ,OMK; - 'kWk, ,o0XXXXKko:,.........,:ldOKXXXXXKkc. .lXMO, - .cKNx; .,cxOKXXXXXXXXXXXXXXXXXXKko:. .lKMKl. - .cOWKd;. ..,;cllooollc:;'. 'ckNM0c. - 'lONW0xl;.. .,:okXMNOo, - .,cdOXWMWNXKK00KKXNMMWXOdc,. - .,cokO00Okdc,. - - - - -bdisk -\d \t -\4 -\4{tun0} -https://bdisk.square-r00t.net/ diff --git a/extra/templates/overlay/etc/hostname.j2 b/extra/templates/overlay/etc/hostname.j2 new file mode 100644 index 0000000..575e401 --- /dev/null +++ b/extra/templates/overlay/etc/hostname.j2 @@ -0,0 +1 @@ +{{ bdisk['uxname']| }}.loc.lan From f89283a3016b94dce371815a5c44d2c875427b01 Mon Sep 17 00:00:00 2001 From: r00t Date: Sat, 6 May 2017 10:01:15 -0400 Subject: [PATCH 6/8] fixing hostname --- extra/templates/overlay/etc/hostname.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/templates/overlay/etc/hostname.j2 b/extra/templates/overlay/etc/hostname.j2 index 575e401..0510d37 100644 --- a/extra/templates/overlay/etc/hostname.j2 +++ b/extra/templates/overlay/etc/hostname.j2 @@ -1 +1 @@ -{{ bdisk['uxname']| }}.loc.lan +{{ bdisk['uxname']|lower }}.loc.lan From fae0a53034ed02ffb840944eb9c127df9138f8df Mon Sep 17 00:00:00 2001 From: r00t Date: Sat, 6 May 2017 11:11:02 -0400 Subject: [PATCH 7/8] gorram it. --- bdisk/bsync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bdisk/bsync.py b/bdisk/bsync.py index d04e708..c395709 100755 --- a/bdisk/bsync.py +++ b/bdisk/bsync.py @@ -37,7 +37,7 @@ def http(conf): httpfiles['VERSION_INFO.txt'] = 'VERSION_INFO.txt' if 'x86_64' in arch: httpfiles['boot/{0}.64.kern'.format(bdisk['uxname'])] = '{0}.64.kern'.format(bdisk['uxname']) - httpfiles['boot/{0}.64.img'.format(bdisk['uxname'])] = '{0}.32.img'.format(bdisk['uxname']) + httpfiles['boot/{0}.64.img'.format(bdisk['uxname'])] = '{0}.64.img'.format(bdisk['uxname']) if 'i686' in arch: httpfiles['boot/{0}.32.kern'.format(bdisk['uxname'])] = '{0}.32.kern'.format(bdisk['uxname']) httpfiles['boot/{0}.32.img'.format(bdisk['uxname'])] = '{0}.32.img'.format(bdisk['uxname']) From bf3dc2bb4c970f0a7afd0a4feb69ae0563b4c1d3 Mon Sep 17 00:00:00 2001 From: r00t Date: Sat, 6 May 2017 11:21:40 -0400 Subject: [PATCH 8/8] ...okay. final tagging, promise. that was a legit bug. --- bdisk/bsync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bdisk/bsync.py b/bdisk/bsync.py index c395709..1f6573b 100755 --- a/bdisk/bsync.py +++ b/bdisk/bsync.py @@ -48,7 +48,8 @@ def http(conf): fulldest = '{0}/{1}'.format(httpdir, destpath) parentdir = os.path.split(fulldest)[0] os.makedirs(parentdir, exist_ok = True) - shutil.copy2('{0}/{1}'.format(prepdir, k), '{0}/{1}'.format(httpdir, httpfiles[k])) + if os.path.lexists('{0}/{1}'.format(prepdir, k)): + shutil.copy2('{0}/{1}'.format(prepdir, k), '{0}/{1}'.format(httpdir, httpfiles[k])) for root, dirs, files in os.walk(httpdir): for d in dirs: os.chown(os.path.join(root, d), uid, gid)