package src:roundcube
tags 736782 + patch
thanks
On 26-Jan-2014, bastien ROUCARIES wrote:
> I could not find the source of:
> roundcube 0.9.5-4 (source)
>
> program/js/jquery.min.js
> program/js/jstz.min.js
> plugins/jqueryui/js/jquery-ui-1.9.1.custom.min.js
There are other non-source files which should not be redistributed
without confidence they have corresponding source in Debian. The
simpler course is just to remove all those non-source JavaScript
files.
The attached patches against the current Git “master” branch add a
‘debian/repack’ program and invoke it from ‘uscan’.
--
\ “I have never made but one prayer to God, a very short one: ‘O |
`\ Lord, make my enemies ridiculous!’ And God granted it.” |
_o__)—Voltaire |
Ben Finney
From 23266fa6213c2a2b1860b6fd45fa694777f98545 Mon Sep 17 00:00:00 2001
From: Ben Finney
Date: Thu, 8 May 2014 11:32:11 +1000
Subject: [PATCH 1/3] Add program for re-pack of the Debian source package.
---
debian/changelog | 9 +++-
debian/repack| 97
debian/source_package_build.bash | 52 +
3 files changed, 156 insertions(+), 2 deletions(-)
create mode 100755 debian/repack
create mode 100644 debian/source_package_build.bash
diff --git a/debian/changelog b/debian/changelog
index 8168a36..adac095 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,10 +13,15 @@ roundcube (1.0.0-1) UNRELEASED; urgency=low
db.inc.php will be zeroed out and we will still patch the
defaults.inc.php to point to the appropriate DB data (or
config.inc.php?).
- * Handle those sourceless files. That's a pain.
* Check changes to update debian/copyright.
- -- Vincent Bernat Sat, 12 Apr 2014 09:44:39 +0200
+ [ Ben Finney ]
+
+ * debian/repack, debian/source_package_build.bash:
++ Add program for re-pack of the Debian source package, to omit
+ non-source files.
+
+ --
roundcube (0.9.5-4) unstable; urgency=low
diff --git a/debian/repack b/debian/repack
new file mode 100755
index 000..d32ece1
--- /dev/null
+++ b/debian/repack
@@ -0,0 +1,97 @@
+#! /bin/bash
+#
+# debian/repack
+# Part of the Debian package ‘roundcube’.
+#
+# Copyright © 2013–2014 Ben Finney
+# This is free software; you may copy, modify and/or distribute this work
+# under the terms of the GNU General Public License, version 3 or later.
+# No warranty expressed or implied. See the file ‘LICENSE’ for details.
+
+# Convert the pristine upstream source to the Debian upstream source.
+#
+# This program is designed for use with the ‘uscan(1)’ tool, as the
+# “action” parameter for the ‘debian/watch’ configuration file.
+
+set -o errexit
+set -o errtrace
+set -o pipefail
+set -o nounset
+
+program_dir="$(dirname "$(realpath --strip "$0")")"
+source "${program_dir}"/source_package_build.bash
+
+function usage() {
+local progname=$(basename $0)
+printf "$progname --upstream-version VERSION FILENAME\n"
+}
+
+if [ $# -ne 3 ] ; then
+usage
+exit 1
+fi
+
+upstream_version="$2"
+downloaded_file="$3"
+
+target_filename="${upstream_tarball_basename}.tar.gz"
+target_working_file="${working_dir}/${target_filename}"
+target_file="$(dirname "${downloaded_file}")/${target_filename}"
+
+repack_dir="${working_dir}/${upstream_dirname}"
+
+printf "Unpacking pristine upstream source ‘${downloaded_file}’:\n"
+
+extract_tarball_to_working_dir "${downloaded_file}"
+
+upstream_source_dirname=$(ls -1 "${working_dir}")
+upstream_source_dir="${working_dir}/${upstream_source_dirname}"
+
+printf "Repackaging upstream source from ‘${upstream_source_dir}’ to ‘${repack_dir}’:\n"
+
+mv "${upstream_source_dir}" "${repack_dir}"
+
+printf "Removing non-source files:\n"
+
+source_omit_files=(
+# Third-party libraries in non-source form, and related files.
+plugins/acl/*.min.js
+plugins/archive/*.min.js
+plugins/attachment_reminder/*.min.js
+plugins/enigma/*.min.js
+plugins/help/*.min.js
+plugins/hide_blockquote/*.min.js
+plugins/jqueryui/
+plugins/managesieve/*.min.js
+plugins/markasjunk/*.min.js
+plugins/newmail_notifier/*.min.js
+plugins/password/*.min.js
+plugins/userinfo/*.min.js
+plugins/vcard_attachments/*.min.js
+plugins/zipdownload/*.min.js
+program/js/*.min.js
+program/js/tiny_mce/
+)
+
+for fileglob in "${source_omit_files[@]}" ; do
+rm -v -r "${repack_dir}"/$fileglob
+done
+
+printf "Rebuilding DFSG-free upstream source tarball:\n"
+
+archive_working_dirname_to_tarball "${upstream_dirname}" "${target_working_file}"
+
+printf "Moving completed upstream tarball to ‘${target_file}’:\n"
+
+rm -v "${downloaded_file}"
+mv "${target_working_file}" "${target_file}"
+
+printf "Done.\n"
+
+
+# Local variables:
+# coding: utf-8
+# mode: sh
+# indent-tabs-mode: nil
+# End:
+# vim: filee