Mageia Bugzilla – Attachment 12476 Details for
Bug 28607
"alien" does not convert rpm-packages to deb-packages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Deb.pm.patch
Deb.pm.patch (text/plain), 2.35 KB, created by
Alex Kotov
on 2021-03-18 20:58:14 CET
(
hide
)
Description:
Deb.pm.patch
Filename:
MIME Type:
Creator:
Alex Kotov
Created:
2021-03-18 20:58:14 CET
Size:
2.35 KB
patch
obsolete
>--- a/Alien/Package/Deb.pm 2020-03-29 07:07:08.000000000 +0300 >+++ b/Alien/Package/Deb.pm 2018-09-18 14:12:15.000000000 +0300 >@@ -282,14 +282,17 @@ > # Read in the list of all files. > # Note that tar doesn't supply a leading '/', so we have to add that. > my $datamember_cmd; >+ >+ my $filter = sub { return @_; }; > if ($this->have_dpkg_deb) { > $datamember_cmd = "dpkg-deb --fsys-tarfile '$file'"; >+ $filter = sub { my $aref = shift; require MDK::Common; return [ grep { !MDK::Common::member($_, qw(/ /bin/ /boot/ /etc/ /home/ /lib/ /lib64 /opt/ /usr/ /usr/bin/ /usr/lib/ /usr/lib64/ /usr/local/ /usr/local/share /usr/share/ /usr/share/doc/ /usr/share/applications/ /var/)) } @$aref]; }; > } > else { > $datamember_cmd = $this->get_datamember_cmd($file); > } >- my @filelist=map { chomp; s:\./::; "/$_" } >- $this->runpipe(0, "$datamember_cmd | tar tf -"); >+ my @filelist= @{$filter->([map { chomp; s:\./::; "/$_" } >+ $this->runpipe(0, "$datamember_cmd | tar tf -")])}; > $this->filelist(\@filelist); > > # Read in the scripts, if any. >@@ -459,7 +462,7 @@ > > # Use debhelper v7 > open (OUT, ">$dir/debian/compat") || die "$dir/debian/compat: $!"; >- print OUT "10\n"; >+ print OUT "7\n"; > close OUT; > > # A minimal rules file. >@@ -471,35 +474,48 @@ > > PACKAGE=\$(shell dh_listpackages) > >-%: >- dh $@ >+build: >+ dh_testdir > >-override_dh_clean: >+clean: >+ dh_testdir >+ dh_testroot > dh_clean -d > >-override_dh_auto_configure: >+binary-indep: build >+ >+binary-arch: build >+ dh_testdir >+ dh_testroot >+ dh_prep >+ dh_installdirs > >-override_dh_auto_build: >+ dh_installdocs >+ dh_installchangelogs > >-override_dh_auto_install: >- # Copy the packages's files. >+# Copy the packages's files. > find . -maxdepth 1 -mindepth 1 -not -name debian -print0 | \\ > xargs -0 -r -i cp -a {} debian/\$(PACKAGE) >+ > # > # If you need to move files around in debian/\$(PACKAGE) or do some > # binary patching, do it here > # > >-override_dh_strip: >-# This has been known to break on some wacky binaries. >- # dh_strip > >-override_dh_fixperms: >+# This has been known to break on some wacky binaries. >+# dh_strip >+ dh_compress > $fixpermscomment dh_fixperms >- >-override_dh_shlibdeps: >+ dh_makeshlibs >+ dh_installdeb > -dh_shlibdeps >+ dh_gencontrol >+ dh_md5sums >+ dh_builddeb > >+binary: binary-indep binary-arch >+.PHONY: build clean binary-indep binary-arch binary > EOF > close OUT; > $this->do("chmod", 755, "$dir/debian/rules");
--- a/Alien/Package/Deb.pm 2020-03-29 07:07:08.000000000 +0300 +++ b/Alien/Package/Deb.pm 2018-09-18 14:12:15.000000000 +0300 @@ -282,14 +282,17 @@ # Read in the list of all files. # Note that tar doesn't supply a leading '/', so we have to add that. my $datamember_cmd; + + my $filter = sub { return @_; }; if ($this->have_dpkg_deb) { $datamember_cmd = "dpkg-deb --fsys-tarfile '$file'"; + $filter = sub { my $aref = shift; require MDK::Common; return [ grep { !MDK::Common::member($_, qw(/ /bin/ /boot/ /etc/ /home/ /lib/ /lib64 /opt/ /usr/ /usr/bin/ /usr/lib/ /usr/lib64/ /usr/local/ /usr/local/share /usr/share/ /usr/share/doc/ /usr/share/applications/ /var/)) } @$aref]; }; } else { $datamember_cmd = $this->get_datamember_cmd($file); } - my @filelist=map { chomp; s:\./::; "/$_" } - $this->runpipe(0, "$datamember_cmd | tar tf -"); + my @filelist= @{$filter->([map { chomp; s:\./::; "/$_" } + $this->runpipe(0, "$datamember_cmd | tar tf -")])}; $this->filelist(\@filelist); # Read in the scripts, if any. @@ -459,7 +462,7 @@ # Use debhelper v7 open (OUT, ">$dir/debian/compat") || die "$dir/debian/compat: $!"; - print OUT "10\n"; + print OUT "7\n"; close OUT; # A minimal rules file. @@ -471,35 +474,48 @@ PACKAGE=\$(shell dh_listpackages) -%: - dh $@ +build: + dh_testdir -override_dh_clean: +clean: + dh_testdir + dh_testroot dh_clean -d -override_dh_auto_configure: +binary-indep: build + +binary-arch: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs -override_dh_auto_build: + dh_installdocs + dh_installchangelogs -override_dh_auto_install: - # Copy the packages's files. +# Copy the packages's files. find . -maxdepth 1 -mindepth 1 -not -name debian -print0 | \\ xargs -0 -r -i cp -a {} debian/\$(PACKAGE) + # # If you need to move files around in debian/\$(PACKAGE) or do some # binary patching, do it here # -override_dh_strip: -# This has been known to break on some wacky binaries. - # dh_strip -override_dh_fixperms: +# This has been known to break on some wacky binaries. +# dh_strip + dh_compress $fixpermscomment dh_fixperms - -override_dh_shlibdeps: + dh_makeshlibs + dh_installdeb -dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary EOF close OUT; $this->do("chmod", 755, "$dir/debian/rules");
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28607
:
12474
|
12475
| 12476