[opensuse-buildservice] [PATCH 1/2] [backend] Add support for xz compressed tarballs
Debian sources are also compressed in xz format. Signed-off-by: Hector Oron <hector.oron@collabora.co.uk> --- src/backend/bs_publish | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/backend/bs_publish b/src/backend/bs_publish index dabda6f..bc57a95 100755 --- a/src/backend/bs_publish +++ b/src/backend/bs_publish @@ -1034,7 +1034,7 @@ sub publish { $p = "$bin"; } elsif ($bin =~ /\.raw(:?\.install)?(:?\.sha256)?$/) { $p = "$bin"; - } elsif ($bin =~ /\.tar\.(:?gz|bz2)(:?\.sha256)?$/) { + } elsif ($bin =~ /\.tar\.(:?gz|bz2|xz)(:?\.sha256)?$/) { $p = "$bin"; } elsif ($bin =~ /\.ovf(:?\.sha256)?$/) { $p = "$bin"; -- 1.7.9.1 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
The following patch copies .dsc files into debian style repositories and runs dpkg-scansources to create a source repository for project. It also fixes a typo on dpkg-scanpackages error message, where it warns about apt-ftparchive which is not really in use. Signed-off-by: Hector Oron <hector.oron@collabora.co.uk> --- src/backend/bs_publish | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/src/backend/bs_publish b/src/backend/bs_publish index bc57a95..4613ffe 100755 --- a/src/backend/bs_publish +++ b/src/backend/bs_publish @@ -514,13 +514,15 @@ sub createrepo_debian { unlink("$extrep/Packages"); unlink("$extrep/Packages.gz"); + unlink("$extrep/Sources"); + unlink("$extrep/Sources.gz"); unlink("$extrep/Release"); unlink("$extrep/Release.gpg"); unlink("$extrep/Release.key"); print " running dpkg-scanpackages\n"; - qsystem('chdir', $extrep, 'stdout', 'Packages.new', 'dpkg-scanpackages', '-m', '.', '/dev/null') && print " apt-ftparchive failed: $?\n"; + qsystem('chdir', $extrep, 'stdout', 'Packages.new', 'dpkg-scanpackages', '-m', '.', '/dev/null') && print " dpkg-scanpackages failed: $?\n"; if (-f "$extrep/Packages.new") { link("$extrep/Packages.new", "$extrep/Packages"); qsystem('gzip', '-9', '-f', "$extrep/Packages") && print " gzip Packages failed: $?\n"; @@ -528,6 +530,15 @@ sub createrepo_debian { rename("$extrep/Packages.new", "$extrep/Packages"); } + print " running dpkg-scansources\n"; + qsystem('chdir', $extrep, 'stdout', 'Sources.new', 'dpkg-scansources', '.', '/dev/null') && print " dpkg-scansources failed: $?\n"; + if (-f "$extrep/Sources.new") { + link("$extrep/Sources.new", "$extrep/Sources"); + qsystem('gzip', '-9', '-f', "$extrep/Sources") && print " gzip Sources failed: $?\n"; + unlink("$extrep/Sources"); + rename("$extrep/Sources.new", "$extrep/Sources"); + } + my $date = POSIX::ctime(time()); $date =~ s/\n//m; my $str = <<"EOL"; @@ -574,6 +585,8 @@ sub deleterepo_debian { unlink("$extrep/Packages"); unlink("$extrep/Packages.gz"); + unlink("$extrep/Sources"); + unlink("$extrep/Sources.gz"); unlink("$extrep/Release"); unlink("$extrep/Release.gpg"); unlink("$extrep/Release.key"); @@ -1036,6 +1049,8 @@ sub publish { $p = "$bin"; } elsif ($bin =~ /\.tar\.(:?gz|bz2|xz)(:?\.sha256)?$/) { $p = "$bin"; + } elsif ($bin =~ /\.dsc(:?\.sha256)?$/) { + $p = "$bin"; } elsif ($bin =~ /\.ovf(:?\.sha256)?$/) { $p = "$bin"; } elsif ($bin =~ /\.vmdk(:?\.sha256)?$/) { -- 1.7.9.1 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Thanks, I have merged both submissions of you. bye adrian Am Freitag, 16. März 2012, 20:15:30 schrieb Hector Oron:
The following patch copies .dsc files into debian style repositories and runs dpkg-scansources to create a source repository for project. It also fixes a typo on dpkg-scanpackages error message, where it warns about apt-ftparchive which is not really in use.
Signed-off-by: Hector Oron <hector.oron@collabora.co.uk> --- src/backend/bs_publish | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/src/backend/bs_publish b/src/backend/bs_publish index bc57a95..4613ffe 100755 --- a/src/backend/bs_publish +++ b/src/backend/bs_publish @@ -514,13 +514,15 @@ sub createrepo_debian {
unlink("$extrep/Packages"); unlink("$extrep/Packages.gz"); + unlink("$extrep/Sources"); + unlink("$extrep/Sources.gz"); unlink("$extrep/Release"); unlink("$extrep/Release.gpg"); unlink("$extrep/Release.key");
print " running dpkg-scanpackages\n"; - qsystem('chdir', $extrep, 'stdout', 'Packages.new', 'dpkg-scanpackages', '-m', '.', '/dev/null') && print " apt-ftparchive failed: $?\n"; + qsystem('chdir', $extrep, 'stdout', 'Packages.new', 'dpkg-scanpackages', '-m', '.', '/dev/null') && print " dpkg-scanpackages failed: $?\n"; if (-f "$extrep/Packages.new") { link("$extrep/Packages.new", "$extrep/Packages"); qsystem('gzip', '-9', '-f', "$extrep/Packages") && print " gzip Packages failed: $?\n"; @@ -528,6 +530,15 @@ sub createrepo_debian { rename("$extrep/Packages.new", "$extrep/Packages"); }
+ print " running dpkg-scansources\n"; + qsystem('chdir', $extrep, 'stdout', 'Sources.new', 'dpkg-scansources', '.', '/dev/null') && print " dpkg-scansources failed: $?\n"; + if (-f "$extrep/Sources.new") { + link("$extrep/Sources.new", "$extrep/Sources"); + qsystem('gzip', '-9', '-f', "$extrep/Sources") && print " gzip Sources failed: $?\n"; + unlink("$extrep/Sources"); + rename("$extrep/Sources.new", "$extrep/Sources"); + } + my $date = POSIX::ctime(time()); $date =~ s/\n//m; my $str = <<"EOL"; @@ -574,6 +585,8 @@ sub deleterepo_debian {
unlink("$extrep/Packages"); unlink("$extrep/Packages.gz"); + unlink("$extrep/Sources"); + unlink("$extrep/Sources.gz"); unlink("$extrep/Release"); unlink("$extrep/Release.gpg"); unlink("$extrep/Release.key"); @@ -1036,6 +1049,8 @@ sub publish { $p = "$bin"; } elsif ($bin =~ /\.tar\.(:?gz|bz2|xz)(:?\.sha256)?$/) { $p = "$bin"; + } elsif ($bin =~ /\.dsc(:?\.sha256)?$/) { + $p = "$bin"; } elsif ($bin =~ /\.ovf(:?\.sha256)?$/) { $p = "$bin"; } elsif ($bin =~ /\.vmdk(:?\.sha256)?$/) {
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Adrian Schröter
-
Hector Oron