diff options
-rw-r--r-- | libre/debootstrap/PKGBUILD | 88 | ||||
-rw-r--r-- | libre/debootstrap/arch-detect.patch | 17 | ||||
-rw-r--r-- | libre/debootstrap/debootstrap.8 | 198 | ||||
-rw-r--r-- | libre/debootstrap/gnewsense (renamed from pcr/debootstrap/gnewsense) | 0 | ||||
-rw-r--r-- | libre/debootstrap/trisquel (renamed from pcr/debootstrap/trisquel) | 0 | ||||
-rw-r--r-- | pcr/debootstrap/PKGBUILD | 66 | ||||
-rw-r--r-- | pcr/debootstrap/debootstrap.8.gz | bin | 2580 -> 0 bytes | |||
-rw-r--r-- | pcr/debootstrap/debootstrap.install | 14 |
8 files changed, 303 insertions, 80 deletions
diff --git a/libre/debootstrap/PKGBUILD b/libre/debootstrap/PKGBUILD new file mode 100644 index 000000000..679820cf9 --- /dev/null +++ b/libre/debootstrap/PKGBUILD @@ -0,0 +1,88 @@ +# $Id: PKGBUILD 168492 2016-03-26 16:16:17Z fyan $ +# Maintainer (Arch): Felix Yan <felixonmars@archlinux.org> +# Maintainer: André Silva <emulatorman@parabola.nu> + +pkgname=debootstrap +pkgver=1.0.80 +pkgrel=1.parabola1 +pkgdesc="Bootstrap a basic gNewSense and Trisquel system, without Debian support" +arch=('any') +license=('GPL') +url="https://tracker.debian.org/pkg/debootstrap" +depends=('wget') +makedepends=('git' 'makedev') +replaces=(${pkgname}-libre) +conflicts=(${pkgname}-libre) +source=("git+https://anonscm.debian.org/git/d-i/debootstrap.git#tag=$pkgver" + arch-detect.patch + debootstrap.8 + gnewsense + trisquel) +md5sums=('SKIP' + '60043aaeb9afc1c2d7d2a2d9888eca35' + '654761198068b51b027d47cba4b7cfa2' + '13978bdd1d877a0dd2c3c874ecd54f03' + 'b020aa8426e70a6024c8e76312c17d78') + +prepare() { + cd debootstrap + + sed -i 's/sbin/bin/g' Makefile + + # gNewSense/Trisquel defaults + sed -i 's|export PATH|export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"|' debootstrap + + # Detect Architecture + patch -p1 -i ../arch-detect.patch + + # Workaround permission errors + # MAKEDEV is not happy with the instructions here + sed -e 's/install -o root -g root/install/' \ + -e '/chown 0:0 dev/d' \ + -e 's/(cd dev && $(MAKEDEV) std ptmx fd consoleonly)/$(MAKEDEV) -d dev std ptmx fd consoleonly/' \ + -i Makefile + + # Remove Debian files + rm -v debootstrap.8 + + # Add rebranded man + install -m644 ../debootstrap.8 . + + # Remove Debian scripts + rm -v scripts/* + + # Add gNewSense script + install -m644 $srcdir/gnewsense scripts + + # Add Trisquel script + install -m644 $srcdir/trisquel scripts + + # Enter to scripts dir + cd scripts + + # Create gNewSense symlinks + ln -s gnewsense parkes + + # Create Trisquel symlinks + ln -s trisquel awen + ln -s trisquel belenos + ln -s trisquel brigantia + ln -s trisquel dagda + ln -s trisquel dwyn + ln -s trisquel robur + ln -s trisquel slaine + ln -s trisquel taranis + ln -s trisquel toutatis +} + +build() { + cd debootstrap + fakeroot make +} + +package() { + cd debootstrap + make DESTDIR="$pkgdir" install + + install -Dm644 debootstrap.8 "$pkgdir"/usr/share/man/man8/debootstrap.8 +} diff --git a/libre/debootstrap/arch-detect.patch b/libre/debootstrap/arch-detect.patch new file mode 100644 index 000000000..8d2030ae6 --- /dev/null +++ b/libre/debootstrap/arch-detect.patch @@ -0,0 +1,17 @@ +--- a/debootstrap 2016-03-22 21:13:58.000000000 +0800 ++++ b/debootstrap 2016-03-22 21:13:09.573621800 +0800 +@@ -419,6 +419,14 @@ + HOST_ARCH=`/usr/bin/udpkg --print-architecture` + elif [ -e $DEBOOTSTRAP_DIR/arch ]; then + HOST_ARCH=`cat $DEBOOTSTRAP_DIR/arch` ++elif in_path pacman; then ++ CARCH="$(. /etc/makepkg.conf && echo $CARCH)" ++ case "$CARCH" in ++ "i686") HOST_ARCH="i386" ;; ++ "x86_64") HOST_ARCH="amd64" ;; ++ "armv7h") HOST_ARCH="armhf" ;; ++ *) echo "Unknown architecture: $CARCH" && exit 1 ++ esac + fi + HOST_OS="$HOST_ARCH" + # basic host OS guessing for non-Debian systems diff --git a/libre/debootstrap/debootstrap.8 b/libre/debootstrap/debootstrap.8 new file mode 100644 index 000000000..f44366474 --- /dev/null +++ b/libre/debootstrap/debootstrap.8 @@ -0,0 +1,198 @@ +.TH DEBOOTSTRAP 8 +.SH NAME +debootstrap \- Bootstrap a basic gNewSense or Trisquel system +.SH SYNOPSIS +.B debootstrap +.RB [ OPTION\&.\&.\&. ] +.I SUITE TARGET +.RI [ MIRROR +.RI [ SCRIPT ]] + +.B debootstrap +.RB [ OPTION\&.\&.\&. ] +\-\-second\-stage +.SH DESCRIPTION +.B debootstrap +bootstraps a basic gNewSense or Trisquel system of +.I SUITE +into +.I TARGET +from +.I MIRROR +by running +.IR SCRIPT . +.I MIRROR +can be an http:// or https:// URL, a file:/// URL, or an ssh:/// URL. +.PP +The +.I SUITE +may be a release code name (eg, gnewsense, trisquel) +or a symbolic name (eg, parkes, toutatis, belenos) +.PP +Notice that file:/ URLs are translated to file:/// (correct scheme as +described in RFC1738 for local filenames), and file:// will \fBnot\fR work. +ssh://USER@HOST/PATH URLs are retrieved using +.BR scp ; +use of +.B ssh\-agent +or similar is strongly recommended. +.PP +\fBDebootstrap\fR can be used to install gNewSense or Trisquel in a system without using an +installation disk but can also be used to run a different gNewSense or Trisquel flavor in a \fBchroot\fR +environment. +This way you can create a full (minimal) gNewSense or Trisquel installation which +can be used for testing purposes (see the \fBEXAMPLES\fR section). +If you are looking for a chroot system to build packages please take a look at +\fBpbuilder\fR. +.SH "OPTIONS" +.PP +.IP "\fB\-\-arch=ARCH\fP" +Set the target architecture (use if dpkg isn't installed). +See also \-\-foreign. +.IP +.IP "\fB\-\-include=alpha,beta\fP" +Comma separated list of packages which will be added to download and extract +lists. +.IP +.IP "\fB\-\-exclude=alpha,beta\fP" +Comma separated list of packages which will be removed from download and +extract lists. +WARNING: you can and probably will exclude essential packages, be +careful using this option. +.IP +.IP "\fB\-\-components=alpha,beta\fP" +Use packages from the listed components of the archive. +.IP +.IP "\fB\-\-no\-resolve\-deps\fP" +By default, debootstrap will attempt to automatically resolve any missing +dependencies, warning if any are found. +Note that this is not a complete dependency resolve in the sense of dpkg +or apt, and that it is far better to specify the entire base system than +rely on this option. +With this option set, this behaviour is disabled. +.IP +.IP "\fB\-\-variant=minbase|buildd|fakechroot|scratchbox\fP" +Name of the bootstrap script variant to use. +Currently, the variants supported are minbase, which only includes +essential packages and apt; buildd, which installs the build-essential +packages into +.IR TARGET ; +and fakechroot, which installs the packages without root privileges. +Finally there is variant scratchbox, which is for creating targets +for scratchbox usage. +The default, with no \fB\-\-variant=X\fP argument, is to create a base +gNewSense or Trisquel installation in +.IR TARGET . +.IP +.IP "\fB\-\-keyring=KEYRING\fP" +Override the default keyring for the distribution being bootstrapped, +and use +.IR KEYRING +to check signatures of retrieved Release files. +.IP +.IP "\fB\-\-no-check-gpg\fP" +Disables checking gpg signatures of retrieved Release files. +.IP +.IP "\fB\-\-verbose\fP" +Produce more info about downloading. +.IP +.IP "\fB\-\-print\-debs\fP" +Print the packages to be installed, and exit. +Note that a TARGET directory must be specified so debootstrap can +download Packages files to determine which packages should be installed, +and to resolve dependencies. +The TARGET directory will be deleted unless \-\-keep\-debootstrap\-dir +is specified. +.IP +.IP "\fB\-\-download\-only\fP" +Download packages, but don't perform installation. +.IP +.IP "\fB\-\-foreign\fP" +Do the initial unpack phase of bootstrapping only, for example if the +target architecture does not match the host architecture. +A copy of debootstrap sufficient for completing the bootstrap process +will be installed as /debootstrap/debootstrap in the target filesystem. +You can run it with the \fB\-\-second\-stage\fP option to complete the +bootstrapping process. +.IP +.IP "\fB\-\-second\-stage\fP" +Complete the bootstrapping process. +Other arguments are generally not needed. +.IP +.IP "\fB\-\-second\-stage\-target=DIR\fP" +Run second stage in a subdirectory instead of root. (can be used to create +a foreign chroot) (requires \-\-second\-stage) +.IP +.IP "\fB\-\-keep\-debootstrap\-dir\fP" +Don't delete the /debootstrap directory in the target after completing the +installation. +.IP +.IP "\fB\-\-unpack\-tarball=FILE\fP" +Acquire .debs from tarball FILE instead of downloading via http. +.IP +.IP "\fB\-\-make\-tarball=FILE\fP" +Instead of bootstrapping, make a tarball (written to FILE) of the downloaded +packages. +The resulting tarball may be passed to a later +.BR \-\-unpack\-tarball . +.IP +.IP "\fB\-\-debian\-installer\fP" +Used for internal purposes by the debian-installer +.IP +.IP "\fB\-\-extractor=TYPE\fP" +Override automatic .deb extractor selection to +.IR TYPE . +Supported extractors are: dpkg-deb and ar. +.IP +.IP "\fB\-\-no\-check\-certificate\fP" +Do not check certificate against certificate authorities +.IP +.IP "\fB\-\-certificate=FILE\fP" +Use the client certificate stored in file (PEM) +.IP +.IP "\fB\-\-private\-key=FILE\fP" +Read the private key from file + +.SH EXAMPLES +. +.PP +To setup a \fIparkes\fR system: +.PP + debootstrap parkes ./parkes-chroot http://archive.gnewsense.org/gnewsense-three/gnewsense +.PP + debootstrap parkes ./parkes-chroot file:///LOCAL_MIRROR/gnewsense +.PP +To setup a \fItoutatis\fR system: +.PP + debootstrap toutatis ./toutatis-chroot http://archive.trisquel.info/trisquel +.PP + debootstrap toutatis ./toutatis-chroot file:///LOCAL_MIRROR/trisquel +.PP +Full process to create a complete gNewSense installation of \fIparkes\fR +in a chroot: +.PP + main # debootstrap parkes parkes-root http://archive.gnewsense.org/gnewsense-three/gnewsense + [ ... watch it download the whole system ] + main # echo "proc parkes-root/proc proc defaults 0 0" >> /etc/fstab + main # mount proc parkes-root/proc -t proc + main # echo "sysfs parkes-root/sys sysfs defaults 0 0" >> /etc/fstab + main # mount sysfs parkes-root/sys -t sysfs + main # cp /etc/hosts parkes-root/etc/hosts + main # chroot parkes-root /bin/bash +.PP +Full process to create a complete Trisquel installation of \fItoutatis\fR +in a chroot: +.PP + main # debootstrap toutatis toutatis-root http://archive.trisquel.info/trisquel + [ ... watch it download the whole system ] + main # echo "proc toutatis-root/proc proc defaults 0 0" >> /etc/fstab + main # mount proc toutatis-root/proc -t proc + main # echo "sysfs toutatis-root/sys sysfs defaults 0 0" >> /etc/fstab + main # mount sysfs toutatis-root/sys -t sysfs + main # cp /etc/hosts toutatis-root/etc/hosts + main # chroot toutatis-root /bin/bash +.SH AUTHOR +.B debootstrap +was written by Anthony Towns <ajt@debian.org>. +This manpage was written by Matt Kraai <kraai@debian.org>. +gNewSense and Trisquel rebranding was written by André Silva <emulatorman@parabola.nu>. diff --git a/pcr/debootstrap/gnewsense b/libre/debootstrap/gnewsense index 884ac88a0..884ac88a0 100644 --- a/pcr/debootstrap/gnewsense +++ b/libre/debootstrap/gnewsense diff --git a/pcr/debootstrap/trisquel b/libre/debootstrap/trisquel index 7efa062f9..7efa062f9 100644 --- a/pcr/debootstrap/trisquel +++ b/libre/debootstrap/trisquel diff --git a/pcr/debootstrap/PKGBUILD b/pcr/debootstrap/PKGBUILD deleted file mode 100644 index 13d5db98d..000000000 --- a/pcr/debootstrap/PKGBUILD +++ /dev/null @@ -1,66 +0,0 @@ -# Maintainer: André Silva <emulatorman@parabola.nu> - -pkgname=debootstrap -pkgver=1.0.60 -pkgrel=1.parabola1 -pkgdesc="A tool used to create a gNewSense or Trisquel base system from scratch, without requiring the availability of dpkg or apt (Debian support removed)" -arch=('any') -license=('MIT') -url="http://packages.debian.org/sid/debootstrap" -depends=('wget') -replaces=(${pkgname}-libre) -conflicts=(${pkgname}-libre) -source=("http://ftp.debian.org/debian/pool/main/d/${pkgname}/${pkgname}_${pkgver}_all.deb" - "${pkgname}.8.gz" - 'gnewsense' - 'trisquel') -install="debootstrap.install" -md5sums=('c5d76a54d58e9567bda7958a7140bc30' - 'b565d089342b8a7ee35166b5d90825c7' - '13978bdd1d877a0dd2c3c874ecd54f03' - 'b020aa8426e70a6024c8e76312c17d78') - -package(){ - tar -xJf "${srcdir}/data.tar.xz" -C "${pkgdir}/" - # remove Debian files - rm -v "${pkgdir}/usr/share/doc/debootstrap"/{README,changelog.gz} - rm -v "${pkgdir}/usr/share/man/man8/debootstrap.8.gz" - # remove Debian scripts - rm -v "${pkgdir}/usr/share/debootstrap/scripts"/* - # move the executables to /usr/bin - mkdir -p ${pkgdir}/usr/bin - mv "${pkgdir}/usr/sbin"/* "${pkgdir}/usr/bin/" - rmdir "${pkgdir}/usr/sbin" - # patch the path to use gNewSense or Trisquel defaults (prevents error in chrooted environment) - sed -i 's|export PATH|export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/java/jre/bin:/usr/bin/vendor_perl:/usr/bin/core_perl"|' ${pkgdir}/usr/bin/debootstrap - # doesn't work with gpg 2.x, patch to point to gpg1v - sed 's/gpgv/gpg1v/g;' -i "${pkgdir}/usr/bin/debootstrap" "${pkgdir}/usr/share/debootstrap/functions" - - # add rebranded man - install -m644 ${pkgname}.8.gz "${pkgdir}/usr/share/man/man8" - - # move license to licenses folder - install -Dm644 "${pkgdir}/usr/share/doc/debootstrap/copyright" \ - "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - rm -rv "${pkgdir}/usr/share/doc" - - # add gNewSense script - install -m644 gnewsense "$pkgdir/usr/share/debootstrap/scripts" - - # create gNewSense symlinks - ln -s gnewsense "$pkgdir/usr/share/debootstrap/scripts/parkes" - - # add Trisquel script - install -m644 trisquel "$pkgdir/usr/share/debootstrap/scripts" - - # create Trisquel symlinks - ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/awen" - ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/belenos" - ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/brigantia" - ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/dagda" - ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/dwyn" - ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/robur" - ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/slaine" - ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/taranis" - ln -s trisquel "$pkgdir/usr/share/debootstrap/scripts/toutatis" -} diff --git a/pcr/debootstrap/debootstrap.8.gz b/pcr/debootstrap/debootstrap.8.gz Binary files differdeleted file mode 100644 index 07ec4808c..000000000 --- a/pcr/debootstrap/debootstrap.8.gz +++ /dev/null diff --git a/pcr/debootstrap/debootstrap.install b/pcr/debootstrap/debootstrap.install deleted file mode 100644 index 3da2f1d22..000000000 --- a/pcr/debootstrap/debootstrap.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - if [ "$(uname -m)" = "x86_64" ]; then - darch="amd64" - elif [ "$(uname -m)" = "i686" ]; then - darch="i386" - else - darch="mips64el" - fi - echo "$darch" > /usr/share/debootstrap/arch -} - -pre_remove() { - rm -f /usr/share/debootstrap/arch -} |