Compare commits

...

7 Commits
0.9.3 ... 0.9.4

5 changed files with 51 additions and 101 deletions

View File

@@ -22,17 +22,6 @@ M4 = m4 -P
CHMODAW = chmod a-w
CHMODX = chmod +x
ifdef WITH-PKG
WITH-PKG = no
else
WITH-PKG = yes
endif
ifdef WITH-ISO
WITH-ISO = no
else
WITH-ISO = yes
endif
CPIODIR = $(SYSCONFDIR)/initcpio
SYSCONF = \
@@ -103,19 +92,7 @@ LIBS_ISO = \
SHARED_ISO = \
data/mkinitcpio.conf
ifeq ($(WITH-PKG),yes)
all: $(BIN_PKG)
endif
ifeq ($(WITH-ISO),yes)
all: $(BIN_ISO)
endif
all: $(BIN_BASE)
all: $(BIN_BASE) $(BIN_PKG) $(BIN_ISO)
EDIT = sed -e "s|@datadir[@]|$(DATADIR)/$(TOOLS)|g" \
-e "s|@sysconfdir[@]|$(SYSCONFDIR)/$(TOOLS)|g" \
@@ -177,54 +154,6 @@ install_iso: install_cpio
install $(DIRMODE) $(DESTDIR)$(DATADIR)/$(TOOLS)
install $(FILEMODE) $(SHARED_ISO) $(DESTDIR)$(DATADIR)/$(TOOLS)
uninstall_base:
for f in $(notdir $(SYSCONF)); do $(RM) $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)/$$f; done
for f in $(notdir $(BIN_BASE)); do $(RM) $(DESTDIR)$(BINDIR)/$$f; done
for f in $(notdir $(LIBS_BASE)); do $(RM) $(DESTDIR)$(LIBDIR)/$(TOOLS)/$$f; done
for f in $(notdir $(SHARED_BASE)); do $(RM) $(DESTDIR)$(DATADIR)/$(TOOLS)/$$f; done
$(RMD) $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)
$(RMD) $(DESTDIR)$(LIBDIR)/$(TOOLS)
$(RMD) $(DESTDIR)$(DATADIR)/$(TOOLS)
install: install_base install_pkg install_iso
uninstall_pkg:
for f in $(notdir $(BIN_PKG)); do $(RM) $(DESTDIR)$(BINDIR)/$$f; done
$(RM) $(DESTDIR)$(BINDIR)/find-libprovides
for l in $(COMMITPKG_SYMS); do $(RM) $(DESTDIR)$(BINDIR)/$$l; done
for f in $(notdir $(LIBS_PKG)); do $(RM) $(DESTDIR)$(LIBDIR)/$(TOOLS)/$$f; done
for f in $(notdir $(PATCHES)); do $(RM) $(DESTDIR)$(DATADIR)/$(TOOLS)/patches/$$f; done
for f in $(notdir $(SHARED_PKG)); do $(RM) $(DESTDIR)$(DATADIR)/$(TOOLS)/$$f; done
uninstall_cpio:
+make CPIODIR=$(CPIODIR) DESTDIR=$(DESTDIR) -C initcpio uninstall
uninstall_iso: uninstall_cpio
for f in $(notdir $(BIN_ISO)); do $(RM) $(DESTDIR)$(BINDIR)/$$f; done
for l in $(notdir $(BIN_ISO_SYMS)); do $(RM) $(DESTDIR)$(BINDIR)/$$l; done
for f in $(notdir $(LIBS_ISO)); do $(RM) $(DESTDIR)$(LIBDIR)/$(TOOLS)/$$f; done
for f in $(notdir $(SHARED_ISO)); do $(RM) $(DESTDIR)$(DATADIR)/$(TOOLS)/$$f; done
ifeq ($(WITH-PKG),yes)
install: install_pkg
uninstall: uninstall_pkg
endif
ifeq ($(WITH-ISO),yes)
install: install_iso
uninstall: uninstall_iso
endif
install: install_base
uninstall: uninstall_base
dist:
git archive --format=tar --prefix=$(TOOLS)-$(VERSION)/ $(VERSION) | gzip -9 > $(TOOLS)-$(VERSION).tar.gz
gpg --detach-sign --use-agent $(TOOLS)-$(VERSION).tar.gz
.PHONY: all clean install uninstall dist
.PHONY: all clean install

View File

@@ -6,9 +6,6 @@ artools
* PREFIX=/usr/local (default if defined)
* SYSCONFDIR=/etc
* WITH-PKG=yes
* WITH-ISO=yes
#### Dependencies
@@ -21,7 +18,6 @@ artools
##### Runtime:
- base:
* openssh
* rsync
* haveged
@@ -30,9 +26,8 @@ artools
* pacman
- pkg:
* namcap
* git
* git-subrepo
- iso:
* dosfstools

View File

@@ -53,8 +53,8 @@ pull_tree_artix(){
cd ${tree_dir_artix}
for tree in packages packages-galaxy;do
if [[ -d ${tree} ]];then
config_tree "${tree}"
cd ${tree}
config_tree
msg "Checking (%s)" "${tree}"
pull_tree
cd ..

View File

@@ -20,6 +20,11 @@ prepare_initcpio(){
prepare_initramfs(){
local mnt="$1"
cp ${DATADIR}/mkinitcpio.conf $mnt/etc/mkinitcpio-artix.conf
if [[ "${profile}" != 'base' ]];then
sed -e 's/artix_pxe_common artix_pxe_http artix_pxe_nbd artix_pxe_nfs //' -i $mnt/etc/mkinitcpio-artix.conf
fi
if [[ -n ${gpgkey} ]]; then
user_run "gpg --export ${gpgkey} >${AT_USERCONFDIR}/gpgkey"
exec 17<>${AT_USERCONFDIR}/gpgkey
@@ -40,8 +45,12 @@ prepare_initramfs(){
prepare_boot_extras(){
local src="$1" dest="$2"
# cp $src/boot/intel-ucode.img $dest/intel_ucode.img
# cp $src/usr/share/licenses/intel-ucode/LICENSE $dest/intel_ucode.LICENSE
# for u in intel amd;do
# cp $src/boot/$u-ucode.img $dest/$u-ucode.img
# cp $src/usr/share/licenses/$u-ucode/LICENSE $dest/$u-ucode.LICENSE
# done
cp $src/boot/memtest86+/memtest.bin $dest/memtest
cp $src/usr/share/licenses/common/GPL2/license.txt $dest/memtest.COPYING
}
@@ -83,8 +92,13 @@ prepare_grub(){
cp -r ${theme}/themes/artix ${grub}/themes/
cp -r ${theme}/{locales,tz} ${grub}
msg2 "Creating %s ..." "unicode.pf2"
grub-mkfont -o ${grub}/unicode.pf2 /usr/share/fonts/misc/unifont.bdf
if [[ -f /usr/share/grub/unicode.pf2 ]];then
msg2 "Copying %s ..." "unicode.pf2"
cp /usr/share/grub/unicode.pf2 ${grub}/unicode.pf2
else
msg2 "Creating %s ..." "unicode.pf2"
grub-mkfont -o ${grub}/unicode.pf2 /usr/share/fonts/misc/unifont.bdf
fi
local size=4M mnt="${mnt_dir}/efiboot" efi_img="$3/efi.img"
msg2 "Creating fat image of %s ..." "${size}"

View File

@@ -30,22 +30,34 @@ write_users_conf(){
write_servicescfg_conf(){
local init="$2"
local conf="$1"/"$init"cfg.conf state='add'
local conf="$1"/services-"$init".conf
msg2 "Writing %s ..." "${conf##*/}"
echo '---' > "$conf"
if [[ "$init" == 'runit' ]];then
state='enabled'
echo 'svdir: /etc/runit/sv' >> "$conf"
echo '' >> "$conf"
echo 'runsvdir: /etc/runit/runsvdir' >> "$conf"
fi
echo '' >> "$conf"
echo 'services:' >> "$conf"
echo " $state:" >> "$conf"
for svc in ${services[@]};do
echo " - name: $svc" >> "$conf"
echo ' runlevel: default' >> "$conf"
done
case "$init" in
'runit')
echo 'svDir: /etc/runit/sv' >> "$conf"
echo '' >> "$conf"
echo 'runsvDir: /etc/runit/runsvdir' >> "$conf"
echo '' >> "$conf"
echo 'services:' >> "$conf"
echo " enabled:" >> "$conf"
for svc in ${services[@]};do
echo " - name: $svc" >> "$conf"
echo ' runlevel: default' >> "$conf"
done
;;
'openrc')
echo 'initdDir: /etc/init.d' >> "$conf"
echo '' >> "$conf"
echo 'runlevelsDir: /etc/runlevels' >> "$conf"
echo '' >> "$conf"
echo 'services:' >> "$conf"
for svc in ${services[@]};do
echo " - name: $svc" >> "$conf"
echo ' runlevel: default' >> "$conf"
done
;;
esac
}
write_postcfg_conf(){
@@ -66,8 +78,8 @@ configure_calamares(){
write_users_conf "$mods"
write_servicescfg_conf "$mods" "$init"
write_postcfg_conf "$mods" "$init"
local name="$init"cfg
sed -e "s|openrccfg|$name|" -i "$1"/etc/calamares/settings.conf
local name=services-"$init"
sed -e "s|services-openrc|$name|" -i "$1"/etc/calamares/settings.conf
info "Done configuring [Calamares]"
fi
}