Hello,
I am trying to build the debian packages from the trunk version of
systemimager.
Here are some problems that i have encounterd:
- First the trunk version is 2.9.3. So i changed the debian/changelog
else we immediately get an error
- Second there is no manpage for si_installbtimage, debian/rules
mv $(CURDIR)/debian/$(PKG)-server/usr/share/man/man8/si_installbtimage.8.gz\
#$(CURDIR)/debian/$(PKG)-server-bittorrent/usr/share/man/man8
- The process of building the amd64
1) systemimager-boot-amd64-standard_3.9.2_all.deb
2) systemimager-initrd-template-amd64_3.9.2_all.deb
goes wrong because it tries to cd to amd64 directory. That is the
architecture for a debian packagem but the directory is named x86_64. I did
not rename the directory but i made an extra statement in debian/rules that
if architecture is amd64 then use COPY_ARCH=x86_64:
COPY_ARCH = $(shell if [ "${ARCH}" == "amd64" ]; then echo "x86_64"; else
echo ${ARCH}; fi)
So in the amd64 package the directories have the name x86_64. So we do have
to change a lot of scripts
I have attached the rules file that i use and worked for me ;-)
Also i changed all occurrences in debian/control file from x86_64 to amd64
else we also can not make the packages mentioned above
Regards
--
********************************************************************
* *
* Bas van der Vlies e-mail: [EMAIL PROTECTED] *
* SARA - Academic Computing Services phone: +31 20 592 8012 *
* Kruislaan 415 fax: +31 20 6683167 *
* 1098 SJ Amsterdam *
* *
********************************************************************
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PKG = systemimager
VERSION = $(shell dpkg-parsechangelog | grep ^Version: | \
cut -d " " -f 2)
BUILD_DIR = .
UPSTREAM_TARBALL = $(PKG)_$(VERSION).tar.gz
ARCH = $(shell dpkg --print-architecture)
# HvB
COPY_ARCH = $(shell if [ "${ARCH}" == "amd64" ]; then echo "x86_64"; else echo
${ARCH}; fi)
BOOTPKG = $(PKG)-boot-$(ARCH)-standard
INITRD_TEMPLATE_PKG = $(PKG)-initrd-template-$(ARCH)
# for debhelper; we can't just say -N$(BOOTPKG) because that'd cause us to
# build empty boot packages for the other archs
NON_BOOT_PKGS := -p $(PKG)-client \
-p $(PKG)-common \
-p $(PKG)-doc \
-p $(PKG)-server \
-p $(PKG)-server-flamethrowerd \
-p $(PKG)-server-bittorrent
BOOTARCHS = alpha i386 ia64 parisc ppc64-iSeries ppc64-ps3 ppc64 ppc64ydl ppc
x86_64
PATCHES=$(sort $(shell find $(CURDIR)/patches -name "*.patch"))
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
[EMAIL PROTECTED] -n "Extracting upstream tarball..."
[EMAIL PROTECTED] xfj $(UPSTREAM_TARBALL)
[EMAIL PROTECTED] "done."
[EMAIL PROTECTED] $(BUILD_DIR) && \
# $(foreach patch, $(PATCHES), \
# echo -n Applying `basename $(patch)`... && cat $(patch) | \
# patch -s -p1 && echo done. &&) /bin/true
touch configure-stamp
copy_changelog: $(BUILD_DIR)/changelog
$(BUILD_DIR)/changelog: $(BUILD_DIR)/CHANGE.LOG
cd $(BUILD_DIR) && cp CHANGE.LOG changelog
build: build-arch build-indep
build-indep: cleandeb configure-stamp build-indep-stamp copy_changelog
build-indep-stamp:
# the pdf build reports a failure, but the result looks fine...
-$(MAKE) -C $(BUILD_DIR) docs USE_SGMLTOOLS=1
touch build-indep-stamp
build-arch: cleandeb configure-stamp build-arch-stamp copy_changelog
build-arch-stamp:
dh_testdir
$(MAKE) -C $(BUILD_DIR) binaries MKCRAMFS=/usr/sbin/mkcramfs
touch build-arch-stamp
test: build-arch-stamp
debian/control: debian/control.in debian/control.arch.in
# generate control file suitable for the boot package
# substvars don't seem to work, so we hack around it with sed.
sed -e 's/$${misc\:Package\-Arch}/$(ARCH)/g' \
< debian/control.in > debian/control
for arch in $(BOOTARCHS); do \
sed -e "s/\$${misc\:Package\-Arch}/$$arch/g" \
debian/control.arch.in >> debian/control; \
done
clean:
dh_testdir
dh_testroot
rm -f build-indep-stamp build-arch-stamp configure-stamp
# Add here commands to clean up after the build process.
#rm -rf $(BUILD_DIR)
cd $(CURDIR)/debian && \
rm -rf $(PKG)-client $(PKG)-server $(PKG)-common $(PKG)-doc \
$(BOOTPKG) $(INITRD_TEMPLATE_PKG) \
$(PKG)-boot $(PKG)-server-flamethrowerd $(PKG)-server-bittorrent
rm -f debian/$(PKG)-server.init
rm -f debian/$(PKG)-server-flamethrowerd.init
rm -f debian/$(PKG)-server-bittorrent.init
dh_clean
install-arch: build-arch
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
cd $(CURDIR)/debian && mkdir -p $(BOOTPKG) $(INITRD_TEMPLATE_PKG)
# Add here commands to install the packages
$(MAKE) -C $(BUILD_DIR) install_binaries \
DESTDIR=$(CURDIR)/debian/$(BOOTPKG)
# Remove forbidden special files from $(BOOTPKG). This files will be
# added using the post-install deb script:
#
# systemimager-boot-$(ARCH)-standard.postinst
# HvB
cd
$(CURDIR)/debian/$(BOOTPKG)/usr/share/systemimager/boot/$(COPY_ARCH)/standard/initrd_template/dev
&& \
rm -f tty1 && \
rm -f tty2 && \
rm -f tty3 && \
rm -f tty4 && \
rm -f tty5 && \
rm -f tty6 && \
rm -f console && \
rm -f null
# Copy the needed files into the initrd_template package.
mkdir -p
$(CURDIR)/debian/$(INITRD_TEMPLATE_PKG)/usr/share/systemimager/boot/$(COPY_ARCH)/standard
mv
$(CURDIR)/debian/$(BOOTPKG)/usr/share/systemimager/boot/$(COPY_ARCH)/standard/initrd_template
\
$(CURDIR)/debian/$(INITRD_TEMPLATE_PKG)/usr/share/systemimager/boot/$(COPY_ARCH)/standard
install-indep: build-indep
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
cd $(CURDIR)/debian && mkdir -p $(PKG)-client \
$(PKG)-server $(PKG)-common $(PKG)-doc
# Add here commands to install the packages
$(MAKE) -C $(BUILD_DIR) install_client \
DESTDIR=$(CURDIR)/debian/$(PKG)-client
$(MAKE) -C $(BUILD_DIR) install_server \
DESTDIR=$(CURDIR)/debian/$(PKG)-server
# these are installed properly by dh_installinit later
rm -rf $(CURDIR)/debian/$(PKG)-server/etc/init.d
$(MAKE) -C $(BUILD_DIR) install_common \
DESTDIR=$(CURDIR)/debian/$(PKG)-common
# the pdf build reports a failure, but the result looks fine...
-$(MAKE) -C $(BUILD_DIR) install_docs \
DESTDIR=$(CURDIR)/debian/$(PKG)-doc USE_SGMLTOOLS=1
mkdir -p $(CURDIR)/debian/$(PKG)-server-flamethrowerd/etc/systemimager
mv $(CURDIR)/debian/$(PKG)-server/etc/systemimager/flamethrower.conf \
$(CURDIR)/debian/$(PKG)-server-flamethrowerd/etc/systemimager/
# prepare the bittorrent package
mkdir -p $(CURDIR)/debian/$(PKG)-server-bittorrent/etc/init.d
mkdir -p $(CURDIR)/debian/$(PKG)-server-bittorrent/etc/systemimager
mkdir -p $(CURDIR)/debian/$(PKG)-server-bittorrent/usr/sbin
mkdir -p
$(CURDIR)/debian/$(PKG)-server-bittorrent/var/lib/systemimager/tarballs
mkdir -p
$(CURDIR)/debian/$(PKG)-server-bittorrent/var/lib/systemimager/torrents
mkdir -p $(CURDIR)/debian/$(PKG)-server-bittorrent/usr/share/man/man8
mv $(CURDIR)/debian/$(PKG)-server/etc/systemimager/bittorrent.conf \
$(CURDIR)/debian/$(PKG)-server-bittorrent/etc/systemimager
mv $(CURDIR)/debian/$(PKG)-server/usr/sbin/si_installbtimage \
$(CURDIR)/debian/$(PKG)-server-bittorrent/usr/sbin
# HvB
#mv
$(CURDIR)/debian/$(PKG)-server/usr/share/man/man8/si_installbtimage.8.gz \
# $(CURDIR)/debian/$(PKG)-server-bittorrent/usr/share/man/man8
# Build architecture-dependent files here.
binary-arch: build-arch install-arch
dh_testdir -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_testroot -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_installdocs -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_installchangelogs -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_link -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_strip -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_compress -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_fixperms -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_installdeb -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_perl -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_gencontrol -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_md5sums -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
dh_builddeb -p$(BOOTPKG) -p$(INITRD_TEMPLATE_PKG)
# Build architecture-independent files here.
binary-indep: build-indep install-indep
dh_testdir $(NON_BOOT_PKGS)
dh_testroot $(NON_BOOT_PKGS)
# dh_installdebconf
dh_installdocs $(NON_BOOT_PKGS)
dh_installexamples -p$(PKG)-server $(BUILD_DIR)/doc/examples/*
cp $(BUILD_DIR)/etc/init.d/$(PKG)-server-rsyncd \
./debian/$(PKG)-server.init
dh_installinit --no-start -p$(PKG)-server
--init-script=$(PKG)-server-rsyncd
cp $(BUILD_DIR)/etc/init.d/$(PKG)-server-netbootmond \
./debian/$(PKG)-server.init
dh_installinit --no-start -p$(PKG)-server
--init-script=$(PKG)-server-netbootmond
cp $(BUILD_DIR)/etc/init.d/$(PKG)-server-monitord \
./debian/$(PKG)-server.init
dh_installinit --no-start -p$(PKG)-server
--init-script=$(PKG)-server-monitord
cp $(BUILD_DIR)/etc/init.d/$(PKG)-server-flamethrowerd \
./debian/$(PKG)-server-flamethrowerd.init
dh_installinit --no-start -p$(PKG)-server-flamethrowerd \
--init-script=$(PKG)-server-flamethrowerd
cp $(BUILD_DIR)/etc/init.d/$(PKG)-server-bittorrent \
./debian/$(PKG)-server-bittorrent.init
dh_installinit --no-start -p$(PKG)-server-bittorrent \
--init-script=$(PKG)-server-bittorrent
dh_installchangelogs $(NON_BOOT_PKGS)
dh_link $(NON_BOOT_PKGS)
dh_strip $(NON_BOOT_PKGS)
dh_compress $(NON_BOOT_PKGS)
dh_fixperms $(NON_BOOT_PKGS)
dh_installdeb $(NON_BOOT_PKGS)
dh_perl $(NON_BOOT_PKGS)
dh_shlibdeps $(NON_BOOT_PKGS)
dh_gencontrol $(NON_BOOT_PKGS)
dh_md5sums $(NON_BOOT_PKGS)
dh_builddeb $(NON_BOOT_PKGS)
binary: binary-indep binary-arch
.PHONY: build cleandeb clean binary-indep binary-arch binary install configure
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users