summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-10-09 15:02:31 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-10-09 15:02:31 +0300
commit0ebc4a72ff4cf8ce8510c697360da7053161350b (patch)
tree9f9de2cbc632c93c49b2d4e1c5d89afbaa226b9b
parent901bb5b664986baffdce364e3ff661a036bd7227 (diff)
downloaddh-illumos-0ebc4a72ff4cf8ce8510c697360da7053161350b.tar.gz
Put source in the right place
-rwxr-xr-xdh_illumos_gate21
1 files changed, 13 insertions, 8 deletions
diff --git a/dh_illumos_gate b/dh_illumos_gate
index f63fc17..d336861 100755
--- a/dh_illumos_gate
+++ b/dh_illumos_gate
@@ -135,6 +135,7 @@ init(
my %options = ( file => 'debian/changelog' );
my $changelog = changelog_parse(%options);
my $version = $changelog->{'Version'};
+my $cwd = getcwd();
my @tar_X = ();
if ( defined( $dh{'EXCLUDE'} ) && $dh{'EXCLUDE'} ) {
@@ -147,26 +148,31 @@ if ( defined( $dh{'EXCLUDE'} ) && $dh{'EXCLUDE'} ) {
if ( $dh{CREATE_ORIG} ) {
my $source = $changelog->{'Source'};
my $source_version = $version =~ s!^(.*)-[^-]+$!$1!r;
- my $tarball = "../${source}_${source_version}.orig.tar.xz";
- doit( 'tar', '-c', '-J', '--owner=0', '--group=0', '--mode=u=rwX,go=rX',
- '-f', $tarball, @tar_X, @ARGV );
+ my $tarball = "$cwd/../${source}_${source_version}.orig.tar.xz";
+ my $base = "$source-$source_version";
+ doit(
+ 'tar', '-c', '-J', '--owner',
+ '0', '--group', '0', '--mode',
+ 'u=rwX,go=rX', '--transform', "s,^,$base/,", '-f',
+ $tarball, @tar_X, @ARGV
+ );
exit;
}
else {
- my $VER;
+ my $ver;
if ( $version =~ /^(\d+(\.\d+)+(\.git\w+)?).*$/ ) {
- $VER = $1;
+ $ver = $1;
}
else {
error( "Could not determine illumos source version from changelog. "
. "It should be like 5.10.6.gitXYZ+1, but it is '$version'" );
}
- my $tarball = "/usr/src/illumos-gate/illumos-gate-$VER.tar.xz";
+ my $tarball = "/usr/src/illumos-gate/illumos-gate-$ver.tar.xz";
if ( !-f $tarball ) {
error(
-"$tarball does not exist. You might not have package illumos-source-$VER "
+"$tarball does not exist. You might not have package illumos-source-$ver "
. "installed or have a typo in debian/changelog" );
}
@@ -382,7 +388,6 @@ to make them available from makefiles.
=cut
-my $cwd = getcwd();
chdir $dh{DESTDIR};
my $codemgr_ws = getcwd();
chdir $cwd;