From 49cbb653f30cdf381580b73e3b0a2df72c3238ec Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Sat, 4 Aug 2007 13:52:30 +0200 Subject: [PATCH] Complete the README file. Unify all script headers. Delete pbuilder-template (same as -dist). Change my mail address. --- 404main | 5 +++++ AUTHORS | 2 +- README | 36 ++++++++++++++++++++++++++++++------ check-symbols | 5 ++++- dch-repeat | 4 +++- get-branches | 11 ++++++----- mk-sbuild-lv | 12 +++++++----- pbuilder-dist | 21 ++++++++++++++++----- pbuilder-template | 36 ------------------------------------ pull-debian-debdiff | 11 +++++++---- suspicious-source | 9 ++++----- update-maintainer | 19 ++++++++++--------- 12 files changed, 93 insertions(+), 78 deletions(-) delete mode 100644 pbuilder-template diff --git a/404main b/404main index bfa5a9c..7e4a7a7 100755 --- a/404main +++ b/404main @@ -1,4 +1,9 @@ #!/usr/bin/python +# The author of this script is unknown +# License: Public Domain +# +# This script is used to check in what components ("main", "restricted", +# "universe" or "multiverse") the dependencies of a package are. import subprocess import sys diff --git a/AUTHORS b/AUTHORS index 33f46e2..9abfcf0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,5 +4,5 @@ Albin Tonnerre Michael Bienia Kees Cook Martin Pitt -Siegfried-A. Gevatter +Siegfried-A. Gevatter Jamin W. Collins diff --git a/README b/README index 596a33d..976ad82 100644 --- a/README +++ b/README @@ -2,17 +2,41 @@ == Ubuntu Development Tools == ===================== +404main + ... will check in what components the dependencies of are. + check-symbols [] ... will compare and give you a diff of the exported symbols of all .so files in all binary packages of . is not mandatory and set to /var/cache/pbuilder/result by default. +dch-repeat [--help] + ... will repeat a change log into an older release. + +get-branches [checkout|branch] + ... will branch / checkout all the Bazaar branches in a Launchpad team. + +mk-sbuild-lv + ... will create LVM snapshot chroots via schroot and sbuild. It assumes that + sbuild has not be installed and configured before. + +pbuilder-dist [create|update|build|clean|login|execute] + ... is a wrapper to use pbuilder with many different distributions / versions. + It has to be renamed to something like pbuilder-feisty, pbuilder-gutsy, etc. + +pull-debian-debdiff + ... will attempt to find and download a specific version of a Debian package + and its immediate parent to generate a debdiff. + +suspicious-source + ... will output a list of files which are not common source files. This should be + run in the root of a source tree to find files which might not be the "prefered + form of modification" that the GPL and other licenses require. + +update-maintainer + ... will update the maintainer field of an Ubuntu package to match the + DebianMaintainerField specification. + what-patch ... will check what patching system is used by a package. You need to be in it's source directory in order that it works. - -suspicious-source - ... will output a list of files which are not common source files. This - should be run in the root of a source tree to find files which might - not be the 'prefered form of modification' that the GPL and other - licenses require. diff --git a/check-symbols b/check-symbols index d27e038..cdc07d9 100755 --- a/check-symbols +++ b/check-symbols @@ -1,7 +1,10 @@ #!/bin/bash # Copyright 2006-2007 (C) Daniel Holbach -# Modified by Siegfried-A. Gevatter +# Modified by Siegfried-A. Gevatter # License: GPLv2 +# +# This script is used to get a diff of the exported symbols of all .so files in +# every binary package of package $1. PACKAGES="`apt-cache showsrc $1 | grep ^Binary | sed 's/Binary\:\ //g;s/\,//g' | sort -u`" DEBLINE="" diff --git a/dch-repeat b/dch-repeat index 58b31b2..655edd5 100755 --- a/dch-repeat +++ b/dch-repeat @@ -1,6 +1,7 @@ #!/usr/bin/perl -# Copyright 2007, Kees Cook +# Copyright 2007 (C) Kees Cook # License: GPLv2 +# # This script is used to repeat a change log into an older release. It # expects that --build-tree is layed out with each Ubuntu release as a # separate directory ("feisty", "edgy", etc). @@ -9,6 +10,7 @@ # $TREE/feisty/gimp-2.2.13, running "dch-repeat" in # $TREE/edgy/gimp-2.2.13 would pull in the latest changelog from the Feisty # build. + use strict; use warnings; use Getopt::Long; diff --git a/get-branches b/get-branches index 14fb1c4..b168ea4 100755 --- a/get-branches +++ b/get-branches @@ -1,8 +1,10 @@ #!/usr/bin/python - -# (C) 2007, Canonical -# Daniel Holbach -# GPLv3 +# Copyright 2007 (C) Canonical Ltd. +# Created by Daniel Holbach +# License: GPLv3 +# +# This script is used to checkout or branch all the Bazaar branches +# in a Launchpad team. import urllib2 import sys @@ -65,4 +67,3 @@ def main(): if __name__ == "__main__": main() - diff --git a/mk-sbuild-lv b/mk-sbuild-lv index a71a9cb..376a90c 100755 --- a/mk-sbuild-lv +++ b/mk-sbuild-lv @@ -1,9 +1,13 @@ #!/bin/bash -# Script to create LVM snapshot chroots via schroot and sbuild. +# Copyright 2006-2007 (C) Canonical Ltd. +# Created by Kees Cook +# License: GPLv2 +# +# This script creates LVM snapshot chroots via schroot and sbuild. # Much love to "man sbuild-setup", https://wiki.ubuntu.com/PbuilderHowto, # and https://help.ubuntu.com/community/SbuildLVMHowto. # -# This script assumes that sbuild has not be installed and configured before. +# It assumes that sbuild has not be installed and configured before. # # If using schroot earlier than 1.1.4-1, it's a good idea to apply the # process-cleaning patch to /etc/schroot/setup.d/10mount. Without this, any @@ -17,9 +21,7 @@ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392992 # # Version: 0.11 -# -# Copyright 2006-2007, Canonical Ltd, Kees Cook -# License: GPLv2 + set -e # Make sure we've got a regular user diff --git a/pbuilder-dist b/pbuilder-dist index d4230d9..0f2cf92 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -1,19 +1,30 @@ #!/bin/sh -# script from Jamin W. Collins BTS: #255165 -# name this script 'pbuilder-dapper', 'pbuilder-edgy', 'pbuilder-feisty' etc. +# Copyright (C) Jamin W. Collins +# License: Public Domain # -# The only variable you really might need to change is BASE_DIR if you don't want pbuilder stuff in ~/ +# This script is a wrapper to use pbuilder with many different +# distributions / versions. +# +# Name this script 'pbuilder-dapper', 'pbuilder-feisty', 'pbuilder-gutsy', etc. +# +# The only variable you really might need to change is BASE_DIR, if you +# don't want pbuilder stuff in your home directory. +# +# BTS: #255165 + +BASE_DIR="$HOME/pbuilder" OPERATION=$1 DISTRIBUTION=`basename $0 | cut -f2 -d '-'` PROCEED=false -BASE_DIR="$HOME/pbuilder" + case $OPERATION in create|update|build|clean|login|execute ) PROCEED=true ;; esac -if [ $PROCEED = true ]; then + +if [[ $PROCEED = true ]]; then shift if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ] then mkdir -p $BASE_DIR/${DISTRIBUTION}_result/ diff --git a/pbuilder-template b/pbuilder-template deleted file mode 100644 index b9d0904..0000000 --- a/pbuilder-template +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# Script from Jamin W. Collins BTS: #255165 -# Name this script 'pbuilder-dapper', 'pbuilder-edgy', 'pbuilder-feisty', etc. -# -# The only variable you really might need to change is BASE_DIR if you don't want pbuilder stuff in ~/ - -OPERATION=$1 -DISTRIBUTION=`basename $0 | cut -f2 -d '-'` -PROCEED=false -BASE_DIR="$HOME/pbuilder" -case $OPERATION in - create|update|build|clean|login|execute ) - PROCEED=true - ;; -esac -if ( $PROCEED == true ) then - shift - if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ] - then mkdir -p $BASE_DIR/${DISTRIBUTION}_result/ - fi - sudo pbuilder $OPERATION \ - --basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \ - --distribution $DISTRIBUTION \ - --buildresult $BASE_DIR/$DISTRIBUTION_result \ - --othermirror "deb http://archive.ubuntu.com/ubuntu $DISTRIBUTION universe multiverse" $@ -else - echo "Invalid command..." - echo "Valid commands are:" - echo " create" - echo " update" - echo " build" - echo " clean" - echo " login" - echo " execute" - exit 1 -fi diff --git a/pull-debian-debdiff b/pull-debian-debdiff index 8d58e60..55b3436 100755 --- a/pull-debian-debdiff +++ b/pull-debian-debdiff @@ -1,12 +1,16 @@ #!/usr/bin/perl -# Copyright 2007 Kees Cook -# License GPLv2 +# Copyright 2007 (C) Kees Cook +# License: GPLv2 +# # This script attempts to find and download a specific version of a Debian # package and its immediate parent to generate a debdiff. -# Requires: devscripts diffstat dpkg-dev +# +# Requirements: devscripts diffstat dpkg-dev +# # Cleanups needed: # - general cleanup # - parse diff.gz/orig.tar.gz from .dsc file instead of guessing version + use strict; use warnings; @@ -90,7 +94,6 @@ sub download_source } - my $pkg = $ARGV[0]; my $version = $ARGV[1]; my $skip = $ARGV[2] || 1; diff --git a/suspicious-source b/suspicious-source index d47c8c3..6fe6704 100755 --- a/suspicious-source +++ b/suspicious-source @@ -1,12 +1,11 @@ #!/bin/bash -# Copyright 2007 (C) Siegfried-A. Gevatter +# Copyright 2007 (C) Siegfried-A. Gevatter # Based upon a script by Martin Pitt # License: GPL v3 or later # -# Outputs a list of files which are not common source files. This -# should be run in the root of a source tree to find files which might -# not be the 'prefered form of modification' that the GPL and other -# licenses require. +# This script outputs a list of files which are not common source files. This +# should be run in the root of a source tree to find files which might not be +# the "prefered form of modification" that the GPL and other licenses require. FILES="*.h *.c *.cc *.cpp *.py *.sh *.txt *.text *.3 *.m4 *.xml *.html *.php *.php3 *.php4 \ *.class *.form *.module *.cfg *.conf *.config *.odt *.odp *.tex *.sla *.scd \ diff --git a/update-maintainer b/update-maintainer index 1759651..460e67d 100755 --- a/update-maintainer +++ b/update-maintainer @@ -1,8 +1,9 @@ #!/bin/bash -#update-maintainer -#small - thus not perfect - script to update maintainer field in ubuntu packages -#written and (c) 2007 by Albin Tonnerre (Lutin) -#this code is under the GNU GPL V2 licence +# Copyright 2007 (C) Albin Tonnerre (Lutin) +# License: GPLv2 +# +# This script is used to update the maintainer field of an Ubuntu package +# to match the DebianMaintainerField specification. if [ ${#@} -ge 1 ]; then for argv in "$@"; do @@ -25,14 +26,14 @@ if [ -f debian/control -a -f debian/changelog ]; then elif [ -f control -a -f changelog ]; then DEBIANDIR=. else - echo "Please run that script in the source folder" >&2 && exit 1 + echo "Please run that script in the source folder." >&2 && exit 1 fi IGNORE_DOMAINS="ubuntu\.com|ubuntu\.com\.au" [ -n "`head -n 1 $DEBIANDIR/changelog | grep -E "\(*ubuntu.*\)"`" ] && [ -z "`grep -E "^Maintainer: .*($IGNORE_DOMAINS)>" $DEBIANDIR/control`" ] || \ -{ echo "Not an ubuntu package or already maintained by the ubuntu team" >&2 && \ +{ echo "Not an Ubuntu package or already maintained by the Ubuntu team." >&2 && \ exit 1; } mail=$(grep -E "^Maintainer" $DEBIANDIR/control | sed -r 's/.*<(.*)>/\1/') @@ -46,7 +47,7 @@ if [ -z "$email" ]; then DISTRO=$(head -n 1 $DEBIANDIR/changelog|sed -r 's/.*\) (.*);.*/\1/' | cut -d'-' -f1) pkgline=$(apt-cache madison `head -n 1 $DEBIANDIR/changelog | cut -d' ' \ -f1`| grep -m 1 "$DISTRO.*Sources") - [ -z "$pkgline" ] && echo "You don't have $DISTRO in your source repos" \ + [ -z "$pkgline" ] && echo "You don't have $DISTRO in your source repos." \ >&2 && exit 1 section=$(echo $pkgline | grep -Eo "main|universe|multiverse|restricted") fi @@ -59,5 +60,5 @@ fi sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/control [ -f $DEBIANDIR/control.in ] && sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/control.in -dch "Modify Maintainer value to match Debian-Maintainer-Field Spec" -echo "Maintainer changed to $email" +dch "Modify Maintainer value to match the DebianMaintainerField specification." +echo "Maintainer changed to $email."