Compare commits

...

4 Commits

Author SHA1 Message Date
Matteo Bini f3076a172f debian dir 2023-11-02 10:59:07 +01:00
Matteo Bini add3940bd5 Ignore dist 2023-11-02 10:59:07 +01:00
Matteo Bini 6a4351c770 man page 2023-11-02 10:59:07 +01:00
Matteo Bini 2a7c3e9fc6 Bug: UDF dir read does not return 1 on EOF 2023-11-02 10:58:14 +01:00
12 changed files with 145 additions and 11 deletions

5
.gitignore vendored
View File

@ -1,2 +1,7 @@
bluraybackup
bluraybackup-[1-9].[0-9].tar.gz
debian/bluraybackup.debhelper.log
debian/bluraybackup.substvars
debian/debhelper-build-stamp
debian/files
*.o

View File

@ -34,17 +34,28 @@ clean:
dist: clean
mkdir ${BIN}-${VERSION}
cp -R ${SRC} LICENSE Makefile README ${BIN}-${VERSION}
cp -R ${BIN}.1 ${SRC} debian LICENSE Makefile README ${BIN}-${VERSION}
tar -cf ${BIN}-${VERSION}.tar ${BIN}-${VERSION}
gzip ${BIN}-${VERSION}.tar
rm -fr ${BIN}-${VERSION}
install: ${BIN}
# bin
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/${BIN}
# doc
mkdir -p ${DESTDIR}${PREFIX}/share/doc/${BIN}
cp -f README ${DESTDIR}${PREFIX}/share/doc/${BIN}
chmod 644 ${DESTDIR}${PREFIX}/share/doc/${BIN}/README
# man page
mkdir -p ${DESTDIR}${PREFIX}/share/man/man1
sed 's/VERSION/${VERSION}/' < ${BIN}.1 > ${DESTDIR}${PREFIX}/share/man/man1/${BIN}.1
chmod 644 ${DESTDIR}${PREFIX}/share/man/man1/${BIN}.1
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/${BIN}
rm -fr ${DESTDIR}${PREFIX}/share/doc/${BIN}
rm -f ${DESTDIR}${PREFIX}/share/man/man1/${BIN}.1
.PHONY: all options clean dist install uninstall

20
README
View File

@ -1,16 +1,16 @@
bluraybackup is a command-line program inspired by dvdbackup [1],
developed in C99 following the suckless philosophy [2].
bluraybackup is a command line program to backup Blu-ray Disc Movies
(BDMV), inspired by dvdbackup [1], developed in C99 following the
suckless philosophy [2].
I wrote it because I wanted to have a 1:1 copy of my Blu-ray discs or
the ability to save an unencrypted version of a BDMV stream. Since
Blu-ray is an especially nasty format [3], this software does not work
with all Blu-ray discs. It both depends on your KEYDB.cfg file and on
the disc BD+ generation. I don't know what the hell BD+ is!
It makes a decrypted copy of the whole Blu-ray Disc Movie or it extracts
a decrypted version of a specific BDMV stream. Since Blu-ray is an
especially nasty format [3], this software may not work with all discs.
It both depends on your KEYDB.cfg file and on the BD+ generation.
Don't count on your copies being perfect, if you see libbluray errors
during the operation. You have been warned.
If you encounter libbluray errors during the operation, the copy might
not be exact.
This software is based on libbluray [4]. To build it you need libbluray
bluraybackup is based on libbluray [4]. To build it you need libbluray
and its headers.

56
bluraybackup.1 Normal file
View File

@ -0,0 +1,56 @@
.TH bluraybackup 1 bluraybackup\-VERSION
.SH NAME
bluraybackup \- Tool to backup Blu-ray Disc Movies (BDMV)
.SH SYNOPSIS
.B bluraybackup
<DEVICE> <KEYFILE> [\fIFILE\fR] [\fIDEST\fR]
.B bluraybackup
[\fIOPTION\fR]
.SH DESCRIPTION
\fBbluraybackup\fP backups Blu-ray Disc Movies (BDMV),
inspired by dvdbackup,
developed in C99 following the suckless philosophy.
It makes a decrypted copy of the whole Blu-ray Disc Movie
or it extracts a decrypted version of a specific BDMV stream.
This program may not work with all Blu-rays.
It both depends on your KEYDB.cfg file
and on the BD+ generation.
If you encounter libbluray errors during the operation,
the copy might not be exact.
.SH OPTIONS
.TP
.B \-h, \-\-help
print usage message
.TP
.B \-v, \-\-version
print version and license information
.SH USAGE
.B bluraybackup
<DEVICE> <KEYFILE> [\fIFILE\fR] [\fIDEST\fR]
.P
Without \fIFILE\fR,
the whole disc will be copied to the current directory.
\fIFILE\fR must be a file path relative to the disc root.
Without \fIDEST\fR,
the base \fIFILE\fR will be saved to the current directory.
\fIDEST\fR path must include file name.
.SH EXIT VALUES
.TP
\fB0\fP \- The whole disc or \fIFILE\fR has been copied
.TP
\fB1\fP \- Everything else
.SH SEE ALSO
.P
\fBdvdbackup\fP(1)
.B https://www.videolan.org/developers/libbluray.html
.B https://suckless.org/philosophy/
.SH AUTHOR
bluraybackup was written by Matteo Bini <matteobin@tiepi.it>.

View File

@ -74,6 +74,10 @@ copy_dir(const char path[])
read = dir->read(dir, dirent);
if (read == -1) {
break;
// [libbluray-devel] UDF dir read does not return 1 on EOF
// https://mailman.videolan.org/pipermail/libbluray-devel/2023-September/003297.html
// https://code.videolan.org/videolan/libbluray/-/blob/master/src/libbluray/disc/udf_fs.c#L110
// https://code.videolan.org/videolan/libudfread/-/blob/master/src/udfread.c#L1375
//fprintf(stderr, "Can't read Blu-ray dir %s.\n", path);
//return 0;
}

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
bluraybackup (1.0-1) unstable; urgency=low
* Initial release (Closes: #1055089)
-- Matteo Bini <matteobin@tiepi.it> Tue, 31 Oct 2023 10:42:01 +0100

23
debian/control vendored Normal file
View File

@ -0,0 +1,23 @@
Source: bluraybackup
Section: video
Priority: optional
Maintainer: Matteo Bini <matteobin@tiepi.it>
Build-Depends: debhelper-compat (= 13),
libbluray-dev
Standards-Version: 4.6.2
Vcs-Git: https://git.golem.linux.it/matteobin/bluraybackup.git
Vcs-Browser: https://git.golem.linux.it/matteobin/bluraybackup
Homepage: https://git.golem.linux.it/matteobin/bluraybackup
Rules-Requires-Root: no
Package: bluraybackup
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends}
Suggests: libbluray-bdj
Description: Backup BDMV from the command line
bluraybackup makes a decrypted copy of the whole Blu-ray Disc Movie
or it extracts a decrypted version of a specific BDMV stream.
.
Inspired by dvdbackup, developed in C99 following the suckless
philosophy.

12
debian/copyright vendored Normal file
View File

@ -0,0 +1,12 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: bluraybackup
Upstream-Contact: Matteo Bini <matteobin@tiepi.it>
Source: https://git.golem.linux.it/matteobin/bluraybackup
Files: *
Copyright: © 2023 Matteo Bini <matteobin@tiepi.it>
License: GPL-3+
License: GPL-3
On Debian systems, the complete text of the GNU General Public License
version 3 can be found in "/usr/share/common-licenses/GPL-3".

11
debian/rules vendored Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
SHELL := sh -e
%:
dh $@
override_dh_auto_install:
dh_auto_install -- DESTDIR=${CURDIR}/debian/bluraybackup PREFIX=/usr

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

4
debian/upstream/metadata vendored Normal file
View File

@ -0,0 +1,4 @@
Name: bluraybackup
Contact: Matteo Bini <matteobin@tiepi.it>
Repository: https://git.golem.linux.it/matteobin/bluraybackup.git
Repository-Browse: https://git.golem.linux.it/matteobin/bluraybackup

2
debian/watch vendored Normal file
View File

@ -0,0 +1,2 @@
version=4
https://git.golem.linux.it/matteobin/bluraybackup/releases /matteobin/bluraybackup/archive/([1-9]\.[0-9])\.tar\.gz