debian/0000755000000000000000000000000012167620330007166 5ustar debian/manpages0000644000000000000000000000013112167615613010707 0ustar debian/wit.1 debian/wdf.1 debian/wdf-cat.1 debian/wdf-dump.1 debian/wwt.1 debian/wfuse.1 debian/copyright0000644000000000000000000000276112167615613011137 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: wit Source: http://wit.wiimm.de/ Files: * Copyright: 2009-2012 Dirk Clemens License: GPL-2+ Files: src/libwbfs/rijndael.* Copyright: © 1999, Mike Scott License: other Permission for free direct or derivative use is granted subject to compliance with any conditions that the originators of the algorithm place on its exploitation. Comment: Rijndael is also know as AES and its public specification is unencumbered by patents. Files: src/lzma/* Copyright: 2009 Igor Pavlov License: public-domain 2009-04-22 : Igor Pavlov : Public domain Files: debian/* Copyright: 2013 Michael Stapelberg License: GPL-2+ License: GPL-2+ This package 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 (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/wwt.10000644000000000000000000000001712167615613010077 0ustar .so man1/wit.1 debian/wdf.10000644000000000000000000000001712167615613010036 0ustar .so man1/wit.1 debian/compat0000644000000000000000000000000212167615613010374 0ustar 8 debian/rules0000755000000000000000000000246712167615613010267 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk # The Makefile doesn’t use CPPFLAGS export XDEF=$(shell dpkg-buildflags --get CPPFLAGS) override_dh_auto_clean: $(MAKE) clean+ rm -rf bin rm -rf Makefile.setup # Skip testing, "make test" does not actually run a testsuite. override_dh_auto_test: override_dh_auto_build: $(MAKE) INSTALL_PATH=$(CURDIR)/debian/wit/usr $(MAKE) INSTALL_PATH=$(CURDIR)/debian/wit/usr doc override_dh_auto_install: mkdir -p $(CURDIR)/debian/wit/usr/bin mkdir -p $(CURDIR)/debian/wit/usr/share $(MAKE) INSTALL_PATH=$(CURDIR)/debian/wit/usr install override_dh_installchangelogs: dh_installchangelogs doc/HISTORY.txt %: dh $@ debian/patches/0000755000000000000000000000000012167617446010633 5ustar debian/patches/fix-usr-local.patch0000644000000000000000000000125212167617435014337 0ustar Description: Use /usr/share/wit instead of /usr/local/share/wit This is hardcoded in the code. Author: Michael Stapelberg Last-Update: 2013-07-11 --- Index: wit/src/lib-std.c =================================================================== --- wit.orig/src/lib-std.c 2013-07-11 23:07:05.320548218 +0200 +++ wit/src/lib-std.c 2013-07-11 23:09:03.710963155 +0200 @@ -487,7 +487,7 @@ TRACE("PROC-PATH: %s\n",proc_path); static char share[] = "/share/wit/"; - static char local_share[] = "/usr/local/share/wit/"; + static char local_share[] = "/usr/share/wit/"; char path[PATH_MAX]; if (readlink(proc_path,path,sizeof(path))) debian/patches/series0000644000000000000000000000005712167617343012046 0ustar use-libbz2-and-mhash.patch fix-usr-local.patch debian/patches/use-libbz2-and-mhash.patch0000644000000000000000000001141512167617446015472 0ustar Description: Use libbz2 and mhash The upstream tarball comes with a bundled version of libbz2 and uses OpenSSL for SHA1. In accordance with Debian policy (“Convenience copies of code”), the Debian tarball ships without libbz2. Also, due to licensing, we use mhash instead of OpenSSL. Author: Michael Stapelberg Last-Update: 2013-07-11 --- Index: wit/Makefile =================================================================== --- wit.orig/Makefile 2013-07-11 23:07:05.304548431 +0200 +++ wit/Makefile 2013-07-11 23:08:27.011454970 +0200 @@ -180,7 +180,7 @@ # lib summary LIB_LIST += libbz2 -LIB_OBJECTS += $(LIBBZ2_OBJ) +LIB_OBJECTS += RM_FILES += $(foreach l,$(LIB_LIST),src/$(l)/*.{d,o}) #------------------------------------------------------------------------------- @@ -217,7 +217,7 @@ lib-wdf.o lib-wia.o lib-ciso.o \ ui.o iso-interface.o wbfs-interface.o patch.o \ titles.o match-pattern.o dclib-utf8.o \ - sha1dgst.o sha1_one.o + wit-sha1.o LIBWBFS_O := tools.o file-formats.o libwbfs.o wiidisc.o cert.o rijndael.o LZMA_O := LzmaDec.o LzmaEnc.o LzFind.o Lzma2Dec.o Lzma2Enc.o @@ -228,7 +228,7 @@ # object groups UI_OBJECTS := $(sort $(MAIN_TOOLS_OBJ)) C_OBJECTS := $(sort $(OTHER_TOOLS_OBJ) $(WIT_O) $(LIBWBFS_O) $(LZMA_O) $(TOBJ_ALL)) -ASM_OBJECTS := ssl-asm.o +ASM_OBJECTS := # all objects + sources ALL_OBJECTS = $(sort $(WIT_O) $(LIBWBFS_O) $(LZMA_O) $(ASM_OBJECTS) $(LIB_OBJECTS)) @@ -273,6 +273,7 @@ LDFLAGS := $(strip $(LDFLAGS)) LIBS += $(XLIBS) +LIBS += -lbz2 -lmhash DISTRIB_RM = ./wit-v$(VERSION)-r DISTRIB_BASE = wit-v$(VERSION)-r$(REVISION_NEXT) Index: wit/src/iso-interface.c =================================================================== --- wit.orig/src/iso-interface.c 2013-07-11 23:07:05.320548218 +0200 +++ wit/src/iso-interface.c 2013-07-11 23:08:27.011454970 +0200 @@ -50,6 +50,8 @@ #include "dirent.h" #include "crypt.h" +#include + // /////////////////////////////////////////////////////////////////////////////// /////////////// dump helpers /////////////// @@ -5738,11 +5740,11 @@ const enumOFT oft = CalcOFT(output_file_type,0,0,OFT__DEFAULT); { - WIT_SHA_CTX ctx; - if (!WIT_SHA1_Init(&ctx)) + MHASH td; + if ((td = mhash_init(MHASH_SHA1)) == MHASH_FAILED) { ASSERT(0); - exit(0); + exit(1); } int i; @@ -5750,10 +5752,10 @@ { wd_memmap_item_t * mi = mm.item + i; noPRINT("### %p %9llx %6llx\n",mi->data,mi->offset,mi->size); - WIT_SHA1_Update(&ctx,mi->data,mi->size); + mhash(td, mi->data, mi->size); } u8 h[WII_HASH_SIZE]; - WIT_SHA1_Final(h,&ctx); + mhash_deinit(td, h); snprintf(fname,sizeof(fname), "%s/%.6s-%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x" Index: wit/src/crypt.h =================================================================== --- wit.orig/src/crypt.h 2013-07-11 22:54:35.098560363 +0200 +++ wit/src/crypt.h 2013-07-11 23:08:27.011454970 +0200 @@ -37,7 +37,8 @@ #ifndef WIT_CRYPT_H #define WIT_CRYPT_H 1 -#include "crypto/wit-sha.h" +//#include "crypto/wit-sha.h" +unsigned char *WIT_SHA1(const unsigned char *d, size_t n, unsigned char *md); #define SHA1 WIT_SHA1 // random functions Index: wit/src/lib-bzip2.c =================================================================== --- wit.orig/src/lib-bzip2.c 2013-07-11 22:54:35.098560363 +0200 +++ wit/src/lib-bzip2.c 2013-07-11 23:08:27.011454970 +0200 @@ -40,8 +40,7 @@ #ifndef NO_BZIP2 /******************/ -//#include -#include "libbz2/bzlib.h" +#include #include "lib-bzip2.h" /************************************************************************ Index: wit/src/wit-sha1.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ wit/src/wit-sha1.c 2013-07-11 23:08:27.011454970 +0200 @@ -0,0 +1,41 @@ +#include +#include +#include + +#if 0 +#include +unsigned char *WIT_SHA1_ssl(const unsigned char *d, size_t n, unsigned char *md) +{ + SHA_CTX c; + static unsigned char m[20]; + + if (md == NULL) md=m; + if (!SHA1_Init(&c)) + return NULL; + SHA1_Update(&c,d,n); + SHA1_Final(md,&c); + return(md); +} +#endif + +unsigned char *WIT_SHA1(const unsigned char *d, size_t n, unsigned char *md) +{ + MHASH td; + if ((td = mhash_init(MHASH_SHA1)) == MHASH_FAILED) + return NULL; + mhash(td, d, n); + mhash_deinit(td, md); + return(md); +} + +#if 0 +int main() { + char *bleh = "22:40 → fritz09 [~Adium@port-5452.pppoe.wtnet.de] has joined #29c3"; + char md[1024] = { 0 }; + WIT_SHA1(bleh, strlen(bleh), md); + printf("md = %s\n", md); + memset(md, '\0', sizeof(md)); + WIT_SHA1_ssl(bleh, strlen(bleh), md); + printf("md = %s\n", md); +} +#endif debian/wit.10000644000000000000000000000336512167615613010072 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH WIT 1 "2013-01-02" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME wit \- manipulate Wii and GameCube ISO images and WBFS containers .SH SYNOPSIS .B wit .RI [ option ]... " command " [ option | parameter | file ]... .br .B wwt .RI [ option ]... " command " [ option | parameter | file ]... .br .B wdf .RI [ options ]... " " [ +command ] " " [ options ]... " files"... .br .B wfuse .RI [ option ]... " source mountdir" .br .B wfuse .RI --umount " mountdir"... .SH DESCRIPTION This manual page documents briefly the .B wit, .B wwt, .B wdf, and .B wfuse commands. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBWIT\fP is a collection of command-line tools to manipulate Wii and GameCube ISO images and WBFS containers. .PP More documentation is available in the files in .B /usr/share/doc/wit. .br Start with .B /usr/share/doc/wit/DOCUMENTATION.txt.gz .SH AUTHOR wit was written by Dirk Clemens .PP This manual page was written by Michael Stapelberg for the Debian project (and may be used by others). debian/wfuse.10000644000000000000000000000001712167615613010407 0ustar .so man1/wit.1 debian/watch0000644000000000000000000000012112167615613010221 0ustar version=3 http://wit.wiimm.de/download.html /download/wit-v([^-]+)-.*i386.tar.gz debian/control0000644000000000000000000000343412167620244010601 0ustar Source: wit Section: utils Priority: extra Maintainer: Michael Stapelberg Build-Depends: debhelper (>= 8.0.0), dpkg-dev (>= 1.16.1~), libmhash-dev, libbz2-dev, libfuse-dev Standards-Version: 3.9.4 Homepage: http://wit.wiimm.de/ Vcs-Git: git://anonscm.debian.org/collab-maint/wit.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/wit.git;a=summary Package: wit Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: manipulate Wii and GameCube ISO images and WBFS containers Wiimms ISO Tools is a set of command line tools to manipulate Wii and GameCube ISO images and WBFS containers. The toolset consists of the following tools: . wit (Wiimms ISO Tool): This is the main ISO manipulation tool : It can list, analyze, verify, convert, split, join, patch, mix, extract, compose, rename and compare Wii and GameCube discs. It can create and dump different other Wii file formats. . wwt (Wiimms WBFS Tool): This is the main WBFS manipulation tool (WBFS manager) : It can create, check, repair, verify and clone WBFS files and partitions. It can list, add, extract, remove, rename and recover ISO images as part of a WBFS. . wdf (Wiimms WDF Tool): wdf is a support tool for WDF, WIA and CISO archives. It convert (pack and unpack), compare and dump WDF, WIA (dump and cat only) and CISO archives. The default command depends on the program file name (see command descriptions). Usual names are wdf, unwdf, wdf-cat, wdf-cmp and wdf-dump (with or without minus signs). »wdf +CAT« replaces the old tool wdf-cat and »wdf +DUMP« the old tool wdf-dump. . wfuse (Wiimms FUSE Tool): Mount a Wii or GameCube image or a WBFS file or partition to a mount point using FUSE (Filesystem in USErspace). Use 'wfuse --umount mountdir' for unmounting. debian/README.source0000644000000000000000000000074512167617247011370 0ustar wit for Debian -------------- latest upstream release is v2.22b (r4520), so I checked out the SVN at that revision, then deleted the bundled libbz2 and OpenSSL code: svn co http://opensvn.wiimm.de/wii/trunk/wiimms-iso-tools@4520 wit-2.22b cd wit-2.22b rm -rf src/{libbz2,crypto} setup/*.exe find . -name ".svn" -or -name ".svn-ignore" -exec rm -rf '{}' \; cd .. tar czf wit_2.22b.orig.tar.gz wit-2.22b -- Michael Stapelberg Thu, 11 Jul 2013 23:07:50 +0200 debian/source/0000755000000000000000000000000012167615613010476 5ustar debian/source/format0000644000000000000000000000001412167615613011704 0ustar 3.0 (quilt) debian/wdf-dump.10000644000000000000000000000001712167615613011001 0ustar .so man1/wit.1 debian/wdf-cat.10000644000000000000000000000001712167615613010603 0ustar .so man1/wit.1 debian/docs0000644000000000000000000000012312167615613010045 0ustar doc/DOCUMENTATION.txt doc/FAQ.txt doc/wit.txt doc/wwt.txt doc/WDF.txt doc/WBFS.txt debian/changelog0000644000000000000000000000141712167620256011052 0ustar wit (2.22b-1) unstable; urgency=low * New upstream release. * Fix search path to be /usr/share/wit instead of /usr/local/share/wit (Closes: #708010) * Canonicalize Vcs-* fields -- Michael Stapelberg Thu, 11 Jul 2013 23:11:19 +0200 wit (2.13a-1) unstable; urgency=low * New upstream release. * experimental to unstable to correct my mistake when initially uploading the package. I thought it belonged to experimental because of the freeze but that’s not true, since it’s a new package. -- Michael Stapelberg Sat, 30 Mar 2013 11:59:36 +0100 wit (2.10a-1) experimental; urgency=low * Initial release (Closes: #697145) -- Michael Stapelberg Tue, 01 Jan 2013 22:11:11 +0100 debian/gbp.conf0000644000000000000000000000003612167615613010614 0ustar [DEFAULT] pristine-tar = True