Changeset 26839


Ignore:
Timestamp:
2011-05-06T20:16:05+02:00 (7 years ago)
Author:
luka
Message:

upgrade debootstrap package

Location:
packages/admin/debootstrap
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • packages/admin/debootstrap/Makefile

    r25923 r26839  
    11# 
    22# Copyright (C) 2010 Gianluigi Tiesi <sherpya@netfarm.it> 
     3# Copyright (C) 2011 OpenWrt.org 
    34# 
    45# This is free software, licensed under the GNU General Public License v2. 
     
    910 
    1011PKG_NAME:=debootstrap 
    11 PKG_VERSION:=1.0.28 
     12PKG_VERSION:=1.0.30 
    1213PKG_RELEASE:=1 
    1314 
    1415PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb 
    1516PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/debootstrap 
    16 PKG_MD5SUM:=dee0dc77573d88af80b225d8810ab7a1 
     17PKG_MD5SUM:=d87b35670aa735ae5b7d3f8bf1b76245 
    1718 
    18 #UNPACK_CMD=dpkg-deb --fsys-tarfile $(DL_DIR)/$(PKG_SOURCE) | ( cd $(1) && tar -xf - ) 
    1919UNPACK_CMD=ar -p "$(DL_DIR)/$(PKG_SOURCE)" data.tar.gz | ( cd $(1) && tar -xzf - ) 
    2020 
     
    2222 
    2323define Package/debootstrap 
    24         SECTION:=admin 
    25         CATEGORY:=Administration 
    26         TITLE:=Bootstrap a basic Debian system 
    27         URL:=http://wiki.debian.org/Debootstrap 
    28         DEPENDS:=+coreutils-chroot 
    29         MAINTAINER:=Gianluigi Tiesi <sherpya@netfarm.it> 
     24  SECTION:=admin 
     25  CATEGORY:=Administration 
     26  TITLE:=Bootstrap a basic Debian system 
     27  URL:=http://wiki.debian.org/Debootstrap 
     28  DEPENDS:=+coreutils-chroot +coreutils-sha1sum 
     29  MAINTAINER:=Luka Perkov <openwrt@lukaperkov.net> 
    3030endef 
    3131 
    3232define Package/debootstrap/description 
    33  debootstrap is used to create a Debian base system from scratch, 
    34  without requiring the availability of dpkg or apt. It does this by 
    35  downloading .deb files from a mirror site, and carefully unpacking them 
    36  into a directory which can eventually be chrooted into. 
     33 debootstrap is used to create a Debian base system from scratch, without 
     34 requiring the availability of dpkg or apt. It does this by downloading .deb 
     35 files from a mirror site, and carefully unpacking them into a directory which 
     36 can eventually be chrooted into.  
    3737endef 
    3838 
    3939define Build/Compile 
     40# file pkgdetails.c was imported from debian package base-installer version 1.119 
    4041        $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) ./files/pkgdetails.c -o $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails 
    4142endef 
    4243 
    4344define Package/debootstrap/install 
    44         cd $(PKG_BUILD_DIR) && ( $(FIND) usr | cpio -pd $(1) ) 
     45        $(INSTALL_DIR) $(1)/usr/sbin 
     46        $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin 
     47        $(INSTALL_DIR) $(1)/usr/share/debootstrap 
     48        $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails $(1)/usr/share/debootstrap 
     49        $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/functions $(1)/usr/share/debootstrap 
     50        $(INSTALL_DIR) $(1)/usr/share/debootstrap/scripts 
     51        $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/scripts/* $(1)/usr/share/debootstrap/scripts 
    4552endef 
    4653 
  • packages/admin/debootstrap/files/pkgdetails.c

    r21863 r26839  
    66#define MAX_LINE 1000 
    77#define MAX_PKGS 100 
     8 
     9char *checksum_field=NULL; 
    810 
    911static char *fieldcpy(char *dst, char *fld) { 
     
    8587    char cur_arch[MAX_LINE]; 
    8688    char cur_size[MAX_LINE]; 
    87     char cur_md5[MAX_LINE]; 
     89    char cur_checksum[MAX_LINE]; 
    8890    char cur_filename[MAX_LINE]; 
    8991    char *pkgs[MAX_PKGS]; 
     
    113115        } else if (strncasecmp(buf, "Size:", 5) == 0) { 
    114116            fieldcpy(cur_size, buf); 
    115         } else if (strncasecmp(buf, "MD5sum:", 7) == 0) { 
    116             fieldcpy(cur_md5, buf); 
     117        } else if (strncasecmp(buf, checksum_field, strlen(checksum_field)) == 0 
     118                   && buf[strlen(checksum_field)] == ':') { 
     119            fieldcpy(cur_checksum, buf); 
    117120        } else if (strncasecmp(buf, "Filename:", 9) == 0) { 
    118121            fieldcpy(cur_filename, buf); 
     
    123126                any = 1; 
    124127                if (strcmp(cur_field, pkgs[i]) == 0) { 
    125                     printf("%s %s %s %s %s %s %s\n", cur_pkg, cur_ver, cur_arch, mirror, cur_filename, cur_md5, cur_size); 
     128                    printf("%s %s %s %s %s %s %s\n", cur_pkg, cur_ver, cur_arch, mirror, cur_filename, cur_checksum, cur_size); 
    126129                    if (uniq) pkgs[i] = NULL; 
    127130                    break; 
     
    231234 
    232235int main(int argc, char *argv[]) { 
     236    checksum_field=getenv("DEBOOTSTRAP_CHECKSUM_FIELD"); 
     237    if (checksum_field == NULL) { 
     238        checksum_field="MD5sum"; 
     239    } 
     240 
    233241    if ((argc == 6 || argc == 5) && strcmp(argv[1], "WGET%") == 0) { 
    234242        if (dotranslatewgetpercent(atoi(argv[2]), atoi(argv[3]),  
Note: See TracChangeset for help on using the changeset viewer.