116 Commits

Author SHA1 Message Date
Anton Midyukov
d941104150 mkimage-profiles.asciidoc: include datetime feature 2023-12-08 22:00:25 +07:00
Anton Midyukov
b627d75552 reports: DEBUG must be enabled, CHECK must be disabled
We cannot get IMAGE_OUTPATH from the build.log, and there is currently
no other mechanism. Creating a CHECK directory was a bad idea. It should
have been created only for CHECK, but it was always created when DEBUG
was not enabled. So it's better to just issue a warning.
2023-05-30 22:27:33 +07:00
Anton Midyukov
2f0cf575ec alternatives: initial feature
This feature allows you to set alternatives [1].
For example, like this:

   @$(call add,ALTERNATIVES,/usr/bin/xvt:/usr/bin/xterm)

Also, in the config itself, targets for setting alternatives may already
be predefined. For example, use/alternatives/xvt/% allows you to specify
arbitrary alternatives for xvt:
use/alternatives/xvt/xterm, use/alternatives/xvt/mate-terminal, etc.
However, an alternative must be available.

1. https://www.altlinux.org/Alternatives
2023-03-27 16:00:26 +07:00
Anton Midyukov
363ba22a2e Include README of features to documentation; fix syntax & links in them 2023-03-18 21:57:39 +07:00
Anton Midyukov
b5198e47ba reports.mk: archive report with REPORT=2 2022-12-30 20:04:01 +07:00
Anton Midyukov
59b1ee06eb Add STDOUT option to output log to stdout 2022-12-30 20:04:01 +07:00
Anton Midyukov
e7d0f03959 Set variable BRANCH, if not defined or empty; show $BRANCH
So much clearer and easier.
Thanks glebfm@ for the idea.
2022-12-30 20:02:11 +07:00
Anton Midyukov
41b065336f check conditions of make for equality of variables with an empty value
check conditions of  make  for equality of variables with an empty value
instead of check definition.
A defined but empty variable under all these conditions results errors.
2022-12-30 19:39:43 +07:00
Michael Shigorin
1b5b309bf8 bin/archdep-filter: implement multi-!matching too
This has been clearly lacking while making the previous commit
but the implementation isn't that clear so let it be a separate
step.

The problem requiring the change in subsequent processors
is that these relied upon "@arch" as a flag to be inspected,
and "pkg@!arch1,arch2" on arch2 needs to take out *all* of that
fragment *including* arch1 mention as well.

Part of the cause is difference in handling: "positive" multi-match
would explode its "client" line into multiple lines to filter down
the pipeline, while "negative" multi-match *has* to keep that line
on a similarly single line (otherwise we'd end up with N-1 of those
slipping past the filter for particular architecture thus defeating
the whole purpose of "negative" matching semantics):

$ echo 'pkg@!E2K,mipsel,riscv64' |
  sed -r  ':loop; s/^((([^@]+@!)[^,]+)+),([a-zA-Z0-9_]+)/\1@!\4/; t loop'
pkg@!E2K@!mipsel@!riscv64

I've tried my best to test this specific change but it still might
introduce a regression in some corner case; feel free to report;
looks like there's a space for improvement in m-p's automated
tests department as well.

So now we can do:

  pkg@!ARCHES1,ARCHES2,arch3,arch4

and have pkg excluded on arches mentioned; the previous approach
could only offer explicit whitelists (not that it was entirely
wrong but then again, we have both ExclusiveArch and ExcludeArch
rpmtags in our spec files).
2021-12-04 22:11:50 +07:00
Michael Shigorin
2bc28a9cae bin/archdep-filter: implement multi-matching
This has been inspired by a few commits that cared
for package availability reasons on a particular
architecture; the problem at hand is that pkglists
might need to include groups of packages that are
(un)available on groups of arches, and tackling that
with plain pkg@arch just results in combinatorial
explosion of that matrix.

Arches are handled one-by-one with a few hardcoded
macro substitutions.

Exploding a "pkg@arch1,arch2" string into a set of:

pkg@arch1
pkg@arch2

with subsequent archdep pruning would do the trick;
so here's another sed oneliner that does just that:

$ echo 'pkg@X86,ARM,ppc64le' |
  sed -r ':loop; s/^((([^@]+@)[^,]+)+),([^,]+)/\1\n\3\4/; t loop'
pkg@X86
pkg@ARM
pkg@ppc64le

See-also: 9601a9e7ce92c7a521fd154f59d8e17524f12a95
See-also: 5581dc91ec6f3330c338995d1cdfbca285298011
See-also: http://stackoverflow.com/a/55781741/561921
2021-11-23 23:49:48 +07:00
Anton Midyukov
1c50ff1ffa build.mk, params.txt: add parameter USE_QEMU
The parameter determines use of QEMU or not, if the target architecture
does not correspond to the host architecture.
By default, the parameter is on (Value 1).
For architectures that do not support QEMU (e2k), the option is turned off.
2021-11-22 22:30:57 +07:00
Anton Midyukov
d212dcaba2 README, doc: update urls, authors 2021-10-25 15:13:00 +07:00
Anton Midyukov
553011ed95 doc/profiles.mk.sample: add IMAGEDIR to sample 2021-10-14 15:22:48 +07:00
Anton Midyukov
30be490b24 doc/branch.txt: update example
See also commit: 61f66b08e79d4e8ecd8a56b09a26f8d95234fa45
2021-09-21 21:07:10 +07:00
Anton Midyukov
61f66b08e7 Fixed conditions with variable BRANCH
This allows you to reset the BRANCH variable by specifying the
'BRANCH=' argument on the command line.
2021-09-01 22:52:14 +07:00
Anton Midyukov
b16288bb90 Add COMMON_LISTS variable support by analogy COMMON_PACKAGES
The commit 9969571369478c23c1abc0f5c03364c92ddd255e used this variable
even though it didn't exist yet. A good reason to add this variable.
2021-08-31 00:42:31 +07:00
Anton Midyukov
a9e4244d69 doc/mkimage-profiles.asciidoc: Add author antohami@ 2021-08-23 21:09:07 +07:00
Anton Midyukov
d8e39efc12 lib/build.mk: do not check package lists when CHECK=0
Aptbox is not initialized, so build time is reduced.
2021-08-23 21:09:07 +07:00
Anton Midyukov
a5ec62418f doc/.gitignore: ignore mkimage-profiles.7 2021-07-23 16:11:03 +07:00
Anton Midyukov
31975900dd pkg.in/lists/Makefile, metadep-expander, doc: Add @META suffix for pkglist items
The @META suffix is used to expand the metapackage into a list.
apt asks for the dependencies of such a package and adds them to the
package list after this metapackage.
2021-07-23 16:01:47 +07:00
Anton Midyukov
a3c8d01bdf archdep.txt: add missing description for @ARM macros 2021-07-20 22:14:46 +07:00
Anton Midyukov
d5e87819c9 params.txt: Update description of the LOGDIR parameter
Now it cannot be set from the config ~/mkimage/profiles.mk
2021-06-18 18:06:29 +07:00
Anton Midyukov
32d5b027c9 doc/params.txt: update description of the REPORT parameter
It was fixed in the commit:
187d0a5d5126497f535812ec75596c4fcbb73977
2021-06-18 18:06:29 +07:00
Anton Midyukov
ff2c1ce800 doc/params.txt: Added information on how to set parameters 2021-06-06 19:55:23 +07:00
Anton Midyukov
6fcf9c5b39 params.txt: Add missing parameter descriptions (IMAGEDIR, LOGDIR) 2021-06-06 19:55:23 +07:00
Anton Midyukov
9fba17972c Makefile, params.txt: add new parametr NO_SYMLINK
NO_SYMLINK disables the creation of symlinks for the builded image.
2021-06-06 19:55:23 +07:00
Anton Midyukov
1d598f14b8 doc/Makefile: not clean .fop.xconf
.fop.xconf needed for building pdf.
2021-06-06 19:15:17 +07:00
Anton Midyukov
6d584b06e8 main.mk, mixin.mk, doc: add parametr BRANCH
The BRANCH parameter indicates that the target is a starterkit and
not a regular build for Sisyphus.
2021-06-06 19:06:36 +07:00
Anton Midyukov
b2570d8246 lib/profile.mk, doc/params.txt: add parameter MKIMAGE_PREFIX
Previously, you had to specify two parameters MKIMAGE_PREFIX and
GLOBAL_PREFIX with the same value - the path to mkimage. And this
behavior has not been documented. The GLOBAL_PREFIX variable is
defined in mkimage in config.mk and rules.mk.
2021-05-17 18:14:29 +07:00
Anton Midyukov
2987fa8f61 build-vm, image.in: add VM_SAVE_TARBALL parameter
The parameter is used to save the intermediate tarball used to
build the virtual machine image.
2021-05-01 01:39:54 +07:00
Anton Midyukov
d9dca6cb1a doc, grub, stage1, stage2: Add support multiple kernels for grub only
At the moment, the ability to select the kernel with which to boot is
implemented only for grub (grub-pc, grub-efi, ieee1275boot).
note that renamed STAGE1_KFLAVOUR to STAGE1_KFLAVOURS, as multiple
kernels can now be added.
2021-04-12 23:13:47 +07:00
Michael Shigorin
91a285a04d doc/archdep.txt: adjust accordingly
Those willing to reuse archdep-filter elsewhere
will likely have to figure it out from Makefiles
anyway, so probably not worth overdocumenting...
2019-10-23 15:33:44 +03:00
Michael Shigorin
8801891551 doc: drop the outdated arch list
It was misleading already, and riscv64 is going to join the gang
(but not there yet) following aarch64, mipsel, ppc64le and more
e2k* subarches...
2019-08-19 23:43:41 +03:00
Michael Shigorin
f8a264bbb3 doc: assorted updates/fixups
doc/archdep.txt was the reason to look closer,
and some other files needed a bit of facelift
by now too (would be better to do that in sync).
2018-07-25 16:49:05 +03:00
Mikhail Efremov
2af6d0be75 image: Add DISTRO_VERSION variable support
Use it in the image filename, so we'll know what version of a distro
it is.
2018-07-16 20:52:16 +03:00
Michael Shigorin
7573547328 profiles: introduce @IA32, @X86 archdep macros
See commit 2d257a425b9e9f49483559857c4e894d1743aa72
for details, this just brings those to pkg.in/profiles/
(along with the generic archdep support, of course).
2018-06-25 09:55:01 +03:00
Michael Shigorin
03312d7f5d doc: mention #34638
pauli@ has proposed slightly different setup to what is provided
by livecd-qemu-arch; but the use case might be different either.
At least provide the link to those interested.
2018-03-21 11:56:34 +03:00
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