Debdiff prepared and attached. Please review this whenever you get a
chance and tell me if there's anything I can do better. Thanks!
--
Aaron Rainbolt
Lubuntu Developer
Matrix: @arraybolt3:matrix.org
IRC: arraybolt3 on irc.libera.chat
GitHub: https://github.com/ArrayBolt3
diff -Nru ciso-1.0.0/README.markdown ciso-1.0.2/README.markdown
--- ciso-1.0.0/README.markdown 1970-01-01 00:00:00.000000000 +0000
+++ ciso-1.0.2/README.markdown 2015-07-07 18:05:38.000000000 +0000
@@ -0,0 +1,24 @@
+ciso is a simple commandline utility to compress PSP iso files.
+
+This package is an OSX port of a package provided by Ubuntu: http://packages.ubuntu.com/search?keywords=ciso
+
+# Installation
+
+Now available via homebrew:
+
+ brew install ciso
+
+To build yourself, it's a very straightforward `make` (and optional `make install`).
+
+# Usage
+
+To decompress a cso file:
+
+ ciso 0 infile.cso outfile.iso
+
+To compress an iso file:
+
+ ciso level infile.iso outfile.cso
+
+where level ranges from 1 (fast, poor compression) to 9 (slow, high
+compression).
diff -Nru ciso-1.0.0/ciso.c ciso-1.0.2/ciso.c
--- ciso-1.0.0/ciso.c 2006-11-03 20:53:29.000000000 +0000
+++ ciso-1.0.2/ciso.c 2015-07-07 18:05:38.000000000 +0000
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <zlib.h> /* /usr(/local)/include/zlib.h */
#include <zconf.h>
@@ -31,10 +32,10 @@
FILE *fin,*fout;
z_stream z;
-unsigned int *index_buf = NULL;
-unsigned int *crc_buf = NULL;
-unsigned char *block_buf1 = NULL;
-unsigned char *block_buf2 = NULL;
+uint32_t *index_buf = NULL;
+uint32_t *crc_buf = NULL;
+uint8_t *block_buf1 = NULL;
+uint8_t *block_buf2 = NULL;
/****************************************************************************
compress ISO to CSO
@@ -43,9 +44,9 @@
CISO_H ciso;
int ciso_total_block;
-unsigned long long check_file_size(FILE *fp)
+uint64_t check_file_size(FILE *fp)
{
- unsigned long long pos;
+ uint64_t pos;
if( fseek(fp,0,SEEK_END) < 0)
return -1;
@@ -80,9 +81,9 @@
****************************************************************************/
int decomp_ciso(void)
{
- unsigned long long file_size;
- unsigned int index , index2;
- unsigned long long read_pos , read_size;
+ uint64_t file_size;
+ uint32_t index , index2;
+ uint64_t read_pos , read_size;
int total_sectors;
int index_size;
int block;
@@ -117,7 +118,7 @@
ciso_total_block = ciso.total_bytes / ciso.block_size;
/* allocate index block */
- index_size = (ciso_total_block + 1 ) * sizeof(unsigned long);
+ index_size = (ciso_total_block + 1 ) * sizeof(uint32_t);
index_buf = malloc(index_size);
block_buf1 = malloc(ciso.block_size);
block_buf2 = malloc(ciso.block_size*2);
@@ -138,7 +139,7 @@
/* show info */
printf("Decompress '%s' to '%s'\n",fname_in,fname_out);
- printf("Total File Size %ld bytes\n",ciso.total_bytes);
+ printf("Total File Size %lld bytes\n",ciso.total_bytes);
printf("block size %d bytes\n",ciso.block_size);
printf("total blocks %d blocks\n",ciso_total_block);
printf("index align %d\n",1<<ciso.align);
@@ -237,8 +238,8 @@
****************************************************************************/
int comp_ciso(int level)
{
- unsigned long long file_size;
- unsigned long long write_pos;
+ uint64_t file_size;
+ uint64_t write_pos;
int total_sectors;
int index_size;
int block;
@@ -250,14 +251,14 @@
int align,align_b,align_m;
file_size = check_file_size(fin);
- if(file_size<0)
+ if(file_size==(uint64_t)-1LL)
{
printf("Can't get file size\n");
return 1;
}
/* allocate index block */
- index_size = (ciso_total_block + 1 ) * sizeof(unsigned long);
+ index_size = (ciso_total_block + 1 ) * sizeof(uint32_t);
index_buf = malloc(index_size);
crc_buf = malloc(index_size);
block_buf1 = malloc(ciso.block_size);
@@ -279,7 +280,7 @@
/* show info */
printf("Compress '%s' to '%s'\n",fname_in,fname_out);
- printf("Total File Size %ld bytes\n",ciso.total_bytes);
+ printf("Total File Size %lld bytes\n",ciso.total_bytes);
printf("block size %d bytes\n",ciso.block_size);
printf("index align %d\n",1<<ciso.align);
printf("compress level %d\n",level);
@@ -306,7 +307,7 @@
percent_cnt = percent_period;
printf("compress %3d%% avarage rate %3d%%\r"
,block / percent_period
- ,block==0 ? 0 : 100*write_pos/(block*0x800));
+ ,block==0 ? 0 : (uint32_t)(100*write_pos/(block*0x800)));
}
if (deflateInit2(&z, level , Z_DEFLATED, -15,8,Z_DEFAULT_STRATEGY) != Z_OK)
@@ -401,7 +402,7 @@
int level;
int result;
- fprintf(stderr, "Compressed ISO9660 converter Ver.1.01 by BOOSTER\n");
+ fprintf(stderr, "Compressed ISO9660 converter Ver.1.02 by BOOSTER\n");
if (argc != 4)
{
diff -Nru ciso-1.0.0/ciso.h ciso-1.0.2/ciso.h
--- ciso-1.0.0/ciso.h 2006-11-03 20:53:02.000000000 +0000
+++ ciso-1.0.2/ciso.h 2015-07-07 18:05:38.000000000 +0000
@@ -19,44 +19,46 @@
Copyright 2005 BOOSTER
*/
+#include <stdint.h>
+
+#ifndef __CISO_H__
+#define __CISO_H__
+/*
+ complessed ISO(9660) header format
+*/
+typedef struct ciso_header
+{
+ uint8_t magic[4]; /* +00 : 'C','I','S','O' */
+ uint32_t header_size; /* +04 : header size (==0x18) */
+ uint64_t total_bytes; /* +08 : number of original data size */
+ uint32_t block_size; /* +10 : number of compressed block size */
+ uint8_t ver; /* +14 : version 01 */
+ uint8_t align; /* +15 : align of index value */
+ uint8_t rsv_06[2]; /* +16 : reserved */
+#if 0
+// INDEX BLOCK
+ uint32_t index[0]; /* +18 : block[0] index */
+ uint32_t index[1]; /* +1C : block[1] index */
+ :
+ :
+ uint32_t index[last]; /* +?? : block[last] */
+ uint32_t index[last+1]; /* +?? : end of last data point */
+// DATA BLOCK
+ uint8_t data[]; /* +?? : compressed or plain sector data */
+#endif
+}CISO_H;
+
+/*
+note:
+
+file_pos_sector[n] = (index[n]&0x7fffffff) << CISO_H.align
+file_size_sector[n] = ( (index[n+1]&0x7fffffff) << CISO_H.align) - file_pos_sector[n]
+
+if(index[n]&0x80000000)
+ // read 0x800 without compress
+else
+ // read file_size_sector[n] bytes and decompress data
+*/
+
+#endif
-#ifndef __CISO_H__
-#define __CISO_H__
-/*
- complessed ISO(9660) header format
-*/
-typedef struct ciso_header
-{
- unsigned char magic[4]; /* +00 : 'C','I','S','O' */
- unsigned long header_size; /* +04 : header size (==0x18) */
- unsigned long long total_bytes; /* +08 : number of original data size */
- unsigned long block_size; /* +10 : number of compressed block size */
- unsigned char ver; /* +14 : version 01 */
- unsigned char align; /* +15 : align of index value */
- unsigned char rsv_06[2]; /* +16 : reserved */
-#if 0
-// INDEX BLOCK
- unsigned int index[0]; /* +18 : block[0] index */
- unsigned int index[1]; /* +1C : block[1] index */
- :
- :
- unsigned int index[last]; /* +?? : block[last] */
- unsigned int index[last+1]; /* +?? : end of last data point */
-// DATA BLOCK
- unsigned char data[]; /* +?? : compressed or plain sector data */
-#endif
-}CISO_H;
-
-/*
-note:
-
-file_pos_sector[n] = (index[n]&0x7fffffff) << CISO_H.align
-file_size_sector[n] = ( (index[n+1]&0x7fffffff) << CISO_H.align) - file_pos_sector[n]
-
-if(index[n]&0x80000000)
- // read 0x800 without compress
-else
- // read file_size_sector[n] bytes and decompress data
-*/
-
-#endif
diff -Nru ciso-1.0.0/debian/changelog ciso-1.0.2/debian/changelog
--- ciso-1.0.0/debian/changelog 2023-03-04 14:46:20.000000000 +0000
+++ ciso-1.0.2/debian/changelog 2023-12-07 21:30:35.000000000 +0000
@@ -1,3 +1,14 @@
+ciso (1.0.2-1) unstable; urgency=medium
+
+ * New upstream release. (Closes: #1057750)
+ - Dropped 01_mem_alloc_faliure_amd64.patch.
+ * Add a proper DEP-3 patch header to debian/patches/usage-syntax.
+ * Specify `Rules-Requires-Root: no` in debian/control.
+ * Added watch file.
+ * Created debian/upstream/metadata file.
+
+ -- Aaron Rainbolt <arraybo...@ubuntu.com> Thu, 07 Dec 2023 21:30:35 +0000
+
ciso (1.0.0-1) unstable; urgency=medium
* Initial release. (Closes: #1028055)
diff -Nru ciso-1.0.0/debian/control ciso-1.0.2/debian/control
--- ciso-1.0.0/debian/control 2023-03-04 14:46:20.000000000 +0000
+++ ciso-1.0.2/debian/control 2023-12-07 21:30:35.000000000 +0000
@@ -7,6 +7,7 @@
zlib1g-dev
Standards-Version: 4.6.2
Homepage: https://github.com/jamie/ciso
+Rules-Requires-Root: no
Package: ciso
Architecture: any
diff -Nru ciso-1.0.0/debian/copyright ciso-1.0.2/debian/copyright
--- ciso-1.0.0/debian/copyright 2023-03-04 14:46:20.000000000 +0000
+++ ciso-1.0.2/debian/copyright 2023-12-07 21:30:35.000000000 +0000
@@ -13,6 +13,7 @@
debian/*
Copyright:
2023 Gürkan Myczko <t...@debian.org>
+ 2023 Aaron Rainbolt <arraybo...@ubuntu.com>
2022 Gianfranco Costamagna <locutusofb...@debian.org>
2008 Brian Murray <br...@ubuntu.com>
License: GPL-2+
diff -Nru ciso-1.0.0/debian/patches/01_mem_alloc_failure_amd64.patch ciso-1.0.2/debian/patches/01_mem_alloc_failure_amd64.patch
--- ciso-1.0.0/debian/patches/01_mem_alloc_failure_amd64.patch 2022-03-02 16:27:37.000000000 +0000
+++ ciso-1.0.2/debian/patches/01_mem_alloc_failure_amd64.patch 1970-01-01 00:00:00.000000000 +0000
@@ -1,34 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_mem_alloc_failure_amd64.dpatch by Brian Murray <br...@ubuntu.com>
-##
-## Ubuntu: http://launchpad.net/bugs/163308
-## Description: Use standard integer types to avoid accidental 8 byte value
-## when 4 was intended (32bit vs 64bit long)
-
-@DPATCH@
-diff -urNad ciso-1.0.0-20081201~/ciso.c ciso-1.0.0-20081201/ciso.c
---- ciso-1.0.0-20081201~/ciso.c 2008-12-01 16:16:21.000000000 -0800
-+++ ciso-1.0.0-20081201/ciso.c 2008-12-01 16:53:07.000000000 -0800
-@@ -22,6 +22,7 @@
-
- #include <stdio.h>
- #include <stdlib.h>
-+#include <stdint.h>
- #include <zlib.h> /* /usr(/local)/include/zlib.h */
- #include <zconf.h>
-
-diff -urNad ciso-1.0.0-20081201~/ciso.h ciso-1.0.0-20081201/ciso.h
---- ciso-1.0.0-20081201~/ciso.h 2008-12-01 16:16:21.000000000 -0800
-+++ ciso-1.0.0-20081201/ciso.h 2008-12-01 16:52:35.000000000 -0800
-@@ -28,9 +28,9 @@
- typedef struct ciso_header
- {
- unsigned char magic[4]; /* +00 : 'C','I','S','O' */
-- unsigned long header_size; /* +04 : header size (==0x18) */
-+ uint32_t header_size; /* +04 : header size (==0x18) */
- unsigned long long total_bytes; /* +08 : number of original data size */
-- unsigned long block_size; /* +10 : number of compressed block size */
-+ uint32_t block_size; /* +10 : number of compressed block size */
- unsigned char ver; /* +14 : version 01 */
- unsigned char align; /* +15 : align of index value */
- unsigned char rsv_06[2]; /* +16 : reserved */
diff -Nru ciso-1.0.0/debian/patches/series ciso-1.0.2/debian/patches/series
--- ciso-1.0.0/debian/patches/series 2023-03-04 14:46:20.000000000 +0000
+++ ciso-1.0.2/debian/patches/series 2023-12-07 21:30:35.000000000 +0000
@@ -1,3 +1,2 @@
-01_mem_alloc_failure_amd64.patch
fix-build-system.patch
usage-syntax
diff -Nru ciso-1.0.0/debian/patches/usage-syntax ciso-1.0.2/debian/patches/usage-syntax
--- ciso-1.0.0/debian/patches/usage-syntax 2023-03-04 14:46:20.000000000 +0000
+++ ciso-1.0.2/debian/patches/usage-syntax 2023-12-07 21:30:35.000000000 +0000
@@ -1,30 +1,10 @@
-Description: <short summary of the patch>
- TODO: Put a short summary on the line above and replace this paragraph
- with a longer explanation of this change. Complete the meta-information
- with other relevant fields (see below for details). To make it easier, the
- information below has been extracted from the changelog. Adjust it or drop
- it.
- .
- ciso (1.0.0-1) unstable; urgency=medium
- .
- * Initial release. (Closes: #1028055)
+Description: Correct a typo in the program's help output
Author: Gürkan Myczko <t...@debian.org>
+Origin: Debian
Bug-Debian: https://bugs.debian.org/1028055
-
+Last-Update: 2023-12-07
---
-The information above should follow the Patch Tagging Guidelines, please
-checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
-are templates for supplementary fields that you might want to add:
-
-Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
-Bug: <upstream-bugtracker-url>
-Bug-Debian: https://bugs.debian.org/<bugnumber>
-Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
-Forwarded: (no|not-needed|<patch-forwarded-url>)
-Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
-Reviewed-By: <name and email of someone who approved/reviewed the patch>
-Last-Update: 2023-03-10
-
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- ciso-1.0.0.orig/ciso.c
+++ ciso-1.0.0/ciso.c
@@ -407,7 +407,7 @@ int main(int argc, char *argv[])
diff -Nru ciso-1.0.0/debian/upstream/metadata ciso-1.0.2/debian/upstream/metadata
--- ciso-1.0.0/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000
+++ ciso-1.0.2/debian/upstream/metadata 2023-12-07 21:30:35.000000000 +0000
@@ -0,0 +1,6 @@
+Name: ciso
+Bug-Database: https://github.com/jamie/ciso/issues
+Bug-Submit: https://github.com/jamie/ciso/issues/new
+Changelog: https://github.com/jamie/ciso/commits/master
+Repository: https://github.com/jamie/ciso.git
+Repository-Browse: https://github.com/jamie/ciso
diff -Nru ciso-1.0.0/debian/watch ciso-1.0.2/debian/watch
--- ciso-1.0.0/debian/watch 1970-01-01 00:00:00.000000000 +0000
+++ ciso-1.0.2/debian/watch 2023-12-07 21:30:35.000000000 +0000
@@ -0,0 +1,4 @@
+version=4
+opts="searchmode=plain, \
+filenamemangle=s/.*(v@ANY_VERSION@)/ciso-$1.tar.gz/" \
+ https://api.github.com/repos/jamie/@PACKAGE@/releases https:\/\/api.github.com\/repos\/jamie\/@PACKAGE@\/tarball\/v@ANY_VERSION@