]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/updater
vdradmin part II
[ipfire-2.x.git] / lfs / updater
CommitLineData
ff753a4c
AF
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
27VER = ipfire
28
29THISAPP = updater
30TARGET = $(DIR_INFO)/$(THISAPP)
31
32###############################################################################
33# Top-level Rules
34###############################################################################
35
36install : $(TARGET)
37
38check :
39
40download :
41
42md5 :
43
44###############################################################################
45# Installation Details
46###############################################################################
47
48$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
49 rm -rf /install/updater /tmp/*
4378d325 50 eval $$(cat /usr/src/config/rootfiles/updater/meta)
ff753a4c
AF
51
52 # Compress files of filelists
53 # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES
54 mkdir -p /install/updater
4378d325
AF
55 mkdir -p /install/packages
56
afce0e7e 57 find $(DIR_SRC)/config/rootfiles/updater/filelists/* -maxdepth 1 | xargs cat >> /tmp/ROOTFILES
261c412b
CS
58 cat /tmp/ROOTFILES \
59 | grep -v "etc/httpd/conf" \
60 | grep -v "etc/ssl/openssl.cnf" \
61 | grep -v "etc/ssh/sshd_config" \
62 | grep -v "etc/ipsec.conf" \
63 | grep -v "etc/ipsec.secrets" \
64 | grep -v "etc/snort/snort.conf" \
65 | grep -v "etc/squid/squid.conf" \
66 | grep -v "srv/web/ipfire/html/proxy.pac" \
67 | grep -v "srv/web/ipfire/html/wpad.dat" \
68 > /tmp/ROOTFILESNEW
69 mv -f /tmp/ROOTFILESNEW /tmp/ROOTFILES
ff753a4c
AF
70 sed -e "s/KVER/$(KVER)/g" -i /tmp/ROOTFILES
71 tar -c -C / --files-from=/tmp/ROOTFILES \
72 -f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \
73 --exclude='proc/*' --exclude='tmp/ROOTFILES'
823d4d91 74 mv -f /tmp/ROOTFILES /install/updater/ROOTFILES
458f04f2 75 tar --preserve --numeric-owner -x -C /tmp -f /$(SNAME).tar
ff753a4c 76 rm -f /$(SNAME).tar
4378d325
AF
77 cd /tmp && tar cf /install/updater/files * && rm -rf *
78 cat /install/updater/ROOTFILES | grep -v "#" > /install/updater/ROOTFILES.tmp
79 rm /install/updater/ROOTFILES
80 mv /install/updater/ROOTFILES.tmp /install/updater/ROOTFILES
f0fc8807 81
ff753a4c
AF
82 # Other files
83 cp $(DIR_SRC)/config/rootfiles/updater/update.sh /install/updater/
84 chmod 755 /install/updater/update.sh
3ec2aa13 85 cd /install/updater && tar cf /install/packages/core-upgrade-2.1-23.ipfire \
4378d325 86 update.sh files ROOTFILES
ff753a4c 87 rm -rf /install/updater
4378d325
AF
88
89 sed -e "s/NAME/core-upgrade/g" \
90 -e "s/VER/2.1/g" \
3ec2aa13 91 -e "s/RELEASE/23/g" \
4378d325 92 -e "s/DEPS/$(DEPS)/g" \
3ec2aa13
AF
93 -e "s/SIZE/`ls -l \/install\/packages\/core-upgrade-2.1-23.ipfire | awk '{ print $$5 }'`/g" \
94 < /usr/src/src/pakfire/meta > /install/packages/meta-core-upgrade-23