Compare commits

...

57 Commits

Author SHA1 Message Date
Michael Shigorin
061f299fa1 0.8.1-alt1
- misc fixes
2012-09-03 20:22:16 +03: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
0e8871e7b4 use un-def kernel by default
3.5.2-std-def-alt2 brings boot problems which were absent
with 3.4.x-std-def and are absent with 3.5.x-un-def;
seems like it's better to stay with known good variant
at the moment instead of having to fall back to it.
2012-09-03 19:16:50 +03:00
Michael Shigorin
e064954e93 rescue += ipmitool
It was missing indeed; suggested by ildar@.
2012-09-03 19:16:50 +03:00
Michael Shigorin
83fa2544bc fix root directory permissions
hsh-initroot leaves the chroot's root directory permissions
as 1775 while these should really be 755 at most; let's fix it
(important for both VE and VM images, useful for rescue/livecd
ones as well -- especially those with an installer onboard).
2012-09-03 19:16:50 +03:00
Michael Shigorin
d0cb988897 desktop+live += su
Thanks aen@ for finally mentioning it
as I just used to cope without su. :)
2012-09-03 19:16:50 +03:00
Michael Shigorin
84591991cb no more *silent* aliases
The missing "; @:" at the end of the otherwise recipeless rule
resulted in target graph being broken; I should have checked this
when introducing these aliases (the intent was to reduce noise).
2012-09-03 19:16:50 +03:00
Michael Shigorin
d2581522d9 systemd += chkconfig
It appears that chkconfig wasn't getting pulled in
by now if not told so explicitly.  Still in need.
2012-09-03 19:16:50 +03:00
Michael Shigorin
705a20938a conf.d/test.mk: live-mate-systemd
Not even alpha quality yet but at least debuggable:
- X session doesn't autostart but service dm start works;
- keyboard layout indicator is missing until started by hand.
2012-09-03 19:16:50 +03:00
Michael Shigorin
f54a5660d1 MATE: current crop of packages
There's a bunch of additions to the MATE package list:
thanks viy@ for pulling extras into autoimports,
several more tweaks done due to hints by dek@,
and openssh packages added for debugging convenience.

The kernel's been changed for the latest one (un-def).
2012-09-03 19:16:50 +03:00
Michael Shigorin
e0a849e974 initial live-gns3
Someone over the internets suggested that such a LiveCD exist:
http://www.opennet.ru/openforum/vsluhforumID3/85817.html#24
...but then disappeared in the thin air, sigh.
2012-09-03 19:15:42 +03:00
Michael Shigorin
b5e5d4f223 gear-store-tags 2012-08-13 22:04:57 +03:00
Michael Shigorin
d1bbbbc10b 0.8.0-alt1
- stage2@live
2012-08-13 22:03:32 +03:00
Michael Shigorin
3a3893b664 rescue += firmware (server, wireless)
There's no use of a rescue image when it has no firmware
for the controller in the system being worked on...
so added some.
2012-08-13 15:51:53 +04:00
Michael Shigorin
23175f0020 merged experimental support for opensuse
This isn't ready for general consumption (just as centos one)
but the notion of REPO is floating around along with apt-conf
thoughts, and it might still be useful to someone poking around
conf.d/test.mk.

Request hasher-pkg-init.spec from mike@ or led@ if interested;
the experiments were carried out using openSUSE 11.4 repository
and slightly patched hasher (cpio blacklist for devices).
2012-08-11 23:24:23 +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
c08e86afc5 features: hopefully better README
Thanks both drool@ for his mild frustration with the current
documentation as well as Greg Kroah-Hartman, Heikki Orsila
and Neil Brown for http://lwn.net/Articles/504814/ -- the docs
should really emphasize *why* something is done, not *how*,
as the "how" part is better documented with the code itself
(that doesn't mean that "the big picture" isn't needed).
2012-08-11 21:45:26 +03:00
Michael Shigorin
b21353a00c complex subprofile delimiter changed ("/" -> "@")
That sub/stage2/install2 was somewhat clumsy actually as it looked
like a hierarchical thing while being a substitution thing:
generic stage2 would get put in place renamed as install2.

This could only get worse with hierarchical features which have
already been both requested and considered for quite a time,
and "stage2 at install2" reads much more naturally.
2012-08-11 20:11:17 +03:00
Michael Shigorin
912dbcfd10 features: drop dirtags
Finishes what 3dd020338b
has essentially done... the path seems to be elsewhere.
2012-08-11 20:06:00 +03:00
Michael Shigorin
e6f13defcd razorqt += qps
Don't remember who exactly recommended this nice and elegant
system monitor but it fits just fine.
2012-08-10 19:48:04 +04:00
Michael Shigorin
c4311108ea git usage refactoring
There were heaps of "if type -t git" there already;
it wasn't an unintentional mishap but rather a moderate
copy-paste to get the use cases, and now these seem to
have essentially settled.

So time to scrap some dups.

NB: the scripts in the generated profile can't rely on
the contents of the metaprofile (these need to be able
to work in standalone case either), so a bit of crap
still lurks there.
2012-08-10 00:12:46 +03:00
Michael Shigorin
a3779231cb rescue += zerofree, wipefreespace
This kind of tools can be badly missing at times.
2012-08-09 23:40:25 +03:00
Michael Shigorin
9c16a9e6ff rescue += boot off sda/sdb
There's no (convenient) "eject" at times, so it's better to provide
extra ways of booting right away.
2012-08-08 20:39:26 +04:00
Michael Shigorin
70793436c7 rescue += openssh
Found myself pretty silly while sittin' at the rescue console
and bein' unable to leave the cool server room for a way
more comfortable armchair and a laptop's keyboard...

(yes, it was that disk array needing GPT tools)
2012-08-08 20:27:59 +04:00
Michael Shigorin
1cf14cda95 lists/tagged/rescue*: minor update
Several GPT-related packages added along with
a few more rescue related ones.
2012-08-08 16:38:12 +04:00
Michael Shigorin
05b3c65cd0 gear-store-tags 2012-08-07 00:04:47 +04:00
Michael Shigorin
55fda1a044 0.7.6-alt1
- minor improvements
2012-08-07 00:03:41 +04: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
cbfc3db882 syslinux: honour META_VOL_SET for boot menu
This trots along the TODO item on text branding
and hopefully helps Michael Radyuk (torabora)
with his feature request to tweak the installer's
"Install ALT Linux" label; as an example, Simply
will now offer to "Install Simply Linux".
2012-08-06 23:58:26 +04:00
Michael Shigorin
43d62dd9bb live-builder.iso += livecd-qemu-arch
The package actually passed the test and just got uploaded
to Sisyphus proper; its aim is to help set up the cross-arch
QEMU build environment.

NB: there are known issues with PPC32-on-x86_64 (which were
the cause for this package and commit to be created in the
first place).
2012-08-06 23:56:32 +04:00
Michael Shigorin
307fb51f15 conf.d/test.mk: experimental stuff went here
Some images were unbuildable (at least without special setup,
like ve/centos), unusable or just not useful in any meaningful way
(like distro/live-isomd5sum); as these tend to get any attention
during experiments, I decided to put them together in a separate
configuration file that would be effectively skipped if DEBUG
is not requested.
2012-07-31 21:28:44 +04:00
Michael Shigorin
46e3c94707 syslinux: no ui, no escape
This one was suggested by enp@ for industrial use where
some extra protection for the boot process might be quite
desirable.

If no syslinux ui was specified (the stock configuration paths
ensure there is one) or if it was set to "none" explicitly,
then there's no boot: prompt (let alone any menu).

If there's a need to ensure that the boot process is not
interruptable by Ctrl/Shift/Caps Lock/Scroll Lock.
2012-07-31 13:51:34 +04:00
Michael Shigorin
78a660aed6 live-builder: added qemu-user-binfmt_misc
This provides the means to cross-build at least ARM chroots,
there are known problems with PowerPC for me so far:
http://lists.altlinux.org/pipermail/devel/2012-July/194855.html

See also http://www.altlinux.org/Ports/arm/chroot for /proc magic.
2012-07-30 23:15:36 +04:00
Michael Shigorin
d8f64c0c89 gear-store-tags 2012-07-30 20:15:24 +04:00
Michael Shigorin
2a437c4d22 0.7.5-alt1
- a bunch of fixups and cleanups
2012-07-30 20:14:48 +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
ea1f039c02 server-nano += +power
Essentially all the relevant server images got cpufreq setup
and a power button handler; feel free to ask for revert if
this causes any harm in any situation.
2012-07-28 14:26:27 +04:00
Michael Shigorin
8fd4b396f3 branding: clarify README
It wasn't obvious at all what BRANDING variable is for
(at least until the source code and existing configurarion
has been examined).
2012-07-28 13:32:01 +04:00
Michael Shigorin
a680ea2862 Makefile: fix default target to provide help again
`help' used to be the default target described at the very top
of the toplevel makefile but that got broken with g2f307ff;
spotted while discussing m-p with enp@.
2012-07-28 13:26:08 +04:00
Michael Shigorin
57747b22a5 initial live-testserver.iso
Also pulled the pkglist/kmodule part out of distro/server-mini's
recipe and started off a standalone feature based on it.

NB: el-smp kernel now contains aufs as a module but propagator
doesn't try to modprobe it.
2012-07-28 13:22:59 +04:00
Michael Shigorin
7eaa868525 conf.d/live.mk: ugly thinko fix, thx enp@
"textinst" != "textinstall", so let's just stick to the latter form.
2012-07-28 00:42:16 +04:00
Michael Shigorin
cb6a71d97f lib/ve.mk: whoops, ve/bare misses /sbin/init
Actually the templates pretending to be usable missed the whole
interactivesystem (sysvinit would get pulled in by services as well).

Fixed somewhat but time and practice will tell.
2012-07-21 19:15:24 +03:00
Michael Shigorin
ceffac4035 x11: ensure kdm3 installation for tde
TDE distros don't really need kdm4 which was proposed as
a replacement by zerg@ (for all the valid reasons but kdm3
wasn't maintained at that point, this has changed since).
2012-07-19 15:39:30 +03:00
Michael Shigorin
6c00e10b31 live, rescue: fix stage2cfg.mk LISTS/PACKAGES order
The reason is that package lists and individual packages
are processed in different dependency resolution "transactions"
by mkimage; thus if packages (the more precise form of specifying
the contents) come first they can't override the lists appearing
later, and that's wrong: we should be able to specify the more
generic things and then pinpoint the specifics.

This became apparent while authoring [[Mkimage/Profiles/m-p/howto]]
asked for by drool@.
2012-07-19 13:32:53 +03:00
Michael Shigorin
cb764516eb build-vm: standalone build is a must, too
The problem was spotted by Alexander Bandura:
bin/tar2vm wasn't present in the generated profile.

I considered extending features.in/Makefile to include
bin/ alongside lib/ but that would make the helper's location
unpredictable (unless BUILDDIR is specified explicitly) so
restricting sudoers would be harder; worse yet, the copied file
would come with write access for the user building an image.

The implications in restricted case are complex enough anyways
so the recommended implementation would only include a fixed
readonly location like /usr/share/mkimage-profiles/bin/tar2vm
as laid out in doc/vm.txt, and that means it's in the metaprofile
not a generated profile.
2012-07-18 16:06:15 +03:00
Michael Shigorin
5f479eb80f conf.d/README: updated reference
Argh, is it overdocumentation already?
The temporary name bites once again...
2012-07-18 12:34:47 +03:00
Michael Shigorin
f3e923ad61 Makefile: drop extra >&2
say() redirects to stderr already.
2012-07-17 20:43:06 +03:00
Michael Shigorin
4ea5959f79 bin/mktmpdir: hasher might be unconfigured yet
No need to just go ahead and source files in potentially
unavailable directories, really.
2012-07-17 15:53:42 +03:00
Michael Shigorin
1b62f94bf3 gear-store-tags 2012-07-16 21:37:34 +03:00
Michael Shigorin
0a3aaf15c2 0.7.4-alt1
- ppc builds
2012-07-16 21:33:00 +03: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
18f1a6360a bin/mktmpdir: grok NFS root
"df -l" is going to hurt (or at least spam) if it's a diskless node;
"df -P" helps maintain output parseability.  So be it.
2012-07-16 21:19:06 +03:00
Michael Shigorin
809ae4d9e8 live-builder: minor fixes
su wasn't making it into the image breaking ~/.git setup,
and there's no reason for a full default boot timeout either.
2012-07-16 18:24:18 +03:00
Michael Shigorin
24edc620d8 prep optimization
There was some extra duplication, just clean it up.
2012-07-16 18:24:18 +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
03ba4631f6 gear-store-tags 2012-07-09 23:47:49 +03:00
70 changed files with 465 additions and 236 deletions

View File

@@ -1,5 +1,5 @@
Name: mkimage-profiles
Version: 0.7.3
Version: 0.8.1
Release: alt1
Summary: ALT Linux based distribution metaprofile
@@ -61,6 +61,21 @@ cp -a * %buildroot%mpdir
%doc README QUICKSTART
%changelog
* Mon Sep 03 2012 Michael Shigorin <mike@altlinux.org> 0.8.1-alt1
- misc fixes
* Mon Aug 13 2012 Michael Shigorin <mike@altlinux.org> 0.8.0-alt1
- stage2@live
* Mon Aug 06 2012 Michael Shigorin <mike@altlinux.org> 0.7.6-alt1
- minor improvements
* Mon Jul 30 2012 Michael Shigorin <mike@altlinux.org> 0.7.5-alt1
- a bunch of fixups and cleanups
* Mon Jul 16 2012 Michael Shigorin <mike@altlinux.org> 0.7.4-alt1
- ppc builds
* Mon Jul 09 2012 Michael Shigorin <mike@altlinux.org> 0.7.3-alt1
- arm builds

View File

@@ -0,0 +1,6 @@
object d1bbbbc10be5df925dd677f7956ed06821192866
type commit
tag v0.8.0
tagger Michael Shigorin <mike@altlinux.org> 1344884693 +0300
stage2@live

View File

@@ -1,6 +0,0 @@
object b4560c7aee6082b1a8f33981ee5543339e4f1ddb
type commit
tag v0.7.2
tagger Michael Shigorin <mike@altlinux.org> 1341235133 +0300
simply fixes

View File

@@ -1 +1 @@
f108c3daaab553777186eb3d12e6a850516417d4 v0.7.2
d21fc0e7ffbe1e99ade184ab13b5fe649a103610 v0.8.0

View File

@@ -10,7 +10,7 @@ ifndef ARCHES
ifdef ARCH
ARCHES := $(ARCH)
else
ARCHES := $(shell arch | sed 's/i686/i586/; s/armv.*/arm/')
ARCHES := $(shell arch | sed 's/i686/i586/; s/armv.*/arm/; s/ppc.*/ppc/')
endif
endif
export ARCHES
@@ -26,7 +26,7 @@ endif
# recursive make considered useful for m-p
MAKE += -r --no-print-directory
DIRECT_TARGETS := clean distclean check help help/distro help/ve help/vm
DIRECT_TARGETS := help help/distro help/ve help/vm clean distclean check
.PHONY: $(DIRECT_TARGETS)
$(DIRECT_TARGETS):
@$(MAKE) -f main.mk $@
@@ -53,7 +53,7 @@ SHELL = /bin/bash
fi; \
for ARCH in $(ARCHES); do \
if [ "$$ARCH" != "$(firstword $(ARCHES))" ]; then say; fi; \
say "** ARCH: $$ARCH" >&2; \
say "** ARCH: $$ARCH"; \
if $(MAKE) -f main.mk ARCH=$$ARCH $@ $(POSTPROC); then \
if [ -n "$$REPORT" ]; then \
$(MAKE) -f reports.mk ARCH=$$ARCH; \

View File

@@ -1,5 +1,5 @@
English quickstart: make server-mini.iso; see also
http://en.altlinux.org/Hasher (a large tmpfs is nice).
English quickstart: make syslinux.iso (after setting up
http://en.altlinux.org/Hasher; large tmpfs helps a lot).
требуется
~~~~~~~~~
@@ -27,11 +27,11 @@ $ git config --global user.name "My Name"
$ mkdir ~/out
- тестовая сборка (см. тж. lib/distro.mk, doc/params.txt):
$ make icewm.iso
$ make syslinux.iso
ссылки
~~~~~~
- http://www.altlinux.org/tmpfs
- http://www.altlinux.org/hasher
- http://www.altlinux.org/mkimage
- http://www.altlinux.org/Mkimage/Profiles/m-p
- http://www.altlinux.org/m-p

12
README
View File

@@ -7,11 +7,6 @@ License: GPLv2+, see COPYING
Most docs are in Russian, welcome to learn it or ask for English.
См. тж. http://www.altlinux.org/Mkimage/Profiles/m-p и doc/*.txt:
- params.txt: переменные, указываемые при запуске сборки
- features.txt: обзор подключаемых особенностей
- pkglists.txt: формирование состава образа
Задача:
- конфигурирование и создание образов на базе ALT Linux
@@ -60,3 +55,10 @@ Most docs are in Russian, welcome to learn it or ask for English.
+ либо ~/out/ (если возможно),
+ или $(BUILDDIR)/out/ иначе
- формируются отчёты, если запрошены (REPORT)
См. тж.:
- http://altlinux.org/m-p
- doc/:
+ params.txt: переменные, указываемые при запуске сборки
+ pkglists.txt: формирование состава образа
+ features.txt: обзор подключаемых особенностей

View File

@@ -12,7 +12,7 @@ try_source() { [ -f "$1" ] && . "$1"; }
# hasher accepted ones
get_prefices()
{
try_source /etc/hasher-priv/system
try_source /etc/hasher-priv/system || exit 1
try_source `/usr/libexec/hasher-priv/getconf.sh`
echo "$prefix" | tr ':' '\n' | while read i; do realpath "$i"; done
}
@@ -43,7 +43,7 @@ choose_tmpdir() {
for i in "$@"; do
[ -d "$i" -a -w "$i" ] || continue
echo -n "$i "
df -Tl "$i" | tail -1
df -PT "$i" | tail -1
done \
| sort -unk6 \
| while read dir dev fstype size used free percent mnt; do
@@ -61,19 +61,19 @@ choose_tmpdir() {
# bringing it all together
TMPDIRS="`contemplate_dirs $DIRS`"
if [ -z "$TMPDIRS" ]; then
echo "error: no suitable directories found;" >&2
echo "please check docs, filesystem and hasher setup" >&2
echo "(mount enough tmpfs into /tmp or fix hasher-priv prefix?)" >&2
echo "error: no suitable directories found;"
echo "please check QUICKSTART, filesystem and hasher setup"
echo "(mount enough tmpfs into /tmp or fix hasher-priv prefix?)"
exit 1
fi
fi >&2
TEMP="`choose_tmpdir $TMPDIRS`"
if [ -z "$TEMP" ]; then
echo "error: no suitable directories found;" >&2
echo "please check hasher docs and filesystem setup" >&2
echo "(nodev and/or noexec on an otherwise suitable filesystem?)" >&2
echo "error: no suitable directories found;"
echo "please check hasher docs and filesystem setup"
echo "(nodev and/or noexec on an otherwise suitable filesystem?)"
exit 1
fi
fi >&2
DIR="$TEMP/`dirname "$1"`"
NAME="`basename "${1:-tmpdir}"`"

21
bin/mp-commit Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
# commit the directory ($1) with a message ($2) to git
. shell-error
[ -d "$1" ] || fatal "$1 is not an existing directory"
if type -t git >&/dev/null && pushd "$1" >/dev/null; then
if [ -z "$(git config --global user.name)" ]; then
exit 0
fi
if [ ! -d .git ]; then
git init -q || fatal "git init failed"
fi
if [ -n "$(git status -s)" ]; then
git add . \
&& git commit -qam "$2" \
|| fatal "git add/commit failed"
fi
popd >/dev/null
fi

11
bin/mp-showref Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
# report on git repo in the current directory
if type -t git >&/dev/null; then
if pushd "$1" >/dev/null && [ -d .git ]; then
git show-ref --head -ds -- HEAD
git status -s
echo
popd >/dev/null
fi
fi

View File

@@ -1,4 +1,6 @@
#!/bin/bash -e
# usage:
# tar2vm chroot.tar image.raw [size_in_bytes]
. shell-error
@@ -27,7 +29,7 @@ IMG="$2"
# image size in bytes (256M is a fallback)
TARSIZE="$(stat -Lc %s "$TAR")"
DEFSIZE="$((3 * $TARSIZE / 2))"
DEFSIZE="$((2 * $TARSIZE))"
DISKSIZE="${3:-${DEFSIZE:-268435456}}"
# ...and in megabytes
DISKSIZEM="$(($DISKSIZE / 1048576))"

View File

@@ -10,7 +10,7 @@
Попросту говоря, copy-paste -- тревожный признак.
По переменным (см. тж. ../doc/vars-conf.txt):
По переменным (см. тж. ../doc/pkglists.txt):
- для пользовательского окружения (live, main) предназначены
THE_PACKAGES, THE_LISTS, THE_GROUPS, THE_PACKAGES_REGEXP

View File

@@ -1,6 +0,0 @@
ve/.centos-base: ve/.bare
@$(call set,IMAGE_INIT_LIST,hasher-pkg-init)
ve/centos: ve/.centos-base
@$(call add,BASE_PACKAGES,openssh-server)

View File

@@ -15,7 +15,5 @@ distro/icewm: distro/.desktop-network use/lowmem +icewm; @:
distro/tde: distro/.desktop-mini +tde; @:
distro/ltsp-tde: distro/tde +ltsp; @:
distro/ltsp-icewm: distro/icewm +ltsp; @:
distro/desktop-systemd: distro/icewm use/systemd; @:
distro/desktop-plymouth: distro/icewm +plymouth; @:
endif

View File

@@ -1,12 +1,8 @@
# live images
ifeq (distro,$(IMAGE_CLASS))
distro/syslinux: distro/.init \
use/syslinux/localboot.cfg use/syslinux/ui/vesamenu use/hdt; @:
distro/dos: distro/.init use/dos use/syslinux/ui/menu; @:
distro/rescue: distro/.base use/rescue use/syslinux/ui/menu; @:
distro/live-systemd: distro/.base use/live/base use/systemd; @:
distro/.live-base: distro/.base use/live/base use/power/acpi/button; @:
distro/.live-desktop: distro/.base +live use/plymouth/live; @:
@@ -16,25 +12,24 @@ distro/.live-kiosk: distro/.base use/live/base use/live/autologin \
@$(call add,LIVE_PACKAGES,fonts-ttf-dejavu)
@$(call add,CLEANUP_PACKAGES,'alterator*' 'guile*' 'vim-common')
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
@$(call add,LIVE_PACKAGES,livecd-isomd5sum)
distro/live-builder: pkgs := livecd-tmpfs livecd-online-repo mkimage-profiles
distro/live-builder: distro/.live-base use/dev/mkimage use/dev/repo
distro/live-builder: distro/.live-base use/dev/mkimage use/dev/repo \
use/syslinux/timeout/30
@$(call set,KFLAVOURS,$(BIGRAM))
@$(call add,LIVE_LISTS,$(call tags,base && (server || builder)))
@$(call add,LIVE_PACKAGES,livecd-qemu-arch strace)
@$(call add,LIVE_PACKAGES,qemu-user-binfmt_misc)
@$(call add,LIVE_PACKAGES,zsh sudo)
@$(call add,LIVE_PACKAGES,$(pkgs))
@$(call add,MAIN_PACKAGES,$(pkgs))
@$(call add,MAIN_PACKAGES,syslinux pciids memtest86+ mkisofs)
distro/live-install: distro/.live-base use/live/textinst; @:
distro/live-install: distro/.live-base use/live/textinstall; @:
distro/.livecd-install: distro/.live-base use/live/install; @:
distro/live-icewm: distro/.live-desktop use/live/autologin +icewm; @:
distro/live-razorqt: distro/.live-desktop use/live/autologin +razorqt; @:
distro/live-tde: distro/.live-desktop use/live/ru use/live/install +tde; @:
distro/live-plymouth: distro/.live-base use/plymouth/live; @:
distro/live-rescue: distro/live-icewm
@$(call add,LIVE_LISTS,$(call tags,rescue && (fs || live || x11)))
@@ -62,7 +57,8 @@ distro/live-cinnamon: distro/.live-desktop use/live/autologin use/live/ru \
use/x11/cinnamon use/x11/3d-proprietary; @:
distro/live-mate: distro/.live-desktop use/live/nodm use/live/ru use/x11/3d-free
@$(call add,LIVE_LISTS,$(call tags,(desktop || mobile) && mate))
@$(call add,LIVE_LISTS,openssh $(call tags,(desktop || mobile) && mate))
@$(call set,KFLAVOURS,un-def) # the newest one
distro/live-enlightenment: distro/.live-desktop use/live/autologin \
use/live/ru use/x11/3d-free

View File

@@ -5,20 +5,12 @@ distro/.server-base: distro/.installer use/syslinux/ui/menu use/memtest
@$(call add,BASE_LISTS,server-base openssh)
distro/server-nano: distro/.server-base \
use/cleanup/x11-alterator use/bootloader/lilo
use/cleanup/x11-alterator use/bootloader/lilo +power
@$(call add,BASE_LISTS,$(call tags,server network))
@$(call add,BASE_PACKAGES,dhcpcd cpio)
distro/server-mini: distro/.server-base use/cleanup/x11-alterator
distro/server-mini: distro/.server-base use/server/mini use/cleanup/x11-alterator
@$(call set,KFLAVOURS,el-smp)
@$(call add,THE_KMODULES,e1000e igb)
@$(call add,STAGE1_KMODULES,e1000e igb)
@$(call add,BASE_LISTS,\
$(call tags,base && (server || network || security || pkg)))
@$(call add,BASE_LISTS,$(call tags,extra (server || network)))
distro/server-systemd: distro/server-mini use/systemd
@$(call set,KFLAVOURS,std-def)
distro/server-ovz: distro/server-mini use/install2/net use/hdt use/rescue \
use/firmware/server use/firmware/wireless use/power/acpi/button
@@ -32,9 +24,4 @@ distro/server-ovz: distro/server-mini use/install2/net use/hdt use/rescue \
@$(call add,MAIN_GROUPS,ipmi mysql-server dhcp-server mail-server)
@$(call add,MAIN_GROUPS,monitoring diag-tools)
# tiny network-only server-ovz installer (stage2 comes over net too)
distro/server-ovz-netinst: distro/.base sub/stage1 use/stage2 \
use/syslinux/ui/menu use/syslinux/localboot.cfg use/memtest
@$(call add,SYSLINUX_CFG,netinstall2)
endif

69
conf.d/test.mk Normal file
View File

@@ -0,0 +1,69 @@
# debug/test/experimental images
ifneq (,$(DEBUG))
ifeq (distro,$(IMAGE_CLASS))
distro/syslinux: distro/.init \
use/syslinux/localboot.cfg use/syslinux/ui/vesamenu use/hdt; @:
distro/syslinux-auto: distro/.init use/hdt use/syslinux/timeout/1; @:
distro/syslinux-noescape: distro/syslinux-auto use/syslinux/noescape.cfg; @:
distro/live-systemd: distro/.base use/live/base use/systemd; @:
distro/live-plymouth: distro/.live-base use/plymouth/live; @:
distro/live-isomd5sum: distro/.base use/live/base use/isomd5sum
@$(call add,LIVE_PACKAGES,livecd-isomd5sum)
distro/live-testserver: distro/live-install use/server/mini
@$(call set,KFLAVOURS,std-def el-smp)
distro/live-gns3: distro/live-icewm
@$(call add,LIVE_LISTS,gns3)
@$(call add,LIVE_KMODULES,kvm virtualbox)
distro/server-systemd: distro/server-mini use/systemd
@$(call set,KFLAVOURS,std-def)
# tiny network-only server-ovz installer (stage2 comes over net too)
distro/server-ovz-netinst: distro/.base sub/stage1 use/stage2 \
use/syslinux/ui/menu use/syslinux/localboot.cfg use/memtest
@$(call add,SYSLINUX_CFG,netinstall2)
distro/desktop-systemd: distro/icewm use/systemd; @:
distro/desktop-plymouth: distro/icewm +plymouth; @:
distro/live-mate-systemd: distro/live-mate use/systemd use/live/install; @:
endif # IMAGE_CLASS: distro
ifeq (ve,$(IMAGE_CLASS))
ifeq (centos,$(REPO))
ve/.centos-base: ve/.bare
@$(call set,IMAGE_INIT_LIST,hasher-pkg-init)
ve/centos: ve/.centos-base
@$(call add,BASE_PACKAGES,openssh-server)
endif # REPO: centos
ifeq (opensuse,$(REPO))
ve/.opensuse-base: ve/.bare
@$(call set,IMAGE_INIT_LIST,hasher-pkg-init)
@$(call add,BASE_PACKAGES,aaa_base)
endif # REPO: opensuse
endif # IMAGE_CLASS: ve
ifeq (vm,$(IMAGE_CLASS))
vm/net-static: vm/bare use/vm-net/static use/vm-ssh
@$(call set,VM_NET_IPV4ADDR,10.0.2.16/24)
@$(call set,VM_NET_IPV4GW,10.0.2.2)
endif # IMAGE_CLASS: vm
endif

View File

@@ -1,13 +1,9 @@
# virtual machines
ifeq (vm,$(IMAGE_CLASS))
# NB: use/x11 employs some installer-feature packages
vm/icewm: vm/bare use/cleanup/installer use/x11/xdm +icewm; @:
vm/net: vm/bare use/vm-net/dhcp use/vm-ssh; @:
vm/net-static: vm/bare use/vm-net/static use/vm-ssh
@$(call set,VM_NET_IPV4ADDR,10.0.2.16/24)
@$(call set,VM_NET_IPV4GW,10.0.2.2)
# NB: use/x11 employs some installer-feature packages
vm/icewm: vm/net use/cleanup/installer use/repo +icewm; @:
endif

View File

@@ -10,7 +10,7 @@
- ARCH
+ задаёт целевую архитектуру образов
+ значение: пусто (по умолчанию авто), i586, x86_64 или arm
+ значение: пусто (по умолчанию авто), i586, x86_64, arm, ppc
+ см. ../lib/build.mk
- ARCHES
@@ -41,7 +41,7 @@
- CHECK
+ включает режим проверки сборки конфигурации (без сборки образа)
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../lib/build.mk
+ см. ../lib/build.mk, ../lib/clean.mk
- CLEAN
+ экономия RAM+swap при сборке в tmpfs, иначе места на диске
@@ -51,9 +51,9 @@
+ см. ../lib/clean.mk
- DEBUG
+ включает средства отладки
+ включает средства отладки, может отключить зачистку после сборки
+ значение: пусто (по умолчанию), 1 или 2
+ см. ../lib/log.mk
+ см. ../lib/log.mk, ../lib/clean.mk
- HOMEPAGE, HOMENAME, HOMEWAIT
+ указывают адрес, название и таймаут перехода для домашней страницы
@@ -86,6 +86,12 @@
+ значение: пусто (по умолчанию) либо любая строка
+ см. ../image.in/Makefile
- SORTDIR
+ дополнительно структурирует каталог собранных образов
+ значение: пусто (по умолчанию) либо строка
- например, '$(IMAGE_NAME)/$(DATE)'
+ см. ../image.in/Makefile
- SQUASHFS
+ определяет характер сжатия squashfs для stage2
+ значение:
@@ -94,12 +100,17 @@
- fast: gzip/lzo (быстрее запаковывается и распаковывается, меньше степень)
+ см. ../features.in/stage2/stage1/scripts.d/03-test-kernel
- SORTDIR
+ дополнительно структурирует каталог собранных образов
+ значение: пусто (по умолчанию) либо строка
- например, '$(IMAGE_NAME)/$(DATE)'
- STATUS
+ добавляет в имя образа указанный префикс
+ значение:
- пусто (по умолчанию) либо строка (например, "alpha", "beta")
+ см. ../image.in/Makefile
- VM_SIZE
+ задаёт размер несжатого образа виртуальной машины в байтах
+ значение: пусто (по умолчанию двойной размер чрута) или целое
+ см. ../features.in/build-vm/lib/90-build-vm.mk, ../bin/tar2vm
пример
~~~~~~
make DEBUG=1 CLEAN=1 distro/syslinux.iso

9
doc/qemu.txt Normal file
View File

@@ -0,0 +1,9 @@
Для сборки на "неродной" архитектуре с применением трансляции
посредством QEMU установите пакет livecd-qemu-arch и выполните
команду register-qemu-arm от имени root (также предоставляется
register-qemu-ppc, но как минимум при сборке под ppc32 на x86_64
известны проблемы эмуляции).
Пример запуска:
make ARCH=arm APTCONF=/etc/apt/apt.conf.sisyphus.arm ve/bare.tar

View File

@@ -2,7 +2,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* постарайтесь не вносить без обсуждения разнобой стилей,
если есть предметные пожелания по коррекции текущего --
пишите в devel-distro@, обсудим;
пишите в devel-distro@ или мне (mike@), обсудим;
* перед тем, как делать существенные переработки уже имеющегося
кода -- опять же опишите проблему, идею и предполагаемый результат,

View File

@@ -3,15 +3,18 @@
ВНИМАНИЕ: заключительная операция создания образа жёсткого диска
из архива с содержимым корневой файловой системы требует доступа
к sudo и разрешения на выполнение скрипта bin/tar2vm в корневом
каталоге метапрофиля при установке mkimage-profiles из пакета.
каталоге метапрофиля при установке mkimage-profiles из пакета
(это в планах исправить, но подход к libguestfs пока успехом
не увенчался).
Соответствующий фрагмент конфигурации sudo(8) может выглядеть как:
mike ALL=NOPASSWD: /usr/share/mkimage-profiles/bin/tar2vm
При работе с git следует иметь в виду, что предоставлять недоверенному
пользователю право выполнять с повышенными привилегиями доступный ему
по записи скрипт равнозначно предоставлению полных привилегий root.
При работе с локальной копией mkimage-profiles.git следует иметь
в виду, что предоставлять недоверенному пользователю право выполнять
от имени root доступный ему по записи скрипт равнозначно предоставлению
полных привилегий root.
Для работы с более специфичными форматами, чем raw ("буквальный"
образ диска), потребуется утилита qemu-img из одноименного пакета;

View File

@@ -65,21 +65,18 @@ $(FEATURES):
fi; \
pushd "$$feat" >/dev/null && \
for sub in / $(SUBPROFILES); do \
dirtags=; \
if [ "$$sub" = / ]; then \
srcdirs="."; \
dst="."; \
else \
src="$${sub%/*}"; \
dst="$${sub#*/}"; \
src="$${sub%@*}"; \
dst="$${sub#*@}"; \
srcdirs=; \
if [ -d "$$src" ]; then \
srcdirs="$$src"; \
dirtags="&& $$src"; \
fi; \
if [ -d "$$dst" -a "$$dst" != "$$src" ]; then \
srcdirs="$$srcdirs $$dst"; \
dirtags="&& ($$src || $$dst)"; \
srcdirs="$${srcdirs:+$$srcdirs }$$dst"; \
fi; \
for srcdir in $$srcdirs; do \
rsync -qab --exclude tagged \
@@ -98,39 +95,19 @@ $(FEATURES):
if [ "$$sub" = / -a -d "$$part" ]; then \
rsync -qab "$$part/" "$$destdir/"; \
fi; \
[ -d "tagged/$$part" ] || continue; \
[ "$$srcdir" != "." ] || continue; \
pushd "tagged/$$part" >/dev/null; \
echo "$$feat $$dirtags" \
| tags2lists . \
| xargs -r cp -vpLt "$$destdir" --; \
popd >/dev/null; \
done; \
popd >&/dev/null; \
done; \
if type -t git >&/dev/null && \
pushd "$(BUILDDIR)/$$dst/" >/dev/null; then \
test -n "`git status -s`" && \
git add . && \
if [ -n "$$dst" ]; then \
the="$$sub subprofile"; \
else \
the="toplevel"; \
fi && \
git commit -qam "$$feat feature: $$the part added"; \
popd >/dev/null; \
if [ -n "$$dst" ]; then \
the="$$sub subprofile"; \
else \
the="toplevel"; \
fi; \
mp-commit "$(BUILDDIR)/$$dst/" "$$feat feature: $$the part added"; \
done; \
if [ -x "generate.sh" ]; then sh generate.sh; fi; \
if [ -s "generate.mk" ]; then $(MAKE) -f generate.mk; fi; \
if type -t git >&/dev/null && \
pushd "$(BUILDDIR)/" >/dev/null; then \
if [ -n "`git status -s`" ]; then \
git add . && \
git commit -qam "$$feat feature generation complete"; \
fi; \
popd >/dev/null; \
fi; \
mp-commit "$(BUILDDIR)" "$$feat feature generation complete"; \
popd >/dev/null
finalize:

View File

@@ -1,28 +1,28 @@
Этот каталог содержит т.н. фичи (features, особенности) --
каталоги, содержимое каждого из которых реализует одну из
подключаемых автономных возможностей образа.
Этот каталог содержит т.н. фичи (features, особенности).
Каждая фича должна содержать задействуемый при построении
конфигурации будущего образа файл config.mk, включаемый
в ../main.mk; он может описывать одну или более целей
вида use/*, дополняющих конфигурацию, и при наличии
дополнительных хуков для копирования или generate.*
обязан добавить имя фичи в $(FEATURES), для чего
создана функция add_feature без аргументов.
Фича -- отдельно подключаемая сущность, которая содержит
повторно используемые конфигурацию/код и определяет одну
из особенностей создаваемого образа. Может зависеть от
других фич либо субпрофилей.
Каждая фича должна содержать файл config.mk, включаемый
в ../main.mk при построении конфигурации будущего профиля;
он может описывать одну или более целей вида use/*,
дополняющих конфигурацию, и обязан добавить имя фичи
в $(FEATURES), для чего создана функция add_feature.
На этапе генерации сборочного профиля фичи рассматриваются
после инициализации профиля (см. ../image.in/) и копирования
субпрофилей (см. ../sub.in/). Для каждой фичи, указанной
в $(FEATURES), копируются подкаталоги сообразно субпрофилям,
а также производится обработка {image-,}scripts.d/; затем
выполняется скрипт generate.sh и задействуется generate.mk
(при их наличии).
в $(FEATURES), копируются подкаталоги сообразно включенным
субпрофилям, а также lib/ и {image-,}scripts.d/; затем
выполняются generate.sh и generate.mk при их наличии.
Если фича дополняет хуками семейство целевых субпрофилей,
построенных на одном базовом, можно воспользоваться подкаталогом
с именем исходного базового субпрофиля (см. $src, $dst в Makefile).
Наиболее употребительные цели можно снабжать "ярлычками" вроде
Наиболее востребованные цели можно снабжать "ярлычками" вроде
"+icewm" с тем, чтобы сделать более краткими и выразительными
использующие их правила. Просьба не злоупотреблять количеством.

View File

@@ -2,6 +2,11 @@
добавление задающих внешний вид и сообщения дистрибутива
пакетов; см. тж. http://www.altlinux.org/Branding
Реализация "двумерная" -- отдельно задаётся BRANDING
(см. пакеты branding-*-%version-%release.src.rpm),
затем отдельно указывается, какие и куда помещать
компоненты заданного брендинга.
Назначение и возможные значения (если требуются):
- STAGE1_BRANDING

View File

@@ -1,8 +1,7 @@
# step 4: build the distribution image
# for complex-specified subprofiles like stage2/live,
# take the latter part
SUBDIRS = $(notdir $(SUBPROFILES))
# take the latter part for complex-specified subprofiles like stage2@live
SUBDIRS = $(SUBPROFILE_DIRS)
# proxy over the ISO metadata collected; see also genisoimagerc(5)
BOOT_SYSI := $(META_SYSTEM_ID)
@@ -22,8 +21,9 @@ MKI_SORTFILE := /tmp/isosort
all: $(GLOBAL_DEBUG) prep copy-subdirs copy-tree run-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR)
prep: $(GLOBAL_DEBUG) dot-disk $(WHATEVER) imagedir
prep: $(GLOBAL_DEBUG) dot-disk $(WHATEVER)
# can't use mp-showref which belongs to the metaprofile
dot-disk:
@mkdir -p files/.disk
@echo "ALT Linux based" >files/.disk/info

View File

@@ -15,5 +15,3 @@ IMAGE_PACKAGES = $(call list,$(BASE_LISTS)) \
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
postprocess $(GLOBAL_CLEAN_WORKDIR)
prep: imagedir

View File

@@ -0,0 +1,4 @@
# copy tar2vm helper into generated profile to enable standalone builds
all:
@install -pD $(MKIMAGE_PROFILES)/bin/tar2vm $(BUILDDIR)/bin/tar2vm

View File

@@ -50,5 +50,3 @@ pack-image: MKI_PACK_RESULTS := tar:$(VM_TARBALL)
all: $(GLOBAL_DEBUG) build-image copy-tree run-image-scripts pack-image \
convert-image postprocess $(GLOBAL_CLEAN_WORKDIR)
prep: imagedir

View File

@@ -3,7 +3,7 @@ use/dev:
@$(call add,THE_PACKAGES,git-core hasher gear)
use/dev/mkimage: use/dev
@$(call add,THE_PACKAGES,mkimage shadow-change)
@$(call add,THE_PACKAGES,mkimage shadow-change su)
use/dev/repo: use/dev use/repo/main
@$(call add,THE_PACKAGES,apt-repo)

View File

@@ -13,10 +13,10 @@ HOME="/home/$USER"
install -dm750 -o "$USER" -g "$USER" "$HOME"
# we honestly don't know much more
if type -t git >&/dev/null; then
if type -t git && type -t su; then
su - -c "git config --global user.email $USER@localhost" "$USER"
su - -c "git config --global user.name 'live builder'" "$USER"
fi
fi >&/dev/null
# developer should feel comfortable, eh? ;-)
ZSHELL="/bin/zsh"

View File

@@ -1,5 +1,5 @@
# alterator-based installer, second (livecd) stage
use/install2: use/stage2 sub/stage2/install2 use/metadata use/cleanup/installer
use/install2: use/stage2 sub/stage2@install2 use/metadata use/cleanup/installer
@$(call add_feature)
@$(call set,INSTALL2_PACKAGES,installer-distro-$$(INSTALLER)-stage2)
@$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-alterator)

View File

@@ -1,4 +1,4 @@
###
use/kernel:
@$(call add_feature)
@$(call set,KFLAVOURS,std-def)
@$(call set,KFLAVOURS,un-def)

View File

@@ -2,7 +2,7 @@
# copy stage2 as live
# NB: starts to preconfigure but doesn't use/cleanup yet
use/live: use/stage2 sub/stage2/live
use/live: use/stage2 sub/stage2@live
@$(call add_feature)
@$(call add,CLEANUP_PACKAGES,'installer*')

View File

@@ -5,10 +5,10 @@ STAGE2_KMODULES = $(THE_KMODULES) $(LIVE_KMODULES)
IMAGE_PACKAGES_REGEXP = $(THE_PACKAGES_REGEXP) \
$(LIVE_PACKAGES_REGEXP)
IMAGE_PACKAGES = $(COMMON_PACKAGES) $(THE_PACKAGES) $(LIVE_PACKAGES) \
$(call map,list, \
IMAGE_PACKAGES = $(call map,list, \
$(THE_LISTS) $(THE_GROUPS) \
$(LIVE_LISTS) $(LIVE_GROUPS)) \
$(COMMON_PACKAGES) $(THE_PACKAGES) $(LIVE_PACKAGES) \
interactivesystem
MKI_PACK_RESULTS = squash:live

View File

@@ -1,8 +1,8 @@
+plymouth: use/plymouth/full; @:
# and a few silent aliases
use/plymouth/live: use/plymouth/stage2
use/plymouth/install2: use/plymouth/stage2
# and a few aliases
use/plymouth/live: use/plymouth/stage2; @:
use/plymouth/install2: use/plymouth/stage2; @:
use/plymouth:
@$(call add_feature)

View File

@@ -0,0 +1,20 @@
#!/bin/sh
# enable online repos if possible, just quit if anything's wrong
repo_source='/etc/apt/sources.list.d/alt.list'
host='http://ftp.altlinux.org'
[ -s "$repo_source" ] || exit 0
# regexps from alterator-pkg (via installer-feature-online-repo)
prefix_re="[[:space:]]*rpm[[:space:]]\+\([^[:space:]]\+[[:space:]]\+\)\?"
updates_re="${prefix_re}http:\/\/\([^[:space:]]\+\)[[:space:]]*"
# architectures
host_arch="$(rpm --eval '%_host_cpu')"
[ "$host_arch" = "x86_64" ] && compat="x86_64-i586" || compat=
# turn on unconditionally
for arch in "$host_arch" noarch "$compat"; do
sed -i "s/^#\($updates_re$arch\)/\1/" "$repo_source"
done

View File

@@ -1,4 +1,5 @@
use/rescue: use/stage2 sub/stage2/rescue
use/rescue: use/stage2 sub/stage2@rescue use/syslinux/sdab.cfg \
use/firmware/server use/firmware/wireless
@$(call add_feature)
@$(call add,RESCUE_LISTS, \
@$(call add,RESCUE_LISTS, openssh \
$(call tags,(base || extra) && (rescue || network)))

View File

@@ -1,8 +1,8 @@
# stage2 mod: rescue "live" image
IMAGE_PACKAGES = $(COMMON_PACKAGES) \
IMAGE_PACKAGES = $(call list,$(RESCUE_LISTS)) \
$(COMMON_PACKAGES) \
$(RESCUE_PACKAGES) \
$(call list,$(RESCUE_LISTS)) \
interactivesystem startup-rescue
MKI_PACK_RESULTS = squash:rescue

View File

@@ -0,0 +1,2 @@
Эта фича предоставляет типичные для серверных образов
наборы списков пакетов и модулей ядра.

View File

@@ -0,0 +1,9 @@
use/server:
@$(call add_feature)
use/server/mini: use/server
@$(call add,THE_KMODULES,e1000e igb)
@$(call add,STAGE1_KMODULES,e1000e igb)
@$(call add,THE_LISTS,\
$(call tags,base && (server || network || security || pkg)))
@$(call add,THE_LISTS,$(call tags,extra (server || network)))

View File

@@ -13,6 +13,7 @@ use/slinux: use/x11/xfce use/x11/gdm2.20
@$(call add,THE_LISTS,slinux/network)
@$(call add,THE_LISTS,slinux/xfce)
@$(call add,THE_LISTS,$(call tags,base l10n))
@$(call set,META_VOL_SET,Simply Linux)
use/slinux/full: use/isohybrid use/slinux use/systemd \
use/firmware/wireless use/branding/complete \

View File

@@ -1,6 +1,10 @@
Добавление поддержки syslinux; требуется для инсталяторов, live/rescue;
реализуется в рамках stage1.
Самостоятельное творческое использование на данный момент подразумевает
знакомство с /usr/share/doc/syslinux-*/syslinux.txt и изучение кусочков
конфигурации, которые уже существуют.
Цели config.mk:
* use/syslinux/ui/% -- конфигурирование интерфейса (см. cfg.in/00*.cfg);
при использовании автоматически добавляют syslinux в FEATURES;
@@ -17,8 +21,3 @@
Здесь производится первичная обработка конфигурационных данных,
окончательно проверяемых и используемых уже в инструментальном чруте.
TODO: может потребоваться обобщение механизма генерации с учётом
многоуровневых меню и включаемых файлов (которыми лучше не злоупотреблять
из соображений скорости инициализации загрузчика); требуется обеспечить
брендирование заголовков.

View File

@@ -0,0 +1 @@
prompt 0

View File

@@ -0,0 +1,2 @@
noescape 1

View File

@@ -1,5 +1,5 @@
label linux
menu label ^Install ALT Linux
menu label ^Install @distro@
kernel alt0/vmlinuz
append initrd=alt0/full.cz changedisk fastboot showopts automatic=method:cdrom ramdisk_size=@altinst_size@ vga=0x314 @bootargs@

View File

@@ -0,0 +1,8 @@
label sda
menu label Boot from ^1st hard/flash drive
localboot 0x80
label sdb
menu label Boot from ^2nd hard/flash drive
localboot 0x81

View File

@@ -17,16 +17,15 @@ endif
ifdef SYSLINUX_UI
SYSLINUX_MODULES := $(SYSLINUX_MODULES) $(SYSLINUX_UI)
else
$(warning no syslinux ui configured, default is plain text prompt)
SYSLINUX_UI := prompt
$(warning no syslinux ui configured, default is now none)
SYSLINUX_UI := none
endif
# SUBPROFILES are considered SYSLINUX_CFG too
# (note these can appear like stage2/live);
# (note these can appear like stage2@live);
# 01defaults.cfg is included indefinitely
SYSLINUX_CFG := $(SYSLINUX_CFG) $(notdir $(SUBPROFILES)) defaults
SYSLINUX_CFG := $(SYSLINUX_CFG) $(SUBPROFILE_DIRS) defaults
### have to operate BUILDDIR, not pretty...
DSTDIR := $(BUILDDIR)/stage1/files/syslinux/.in
# we can do SYSLINUX_{CFG,MODULES,FILES}
@@ -55,7 +54,7 @@ all: debug timeout
@echo $(SYSLINUX_FILES) > $(DSTDIR)/syslinux.list
# integerity check
timeout: bootargs
timeout: distro
@if [ "$(SYSLINUX_TIMEOUT)" -ge 0 ] 2>/dev/null; then \
TIMEOUT="$(SYSLINUX_TIMEOUT)"; \
else \
@@ -63,6 +62,14 @@ timeout: bootargs
fi; \
sed -i "s,@timeout@,$$TIMEOUT," $(DSTDIR)/*.cfg
distro: bootargs
@if [ -n "$(META_VOL_SET)" ]; then \
DISTRO="$(META_VOL_SET)"; \
else \
DISTRO="ALT Linux"; \
fi; \
sed -i "s,@distro@,$$DISTRO," $(DSTDIR)/*.cfg
# pass over additional parameters, if any
bootargs: clean
@if [ -n "$(STAGE2_BOOTARGS)" ]; then \

View File

@@ -3,6 +3,7 @@
# copy modules; see also ../../generate.mk
MODDIR="/usr/lib/syslinux"
CFG="$GLOBAL_BOOTLOADER.cfg"
mkdir -p "$WORKDIR/syslinux"
cd "$WORKDIR/syslinux"
@@ -30,7 +31,18 @@ if [ -n "$SYSLINUX_MODULES" ]; then
fi
# number ordering sponsored by shell's pathname expansion
grep -hv '^#' .in/[0-9][0-9]*.cfg > "$GLOBAL_BOOTLOADER.cfg"
grep -hv '^#' .in/[0-9][0-9]*.cfg > "$CFG"
# there should be either DEFAULT or UI directive there
if ! egrep -i '^(default|ui)' "$CFG"; then
DEFAULT="$(grep -i '^label ' "$CFG" | head -1 | cut -f2 -d' ')"
if [ -n "$DEFAULT" ]; then
echo "default $DEFAULT" >> "$CFG"
else
echo "error: no DEFAULT or UI directive and cannot guess" >&2
exit 1
fi
fi
# snippets are not going into the actual image
if [ "$DEBUG" != 2 ]; then rm -r .in/; fi

View File

@@ -1,4 +1,4 @@
use/systemd:
@$(call add_feature)
@$(call add,COMMON_PACKAGES,systemd systemd-units systemd-sysvinit)
@$(call add,COMMON_PACKAGES,installer-feature-systemd-stage3)
@$(call add,COMMON_PACKAGES,installer-feature-systemd-stage3 chkconfig)

View File

@@ -34,7 +34,7 @@ use/x11/lightdm/qt use/x11/lightdm/gtk: use/x11/lightdm/%: use/x11/runlevel5
@$(call add,THE_PACKAGES,lightdm-$*-greeter)
use/x11/kdm: use/x11/runlevel5
@$(call add,THE_PACKAGES,kdebase-kdm)
@$(call add,THE_PACKAGES,kdebase-kdm<4)
use/x11/gdm2.20: use/x11/runlevel5
@$(call add,THE_PACKAGES,gdm2.20)

View File

@@ -32,7 +32,7 @@ IMAGE_SORTDIR := $(SORTDIR)
# reconstruct instead of passing yet another variable
IMAGE_OUTDIR := $(IMAGEDIR)$(IMAGE_SORTDIR:%=/%)
IMAGE_OUTFILE := $(IMAGE_NAME)-$(DATE)-$(ARCH).$(IMAGE_TYPE)
IMAGE_OUTFILE := $(IMAGE_NAME)-$(STATUS)$(DATE)-$(ARCH).$(IMAGE_TYPE)
IMAGE_OUTPATH := $(IMAGE_OUTDIR)/$(IMAGE_OUTFILE)
IMAGE_RELPATH := $(IMAGE_SORTDIR:%=%/)$(IMAGE_OUTFILE)
IMAGE_RELDIR := $(IMAGE_OUTDIR:$(GLOBAL_BUILDDIR)/%=%)
@@ -48,6 +48,7 @@ COPY_TREE = ./files
# outdir shouldn't be wiped clean before use
CLEANUP_OUTDIR ?=
GLOBAL_TARGET := $(ARCH)
GLOBAL_HSH_APT_CONFIG := $(wildcard $(APTCONF))
# the lib/build-*.mk comes from features.in/build-*/lib
@@ -67,6 +68,8 @@ save-profile:
.PHONY: imagedir postprocess debug
prep: imagedir
imagedir:
@mkdir -p "$(IMAGE_OUTDIR)"
@@ -88,4 +91,6 @@ debug:
@echo "TOPDIR=$(TOPDIR)"
@echo "IMAGEDIR=$(IMAGEDIR)"
@echo "ARCH=$(ARCH)"
@echo "GLOBAL_TARGET=$(GLOBAL_TARGET)"
@echo "GLOBAL_HSH_APT_CONFIG=$(GLOBAL_HSH_APT_CONFIG)"
@echo "GLOBAL_HSH_USE_QEMU=$(GLOBAL_HSH_USE_QEMU)"

View File

@@ -2,7 +2,7 @@
PKGDIR := $(GLOBAL_BUILDDIR)/pkg
# duplicated from metaprofile makefiles for the sake of "local" builds
ARCH ?= $(shell arch | sed 's/i686/i586/; s/armv.*/arm/')
ARCH ?= $(shell arch | sed 's/i686/i586/; s/armv.*/arm/; s/ppc.*/ppc/')
DATE ?= $(shell date +%Y%m%d)
# prefix pkglist name with its directory to form a path (relative/absolute)

View File

@@ -0,0 +1,6 @@
#!/bin/sh
# fixup chroot's toplevel directory permissions (use to become 1775)
chmod 755 /
rm -f /.gitignore

View File

@@ -3,7 +3,7 @@ ANSI_OK ?= 1;32
ANSI_FAIL ?= 1;31
MAX_ERRORS = 3
GOTCHA := ^(((\*\* )?(E:|[Ee]rror|[Ww]arning).*)|(.* (conflicts|Depends:) .*)|(.* (Stop|failed)\.))$$
GOTCHA := ^(((\*\* )?(E:|[Ee]rror|[Ww]arning).*)|(.* (conflicts|Depends:) .*)|(.* (Stop|failed|not found)\.))$$
ifndef MKIMAGE_PROFILES
$(error this makefile is designed to be included in toplevel one)
@@ -20,8 +20,13 @@ LOWSPACE = 1024
# it's also nice to know how long and much it takes
START += time -f "%E %PCPU %Mk"
ifneq (,$(wildcard $(subst :,/$(ARCH) ,$(PATH):)))
# /usr/bin/{i586,x86_64} are setarch(8) symlinks but arm is not
# /usr/bin/{i586,x86_64} are setarch(8) symlinks but arm is not;
# also check whether non-x86 build is running native
ifeq (,$(wildcard $(subst :,/$(ARCH) ,$(PATH):)))
ifeq (,$(findstring $(ARCH),$(shell uname -m)))
export GLOBAL_HSH_USE_QEMU=$(ARCH)
endif
else
START += $(ARCH)
endif

View File

@@ -50,11 +50,15 @@ distclean: clean
} >&2
# builddir existing outside read-only metaprofile is less ephemeral
# than BUILDDIR is -- usually it's unneeded afterwards so just zap it
# than BUILDDIR variable is -- usually it's unneeded afterwards
# so just zap it unless DEBUG has been requested (moreso for multi
# image builds, UI based ones, and readonly metaprofile; or CHECK)
postclean: build-image
@{ \
if [ "$(NUM_TARGETS)" -gt 1 -a -z "$(DEBUG)" -a -z "$(__frontend)" ] ||\
[ ! -L "$(SYMLINK)" -a "0$(DEBUG)" -lt 2 ]; then \
if [ "0$(DEBUG)" -lt 2 -a -z "$(CHECK)" ] && \
[ "$(NUM_TARGETS)" -gt 1 \
-o -n "$(__frontend)" \
-o ! -L "$(SYMLINK)" ]; then \
echo "$(TIME) cleaning up after build"; \
$(MAKE) -C "$(BUILDDIR)" distclean \
GLOBAL_BUILDDIR="$(BUILDDIR)" $(LOG) ||:; \

View File

@@ -44,29 +44,28 @@ profile/init: distclean
@$(call put,ifndef DISTCFG_MK)
@$(call put,DISTCFG_MK = 1)
@{ \
if type -t git >&/dev/null; then \
if [ -d .git ]; then \
git show-ref --head -d -s -- HEAD && \
git status -s && \
echo; \
fi $(LOG); \
fi; \
mp-showref $(LOG); \
{ \
eval `apt-config shell $${APTCONF:+-c=$(wildcard $(APTCONF))} \
APTCONF="$(wildcard $(APTCONF))"; \
echo "** using $${APTCONF:-system apt configuration}:"; \
eval `apt-config shell $${APTCONF:+-c=$$APTCONF} \
SOURCELIST Dir::Etc::sourcelist/f \
SOURCEPARTS Dir::Etc::sourceparts/d`; \
find "$$SOURCEPARTS" -name '*.list' \
| xargs egrep -Rhv '^#|^[[:blank:]]*$$' "$$SOURCELIST" && \
| xargs egrep -Rhv '^#|^[[:blank:]]*$$' "$$SOURCELIST" \
| tee $(BUILDDIR)/sources.list; \
echo; \
} $(LOG); \
if type -t git >&/dev/null; then \
if cd $(BUILDDIR); then \
git init -q && \
git add . && \
git commit -qam 'derivative profile initialized'; \
cd ->&/dev/null; \
fi; \
if ! grep -q "[ ]$(ARCH)[ ]" $(BUILDDIR)/sources.list; then \
echo -n "requested arch '$$ARCH' unavailable" >&2; \
if [ -z "$(APTCONF)" ]; then \
echo " (no APTCONF)"; \
else \
echo; \
fi >&2; \
exit 1; \
fi; \
mp-commit "$(BUILDDIR)" "derivative profile initialized"; \
if [ -w . ]; then \
rm -f "$(SYMLINK)" && \
ln -s "$(BUILDDIR)" "$(SYMLINK)" && \
@@ -86,21 +85,17 @@ profile/bare: profile/init
@$(call try,IMAGEDIR,$(IMAGEDIR))
@$(call try,LOGDIR,$(LOGDIR))
@$(call try,BRANDING,altlinux-sisyphus)
ifeq (,$(REPO:altlinux%=))
@$(call set,IMAGE_INIT_LIST,+branding-$$(BRANDING)-release)
@if type -t git >&/dev/null && cd $(BUILDDIR); then \
git init -q && \
git add . && \
git commit -qam 'image configuration defaults set'; \
fi
endif
@mp-commit "$(BUILDDIR)" "image configuration defaults set"
# put the derived SUBPROFILE_DIRS here to get it logged in clear text by the way
profile/finalize:
@$(call put,SUBPROFILE_DIRS = $$(notdir $$(subst @,/,$$(SUBPROFILES))))
@if [ -s $(RC) ]; then $(call put,-include $(RC)); fi
@$(call put,endif)
@if type -t git >&/dev/null && cd $(BUILDDIR); then \
git init -q && \
git add . && \
git commit -qam 'image configuration finalized'; \
fi
@mp-commit "$(BUILDDIR)" "image configuration finalized"
# requires already formed distcfg.mk for useful output
profile/dump-vars:

View File

@@ -6,17 +6,25 @@ endif
ifeq (ve,$(IMAGE_CLASS))
# no package management and networking
ve/.bare: profile/bare
@$(call add,BASE_PACKAGES,basesystem)
# no "vzctl enter"
ve/bare: ve/.bare
@$(call add,BASE_PACKAGES,apt)
@$(call add,BASE_PACKAGES,sysvinit etcnet apt)
ve/generic: ve/.bare
# /dev/pty and friends start here
ve/base: ve/bare
@$(call add,BASE_PACKAGES,interactivesystem)
# this should be more or less deployable
ve/generic: ve/base
@$(call add,BASE_LISTS,openssh \
$(call tags,base && (server || network || security || pkg)))
ve/openvpn: ve/.bare
# example of service-specific template
ve/openvpn: ve/bare
@$(call add,BASE_LISTS,$(call tags,server openvpn))
endif

View File

@@ -8,7 +8,7 @@ ifeq (vm,$(IMAGE_CLASS))
vm/.bare: profile/bare
@$(call add,BASE_PACKAGES,interactivesystem lilo shadow-utils e2fsprogs)
@$(call set,KFLAVOURS,std-def)
@$(call set,KFLAVOURS,un-def)
vm/bare: vm/.bare
@$(call add,BASE_PACKAGES,apt)

View File

@@ -6,8 +6,6 @@
# --- in BUILDDIR
# 4. build subprofiles and subsequently an image
MKIMAGE_PROFILES := $(dir $(lastword $(MAKEFILE_LIST)))
# deal with one target at a time
IMAGE_TARGET := $(firstword $(MAKECMDGOALS))# ve/generic.tar.gz
ifeq (./,$(dir $(IMAGE_TARGET)))# convenience fallback
@@ -26,6 +24,8 @@ else
BUILDDIR_PREFIX ?= mkimage-profiles.build/$(IMAGE_CONF).$(ARCH)
endif
export MKIMAGE_PROFILES := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
# preferences
-include $(HOME)/.mkimage/profiles.mk

View File

@@ -14,13 +14,7 @@ all: $(GLOBAL_DEBUG)
mkdir -p $(TARGET) && \
cp -at $(TARGET) -- \
$(addsuffix .directory,$(THE_GROUPS) $(MAIN_GROUPS)); \
if type -t git >&/dev/null && cd $(TARGET); then \
if [ -n "`git status -s`" ]; then \
git add . && \
git commit -qam "requested $(SUFFIX) copied over"; \
fi; \
cd - >&/dev/null; \
fi; \
mp-commit "$(TARGET)" "requested $(SUFFIX) copied over"; \
fi
debug:

View File

@@ -19,13 +19,7 @@ SUFFIX := pkg/lists
TARGET := $(BUILDDIR)/$(SUFFIX)
all: $(TARGET) $(GLOBAL_DEBUG) $(DOTBASE) copy-lists copy-groups
@if type -t git >&/dev/null && cd $(TARGET); then \
if [ -n "`git status -s`" ]; then \
git add . && \
git commit -qam "requested $(SUFFIX) copied over"; \
fi; \
cd - >&/dev/null; \
fi
@mp-commit "$(TARGET)" "requested $(SUFFIX) copied over"
copy-lists:
@# env | sort -u | grep _LISTS | xargs cp

15
pkg.in/lists/gns3 Normal file
View File

@@ -0,0 +1,15 @@
gns3
dynamips
dynagen
qemu
qemu-kvm
virtualbox
wireshark
su
livecd-virtualbox
livecd-online-repo

View File

@@ -3,3 +3,4 @@ xinit
xinitrc
livecd-setlocale
installer-feature-runlevel5-stage3
su

View File

@@ -15,6 +15,36 @@ mate-session
#mate-session-manager
mate-settings-daemon
mate-themes
mate-vfs
mate-vfs gvfs-backends
mate-vfs-smb
mate-window-manager
mate-applets
mate-bluetooth
mate-calc
mate-charmap
mate-document-viewer
mate-document-viewer-caja
mate-document-viewer-djvu
mate-file-archiver
mate-image-viewer
mate-media
mate-media-apps
mate-netspeed
mate-power-manager
mate-screensaver
mate-terminal
mate-utils
mate-utils-mate-system-log
mate-file-manager-extensions
mate-file-manager-image-converter
mate-file-manager-open-terminal
mate-file-manager-sendto
parcellite
### should be dropped at some stage; see bugreports within this thread:
# http://lists.altlinux.org/pipermail/sisyphus/2012-August/358079.html
libmatekbd-capplet
iso-codes
tzdata

View File

@@ -16,6 +16,7 @@ qt4-settings
qtparted
tubularix
smplayer
qps
# upstream recommended
#ptbatterysystemtray

View File

@@ -0,0 +1,2 @@
cryptmount
cryptsetup

View File

@@ -24,9 +24,11 @@ parted
sdparm
sfdisk
smartmontools
testdisk
mtools
partimage
gdisk
cgdisk
fixparts
# Applications
binutils
@@ -60,12 +62,20 @@ reiserfsprogs
xfsprogs
btrfs-progs
ext3grep
dmsdos
extundelete
scalpel
testdisk
testdisk-doc
zerofree
wipefreespace
# Applications/Networking
arpwatch
elinks
hostinfo
iftop
ipmitool
iproute2
iptables
iputils

View File

@@ -10,22 +10,17 @@ include $(BUILDDIR)/distcfg.mk
# take src/ and put it as dst/ (for stage2 variants)
all:
@for sub in $(SUBPROFILES); do \
src="$${sub%/*}" && \
dst="$${sub#*/}" && \
src="$${sub%@*}" && \
dst="$${sub#*@}" && \
neq="$${src#$$dst}" && \
rsync -qa "$$src/" "$(BUILDDIR)/$$dst/" && \
if type -t git >&/dev/null && cd "$(BUILDDIR)/$$dst/"; then \
if [ -n "`git status -s`" ]; then \
git add . && \
git commit -qam "$$dst subprofile initialized$${neq:+ (using $$src)}"; \
fi; \
cd - >&/dev/null; \
fi; \
mp-commit "$(BUILDDIR)/$$dst/" \
"$$dst subprofile initialized$${neq:+ (using $$src)}"; \
done
clean:
@for sub in $(SUBPROFILES); do \
dst="${sub#*/}" && \
dst="${sub#*@}" && \
if [ -n "$$dst" -a -n "$(BUILDDIR)" ]; then \
rm -r "$(BUILDDIR)/$$dst" && \
mkdir -p "$(BUILDDIR)/$$dst"; \

View File

@@ -0,0 +1,6 @@
#!/bin/sh
# fixup chroot's toplevel directory permissions (use to become 1775)
chmod 755 /
rm -f /.gitignore