FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 03-17-2009, 12:13 AM
David Cantrell
 
Default Create a Makefile target to generate updates.img automatically.

Based on what's changed in the repo since the last release tag.
Copy everything necessary for the updates.img in './updates' and
pack it up. Got tired of having my own local scripts to do this.

LIMITATIONS: Will not copy in dependent libraries or figure out
if a new _isys.so needs to be built. Pass KEEP=y if you want the
updates staging directory kept so you can dump other things in to
it. Run 'make updates KEEP=y' over and over to supplement your
updates image.
---
Makefile | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index dd45b29..4dbaa01 100644
--- a/Makefile
+++ b/Makefile
@@ -169,3 +169,40 @@ bumpver:

install-buildrequires:
yum install $$(grep BuildRequires: anaconda.spec | cut -d ' ' -f 2)
+
+# Generate an updates.img based on the changed files since the release
+# was tagged. Updates are copied to ./updates and then the image is
+# created. By default, the updates subdirectory is removed after the
+# image is made, but if you want to keep it around, run:
+# make updates.img KEEP=y
+# And since shell is both stupid and amusing, I only match the first
+# character to be a 'y' or 'Y', so you can do:
+# make updates.img KEEP=yosemite
+# Ahh, shell.
+updates:
+ @if [ ! -d updates ]; then
+ mkdir updates ;
+ fi ;
+ git diff --stat $(ARCHIVE_TAG) | grep " | " |
+ grep -v "^ loader/" | grep -v ".spec" | grep -v "Makefile" |
+ grep -v "^ po/" | grep -v "^ scripts/" |
+ while read sourcefile stuff ; do
+ dn="$$(dirname $$sourcefile)" ;
+ case $$dn in
+ installclasses|storage|booty)
+ if [ ! -d updates/$$dn ]; then
+ cp -a $$dn updates ;
+ find updates/$$dn -type f | grep Makefile | xargs rm -f ;
+ fi ;;
+ *)
+ cp -a $$sourcefile updates ;;
+ esac ;
+ done ;
+ cd updates ;
+ echo -n "Creating updates.img..." ;
+ ( find . | cpio -c -o | gzip -9c ) > ../updates.img ;
+ cd .. ;
+ keep="$$(echo $(KEEP) | cut -c1 | tr [a-z] [A-Z])" ;
+ if [ ! "$$keep" = "Y" ]; then
+ rm -rf updates ;
+ fi
--
1.6.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-17-2009, 12:17 AM
David Cantrell
 
Default Create a Makefile target to generate updates.img automatically.

Based on what's changed in the repo since the last release tag.
Copy everything necessary for the updates.img in './updates-img'
and pack it up. Got tired of having my own local scripts to do
this.

LIMITATIONS: Will not copy in dependent libraries or figure out
if a new _isys.so needs to be built. Pass KEEP=y if you want the
updates staging directory kept so you can dump other things in to
it. Run 'make updates KEEP=y' over and over to supplement your
updates image.
---
Makefile | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index dd45b29..b2a75c7 100644
--- a/Makefile
+++ b/Makefile
@@ -169,3 +169,38 @@ bumpver:

install-buildrequires:
yum install $$(grep BuildRequires: anaconda.spec | cut -d ' ' -f 2)
+
+# Generate an updates.img based on the changed files since the release
+# was tagged. Updates are copied to ./updates-img and then the image is
+# created. By default, the updates subdirectory is removed after the
+# image is made, but if you want to keep it around, run:
+# make updates.img KEEP=y
+# And since shell is both stupid and amusing, I only match the first
+# character to be a 'y' or 'Y', so you can do:
+# make updates.img KEEP=yosemite
+# Ahh, shell.
+updates:
+ @if [ ! -d updates-img ]; then
+ mkdir updates-img ;
+ fi ;
+ git diff --stat $(ARCHIVE_TAG) | grep " | " |
+ grep -v "^ loader/" | grep -v ".spec" | grep -v "Makefile" |
+ grep -v "^ po/" | grep -v "^ scripts/" |
+ while read sourcefile stuff ; do
+ dn="$$(dirname $$sourcefile)" ;
+ case $$dn in
+ installclasses|storage|booty)
+ cp -a $$dn updates-img ;
+ find updates-img/$$dn -type f | grep Makefile | xargs rm -f ;;
+ *)
+ cp -a $$sourcefile updates-img ;;
+ esac ;
+ done ;
+ cd updates-img ;
+ echo -n "Creating updates.img..." ;
+ ( find . | cpio -c -o | gzip -9c ) > ../updates.img ;
+ cd .. ;
+ keep="$$(echo $(KEEP) | cut -c1 | tr [a-z] [A-Z])" ;
+ if [ ! "$$keep" = "Y" ]; then
+ rm -rf updates-imgs ;
+ fi
--
1.6.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-17-2009, 12:18 AM
David Cantrell
 
Default Create a Makefile target to generate updates.img automatically.

Ignore this patch, newer one coming.

On 03/16/2009 03:13 PM, David Cantrell wrote:

Based on what's changed in the repo since the last release tag.
Copy everything necessary for the updates.img in './updates' and
pack it up. Got tired of having my own local scripts to do this.

LIMITATIONS: Will not copy in dependent libraries or figure out
if a new _isys.so needs to be built. Pass KEEP=y if you want the
updates staging directory kept so you can dump other things in to
it. Run 'make updates KEEP=y' over and over to supplement your
updates image.
---
Makefile | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index dd45b29..4dbaa01 100644
--- a/Makefile
+++ b/Makefile
@@ -169,3 +169,40 @@ bumpver:

install-buildrequires:
yum install $$(grep BuildRequires: anaconda.spec | cut -d ' ' -f 2)
+
+# Generate an updates.img based on the changed files since the release
+# was tagged. Updates are copied to ./updates and then the image is
+# created. By default, the updates subdirectory is removed after the
+# image is made, but if you want to keep it around, run:
+# make updates.img KEEP=y
+# And since shell is both stupid and amusing, I only match the first
+# character to be a 'y' or 'Y', so you can do:
+# make updates.img KEEP=yosemite
+# Ahh, shell.
+updates:
+ @if [ ! -d updates ]; then
+ mkdir updates ;
+ fi ;
+ git diff --stat $(ARCHIVE_TAG) | grep " | " |
+ grep -v "^ loader/" | grep -v ".spec" | grep -v "Makefile" |
+ grep -v "^ po/" | grep -v "^ scripts/" |
+ while read sourcefile stuff ; do
+ dn="$$(dirname $$sourcefile)" ;
+ case $$dn in
+ installclasses|storage|booty)
+ if [ ! -d updates/$$dn ]; then
+ cp -a $$dn updates ;
+ find updates/$$dn -type f | grep Makefile | xargs rm -f ;
+ fi ;;
+ *)
+ cp -a $$sourcefile updates ;;
+ esac ;
+ done ;
+ cd updates ;
+ echo -n "Creating updates.img..." ;
+ ( find . | cpio -c -o | gzip -9c )> ../updates.img ;
+ cd .. ;
+ keep="$$(echo $(KEEP) | cut -c1 | tr [a-z] [A-Z])" ;
+ if [ ! "$$keep" = "Y" ]; then
+ rm -rf updates ;
+ fi



--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:55 PM.

VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org