summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>1999-11-12 21:35:25 +0000
committerMike Fulbright <msf@redhat.com>1999-11-12 21:35:25 +0000
commit288529a31576468d7d27ca1e9aec8a63ac973510 (patch)
treeaab56db9f4f406e2a7a6b321bed746a7ed09c9fc
parent3230f88eef53294ac71019f620c998e98b62af77 (diff)
downloadanaconda-288529a31576468d7d27ca1e9aec8a63ac973510.tar.gz
anaconda-288529a31576468d7d27ca1e9aec8a63ac973510.tar.xz
anaconda-288529a31576468d7d27ca1e9aec8a63ac973510.zip
Several changes to build structure - contact Dr Mike if you hit problems.
I've made most of the Makefile's use the Makefile.inc include in the root of the anaconda src tree to get the python path, instead of having it defined in many different places. In the top level Makefile I added a install target called install-unconfig. This target installs the anaconda script and associated support files with the intention of being able to run anaconda in unconfig mode after a successful install. This mode is automatically selected if the executed script is called 'anaconda-unconfig', or the '-U' command line parameter is used.
-rw-r--r--Makefile38
-rw-r--r--Makefile.inc6
-rwxr-xr-xanaconda38
-rw-r--r--balkan/Makefile7
-rw-r--r--gnome-map/Makefile9
-rw-r--r--isys/Makefile6
-rw-r--r--iw/Makefile8
-rw-r--r--pixmaps/Makefile6
-rw-r--r--rpmmodule/Makefile4
-rw-r--r--textw/Makefile8
10 files changed, 99 insertions, 31 deletions
diff --git a/Makefile b/Makefile
index 1fb3696ce..e41981b0d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,9 @@
+include Makefile.inc
+
ARCH := $(patsubst i%86,i386,$(shell uname -m))
ARCH := $(patsubst sparc%,sparc,$(ARCH))
+SUBDIRSUNCFG = balkan help isys iw pixmaps po textw gnome-map
SUBDIRSHD = rpmmodule kudzu isys balkan libfdisk collage loader stubs po \
minislang textw utils
SUBDIRS = $(SUBDIRSHD) gnome-map iw help pixmaps
@@ -10,8 +13,15 @@ ifeq (i386, $(ARCH))
SUBDIRS += ddcprobe
endif
+
+#
+# TOPDIR - ?
+# DESTDIR - destination for install image for install purposes
+# UNCFGDESTDIR - root of destination for install image for unconfig purposes
TOPDIR = ../../..
DESTDIR = ../../../RedHat/instimage
+UNCFGDESTDIR = /
+
CATALOGS = po/anaconda.pot
ALLSUBDIRS = $(BUILDONLYSUBDIRS) $(SUBDIRS)
@@ -30,6 +40,21 @@ clean:
subdirs:
for d in $(ALLSUBDIRS); do make TOPDIR=../$(TOPDIR) -C $$d; done
+install-unconfig: all
+ @if [ "$(UNCFGDESTDIR)" = "" ]; then \
+ echo " "; \
+ echo "ERROR: A destdir is required"; \
+ exit 1; \
+ fi
+ mkdir -p $(UNCFGDESTDIR)/usr/sbin
+ mkdir -p $(UNCFGDESTDIR)/$(PYTHONLIBDIR)
+ cp -a anaconda $(UNCFGDESTDIR)/usr/sbin/anaconda-unconfig
+ cp -var $(PYFILES) $(UNCFGDESTDIR)/$(PYTHONLIBDIR)
+ ./py-compile --basedir $(UNCFGDESTDIR)/$(PYTHONLIBDIR) $(PYFILES)
+ cp -a *.so $(UNCFGDESTDIR)/$(PYTHONLIBDIR)
+ cp -a kudzu/kudzumodule.so $(UNCFGDESTDIR)/$(PYTHONLIBDIR)
+ for d in $(SUBDIRSUNCFG); do make TOPDIR=../$(TOPDIR) DESTDIR=`cd $(UNCFGDESTDIR); pwd` -C $$d install; done
+
install-hd: all
@if [ "$(DESTDIR)" = "" ]; then \
echo " "; \
@@ -37,10 +62,10 @@ install-hd: all
exit 1; \
fi
mkdir -p $(DESTDIR)/usr/bin
- mkdir -p $(DESTDIR)/usr/lib/python1.5/site-packages
+ mkdir -p $(DESTDIR)/$(PYTHONLIBDIR)
cp -a anaconda $(DESTDIR)/usr/bin
- cp -a *.py $(DESTDIR)/usr/lib/python1.5/site-packages
- cp -a *.so $(DESTDIR)/usr/lib/python1.5/site-packages
+ cp -a *.py $(DESTDIR)/$(PYTHONLIBDIR)
+ cp -a *.so $(DESTDIR)/$(PYTHONLIBDIR)
for d in $(SUBDIRSHD); do make TOPDIR=../$(TOPDIR) DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; done
install: all
@@ -51,7 +76,8 @@ install: all
fi
mkdir -p $(DESTDIR)/usr/bin
cp -a anaconda $(DESTDIR)/usr/bin
- cp -var $(PYFILES) $(DESTDIR)/usr/lib/python1.5/site-packages
- ./py-compile --basedir $(DESTDIR)/usr/lib/python1.5/site-packages $(PYFILES)
- cp -a *.so $(DESTDIR)/usr/lib/python1.5/site-packages
+ cp -var $(PYFILES) $(DESTDIR)/$(PYTHONLIBDIR)
+ ./py-compile --basedir $(DESTDIR)/$(PYHTONLIBDIR) $(PYFILES)
+ cp -a *.so $(DESTDIR)/$(PYTHONLIBDIR)
for d in $(SUBDIRS); do make TOPDIR=../$(TOPDIR) DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; done
+
diff --git a/Makefile.inc b/Makefile.inc
new file mode 100644
index 000000000..042cd77da
--- /dev/null
+++ b/Makefile.inc
@@ -0,0 +1,6 @@
+#
+# define destination locations
+#
+
+PYTHONLIBDIR = /usr/lib/anaconda
+ANACONDADATADIR = /usr/share/anaconda
diff --git a/anaconda b/anaconda
index b519106bc..15f2d1770 100755
--- a/anaconda
+++ b/anaconda
@@ -2,13 +2,19 @@
import sys, os
+#
+# only used by anaconda in unconfig mode
+#
+sys.path.append('/usr/lib/anaconda')
+
# Python passed my path as argv[0]!
# if sys.argv[0][-7:] == "syslogd":
-if sys.argv[1] == "--syslogd":
- from syslogd import Syslogd
- root = sys.argv[2]
- output = sys.argv[3]
- syslog = Syslogd (root, open (output, "w+"))
+if len(sys.argv) > 1:
+ if sys.argv[1] == "--syslogd":
+ from syslogd import Syslogd
+ root = sys.argv[2]
+ output = sys.argv[3]
+ syslog = Syslogd (root, open (output, "w+"))
if (os.path.exists('isys')):
sys.path.append('isys')
@@ -22,12 +28,15 @@ import iutil
setverPath = None
+# save because we munge argv below
+[execname] = string.split(sys.argv[0], '/')[-1:]
+
gettext.bindtextdomain("anaconda", "/usr/share/locale")
gettext.textdomain("anaconda")
_ = gettext.gettext
-(args, extra) = isys.getopt(sys.argv[1:], 'GTtdr:fm:',
- [ 'gui', 'text', 'test', 'debug', 'method=', 'rootpath=',
+(args, extra) = isys.getopt(sys.argv[1:], 'GTUtdr:fm:',
+ [ 'gui', 'text', 'unconfig', 'test', 'debug', 'method=', 'rootpath=',
'testpath=', 'mountfs', 'traceonly', 'kickstart=',
'lang=', 'keymap=', 'kbdtype=', 'module=',
'expert', 'serial' ])
@@ -63,6 +72,8 @@ for n in args:
mode = 'g'
elif (str == '-T' or str == '--text'):
mode = 't'
+ elif (str == '-U' or str == '--unconfig'):
+ mode = 'u'
elif (str == '-t' or str == '--test'):
test = 1
elif (str == '--module'):
@@ -93,7 +104,13 @@ for n in args:
elif (str == '--kbdtype'):
kbdtype = arg
-if (not method):
+# see how we were run, override command line mode selection
+if (execname == "anaconda-unconfig"):
+ print "overriding to unconfig mode based on exec name"
+ mode = 'u'
+
+
+if (mode != 'u' and not method):
print "no install method specified"
sys.exit(1)
@@ -101,7 +118,7 @@ if (debug):
import pdb
pdb.set_trace()
-if (not test and not localInstall and os.getpid() > 50):
+if (mode != 'u' and not test and not localInstall and os.getpid() > 50):
print "you're running me on a live system! that's incredibly stupid."
sys.exit(1)
@@ -147,6 +164,9 @@ if (mode == 'g'):
from gui import InstallInterface
elif (mode == 't'):
from text import InstallInterface
+elif (mode == 'u'):
+ print "Going to go into uninstall mode"
+ sys.exit(1)
else:
print "No mode was specified"
sys.exit(1)
diff --git a/balkan/Makefile b/balkan/Makefile
index 036392ac5..4487cb0e7 100644
--- a/balkan/Makefile
+++ b/balkan/Makefile
@@ -1,4 +1,6 @@
-PYTHONLIBDIR = $(DESTDIR)/usr/lib/python1.5/site-packages
+include ../Makefile.inc
+
+#PYTHONLIBDIR = $(DESTDIR)/usr/lib/python1.5/site-packages
OBJECTS = rw.o dos.o sun.o bsdlabel.o
@@ -22,4 +24,5 @@ dos.o: dos.h
sun.o: sun.h
install: all
- cp _balkanmodule.so $(PYTHONLIBDIR)
+ mkdir -p $(DESTDIR)/$(PYTHONLIBDIR)
+ cp _balkanmodule.so $(DESTDIR)/$(PYTHONLIBDIR)
diff --git a/gnome-map/Makefile b/gnome-map/Makefile
index b7e3bcc0e..b9da1d714 100644
--- a/gnome-map/Makefile
+++ b/gnome-map/Makefile
@@ -1,12 +1,15 @@
+include ../Makefile.inc
+
all: gglobe-canvas timezonemapmodule.so
CFLAGS=-g -Wall -fPIC `gnome-config --cflags gnomeui` -I/usr/include/python1.5
LDFLAGS=`gnome-config --libs gnomeui`
install: timezonemapmodule.so
- cp -a timezonemapmodule.so $(DESTDIR)/usr/lib/python1.5/site-packages
- mkdir -p $(DESTDIR)/usr/share/anaconda
- cp -a map480.png $(DESTDIR)/usr/share/anaconda
+ mkdir -p $(DESTDIR)/$(PYTHONLIBDIR)
+ cp -a timezonemapmodule.so $(DESTDIR)/$(PYTHONLIBDIR)
+ mkdir -p $(DESTDIR)/$(ANACONDADATADIR)/pixmaps
+ cp -a map480.png $(DESTDIR)/$(ANACONDADATADIR)/pixmaps
gglobe-canvas: gglobe-canvas.c gnome-map.o gnome-canvas-dot.o gglobe-canvas.o gnome-map.h timezones.o timezones.h
gcc -O2 -g -o gglobe-canvas gnome-map.o timezones.o gnome-canvas-dot.o gglobe-canvas.o $(LDFLAGS)
diff --git a/isys/Makefile b/isys/Makefile
index cc5ef20fc..5f042e567 100644
--- a/isys/Makefile
+++ b/isys/Makefile
@@ -1,3 +1,5 @@
+include ../Makefile.inc
+
ARCH := $(patsubst i%86,i386,$(shell uname -m))
ARCH := $(patsubst sparc%,sparc,$(ARCH))
CFLAGS = -I/usr/include/python1.5 -I.. -g
@@ -7,7 +9,7 @@ STATICOBJS = otherinsmod.o
STATICLIBS = ../kudzu/kudzumodule.so
LOADLIBES = -lrpm -lbz2 -lresolv -lz -lpci -lpopt
SUBDIRS = modutils pci
-PYTHONLIBDIR = $(DESTDIR)/usr/lib/python1.5/site-packages
+#PYTHONLIBDIR = $(DESTDIR)/Pusr/lib/python1.5/site-packages
PYMODULES = _isys.so
ifeq ($(ARCH),sparc)
@@ -29,7 +31,7 @@ clean:
for d in $(SUBDIRS); do make TOPDIR=../$(TOPDIR) -C $$d clean; done
install: all
- cp $(PYMODULES) isys.py $(PYTHONLIBDIR)
+ cp $(PYMODULES) isys.py $(DESTDIR)/$(PYTHONLIBDIR)
subdirs:
for d in $(SUBDIRS); do make TOPDIR=../$(TOPDIR) -C $$d; done
diff --git a/iw/Makefile b/iw/Makefile
index dbf50e11c..95f6785e2 100644
--- a/iw/Makefile
+++ b/iw/Makefile
@@ -1,7 +1,9 @@
+include ../Makefile.inc
+
all:
echo "nothing to make"
install:
- mkdir -p $(DESTDIR)/usr/lib/python1.5/site-packages/iw
- cp -a *.py $(DESTDIR)/usr/lib/python1.5/site-packages/iw
- ../py-compile --basedir $(DESTDIR)/usr/lib/python1.5/site-packages/iw $(DESTDIR)/usr/lib/python1.5/site-packages/iw/*.py
+ mkdir -p $(DESTDIR)/$(PYTHONLIBDIR)/iw
+ cp -a *.py $(DESTDIR)/$(PYTHONLIBDIR)/iw
+ ../py-compile --basedir $(DESTDIR)/$(PYTHONLIBDIR)/iw $(DESTDIR)/$(PYTHONLIBDIR)/iw/*.py
diff --git a/pixmaps/Makefile b/pixmaps/Makefile
index 6959a30f7..2aa15033d 100644
--- a/pixmaps/Makefile
+++ b/pixmaps/Makefile
@@ -1,6 +1,8 @@
+include ../Makefile.inc
+
all:
@echo "nothing to do"
install:
- mkdir -p $(DESTDIR)/usr/share/anaconda/pixmaps
- cp -a *.png $(DESTDIR)/usr/share/anaconda/pixmaps
+ mkdir -p $(DESTDIR)/$(ANACONDADATADIR)/pixmaps
+ cp -a *.png $(DESTDIR)/$(ANACONDADATADIR)/pixmaps
diff --git a/rpmmodule/Makefile b/rpmmodule/Makefile
index 78172e14a..b1125ac6d 100644
--- a/rpmmodule/Makefile
+++ b/rpmmodule/Makefile
@@ -3,7 +3,9 @@
#
# $Id$
-PYTHON = $(DESTDIR)/usr/lib/python1.5/site-packages
+include ../Makefile.inc
+
+PYTHON = $(DESTDIR)/$(PYTHONLIBDIR)
CC = gcc
diff --git a/textw/Makefile b/textw/Makefile
index 55c8aecb7..2ac4f5eb6 100644
--- a/textw/Makefile
+++ b/textw/Makefile
@@ -1,7 +1,9 @@
+include ../Makefile.inc
+
all:
echo "nothing to make"
install:
- mkdir -p $(DESTDIR)/usr/lib/python1.5/site-packages/textw
- cp -a *.py $(DESTDIR)/usr/lib/python1.5/site-packages/textw
- ../py-compile --basedir $(DESTDIR)/usr/lib/python1.5/site-packages/textw $(DESTDIR)/usr/lib/python1.5/site-packages/textw/*.py
+ mkdir -p $(DESTDIR)/$(PYTHONLIBDIR)/textw
+ cp -a *.py $(DESTDIR)/$(PYTHONLIBDIR)/textw
+ ../py-compile --basedir $(DESTDIR)/$(PYTHONLIBDIR)/textw $(DESTDIR)/$(PYTHONLIBDIR)/textw/*.py