diff --git a/debootstrap/debootstrap-1.0.19-devices.patch b/debootstrap/debootstrap-1.0.19-devices.patch new file mode 100644 index 0000000..5e20238 --- /dev/null +++ b/debootstrap/debootstrap-1.0.19-devices.patch @@ -0,0 +1,13 @@ +diff -ur debootstrap.orig/Makefile debootstrap/Makefile +--- debootstrap.orig/Makefile 2009-09-21 11:23:11.000000000 -0400 ++++ debootstrap/Makefile 2009-09-30 15:01:01.899945579 -0400 +@@ -40,6 +40,8 @@ + mkdir -p dev + chown 0:0 dev + chmod 755 dev +- (cd dev && $(MAKEDEV) std ptmx fd consoleonly) ++ $(MAKEDEV) -d dev std ptmx fd ++ $(MAKEDEV) -d dev -x console ++ mknod dev/console c 5 1 + tar cf - dev | gzip -9 >devices.tar.gz + rm -rf dev diff --git a/debootstrap/debootstrap-1.0.19-perms.patch b/debootstrap/debootstrap-1.0.19-perms.patch new file mode 100644 index 0000000..e977197 --- /dev/null +++ b/debootstrap/debootstrap-1.0.19-perms.patch @@ -0,0 +1,28 @@ +diff -ur debootstrap.orig/Makefile debootstrap/Makefile +--- debootstrap.orig/Makefile 2009-09-21 11:23:11.000000000 -0400 ++++ debootstrap/Makefile 2009-09-30 13:01:27.151069252 -0400 +@@ -13,9 +13,9 @@ + mkdir -p $(DSDIR)/scripts + mkdir -p $(DESTDIR)/usr/sbin + +- install -o root -g root -m 0644 scripts/debian/* $(DSDIR)/scripts/ +- install -o root -g root -m 0644 scripts/ubuntu/* $(DSDIR)/scripts/ +- install -o root -g root -m 0644 functions $(DSDIR)/ ++ install -m 0644 scripts/debian/* $(DSDIR)/scripts/ ++ install -m 0644 scripts/ubuntu/* $(DSDIR)/scripts/ ++ install -m 0644 functions $(DSDIR)/ + + # no special script for etch anymore + ln -s sid $(DSDIR)/scripts/etch +@@ -30,10 +30,9 @@ + ln -s gutsy $(DSDIR)/scripts/lucid + + sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)/usr/sbin/debootstrap +- chown root:root $(DESTDIR)/usr/sbin/debootstrap + chmod 0755 $(DESTDIR)/usr/sbin/debootstrap + +- install -o root -g root -m 0644 devices.tar.gz $(DSDIR)/ ++ install -m 0644 devices.tar.gz $(DSDIR)/ + + devices.tar.gz: + rm -rf dev diff --git a/debootstrap/debootstrap.spec b/debootstrap/debootstrap.spec new file mode 100644 index 0000000..b5ba7a5 --- /dev/null +++ b/debootstrap/debootstrap.spec @@ -0,0 +1,110 @@ +Name: debootstrap +Version: 1.0.19 +Release: 2%{?dist} +Summary: Debian GNU/Linux bootstrapper + +Group: System Environment/Base +License: MIT +URL: http://code.erisian.com.au/Wiki/debootstrap +Source0: http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_%{version}.tar.gz +Patch0: debootstrap-1.0.19-devices.patch +Patch1: debootstrap-1.0.19-perms.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +BuildRequires: fakeroot, MAKEDEV +Requires: gettext, wget, tar, gzip, binutils + + +%description +debootstrap is used to create a Debian base system from scratch, without +requiring the availability of dpkg or apt. It does this by downloading +.deb files from a mirror site, and carefully unpacking them into a +directory which can eventually be chrooted into. + +This might be often useful coupled with virtualization techniques to run +Debian GNU/Linux guest system. + + +%prep +%setup -q -n %{name} +%patch0 -p1 -b .devices +%patch1 -p1 -b .perms + + +%build +# in Makefile, path is hardcoded, modify it to take rpm macros into account +sed -i -e 's;/usr/sbin;%{_sbindir};' Makefile + +# _smp_mflags would make no sense at all +fakeroot make + + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT%{_datadir}/debootstrap/scripts/ +install -d $RPM_BUILD_ROOT%{_sbindir} +install -d $RPM_BUILD_ROOT%{_mandir}/man8 +install -p -m 0644 debootstrap.8 $RPM_BUILD_ROOT%{_mandir}/man8 +make install DESTDIR=$RPM_BUILD_ROOT \ + VERSION="%{version}-%{release}" \ + DSDIR=$RPM_BUILD_ROOT%{_datadir}/debootstrap +# substitute the rpm macro path +sed -i -e 's;/usr/share;%{_datadir};' $RPM_BUILD_ROOT%{_sbindir}/debootstrap +# correct the debootstrap script timestamp +touch -r debootstrap $RPM_BUILD_ROOT%{_sbindir}/debootstrap + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%{_datadir}/debootstrap +%{_sbindir}/debootstrap +%{_mandir}/man8/debootstrap.8* +%doc debian/changelog debian/copyright debian/README.Debian + + +%changelog +* Wed Sep 30 2009 Adam Goode - 1.0.19-2 +- Make sure to create /dev/console in devices.tar.gz + +* Wed Sep 30 2009 Adam Goode - 1.0.19-1 +- New upstream release + + Many bugfixes + + Support for new distributions +- Arch patch no longer needed +- Rebase other patches + +* Fri Jul 24 2009 Fedora Release Engineering - 1.0.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 1.0.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Jul 15 2008 Lubomir Rintel - 1.0.10-1 +- New upstream version + +* Sun Jun 15 2008 Adam Goode - 1.0.9-1 +- 1.0.9 + +* Fri Feb 22 2008 Lubomir Kundrak - 1.0.8-1 +- 1.0.8 + +* Sun Nov 18 2007 Patrice Dumas 1.0.7-2 +- keep timestamps +- use rpm macros instead of hardcoded paths + +* Sat Nov 17 2007 Lubomir Kundrak 1.0.7-1 +- Version bump + +* Thu Nov 15 2007 Lubomir Kundrak 1.0.3-2 +- Some more fixes, thanks to Patrice Dumas (#329291) + +* Fri Oct 12 2007 Lubomir Kundrak 1.0.3-1 +- Incorporating advises from Patrice Dumas (#329291) in account + +* Fri Oct 12 2007 Lubomir Kundrak 0.3.3.2etch1-1 +- Initial package diff --git a/debootstrap/debootstrap_1.0.19.tar.gz b/debootstrap/debootstrap_1.0.19.tar.gz new file mode 100644 index 0000000..b1a66d5 Binary files /dev/null and b/debootstrap/debootstrap_1.0.19.tar.gz differ diff --git a/debootstrap/make_deb.sh b/debootstrap/make_deb.sh new file mode 100755 index 0000000..46abebe --- /dev/null +++ b/debootstrap/make_deb.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +tar xvfz debootstrap_1.0.19.tar.gz +cd debootstrap +dpkg-buildpackage +cd - +rm -rf debootstrap