Commit Graph

70 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
3a04f2adaf
rpm: make old root.img unlink explicit
Co-authored-by: ttasket <tasket@openmailbox.org>
Closes #1
2018-12-02 16:42:48 +01:00
Marek Marczykowski-Górecki
a78fc2ddbb
Pretend the template rpm is build the standard way
This allows to reuse standard update-repo-* and sign-* make targets.

QubesOS/qubes-issues#3935
2018-06-04 02:19:32 +02:00
Marek Marczykowski-Górecki
941d7ec448
rpm: avoid removing unrelated files on template reinstall
Fixes QubesOS/qubes-issues#3294
2018-03-21 00:47:42 +01:00
Marek Marczykowski-Górecki
fcc771715a
Remove more intermetiate files when DISCARD_PREPARED_IMAGE=1 2017-09-26 18:52:38 +02:00
Marek Marczykowski-Górecki
78a2699371
rpm: drop dependencies on dom0 stuff
Installing template should _not_ be a way to install all the Qubes dom0.
On the other hand, those dependencies prevent template installation from
a VM - through Admin API in Qubes 4.0
2017-06-25 15:23:32 +02:00
Marek Marczykowski-Górecki
bb836e5d46
Call qvm-template-postprocess if present instead of internal script
Actions required after template installation differs between Qubes
releases. Lets keep template builder universal and just call appropriate
command provided by version-specific component (probably
qubes-core-dom0 package), if present. Otherwise use old script (for
Qubes before 4.0).

Add --really parameter to prevent misuse. This tool may override
template data without further confirmation.

QubesOS/qubes-issues#2412
2016-11-02 06:14:34 +01:00
Marek Marczykowski-Górecki
d976ffd3a6
Make template builder working on Debian
1. Use bash explicitly where required
2. Don't use bash-isms where not.

QubesOS/qubes-issues#1907
2016-04-20 10:23:36 +02:00
Marek Marczykowski-Górecki
ff22e7d199
rpm: remove icons on package uninstallation 2015-11-26 06:27:47 +01:00
Marek Marczykowski-Górecki
5a2b7a4000 rpm: fix menu directory icon setting 2015-07-08 05:10:02 +02:00
Marek Marczykowski-Górecki
5091ccc023 rpm: fix post-installation script - call relevant parts as user
... or add --force-root option
2015-05-17 00:01:09 +02:00
Marek Marczykowski-Górecki
d246b84912 Cut the template of the network for initial appmenus retrieval
The user have no way to set anything before starting the template for
the first time. Especially firewall settings, netvm etc. So to not
expose the template to the outside world, disable networking there.
2015-03-18 20:05:44 +01:00
Marek Marczykowski-Górecki
efd762ec06 Add workaround for bug in qvm-sync-appmenus
qvm-sync-appmenus did not regenerated appmenus for the template itself,
only dependent VMs. Do it manually here. When used with fixed
qvm-sync-appmenus this will regenerate the appmenus twice, which should
be harmless.

This commit should be reverted when new qvm-sync-appmenus got released
and appropriate Require line added here.
2015-03-11 07:26:29 +01:00
Marek Marczykowski-Górecki
3092bb2d71 Add support for plugins, move all distribution-specific code there
While at it, also change name of local repo to pkgs-for-tmplate (was
yum_repo_qubes).
2015-03-10 23:57:13 +01:00
Marek Marczykowski-Górecki
518b0a39da Fix creating volatile.img 2015-03-10 23:57:13 +01:00
Marek Marczykowski-Górecki
f22a06d8ad Store root image named 'root.img' inside of tar archive
Prevent renaming at installation, this will make the process cleaner.
2015-03-10 23:57:12 +01:00
Marek Marczykowski-Górecki
c9809c7d6e Minimize data contained in the template package
1. Remove appmenus - regenerate them at installation time (start the
   template for that)
2. Remove volatile.img - regenerate it at installation time

This way, the only real data carried in template rpm is root.img.
2015-03-08 23:55:36 +01:00
Marek Marczykowski-Górecki
a97beee8cb Do not duplicate clean-volatile.img.tar for each distribution 2015-01-30 19:16:22 +01:00
Marek Marczykowski-Górecki
ce319754e2 Preliminary support for building in DispVM 2015-01-30 15:35:00 +01:00
Marek Marczykowski-Górecki
009df31f74 Include (empty) apps.tempicons directory (#896)
In the future we could create it (and populate) in firstboot, but for
now provide at least empty directory.
2014-09-09 22:04:45 +02:00
Victor Lopez
97730dcf62 Avoid 100MB reserved space in private ext4 partition
The ext4 reserved space is necessary for root partitions, but in the
private.img data partition, it is wasted space (accessible only to root
processes), which means losing 100 MB of the default 2GB.

From mkfs.ext4 man page:
"-m reserved-blocks-percentage Specify the percentage of the filesystem
blocks reserved for the super-user." ... "The default percentage is 5%."
2014-09-05 22:41:14 +02:00
Marek Marczykowski-Górecki
8ebdc8ad65 rpm: Prevent upgrades of template pkg
Templates are meant to upgrade using its own package manager.
Upgrade template package itself would destroy all th user
customizations.
2014-04-22 19:43:35 +02:00
Marek Marczykowski-Górecki
d03d58a594 spec: fix %post deps
Template %post uses both qubes-core-dom0-linux (for appmenus handling
scripts) and qubes-core-dom0 (for qvm-add-template and qvm-template-commit).
2014-04-08 04:59:15 +02:00
Marek Marczykowski-Górecki
6f493908c5 cleanup on template uninstall
Remove files created during template lifetime.
2013-12-13 04:18:25 +01:00
Marek Marczykowski
fc7c9c7038 rpm: set sgid for template directory
Make sure that contents belong to qubes group.
2013-05-20 01:36:45 +02:00
Marek Marczykowski
6867aa8ef0 rpm: force offline mode if installing inside of chroot 2013-05-18 05:59:04 +02:00
Marek Marczykowski
4c8f1755d9 Merge branch 'archlinux'
Conflicts:
	.gitignore
	Makefile
	build_template_rpm
	templates.spec
2013-04-28 06:08:18 +02:00
Marek Marczykowski
a9477ac200 spec: fix paths and requires according to new components layout 2013-03-25 16:20:49 +01:00
Marek Marczykowski
99e9e0351d makefile: Fix building many different template rpm packages at the same time
Store build_timestamp for each built template to not mix them up in
update-repo-installer.
2013-02-24 13:33:57 +01:00
Marek Marczykowski
add64aa2e4 Support different versions of the same distribution
Split $DIST to distribution name and version (builder_setup script) and search
for scripts first $DIST-specific, but then for given distribution.

Also move out some Fedora-specific things to scripts_fc17.
2013-02-16 21:21:05 +01:00
Marek Marczykowski
d244c5b7d1 spec: provide 'qubes-template' virtual package 2013-02-16 20:44:04 +01:00
Marek Marczykowski
dac766a085 spec: minor whitespace fix 2013-02-16 20:44:04 +01:00
Marek Marczykowski
54e6156444 spec: provide 'qubes-template' virtual package 2013-02-06 14:16:08 +01:00
Marek Marczykowski
563b8f68b9 spec: minor whitespace fix 2013-02-06 14:16:08 +01:00
Olivier Medoc
7e17847377 template_builder: made make scripts OS independent.
An important note is that each OS script need to setup itself its own chroot environment (like creating /proc...).
2013-02-06 02:53:30 +01:00
Marek Marczykowski
fe2f66dfc7 spec: ensure right install order
Execute %post after installation of tar and qubes-core-dom0
2013-01-23 01:29:54 +01:00
Joanna Rutkowska
fcf4b4b86f Fix automatic template versioning (#667) 2012-11-06 10:43:45 +01:00
Marek Marczykowski
7d55c9b24f remove dispvm files - now part of qubes-core-vm package 2012-07-12 14:32:12 +02:00
Marek Marczykowski
2b1d34b964 appmenus: include whitelist for NetVM (#538) 2012-05-01 02:09:35 +02:00
Marek Marczykowski
9ea5d3d0c6 spec: fix package removing 2012-01-06 13:25:14 +01:00
Marek Marczykowski
0b42c5d012 Create dummy volatile.img file
Some rpm versions doesn't understand %ghost macro
2011-09-26 21:08:28 +02:00
Marek Marczykowski
eb0fd31bf4 Merge branch 'master' of ssh://git.qubes-os.org/var/lib/qubes/git/joanna/template-builder
Conflicts:
	appmenus/whitelisted-appmenus.list
2011-07-11 20:43:10 +02:00
Marek Marczykowski
0e6508982d Include templates for all appmenus in package (#266)
Convert it to actual appmenus at rpm installation stage - respecting provided
whitelist.
2011-07-11 20:39:58 +02:00
Joanna Rutkowska
7c37e25aa1 Use a script for filling the rpms_to_install symlinks automatically
The actual version of core, gui, and xen packages to use are given in version_{core,gui,xen} files
2011-07-02 14:38:46 +02:00
Marek Marczykowski
6f88828cf4 Remove kernel from template - now distributed as separate package 2011-06-30 01:22:58 +02:00
Marek Marczykowski
7987c16828 Do not include xen config files in template package
There are autogenerated at VM start by Qubes core scripts.
2011-06-23 23:31:12 +02:00
Marek Marczykowski
952daea76c Appmenus: Include directory template for TemplateVM (#225) 2011-04-19 16:52:00 +02:00
Marek Marczykowski
8641e11c77 Include TemplateVM appmenus _template_ in package (#225)
Needed for new TemplateVM - after clone
2011-04-19 15:57:39 +02:00
Marek Marczykowski
dd0a59ba28 Merge branch 'master' of ssh://git.qubes-os.org/var/lib/qubes/git/joanna/template-builder
Conflicts:
	rpms_to_install_x64/qubes-core-appvm
	rpms_to_install_x64/qubes-core-commonvm
	rpms_to_install_x64/qubes-core-netvm
	rpms_to_install_x64/qubes-core-proxyvm
	templates.spec
	vm_conf_files/standalone-template.conf
2011-04-19 14:11:56 +02:00
Marek Marczykowski
ceecde6348 Add root-cow.img to rpm (as ghost)
To remove it on rpm -e
2011-04-05 15:28:18 +02:00
Marek Marczykowski
2015b4fddd Fail template package remove if there are VMs based on it (#154)
And remove DispVM based on it.
2011-04-05 15:20:10 +02:00