From: Laurent Mazet Date: Wed, 16 Sep 2015 15:31:10 +0000 (+0200) Subject: simplify trc6500-master-file packaging X-Git-Tag: debian_7.8.5~6 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=2cb6a627e61a5bf8f1eec7e68f0e34d48672a083;p=debian6500.git simplify trc6500-master-file packaging --- diff --git a/trc6500-master-file/Makefile b/trc6500-master-file/Makefile index a9850dc..6573fe1 100644 --- a/trc6500-master-file/Makefile +++ b/trc6500-master-file/Makefile @@ -2,8 +2,6 @@ DIR = ../master/ -CONFIGDIR = debian/ - FILES = $(shell cd $(DIR); find etc/ -type f) TARGET = ../$(MODULE)_$(VERSION)_$(ARCH).deb @@ -19,7 +17,7 @@ ARCH = all .DEFAULT: all .PHONY: clean deb all -VERSION = $(shell awk '/^$(MODULE)/ { gsub(/[()]/, ""); print $$2; exit }' debian/debian-changelog) +VERSION = $(shell awk '/^$(MODULE)/ { gsub(/[()]/, ""); print $$2; exit }' changelog) all: $(TARGET) deb @@ -31,7 +29,7 @@ deb: rm -rf deb mkdir --parent deb/etc/webconfig/ deb/etc/default/ deb/DEBIAN -deb/DEBIAN/preinst: debian/debian-preinst deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST) +deb/DEBIAN/preinst: preinst deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST) rm -f $@ cat $< > $@~ for f in $(FILES); do echo '[ -f "/'$$f'" ] && dpkg-divert --add /'$$f; done >>$@~ @@ -39,7 +37,7 @@ deb/DEBIAN/preinst: debian/debian-preinst deb $(addprefix $(DIR)/, $(FILES)) $(M chmod +x $@~ mv $@~ $@ -deb/DEBIAN/postrm: debian/debian-postrm deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST) +deb/DEBIAN/postrm: postrm deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST) rm -f $@ cat $< > $@~ for f in $(FILES); do echo '[ -f "/'$$f'" ] && dpkg-divert --remove /'$$f; done >>$@~ @@ -47,13 +45,13 @@ deb/DEBIAN/postrm: debian/debian-postrm deb $(addprefix $(DIR)/, $(FILES)) $(MAK chmod +x $@~ mv $@~ $@ -deb/DEBIAN/postinst: debian/debian-postinst deb +deb/DEBIAN/postinst: postinst deb cp $< $@ $(TARGET): deb $(OBJECTS) - sed s/@@version@@/$(VERSION)/ debian/debian-control > deb/DEBIAN/control + sed s/@@version@@/$(VERSION)/ control > deb/DEBIAN/control mkdir -p deb/usr/share/doc/$(MODULE) - cp debian/debian-changelog deb/usr/share/doc/$(MODULE)/changelog + cp changelog deb/usr/share/doc/$(MODULE)/changelog cp -r $(DIR)/* deb/ fakeroot dpkg --build deb mv deb.deb $@ diff --git a/trc6500-master-file/binary b/trc6500-master-file/binary new file mode 100644 index 0000000..cd5ac03 --- /dev/null +++ b/trc6500-master-file/binary @@ -0,0 +1 @@ +2.0 diff --git a/trc6500-master-file/changelog b/trc6500-master-file/changelog new file mode 100644 index 0000000..b95e918 --- /dev/null +++ b/trc6500-master-file/changelog @@ -0,0 +1,38 @@ +trc6500-master-file (7.8.4-1) unstable; urgency=low + * update softndesign packages + * remove rproxy default files + + -- Laurent Mazet Mon, 14 Sep 2015 20:10:41 +0200 + +trc6500-master-file (7.8.3-1) unstable; urgency=low + * Rebuild trc6500-master-file package to limit conflicts with trc6500 packages + * Add lite tarball for xdf-30mhz-lite + * Clean rc.local for xdf-12mhz, xdf-30mhz, and mhf + * Minimize usage of SDD + * Correct post install package script (force links creation) + * Remove internal debian mirror from master + * Kept aliases for swm and swg + * Restore eth1 on clovis-lite configuration + + -- Laurent Mazet Tue, 28 Jul 2015 14:02:50 +0200 + +trc6500-master-file (7.8.2-1) unstable; urgency=low + + * Keep standard 30MHzDF and adds the lite configuration + + -- Thomas Pérennou Mon, 22 Jun 2015 15:15:16 +0200 + +trc6500-master-file (7.8.1-1) unstable; urgency=low + + * .deb packaging + + -- Olivier Leobal Wed, 10 Jun 2015 14:16:08 +0200 + +trc6500-master-file (7.8.0-1) unstable; urgency=low + + * initial release (#1337) + * added scripts from lgcore + * getswitchtemp fix + * inetd removal + + -- Olivier Leobal Wed, 10 Jun 2015 12:46:08 +0200 diff --git a/trc6500-master-file/control b/trc6500-master-file/control new file mode 100644 index 0000000..e9ba132 --- /dev/null +++ b/trc6500-master-file/control @@ -0,0 +1,9 @@ +Section: TRC6500 +Priority: important +Version: @@version@@ +Architecture: all +Package: trc6500-master-file +Maintainer: Olivier Léobal +Description: files for the TRC6500's computing cluster's operating system + Contains mainly scripts and configuration files +Homepage: http://www.thalesgroup.com/ diff --git a/trc6500-master-file/debian-binary b/trc6500-master-file/debian-binary deleted file mode 100644 index cd5ac03..0000000 --- a/trc6500-master-file/debian-binary +++ /dev/null @@ -1 +0,0 @@ -2.0 diff --git a/trc6500-master-file/debian/debian-changelog b/trc6500-master-file/debian/debian-changelog deleted file mode 100644 index b95e918..0000000 --- a/trc6500-master-file/debian/debian-changelog +++ /dev/null @@ -1,38 +0,0 @@ -trc6500-master-file (7.8.4-1) unstable; urgency=low - * update softndesign packages - * remove rproxy default files - - -- Laurent Mazet Mon, 14 Sep 2015 20:10:41 +0200 - -trc6500-master-file (7.8.3-1) unstable; urgency=low - * Rebuild trc6500-master-file package to limit conflicts with trc6500 packages - * Add lite tarball for xdf-30mhz-lite - * Clean rc.local for xdf-12mhz, xdf-30mhz, and mhf - * Minimize usage of SDD - * Correct post install package script (force links creation) - * Remove internal debian mirror from master - * Kept aliases for swm and swg - * Restore eth1 on clovis-lite configuration - - -- Laurent Mazet Tue, 28 Jul 2015 14:02:50 +0200 - -trc6500-master-file (7.8.2-1) unstable; urgency=low - - * Keep standard 30MHzDF and adds the lite configuration - - -- Thomas Pérennou Mon, 22 Jun 2015 15:15:16 +0200 - -trc6500-master-file (7.8.1-1) unstable; urgency=low - - * .deb packaging - - -- Olivier Leobal Wed, 10 Jun 2015 14:16:08 +0200 - -trc6500-master-file (7.8.0-1) unstable; urgency=low - - * initial release (#1337) - * added scripts from lgcore - * getswitchtemp fix - * inetd removal - - -- Olivier Leobal Wed, 10 Jun 2015 12:46:08 +0200 diff --git a/trc6500-master-file/debian/debian-control b/trc6500-master-file/debian/debian-control deleted file mode 100644 index e9ba132..0000000 --- a/trc6500-master-file/debian/debian-control +++ /dev/null @@ -1,9 +0,0 @@ -Section: TRC6500 -Priority: important -Version: @@version@@ -Architecture: all -Package: trc6500-master-file -Maintainer: Olivier Léobal -Description: files for the TRC6500's computing cluster's operating system - Contains mainly scripts and configuration files -Homepage: http://www.thalesgroup.com/ diff --git a/trc6500-master-file/debian/debian-postinst b/trc6500-master-file/debian/debian-postinst deleted file mode 100755 index 8ca6a16..0000000 --- a/trc6500-master-file/debian/debian-postinst +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# since equivs can't handle symlinks, here we are doing them by hand. As of writing this script (2015-05-29), there are 11 symlinks to take care of. - -# I don't know why things were that way before, but I'm told to set them that way again. -echo 'Moving things around..' -[ -h /home ] || mv /home /var/media/backup -mkdir -p /var/media/backup/dump/{core,dump_delay_line,dump_track_base,log,prod,rec,trace} -ln -sf /var/media/backup/dump / -ln -sf /var/media/backup/home / -ln -sf /var/media/backup/rec / -ln -sf /var/media/prod /var/media/backup/ -ln -sf /etc/hosts.30MHzMDF /etc/hosts.30MHz -ln -sf /etc/hosts.8MHzMHF /etc/hosts.8MHz -ln -sf /usr/lib/syslinux/menu.c32 /opt/tftp/menu.c32 -ln -sf /initrd.img /opt/tftp/initrd.img -ln -sf /vmlinuz /opt/tftp/vmlinuz -ln -sf /usr/lib/syslinux/pxelinux.0 /opt/tftp/pxelinux.0 -ln -sf /usr/lib/syslinux/memdisk /opt/tftp/memdisk -echo 'Things moved.' - -# now enable all the scripts and such.. -echo 'Enabling on-startup scripts..' -update-rc.d waitswitches defaults -update-rc.d waitswitches enable -update-rc.d etherwake defaults -update-rc.d etherwake enable -update-rc.d ipmiwake defaults -update-rc.d ipmiwake enable -update-rc.d wakeonlan defaults -update-rc.d wakeonlan enable -update-rc.d waitslaves defaults -update-rc.d shutdownallblades defaults -update-rc.d checkudevrules enable -update-rc.d checkudevrules defaults -echo 'Scripts enabled.' - -# and these other things too -echo 'Finalizing configuration..' -chown webconfig /etc/webconfig/alias.csv /etc/dhcp/dhcpd.conf* -cp /etc/dhcp/dhcpd.conf.blank /etc/dhcp/dhcpd.conf -chsh -s /usr/bin/pdmenu trc6500 - -# from that sync_master.sh script.. Apparently there from Git shenanigans. -chmod go-rwx /root/.ssh/id_rsa -chmod go-rwx /opt/cluster/slave/root/.ssh -chmod go-rwx /opt/cluster/slave/root/.ssh/id_rsa -chmod a+rwx /opt/tftp - -echo "">/var/log/atftpd.log -chown nobody /var/log/atftpd.log - -# solve an issue with old trc6500-webconfig -touch /var/cache/webconfig/snmp.tree -chown webconfig: /var/cache/webconfig/snmp.tree - -update-initramfs -u - -cd /opt/cluster -# now this file is locked away during install and replaced by a dummy. So we put a duplicate of this in a script executed on first boot after the install. -# this is still here because it is planned we install/update this on established systems -[ -f /sbin/start-stop-daemon.REAL ] || make all -echo 'Finalized.' - - diff --git a/trc6500-master-file/debian/debian-postrm b/trc6500-master-file/debian/debian-postrm deleted file mode 100755 index b97cb85..0000000 --- a/trc6500-master-file/debian/debian-postrm +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -# list of diverts diff --git a/trc6500-master-file/debian/debian-preinst b/trc6500-master-file/debian/debian-preinst deleted file mode 100755 index 7d1b6f3..0000000 --- a/trc6500-master-file/debian/debian-preinst +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -# list of diverts diff --git a/trc6500-master-file/postinst b/trc6500-master-file/postinst new file mode 100755 index 0000000..8ca6a16 --- /dev/null +++ b/trc6500-master-file/postinst @@ -0,0 +1,65 @@ +#!/bin/bash + +# since equivs can't handle symlinks, here we are doing them by hand. As of writing this script (2015-05-29), there are 11 symlinks to take care of. + +# I don't know why things were that way before, but I'm told to set them that way again. +echo 'Moving things around..' +[ -h /home ] || mv /home /var/media/backup +mkdir -p /var/media/backup/dump/{core,dump_delay_line,dump_track_base,log,prod,rec,trace} +ln -sf /var/media/backup/dump / +ln -sf /var/media/backup/home / +ln -sf /var/media/backup/rec / +ln -sf /var/media/prod /var/media/backup/ +ln -sf /etc/hosts.30MHzMDF /etc/hosts.30MHz +ln -sf /etc/hosts.8MHzMHF /etc/hosts.8MHz +ln -sf /usr/lib/syslinux/menu.c32 /opt/tftp/menu.c32 +ln -sf /initrd.img /opt/tftp/initrd.img +ln -sf /vmlinuz /opt/tftp/vmlinuz +ln -sf /usr/lib/syslinux/pxelinux.0 /opt/tftp/pxelinux.0 +ln -sf /usr/lib/syslinux/memdisk /opt/tftp/memdisk +echo 'Things moved.' + +# now enable all the scripts and such.. +echo 'Enabling on-startup scripts..' +update-rc.d waitswitches defaults +update-rc.d waitswitches enable +update-rc.d etherwake defaults +update-rc.d etherwake enable +update-rc.d ipmiwake defaults +update-rc.d ipmiwake enable +update-rc.d wakeonlan defaults +update-rc.d wakeonlan enable +update-rc.d waitslaves defaults +update-rc.d shutdownallblades defaults +update-rc.d checkudevrules enable +update-rc.d checkudevrules defaults +echo 'Scripts enabled.' + +# and these other things too +echo 'Finalizing configuration..' +chown webconfig /etc/webconfig/alias.csv /etc/dhcp/dhcpd.conf* +cp /etc/dhcp/dhcpd.conf.blank /etc/dhcp/dhcpd.conf +chsh -s /usr/bin/pdmenu trc6500 + +# from that sync_master.sh script.. Apparently there from Git shenanigans. +chmod go-rwx /root/.ssh/id_rsa +chmod go-rwx /opt/cluster/slave/root/.ssh +chmod go-rwx /opt/cluster/slave/root/.ssh/id_rsa +chmod a+rwx /opt/tftp + +echo "">/var/log/atftpd.log +chown nobody /var/log/atftpd.log + +# solve an issue with old trc6500-webconfig +touch /var/cache/webconfig/snmp.tree +chown webconfig: /var/cache/webconfig/snmp.tree + +update-initramfs -u + +cd /opt/cluster +# now this file is locked away during install and replaced by a dummy. So we put a duplicate of this in a script executed on first boot after the install. +# this is still here because it is planned we install/update this on established systems +[ -f /sbin/start-stop-daemon.REAL ] || make all +echo 'Finalized.' + + diff --git a/trc6500-master-file/postrm b/trc6500-master-file/postrm new file mode 100755 index 0000000..b97cb85 --- /dev/null +++ b/trc6500-master-file/postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +# list of diverts diff --git a/trc6500-master-file/preinst b/trc6500-master-file/preinst new file mode 100755 index 0000000..7d1b6f3 --- /dev/null +++ b/trc6500-master-file/preinst @@ -0,0 +1,3 @@ +#!/bin/bash + +# list of diverts