ppcrcd/trunk: Makefile base.pkgs

sparky cvs at pld-linux.org
Sat Jan 7 15:04:20 CET 2006


Author: sparky
Date: Sat Jan  7 15:04:16 2006
New Revision: 6761

Modified:
   ppcrcd/trunk/Makefile
   ppcrcd/trunk/base.pkgs
Log:
- sleep before touch - solves many problems


Modified: ppcrcd/trunk/Makefile
==============================================================================
--- ppcrcd/trunk/Makefile	(original)
+++ ppcrcd/trunk/Makefile	Sat Jan  7 15:04:16 2006
@@ -15,7 +15,7 @@
 all:	out/ppcrcd.iso
 	
 include base.pkgs
-#include add.pkgs
+include add.pkgs
 
 ppcrcd_iso = out/ppcrcd.iso
 cdroot = out/cdroot
@@ -55,9 +55,8 @@
 $(cdroot):	$(ppcrcd_sqf) $(boot) bootinfo.txt
 	rm -rf $@{,.work}
 	mkdir -p $@.work/ppc
-	ln -s $(PWD)/$(ppcrcd_sqf) $@.work
-	cp -a $(boot) $@.work
-	cp -a bootinfo.txt $@.work/boot/ofboot.b
+	ln -s ../images/ppcrcd.sqf $@.work
+	ln -s ../boot $@.work
 	ln -s $(PWD)/bootinfo.txt $@.work/ppc
 	mv -f $@{.work,}
 
@@ -73,14 +72,14 @@
 		$(root_initrd)	\
 		$@
 
-$(root_initrd):	$(root_installed) initrd.dir
+$(root_initrd):	out/touch/root_installed initrd.dir
 	rm -rf $@{,.work}
 	cp -r initrd.dir $@.work
 	find $@.work -name .svn | xargs rm -rf
 	sed -e 's/@_VERSION_@/$(VERSION)/g'	\
 		-i $@.work/linuxrc
 	for MOD in $(INITRDMODULES); do \
-		find $(root_installed)/lib/modules/ -name $$MOD.ko.gz \
+		find $(root_inst)/lib/modules/ -name $$MOD.ko.gz \
 			-exec cp "{}" $@.work/lib/modules ";"; \
 	done
 	gunzip $@.work/lib/modules/*
@@ -91,20 +90,22 @@
 			l)	ln -s $$N $$M;;			\
 		esac;					\
 	done < devs
-	cp $(root_installed)/bin/initrd-busybox $@.work/bin
+	cp $(root_inst)/bin/initrd-busybox $@.work/bin
+	$(SU) find $@.work -user $$USER | $(SU) xargs chown root
+	$(SU) find $@.work -group users | $(SU) xargs chgrp root
 	mv -f $@{.work,}
 
 $(touch)/pld-release:	$(root_stripped)
 	echo "PLD Linux: PPCRCD $(VERSION) ($(shell date -I -u))" | \
 		$(SU) tee $(root_stripped)/etc/pld-release
-	@touch $@
+	sleep 1 && touch $@
 
 $(touch)/stop/%:	$(root_stripped)
 	$(SU) chroot $(root_stripped) chkconfig --level 2345 \
 		$(@:out/touch/stop/%=%) off
-	@touch $@
+	sleep 1 && touch $@
 
-$(boot):	$(root_installed) $(initrd_sqf) yaboot/yaboot boot.dir
+$(boot):	out/touch/root_installed $(initrd_sqf) yaboot/yaboot boot.dir
 	rm -rf $@{,.work}
 	mkdir -p $@.work
 	cp boot.dir/{hfs.map,boot.msg{,.net},yaboot.conf{,.net},*.help} $@.work
@@ -112,15 +113,16 @@
 	sed -e 's/"@_VERSION_@"/$(VER13)/g'	\
 		-i $@.work/boot.msg		\
 		-i $@.work/boot.msg.net
-	cp out/root/boot/vmlinux-* $@.work/vmlinux
+	cp out/root/inst/boot/vmlinux-* $@.work/vmlinux
 	strip $@.work/vmlinux
 	strip -R.comment $@.work/vmlinux
 	gzip -9 $@.work/vmlinux
 	cp yaboot/yaboot $@.work
-	$(SU) cp initrd.sqf $@.work
+	cp -a bootinfo.txt $@.work/ofboot.b
+	$(SU) cp $(initrd_sqf) $@.work
 	mv $@{.work,}
 
-$(root_stripped):	$(root_installed) conf.dir doc
+$(root_stripped):	out/touch/root_installed conf.dir doc
 	$(SU) rm -rf $@{,.work}
 	#
 	mkdir -p $@.work/dev
@@ -128,7 +130,7 @@
 		$(SU) mknod $$N $$T $$M $$m;		\
 	done < $(PWD)/conf.dir/dev/devs
 	#
-	$(SU) cp -a $(root_installed)/* $@.work
+	$(SU) cp -a $(root_inst)/* $@.work
 	#
 	while read TODEL; do $(SU) rm -rf $@.work/$$TODEL; done < todel
 	#
@@ -136,7 +138,7 @@
 		grep "not stripped" | sed "s/:.*//" | xargs $(SU) strip
 	$(SU) find $@.work -name "*.gz" | xargs -n 20 sudo gunzip
 	find $@.work/lib/modules -type f -name "*.ko" | \
-		xargs $(SU) strip --strip-unneeded -g
+		xargs -n 20 $(SU) strip --strip-unneeded -g
 	#
 	KVER=`ls $@.work/lib/modules` && \
 		$(SU) chroot $@.work /sbin/depmod -a $$KVER
@@ -151,20 +153,21 @@
 	$(SU) sed -e 's/pldmachine/ppcrcd/' \
 		-i $@.work/etc/sysconfig/network
 	#
-	$(SU) chown root -R $@.work/* # XXX
+	$(SU) find $@.work -user $$USER | $(SU) xargs chown root
+	$(SU) find $@.work -group users | $(SU) xargs chgrp root
 	$(SU) mv $@{.work,}
 
 
 yaboot/yaboot:	yaboot/yaboot.c yaboot/Makefile /usr/lib/libext2fs.a
 	make -C yaboot
 
-$(root_installed):	$(INSTALL) $(root_inst) $(touch)/root-ok-deps
+out/touch/root_installed:	$(INSTALL) $(root_inst) $(touch)/root-ok-deps
 	-$(SU) umount $(root_inst)/proc
-	ln -sf $(root_inst) $@
+	sleep 1 && touch $@
 
 $(touch)/root-ok-deps:	$(INSTALL) $(root_inst)
 	rpm -Va --nofiles --root=$(PWD)/$(root_inst)
-	@touch $@
+	sleep 1 && touch $@
 	
 $(root_inst):
 	mkdir $@
@@ -173,7 +176,7 @@
 out/rpm/installed/%:	out/rpm/rpms/% $(root_inst)
 	@$(SU) rpm -Uhv --root=$(PWD)/$(root_inst) `cat $(firstword $^)`  \
 		$(INSTOPTS-$(notdir $@)) --define="_install_langs %{nil}"
-	@touch $@
+	sleep 1 && touch $@
 
 out/rpm/rpms/%:
 	@#XXX every package neads something like: $(R)/setup: $(P)/setup
@@ -192,10 +195,10 @@
 			sed -e 's at .*/@@g' -e 's/-[^-]*-[^-]*$$//'`;	\
 	done
 	rm buildout EXIT
-	touch $@
+	sleep 1 && touch $@
 
 out/rpm/prep/%:	out/rpm/sources/%
-	touch $@
+	sleep 1 && touch $@
 
 out/rpm/sources/%:	out/rpm/SPECS/%.spec
 	#######################################################################
@@ -205,12 +208,12 @@
 		$(if $(REV-$(notdir $@)),-r $(REV-$(notdir $@)),) \
 		--define _topdir $(PWD)/out/rpm	\
 		$(BCOND-$(notdir $@)) $(BCOND)
-	touch $@
+	sleep 1 && touch $@
 
 out/rpm/SPECS/%.spec: out/touch/builder_prepared
 	cd $(dir $@) && cvs up $(if $(REV-$(@:out/rpm/SPECS/%.spec=%)),-r \
 		$(REV-$(@:out/rpm/SPECS/%.spec=%)),-A) $(notdir $@)
-	touch $@
+	sleep 1 && touch $@
 
 out/touch/builder_prepared:
 	rm -rf out/rpm/SPECS
@@ -222,7 +225,7 @@
 		-e '/SPECS_DIR=/s@=.*$$@="$(PWD)/out/rpm/SPECS"@'	\
 		-e '/rpmbuild --nodig/s at rpmbuild@rpmbuild --define="_topdir $(PWD)/out/rpm"@' \
 		-i out/rpm/SPECS/builder
-	touch $@
+	sleep 1 && touch $@
 
 info:
 	LANGUAGE= LANG= LC_ALL=C rpm --root=$(PWD)/$(root_inst) -qa \
@@ -239,7 +242,8 @@
 	rm -rf out/rpm/prep/* out/rpm/rpms/*
 
 clean-inst:	clean-root
-	rm -rf out/rpm/installed/* $(root_installed) $(touch)/root-ok-deps
+	rm -rf out/rpm/installed/* $(root_installed) $(touch)/root-ok-deps \
+		out/touch/stop/*
 	$(SU) rm -rf $(root_inst)
 
 clean-root:	clean-img

Modified: ppcrcd/trunk/base.pkgs
==============================================================================
--- ppcrcd/trunk/base.pkgs	(original)
+++ ppcrcd/trunk/base.pkgs	Sat Jan  7 15:04:16 2006
@@ -304,7 +304,7 @@
 		-i out/rpm/SPECS/module-init-tools.spec
 	sed -e "/^%patch2/ased -n -e '/insmod_static/!p' -i Makefile.am" \
 		-i out/rpm/SPECS/module-init-tools.spec
-	touch $@
+	sleep 1 && touch $@
 
 $(P)/kernel: out/rpm/sources/kernel
 	rm -f $(touch)/kerneleq
@@ -312,12 +312,12 @@
 	cp linux-squashfs2.2_lzma.patch out/rpm/SOURCES
 	cp kernel.config out/rpm/SOURCES/kernel-ppc.config
 	cp kernel.config out/rpm/SOURCES/kernel-ppc-smp.config
-	touch $@
+	sleep 1 && touch $@
 
 $(P)/busybox: out/rpm/sources/busybox
 	sed -e '/ifnarch/s/$$/ ppc/' \
 		-i out/rpm/SPECS/busybox.spec
-	touch $@
+	sleep 1 && touch $@
 
 out/touch/kerneleq:
 	-$(SU) rpm --erase kernel-grsecurity-source
@@ -328,10 +328,10 @@
 	-$(SU) rpm --erase kernel-headers
 	$(SU) rpm -Uhv \
 		`cat $(R)/kernel-grsecurity-{source,module-build,headers}`
-	touch $@
+	sleep 1 && touch $@
 
 out/rpm/installed/virtual-mount-proc:
 	$(SU) mount -t proc none out/root/inst/proc
-	touch $@
+	sleep 1 && touch $@
 
 # vim: syntax=make


More information about the pld-cvs-commit mailing list