adjust further for GNU Linux-libre 6.7.11-gnu
[releases.git] / deblob-3.2
index 534c2742a533f9c55dce4f006ecac0d2ba59294e..799e6445017c767bebcf06bf33a1a848d0b8583b 100755 (executable)
@@ -1,10 +1,13 @@
 #!/bin/sh
 
-#    Copyright (C) 2008, 2009, 2010, 2011, 2012
-#      Alexandre Oliva <lxoliva@fsfla.org>
+#    Copyright (C) 2008-2013 Alexandre Oliva <lxoliva@fsfla.org>
 #    Copyright (C) 2008 Jeff Moe
 #    Copyright (C) 2009 Rubén Rodríguez <ruben@gnu.org>
 #
+#    This program is part of GNU Linux-libre, a GNU project that
+#    publishes scripts to clean up Linux so as to make it suitable for
+#    use in the GNU Project and in Free System Distributions.
+#
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
 #    the Free Software Foundation; either version 2 of the License, or
@@ -45,7 +48,7 @@
 
 # For each kver release, start extra with an empty string, then count
 # from 1 if changes are needed that require rebuilding the tarball.
-kver=3.2 extra=
+kver=3.2 extra=1
 
 case $1 in
 --force)
@@ -77,6 +80,7 @@ if [ ! -f $check ] ; then
   have_check=false
 else
   have_check=:
+  [ -x $check ] || check="/bin/sh $check"
 fi
 
 filetest () {
@@ -113,7 +117,13 @@ clean_blob () {
     name=$1
     set fnord "$@" -d
     shift 2
-    $check "$@" -i linux-$kver $name > $name.deblob
+    if $check "$@" -i linux-$kver $name > $name.deblob; then
+      if [ ! -s $name.deblob ]; then
+       die got an empty file after removing blobs from $name
+      fi
+    else
+      die failed removing blobs from $name
+    fi
     check_changed $name && echo $name: removed blobs
   else
     clean_file $1
@@ -235,8 +245,6 @@ undefault_firmware () {
 # corresponding sources are present.
 
 for f in \
-  drivers/char/ser_a2232fw.h \
-    drivers/char/ser_a2232fw.ax \
   drivers/gpu/drm/nouveau/nva3_copy.fuc.h \
     drivers/gpu/drm/nouveau/nva3_copy.fuc \
   drivers/gpu/drm/nouveau/nvc0_copy.fuc.h \
@@ -245,24 +253,18 @@ for f in \
     drivers/gpu/drm/nouveau/nvc0_grgpc.fuc \
   drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h \
     drivers/gpu/drm/nouveau/nvc0_grhub.fuc \
-  drivers/net/ixp2000/ixp2400_rx.ucode \
-    drivers/net/ixp2000/ixp2400_rx.uc \
-  drivers/net/ixp2000/ixp2400_tx.ucode \
-    drivers/net/ixp2000/ixp2400_rx.uc \
   drivers/net/wan/wanxlfw.inc_shipped \
     drivers/net/wan/wanxlfw.S \
   drivers/net/wireless/atmel.c \
     drivers/net/wireless/atmel.c \
-  drivers/scsi/53c700_d.h_shipped \
-    drivers/scsi/53c700.scr \
   drivers/scsi/aic7xxx/aic79xx_seq.h_shipped \
     drivers/scsi/aic7xxx/aic79xx.seq \
   drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped \
     drivers/scsi/aic7xxx/aic7xxx.seq \
   drivers/scsi/aic7xxx_old/aic7xxx_seq.c \
     drivers/scsi/aic7xxx_old/aic7xxx.seq \
-  drivers/scsi/53c7xx_d.h_shipped \
-    drivers/scsi/53c7xx.scr \
+  drivers/scsi/53c700_d.h_shipped \
+    drivers/scsi/53c700.scr \
   drivers/scsi/sym53c8xx_2/sym_fw1.h \
     drivers/scsi/sym53c8xx_2/sym_fw1.h \
   drivers/scsi/sym53c8xx_2/sym_fw2.h \
@@ -278,25 +280,23 @@ for f in \
   firmware/isci/isci_firmware.bin.ihex \
     drivers/scsi/isci/firmware/create_fw.c \
 ; do
-  if test ! $f; then
-    die $f is not present, something is amiss && return
-  fi
+  filetest $f
 done
 
 # Identify the tarball.
-grep -q 'EXTRAVERSION.*-libre' Makefile ||
-clean_sed "s,^EXTRAVERSION.*,&-libre$extra,
-" Makefile 'added -libre to EXTRAVERSION'
+grep -q 'EXTRAVERSION.*-gnu' Makefile ||
+clean_sed "s,^EXTRAVERSION.*,&-gnu$extra,
+" Makefile 'added -gnu to EXTRAVERSION'
 
 grep -q Linux-libre README ||
 clean_sed '
-1,3 s,Linux kernel release.*kernel\.org.*,Linux-libre <http://linux-libre.fsfla.org>,
-2,5 s,Linux version [0-9.]*,Linux-libre,
+1,3 s,Linux kernel release.*kernel\.org.*,GNU Linux-libre <http://linux-libre.fsfla.org>,
+2,5 s,Linux version [0-9.]*,GNU Linux-libre,
 1,20 s,\(operating system \)\?Unix,Unix kernel,
 /WHAT IS LINUX/i\
-WHAT IS Linux-libre?\
+WHAT IS GNU Linux-libre?\
 \
-  Linux-libre is a Free version of the kernel Linux (see below),\
+  GNU Linux-libre is a Free version of the kernel Linux (see below),\
   suitable for use with the GNU Operating System in 100% Free\
   GNU/Linux-libre System Distributions.\
   http://www.gnu.org/distros/\
@@ -310,21 +310,22 @@ WHAT IS Linux-libre?\
 \
   Linux-libre started within the gNewSense GNU/Linux distribution.\
   It was later adopted by Jeff Moe, who coined its name, and in 2008\
-  it became a project maintained by FSF Latin America.\
+  it became a project maintained by FSF Latin America.  In 2012, it\
+  became part of the GNU Project.\
 \
-  The Linux-libre project takes a minimal-changes approach to cleaning\
-  up Linux, making no effort to substitute components that need to be\
-  removed with functionally equivalent Free ones.  Nevertheless, we\
-  encourage and support efforts towards doing so.\
+  The GNU Linux-libre project takes a minimal-changes approach to\
+  cleaning up Linux, making no effort to substitute components that\
+  need to be removed with functionally equivalent Free ones.\
+  Nevertheless, we encourage and support efforts towards doing so.\
   http://libreplanet.org/wiki/LinuxLibre:Devices_that_require_non-free_firmware\
 \
   Our mascot is Freedo, a light-blue penguin that has just come out\
-  of the the shower.  Although we like penguins, GNU is a much\
-  greater contribution to the entire system, so its mascot deserves\
-  more promotion.  See our web page for their images.\
+  of the shower.  Although we like penguins, GNU is a much greater\
+  contribution to the entire system, so its mascot deserves more\
+  promotion.  See our web page for their images.\
   http://linux-libre.fsfla.org/\
 
-' README 'added blurb about Linux-libre'
+' README 'added blurb about GNU Linux-libre'
 
 # Add reject_firmware and maybe_reject_firmware
 grep -q _LINUX_LIBRE_FIRMWARE_H include/linux/firmware.h ||
@@ -619,15 +620,6 @@ reject_firmware drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
 clean_kconfig drivers/media/dvb/dvb-usb/Kconfig 'DVB_USB'
 clean_mk CONFIG_DVB_USB drivers/media/dvb/dvb-usb/Makefile
 
-announce DVB_USB_AF9005 - "Afatech AF9005 DVB-T USB1.1"
-clean_file drivers/media/dvb/dvb-usb/af9005-script.h
-clean_sed '
-s,^    deb_info("load init script\\n");$,      {\n             err("Missing Free init script\\n");\n           return scriptlen = ret = -EINVAL;\n             ,;
-' drivers/media/dvb/dvb-usb/af9005-fe.c 'report missing Free init script'
-clean_blob drivers/media/dvb/dvb-usb/af9005-fe.c
-clean_kconfig drivers/media/dvb/dvb-usb/Kconfig 'DVB_USB_AF9005'
-clean_mk CONFIG_DVB_USB_AF9005 drivers/media/dvb/dvb-usb/Makefile
-
 announce DVB_B2C2_FLEXCOP - "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters"
 reject_firmware drivers/media/dvb/b2c2/flexcop-fe-tuner.c
 
@@ -640,6 +632,11 @@ clean_kconfig drivers/media/dvb/dvb-usb/Kconfig 'DVB_USB_A800'
 clean_mk CONFIG_DVB_USB_A800 drivers/media/dvb/dvb-usb/Makefile
 
 announce DVB_USB_AF9005 - "Afatech AF9005 DVB-T USB1.1 support"
+clean_file drivers/media/dvb/dvb-usb/af9005-script.h
+clean_sed '
+s,^    deb_info("load init script\\n");$,      {\n             err("Missing Free init script\\n");\n           return scriptlen = ret = -EINVAL;\n             ,;
+' drivers/media/dvb/dvb-usb/af9005-fe.c 'report missing Free init script'
+clean_blob drivers/media/dvb/dvb-usb/af9005-fe.c
 clean_blob drivers/media/dvb/dvb-usb/af9005.c
 clean_kconfig drivers/media/dvb/dvb-usb/Kconfig 'DVB_USB_AF9005'
 clean_mk CONFIG_DVB_USB_AF9005 drivers/media/dvb/dvb-usb/Makefile
@@ -1594,12 +1591,6 @@ clean_blob drivers/net/wireless/ath/ath6kl/sdio.c
 clean_kconfig drivers/net/wireless/ath/ath6kl/Kconfig 'ATH6KL'
 clean_mk CONFIG_ATH6KL drivers/net/wireless/ath/ath6kl/Makefile
 
-announce ATH9K_HTC - "Atheros HTC based wireless cards support"
-reject_firmware drivers/net/wireless/ath/ath9k/hif_usb.c
-clean_blob drivers/net/wireless/ath/ath9k/hif_usb.c
-clean_kconfig drivers/net/wireless/ath/ath9k/Kconfig 'ATH9K_HTC'
-clean_mk CONFIG_ATH9K_HTC drivers/net/wireless/ath/ath9k/Makefile
-
 announce PRISM2_USB - "Prism2.5/3 USB driver"
 reject_firmware drivers/staging/wlan-ng/prism2fw.c
 clean_blob drivers/staging/wlan-ng/prism2fw.c