Browse Source

Now making successful debian source and binary package with new

set-up.  Pretty cool, if this package was an official package it would
use kernel-sources* package, but instead, I made some minor
modifications since I don't want to have to dl kernel sources
every time a compile is done, and kernel.org is still the definitive
place for the source.
master
freesource 22 years ago
parent
commit
187bd81bcd
  1. 13
      Makefile
  2. 7
      Makefile.pkg
  3. 22
      gbootroot_pkg
  4. 16
      pkg/dpkg/changelog
  5. 5
      pkg/dpkg/control
  6. 4
      pkg/dpkg/rules
  7. 3
      pkg/rpm/gbootroot-mdk.spec
  8. 3
      pkg/rpm/gbootroot.spec

13
Makefile

@ -5,24 +5,20 @@ install:
install -d /usr/bin
cp -fa gbootroot /usr/bin/gbootroot
install -d /usr/lib/bootroot
mkdir -f user-mode-linux/usr/bin
mkdir -f root_filesystem
cp -fa yard_chrooted_tests /usr/lib/bootroot/yard_chrooted_tests
cp -fa genext2fs/genext2fs /usr/lib/bootroot/genext2fs
cp -fa expect_uml /usr/lib/bootroot/expect_uml
install -d /usr/lib/bootroot/root_filesystem
chmod 0666 root_filesystem/root_fs_helper
cp -fa root_filesystem/root_fs_helper /usr/lib/bootroot/root_filesystem
cp -fa root_filesystem/Initrd.gz /usr/lib/bootroot/root_filesystem
cp -fa yard/scripts/make_debian /usr/bin/make_debian
install -d /usr/share/perl5/BootRoot
cp -fa BootRoot/*.pm /usr/share/perl5/BootRoot
install -d /usr/share/gbootroot/yard/Replacements
cp -fa yard/replacements/* /usr/share/gbootroot/yard/Replacements
install -d /usr/lib/bootroot/yard/Replacements/lib/modules
cp -fa user-mode-linux/usr/lib/uml/modules* /usr/lib/bootroot/yard/Replacements/lib/modules
cp -fa user-mode-linux/usr/lib/uml/config /usr/lib/bootroot/yard/Replacements/lib/modules
cp -fa user-mode-linux/usr/lib/uml/CVS /usr/lib/bootroot/yard/Replacements/lib/modules/CVS
install -d /usr/lib/uml
cp -fa user-mode-linux/usr/lib/uml/port-helper /usr/lib/uml/port-helper
install -d /usr/share/gbootroot/yard/templates
chmod 0444 yard/templates/*.yard
cp -fa yard/templates/Example* /usr/share/gbootroot/yard/templates
@ -32,11 +28,6 @@ install:
cp -fa genext2fs/genext2fs.c /usr/share/gbootroot/genext2fs
cp -fa genext2fs/Makefile /usr/share/gbootroot/genext2fs
cp -fa genext2fs/dev* /usr/share/gbootroot/genext2fs
cp -fa user-mode-linux/usr/bin/uml_* /usr/bin
chown 0:0 /usr/bin/uml_*
chmod 4755 /usr/bin/uml_net
cp -fa user-mode-linux/usr/bin/tunctl /usr/bin/tunctl
cp -fa user-mode-linux/usr/bin/linuxbr /usr/bin/linuxbr
install -d /etc/gbootroot
cp -fa gbootrootrc /etc/gbootroot/gbootrootrc
install -d /usr/X11R6/include/X11/pixmaps

7
Makefile.pkg

@ -56,15 +56,17 @@ sources: $(BASE_DIR)
while [ ! -f $(SOURCE_DIR)/$(PATCH_1) ] ; do \
wget -P $(SOURCE_DIR) --passive $(PATCH_1_SITE)/$(PATCH_1); \
done; \
if [ ! -d $(KERNEL_DIR) ] ; then \
fi;
@if [ ! -d $(KERNEL_DIR) ] ; then \
tar xvfj $(SOURCE_DIR)/$(KERNEL_SOURCE); \
fi; \
bzcat $(SOURCE_DIR)/$(PATCH_1) | patch -d $(KERNEL_DIR) -p1; \
patch -d $(KERNEL_DIR) -p1 < $(PATCH_2); \
perl -i -p -e "s/^ARCH :=.*/ARCH=um/g" $(KERNEL_DIR)/Makefile; \
fi;
kernel:
@if [ ! -f $(KERNEL_DIR)/.config ] ; then \
cp $(KCONFIG) $(KERNEL_DIR)/.config; \
@ -133,6 +135,7 @@ tools:
genext2fs: tools
@if [ ! -f $(GENEXT2_DIR)/genext2fs ] ; then \
$(MAKE) -C $(GENEXT2_DIR); \
strip -s $(GENEXT2_DIR)/genext2fs; \
fi;
clean:

22
gbootroot_pkg

@ -42,6 +42,15 @@ use File::Find;
# User defined variables for directories and package
# Makefile.pkg in $gbootroot_cvs in used as the packages Makefile.
# To get this to work properly I had to make two changes to the debian system
# In dpkg-buildpackage noclean=false was changed to noclean=true, this is
# to avoid the initial clean which is done, but if you turn noclean off with
# a cmdline switch only an build is done.
#
# In dpkg-source I added '.*bz2$| to $diff_ignore_default_regexp because the
# -i switch seemed to ignore anything I added to it, either failing
# or ignoring, though recognizing the -i switch .. so this has been altered.
my $user_home = "/home/mttrader";
my $prog = "gbootroot";
my $prog_real_name = "/BootRoot/BootRoot.pm";
@ -163,15 +172,21 @@ chdir($gbootroot_cvs) or die "Couldn't change to $gbootroot_cvs: $!\n";
foreach (@make_lines) {
s/\t//;
if (/cp/) {
if (/cp|mkdir/) {
my $dir = ((split))[2];
my $base;
if ($dir =~ m,/,) {
$base = dirname($dir);
home_builder("$packaging_place/$base");
}
if ( $_ =~ /cp/ ) {
system "cp -fa $dir $packaging_place/$base";
}
else {
system "install -d $packaging_place/$dir";
}
}
else {
if (!/mknod|dev/) {
## no need to do this
@ -313,8 +328,9 @@ if (!$stop) {
} # end if !$stop
system "debuild";
# dpkg-buildpackage .. no sense dl the sources
system "cp -fa $gbootroot_cvs/sources/*bz2 $packaging_place/sources/";
system "debuild -rfakeroot -i\`.*bz2$\` -k2DAB7037";
} # both or deb

16
pkg/dpkg/changelog

@ -1,3 +1,19 @@
gbootroot (1.4.0-1) unstable; urgency=low
* Had to add user-mode-linux/usr/lib/uml to the path to allow --home
to find port-helper, or otherwise root_fs complain. Have no idea
why this change exists with port-helper because wasn't the case
before. Also, added path for user-mode-linux/usr/bin to find the
other tools.
* When root_fs_helper was running with the newer Expect.pm, and
consequentially the newer uml kernel it became necessary to get out
when the kernel shuts down with a last function right when it says
"Power down."
* Checks for the proper version for newer libc6 linkers. Hopefully,
should work properly with libc6 > 2.3.1, too.
-- Jonathan Rosenbaum <freesource@users.sourceforge.net> Wed, 18 Dec 2002 02:26:53 -0500
gbootroot (1.3.6-1) unstable; urgency=low
* Updated to 2.4.18-2um and the latest uml tools 20020212, including

5
pkg/dpkg/control

@ -2,7 +2,7 @@ Source: gbootroot
Section: utils
Priority: optional
Maintainer: Jonathan Rosenbaum <freesource@users.sourceforge.net>
Build-Depends: debhelper (>> 3.0.0)
Build-Depends: debhelper (>> 3.0.0), binutils, fileutils (>= 4.0), gcc | c-compiler, make, libc-dev, bin86, wget
Standards-Version: 3.5.2
Package: gbootroot
@ -23,3 +23,6 @@ Description: Boot/Root Filesystem Distribution testing and creation.
.
deb http://prdownloads.sourceforge.net/gbootroot ./
deb http://prdownloads.sourceforge.net/avd ./
.
See manual for instructions on how to add lines to your sources.list so that
apt-get may be used for both binary and source packages.

4
pkg/dpkg/rules

@ -11,9 +11,8 @@ export DH_COMPAT=3
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
# Add here commands to configure the package.
touch configure-stamp
build: configure-stamp build-stamp
@ -33,6 +32,7 @@ clean:
# Add here commands to clean up after the build process.
-$(MAKE) clean
-$(MAKE) clean-sources
dh_clean

3
pkg/rpm/gbootroot-mdk.spec

@ -72,8 +72,9 @@ chown -R root:root .
%install
make
# nothing to clean
%clean
make clean
make clean-sources
# Update this as necessary

3
pkg/rpm/gbootroot.spec

@ -72,8 +72,9 @@ chown -R root:root .
%install
make
# nothing to clean
%clean
make clean
make clean-sources
# Update this as necessary

Loading…
Cancel
Save