summaryrefslogtreecommitdiffstats
path: root/content/posts/bitwig-studio-on-fedora-32/index.org
blob: 6f5ae1fda69ac45927715efa9d5eae80cca3fc23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#+TITLE: Installing Bitwig Studio on Fedora 32
#+DATE: 2020-06-30T23:02:26-04:00
#+DRAFT: false
#+DESCRIPTION: How to install Bitwig Studio on Fedora 32
#+TAGS[]: fedora linux music
#+KEYWORDS[]: fedora linux bitwig-studio
#+SLUG:
#+SUMMARY:

#+ATTR_HTML: :alt Bitwig studio on Fedora 32
#+ATTR_HTML: :title Bitwig studio on Fedora 32
[[file:cover.png]]

[[https://www.bitwig.com/en/home.html][Bitwig Studio]] is an amazing cross platform digital audio workstation
(DAW). One of its best features, at least for me, is that it works on
Linux, which is pretty rare in the professional audio world.

While they say on their website that they support "Linux", what they
mean is that they support Debian-based distributions like Ubuntu, as
they only provide =.deb= packages. Fortunately for Fedora users,
there's a way to get around that using =alien=, an application that
lets us convert =.deb= packages into =.rpm= format.

Unfortunately =alien= isn't able to convert the package
automatically. The theory is that you should be able install =alien=
and run =sudo alien -r bitwig-studio-3.2.3.deb=, and it will output a
working =.rpm= package. The package it produces looks viable, but when
you go to install it =dnf= produces an error that looks something like
this

#+BEGIN_SRC
$ sudo dnf install bitwig-studio-3.2.3-2.x86_64.rpm
Dependencies resolved.
=====================================================================================================================
 Package                        Architecture            Version                  Repository                     Size
=====================================================================================================================
Upgrading:
 bitwig-studio                  x86_64                  3.2.3-2                  @commandline                  183 M

Transaction Summary
=====================================================================================================================
Upgrade  1 Package

Total size: 183 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
  file / from install of bitwig-studio-3.2.3-2.x86_64 conflicts with file from package filesystem-3.14-2.fc32.x86_64
  file /usr/bin from install of bitwig-studio-3.2.3-2.x86_64 conflicts with file from package filesystem-3.14-2.fc32.x86_64

#+END_SRC

This seems to be the case with every package I've tried converting
with =alien=, it appears to be a bug that's cropped up since its last
release in 2016.

It's caused by =alien= leaving the paths =/= and =/usr/bin= in the
package's manifest, which are both owned by the =filesystem=
package. As luck would have it, we can work around this too.

In addition to the =alien= package, we're also going to have to
install the =rpm-build= package.

#+BEGIN_SRC shell
sudo dnf install alien rpm-build
#+END_SRC

Then we convert the package to the =rpm= format, but instead of saving
it as a package, we create a directory with the necessary build files.

#+BEGIN_SRC shell
sudo alien -r -g bitwig-studio-3.2.3.deb
#+END_SRC

Then we enter the directory, which should be named the same as the
debian package minus the =.deb= file extension. In there we edit the
=.spec= file and remove the offending lines.

#+BEGIN_SRC diff
--- bitwig-studio-3.2.3-2.spec
+++ bitwig-studio-3.2.3-2.spec.new
@@ -18,7 +18,6 @@
 (Converted from a deb package by alien version 8.95.)

 %files
-%dir "/"
 %dir "/usr/"
 %dir "/usr/share/"
 %dir "/usr/share/applications/"
@@ -40,7 +39,6 @@
 "/usr/share/icons/hicolor/scalable/mimetypes/application-bitwig-project-folder.svg"
 "/usr/share/icons/hicolor/scalable/mimetypes/application-bitwig-clip.svg"
 "/usr/share/icons/hicolor/scalable/mimetypes/application-bitwig-project.svg"
-%dir "/usr/bin/"
 %dir "/opt/"
 %dir "/opt/bitwig-studio/"
 "/opt/bitwig-studio/EULA.txt"
#+END_SRC

After this we build a binary package using =rpmbuild=.

#+BEGIN_SRC shell
sudo rpmbuild --buildroot=/path/to/bitwig-studio-3.2.3/ -bb bitwig-studio-3.2.3-2.spec
#+END_SRC

You must specify the full path in the =--buildroot== argument.

The created =.rpm= package should now be up a directory, next to the initial
=.deb= file. To install it we run

#+BEGIN_SRC shell
cd ..   # go up to where the rpm is located
sudo dnf install bitwig-studio-3.2.3-2.x86_64.rpm
#+END_SRC

In previous version of the Bitwig, there was an issue where it would
fail to start, complaining that =libbz2.so.1.0= was missing. This
could be solved by creating a symbolic link to the system's version.

#+BEGIN_SRC shell
sudo ln -s /usr/lib64/libbz2.so.1 /opt/bitwig-studio/lib/bitwig-studio/libbz2.so.1.0
#+END_SRC

It doesn't seem to be an issue with the latest release, but I'll leave
it here in case it happens again.

That's it, Bitwig Studio should be installed and ready to go!