标签归档:alien

How to convert lantern debian/ubuntu deb package to CentOS/fedora rpm/yum package

Install deb to rpm tool

sudo dnf install alien

Download ubuntu deb file

Download url :https://github.com/getlantern/lantern/releases/tag/latest

Convert deb to rpm

sudo alien -r lantern-installer-64-bit.deb

Install rpm

sudo dnf install lantern-4.0.1-2.x86_64.rpm

Get Error:“conflicts with file from package filesystem”

Rebuild RPM

sudo dnf install rpmrebuild
sudo rpmrebuild -pe lantern-4.0.1-2.x86_64.rpm

Comment lines in rebuild file

(Converted from a deb package by alien version 8.95.)
%files
#%dir %attr(0755, root, root) "/"
#%dir %attr(0755, root, root) "/usr"
#%dir %attr(0755, root, root) "/usr/bin"
%attr(0777, root, root) "/usr/bin/lantern"
#%dir %attr(0755, root, root) "/usr/lib"
%dir %attr(0755, root, root) "/usr/lib/lantern"
%attr(0644, root, root) "/usr/lib/lantern/.packaged-lantern.yaml"
%attr(0644, root, root) "/usr/lib/lantern/lantern-binary"
%attr(0755, root, root) "/usr/lib/lantern/lantern.sh"
%attr(0644, root, root) "/usr/lib/lantern/lantern.yaml"
#%dir %attr(0755, root, root) "/usr/share"
#%dir %attr(0755, root, root) "/usr/share/applications"
%attr(0644, root, root) "/usr/share/applications/lantern.desktop"
#%dir %attr(0755, root, root) "/usr/share/doc"
%dir %attr(0755, root, root) "/usr/share/doc/lantern"
%doc %attr(0644, root, root) "/usr/share/doc/lantern/changelog.gz"
%doc %attr(0644, root, root) "/usr/share/doc/lantern/copyright"
#%dir %attr(0755, root, root) "/usr/share/icons"
#%dir %attr(0755, root, root) "/usr/share/icons/hicolor"
#%dir %attr(0755, root, root) "/usr/share/icons/hicolor/128x128"
#%dir %attr(0755, root, root) "/usr/share/icons/hicolor/128x128/apps"
%attr(0644, root, root) "/usr/share/icons/hicolor/128x128/apps/lantern.png"
%changelog

Install again

sudo rpm -i /root/rpmbuild/RPMS/x86_64/lantern-4.0.1-2.x86_64.rpm

Install libappindicator

sudo dnf install libappindicator-gtk3

Refs

alien:deb(ubuntu/debian)与rpm(centos/fedora)转换工具

deb 与 rpm 是GNU/Linux 流行的软件包格式。我们“alien”可以在rpm\dpkg\slackware tgz\deb\slp 格式见进行转换。

Debian/Ubuntu 可使用下面命令安装alien:

sudo apt-get install alien

从RPM转到DEB

举例:假设在目录/tmp 有myprogram.rpm 文件,使用下面命令转换:

sudo alien /tmp/myprogram-1.10-2.i386.rpm

myprogram-1.10-3.i386.deb generated

这时,在/tmp 目录下就会发现有 myprogram.deb ,这时就可以使用dpkg安装:

dpkg -i /tmp/miprogramma.deb

从DEB转到RPM

直接添加参数-r进行转换即可:

sudo alien -r pytube_0.0.8.1-1_all.deb

pytube-0.0.8.1-2.noarch.rpm generated

使用帮助

输入alien可以查看帮助

Usage: alien [options] file [...]
  file [...]                Package file or files to convert.
  -d, --to-deb              Generate a Debian deb package (default).
     Enables these options:
       --patch=<patch>      Specify patch file to use instead of automatically
                            looking for patch in /var/lib/alien.
       --nopatch        Do not use patches.
       --anypatch           Use even old version os patches.
       -s, --single         Like --generate, but do not create .orig
                            directory.
       --fixperms           Munge/fix permissions and owners.
       --test               Test generated packages with lintian.
  -r, --to-rpm              Generate a Red Hat rpm package.
      --to-slp              Generate a Stampede slp package.
  -l, --to-lsb              Generate a LSB package.
  -t, --to-tgz              Generate a Slackware tgz package.
     Enables these options:
       --description=<desc> Specify package description.
       --version=<version>  Specify package version.
  -p, --to-pkg              Generate a Solaris pkg package.
  -i, --install             Install generated package.
  -g, --generate            Generate build tree, but do not build package.
  -c, --scripts             Include scripts in package.
      --target=<arch>       Set architecture of the generated package.
  -v, --verbose             Display each command alien runs.
      --veryverbose         Be verbose, and also display output of run commands.
  -k, --keep-version        Do not change version of generated package.
      --bump=number         Increment package version by this number.
  -h, --help                Display this help message.
  -V, --version         Display alien's version number.

在fedora下安装xmind

下载xmind的deb包:http://www.xmind.net/download/linux/,然后

yum install alien.noarch
sudo alien --scripts -r xmind-linux-3.4.1.201401221918_amd64.deb
sudo yum localinstall xmind-3.4.1-2.x86_64.rpm

也可以直接下载支持所有平台的绿色便携包(不会自动创建桌面快捷方式):http://www.xmind.net/download/portable/