From 9e6810e8c663f02c68ebbc2f572e8eca5871f71a Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 18 Sep 2011 13:32:30 +0200 Subject: [PATCH 1/6] libevent2: New package. Needs to be added to core update 54. --- config/rootfiles/common/libevent2 | 45 ++++++++++++++++++ lfs/libevent2 | 77 +++++++++++++++++++++++++++++++ make.sh | 1 + 3 files changed, 123 insertions(+) create mode 100644 config/rootfiles/common/libevent2 create mode 100644 lfs/libevent2 diff --git a/config/rootfiles/common/libevent2 b/config/rootfiles/common/libevent2 new file mode 100644 index 000000000..fb3d8bd82 --- /dev/null +++ b/config/rootfiles/common/libevent2 @@ -0,0 +1,45 @@ +#usr/include/event2 +#usr/include/event2/buffer.h +#usr/include/event2/buffer_compat.h +#usr/include/event2/bufferevent.h +#usr/include/event2/bufferevent_compat.h +#usr/include/event2/bufferevent_ssl.h +#usr/include/event2/bufferevent_struct.h +#usr/include/event2/dns.h +#usr/include/event2/dns_compat.h +#usr/include/event2/dns_struct.h +#usr/include/event2/event-config.h +#usr/include/event2/event.h +#usr/include/event2/event_compat.h +#usr/include/event2/event_struct.h +#usr/include/event2/http.h +#usr/include/event2/http_compat.h +#usr/include/event2/http_struct.h +#usr/include/event2/keyvalq_struct.h +#usr/include/event2/listener.h +#usr/include/event2/rpc.h +#usr/include/event2/rpc_compat.h +#usr/include/event2/rpc_struct.h +#usr/include/event2/tag.h +#usr/include/event2/tag_compat.h +#usr/include/event2/thread.h +#usr/include/event2/util.h +usr/lib/libevent-2.0.so.5 +usr/lib/libevent-2.0.so.5.1.2 +usr/lib/libevent_core-2.0.so.5 +usr/lib/libevent_core-2.0.so.5.1.2 +usr/lib/libevent_extra-2.0.so.5 +usr/lib/libevent_extra-2.0.so.5.1.2 +usr/lib/libevent_openssl-2.0.so.5 +usr/lib/libevent_openssl-2.0.so.5.1.2 +#usr/lib/libevent_openssl.a +#usr/lib/libevent_openssl.la +#usr/lib/libevent_openssl.so +usr/lib/libevent_pthreads-2.0.so.5 +usr/lib/libevent_pthreads-2.0.so.5.1.2 +#usr/lib/libevent_pthreads.a +#usr/lib/libevent_pthreads.la +#usr/lib/libevent_pthreads.so +#usr/lib/pkgconfig/libevent.pc +#usr/lib/pkgconfig/libevent_openssl.pc +#usr/lib/pkgconfig/libevent_pthreads.pc diff --git a/lfs/libevent2 b/lfs/libevent2 new file mode 100644 index 000000000..1fbc7db09 --- /dev/null +++ b/lfs/libevent2 @@ -0,0 +1,77 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 2.0.13-stable + +THISAPP = libevent-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = af786b4b3f790c9d3279792edf7867fc + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./configure --prefix=/usr + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index 99fc86f49..b566b0190 100755 --- a/make.sh +++ b/make.sh @@ -585,6 +585,7 @@ buildipfire() { ipfiremake rsync ipfiremake tcpwrapper ipfiremake libevent + ipfiremake libevent2 ipfiremake portmap ipfiremake nfs ipfiremake nmap From 25fadf991c85ced2b12b5b7a7dea83915d0436ca Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 18 Sep 2011 13:34:47 +0200 Subject: [PATCH 2/6] transmission: New package. --- config/rootfiles/common/initscripts | 1 + config/rootfiles/packages/transmission | 66 +++++++++++++++++++ config/transmission/settings.json | 62 ++++++++++++++++++ lfs/transmission | 89 ++++++++++++++++++++++++++ make.sh | 1 + src/initscripts/init.d/transmission | 45 +++++++++++++ src/paks/transmission/install.sh | 41 ++++++++++++ src/paks/transmission/uninstall.sh | 30 +++++++++ src/paks/transmission/update.sh | 27 ++++++++ 9 files changed, 362 insertions(+) create mode 100644 config/rootfiles/packages/transmission create mode 100644 config/transmission/settings.json create mode 100644 lfs/transmission create mode 100644 src/initscripts/init.d/transmission create mode 100644 src/paks/transmission/install.sh create mode 100644 src/paks/transmission/uninstall.sh create mode 100644 src/paks/transmission/update.sh diff --git a/config/rootfiles/common/initscripts b/config/rootfiles/common/initscripts index 9393aec50..fe9cc319b 100644 --- a/config/rootfiles/common/initscripts +++ b/config/rootfiles/common/initscripts @@ -118,6 +118,7 @@ etc/rc.d/init.d/teamspeak etc/rc.d/init.d/template #etc/rc.d/init.d/tftpd etc/rc.d/init.d/tmpfs +#etc/rc.d/init.d/transmission etc/rc.d/init.d/udev etc/rc.d/init.d/udev_retry etc/rc.d/init.d/upnpd diff --git a/config/rootfiles/packages/transmission b/config/rootfiles/packages/transmission new file mode 100644 index 000000000..a7843418e --- /dev/null +++ b/config/rootfiles/packages/transmission @@ -0,0 +1,66 @@ +#etc/transmission +etc/transmission/settings.json +usr/bin/transmission-cli +usr/bin/transmission-create +usr/bin/transmission-daemon +usr/bin/transmission-edit +usr/bin/transmission-remote +usr/bin/transmission-show +#usr/share/man/man1/transmission-cli.1 +#usr/share/man/man1/transmission-create.1 +#usr/share/man/man1/transmission-daemon.1 +#usr/share/man/man1/transmission-edit.1 +#usr/share/man/man1/transmission-remote.1 +#usr/share/man/man1/transmission-show.1 +usr/share/transmission +#usr/share/transmission/web +#usr/share/transmission/web/LICENSE +#usr/share/transmission/web/images +#usr/share/transmission/web/images/buttons +#usr/share/transmission/web/images/buttons/cancel.png +#usr/share/transmission/web/images/buttons/file_priority_buttons.png +#usr/share/transmission/web/images/buttons/file_wanted_buttons.png +#usr/share/transmission/web/images/buttons/info_activity.png +#usr/share/transmission/web/images/buttons/info_files.png +#usr/share/transmission/web/images/buttons/info_general.png +#usr/share/transmission/web/images/buttons/info_peers.png +#usr/share/transmission/web/images/buttons/info_trackers.png +#usr/share/transmission/web/images/buttons/tab_backgrounds.png +#usr/share/transmission/web/images/buttons/tab_backgrounds_highlight.png +#usr/share/transmission/web/images/buttons/toolbar_buttons.png +#usr/share/transmission/web/images/buttons/torrent_buttons.png +#usr/share/transmission/web/images/favicon.ico +#usr/share/transmission/web/images/favicon.png +#usr/share/transmission/web/images/graphics +#usr/share/transmission/web/images/graphics/chrome.png +#usr/share/transmission/web/images/graphics/filter_bar.png +#usr/share/transmission/web/images/graphics/filter_icon.png +#usr/share/transmission/web/images/graphics/iphone_chrome.png +#usr/share/transmission/web/images/graphics/lock_icon.png +#usr/share/transmission/web/images/graphics/logo.png +#usr/share/transmission/web/images/graphics/transfer_arrows.png +#usr/share/transmission/web/images/graphics/wait20.gif +#usr/share/transmission/web/images/progress +#usr/share/transmission/web/images/progress/progress.png +#usr/share/transmission/web/images/webclip-icon.png +#usr/share/transmission/web/index.html +#usr/share/transmission/web/javascript +#usr/share/transmission/web/javascript/common.js +#usr/share/transmission/web/javascript/dialog.js +#usr/share/transmission/web/javascript/formatter.js +#usr/share/transmission/web/javascript/jquery +#usr/share/transmission/web/javascript/jquery/jquery.contextmenu.min.js +#usr/share/transmission/web/javascript/jquery/jquery.form.js +#usr/share/transmission/web/javascript/jquery/jquery.form.min.js +#usr/share/transmission/web/javascript/jquery/jquery.min.js +#usr/share/transmission/web/javascript/jquery/jquery.transmenu.min.js +#usr/share/transmission/web/javascript/jquery/json.min.js +#usr/share/transmission/web/javascript/menu.js +#usr/share/transmission/web/javascript/torrent.js +#usr/share/transmission/web/javascript/transmission.js +#usr/share/transmission/web/javascript/transmission.remote.js +#usr/share/transmission/web/stylesheets +#usr/share/transmission/web/stylesheets/common.css +#usr/share/transmission/web/stylesheets/ie6.css +#usr/share/transmission/web/stylesheets/ie7.css +#usr/share/transmission/web/stylesheets/iphone.css diff --git a/config/transmission/settings.json b/config/transmission/settings.json new file mode 100644 index 000000000..a5dbdaf51 --- /dev/null +++ b/config/transmission/settings.json @@ -0,0 +1,62 @@ +{ + "alt-speed-down": 512, + "alt-speed-enabled": true, + "alt-speed-time-begin": 540, + "alt-speed-time-day": 127, + "alt-speed-time-enabled": false, + "alt-speed-time-end": 1020, + "alt-speed-up": 10, + "bind-address-ipv4": "0.0.0.0", + "bind-address-ipv6": "::", + "blocklist-enabled": false, + "cache-size-mb": 2, + "dht-enabled": true, + "download-dir": "/var/transmission/downloads", + "encryption": 1, + "idle-seeding-limit": 30, + "idle-seeding-limit-enabled": false, + "incomplete-dir": "/var/transmission/incomplete", + "incomplete-dir-enabled": true, + "lazy-bitfield-enabled": true, + "lpd-enabled": false, + "message-level": 2, + "open-file-limit": 32, + "peer-limit-global": 240, + "peer-limit-per-torrent": 60, + "peer-port": 6969, + "peer-port-random-high": 65535, + "peer-port-random-low": 49152, + "peer-port-random-on-start": false, + "peer-socket-tos": 0, + "pex-enabled": true, + "port-forwarding-enabled": true, + "preallocation": 1, + "proxy": "", + "proxy-auth-enabled": false, + "proxy-auth-password": "", + "proxy-auth-username": "", + "proxy-enabled": false, + "proxy-port": 80, + "proxy-type": 0, + "ratio-limit": 2, + "ratio-limit-enabled": false, + "rename-partial-files": true, + "rpc-authentication-required": false, + "rpc-bind-address": "0.0.0.0", + "rpc-enabled": true, + "rpc-password": "{b518093d8e833b34c139cea744e335ab70d827dcQSnFbsNU", + "rpc-port": 9091, + "rpc-username": "", + "rpc-whitelist": "127.0.0.1", + "rpc-whitelist-enabled": false, + "script-torrent-done-enabled": false, + "script-torrent-done-filename": "", + "speed-limit-down": 768, + "speed-limit-down-enabled": true, + "speed-limit-up": 20, + "speed-limit-up-enabled": true, + "start-added-torrents": true, + "trash-original-torrent-files": false, + "umask": 18, + "upload-slots-per-torrent": 14 +} diff --git a/lfs/transmission b/lfs/transmission new file mode 100644 index 000000000..7ce4b8392 --- /dev/null +++ b/lfs/transmission @@ -0,0 +1,89 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2009 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 2.33 + +THISAPP = transmission-$(VER) +DL_FILE = $(THISAPP).tar.xz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = transmission +PAK_VER = 1 + +DEPS = "" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 76df2b002e9e243f2e4607b40c019974 + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist: + @$(PAK) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./configure --prefix=/usr --disable-static + cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) + cd $(DIR_APP) && make install + + # Install configuration files. + -mkdir -pv /etc/transmission + cp -vf $(DIR_SRC)/config/transmission/* /etc/transmission/ + chown -Rv nobody.nobody /etc/transmission + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index b566b0190..4fbbf0cba 100755 --- a/make.sh +++ b/make.sh @@ -701,6 +701,7 @@ buildipfire() { ipfiremake python-xattr ipfiremake intltool ipfiremake pakfire3-deps + ipfiremake transmission echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild echo >> $BASEDIR/build/var/ipfire/firebuild diff --git a/src/initscripts/init.d/transmission b/src/initscripts/init.d/transmission new file mode 100644 index 000000000..2ad7d48bb --- /dev/null +++ b/src/initscripts/init.d/transmission @@ -0,0 +1,45 @@ +#!/bin/sh +######################################################################## +# Begin $rc_base/init.d/ +# +# Description : +# +# Authors : +# +# Version : 00.00 +# +# Notes : +# +######################################################################## + +. /etc/sysconfig/rc +. ${rc_functions} + +case "${1}" in + start) + boot_mesg "Starting transmission daemon..." + transmission-daemon -g /etc/transmission + ;; + + stop) + boot_mesg "Stopping transmission daemon..." + killall transmission-daemon + ;; + + restart) + ${0} stop + sleep 1 + ${0} start + ;; + + status) + statusproc transmission-daemon + ;; + + *) + echo "Usage: ${0} {start|stop|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/ diff --git a/src/paks/transmission/install.sh b/src/paks/transmission/install.sh new file mode 100644 index 000000000..c5907d453 --- /dev/null +++ b/src/paks/transmission/install.sh @@ -0,0 +1,41 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh + +extract_files + +# Create download directories if they do not yet exist. +mkdir -p /var/transmission/{downloads,incomplete} 2>/dev/null + +# Adjust permissions. +chown nobody.nobody /etc/transmission /var/transmission + +# Start the service. +/etc/init.d/transmission start + +ln -sf ../init.d/transmission /etc/rc.d/rc0.d/K20transmission +ln -sf ../init.d/transmission /etc/rc.d/rc3.d/S99transmission +ln -sf ../init.d/transmission /etc/rc.d/rc6.d/K20transmission + +exit 0 diff --git a/src/paks/transmission/uninstall.sh b/src/paks/transmission/uninstall.sh new file mode 100644 index 000000000..5a2e7087e --- /dev/null +++ b/src/paks/transmission/uninstall.sh @@ -0,0 +1,30 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +remove_files + +# Remove all start links. +rm -rf /etc/rc.d/rc*.d/*transmission + +exit 0 diff --git a/src/paks/transmission/update.sh b/src/paks/transmission/update.sh new file mode 100644 index 000000000..c6485bf0a --- /dev/null +++ b/src/paks/transmission/update.sh @@ -0,0 +1,27 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh + +./uninstall.sh +./install.sh From a2b5b5736167b51b0319aa0fbd970757b33ecb9a Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 18 Sep 2011 14:38:25 +0200 Subject: [PATCH 3/6] v4l-dvb: Does not support parallel building. --- lfs/v4l-dvb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lfs/v4l-dvb b/lfs/v4l-dvb index 84a9f9e79..6c6a5fc5b 100644 --- a/lfs/v4l-dvb +++ b/lfs/v4l-dvb @@ -84,7 +84,7 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar Jxf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && make all KERNELRELEASE=$(KVER)-$(VERSUFIX) VER=2.6.32 $(MAKETUNING) + cd $(DIR_APP) && make all KERNELRELEASE=$(KVER)-$(VERSUFIX) VER=2.6.32 cd $(DIR_APP) && make install KERNELRELEASE=$(KVER)-$(VERSUFIX) VER=2.6.32 ln -sf $(DIR_APP)/ /usr/src/v4l-dvb # @rm -rf $(DIR_APP) From 9f86ef66a0fdd1a277eb6e3f74b0cc5eb9c4b94a Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 18 Sep 2011 14:38:48 +0200 Subject: [PATCH 4/6] Remove start and stop beep sounds. --- config/rootfiles/common/initscripts | 3 --- lfs/initscripts | 3 --- 2 files changed, 6 deletions(-) diff --git a/config/rootfiles/common/initscripts b/config/rootfiles/common/initscripts index fe9cc319b..65fa0cd51 100644 --- a/config/rootfiles/common/initscripts +++ b/config/rootfiles/common/initscripts @@ -147,7 +147,6 @@ etc/rc.d/rc0.d/K80network #etc/rc.d/rc0.d/K85messagebus etc/rc.d/rc0.d/K85tmpfs etc/rc.d/rc0.d/K90sysklogd -etc/rc.d/rc0.d/K99beep etc/rc.d/rc0.d/S60sendsignals etc/rc.d/rc0.d/S70localnet etc/rc.d/rc0.d/S80mountfs @@ -171,7 +170,6 @@ etc/rc.d/rc3.d/S40fcron #etc/rc.d/rc3.d/S98mediatomb etc/rc.d/rc3.d/S98rc.local #etc/rc.d/rc3.d/S98sslh -etc/rc.d/rc3.d/S99beep #etc/rc.d/rc3.d/S99imspetor #etc/rc.d/rc3.d/S99motion #etc/rc.d/rc3.d/S99vdradmin @@ -194,7 +192,6 @@ etc/rc.d/rc6.d/K80network #etc/rc.d/rc6.d/K85messagebus etc/rc.d/rc6.d/K85tmpfs etc/rc.d/rc6.d/K90sysklogd -etc/rc.d/rc6.d/K99beep etc/rc.d/rc6.d/S60sendsignals etc/rc.d/rc6.d/S70mountfs etc/rc.d/rc6.d/S80swap diff --git a/lfs/initscripts b/lfs/initscripts index b15ef3c4d..03cec8031 100644 --- a/lfs/initscripts +++ b/lfs/initscripts @@ -128,9 +128,6 @@ $(TARGET) : ln -sf ../init.d/random /etc/rc.d/rc3.d/S25random ln -sf ../init.d/random /etc/rc.d/rc6.d/K45random ln -sf ../../sysconfig/rc.local /etc/rc.d/rc3.d/S98rc.local - ln -sf ../init.d/beep /etc/rc.d/rc0.d/K99beep - ln -sf ../init.d/beep /etc/rc.d/rc3.d/S99beep - ln -sf ../init.d/beep /etc/rc.d/rc6.d/K99beep ln -sf ../init.d/tmpfs /etc/rc.d/rc0.d/K85tmpfs ln -sf ../init.d/tmpfs /etc/rc.d/rc3.d/S01tmpfs ln -sf ../init.d/tmpfs /etc/rc.d/rc6.d/K85tmpfs From 3c9374292ae23848f38ce3530eba2cc367330dad Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 18 Sep 2011 14:43:49 +0200 Subject: [PATCH 5/6] Remove ED=full. This was needed to distinct between a full version of IPFire, a light one without a package manager and a development version containing a C compiler and stuff. None of that except the full version were ever realized and so we can drop the code. --- lfs/cdrom | 4 ++-- lfs/flash-images | 4 ++-- lfs/usb-stick | 10 +++------- lfs/xen-image | 2 +- make.sh | 9 ++++----- tools/make-functions | 6 ++---- 6 files changed, 14 insertions(+), 21 deletions(-) diff --git a/lfs/cdrom b/lfs/cdrom index 3c7a20ed6..c61cd91bd 100644 --- a/lfs/cdrom +++ b/lfs/cdrom @@ -102,9 +102,9 @@ endif ifeq "$(MACHINE_TYPE)" "arm" cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \ - . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-$(ED)-core$(CORE).iso + . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-full-core$(CORE).iso else cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \ -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \ - -c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-$(ED)-core$(CORE).iso + -c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-full-core$(CORE).iso endif diff --git a/lfs/flash-images b/lfs/flash-images index b9618f9d3..fb1ca3da9 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -44,8 +44,8 @@ md5 : ############################################################################### # Installation Details ############################################################################### -IMGinst := /install/images/$(SNAME)-$(VERSION).1gb-ext2.$(MACHINE)-$(ED)-core$(CORE).img -IMGinsts := /install/images/$(SNAME)-$(VERSION).1gb-ext2-scon.$(MACHINE)-$(ED)-core$(CORE).img +IMGinst := /install/images/$(SNAME)-$(VERSION).1gb-ext2.$(MACHINE)-full-core$(CORE).img +IMGinsts := /install/images/$(SNAME)-$(VERSION).1gb-ext2-scon.$(MACHINE)-full-core$(CORE).img MNThdd := /install/harddisk IMGpart := /install/images/part_area IMGboot := /install/images/bootfs diff --git a/lfs/usb-stick b/lfs/usb-stick index acfa40939..4c5e716b0 100644 --- a/lfs/usb-stick +++ b/lfs/usb-stick @@ -44,15 +44,11 @@ md5 : ############################################################################### # Installation Details ############################################################################### -IMGfdd := /install/images/$(SNAME)-$(VERSION)-install-usb-fdd.$(MACHINE)-$(ED)-core$(CORE).img -IMGhdd := /install/images/$(SNAME)-$(VERSION)-install-usb-hdd.$(MACHINE)-$(ED)-core$(CORE).img +IMGfdd := /install/images/$(SNAME)-$(VERSION)-install-usb-fdd.$(MACHINE)-full-core$(CORE).img +IMGhdd := /install/images/$(SNAME)-$(VERSION)-install-usb-hdd.$(MACHINE)-full-core$(CORE).img IMGfs := /install/images/fs -ifeq "$(ED)" "devel" - DISKSIZE=480000 -else - DISKSIZE=120000 -endif +DISKSIZE=120000 define COPY_TO_IMG mkdosfs -n IPFIRE -F 16 -I $$IMAGE && \ diff --git a/lfs/xen-image b/lfs/xen-image index 1b123a72d..4ab32b492 100644 --- a/lfs/xen-image +++ b/lfs/xen-image @@ -44,7 +44,7 @@ md5 : ############################################################################### # Installation Details ############################################################################### -IMGinst := /install/images/$(SNAME)-$(VERSION).xen.$(MACHINE)-$(ED)-core$(CORE).tar.bz2 +IMGinst := /install/images/$(SNAME)-$(VERSION).xen.$(MACHINE)-full-core$(CORE).tar.bz2 MNThdd := /install/harddisk IMGboot := /install/images/$(SNAME)/$(SNAME)-boot.img diff --git a/make.sh b/make.sh index 1679d3293..797ba96de 100755 --- a/make.sh +++ b/make.sh @@ -38,7 +38,6 @@ MACHINE=`uname -m` GIT_TAG=$(git tag | tail -1) # Git Tag GIT_LASTCOMMIT=$(git log | head -n1 | cut -d" " -f2 |head -c8) # Last commit TOOLCHAINVER=1 -IPFVER="full" # Which versions should be compiled? (full|devel) BUILDMACHINE=$MACHINE if [ "$MACHINE" = "x86_64" ]; then @@ -777,14 +776,14 @@ buildpackages() { $0 git log # Create images for install - ipfiremake cdrom ED=$IPFVER + ipfiremake cdrom # Check if there is a loop device for building in virtual environments if [ $BUILD_IMAGES == 1 ] && ([ -e /dev/loop/0 ] || [ -e /dev/loop0 ]); then if [ "${MACHINE_TYPE}" != "arm" ]; then - ipfiremake usb-stick ED=$IPFVER + ipfiremake usb-stick fi - ipfiremake flash-images ED=$IPFVER + ipfiremake flash-images fi mv $LFS/install/images/{*.iso,*.tgz,*.img.gz,*.bz2} $BASEDIR >> $LOGFILE 2>&1 @@ -795,7 +794,7 @@ buildpackages() { if [ $BUILD_IMAGES == 1 ] && ([ -e /dev/loop/0 ] || [ -e /dev/loop0 ]); then cp -f $BASEDIR/packages/linux-xen-*.ipfire $LFS/install/packages/ cp -f $BASEDIR/packages/meta-linux-xen $LFS/install/packages/ - ipfiremake xen-image ED=$IPFVER + ipfiremake xen-image rm -rf $LFS/install/packages/linux-xen-*.ipfire rm -rf $LFS/install/packages/meta-linux-xen fi diff --git a/tools/make-functions b/tools/make-functions index e6333a383..8031bc836 100644 --- a/tools/make-functions +++ b/tools/make-functions @@ -399,7 +399,6 @@ lfsmake2() { KVER=$KVER MAKETUNING=$MAKETUNING \ BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \ MACHINE_TYPE="$MACHINE_TYPE" \ - IPFVER="$IPFVER" \ /tools/bin/bash -x -c "cd /usr/src/lfs && \ make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1 local COMPILE_SUCCESS=$? @@ -432,7 +431,6 @@ ipfiremake() { KVER=$KVER MAKETUNING=$MAKETUNING \ BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \ MACHINE_TYPE="$MACHINE_TYPE" \ - IPFVER="$IPFVER" \ /bin/bash -x -c "cd /usr/src/lfs && \ make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1 @@ -461,7 +459,7 @@ ipfiredist() { NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \ CFLAGS="$C2FLAGS" CXXFLAGS="$CXX2FLAGS" \ CCACHE_DIR=/usr/src/ccache CCACHE_COMPRESS=1 CCACHE_HASHDIR=1 \ - KVER=$KVER IPFVER="$IPFVER" \ + KVER=$KVER \ BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \ MACHINE_TYPE="$MACHINE_TYPE" \ /bin/bash -x -c "cd /usr/src/lfs && \ @@ -493,7 +491,7 @@ installmake() { NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \ CFLAGS="-Os" CXXFLAGS="-Os" \ CCACHE_DIR=/usr/src/ccache CCACHE_COMPRESS=1 CCACHE_HASHDIR=1 \ - KVER=$KVER IPFVER="$IPFVER" \ + KVER=$KVER \ BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \ MACHINE_TYPE="$MACHINE_TYPE" \ /bin/bash -x -c "cd /usr/src/lfs && \ From 32b6efe8da4afe7150183db2ce34578f98d3495c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 18 Sep 2011 14:51:23 +0200 Subject: [PATCH 6/6] Remove tons of code from the buildscripts that was not used anymore. --- doc/make.sh-usage | 18 ---- lfs/Config | 6 -- make.sh | 122 ---------------------- tools/make-functions | 241 ------------------------------------------- tools/sendEmail | 37 ------- 5 files changed, 424 deletions(-) delete mode 100755 tools/sendEmail diff --git a/doc/make.sh-usage b/doc/make.sh-usage index b4472f6c5..c025a5c32 100644 --- a/doc/make.sh-usage +++ b/doc/make.sh-usage @@ -10,24 +10,6 @@ Optional If you want to use it, do it before build step Maintainer / advanced commands - changelog : Loads the latest changelog from SVN. - check : Test if packages files are still available for download - This is faster on http URL with --spider, but still slow on ftp - because of real load. - checkclean : Erase all check mark on cache directory to be able to check - another time - dist : Mainly produce a diff from previous version to track wich - files have been changed - make : Does a complete compile with fetching source packages. - pxe : - Starts, stops or reloads a small tftp daemon for pxe boot. toolchain : Create our own toolchain package to save 20% of build time. shell : Enter a shell inside the chroot, used to tune lfs script and / or during kernel upgrade to rebuild a new .config - svn : - update : Loads the latest source files from svn or if is given - it loads this revision. - diff : Mainly produce a diff from previous version to track wich - files have been changed - commit : Applies your changes to the svn. - dist : Tar the source code from revision. diff --git a/lfs/Config b/lfs/Config index 82dbab8fb..db4891b21 100644 --- a/lfs/Config +++ b/lfs/Config @@ -37,12 +37,6 @@ URL_IPFIRE = http://source.ipfire.org/source-2.x URL_TOOLCHAIN = http://source.ipfire.org/toolchains URL_SOURCE = source.ipfire.org:/pub/source/source-2.x -# Default compiler optimizations. -# -FLAGS_OPT = -O2 -FLAGS_CPU = -mcpu=$(MACHINE) -FLAGS_ARCH = -march=$(MACHINE) - # Don't change this; it will be overridden by other makefiles where necessary. # ROOT = diff --git a/make.sh b/make.sh index 797ba96de..7ecc812e7 100755 --- a/make.sh +++ b/make.sh @@ -1026,54 +1026,6 @@ othersrc) fi stdumount ;; -git) - case "$2" in - update|up) - ## REMOVES ALL UNCOMMITTED CHANGES! - [ "$3" == "--force" ] && git checkout -f - git pull - ;; - commit|ci) - shift 2 - git commit $* - - [ "$?" -eq "0" ] || exiterror "git commit $* failed." - - echo -e "${BOLD}Do you want to push, too? [y/N]${NORMAL}" - read - [ -z $REPLY ] && exit 0 - for i in y Y j J; do - if [ "$i" == "$REPLY" ]; then - $0 git push - exit $? - fi - done - exiterror "\"$REPLY\" is not a valid answer." - ;; - dist) - git archive HEAD | gzip -9 > ${SNAME}-${VERSION}.tar.gz - ;; - diff|di) - echo -ne "Make a local diff to last revision" - git diff HEAD > ipfire-diff-$(date +'%Y-%m-%d-%H:%M').diff - evaluate 1 - echo "Diff was successfully saved to ipfire-diff-$(date +'%Y-%m-%d-%H:%M').diff" - git diff --stat - ;; - push) - [ -z $GIT_USER ] && exiterror "You have to setup GIT_USER first." - GIT_URL="ssh://${GIT_USER}@git.ipfire.org/pub/git/ipfire-2.x" - - git push ${GIT_URL} $3 - ;; - log) - [ -z $GIT_TAG ] || LAST_TAG=$GIT_TAG - [ -z $LAST_TAG ] || EXT="$LAST_TAG..HEAD" - - git log -n 500 --no-merges --pretty=medium --shortstat $EXT > $BASEDIR/doc/ChangeLog - ;; - esac - ;; uploadsrc) PWD=`pwd` if [ -z $IPFIRE_USER ]; then @@ -1095,83 +1047,9 @@ uploadsrc) cd $PWD exit 0 ;; -batch) - if [ "$2" = "--background" ]; then - batch_script - exit $? - fi - if [ `screen -ls | grep -q ipfire` ]; then - echo "Build is already running, sorry!" - exit 1 - else - if [ "$2" = "--rebuild" ]; then - export IPFIRE_REBUILD=1 - echo "REBUILD!" - else - export IPFIRE_REBUILD=0 - fi - echo -en "${BOLD}***IPFire-Batch-Build is starting...${NORMAL}" - screen -dmS ipfire $0 batch --background - evaluate 1 - exit 0 - fi - ;; -watch) - watch_screen - ;; -pxe) - case "$2" in - start) - start_tftpd - ;; - stop) - stop_tftpd - ;; - reload|restart) - reload_tftpd - ;; - esac - exit 0 - ;; lang) update_langs ;; -"") - clear - select name in "Exit" "IPFIRE: Downloadsrc" "IPFIRE: Build (silent)" "IPFIRE: Watch Build" "IPFIRE: Batch" "IPFIRE: Clean" "LOG: Tail" "Help" - do - case $name in - "IPFIRE: Downloadsrc") - $0 downloadsrc - ;; - "IPFIRE: Build (silent)") - $0 build-silent - ;; - "IPFIRE: Watch Build") - $0 watch - ;; - "IPFIRE: Batch") - $0 batch - ;; - "IPFIRE: Clean") - $0 clean - ;; - "Help") - echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain}" - cat doc/make.sh-usage - ;; - "LOG: Tail") - tail -f log/_* - ;; - "Exit") - break - ;; - esac - done - ;; -config) - make_config - ;; *) echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain}" cat doc/make.sh-usage diff --git a/tools/make-functions b/tools/make-functions index 8031bc836..b4de26a17 100644 --- a/tools/make-functions +++ b/tools/make-functions @@ -509,247 +509,6 @@ installmake() { return 0 } -update_logs() { - tar cfz log/ipfire-logs-`date +'%Y-%m-%d-%H:%M'`.tgz log/_build.* - rm -f log/_build.* -} - -batch_script() { - echo -ne "${BOLD}***This is our auto buildscript! Have fun...${NORMAL}\n" - update_logs - evaluate 1 - - if [ "$IPFIRE_REBUILD" -eq "0" ]; then - export IPFIRE_START_TIME=`date` - - $0 clean - evaluate 1 - - $0 git update --force - evaluate 1 mail_me UPDATE - - echo "### EXPORT SOURCES" - $0 git dist - evaluate 1 mail_me DIST - fi - - echo "### RUNNING BUILD" - $0 build - evaluate 1 mail_me ERROR - - echo "### UPLOADING ISO" - $0 upload iso - evaluate 1 mail_me ISO - - echo -ne "### UPLOADING PAKS" - $0 upload paks - evaluate 1 mail_me PAKS - - echo -ne "${BOLD}***SUCCESS!${NORMAL}" - mail_me success - exit 0 -} - -watch_screen() { - echo -e "${BOLD}Exit with Ctrl+A, Ctrl+D.${NORMAL}" - sleep 0.5 - screen -x ipfire -} - -mail_me() { - echo "From: $MAIL_FROM" > /tmp/ipfire_mail_body.$$ - echo "To: $MAIL_TO" >> /tmp/ipfire_mail_body.$$ - case "$1" in - success) - cat <> /tmp/ipfire_mail_body.$$ -Subject: SUCCESS: IPFIRE-BUILD on `hostname` -Building IPFire on `hostname` was successfull! -You can find the ISO on your ftp server if you told the script where it is. - -Statistics: ------------ -Started: $IPFIRE_START_TIME -Finished: `date` - -Best Regards -Your IPFire-Build-Script - -END - echo -ne "${BOLD}***Sending success message${NORMAL}" - ;; - *) - cat <> /tmp/ipfire_mail_body.$$ -Subject: ERROR $1: IPFIRE-BUILD on `hostname` -When I was building IPFire on `hostname`, I have found an ERROR with name $1! -Here you can see the logs and detect the reason for this error. - -Best Regards -Your IPFire-Build-Script - - -Here is a summary... The full logs are in the attachment. ---------------------------------------------------------- - -`tail log/_*` -END - echo -ne "${BOLD}***Sending error message${NORMAL}" - ;; - esac - -sleep 15 - python tools/sendEmail < /tmp/ipfire_mail_body.$$ - if [ "$?" -eq "0" ]; then - beautify message DONE - else - beautify message FAIL - fi - rm -f /tmp/ipfire_mail_body.$$ -} - -make_config() { - clear - echo -e "${BOLD}***This will create your configuration...${NORMAL}" - echo -ne "***If your are ready press !" - read - clear - echo -ne "***The buildscript will create a full iso image.\n" - echo -ne "***If you want to skip any package please enter its name here seperated with space.\n" - echo -ne "Actually in the list are: $SKIP_PACKAGE_LIST\n" - echo -ne "Do you want to change this? (y/N) " - read YESNO - if [ "$YESNO" == "y" ]; then - echo -ne "Please type: " - read SKIP_PACKAGE_LIST - echo -ne "You entered: $SKIP_PACKAGE_LIST\n" - fi - - clear - echo -ne "***When you have compiled successfully, there is the possibility\n" - echo -ne "***to upload the iso image to a ftp server.\n" - echo -ne "***If the url is empty there will be no upload.\n" - echo -ne "Actually there is: $FTP_ISO_URL\n" - echo -ne "Do you want to change this? (y/N) " - read YESNO - if [ "$YESNO" == "y" ]; then - echo -ne "Please type the url: " - read FTP_ISO_URL - echo -ne "Please type the path: " - read FTP_ISO_PATH - echo -ne "Please type the username: " - read FTP_ISO_USER - echo -ne "Please type the password (hidden): " - read -s FTP_ISO_PASS - - fi - - clear - echo -ne "***When you add some new software you can easyly\n" - echo -ne "***upload the source code to our repository server.\n" - echo -ne "***If the url is empty there will be no upload.\n" - echo -ne "Actually there is: $FTP_CACHE_URL\n" - echo -ne "Do you want to change this? (y/N) " - read YESNO - if [ "$YESNO" == "y" ]; then - echo -ne "Please type the url: " - read FTP_CACHE_URL - echo -ne "Please type the path: " - read FTP_CACHE_PATH - echo -ne "Please type the username: " - read FTP_CACHE_USER - echo -ne "Please type the password (hidden): " - read -s FTP_CACHE_PASS - - fi - - clear - echo -ne "***If there are some important messages you\n" - echo -ne "***can get a notification mail.\n" - echo -ne "***Please type one ore more email adresses (seperated by comma).\n" - echo -ne "Actually there is: $MAIL_TO\n" - echo -ne "Do you want to change this? (y/N) " - read YESNO - if [ "$YESNO" == "y" ]; then - echo -ne "Please type: " - read MAIL_TO - echo -ne "You should enter a mail server to login...\n" - echo -ne "Please type the url: " - read MAIL_SERVER - echo -ne "Please type where the email is from: " - read MAIL_FROM - echo -ne "Please type the username: " - read MAIL_USER - echo -ne "Please type the password (hidden): " - read -s MAIL_PASS - - fi - echo -ne "\n${BOLD}***Saving...${NORMAL}" - cat < $BASEDIR/.config -### iso server -FTP_ISO_URL=$FTP_ISO_URL -FTP_ISO_PATH=$FTP_ISO_PATH -FTP_ISO_USER=$FTP_ISO_USER -FTP_ISO_PASS=$FTP_ISO_PASS -### cache server -FTP_CACHE_URL=$FTP_CACHE_URL -FTP_CACHE_PATH=$FTP_CACHE_PATH -FTP_CACHE_USER=$FTP_CACHE_USER -FTP_CACHE_PASS=$FTP_CACHE_PASS -### mail reports -MAIL_TO="$MAIL_TO" -MAIL_FROM=$MAIL_FROM -MAIL_SERVER=$MAIL_SERVER -MAIL_USER=$MAIL_USER -MAIL_PASS=$MAIL_PASS -### misc -SKIP_PACKAGE_LIST="$SKIP_PACKAGE_LIST" -END - beautify message DONE -} - -compile_tftpd() { - mkdir $BASEDIR/tmp - tar xvfz $BASEDIR/cache/tftp-hpa-0.42.tar.gz -C $BASEDIR/tmp - cd $BASEDIR/tmp/tftp-hpa-* - ./configure --prefix=/ipfire/trunk/tools/ \ - --sbindir=/ipfire/trunk/tools/ --disable-nls - make - install -c tftpd/tftpd $BASEDIR/tools/in.tftpd - cd - - rm -rf $BASEDIR/tmp/tftp-hpa-* -} - -start_tftpd() { - if [ ! -e $BASEDIR/tools/in.tftpd ]; then - compile_tftpd - fi - reload_tftpd - if [ "$?" == "0" ]; then - $BASEDIR/tools/in.tftpd -l -s $BASEDIR/tftpboot - beautify message DONE - else - echo -en "You don not have a pxe boot image in your base directory.\nPlease compile first." - beautify message FAIL - exit 1 - fi -} - -stop_tftpd() { - echo -n "Stopping TFTPD..." - killall in.tftpd >/dev/null 2>&1 - sleep 3 - killall -9 in.tftp >/dev/null 2>&1 - beautify message DONE -} - -reload_tftpd() { - if [ -e $BASEDIR/ipfire-$VERSION.$MACHINE-pxe.tgz ]; then - mkdir -p $BASEDIR/tftpboot - tar xfz $BASEDIR/ipfire-$VERSION.$MACHINE-pxe.tgz -C $BASEDIR/tftpboot - return 0 - fi - return 1 -} - update_langs() { echo -ne "Checking the translations for missing or obsolete strings..." chmod 755 $BASEDIR/tools/{check_strings.pl,sort_strings.pl,check_langs.sh} diff --git a/tools/sendEmail b/tools/sendEmail deleted file mode 100755 index bf2d3949d..000000000 --- a/tools/sendEmail +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/python - -import smtplib - -fromaddr = "From: ipfire01@ipfire.org" -toaddrs = "To: entwickler@ipfire.org" -#password = "" - -msg = "" -subject = "" -header = "" -body = "" - -while 1: - try: - line = raw_input() - except EOFError: - break - if line.startswith("From: "): - fromaddr = line - elif line.startswith("To: "): - toaddrs = line - elif line.startswith("Subject: "): - subject = line - else: - body = body + line + "\r\n" - -for i in fromaddr, toaddrs, subject: - header = header + i + "\r\n" - -msg = header + "\r\n" + body # An empty line to finish the header + add the body - -server = smtplib.SMTP('mail01.tremer.info') -#server.set_debuglevel(1) -#server.login(fromaddr, password) -server.sendmail(fromaddr, toaddrs, msg) -server.quit()