Commit Graph

79 Commits

Author SHA1 Message Date
Michael Shigorin
2d257a425b lists, doc: introduce @IA32, @X86 archdep macros
The former ("proper 32-bit x86 package form") has been suggested
by zerg@ quite some time ago but the desired interface wasn't clear
at the moment IIRC; a quiet morning helped me realize that

  ICAClient-preinstall@IA32

is rather more readable than

  ICAClient-preinstall@i586 i586-ICAClient-preinstall@x86_64

so here's the (trivial) implementation; and I actually needed
the latter, @X86 ("any-x86") to mark x86-only packages so

  xorg-drv-intel@X86

is now equivalent to

  xorg-drv-intel@i586 xorg-drv-intel@x86_64
2018-03-14 08:45:07 +03:00
Michael Shigorin
31ecda7272 docs update
Another minor facelift:
- s/ALT Linux/ALT/gc (where applicable);
- s/7.0/8.0/g;
- 2017;
- e2k;
- links.
2017-06-09 19:31:42 +03:00
Michael Shigorin
f293239d5b build-vm: try system tar2fs first
It's at least removing the very obvious user->root
attack through (maliciously) modifying bin/tar2fs
and waiting for it to be run; if mkimage-profiles
is installed system-wide as a package, the script
from /usr/share/mkimage-profiles will be tried so
those willing to allow vm/* build to themselves
can provide for a passwordless sudo (as described
in doc/vm.txt) to run a root-only writable script,
not user-writable.

Still not perfect but a step away from the abyss.
2016-11-07 19:47:53 +03:00
Michael Shigorin
15f0b520f1 build.mk: added AUTOCLEAN variable
This performs distclean upon successful image build.

Suggested-by: Andrey Cherepanov <cas@altlinux.org>
2016-09-12 18:48:48 +03:00
Michael Shigorin
47d38cb1c1 assumptions.txt: mention REPORTS
It wasn't clear enough what the whole tracing affair is for;
thanks ykos@ for spelling it aloud.
2016-06-16 15:16:31 +03:00
Michael Shigorin
3f53a7a3f3 debug.txt: uncosmetic fix
A fellow got confused by the original header somehow,
let's spell this a lil' bit differently.
2016-02-15 21:27:33 +03:00
Michael Shigorin
522eff5708 README, pkglists.txt: minor fixes
Thanks cas@ and Ivan Khakhaev for feedback!
My docs are clearly not the best in town,
please help bring those into shape :-)
2016-02-10 16:49:17 +03:00
Michael Shigorin
93f9a2080a doc: added mkimage-profiles(7)
This initial page might lack a lot, don't be shy to blame me!
(thanks ldv@ for having skimmed it through though)
2016-02-08 22:51:55 +03:00
Michael Shigorin
97eee80f27 style.txt: avoid merge commits!
Merge commits aren't going to be merged upstream
for these break all sorts of git tools including
log -p, blame, bisect, etc (or make their use less
convenient).
2016-01-10 13:34:36 +03:00
Michael Shigorin
41d2644ebe style.txt: slightly better call for documenting
Sometimes we tend to "just" translate the code to human
which doesn't really help; what usually helps is noting
down what the code author intended to implement or fix,
and what was the case for that.
2016-01-10 13:31:38 +03:00
Michael Shigorin
f1704f27dd mkimage-profiles.asciidoc: index optimization
The new archdep part has been initially included into
"The Basics" chapter which it doesn't really belong to,
let's move it into Addendum.

NB: I'd better try building a package and skimming over
    at least the index upon having modified docs next time.
2015-05-05 15:58:43 +03:00
Michael Shigorin
15c75c1092 archdep.txt: these are quotes
Build process would choke on "unescaped" stuff otherwise,
and these blocks should be blockquotes in the first place.
2015-05-04 23:55:11 +03:00
Michael Shigorin
ac5dbb4bba pkg.in/lists: archdep suffices for pkglists
This is an initial implementation of architecture dependent
contents handling for package lists more or less in the vein
of mkimage-profiles-desktop's one *but* using suffix part to
filter words in or out *not* prefix part to replace it with
a comment marker (thus filtering out lines).

The syntax should be pretty obvious:

  a b@i586 c@x86_64

will get "a b" given ARCH=i586 and "a c" given ARCH=x86_64;
please see doc/archdep.txt for a more elaborate description
and a conversion script.
2015-04-20 23:09:55 +03:00
Michael Shigorin
3cb4d9ae6a introduce QUIET variable
This one reduces the amount of output that's only
interesting when one is actually watching the console
during builds (at least the early stage) -- these tend
to look boilerplate and be useless when inspecting the
output of a large batch build like [[regular]] one.
2015-04-02 20:48:42 +03:00
Michael Shigorin
c8a7e55cf8 QUICKSTART: it's p7/t7 or later now
0.6.3 has introduced some changes that were deemed incompatible
with t6/p6 branches; it should be possible to restore compatibility
at least for non-EFI images but the effort required hasn't been
up for grabs so far.

See also https://bugzilla.altlinux.org/30474
2014-11-16 21:34:36 +03:00
Michael Shigorin
b5ff2b24b4 initial l10n feature
Aimed at live images at first but should cover installers as well.

This has been brewing for quite some time and while the proper
implementation is considerably more complex (and hard to do)
looks like there's demand for the particular important use case,
namely LiveCDs for Russian users, so this code has been shared
with a few people before merge.
2014-11-14 15:07:09 +03:00
Michael Shigorin
8faf140777 kernel, stage2: rearranged initrd hooks
stage2 has been thinking it's synonymous with propagator
and used to usurp kernel's belongings either; carefully
tear scripts apart so that kernel feature makes sure
initrd gets generated, and stage2 (which is still all
about propagator) cares for its bits.
2014-09-19 20:53:24 +04:00
Michael Shigorin
1eda19cff8 doc: better clean target
A bunch of intermediate files would be sitting around otherwise.
2014-08-12 13:15:08 +04:00
Michael Shigorin
e0004a2621 added docs-publish toplevel goal
This one is long overdue as I keep forgetting to update
the published copy of generated documentation all the time.

Note that you must pass DOCS_PUBLISH (as a local directory
or host:dir suitable for rsync/ssh) via make arguments,
environment or ~/.mkimage/profiles.mk file.
2014-06-24 15:29:10 +04:00
Michael Shigorin
0fcb491500 mkimage-profiles.asciidoc: tac the goals
The goals listed are pretty important to have them ordered
by priority; collaboration is definitely more important
than dynamic range of release managers' experience.
2014-03-06 00:35:10 +04:00
Michael Shigorin
3f547e2504 documentation: use paths relative to toplevel dir
This change is done to reduce ambiguity in some cases;
the previous intention has been to ease navigation when
staying in a particular directory, now it's been changed
in favour of convenient toplevel `git grep' in fact.

Both variants have their pros and cons, I just find myself
leaning to this one by now hence the commit.  Feel free to
provide constructive criticism :)

Some path-related bitrot has also been fixed while at that.
2014-03-05 21:36:30 +04:00
Michael Shigorin
f30fb765b6 mkimage-profiles.asciidoc: change example target
icewm.iso is an installer needing further hassle to try;
rescue.iso is immediately useful OTOH.
2014-03-05 17:55:25 +04:00
Michael Shigorin
364488e588 mkimage-profiles.asciidoc: fix formatting
"Goals" paragraph ended up with all of list items on a single line;
a colon has been missing in another one.
2014-03-05 17:55:25 +04:00
Michael Shigorin
45842a0773 pkglists.txt: s/installer/install2/
It was less clear/greppable what "installer" refers to...
or maybe so it seems to me.
2013-11-24 21:29:04 +04:00
Michael Shigorin
50c72650e2 mkimage-profiles.asciidoc: fix list formatting
It got missed somehow that it's a bullet list indeed...
2013-10-09 12:07:41 +04:00
Michael Shigorin
674f7db26e clean.mk: allow to forbid cleanup explicitly
The behaviour that sort of settled didn't actually follow
the principle of the least surprise when one really wanted
to have BUILDDIR available for inspection; DEBUG=2 would be
effective to achieve that but CLEAN=0 would not.

Thanks led@ for spotting and reporting this.
2013-08-13 22:32:27 +04:00
Michael Shigorin
d7689f30c7 tar2vm: rewrote as tar2fs
Overview of the changes:
- ARM support: separate ext2 /boot, no LILO
- avoid race condition with devmapper
- trap ERR so that -e in shebang doesn't result in extra cleanup hassle
- configurable root filesystem type (ext4 by default)
- jumps through parted hoops

Details:

1. LILO is x86-specific while the rest of the script can be used
   to prepare e.g. Marvell ArmadaXP or CuBox images; we can generally
   count on uboot supporting ext2 for relatively sane platforms but
   not ext4 that would be a better root filesystem performance-wise.

2. Apparently /dev/mapper/loopXpY can be still missing at the time
   when kpartx returns and pop up a bit later... sit there, wait
   and check for it.

3. If something went wrong with any command of the script it would bail out
   due to -e in shebang; it is now better to clean up the loopback device
   and its mappings in this situation either.

4. One size doesn't fit all, really.

5. The parted sizing was sloppy as in broken, now it's just half insane.
   Someone's decision to stick units and auto-alignment knobs into
   a single one was apparently hilarious...

   http://www.gnu.org/software/parted/manual/parted.html#unit

Manual loop/dm cleanup is described in documentation just in case.

/boot size meter is suboptimal in terms of additional I/O incurred,
will be most likely rewritten to make use of advance "du -s".
2013-06-17 19:29:11 +04:00
Michael Shigorin
5b21100bed README update
These have been proofread somewhat to correspond
to the current state of affairs; a missing one
was added for fonts feature.
2013-06-10 19:43:31 +04:00
Michael Shigorin
9c6b706576 isohybrid: drop postprocessing, xorriso is enough
The original mkisofs would only care for the proper ISO9660 image
but we've switched to xorriso which is able to perform the hack
to yield UEFI hybrid images; thus no need for the postprocessing.

Requires mkimage >= 0.2.5 and xorriso (obviously).
2013-03-25 14:13:42 +04:00
Michael Shigorin
6d8cbcb61d assumptions.txt: clarified sisyphus/branch status
Folks have been wondering already whether e.g. t6 breakage
qualifies as a bug; it does indeed unless the "broken" part
depends on the features not available with that branch yet,
e.g. EFI support.
2013-02-04 22:18:26 +04:00
Denis Smirnov
2ff873eb73 Add .gitignore for docs 2013-01-20 20:27:19 +04:00
Michael Shigorin
2e1e4d6f09 assumptions.txt: ported to make-3.82 already
That is, p6/t6 continue to use 3.81 (while providing 3.82
alongside with it), and Sisyphus has moved to 3.82 before
p7/t7.  We support both versions by now.
2012-12-03 17:18:27 +02:00
Michael Shigorin
6694882715 doc/Makefile: refactoring
The initial sketch did work but was somewhat redundant
while lacking the knob conveniently change output directory
as well as means to get it cleaned up.
2012-11-05 17:20:12 +04:00
Michael Shigorin
12de346ddd asciidoc: use dejavu fonts
Thanks torabora@ for the tip along with reference to his
http://altlinux.org/asciidoc page.
2012-11-05 17:20:12 +04:00
Michael Shigorin
4e0cd6bdf6 asciidoc: moved support files into doc/
Docs should live happily together, after all,
and toplevel should be more or less uncluttered :)

Adjusted/rewrote as appropriate as well.
2012-11-05 17:20:12 +04:00
Mike Radyuk
85217cd11d added asciidoc support 2012-10-31 21:22:06 +02:00
Michael Shigorin
e52e21781f actually useful vm/icewm
See http://www.opennet.ru/openforum/vsluhforumID3/86239.html#1
for a query that has led to this one; in particular,
- xdm dropped (won't log in root and there are no users yet);
- network is brought up and configured via DHCP by default;
- apt-get works out-of-box;
- default image size is twice the chroot size.
2012-09-03 19:16:50 +03:00
Michael Shigorin
eb3df648a2 minor documentation facelift
A few more items were asking for some attention.

In particular, build examples should start with
the most basic, error-proof and quick targets.
2012-08-11 22:56:41 +03:00
Michael Shigorin
d646e71906 doc/qemu.txt: mostly automated
This part of docs was pleading to put it into a small shell
script; it was done to facilitate kas@' debugging efforts
so that qemu-system-ppc might eventually get fixed, thus
livecd-qemu-arch package now "obsoletes" this file.
2012-08-11 22:56:24 +03:00
Michael Shigorin
0d859e70fc image.in/Makefile: support image STATUS
Another feature suggested by Michael Radyuk (torabora):
some images are known alpha/beta quality, it's more handy
to just state this at the build time than to rename by hand.
2012-08-06 23:58:26 +04:00
Michael Shigorin
3a8af6b55d lib/clean.mk: post-build cleanup revisited
The prerequisites for a cleanup after a successful build
were somewhat weird at this point; now the rules are:
- if DEBUG level is more than 1 or CHECK is set, don't do it;
- otherwise if at least one of the following conditions is true:
  + there's more than one target being built in a row;
  + the build was run by e.g. alterator-mkimage;
  + metaprofile directory is read only
  ...then do a distclean.

If these are still weird or feel unsuitable for profile hacking,
drop me a note (or a patch).
2012-07-30 19:59:41 +04:00
Michael Shigorin
1ee997e832 initial PowerPC support
As it happens, adding another architecture required almost no changes;
native 32-bit ppc build took only ARCH and a repo, qemu-ppc one still
has problems (/.host/entry hangs while unpacking setup for fakedata).

Proof of concept on a QS22:

  $ make ve/bare.tar.gz
  ** ARCH: ppc
  /bin/sh: rpmvercmp: command not found
  21:41:01 cleaning up
  21:41:03 initializing BUILDDIR: build/
  21:41:03 preparing distro config
  21:41:05 starting image build (coffee time)
  21:42:48 done (1:42)
  ** image: $TMP/out/bare-20120716-ppc.tar.gz [21M]
2012-07-16 21:20:12 +03:00
Michael Shigorin
d31a2555bd non-native ARM support via qemu
mkimage and hasher can make use of qemu to run
non-native binaries while working on the chroots;
thanks kas@, manowar@ and sbolshakov@ for implementing
this functionality as well as providing nice examples
through mkimage-profiles-arm and mkimage-profile-armrootfs.

This required the architecture check to be added since baking
a tarball with "arm" as its specified arch and x86_64 inside
isn't particularly good thing to let slip through; however
the implementation is quite fragile, bugreports and patches
are seriously welcome.

NB: APTCONF evaluation order between lazy make and nimble shell
turned out to be quite a delicate issue in this particular case.
2012-07-16 18:20:55 +03:00
Michael Shigorin
3c26cc869d initial native ARM support
The only thing to be fixed was setarch(8) symlinks assumption
that is correct for x86 but not for ARM.

There's also some hasher(7) setup to be done:

  mkdir -p ~/.hasher
  echo >> ~/.hasher/config <<-EOF
  def_target=arm
  #cache_dir=$HOME/tmp	# depends on RAM/storage configuration
  EOF

...and of course apt(8) should be properly set up too.

An example PoC build on a CM-A510 board (tmpfs):

  $ make BRANDING=altlinux-centaurus ve/bare.tar.gz
  ** ARCH: arm
  18:10:45 initializing BUILDDIR: build/
  18:10:45 preparing distro config: build/distcfg.mk
  18:10:46 starting image build: tail -f build/build.log
  18:14:49 done (4:02)
  ** image: $TMP/out/bare-20120706-arm.tar.gz [23M]
2012-07-09 21:32:54 +03:00
Michael Shigorin
f8af1c9243 docs updated
Minor tweaks to toplevel docs as well as some doc/*.txt,
doc/variables.txt renamed to doc/params.txt, and a brand new
doc/pkglists.txt is added (thanks manowar@ for his considerations).
2012-06-25 19:29:38 +03:00
Michael Shigorin
8a04d9b656 initial specific VM formats support
Raw disk images are convenient and universal
but there are custom formats like Qemu's qcow2
providing additional features, e.g. copy-on-write
or space savings.  All of this ultimately belongs
to mkimage but in the mean time has been implemented
here as well.
2012-06-25 19:29:38 +03:00
Michael Shigorin
75f7c62bd1 initial build-vm feature
Yes, mkimage-profiles is now able to build VM disk images.
So far the support is pretty basic:

- a single hard drive image with a single partition/FS
- only stock root password is configurable
- LILO is hardwired as a bootloader

The resulting images tend to boot under qemu/kvm though.

Please see doc/vm.txt for the warning regarding additional
privileges and setup required.  This was started back in
February but I still hoped to avoid sudo/privileged helper
(and libguestfs is almost as undistributable as can be)...

Thanks:

- http://blog.quinthar.com/2008/07/building-1gb-bootable-qemu-image-using.html
- Alexey Morarash who reworked that as https://github.com/tuxofil/linsygen
- led@, legion@, vitty@, aen@ for providing advice and inspiration
2012-06-18 21:56:46 +03:00
Michael Shigorin
5dc8001a8a doc/features.txt: clarified the convention
It might be spottable but not immediately obvious that a feature
lives entirely in features.in/FEATURE and every target it provides
is described in the corresponding config.mk; thanks dkr@ for asking.
2012-05-21 21:04:00 +03:00
Michael Shigorin
8cc8d5ff36 doc/variables.txt: tweak CHECK description
It wasn't exactly obvious that the actual image build
isn't started with CHECK=1.
2012-05-21 21:04:00 +03:00
Michael Shigorin
dc93c137d9 docs: more hints on features
It wasn't articulated clearly enough that features are strictly
incremental (while variables can be overridden).
2012-05-21 21:04:00 +03:00