Add filelists folder and exclude to core-updates
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 15 Mar 2009 06:44:06 +0000 (07:44 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 15 Mar 2009 06:44:06 +0000 (07:44 +0100)
Add kernel and openswan to core28 (no installer yet)

13 files changed:
config/rootfiles/core/24/exclude [new file with mode: 0644]
config/rootfiles/core/24/filelists/files [moved from config/rootfiles/core/24/files with 100% similarity]
config/rootfiles/core/25/exclude [new file with mode: 0644]
config/rootfiles/core/25/filelists/files [moved from config/rootfiles/core/25/files with 100% similarity]
config/rootfiles/core/26/exclude [new file with mode: 0644]
config/rootfiles/core/26/filelists/files [moved from config/rootfiles/core/26/files with 100% similarity]
config/rootfiles/core/27/exclude [new file with mode: 0644]
config/rootfiles/core/27/filelists/files [moved from config/rootfiles/core/27/files with 100% similarity]
config/rootfiles/core/28/exclude [new file with mode: 0644]
config/rootfiles/core/28/filelists/files [moved from config/rootfiles/core/28/files with 100% similarity]
config/rootfiles/core/28/filelists/linux [new symlink]
config/rootfiles/core/28/filelists/openswan [new symlink]
lfs/core-updates

diff --git a/config/rootfiles/core/24/exclude b/config/rootfiles/core/24/exclude
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/config/rootfiles/core/25/exclude b/config/rootfiles/core/25/exclude
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/config/rootfiles/core/26/exclude b/config/rootfiles/core/26/exclude
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/config/rootfiles/core/27/exclude b/config/rootfiles/core/27/exclude
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/config/rootfiles/core/28/exclude b/config/rootfiles/core/28/exclude
new file mode 100644 (file)
index 0000000..c58d738
--- /dev/null
@@ -0,0 +1,2 @@
+etc/ipsec.conf
+etc/ipsec.secrets
diff --git a/config/rootfiles/core/28/filelists/linux b/config/rootfiles/core/28/filelists/linux
new file mode 120000 (symlink)
index 0000000..c469fe1
--- /dev/null
@@ -0,0 +1 @@
+../../../common/linux
\ No newline at end of file
diff --git a/config/rootfiles/core/28/filelists/openswan b/config/rootfiles/core/28/filelists/openswan
new file mode 120000 (symlink)
index 0000000..2b72682
--- /dev/null
@@ -0,0 +1 @@
+../../../common/openswan
\ No newline at end of file
index 9d242eea398f549a8e9ac7cb59458b4442b46e49..e0962bd079c2f9b563a21a35b83343a9b7eb11e7 100644 (file)
@@ -53,12 +53,33 @@ core/%:
        rm -rf /install/packages/package
        mkdir -p /install/packages/package
        eval $$(cat /usr/src/config/rootfiles/$@/meta)
-       cp -f /usr/src/config/rootfiles/$@/update.sh /install/packages/package
-       cp -f /usr/src/config/rootfiles/$@/files /install/packages/package/ROOTFILES
-       sed -e 's/KVER/$(KVER)/g' -i /install/packages/package/ROOTFILES
+
+       #Generate ROOTFILES from filelists      
+       find $(DIR_SRC)/config/rootfiles/$@/filelists/* -maxdepth 1 | xargs cat >> /tmp/ROOTFILES.tmp
+
+       #remove excluded files from ROOTFILES
+       grep -f $(DIR_SRC)/config/rootfiles/$@/exclude -v /tmp/ROOTFILES.tmp > /tmp/ROOTFILES
+       rm -rf /tmp/ROOTFILES.tmp
+       
+       #Change KVER to Kernelversion
+       sed -e "s/KVER/$(KVER)/g" -i /tmp/ROOTFILES
+       
+       #Remove doubled files with tar/untar/tar to save space
+       tar -c -C / --files-from=/tmp/ROOTFILES \
+               -f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \
+               --exclude='proc/*' --exclude='tmp/ROOTFILES' \
+               --exclude-from=$(DIR_SRC)/config/rootfiles/$@/exclude
+       mv -f /tmp/ROOTFILES /install/packages/package/ROOTFILES
+       tar --preserve --numeric-owner -x  -C /tmp -f /$(SNAME).tar
+       rm -f /$(SNAME).tar
+       cd /tmp && tar cf /install/packages/package/files * && rm -rf *
+       cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES.tmp
+       rm /install/packages/package/ROOTFILES
+       mv /install/packages/package/ROOTFILES.tmp /install/packages/package/ROOTFILES
+
+       #build package
+       cp -f $(DIR_SRC)/config/rootfiles/$@/update.sh /install/packages/package
        chmod 755 /install/packages/package/update.sh
-       cd / && tar cf /install/packages/package/files --files-from=/install/packages/package/ROOTFILES --exclude='#*'
-       -cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES
        cd /install/packages/package && tar cf ../core-upgrade-$(VERSION)-$$(basename $@).ipfire \
                update.sh files ROOTFILES
        rm -rf /install/packages/package