Closed pgr0ss closed 11 months ago
We do plan to support it, it missed the last release due to a delay in the official docker image being released but it will almost certainly be included in the next passenger release.
Is there an ETA for Debian 12 "bookworm"? I know this is the most hated question. The reason I aks is because Debian 11 uses openssl 1.1.1 and openssl 1.1.1 is EOF on 11 Sep 2023. So we like to move to Debian 12 "bookworm" which uses openssl 3.x Thanks!
Is there an ETA for Debian 12 "bookworm"?
soon™
Is there a workaround like building the package manually in the meantime of soon™ becomes now™? Thanks.
The following packages have unmet dependencies:
libnginx-mod-http-passenger : Depends: nginx-common (< 1.18.1) but 1.22.1-9 is to be installed
@aurels absolutely, just checkout passenger & submodules then use the build script for the debian package, something like this:
git clone https://github.com/phusion/passenger.git
cd passenger
git submodule init
git submodule update
cd packaging/debian
mkdir /tmp/{c,o,w}
./build -p ../../ -c /tmp/c -o /tmp/o -w /tmp/w -d bookworm pkg:all
Then the packages will be in /tmp/o
Thanks @CamJN, I'll try !
I tried to run the commands on a fresh Debian 12 installation, and it gave this error in the end.
root@ruby:~# git clone https://github.com/phusion/passenger.git
Cloning into 'passenger'...
remote: Enumerating objects: 90944, done.
remote: Counting objects: 100% (3395/3395), done.
remote: Compressing objects: 100% (1606/1606), done.
remote: Total 90944 (delta 1948), reused 3207 (delta 1773), pack-reused 87549
Receiving objects: 100% (90944/90944), 50.39 MiB | 11.88 MiB/s, done.
Resolving deltas: 100% (66492/66492), done.
root@ruby:~# cd passenger
root@ruby:~/passenger# git submodule init
Submodule 'build/support/vendor/cxx_hinted_parser' (https://github.com/phusion/c xx_hinted_parser.git) registered for path 'build/support/vendor/cxx_hinted_parse r'
Submodule 'build/support/vendor/cxxcodebuilder' (https://github.com/phusion/cxxc odebuilder.git) registered for path 'build/support/vendor/cxxcodebuilder'
Submodule 'packaging/binaries' (https://github.com/phusion/passenger_binary_buil d_automation.git) registered for path 'packaging/binaries'
Submodule 'packaging/debian' (https://github.com/phusion/passenger_apt_automatio n.git) registered for path 'packaging/debian'
Submodule 'packaging/homebrew' (https://github.com/phusion/passenger_homebrew_au tomation.git) registered for path 'packaging/homebrew'
Submodule 'packaging/rpm' (https://github.com/phusion/passenger_rpm_automation.g it) registered for path 'packaging/rpm'
root@ruby:~/passenger# git submodule update
Cloning into '/root/passenger/build/support/vendor/cxx_hinted_parser'...
Cloning into '/root/passenger/build/support/vendor/cxxcodebuilder'...
Cloning into '/root/passenger/packaging/binaries'...
Cloning into '/root/passenger/packaging/debian'...
Cloning into '/root/passenger/packaging/homebrew'...
Cloning into '/root/passenger/packaging/rpm'...
Submodule path 'build/support/vendor/cxx_hinted_parser': checked out '72e85d015a52af292dd970d86f787ee66f2736ac'
Submodule path 'build/support/vendor/cxxcodebuilder': checked out '35af224d7b868d9ddb4b8624ad4091335ebe2e15'
Submodule path 'packaging/binaries': checked out 'c015329a2a5b09178e02d351dd99b4f6b6ba1251'
Submodule path 'packaging/debian': checked out 'a66303f0369c27216a2afdf4d60274c731ecf2a4'
Submodule path 'packaging/homebrew': checked out 'd648bfa4ed64b212aece1bc779c97ed3beb4019d'
Submodule path 'packaging/rpm': checked out 'e9ee9c775672328a7904593ac4cdcee4e69e787a'
root@ruby:~/passenger# cd packaging/debian
root@ruby:~/passenger/packaging/debian# mkdir /tmp/{c,o,w}
root@ruby:~/passenger/packaging/debian# ./build -p ../../ -c /tmp/c -o /tmp/o -w /tmp/w -d bookworm pkg:all
+ mkdir -p /tmp/w
+ mkdir -p /tmp/c
+ mkdir -p /tmp/c/pbuilder/ccache
+ mkdir -p /tmp/o
+ Initializing ccache directory for amd64
/root/passenger/packaging/debian/internal/lib/library.sh: line 30: docker: command not found
I even installed Docker and repeated the commands.
apt-get install docke
Do I need to run them in a specific directory?
@celsoannes if you installed docker and the script cannot find docker, that's some kind of PATH issue. passenger/packaging/debian
is the dir to run the build command from.
You need to install docker-ce or docker-ce-cli, not docker apt-file search /usr/bin/docker
"apt-get install docker.io" did it for me on debian 12 itself :)
"apt-get install docker.io" did it for me on debian 12 itself :)
@ctessarek It didn't give that error anymore after installing docker.io
.
root@ruby:/usr/src/passenger/packaging/debian# ./build -p ../../ -c /tmp/c -o /tmp/o -w /tmp/w -d bookworm pkg:all
+ mkdir -p /tmp/w
+ mkdir -p /tmp/c
+ mkdir -p /tmp/c/pbuilder/ccache
+ mkdir -p /tmp/o
+ Initializing ccache directory for amd64
Unable to find image 'phusion/passenger_apt_automation_buildbox:2.0.7' locally
2.0.7: Pulling from phusion/passenger_apt_automation_buildbox
2b55860d4c66: Pull complete
8e058277d049: Pull complete
cac814e1eefd: Pull complete
1b77b2f3c364: Pull complete
5fd05d631fdb: Pull complete
Digest: sha256:5d77997ea6ca3a0b2395833e6b691fc7d352bcd5f02d43bea5ad4e9864929907
Status: Downloaded newer image for phusion/passenger_apt_automation_buildbox:2.0.7
root:x:0:
root:x:0:0:root:/root:/bin/bash
userdel: user root is currently used by process 1
But the folder where the package should be is empty.
root@ruby:/usr/src/passenger/packaging/debian# cd /tmp/o
root@ruby:/tmp/o# ls
root@ruby:/tmp/o# ls -la
total 8
drwxr-xr-x 2 root root 4096 out 4 10:47 .
drwxrwxrwt 11 root root 4096 out 4 11:11 ..
i got the same error when trying as root. try again as non-root user (and make sure this non-root user is in the group "docker") :)
also, (i don't know if it's really required, but) i rebooted after installing docker.
now
./build -p ../../ -c /tmp/c -o /tmp/o -w /tmp/w -a amd64 -d bookworm pkg:passenger:bookworm:amd64
is running fine (still not finished, however, so who knows.. ;D )
oh yeah the script requires the user that runs it to have a "user" uid, not a "system" uid, so if your uid is under 1024 or so you might have issues. I think by default debian/ubuntu creates normal users in a high enough range.
oh yeah the script requires the user that runs it to have a "user" uid, not a "system" uid, so if your uid is under 1024 or so you might have issues. I think by default debian/ubuntu creates normal users in a high enough range.
I wasn't sure, so I went to look for the answer.
The UID value is non-negative, with values from zero to 99 typically reserved for the Kernel, values from 100 to 999 reserved for system administration, and values from 1000 to 59999 allocated for system user groups.
The default UID configuration can be found in the file at /etc/adduser.conf.
FIRST_SYSTEM_UID=100
LAST_SYSTEM_UID=999
FIRST_UID=1000
LAST_UID=59999
root@ruby:/home/mako/passenger/packaging/debian# id mako
uid=1001(mako) gid=1001(mako) grupos=1001(mako),27(sudo),100(users)
I tried to run it as a system user and it gave this error:
mako@ruby:~/passenger/packaging/debian$ ./build -p ../../ -c /tmp/c -o /tmp/o -w /tmp/w -d bookworm pkg:all
+ mkdir -p /tmp/w
+ mkdir -p /tmp/c
+ mkdir -p /tmp/c/pbuilder/ccache
+ mkdir -p /tmp/o
+ Initializing ccache directory for amd64
docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create?platform=linux%2Famd64": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
It didn't work with sudo
either.
mako@ruby:~/passenger/packaging/debian$ sudo ./build -p ../../ -c /tmp/c -o /tmp/o -w /tmp/w -d bookworm pkg:all
+ mkdir -p /tmp/w
+ mkdir -p /tmp/c
+ mkdir -p /tmp/c/pbuilder/ccache
+ mkdir -p /tmp/o
+ Initializing ccache directory for amd64
root:x:0:
root:x:0:0:root:/root:/bin/bash
userdel: user root is currently used by process 1
On one hand, I cannot run it because I don't have sufficient permission, on the other hand, I have too much permission.
@celsoannes you must add the user that runs the script to the docker group, in order to have permission to use docker.
I'm not familiar with Docker, but it seems like everything is okay.
uid=1001(mako) gid=1001(mako) grupos=1001(mako),27(sudo),100(users),109(docker)
mako@ruby:~/passenger/packaging/debian$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
719385e32844: Pull complete
Digest: sha256:4f53e2564790c8e7856ec08e384732aa38dc43c52f02952483e3f003afbf23db
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
mako@ruby:~/passenger/packaging/debian$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
815c0ceda329 hello-world "/hello" About a minute ago Exited (0) About a minute ago reverent_villani
It seems correct now, but I'm still encountering errors.
mako@ruby:~/passenger/packaging/debian$ ./build -p ../../ -c /tmp/c -o /tmp/o -w /tmp/w -d bookworm pkg:all
+ mkdir -p /tmp/w
+ mkdir -p /tmp/c
+ mkdir -p /tmp/c/pbuilder/ccache
+ mkdir -p /tmp/o
+ Initializing ccache directory for amd64
-------- Entering Docker container for amd64 --------
rm -rf /work/*
rake aborted!
Errno::EACCES: Permission denied @ rb_sysopen - /work/state.log
/system/internal/lib/tracking.rb:29:in `initialize'
/system/internal/lib/tracking.rb:29:in `open'
/system/internal/lib/tracking.rb:29:in `block in initialize_tracking_database_lo gs!'
/system/internal/lib/tracking.rb:28:in `synchronize'
/system/internal/lib/tracking.rb:28:in `initialize_tracking_database_logs!'
/system/internal/build/Rakefile:236:in `block in <top (required)>'
/var/lib/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
Tasks: TOP => start
(See full trace by running task with --trace)
@celsoannes I'm guessing that the /tmp/w
dir left over from a previous sudo/root run has permissions that aren't compatible with a normal user? try deleting the old /tmp/{c,o,w}
dirs and recreating them.
@CamJN Since I wasn't sure about the Docker installation, as I had pulled in other packages and added a repository for it, I performed a clean installation from scratch, and now it seems to be working.
mako@ruby:/tmp/o/bookworm$ ls -lh /tmp/o/bookworm/
total 41M
-rw-r--r-- 1 mako mako 457K out 4 16:18 libapache2-mod-passenger_6.0.19-1~bookworm1_amd64.deb
-rw-r--r-- 1 mako mako 441K out 4 16:18 libnginx-mod-http-passenger_6.0.19-1~bookworm1_amd64.deb
-rw-r--r-- 1 mako mako 2,3M out 4 16:18 passenger_6.0.19-1~bookworm1_amd64.deb
-rw-r--r-- 1 mako mako 11K out 4 16:18 passenger_6.0.19-1~bookworm1.debian.tar.xz
-rw-r--r-- 1 mako mako 1,6K out 4 16:18 passenger_6.0.19-1~bookworm1.dsc
-rw-r--r-- 1 mako mako 11M out 4 16:18 passenger_6.0.19.orig.tar.gz
-rw-r--r-- 1 mako mako 23M out 4 16:18 passenger-dbg_6.0.19-1~bookworm1_amd64.deb
-rw-r--r-- 1 mako mako 4,5M out 4 16:18 passenger-dev_6.0.19-1~bookworm1_amd64.deb
-rw-r--r-- 1 mako mako 92K out 4 16:18 passenger-doc_6.0.19-1~bookworm1_all.deb
Question: Can I, since I don't want and don't need Docker on my production server, use the packages (.deb) generated on another Debian 12 server?
@celsoannes yup, you can install these packages on other amd64 bookworm servers. This is very nearly exactly how we generate the packages ourselves. It looks like either you passed in a -a
flag to the build script to only build amd64 or your docker didn't come with the tools to build arm packages, but as long as you are on amd64 boxes you're good to go.
(I was not able try this yet, I'm currently at Rails World)
Hi all,
I was able to compile with doing this as root
:
apt install docker.io
usermod -a -G docker deploy
systemctl restart docker
Then the commands of @CamJN as deploy
(you need to start a new session after adding the user to the docker
group).
And to install:
dpkg -i passenger_6.0.19-1\~bookworm1_amd64.deb libnginx-mod-http-passenger_6.0.19-1\~bookworm1_amd64.deb
If some of you need the resulting DEB files, I can upload them somewhere and give you a link, DM on Twitter (@aurels).
Any ETA about an official release ? :-)
Debian 12 "bookworm" was released last month, but I don't see it as an option in your installation instructions: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/standalone/install/#select_os
And I also don't see it in your apt repo:
https://oss-binaries.phusionpassenger.com/apt/passenger/dists/
I was wondering if you were planning to support it, and if so, when you think you'll have packages for it? Thanks!