From: Thierry Parmentelat Date: Fri, 30 Nov 2007 11:26:40 +0000 (+0000) Subject: cleanup devel files - see README-devel.txt X-Git-Tag: myplc-4.0-15~21 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=092f822ed14ee71a0cfd0a0707559b1d1a7dd406;p=myplc.git cleanup devel files - see README-devel.txt --- diff --git a/README-devel.txt b/README-devel.txt new file mode 100644 index 0000000..ad93523 --- /dev/null +++ b/README-devel.txt @@ -0,0 +1,11 @@ +Thierry Parmentelat, on November 30 2007 +we do not support myplc-devel anymore, see build/ for how to build the system in a vserver-based environment + +I am removing all files related to the former myplc-devel, they can be +retrieved in revision 7249: + +D plc_devel_config.xml +D build_devel.sh +D myplc-devel-native.spec +D myplc-devel.spec +D plc-devel.sysconfig diff --git a/build_devel.sh b/build_devel.sh deleted file mode 100755 index 55d4642..0000000 --- a/build_devel.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash -# -# Build a complete MyPLC development environment. Requires PlanetLab -# source code to be exported into directories at the same level as we -# are (i.e., ..). -# -# devel/root.img (loopback image) -# devel/root/ (mount point) -# devel/data/ (various data files) -# devel/data/cvs/ (local CVS repository) -# devel/data/build/ (build area) -# devel/data/etc/planetlab/ (configuration) -# devel/data/root (root's home dir) -# -# Mark Huang -# Copyright (C) 2006 The Trustees of Princeton University -# -# $Id$ -# - -echo "$0" not supported anymore -echo "need to figure a way to handle space in group names in .lst files" -exit 1 - -. build.functions - -# These directories are allowed to grow to unspecified size, so they -# are stored as symlinks to the /data partition. mkfedora and yum -# expect some of them to be real directories, however. -datadirs=( -/etc/planetlab -/root -/tmp -/usr/tmp -/var/tmp -/var/log -) - -pl_fixdirs devel/root "${datadirs[@]}" - - -echo "* myplc-devel: Installing base filesystem" -mkdir -p devel/root -# xxx need be pldistro & fcdistro dependant -make_chroot_from_lst devel/root planetlab-devel.lst - -# Install configuration file -echo "* myplc-devel: Installing configuration file" -install -D -m 444 plc_devel_config.xml devel/data/etc/planetlab/default_config.xml -install -D -m 444 plc_config.dtd devel/data/etc/planetlab/plc_config.dtd - -# Install configuration scripts -echo "* myplc-devel: Installing configuration scripts" -install -D -m 755 plc_config.py devel/root/tmp/plc_config.py -chroot devel/root sh -c 'cd /tmp; python plc_config.py build; python plc_config.py install' -install -D -m 755 plc-config devel/root/usr/bin/plc-config -install -D -m 755 plc-config-tty devel/root/usr/bin/plc-config-tty - -# Install initscripts -echo "* myplc-devel: Installing initscripts" -find plc.d/functions | cpio -p -d -u devel/root/etc/ -install -D -m 755 guest.init devel/root/etc/init.d/plc -chroot devel/root sh -c 'chkconfig --add plc; chkconfig plc on' - -# Add a build user with the same ID as the current build user, who can -# then cross-mount their home directory into the image and build MyPLC -# in their home directory. -echo "* myplc-devel: Adding build user" -uid=${SUDO_UID:-2000} -gid=${SUDO_GID:-2000} -if ! grep -q "Automated Build" devel/root/etc/passwd ; then - chroot devel/root <devel/root/etc/sudoers < -Distribution: PlanetLab 4.0 -URL: http://svn.planet-lab.org/svn/MyPLC - -Summary: PlanetLab Central (PLC) Development Environment -Name: MyPLC-devel-native -Version: 0.1 -Release: 2%{?pldistro:.%{pldistro}}%{?date:.%{date}} -License: PlanetLab -Group: Development/Tools -Source0: %{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -AutoReqProv: no - -# group this according to the requirements of the different packages we build -Requires: beecrypt-devel -Requires: bzip2 -Requires: coreutils -Requires: cpio -Requires: createrepo -Requires: curl -Requires: curl-devel -Requires: cvs -Requires: db4-devel -Requires: dev -Requires: diffutils -Requires: dnsmasq -Requires: docbook-utils-pdf -Requires: dosfstools -Requires: doxygen -Requires: expat-devel -Requires: expect -Requires: findutils -Requires: gcc-c++ -Requires: gd -Requires: glibc -Requires: glibc-common -Requires: gnupg -Requires: gperf -Requires: graphviz -Requires: gzip -Requires: httpd -%if "%{distroname}" == "Fedora" && "%{distrorelease}" >= "7" -Requires: inotify-tools-devel -%endif -Requires: iptables -Requires: less -Requires: libpcap -%if ("%{distroname}" == "Fedora" && "%{distrorelease}" >= "6") || ("%{distroname}" == "CentOS" && "%{distrorelease}" >= "5") -Requires: libpcap-devel -%endif -Requires: libtool -Requires: linuxdoc-tools -Requires: mailx -Requires: make -Requires: mkisofs -Requires: mod_python -Requires: mod_ssl -Requires: mysql -Requires: mysql-devel -Requires: mysql-server -Requires: nasm -Requires: ncurses-devel -Requires: ocaml -Requires: ocaml-ocamldoc -Requires: openssh -Requires: openssl -Requires: php -Requires: php-devel -Requires: php-gd -Requires: php-pgsql -Requires: postgresql -Requires: postgresql-devel -Requires: postgresql-python -Requires: postgresql-server -Requires: python -Requires: python-devel -%if ("%{distroname}" == "Fedora" && "%{distrorelease}" >= "5") || ("%{distroname}" == "CentOS" && "%{distrorelease}" >= "5") -Requires: python-pycurl -Requires: python-psycopg2 -%endif -Requires: PyXML -Requires: readline-devel -Requires: redhat-rpm-config -Requires: rpm -Requires: rpm-build -Requires: rpm-devel -Requires: rsync -Requires: sendmail -Requires: sendmail-cf -Requires: sharutils -Requires: SOAPpy -Requires: sudo -Requires: subversion -Requires: tar -Requires: tetex-latex -Requires: time -Requires: vconfig -Requires: vixie-cron -Requires: wget -Requires: xmlsec1 -Requires: xmlsec1-openssl -Requires: yum - -%define debug_package %{nil} - -%description -This package installs a complete PlanetLab development -environment. The default installation consists of all the packages -necessary to compile MyPLC. - -%prep -%setup -q - -%build - -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/etc - -%install - -touch $RPM_BUILD_ROOT/etc/myplc-devel-native - -%clean -rm -rf $RPM_BUILD_ROOT - -# If run under sudo -if [ -n "$SUDO_USER" ] ; then - # Allow user to delete the build directory - chown -h -R $SUDO_USER . - # Some temporary cdroot files like /var/empty/sshd and - # /usr/bin/sudo get created with non-readable permissions. - find . -not -perm +0600 -exec chmod u+rw {} \; - # Allow user to delete the built RPM(s) - chown -h -R $SUDO_USER %{_rpmdir}/%{_arch} -fi - -%pre - -%post - -if [ -h "/sbin/new-kernel-pkg" ] ; then - filename=$(readlink -f /sbin/new-kernel-pkg) - if [ "$filename" == "/sbin/true"] ; then - echo "WARNING: /sbin/new-kernel-pkg symlinked to /sbin/true" - echo "\tmost likely /etc/rpm/macros has /sbin/new-kernel-pkg declared in _netsharedpath." - echo "\tPlease remove /sbin/new-kernel-pkg from _netsharedpath and reintall mkinitrd." - exit 1 - fi -fi - -uid=2000 -gid=2000 - -# add a "build" user to the system -builduser=$(grep "^build" /etc/passwd | wc -l) -if [ $builduser -eq 0 ] ; then - groupadd -o -g $gid build; - useradd -o -c 'Automated Build' -u $uid -g $gid -n -M -s /bin/bash build; -fi - -# myplc-devel on a shared box requires that we set up max loop devices -for i in $(seq 0 255) ; do - mknod -m 640 /dev/loop$i b 7 $i -done - -# Allow build user to build certain RPMs as root -buildsudo=$(grep "^build.*ALL=(ALL).*NOPASSWD:.*ALL" /etc/sudoers | wc -l) -if [ $buildsudo -eq 0 ] ; then - echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers -fi - -# Don't requiretty for sudo. Needed to build myplc from cron job -ttysudo=$(grep "^Defaults.*requiretty" /etc/sudoers | wc -l) -if [ $ttysudo -eq 1 ] ; then - sed -i 's,^Defaults.*requiretty,#Defaults requiretty,' /etc/sudoers -fi - -%preun -# 0 = erase, 1 = upgrade -if [ $1 -eq 0 ] ; then - echo "NOTE: should remove build user from /etc/sudoers" -fi - -%files -%defattr(-,root,root,-) -/etc/myplc-devel-native - -%changelog -* Fri Oct 05 2007 Marc E. Fiuczynski -- Initial build. diff --git a/myplc-devel.spec b/myplc-devel.spec deleted file mode 100644 index 0520aa5..0000000 --- a/myplc-devel.spec +++ /dev/null @@ -1,100 +0,0 @@ -Vendor: PlanetLab -Packager: PlanetLab Central -Distribution: PlanetLab 4.0 -URL: http://cvs.planet-lab.org/cvs/myplc - -Summary: PlanetLab Central (PLC) Development Environment -Name: myplc-devel -Version: 0.5 -Release: 3%{?pldistro:.%{pldistro}}%{?date:.%{date}} -License: PlanetLab -Group: Development/Tools -Source0: %{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -AutoReqProv: no - -%define debug_package %{nil} - -%description -This package installs a complete PlanetLab development environment -contained within a chroot jail. The default installation consists of -all the tools necessary to compile MyPLC. - -%prep -%setup -q - -%build -pushd MyPLC -./build_devel.sh -popd - -%install -rm -rf $RPM_BUILD_ROOT - -pushd MyPLC - -# Install host startup script and configuration file -install -D -m 755 host.init $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/plc-devel -install -D -m 644 plc-devel.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/plc-devel - -# Install root filesystem -install -d -m 755 $RPM_BUILD_ROOT/plc/devel/root -install -D -m 644 devel/root.img $RPM_BUILD_ROOT/plc/devel/root.img - -# Install data directory -find devel/data | cpio -p -d -u $RPM_BUILD_ROOT/plc/ - -popd - -%clean -rm -rf $RPM_BUILD_ROOT - -# If run under sudo -if [ -n "$SUDO_USER" ] ; then - # Allow user to delete the build directory - chown -h -R $SUDO_USER . - # Some temporary cdroot files like /var/empty/sshd and - # /usr/bin/sudo get created with non-readable permissions. - find . -not -perm +0600 -exec chmod u+rw {} \; - # Allow user to delete the built RPM(s) - chown -h -R $SUDO_USER %{_rpmdir}/%{_arch} -fi - -%pre -if [ -x %{_sysconfdir}/init.d/plc-devel ] ; then - %{_sysconfdir}/init.d/plc-devel stop -fi - -%post -if [ -x /sbin/chkconfig ] ; then - /sbin/chkconfig --add plc-devel - /sbin/chkconfig plc-devel on -fi - -%preun -# 0 = erase, 1 = upgrade -if [ $1 -eq 0 ] ; then - %{_sysconfdir}/init.d/plc-devel stop - if [ -x /sbin/chkconfig ] ; then - /sbin/chkconfig plc-devel off - /sbin/chkconfig --del plc-devel - fi -fi - -%files -%defattr(-,root,root,-) -# Host startup script and configuration file -%{_sysconfdir}/init.d/plc-devel -%{_sysconfdir}/sysconfig/plc-devel - -# Root filesystem -/plc/devel/root.img -/plc/devel/root - -# Data directory -%dir /plc/devel/data -%config(noreplace) /plc/devel/data/* - -%changelog -* Fri Jan 19 2007 Mark Huang - 0.5-3 -- Initial build. diff --git a/plc-devel.sysconfig b/plc-devel.sysconfig deleted file mode 100644 index f195566..0000000 --- a/plc-devel.sysconfig +++ /dev/null @@ -1,3 +0,0 @@ -PLC_ROOT=/plc/devel/root -PLC_DATA=/plc/devel/data -#PLC_OPTIONS="-v" diff --git a/plc_devel_config.xml b/plc_devel_config.xml deleted file mode 100644 index 6180428..0000000 --- a/plc_devel_config.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - Build Environment - These variables control the behavior of the - PlanetLab build environment. - - - - Fedora Core Release Version - 4 - Version number of Fedora Core upon which to - base the build environment. Warning: Currently, only Fedora - Core 4 is supported. - - - - Fedora Core Base Architecture - i386 - Base architecture of the build - environment. Warning: Currently, only i386 is - supported. - - - - Fedora Core Mirror URL - file:///data/fedora - Fedora Core mirror from which to install - filesystems. - - - - CVS Root - /cvs - CVSROOT to use when checking out code. - - - - Bootstrap Build - false - Controls whether MyPLC should be built inside - of its own development environment. - - - - - - - - - -