Skip to content
Commits on Source (7)
unarr README.source - Downloading the source tarball.
-----------------------------------------------------
The unarr project does not have any git tags defined at the time
of writing. As a result, uscan cannot download unarr sources.
As a workaround, this package implements the traditional target
get-orig-source to create the source orig tarball. Besides
downloading, this also handles upstream's DOS line endings.
The upstream uses DOS crlf line endings. In order to fix this, the
unarr packaging implements the traditional get-orig-source target
which downloads and repacks the source tarball using regular linux lf
line endings.
The target is usually invoked as 'make -f debian/rules get-orig-source'
or './debian/rules get-orig-source'.
which leaves the downloaded .orig. tarball in the parent directory.
unarr (0~20150801.d1be8c43-1) unstable; urgency=medium
unarr (0~20150801.d1be8c4-1) unstable; urgency=medium
* Initial release (Closes: #907070)
......
# A simple typo in a comment, not worth issuing a PR.
libunarr1 binary: spelling-error-in-binary *
libunarr.so.1 libunarr1 #MINVER#
* Build-Depends-Package: libunarr-dev
libunarr.so.1 #PACKAGE# #MINVER#
ar_at_eof@Base 0~20150801.d1be8c4
ar_close@Base 0~20150801.d1be8c4
ar_close_archive@Base 0~20150801.d1be8c4
ar_entry_get_filetime@Base 0~20150801.d1be8c4
ar_entry_get_name@Base 0~20150801.d1be8c4
ar_entry_get_offset@Base 0~20150801.d1be8c4
ar_entry_get_size@Base 0~20150801.d1be8c4
ar_entry_uncompress@Base 0~20150801.d1be8c4
ar_get_global_comment@Base 0~20150801.d1be8c4
ar_open_7z_archive@Base 0~20150801.d1be8c4
ar_open_rar_archive@Base 0~20150801.d1be8c4
ar_open_tar_archive@Base 0~20150801.d1be8c4
ar_open_zip_archive@Base 0~20150801.d1be8c4
ar_parse_entry@Base 0~20150801.d1be8c4
ar_parse_entry_at@Base 0~20150801.d1be8c4
ar_parse_entry_for@Base 0~20150801.d1be8c4
ar_read@Base 0~20150801.d1be8c4
ar_seek@Base 0~20150801.d1be8c4
ar_skip@Base 0~20150801.d1be8c4
ar_tell@Base 0~20150801.d1be8c4
......@@ -7,7 +7,6 @@ Origin: https://github.com/selmf/unarr
Add a CMakelists.txt and pkg-config .pc file from said upstream, a more
elaborated version of the original sources. Submitted to upstream as
https://github.com/zeniko/unarr/issues/9.
---
CMakeLists.txt | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++
pkg-config.pc.cmake | 11 ++++
......
......@@ -3,13 +3,6 @@ Date: Sun, 2 Sep 2018 10:40:02 -0400
Subject: Build: fix as-needed madness.
---
For gcc, the --as-needed linker flags must come after object files, before
the libraries. If given as first flag, the library is linked as an
application. If given after the libraries, it's useless.
A proper patch to the cmake build system seems really hard. For now,
disabling as-needed completely leading to some useless runtime linkage.
CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
......
From: Alec Leamas <leamas.alec@nowhere.net>
Date: Fri, 7 Sep 2018 16:02:20 -0400
Subject: unarr.h: Mark functions as visible.
---
unarr.h | 42 ++++++++++++++++++++++--------------------
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/unarr.h b/unarr.h
index 5ef7447..2555017 100644
--- a/unarr.h
+++ b/unarr.h
@@ -4,6 +4,8 @@
#ifndef unarr_h
#define unarr_h
+#define VISIBLE __attribute__ ((visibility ("default")))
+
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
@@ -30,65 +32,65 @@ ar_stream *ar_open_istream(IStream *stream);
#endif
/* closes the stream and releases underlying resources */
-void ar_close(ar_stream *stream);
+VISIBLE void ar_close(ar_stream *stream);
/* tries to read 'count' bytes into buffer, advancing the read offset pointer; returns the actual number of bytes read */
-size_t ar_read(ar_stream *stream, void *buffer, size_t count);
+VISIBLE size_t ar_read(ar_stream *stream, void *buffer, size_t count);
/* moves the read offset pointer (same as fseek); returns false on failure */
-bool ar_seek(ar_stream *stream, off64_t offset, int origin);
+VISIBLE bool ar_seek(ar_stream *stream, off64_t offset, int origin);
/* shortcut for ar_seek(stream, count, SEEK_CUR); returns false on failure */
-bool ar_skip(ar_stream *stream, off64_t count);
+VISIBLE bool ar_skip(ar_stream *stream, off64_t count);
/* returns the current read offset (or 0 on error) */
-off64_t ar_tell(ar_stream *stream);
+VISIBLE off64_t ar_tell(ar_stream *stream);
/***** common/unarr *****/
typedef struct ar_archive_s ar_archive;
/* frees all data stored for the given archive; does not close the underlying stream */
-void ar_close_archive(ar_archive *ar);
+VISIBLE void ar_close_archive(ar_archive *ar);
/* reads the next archive entry; returns false on error or at the end of the file (use ar_at_eof to distinguish the two cases) */
-bool ar_parse_entry(ar_archive *ar);
+VISIBLE bool ar_parse_entry(ar_archive *ar);
/* reads the archive entry at the given offset as returned by ar_entry_get_offset (offset 0 always restarts at the first entry); should always succeed */
-bool ar_parse_entry_at(ar_archive *ar, off64_t offset);
+VISIBLE bool ar_parse_entry_at(ar_archive *ar, off64_t offset);
/* reads the (first) archive entry associated with the given name; returns false if the entry couldn't be found */
-bool ar_parse_entry_for(ar_archive *ar, const char *entry_name);
+VISIBLE bool ar_parse_entry_for(ar_archive *ar, const char *entry_name);
/* returns whether the last ar_parse_entry call has reached the file's expected end */
-bool ar_at_eof(ar_archive *ar);
+VISIBLE bool ar_at_eof(ar_archive *ar);
/* returns the name of the current entry as UTF-8 string; this pointer is only valid until the next call to ar_parse_entry; returns NULL on failure */
-const char *ar_entry_get_name(ar_archive *ar);
+VISIBLE const char *ar_entry_get_name(ar_archive *ar);
/* returns the stream offset of the current entry for use with ar_parse_entry_at */
-off64_t ar_entry_get_offset(ar_archive *ar);
+VISIBLE off64_t ar_entry_get_offset(ar_archive *ar);
/* returns the total size of uncompressed data of the current entry; read exactly that many bytes using ar_entry_uncompress */
-size_t ar_entry_get_size(ar_archive *ar);
+VISIBLE size_t ar_entry_get_size(ar_archive *ar);
/* returns the stored modification date of the current entry in 100ns since 1601/01/01 */
-time64_t ar_entry_get_filetime(ar_archive *ar);
+VISIBLE time64_t ar_entry_get_filetime(ar_archive *ar);
/* WARNING: don't manually seek in the stream between ar_parse_entry and the last corresponding ar_entry_uncompress call! */
/* uncompresses the next 'count' bytes of the current entry into buffer; returns false on error */
-bool ar_entry_uncompress(ar_archive *ar, void *buffer, size_t count);
+VISIBLE bool ar_entry_uncompress(ar_archive *ar, void *buffer, size_t count);
/* copies at most 'count' bytes of the archive's global comment (if any) into buffer; returns the actual amout of bytes copied (or, if 'buffer' is NULL, the required buffer size) */
-size_t ar_get_global_comment(ar_archive *ar, void *buffer, size_t count);
+VISIBLE size_t ar_get_global_comment(ar_archive *ar, void *buffer, size_t count);
/***** rar/rar *****/
/* checks whether 'stream' could contain RAR data and prepares for archive listing/extraction; returns NULL on failure */
-ar_archive *ar_open_rar_archive(ar_stream *stream);
+VISIBLE ar_archive *ar_open_rar_archive(ar_stream *stream);
/***** tar/tar *****/
/* checks whether 'stream' could contain TAR data and prepares for archive listing/extraction; returns NULL on failure */
-ar_archive *ar_open_tar_archive(ar_stream *stream);
+VISIBLE ar_archive *ar_open_tar_archive(ar_stream *stream);
/***** zip/zip *****/
/* checks whether 'stream' could contain ZIP data and prepares for archive listing/extraction; returns NULL on failure */
/* set deflatedonly for extracting XPS, EPUB, etc. documents where non-Deflate compression methods are not supported by specification */
-ar_archive *ar_open_zip_archive(ar_stream *stream, bool deflatedonly);
+VISIBLE ar_archive *ar_open_zip_archive(ar_stream *stream, bool deflatedonly);
/***** _7z/_7z *****/
/* checks whether 'stream' could contain 7Z data and prepares for archive listing/extraction; returns NULL on failure */
-ar_archive *ar_open_7z_archive(ar_stream *stream);
+VISIBLE ar_archive *ar_open_7z_archive(ar_stream *stream);
#endif
0001-Build-Add-a-.gitignore.patch
0002-build-Add-Cmake-files-from-https-github.com-selmf-un.patch
0003-Build-fix-as-needed-madness.patch
0004-unarr.h-Mark-functions-as-visible.patch
......@@ -11,20 +11,19 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all
override_dh_auto_test:
echo "No tests available."
# Upstream hasn't tagged the source so we cannot use uscan, see
# https://github.com/zeniko/unarr/issues/8. Implement get-orig-source
# which allows source downloading. While we are on it,
# fix upstream dos line endings.
# Implement get-orig-source to handle upstream's dos line endings.
VERSION = $(DEB_VERSION_UPSTREAM)
COMMIT = $(word 2, $(subst ., , $(VERSION)))
get-orig-source:
wget https://github.com/zeniko/unarr/archive/$(COMMIT)/unarr-$(VERSION).tar.gz
test -d utmp || mkdir utmp; rm -rf utmp/*
mv unarr-$(VERSION).tar.gz utmp
cd utmp; tar xaf unarr-$(VERSION).tar.gz; mv unarr-$(COMMIT)* unarr-$(COMMIT)
cd utmp/unarr-$(COMMIT); \
rm -rf utmp; mkdir utmp
uscan --safe --force-download --compression gzip --destdir utmp
cd utmp; tar xf unarr-$(VERSION).tar.gz
cd utmp/unarr-$(VERSION); \
dos2unix -q $$(find . -name \*.c -o -name \*.h -o -name \*.txt)
cd utmp; tar caf unarr-$(VERSION).tar.gz unarr-$(COMMIT)
mk-origtargz --compression bzip2 --repack utmp/unarr-$(VERSION).tar.gz \
&& rm -rf utmp
cd utmp; \
mv unarr-$(VERSION) unarr-$(VERSION).orig; \
tar -caf unarr-$(VERSION).orig.tar.gz unarr-$(VERSION).orig
mk-origtargz --compression gzip \
--rename \
--repack \
utmp/unarr-$(VERSION).orig.tar.gz && rm -rf utmp
# The project does not define a testsuite.
unarr source: testsuite-autopkgtest-missing
# The project has no source tags and using uscan is thus hard.
unarr source: debian-watch-file-is-missing
# get-orig-source is used to get rid of upstream crlf line endings.
unarr source: debian-rules-contains-unnecessary-get-orig-source-target
# Old compat level 9 is used to support Ubuntu backports
unarr source: package-uses-old-debhelper-compat-version 9
# There is no known way to provide gpg signatures from raw git commits.
unarr source: debian-watch-does-not-check-gpg-signature
Name: unarr
Repository: https://github.com/zeniko/unarr/
Bug-Database: https://github.com/zeniko/unarr/issues
Bug-Submit: https://github.com/zeniko/unarr/issues/new
Name: unarr
Repository: https://github.com/zeniko/unarr.git
Repository-Browse: https://github.com/zeniko/unarr/
version=4
opts="mode=git,pretty=0~%cd.%h" https://github.com/zeniko/unarr.git HEAD
# Issue asking for release tags:
# https://github.com/zeniko/unarr/issues/8