Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
mkimage-profiles
Commits
d920c990
Commit
d920c990
authored
Sep 08, 2010
by
Michael Shigorin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--as-needed for pkg/lists
As not every package list is useful for every distro, only the needed lists should be copied for a particular one.
parent
2f967a05
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
64 additions
and
31 deletions
+64
-31
tags2lists
bin/tags2lists
+3
-2
clean.mk
clean.mk
+2
-3
configure
configure
+2
-3
distro.mk
distro.mk
+11
-7
Makefile
image.in/Makefile
+2
-2
configure.ac
image.in/configure.ac
+4
-4
Makefile
image.in/install2/Makefile
+6
-6
Makefile
image.in/main/Makefile
+3
-2
iso.mk
iso.mk
+7
-2
Makefile
pkg/Makefile
+24
-0
No files found.
bin/tags2lists
View file @
d920c990
#!/bin/sh -f
# a script to transform a tag name, a list of tag names (ANDed then),
# or a complex boolean expression into a list of package list names
#
# or a complex boolean expression into a list of package list names.
# examples of expected stdin:
#
# kde
...
...
@@ -9,6 +8,8 @@
# (base && (kernel || apt || alterator))
#
# TODO; consider s/-name/-path/
find
.
$(
sed
\
-e
"s,
\(
[^&|! ()']
\+\)
,-name *_
\1
_*,g"
\
-e
"s, *&& *, -a ,g"
\
...
...
clean.mk
View file @
d920c990
clean:
@echo '** cleaning up...'
@[ -d build/ ] && \
make -C build $@ GLOBAL_BUILDDIR=$(shell readlink build) \
make -C build
/image
$@ GLOBAL_BUILDDIR=$(shell readlink build) \
||:
distclean: clean
@[ -d build/ ] && \
make -C build $@ GLOBAL_BUILDDIR=$(shell readlink build) && \
make -C build
/image
$@ GLOBAL_BUILDDIR=$(shell readlink build) && \
rm -r $(shell readlink build) && \
rm .config.mk build \
||:
# it can be symlinked if r/w (see configure);
# if not, then should come from environment
#BUILDDIR ?= $(shell realpath build)
BUILDDIR ?= $(shell realpath build)
prep:
...
...
configure
View file @
d920c990
...
...
@@ -13,11 +13,10 @@ PARAMS="$@"
# keeping profile itself completely readonly would be nice
export
BUILDDIR
=
"
$(
bin/mktmpdir mkimage-profiles.build
)
"
ls
-ld
$BUILDDIR
#
ls -ld $BUILDDIR
#find image.in -type f -print0 | xargs -r0 cp -at "$BUILDDIR"/ --
rsync
-qa
--delete
image.in/
"
$BUILDDIR
"
/
cp
-a
pkg
"
$BUILDDIR
"
/
rsync
-qaH
--delete
image.in/
"
$BUILDDIR
"
/image/
#rm -f "$BUILDDIR"/.config.mk
touch
"
$BUILDDIR
"
/.config.mk
mkdir
"
$BUILDDIR
"
/.mki
...
...
distro.mk
View file @
d920c990
...
...
@@ -5,7 +5,8 @@ CONFIG = $(BUILDDIR)/.config.mk
# shell will get confused by ' or args get spammed with "
put = $(and $(1),$(put_body))
define put_body
@printf '%s\n' '$(1)# $@' >> "$(CONFIG)";
@printf '%s\n' '$(1)#=- $@' >> "$(CONFIG)";
@# TODO: maybe some more logging/tracing, otherwise inline this
endef
# request particular image subprofile inclusion
...
...
@@ -15,25 +16,28 @@ sub/%:
init:
@echo "** starting distro configuration build process"
:> $(CONFIG)
$(call put,KFLAVOUR=std-def)
$(call put,KFLAVOUR=std-def)
###
$(call put,IMAGE_INIT_LIST=+branding-$$(BRANDING)-release)
$(call put,STAGE1_PACKAGES=kernel-image-$$(KFLAVOUR))
#$(call put,STAGE1_PACKAGES=kernel-image-$$(KFLAVOUR))
$(call put,KERNEL_PACKAGES=kernel-image-$$(KFLAVOUR))
# NB: our */* are phony targets really, just for namespace
distro/installer: init sub/install2
@#$(call put,BRANDING=altlinux-sisyphus) ###
$(call put,BASE_LISTS=base kernel)
$(call put,INSTALL2_PACKAGES=
kernel-image-$$(KFLAVOUR))
$(call put,INSTALL2_PACKAGES=
installer-distro-server-light-stage2) ###
distro/server-base: distro/installer sub/main use/memtest86
$(call put,BRANDING=altlinux-backup-server) ###
$(call put,BASE_LISTS+=server-base kernel-server)
distro/server-light: distro/server-base
$(call put,KFLAVOUR=ovz-smp)
distro/server-light: distro/server-base
use/bootsplash
$(call put,KFLAVOUR=ovz-smp)
# override default
$(call put,BRANDING=sisyphus-server-light)
$(call put,DISK_LISTS+=kernel-wifi)
use/memtest86:
$(call put,COMMON_PACKAGES+=memtest86+)
@# configure syslinux/isolinux as well
use/bootsplash:
$(call put,COMMON_TAGS+=bootsplash)
image.in/Makefile
View file @
d920c990
...
...
@@ -7,7 +7,7 @@ SUBDIRS = $(SUBPROFILES)
# we usually need a bootloader (until stage1 is separate),
# and "main" subprofile needs genbasedir
CHROOT_PACKAGES
=
syslinux apt-utils
$(
STAGE1
_PACKAGES)
CHROOT_PACKAGES
=
syslinux apt-utils
$(
KERNEL
_PACKAGES)
###
MKI_PACK_RESULTS
=
boot:mkimage-profiles.iso
...
...
@@ -19,7 +19,7 @@ PROPAGATOR_VERSION = mkimage-profiles 2.0
PROPAGATOR_MAR_MODULES
=
./modules
PROPAGATOR_INITFS
=
./initfs
include
/usr/share/mkimage
/targets.mk
include
$(MKIMAGE_PREFIX)
/targets.mk
all
:
prep copy-tree copy-subdirs run-scripts pack-image
...
...
image.in/configure.ac
View file @
d920c990
...
...
@@ -18,16 +18,16 @@ AC_ARG_WITH(aptconf,
AC_ARG_WITH(mkimage,
AC_HELP_STRING([--with-mkimage=dir],
[custom mkimage prefix, e.g '--with-mkimage=/home/me/mkimage']),
[custom mkimage prefix, e.g '--with-mkimage=/home/me/
usr/share/
mkimage']),
[
AC_MSG_CHECKING([mkimage])
if test -d "$with_mkimage/
usr/share/mkimage
"; then
if test -d "$with_mkimage/
tools
"; then
MKIMAGE_PREFIX="$with_mkimage"
AC_MSG_RESULT([** $with_mkimage/
usr/share/mkimage
exists])
AC_MSG_RESULT([** $with_mkimage/
tools
exists])
fi
],
[
MKIMAGE_PREFIX=''
MKIMAGE_PREFIX='
/usr/share/mkimage
'
])
# with-kernel: provide two separate desktop/server default substs?
...
...
image.in/install2/Makefile
View file @
d920c990
default
:
all
include
$(GLOBAL_BUILDDIR)
/globals.mk
include
$(GLOBAL_BUILDDIR)
/functions.mk
include
..
/globals.mk
include
..
/functions.mk
include
$(MKIMAGE_PREFIX)/config.mk
include
$(GLOBAL_BUILDDIR)/.config.mk
IMAGE_PACKAGES
=
kernel-image-std-def
\
installer-distro-server-light-stage2
\
./packages
\
$(INSTALL2_PACKAGES)
IMAGE_PACKAGES
=
$(KERNEL_PACKAGES)
\
$(COMMON_PACKAGES)
\
$(INSTALL2_PACKAGES)
\
./packages
MKI_PACK_RESULTS
=
squash:altinst
...
...
image.in/main/Makefile
View file @
d920c990
...
...
@@ -2,8 +2,8 @@
default
:
all
include
$(GLOBAL_BUILDDIR)
/globals.mk
include
$(GLOBAL_BUILDDIR)
/functions.mk
include
..
/globals.mk
include
..
/functions.mk
include
$(MKIMAGE_PREFIX)/config.mk
include
$(GLOBAL_BUILDDIR)/.config.mk
...
...
@@ -11,6 +11,7 @@ CHROOT_PACKAGES = apt-utils rsync
PACKAGES_EXPAND_METHOD
=
regexp
IMAGE_PACKAGES
=
$
(
call list,.base
)
\
$(COMMON_PACKAGES)
\
$(MAIN_PACKAGES)
\
$
(
call list,
$(BASE_LISTS)
)
\
$
(
call list,
$(DISK_LISTS)
)
...
...
iso.mk
View file @
d920c990
iso:
pkgs:
@echo "** starting package lists build process"
$(MAKE) -C pkg BUILDDIR=$(BUILDDIR)
iso: pkgs
@echo "** starting image build process"
@### setup GLOBAL_BOOT_TYPE, etc
i586 make -C $(BUILDDIR) GLOBAL_BUILDDIR=$(BUILDDIR)
(cd $(BUILDDIR)/image; autoconf; ./configure --with-aptconf=/etc/apt/apt.conf.SS_64) ###
echo $(MAKE) -C $(BUILDDIR)/image GLOBAL_BUILDDIR=$(BUILDDIR)
@# check iso size
pkg/Makefile
0 → 100644
View file @
d920c990
# copy package lists referenced in distro configuration
# over to build dir
include
$(BUILDDIR)/.config.mk
.PHONY
:
pkgs
# env | sort -u | grep _LISTS | xargs cp
pkgs
:
prep test
@
$
(
foreach V,
\
$
(
filter %_LISTS,
$
(
sort
$
(
.VARIABLES
)))
,
\
$
(
if
$
(
filter environment% file,
$
(
origin
$V
))
,
\
$(
shell
cp
-a
$
(
addprefix lists/,
$
(
value
$V))
\
$(BUILDDIR)
/pkg/lists/
)
))
# moving this into pkgs spoils execution order (clobbers results)
prep
:
mkdir
-p
$(BUILDDIR)
/pkg/
{
lists,groups
}
# dump *_LISTS variables' values
test
:
@
$
(
foreach V,
\
$
(
filter %_LISTS,
$
(
sort
$
(
.VARIABLES
)))
,
\
$
(
if
$
(
filter environment% file,
$
(
origin
$V
))
,
\
$
(
warning
$V
=
$
(
value
$V
))))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment